From 57738a1f3c19b1c3a00bd3ac5108f8cd0af32f99 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Tue, 8 Mar 2022 21:30:05 +0000 Subject: [PATCH] JAL-3438 spotless for 2.11.2.0 --- src/com/stevesoft/pat/ChangeRule.java | 6 +- src/com/stevesoft/pat/Ctrl.java | 62 +- src/com/stevesoft/pat/Custom.java | 8 +- src/com/stevesoft/pat/FastBracket.java | 9 +- src/com/stevesoft/pat/FastMulti.java | 7 +- src/com/stevesoft/pat/FileRegex.java | 8 +- src/com/stevesoft/pat/Pattern.java | 4 +- src/com/stevesoft/pat/PopRule.java | 4 +- src/com/stevesoft/pat/Prop.java | 4 +- src/com/stevesoft/pat/PushRule.java | 7 +- src/com/stevesoft/pat/RegOpt.java | 10 +- src/com/stevesoft/pat/RegRes.java | 19 +- src/com/stevesoft/pat/Regex.java | 61 +- src/com/stevesoft/pat/RegexTokenizer.java | 4 +- src/com/stevesoft/pat/RegexWriter.java | 4 +- src/com/stevesoft/pat/ReplaceRule.java | 12 +- src/com/stevesoft/pat/Replacer.java | 19 +- src/com/stevesoft/pat/Skip.java | 11 +- src/com/stevesoft/pat/SkipBMH.java | 8 +- src/com/stevesoft/pat/Skipped.java | 5 +- src/com/stevesoft/pat/Transformer.java | 10 +- src/com/stevesoft/pat/Validator.java | 6 +- src/com/stevesoft/pat/WantMoreTextReplaceRule.java | 4 +- src/com/stevesoft/pat/oneChar.java | 6 +- src/com/stevesoft/pat/parsePerl.java | 3 +- .../stevesoft/pat/wrap/RandomAccessFileWrap.java | 7 +- src/ext/edu/ucsf/rbvi/strucviz2/ChimUtils.java | 27 +- src/ext/edu/ucsf/rbvi/strucviz2/ChimeraChain.java | 6 +- .../edu/ucsf/rbvi/strucviz2/ChimeraManager.java | 26 +- .../edu/ucsf/rbvi/strucviz2/ChimeraResidue.java | 16 +- .../edu/ucsf/rbvi/strucviz2/ChimeraTreeModel.java | 4 +- .../edu/ucsf/rbvi/strucviz2/StructureManager.java | 33 +- .../ucsf/rbvi/strucviz2/port/ListenerThreads.java | 4 +- src/ext/vamsas/IRegistryServiceLocator.java | 12 +- src/ext/vamsas/Jpred.java | 4 +- src/ext/vamsas/JpredServiceLocator.java | 12 +- src/ext/vamsas/JpredSoapBindingStub.java | 66 +- src/ext/vamsas/MuscleWSServiceLocator.java | 12 +- src/ext/vamsas/MuscleWSSoapBindingStub.java | 50 +- src/ext/vamsas/RegistryServiceSoapBindingStub.java | 18 +- src/ext/vamsas/SeqSearchServiceLocator.java | 12 +- .../vamsas/SeqSearchServiceSoapBindingStub.java | 79 +- src/ext/vamsas/ServiceHandle.java | 21 +- src/ext/vamsas/ServiceHandles.java | 13 +- src/jalview/analysis/AAFrequency.java | 7 +- src/jalview/analysis/AlignSeq.java | 18 +- src/jalview/analysis/AlignmentSorter.java | 13 +- src/jalview/analysis/AlignmentUtils.java | 79 +- src/jalview/analysis/AnnotationSorter.java | 3 +- src/jalview/analysis/CodingUtils.java | 2 +- src/jalview/analysis/Conservation.java | 4 +- src/jalview/analysis/CrossRef.java | 47 +- src/jalview/analysis/Dna.java | 44 +- src/jalview/analysis/Finder.java | 59 +- src/jalview/analysis/GeneticCodes.java | 14 +- src/jalview/analysis/PCA.java | 11 +- src/jalview/analysis/Rna.java | 4 - src/jalview/analysis/SequenceIdMatcher.java | 2 +- .../analysis/scoremodels/FeatureDistanceModel.java | 4 +- src/jalview/api/AlignViewportI.java | 6 +- src/jalview/api/FeatureColourI.java | 4 +- src/jalview/api/FeatureRenderer.java | 18 +- src/jalview/api/FinderI.java | 18 +- src/jalview/api/SplitContainerI.java | 12 +- src/jalview/appletgui/APopupMenu.java | 12 +- src/jalview/appletgui/AlignFrame.java | 28 +- src/jalview/appletgui/AlignViewport.java | 21 +- src/jalview/appletgui/AlignmentPanel.java | 2 +- src/jalview/appletgui/AnnotationPanel.java | 4 +- src/jalview/appletgui/AppletJmol.java | 2 +- src/jalview/appletgui/FeatureColourChooser.java | 6 +- src/jalview/appletgui/FeatureRenderer.java | 6 +- src/jalview/appletgui/Finder.java | 3 +- src/jalview/appletgui/OverviewPanel.java | 51 +- src/jalview/appletgui/RotatableCanvas.java | 28 +- src/jalview/appletgui/ScalePanel.java | 11 +- src/jalview/appletgui/SeqCanvas.java | 56 +- src/jalview/appletgui/SeqPanel.java | 9 +- src/jalview/appletgui/SequenceRenderer.java | 10 +- src/jalview/appletgui/TreeCanvas.java | 2 +- src/jalview/bin/Cache.java | 47 +- src/jalview/bin/Console.java | 24 +- src/jalview/bin/HiDPISetting.java | 6 +- src/jalview/bin/JalviewJS2.java | 12 +- src/jalview/bin/JalviewLite.java | 8 +- src/jalview/commands/ChangeCaseCommand.java | 6 +- src/jalview/commands/EditCommand.java | 89 +- src/jalview/controller/AlignViewController.java | 38 +- .../controller/FeatureSettingsControllerGuiI.java | 4 +- src/jalview/datamodel/AlignedCodonFrame.java | 63 +- src/jalview/datamodel/Alignment.java | 4 +- src/jalview/datamodel/AlignmentAnnotation.java | 26 +- src/jalview/datamodel/DBRefEntry.java | 130 +- src/jalview/datamodel/DBRefSource.java | 200 +- src/jalview/datamodel/GeneLocus.java | 4 +- src/jalview/datamodel/HiddenColumns.java | 29 +- src/jalview/datamodel/HiddenColumnsCursor.java | 3 +- src/jalview/datamodel/MappedFeatures.java | 18 +- src/jalview/datamodel/PDBEntry.java | 23 +- src/jalview/datamodel/RangeIterator.java | 6 +- src/jalview/datamodel/ResidueCount.java | 2 +- src/jalview/datamodel/SearchResults.java | 4 +- src/jalview/datamodel/SequenceCursor.java | 4 +- src/jalview/datamodel/SequenceFeature.java | 30 +- src/jalview/datamodel/SequenceGroup.java | 14 +- src/jalview/datamodel/SequenceI.java | 22 +- src/jalview/datamodel/StartRegionIterator.java | 3 +- src/jalview/datamodel/VisibleContigsIterator.java | 4 +- .../datamodel/features/FeatureAttributes.java | 6 +- src/jalview/datamodel/features/FeatureMatcher.java | 9 +- .../datamodel/features/FeatureMatcherSet.java | 3 +- src/jalview/datamodel/features/FeatureSource.java | 4 +- src/jalview/datamodel/features/FeatureStore.java | 49 +- .../datamodel/features/SequenceFeatures.java | 21 +- .../datamodel/features/SequenceFeaturesI.java | 16 +- src/jalview/ext/android/SparseDoubleArray.java | 4 +- src/jalview/ext/android/SparseIntArray.java | 12 +- src/jalview/ext/android/SparseShortArray.java | 4 +- src/jalview/ext/ensembl/EnsemblCds.java | 2 +- src/jalview/ext/ensembl/EnsemblFeatures.java | 24 +- src/jalview/ext/ensembl/EnsemblGene.java | 11 +- src/jalview/ext/ensembl/EnsemblInfo.java | 23 +- src/jalview/ext/ensembl/EnsemblLookup.java | 23 +- src/jalview/ext/ensembl/EnsemblMap.java | 39 +- src/jalview/ext/ensembl/EnsemblSeqProxy.java | 89 +- .../ext/ensembl/EnsemblSequenceFetcher.java | 4 +- src/jalview/ext/ensembl/EnsemblSymbol.java | 36 +- src/jalview/ext/ensembl/EnsemblXref.java | 45 +- src/jalview/ext/ensembl/Species.java | 9 +- src/jalview/ext/htsjdk/HtsContigDb.java | 4 +- src/jalview/ext/htsjdk/VCFReader.java | 10 +- src/jalview/ext/jmol/JmolCommands.java | 26 +- src/jalview/ext/jmol/JmolParser.java | 42 +- src/jalview/ext/pymol/PymolCommands.java | 14 +- src/jalview/ext/pymol/PymolManager.java | 7 +- src/jalview/ext/rbvi/chimera/ChimeraCommands.java | 27 +- src/jalview/ext/rbvi/chimera/ChimeraXCommands.java | 10 +- src/jalview/ext/rbvi/chimera/ChimeraXManager.java | 4 +- .../ext/rbvi/chimera/JalviewChimeraBinding.java | 83 +- src/jalview/ext/so/SequenceOntology.java | 6 +- src/jalview/fts/api/FTSRestClientI.java | 5 +- src/jalview/fts/core/FTSDataColumnPreferences.java | 14 +- src/jalview/fts/core/FTSRestClient.java | 35 +- src/jalview/fts/core/FTSRestRequest.java | 10 +- src/jalview/fts/core/FTSRestResponse.java | 2 +- src/jalview/fts/core/GFTSPanel.java | 57 +- src/jalview/fts/service/pdb/PDBFTSPanel.java | 5 +- .../fts/service/threedbeacons/TDB_FTSData.java | 56 +- .../service/threedbeacons/TDBeaconsFTSPanel.java | 12 +- .../threedbeacons/TDBeaconsFTSRestClient.java | 45 +- .../fts/service/uniprot/UniProtFTSRestClient.java | 2 +- .../fts/service/uniprot/UniprotFTSPanel.java | 22 +- src/jalview/gui/APQHandlers.java | 37 +- src/jalview/gui/AlignExportOptions.java | 38 +- src/jalview/gui/AlignFrame.java | 16 +- src/jalview/gui/AlignViewport.java | 38 +- src/jalview/gui/AlignmentPanel.java | 35 +- src/jalview/gui/AnnotationColourChooser.java | 6 +- src/jalview/gui/AnnotationColumnChooser.java | 46 +- src/jalview/gui/AnnotationExporter.java | 39 +- src/jalview/gui/AnnotationLabels.java | 46 +- src/jalview/gui/AnnotationPanel.java | 51 +- src/jalview/gui/AnnotationRowFilter.java | 5 +- src/jalview/gui/AppJmol.java | 12 +- src/jalview/gui/AppJmolBinding.java | 9 +- src/jalview/gui/AppVarnaBinding.java | 8 +- src/jalview/gui/BlogReader.java | 8 +- src/jalview/gui/CalculationChooser.java | 2 +- src/jalview/gui/ChimeraViewFrame.java | 30 +- src/jalview/gui/ColourMenuHelper.java | 4 +- src/jalview/gui/Console.java | 6 +- src/jalview/gui/CrossRefAction.java | 16 +- src/jalview/gui/CutAndPasteTransfer.java | 7 +- src/jalview/gui/Desktop.java | 2069 ++-- src/jalview/gui/EditNameDialog.java | 4 +- src/jalview/gui/FeatureEditor.java | 44 +- src/jalview/gui/FeatureSettings.java | 52 +- src/jalview/gui/FeatureTypeSettings.java | 44 +- src/jalview/gui/Finder.java | 5 +- src/jalview/gui/IdCanvas.java | 54 +- src/jalview/gui/IdPanel.java | 5 +- src/jalview/gui/ImageExporter.java | 16 +- src/jalview/gui/JDatabaseTree.java | 4 +- src/jalview/gui/JalviewBooleanRadioButtons.java | 2 +- src/jalview/gui/JalviewChimeraXBindingModel.java | 6 +- src/jalview/gui/JalviewColourChooser.java | 15 +- src/jalview/gui/JvOptionPane.java | 100 +- src/jalview/gui/JvSwingUtils.java | 13 +- src/jalview/gui/OOMWarning.java | 3 +- src/jalview/gui/OptsAndParamsPage.java | 19 +- src/jalview/gui/OverviewCanvas.java | 10 +- src/jalview/gui/OverviewPanel.java | 72 +- src/jalview/gui/PCAPanel.java | 13 +- src/jalview/gui/PairwiseAlignPanel.java | 15 +- src/jalview/gui/PopupMenu.java | 63 +- src/jalview/gui/ProgressPanel.java | 2 +- src/jalview/gui/PromptUserConfig.java | 4 +- src/jalview/gui/PymolBindingModel.java | 18 +- src/jalview/gui/PymolViewer.java | 37 +- src/jalview/gui/RotatableCanvas.java | 25 +- src/jalview/gui/ScalePanel.java | 26 +- src/jalview/gui/SeqCanvas.java | 105 +- src/jalview/gui/SeqPanel.java | 78 +- src/jalview/gui/SequenceRenderer.java | 24 +- src/jalview/gui/Slider.java | 4 +- src/jalview/gui/SplitFrame.java | 19 +- src/jalview/gui/StructureChooser.java | 108 +- src/jalview/gui/StructureViewer.java | 16 +- src/jalview/gui/TextColourChooser.java | 6 +- src/jalview/gui/TreeCanvas.java | 16 +- src/jalview/gui/TreePanel.java | 22 +- src/jalview/gui/UserDefinedColours.java | 88 +- src/jalview/gui/VamsasApplication.java | 9 +- src/jalview/gui/ViewSelectionMenu.java | 2 +- src/jalview/gui/WsJobParameters.java | 4 +- src/jalview/gui/WsParamSetManager.java | 7 +- .../PDBStructureChooserQuerySource.java | 64 +- .../StructureChooserQuerySource.java | 13 +- .../gui/structurechooser/TDBResultAnalyser.java | 58 +- src/jalview/io/AnnotationFile.java | 4 +- src/jalview/io/AppletFormatAdapter.java | 27 +- src/jalview/io/BackupFilenameParts.java | 3 +- src/jalview/io/BackupFiles.java | 16 +- src/jalview/io/BioJsHTMLOutput.java | 6 +- src/jalview/io/EMBLLikeFlatFile.java | 24 +- src/jalview/io/FeaturesFile.java | 94 +- src/jalview/io/FileFormat.java | 7 +- src/jalview/io/FileFormats.java | 3 +- src/jalview/io/FileLoader.java | 35 +- src/jalview/io/FormatAdapter.java | 13 +- src/jalview/io/HtmlSvgOutput.java | 22 +- src/jalview/io/IdentifyFile.java | 15 +- src/jalview/io/JSONFile.java | 61 +- src/jalview/io/JalviewFileChooser.java | 40 +- src/jalview/io/JalviewFileFilter.java | 2 +- src/jalview/io/JalviewFileView.java | 7 +- src/jalview/io/MSFfile.java | 3 +- src/jalview/io/ModellerDescription.java | 8 +- src/jalview/io/NewickFile.java | 21 +- src/jalview/io/PhylipFile.java | 4 +- src/jalview/io/PileUpfile.java | 4 +- src/jalview/io/SequenceAnnotationReport.java | 68 +- src/jalview/io/StructureFile.java | 6 +- src/jalview/io/VamsasAppDatastore.java | 2 +- src/jalview/io/gff/GffHelperBase.java | 3 +- src/jalview/io/gff/InterProScanHelper.java | 3 +- src/jalview/io/vamsas/Datasetsequence.java | 3 +- src/jalview/io/vamsas/Dbref.java | 6 +- src/jalview/io/vamsas/Rangetype.java | 4 +- src/jalview/io/vamsas/Sequencemapping.java | 29 +- src/jalview/io/vamsas/Tree.java | 8 +- src/jalview/io/vcf/VCFLoader.java | 94 +- .../javascript/MouseOverStructureListener.java | 5 +- src/jalview/javascript/json/JSON.java | 54 +- src/jalview/javascript/web/Client.java | 2 +- src/jalview/javascript/web/ClientResponse.java | 41 +- src/jalview/jbgui/FilterOption.java | 12 +- src/jalview/jbgui/GAlignFrame.java | 81 +- src/jalview/jbgui/GAlignmentPanel.java | 55 +- src/jalview/jbgui/GCutAndPasteHtmlTransfer.java | 42 +- src/jalview/jbgui/GCutAndPasteTransfer.java | 36 +- src/jalview/jbgui/GDesktop.java | 23 +- src/jalview/jbgui/GFinder.java | 30 +- src/jalview/jbgui/GRnaStructureViewer.java | 2 +- src/jalview/jbgui/GSliderPanel.java | 3 +- src/jalview/jbgui/GSplitFrame.java | 4 +- src/jalview/jbgui/GStructureChooser.java | 97 +- src/jalview/jbgui/GWebserviceInfo.java | 2 +- .../json/binding/biojs/BioJSRepositoryPojo.java | 6 +- src/jalview/math/MatrixI.java | 5 +- src/jalview/project/Jalview2XML.java | 34 +- src/jalview/renderer/AnnotationRenderer.java | 6 +- src/jalview/renderer/OverviewRenderer.java | 18 +- src/jalview/renderer/OverviewResColourFinder.java | 4 +- src/jalview/renderer/ResidueColourFinder.java | 11 +- .../renderer/seqfeatures/FeatureRenderer.java | 26 +- src/jalview/schemes/AnnotationColourGradient.java | 2 +- src/jalview/schemes/ColourSchemeProperty.java | 6 +- src/jalview/schemes/ColourSchemes.java | 7 +- src/jalview/schemes/FeatureColour.java | 11 +- src/jalview/schemes/IdColourScheme.java | 2 +- src/jalview/schemes/ResidueProperties.java | 3 +- src/jalview/structure/AtomSpec.java | 4 +- src/jalview/structure/StructureCommand.java | 2 +- src/jalview/structure/StructureCommandsBase.java | 7 +- src/jalview/structure/StructureCommandsI.java | 9 +- .../structure/StructureSelectionManager.java | 71 +- .../structures/models/AAStructureBindingModel.java | 16 +- src/jalview/urls/IdentifiersUrlProvider.java | 18 +- src/jalview/util/ColorUtils.java | 1 + src/jalview/util/Comparison.java | 7 +- src/jalview/util/DBRefUtils.java | 1157 +- src/jalview/util/HttpUtils.java | 6 +- src/jalview/util/ImageMaker.java | 5 +- src/jalview/util/MapList.java | 4 +- src/jalview/util/MappingUtils.java | 109 +- src/jalview/util/Platform.java | 31 +- src/jalview/util/ShortcutKeyMaskExWrapper11.java | 1 - src/jalview/util/StringUtils.java | 3 +- src/jalview/util/dialogrunner/DialogRunnerI.java | 46 +- src/jalview/util/matcher/Matcher.java | 18 +- src/jalview/viewmodel/AlignmentViewport.java | 13 +- .../viewmodel/OverviewDimensionsShowHidden.java | 1 - src/jalview/viewmodel/ViewportRanges.java | 6 +- .../seqfeatures/FeatureRendererModel.java | 47 +- src/jalview/ws/AWSThread.java | 12 +- src/jalview/ws/DBRefFetcher.java | 46 +- src/jalview/ws/HttpClientUtils.java | 2 +- src/jalview/ws/SequenceFetcher.java | 3 +- src/jalview/ws/dbsources/EBIAlfaFold.java | 31 +- src/jalview/ws/dbsources/EmblFlatfileSource.java | 6 +- src/jalview/ws/dbsources/Pdb.java | 4 +- src/jalview/ws/dbsources/Pfam.java | 3 +- src/jalview/ws/dbsources/Rfam.java | 4 +- src/jalview/ws/dbsources/TDBeacons.java | 22 +- src/jalview/ws/dbsources/Uniprot.java | 33 +- src/jalview/ws/dbsources/Xfam.java | 4 +- src/jalview/ws/ebi/EBIFetchClient.java | 8 +- src/jalview/ws/jws1/Discoverer.java | 22 +- src/jalview/ws/jws2/AADisorderClient.java | 13 +- src/jalview/ws/jws2/AbstractJabaCalcWorker.java | 4 +- src/jalview/ws/jws2/Jws2Discoverer.java | 6 +- src/jalview/ws/jws2/MsaWSClient.java | 26 +- src/jalview/ws/rest/InputType.java | 4 +- src/jalview/ws/rest/RestClient.java | 5 +- src/jalview/ws/rest/RestJobThread.java | 3 +- src/jalview/ws/seqfetcher/ASequenceFetcher.java | 6 +- src/jalview/ws/sifts/SiftsClient.java | 13 +- src/jalview/ws/utils/UrlDownloadClient.java | 95 +- src/jalview/xml/binding/embl/EntrySetType.java | 76 +- src/jalview/xml/binding/embl/EntryType.java | 4399 ++++---- src/jalview/xml/binding/embl/ObjectFactory.java | 296 +- src/jalview/xml/binding/embl/ROOT.java | 108 +- src/jalview/xml/binding/embl/XrefType.java | 155 +- src/jalview/xml/binding/jalview/AlcodonFrame.java | 488 +- src/jalview/xml/binding/jalview/Annotation.java | 1542 +-- .../binding/jalview/AnnotationColourScheme.java | 458 +- .../xml/binding/jalview/AnnotationElement.java | 349 +- src/jalview/xml/binding/jalview/DoubleMatrix.java | 311 +- src/jalview/xml/binding/jalview/DoubleVector.java | 89 +- src/jalview/xml/binding/jalview/Feature.java | 594 +- .../xml/binding/jalview/FeatureMatcher.java | 243 +- .../xml/binding/jalview/FeatureMatcherSet.java | 281 +- src/jalview/xml/binding/jalview/FilterBy.java | 74 +- src/jalview/xml/binding/jalview/JalviewModel.java |11642 ++++++++++---------- .../xml/binding/jalview/JalviewModelType.java | 8707 ++++++++------- .../xml/binding/jalview/JalviewUserColours.java | 1035 +- src/jalview/xml/binding/jalview/MapListType.java | 478 +- src/jalview/xml/binding/jalview/Mapping.java | 195 +- src/jalview/xml/binding/jalview/NoValueColour.java | 74 +- src/jalview/xml/binding/jalview/ObjectFactory.java | 1031 +- src/jalview/xml/binding/jalview/PcaDataType.java | 188 +- src/jalview/xml/binding/jalview/Pdbentry.java | 378 +- src/jalview/xml/binding/jalview/Sequence.java | 542 +- src/jalview/xml/binding/jalview/SequenceSet.java | 498 +- src/jalview/xml/binding/jalview/SequenceType.java | 247 +- src/jalview/xml/binding/jalview/ThresholdType.java | 40 +- src/jalview/xml/binding/jalview/VAMSAS.java | 145 +- .../binding/jalview/WebServiceParameterSet.java | 321 +- src/jalview/xml/binding/jalview/package-info.java | 4 +- src/jalview/xml/binding/sifts/Alignment.java | 3773 +++---- src/jalview/xml/binding/sifts/EntityType.java | 64 +- src/jalview/xml/binding/sifts/Entry.java | 4454 ++++---- src/jalview/xml/binding/sifts/ObjectFactory.java | 640 +- src/jalview/xml/binding/sifts/package-info.java | 4 +- src/jalview/xml/binding/uniprot/CitationType.java | 916 +- src/jalview/xml/binding/uniprot/CofactorType.java | 173 +- src/jalview/xml/binding/uniprot/CommentType.java | 2817 ++--- .../xml/binding/uniprot/ConsortiumType.java | 63 +- .../xml/binding/uniprot/DbReferenceType.java | 288 +- src/jalview/xml/binding/uniprot/Entry.java | 1098 +- src/jalview/xml/binding/uniprot/EventType.java | 59 +- src/jalview/xml/binding/uniprot/EvidenceType.java | 225 +- .../xml/binding/uniprot/EvidencedStringType.java | 172 +- src/jalview/xml/binding/uniprot/FeatureType.java | 478 +- .../xml/binding/uniprot/GeneLocationType.java | 188 +- src/jalview/xml/binding/uniprot/GeneNameType.java | 176 +- src/jalview/xml/binding/uniprot/GeneType.java | 80 +- .../xml/binding/uniprot/ImportedFromType.java | 66 +- .../xml/binding/uniprot/InteractantType.java | 156 +- src/jalview/xml/binding/uniprot/IsoformType.java | 519 +- src/jalview/xml/binding/uniprot/KeywordType.java | 172 +- src/jalview/xml/binding/uniprot/LocationType.java | 225 +- src/jalview/xml/binding/uniprot/MoleculeType.java | 111 +- src/jalview/xml/binding/uniprot/NameListType.java | 83 +- src/jalview/xml/binding/uniprot/ObjectFactory.java | 1037 +- .../xml/binding/uniprot/OrganismNameType.java | 111 +- src/jalview/xml/binding/uniprot/OrganismType.java | 350 +- src/jalview/xml/binding/uniprot/PersonType.java | 59 +- .../binding/uniprot/PhysiologicalReactionType.java | 172 +- src/jalview/xml/binding/uniprot/PositionType.java | 179 +- src/jalview/xml/binding/uniprot/PropertyType.java | 107 +- .../xml/binding/uniprot/ProteinExistenceType.java | 63 +- src/jalview/xml/binding/uniprot/ProteinType.java | 1746 +-- src/jalview/xml/binding/uniprot/ReactionType.java | 187 +- src/jalview/xml/binding/uniprot/ReferenceType.java | 292 +- src/jalview/xml/binding/uniprot/SequenceType.java | 396 +- .../xml/binding/uniprot/SourceDataType.java | 671 +- src/jalview/xml/binding/uniprot/SourceType.java | 113 +- src/jalview/xml/binding/uniprot/StatusType.java | 120 +- .../binding/uniprot/SubcellularLocationType.java | 205 +- src/jalview/xml/binding/uniprot/Uniprot.java | 123 +- src/jalview/xml/binding/uniprot/package-info.java | 4 +- src/mc_view/AppletPDBViewer.java | 4 +- src/mc_view/PDBChain.java | 51 +- src/mc_view/PDBfile.java | 3 +- src/org/jibble/epsgraphics/EpsDocument.java | 12 +- src/org/jibble/epsgraphics/EpsGraphics2D.java | 53 +- src/org/json/CDL.java | 516 +- src/org/json/Cookie.java | 284 +- src/org/json/CookieList.java | 110 +- src/org/json/HTTP.java | 289 +- src/org/json/HTTPTokener.java | 95 +- src/org/json/JSONArray.java | 3131 +++--- src/org/json/JSONException.java | 68 +- src/org/json/JSONML.java | 1105 +- src/org/json/JSONObject.java | 5215 +++++---- src/org/json/JSONPointer.java | 507 +- src/org/json/JSONPointerException.java | 23 +- src/org/json/JSONPropertyIgnore.java | 14 +- src/org/json/JSONPropertyName.java | 17 +- src/org/json/JSONString.java | 22 +- src/org/json/JSONStringer.java | 80 +- src/org/json/JSONTokener.java | 1016 +- src/org/json/JSONWriter.java | 759 +- src/org/json/Property.java | 88 +- src/org/json/XML.java | 1329 ++- src/org/json/XMLTokener.java | 759 +- src/org/json/simple/ItemList.java | 294 +- src/org/json/simple/JSONArray.java | 841 +- src/org/json/simple/JSONAware.java | 15 +- src/org/json/simple/JSONObject.java | 245 +- src/org/json/simple/JSONStreamAware.java | 15 +- src/org/json/simple/JSONValue.java | 614 +- src/org/json/simple/parser/ContainerFactory.java | 26 +- src/org/json/simple/parser/ContentHandler.java | 199 +- src/org/json/simple/parser/ParseException.java | 183 +- src/org/json/simple/parser/Yylex.java | 481 +- src/org/json/simple/parser/Yytoken.java | 109 +- .../stackoverflowusers/file/WindowsShortcut.java | 420 +- src/swingjs/api/JSUtilI.java | 3 +- src/swingjs/api/js/HTML5Applet.java | 48 +- src/uk/ac/ebi/picr/model/CrossReference.java | 46 +- src/uk/ac/ebi/picr/model/UPEntry.java | 51 +- src/uk/ac/ebi/www/Data.java | 9 +- src/uk/ac/ebi/www/InputParams.java | 53 +- src/uk/ac/ebi/www/WSFile.java | 8 +- src/uk/ac/ebi/www/WSWUBlastServiceLocator.java | 4 +- src/uk/ac/ebi/www/WSWUBlastSoapBindingStub.java | 78 +- .../AccessionMapperBindingStub.java | 98 +- .../AccessionMapperServiceLocator.java | 19 +- src/vamsas/objects/simple/Alignment.java | 22 +- src/vamsas/objects/simple/JpredResult.java | 14 +- src/vamsas/objects/simple/MsaResult.java | 10 +- src/vamsas/objects/simple/Msfalignment.java | 10 +- src/vamsas/objects/simple/Result.java | 8 +- src/vamsas/objects/simple/Secstructpred.java | 5 +- src/vamsas/objects/simple/SeqSearchResult.java | 24 +- src/vamsas/objects/simple/Sequence.java | 9 +- src/vamsas/objects/simple/SequenceSet.java | 5 +- src/vamsas/objects/simple/WsJobId.java | 5 +- test/jalview/analysis/AAFrequencyTest.java | 33 +- test/jalview/analysis/AlignSeqTest.java | 8 +- .../analysis/AlignmentAnnotationUtilsTest.java | 5 +- test/jalview/analysis/AlignmentGenerator.java | 42 +- test/jalview/analysis/AlignmentSorterTest.java | 28 +- test/jalview/analysis/AlignmentUtilsTests.java | 384 +- test/jalview/analysis/AnnotationSorterTest.java | 28 +- test/jalview/analysis/CodingUtilsTest.java | 40 +- test/jalview/analysis/ConservationTest.java | 24 +- test/jalview/analysis/CrossRefTest.java | 83 +- test/jalview/analysis/DnaTest.java | 70 +- test/jalview/analysis/FinderTest.java | 17 +- test/jalview/analysis/GroupingTest.java | 23 +- test/jalview/analysis/RnaTest.java | 21 +- test/jalview/analysis/SeqsetUtilsTest.java | 12 +- test/jalview/analysis/SequenceIdMatcherTest.java | 1 - test/jalview/analysis/TestAlignSeq.java | 3 +- .../scoremodels/FeatureDistanceModelTest.java | 115 +- .../jalview/analysis/scoremodels/PIDModelTest.java | 11 +- .../analysis/scoremodels/ScoreMatrixTest.java | 6 +- .../analysis/scoremodels/ScoreModelsTest.java | 6 +- test/jalview/bin/ArgsParserTest.java | 20 +- test/jalview/bin/CommandLineOperations.java | 33 +- test/jalview/bin/JalviewLiteTest.java | 4 +- test/jalview/commands/EditCommandTest.java | 122 +- .../controller/AlignViewControllerTest.java | 36 +- test/jalview/datamodel/AlignedCodonFrameTest.java | 207 +- .../datamodel/AlignedCodonIteratorTest.java | 24 +- .../datamodel/AlignmentAnnotationTests.java | 57 +- test/jalview/datamodel/AlignmentTest.java | 192 +- test/jalview/datamodel/AllColsIteratorTest.java | 15 +- test/jalview/datamodel/AllRowsIteratorTest.java | 13 +- test/jalview/datamodel/ColumnSelectionTest.java | 7 +- test/jalview/datamodel/DBRefEntryTest.java | 50 +- .../jalview/datamodel/HiddenColumnsCursorTest.java | 7 +- test/jalview/datamodel/HiddenColumnsTest.java | 28 +- test/jalview/datamodel/MappedFeaturesTest.java | 7 +- test/jalview/datamodel/MappingTest.java | 10 +- test/jalview/datamodel/PDBEntryTest.java | 10 +- .../datamodel/RangeElementsIteratorTest.java | 30 +- test/jalview/datamodel/ResidueCountTest.java | 16 +- test/jalview/datamodel/SearchResultsTest.java | 22 +- test/jalview/datamodel/SeqCigarTest.java | 4 +- test/jalview/datamodel/SequenceFeatureTest.java | 7 +- test/jalview/datamodel/SequenceGroupTest.java | 12 +- test/jalview/datamodel/SequenceTest.java | 271 +- .../jalview/datamodel/StartRegionIteratorTest.java | 3 +- .../datamodel/VisibleContigsIteratorTest.java | 3 +- .../jalview/datamodel/VisibleRowsIteratorTest.java | 30 +- .../datamodel/features/FeatureAttributesTest.java | 25 +- .../datamodel/features/FeatureMatcherSetTest.java | 16 +- .../datamodel/features/FeatureMatcherTest.java | 4 +- .../datamodel/features/FeatureStoreTest.java | 76 +- .../datamodel/features/SequenceFeaturesTest.java | 148 +- test/jalview/ext/android/SparseIntArrayTest.java | 4 +- test/jalview/ext/android/SparseShortArrayTest.java | 4 +- test/jalview/ext/ensembl/EnsemblCdnaTest.java | 11 +- test/jalview/ext/ensembl/EnsemblCdsTest.java | 3 +- test/jalview/ext/ensembl/EnsemblGeneTest.java | 30 +- test/jalview/ext/ensembl/EnsemblGenomeTest.java | 16 +- .../jalview/ext/ensembl/EnsemblRestClientTest.java | 4 +- test/jalview/ext/ensembl/EnsemblSeqProxyTest.java | 166 +- test/jalview/ext/ensembl/EnsemblXrefTest.java | 11 +- test/jalview/ext/htsjdk/VCFReaderTest.java | 14 +- test/jalview/ext/jmol/JmolCommandsTest.java | 14 +- test/jalview/ext/jmol/JmolParserTest.java | 3 +- .../jmol/JmolVsJalviewPDBParserEndToEndTest.java | 18 +- test/jalview/ext/paradise/TestAnnotate3D.java | 27 +- test/jalview/ext/pymol/PymolCommandsTest.java | 36 +- test/jalview/ext/pymol/PymolManagerTest.java | 9 +- .../ext/rbvi/chimera/ChimeraCommandsTest.java | 34 +- .../ext/rbvi/chimera/ChimeraXCommandsTest.java | 48 +- .../ext/rbvi/chimera/JalviewChimeraView.java | 111 +- test/jalview/ext/so/SequenceOntologyTest.java | 4 +- test/jalview/fts/core/FTSRestClientTest.java | 16 +- test/jalview/fts/service/pdb/PDBFTSPanelTest.java | 22 +- .../fts/service/pdb/PDBFTSRestClientTest.java | 718 +- .../threedbeacons/TDBeaconsFTSRestClientTest.java | 24 +- .../fts/threedbeacons/TDBeaconsPanelTest.java | 28 +- test/jalview/gui/AlignFrameTest.java | 62 +- test/jalview/gui/AlignViewportTest.java | 97 +- test/jalview/gui/AlignmentPanelTest.java | 39 +- test/jalview/gui/AnnotationChooserTest.java | 61 +- test/jalview/gui/AnnotationLabelsTest.java | 2 +- test/jalview/gui/AnnotationRowFilterTest.java | 13 +- test/jalview/gui/ColourMenuHelperTest.java | 20 +- test/jalview/gui/FeatureSettingsTest.java | 3 +- test/jalview/gui/JAL1353bugdemo.java | 3 +- test/jalview/gui/JvOptionPaneTest.java | 1 - test/jalview/gui/JvSwingUtilsTest.java | 4 +- test/jalview/gui/MouseEventDemo.java | 4 +- test/jalview/gui/PaintRefresherTest.java | 4 +- test/jalview/gui/PopupMenuTest.java | 22 +- test/jalview/gui/ProgressBarTest.java | 34 +- test/jalview/gui/ScalePanelTest.java | 2 +- test/jalview/gui/SeqCanvasTest.java | 30 +- test/jalview/gui/SeqPanelTest.java | 375 +- test/jalview/gui/SequenceRendererTest.java | 3 +- test/jalview/gui/StructureChooserTest.java | 121 +- .../StructureChooserQuerySourceTest.java | 266 +- test/jalview/io/AnnotatedPDBFileInputTest.java | 30 +- test/jalview/io/AnnotationFileIOTest.java | 66 +- test/jalview/io/BioJsHTMLOutputTest.java | 23 +- test/jalview/io/ClustalFileTest.java | 4 +- test/jalview/io/EmblFlatFileTest.java | 29 +- test/jalview/io/FeaturesFileTest.java | 105 +- test/jalview/io/FileFormatsTest.java | 6 +- test/jalview/io/FileIOTester.java | 8 +- test/jalview/io/FormatAdapterTest.java | 7 +- test/jalview/io/JSONFileTest.java | 67 +- test/jalview/io/Jalview2xmlBase.java | 3 +- test/jalview/io/JalviewExportPropertiesTests.java | 9 +- test/jalview/io/JalviewFileViewTest.java | 12 +- test/jalview/io/NewickFileTests.java | 40 +- test/jalview/io/PfamFormatInputTest.java | 9 +- test/jalview/io/PhylipFileTests.java | 38 +- test/jalview/io/RNAMLfileTest.java | 6 +- test/jalview/io/ScoreMatrixFileTest.java | 65 +- test/jalview/io/SequenceAnnotationReportTest.java | 50 +- test/jalview/io/StockholmFileTest.java | 184 +- test/jalview/io/TCoffeeScoreFileTest.java | 136 +- test/jalview/io/cache/AppCacheTest.java | 1 - test/jalview/io/gff/ExonerateHelperTest.java | 62 +- test/jalview/io/gff/Gff3HelperTest.java | 31 +- test/jalview/io/gff/GffHelperBaseTest.java | 19 +- test/jalview/io/gff/GffHelperFactoryTest.java | 27 +- test/jalview/io/gff/GffTests.java | 4 +- test/jalview/io/gff/InterProScanHelperTest.java | 8 +- test/jalview/io/vcf/VCFLoaderTest.java | 51 +- test/jalview/math/MatrixTest.java | 56 +- test/jalview/math/SparseMatrixTest.java | 42 +- test/jalview/project/Jalview2xmlTests.java | 18 +- test/jalview/renderer/OverviewRendererTest.java | 7 +- .../renderer/OverviewResColourFinderTest.java | 54 +- test/jalview/renderer/ResidueColourFinderTest.java | 37 +- test/jalview/renderer/ResidueShaderTest.java | 28 +- .../seqfeatures/FeatureColourFinderTest.java | 53 +- .../renderer/seqfeatures/FeatureRendererTest.java | 5 +- .../schemes/AnnotationColourGradientTest.java | 28 +- test/jalview/schemes/Blosum62ColourSchemeTest.java | 3 +- test/jalview/schemes/ClustalxColourSchemeTest.java | 4 +- test/jalview/schemes/ColourSchemePropertyTest.java | 2 +- test/jalview/schemes/ColourSchemesTest.java | 19 +- test/jalview/schemes/FeatureColourTest.java | 55 +- .../schemes/HydrophobicColourSchemeTest.java | 6 +- test/jalview/schemes/JalviewColourSchemeTest.java | 45 +- test/jalview/schemes/PIDColourSchemeTest.java | 6 +- test/jalview/schemes/ResidueColourSchemeTest.java | 34 +- test/jalview/schemes/StrandColourSchemeTest.java | 6 +- test/jalview/schemes/UserColourSchemeTest.java | 3 +- test/jalview/structure/AtomSpecModelTest.java | 2 +- test/jalview/structure/AtomSpecTest.java | 12 +- test/jalview/structure/Mapping.java | 69 +- .../structure/StructureSelectionManagerTest.java | 108 +- .../models/AAStructureBindingModelTest.java | 67 +- .../jalview/urls/AppletUrlProviderFactoryTest.java | 6 +- test/jalview/urls/CustomUrlProviderTest.java | 22 +- .../urls/DesktopUrlProviderFactoryTest.java | 24 +- test/jalview/urls/IdentifiersUrlProviderTest.java | 19 +- test/jalview/urls/UrlLinkDisplayTest.java | 9 +- test/jalview/urls/UrlLinkTableModelTest.java | 22 +- test/jalview/urls/UrlProviderTest.java | 84 +- test/jalview/util/ColorUtilsTest.java | 30 +- test/jalview/util/ComparisonTest.java | 31 +- test/jalview/util/DBRefUtilsTest.java | 66 +- test/jalview/util/DnaUtilsTest.java | 7 +- test/jalview/util/FormatTest.java | 8 +- test/jalview/util/MapListTest.java | 6 +- test/jalview/util/MappingUtilsTest.java | 6 +- test/jalview/util/ParseHtmlBodyAndLinksTest.java | 7 +- test/jalview/util/PlatformTest.java | 3 +- test/jalview/util/QuickSortTest.java | 48 +- test/jalview/util/SparseCountTest.java | 1 + test/jalview/util/StringUtilsTest.java | 63 +- test/jalview/util/UrlLinkTest.java | 39 +- .../util/dialogrunner/DialogRunnerTest.java | 3 +- test/jalview/util/matcher/MatcherTest.java | 10 +- .../OverviewDimensionsHideHiddenTest.java | 172 +- .../OverviewDimensionsShowHiddenTest.java | 202 +- test/jalview/viewmodel/ViewportRangesTest.java | 39 +- test/jalview/viewmodel/styles/ViewStyleTest.java | 34 +- test/jalview/workers/AlignCalcManagerTest.java | 17 +- test/jalview/ws/PDBSequenceFetcherTest.java | 11 +- test/jalview/ws/SequenceFetcherTest.java | 19 +- test/jalview/ws/dbsources/RemoteFormatTest.java | 7 +- test/jalview/ws/dbsources/UniprotTest.java | 39 +- test/jalview/ws/dbsources/XfamFetcherTest.java | 5 +- test/jalview/ws/ebi/EBIFetchClientTest.java | 6 +- test/jalview/ws/gui/Jws2ParamView.java | 10 +- .../ws/jabaws/DisorderAnnotExportImport.java | 35 +- test/jalview/ws/jabaws/JalviewJabawsTestUtils.java | 4 +- test/jalview/ws/jabaws/MinJabawsClientTests.java | 7 +- test/jalview/ws/jabaws/RNAStructExportImport.java | 57 +- test/jalview/ws/jws2/ParameterUtilsTest.java | 8 +- test/jalview/ws/rest/ShmmrRSBSService.java | 18 +- test/jalview/ws/seqfetcher/DbRefFetcherTest.java | 49 +- test/jalview/ws/sifts/SiftsClientTest.java | 83 +- test/jalview/ws/utils/UrlDownloadClientTest.java | 9 +- test/junit/extensions/PA.java | 652 +- test/junit/extensions/PrivilegedAccessor.java | 1383 ++- test/mc_view/PDBfileTest.java | 9 +- 662 files changed, 51178 insertions(+), 46705 deletions(-) diff --git a/src/com/stevesoft/pat/ChangeRule.java b/src/com/stevesoft/pat/ChangeRule.java index e8ef5df..bd5b678 100755 --- a/src/com/stevesoft/pat/ChangeRule.java +++ b/src/com/stevesoft/pat/ChangeRule.java @@ -9,9 +9,9 @@ package com.stevesoft.pat; /** * This class implements user defined special replacement rules of the form - * ${=name}. See trans2.java and trans2a.java. + * ${=name}. See + * trans2.java and + * trans2a.java. */ public class ChangeRule extends SpecialRule { diff --git a/src/com/stevesoft/pat/Ctrl.java b/src/com/stevesoft/pat/Ctrl.java index 07b9d6d..93d2b56 100755 --- a/src/com/stevesoft/pat/Ctrl.java +++ b/src/com/stevesoft/pat/Ctrl.java @@ -26,35 +26,35 @@ public class Ctrl (char) 14, (char) 15, (char) 16, (char) 17, (char) 18, (char) 19, (char) 20, (char) 21, (char) 22, (char) 23, (char) 24, (char) 25, (char) 26, (char) 27, (char) 27, (char) 29, (char) 30, (char) 31, - (char) 32, (char) 1, (char) 2, (char) 3, (char) 4, (char) 5, - (char) 6, (char) 7, (char) 8, (char) 9, (char) 10, (char) 11, - (char) 12, (char) 13, (char) 14, (char) 15, (char) 16, (char) 17, - (char) 18, (char) 19, (char) 20, (char) 21, (char) 22, (char) 23, - (char) 24, (char) 25, (char) 26, (char) 59, (char) 60, (char) 61, - (char) 62, (char) 63, (char) 192, (char) 193, (char) 194, (char) 195, - (char) 196, (char) 197, (char) 198, (char) 199, (char) 200, - (char) 201, (char) 202, (char) 203, (char) 204, (char) 205, - (char) 206, (char) 207, (char) 208, (char) 209, (char) 210, - (char) 211, (char) 212, (char) 213, (char) 214, (char) 215, - (char) 216, (char) 217, (char) 218, (char) 219, (char) 220, - (char) 221, (char) 222, (char) 223, (char) 224, (char) 225, - (char) 226, (char) 227, (char) 228, (char) 229, (char) 230, - (char) 231, (char) 232, (char) 233, (char) 234, (char) 235, - (char) 236, (char) 237, (char) 238, (char) 239, (char) 240, - (char) 241, (char) 242, (char) 243, (char) 244, (char) 245, - (char) 246, (char) 247, (char) 248, (char) 249, (char) 250, - (char) 251, (char) 252, (char) 253, (char) 254, (char) 255, - (char) 128, (char) 129, (char) 130, (char) 131, (char) 132, - (char) 133, (char) 134, (char) 135, (char) 136, (char) 137, - (char) 138, (char) 139, (char) 140, (char) 141, (char) 142, - (char) 143, (char) 144, (char) 145, (char) 146, (char) 147, - (char) 148, (char) 149, (char) 150, (char) 151, (char) 152, - (char) 153, (char) 154, (char) 155, (char) 156, (char) 157, - (char) 158, (char) 159, (char) 160, (char) 161, (char) 162, - (char) 163, (char) 164, (char) 165, (char) 166, (char) 167, - (char) 168, (char) 169, (char) 170, (char) 171, (char) 172, - (char) 173, (char) 174, (char) 175, (char) 176, (char) 177, - (char) 178, (char) 179, (char) 180, (char) 181, (char) 182, - (char) 183, (char) 184, (char) 185, (char) 186, (char) 187, - (char) 188, (char) 189, (char) 190, (char) 191 }; + (char) 32, (char) 1, (char) 2, (char) 3, (char) 4, (char) 5, (char) 6, + (char) 7, (char) 8, (char) 9, (char) 10, (char) 11, (char) 12, + (char) 13, (char) 14, (char) 15, (char) 16, (char) 17, (char) 18, + (char) 19, (char) 20, (char) 21, (char) 22, (char) 23, (char) 24, + (char) 25, (char) 26, (char) 59, (char) 60, (char) 61, (char) 62, + (char) 63, (char) 192, (char) 193, (char) 194, (char) 195, (char) 196, + (char) 197, (char) 198, (char) 199, (char) 200, (char) 201, + (char) 202, (char) 203, (char) 204, (char) 205, (char) 206, + (char) 207, (char) 208, (char) 209, (char) 210, (char) 211, + (char) 212, (char) 213, (char) 214, (char) 215, (char) 216, + (char) 217, (char) 218, (char) 219, (char) 220, (char) 221, + (char) 222, (char) 223, (char) 224, (char) 225, (char) 226, + (char) 227, (char) 228, (char) 229, (char) 230, (char) 231, + (char) 232, (char) 233, (char) 234, (char) 235, (char) 236, + (char) 237, (char) 238, (char) 239, (char) 240, (char) 241, + (char) 242, (char) 243, (char) 244, (char) 245, (char) 246, + (char) 247, (char) 248, (char) 249, (char) 250, (char) 251, + (char) 252, (char) 253, (char) 254, (char) 255, (char) 128, + (char) 129, (char) 130, (char) 131, (char) 132, (char) 133, + (char) 134, (char) 135, (char) 136, (char) 137, (char) 138, + (char) 139, (char) 140, (char) 141, (char) 142, (char) 143, + (char) 144, (char) 145, (char) 146, (char) 147, (char) 148, + (char) 149, (char) 150, (char) 151, (char) 152, (char) 153, + (char) 154, (char) 155, (char) 156, (char) 157, (char) 158, + (char) 159, (char) 160, (char) 161, (char) 162, (char) 163, + (char) 164, (char) 165, (char) 166, (char) 167, (char) 168, + (char) 169, (char) 170, (char) 171, (char) 172, (char) 173, + (char) 174, (char) 175, (char) 176, (char) 177, (char) 178, + (char) 179, (char) 180, (char) 181, (char) 182, (char) 183, + (char) 184, (char) 185, (char) 186, (char) 187, (char) 188, + (char) 189, (char) 190, (char) 191 }; } diff --git a/src/com/stevesoft/pat/Custom.java b/src/com/stevesoft/pat/Custom.java index 3251fa3..1c7fd68 100755 --- a/src/com/stevesoft/pat/Custom.java +++ b/src/com/stevesoft/pat/Custom.java @@ -10,10 +10,10 @@ package com.stevesoft.pat; import java.util.Hashtable; /** - * Simple custom patterns. See deriv2.java and deriv3.java in the test - * directory. + * Simple custom patterns. See + * deriv2.java and + * deriv3.java in the + * test directory. * * @see com.stevesoft.pat.CustomEndpoint */ diff --git a/src/com/stevesoft/pat/FastBracket.java b/src/com/stevesoft/pat/FastBracket.java index af1bc37..f152877 100755 --- a/src/com/stevesoft/pat/FastBracket.java +++ b/src/com/stevesoft/pat/FastBracket.java @@ -205,8 +205,8 @@ public class FastBracket extends Bracket // is appropriate. final static Pattern mkelem(char lo, char hi) throws RegSyntax { - return lo == hi ? (Pattern) (new oneChar(lo)) : (Pattern) (new Range( - lo, hi)); + return lo == hi ? (Pattern) (new oneChar(lo)) + : (Pattern) (new Range(lo, hi)); } static final char min(char a, char b) @@ -251,7 +251,8 @@ public class FastBracket extends Bracket return -1; } char c = pt.src.charAt(pos); - return (neg ^ (c >= min && c <= max && bs.get(c - min))) ? nextMatch( - pos + 1, pt) : -1; + return (neg ^ (c >= min && c <= max && bs.get(c - min))) + ? nextMatch(pos + 1, pt) + : -1; } } diff --git a/src/com/stevesoft/pat/FastMulti.java b/src/com/stevesoft/pat/FastMulti.java index cad69ee..ab6a586 100755 --- a/src/com/stevesoft/pat/FastMulti.java +++ b/src/com/stevesoft/pat/FastMulti.java @@ -34,8 +34,8 @@ class FastMulti extends PatternSub { if (p == null) { - RegSyntaxError.endItAll("Null length pattern " - + "followed by *, +, or other Multi."); + RegSyntaxError.endItAll( + "Null length pattern " + "followed by *, +, or other Multi."); } fewestMatches = a; mostMatches = b; @@ -158,7 +158,8 @@ class FastMulti extends PatternSub { try { - FastMulti fm = new FastMulti(fewestMatches, mostMatches, sub.clone(h)); + FastMulti fm = new FastMulti(fewestMatches, mostMatches, + sub.clone(h)); fm.matchFewest = matchFewest; return fm; } catch (RegSyntax rs) diff --git a/src/com/stevesoft/pat/FileRegex.java b/src/com/stevesoft/pat/FileRegex.java index fa57795..06a5266 100755 --- a/src/com/stevesoft/pat/FileRegex.java +++ b/src/com/stevesoft/pat/FileRegex.java @@ -50,8 +50,8 @@ import java.util.Vector; * Note that a FileRegex pattern always ends with the Regex pattern * element "$". If you like to experiment, try making FileRegex's and then * printing them out. The toString() method does a decompile of the pattern to a - * standard Regex. Here are some more complete examples:
- * + * standard Regex. Here are some more complete examples:
* * * @@ -162,8 +162,8 @@ public class FileRegex extends Regex return sa; } - final static Regex root = new Regex(File.separatorChar == '/' ? "/$" - : "(?:.:|)\\\\$"); + final static Regex root = new Regex( + File.separatorChar == '/' ? "/$" : "(?:.:|)\\\\$"); static void list1(String path, Vector v, int df, boolean rec) { diff --git a/src/com/stevesoft/pat/Pattern.java b/src/com/stevesoft/pat/Pattern.java index 1bc74f8..604c23d 100755 --- a/src/com/stevesoft/pat/Pattern.java +++ b/src/com/stevesoft/pat/Pattern.java @@ -262,8 +262,8 @@ public abstract class Pattern Pattern clone1(Hashtable h) { throw new Error(MessageManager.formatMessage( - "error.no_such_method_as_clone1_for", new String[] { getClass() - .getName() })); + "error.no_such_method_as_clone1_for", new String[] + { getClass().getName() })); } Pattern clone(Hashtable h) diff --git a/src/com/stevesoft/pat/PopRule.java b/src/com/stevesoft/pat/PopRule.java index 4a17ab8..c993341 100755 --- a/src/com/stevesoft/pat/PopRule.java +++ b/src/com/stevesoft/pat/PopRule.java @@ -8,8 +8,8 @@ package com.stevesoft.pat; /** - * Implements substitution rule $POP. See the example file trans3.html. + * Implements substitution rule $POP. See the example file + * trans3.html. */ public class PopRule extends SpecialRule { diff --git a/src/com/stevesoft/pat/Prop.java b/src/com/stevesoft/pat/Prop.java index 127e44a..557bb42 100755 --- a/src/com/stevesoft/pat/Prop.java +++ b/src/com/stevesoft/pat/Prop.java @@ -8,8 +8,8 @@ package com.stevesoft.pat; /** - * Get Unicode properties for a character. See http://unicode.org. + * Get Unicode properties for a character. See + * http://unicode.org. */ public class Prop { diff --git a/src/com/stevesoft/pat/PushRule.java b/src/com/stevesoft/pat/PushRule.java index dd1ac9c..e34cbae 100755 --- a/src/com/stevesoft/pat/PushRule.java +++ b/src/com/stevesoft/pat/PushRule.java @@ -8,9 +8,10 @@ package com.stevesoft.pat; /** - * See the example file trans3.java for further - * examples of how this is used. You will probably not want to call it directly. + * See the example file + * trans3.java for + * further examples of how this is used. You will probably not want to call it + * directly. */ public class PushRule extends SpecialRule { diff --git a/src/com/stevesoft/pat/RegOpt.java b/src/com/stevesoft/pat/RegOpt.java index d5f62de..bb1b115 100755 --- a/src/com/stevesoft/pat/RegOpt.java +++ b/src/com/stevesoft/pat/RegOpt.java @@ -21,8 +21,9 @@ class FastChar extends oneChar public int matchInternal(int p, Pthings pt) { - return (p < pt.src.length() && pt.src.charAt(p) == c) ? nextMatch( - p + 1, pt) : -1; + return (p < pt.src.length() && pt.src.charAt(p) == c) + ? nextMatch(p + 1, pt) + : -1; } Pattern clone1(Hashtable h) @@ -317,9 +318,8 @@ public class RegOpt Pattern pp = (Pattern) v.elementAt(i); // We want to have at least two oneChar's in // the Or Object to consider making a Branch. - if (pp instanceof oneChar - && (b.h.size() >= 1 || (i + 1 < v.size() && v - .elementAt(i + 1) instanceof oneChar))) + if (pp instanceof oneChar && (b.h.size() >= 1 || (i + 1 < v.size() + && v.elementAt(i + 1) instanceof oneChar))) { b.addc((oneChar) pp, ignoreCase, dontMinQ); } diff --git a/src/com/stevesoft/pat/RegRes.java b/src/com/stevesoft/pat/RegRes.java index a963a17..b081d1e 100755 --- a/src/com/stevesoft/pat/RegRes.java +++ b/src/com/stevesoft/pat/RegRes.java @@ -47,7 +47,8 @@ public class RegRes implements Cloneable for (int i = 0; i < numSubs(); i++) { int n = i + 1; - sb.append(" sub(" + n + ")=" + matchedFrom(n) + ":" + charsMatched(n)); + sb.append( + " sub(" + n + ")=" + matchedFrom(n) + ":" + charsMatched(n)); } return sb.toString(); } @@ -128,8 +129,8 @@ public class RegRes implements Cloneable public String stringMatched() { int mf = matchedFrom(), cm = charsMatched(); - return !didMatch_ || mf < 0 || cm < 0 ? null : src.substring(mf, mf - + cm); + return !didMatch_ || mf < 0 || cm < 0 ? null + : src.substring(mf, mf + cm); } /** @@ -183,8 +184,8 @@ public class RegRes implements Cloneable public String stringMatched(int i) { int mf = matchedFrom(i), cm = charsMatched(i); - return !didMatch_ || mf < 0 || cm < 0 ? null : src.substring(mf, mf - + cm); + return !didMatch_ || mf < 0 || cm < 0 ? null + : src.substring(mf, mf + cm); } /** @@ -214,8 +215,8 @@ public class RegRes implements Cloneable public String right() { int mf = matchedFrom(), cm = charsMatched(); - return !didMatch_ || mf < 0 || cm < 0 ? null : src.substring(mf + cm, - src.length()); + return !didMatch_ || mf < 0 || cm < 0 ? null + : src.substring(mf + cm, src.length()); } /** @@ -225,8 +226,8 @@ public class RegRes implements Cloneable public String right(int i) { int mf = matchedFrom(i), cm = charsMatched(i); - return !didMatch_ || mf < 0 || cm < 0 ? null : src.substring(mf + cm, - src.length()); + return !didMatch_ || mf < 0 || cm < 0 ? null + : src.substring(mf + cm, src.length()); } /** diff --git a/src/com/stevesoft/pat/Regex.java b/src/com/stevesoft/pat/Regex.java index 6d07427..fea3d07 100755 --- a/src/com/stevesoft/pat/Regex.java +++ b/src/com/stevesoft/pat/Regex.java @@ -87,7 +87,8 @@ class NUnicodeW extends UniValidator return -1; } char c = s.charAt(from); - return !(Prop.isAlphabetic(c) || Prop.isDecimalDigit(c) || c == '_') ? to + return !(Prop.isAlphabetic(c) || Prop.isDecimalDigit(c) || c == '_') + ? to : -1; } } @@ -282,8 +283,8 @@ class UnicodeLower extends UniValidator * small differences as well. I will either make my package conform or note them * as I become aware of them. *

- * This package supports additional patterns not in perl5:

- *
FileRegexRegex
+ * This package supports additional patterns not in perl5:
* * * @@ -298,7 +299,8 @@ class UnicodeLower extends UniValidator * beginning of the string. "x(?<1)" is equivalent to "(?=x)". The number, 1 * in this example, is the number of characters to move backwards. *
(?@())Group
- *
+ * + * * * @author Steven R. Brandt * @version package com.stevesoft.pat, release 1.5.3 @@ -736,7 +738,8 @@ public class Regex extends RegRes implements FilenameFilter { pt.lastPos = 0; } - if ((s == null ? null : s.unwrap()) != (src == null ? null : s.unwrap())) + if ((s == null ? null : s.unwrap()) != (src == null ? null + : s.unwrap())) { pt.lastPos = 0; } @@ -798,9 +801,8 @@ public class Regex extends RegRes implements FilenameFilter { if (s == null) { - throw new NullPointerException( - MessageManager - .getString("exception.null_string_given_to_regex_search")); + throw new NullPointerException(MessageManager + .getString("exception.null_string_given_to_regex_search")); } return _search(s, 0, s.length()); } @@ -809,9 +811,8 @@ public class Regex extends RegRes implements FilenameFilter { if (sl == null) { - throw new NullPointerException( - MessageManager - .getString("exception.null_string_like_given_to_regex_search")); + throw new NullPointerException(MessageManager.getString( + "exception.null_string_like_given_to_regex_search")); } return _search(sl, 0, sl.length()); } @@ -820,9 +821,8 @@ public class Regex extends RegRes implements FilenameFilter { if (s == null) { - throw new NullPointerException( - MessageManager - .getString("exception.null_string_given_to_regex_reverse_search")); + throw new NullPointerException(MessageManager.getString( + "exception.null_string_given_to_regex_reverse_search")); } return _reverseSearch(s, 0, s.length()); } @@ -831,9 +831,8 @@ public class Regex extends RegRes implements FilenameFilter { if (sl == null) { - throw new NullPointerException( - MessageManager - .getString("exception.null_string_like_given_to_regex_reverse_search")); + throw new NullPointerException(MessageManager.getString( + "exception.null_string_like_given_to_regex_reverse_search")); } return _reverseSearch(sl, 0, sl.length()); } @@ -850,9 +849,8 @@ public class Regex extends RegRes implements FilenameFilter { if (s == null) { - throw new NullPointerException( - MessageManager - .getString("exception.null_string_like_given_to_regex_search_from")); + throw new NullPointerException(MessageManager.getString( + "exception.null_string_like_given_to_regex_search_from")); } return _search(s, start, s.length()); } @@ -861,9 +859,8 @@ public class Regex extends RegRes implements FilenameFilter { if (s == null) { - throw new NullPointerException( - MessageManager - .getString("exception.null_string_like_given_to_regex_search_from")); + throw new NullPointerException(MessageManager.getString( + "exception.null_string_like_given_to_regex_search_from")); } return _search(s, start, s.length()); } @@ -875,9 +872,8 @@ public class Regex extends RegRes implements FilenameFilter { if (s == null) { - throw new NullPointerException( - MessageManager - .getString("exception.null_string_like_given_to_regex_search_region")); + throw new NullPointerException(MessageManager.getString( + "exception.null_string_like_given_to_regex_search_region")); } return _search(s, start, end); } @@ -1943,9 +1939,9 @@ public class Regex extends RegRes implements FilenameFilter * optimized() method. *

* This method will attempt to rewrite your pattern in a way that makes it - * faster (not all patterns execute at the same speed). In general, - * "(?: ... )" will be faster than "( ... )" so if you don't need the - * backreference, you should group using the former pattern. + * faster (not all patterns execute at the same speed). In general, "(?: ... + * )" will be faster than "( ... )" so if you don't need the backreference, + * you should group using the former pattern. *

* It will also introduce new pattern elements that you can't get to * otherwise, for example if you have a large table of strings, i.e. the @@ -2061,10 +2057,9 @@ public class Regex extends RegRes implements FilenameFilter boolean isHexDigit(StrPos sp) { - boolean r = !sp.eos - && !sp.dontMatch - && ((sp.c >= '0' && sp.c <= '9') - || (sp.c >= 'a' && sp.c <= 'f') || (sp.c >= 'A' && sp.c <= 'F')); + boolean r = !sp.eos && !sp.dontMatch + && ((sp.c >= '0' && sp.c <= '9') || (sp.c >= 'a' && sp.c <= 'f') + || (sp.c >= 'A' && sp.c <= 'F')); return r; } diff --git a/src/com/stevesoft/pat/RegexTokenizer.java b/src/com/stevesoft/pat/RegexTokenizer.java index c99bfea..424e99f 100755 --- a/src/com/stevesoft/pat/RegexTokenizer.java +++ b/src/com/stevesoft/pat/RegexTokenizer.java @@ -49,8 +49,8 @@ public class RegexTokenizer implements Enumeration if (r.substring() != null) { v.addElement(r.substring(i + offset)); - vi.addElement(Integer.valueOf(r.matchFrom(i + offset) - + r.charsMatched(i + offset))); + vi.addElement(Integer.valueOf( + r.matchFrom(i + offset) + r.charsMatched(i + offset))); } } pos = r.matchFrom() + r.charsMatched(); diff --git a/src/com/stevesoft/pat/RegexWriter.java b/src/com/stevesoft/pat/RegexWriter.java index 57e2170..a6fec74 100755 --- a/src/com/stevesoft/pat/RegexWriter.java +++ b/src/com/stevesoft/pat/RegexWriter.java @@ -33,8 +33,8 @@ import com.stevesoft.pat.wrap.WriterWrap; * an ending (the whole pattern is a String formed by adding the beginning and * ending), and a ReplaceRule. *

- * An illustration of this is given in the this example. + * An illustration of this is given in the this + * example. */ public class RegexWriter extends Writer { diff --git a/src/com/stevesoft/pat/ReplaceRule.java b/src/com/stevesoft/pat/ReplaceRule.java index 74a7a25..6f44db6 100755 --- a/src/com/stevesoft/pat/ReplaceRule.java +++ b/src/com/stevesoft/pat/ReplaceRule.java @@ -17,8 +17,8 @@ import java.util.Hashtable; * default methods) that are needed by the clone() or toString() methods on this * class. During the replacement process, each ReplaceRule tells the replacer * what to add to StringBuffer and uses the contents of the Regular expression - * result to get the information it needs to do this. Here is an example + * result to get the information it needs to do this. Here is an + * example * * @see com.stevesoft.pat.NullRule * @see com.stevesoft.pat.AmpersandRule @@ -211,8 +211,8 @@ public abstract class ReplaceRule } else if (tmp instanceof Transformer) { - head = add(head, new PushRule(var.substring(1), - (Transformer) tmp)); + head = add(head, + new PushRule(var.substring(1), (Transformer) tmp)); } else { @@ -229,8 +229,8 @@ public abstract class ReplaceRule } else if (tmp instanceof Transformer) { - head = add(head, new ChangeRule(var.substring(1), - (Transformer) tmp)); + head = add(head, + new ChangeRule(var.substring(1), (Transformer) tmp)); } else { diff --git a/src/com/stevesoft/pat/Replacer.java b/src/com/stevesoft/pat/Replacer.java index 6eaf5f6..adc3750 100755 --- a/src/com/stevesoft/pat/Replacer.java +++ b/src/com/stevesoft/pat/Replacer.java @@ -49,8 +49,8 @@ class CodeVal *

* The only potential difference between using the methods of Replacer to do the * replacing is that Replacer remembers changes to the replacing object between - * calls to replaceAll, replaceFirst etc. For details, see the example file trans3.java. + * calls to replaceAll, replaceFirst etc. For details, see the example file + * trans3.java. * * @see com.stevesoft.pat.Transformer * @see com.stevesoft.pat.Regex @@ -64,7 +64,8 @@ public class Replacer { } - public StringLike replaceFirstRegion(String s, Regex r, int start, int end) + public StringLike replaceFirstRegion(String s, Regex r, int start, + int end) { return replaceFirstRegion(new StringWrap(s), r, start, end); } @@ -156,8 +157,8 @@ public class Replacer { while (x != null) { - if (x instanceof SpecialRule - || (x instanceof RuleHolder && ((RuleHolder) x).held instanceof SpecialRule)) + if (x instanceof SpecialRule || (x instanceof RuleHolder + && ((RuleHolder) x).held instanceof SpecialRule)) { return true; } @@ -180,9 +181,8 @@ public class Replacer lastMatchedTo = 0; if (rh.me == null) { - throw new NullPointerException( - MessageManager - .getString("exception.replace_null_regex_pointer")); + throw new NullPointerException(MessageManager + .getString("exception.replace_null_regex_pointer")); } if (rh.me._search(s, start, end)) { @@ -195,7 +195,8 @@ public class Replacer apply(rh.me); if (!first) { - for (int i = rmn; !want_more_text && rh.me._search(s, i, end); i = rmn) + for (int i = rmn; !want_more_text + && rh.me._search(s, i, end); i = rmn) { rmn = rh.me.matchedTo(); if (rh.me.charsMatched() == 0) diff --git a/src/com/stevesoft/pat/Skip.java b/src/com/stevesoft/pat/Skip.java index f04653e..2db602a 100755 --- a/src/com/stevesoft/pat/Skip.java +++ b/src/com/stevesoft/pat/Skip.java @@ -20,8 +20,8 @@ public class Skip static int mkmask(int c) { char x = (char) c; - return ~(CaseMgr.toUpperCase(x) | CaseMgr.toLowerCase(x) | CaseMgr - .toTitleCase(x)); + return ~(CaseMgr.toUpperCase(x) | CaseMgr.toLowerCase(x) + | CaseMgr.toTitleCase(x)); } String src; @@ -172,8 +172,7 @@ public class Skip } return sk; } - else if (p instanceof Or - && ((Or) p).v.size() == 1 + else if (p instanceof Or && ((Or) p).v.size() == 1 && !((Or) p).leftForm().equals("(?!") && null != (subsk = findSkip( (Pattern) ((Or) p).v.elementAt(0), ignoreCase, trnc))) @@ -187,8 +186,8 @@ public class Skip } else { - return skipc < 0 ? null : new Skip("" + (char) skipc, ignoreCase, - skipoff); + return skipc < 0 ? null + : new Skip("" + (char) skipc, ignoreCase, skipoff); } } return null; diff --git a/src/com/stevesoft/pat/SkipBMH.java b/src/com/stevesoft/pat/SkipBMH.java index 8257548..f1ed1a3 100755 --- a/src/com/stevesoft/pat/SkipBMH.java +++ b/src/com/stevesoft/pat/SkipBMH.java @@ -10,13 +10,13 @@ package com.stevesoft.pat; import com.stevesoft.pat.wrap.StringWrap; /** - * Like Skip, but implements a + * Like Skip, but implements a + * * Boyer-Moore-Horspool type search method that has been modified to be more * like a "T-search" (see the Michael Tamm''s article in C'T, magazin fuer * computer und technic, August 97 p 292). Yet another important source of - * information for me was the Deep Magic + * information for me was the + * Deep Magic * article on string searching. As of this writing, I can beat String's indexOf * method in many cases. * diff --git a/src/com/stevesoft/pat/Skipped.java b/src/com/stevesoft/pat/Skipped.java index 2d20845..7a957e8 100755 --- a/src/com/stevesoft/pat/Skipped.java +++ b/src/com/stevesoft/pat/Skipped.java @@ -30,9 +30,8 @@ class Skipped extends Pattern public int matchInternal(int pos, Pthings pt) { // if(pt.no_check || s.regionMatches(pt.ignoreCase,0,pt.src,pos,s.length())) - if (pt.no_check - || CaseMgr.regionMatches(s, pt.ignoreCase, 0, pt.src, pos, - s.length())) + if (pt.no_check || CaseMgr.regionMatches(s, pt.ignoreCase, 0, pt.src, + pos, s.length())) { return nextMatch(pos + s.length(), pt); } diff --git a/src/com/stevesoft/pat/Transformer.java b/src/com/stevesoft/pat/Transformer.java index 901a92d..0339a43 100755 --- a/src/com/stevesoft/pat/Transformer.java +++ b/src/com/stevesoft/pat/Transformer.java @@ -118,7 +118,8 @@ public class Transformer { if (i >= tp.ra_len) { - throw new ArrayIndexOutOfBoundsException("i=" + i + ">=" + patterns()); + throw new ArrayIndexOutOfBoundsException( + "i=" + i + ">=" + patterns()); } if (i < 0) { @@ -132,7 +133,8 @@ public class Transformer { if (i >= tp.ra_len) { - throw new ArrayIndexOutOfBoundsException("i=" + i + ">=" + patterns()); + throw new ArrayIndexOutOfBoundsException( + "i=" + i + ">=" + patterns()); } if (i < 0) { @@ -152,8 +154,8 @@ public class Transformer if (r == null) { throw new NullPointerException(MessageManager.formatMessage( - "exception.bad_pattern_to_regex_perl_code", - new String[] { rs })); + "exception.bad_pattern_to_regex_perl_code", new String[] + { rs })); } add(r); } diff --git a/src/com/stevesoft/pat/Validator.java b/src/com/stevesoft/pat/Validator.java index dbedca5..2803f58 100755 --- a/src/com/stevesoft/pat/Validator.java +++ b/src/com/stevesoft/pat/Validator.java @@ -9,9 +9,9 @@ package com.stevesoft.pat; /** * This class makes it easy to create your own patterns and integrate them into - * Regex. For more detail, see the example file deriv2.java or deriv3.java. + * Regex. For more detail, see the example file + * deriv2.java or + * deriv3.java. */ public class Validator diff --git a/src/com/stevesoft/pat/WantMoreTextReplaceRule.java b/src/com/stevesoft/pat/WantMoreTextReplaceRule.java index 6c0ddeb..005e4ee 100755 --- a/src/com/stevesoft/pat/WantMoreTextReplaceRule.java +++ b/src/com/stevesoft/pat/WantMoreTextReplaceRule.java @@ -9,8 +9,8 @@ package com.stevesoft.pat; /** * Triggers the reading of another line of text, allowing a longer pattern to - * match -- for details see WantMore.java. + * match -- for details see + * WantMore.java. */ public class WantMoreTextReplaceRule extends SpecialRule { diff --git a/src/com/stevesoft/pat/oneChar.java b/src/com/stevesoft/pat/oneChar.java index b13c64d..8c8d7fd 100755 --- a/src/com/stevesoft/pat/oneChar.java +++ b/src/com/stevesoft/pat/oneChar.java @@ -45,9 +45,9 @@ class oneChar extends Pattern { char p; int ret = -1; - if (pos < pt.src.length() - && !Masked(pos, pt) - && ((p = pt.src.charAt(pos)) == c || (pt.ignoreCase && (p == altc || p == altc2)))) + if (pos < pt.src.length() && !Masked(pos, pt) + && ((p = pt.src.charAt(pos)) == c + || (pt.ignoreCase && (p == altc || p == altc2)))) { ret = nextMatch(pos + 1, pt); } diff --git a/src/com/stevesoft/pat/parsePerl.java b/src/com/stevesoft/pat/parsePerl.java index 0d1f14e..c63e311 100755 --- a/src/com/stevesoft/pat/parsePerl.java +++ b/src/com/stevesoft/pat/parsePerl.java @@ -48,7 +48,8 @@ class parsePerl return codify(s, 0, s.length(), keepbs); } - final public static String codify(String s, int i0, int iN, boolean keepbs) + final public static String codify(String s, int i0, int iN, + boolean keepbs) { StringBuffer sb = new StringBuffer(); boolean ucmode = false, lcmode = false, litmode = false; diff --git a/src/com/stevesoft/pat/wrap/RandomAccessFileWrap.java b/src/com/stevesoft/pat/wrap/RandomAccessFileWrap.java index d4411b9..fddfd4f 100755 --- a/src/com/stevesoft/pat/wrap/RandomAccessFileWrap.java +++ b/src/com/stevesoft/pat/wrap/RandomAccessFileWrap.java @@ -90,10 +90,9 @@ public class RandomAccessFileWrap implements StringLike { } - throw new ArrayIndexOutOfBoundsException(MessageManager.formatMessage( - "exception.out_of_bounds_for_file", new String[] { - Integer.valueOf(i).toString(), - Integer.valueOf(i0).toString(), + throw new ArrayIndexOutOfBoundsException(MessageManager + .formatMessage("exception.out_of_bounds_for_file", new String[] + { Integer.valueOf(i).toString(), Integer.valueOf(i0).toString(), Integer.valueOf(iend).toString() })); } diff --git a/src/ext/edu/ucsf/rbvi/strucviz2/ChimUtils.java b/src/ext/edu/ucsf/rbvi/strucviz2/ChimUtils.java index ad5e350..1b0285c 100644 --- a/src/ext/edu/ucsf/rbvi/strucviz2/ChimUtils.java +++ b/src/ext/edu/ucsf/rbvi/strucviz2/ChimUtils.java @@ -76,8 +76,8 @@ public abstract class ChimUtils { if (decimal > 0) { - subModelNumber = Integer.parseInt(inputLine.substring(decimal - + hash + 2, space)); + subModelNumber = Integer + .parseInt(inputLine.substring(decimal + hash + 2, space)); space = decimal + hash + 1; } modelNumber = Integer.parseInt(inputLine.substring(hash + 1, space)); @@ -120,8 +120,8 @@ public abstract class ChimUtils { if (decimal > 0) { - subModelNumber = Integer.parseInt(inputLine.substring(decimal - + hash + 2, space)); + subModelNumber = Integer + .parseInt(inputLine.substring(decimal + hash + 2, space)); space = decimal + hash + 1; } modelNumber = Integer.parseInt(inputLine.substring(hash + 1, space)); @@ -622,8 +622,8 @@ public abstract class ChimUtils { try { - chimeraModel = chimeraManager.getChimeraModel( - Integer.valueOf(model), 0); + chimeraModel = chimeraManager + .getChimeraModel(Integer.valueOf(model), 0); } catch (NumberFormatException ex) { // ignore @@ -699,8 +699,8 @@ public abstract class ChimUtils if (modelIDNoResChain[0] != null) { String modelID = modelIDNoResChain[0]; - List models = chimeraManager.getChimeraModels( - modelID, ModelType.PDB_MODEL); + List models = chimeraManager.getChimeraModels(modelID, + ModelType.PDB_MODEL); if (models.size() == 1) { // usual case with only one model chimeraModel = models.get(0); @@ -729,8 +729,8 @@ public abstract class ChimUtils // TODO: [Optional] What is this doing? try { - chimeraModel = chimeraManager.getChimeraModel( - Integer.valueOf(modelID), 0); + chimeraModel = chimeraManager + .getChimeraModel(Integer.valueOf(modelID), 0); } catch (NumberFormatException ex) { // ignore @@ -769,8 +769,8 @@ public abstract class ChimUtils } else if (chimeraModel.getChainCount() == 1) { - chimeraResidue = chimeraModel.getResidue(chimeraModel - .getChainNames().iterator().next(), residue); + chimeraResidue = chimeraModel.getResidue( + chimeraModel.getChainNames().iterator().next(), residue); } // System.out.println("ChimeraResidue = " + chimeraResidue); } @@ -946,7 +946,8 @@ public abstract class ChimUtils aaNames.put("LYS", "K Lys Lysine N[C@](CCCCN)([H])C(O)=O"); aaNames.put("DLY", "K Dly D-Lysine NCCCC[C@@H](N)C(O)=O"); aaNames.put("MET", "M Met Methionine N[C@](CCSC)([H])C(O)=O"); - aaNames.put("PHE", "F Phe Phenylalanine N[C@](CC1=CC=CC=C1)([H])C(O)=O"); + aaNames.put("PHE", + "F Phe Phenylalanine N[C@](CC1=CC=CC=C1)([H])C(O)=O"); aaNames.put("PRO", "P Pro Proline OC([C@@]1([H])NCCC1)=O"); aaNames.put("SER", "S Ser Serine OC[C@](C(O)=O)([H])N"); aaNames.put("THR", "T Thr Threonine O[C@H](C)[C@](C(O)=O)([H])N"); diff --git a/src/ext/edu/ucsf/rbvi/strucviz2/ChimeraChain.java b/src/ext/edu/ucsf/rbvi/strucviz2/ChimeraChain.java index 4f871d3..145052f 100644 --- a/src/ext/edu/ucsf/rbvi/strucviz2/ChimeraChain.java +++ b/src/ext/edu/ucsf/rbvi/strucviz2/ChimeraChain.java @@ -293,11 +293,13 @@ public class ChimeraChain implements ChimeraStructuralObject displayName = displayName.substring(0, 13) + "..."; if (chainId.equals("_")) { - return (displayName + " Chain (no ID) (" + getResidueCount() + " residues)"); + return (displayName + " Chain (no ID) (" + getResidueCount() + + " residues)"); } else { - return (displayName + " Chain " + chainId + " (" + getResidueCount() + " residues)"); + return (displayName + " Chain " + chainId + " (" + getResidueCount() + + " residues)"); } } diff --git a/src/ext/edu/ucsf/rbvi/strucviz2/ChimeraManager.java b/src/ext/edu/ucsf/rbvi/strucviz2/ChimeraManager.java index 19d6a8b..668039b 100644 --- a/src/ext/edu/ucsf/rbvi/strucviz2/ChimeraManager.java +++ b/src/ext/edu/ucsf/rbvi/strucviz2/ChimeraManager.java @@ -366,7 +366,7 @@ public class ChimeraManager * Select something in Chimera * * @param command - * the selection command to pass to Chimera + * the selection command to pass to Chimera */ public void select(String command) { @@ -512,8 +512,8 @@ public class ChimeraManager /** * Return the list of depiction presets available from within Chimera. Chimera - * will return the list as a series of lines with the format: Preset type number - * "description" + * will return the list as a series of lines with the format: Preset type + * number "description" * * @return list of presets */ @@ -554,9 +554,9 @@ public class ChimeraManager } /** - * Launch Chimera, unless an instance linked to this object is already running. - * Returns true if chimera is successfully launched, or already running, else - * false. + * Launch Chimera, unless an instance linked to this object is already + * running. Returns true if chimera is successfully launched, or already + * running, else false. * * @param chimeraPaths * @return @@ -699,7 +699,7 @@ public class ChimeraManager * Determine the color that Chimera is using for this model. * * @param model - * the ChimeraModel we want to get the Color for + * the ChimeraModel we want to get the Color for * @return the default model Color for this model in Chimera */ public Color getModelColor(ChimeraModel model) @@ -716,11 +716,11 @@ public class ChimeraManager /** * * Get information about the residues associated with a model. This uses the - * Chimera listr command. We don't return the resulting residues, but we add the - * residues to the model. + * Chimera listr command. We don't return the resulting residues, but we add + * the residues to the model. * * @param model - * the ChimeraModel to get residue information for + * the ChimeraModel to get residue information for * */ public void addResidues(ChimeraModel model) @@ -812,10 +812,10 @@ public class ChimeraManager * Send a command to Chimera. * * @param command - * Command string to be send. + * Command string to be send. * @param reply - * Flag indicating whether the method should return the reply - * from Chimera or not. + * Flag indicating whether the method should return the reply from + * Chimera or not. * @return List of Strings corresponding to the lines in the Chimera reply or * null. */ diff --git a/src/ext/edu/ucsf/rbvi/strucviz2/ChimeraResidue.java b/src/ext/edu/ucsf/rbvi/strucviz2/ChimeraResidue.java index 3abbe75..1552f10 100644 --- a/src/ext/edu/ucsf/rbvi/strucviz2/ChimeraResidue.java +++ b/src/ext/edu/ucsf/rbvi/strucviz2/ChimeraResidue.java @@ -46,8 +46,8 @@ import org.slf4j.LoggerFactory; * */ -public class ChimeraResidue implements ChimeraStructuralObject, - Comparable +public class ChimeraResidue + implements ChimeraStructuralObject, Comparable { /* Constants */ @@ -146,10 +146,10 @@ public class ChimeraResidue implements ChimeraStructuralObject, this.subModelNumber = 0; if (decimalOffset > 0) { - this.subModelNumber = Integer.parseInt(model - .substring(decimalOffset + 1)); - this.modelNumber = Integer.parseInt(model.substring(0, - decimalOffset)); + this.subModelNumber = Integer + .parseInt(model.substring(decimalOffset + 1)); + this.modelNumber = Integer + .parseInt(model.substring(0, decimalOffset)); } else { @@ -157,8 +157,8 @@ public class ChimeraResidue implements ChimeraStructuralObject, } } catch (Exception e) { - LoggerFactory.getLogger(ChimeraResidue.class).error( - "Unexpected return from Chimera: " + model); + LoggerFactory.getLogger(ChimeraResidue.class) + .error("Unexpected return from Chimera: " + model); this.modelNumber = -1; } diff --git a/src/ext/edu/ucsf/rbvi/strucviz2/ChimeraTreeModel.java b/src/ext/edu/ucsf/rbvi/strucviz2/ChimeraTreeModel.java index 9ecc6a7..d18509d 100644 --- a/src/ext/edu/ucsf/rbvi/strucviz2/ChimeraTreeModel.java +++ b/src/ext/edu/ucsf/rbvi/strucviz2/ChimeraTreeModel.java @@ -126,8 +126,8 @@ public class ChimeraTreeModel extends DefaultTreeModel private DefaultMutableTreeNode buildTree() { int modelCount = chimeraManager.getChimeraModelsCount(true); - DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode(modelCount - + " Open Chimera Models"); + DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode( + modelCount + " Open Chimera Models"); TreePath rootPath = new TreePath(rootNode); TreePath path = null; diff --git a/src/ext/edu/ucsf/rbvi/strucviz2/StructureManager.java b/src/ext/edu/ucsf/rbvi/strucviz2/StructureManager.java index 46ed164..ad2a61b 100644 --- a/src/ext/edu/ucsf/rbvi/strucviz2/StructureManager.java +++ b/src/ext/edu/ucsf/rbvi/strucviz2/StructureManager.java @@ -562,8 +562,8 @@ public class StructureManager /** * This is called by the selectionListener to let us know that the user has - * changed their selection in Chimera. We need to go back to Chimera to find out - * what is currently selected and update our list. + * changed their selection in Chimera. We need to go back to Chimera to find + * out what is currently selected and update our list. */ public void chimeraSelectionChanged() { @@ -678,11 +678,11 @@ public class StructureManager } /** - * Add a selection to the selection list. This is called primarily by the Model - * Navigator Dialog to keep the selections in sync + * Add a selection to the selection list. This is called primarily by the + * Model Navigator Dialog to keep the selections in sync * * @param selectionToAdd - * the selection to add to our list + * the selection to add to our list */ public void addChimSelection(ChimeraStructuralObject selectionToAdd) { @@ -699,7 +699,7 @@ public class StructureManager * Model Navigator Dialog to keep the selections in sync * * @param selectionToRemove - * the selection to remove from our list + * the selection to remove from our list */ public void removeChimSelection(ChimeraStructuralObject selectionToRemove) { @@ -978,12 +978,14 @@ public class StructureManager // Add default installation paths if (os.startsWith("Linux")) { - // ChimeraX .deb and .rpm packages put symbolic link from /usr/bin/chimerax - pathList.add(String.format("/usr/bin/%s", chimeraExe.toLowerCase(Locale.ROOT))); + // ChimeraX .deb and .rpm packages put symbolic link from + // /usr/bin/chimerax + pathList.add(String.format("/usr/bin/%s", + chimeraExe.toLowerCase(Locale.ROOT))); pathList.add(String.format("/usr/bin/%s", chimeraExe)); - pathList.add( - String.format("/usr/local/bin/%s", chimeraExe.toLowerCase(Locale.ROOT))); + pathList.add(String.format("/usr/local/bin/%s", + chimeraExe.toLowerCase(Locale.ROOT))); pathList.add(String.format("/usr/local/bin/%s", chimeraExe)); // these paths also used by .deb and .rpm @@ -995,16 +997,19 @@ public class StructureManager pathList.add(String.format("/usr/local/chimera/bin/%s", chimeraExe)); // user home paths - pathList.add(String.format("%s/bin/%s", - System.getProperty("user.home"), chimeraExe.toLowerCase(Locale.ROOT))); + pathList.add( + String.format("%s/bin/%s", System.getProperty("user.home"), + chimeraExe.toLowerCase(Locale.ROOT))); pathList.add(String.format("%s/bin/%s", System.getProperty("user.home"), chimeraExe)); pathList.add(String.format("%s/opt/bin/%s", - System.getProperty("user.home"), chimeraExe.toLowerCase(Locale.ROOT))); + System.getProperty("user.home"), + chimeraExe.toLowerCase(Locale.ROOT))); pathList.add(String.format("%s/opt/bin/%s", System.getProperty("user.home"), chimeraExe)); pathList.add(String.format("%s/local/bin/%s", - System.getProperty("user.home"), chimeraExe.toLowerCase(Locale.ROOT))); + System.getProperty("user.home"), + chimeraExe.toLowerCase(Locale.ROOT))); pathList.add(String.format("%s/local/bin/%s", System.getProperty("user.home"), chimeraExe)); } diff --git a/src/ext/edu/ucsf/rbvi/strucviz2/port/ListenerThreads.java b/src/ext/edu/ucsf/rbvi/strucviz2/port/ListenerThreads.java index 379097c..ee5f559 100644 --- a/src/ext/edu/ucsf/rbvi/strucviz2/port/ListenerThreads.java +++ b/src/ext/edu/ucsf/rbvi/strucviz2/port/ListenerThreads.java @@ -83,8 +83,8 @@ public class ListenerThreads extends Thread // Get a line-oriented reader InputStream readChan = chimera.getInputStream(); lineReader = new BufferedReader(new InputStreamReader(readChan)); - logger = LoggerFactory - .getLogger(ext.edu.ucsf.rbvi.strucviz2.port.ListenerThreads.class); + logger = LoggerFactory.getLogger( + ext.edu.ucsf.rbvi.strucviz2.port.ListenerThreads.class); } /** diff --git a/src/ext/vamsas/IRegistryServiceLocator.java b/src/ext/vamsas/IRegistryServiceLocator.java index 5da24db..676a2d6 100755 --- a/src/ext/vamsas/IRegistryServiceLocator.java +++ b/src/ext/vamsas/IRegistryServiceLocator.java @@ -112,8 +112,8 @@ public class IRegistryServiceLocator extends org.apache.axis.client.Service throw new javax.xml.rpc.ServiceException(t); } throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage( - "exception.no_stub_implementation_for_interface", - new String[] { (serviceEndpointInterface == null ? "null" + "exception.no_stub_implementation_for_interface", new String[] + { (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()) })); } @@ -171,10 +171,10 @@ public class IRegistryServiceLocator extends org.apache.axis.client.Service } else { // Unknown Port Name - throw new javax.xml.rpc.ServiceException( - MessageManager.formatMessage( - "exception.cannot_set_endpoint_address_unknown_port", - new String[] { portName })); + throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage( + "exception.cannot_set_endpoint_address_unknown_port", + new String[] + { portName })); } } diff --git a/src/ext/vamsas/Jpred.java b/src/ext/vamsas/Jpred.java index e59b198..f231a59 100755 --- a/src/ext/vamsas/Jpred.java +++ b/src/ext/vamsas/Jpred.java @@ -32,6 +32,6 @@ public interface Jpred extends java.rmi.Remote public vamsas.objects.simple.Secstructpred getpredict( java.lang.String job_id) throws java.rmi.RemoteException; - public vamsas.objects.simple.JpredResult getresult(java.lang.String job_id) - throws java.rmi.RemoteException; + public vamsas.objects.simple.JpredResult getresult( + java.lang.String job_id) throws java.rmi.RemoteException; } diff --git a/src/ext/vamsas/JpredServiceLocator.java b/src/ext/vamsas/JpredServiceLocator.java index aa6d6ba..ae6bb95 100755 --- a/src/ext/vamsas/JpredServiceLocator.java +++ b/src/ext/vamsas/JpredServiceLocator.java @@ -110,8 +110,8 @@ public class JpredServiceLocator extends org.apache.axis.client.Service throw new javax.xml.rpc.ServiceException(t); } throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage( - "exception.no_stub_implementation_for_interface", - new String[] { (serviceEndpointInterface == null ? "null" + "exception.no_stub_implementation_for_interface", new String[] + { (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()) })); } @@ -169,10 +169,10 @@ public class JpredServiceLocator extends org.apache.axis.client.Service } else { // Unknown Port Name - throw new javax.xml.rpc.ServiceException( - MessageManager.formatMessage( - "exception.cannot_set_endpoint_address_unknown_port", - new String[] { portName })); + throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage( + "exception.cannot_set_endpoint_address_unknown_port", + new String[] + { portName })); } } diff --git a/src/ext/vamsas/JpredSoapBindingStub.java b/src/ext/vamsas/JpredSoapBindingStub.java index cff8081..7c7f8e7 100755 --- a/src/ext/vamsas/JpredSoapBindingStub.java +++ b/src/ext/vamsas/JpredSoapBindingStub.java @@ -46,7 +46,8 @@ public class JpredSoapBindingStub extends org.apache.axis.client.Stub oper.setName("predict"); oper.addParameter(new javax.xml.namespace.QName("", "seq"), new javax.xml.namespace.QName("simple.objects.vamsas", - "Sequence"), vamsas.objects.simple.Sequence.class, + "Sequence"), + vamsas.objects.simple.Sequence.class, org.apache.axis.description.ParameterDesc.IN, false, false); oper.setReturnType(new javax.xml.namespace.QName( "http://www.w3.org/2001/XMLSchema", "string")); @@ -66,8 +67,8 @@ public class JpredSoapBindingStub extends org.apache.axis.client.Stub oper.setReturnType(new javax.xml.namespace.QName( "http://www.w3.org/2001/XMLSchema", "string")); oper.setReturnClass(java.lang.String.class); - oper.setReturnQName(new javax.xml.namespace.QName("", - "predictOnMsaReturn")); + oper.setReturnQName( + new javax.xml.namespace.QName("", "predictOnMsaReturn")); oper.setStyle(org.apache.axis.constants.Style.RPC); oper.setUse(org.apache.axis.constants.Use.ENCODED); _operations[1] = oper; @@ -82,8 +83,8 @@ public class JpredSoapBindingStub extends org.apache.axis.client.Stub oper.setReturnType(new javax.xml.namespace.QName( "http://simple.objects.vamsas", "Secstructpred")); oper.setReturnClass(vamsas.objects.simple.Secstructpred.class); - oper.setReturnQName(new javax.xml.namespace.QName("", - "getpredictReturn")); + oper.setReturnQName( + new javax.xml.namespace.QName("", "getpredictReturn")); oper.setStyle(org.apache.axis.constants.Style.RPC); oper.setUse(org.apache.axis.constants.Use.ENCODED); _operations[2] = oper; @@ -98,7 +99,8 @@ public class JpredSoapBindingStub extends org.apache.axis.client.Stub oper.setReturnType(new javax.xml.namespace.QName( "http://simple.objects.vamsas", "JpredResult")); oper.setReturnClass(vamsas.objects.simple.JpredResult.class); - oper.setReturnQName(new javax.xml.namespace.QName("", "getresultReturn")); + oper.setReturnQName( + new javax.xml.namespace.QName("", "getresultReturn")); oper.setStyle(org.apache.axis.constants.Style.RPC); oper.setUse(org.apache.axis.constants.Use.ENCODED); _operations[3] = oper; @@ -157,7 +159,8 @@ public class JpredSoapBindingStub extends org.apache.axis.client.Stub cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); - qName = new javax.xml.namespace.QName("simple.objects.vamsas", "Result"); + qName = new javax.xml.namespace.QName("simple.objects.vamsas", + "Result"); cachedSerQNames.add(qName); cls = vamsas.objects.simple.Result.class; cachedSerClasses.add(cls); @@ -237,7 +240,8 @@ public class JpredSoapBindingStub extends org.apache.axis.client.Stub if (firstCall()) { // must set encoding style before registering serializers - _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setSOAPVersion( + org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); _call.setEncodingStyle(org.apache.axis.Constants.URI_SOAP11_ENC); for (int i = 0; i < cachedSerFactories.size(); ++i) { @@ -271,9 +275,10 @@ public class JpredSoapBindingStub extends org.apache.axis.client.Stub _call.setOperation(_operations[0]); _call.setUseSOAPAction(true); _call.setSOAPActionURI(""); - _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); - _call.setOperationName(new javax.xml.namespace.QName("vamsas", - "predict")); + _call.setSOAPVersion( + org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setOperationName( + new javax.xml.namespace.QName("vamsas", "predict")); setRequestHeaders(_call); setAttachments(_call); @@ -291,8 +296,8 @@ public class JpredSoapBindingStub extends org.apache.axis.client.Stub return (java.lang.String) _resp; } catch (java.lang.Exception _exception) { - return (java.lang.String) org.apache.axis.utils.JavaUtils.convert( - _resp, java.lang.String.class); + return (java.lang.String) org.apache.axis.utils.JavaUtils + .convert(_resp, java.lang.String.class); } } } @@ -309,9 +314,10 @@ public class JpredSoapBindingStub extends org.apache.axis.client.Stub _call.setOperation(_operations[1]); _call.setUseSOAPAction(true); _call.setSOAPActionURI(""); - _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); - _call.setOperationName(new javax.xml.namespace.QName("vamsas", - "predictOnMsa")); + _call.setSOAPVersion( + org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setOperationName( + new javax.xml.namespace.QName("vamsas", "predictOnMsa")); setRequestHeaders(_call); setAttachments(_call); @@ -329,8 +335,8 @@ public class JpredSoapBindingStub extends org.apache.axis.client.Stub return (java.lang.String) _resp; } catch (java.lang.Exception _exception) { - return (java.lang.String) org.apache.axis.utils.JavaUtils.convert( - _resp, java.lang.String.class); + return (java.lang.String) org.apache.axis.utils.JavaUtils + .convert(_resp, java.lang.String.class); } } } @@ -346,14 +352,16 @@ public class JpredSoapBindingStub extends org.apache.axis.client.Stub _call.setOperation(_operations[2]); _call.setUseSOAPAction(true); _call.setSOAPActionURI(""); - _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); - _call.setOperationName(new javax.xml.namespace.QName("vamsas", - "getpredict")); + _call.setSOAPVersion( + org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setOperationName( + new javax.xml.namespace.QName("vamsas", "getpredict")); setRequestHeaders(_call); setAttachments(_call); java.lang.Object _resp = _call - .invoke(new java.lang.Object[] { job_id }); + .invoke(new java.lang.Object[] + { job_id }); if (_resp instanceof java.rmi.RemoteException) { @@ -373,8 +381,8 @@ public class JpredSoapBindingStub extends org.apache.axis.client.Stub } } - public vamsas.objects.simple.JpredResult getresult(java.lang.String job_id) - throws java.rmi.RemoteException + public vamsas.objects.simple.JpredResult getresult( + java.lang.String job_id) throws java.rmi.RemoteException { if (super.cachedEndpoint == null) { @@ -384,14 +392,16 @@ public class JpredSoapBindingStub extends org.apache.axis.client.Stub _call.setOperation(_operations[3]); _call.setUseSOAPAction(true); _call.setSOAPActionURI(""); - _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); - _call.setOperationName(new javax.xml.namespace.QName("vamsas", - "getresult")); + _call.setSOAPVersion( + org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setOperationName( + new javax.xml.namespace.QName("vamsas", "getresult")); setRequestHeaders(_call); setAttachments(_call); java.lang.Object _resp = _call - .invoke(new java.lang.Object[] { job_id }); + .invoke(new java.lang.Object[] + { job_id }); if (_resp instanceof java.rmi.RemoteException) { diff --git a/src/ext/vamsas/MuscleWSServiceLocator.java b/src/ext/vamsas/MuscleWSServiceLocator.java index 2427405..0485f2f 100755 --- a/src/ext/vamsas/MuscleWSServiceLocator.java +++ b/src/ext/vamsas/MuscleWSServiceLocator.java @@ -118,8 +118,8 @@ public class MuscleWSServiceLocator extends org.apache.axis.client.Service } throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage( - "exception.no_stub_implementation_for_interface", - new String[] { (serviceEndpointInterface == null ? "null" + "exception.no_stub_implementation_for_interface", new String[] + { (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()) })); } @@ -179,10 +179,10 @@ public class MuscleWSServiceLocator extends org.apache.axis.client.Service } else { // Unknown Port Name - throw new javax.xml.rpc.ServiceException( - MessageManager.formatMessage( - "exception.cannot_set_endpoint_address_unknown_port", - new String[] { portName })); + throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage( + "exception.cannot_set_endpoint_address_unknown_port", + new String[] + { portName })); } } diff --git a/src/ext/vamsas/MuscleWSSoapBindingStub.java b/src/ext/vamsas/MuscleWSSoapBindingStub.java index 1f8d231..8272844 100755 --- a/src/ext/vamsas/MuscleWSSoapBindingStub.java +++ b/src/ext/vamsas/MuscleWSSoapBindingStub.java @@ -89,7 +89,8 @@ public class MuscleWSSoapBindingStub extends org.apache.axis.client.Stub cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); - qName = new javax.xml.namespace.QName("vamsas", "ArrayOf_tns1_Sequence"); + qName = new javax.xml.namespace.QName("vamsas", + "ArrayOf_tns1_Sequence"); cachedSerQNames.add(qName); cls = vamsas.objects.simple.Sequence[].class; cachedSerClasses.add(cls); @@ -143,7 +144,8 @@ public class MuscleWSSoapBindingStub extends org.apache.axis.client.Stub cachedSerFactories.add(arraysf); cachedDeserFactories.add(arraydf); - qName = new javax.xml.namespace.QName("simple.objects.vamsas", "Result"); + qName = new javax.xml.namespace.QName("simple.objects.vamsas", + "Result"); cachedSerQNames.add(qName); cls = vamsas.objects.simple.Result.class; cachedSerClasses.add(cls); @@ -179,7 +181,8 @@ public class MuscleWSSoapBindingStub extends org.apache.axis.client.Stub oper.setReturnType(new javax.xml.namespace.QName( "simple.objects.vamsas", "Alignment")); oper.setReturnClass(vamsas.objects.simple.Alignment.class); - oper.setReturnQName(new javax.xml.namespace.QName("", "getalignReturn")); + oper.setReturnQName( + new javax.xml.namespace.QName("", "getalignReturn")); oper.setStyle(org.apache.axis.constants.Style.RPC); oper.setUse(org.apache.axis.constants.Use.ENCODED); _operations[1] = oper; @@ -194,7 +197,8 @@ public class MuscleWSSoapBindingStub extends org.apache.axis.client.Stub oper.setReturnType(new javax.xml.namespace.QName( "simple.objects.vamsas", "MsaResult")); oper.setReturnClass(vamsas.objects.simple.MsaResult.class); - oper.setReturnQName(new javax.xml.namespace.QName("", "getResultReturn")); + oper.setReturnQName( + new javax.xml.namespace.QName("", "getResultReturn")); oper.setStyle(org.apache.axis.constants.Style.RPC); oper.setUse(org.apache.axis.constants.Use.ENCODED); _operations[2] = oper; @@ -271,7 +275,8 @@ public class MuscleWSSoapBindingStub extends org.apache.axis.client.Stub if (firstCall()) { // must set encoding style before registering serializers - _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setSOAPVersion( + org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); _call.setEncodingStyle(org.apache.axis.Constants.URI_SOAP11_ENC); for (int i = 0; i < cachedSerFactories.size(); ++i) @@ -309,14 +314,17 @@ public class MuscleWSSoapBindingStub extends org.apache.axis.client.Stub _call.setOperation(_operations[0]); _call.setUseSOAPAction(true); _call.setSOAPActionURI(""); - _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); - _call.setOperationName(new javax.xml.namespace.QName("vamsas", "align")); + _call.setSOAPVersion( + org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setOperationName( + new javax.xml.namespace.QName("vamsas", "align")); setRequestHeaders(_call); setAttachments(_call); java.lang.Object _resp = _call - .invoke(new java.lang.Object[] { seqSet }); + .invoke(new java.lang.Object[] + { seqSet }); if (_resp instanceof java.rmi.RemoteException) { @@ -349,15 +357,17 @@ public class MuscleWSSoapBindingStub extends org.apache.axis.client.Stub _call.setOperation(_operations[1]); _call.setUseSOAPAction(true); _call.setSOAPActionURI(""); - _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); - _call.setOperationName(new javax.xml.namespace.QName("vamsas", - "getalign")); + _call.setSOAPVersion( + org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setOperationName( + new javax.xml.namespace.QName("vamsas", "getalign")); setRequestHeaders(_call); setAttachments(_call); java.lang.Object _resp = _call - .invoke(new java.lang.Object[] { job_id }); + .invoke(new java.lang.Object[] + { job_id }); if (_resp instanceof java.rmi.RemoteException) { @@ -390,15 +400,17 @@ public class MuscleWSSoapBindingStub extends org.apache.axis.client.Stub _call.setOperation(_operations[2]); _call.setUseSOAPAction(true); _call.setSOAPActionURI(""); - _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); - _call.setOperationName(new javax.xml.namespace.QName("vamsas", - "getResult")); + _call.setSOAPVersion( + org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setOperationName( + new javax.xml.namespace.QName("vamsas", "getResult")); setRequestHeaders(_call); setAttachments(_call); java.lang.Object _resp = _call - .invoke(new java.lang.Object[] { job_id }); + .invoke(new java.lang.Object[] + { job_id }); if (_resp instanceof java.rmi.RemoteException) { @@ -431,8 +443,10 @@ public class MuscleWSSoapBindingStub extends org.apache.axis.client.Stub _call.setOperation(_operations[3]); _call.setUseSOAPAction(true); _call.setSOAPActionURI(""); - _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); - _call.setOperationName(new javax.xml.namespace.QName("vamsas", "cancel")); + _call.setSOAPVersion( + org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setOperationName( + new javax.xml.namespace.QName("vamsas", "cancel")); setRequestHeaders(_call); setAttachments(_call); diff --git a/src/ext/vamsas/RegistryServiceSoapBindingStub.java b/src/ext/vamsas/RegistryServiceSoapBindingStub.java index 08b2a6b..b0b2270 100755 --- a/src/ext/vamsas/RegistryServiceSoapBindingStub.java +++ b/src/ext/vamsas/RegistryServiceSoapBindingStub.java @@ -20,8 +20,8 @@ */ package ext.vamsas; -public class RegistryServiceSoapBindingStub extends - org.apache.axis.client.Stub implements ext.vamsas.IRegistry +public class RegistryServiceSoapBindingStub + extends org.apache.axis.client.Stub implements ext.vamsas.IRegistry { private java.util.Vector cachedSerClasses = new java.util.Vector(); @@ -47,8 +47,8 @@ public class RegistryServiceSoapBindingStub extends oper.setReturnType(new javax.xml.namespace.QName( "registry.objects.vamsas", "ServiceHandles")); oper.setReturnClass(ext.vamsas.ServiceHandles.class); - oper.setReturnQName(new javax.xml.namespace.QName("", - "getServicesReturn")); + oper.setReturnQName( + new javax.xml.namespace.QName("", "getServicesReturn")); oper.setStyle(org.apache.axis.constants.Style.RPC); oper.setUse(org.apache.axis.constants.Use.ENCODED); _operations[0] = oper; @@ -169,7 +169,8 @@ public class RegistryServiceSoapBindingStub extends if (firstCall()) { // must set encoding style before registering serializers - _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setSOAPVersion( + org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); _call.setEncodingStyle(org.apache.axis.Constants.URI_SOAP11_ENC); for (int i = 0; i < cachedSerFactories.size(); ++i) { @@ -203,9 +204,10 @@ public class RegistryServiceSoapBindingStub extends _call.setOperation(_operations[0]); _call.setUseSOAPAction(true); _call.setSOAPActionURI(""); - _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); - _call.setOperationName(new javax.xml.namespace.QName("vamsas", - "getServices")); + _call.setSOAPVersion( + org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setOperationName( + new javax.xml.namespace.QName("vamsas", "getServices")); setRequestHeaders(_call); setAttachments(_call); diff --git a/src/ext/vamsas/SeqSearchServiceLocator.java b/src/ext/vamsas/SeqSearchServiceLocator.java index daf7dd3..407a62f 100644 --- a/src/ext/vamsas/SeqSearchServiceLocator.java +++ b/src/ext/vamsas/SeqSearchServiceLocator.java @@ -112,8 +112,8 @@ public class SeqSearchServiceLocator extends org.apache.axis.client.Service throw new javax.xml.rpc.ServiceException(t); } throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage( - "exception.no_stub_implementation_for_interface", - new String[] { (serviceEndpointInterface == null ? "null" + "exception.no_stub_implementation_for_interface", new String[] + { (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()) })); } @@ -171,10 +171,10 @@ public class SeqSearchServiceLocator extends org.apache.axis.client.Service } else { // Unknown Port Name - throw new javax.xml.rpc.ServiceException( - MessageManager.formatMessage( - "exception.cannot_set_endpoint_address_unknown_port", - new String[] { portName })); + throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage( + "exception.cannot_set_endpoint_address_unknown_port", + new String[] + { portName })); } } diff --git a/src/ext/vamsas/SeqSearchServiceSoapBindingStub.java b/src/ext/vamsas/SeqSearchServiceSoapBindingStub.java index 390ceb6..cc85eac 100644 --- a/src/ext/vamsas/SeqSearchServiceSoapBindingStub.java +++ b/src/ext/vamsas/SeqSearchServiceSoapBindingStub.java @@ -20,8 +20,8 @@ */ package ext.vamsas; -public class SeqSearchServiceSoapBindingStub extends - org.apache.axis.client.Stub implements ext.vamsas.SeqSearchI +public class SeqSearchServiceSoapBindingStub + extends org.apache.axis.client.Stub implements ext.vamsas.SeqSearchI { private java.util.Vector cachedSerClasses = new java.util.Vector(); @@ -47,8 +47,8 @@ public class SeqSearchServiceSoapBindingStub extends oper.setReturnType(new javax.xml.namespace.QName( "http://www.w3.org/2001/XMLSchema", "string")); oper.setReturnClass(java.lang.String.class); - oper.setReturnQName(new javax.xml.namespace.QName("", - "getDatabaseReturn")); + oper.setReturnQName( + new javax.xml.namespace.QName("", "getDatabaseReturn")); oper.setStyle(org.apache.axis.constants.Style.RPC); oper.setUse(org.apache.axis.constants.Use.ENCODED); _operations[0] = oper; @@ -63,7 +63,8 @@ public class SeqSearchServiceSoapBindingStub extends oper.setReturnType(new javax.xml.namespace.QName( "simple.objects.vamsas", "SeqSearchResult")); oper.setReturnClass(vamsas.objects.simple.SeqSearchResult.class); - oper.setReturnQName(new javax.xml.namespace.QName("", "getResultReturn")); + oper.setReturnQName( + new javax.xml.namespace.QName("", "getResultReturn")); oper.setStyle(org.apache.axis.constants.Style.RPC); oper.setUse(org.apache.axis.constants.Use.ENCODED); _operations[1] = oper; @@ -72,7 +73,8 @@ public class SeqSearchServiceSoapBindingStub extends oper.setName("psearch"); oper.addParameter(new javax.xml.namespace.QName("", "al"), new javax.xml.namespace.QName("simple.objects.vamsas", - "Alignment"), vamsas.objects.simple.Alignment.class, + "Alignment"), + vamsas.objects.simple.Alignment.class, org.apache.axis.description.ParameterDesc.IN, false, false); oper.addParameter(new javax.xml.namespace.QName("", "database"), new javax.xml.namespace.QName( @@ -91,7 +93,8 @@ public class SeqSearchServiceSoapBindingStub extends oper.setName("search"); oper.addParameter(new javax.xml.namespace.QName("", "s"), new javax.xml.namespace.QName("simple.objects.vamsas", - "Sequence"), vamsas.objects.simple.Sequence.class, + "Sequence"), + vamsas.objects.simple.Sequence.class, org.apache.axis.description.ParameterDesc.IN, false, false); oper.addParameter(new javax.xml.namespace.QName("", "database"), new javax.xml.namespace.QName( @@ -158,7 +161,8 @@ public class SeqSearchServiceSoapBindingStub extends java.lang.Class simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class; java.lang.Class simplelistsf = org.apache.axis.encoding.ser.SimpleListSerializerFactory.class; java.lang.Class simplelistdf = org.apache.axis.encoding.ser.SimpleListDeserializerFactory.class; - qName = new javax.xml.namespace.QName("simple.objects.vamsas", "Result"); + qName = new javax.xml.namespace.QName("simple.objects.vamsas", + "Result"); cachedSerQNames.add(qName); cls = vamsas.objects.simple.Result.class; cachedSerClasses.add(cls); @@ -204,7 +208,8 @@ public class SeqSearchServiceSoapBindingStub extends cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); - qName = new javax.xml.namespace.QName("vamsas", "ArrayOf_tns1_Sequence"); + qName = new javax.xml.namespace.QName("vamsas", + "ArrayOf_tns1_Sequence"); cachedSerQNames.add(qName); cls = vamsas.objects.simple.Sequence[].class; cachedSerClasses.add(cls); @@ -276,7 +281,8 @@ public class SeqSearchServiceSoapBindingStub extends if (firstCall()) { // must set encoding style before registering serializers - _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setSOAPVersion( + org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); _call.setEncodingStyle(org.apache.axis.Constants.URI_SOAP11_ENC); for (int i = 0; i < cachedSerFactories.size(); ++i) { @@ -309,9 +315,10 @@ public class SeqSearchServiceSoapBindingStub extends _call.setOperation(_operations[0]); _call.setUseSOAPAction(true); _call.setSOAPActionURI(""); - _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); - _call.setOperationName(new javax.xml.namespace.QName("vamsas", - "getDatabase")); + _call.setSOAPVersion( + org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setOperationName( + new javax.xml.namespace.QName("vamsas", "getDatabase")); setRequestHeaders(_call); setAttachments(_call); @@ -329,8 +336,8 @@ public class SeqSearchServiceSoapBindingStub extends return (java.lang.String) _resp; } catch (java.lang.Exception _exception) { - return (java.lang.String) org.apache.axis.utils.JavaUtils.convert( - _resp, java.lang.String.class); + return (java.lang.String) org.apache.axis.utils.JavaUtils + .convert(_resp, java.lang.String.class); } } } @@ -346,14 +353,16 @@ public class SeqSearchServiceSoapBindingStub extends _call.setOperation(_operations[1]); _call.setUseSOAPAction(true); _call.setSOAPActionURI(""); - _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); - _call.setOperationName(new javax.xml.namespace.QName("vamsas", - "getResult")); + _call.setSOAPVersion( + org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setOperationName( + new javax.xml.namespace.QName("vamsas", "getResult")); setRequestHeaders(_call); setAttachments(_call); java.lang.Object _resp = _call - .invoke(new java.lang.Object[] { job_id }); + .invoke(new java.lang.Object[] + { job_id }); if (_resp instanceof java.rmi.RemoteException) { @@ -368,7 +377,8 @@ public class SeqSearchServiceSoapBindingStub extends } catch (java.lang.Exception _exception) { return (vamsas.objects.simple.SeqSearchResult) org.apache.axis.utils.JavaUtils - .convert(_resp, vamsas.objects.simple.SeqSearchResult.class); + .convert(_resp, + vamsas.objects.simple.SeqSearchResult.class); } } } @@ -385,14 +395,16 @@ public class SeqSearchServiceSoapBindingStub extends _call.setOperation(_operations[2]); _call.setUseSOAPAction(true); _call.setSOAPActionURI(""); - _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); - _call.setOperationName(new javax.xml.namespace.QName("vamsas", - "psearch")); + _call.setSOAPVersion( + org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setOperationName( + new javax.xml.namespace.QName("vamsas", "psearch")); setRequestHeaders(_call); setAttachments(_call); - java.lang.Object _resp = _call.invoke(new java.lang.Object[] { al, - database }); + java.lang.Object _resp = _call + .invoke(new java.lang.Object[] + { al, database }); if (_resp instanceof java.rmi.RemoteException) { @@ -424,13 +436,16 @@ public class SeqSearchServiceSoapBindingStub extends _call.setOperation(_operations[3]); _call.setUseSOAPAction(true); _call.setSOAPActionURI(""); - _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); - _call.setOperationName(new javax.xml.namespace.QName("vamsas", "search")); + _call.setSOAPVersion( + org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setOperationName( + new javax.xml.namespace.QName("vamsas", "search")); setRequestHeaders(_call); setAttachments(_call); - java.lang.Object _resp = _call.invoke(new java.lang.Object[] { s, - database }); + java.lang.Object _resp = _call + .invoke(new java.lang.Object[] + { s, database }); if (_resp instanceof java.rmi.RemoteException) { @@ -461,8 +476,10 @@ public class SeqSearchServiceSoapBindingStub extends _call.setOperation(_operations[4]); _call.setUseSOAPAction(true); _call.setSOAPActionURI(""); - _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); - _call.setOperationName(new javax.xml.namespace.QName("vamsas", "cancel")); + _call.setSOAPVersion( + org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setOperationName( + new javax.xml.namespace.QName("vamsas", "cancel")); setRequestHeaders(_call); setAttachments(_call); diff --git a/src/ext/vamsas/ServiceHandle.java b/src/ext/vamsas/ServiceHandle.java index 83412ea..7d27695 100755 --- a/src/ext/vamsas/ServiceHandle.java +++ b/src/ext/vamsas/ServiceHandle.java @@ -148,14 +148,19 @@ public class ServiceHandle implements java.io.Serializable __equalsCalc = obj; boolean _equals; _equals = true - && ((this.abstractName == null && other.getAbstractName() == null) || (this.abstractName != null && this.abstractName - .equals(other.getAbstractName()))) - && ((this.description == null && other.getDescription() == null) || (this.description != null && this.description - .equals(other.getDescription()))) - && ((this.endpointURL == null && other.getEndpointURL() == null) || (this.endpointURL != null && this.endpointURL - .equals(other.getEndpointURL()))) - && ((this.name == null && other.getName() == null) || (this.name != null && this.name - .equals(other.getName()))); + && ((this.abstractName == null + && other.getAbstractName() == null) + || (this.abstractName != null && this.abstractName + .equals(other.getAbstractName()))) + && ((this.description == null && other.getDescription() == null) + || (this.description != null && this.description + .equals(other.getDescription()))) + && ((this.endpointURL == null && other.getEndpointURL() == null) + || (this.endpointURL != null && this.endpointURL + .equals(other.getEndpointURL()))) + && ((this.name == null && other.getName() == null) + || (this.name != null + && this.name.equals(other.getName()))); __equalsCalc = null; return _equals; } diff --git a/src/ext/vamsas/ServiceHandles.java b/src/ext/vamsas/ServiceHandles.java index 5ed466f..a0e0456 100755 --- a/src/ext/vamsas/ServiceHandles.java +++ b/src/ext/vamsas/ServiceHandles.java @@ -76,8 +76,10 @@ public class ServiceHandles implements java.io.Serializable } __equalsCalc = obj; boolean _equals; - _equals = true && ((this.services == null && other.getServices() == null) || (this.services != null && java.util.Arrays - .equals(this.services, other.getServices()))); + _equals = true + && ((this.services == null && other.getServices() == null) + || (this.services != null && java.util.Arrays + .equals(this.services, other.getServices()))); __equalsCalc = null; return _equals; } @@ -94,10 +96,11 @@ public class ServiceHandles implements java.io.Serializable int _hashCode = 1; if (getServices() != null) { - for (int i = 0; i < java.lang.reflect.Array.getLength(getServices()); i++) + for (int i = 0; i < java.lang.reflect.Array + .getLength(getServices()); i++) { - java.lang.Object obj = java.lang.reflect.Array - .get(getServices(), i); + java.lang.Object obj = java.lang.reflect.Array.get(getServices(), + i); if (obj != null && !obj.getClass().isArray()) { _hashCode += obj.hashCode(); diff --git a/src/jalview/analysis/AAFrequency.java b/src/jalview/analysis/AAFrequency.java index 52dedcf..b1505d6 100755 --- a/src/jalview/analysis/AAFrequency.java +++ b/src/jalview/analysis/AAFrequency.java @@ -483,8 +483,7 @@ public class AAFrequency * @return */ public static int[] extractCdnaProfile( - Hashtable hashtable, - boolean ignoreGaps) + Hashtable hashtable, boolean ignoreGaps) { // this holds #seqs, #ungapped, and then codon count, indexed by encoded // codon triplet @@ -606,8 +605,8 @@ public class AAFrequency */ public static void completeCdnaConsensus( AlignmentAnnotation consensusAnnotation, - Hashtable[] consensusData, boolean showProfileLogo, - int nseqs) + Hashtable[] consensusData, + boolean showProfileLogo, int nseqs) { if (consensusAnnotation == null || consensusAnnotation.annotations == null diff --git a/src/jalview/analysis/AlignSeq.java b/src/jalview/analysis/AlignSeq.java index 2fb6ce1..65fd110 100755 --- a/src/jalview/analysis/AlignSeq.java +++ b/src/jalview/analysis/AlignSeq.java @@ -150,7 +150,8 @@ public class AlignSeq public AlignSeq(SequenceI s1, String string1, SequenceI s2, String string2, String type) { - seqInit(s1, string1.toUpperCase(Locale.ROOT), s2, string2.toUpperCase(Locale.ROOT), type); + seqInit(s1, string1.toUpperCase(Locale.ROOT), s2, + string2.toUpperCase(Locale.ROOT), type); } /** @@ -645,12 +646,14 @@ public class AlignSeq for (int j = 1; j < m; j++) { // What should these values be? 0 maybe - E[0][j] = max(score[0][j - 1] - GAP_OPEN_COST, E[0][j - 1] - GAP_EXTEND_COST); + E[0][j] = max(score[0][j - 1] - GAP_OPEN_COST, + E[0][j - 1] - GAP_EXTEND_COST); F[0][j] = -GAP_EXTEND_COST; float pairwiseScore = scoreMatrix.getPairwiseScore(s1str.charAt(0), s2str.charAt(j)); - score[0][j] = max(pairwiseScore * 10, -GAP_OPEN_COST, -GAP_EXTEND_COST); + score[0][j] = max(pairwiseScore * 10, -GAP_OPEN_COST, + -GAP_EXTEND_COST); traceback[0][j] = 1; } @@ -659,7 +662,8 @@ public class AlignSeq for (int i = 1; i < n; i++) { E[i][0] = -GAP_OPEN_COST; - F[i][0] = max(score[i - 1][0] - GAP_OPEN_COST, F[i - 1][0] - GAP_EXTEND_COST); + F[i][0] = max(score[i - 1][0] - GAP_OPEN_COST, + F[i - 1][0] - GAP_EXTEND_COST); float pairwiseScore = scoreMatrix.getPairwiseScore(s1str.charAt(i), s2str.charAt(0)); @@ -672,8 +676,10 @@ public class AlignSeq { for (int j = 1; j < m; j++) { - E[i][j] = max(score[i][j - 1] - GAP_OPEN_COST, E[i][j - 1] - GAP_EXTEND_COST); - F[i][j] = max(score[i - 1][j] - GAP_OPEN_COST, F[i - 1][j] - GAP_EXTEND_COST); + E[i][j] = max(score[i][j - 1] - GAP_OPEN_COST, + E[i][j - 1] - GAP_EXTEND_COST); + F[i][j] = max(score[i - 1][j] - GAP_OPEN_COST, + F[i - 1][j] - GAP_EXTEND_COST); float pairwiseScore = scoreMatrix.getPairwiseScore(s1str.charAt(i), s2str.charAt(j)); diff --git a/src/jalview/analysis/AlignmentSorter.java b/src/jalview/analysis/AlignmentSorter.java index b88ef3a..81bddc2 100755 --- a/src/jalview/analysis/AlignmentSorter.java +++ b/src/jalview/analysis/AlignmentSorter.java @@ -708,14 +708,15 @@ public class AlignmentSorter if (method != FEATURE_SCORE && method != FEATURE_LABEL && method != FEATURE_DENSITY) { - String msg = String - .format("Implementation Error - sortByFeature method must be either '%s' or '%s'", - FEATURE_SCORE, FEATURE_DENSITY); + String msg = String.format( + "Implementation Error - sortByFeature method must be either '%s' or '%s'", + FEATURE_SCORE, FEATURE_DENSITY); System.err.println(msg); return; } - flipFeatureSortIfUnchanged(method, featureTypes, groups, startCol, endCol); + flipFeatureSortIfUnchanged(method, featureTypes, groups, startCol, + endCol); SequenceI[] seqs = alignment.getSequencesArray(); @@ -734,8 +735,8 @@ public class AlignmentSorter * get sequence residues overlapping column region * and features for residue positions and specified types */ - String[] types = featureTypes == null ? null : featureTypes - .toArray(new String[featureTypes.size()]); + String[] types = featureTypes == null ? null + : featureTypes.toArray(new String[featureTypes.size()]); List sfs = seqs[i].findFeatures(startCol + 1, endCol + 1, types); diff --git a/src/jalview/analysis/AlignmentUtils.java b/src/jalview/analysis/AlignmentUtils.java index 28f23b24..fdc74e2 100644 --- a/src/jalview/analysis/AlignmentUtils.java +++ b/src/jalview/analysis/AlignmentUtils.java @@ -186,8 +186,8 @@ public class AlignmentUtils .getSequence(s.getStart() - 1 - ustream_ds, s.getStart() - 1)) .toLowerCase(Locale.ROOT).toCharArray(); char[] downstream = new String( - ds.getSequence(s_end - 1, s_end + dstream_ds)).toLowerCase(Locale.ROOT) - .toCharArray(); + ds.getSequence(s_end - 1, s_end + dstream_ds)) + .toLowerCase(Locale.ROOT).toCharArray(); char[] coreseq = s.getSequence(); char[] nseq = new char[offset + upstream.length + downstream.length + coreseq.length]; @@ -465,7 +465,8 @@ public class AlignmentUtils if (cdnaLength != mappedLength && cdnaLength > 2) { String lastCodon = String.valueOf(cdnaSeqChars, - cdnaLength - CODON_LENGTH, CODON_LENGTH).toUpperCase(Locale.ROOT); + cdnaLength - CODON_LENGTH, CODON_LENGTH) + .toUpperCase(Locale.ROOT); for (String stop : ResidueProperties.STOP_CODONS) { if (lastCodon.equals(stop)) @@ -482,7 +483,8 @@ public class AlignmentUtils */ int startOffset = 0; if (cdnaLength != mappedLength && cdnaLength > 2 - && String.valueOf(cdnaSeqChars, 0, CODON_LENGTH).toUpperCase(Locale.ROOT) + && String.valueOf(cdnaSeqChars, 0, CODON_LENGTH) + .toUpperCase(Locale.ROOT) .equals(ResidueProperties.START)) { startOffset += CODON_LENGTH; @@ -976,8 +978,8 @@ public class AlignmentUtils mapList = mapList.getInverse(); } final int cdsLength = cdsDss.getLength(); - int mappedFromLength = MappingUtils.getLength(mapList - .getFromRanges()); + int mappedFromLength = MappingUtils + .getLength(mapList.getFromRanges()); int mappedToLength = MappingUtils .getLength(mapList.getToRanges()); boolean addStopCodon = (cdsLength == mappedFromLength @@ -1651,8 +1653,8 @@ public class AlignmentUtils productSeqs = new HashSet<>(); for (SequenceI seq : products) { - productSeqs.add(seq.getDatasetSequence() == null ? seq : seq - .getDatasetSequence()); + productSeqs.add(seq.getDatasetSequence() == null ? seq + : seq.getDatasetSequence()); } } @@ -1756,7 +1758,7 @@ public class AlignmentUtils dataset.addSequence(cdsSeqDss); AlignedCodonFrame cdsToProteinMapping = new AlignedCodonFrame(); cdsToProteinMapping.addMap(cdsSeqDss, proteinProduct, - cdsToProteinMap); + cdsToProteinMap); /* * guard against duplicating the mapping if repeating this action @@ -1809,20 +1811,21 @@ public class AlignmentUtils List primrefs = dnaDss.getPrimaryDBRefs(); for (int ip = 0, np = primrefs.size(); ip < np; ip++) { - DBRefEntry primRef = primrefs.get(ip); + DBRefEntry primRef = primrefs.get(ip); /* * create a cross-reference from CDS to the source sequence's * primary reference and vice versa */ String source = primRef.getSource(); String version = primRef.getVersion(); - DBRefEntry cdsCrossRef = new DBRefEntry(source, source + ":" - + version, primRef.getAccessionId()); - cdsCrossRef.setMap(new Mapping(dnaDss, new MapList(cdsToDnaMap))); + DBRefEntry cdsCrossRef = new DBRefEntry(source, + source + ":" + version, primRef.getAccessionId()); + cdsCrossRef + .setMap(new Mapping(dnaDss, new MapList(cdsToDnaMap))); cdsSeqDss.addDBRef(cdsCrossRef); - dnaSeq.addDBRef(new DBRefEntry(source, version, cdsSeq - .getName(), new Mapping(cdsSeqDss, dnaToCdsMap))); + dnaSeq.addDBRef(new DBRefEntry(source, version, + cdsSeq.getName(), new Mapping(cdsSeqDss, dnaToCdsMap))); // problem here is that the cross-reference is synthesized - // cdsSeq.getName() may be like 'CDS|dnaaccession' or // 'CDS|emblcdsacc' @@ -1831,8 +1834,8 @@ public class AlignmentUtils DBRefEntry proteinToCdsRef = new DBRefEntry(source, version, cdsSeq.getName()); // - proteinToCdsRef.setMap(new Mapping(cdsSeqDss, cdsToProteinMap - .getInverse())); + proteinToCdsRef.setMap( + new Mapping(cdsSeqDss, cdsToProteinMap.getInverse())); proteinProduct.addDBRef(proteinToCdsRef); } /* @@ -1844,8 +1847,8 @@ public class AlignmentUtils } } - AlignmentI cds = new Alignment(cdsSeqs.toArray(new SequenceI[cdsSeqs - .size()])); + AlignmentI cds = new Alignment( + cdsSeqs.toArray(new SequenceI[cdsSeqs.size()])); cds.setDataset(dataset); return cds; @@ -2057,7 +2060,8 @@ public class AlignmentUtils else { Console.error( - "JAL-2154 regression: warning - found (and ignored) a duplicate CDS sequence:" + mtch.toString()); + "JAL-2154 regression: warning - found (and ignored) a duplicate CDS sequence:" + + mtch.toString()); } } } @@ -2181,9 +2185,9 @@ public class AlignmentUtils /* * get features, optionally restricted by an ontology term */ - List sfs = select == null ? fromSeq.getFeatures() - .getPositionalFeatures() : fromSeq.getFeatures() - .getFeaturesByOntology(select); + List sfs = select == null + ? fromSeq.getFeatures().getPositionalFeatures() + : fromSeq.getFeatures().getFeaturesByOntology(select); int count = 0; for (SequenceFeature sf : sfs) @@ -2328,8 +2332,8 @@ public class AlignmentUtils { List result = new ArrayList<>(); - List sfs = dnaSeq.getFeatures().getFeaturesByOntology( - SequenceOntologyI.CDS); + List sfs = dnaSeq.getFeatures() + .getFeaturesByOntology(SequenceOntologyI.CDS); if (sfs.isEmpty()) { return result; @@ -2341,11 +2345,11 @@ public class AlignmentUtils int phase = 0; try { - String s = sf.getPhase(); - if (s != null) - { - phase = Integer.parseInt(s); - } + String s = sf.getPhase(); + if (s != null) + { + phase = Integer.parseInt(s); + } } catch (NumberFormatException e) { // leave as zero @@ -2401,11 +2405,11 @@ public class AlignmentUtils SequenceIdMatcher matcher = new SequenceIdMatcher(seqs); if (xrefs != null) { - // BH 2019.01.25 recoded to remove iterators - + // BH 2019.01.25 recoded to remove iterators + for (int ix = 0, nx = xrefs.length; ix < nx; ix++) { - SequenceI xref = xrefs[ix]; + SequenceI xref = xrefs[ix]; List dbrefs = xref.getDBRefs(); if (dbrefs != null) { @@ -2520,10 +2524,10 @@ public class AlignmentUtils * true; else returns false * * @param unaligned - * - sequences to be aligned based on aligned + * - sequences to be aligned based on aligned * @param aligned - * - 'guide' alignment containing sequences derived from same - * dataset as unaligned + * - 'guide' alignment containing sequences derived from same dataset + * as unaligned * @return */ static boolean alignAsSameSequences(AlignmentI unaligned, @@ -2559,8 +2563,7 @@ public class AlignmentUtils { return false; } - SequenceI alignedSeq = alignedDatasets.get(ds) - .get(0); + SequenceI alignedSeq = alignedDatasets.get(ds).get(0); int startCol = alignedSeq.findIndex(seq.getStart()); // 1.. leftmost = Math.min(leftmost, startCol); } diff --git a/src/jalview/analysis/AnnotationSorter.java b/src/jalview/analysis/AnnotationSorter.java index c9ed570..92ed9be 100644 --- a/src/jalview/analysis/AnnotationSorter.java +++ b/src/jalview/analysis/AnnotationSorter.java @@ -370,7 +370,8 @@ public class AnnotationSorter { return 1; } - return label1.toUpperCase(Locale.ROOT).compareTo(label2.toUpperCase(Locale.ROOT)); + return label1.toUpperCase(Locale.ROOT) + .compareTo(label2.toUpperCase(Locale.ROOT)); } /** diff --git a/src/jalview/analysis/CodingUtils.java b/src/jalview/analysis/CodingUtils.java index 92b39c3..7fb0eb8 100644 --- a/src/jalview/analysis/CodingUtils.java +++ b/src/jalview/analysis/CodingUtils.java @@ -111,7 +111,7 @@ public class CodingUtils public static void decodeCodon2(int encoded, char[] result) { - result[2] = decodeNucleotide(encoded & 3); + result[2] = decodeNucleotide(encoded & 3); encoded = encoded >>> CODON_ENCODING_BITSHIFT; result[1] = decodeNucleotide(encoded & 3); encoded = encoded >>> CODON_ENCODING_BITSHIFT; diff --git a/src/jalview/analysis/Conservation.java b/src/jalview/analysis/Conservation.java index 6cc9dd3..cbc4dca 100755 --- a/src/jalview/analysis/Conservation.java +++ b/src/jalview/analysis/Conservation.java @@ -814,8 +814,8 @@ public class Conservation float vprop = value - qmin; vprop /= qmax; String description = FORMAT_3DP.form(value); - quality2.annotations[i] = new Annotation(" ", description, - ' ', value, new Color(minR + (maxR * vprop), + quality2.annotations[i] = new Annotation(" ", description, ' ', + value, new Color(minR + (maxR * vprop), minG + (maxG * vprop), minB + (maxB * vprop))); } } diff --git a/src/jalview/analysis/CrossRef.java b/src/jalview/analysis/CrossRef.java index 1783f37..9b90ca5 100644 --- a/src/jalview/analysis/CrossRef.java +++ b/src/jalview/analysis/CrossRef.java @@ -143,14 +143,16 @@ public class CrossRef /* * first find seq's xrefs (dna-to-peptide or peptide-to-dna) */ - List rfs = DBRefUtils.selectDbRefs(!fromDna, seq.getDBRefs()); + List rfs = DBRefUtils.selectDbRefs(!fromDna, + seq.getDBRefs()); addXrefsToSources(rfs, sources); if (dataset != null) { /* * find sequence's direct (dna-to-dna, peptide-to-peptide) xrefs */ - List lrfs = DBRefUtils.selectDbRefs(fromDna, seq.getDBRefs()); + List lrfs = DBRefUtils.selectDbRefs(fromDna, + seq.getDBRefs()); List foundSeqs = new ArrayList<>(); /* @@ -370,7 +372,8 @@ public class CrossRef { // do a bit more work - search for sequences with references matching // xrefs on this sequence. - found = searchDataset(fromDna, dss, xref, rseqs, cf, false, DBRefUtils.SEARCH_MODE_FULL); + found = searchDataset(fromDna, dss, xref, rseqs, cf, false, + DBRefUtils.SEARCH_MODE_FULL); } if (found) { @@ -443,10 +446,10 @@ public class CrossRef addedXref |= importCrossRefSeq(cf, newDsSeqs, doNotAdd, dss, retrievedDss); } - // JBPNote: What assumptions are made for dbref structures on + // JBPNote: What assumptions are made for dbref structures on // retrieved sequences ? - // addedXref will be true means importCrossRefSeq found - // sequences with dbrefs with mappings to sequences congruent with dss + // addedXref will be true means importCrossRefSeq found + // sequences with dbrefs with mappings to sequences congruent with dss if (!addedXref) { @@ -498,11 +501,12 @@ public class CrossRef // protein if (sq.isProtein() == fromDna) { - List sqdbrefs = sq.getPrimaryDBRefs(); + List sqdbrefs = sq.getPrimaryDBRefs(); for (int idb = 0, ndb = sqdbrefs.size(); idb < ndb; idb++) { - DBRefEntry dbr = sqdbrefs.get(idb); - List searchrefs = DBRefUtils.searchRefs(dbrSourceSet, dbr, DBRefUtils.SEARCH_MODE_FULL); + DBRefEntry dbr = sqdbrefs.get(idb); + List searchrefs = DBRefUtils.searchRefs(dbrSourceSet, + dbr, DBRefUtils.SEARCH_MODE_FULL); for (int isr = 0, nsr = searchrefs.size(); isr < nsr; isr++) { sourceRefs.remove(searchrefs.get(isr)); @@ -723,8 +727,9 @@ public class CrossRef /** * Returns null or the first sequence in the dataset which is identical to * xref.mapTo, and has a) a primary dbref matching xref, or if none found, the - * first one with an ID source|xrefacc - * JBPNote: Could refactor this to AlignmentI/DatasetI + * first one with an ID source|xrefacc JBPNote: Could refactor this to + * AlignmentI/DatasetI + * * @param xref * with map and mapped-to sequence * @return @@ -754,8 +759,8 @@ public class CrossRef for (SequenceI seq : dataset.getSequences()) { // first check primary refs. - List match = DBRefUtils.searchRefs( - seq.getPrimaryDBRefs(), template, DBRefUtils.SEARCH_MODE_FULL); + List match = DBRefUtils.searchRefs(seq.getPrimaryDBRefs(), + template, DBRefUtils.SEARCH_MODE_FULL); if (match != null && match.size() == 1 && sameSequence(seq, dss)) { return seq; @@ -821,8 +826,9 @@ public class CrossRef /** * Updates any empty mappings in the cross-references with one to a compatible * retrieved sequence if found, and adds any new mappings to the - * AlignedCodonFrame - * JBPNote: TODO: this relies on sequence IDs like UNIPROT|ACCESSION - which do not always happen. + * AlignedCodonFrame JBPNote: TODO: this relies on sequence IDs like + * UNIPROT|ACCESSION - which do not always happen. + * * @param mapFrom * @param xrefs * @param retrieved @@ -972,10 +978,10 @@ public class CrossRef } for (int i = 0, n = lrfs.size(); i < n; i++) { -// DBRefEntry xref = new DBRefEntry(lrfs.get(i)); -// // add in wildcards -// xref.setVersion(null); -// xref.setMap(null); + // DBRefEntry xref = new DBRefEntry(lrfs.get(i)); + // // add in wildcards + // xref.setVersion(null); + // xref.setMap(null); found |= searchDataset(fromDna, sequenceI, lrfs.get(i), foundSeqs, cf, false, DBRefUtils.SEARCH_MODE_NO_MAP_NO_VERSION); } @@ -1008,7 +1014,8 @@ public class CrossRef * sequenceI or all the returned sequences (eg a genomic reference * associated with a locus and one or more transcripts) * - * @param mode SEARCH_MODE_FULL for all; SEARCH_MODE_NO_MAP_NO_VERSION optional + * @param mode + * SEARCH_MODE_FULL for all; SEARCH_MODE_NO_MAP_NO_VERSION optional * @return true if relationship found and sequence added. */ boolean searchDataset(boolean fromDna, SequenceI fromSeq, DBRefEntry xrf, diff --git a/src/jalview/analysis/Dna.java b/src/jalview/analysis/Dna.java index 8bf0c24..5dcf212 100644 --- a/src/jalview/analysis/Dna.java +++ b/src/jalview/analysis/Dna.java @@ -163,7 +163,8 @@ public class Dna * @param ac2 * @return */ - public static final int compareCodonPos(AlignedCodon ac1, AlignedCodon ac2) + public static final int compareCodonPos(AlignedCodon ac1, + AlignedCodon ac2) { return comparator.compare(ac1, ac2); // return jalview_2_8_2compare(ac1, ac2); @@ -270,7 +271,7 @@ public class Dna mappedrefs.add(ref); // add translated protein maps } } - dnarefs = mappedrefs;//.toArray(new DBRefEntry[mappedrefs.size()]); + dnarefs = mappedrefs;// .toArray(new DBRefEntry[mappedrefs.size()]); for (int d = 0, nd = dnarefs.size(); d < nd; d++) { Mapping mp = dnarefs.get(d).getMap(); @@ -469,7 +470,8 @@ public class Dna /* * Filled up a reading frame... */ - AlignedCodon alignedCodon = new AlignedCodon(cdp[0], cdp[1], cdp[2]); + AlignedCodon alignedCodon = new AlignedCodon(cdp[0], cdp[1], + cdp[2]); String aa = codeTable.translate(new String(codon)); rf = 0; final String gapString = String.valueOf(gapChar); @@ -798,29 +800,29 @@ public class Dna private static void transferCodedFeatures(SequenceI dna, SequenceI pep, MapList map) { - // BH 2019.01.25 nop? -// List dnarefs = DBRefUtils.selectRefs(dna.getDBRefs(), -// DBRefSource.DNACODINGDBS); -// if (dnarefs != null) -// { -// // intersect with pep -// for (int d = 0, nd = dnarefs.size(); d < nd; d++) -// { -// Mapping mp = dnarefs.get(d).getMap(); -// if (mp != null) -// { -// } -// } -// } + // BH 2019.01.25 nop? + // List dnarefs = DBRefUtils.selectRefs(dna.getDBRefs(), + // DBRefSource.DNACODINGDBS); + // if (dnarefs != null) + // { + // // intersect with pep + // for (int d = 0, nd = dnarefs.size(); d < nd; d++) + // { + // Mapping mp = dnarefs.get(d).getMap(); + // if (mp != null) + // { + // } + // } + // } for (SequenceFeature sf : dna.getFeatures().getAllFeatures()) { - if (FeatureProperties.isCodingFeature(null, sf.getType())) + if (FeatureProperties.isCodingFeature(null, sf.getType())) + { + // if (map.intersectsFrom(sf[f].begin, sf[f].end)) { - // if (map.intersectsFrom(sf[f].begin, sf[f].end)) - { - } } + } } } diff --git a/src/jalview/analysis/Finder.java b/src/jalview/analysis/Finder.java index bf86a86..f8cfcbf 100644 --- a/src/jalview/analysis/Finder.java +++ b/src/jalview/analysis/Finder.java @@ -123,7 +123,7 @@ public class Finder implements FinderI { doFind(theSearchString, matchCase, searchDescription, false, ignoreHidden); - + if (searchResults.isEmpty() && idMatches.isEmpty()) { /* @@ -174,9 +174,9 @@ public class Finder implements FinderI } /** - * Calculates and saves the sequence string to search. The string is restricted - * to the current selection region if there is one, and is saved with all gaps - * removed. + * Calculates and saves the sequence string to search. The string is + * restricted to the current selection region if there is one, and is saved + * with all gaps removed. *

* If there are hidden columns, and option {@ignoreHidden} is selected, then * only visible positions of the sequence are included, and a mapping is also @@ -248,13 +248,14 @@ public class Finder implements FinderI } /** - * Returns a string consisting of only the visible residues of {@code seq} from - * alignment column {@ fromColumn}, restricted to the current selection region - * if there is one. + * Returns a string consisting of only the visible residues of {@code seq} + * from alignment column {@ fromColumn}, restricted to the current selection + * region if there is one. *

- * As a side-effect, also computes the mapping from the true sequence positions - * to the positions (1, 2, ...) of the returned sequence. This is to allow - * search matches in the visible sequence to be converted to sequence positions. + * As a side-effect, also computes the mapping from the true sequence + * positions to the positions (1, 2, ...) of the returned sequence. This is to + * allow search matches in the visible sequence to be converted to sequence + * positions. * * @param seq * @return @@ -314,9 +315,9 @@ public class Finder implements FinderI /** * Advances the search to the next sequence in the alignment. Sequences not in - * the current selection group (if there is one) are skipped. The (sub-)sequence - * to be searched is extracted, gaps removed, and saved, or set to null if there - * are no more sequences to search. + * the current selection group (if there is one) are skipped. The + * (sub-)sequence to be searched is extracted, gaps removed, and saved, or set + * to null if there are no more sequences to search. *

* Returns true if a sequence could be found, false if end of alignment was * reached @@ -348,9 +349,8 @@ public class Finder implements FinderI * @param ignoreHidden * @return */ - protected boolean findNextMatch(String searchString, - Regex searchPattern, boolean matchDescription, - boolean ignoreHidden) + protected boolean findNextMatch(String searchString, Regex searchPattern, + boolean matchDescription, boolean ignoreHidden) { if (residueIndex < 0) { @@ -358,8 +358,7 @@ public class Finder implements FinderI * at start of sequence; try find by residue number, in sequence id, * or (optionally) in sequence description */ - if (doNonMotifSearches(searchString, searchPattern, - matchDescription)) + if (doNonMotifSearches(searchString, searchPattern, matchDescription)) { return true; } @@ -412,14 +411,14 @@ public class Finder implements FinderI */ int offset = searchPattern.matchedFrom(); int matchStartPosition = this.searchedSequenceStartPosition + offset; - int matchEndPosition = matchStartPosition - + searchPattern.charsMatched() - 1; + int matchEndPosition = matchStartPosition + searchPattern.charsMatched() + - 1; /* * update residueIndex to next position after the start of the match * (findIndex returns a value base 1, columnIndex is held base 0) */ - residueIndex = searchPattern.matchedFrom()+1; + residueIndex = searchPattern.matchedFrom() + 1; /* * return false if the match is entirely in a hidden region @@ -447,9 +446,9 @@ public class Finder implements FinderI } /** - * Adds one match to the stored list. If hidden residues are being skipped, then - * the match may need to be split into contiguous positions of the sequence (so - * it does not include skipped residues). + * Adds one match to the stored list. If hidden residues are being skipped, + * then the match may need to be split into contiguous positions of the + * sequence (so it does not include skipped residues). * * @param seq * @param matchStartPosition @@ -552,10 +551,12 @@ public class Finder implements FinderI * @param searchPattern * @return */ - protected boolean searchSequenceDescription(SequenceI seq, Regex searchPattern) + protected boolean searchSequenceDescription(SequenceI seq, + Regex searchPattern) { String desc = seq.getDescription(); - if (desc != null && searchPattern.search(desc) && !idMatches.contains(seq)) + if (desc != null && searchPattern.search(desc) + && !idMatches.contains(seq)) { idMatches.add(seq); return true; @@ -584,7 +585,8 @@ public class Finder implements FinderI /** * If the residue position is valid for the sequence, and in a visible column, - * adds the position to the search results and returns true, else answers false. + * adds the position to the search results and returns true, else answers + * false. * * @param seq * @param resNo @@ -617,7 +619,8 @@ public class Finder implements FinderI return true; } int col = seq.findIndex(res); // base 1 - return viewport.getAlignment().getHiddenColumns().isVisible(col - 1); // base 0 + return viewport.getAlignment().getHiddenColumns().isVisible(col - 1); // base + // 0 } @Override diff --git a/src/jalview/analysis/GeneticCodes.java b/src/jalview/analysis/GeneticCodes.java index a2ecdca..133cb3a 100644 --- a/src/jalview/analysis/GeneticCodes.java +++ b/src/jalview/analysis/GeneticCodes.java @@ -161,9 +161,8 @@ public final class GeneticCodes } } catch (IOException | NullPointerException e) { - Console.error( - "Error reading genetic codes data file " + fileName + ": " - + e.getMessage()); + Console.error("Error reading genetic codes data file " + fileName + + ": " + e.getMessage()); } if (codeTables.isEmpty()) { @@ -204,8 +203,8 @@ public final class GeneticCodes String[] tokens = line.split("\\t"); if (tokens.length == 2) { - ambiguityCodes.put(tokens[0].toUpperCase(Locale.ROOT), - tokens[1].toUpperCase(Locale.ROOT)); + ambiguityCodes.put(tokens[0].toUpperCase(Locale.ROOT), + tokens[1].toUpperCase(Locale.ROOT)); } else { @@ -216,9 +215,8 @@ public final class GeneticCodes } } catch (IOException e) { - Console.error( - "Error reading nucleotide ambiguity codes data file: " - + e.getMessage()); + Console.error("Error reading nucleotide ambiguity codes data file: " + + e.getMessage()); } } diff --git a/src/jalview/analysis/PCA.java b/src/jalview/analysis/PCA.java index 4a3cfec..5cc81a8 100755 --- a/src/jalview/analysis/PCA.java +++ b/src/jalview/analysis/PCA.java @@ -60,7 +60,8 @@ public class PCA implements Runnable * @param sm * @param options */ - public PCA(AlignmentView sequences, ScoreModelI sm, SimilarityParamsI options) + public PCA(AlignmentView sequences, ScoreModelI sm, + SimilarityParamsI options) { this.seqs = sequences; this.scoreModel = sm; @@ -164,13 +165,13 @@ public class PCA implements Runnable sb.append("PCA calculation using ").append(scoreModel.getName()) .append(" sequence similarity matrix\n========\n\n"); PrintStream ps = wrapOutputBuffer(sb); - + /* * pairwise similarity scores */ sb.append(" --- OrigT * Orig ---- \n"); pairwiseScores.print(ps, "%8.2f"); - + /* * tridiagonal matrix, with D and E vectors */ @@ -181,7 +182,7 @@ public class PCA implements Runnable sb.append("--- E vector ---\n"); tridiagonal.printE(ps, "%15.4e"); ps.println(); - + /* * eigenvalues matrix, with D vector */ @@ -190,7 +191,7 @@ public class PCA implements Runnable sb.append(" --- Eigenvalues ---\n"); eigenMatrix.printD(ps, "%15.4e"); ps.println(); - + return sb.toString(); } diff --git a/src/jalview/analysis/Rna.java b/src/jalview/analysis/Rna.java index e5cda93..9649240 100644 --- a/src/jalview/analysis/Rna.java +++ b/src/jalview/analysis/Rna.java @@ -198,10 +198,6 @@ public class Rna return pairs; } - - - - /** * Function to get the end position corresponding to a given start position * diff --git a/src/jalview/analysis/SequenceIdMatcher.java b/src/jalview/analysis/SequenceIdMatcher.java index 3ec162d..e3a9b29 100755 --- a/src/jalview/analysis/SequenceIdMatcher.java +++ b/src/jalview/analysis/SequenceIdMatcher.java @@ -76,7 +76,7 @@ public class SequenceIdMatcher dbseq = dbseq.getDatasetSequence(); } // add in any interesting identifiers - List dbr = dbseq.getDBRefs(); + List dbr = dbseq.getDBRefs(); if (dbr != null) { SeqIdName sid = null; diff --git a/src/jalview/analysis/scoremodels/FeatureDistanceModel.java b/src/jalview/analysis/scoremodels/FeatureDistanceModel.java index 0aa77fa..9c2f6d1 100644 --- a/src/jalview/analysis/scoremodels/FeatureDistanceModel.java +++ b/src/jalview/analysis/scoremodels/FeatureDistanceModel.java @@ -201,8 +201,8 @@ public class FeatureDistanceModel extends DistanceScoreModel * position is not a gap */ Set types = new HashSet<>(); - List sfs = fr.findFeaturesAtResidue( - seq.getRefSeq(), spos, spos); + List sfs = fr + .findFeaturesAtResidue(seq.getRefSeq(), spos, spos); for (SequenceFeature sf : sfs) { types.add(sf.getType()); diff --git a/src/jalview/api/AlignViewportI.java b/src/jalview/api/AlignViewportI.java index 93a5101..d15c5fb 100644 --- a/src/jalview/api/AlignViewportI.java +++ b/src/jalview/api/AlignViewportI.java @@ -546,9 +546,9 @@ public interface AlignViewportI extends ViewStyleI * regions of the alignment * * @param selectedRegionOnly - * if true, and the view has a selection region, - * then only the intersection of visible columns - * with the selection region is returned + * if true, and the view has a selection region, then only the + * intersection of visible columns with the selection region is + * returned * @return */ Iterator getViewAsVisibleContigs(boolean selectedRegionOnly); diff --git a/src/jalview/api/FeatureColourI.java b/src/jalview/api/FeatureColourI.java index 98a37c4..1272fa0 100644 --- a/src/jalview/api/FeatureColourI.java +++ b/src/jalview/api/FeatureColourI.java @@ -206,8 +206,8 @@ public interface FeatureColourI boolean isOutwithThreshold(SequenceFeature sf); /** - * Answers a human-readable text description of the colour, suitable for display - * as a tooltip, possibly internationalised for the user's locale. + * Answers a human-readable text description of the colour, suitable for + * display as a tooltip, possibly internationalised for the user's locale. * * @return */ diff --git a/src/jalview/api/FeatureRenderer.java b/src/jalview/api/FeatureRenderer.java index fff3b38..5430303 100644 --- a/src/jalview/api/FeatureRenderer.java +++ b/src/jalview/api/FeatureRenderer.java @@ -151,15 +151,16 @@ public interface FeatureRenderer /** * Returns visible features at the specified aligned column on the given - * sequence. Non-positional features are not included. If the column has a gap, - * then enclosing features are included (but not contact features). + * sequence. Non-positional features are not included. If the column has a + * gap, then enclosing features are included (but not contact features). * * @param sequence * @param column * aligned column position (1..) * @return */ - List findFeaturesAtColumn(SequenceI sequence, int column); + List findFeaturesAtColumn(SequenceI sequence, + int column); /** * Returns features at the specified residue positions on the given sequence. @@ -287,16 +288,17 @@ public interface FeatureRenderer /** * Answers a bean containing a mapping, and a list of visible features in this - * alignment at a position (or range) which is mappable from the given sequence - * residue position in a mapped alignment. Features are returned in render order - * of feature type (on top last), with order within feature type undefined. If - * no features or mapping are found, answers null. + * alignment at a position (or range) which is mappable from the given + * sequence residue position in a mapped alignment. Features are returned in + * render order of feature type (on top last), with order within feature type + * undefined. If no features or mapping are found, answers null. * * @param sequence * @param pos * @return */ - MappedFeatures findComplementFeaturesAtResidue(SequenceI sequence, int pos); + MappedFeatures findComplementFeaturesAtResidue(SequenceI sequence, + int pos); /** * Sends a message to let any registered parties know that something about diff --git a/src/jalview/api/FinderI.java b/src/jalview/api/FinderI.java index 8f6232e..1d57d81 100644 --- a/src/jalview/api/FinderI.java +++ b/src/jalview/api/FinderI.java @@ -34,10 +34,10 @@ public interface FinderI /** * Performs a find for the given search string (interpreted as a regular * expression). Search may optionally be case-sensitive, and may optionally - * including match in sequence description (sequence id is always searched). If - * the viewport has an active selection, then the find is restricted to the - * selection region. Sequences matched by id or description can be retrieved by - * getIdMatches(), and matched residue patterns by getSearchResults(). + * including match in sequence description (sequence id is always searched). + * If the viewport has an active selection, then the find is restricted to the + * selection region. Sequences matched by id or description can be retrieved + * by getIdMatches(), and matched residue patterns by getSearchResults(). *

* If {@code ignoreHidden} is true, then any residues in hidden columns are * ignored (skipped) when matching, so for example pattern {@code KRT} would @@ -59,14 +59,14 @@ public interface FinderI * Finds the next match for the given search string (interpreted as a regular * expression), starting from the position after the last match found. Search * may optionally be case-sensitive, and may optionally including match in - * sequence description (sequence id is always searched). If the viewport has an - * active selection, then the find is restricted to the selection region. + * sequence description (sequence id is always searched). If the viewport has + * an active selection, then the find is restricted to the selection region. * Sequences matched by id or description can be retrieved by getIdMatches(), * and matched residue patterns by getSearchResults(). *

- * If {@code ignoreHidden} is true, any hidden residues are skipped (matches may - * span them). If false, they are included for matching purposes. In either - * cases, entirely hidden matches are not returned. + * If {@code ignoreHidden} is true, any hidden residues are skipped (matches + * may span them). If false, they are included for matching purposes. In + * either cases, entirely hidden matches are not returned. * * @param theSearchString * @param caseSensitive diff --git a/src/jalview/api/SplitContainerI.java b/src/jalview/api/SplitContainerI.java index 6b037f5..f6660f4 100644 --- a/src/jalview/api/SplitContainerI.java +++ b/src/jalview/api/SplitContainerI.java @@ -60,8 +60,8 @@ public interface SplitContainerI * get the 'other' alignFrame in the SplitFrame * * @param alignFrame - * @return the complement alignFrame - or null if alignFrame wasn't held by this - * frame + * @return the complement alignFrame - or null if alignFrame wasn't held by + * this frame */ AlignViewControllerGuiI getComplementAlignFrame( AlignViewControllerGuiI alignFrame); @@ -72,17 +72,15 @@ public interface SplitContainerI * @param featureSettings * @return */ - void addFeatureSettingsUI( - FeatureSettingsControllerGuiI featureSettings); + void addFeatureSettingsUI(FeatureSettingsControllerGuiI featureSettings); /** * Request to close all feature settings originating from a particular panel. * * @param featureSettings * @param closeContainingFrame - * - if false then the tab containing the feature - * settings will be 'reset' ready for a new - * feature settings + * - if false then the tab containing the feature settings will be + * 'reset' ready for a new feature settings */ void closeFeatureSettings(FeatureSettingsControllerI featureSettings, boolean closeContainingFrame); diff --git a/src/jalview/appletgui/APopupMenu.java b/src/jalview/appletgui/APopupMenu.java index 80db11d..b860a36 100644 --- a/src/jalview/appletgui/APopupMenu.java +++ b/src/jalview/appletgui/APopupMenu.java @@ -835,8 +835,8 @@ public class APopupMenu extends java.awt.PopupMenu if (start <= end) { seqs.add(sg.getSequenceAt(i)); - features.add(new SequenceFeature(null, null, start, end, - "Jalview")); + features.add( + new SequenceFeature(null, null, start, end, "Jalview")); } } @@ -945,8 +945,8 @@ public class APopupMenu extends java.awt.PopupMenu } else { - new mc_view.AppletPDBViewer(entry, new SequenceI[] { seq }, null, ap, - DataSourceType.URL); + new mc_view.AppletPDBViewer(entry, new SequenceI[] { seq }, null, + ap, DataSourceType.URL); } } @@ -1072,8 +1072,8 @@ public class APopupMenu extends java.awt.PopupMenu hydrophobicityColour .setName(JalviewColourScheme.Hydrophobic.toString()); hydrophobicityColour.addItemListener(this); - helixColour.setLabel(MessageManager - .getString("label.colourScheme_helixpropensity")); + helixColour.setLabel( + MessageManager.getString("label.colourScheme_helixpropensity")); helixColour.setName(JalviewColourScheme.Helix.toString()); helixColour.addItemListener(this); strandColour.setLabel(MessageManager diff --git a/src/jalview/appletgui/AlignFrame.java b/src/jalview/appletgui/AlignFrame.java index b6f8929..2a2fc70 100644 --- a/src/jalview/appletgui/AlignFrame.java +++ b/src/jalview/appletgui/AlignFrame.java @@ -576,8 +576,8 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, case KeyEvent.VK_F2: viewport.cursorMode = !viewport.cursorMode; - setStatus(MessageManager - .formatMessage("label.keyboard_editing_mode", new String[] + setStatus(MessageManager.formatMessage("label.keyboard_editing_mode", + new String[] { (viewport.cursorMode ? "on" : "off") })); if (viewport.cursorMode) { @@ -1453,9 +1453,9 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, } else { - features = formatter.printGffFormat(viewport.getAlignment() - .getSequencesArray(), alignPanel.getFeatureRenderer(), true, - false); + features = formatter.printGffFormat( + viewport.getAlignment().getSequencesArray(), + alignPanel.getFeatureRenderer(), true, false); } if (displayTextbox) @@ -1584,8 +1584,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, catch (java.net.MalformedURLException ex) { url = viewport.applet.getCodeBase() + url; - } - catch (UnsupportedEncodingException ex) + } catch (UnsupportedEncodingException ex) { System.err.println( "WARNING = IMPLEMENTATION ERROR - UNSUPPORTED ENCODING EXCEPTION FOR " @@ -2358,8 +2357,8 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, column, al); } - setStatus(MessageManager - .formatMessage("label.removed_columns", new String[] + setStatus(MessageManager.formatMessage("label.removed_columns", + new String[] { Integer.valueOf(trimRegion.getSize()).toString() })); addHistoryItem(trimRegion); @@ -2402,8 +2401,8 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, addHistoryItem(removeGapCols); - setStatus(MessageManager - .formatMessage("label.removed_empty_columns", new String[] + setStatus(MessageManager.formatMessage("label.removed_empty_columns", + new String[] { Integer.valueOf(removeGapCols.getSize()).toString() })); // This is to maintain viewport position on first residue @@ -3521,8 +3520,8 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, hydrophobicityColour.setLabel( MessageManager.getString("label.colourScheme_hydrophobic")); hydrophobicityColour.addActionListener(this); - helixColour.setLabel(MessageManager - .getString("label.colourScheme_helixpropensity")); + helixColour.setLabel( + MessageManager.getString("label.colourScheme_helixpropensity")); helixColour.addActionListener(this); strandColour.setLabel(MessageManager .getString("label.colourScheme_strandpropensity")); @@ -4152,7 +4151,8 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, { // register the association(s) and quit, don't create any windows. if (StructureSelectionManager.getStructureSelectionManager(applet) - .setMapping(seqs, chains, pdb.getFile(), protocol, null) == null) + .setMapping(seqs, chains, pdb.getFile(), protocol, + null) == null) { System.err.println("Failed to map " + pdb.getFile() + " (" + protocol + ") to any sequences"); diff --git a/src/jalview/appletgui/AlignViewport.java b/src/jalview/appletgui/AlignViewport.java index 0324d8c..d64cd75 100644 --- a/src/jalview/appletgui/AlignViewport.java +++ b/src/jalview/appletgui/AlignViewport.java @@ -192,9 +192,8 @@ public class AlignViewport extends AlignmentViewport if (colour != null) { - residueShading = new ResidueShader( - ColourSchemeProperty.getColourScheme(this, alignment, - colour)); + residueShading = new ResidueShader(ColourSchemeProperty + .getColourScheme(this, alignment, colour)); if (residueShading != null) { residueShading.setConsensus(hconsensus); @@ -392,10 +391,10 @@ public class AlignViewport extends AlignmentViewport } /** - * Applies the supplied feature settings descriptor to currently known features. - * This supports an 'initial configuration' of feature colouring based on a - * preset or user favourite. This may then be modified in the usual way using - * the Feature Settings dialogue. NOT IMPLEMENTED FOR APPLET + * Applies the supplied feature settings descriptor to currently known + * features. This supports an 'initial configuration' of feature colouring + * based on a preset or user favourite. This may then be modified in the usual + * way using the Feature Settings dialogue. NOT IMPLEMENTED FOR APPLET * * @param featureSettings */ @@ -406,10 +405,10 @@ public class AlignViewport extends AlignmentViewport } /** - * Merges the supplied feature settings descriptor with existing feature styles. - * This supports an 'initial configuration' of feature colouring based on a - * preset or user favourite. This may then be modified in the usual way using - * the Feature Settings dialogue. NOT IMPLEMENTED FOR APPLET + * Merges the supplied feature settings descriptor with existing feature + * styles. This supports an 'initial configuration' of feature colouring based + * on a preset or user favourite. This may then be modified in the usual way + * using the Feature Settings dialogue. NOT IMPLEMENTED FOR APPLET * * @param featureSettings */ diff --git a/src/jalview/appletgui/AlignmentPanel.java b/src/jalview/appletgui/AlignmentPanel.java index 0ed54e7..fd75296 100644 --- a/src/jalview/appletgui/AlignmentPanel.java +++ b/src/jalview/appletgui/AlignmentPanel.java @@ -416,7 +416,7 @@ public class AlignmentPanel extends Panel public boolean scrollTo(int ostart, int end, int seqIndex, boolean scrollToNearest, boolean redrawOverview) { - int startv, endv, starts, ends;//, width; + int startv, endv, starts, ends;// , width; int start = -1; if (av.hasHiddenColumns()) diff --git a/src/jalview/appletgui/AnnotationPanel.java b/src/jalview/appletgui/AnnotationPanel.java index 3dae998..34e8b44 100755 --- a/src/jalview/appletgui/AnnotationPanel.java +++ b/src/jalview/appletgui/AnnotationPanel.java @@ -99,14 +99,14 @@ public class AnnotationPanel extends Panel public static int GRAPH_HEIGHT = 40; -// boolean MAC = false; + // boolean MAC = false; public final AnnotationRenderer renderer; public AnnotationPanel(AlignmentPanel ap) { new jalview.util.Platform(); -// MAC = Platform.isAMac(); + // MAC = Platform.isAMac(); this.ap = ap; av = ap.av; setLayout(null); diff --git a/src/jalview/appletgui/AppletJmol.java b/src/jalview/appletgui/AppletJmol.java index 380ec25..b0722c0 100644 --- a/src/jalview/appletgui/AppletJmol.java +++ b/src/jalview/appletgui/AppletJmol.java @@ -135,7 +135,7 @@ public class AppletJmol extends EmbmenuFrame implements AlignmentPanel ap; List _aps = new ArrayList<>(); // remove? never - // added to + // added to String fileLoadingError; diff --git a/src/jalview/appletgui/FeatureColourChooser.java b/src/jalview/appletgui/FeatureColourChooser.java index 0d70660..30733ef 100644 --- a/src/jalview/appletgui/FeatureColourChooser.java +++ b/src/jalview/appletgui/FeatureColourChooser.java @@ -171,9 +171,9 @@ public class FeatureColourChooser extends Panel implements ActionListener, slider.addAdjustmentListener(this); slider.addMouseListener(this); owner = (af != null) ? af : fs.frame; - frame = new JVDialog(owner, MessageManager.formatMessage( - "label.variable_color_for", new String[] { type }), true, 480, - 248); + frame = new JVDialog(owner, MessageManager + .formatMessage("label.variable_color_for", new String[] + { type }), true, 480, 248); frame.setMainPanel(this); validate(); frame.setVisible(true); diff --git a/src/jalview/appletgui/FeatureRenderer.java b/src/jalview/appletgui/FeatureRenderer.java index df407d6..5f5e8e0 100644 --- a/src/jalview/appletgui/FeatureRenderer.java +++ b/src/jalview/appletgui/FeatureRenderer.java @@ -428,7 +428,7 @@ public class FeatureRenderer newEnd = Integer.parseInt(end.getText()); } catch (NumberFormatException ex) { - // + // } /* @@ -442,8 +442,8 @@ public class FeatureRenderer ffile.parseDescriptionHTML(newSf, false); // amend features dialog only updates one sequence at a time sequences.get(0).addSequenceFeature(newSf); - boolean typeOrGroupChanged = (!featureType.equals(newSf.getType()) || !featureGroup - .equals(newSf.getFeatureGroup())); + boolean typeOrGroupChanged = (!featureType.equals(newSf.getType()) + || !featureGroup.equals(newSf.getFeatureGroup())); ffile.parseDescriptionHTML(sf, false); if (typeOrGroupChanged) diff --git a/src/jalview/appletgui/Finder.java b/src/jalview/appletgui/Finder.java index a78e41c..31c914a 100644 --- a/src/jalview/appletgui/Finder.java +++ b/src/jalview/appletgui/Finder.java @@ -208,7 +208,8 @@ public class Finder extends Panel implements ActionListener { if (doFindAll) { - String message = (idMatches.size() > 0) ? "" + idMatches.size() + " IDs" + String message = (idMatches.size() > 0) + ? "" + idMatches.size() + " IDs" : ""; if (idMatches.size() > 0 && searchResults != null && searchResults.getCount() > 0) diff --git a/src/jalview/appletgui/OverviewPanel.java b/src/jalview/appletgui/OverviewPanel.java index 9cbdd36..71b3ac7 100755 --- a/src/jalview/appletgui/OverviewPanel.java +++ b/src/jalview/appletgui/OverviewPanel.java @@ -133,9 +133,8 @@ public class OverviewPanel extends Panel implements Runnable, } else { - this.getParent() - .setCursor( - Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR)); + this.getParent().setCursor( + Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR)); } } @@ -156,8 +155,8 @@ public class OverviewPanel extends Panel implements Runnable, // (wait to see if it's a drag instead) // otherwise update the viewport if (!od.isPositionInBox(evt.getX(), evt.getY())) - { - draggingBox = false; + { + draggingBox = false; // display drag cursor at mouse position setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR)); @@ -187,32 +186,32 @@ public class OverviewPanel extends Panel implements Runnable, @Override public void mouseDragged(MouseEvent evt) { - if (Platform.isWinRightButton(evt)) + if (Platform.isWinRightButton(evt)) { - showPopupMenu(evt); - return; + showPopupMenu(evt); + return; } if (SwingUtilities.isRightMouseButton(evt)) - { - return; + { + return; + } + + if (draggingBox) + { + // set the mouse position as a fixed point in the box + // and drag relative to that position + od.adjustViewportFromMouse(evt.getX(), evt.getY(), + av.getAlignment().getHiddenSequences(), + av.getAlignment().getHiddenColumns()); + } + else + { + od.updateViewportFromMouse(evt.getX(), evt.getY(), + av.getAlignment().getHiddenSequences(), + av.getAlignment().getHiddenColumns()); } - - if (draggingBox) - { - // set the mouse position as a fixed point in the box - // and drag relative to that position - od.adjustViewportFromMouse(evt.getX(), evt.getY(), - av.getAlignment().getHiddenSequences(), - av.getAlignment().getHiddenColumns()); - } - else - { - od.updateViewportFromMouse(evt.getX(), evt.getY(), - av.getAlignment().getHiddenSequences(), - av.getAlignment().getHiddenColumns()); - } - ap.paintAlignment(false, false); + ap.paintAlignment(false, false); } /** diff --git a/src/jalview/appletgui/RotatableCanvas.java b/src/jalview/appletgui/RotatableCanvas.java index 34f8ea5..a870ca4 100755 --- a/src/jalview/appletgui/RotatableCanvas.java +++ b/src/jalview/appletgui/RotatableCanvas.java @@ -331,8 +331,10 @@ public class RotatableCanvas extends Panel implements MouseListener, for (int i = 0; i < 3; i++) { g.drawLine(getSize().width / 2, getSize().height / 2, - (int) (axisEndPoints[i].x * scale * max[0] + getSize().width / 2), - (int) (axisEndPoints[i].y * scale * max[1] + getSize().height / 2)); + (int) (axisEndPoints[i].x * scale * max[0] + + getSize().width / 2), + (int) (axisEndPoints[i].y * scale * max[1] + + getSize().height / 2)); } } @@ -353,8 +355,7 @@ public class RotatableCanvas extends Panel implements MouseListener, sequenceColour == Color.black ? Color.white : sequenceColour); if (av.getSelectionGroup() != null) { - if (av.getSelectionGroup().getSequences(null) - .contains(sequence)) + if (av.getSelectionGroup().getSequences(null).contains(sequence)) { g.setColor(Color.gray); } @@ -549,8 +550,7 @@ public class RotatableCanvas extends Panel implements MouseListener, { if (av != null) { - if (!av.getSelectionGroup().getSequences(null) - .contains(sequence)) + if (!av.getSelectionGroup().getSequences(null).contains(sequence)) { av.getSelectionGroup().addSequence(sequence, true); } @@ -579,10 +579,8 @@ public class RotatableCanvas extends Panel implements MouseListener, { SequencePoint sp = points.get(i); - int px = (int) ((sp.coord.x - centre.x) * scale) - + halfwidth; - int py = (int) ((sp.coord.y - centre.y) * scale) - + halfheight; + int px = (int) ((sp.coord.x - centre.x) * scale) + halfwidth; + int py = (int) ((sp.coord.y - centre.y) * scale) + halfheight; if (Math.abs(px - x) < 3 && Math.abs(py - y) < 3) { @@ -627,12 +625,12 @@ public class RotatableCanvas extends Panel implements MouseListener, { return; } - + /* * get the identity transformation... */ RotatableMatrix rotmat = new RotatableMatrix(); - + /* * rotate around the X axis for change in Y * (mouse movement up/down); note we are equating a @@ -642,7 +640,7 @@ public class RotatableCanvas extends Panel implements MouseListener, { rotmat.rotate(y, Axis.X); } - + /* * rotate around the Y axis for change in X * (mouse movement left/right) @@ -651,7 +649,7 @@ public class RotatableCanvas extends Panel implements MouseListener, { rotmat.rotate(x, Axis.Y); } - + /* * apply the composite transformation to sequence points */ @@ -666,7 +664,7 @@ public class RotatableCanvas extends Panel implements MouseListener, // Now translate back again sp.translate(centre.x, centre.y, centre.z); } - + /* * rotate the x/y/z axis positions */ diff --git a/src/jalview/appletgui/ScalePanel.java b/src/jalview/appletgui/ScalePanel.java index d3f4a69..ccb6d94 100755 --- a/src/jalview/appletgui/ScalePanel.java +++ b/src/jalview/appletgui/ScalePanel.java @@ -174,7 +174,8 @@ public class ScalePanel extends Panel }); pop.add(item); - if (av.getAlignment().getHiddenColumns().hasMultiHiddenColumnRegions()) + if (av.getAlignment().getHiddenColumns() + .hasMultiHiddenColumnRegions()) { item = new MenuItem(MessageManager.getString("action.reveal_all")); item.addActionListener(new ActionListener() @@ -445,9 +446,11 @@ public class ScalePanel extends Panel gg.fillPolygon( new int[] - { -1 + res * avCharWidth - avcharHeight / 4, -1 + res * avCharWidth + avcharHeight / 4, - -1 + res * avCharWidth }, new int[] - { y, y, y + 2 * yOf }, 3); + { -1 + res * avCharWidth - avcharHeight / 4, + -1 + res * avCharWidth + avcharHeight / 4, + -1 + res * avCharWidth }, + new int[] + { y, y, y + 2 * yOf }, 3); } } } diff --git a/src/jalview/appletgui/SeqCanvas.java b/src/jalview/appletgui/SeqCanvas.java index f055776..3b79f12 100755 --- a/src/jalview/appletgui/SeqCanvas.java +++ b/src/jalview/appletgui/SeqCanvas.java @@ -412,65 +412,65 @@ public class SeqCanvas extends Panel implements ViewportListenerI int canvasHeight, int startRes) { AlignmentI al = av.getAlignment(); - + FontMetrics fm = getFontMetrics(av.getFont()); - + LABEL_EAST = 0; LABEL_WEST = 0; - + if (av.getScaleRightWrapped()) { LABEL_EAST = fm.stringWidth(getMask()); } - + if (av.getScaleLeftWrapped()) { LABEL_WEST = fm.stringWidth(getMask()); } - + int hgap = avcharHeight; if (av.getScaleAboveWrapped()) { hgap += avcharHeight; } - + int cWidth = (canvasWidth - LABEL_EAST - LABEL_WEST) / avcharWidth; int cHeight = av.getAlignment().getHeight() * avcharHeight; - + av.setWrappedWidth(cWidth); - + av.getRanges().setViewportStartAndWidth(startRes, cWidth); - + int endx; int ypos = hgap; - + int maxwidth = av.getAlignment().getVisibleWidth(); - + while ((ypos <= canvasHeight) && (startRes < maxwidth)) { endx = startRes + cWidth - 1; - + if (endx > maxwidth) { endx = maxwidth; } - + g.setColor(Color.black); - + if (av.getScaleLeftWrapped()) { drawWestScale(g, startRes, endx, ypos); } - + if (av.getScaleRightWrapped()) { g.translate(canvasWidth - LABEL_EAST, 0); drawEastScale(g, startRes, endx, ypos); g.translate(-(canvasWidth - LABEL_EAST), 0); } - + g.translate(LABEL_WEST, 0); - + if (av.getScaleAboveWrapped()) { drawNorthScale(g, startRes, endx, ypos); @@ -487,20 +487,24 @@ public class SeqCanvas extends Panel implements ViewportListenerI res = it.next() - startRes; gg.fillPolygon( new int[] - { res * avcharWidth - avcharHeight / 4, res * avcharWidth + avcharHeight / 4, res * avcharWidth }, + { res * avcharWidth - avcharHeight / 4, + res * avcharWidth + avcharHeight / 4, + res * avcharWidth }, new int[] - { ypos - (avcharHeight / 2), ypos - (avcharHeight / 2), ypos - (avcharHeight / 2) + 8 }, 3); + { ypos - (avcharHeight / 2), ypos - (avcharHeight / 2), + ypos - (avcharHeight / 2) + 8 }, + 3); } } - + if (g.getClip() == null) { g.setClip(0, 0, cWidth * avcharWidth, canvasHeight); } - + drawPanel(g, startRes, endx, 0, al.getHeight() - 1, ypos); g.setClip(null); - + if (av.isShowAnnotation()) { g.translate(0, cHeight + ypos + 4); @@ -508,17 +512,17 @@ public class SeqCanvas extends Panel implements ViewportListenerI { annotations = new AnnotationPanel(av); } - + annotations.drawComponent(g, startRes, endx + 1); g.translate(0, -cHeight - ypos - 4); } g.translate(-LABEL_WEST, 0); - + ypos += cHeight + getAnnotationHeight() + hgap; - + startRes += cWidth; } - + } AnnotationPanel annotations; diff --git a/src/jalview/appletgui/SeqPanel.java b/src/jalview/appletgui/SeqPanel.java index 776e9ad..70366e4 100644 --- a/src/jalview/appletgui/SeqPanel.java +++ b/src/jalview/appletgui/SeqPanel.java @@ -907,7 +907,8 @@ public class SeqPanel extends Panel implements MouseMotionListener, */ List findFeaturesAtColumn(SequenceI sequence, int column) { - return seqCanvas.getFeatureRenderer().findFeaturesAtColumn(sequence, column); + return seqCanvas.getFeatureRenderer().findFeaturesAtColumn(sequence, + column); } Tooltip tooltip; @@ -1195,9 +1196,9 @@ public class SeqPanel extends Panel implements MouseMotionListener, { if (sg.getSize() == av.getAlignment().getHeight()) { - if ((av.hasHiddenColumns() && startres < av.getAlignment() - .getHiddenColumns() - .getNextHiddenBoundary(false, startres))) + if ((av.hasHiddenColumns() + && startres < av.getAlignment().getHiddenColumns() + .getNextHiddenBoundary(false, startres))) { endEditing(); return; diff --git a/src/jalview/appletgui/SequenceRenderer.java b/src/jalview/appletgui/SequenceRenderer.java index e55f2a5..eab6e39 100755 --- a/src/jalview/appletgui/SequenceRenderer.java +++ b/src/jalview/appletgui/SequenceRenderer.java @@ -85,8 +85,7 @@ public class SequenceRenderer implements jalview.api.SequenceRenderer // TODO replace 8 or so code duplications with calls to this method // (refactored as needed) return resColourFinder.getResidueColour(av.getShowBoxes(), - av.getResidueShading(), - allGroups, seq, position, finder); + av.getResidueShading(), allGroups, seq, position, finder); } public Color findSequenceColour(SequenceI seq, int i) @@ -137,8 +136,7 @@ public class SequenceRenderer implements jalview.api.SequenceRenderer if (currentSequenceGroup.getDisplayBoxes()) { resBoxColour = resColourFinder.getBoxColour( - currentSequenceGroup.getGroupColourScheme(), seq, - i); + currentSequenceGroup.getGroupColourScheme(), seq, i); } } else if (av.getShowBoxes()) @@ -325,8 +323,8 @@ public class SequenceRenderer implements jalview.api.SequenceRenderer return sequenceChar; } - public void drawHighlightedText(SequenceI seq, int start, int end, - int x1, int y1) + public void drawHighlightedText(SequenceI seq, int start, int end, int x1, + int y1) { int avCharWidth = av.getCharWidth(), avCharHeight = av.getCharHeight(); int pady = avCharHeight / 5; diff --git a/src/jalview/appletgui/TreeCanvas.java b/src/jalview/appletgui/TreeCanvas.java index cb26fb5..2e5f938 100755 --- a/src/jalview/appletgui/TreeCanvas.java +++ b/src/jalview/appletgui/TreeCanvas.java @@ -659,7 +659,7 @@ public class TreeCanvas extends Panel { cs = ColourSchemeProperty.getColourScheme(av, sg, ColourSchemeProperty - .getColourName(av.getGlobalColourScheme())); + .getColourName(av.getGlobalColourScheme())); } // cs is null if shading is an annotationColourGradient // if (cs != null) diff --git a/src/jalview/bin/Cache.java b/src/jalview/bin/Cache.java index e10c9eb..ac8a183 100755 --- a/src/jalview/bin/Cache.java +++ b/src/jalview/bin/Cache.java @@ -808,11 +808,13 @@ public class Cache if (jalview.jbgui.GDesktop.class.getClassLoader() .loadClass("uk.ac.vamsas.client.VorbaId") != null) { - Console.debug("Found Vamsas Classes (uk.ac..vamsas.client.VorbaId can be loaded)"); + Console.debug( + "Found Vamsas Classes (uk.ac..vamsas.client.VorbaId can be loaded)"); vamsasJarsArePresent = 1; JLoggerLog4j lvclient = JLoggerLog4j.getLogger("uk.ac.vamsas", Console.getCachedLogLevel("logs.Vamsas.Level")); - JLoggerLog4j.addAppender(lvclient, Console.log, JALVIEW_LOGGER_NAME); + JLoggerLog4j.addAppender(lvclient, Console.log, + JALVIEW_LOGGER_NAME); // Tell the user that debug is enabled lvclient.debug(ChannelProperties.getProperty("app_name") + " Vamsas Client Debugging Output Follows."); @@ -845,11 +847,13 @@ public class Cache if (Cache.class.getClassLoader() .loadClass("groovy.lang.GroovyObject") != null) { - Console.debug("Found Groovy (groovy.lang.GroovyObject can be loaded)"); + Console.debug( + "Found Groovy (groovy.lang.GroovyObject can be loaded)"); groovyJarsArePresent = 1; JLoggerLog4j lgclient = JLoggerLog4j.getLogger("groovy", Console.getCachedLogLevel("logs.Groovy.Level")); - JLoggerLog4j.addAppender(lgclient, Console.log, JALVIEW_LOGGER_NAME); + JLoggerLog4j.addAppender(lgclient, Console.log, + JALVIEW_LOGGER_NAME); // Tell the user that debug is enabled lgclient.debug(ChannelProperties.getProperty("app_name") + " Groovy Client Debugging Output Follows."); @@ -895,7 +899,8 @@ public class Cache .loadClass("com.boxysystems.jgoogleanalytics.FocusPoint"); } catch (Exception e) { - Console.debug("com.boxysystems.jgoogleanalytics package is not present - tracking not enabled."); + Console.debug( + "com.boxysystems.jgoogleanalytics package is not present - tracking not enabled."); tracker = null; jgoogleanalyticstracker = null; trackerfocus = null; @@ -938,17 +943,22 @@ public class Cache { if (re != null) { - Console.debug("Caught runtime exception in googletracker init:", re); + Console.debug("Caught runtime exception in googletracker init:", + re); } if (ex != null) { - Console.warn("Failed to initialise GoogleTracker for Jalview Desktop with version " - + vrs, ex); + Console.warn( + "Failed to initialise GoogleTracker for Jalview Desktop with version " + + vrs, + ex); } if (err != null) { - Console.error("Whilst initing GoogleTracker for Jalview Desktop version " - + vrs, err); + Console.error( + "Whilst initing GoogleTracker for Jalview Desktop version " + + vrs, + err); } } else @@ -975,7 +985,8 @@ public class Cache Color col = ColorUtils.parseColourString(colprop); if (col == null) { - Console.warn("Couldn't parse '" + colprop + "' as a colour for " + property); + Console.warn("Couldn't parse '" + colprop + "' as a colour for " + + property); } return (col == null) ? defcolour : col; } @@ -1355,8 +1366,10 @@ public class Cache char[] displayHttpPw = new char[httpPassword == null ? 0 : httpPassword.length]; Arrays.fill(displayHttpPw, '*'); - Console.debug("CACHE Proxy: setting new Authenticator with httpUser='" - + httpUser + "' httpPassword='" + displayHttpPw + "'"); + Console.debug( + "CACHE Proxy: setting new Authenticator with httpUser='" + + httpUser + "' httpPassword='" + displayHttpPw + + "'"); if (!Platform.isJS()) /* * * java.net.Authenticator not implemented in SwingJS yet @@ -1469,14 +1482,16 @@ public class Cache * */ { - Console.debug("AUTHENTICATOR setting default Authenticator to null"); + Console.debug( + "AUTHENTICATOR setting default Authenticator to null"); Authenticator.setDefault(null); } } // nonProxyHosts not currently configurable in Preferences - Console.debug("AUTHENTICATOR setting property 'http.nonProxyHosts' to \"" - + nonProxyHosts + "\""); + Console.debug( + "AUTHENTICATOR setting property 'http.nonProxyHosts' to \"" + + nonProxyHosts + "\""); setOrClearSystemProperty("http.nonProxyHosts", nonProxyHosts); } diff --git a/src/jalview/bin/Console.java b/src/jalview/bin/Console.java index 0b5a38a..4eb83aa 100644 --- a/src/jalview/bin/Console.java +++ b/src/jalview/bin/Console.java @@ -23,7 +23,7 @@ public class Console System.out.println(message); t.printStackTrace(); } - + } public static void info(String message) @@ -36,7 +36,7 @@ public class Console { System.out.println(message); } - + } public static void trace(String message, Throwable t) @@ -62,7 +62,7 @@ public class Console { System.out.println(message); } - + } public static void info(String message, Throwable t) @@ -76,7 +76,7 @@ public class Console System.out.println(message); t.printStackTrace(); } - + } public static void warn(String message) @@ -89,7 +89,7 @@ public class Console { System.out.println(message); } - + } public static void trace(String message) @@ -115,7 +115,7 @@ public class Console System.out.println(message); t.printStackTrace(); } - + } public static void error(String message) @@ -128,7 +128,7 @@ public class Console { System.err.println(message); } - + } public static void error(String message, Throwable t) @@ -142,7 +142,7 @@ public class Console System.err.println(message); t.printStackTrace(System.err); } - + } public static void fatal(String message) @@ -155,7 +155,7 @@ public class Console { System.err.println(message); } - + } public static void fatal(String message, Throwable t) @@ -169,7 +169,7 @@ public class Console System.err.println(message); t.printStackTrace(System.err); } - + } public static boolean isDebugEnabled() @@ -209,7 +209,7 @@ public class Console // is laxis used? Does getLogger do anything without a Logger object? // Logger laxis = Log4j.getLogger("org.apache.axis", myLevel); JLoggerLog4j.getLogger("org.apache.axis", cachedLevel); - + // The main application logger log = JLoggerLog4j.getLogger(Cache.JALVIEW_LOGGER_NAME, cachedLevel); } catch (NoClassDefFoundError e) @@ -217,7 +217,7 @@ public class Console System.err.println("Could not initialise the logger framework"); e.printStackTrace(); } - + // Test message if (log != null) { diff --git a/src/jalview/bin/HiDPISetting.java b/src/jalview/bin/HiDPISetting.java index 6219179..d787388 100644 --- a/src/jalview/bin/HiDPISetting.java +++ b/src/jalview/bin/HiDPISetting.java @@ -169,10 +169,12 @@ public class HiDPISetting int dimensionScale = 1 + (mindimension / bigScreenThreshold); // reject outrageous values -- dpiScale in particular could be mistaken - if (dpiScale > MAX_SCALE) { + if (dpiScale > MAX_SCALE) + { dpiScale = 1; } - if (dimensionScale > MAX_SCALE) { + if (dimensionScale > MAX_SCALE) + { dimensionScale = 1; } diff --git a/src/jalview/bin/JalviewJS2.java b/src/jalview/bin/JalviewJS2.java index 26110f8..a323ffa 100644 --- a/src/jalview/bin/JalviewJS2.java +++ b/src/jalview/bin/JalviewJS2.java @@ -8,7 +8,7 @@ import java.awt.event.ActionListener; import javax.swing.Timer; /** - * Entry point for JalviewJS development. + * Entry point for JalviewJS development. * * * @@ -18,7 +18,8 @@ import javax.swing.Timer; public class JalviewJS2 { - static { + static + { /** * @j2sNative * @@ -31,10 +32,10 @@ public class JalviewJS2 public static void main(String[] args) throws Exception { Jalview.main(args); - //showFocusTimer(); -} + // showFocusTimer(); + } -protected static int focusTime = 0; + protected static int focusTime = 0; private static void showFocusTimer() { @@ -62,5 +63,4 @@ protected static int focusTime = 0; } } - } diff --git a/src/jalview/bin/JalviewLite.java b/src/jalview/bin/JalviewLite.java index 871ca54..7d66f6d 100644 --- a/src/jalview/bin/JalviewLite.java +++ b/src/jalview/bin/JalviewLite.java @@ -209,8 +209,9 @@ public class JalviewLite extends Applet final StructureSelectionManagerProvider me = this; final int pos = apos; // use vamsas listener to broadcast to all listeners in scope - if (alignedPosition != null && (alignedPosition.trim().length() == 0 - || alignedPosition.toLowerCase(Locale.ROOT).indexOf("false") > -1)) + if (alignedPosition != null + && (alignedPosition.trim().length() == 0 || alignedPosition + .toLowerCase(Locale.ROOT).indexOf("false") > -1)) { java.awt.EventQueue.invokeLater(new Runnable() { @@ -1442,7 +1443,8 @@ public class JalviewLite extends Applet String externalsviewer = getParameter("externalstructureviewer"); if (externalsviewer != null) { - useXtrnalSviewer = externalsviewer.trim().toLowerCase(Locale.ROOT).equals(TRUE); + useXtrnalSviewer = externalsviewer.trim().toLowerCase(Locale.ROOT) + .equals(TRUE); } /** * if true disable the check for jmol diff --git a/src/jalview/commands/ChangeCaseCommand.java b/src/jalview/commands/ChangeCaseCommand.java index 2d61705..1476768 100644 --- a/src/jalview/commands/ChangeCaseCommand.java +++ b/src/jalview/commands/ChangeCaseCommand.java @@ -103,13 +103,15 @@ public class ChangeCaseCommand implements CommandI if ((caseChange == TO_UPPER && doCommand) || (caseChange == TO_LOWER && !doCommand)) { - newSeq.append(sequence.substring(start, end).toUpperCase(Locale.ROOT)); + newSeq.append( + sequence.substring(start, end).toUpperCase(Locale.ROOT)); } else if ((caseChange == TO_LOWER && doCommand) || (caseChange == TO_UPPER && !doCommand)) { - newSeq.append(sequence.substring(start, end).toLowerCase(Locale.ROOT)); + newSeq.append( + sequence.substring(start, end).toLowerCase(Locale.ROOT)); } else diff --git a/src/jalview/commands/EditCommand.java b/src/jalview/commands/EditCommand.java index 30595bc..62ef660 100644 --- a/src/jalview/commands/EditCommand.java +++ b/src/jalview/commands/EditCommand.java @@ -118,6 +118,7 @@ public class EditCommand implements CommandI return null; } }; + public abstract Action getUndoAction(); }; @@ -532,16 +533,16 @@ public class EditCommand implements CommandI ContiguousI cutPositions = sequence.findPositions( command.position + 1, command.position + command.number); boolean cutIsInternal = cutPositions != null - && sequence.getStart() != cutPositions - .getBegin() && sequence.getEnd() != cutPositions.getEnd(); + && sequence.getStart() != cutPositions.getBegin() + && sequence.getEnd() != cutPositions.getEnd(); /* * perform the cut; if this results in a new dataset sequence, add * that to the alignment dataset */ SequenceI ds = sequence.getDatasetSequence(); - sequence.deleteChars(command.position, command.position - + command.number); + sequence.deleteChars(command.position, + command.position + command.number); if (command.oldds != null && command.oldds[i] != null) { @@ -566,15 +567,14 @@ public class EditCommand implements CommandI command.oldds[i] = oldds;// todo not if !cutIsInternal? // do we need to edit sequence features for new sequence ? - if (oldds != sequence.getDatasetSequence() - || (cutIsInternal - && sequence.getFeatures().hasFeatures())) + if (oldds != sequence.getDatasetSequence() || (cutIsInternal + && sequence.getFeatures().hasFeatures())) // todo or just test cutIsInternal && cutPositions != null ? { if (cutPositions != null) { cutFeatures(command, sequence, cutPositions.getBegin(), - cutPositions.getEnd(), cutIsInternal); + cutPositions.getEnd(), cutIsInternal); } } } @@ -753,7 +753,8 @@ public class EditCommand implements CommandI { boolean newDSWasNeeded = command.oldds != null && command.oldds[i] != null; - boolean newStartEndWasNeeded = command.oldStartEnd!=null && command.oldStartEnd[i]!=null; + boolean newStartEndWasNeeded = command.oldStartEnd != null + && command.oldStartEnd[i] != null; /** * cut addHistoryItem(new EditCommand("Cut Sequences", EditCommand.CUT, @@ -770,7 +771,7 @@ public class EditCommand implements CommandI start); ContiguousI afterEditedPositions = command.seqs[i] .findPositions(end + 1, command.seqs[i].getLength()); - + oldstring = command.seqs[i].getSequenceAsString(); tmp = new StringBuilder(oldstring.substring(0, start)); tmp.append(command.string[i]); @@ -791,17 +792,18 @@ public class EditCommand implements CommandI String nogapold = AlignSeq.extractGaps(Comparison.GapChars, new String(command.string[i])); - if (!nogaprep.toLowerCase(Locale.ROOT).equals(nogapold.toLowerCase(Locale.ROOT))) + if (!nogaprep.toLowerCase(Locale.ROOT) + .equals(nogapold.toLowerCase(Locale.ROOT))) { // we may already have dataset and limits stashed... if (newDSWasNeeded || newStartEndWasNeeded) { if (newDSWasNeeded) { - // then just switch the dataset sequence - SequenceI oldds = command.seqs[i].getDatasetSequence(); - command.seqs[i].setDatasetSequence(command.oldds[i]); - command.oldds[i] = oldds; + // then just switch the dataset sequence + SequenceI oldds = command.seqs[i].getDatasetSequence(); + command.seqs[i].setDatasetSequence(command.oldds[i]); + command.oldds[i] = oldds; } if (newStartEndWasNeeded) { @@ -811,7 +813,7 @@ public class EditCommand implements CommandI command.seqs[i].setEnd(newStart.getEnd()); } } - else + else { // decide if we need a new dataset sequence or modify start/end // first edit the original dataset sequence string @@ -823,15 +825,11 @@ public class EditCommand implements CommandI ? afterEditedPositions.getBegin() - 1 : oldstartend.getBegin() + nogapold.length()) - : beforeEditedPositions.getEnd() - ); + : beforeEditedPositions.getEnd()); int afterEndOfEdit = -oldds.getStart() + 1 - + ((afterEditedPositions == null) - ? oldstartend.getEnd() + + ((afterEditedPositions == null) ? oldstartend.getEnd() : afterEditedPositions.getBegin() - 1); - String fullseq = osp.substring(0, - beforeStartOfEdit) - + nogaprep + String fullseq = osp.substring(0, beforeStartOfEdit) + nogaprep + osp.substring(afterEndOfEdit); // and check if new sequence data is different.. @@ -876,9 +874,8 @@ public class EditCommand implements CommandI && afterEditedPositions == null) { // modification at end - command.seqs[i].setEnd( - beforeEditedPositions.getEnd() + nogaprep.length() - - nogapold.length()); + command.seqs[i].setEnd(beforeEditedPositions.getEnd() + + nogaprep.length() - nogapold.length()); } else if (afterEditedPositions != null && beforeEditedPositions == null) @@ -893,7 +890,8 @@ public class EditCommand implements CommandI // new // start/end String nogapalseq = AlignSeq.extractGaps(Comparison.GapChars, - command.seqs[i].getSequenceAsString().toUpperCase(Locale.ROOT)); + command.seqs[i].getSequenceAsString() + .toUpperCase(Locale.ROOT)); int newStart = command.seqs[i].getDatasetSequence() .getSequenceAsString().indexOf(nogapalseq); if (newStart == -1) @@ -1025,7 +1023,8 @@ public class EditCommand implements CommandI } // and then duplicate added annotation on every other alignment // view - for (int vnum = 0; views != null && vnum < views.length; vnum++) + for (int vnum = 0; views != null + && vnum < views.length; vnum++) { if (views[vnum] != command.al) { @@ -1299,9 +1298,9 @@ public class EditCommand implements CommandI * feature was shifted left to cut position (not truncated), * so shift it back right */ - SequenceFeature shifted = new SequenceFeature(sf, sf.getBegin() - + length, sf.getEnd() + length, sf.getFeatureGroup(), - sf.getScore()); + SequenceFeature shifted = new SequenceFeature(sf, + sf.getBegin() + length, sf.getEnd() + length, + sf.getFeatureGroup(), sf.getScore()); seq.addSequenceFeature(shifted); seq.deleteFeature(sf); } @@ -1492,8 +1491,7 @@ public class EditCommand implements CommandI */ private boolean systemGenerated; - public Edit(Action cmd, SequenceI[] sqs, int pos, int count, - char gap) + public Edit(Action cmd, SequenceI[] sqs, int pos, int count, char gap) { this.command = cmd; this.seqs = sqs; @@ -1502,8 +1500,7 @@ public class EditCommand implements CommandI this.gapChar = gap; } - Edit(Action cmd, SequenceI[] sqs, int pos, int count, - AlignmentI align) + Edit(Action cmd, SequenceI[] sqs, int pos, int count, AlignmentI align) { this(cmd, sqs, pos, count, align.getGapCharacter()); @@ -1528,8 +1525,8 @@ public class EditCommand implements CommandI * @param align * @param replace */ - Edit(Action cmd, SequenceI[] sqs, int pos, int count, - AlignmentI align, String replace) + Edit(Action cmd, SequenceI[] sqs, int pos, int count, AlignmentI align, + String replace) { this(cmd, sqs, pos, count, align); @@ -1626,25 +1623,25 @@ public class EditCommand implements CommandI } List added = new ArrayList<>(); List removed = new ArrayList<>(); - + SequenceFeaturesI featureStore = seq.getFeatures(); if (toPosition < fromPosition || featureStore == null) { return; } - + int cutStartPos = fromPosition; int cutEndPos = toPosition; int cutWidth = cutEndPos - cutStartPos + 1; - + synchronized (featureStore) { /* * get features that overlap the cut region */ - List toAmend = featureStore.findFeatures( - cutStartPos, cutEndPos); - + List toAmend = featureStore.findFeatures(cutStartPos, + cutEndPos); + /* * add any contact features that span the cut region * (not returned by findFeatures) @@ -1671,7 +1668,7 @@ public class EditCommand implements CommandI int newEnd = sfEnd; boolean toDelete = false; boolean follows = false; - + if (sfBegin >= cutStartPos && sfEnd <= cutEndPos) { /* @@ -1710,7 +1707,7 @@ public class EditCommand implements CommandI toDelete = true; } } - + seq.deleteFeature(sf); if (!follows) { @@ -1727,7 +1724,7 @@ public class EditCommand implements CommandI } } } - + /* * and left shift any features lying to the right of the cut region */ diff --git a/src/jalview/controller/AlignViewController.java b/src/jalview/controller/AlignViewController.java index 7575583..2fb9cdd 100644 --- a/src/jalview/controller/AlignViewController.java +++ b/src/jalview/controller/AlignViewController.java @@ -168,8 +168,9 @@ public class AlignViewController implements AlignViewControllerI BitSet bs = new BitSet(); boolean searchSelection = viewport.getSelectionGroup() != null && !extendCurrent; - SequenceCollectionI sqcol = searchSelection ? viewport - .getSelectionGroup() : viewport.getAlignment(); + SequenceCollectionI sqcol = searchSelection + ? viewport.getSelectionGroup() + : viewport.getAlignment(); int nseq = findColumnsWithFeature(featureType, sqcol, bs); @@ -207,8 +208,9 @@ public class AlignViewController implements AlignViewControllerI { String key = searchSelection ? "label.no_feature_found_selection" : "label.no_feature_of_type_found"; - avcg.setStatus(MessageManager.formatMessage(key, - new String[] { featureType })); + avcg.setStatus( + MessageManager.formatMessage(key, new String[] + { featureType })); if (!extendCurrent) { cs.clear(); @@ -229,11 +231,11 @@ public class AlignViewController implements AlignViewControllerI * @param bs * @return */ - int findColumnsWithFeature(String featureType, - SequenceCollectionI sqcol, BitSet bs) + int findColumnsWithFeature(String featureType, SequenceCollectionI sqcol, + BitSet bs) { - FeatureRenderer fr = alignPanel == null ? null : alignPanel - .getFeatureRenderer(); + FeatureRenderer fr = alignPanel == null ? null + : alignPanel.getFeatureRenderer(); final int startColumn = sqcol.getStartRes() + 1; // converted to base 1 final int endColumn = sqcol.getEndRes() + 1; @@ -244,8 +246,8 @@ public class AlignViewController implements AlignViewControllerI if (sq != null) { // int ist = sq.findPosition(sqcol.getStartRes()); - List sfs = sq.findFeatures(startColumn, - endColumn, featureType); + List sfs = sq.findFeatures(startColumn, endColumn, + featureType); boolean found = false; for (SequenceFeature sf : sfs) @@ -315,17 +317,16 @@ public class AlignViewController implements AlignViewControllerI } /** - * Sorts the alignment (or current selection) by either average score or density - * of the specified feature types, and adds to the command history. If - * {@code types} is null, all visible feature types are used for the sort. If no - * feature types apply, does nothing. + * Sorts the alignment (or current selection) by either average score or + * density of the specified feature types, and adds to the command history. If + * {@code types} is null, all visible feature types are used for the sort. If + * no feature types apply, does nothing. * * @param types * @param methodText - * - text shown in Undo/Redo command + * - text shown in Undo/Redo command * @param method - * - passed to - * jalview.analysis.AlignmentSorter.sortByFeatures() + * - passed to jalview.analysis.AlignmentSorter.sortByFeatures() */ protected void sortByFeatures(List types, String methodText, final String method) @@ -459,7 +460,8 @@ public class AlignViewController implements AlignViewControllerI } else { - avcg.setStatus(MessageManager.getString("label.no_highlighted_regions_marked")); + avcg.setStatus(MessageManager + .getString("label.no_highlighted_regions_marked")); if (!extendCurrent) { cs.clear(); diff --git a/src/jalview/controller/FeatureSettingsControllerGuiI.java b/src/jalview/controller/FeatureSettingsControllerGuiI.java index 92571bc..36051d6 100644 --- a/src/jalview/controller/FeatureSettingsControllerGuiI.java +++ b/src/jalview/controller/FeatureSettingsControllerGuiI.java @@ -30,8 +30,8 @@ public interface FeatureSettingsControllerGuiI void featureSettings_isClosed(); /** - * undo any changes made to feature settings whilst the dialog has been visible, - * since the last 'apply' + * undo any changes made to feature settings whilst the dialog has been + * visible, since the last 'apply' */ void revert(); diff --git a/src/jalview/datamodel/AlignedCodonFrame.java b/src/jalview/datamodel/AlignedCodonFrame.java index b376c80..f5154ec 100644 --- a/src/jalview/datamodel/AlignedCodonFrame.java +++ b/src/jalview/datamodel/AlignedCodonFrame.java @@ -118,44 +118,50 @@ public class AlignedCodonFrame */ public boolean covers(SequenceI seq) { - return covers(seq,false,false); + return covers(seq, false, false); } + /** * * @param seq - * @param localCover - when true - compare extent of seq's dataset sequence rather than the local extent - * @param either - when true coverage is required for either seq or the mapped sequence - * @return true if mapping covers full length of given sequence (or the other if either==true) + * @param localCover + * - when true - compare extent of seq's dataset sequence rather + * than the local extent + * @param either + * - when true coverage is required for either seq or the mapped + * sequence + * @return true if mapping covers full length of given sequence (or the + * other if either==true) */ - public boolean covers(SequenceI seq, boolean localCover,boolean either) + public boolean covers(SequenceI seq, boolean localCover, boolean either) { - List mappedRanges = null,otherRanges=null; + List mappedRanges = null, otherRanges = null; MapList mapList = mapping.getMap(); - int mstart=seq.getStart(),mend=seq.getEnd(),ostart,oend; - ; + int mstart = seq.getStart(), mend = seq.getEnd(), ostart, oend; + ; if (fromSeq == seq || fromSeq == seq.getDatasetSequence()) { - if (localCover && fromSeq !=seq) + if (localCover && fromSeq != seq) { - mstart=fromSeq.getStart(); - mend=fromSeq.getEnd(); + mstart = fromSeq.getStart(); + mend = fromSeq.getEnd(); } mappedRanges = mapList.getFromRanges(); - otherRanges=mapList.getToRanges(); - ostart=mapping.to.getStart(); - oend=mapping.to.getEnd(); + otherRanges = mapList.getToRanges(); + ostart = mapping.to.getStart(); + oend = mapping.to.getEnd(); } else if (mapping.to == seq || mapping.to == seq.getDatasetSequence()) { - if (localCover && mapping.to !=seq) + if (localCover && mapping.to != seq) { - mstart=mapping.to.getStart(); - mend=mapping.to.getEnd(); + mstart = mapping.to.getStart(); + mend = mapping.to.getEnd(); } mappedRanges = mapList.getToRanges(); - otherRanges=mapList.getFromRanges(); - ostart=fromSeq.getStart(); - oend=fromSeq.getEnd(); + otherRanges = mapList.getFromRanges(); + ostart = fromSeq.getStart(); + oend = fromSeq.getEnd(); } else { @@ -167,7 +173,7 @@ public class AlignedCodonFrame * (necessary for circular CDS - example EMBL:J03321:AAA91567) * and mapped length covers (at least) sequence length */ - int length = countRange(mappedRanges,mstart,mend); + int length = countRange(mappedRanges, mstart, mend); if (length != -1) { @@ -191,9 +197,10 @@ public class AlignedCodonFrame } return false; } - private int countRange(List mappedRanges,int mstart,int mend) + + private int countRange(List mappedRanges, int mstart, int mend) { - int length=0; + int length = 0; for (int[] range : mappedRanges) { int from = Math.min(range[0], range[1]); @@ -209,8 +216,9 @@ public class AlignedCodonFrame /** * Adds any regions mapped to or from position {@code pos} in sequence - * {@code seq} to the given search results - * Note: recommend first using the .covers(,true,true) to ensure mapping covers both sequences + * {@code seq} to the given search results Note: recommend first using the + * .covers(,true,true) to ensure mapping covers both sequences + * * @param seq * @param pos * @param sr @@ -224,7 +232,7 @@ public class AlignedCodonFrame { ds = seq; } - + if (this.fromSeq == seq || this.fromSeq == ds) { codon = this.mapping.map.locateInTo(pos, pos); @@ -452,7 +460,8 @@ public class AlignedCodonFrame } for (SequenceToSequenceMapping ssm : mappings) { - if (ssm.covers(seq,true,true)) { + if (ssm.covers(seq, true, true)) + { ssm.markMappedRegion(ds, index, results); } } diff --git a/src/jalview/datamodel/Alignment.java b/src/jalview/datamodel/Alignment.java index c4098e2..a2a152a 100755 --- a/src/jalview/datamodel/Alignment.java +++ b/src/jalview/datamodel/Alignment.java @@ -195,7 +195,7 @@ public class Alignment implements AlignmentI, AutoCloseable { synchronized (sequences) { - + if (i > -1 && i < sequences.size()) { return sequences.get(i); @@ -716,7 +716,7 @@ public class Alignment implements AlignmentI, AutoCloseable public int getWidth() { int maxLength = -1; - + for (int i = 0; i < sequences.size(); i++) { maxLength = Math.max(maxLength, getSequenceAt(i).getLength()); diff --git a/src/jalview/datamodel/AlignmentAnnotation.java b/src/jalview/datamodel/AlignmentAnnotation.java index d41cdd4..f3cdae6 100755 --- a/src/jalview/datamodel/AlignmentAnnotation.java +++ b/src/jalview/datamodel/AlignmentAnnotation.java @@ -183,7 +183,8 @@ public class AlignmentAnnotation return rnaSecondaryStructureEquivalent(that, true); } - public boolean rnaSecondaryStructureEquivalent(AlignmentAnnotation that, boolean compareType) + public boolean rnaSecondaryStructureEquivalent(AlignmentAnnotation that, + boolean compareType) { SequenceFeature[] thisSfArray = this.getRnaSecondaryStructure(); SequenceFeature[] thatSfArray = that.getRnaSecondaryStructure(); @@ -196,21 +197,28 @@ public class AlignmentAnnotation return false; } Arrays.sort(thisSfArray, new SFSortByEnd()); // probably already sorted - // like this + // like this Arrays.sort(thatSfArray, new SFSortByEnd()); // probably already sorted - // like this - for (int i=0; i < thisSfArray.length; i++) { + // like this + for (int i = 0; i < thisSfArray.length; i++) + { SequenceFeature thisSf = thisSfArray[i]; SequenceFeature thatSf = thatSfArray[i]; - if (compareType) { - if (thisSf.getType() == null || thatSf.getType() == null) { - if (thisSf.getType() == null && thatSf.getType() == null) { + if (compareType) + { + if (thisSf.getType() == null || thatSf.getType() == null) + { + if (thisSf.getType() == null && thatSf.getType() == null) + { continue; - } else { + } + else + { return false; } } - if (! thisSf.getType().equals(thatSf.getType())) { + if (!thisSf.getType().equals(thatSf.getType())) + { return false; } } diff --git a/src/jalview/datamodel/DBRefEntry.java b/src/jalview/datamodel/DBRefEntry.java index 93a5460..aedfd3b 100755 --- a/src/jalview/datamodel/DBRefEntry.java +++ b/src/jalview/datamodel/DBRefEntry.java @@ -33,16 +33,16 @@ public class DBRefEntry implements DBRefEntryI String source = ""; private String version = ""; - + private String ucversion; private String accessionId = ""; - + int sourceKey = Integer.MIN_VALUE; String canonicalSourceName; - - boolean isCanonicalAccession=false; + + boolean isCanonicalAccession = false; /* * maps from associated sequence to the database sequence's coordinate system @@ -57,30 +57,32 @@ public class DBRefEntry implements DBRefEntryI /** * * @param source - * may not be null + * may not be null * @param version - * may be null + * may be null * @param accessionId - * may be null + * may be null */ public DBRefEntry(String source, String version, String accessionId) { - this(source, version, accessionId, null,false); + this(source, version, accessionId, null, false); } /** * * @param source - * may not be null + * may not be null * @param version - * may be null + * may be null * @param accessionId - * may be null + * may be null */ - public DBRefEntry(String source, String version, String accessionId, Mapping map) + public DBRefEntry(String source, String version, String accessionId, + Mapping map) { - this(source, version, accessionId, map,false); + this(source, version, accessionId, map, false); } + /** * * @param source @@ -94,14 +96,14 @@ public class DBRefEntry implements DBRefEntryI * numbering or null) */ public DBRefEntry(String source, String version, String accessionId, - Mapping map,boolean isCanonical) + Mapping map, boolean isCanonical) { - + this.source = source.toUpperCase(Locale.ROOT); setVersion(version); this.accessionId = accessionId; this.map = map; - this.isCanonicalAccession=isCanonical; + this.isCanonicalAccession = isCanonical; } /** @@ -115,7 +117,8 @@ public class DBRefEntry implements DBRefEntryI : new String(entry.getVersion())), (entry.getAccessionId() == null ? "" : new String(entry.getAccessionId())), - (entry.getMap() == null ? null : new Mapping(entry.getMap())),entry.isCanonical()); + (entry.getMap() == null ? null : new Mapping(entry.getMap())), + entry.isCanonical()); } @Override @@ -123,28 +126,26 @@ public class DBRefEntry implements DBRefEntryI { // TODO should also override hashCode to ensure equal objects have equal // hashcodes - - -// if (o == null || !(o instanceof DBRefEntry)) -// { -// return false; -// } -// DBRefEntry entry = (DBRefEntry) o; -// if (entry == this) -// { -// return true; -// } + + // if (o == null || !(o instanceof DBRefEntry)) + // { + // return false; + // } + // DBRefEntry entry = (DBRefEntry) o; + // if (entry == this) + // { + // return true; + // } Mapping em; - return (o != null && o instanceof DBRefEntry - && (o == this - || equalRef((DBRefEntry) o) - && (map == null) == ((em = ((DBRefEntry) o).map) == null) - && (map == null || map.equals(em)))); -// -// { -// return true; -// } -// return false; + return (o != null && o instanceof DBRefEntry && (o == this || equalRef( + (DBRefEntry) o) + && (map == null) == ((em = ((DBRefEntry) o).map) == null) + && (map == null || map.equals(em)))); + // + // { + // return true; + // } + // return false; } /** @@ -174,7 +175,7 @@ public class DBRefEntry implements DBRefEntryI return true; } - boolean improved=false; + boolean improved = false; /* * source must either match or be both null */ @@ -262,10 +263,10 @@ public class DBRefEntry implements DBRefEntryI { return true; } - - // BH 2019.01.25/2019.02.04 source cannot/should not be null. + + // BH 2019.01.25/2019.02.04 source cannot/should not be null. // for example, StructureChooser has dbRef.getSource().equalsIgnoreCase... - + return (entry != null && (source != null && entry.getSource() != null && source.equalsIgnoreCase(entry.getSource())) @@ -281,9 +282,12 @@ public class DBRefEntry implements DBRefEntryI return source; } - public int getSourceKey() + public int getSourceKey() { - return (sourceKey == Integer.MIN_VALUE ? (sourceKey = DBRefSource.getSourceKey(getCanonicalSourceName())) : sourceKey); + return (sourceKey == Integer.MIN_VALUE + ? (sourceKey = DBRefSource + .getSourceKey(getCanonicalSourceName())) + : sourceKey); } /** @@ -307,8 +311,9 @@ public class DBRefEntry implements DBRefEntryI @Override public void setAccessionId(String accessionId) { - this.accessionId = accessionId; -// this.accessionId = (accessionId == null ? "" : accessionId).toUpperCase(Locale.ROOT); + this.accessionId = accessionId; + // this.accessionId = (accessionId == null ? "" : + // accessionId).toUpperCase(Locale.ROOT); } /** @@ -317,18 +322,19 @@ public class DBRefEntry implements DBRefEntryI @Override public void setSource(String source) { - this.source = source; - -// this.source = (source == null ? "" : source).toUpperCase(Locale.ROOT); -// this.canonicalSourceName = DBRefUtils.getCanonicalName(this.source); -// this.sourceKey = DBRefSource.getSourceKey(this.canonicalSourceName); + this.source = source; + + // this.source = (source == null ? "" : source).toUpperCase(Locale.ROOT); + // this.canonicalSourceName = DBRefUtils.getCanonicalName(this.source); + // this.sourceKey = DBRefSource.getSourceKey(this.canonicalSourceName); } @Override public void setVersion(String version) { this.version = version; - this.ucversion = (version == null ? null : version.toUpperCase(Locale.ROOT)); + this.ucversion = (version == null ? null + : version.toUpperCase(Locale.ROOT)); } @Override @@ -381,14 +387,14 @@ public class DBRefEntry implements DBRefEntryI return false; } MapList ml = map.getMap(); - if (ml.getFromRatio() != ml.getToRatio() - || ml.getFromRatio() != 1) + if (ml.getFromRatio() != ml.getToRatio() || ml.getFromRatio() != 1) { return false; } // check map is between identical single contiguous ranges List fromRanges, toRanges; - if ((fromRanges = ml.getFromRanges()).size() != 1 || (toRanges = ml.getToRanges()).size() != 1) + if ((fromRanges = ml.getFromRanges()).size() != 1 + || (toRanges = ml.getToRanges()).size() != 1) { return false; } @@ -403,7 +409,7 @@ public class DBRefEntry implements DBRefEntryI // no version string implies the reference has not been verified at all. return false; } - + return DBRefSource.isPrimaryCandidate(ucversion); } @@ -415,8 +421,12 @@ public class DBRefEntry implements DBRefEntryI * * @return */ - public String getCanonicalSourceName() { - return (canonicalSourceName == null ? (canonicalSourceName = DBRefUtils.getCanonicalName(this.source)) : canonicalSourceName); + public String getCanonicalSourceName() + { + return (canonicalSourceName == null + ? (canonicalSourceName = DBRefUtils + .getCanonicalName(this.source)) + : canonicalSourceName); } /** @@ -427,9 +437,11 @@ public class DBRefEntry implements DBRefEntryI { isCanonicalAccession = canonical; } + /** * - * @return true if this is the primary canonical accession for the database source + * @return true if this is the primary canonical accession for the database + * source */ public boolean isCanonical() { diff --git a/src/jalview/datamodel/DBRefSource.java b/src/jalview/datamodel/DBRefSource.java index 2d2ae4f..f384b1e 100755 --- a/src/jalview/datamodel/DBRefSource.java +++ b/src/jalview/datamodel/DBRefSource.java @@ -40,115 +40,128 @@ import java.util.Locale; public class DBRefSource { - - - + public static final String UNIPROT = "UNIPROT"; - public static final String UP_NAME = "UNIPROT_NAME".toUpperCase(Locale.ROOT); + + public static final String UP_NAME = "UNIPROT_NAME" + .toUpperCase(Locale.ROOT); + /** * Uniprot Knowledgebase/TrEMBL as served from EMBL protein products. */ - public static final String UNIPROTKB = "UniProtKB/TrEMBL".toUpperCase(Locale.ROOT); + public static final String UNIPROTKB = "UniProtKB/TrEMBL" + .toUpperCase(Locale.ROOT); + + public static final String ENSEMBL = "ENSEMBL"; - public static final String ENSEMBL = "ENSEMBL"; public static final String ENSEMBLGENOMES = "ENSEMBLGENOMES"; - - public static final String EMBL = "EMBL"; - public static final String EMBLCDS = "EMBLCDS"; - public static final String EMBLCDSProduct = "EMBLCDSProtein".toUpperCase(Locale.ROOT); - - public static final String PDB = "PDB"; - public static final String PFAM = "PFAM"; - public static final String RFAM = "RFAM"; + + public static final String EMBL = "EMBL"; + + public static final String EMBLCDS = "EMBLCDS"; + + public static final String EMBLCDSProduct = "EMBLCDSProtein" + .toUpperCase(Locale.ROOT); + + public static final String PDB = "PDB"; + + public static final String PFAM = "PFAM"; + + public static final String RFAM = "RFAM"; + public static final String GENEDB = "GeneDB".toUpperCase(Locale.ROOT); public static final String PDB_CANONICAL_NAME = PDB; + public static final String[] allSources = new String[] { UNIPROT, UP_NAME, + UNIPROTKB, ENSEMBL, ENSEMBLGENOMES, EMBL, EMBLCDS, EMBLCDSProduct, + PDB, PFAM, RFAM, GENEDB }; + + public static final int UNIPROT_MASK = 1 << 0; + + public static final int UP_NAME_MASK = 1 << 1; + + public static final int UNIPROT_KB_MASK = 1 << 2; + + public static final int ENSEMBL_MASK = 1 << 3; + + public static final int ENSEMBL_GENOMES_MASK = 1 << 4; + + public static final int EMBL_MASK = 1 << 5; + + public static final int EMBL_CDS_MASK = 1 << 6; + + public static final int EMBL_CDS_PRODUCT_MASK = 1 << 7; + + public static final int PDB_MASK = 1 << 8; + + public static final int PFAM_MASK = 1 << 9; - public static final String[] allSources = new String[] { - UNIPROT, - UP_NAME, UNIPROTKB, - ENSEMBL, ENSEMBLGENOMES, - EMBL, EMBLCDS, EMBLCDSProduct, - PDB, PFAM, RFAM, GENEDB - }; - - public static final int UNIPROT_MASK = 1<<0; - public static final int UP_NAME_MASK = 1<<1; - public static final int UNIPROT_KB_MASK = 1<<2; - public static final int ENSEMBL_MASK = 1<<3; - public static final int ENSEMBL_GENOMES_MASK = 1<<4; - public static final int EMBL_MASK = 1<<5; - public static final int EMBL_CDS_MASK = 1<<6; - public static final int EMBL_CDS_PRODUCT_MASK = 1<<7; - public static final int PDB_MASK = 1<<8; - public static final int PFAM_MASK = 1<<9; - public static final int RFAM_MASK = 1<<10; - public static final int GENE_DB_MASK = 1<<11; - - public static final int MASK_COUNT = 12; - - public static final int ALL_MASKS = (1 << MASK_COUNT) - 1; - - public static int getSourceKey(String name) { - for (int i = 0; i < MASK_COUNT; i++) { - if (name.equals(allSources[i])) - { - return 1<= 0;) { - if (ucversion.startsWith(allSources[i])) // BH 2019.01.25 .toUpperCase(Locale.ROOT) unnecessary here for allSources + if (ucversion.startsWith(allSources[i])) // BH 2019.01.25 + // .toUpperCase(Locale.ROOT) + // unnecessary here for + // allSources { // by convention, many secondary references inherit the primary // reference's @@ -158,9 +171,6 @@ public class DBRefSource } } return true; -} - - + } - } diff --git a/src/jalview/datamodel/GeneLocus.java b/src/jalview/datamodel/GeneLocus.java index 5a98c63..1fa465c 100644 --- a/src/jalview/datamodel/GeneLocus.java +++ b/src/jalview/datamodel/GeneLocus.java @@ -79,8 +79,8 @@ public class GeneLocus extends DBRefEntry implements GeneLociI } /** - * Answers the species identifier e.g. "human", stored as field source of - * DBRefEntry + * Answers the species identifier e.g. "human", stored as field + * source of DBRefEntry */ @Override public String getSpeciesId() diff --git a/src/jalview/datamodel/HiddenColumns.java b/src/jalview/datamodel/HiddenColumns.java index 2d43f02..89fb1ab 100644 --- a/src/jalview/datamodel/HiddenColumns.java +++ b/src/jalview/datamodel/HiddenColumns.java @@ -135,9 +135,9 @@ public class HiddenColumns // all overlapping regions and we need contained regions if (region[0] >= start && region[1] <= end) { - hiddenColumns.add( - new int[] - { region[0] - offset, region[1] - offset }); + hiddenColumns + .add(new int[] + { region[0] - offset, region[1] - offset }); numColumns += region[1] - region[0] + 1; } } @@ -169,7 +169,8 @@ public class HiddenColumns if (!hiddenColumns.isEmpty()) { // set up cursor reset values - HiddenCursorPosition cursorPos = cursor.findRegionForColumn(start, false); + HiddenCursorPosition cursorPos = cursor.findRegionForColumn(start, + false); regionindex = cursorPos.getRegionIndex(); if (regionindex > 0) @@ -252,7 +253,7 @@ public class HiddenColumns int oldstart = region[0]; region[0] = Math.min(region[0], start); numColumns += oldstart - region[0]; // new columns are between old and - // adjusted starts + // adjusted starts added = true; } else if (start <= region[1] + 1) @@ -528,8 +529,7 @@ public class HiddenColumns if (!hiddenColumns.isEmpty()) { - result += cursor.findRegionForColumn(column, true) - .getHiddenSoFar(); + result += cursor.findRegionForColumn(column, true).getHiddenSoFar(); } return result; @@ -562,11 +562,11 @@ public class HiddenColumns .findRegionForColumn(hiddenColumn, false); int index = cursorPos.getRegionIndex(); int hiddenBeforeCol = cursorPos.getHiddenSoFar(); - + // just subtract hidden cols count - this works fine if column is // visible result = hiddenColumn - hiddenBeforeCol; - + // now check in case column is hidden - it will be in the returned // hidden region if (index < hiddenColumns.size()) @@ -744,7 +744,6 @@ public class HiddenColumns } } - /** * Returns a hashCode built from hidden column ranges */ @@ -798,7 +797,7 @@ public class HiddenColumns for (int firstSet = tohide .nextSetBit(start), lastSet = start; firstSet >= start && lastSet <= end; firstSet = tohide - .nextSetBit(lastSet)) + .nextSetBit(lastSet)) { lastSet = tohide.nextClearBit(firstSet); if (lastSet <= end) @@ -848,7 +847,7 @@ public class HiddenColumns try { LOCK.writeLock().lock(); - + if (!hiddenColumns.isEmpty()) { HiddenCursorPosition pos = cursor.findRegionForColumn(start, false); @@ -1066,8 +1065,7 @@ public class HiddenColumns HiddenCursorPosition pos = cursor .findRegionForColumn(absoluteStart - 1, false); - return new StartRegionIterator(pos, start, end, - hiddenColumns); + return new StartRegionIterator(pos, start, end, hiddenColumns); } finally { LOCK.readLock().unlock(); @@ -1108,8 +1106,7 @@ public class HiddenColumns * if true, start and end are visible column positions, not absolute * positions* */ - public VisibleContigsIterator getVisContigsIterator(int start, - int end, + public VisibleContigsIterator getVisContigsIterator(int start, int end, boolean useVisibleCoords) { int adjstart = start; diff --git a/src/jalview/datamodel/HiddenColumnsCursor.java b/src/jalview/datamodel/HiddenColumnsCursor.java index 2e9d798..d6b6c10 100644 --- a/src/jalview/datamodel/HiddenColumnsCursor.java +++ b/src/jalview/datamodel/HiddenColumnsCursor.java @@ -66,8 +66,7 @@ public class HiddenColumnsCursor if (!hiddenCols.isEmpty()) { firstColumn = hiddenColumns.get(0)[0]; - cursorPos = new HiddenCursorPosition(index, - hiddencount); + cursorPos = new HiddenCursorPosition(index, hiddencount); } } diff --git a/src/jalview/datamodel/MappedFeatures.java b/src/jalview/datamodel/MappedFeatures.java index ca6db1b..4637974 100644 --- a/src/jalview/datamodel/MappedFeatures.java +++ b/src/jalview/datamodel/MappedFeatures.java @@ -112,7 +112,8 @@ public class MappedFeatures * determine codon positions and canonical codon * for a peptide-to-CDS mapping */ - int[] codonIntervals = mapping.getMap().locateInFrom(toPosition, toPosition); + int[] codonIntervals = mapping.getMap().locateInFrom(toPosition, + toPosition); int[] codonPositions = codonIntervals == null ? null : MappingUtils.flattenRanges(codonIntervals); if (codonPositions != null && codonPositions.length == 3) @@ -120,12 +121,12 @@ public class MappedFeatures codonPos = codonPositions; baseCodon = new char[3]; int cdsStart = featureSequence.getStart(); - baseCodon[0] = Character - .toUpperCase(featureSequence.getCharAt(codonPos[0] - cdsStart)); - baseCodon[1] = Character - .toUpperCase(featureSequence.getCharAt(codonPos[1] - cdsStart)); - baseCodon[2] = Character - .toUpperCase(featureSequence.getCharAt(codonPos[2] - cdsStart)); + baseCodon[0] = Character.toUpperCase( + featureSequence.getCharAt(codonPos[0] - cdsStart)); + baseCodon[1] = Character.toUpperCase( + featureSequence.getCharAt(codonPos[1] - cdsStart)); + baseCodon[2] = Character.toUpperCase( + featureSequence.getCharAt(codonPos[2] - cdsStart)); } else { @@ -238,8 +239,7 @@ public class MappedFeatures */ var.append("c.").append(String.valueOf(cdsPos)) .append(String.valueOf(baseCodon[i])).append(">") - .append(String.valueOf(variantCodon[i])) - .append("(p.=)"); + .append(String.valueOf(variantCodon[i])).append("(p.=)"); } else { diff --git a/src/jalview/datamodel/PDBEntry.java b/src/jalview/datamodel/PDBEntry.java index 741ef07..65ba18b 100755 --- a/src/jalview/datamodel/PDBEntry.java +++ b/src/jalview/datamodel/PDBEntry.java @@ -39,11 +39,14 @@ public class PDBEntry private static final int PDB_ID_LENGTH = 4; /** - * property set when id is a 'manufactured' identifier from the structure data's filename + * property set when id is a 'manufactured' identifier from the structure + * data's filename */ private static final String FAKED_ID = "faked_pdbid"; + /** - * property set when the id is authoritative, and should be used in preference to any identifiers in the structure data + * property set when the id is authoritative, and should be used in preference + * to any identifiers in the structure data */ private static final String AUTHORITATIVE_ID = "authoritative_pdbid"; @@ -57,7 +60,8 @@ public class PDBEntry { // TODO is FILE needed; if not is this enum needed, or can we // use FileFormatI for PDB, MMCIF? - PDB("pdb", "pdb"), MMCIF("mmcif", "cif"), BCIF("bcif","bcif"),FILE("?", "?"); + PDB("pdb", "pdb"), MMCIF("mmcif", "cif"), BCIF("bcif", "bcif"), + FILE("?", "?"); /* * file extension for cached structure file; must be one that @@ -493,12 +497,12 @@ public class PDBEntry } return true; } - + public void setAuthoritative(boolean isAuthoritative) { setProperty(AUTHORITATIVE_ID, Boolean.valueOf(isAuthoritative)); } - + /** * * @return true if the identifier should be preferred over any identifiers @@ -508,13 +512,14 @@ public class PDBEntry { if (_hasProperty(AUTHORITATIVE_ID)) { - return ((Boolean)getProperty(AUTHORITATIVE_ID)); + return ((Boolean) getProperty(AUTHORITATIVE_ID)); } return false; } /** * set when Jalview has manufactured the ID using a local filename + * * @return */ public boolean fakedPDBId() @@ -525,15 +530,17 @@ public class PDBEntry } return false; } + public void setFakedPDBId(boolean faked) { if (faked) { setProperty(FAKED_ID, Boolean.TRUE); } - else + else { - if (properties!=null) { + if (properties != null) + { properties.remove(FAKED_ID); } } diff --git a/src/jalview/datamodel/RangeIterator.java b/src/jalview/datamodel/RangeIterator.java index 5d45236..aa85282 100644 --- a/src/jalview/datamodel/RangeIterator.java +++ b/src/jalview/datamodel/RangeIterator.java @@ -68,8 +68,7 @@ public class RangeIterator implements Iterator * @param rangeList * list of ranges to iterate over */ - RangeIterator(int lowerBound, int upperBound, - List rangeList) + RangeIterator(int lowerBound, int upperBound, List rangeList) { init(lowerBound, upperBound, rangeList); } @@ -82,8 +81,7 @@ public class RangeIterator implements Iterator * @param upperBound * upper bound to iterate to */ - private void init(int lowerBound, int upperBound, - List rangeList) + private void init(int lowerBound, int upperBound, List rangeList) { int start = lowerBound; int end = upperBound; diff --git a/src/jalview/datamodel/ResidueCount.java b/src/jalview/datamodel/ResidueCount.java index efab97c..dc98f99 100644 --- a/src/jalview/datamodel/ResidueCount.java +++ b/src/jalview/datamodel/ResidueCount.java @@ -213,7 +213,7 @@ public class ResidueCount } } - if (offset!=GAP_COUNT) + if (offset != GAP_COUNT) { // update modal residue count maxCount = Math.max(maxCount, newValue); diff --git a/src/jalview/datamodel/SearchResults.java b/src/jalview/datamodel/SearchResults.java index 5c929fc..880f970 100755 --- a/src/jalview/datamodel/SearchResults.java +++ b/src/jalview/datamodel/SearchResults.java @@ -234,8 +234,8 @@ public class SearchResults implements SearchResultsI { mfound = true; matchStart = sequence.findIndex(m.start) - 1; - matchEnd = m.start == m.end ? matchStart : sequence - .findIndex(m.end) - 1; + matchEnd = m.start == m.end ? matchStart + : sequence.findIndex(m.end) - 1; } if (mfound) diff --git a/src/jalview/datamodel/SequenceCursor.java b/src/jalview/datamodel/SequenceCursor.java index 24752bf..cf78ca4 100644 --- a/src/jalview/datamodel/SequenceCursor.java +++ b/src/jalview/datamodel/SequenceCursor.java @@ -94,8 +94,8 @@ public class SequenceCursor * a token that may be validated by the sequence to check the cursor * is not stale */ - public SequenceCursor(SequenceI seq, int resPos, int column, int firstResCol, - int lastResCol, int tok) + public SequenceCursor(SequenceI seq, int resPos, int column, + int firstResCol, int lastResCol, int tok) { sequence = seq; residuePosition = resPos; diff --git a/src/jalview/datamodel/SequenceFeature.java b/src/jalview/datamodel/SequenceFeature.java index bbf1b45..1f498b9 100755 --- a/src/jalview/datamodel/SequenceFeature.java +++ b/src/jalview/datamodel/SequenceFeature.java @@ -102,8 +102,8 @@ public class SequenceFeature implements FeatureLocationI */ public SequenceFeature(SequenceFeature cpy) { - this(cpy, cpy.getBegin(), cpy.getEnd(), cpy.getFeatureGroup(), cpy - .getScore()); + this(cpy, cpy.getBegin(), cpy.getEnd(), cpy.getFeatureGroup(), + cpy.getScore()); } /** @@ -377,10 +377,10 @@ public class SequenceFeature implements FeatureLocationI /** * Answers the value of the specified attribute as string, or null if no such - * value. If more than one attribute name is provided, tries to resolve as keys - * to nested maps. For example, if attribute "CSQ" holds a map of key-value - * pairs, then getValueAsString("CSQ", "Allele") returns the value of "Allele" - * in that map. + * value. If more than one attribute name is provided, tries to resolve as + * keys to nested maps. For example, if attribute "CSQ" holds a map of + * key-value pairs, then getValueAsString("CSQ", "Allele") returns the value + * of "Allele" in that map. * * @param key * @return @@ -605,9 +605,8 @@ public class SequenceFeature implements FeatureLocationI sb.append("
"); sb.append(""); String name = mf == null ? seqName : mf.getLinkedSequenceName(); - sb.append(String.format(ROW_DATA, "Location", name, - begin == end ? begin - : begin + (isContactFeature() ? ":" : "-") + end)); + sb.append(String.format(ROW_DATA, "Location", name, begin == end ? begin + : begin + (isContactFeature() ? ":" : "-") + end)); String consequence = ""; if (mf != null) @@ -664,8 +663,8 @@ public class SequenceFeature implements FeatureLocationI sm.putAll(values); for (Entry e : sm.entrySet()) { - sb.append(String.format(ROW_DATA, key, e.getKey().toString(), e - .getValue().toString())); + sb.append(String.format(ROW_DATA, key, e.getKey().toString(), + e.getValue().toString())); } } else @@ -679,8 +678,8 @@ public class SequenceFeature implements FeatureLocationI String s = entry.getValue().toString(); if (isValueInteresting(key, s, metadata)) { - sb.append(String.format(ROW_DATA, key, attDesc == null ? "" - : attDesc, s)); + sb.append(String.format(ROW_DATA, key, + attDesc == null ? "" : attDesc, s)); } } } @@ -718,9 +717,8 @@ public class SequenceFeature implements FeatureLocationI } FeatureAttributeType attType = metadata.getAttributeType(key); - if (attType != null - && (attType == FeatureAttributeType.Float || attType - .equals(FeatureAttributeType.Integer))) + if (attType != null && (attType == FeatureAttributeType.Float + || attType.equals(FeatureAttributeType.Integer))) { try { diff --git a/src/jalview/datamodel/SequenceGroup.java b/src/jalview/datamodel/SequenceGroup.java index 861595c..5e33229 100755 --- a/src/jalview/datamodel/SequenceGroup.java +++ b/src/jalview/datamodel/SequenceGroup.java @@ -108,7 +108,7 @@ public class SequenceGroup implements AnnotatedCollectionI private int startRes = 0; /** - * end column (base 0) + * end column (base 0) */ private int endRes = 0; @@ -214,7 +214,7 @@ public class SequenceGroup implements AnnotatedCollectionI displayBoxes = seqsel.displayBoxes; displayText = seqsel.displayText; colourText = seqsel.colourText; - + startRes = seqsel.startRes; endRes = seqsel.endRes; cs = new ResidueShader((ResidueShader) seqsel.cs); @@ -269,7 +269,8 @@ public class SequenceGroup implements AnnotatedCollectionI for (int i = 0, ipos = 0; i < inorder.length; i++) { SequenceI seq = inorder[i]; - SequenceI seqipos = seqs[ipos] = seq.getSubSequence(startRes, endRes + 1); + SequenceI seqipos = seqs[ipos] = seq.getSubSequence(startRes, + endRes + 1); if (seqipos != null) { seqipos.setDescription(seq.getDescription()); @@ -773,10 +774,9 @@ public class SequenceGroup implements AnnotatedCollectionI public void setStartRes(int newStart) { int before = startRes; - startRes= Math.max(0,newStart); // sanity check for negative start column positions - changeSupport.firePropertyChange(SEQ_GROUP_CHANGED, before, startRes); - - + startRes = Math.max(0, newStart); // sanity check for negative start column + // positions + changeSupport.firePropertyChange(SEQ_GROUP_CHANGED, before, startRes); } diff --git a/src/jalview/datamodel/SequenceI.java b/src/jalview/datamodel/SequenceI.java index 7c3eb41..2f365e6 100755 --- a/src/jalview/datamodel/SequenceI.java +++ b/src/jalview/datamodel/SequenceI.java @@ -357,12 +357,13 @@ public interface SequenceI extends ASequenceI /** * set the array of Database references for the sequence. * - * BH 2019.02.04 changes param to DBModlist + * BH 2019.02.04 changes param to DBModlist * * @param dbs * @deprecated - use is discouraged since side-effects may occur if DBRefEntry * set are not normalised. - * @throws InvalidArgumentException if the is not one created by Sequence itself + * @throws InvalidArgumentException + * if the is not one created by Sequence itself */ @Deprecated public void setDBRefs(DBModList dbs); @@ -447,8 +448,8 @@ public interface SequenceI extends ASequenceI /** * Returns a (possibly empty) list of any annotations that match on given - * calcId (source), label (type) and description (observation instance). - * Null values do not match. + * calcId (source), label (type) and description (observation instance). Null + * values do not match. * * @param calcId * @param label @@ -456,6 +457,7 @@ public interface SequenceI extends ASequenceI */ public List getAlignmentAnnotations(String calcId, String label, String description); + /** * create a new dataset sequence (if necessary) for this sequence and sets * this sequence to refer to it. This call will move any features or @@ -530,7 +532,8 @@ public interface SequenceI extends ASequenceI * optional feature types to restrict results to * @return */ - List findFeatures(int fromCol, int toCol, String... types); + List findFeatures(int fromCol, int toCol, + String... types); /** * Method to call to indicate that the sequence (characters or alignment/gaps) @@ -538,7 +541,7 @@ public interface SequenceI extends ASequenceI * positions to be invalidated. */ void sequenceChanged(); - + /** * * @return BitSet corresponding to index [0,length) where Comparison.isGap() @@ -570,9 +573,8 @@ public interface SequenceI extends ASequenceI * @param chromosomeId * @param map */ - void setGeneLoci(String speciesId, String assemblyId, - String chromosomeId, MapList map); - + void setGeneLoci(String speciesId, String assemblyId, String chromosomeId, + MapList map); /** * Returns the sequence string constructed from the substrings of a sequence @@ -595,6 +597,4 @@ public interface SequenceI extends ASequenceI */ public int firstResidueOutsideIterator(Iterator it); - } - diff --git a/src/jalview/datamodel/StartRegionIterator.java b/src/jalview/datamodel/StartRegionIterator.java index c21f04a..b7af621 100644 --- a/src/jalview/datamodel/StartRegionIterator.java +++ b/src/jalview/datamodel/StartRegionIterator.java @@ -84,7 +84,7 @@ public class StartRegionIterator implements Iterator // navigate to start, keeping count of hidden columns int i = 0; int hiddenSoFar = 0; - + if (pos != null) { // use the cursor position provided @@ -140,4 +140,3 @@ public class StartRegionIterator implements Iterator return result; } } - diff --git a/src/jalview/datamodel/VisibleContigsIterator.java b/src/jalview/datamodel/VisibleContigsIterator.java index 0185978..9198de8 100644 --- a/src/jalview/datamodel/VisibleContigsIterator.java +++ b/src/jalview/datamodel/VisibleContigsIterator.java @@ -37,8 +37,7 @@ public class VisibleContigsIterator implements Iterator private boolean endsAtHidden = false; - VisibleContigsIterator(int start, int end, - List hiddenColumns) + VisibleContigsIterator(int start, int end, List hiddenColumns) { if (hiddenColumns != null && hiddenColumns.size() > 0) { @@ -113,4 +112,3 @@ public class VisibleContigsIterator implements Iterator return endsAtHidden; } } - diff --git a/src/jalview/datamodel/features/FeatureAttributes.java b/src/jalview/datamodel/features/FeatureAttributes.java index bcf404b..d274511 100644 --- a/src/jalview/datamodel/features/FeatureAttributes.java +++ b/src/jalview/datamodel/features/FeatureAttributes.java @@ -153,7 +153,9 @@ public class FeatureAttributes } /** - * Answers the description of the attribute, if recorded and unique, or null if either no, or more than description is recorded + * Answers the description of the attribute, if recorded and unique, or null + * if either no, or more than description is recorded + * * @return */ public String getDescription() @@ -354,7 +356,7 @@ public class FeatureAttributes { return; } - + Map atts = attributes.get(featureType); if (atts == null) { diff --git a/src/jalview/datamodel/features/FeatureMatcher.java b/src/jalview/datamodel/features/FeatureMatcher.java index 69f80f2..65cba0d 100644 --- a/src/jalview/datamodel/features/FeatureMatcher.java +++ b/src/jalview/datamodel/features/FeatureMatcher.java @@ -310,6 +310,7 @@ public class FeatureMatcher implements FeatureMatcherI byLabel = forLabel; byScore = forScore; } + @Override public boolean matches(SequenceFeature feature) { @@ -332,8 +333,8 @@ public class FeatureMatcher implements FeatureMatcherI } /** - * Answers a string description of this matcher, suitable for display, debugging - * or logging. The format may change in future. + * Answers a string description of this matcher, suitable for display, + * debugging or logging. The format may change in future. */ @Override public String toString() @@ -415,7 +416,7 @@ public class FeatureMatcher implements FeatureMatcherI sb.append(displayName); } } - + Condition condition = matcher.getCondition(); sb.append(SPACE).append(condition.getStableName()); String pattern = matcher.getPattern(); @@ -433,7 +434,7 @@ public class FeatureMatcher implements FeatureMatcherI sb.append(SPACE).append(pattern); } } - + return sb.toString(); } } diff --git a/src/jalview/datamodel/features/FeatureMatcherSet.java b/src/jalview/datamodel/features/FeatureMatcherSet.java index ee4bf12..a5efe5d 100644 --- a/src/jalview/datamodel/features/FeatureMatcherSet.java +++ b/src/jalview/datamodel/features/FeatureMatcherSet.java @@ -259,7 +259,8 @@ public class FeatureMatcherSet implements FeatureMatcherSetI if (!first) { String joiner = andConditions ? AND_18N : OR_I18N; - sb.append(SPACE).append(joiner.toLowerCase(Locale.ROOT)).append(SPACE); + sb.append(SPACE).append(joiner.toLowerCase(Locale.ROOT)) + .append(SPACE); } first = false; if (multiple) diff --git a/src/jalview/datamodel/features/FeatureSource.java b/src/jalview/datamodel/features/FeatureSource.java index 176ab02..70bb999 100644 --- a/src/jalview/datamodel/features/FeatureSource.java +++ b/src/jalview/datamodel/features/FeatureSource.java @@ -35,9 +35,9 @@ public class FeatureSource implements FeatureSourceI private String name; private Map attributeNames; - + private Map attributeTypes; - + /** * Constructor * diff --git a/src/jalview/datamodel/features/FeatureStore.java b/src/jalview/datamodel/features/FeatureStore.java index 7651016..eb5688c 100644 --- a/src/jalview/datamodel/features/FeatureStore.java +++ b/src/jalview/datamodel/features/FeatureStore.java @@ -182,18 +182,17 @@ public class FeatureStore { if (feature.isNonPositional()) { - return nonPositionalFeatures == null ? false : nonPositionalFeatures - .contains(feature); + return nonPositionalFeatures == null ? false + : nonPositionalFeatures.contains(feature); } if (feature.isContactFeature()) { - return contactFeatureStarts == null ? false : listContains( - contactFeatureStarts, feature); + return contactFeatureStarts == null ? false + : listContains(contactFeatureStarts, feature); } - return features == null ? false : features - .contains(feature); + return features == null ? false : features.contains(feature); } /** @@ -280,13 +279,12 @@ public class FeatureStore true, Compare.GE, feature.getBegin()); contactFeatureStarts.add(insertPosition, feature); - /* * insert into list sorted by end (second contact position): * binary search the sorted list to find the insertion point */ - insertPosition = BinarySearcher.findFirst(contactFeatureEnds, - false, Compare.GE, feature.getEnd()); + insertPosition = BinarySearcher.findFirst(contactFeatureEnds, false, + Compare.GE, feature.getEnd()); contactFeatureEnds.add(insertPosition, feature); return true; @@ -395,16 +393,16 @@ public class FeatureStore * find the first contact feature (if any) * whose end point is not before the target range */ - int index = BinarySearcher.findFirst(contactFeatureEnds, - false, Compare.GE, (int) from); + int index = BinarySearcher.findFirst(contactFeatureEnds, false, + Compare.GE, (int) from); while (index < contactFeatureEnds.size()) { SequenceFeature sf = contactFeatureEnds.get(index); if (!sf.isContactFeature()) { - System.err.println("Error! non-contact feature type " - + sf.getType() + " in contact features list"); + System.err.println("Error! non-contact feature type " + sf.getType() + + " in contact features list"); index++; continue; } @@ -448,8 +446,8 @@ public class FeatureStore protected void findContactStartOverlaps(long from, long to, List result) { - int index = BinarySearcher.findFirst(contactFeatureStarts, - true, Compare.GE, (int) from); + int index = BinarySearcher.findFirst(contactFeatureStarts, true, + Compare.GE, (int) from); while (index < contactFeatureStarts.size()) { @@ -675,10 +673,9 @@ public class FeatureStore public boolean isEmpty() { boolean hasFeatures = (contactFeatureStarts != null - && !contactFeatureStarts - .isEmpty()) - || (nonPositionalFeatures != null && !nonPositionalFeatures - .isEmpty()) + && !contactFeatureStarts.isEmpty()) + || (nonPositionalFeatures != null + && !nonPositionalFeatures.isEmpty()) || (features != null && features.size() > 0); return !hasFeatures; @@ -700,9 +697,9 @@ public class FeatureStore } else { - return nonPositionalFeatureGroups == null ? Collections - . emptySet() : Collections - .unmodifiableSet(nonPositionalFeatureGroups); + return nonPositionalFeatureGroups == null + ? Collections. emptySet() + : Collections.unmodifiableSet(nonPositionalFeatureGroups); } } @@ -717,8 +714,8 @@ public class FeatureStore { if (!positional) { - return nonPositionalFeatures == null ? 0 : nonPositionalFeatures - .size(); + return nonPositionalFeatures == null ? 0 + : nonPositionalFeatures.size(); } int size = 0; @@ -802,8 +799,8 @@ public class FeatureStore for (SequenceFeature sf : sfs) { String featureGroup = sf.getFeatureGroup(); - if (group == null && featureGroup == null || group != null - && group.equals(featureGroup)) + if (group == null && featureGroup == null + || group != null && group.equals(featureGroup)) { result.add(sf); } diff --git a/src/jalview/datamodel/features/SequenceFeatures.java b/src/jalview/datamodel/features/SequenceFeatures.java index 8ac4991..905fd8b 100644 --- a/src/jalview/datamodel/features/SequenceFeatures.java +++ b/src/jalview/datamodel/features/SequenceFeatures.java @@ -151,8 +151,8 @@ public class SequenceFeatures implements SequenceFeaturesI return new ArrayList<>(); } - return getAllFeatures(featureTypes.toArray(new String[featureTypes - .size()])); + return getAllFeatures( + featureTypes.toArray(new String[featureTypes.size()])); } /** @@ -320,8 +320,8 @@ public class SequenceFeatures implements SequenceFeaturesI for (Entry featureType : featureStore.entrySet()) { - Set featureGroups = featureType.getValue().getFeatureGroups( - positionalFeatures); + Set featureGroups = featureType.getValue() + .getFeatureGroups(positionalFeatures); for (String group : groups) { if (featureGroups.contains(group)) @@ -389,8 +389,9 @@ public class SequenceFeatures implements SequenceFeaturesI @Override public float getMinimumScore(String type, boolean positional) { - return featureStore.containsKey(type) ? featureStore.get(type) - .getMinimumScore(positional) : Float.NaN; + return featureStore.containsKey(type) + ? featureStore.get(type).getMinimumScore(positional) + : Float.NaN; } /** @@ -399,8 +400,9 @@ public class SequenceFeatures implements SequenceFeaturesI @Override public float getMaximumScore(String type, boolean positional) { - return featureStore.containsKey(type) ? featureStore.get(type) - .getMaximumScore(positional) : Float.NaN; + return featureStore.containsKey(type) + ? featureStore.get(type).getMaximumScore(positional) + : Float.NaN; } /** @@ -414,8 +416,7 @@ public class SequenceFeatures implements SequenceFeaturesI final boolean forwardStrand) { Collections.sort(features, - forwardStrand - ? IntervalI.COMPARE_BEGIN_ASC_END_DESC + forwardStrand ? IntervalI.COMPARE_BEGIN_ASC_END_DESC : IntervalI.COMPARE_END_DESC); } diff --git a/src/jalview/datamodel/features/SequenceFeaturesI.java b/src/jalview/datamodel/features/SequenceFeaturesI.java index 7213cba..ca14278 100644 --- a/src/jalview/datamodel/features/SequenceFeaturesI.java +++ b/src/jalview/datamodel/features/SequenceFeaturesI.java @@ -50,8 +50,7 @@ public interface SequenceFeaturesI * @param type * @return */ - List findFeatures(int from, int to, - String... type); + List findFeatures(int from, int to, String... type); /** * Answers a list of all features stored, in no particular guaranteed order. @@ -118,8 +117,7 @@ public interface SequenceFeaturesI * @param type * @return */ - List getPositionalFeatures( - String... type); + List getPositionalFeatures(String... type); /** * Answers a list of all contact features, optionally restricted to specified @@ -137,8 +135,7 @@ public interface SequenceFeaturesI * if no type is specified, all are returned * @return */ - List getNonPositionalFeatures( - String... type); + List getNonPositionalFeatures(String... type); /** * Deletes the given feature from the store, returning true if it was found @@ -168,8 +165,7 @@ public interface SequenceFeaturesI * @param type * @return */ - Set getFeatureGroups(boolean positionalFeatures, - String... type); + Set getFeatureGroups(boolean positionalFeatures, String... type); /** * Answers the set of distinct feature types for which there is at least one @@ -181,8 +177,8 @@ public interface SequenceFeaturesI * @param groups * @return */ - Set getFeatureTypesForGroups( - boolean positionalFeatures, String... groups); + Set getFeatureTypesForGroups(boolean positionalFeatures, + String... groups); /** * Answers a set of the distinct feature types for which a feature is stored. diff --git a/src/jalview/ext/android/SparseDoubleArray.java b/src/jalview/ext/android/SparseDoubleArray.java index ea6265f..7b8b030 100644 --- a/src/jalview/ext/android/SparseDoubleArray.java +++ b/src/jalview/ext/android/SparseDoubleArray.java @@ -183,8 +183,8 @@ public class SparseDoubleArray implements Cloneable public void removeAt(int index) { System.arraycopy(mKeys, index + 1, mKeys, index, mSize - (index + 1)); - System.arraycopy(mValues, index + 1, mValues, index, mSize - - (index + 1)); + System.arraycopy(mValues, index + 1, mValues, index, + mSize - (index + 1)); mSize--; } diff --git a/src/jalview/ext/android/SparseIntArray.java b/src/jalview/ext/android/SparseIntArray.java index d67121b..6344092 100644 --- a/src/jalview/ext/android/SparseIntArray.java +++ b/src/jalview/ext/android/SparseIntArray.java @@ -166,8 +166,8 @@ public class SparseIntArray implements Cloneable public void removeAt(int index) { System.arraycopy(mKeys, index + 1, mKeys, index, mSize - (index + 1)); - System.arraycopy(mValues, index + 1, mValues, index, mSize - - (index + 1)); + System.arraycopy(mValues, index + 1, mValues, index, + mSize - (index + 1)); mSize--; } @@ -436,16 +436,16 @@ public class SparseIntArray implements Cloneable { if (value > 0 && Integer.MAX_VALUE - value < addend) { - throw new ArithmeticException("Integer overflow adding " + addend - + " to " + value); + throw new ArithmeticException( + "Integer overflow adding " + addend + " to " + value); } } else if (addend < 0) { if (value < 0 && Integer.MIN_VALUE - value > addend) { - throw new ArithmeticException("Integer underflow adding " + addend - + " to " + value); + throw new ArithmeticException( + "Integer underflow adding " + addend + " to " + value); } } } diff --git a/src/jalview/ext/android/SparseShortArray.java b/src/jalview/ext/android/SparseShortArray.java index 6cd8019..7dbcb5a 100644 --- a/src/jalview/ext/android/SparseShortArray.java +++ b/src/jalview/ext/android/SparseShortArray.java @@ -177,8 +177,8 @@ public class SparseShortArray implements Cloneable public void removeAt(int index) { System.arraycopy(mKeys, index + 1, mKeys, index, mSize - (index + 1)); - System.arraycopy(mValues, index + 1, mValues, index, mSize - - (index + 1)); + System.arraycopy(mValues, index + 1, mValues, index, + mSize - (index + 1)); mSize--; } diff --git a/src/jalview/ext/ensembl/EnsemblCds.java b/src/jalview/ext/ensembl/EnsemblCds.java index 8f13d99..f397412 100644 --- a/src/jalview/ext/ensembl/EnsemblCds.java +++ b/src/jalview/ext/ensembl/EnsemblCds.java @@ -116,7 +116,7 @@ public class EnsemblCds extends EnsemblSeqProxy for (SequenceFeature sf : sfs) { String parentFeature = (String) sf.getValue(PARENT); - if ( accId.equals(parentFeature)) + if (accId.equals(parentFeature)) { result.add(sf); } diff --git a/src/jalview/ext/ensembl/EnsemblFeatures.java b/src/jalview/ext/ensembl/EnsemblFeatures.java index e28cc7f..5649859 100644 --- a/src/jalview/ext/ensembl/EnsemblFeatures.java +++ b/src/jalview/ext/ensembl/EnsemblFeatures.java @@ -91,12 +91,12 @@ class EnsemblFeatures extends EnsemblRestClient public AlignmentI getSequenceRecords(String query) throws IOException { // TODO: use a vararg String... for getSequenceRecords instead? - + List queries = new ArrayList<>(); queries.add(query); SequenceI seq = parseFeaturesJson(queries); if (seq == null) - return null; + return null; return new Alignment(new SequenceI[] { seq }); } @@ -114,13 +114,14 @@ class EnsemblFeatures extends EnsemblRestClient SequenceI seq = new Sequence("Dummy", ""); try { - Iterator rvals = (Iterator) getJSON(null, queries, -1, MODE_ITERATOR, null); + Iterator rvals = (Iterator) getJSON(null, queries, -1, + MODE_ITERATOR, null); if (rvals == null) { - return null; + return null; } while (rvals.hasNext()) - { + { try { Map obj = (Map) rvals.next(); @@ -132,9 +133,8 @@ class EnsemblFeatures extends EnsemblRestClient Object phase = obj.get("phase"); String alleles = JSONUtils .arrayToStringList((List) obj.get("alleles")); - String clinSig = JSONUtils - .arrayToStringList( - (List) obj.get("clinical_significance")); + String clinSig = JSONUtils.arrayToStringList( + (List) obj.get("clinical_significance")); /* * convert 'variation' to 'sequence_variant', and 'cds' to 'CDS' @@ -166,7 +166,7 @@ class EnsemblFeatures extends EnsemblRestClient sf.setValue("clinical_significance", clinSig); seq.addSequenceFeature(sf); - + } catch (Throwable t) { // ignore - keep trying other features @@ -174,7 +174,7 @@ class EnsemblFeatures extends EnsemblRestClient } } catch (ParseException | IOException e) { - e.printStackTrace(); + e.printStackTrace(); // ignore } @@ -218,8 +218,8 @@ class EnsemblFeatures extends EnsemblRestClient * @param obj * @param key */ - protected void setFeatureAttribute(SequenceFeature sf, Map obj, - String key) + protected void setFeatureAttribute(SequenceFeature sf, + Map obj, String key) { Object object = obj.get(key); if (object != null) diff --git a/src/jalview/ext/ensembl/EnsemblGene.java b/src/jalview/ext/ensembl/EnsemblGene.java index ac756fc..75a7154 100644 --- a/src/jalview/ext/ensembl/EnsemblGene.java +++ b/src/jalview/ext/ensembl/EnsemblGene.java @@ -151,7 +151,7 @@ public class EnsemblGene extends EnsemblSeqProxy { continue; } - + if (geneAlignment.getHeight() == 1) { // ensure id has 'correct' case for the Ensembl identifier @@ -318,8 +318,8 @@ public class EnsemblGene extends EnsemblSeqProxy SequenceOntologyI.NMD_TRANSCRIPT_VARIANT, SequenceOntologyI.TRANSCRIPT, SequenceOntologyI.EXON, SequenceOntologyI.CDS }; - List sfs = gene.getFeatures().getFeaturesByOntology( - soTerms); + List sfs = gene.getFeatures() + .getFeaturesByOntology(soTerms); for (SequenceFeature sf : sfs) { gene.deleteFeature(sf); @@ -469,8 +469,9 @@ public class EnsemblGene extends EnsemblSeqProxy transcriptLoci.add(geneMapping.locateInTo(exon[0], exon[1])); } - List transcriptRange = Arrays.asList(new int[] { - transcript.getStart(), transcript.getEnd() }); + List transcriptRange = Arrays + .asList(new int[] + { transcript.getStart(), transcript.getEnd() }); MapList mapList = new MapList(transcriptRange, transcriptLoci, 1, 1); transcript.setGeneLoci(loci.getSpeciesId(), loci.getAssemblyId(), diff --git a/src/jalview/ext/ensembl/EnsemblInfo.java b/src/jalview/ext/ensembl/EnsemblInfo.java index e2d2725..a32edb3 100644 --- a/src/jalview/ext/ensembl/EnsemblInfo.java +++ b/src/jalview/ext/ensembl/EnsemblInfo.java @@ -110,17 +110,21 @@ public class EnsemblInfo extends EnsemblRestClient /* * for convenience, pre-fill ensembl.org as the domain for "ENSEMBL" */ - divisions.put(DBRefSource.ENSEMBL.toUpperCase(Locale.ROOT), ensemblDomain); + divisions.put(DBRefSource.ENSEMBL.toUpperCase(Locale.ROOT), + ensemblDomain); try { @SuppressWarnings("unchecked") - Iterator rvals = (Iterator) getJSON(getDivisionsUrl(ensemblGenomesDomain), null, -1, MODE_ITERATOR, null); + Iterator rvals = (Iterator) getJSON( + getDivisionsUrl(ensemblGenomesDomain), null, -1, + MODE_ITERATOR, null); if (rvals == null) - return; + return; while (rvals.hasNext()) { String division = rvals.next().toString(); - divisions.put(division.toUpperCase(Locale.ROOT), ensemblGenomesDomain); + divisions.put(division.toUpperCase(Locale.ROOT), + ensemblGenomesDomain); } } catch (IOException | ParseException | NumberFormatException e) { @@ -130,15 +134,17 @@ public class EnsemblInfo extends EnsemblRestClient /** * Constructs the URL for the EnsemblGenomes /info/divisions REST service - * @param domain TODO + * + * @param domain + * TODO * * @return * @throws MalformedURLException */ URL getDivisionsUrl(String domain) throws MalformedURLException { - return new URL(domain - + "/info/divisions?content-type=application/json"); + return new URL( + domain + "/info/divisions?content-type=application/json"); } /** @@ -146,7 +152,8 @@ public class EnsemblInfo extends EnsemblRestClient * * @return */ - public Set getDivisions() { + public Set getDivisions() + { if (divisions == null) { fetchDivisions(); diff --git a/src/jalview/ext/ensembl/EnsemblLookup.java b/src/jalview/ext/ensembl/EnsemblLookup.java index 3dca1b7..0813ba8 100644 --- a/src/jalview/ext/ensembl/EnsemblLookup.java +++ b/src/jalview/ext/ensembl/EnsemblLookup.java @@ -202,8 +202,8 @@ public class EnsemblLookup extends EnsemblRestClient } /** - * Calls the /lookup/id rest service and returns the response as a Map, - * or null if any error + * Calls the /lookup/id rest service and returns the response as a Map, or null if any error * * @param identifier * @param objectType @@ -211,15 +211,16 @@ public class EnsemblLookup extends EnsemblRestClient * @return */ @SuppressWarnings("unchecked") - protected Map getResult(String identifier, String objectType) + protected Map getResult(String identifier, + String objectType) { List ids = Arrays.asList(new String[] { identifier }); try { - return (Map) getJSON(getUrl(identifier, objectType), ids, -1, MODE_MAP, null); - } - catch (IOException | ParseException e) + return (Map) getJSON(getUrl(identifier, objectType), + ids, -1, MODE_MAP, null); + } catch (IOException | ParseException e) { System.err.println("Error parsing " + identifier + " lookup response " + e.getMessage()); @@ -266,10 +267,12 @@ public class EnsemblLookup extends EnsemblRestClient boolean reverseStrand = "-1".equals(strand); int toStart = reverseStrand ? end : start; int toEnd = reverseStrand ? start : end; - List fromRange = Collections.singletonList(new int[] { 1, - fromEnd }); - List toRange = Collections.singletonList(new int[] { toStart, - toEnd }); + List fromRange = Collections + .singletonList(new int[] + { 1, fromEnd }); + List toRange = Collections + .singletonList(new int[] + { toStart, toEnd }); final Mapping map = new Mapping( new MapList(fromRange, toRange, 1, 1)); return new GeneLocus(species == null ? "" : species, assembly, diff --git a/src/jalview/ext/ensembl/EnsemblMap.java b/src/jalview/ext/ensembl/EnsemblMap.java index cfc679c..f2ab195 100644 --- a/src/jalview/ext/ensembl/EnsemblMap.java +++ b/src/jalview/ext/ensembl/EnsemblMap.java @@ -104,8 +104,8 @@ public class EnsemblMap extends EnsemblRestClient * @return * @throws MalformedURLException */ - protected URL getAssemblyMapUrl(String species, String chromosome, String fromRef, - String toRef, int startPos, int endPos) + protected URL getAssemblyMapUrl(String species, String chromosome, + String fromRef, String toRef, int startPos, int endPos) throws MalformedURLException { /* @@ -152,8 +152,8 @@ public class EnsemblMap extends EnsemblRestClient URL url = null; try { - url = getAssemblyMapUrl(species, chromosome, fromRef, toRef, queryRange[0], - queryRange[1]); + url = getAssemblyMapUrl(species, chromosome, fromRef, toRef, + queryRange[0], queryRange[1]); return (parseAssemblyMappingResponse(url)); } catch (Throwable t) { @@ -184,7 +184,8 @@ public class EnsemblMap extends EnsemblRestClient try { - Iterator rvals = (Iterator) getJSON(url, null, -1, MODE_ITERATOR, MAPPINGS); + Iterator rvals = (Iterator) getJSON(url, null, -1, + MODE_ITERATOR, MAPPINGS); if (rvals == null) { return null; @@ -285,9 +286,9 @@ public class EnsemblMap extends EnsemblRestClient URL getIdMapUrl(String domain, String accession, int start, int end, String cdsOrCdna) throws MalformedURLException { - String url = String - .format("%s/map/%s/%s/%d..%d?include_original_region=1&content-type=application/json", - domain, cdsOrCdna, accession, start, end); + String url = String.format( + "%s/map/%s/%s/%d..%d?include_original_region=1&content-type=application/json", + domain, cdsOrCdna, accession, start, end); return new URL(url); } @@ -312,13 +313,13 @@ public class EnsemblMap extends EnsemblRestClient * @return */ @SuppressWarnings("unchecked") -GeneLociI parseIdMappingResponse(URL url, String accession, - String domain) + GeneLociI parseIdMappingResponse(URL url, String accession, String domain) { try { - Iterator rvals = (Iterator) getJSON(url, null, -1, MODE_ITERATOR, MAPPINGS); + Iterator rvals = (Iterator) getJSON(url, null, -1, + MODE_ITERATOR, MAPPINGS); if (rvals == null) { return null; @@ -331,7 +332,8 @@ GeneLociI parseIdMappingResponse(URL url, String accession, while (rvals.hasNext()) { Map val = (Map) rvals.next(); - Map original = (Map) val.get("original"); + Map original = (Map) val + .get("original"); fromEnd = Integer.parseInt(original.get("end").toString()); Map mapped = (Map) val.get(MAPPED); @@ -340,16 +342,16 @@ GeneLociI parseIdMappingResponse(URL url, String accession, String ass = mapped.get("assembly_name").toString(); if (assembly != null && !assembly.equals(ass)) { - System.err - .println("EnsemblMap found multiple assemblies - can't resolve"); + System.err.println( + "EnsemblMap found multiple assemblies - can't resolve"); return null; } assembly = ass; String chr = mapped.get("seq_region_name").toString(); if (chromosome != null && !chromosome.equals(chr)) { - System.err - .println("EnsemblMap found multiple chromosomes - can't resolve"); + System.err.println( + "EnsemblMap found multiple chromosomes - can't resolve"); return null; } chromosome = chr; @@ -372,8 +374,9 @@ GeneLociI parseIdMappingResponse(URL url, String accession, .getSpecies(accession); final String as = assembly; final String chr = chromosome; - List fromRange = Collections.singletonList(new int[] { 1, - fromEnd }); + List fromRange = Collections + .singletonList(new int[] + { 1, fromEnd }); Mapping mapping = new Mapping(new MapList(fromRange, regions, 1, 1)); return new GeneLocus(species == null ? "" : species, as, chr, mapping); diff --git a/src/jalview/ext/ensembl/EnsemblSeqProxy.java b/src/jalview/ext/ensembl/EnsemblSeqProxy.java index e4fa53d..56eda5e 100644 --- a/src/jalview/ext/ensembl/EnsemblSeqProxy.java +++ b/src/jalview/ext/ensembl/EnsemblSeqProxy.java @@ -170,7 +170,7 @@ public abstract class EnsemblSeqProxy extends EnsemblRestClient * fetch and transfer genomic sequence features, * fetch protein product and add as cross-reference */ - for (int i = 0, n = allIds.size(); i < n; i++) + for (int i = 0, n = allIds.size(); i < n; i++) { addFeaturesAndProduct(allIds.get(i), alignment); } @@ -208,19 +208,19 @@ public abstract class EnsemblSeqProxy extends EnsemblRestClient */ SequenceI genomicSequence = null; EnsemblFeatures gffFetcher = new EnsemblFeatures(getDomain()); - EnsemblFeatureType[] features = getFeaturesToFetch(); - + EnsemblFeatureType[] features = getFeaturesToFetch(); + // Platform.timeCheck("ESP.getsequencerec1", Platform.TIME_MARK); - + AlignmentI geneFeatures = gffFetcher.getSequenceRecords(accId, features); if (geneFeatures != null && geneFeatures.getHeight() > 0) { genomicSequence = geneFeatures.getSequenceAt(0); } - + // Platform.timeCheck("ESP.getsequencerec2", Platform.TIME_MARK); - + if (genomicSequence != null) { /* @@ -295,8 +295,8 @@ public abstract class EnsemblSeqProxy extends EnsemblRestClient List uprots = DBRefUtils.selectRefs(ds.getDBRefs(), new String[] { DBRefSource.UNIPROT }); - List upxrefs = DBRefUtils.selectRefs(querySeq.getDBRefs(), - new String[] + List upxrefs = DBRefUtils + .selectRefs(querySeq.getDBRefs(), new String[] { DBRefSource.UNIPROT }); if (uprots != null) { @@ -356,10 +356,9 @@ public abstract class EnsemblSeqProxy extends EnsemblRestClient */ protected void getCrossReferences(SequenceI seq) { - + // Platform.timeCheck("ESP. getdataseq ", Platform.TIME_MARK); - while (seq.getDatasetSequence() != null) { seq = seq.getDatasetSequence(); @@ -370,31 +369,33 @@ public abstract class EnsemblSeqProxy extends EnsemblRestClient EnsemblXref xrefFetcher = new EnsemblXref(getDomain(), getDbSource(), getEnsemblDataVersion()); List xrefs = xrefFetcher.getCrossReferences(seq.getName()); - + for (int i = 0, n = xrefs.size(); i < n; i++) { -// Platform.timeCheck("ESP. getxref + " + (i) + "/" + n, Platform.TIME_MARK); - // BH 2019.01.25 this next method was taking 174 ms PER addition for a 266-reference example. - // DBRefUtils.ensurePrimaries(seq) - // was at the end of seq.addDBRef, so executed after ever addition! - // This method was moved to seq.getPrimaryDBRefs() + // Platform.timeCheck("ESP. getxref + " + (i) + "/" + n, + // Platform.TIME_MARK); + // BH 2019.01.25 this next method was taking 174 ms PER addition for a + // 266-reference example. + // DBRefUtils.ensurePrimaries(seq) + // was at the end of seq.addDBRef, so executed after ever addition! + // This method was moved to seq.getPrimaryDBRefs() seq.addDBRef(xrefs.get(i)); } -// System.out.println("primaries are " + seq.getPrimaryDBRefs().toString()); + // System.out.println("primaries are " + seq.getPrimaryDBRefs().toString()); /* * and add a reference to itself */ - -// Platform.timeCheck("ESP. getxref self ", Platform.TIME_MARK); + + // Platform.timeCheck("ESP. getxref self ", Platform.TIME_MARK); DBRefEntry self = new DBRefEntry(getDbSource(), getEnsemblDataVersion(), - seq.getName()); + seq.getName()); -// Platform.timeCheck("ESP. getxref self add ", Platform.TIME_MARK); + // Platform.timeCheck("ESP. getxref self add ", Platform.TIME_MARK); seq.addDBRef(self); - + // Platform.timeCheck("ESP. seqprox done ", Platform.TIME_MARK); } @@ -420,7 +421,7 @@ public abstract class EnsemblSeqProxy extends EnsemblRestClient List seqs = parseSequenceJson(ids); if (seqs == null) - return alignment; + return alignment; if (seqs.isEmpty()) { @@ -484,9 +485,10 @@ public abstract class EnsemblSeqProxy extends EnsemblRestClient * in future to handle a JSONArray with more than one */ // Platform.timeCheck("ENS seqproxy", Platform.TIME_MARK); - Map val = (Map) getJSON(null, ids, -1, MODE_MAP, null); + Map val = (Map) getJSON(null, ids, -1, + MODE_MAP, null); if (val == null) - return null; + return null; Object s = val.get("desc"); String desc = s == null ? null : s.toString(); s = val.get("id"); @@ -689,9 +691,9 @@ public abstract class EnsemblSeqProxy extends EnsemblRestClient */ protected abstract List getIdentifyingFeatures( SequenceI seq, String accId); - + int bhtest = 0; - + /** * Transfers the sequence feature to the target sequence, locating its start * and end range based on the mapping. Features which do not overlap the @@ -713,7 +715,7 @@ public abstract class EnsemblSeqProxy extends EnsemblRestClient if (mappedRange != null) { -// Platform.timeCheck(null, Platform.TIME_SET); + // Platform.timeCheck(null, Platform.TIME_SET); String group = sf.getFeatureGroup(); if (".".equals(group)) { @@ -721,10 +723,11 @@ public abstract class EnsemblSeqProxy extends EnsemblRestClient } int newBegin = Math.min(mappedRange[0], mappedRange[1]); int newEnd = Math.max(mappedRange[0], mappedRange[1]); -// Platform.timeCheck(null, Platform.TIME_MARK); + // Platform.timeCheck(null, Platform.TIME_MARK); bhtest++; // 280 ms/1000 here: - SequenceFeature copy = new SequenceFeature(sf, newBegin, newEnd, group, sf.getScore()); + SequenceFeature copy = new SequenceFeature(sf, newBegin, newEnd, + group, sf.getScore()); // 0.175 ms here: targetSequence.addSequenceFeature(copy); @@ -812,13 +815,13 @@ public abstract class EnsemblSeqProxy extends EnsemblRestClient return false; } -// long start = System.currentTimeMillis(); + // long start = System.currentTimeMillis(); List sfs = sourceSequence.getFeatures() .getPositionalFeatures(); MapList mapping = getGenomicRangesFromFeatures(sourceSequence, accessionId, targetSequence.getStart()); if (mapping == null) - { + { return false; } @@ -826,10 +829,10 @@ public abstract class EnsemblSeqProxy extends EnsemblRestClient boolean result = transferFeatures(sfs, targetSequence, mapping, accessionId); -// System.out.println("transferFeatures (" + (sfs.size()) + " --> " -// + targetSequence.getFeatures().getFeatureCount(true) + ") to " -// + targetSequence.getName() + " took " -// + (System.currentTimeMillis() - start) + "ms"); + // System.out.println("transferFeatures (" + (sfs.size()) + " --> " + // + targetSequence.getFeatures().getFeatureCount(true) + ") to " + // + targetSequence.getName() + " took " + // + (System.currentTimeMillis() - start) + "ms"); return result; } @@ -857,14 +860,15 @@ public abstract class EnsemblSeqProxy extends EnsemblRestClient SequenceFeatures.sortFeatures(sfs, forwardStrand); boolean transferred = false; - + for (int i = 0, n = sfs.size(); i < n; i++) { -// if ((i%1000) == 0) { -//// Platform.timeCheck("Feature " + bhtest, Platform.TIME_GET); -// Platform.timeCheck("ESP. xferFeature + " + (i) + "/" + n, Platform.TIME_MARK); -// } + // if ((i%1000) == 0) { + //// Platform.timeCheck("Feature " + bhtest, Platform.TIME_GET); + // Platform.timeCheck("ESP. xferFeature + " + (i) + "/" + n, + // Platform.TIME_MARK); + // } SequenceFeature sf = sfs.get(i); if (retainFeature(sf, parentId)) @@ -901,8 +905,7 @@ public abstract class EnsemblSeqProxy extends EnsemblRestClient protected boolean featureMayBelong(SequenceFeature sf, String identifier) { String parent = (String) sf.getValue(PARENT); - if (parent != null - && !parent.equalsIgnoreCase(identifier)) + if (parent != null && !parent.equalsIgnoreCase(identifier)) { // this genomic feature belongs to a different transcript return false; diff --git a/src/jalview/ext/ensembl/EnsemblSequenceFetcher.java b/src/jalview/ext/ensembl/EnsemblSequenceFetcher.java index 7454eb6..66b0e3b 100644 --- a/src/jalview/ext/ensembl/EnsemblSequenceFetcher.java +++ b/src/jalview/ext/ensembl/EnsemblSequenceFetcher.java @@ -92,8 +92,8 @@ abstract class EnsemblSequenceFetcher extends DbSourceProxyImpl * the default domain names may be overridden in .jalview_properties; * this allows an easy change from http to https in future if needed */ - ensemblDomain = Cache.getDefault(ENSEMBL_BASEURL, - DEFAULT_ENSEMBL_BASEURL).trim(); + ensemblDomain = Cache + .getDefault(ENSEMBL_BASEURL, DEFAULT_ENSEMBL_BASEURL).trim(); ensemblGenomesDomain = Cache.getDefault(ENSEMBL_GENOMES_BASEURL, DEFAULT_ENSEMBL_GENOMES_BASEURL).trim(); domain = ensemblDomain; diff --git a/src/jalview/ext/ensembl/EnsemblSymbol.java b/src/jalview/ext/ensembl/EnsemblSymbol.java index f731e94..ef79d72 100644 --- a/src/jalview/ext/ensembl/EnsemblSymbol.java +++ b/src/jalview/ext/ensembl/EnsemblSymbol.java @@ -40,7 +40,9 @@ import org.json.simple.parser.ParseException; public class EnsemblSymbol extends EnsemblXref { private static final String GENE = "gene"; + private static final String TYPE = "type"; + /** * Constructor given the target domain to fetch data from * @@ -53,18 +55,18 @@ public class EnsemblSymbol extends EnsemblXref super(domain, dbName, dbVersion); } -// /** -// * Returns the first "id" value in gene identifier format from the JSON -// * response, or null if none found -// * -// * @param br -// * @return -// * @throws IOException -// */ -// @SuppressWarnings("unchecked") -//protected String parseSymbolResponse(BufferedReader br) throws IOException -// { -// } + // /** + // * Returns the first "id" value in gene identifier format from the JSON + // * response, or null if none found + // * + // * @param br + // * @return + // * @throws IOException + // */ + // @SuppressWarnings("unchecked") + // protected String parseSymbolResponse(BufferedReader br) throws IOException + // { + // } /** * Constructs the URL for the REST symbol endpoint @@ -119,12 +121,14 @@ public class EnsemblSymbol extends EnsemblXref { for (Species taxon : Species.getModelOrganisms()) { - String geneId = null;///parseSymbolResponse(br); + String geneId = null;/// parseSymbolResponse(br); try { - Iterator rvals = (Iterator) getJSON(getUrl(query, taxon, GENE), ids, -1, MODE_ITERATOR, null); + Iterator rvals = (Iterator) getJSON( + getUrl(query, taxon, GENE), ids, -1, MODE_ITERATOR, + null); if (rvals == null) - continue; + continue; while (rvals.hasNext()) { Map val = (Map) rvals.next(); @@ -140,7 +144,7 @@ public class EnsemblSymbol extends EnsemblXref { // ignore } - + if (geneId != null && !result.contains(geneId)) { result.add(geneId); diff --git a/src/jalview/ext/ensembl/EnsemblXref.java b/src/jalview/ext/ensembl/EnsemblXref.java index eedfe97..4eeb977 100644 --- a/src/jalview/ext/ensembl/EnsemblXref.java +++ b/src/jalview/ext/ensembl/EnsemblXref.java @@ -107,14 +107,14 @@ class EnsemblXref extends EnsemblRestClient try { - Iterator rvals = (Iterator) getJSON(getUrl(identifier), ids, -1, MODE_ITERATOR, null); + Iterator rvals = (Iterator) getJSON( + getUrl(identifier), ids, -1, MODE_ITERATOR, null); while (rvals.hasNext()) { Map val = (Map) rvals.next(); String db = val.get("dbname").toString(); String id = val.get("primary_id").toString(); - if (db != null && id != null - && !GO_GENE_ONTOLOGY.equals(db)) + if (db != null && id != null && !GO_GENE_ONTOLOGY.equals(db)) { db = DBRefUtils.getCanonicalName(db); DBRefEntry dbref = new DBRefEntry(db, getXRefVersion(), id); @@ -128,23 +128,24 @@ class EnsemblXref extends EnsemblRestClient return result; } -// /** -// * Parses "primary_id" and "dbname" values from the JSON response and -// * constructs a DBRefEntry. Returns a list of the DBRefEntry created. Note we -// * don't parse "synonyms" as they appear to be either redirected or obsolete -// * in Uniprot. -// * -// * @param br -// * @return -// * @throws IOException -// */ -// @SuppressWarnings("unchecked") -//protected List parseResponse(BufferedReader br) -// throws IOException -// { -// return result; -// } -// + // /** + // * Parses "primary_id" and "dbname" values from the JSON response and + // * constructs a DBRefEntry. Returns a list of the DBRefEntry created. Note + // we + // * don't parse "synonyms" as they appear to be either redirected or obsolete + // * in Uniprot. + // * + // * @param br + // * @return + // * @throws IOException + // */ + // @SuppressWarnings("unchecked") + // protected List parseResponse(BufferedReader br) + // throws IOException + // { + // return result; + // } + // private String xrefVersion = "ENSEMBL:0"; /** @@ -167,8 +168,8 @@ class EnsemblXref extends EnsemblRestClient */ protected URL getUrl(String identifier) { - String url = getDomain() + "/xrefs/id/" + identifier - + CONTENT_TYPE_JSON + "&all_levels=1"; + String url = getDomain() + "/xrefs/id/" + identifier + CONTENT_TYPE_JSON + + "&all_levels=1"; try { return new URL(url); diff --git a/src/jalview/ext/ensembl/Species.java b/src/jalview/ext/ensembl/Species.java index 3feea05..afa8d54 100644 --- a/src/jalview/ext/ensembl/Species.java +++ b/src/jalview/ext/ensembl/Species.java @@ -36,10 +36,10 @@ enum Species * valid species parameters to Ensembl REST services where applicable */ human(true), mouse(true), s_cerevisiae(true), cow(false), pig(false), - rattus_norvegicus(true), celegans(true), sheep(false), horse(false), gorilla(false), - rabbit(false), gibbon(false), dog(false), orangutan(false), xenopus_tropicalis(true), - chimpanzee(false), cat(false), zebrafish(true), chicken(true), - drosophila_melanogaster(true); + rattus_norvegicus(true), celegans(true), sheep(false), horse(false), + gorilla(false), rabbit(false), gibbon(false), dog(false), + orangutan(false), xenopus_tropicalis(true), chimpanzee(false), cat(false), + zebrafish(true), chicken(true), drosophila_melanogaster(true); static Set modelOrganisms = new HashSet<>(); @@ -53,6 +53,7 @@ enum Species } } } + boolean modelOrganism; private Species(boolean model) diff --git a/src/jalview/ext/htsjdk/HtsContigDb.java b/src/jalview/ext/htsjdk/HtsContigDb.java index 73d1674..9a985b6 100644 --- a/src/jalview/ext/htsjdk/HtsContigDb.java +++ b/src/jalview/ext/htsjdk/HtsContigDb.java @@ -251,8 +251,8 @@ public class HtsContigDb // ///// end of hts bits. /** - * Reads the contig with the given id and returns as a Jalview SequenceI object. - * Note the database must be indexed for this operation to succeed. + * Reads the contig with the given id and returns as a Jalview SequenceI + * object. Note the database must be indexed for this operation to succeed. * * @param id * @return diff --git a/src/jalview/ext/htsjdk/VCFReader.java b/src/jalview/ext/htsjdk/VCFReader.java index e91164a..176b21d 100644 --- a/src/jalview/ext/htsjdk/VCFReader.java +++ b/src/jalview/ext/htsjdk/VCFReader.java @@ -47,10 +47,12 @@ public class VCFReader implements Closeable, Iterable private VCFFileReader reader; /** - * Constructor given a raw or compressed VCF file or a (csi or tabix) index file + * Constructor given a raw or compressed VCF file or a (csi or tabix) index + * file *

- * If the file path ends in ".tbi" or ".csi", or appending one of these - * extensions gives a valid file path, open as indexed, else as unindexed. + * If the file path ends in ".tbi" or ".csi", or appending one of + * these extensions gives a valid file path, open as indexed, else as + * unindexed. * * @param f * @throws IOException @@ -153,7 +155,7 @@ public class VCFReader implements Closeable, Iterable final String chrom, final int start, final int end) { final CloseableIterator it = reader.iterator(); - + return new CloseableIterator() { boolean atEnd = false; diff --git a/src/jalview/ext/jmol/JmolCommands.java b/src/jalview/ext/jmol/JmolCommands.java index 8b67ad9..58b69ef 100644 --- a/src/jalview/ext/jmol/JmolCommands.java +++ b/src/jalview/ext/jmol/JmolCommands.java @@ -55,7 +55,8 @@ public class JmolCommands extends StructureCommandsBase private static final StructureCommand SHOW_BACKBONE = new StructureCommand( "select *; cartoons off; backbone"); - private static final StructureCommand FOCUS_VIEW = new StructureCommand("zoom 0"); + private static final StructureCommand FOCUS_VIEW = new StructureCommand( + "zoom 0"); private static final StructureCommand COLOUR_ALL_WHITE = new StructureCommand( "select *;color white;"); @@ -113,7 +114,8 @@ public class JmolCommands extends StructureCommandsBase } @Override - public List colourByResidues(Map colours) + public List colourByResidues( + Map colours) { List cmds = super.colourByResidues(colours); cmds.add(0, COLOUR_ALL_WHITE); @@ -147,7 +149,8 @@ public class JmolCommands extends StructureCommandsBase atomSpec.append(" or "); } first = false; - atomSpec.append(":").append(tokens[1]).append(" /").append(tokens[0]); + atomSpec.append(":").append(tokens[1]).append(" /") + .append(tokens[0]); } } @@ -199,9 +202,11 @@ public class JmolCommands extends StructureCommandsBase /* * show residues used for superposition as ribbon */ - sb.append("select ").append(getAtomSpec(atomSpec, AtomSpecType.RESIDUE_ONLY)).append("|"); - sb.append(getAtomSpec(refAtoms, AtomSpecType.RESIDUE_ONLY)).append(getCommandSeparator()) - .append("cartoons"); + sb.append("select ") + .append(getAtomSpec(atomSpec, AtomSpecType.RESIDUE_ONLY)) + .append("|"); + sb.append(getAtomSpec(refAtoms, AtomSpecType.RESIDUE_ONLY)) + .append(getCommandSeparator()).append("cartoons"); return Arrays.asList(new StructureCommand(sb.toString())); } @@ -228,7 +233,7 @@ public class JmolCommands extends StructureCommandsBase @Override protected StructureCommandI colourResidues(String atomSpec, Color colour) { - StringBuilder sb = new StringBuilder(atomSpec.length()+20); + StringBuilder sb = new StringBuilder(atomSpec.length() + 20); sb.append("select ").append(atomSpec).append(getCommandSeparator()) .append("color").append(getColourString(colour)); return new StructureCommand(sb.toString()); @@ -294,8 +299,8 @@ public class JmolCommands extends StructureCommandsBase public StructureCommandI loadFile(String file) { // https://chemapps.stolaf.edu/jmol/docs/#loadfiles - return new StructureCommand("load FILES \"" + - Platform.escapeBackslashes(file) + "\""); + return new StructureCommand( + "load FILES \"" + Platform.escapeBackslashes(file) + "\""); } /** @@ -434,8 +439,7 @@ public class JmolCommands extends StructureCommandsBase * @return */ @Deprecated - private static StringBuilder condenseCommand( - StringBuilder command, + private static StringBuilder condenseCommand(StringBuilder command, int pos) { diff --git a/src/jalview/ext/jmol/JmolParser.java b/src/jalview/ext/jmol/JmolParser.java index 2a43244..ab6bbcc 100644 --- a/src/jalview/ext/jmol/JmolParser.java +++ b/src/jalview/ext/jmol/JmolParser.java @@ -117,9 +117,10 @@ public class JmolParser extends StructureFile implements JmolStatusListener // } // ; // instead, we distinguish .cif from non-.cif by filename - setStructureFileType(getDataName().toLowerCase(Locale.ROOT).endsWith(".cif") - ? PDBEntry.Type.MMCIF.toString() - : "PDB"); + setStructureFileType( + getDataName().toLowerCase(Locale.ROOT).endsWith(".cif") + ? PDBEntry.Type.MMCIF.toString() + : "PDB"); transformJmolModelToJalview(jmolModel.ms); } @@ -140,7 +141,7 @@ public class JmolParser extends StructureFile implements JmolStatusListener * params -o (output to sysout) -n (nodisplay) -x (exit when finished) * see http://wiki.jmol.org/index.php/Jmol_Application */ - + viewer = JalviewJmolBinding.getJmolData(this); // ensure the 'new' (DSSP) not 'old' (Ramachandran) SS method is used viewer.setBooleanProperty("defaultStructureDSSP", true); @@ -154,28 +155,32 @@ public class JmolParser extends StructureFile implements JmolStatusListener } return viewer; } - + public static Regex getNewAlphafoldValidator() { - Regex validator = new Regex("(AF-[A-Z]+[0-9]+[A-Z0-9]+-F1)"); + Regex validator = new Regex("(AF-[A-Z]+[0-9]+[A-Z0-9]+-F1)"); validator.setIgnoreCase(true); return validator; } - PDBEntry.Type jmolFiletype=null; + PDBEntry.Type jmolFiletype = null; + /** - * resolve a jmol filetype string and update the jmolFiletype field accordingly + * resolve a jmol filetype string and update the jmolFiletype field + * accordingly + * * @param jmolIdentifiedFileType * @return true if filetype was identified as MMCIF, PDB */ public boolean updateFileType(String jmolIdentifiedFileType) { - if (jmolIdentifiedFileType == null + if (jmolIdentifiedFileType == null || jmolIdentifiedFileType.trim().equals("")) { return false; } - if ("mmcif".equalsIgnoreCase(jmolIdentifiedFileType)) { + if ("mmcif".equalsIgnoreCase(jmolIdentifiedFileType)) + { jmolFiletype = PDBEntry.Type.MMCIF; return true; } @@ -183,10 +188,10 @@ public class JmolParser extends StructureFile implements JmolStatusListener { jmolFiletype = PDBEntry.Type.PDB; return true; - } + } return false; } - + public void transformJmolModelToJalview(ModelSet ms) throws IOException { try @@ -203,9 +208,9 @@ public class JmolParser extends StructureFile implements JmolStatusListener { setStructureFileType(jmolFiletype.toString()); } - + isMMCIF = PDBEntry.Type.MMCIF.equals(jmolFiletype); - + if (pdbId == null) { setId(safeName(getDataName())); @@ -215,7 +220,7 @@ public class JmolParser extends StructureFile implements JmolStatusListener { setId(pdbId); setPDBIdAvailable(true); - alphaFoldModel = alphaFold.search(pdbId) && isMMCIF; + alphaFoldModel = alphaFold.search(pdbId) && isMMCIF; } List significantAtoms = convertSignificantAtoms(ms); @@ -230,15 +235,16 @@ public class JmolParser extends StructureFile implements JmolStatusListener if (tmpchain != null) { tmpchain.atoms.addElement(tmpatom); - } else + } + else { - String tempFString=null; + String tempFString = null; if (isAlphafoldModel()) { tempFString = "Alphafold Reliability"; } - tmpchain = new PDBChain(getId(), tmpatom.chain,tempFString); + tmpchain = new PDBChain(getId(), tmpatom.chain, tempFString); getChains().add(tmpchain); tmpchain.atoms.addElement(tmpatom); } diff --git a/src/jalview/ext/pymol/PymolCommands.java b/src/jalview/ext/pymol/PymolCommands.java index b69d3e3..49c4ec6 100644 --- a/src/jalview/ext/pymol/PymolCommands.java +++ b/src/jalview/ext/pymol/PymolCommands.java @@ -108,18 +108,20 @@ public class PymolCommands extends StructureCommandsBase public List superposeStructures(AtomSpecModel refAtoms, AtomSpecModel atomSpec, AtomSpecType specType) { - + // https://pymolwiki.org/index.php/Super List commands = new ArrayList<>(); - String refAtomsAlphaOnly = "("+getAtomSpec(refAtoms, specType)+" and (altloc '' or altloc 'a'))"; - String atomSpec2AlphaOnly = "("+getAtomSpec(atomSpec, specType)+" and (altloc '' or altloc 'a'))"; + String refAtomsAlphaOnly = "(" + getAtomSpec(refAtoms, specType) + + " and (altloc '' or altloc 'a'))"; + String atomSpec2AlphaOnly = "(" + getAtomSpec(atomSpec, specType) + + " and (altloc '' or altloc 'a'))"; // pair_fit mobile -> reference // crashes when undo is enabled on 2.5.2 (incentive) commands.add(new StructureCommand("undo_disable")); - commands.add(new StructureCommand("pair_fit", - atomSpec2AlphaOnly, refAtomsAlphaOnly)); + commands.add(new StructureCommand("pair_fit", atomSpec2AlphaOnly, + refAtomsAlphaOnly)); commands.add(new StructureCommand("undo_enable")); - + /* * and show superposed residues as cartoon */ diff --git a/src/jalview/ext/pymol/PymolManager.java b/src/jalview/ext/pymol/PymolManager.java index 49ebe08..8ba2586 100644 --- a/src/jalview/ext/pymol/PymolManager.java +++ b/src/jalview/ext/pymol/PymolManager.java @@ -60,14 +60,13 @@ public class PymolManager protected static List getPymolPaths(String os) { List pathList = new ArrayList<>(); - - String userPath = Cache - .getDefault(Preferences.PYMOL_PATH, null); + + String userPath = Cache.getDefault(Preferences.PYMOL_PATH, null); if (userPath != null) { pathList.add(userPath); } - + /* * add default installation paths */ diff --git a/src/jalview/ext/rbvi/chimera/ChimeraCommands.java b/src/jalview/ext/rbvi/chimera/ChimeraCommands.java index 6d4caa2..d3dd625 100644 --- a/src/jalview/ext/rbvi/chimera/ChimeraCommands.java +++ b/src/jalview/ext/rbvi/chimera/ChimeraCommands.java @@ -44,21 +44,27 @@ import jalview.util.ColorUtils; public class ChimeraCommands extends StructureCommandsBase { // https://www.cgl.ucsf.edu/chimera/current/docs/UsersGuide/midas/focus.html - private static final StructureCommand FOCUS_VIEW = new StructureCommand("focus"); + private static final StructureCommand FOCUS_VIEW = new StructureCommand( + "focus"); // https://www.cgl.ucsf.edu/chimera/current/docs/UsersGuide/midas/listen.html#listresattr - private static final StructureCommand LIST_RESIDUE_ATTRIBUTES = new StructureCommand("list resattr"); + private static final StructureCommand LIST_RESIDUE_ATTRIBUTES = new StructureCommand( + "list resattr"); // https://www.cgl.ucsf.edu/chimera/current/docs/UsersGuide/midas/stop.html - private static final StructureCommand CLOSE_CHIMERA = new StructureCommand("stop really"); + private static final StructureCommand CLOSE_CHIMERA = new StructureCommand( + "stop really"); // https://www.cgl.ucsf.edu/chimera/current/docs/UsersGuide/midas/listen.html - private static final StructureCommand STOP_NOTIFY_SELECTION = new StructureCommand("listen stop selection"); + private static final StructureCommand STOP_NOTIFY_SELECTION = new StructureCommand( + "listen stop selection"); - private static final StructureCommand STOP_NOTIFY_MODELS = new StructureCommand("listen stop models"); + private static final StructureCommand STOP_NOTIFY_MODELS = new StructureCommand( + "listen stop models"); // https://www.cgl.ucsf.edu/chimera/current/docs/UsersGuide/midas/listen.html#listselection - private static final StructureCommand GET_SELECTION = new StructureCommand("list selection level residue"); + private static final StructureCommand GET_SELECTION = new StructureCommand( + "list selection level residue"); private static final StructureCommand SHOW_BACKBONE = new StructureCommand( "~display all;~ribbon;chain @CA|P"); @@ -156,8 +162,7 @@ public class ChimeraCommands extends StructureCommandsBase * @return */ protected StructureCommandI setAttribute(String attributeName, - String attributeValue, - AtomSpecModel atomSpecModel) + String attributeValue, AtomSpecModel atomSpecModel) { StringBuilder sb = new StringBuilder(128); sb.append("setattr res ").append(attributeName).append(" '") @@ -273,7 +278,8 @@ public class ChimeraCommands extends StructureCommandsBase StringBuilder cmd = new StringBuilder(); String atomSpecAlphaOnly = getAtomSpec(spec, backbone); String refSpecAlphaOnly = getAtomSpec(ref, backbone); - cmd.append("match ").append(atomSpecAlphaOnly).append(" ").append(refSpecAlphaOnly); + cmd.append("match ").append(atomSpecAlphaOnly).append(" ") + .append(refSpecAlphaOnly); /* * show superposed residues as ribbon @@ -414,7 +420,8 @@ public class ChimeraCommands extends StructureCommandsBase // https://www.cgl.ucsf.edu/chimera/current/docs/UsersGuide/midas/listen.html List cmds = new ArrayList<>(); cmds.add(new StructureCommand("listen start models url " + uri)); - cmds.add(new StructureCommand("listen start select prefix SelectionChanged url " + uri)); + cmds.add(new StructureCommand( + "listen start select prefix SelectionChanged url " + uri)); return cmds; } diff --git a/src/jalview/ext/rbvi/chimera/ChimeraXCommands.java b/src/jalview/ext/rbvi/chimera/ChimeraXCommands.java index 780d292..66ecaea 100644 --- a/src/jalview/ext/rbvi/chimera/ChimeraXCommands.java +++ b/src/jalview/ext/rbvi/chimera/ChimeraXCommands.java @@ -103,8 +103,8 @@ public class ChimeraXCommands extends ChimeraCommands } /** - * Returns a viewer command to set the given residue attribute value on residues - * specified by the AtomSpecModel, for example + * Returns a viewer command to set the given residue attribute value on + * residues specified by the AtomSpecModel, for example * *

    * setattr #0/A:3-9,14-20,39-43 res jv_strand 'strand' create true
@@ -120,7 +120,8 @@ public class ChimeraXCommands extends ChimeraCommands
           String attributeValue, AtomSpecModel atomSpecModel)
   {
     StringBuilder sb = new StringBuilder(128);
-    sb.append("setattr ").append(getAtomSpec(atomSpecModel, AtomSpecType.RESIDUE_ONLY));
+    sb.append("setattr ")
+            .append(getAtomSpec(atomSpecModel, AtomSpecType.RESIDUE_ONLY));
     sb.append(" res ").append(attributeName).append(" '")
             .append(attributeValue).append("'");
     sb.append(" create true");
@@ -237,7 +238,8 @@ public class ChimeraXCommands extends ChimeraCommands
      */
     cmd.append("; ribbon ");
     cmd.append(getAtomSpec(spec, AtomSpecType.RESIDUE_ONLY)).append("|");
-    cmd.append(getAtomSpec(ref, AtomSpecType.RESIDUE_ONLY)).append("; view");
+    cmd.append(getAtomSpec(ref, AtomSpecType.RESIDUE_ONLY))
+            .append("; view");
 
     return Arrays.asList(new StructureCommand(cmd.toString()));
   }
diff --git a/src/jalview/ext/rbvi/chimera/ChimeraXManager.java b/src/jalview/ext/rbvi/chimera/ChimeraXManager.java
index 9d89ac7..da174f8 100644
--- a/src/jalview/ext/rbvi/chimera/ChimeraXManager.java
+++ b/src/jalview/ext/rbvi/chimera/ChimeraXManager.java
@@ -30,7 +30,9 @@ public class ChimeraXManager extends ChimeraManager
   }
 
   /**
-   * Returns "POST" as the HTTP request method to use for REST service calls to ChimeraX
+   * Returns "POST" as the HTTP request method to use for REST service calls to
+   * ChimeraX
+   * 
    * @return
    */
   protected String getHttpRequestMethod()
diff --git a/src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java b/src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java
index 399bad9..aebfede 100644
--- a/src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java
+++ b/src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java
@@ -76,11 +76,13 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel
   String lastHighlightCommand;
 
   /**
-   * Returns a model of the structure positions described by the Chimera format atomspec
+   * Returns a model of the structure positions described by the Chimera format
+   * atomspec
+   * 
    * @param atomSpec
    * @return
    */
-  protected  AtomSpec parseAtomSpec(String atomSpec)
+  protected AtomSpec parseAtomSpec(String atomSpec)
   {
     return AtomSpec.fromChimeraAtomspec(atomSpec);
   }
@@ -88,8 +90,8 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel
   /**
    * Open a PDB structure file in Chimera and set up mappings from Jalview.
    * 
-   * We check if the PDB model id is already loaded in Chimera, if so don't reopen
-   * it. This is the case if Chimera has opened a saved session file.
+   * We check if the PDB model id is already loaded in Chimera, if so don't
+   * reopen it. This is the case if Chimera has opened a saved session file.
    * 
    * @param pe
    * @return
@@ -180,8 +182,11 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel
   {
     super(ssm, pdbentry, sequenceIs, protocol);
     boolean chimeraX = ViewerType.CHIMERAX.equals(getViewerType());
-    chimeraManager = chimeraX ? new ChimeraXManager(new StructureManager(true)) : new ChimeraManager(new StructureManager(true));
-    setStructureCommands(chimeraX ? new ChimeraXCommands() : new ChimeraCommands());
+    chimeraManager = chimeraX
+            ? new ChimeraXManager(new StructureManager(true))
+            : new ChimeraManager(new StructureManager(true));
+    setStructureCommands(
+            chimeraX ? new ChimeraXCommands() : new ChimeraCommands());
   }
 
   @Override
@@ -191,8 +196,8 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel
   }
 
   /**
-   * Start a dedicated HttpServer to listen for Chimera notifications, and tell it
-   * to start listening
+   * Start a dedicated HttpServer to listen for Chimera notifications, and tell
+   * it to start listening
    */
   public void startChimeraListener()
   {
@@ -220,7 +225,7 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel
       chimeraListener.shutdown();
       chimeraListener = null;
     }
-    
+
     /*
      * the following call is added to avoid a stack trace error in Chimera
      * after "stop really" is sent; Chimera > 1.14 will not need it; see also 
@@ -311,7 +316,7 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel
   @Override
   public boolean isViewerRunning()
   {
-    return chimeraManager!=null && chimeraManager.isChimeraLaunched();
+    return chimeraManager != null && chimeraManager.isChimeraLaunched();
   }
 
   /**
@@ -332,14 +337,15 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel
     List reply = null;
     // trim command or it may never find a match in the replyLog!!
     String cmd = command.getCommand().trim();
-    List lastReply = chimeraManager
-            .sendChimeraCommand(cmd, getResponse);
+    List lastReply = chimeraManager.sendChimeraCommand(cmd,
+            getResponse);
     if (getResponse)
     {
       reply = lastReply;
-      if (Console.isDebugEnabled()) {
+      if (Console.isDebugEnabled())
+      {
         Console.debug(
-              "Response from command ('" + cmd + "') was:\n" + lastReply); 
+                "Response from command ('" + cmd + "') was:\n" + lastReply);
       }
     }
     else
@@ -366,8 +372,9 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel
   }
 
   /**
-   * Construct and send a command to highlight zero, one or more atoms. We do this
-   * by sending an "rlabel" command to show the residue label at that position.
+   * Construct and send a command to highlight zero, one or more atoms. We do
+   * this by sending an "rlabel" command to show the residue label at that
+   * position.
    */
   @Override
   public void highlightAtoms(List atoms)
@@ -401,13 +408,13 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel
         first = false;
         if (forChimeraX)
         {
-          cmd.append(cms.get(0).getModelNumber())
-                  .append("/").append(chain).append(":").append(pdbResNum);
+          cmd.append(cms.get(0).getModelNumber()).append("/").append(chain)
+                  .append(":").append(pdbResNum);
         }
         else
         {
-          cmd.append(cms.get(0).getModelNumber())
-                  .append(":").append(pdbResNum);
+          cmd.append(cms.get(0).getModelNumber()).append(":")
+                  .append(pdbResNum);
           if (!chain.equals(" ") && !forChimeraX)
           {
             cmd.append(".").append(chain);
@@ -437,15 +444,17 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel
     if (lastHighlightCommand != null)
     {
       cmd.insert(0, ";");
-      cmd.insert(0,lastHighlightCommand);
-      cmd.insert(0,"~");
-      
+      cmd.insert(0, lastHighlightCommand);
+      cmd.insert(0, "~");
+
     }
-    if (cmd.length()>0) {
-      executeCommand(true,  null,  new StructureCommand(cmd.toString()));
+    if (cmd.length() > 0)
+    {
+      executeCommand(true, null, new StructureCommand(cmd.toString()));
     }
-    
-    if (found) {
+
+    if (found)
+    {
       this.lastHighlightCommand = command;
     }
   }
@@ -459,14 +468,14 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel
      * Ask Chimera for its current selection
      */
     StructureCommandI command = getCommandGenerator().getSelectedResidues();
-    
+
     Runnable action = new Runnable()
     {
       @Override
       public void run()
       {
         List chimeraReply = executeCommand(command, true);
-        
+
         List selectedResidues = new ArrayList<>();
         if (chimeraReply != null)
         {
@@ -500,15 +509,15 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel
          * selections)
          */
         getSsm().mouseOverStructure(atomSpecs);
-        
+
       }
     };
     new Thread(action).start();
   }
 
   /**
-   * Converts a list of Chimera(X) atomspecs to a list of AtomSpec representing the
-   * corresponding residues (if any) in Jalview
+   * Converts a list of Chimera(X) atomspecs to a list of AtomSpec representing
+   * the corresponding residues (if any) in Jalview
    * 
    * @param structureSelection
    * @return
@@ -593,9 +602,9 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel
   }
 
   /**
-   * Write commands to a temporary file, and send a command to Chimera to open the
-   * file as a commands script. For use when sending a large number of separate
-   * commands would overload the REST interface mechanism.
+   * Write commands to a temporary file, and send a command to Chimera to open
+   * the file as a commands script. For use when sending a large number of
+   * separate commands would overload the REST interface mechanism.
    * 
    * @param commands
    */
@@ -626,6 +635,7 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel
   /**
    * Returns the file extension required for a file of commands to be read by
    * the structure viewer
+   * 
    * @return
    */
   protected String getCommandFileExtension()
@@ -760,7 +770,8 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel
   public List getChimeraAttributes()
   {
     List attributes = new ArrayList<>();
-    StructureCommandI command = getCommandGenerator().listResidueAttributes();
+    StructureCommandI command = getCommandGenerator()
+            .listResidueAttributes();
     final List reply = executeCommand(command, true);
     if (reply != null)
     {
diff --git a/src/jalview/ext/so/SequenceOntology.java b/src/jalview/ext/so/SequenceOntology.java
index 38d98d0..436b0ef 100644
--- a/src/jalview/ext/so/SequenceOntology.java
+++ b/src/jalview/ext/so/SequenceOntology.java
@@ -196,9 +196,9 @@ public class SequenceOntology implements SequenceOntologyI
             }
             else
             {
-              Console.debug("Warning: " + term.getName()
-                      + " has replaced " + replaced.getName()
-                      + " for lookup of '" + description + "'");
+              Console.debug("Warning: " + term.getName() + " has replaced "
+                      + replaced.getName() + " for lookup of '"
+                      + description + "'");
             }
           }
           termsByDescription.put(description, term);
diff --git a/src/jalview/fts/api/FTSRestClientI.java b/src/jalview/fts/api/FTSRestClientI.java
index 31d5c7c..13e73ef 100644
--- a/src/jalview/fts/api/FTSRestClientI.java
+++ b/src/jalview/fts/api/FTSRestClientI.java
@@ -88,8 +88,9 @@ public interface FTSRestClientI
           Collection wantedFields);
 
   /**
-   * Fetch index of the primary key column for the dynamic table
-   * TODO: consider removing 'hasRefSeq' - never used in code
+   * Fetch index of the primary key column for the dynamic table TODO: consider
+   * removing 'hasRefSeq' - never used in code
+   * 
    * @param wantedFields
    *          the available table columns
    * @param hasRefSeq
diff --git a/src/jalview/fts/core/FTSDataColumnPreferences.java b/src/jalview/fts/core/FTSDataColumnPreferences.java
index 0335d65..0971235 100644
--- a/src/jalview/fts/core/FTSDataColumnPreferences.java
+++ b/src/jalview/fts/core/FTSDataColumnPreferences.java
@@ -40,9 +40,10 @@ import javax.swing.SortOrder;
 import javax.swing.table.AbstractTableModel;
 import javax.swing.table.TableModel;
 import javax.swing.table.TableRowSorter;
+
 /**
- * Helps render GUI allowing control of which columns to show for entries returned from an FTS query.
- * TODO: push down FTSClient specific code
+ * Helps render GUI allowing control of which columns to show for entries
+ * returned from an FTS query. TODO: push down FTSClient specific code
  * 
  * @author tcofoegbu
  *
@@ -92,8 +93,8 @@ public class FTSDataColumnPreferences extends JScrollPane
 
     int x = 0;
     for (FTSDataColumnI field : allFTSDataColumns)
-    {   
-      //System.out.println("allFTSDataColumns==" + allFTSDataColumns);
+    {
+      // System.out.println("allFTSDataColumns==" + allFTSDataColumns);
       if (field.getName().equalsIgnoreCase("all"))
       {
         continue;
@@ -105,7 +106,8 @@ public class FTSDataColumnPreferences extends JScrollPane
         data[x++] = new Object[] { ftsRestClient
                 .getAllDefaultDisplayedFTSDataColumns().contains(field),
             field.getName(), field.getGroup() };
-        //System.out.println(" PUIS " + field.getName() + " ET AUSSI " + field.getGroup() + "X = " + x);
+        // System.out.println(" PUIS " + field.getName() + " ET AUSSI " +
+        // field.getGroup() + "X = " + x);
         break;
       case STRUCTURE_CHOOSER:
         data[x++] = new Object[] { structSummaryColumns.contains(field),
@@ -160,7 +162,7 @@ public class FTSDataColumnPreferences extends JScrollPane
                 }
               });
       sorter.setSortKeys(sortKeys);
-      // BH 2018 setSortKeys does a sort      sorter.sort();
+      // BH 2018 setSortKeys does a sort sorter.sort();
 
       tbl_FTSDataColumnPrefs
               .setAutoResizeMode(JTable.AUTO_RESIZE_NEXT_COLUMN);
diff --git a/src/jalview/fts/core/FTSRestClient.java b/src/jalview/fts/core/FTSRestClient.java
index 0bca070..ac5b280 100644
--- a/src/jalview/fts/core/FTSRestClient.java
+++ b/src/jalview/fts/core/FTSRestClient.java
@@ -61,7 +61,7 @@ public abstract class FTSRestClient implements FTSRestClientI
 
   private int defaultResponsePageSize = 100;
 
-  protected HashMap mockQueries = null;
+  protected HashMap mockQueries = null;
 
   protected FTSRestClient()
   {
@@ -74,7 +74,7 @@ public abstract class FTSRestClient implements FTSRestClientI
 
     InputStream in = getClass().getResourceAsStream(fileName);
 
-    try (BufferedReader br = new BufferedReader(new InputStreamReader(in))) 
+    try (BufferedReader br = new BufferedReader(new InputStreamReader(in)))
     {
       String line;
       while ((line = br.readLine()) != null)
@@ -173,7 +173,8 @@ public abstract class FTSRestClient implements FTSRestClientI
               public DataTypeI getDataType()
               {
                 final String[] dataTypeString = lineData[2].split("\\|");
-                final String classString = dataTypeString[0].toUpperCase(Locale.ROOT);
+                final String classString = dataTypeString[0]
+                        .toUpperCase(Locale.ROOT);
 
                 return new DataTypeI()
                 {
@@ -292,8 +293,8 @@ public abstract class FTSRestClient implements FTSRestClientI
                 FTSDataColumnI that = (FTSDataColumnI) otherObject;
                 return otherObject == null ? false
                         : this.getCode().equals(that.getCode())
-                        && this.getName().equals(that.getName())
-                        && this.getGroup().equals(that.getGroup());
+                                && this.getName().equals(that.getName())
+                                && this.getGroup().equals(that.getGroup());
               }
 
             };
@@ -437,9 +438,11 @@ public abstract class FTSRestClient implements FTSRestClientI
   /**
    * 
    * @param instance
-   * @param mocks {{working query, working response}, ...}
+   * @param mocks
+   *          {{working query, working response}, ...}
    */
-  public static void createMockFTSRestClient(FTSRestClient instance,String[][] mocks)
+  public static void createMockFTSRestClient(FTSRestClient instance,
+          String[][] mocks)
   {
     instance.setMock(mocks);
   }
@@ -499,7 +502,7 @@ public abstract class FTSRestClient implements FTSRestClientI
 
   public static void unMock(FTSRestClient instance)
   {
-    instance.mockQueries=null;
+    instance.mockQueries = null;
   }
 
   protected String getResourceFile(String fileName)
@@ -528,20 +531,21 @@ public abstract class FTSRestClient implements FTSRestClientI
 
   protected void setMock(String[][] mocks)
   {
-    if (mocks==null) {
-      mockQueries=null;
+    if (mocks == null)
+    {
+      mockQueries = null;
       return;
     }
-    mockQueries=new HashMap();
-    for (String[] mock:mocks)
+    mockQueries = new HashMap();
+    for (String[] mock : mocks)
     {
-      mockQueries.put(mock[0],mock[1]);
+      mockQueries.put(mock[0], mock[1]);
     }
   }
 
   protected boolean isMocked()
   {
-    return mockQueries!=null;
+    return mockQueries != null;
   }
 
   @Override
@@ -554,7 +558,8 @@ public abstract class FTSRestClient implements FTSRestClientI
       columnNames = new String[] { "", "Display", "Group" };
       break;
     default:
-      // non structure sources don't return any other kind of preferences columns
+      // non structure sources don't return any other kind of preferences
+      // columns
       break;
     }
     return columnNames;
diff --git a/src/jalview/fts/core/FTSRestRequest.java b/src/jalview/fts/core/FTSRestRequest.java
index bf88d2d..6a54ebf 100644
--- a/src/jalview/fts/core/FTSRestRequest.java
+++ b/src/jalview/fts/core/FTSRestRequest.java
@@ -191,17 +191,19 @@ public class FTSRestRequest
 
   /**
    * locate column given field name
-   * @param string - field name
+   * 
+   * @param string
+   *          - field name
    * @return -1 if not located
    */
   public int getFieldIndex(String string)
   {
-    int i=associatedSequence!=null ? 1 : 0;
-    for (FTSDataColumnI field:wantedFields)
+    int i = associatedSequence != null ? 1 : 0;
+    for (FTSDataColumnI field : wantedFields)
     {
       if (field.getName().equals(string))
       {
-        return i; 
+        return i;
       }
       i++;
     }
diff --git a/src/jalview/fts/core/FTSRestResponse.java b/src/jalview/fts/core/FTSRestResponse.java
index ae50233..597bb89 100644
--- a/src/jalview/fts/core/FTSRestResponse.java
+++ b/src/jalview/fts/core/FTSRestResponse.java
@@ -41,7 +41,7 @@ import javax.swing.table.DefaultTableModel;
 public class FTSRestResponse
 {
   private int numberOfItemsFound;
-  
+
   private String responseTime;
 
   private Collection searchSummary;
diff --git a/src/jalview/fts/core/GFTSPanel.java b/src/jalview/fts/core/GFTSPanel.java
index da43bea..ea206e9 100644
--- a/src/jalview/fts/core/GFTSPanel.java
+++ b/src/jalview/fts/core/GFTSPanel.java
@@ -94,7 +94,7 @@ public abstract class GFTSPanel extends JPanel implements GFTSPanelI
           getFTSFrameTitle());
 
   protected JTabbedPane tabs = new JTabbedPane();
- 
+
   protected IProgressIndicator progressIndicator;
 
   protected JComboBox cmb_searchTarget = new JComboBox<>();
@@ -274,8 +274,7 @@ public abstract class GFTSPanel extends JPanel implements GFTSPanelI
         public void focusGained(FocusEvent e)
         {
           // TODO: make selected tab gain focus in correct widget
-          if (tabs != null
-                  && tabs.getSelectedComponent() == ftsPanel)
+          if (tabs != null && tabs.getSelectedComponent() == ftsPanel)
           {
             txt_search.getComponent().requestFocusInWindow();
           }
@@ -553,32 +552,32 @@ public abstract class GFTSPanel extends JPanel implements GFTSPanelI
     txt_search.getComponent().setFont(VERDANA_12);
 
     txt_search.addKeyListener(new KeyAdapter()
-            {
-              @Override
-              public void keyPressed(KeyEvent e)
-              {
-                if (e.getKeyCode() == KeyEvent.VK_ENTER)
-                {
-                  if (getTypedText() == null || getTypedText().isEmpty())
-                  {
-                    return;
-                  }
-                  String primaryKeyName = getFTSRestClient()
-                          .getPrimaryKeyColumn().getName();
-                  if (primaryKeyName.equalsIgnoreCase(getCmbSearchTarget()
-                          .getSelectedItem().toString()))
-                  {
-                    // TODO: nicer to show the list in the result set before
-                    // viewing in Jalview perhaps ?
-                    transferToSequenceFetcher(getTypedText());
-                  }
-                  else
-                  {
-                    performSearchAction();
-                  }
-                }
-              }
-            });
+    {
+      @Override
+      public void keyPressed(KeyEvent e)
+      {
+        if (e.getKeyCode() == KeyEvent.VK_ENTER)
+        {
+          if (getTypedText() == null || getTypedText().isEmpty())
+          {
+            return;
+          }
+          String primaryKeyName = getFTSRestClient().getPrimaryKeyColumn()
+                  .getName();
+          if (primaryKeyName.equalsIgnoreCase(
+                  getCmbSearchTarget().getSelectedItem().toString()))
+          {
+            // TODO: nicer to show the list in the result set before
+            // viewing in Jalview perhaps ?
+            transferToSequenceFetcher(getTypedText());
+          }
+          else
+          {
+            performSearchAction();
+          }
+        }
+      }
+    });
     final DeferredTextInputListener listener = new DeferredTextInputListener(
             1500, new ActionListener()
             {
diff --git a/src/jalview/fts/service/pdb/PDBFTSPanel.java b/src/jalview/fts/service/pdb/PDBFTSPanel.java
index 2dd0f8c..33c1b6c 100644
--- a/src/jalview/fts/service/pdb/PDBFTSPanel.java
+++ b/src/jalview/fts/service/pdb/PDBFTSPanel.java
@@ -125,7 +125,8 @@ public class PDBFTSPanel extends GFTSPanel
 
           if (isPaginationEnabled() && resultSetCount > 0)
           {
-            String f1 = totalNumberformatter.format(Integer.valueOf(offSet + 1));
+            String f1 = totalNumberformatter
+                    .format(Integer.valueOf(offSet + 1));
             String f2 = totalNumberformatter
                     .format(Integer.valueOf(offSet + resultSetCount));
             String f3 = totalNumberformatter
@@ -300,5 +301,5 @@ public class PDBFTSPanel extends GFTSPanel
     {
       e1.printStackTrace();
     }
- }
+  }
 }
\ No newline at end of file
diff --git a/src/jalview/fts/service/threedbeacons/TDB_FTSData.java b/src/jalview/fts/service/threedbeacons/TDB_FTSData.java
index 6745bb8..701c1f2 100644
--- a/src/jalview/fts/service/threedbeacons/TDB_FTSData.java
+++ b/src/jalview/fts/service/threedbeacons/TDB_FTSData.java
@@ -21,25 +21,43 @@ public class TDB_FTSData implements FTSData
   /*
    * fields in the JSON object 
    */
-  public static String Uniprot_Id= "id";
-  public static String Uniprot_Start= "uniprot_start";
-  public static String Uniprot_End= "uniprot_end";
-  public static String Provider= "provider";
-  public static String Model_id= "model_identifier";
-  public static String Model_Category= "model_category";
-  public static String Model_Type= "model_type";
-  public static String Model_Title="model_title";
-  public static String Resolution= "resolution";
-  public static String Confidence= "confidence_avg_local_score";
-  public static String Confidence_Score_Type= "confidence_type";
-  public static String Confidence_Score_Version= "confidence_version";
-  public static String Coverage= "coverage";
-  public static String Sequence_Identity= "sequence_identity";
-  public static String Created_Date= "created";
-  public static String UniProt_Accession= "uniprot_accession";
-  public static String Url= "model_url";
-  public static String Page_URL= "model_page_url";
-  public static String Ensemble_Sample_Url= "ensembl_sample_url";
+  public static String Uniprot_Id = "id";
+
+  public static String Uniprot_Start = "uniprot_start";
+
+  public static String Uniprot_End = "uniprot_end";
+
+  public static String Provider = "provider";
+
+  public static String Model_id = "model_identifier";
+
+  public static String Model_Category = "model_category";
+
+  public static String Model_Type = "model_type";
+
+  public static String Model_Title = "model_title";
+
+  public static String Resolution = "resolution";
+
+  public static String Confidence = "confidence_avg_local_score";
+
+  public static String Confidence_Score_Type = "confidence_type";
+
+  public static String Confidence_Score_Version = "confidence_version";
+
+  public static String Coverage = "coverage";
+
+  public static String Sequence_Identity = "sequence_identity";
+
+  public static String Created_Date = "created";
+
+  public static String UniProt_Accession = "uniprot_accession";
+
+  public static String Url = "model_url";
+
+  public static String Page_URL = "model_page_url";
+
+  public static String Ensemble_Sample_Url = "ensembl_sample_url";
 
   /**
    * original response from server
diff --git a/src/jalview/fts/service/threedbeacons/TDBeaconsFTSPanel.java b/src/jalview/fts/service/threedbeacons/TDBeaconsFTSPanel.java
index 99f1a71..056da78 100644
--- a/src/jalview/fts/service/threedbeacons/TDBeaconsFTSPanel.java
+++ b/src/jalview/fts/service/threedbeacons/TDBeaconsFTSPanel.java
@@ -199,8 +199,10 @@ public class TDBeaconsFTSPanel extends GFTSPanel
             AlignmentI tdbAl = fl.readFile(tdbURL, DataSourceType.URL,
                     FileFormat.MMCif);
 
-            // TODO: pad structure according to its Uniprot Start so all line up w.r.t. the Uniprot reference sequence
-            // TODO: give the structure a sensible name (not the giant URL *:o) )
+            // TODO: pad structure according to its Uniprot Start so all line up
+            // w.r.t. the Uniprot reference sequence
+            // TODO: give the structure a sensible name (not the giant URL *:o)
+            // )
             if (tdbAl != null)
             {
               if (allSeqs != null)
@@ -214,10 +216,8 @@ public class TDBeaconsFTSPanel extends GFTSPanel
             }
           } catch (Exception x)
           {
-            Console.warn(
-                    "Couldn't retrieve 3d-beacons model for uniprot id"
-                            + searchTerm + " : " + tdbURL,
-                    x);
+            Console.warn("Couldn't retrieve 3d-beacons model for uniprot id"
+                    + searchTerm + " : " + tdbURL, x);
           }
         }
         seqFetcher.parseResult(allSeqs,
diff --git a/src/jalview/fts/service/threedbeacons/TDBeaconsFTSRestClient.java b/src/jalview/fts/service/threedbeacons/TDBeaconsFTSRestClient.java
index ccdc525..0c07d37 100644
--- a/src/jalview/fts/service/threedbeacons/TDBeaconsFTSRestClient.java
+++ b/src/jalview/fts/service/threedbeacons/TDBeaconsFTSRestClient.java
@@ -37,18 +37,21 @@ public class TDBeaconsFTSRestClient extends FTSRestClient
   /**
    * production server URI
    */
-  private static String TDB_PROD_API="https://www.ebi.ac.uk/pdbe/pdbe-kb/3dbeacons/api/uniprot/summary/";
+  private static String TDB_PROD_API = "https://www.ebi.ac.uk/pdbe/pdbe-kb/3dbeacons/api/uniprot/summary/";
+
   /**
    * dev server URI
    */
-  private static String TDB_DEV_API="https://wwwdev.ebi.ac.uk/pdbe/pdbe-kb/3dbeacons/api/uniprot/summary/";
-  private static String DEFAULT_THREEDBEACONS_DOMAIN = TDB_PROD_API; 
+  private static String TDB_DEV_API = "https://wwwdev.ebi.ac.uk/pdbe/pdbe-kb/3dbeacons/api/uniprot/summary/";
+
+  private static String DEFAULT_THREEDBEACONS_DOMAIN = TDB_PROD_API;
 
   public static FTSRestClientI instance = null;
 
   protected TDBeaconsFTSRestClient()
   {
   }
+
   @SuppressWarnings("unchecked")
   @Override
   public FTSRestResponse executeRequest(FTSRestRequest tdbRestRequest)
@@ -77,14 +80,15 @@ public class TDBeaconsFTSRestClient extends FTSRestClient
       }
 
       WebResource webResource;
-      webResource = client.resource(DEFAULT_THREEDBEACONS_DOMAIN+query);
+      webResource = client.resource(DEFAULT_THREEDBEACONS_DOMAIN + query);
 
       URI uri = webResource.getURI();
       System.out.println(uri.toString());
 
       // Execute the REST request
       ClientResponse clientResponse;
-      if (isMocked()) { 
+      if (isMocked())
+      {
         clientResponse = null;
       }
       else
@@ -99,7 +103,9 @@ public class TDBeaconsFTSRestClient extends FTSRestClient
       String responseString = null;
 
       // Check the response status and report exception if one occurs
-      int responseStatus = isMocked() ? (mockQueries.containsKey(query) ? 200 : 404) : clientResponse.getStatus();
+      int responseStatus = isMocked()
+              ? (mockQueries.containsKey(query) ? 200 : 404)
+              : clientResponse.getStatus();
       switch (responseStatus)
       {
       // if success
@@ -110,7 +116,8 @@ public class TDBeaconsFTSRestClient extends FTSRestClient
         }
         else
         {
-          responseString = isMocked() ? mockQueries.get(query): clientResponse.getEntity(String.class);
+          responseString = isMocked() ? mockQueries.get(query)
+                  : clientResponse.getEntity(String.class);
         }
         break;
       case 400:
@@ -143,14 +150,14 @@ public class TDBeaconsFTSRestClient extends FTSRestClient
         }
       }
       throw e;
-      
+
     }
 
   }
 
   /**
    * returns response for when the 3D-Beacons service doesn't have a record for
-   * the given query - in 2.11.2 this triggers a failover to the PDBe FTS 
+   * the given query - in 2.11.2 this triggers a failover to the PDBe FTS
    * 
    * @return null
    */
@@ -228,14 +235,14 @@ public class TDBeaconsFTSRestClient extends FTSRestClient
     SequenceI associatedSeq = tdbRequest.getAssociatedSequence();
     int colCounter = 0;
     summaryRowData = new Object[(associatedSeq != null)
-                                ? displayFields.size() + 1
-                                : displayFields.size()];
-                        if (associatedSeq != null)
-                        {
-                          associatedSequence = associatedSeq;
-                          summaryRowData[0] = associatedSequence;
-                          colCounter = 1;
-                        }
+            ? displayFields.size() + 1
+            : displayFields.size()];
+    if (associatedSeq != null)
+    {
+      associatedSequence = associatedSeq;
+      summaryRowData[0] = associatedSequence;
+      colCounter = 1;
+    }
 
     for (FTSDataColumnI field : displayFields)
     {
@@ -339,8 +346,8 @@ public class TDBeaconsFTSRestClient extends FTSRestClient
       columnNames = new String[] { "", "Display", "Group" };
       break;
     case PREFERENCES:
-      columnNames = new String[] { "3DB Beacons Field", "Show in search summary",
-          "Show in structure summary" };
+      columnNames = new String[] { "3DB Beacons Field",
+          "Show in search summary", "Show in structure summary" };
       break;
     default:
       break;
diff --git a/src/jalview/fts/service/uniprot/UniProtFTSRestClient.java b/src/jalview/fts/service/uniprot/UniProtFTSRestClient.java
index 3f0b8a4..4fd12df 100644
--- a/src/jalview/fts/service/uniprot/UniProtFTSRestClient.java
+++ b/src/jalview/fts/service/uniprot/UniProtFTSRestClient.java
@@ -60,7 +60,7 @@ public class UniProtFTSRestClient extends FTSRestClient
   {
     super();
     uniprotSearchEndpoint = Cache.getDefault("UNIPROT_DOMAIN",
-            DEFAULT_UNIPROT_DOMAIN) + "/uniprot/";    
+            DEFAULT_UNIPROT_DOMAIN) + "/uniprot/";
   }
 
   @SuppressWarnings("unchecked")
diff --git a/src/jalview/fts/service/uniprot/UniprotFTSPanel.java b/src/jalview/fts/service/uniprot/UniprotFTSPanel.java
index 182e29b..33ad8c4 100644
--- a/src/jalview/fts/service/uniprot/UniprotFTSPanel.java
+++ b/src/jalview/fts/service/uniprot/UniprotFTSPanel.java
@@ -130,18 +130,18 @@ public class UniprotFTSPanel extends GFTSPanel
                   : MessageManager.getString("label.result");
           if (isPaginationEnabled() && resultSetCount > 0)
           {
-            updateSearchFrameTitle(defaultFTSFrameTitle + " - " + result
-                    + " "
-                    + totalNumberformatter
-                            .format(Integer.valueOf(offSet + 1))
-                    + " to "
-                    + totalNumberformatter
-                            .format(Integer
+            updateSearchFrameTitle(
+                    defaultFTSFrameTitle + " - " + result + " "
+                            + totalNumberformatter
+                                    .format(Integer.valueOf(offSet + 1))
+                            + " to "
+                            + totalNumberformatter.format(Integer
                                     .valueOf(offSet + resultSetCount))
-                    + " of "
-                    + totalNumberformatter
-                            .format(Integer.valueOf(totalResultSetCount))
-                    + " " + " (" + (endTime - startTime) + " milli secs)");
+                            + " of "
+                            + totalNumberformatter.format(
+                                    Integer.valueOf(totalResultSetCount))
+                            + " " + " (" + (endTime - startTime)
+                            + " milli secs)");
           }
           else
           {
diff --git a/src/jalview/gui/APQHandlers.java b/src/jalview/gui/APQHandlers.java
index 4d3a3f3..e5e328f 100644
--- a/src/jalview/gui/APQHandlers.java
+++ b/src/jalview/gui/APQHandlers.java
@@ -40,10 +40,12 @@ public class APQHandlers
 {
   private static boolean setAPQHandlers = false;
 
-  public APQHandlers() {
+  public APQHandlers()
+  {
   }
 
-  protected static boolean setAPQHandlers(jalview.gui.Desktop jalviewDesktop)
+  protected static boolean setAPQHandlers(
+          jalview.gui.Desktop jalviewDesktop)
   {
     // flagging this test to avoid unnecessary reflection
     if (!setAPQHandlers)
@@ -82,16 +84,14 @@ public class APQHandlers
                     { PreferencesHandler.class }) != null)
             {
 
-              hdesktop.setPreferencesHandler(
-                      new PreferencesHandler()
+              hdesktop.setPreferencesHandler(new PreferencesHandler()
               {
-                        @Override
-                        public void handlePreferences(
-                                PreferencesEvent e)
-                        {
-                          jalviewDesktop.preferences_actionPerformed(null);
-                        }
-                      });
+                @Override
+                public void handlePreferences(PreferencesEvent e)
+                {
+                  jalviewDesktop.preferences_actionPerformed(null);
+                }
+              });
 
             }
 
@@ -103,13 +103,11 @@ public class APQHandlers
               hdesktop.setQuitHandler(new QuitHandler()
               {
                 @Override
-                public void handleQuitRequestWith(
-                        QuitEvent e, QuitResponse r)
+                public void handleQuitRequestWith(QuitEvent e,
+                        QuitResponse r)
                 {
-                  boolean confirmQuit = Cache
-                          .getDefault(
-                                  jalview.gui.Desktop.CONFIRM_KEYBOARD_QUIT,
-                                  true);
+                  boolean confirmQuit = Cache.getDefault(
+                          jalview.gui.Desktop.CONFIRM_KEYBOARD_QUIT, true);
                   int n;
                   if (confirmQuit)
                   {
@@ -138,8 +136,7 @@ public class APQHandlers
                   }
                 }
               });
-              hdesktop.setQuitStrategy(
-                      QuitStrategy.CLOSE_ALL_WINDOWS);
+              hdesktop.setQuitStrategy(QuitStrategy.CLOSE_ALL_WINDOWS);
 
             }
           }
@@ -165,7 +162,7 @@ public class APQHandlers
       }
 
     }
-    
+
     return setAPQHandlers;
   }
 
diff --git a/src/jalview/gui/AlignExportOptions.java b/src/jalview/gui/AlignExportOptions.java
index 70601c9..08ff021 100644
--- a/src/jalview/gui/AlignExportOptions.java
+++ b/src/jalview/gui/AlignExportOptions.java
@@ -109,8 +109,8 @@ public class AlignExportOptions extends JPanel
         MessageManager.getString("action.cancel") };
     dialog.showInternalDialog(this,
             MessageManager.getString("label.export_settings"),
-            JvOptionPane.OK_CANCEL_OPTION, JvOptionPane.PLAIN_MESSAGE,
-            null, options, MessageManager.getString("action.ok"));
+            JvOptionPane.OK_CANCEL_OPTION, JvOptionPane.PLAIN_MESSAGE, null,
+            options, MessageManager.getString("action.ok"));
   }
 
   /**
@@ -135,19 +135,19 @@ public class AlignExportOptions extends JPanel
     boolean set = chkHiddenSeqs.isEnabled() && isSelected;
     chkHiddenSeqs.setSelected(set);
     settings.setExportHiddenSequences(set);
-  
+
     set = chkHiddenCols.isEnabled() && isSelected;
     chkHiddenCols.setSelected(set);
     settings.setExportHiddenColumns(set);
-  
+
     set = isComplexAlignFile && chkExportAnnots.isEnabled() && isSelected;
     chkExportAnnots.setSelected(set);
     settings.setExportAnnotations(set);
-  
+
     set = isComplexAlignFile && chkExportFeats.isEnabled() && isSelected;
     chkExportFeats.setSelected(set);
     settings.setExportFeatures(set);
-  
+
     set = isComplexAlignFile && chkExportGrps.isEnabled() && isSelected;
     chkExportGrps.setSelected(set);
     settings.setExportGroups(set);
@@ -171,7 +171,7 @@ public class AlignExportOptions extends JPanel
         settings.setExportHiddenSequences(chkHiddenSeqs.isSelected());
       }
     });
-  
+
     chkHiddenCols.setText(
             MessageManager.getString("action.export_hidden_columns"));
     chkHiddenCols.addActionListener(new ActionListener()
@@ -182,7 +182,7 @@ public class AlignExportOptions extends JPanel
         settings.setExportHiddenColumns(chkHiddenCols.isSelected());
       }
     });
-  
+
     chkExportAnnots
             .setText(MessageManager.getString("action.export_annotations"));
     chkExportAnnots.addActionListener(new ActionListener()
@@ -193,7 +193,7 @@ public class AlignExportOptions extends JPanel
         settings.setExportAnnotations(chkExportAnnots.isSelected());
       }
     });
-  
+
     chkExportFeats
             .setText(MessageManager.getString("action.export_features"));
     chkExportFeats.addActionListener(new ActionListener()
@@ -204,7 +204,7 @@ public class AlignExportOptions extends JPanel
         settings.setExportFeatures(chkExportFeats.isSelected());
       }
     });
-  
+
     chkExportGrps.setText(MessageManager.getString("action.export_groups"));
     chkExportGrps.addActionListener(new ActionListener()
     {
@@ -214,14 +214,14 @@ public class AlignExportOptions extends JPanel
         settings.setExportGroups(chkExportGrps.isSelected());
       }
     });
-  
+
     JCheckBox chkAll = new JCheckBox(
             MessageManager.getString("action.select_all"));
-  
+
     JPanel hiddenRegionConfPanel = new JPanel(new BorderLayout());
     JPanel complexExportPanel = new JPanel(new BorderLayout());
     this.setLayout(new BorderLayout());
-  
+
     chkAll.addItemListener(new ItemListener()
     {
       @Override
@@ -230,30 +230,30 @@ public class AlignExportOptions extends JPanel
         checkAllAction(chkAll.isSelected());
       }
     });
-  
+
     hiddenRegionConfPanel.add(chkHiddenSeqs, BorderLayout.CENTER);
     hiddenRegionConfPanel.add(chkHiddenCols, BorderLayout.SOUTH);
     chkHiddenSeqs.setEnabled(hasHiddenSeq);
     chkHiddenCols.setEnabled(hasHiddenCols);
-  
+
     complexExportPanel.add(chkExportAnnots, BorderLayout.NORTH);
     complexExportPanel.add(chkExportFeats, BorderLayout.CENTER);
     complexExportPanel.add(chkExportGrps, BorderLayout.SOUTH);
-  
+
     JPanel actionPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
     actionPanel.add(chkAll);
-  
+
     JPanel optionsPanel = new JPanel();
     if (this.isComplexAlignFile)
     {
       optionsPanel.add(complexExportPanel);
     }
-  
+
     if (hasHiddenSeq || hasHiddenCols)
     {
       optionsPanel.add(hiddenRegionConfPanel);
     }
-  
+
     add(optionsPanel, BorderLayout.NORTH);
     add(actionPanel, BorderLayout.SOUTH);
   }
diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java
index d791842..e24cbea 100644
--- a/src/jalview/gui/AlignFrame.java
+++ b/src/jalview/gui/AlignFrame.java
@@ -369,8 +369,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
       // modifyPID.setEnabled(false);
     }
 
-    String sortby = Cache.getDefault("SORT_ALIGNMENT",
-            "No sort");
+    String sortby = Cache.getDefault("SORT_ALIGNMENT", "No sort");
 
     if (sortby.equals("Id"))
     {
@@ -489,8 +488,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
             });
     if (Cache.getDefault("VERSION", "DEVELOPMENT").toLowerCase(Locale.ROOT)
             .indexOf("devel") > -1
-            || Cache.getDefault("VERSION", "DEVELOPMENT").toLowerCase(Locale.ROOT)
-                    .indexOf("test") > -1)
+            || Cache.getDefault("VERSION", "DEVELOPMENT")
+                    .toLowerCase(Locale.ROOT).indexOf("test") > -1)
     {
       formatMenu.add(vsel);
     }
@@ -579,7 +578,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
           }
           if (viewport.cursorMode)
           {
-            alignPanel.getSeqPanel().moveCursor(0, -1,evt.isShiftDown());
+            alignPanel.getSeqPanel().moveCursor(0, -1, evt.isShiftDown());
           }
 
           break;
@@ -4306,7 +4305,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
                       jws2servs.attachWSMenuEntry(webService, me);
                       for (Jws2Instance sv : jws2servs.getServices())
                       {
-                        if (sv.description.toLowerCase(Locale.ROOT).contains("jpred"))
+                        if (sv.description.toLowerCase(Locale.ROOT)
+                                .contains("jpred"))
                         {
                           for (JMenuItem jmi : legacyItems)
                           {
@@ -4498,8 +4498,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
       al = dna.translateCdna(codeTable);
     } catch (Exception ex)
     {
-      Console.error(
-              "Exception during translation. Please report this !", ex);
+      Console.error("Exception during translation. Please report this !",
+              ex);
       final String msg = MessageManager.getString(
               "label.error_when_translating_sequences_submit_bug_report");
       final String errorTitle = MessageManager
diff --git a/src/jalview/gui/AlignViewport.java b/src/jalview/gui/AlignViewport.java
index 092d7e7..30ccdbe 100644
--- a/src/jalview/gui/AlignViewport.java
+++ b/src/jalview/gui/AlignViewport.java
@@ -291,8 +291,8 @@ public class AlignViewport extends AlignmentViewport
       schemeName = Cache.getDefault(Preferences.DEFAULT_COLOUR,
               ResidueColourScheme.NONE);
     }
-    ColourSchemeI colourScheme = ColourSchemeProperty
-            .getColourScheme(this, alignment, schemeName);
+    ColourSchemeI colourScheme = ColourSchemeProperty.getColourScheme(this,
+            alignment, schemeName);
     residueShading = new ResidueShader(colourScheme);
 
     if (colourScheme instanceof UserColourScheme)
@@ -741,7 +741,7 @@ public class AlignViewport extends AlignmentViewport
     final String question = JvSwingUtils.wrapTooltip(true,
             MessageManager.getString("label.open_split_window?"));
     final AlignViewport us = this;
-    
+
     /*
      * options No, Split Window, New Window correspond to
      * dialog responses 0, 1, 2 (even though JOptionPane shows them
@@ -753,7 +753,7 @@ public class AlignViewport extends AlignmentViewport
               @Override
               public void run()
               {
-                  addDataToAlignment(al);
+                addDataToAlignment(al);
               }
             }).setResponseHandler(1, new Runnable()
             {
@@ -770,7 +770,7 @@ public class AlignViewport extends AlignmentViewport
                 us.openLinkedAlignmentAs(al, title, false);
               }
             });
-	dialog.showDialog(question,
+    dialog.showDialog(question,
             MessageManager.getString("label.open_split_window"),
             JvOptionPane.DEFAULT_OPTION, JvOptionPane.PLAIN_MESSAGE, null,
             options, options[0]);
@@ -778,7 +778,7 @@ public class AlignViewport extends AlignmentViewport
 
   protected void openLinkedAlignmentAs(AlignmentI al, String title,
           boolean newWindowOrSplitPane)
-    {
+  {
     /*
      * Identify protein and dna alignments. Make a copy of this one if opening
      * in a new split pane.
@@ -824,8 +824,7 @@ public class AlignViewport extends AlignmentViewport
 
     try
     {
-      newAlignFrame.setMaximum(
-              Cache.getDefault("SHOW_FULLSCREEN", false));
+      newAlignFrame.setMaximum(Cache.getDefault("SHOW_FULLSCREEN", false));
     } catch (java.beans.PropertyVetoException ex)
     {
     }
@@ -991,10 +990,10 @@ public class AlignViewport extends AlignmentViewport
   }
 
   /**
-   * Applies the supplied feature settings descriptor to currently known features.
-   * This supports an 'initial configuration' of feature colouring based on a
-   * preset or user favourite. This may then be modified in the usual way using
-   * the Feature Settings dialogue.
+   * Applies the supplied feature settings descriptor to currently known
+   * features. This supports an 'initial configuration' of feature colouring
+   * based on a preset or user favourite. This may then be modified in the usual
+   * way using the Feature Settings dialogue.
    * 
    * @param featureSettings
    */
@@ -1007,8 +1006,8 @@ public class AlignViewport extends AlignmentViewport
   /**
    * when mergeOnly is set, then group and feature visibility or feature colours
    * are not modified for features and groups already known to the feature
-   * renderer. Feature ordering is always adjusted, and transparency is always set
-   * regardless.
+   * renderer. Feature ordering is always adjusted, and transparency is always
+   * set regardless.
    * 
    * @param featureSettings
    * @param mergeOnly
@@ -1020,12 +1019,13 @@ public class AlignViewport extends AlignmentViewport
     {
       return;
     }
-    
+
     FeatureRenderer fr = getAlignPanel().getSeqPanel().seqCanvas
             .getFeatureRenderer();
     List origRenderOrder = new ArrayList<>();
     List origGroups = new ArrayList<>();
-    // preserve original render order - allows differentiation between user configured colours and autogenerated ones
+    // preserve original render order - allows differentiation between user
+    // configured colours and autogenerated ones
     origRenderOrder.addAll(fr.getRenderOrder());
     origGroups.addAll(fr.getFeatureGroups());
 
@@ -1057,7 +1057,8 @@ public class AlignViewport extends AlignmentViewport
                       && origColour.getColour().equals(
                               ColorUtils.createColourFromName(type)))))
       {
-        // if we are merging, only update if there wasn't already a colour defined for
+        // if we are merging, only update if there wasn't already a colour
+        // defined for
         // this type
         if (preferredColour != null)
         {
@@ -1081,7 +1082,8 @@ public class AlignViewport extends AlignmentViewport
     {
       if (!mergeOnly || !origGroups.contains(group))
       {
-        // when merging, display groups only if the aren't already marked as not visible
+        // when merging, display groups only if the aren't already marked as not
+        // visible
         fr.setGroupVisibility(group,
                 featureSettings.isGroupDisplayed(group));
       }
diff --git a/src/jalview/gui/AlignmentPanel.java b/src/jalview/gui/AlignmentPanel.java
index 5366913..e84aae0 100644
--- a/src/jalview/gui/AlignmentPanel.java
+++ b/src/jalview/gui/AlignmentPanel.java
@@ -123,7 +123,7 @@ public class AlignmentPanel extends GAlignmentPanel implements
    */
   public AlignmentPanel(AlignFrame af, final AlignViewport av)
   {
-//	setBackground(Color.white);  // BH 2019
+    // setBackground(Color.white); // BH 2019
     alignFrame = af;
     this.av = av;
     setSeqPanel(new SeqPanel(av, this));
@@ -472,8 +472,7 @@ public class AlignmentPanel extends GAlignmentPanel implements
         /*
          * Scroll down to make end of search results visible
          */
-        setScrollValues(ranges.getStartRes(), starts + seqIndex - ends
-                + 1);
+        setScrollValues(ranges.getStartRes(), starts + seqIndex - ends + 1);
       }
       /*
        * Else results are already visible - no need to scroll
@@ -573,7 +572,6 @@ public class AlignmentPanel extends GAlignmentPanel implements
     Dimension e = idPanel.getSize();
     alabels.setSize(new Dimension(e.width, annotationHeight));
 
-
     annotationSpaceFillerHolder.setPreferredSize(new Dimension(
             annotationSpaceFillerHolder.getWidth(), annotationHeight));
     annotationScroller.validate();
@@ -1021,8 +1019,8 @@ public class AlignmentPanel extends GAlignmentPanel implements
      * single graphics context), then reset to (0, scale height)
      */
     alignmentGraphics.translate(alignmentGraphicsOffset, scaleHeight);
-    getSeqPanel().seqCanvas.drawPanelForPrinting(alignmentGraphics, startRes,
-            endRes, startSeq, endSeq - 1);
+    getSeqPanel().seqCanvas.drawPanelForPrinting(alignmentGraphics,
+            startRes, endRes, startSeq, endSeq - 1);
     alignmentGraphics.translate(-alignmentGraphicsOffset, 0);
 
     if (av.isShowAnnotation() && (endSeq == alignmentHeight))
@@ -1066,8 +1064,8 @@ public class AlignmentPanel extends GAlignmentPanel implements
    * 
    * @throws PrinterException
    */
-  public int printWrappedAlignment(int pageWidth, int pageHeight, int pageNumber,
-          Graphics g) throws PrinterException
+  public int printWrappedAlignment(int pageWidth, int pageHeight,
+          int pageNumber, Graphics g) throws PrinterException
   {
     getSeqPanel().seqCanvas.calculateWrappedGeometry(getWidth(),
             getHeight());
@@ -1119,8 +1117,8 @@ public class AlignmentPanel extends GAlignmentPanel implements
 
     g.translate(idWidth, 0);
 
-    getSeqPanel().seqCanvas.drawWrappedPanelForPrinting(g, pageWidth - idWidth,
-            totalHeight, 0);
+    getSeqPanel().seqCanvas.drawWrappedPanelForPrinting(g,
+            pageWidth - idWidth, totalHeight, 0);
 
     if ((pageNumber * pageHeight) < totalHeight)
     {
@@ -1285,13 +1283,13 @@ public class AlignmentPanel extends GAlignmentPanel implements
             String triplet = null;
             if (av.getAlignment().isNucleotide())
             {
-              triplet = ResidueProperties.nucleotideName.get(seq
-                      .getCharAt(column) + "");
+              triplet = ResidueProperties.nucleotideName
+                      .get(seq.getCharAt(column) + "");
             }
             else
             {
-              triplet = ResidueProperties.aa2Triplet.get(seq.getCharAt(column)
-                      + "");
+              triplet = ResidueProperties.aa2Triplet
+                      .get(seq.getCharAt(column) + "");
             }
 
             if (triplet == null)
@@ -1308,7 +1306,8 @@ public class AlignmentPanel extends GAlignmentPanel implements
                 text.append(" features = seq.findFeatures(column, column);
+              List features = seq.findFeatures(column,
+                      column);
               for (SequenceFeature sf : features)
               {
                 if (sf.isContactFeature())
@@ -1547,11 +1547,12 @@ public class AlignmentPanel extends GAlignmentPanel implements
       setAlignFrameView();
     }
   }
+
   public void setAlignFrameView()
   {
     alignFrame.setDisplayedView(this);
   }
-  
+
   @Override
   public StructureSelectionManager getStructureSelectionManager()
   {
diff --git a/src/jalview/gui/AnnotationColourChooser.java b/src/jalview/gui/AnnotationColourChooser.java
index ad013f5..4e9a26d 100644
--- a/src/jalview/gui/AnnotationColourChooser.java
+++ b/src/jalview/gui/AnnotationColourChooser.java
@@ -145,8 +145,7 @@ public class AnnotationColourChooser extends AnnotationRowFilter
                 "error.implementation_error_dont_know_about_threshold_setting"));
       }
       thresholdIsMin.setSelected(acg.isThresholdIsMinMax());
-      thresholdValue
-              .setText(String.valueOf(acg.getAnnotationThreshold()));
+      thresholdValue.setText(String.valueOf(acg.getAnnotationThreshold()));
     }
 
     jbInit();
@@ -437,8 +436,7 @@ public class AnnotationColourChooser extends AnnotationRowFilter
         {
           continue;
         }
-        sg.setColourScheme(
-                acg.getInstance(av, sg));
+        sg.setColourScheme(acg.getInstance(av, sg));
       }
     }
   }
diff --git a/src/jalview/gui/AnnotationColumnChooser.java b/src/jalview/gui/AnnotationColumnChooser.java
index 8b66b8e..c0d4708 100644
--- a/src/jalview/gui/AnnotationColumnChooser.java
+++ b/src/jalview/gui/AnnotationColumnChooser.java
@@ -91,6 +91,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter
   private HiddenColumns oldHiddenColumns;
 
   protected static int MIN_WIDTH = (Platform.isJS() ? 370 : 420);
+
   protected static int MIN_HEIGHT = (Platform.isJS() ? 370 : 430);
 
   public AnnotationColumnChooser(AlignViewport av, final AlignmentPanel ap)
@@ -100,9 +101,8 @@ public class AnnotationColumnChooser extends AnnotationRowFilter
     frame.setContentPane(this);
     frame.setLayer(JLayeredPane.PALETTE_LAYER);
     Desktop.addInternalFrame(frame,
-            MessageManager.getString("label.select_by_annotation"), 0,
-            0);
-    // BH note: MIGLayout ignores this completely, 
+            MessageManager.getString("label.select_by_annotation"), 0, 0);
+    // BH note: MIGLayout ignores this completely,
     // possibly creating a frame smaller than specified:
     frame.setMinimumSize(new Dimension(MIN_WIDTH, MIN_HEIGHT));
 
@@ -158,7 +158,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter
             MessageManager.getString("label.threshold_filter")));
     thresholdPanel.setBackground(Color.white);
     thresholdPanel.setFont(JvSwingUtils.getLabelFont());
-    thresholdPanel.setLayout(new MigLayout("", "[left][right]", "[][]") );
+    thresholdPanel.setLayout(new MigLayout("", "[left][right]", "[][]"));
 
     percentThreshold.setBackground(Color.white);
     percentThreshold.setFont(JvSwingUtils.getLabelFont());
@@ -300,15 +300,14 @@ public class AnnotationColumnChooser extends AnnotationRowFilter
       if (currentAnnotation.threshold == null)
       {
         currentAnnotation.setThreshold(new jalview.datamodel.GraphLine(
-                (currentAnnotation.graphMax
-                        - currentAnnotation.graphMin) / 2f,
+                (currentAnnotation.graphMax - currentAnnotation.graphMin)
+                        / 2f,
                 "Threshold", Color.black));
       }
 
       adjusting = true;
 
-      setSliderModel(currentAnnotation.graphMin,
-              currentAnnotation.graphMax,
+      setSliderModel(currentAnnotation.graphMin, currentAnnotation.graphMax,
               currentAnnotation.threshold.value);
 
       setThresholdValueText();
@@ -322,8 +321,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter
               AnnotationFilterParameter.ThresholdType.NO_THRESHOLD);
       if (currentAnnotation.isQuantitative())
       {
-        filterParams
-                .setThresholdValue(currentAnnotation.threshold.value);
+        filterParams.setThresholdValue(currentAnnotation.threshold.value);
 
         if (selectedThresholdItem == AnnotationColourGradient.ABOVE_THRESHOLD)
         {
@@ -378,8 +376,8 @@ public class AnnotationColumnChooser extends AnnotationRowFilter
     // filterAnnotations, because showing hidden columns has the side effect of
     // adding them to the selection
     av.showAllHiddenColumns();
-    av.getColumnSelection().filterAnnotations(
-            currentAnnotation.annotations, filterParams);
+    av.getColumnSelection().filterAnnotations(currentAnnotation.annotations,
+            filterParams);
 
     boolean hideCols = getActionOption() == ACTION_OPTION_HIDE;
     if (hideCols)
@@ -495,7 +493,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter
 
     CardLayout switchableViewsLayout = (CardLayout) switchableViewsPanel
             .getLayout();
-    	switchableViewsLayout.show(switchableViewsPanel, currentView);
+    switchableViewsLayout.show(switchableViewsPanel, currentView);
     updateView();
   }
 
@@ -732,17 +730,17 @@ public class AnnotationColumnChooser extends AnnotationRowFilter
       searchBox.getComponent().setToolTipText(
               MessageManager.getString("info.enter_search_text_here"));
       searchBox.addKeyListener(new java.awt.event.KeyAdapter()
-              {
-                @Override
-                public void keyPressed(KeyEvent e)
-                {
-                  if (e.getKeyCode() == KeyEvent.VK_ENTER)
-                  {
-                    e.consume();
-                    searchStringAction();
-                  }
-                }
-              });
+      {
+        @Override
+        public void keyPressed(KeyEvent e)
+        {
+          if (e.getKeyCode() == KeyEvent.VK_ENTER)
+          {
+            e.consume();
+            searchStringAction();
+          }
+        }
+      });
       searchBox.addFocusListener(new FocusAdapter()
       {
         @Override
diff --git a/src/jalview/gui/AnnotationExporter.java b/src/jalview/gui/AnnotationExporter.java
index 568ca47..1efd100 100644
--- a/src/jalview/gui/AnnotationExporter.java
+++ b/src/jalview/gui/AnnotationExporter.java
@@ -116,9 +116,9 @@ public class AnnotationExporter extends JPanel
   }
 
   /**
-   * Configures the dialog for options to export visible features. If from a split
-   * frame panel showing linked features, make the option to include these in the
-   * export visible.
+   * Configures the dialog for options to export visible features. If from a
+   * split frame panel showing linked features, make the option to include these
+   * in the export visible.
    */
   public void exportFeatures()
   {
@@ -197,8 +197,8 @@ public class AnnotationExporter extends JPanel
   }
 
   /**
-   * Answers the text to output for either Features (in GFF or Jalview format) or
-   * Annotations (in CSV or Jalview format)
+   * Answers the text to output for either Features (in GFF or Jalview format)
+   * or Annotations (in CSV or Jalview format)
    * 
    * @return
    */
@@ -208,8 +208,8 @@ public class AnnotationExporter extends JPanel
   }
 
   /**
-   * Returns the text contents for output of annotations in either CSV or Jalview
-   * format
+   * Returns the text contents for output of annotations in either CSV or
+   * Jalview format
    * 
    * @return
    */
@@ -325,10 +325,10 @@ public class AnnotationExporter extends JPanel
   }
 
   /**
-   * Builds a panel with a checkbox for the option to export linked (CDS/peptide)
-   * features. This is hidden by default, and only made visible if exporting
-   * features from a split frame panel which is configured to show linked
-   * features.
+   * Builds a panel with a checkbox for the option to export linked
+   * (CDS/peptide) features. This is hidden by default, and only made visible if
+   * exporting features from a split frame panel which is configured to show
+   * linked features.
    * 
    * @return
    */
@@ -338,17 +338,14 @@ public class AnnotationExporter extends JPanel
     linkedFeaturesPanel.setOpaque(false);
 
     boolean nucleotide = ap.av.isNucleotide();
-    String complement = nucleotide
-            ? MessageManager.getString("label.protein").toLowerCase(Locale.ROOT)
-            : "CDS";
-    JLabel label = new JLabel(
-            MessageManager.formatMessage("label.include_linked_features",
-                    complement));
+    String complement = nucleotide ? MessageManager
+            .getString("label.protein").toLowerCase(Locale.ROOT) : "CDS";
+    JLabel label = new JLabel(MessageManager
+            .formatMessage("label.include_linked_features", complement));
     label.setHorizontalAlignment(SwingConstants.TRAILING);
     String tooltip = MessageManager
             .formatMessage("label.include_linked_tooltip", complement);
-    label.setToolTipText(
-            JvSwingUtils.wrapTooltip(true, tooltip));
+    label.setToolTipText(JvSwingUtils.wrapTooltip(true, tooltip));
 
     includeLinkedFeatures = new JCheckBox();
     linkedFeaturesPanel.add(label);
@@ -405,8 +402,8 @@ public class AnnotationExporter extends JPanel
   }
 
   /**
-   * Builds the panel with options to output in Jalview, GFF or CSV format. GFF is
-   * only made visible when exporting features, CSV only when exporting
+   * Builds the panel with options to output in Jalview, GFF or CSV format. GFF
+   * is only made visible when exporting features, CSV only when exporting
    * annotation.
    * 
    * @return
diff --git a/src/jalview/gui/AnnotationLabels.java b/src/jalview/gui/AnnotationLabels.java
index 21c45e9..9976604 100755
--- a/src/jalview/gui/AnnotationLabels.java
+++ b/src/jalview/gui/AnnotationLabels.java
@@ -137,7 +137,7 @@ public class AnnotationLabels extends JPanel
    */
   public AnnotationLabels(AlignmentPanel ap)
   {
-	  
+
     this.ap = ap;
     av = ap.av;
     ToolTipManager.sharedInstance().registerComponent(this);
@@ -293,27 +293,26 @@ public class AnnotationLabels extends JPanel
     EditNameDialog dialog = new EditNameDialog(annotation.label,
             annotation.description, name, description);
 
-    dialog.showDialog(ap.alignFrame, title,
-            new Runnable()
-            {
-              @Override
-              public void run()
-              {
-                annotation.label = dialog.getName();
-                String text = dialog.getDescription();
-                if (text != null && text.length() == 0)
-                {
-                  text = null;
-                }
-                annotation.description = text;
-                if (addNew)
-                {
-                  ap.av.getAlignment().addAnnotation(annotation);
-                  ap.av.getAlignment().setAnnotationIndex(annotation, 0);
-                }
-                ap.refresh(true);
-              }
-            });
+    dialog.showDialog(ap.alignFrame, title, new Runnable()
+    {
+      @Override
+      public void run()
+      {
+        annotation.label = dialog.getName();
+        String text = dialog.getDescription();
+        if (text != null && text.length() == 0)
+        {
+          text = null;
+        }
+        annotation.description = text;
+        if (addNew)
+        {
+          ap.av.getAlignment().addAnnotation(annotation);
+          ap.av.getAlignment().setAnnotationIndex(annotation, 0);
+        }
+        ap.refresh(true);
+      }
+    });
   }
 
   @Override
@@ -438,8 +437,7 @@ public class AnnotationLabels extends JPanel
    * @param pop
    */
   static void addConsensusMenuOptions(AlignmentPanel ap,
-          AlignmentAnnotation ann,
-          JPopupMenu pop)
+          AlignmentAnnotation ann, JPopupMenu pop)
   {
     pop.addSeparator();
 
diff --git a/src/jalview/gui/AnnotationPanel.java b/src/jalview/gui/AnnotationPanel.java
index f8172dc..756e544 100755
--- a/src/jalview/gui/AnnotationPanel.java
+++ b/src/jalview/gui/AnnotationPanel.java
@@ -355,7 +355,8 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
         @Override
         public void colourSelected(Color c)
         {
-          HiddenColumns hiddenColumns = av.getAlignment().getHiddenColumns();
+          HiddenColumns hiddenColumns = av.getAlignment()
+                  .getHiddenColumns();
           for (int index : av.getColumnSelection().getSelected())
           {
             if (hiddenColumns.isVisible(index))
@@ -366,10 +367,11 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
               }
               fAnot[index].colour = c;
             }
-        }};
+          }
+        };
       };
-      JalviewColourChooser.showColourChooser(this,
-              title, Color.black, listener);
+      JalviewColourChooser.showColourChooser(this, title, Color.black,
+              listener);
     }
     else
     // HELIX, SHEET or STEM
@@ -999,7 +1001,9 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
   }
 
   private volatile boolean imageFresh = false;
-  private Rectangle visibleRect = new Rectangle(), clipBounds = new Rectangle();
+
+  private Rectangle visibleRect = new Rectangle(),
+          clipBounds = new Rectangle();
 
   /**
    * DOCUMENT ME!
@@ -1010,27 +1014,28 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
   @Override
   public void paintComponent(Graphics g)
   {
-	  
-	  // BH: note that this method is generally recommended to 
-	  // call super.paintComponent(g). Otherwise, the children of this
-	  // component will not be rendered. That is not needed here 
-	  // because AnnotationPanel does not have any children. It is
-	  // just a JPanel contained in a JViewPort. 
+
+    // BH: note that this method is generally recommended to
+    // call super.paintComponent(g). Otherwise, the children of this
+    // component will not be rendered. That is not needed here
+    // because AnnotationPanel does not have any children. It is
+    // just a JPanel contained in a JViewPort.
 
     computeVisibleRect(visibleRect);
-    
+
     g.setColor(Color.white);
     g.fillRect(0, 0, visibleRect.width, visibleRect.height);
 
     if (image != null)
     {
-    	// BH 2018 optimizing generation of new Rectangle().
-      if (fastPaint || (visibleRect.width != (clipBounds = g.getClipBounds(clipBounds)).width)
-            || (visibleRect.height != clipBounds.height))
+      // BH 2018 optimizing generation of new Rectangle().
+      if (fastPaint
+              || (visibleRect.width != (clipBounds = g
+                      .getClipBounds(clipBounds)).width)
+              || (visibleRect.height != clipBounds.height))
       {
 
-    	  
-    	  g.drawImage(image, 0, 0, this);
+        g.drawImage(image, 0, 0, this);
         fastPaint = false;
         return;
       }
@@ -1077,11 +1082,13 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
       gg.setColor(Color.white);
       gg.fillRect(0, 0, imgWidth, image.getHeight());
       imageFresh = true;
-    } else {
-        gg = (Graphics2D) image.getGraphics();
+    }
+    else
+    {
+      gg = (Graphics2D) image.getGraphics();
 
     }
-    
+
     drawComponent(gg, av.getRanges().getStartRes(),
             av.getRanges().getEndRes() + 1);
     gg.dispose();
@@ -1137,7 +1144,7 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
     gg.translate(-transX, 0);
 
     gg.dispose();
-    
+
     fastPaint = true;
 
     // Call repaint on alignment panel so that repaints from other alignment
@@ -1281,7 +1288,7 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
     ap = null;
     image = null;
     fadedImage = null;
-//    gg = null;
+    // gg = null;
     _mwl = null;
 
     /*
diff --git a/src/jalview/gui/AnnotationRowFilter.java b/src/jalview/gui/AnnotationRowFilter.java
index 6f72e10..44a1668 100644
--- a/src/jalview/gui/AnnotationRowFilter.java
+++ b/src/jalview/gui/AnnotationRowFilter.java
@@ -182,9 +182,10 @@ public abstract class AnnotationRowFilter extends JPanel
   {
     slider.setSliderValue(value);
   }
+
   /**
-   * Answers the value of the slider position as a percentage between minimum and
-   * maximum of its range
+   * Answers the value of the slider position as a percentage between minimum
+   * and maximum of its range
    * 
    * @return
    */
diff --git a/src/jalview/gui/AppJmol.java b/src/jalview/gui/AppJmol.java
index 16d0dd7..2447a2f 100644
--- a/src/jalview/gui/AppJmol.java
+++ b/src/jalview/gui/AppJmol.java
@@ -184,8 +184,7 @@ public class AppJmol extends StructureViewerBase
   }
 
   private void openNewJmol(AlignmentPanel ap, boolean alignAdded,
-          PDBEntry[] pdbentrys,
-          SequenceI[][] seqs)
+          PDBEntry[] pdbentrys, SequenceI[][] seqs)
   {
     setProgressIndicator(ap.alignFrame);
     jmb = new AppJmolBinding(this, ap.getStructureSelectionManager(),
@@ -234,7 +233,6 @@ public class AppJmol extends StructureViewerBase
     openNewJmol(ap, alignAdded, pe, seqs);
   }
 
-
   void initJmol(String command)
   {
     jmb.setFinishedInit(false);
@@ -436,7 +434,8 @@ public class AppJmol extends StructureViewerBase
         jmb.jmolViewer.renderScreenImage(g, width, height);
       }
     };
-    String view = MessageManager.getString("action.view").toLowerCase(Locale.ROOT);
+    String view = MessageManager.getString("action.view")
+            .toLowerCase(Locale.ROOT);
     ImageExporter exporter = new ImageExporter(writer,
             getProgressIndicator(), type, getTitle());
     exporter.doExport(null, this, width, height, view);
@@ -448,7 +447,7 @@ public class AppJmol extends StructureViewerBase
     try
     {
       BrowserLauncher // BH 2018
-              .openURL("http://wiki.jmol.org");//http://jmol.sourceforge.net/docs/JmolUserGuide/");
+              .openURL("http://wiki.jmol.org");// http://jmol.sourceforge.net/docs/JmolUserGuide/");
     } catch (Exception ex)
     {
       System.err.println("Show Jmol help failed with: " + ex.getMessage());
@@ -523,7 +522,8 @@ public class AppJmol extends StructureViewerBase
           }
         }
       }
-      else if (jmb == null || jmb.jmolViewer == null || !jmb.isFinishedInit())
+      else if (jmb == null || jmb.jmolViewer == null
+              || !jmb.isFinishedInit())
       {
         g.setColor(Color.black);
         g.fillRect(0, 0, currentSize.width, currentSize.height);
diff --git a/src/jalview/gui/AppJmolBinding.java b/src/jalview/gui/AppJmolBinding.java
index 34d930d..3f8175d 100644
--- a/src/jalview/gui/AppJmolBinding.java
+++ b/src/jalview/gui/AppJmolBinding.java
@@ -214,7 +214,7 @@ public class AppJmolBinding extends JalviewJmolBinding
   {
     // todo - record which pdbids were successfully imported.
     StringBuilder errormsgs = new StringBuilder();
-  
+
     List files = new ArrayList<>();
     String pdbid = "";
     try
@@ -222,7 +222,7 @@ public class AppJmolBinding extends JalviewJmolBinding
       String[] filesInViewer = getStructureFiles();
       // TODO: replace with reference fetching/transfer code (validate PDBentry
       // as a DBRef?)
-      
+
       for (int pi = 0; pi < getPdbCount(); pi++)
       {
         PDBEntry strucEntry = getPdbEntry(pi);
@@ -231,7 +231,8 @@ public class AppJmolBinding extends JalviewJmolBinding
         if (file == null)
         {
           pdbid = strucEntry.getId();
-          try{ 
+          try
+          {
             file = structureViewer.fetchPdbFile(strucEntry);
           } catch (OutOfMemoryError oomerror)
           {
@@ -241,7 +242,7 @@ public class AppJmolBinding extends JalviewJmolBinding
             ex.printStackTrace();
             errormsgs.append("'").append(pdbid).append("'");
           }
-          if (file!=null)
+          if (file != null)
           {
             // success
             files.add(file);
diff --git a/src/jalview/gui/AppVarnaBinding.java b/src/jalview/gui/AppVarnaBinding.java
index 7430856..5cfe72a 100644
--- a/src/jalview/gui/AppVarnaBinding.java
+++ b/src/jalview/gui/AppVarnaBinding.java
@@ -289,8 +289,9 @@ public class AppVarnaBinding extends JalviewVarnaBinding
                         name += " (Model " + mn++ + ")";
                       }
                       _rnaList.add(varnaPanel.getConfig().clone(), r, name,
-                              true); 
-                      // BH 2018 SwingJS clone of varnaPanel or its config will be the object itself, not a clone
+                              true);
+                      // BH 2018 SwingJS clone of varnaPanel or its config will
+                      // be the object itself, not a clone
                     }
                   }
                 }
@@ -546,7 +547,8 @@ public class AppVarnaBinding extends JalviewVarnaBinding
    */
   public void addStructure(RNA rna)
   {
-    VARNAConfig config = vp.getConfig().clone(); // BH 2018 this will NOT be a clone in SwingJS
+    VARNAConfig config = vp.getConfig().clone(); // BH 2018 this will NOT be a
+                                                 // clone in SwingJS
     addStructure(rna, config);
   }
 
diff --git a/src/jalview/gui/BlogReader.java b/src/jalview/gui/BlogReader.java
index fb7d7c5..af59ca7 100644
--- a/src/jalview/gui/BlogReader.java
+++ b/src/jalview/gui/BlogReader.java
@@ -254,11 +254,9 @@ public class BlogReader extends JPanel
     _channelModel = new ChannelListModel();
     // Construct our jalview news channel
     Channel chan = new Channel();
-    chan.setURL(
-            Cache.getDefault("JALVIEW_NEWS_RSS",
-                    Cache.getDefault("www.jalview.org",
-                            "https://www.jalview.org")
-                            + "/feeds/desktop/rss"));
+    chan.setURL(Cache.getDefault("JALVIEW_NEWS_RSS",
+            Cache.getDefault("www.jalview.org", "https://www.jalview.org")
+                    + "/feeds/desktop/rss"));
     loadLastM();
     _channelModel.addChannel(chan);
     updating = true;
diff --git a/src/jalview/gui/CalculationChooser.java b/src/jalview/gui/CalculationChooser.java
index 097a5a0..f7e5413 100644
--- a/src/jalview/gui/CalculationChooser.java
+++ b/src/jalview/gui/CalculationChooser.java
@@ -156,7 +156,7 @@ public class CalculationChooser extends JPanel
     pca = new JRadioButton(
             MessageManager.getString("label.principal_component_analysis"));
     pca.setOpaque(false);
-    
+
     neighbourJoining = new JRadioButton(
             MessageManager.getString("label.tree_calc_nj"));
     neighbourJoining.setSelected(true);
diff --git a/src/jalview/gui/ChimeraViewFrame.java b/src/jalview/gui/ChimeraViewFrame.java
index 3a17ea3..cc6a785 100644
--- a/src/jalview/gui/ChimeraViewFrame.java
+++ b/src/jalview/gui/ChimeraViewFrame.java
@@ -73,10 +73,11 @@ public class ChimeraViewFrame extends StructureViewerBase
 
   private int myHeight = 150;
 
-  private JMenuItem writeFeatures=null;
+  private JMenuItem writeFeatures = null;
 
-  private JMenu fetchAttributes=null;
-/**
+  private JMenu fetchAttributes = null;
+
+  /**
    * Initialise menu options.
    */
   @Override
@@ -89,8 +90,8 @@ public class ChimeraViewFrame extends StructureViewerBase
 
     writeFeatures = new JMenuItem(
             MessageManager.getString("label.create_viewer_attributes"));
-    writeFeatures.setToolTipText(MessageManager
-            .getString("label.create_viewer_attributes_tip"));
+    writeFeatures.setToolTipText(
+            MessageManager.getString("label.create_viewer_attributes_tip"));
     writeFeatures.addActionListener(new ActionListener()
     {
       @Override
@@ -101,10 +102,10 @@ public class ChimeraViewFrame extends StructureViewerBase
     });
     viewerActionMenu.add(writeFeatures);
 
-    fetchAttributes = new JMenu(
-            MessageManager.formatMessage("label.fetch_viewer_attributes",getViewerName()));
-    fetchAttributes.setToolTipText(
-            MessageManager.formatMessage("label.fetch_viewer_attributes_tip",getViewerName()));
+    fetchAttributes = new JMenu(MessageManager.formatMessage(
+            "label.fetch_viewer_attributes", getViewerName()));
+    fetchAttributes.setToolTipText(MessageManager.formatMessage(
+            "label.fetch_viewer_attributes_tip", getViewerName()));
     fetchAttributes.addMouseListener(new MouseAdapter()
     {
 
@@ -116,6 +117,7 @@ public class ChimeraViewFrame extends StructureViewerBase
     });
     viewerActionMenu.add(fetchAttributes);
   }
+
   @Override
   protected void buildActionMenu()
   {
@@ -123,8 +125,9 @@ public class ChimeraViewFrame extends StructureViewerBase
     // add these back in after menu is refreshed
     viewerActionMenu.add(writeFeatures);
     viewerActionMenu.add(fetchAttributes);
-    
+
   };
+
   /**
    * Query the structure viewer for its residue attribute names and add them as
    * items off the attributes menu
@@ -163,8 +166,8 @@ public class ChimeraViewFrame extends StructureViewerBase
   {
     // todo pull up?
     int count = jmb.sendFeaturesToViewer(getAlignmentPanel());
-    statusBar.setText(
-            MessageManager.formatMessage("label.attributes_set", count, getViewerName()));
+    statusBar.setText(MessageManager.formatMessage("label.attributes_set",
+            count, getViewerName()));
   }
 
   /**
@@ -291,8 +294,7 @@ public class ChimeraViewFrame extends StructureViewerBase
    * @param ap
    */
   public ChimeraViewFrame(PDBEntry[] pe, boolean alignAdded,
-          SequenceI[][] seqs,
-          AlignmentPanel ap)
+          SequenceI[][] seqs, AlignmentPanel ap)
   {
     this();
     setAlignAddedStructures(alignAdded);
diff --git a/src/jalview/gui/ColourMenuHelper.java b/src/jalview/gui/ColourMenuHelper.java
index 6eab07d..c1c75f1 100644
--- a/src/jalview/gui/ColourMenuHelper.java
+++ b/src/jalview/gui/ColourMenuHelper.java
@@ -120,8 +120,8 @@ public class ColourMenuHelper
        * the colour scheme (inspected in setColourSelected())
        */
       final String name = scheme.getSchemeName();
-      String label = MessageManager.getStringOrReturn(
-              "label.colourScheme_", name);
+      String label = MessageManager.getStringOrReturn("label.colourScheme_",
+              name);
       final JRadioButtonMenuItem radioItem = new JRadioButtonMenuItem(
               label);
       radioItem.setName(name);
diff --git a/src/jalview/gui/Console.java b/src/jalview/gui/Console.java
index d9d729a..9cf2cc9 100644
--- a/src/jalview/gui/Console.java
+++ b/src/jalview/gui/Console.java
@@ -220,7 +220,8 @@ public class Console extends WindowAdapter
       {
         if (jalview.bin.Console.log != null)
         {
-          jalview.bin.Console.log.setLevel((LogLevel) logLevelCombo.getSelectedItem());
+          jalview.bin.Console.log
+                  .setLevel((LogLevel) logLevelCombo.getSelectedItem());
         }
       }
 
@@ -510,7 +511,8 @@ public class Console extends WindowAdapter
       JalviewAppender jappender = new JalviewAppender(level);
       JalviewAppender.setTextArea(textArea);
       jappender.start();
-      if (jalview.bin.Console.log != null && jalview.bin.Console.log instanceof JLoggerLog4j)
+      if (jalview.bin.Console.log != null
+              && jalview.bin.Console.log instanceof JLoggerLog4j)
       {
         JLoggerLog4j.addAppender(jalview.bin.Console.log, jappender);
       }
diff --git a/src/jalview/gui/CrossRefAction.java b/src/jalview/gui/CrossRefAction.java
index b04661e..c15cf2d 100644
--- a/src/jalview/gui/CrossRefAction.java
+++ b/src/jalview/gui/CrossRefAction.java
@@ -115,7 +115,8 @@ public class CrossRefAction implements Runnable
 
       if (dna && AlignmentUtils.looksLikeEnsembl(alignment))
       {
-        // override default featureColourScheme so products have Ensembl variant colours
+        // override default featureColourScheme so products have Ensembl variant
+        // colours
         featureColourScheme = new SequenceFetcher()
                 .getFeatureColourScheme(DBRefSource.ENSEMBL);
       }
@@ -206,7 +207,8 @@ public class CrossRefAction implements Runnable
        * and for JAL-3330 also to original alignFrame view(s)
        * this currently trashes any original settings.
        */
-      for (AlignmentViewPanel origpanel: alignFrame.getAlignPanels()) {
+      for (AlignmentViewPanel origpanel : alignFrame.getAlignPanels())
+      {
         origpanel.getAlignViewport()
                 .mergeFeaturesStyle(featureColourScheme);
       }
@@ -293,9 +295,9 @@ public class CrossRefAction implements Runnable
     {
       return;
     }
-    
+
     Set ensemblDivisions = new EnsemblInfo().getDivisions();
-    
+
     /*
      * first look for direct dbrefs from sequence to Ensembl
      */
@@ -451,8 +453,7 @@ public class CrossRefAction implements Runnable
       copyAlignment = AlignmentUtils.makeCopyAlignment(sel,
               xrefs.getSequencesArray(), dataset);
     }
-    copyAlignment
-            .setGapCharacter(alignFrame.viewport.getGapCharacter());
+    copyAlignment.setGapCharacter(alignFrame.viewport.getGapCharacter());
 
     StructureSelectionManager ssm = StructureSelectionManager
             .getStructureSelectionManager(Desktop.instance);
@@ -465,8 +466,7 @@ public class CrossRefAction implements Runnable
 
     if (copyAlignment.getHeight() <= 0)
     {
-      System.err.println(
-              "No Sequences generated for xRef type " + source);
+      System.err.println("No Sequences generated for xRef type " + source);
       return null;
     }
 
diff --git a/src/jalview/gui/CutAndPasteTransfer.java b/src/jalview/gui/CutAndPasteTransfer.java
index 5e36500..112d502 100644
--- a/src/jalview/gui/CutAndPasteTransfer.java
+++ b/src/jalview/gui/CutAndPasteTransfer.java
@@ -299,8 +299,8 @@ public class CutAndPasteTransfer extends GCutAndPasteTransfer
           af.getViewport().setShowSequenceFeatures(showSeqFeatures);
           af.getViewport().setFeaturesDisplayed(fd);
           af.setMenusForViewport();
-          ColourSchemeI cs = ColourSchemeMapper.getJalviewColourScheme(
-                  colourSchemeName, al);
+          ColourSchemeI cs = ColourSchemeMapper
+                  .getJalviewColourScheme(colourSchemeName, al);
           if (cs != null)
           {
             af.changeColour(cs);
@@ -327,8 +327,7 @@ public class CutAndPasteTransfer extends GCutAndPasteTransfer
 
         try
         {
-          af.setMaximum(
-                  Cache.getDefault("SHOW_FULLSCREEN", false));
+          af.setMaximum(Cache.getDefault("SHOW_FULLSCREEN", false));
         } catch (Exception ex)
         {
         }
diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java
index 4f12de4..aeb0fac 100644
--- a/src/jalview/gui/Desktop.java
+++ b/src/jalview/gui/Desktop.java
@@ -138,7 +138,9 @@ import jalview.ws.utils.UrlDownloadClient;
  * @version $Revision: 1.155 $
  */
 public class Desktop extends jalview.jbgui.GDesktop
-    implements DropTargetListener, ClipboardOwner, IProgressIndicator, jalview.api.StructureSelectionManagerProvider {
+        implements DropTargetListener, ClipboardOwner, IProgressIndicator,
+        jalview.api.StructureSelectionManagerProvider
+{
   private static final String CITATION;
   static
   {
@@ -200,7 +202,9 @@ public class Desktop extends jalview.jbgui.GDesktop
    * @param listener
    * @see jalview.gui.JalviewChangeSupport#addJalviewPropertyChangeListener(java.beans.PropertyChangeListener)
    */
-  public void addJalviewPropertyChangeListener(PropertyChangeListener listener) {
+  public void addJalviewPropertyChangeListener(
+          PropertyChangeListener listener)
+  {
     changeSupport.addJalviewPropertyChangeListener(listener);
   }
 
@@ -210,7 +214,9 @@ public class Desktop extends jalview.jbgui.GDesktop
    * @see jalview.gui.JalviewChangeSupport#addJalviewPropertyChangeListener(java.lang.String,
    *      java.beans.PropertyChangeListener)
    */
-  public void addJalviewPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
+  public void addJalviewPropertyChangeListener(String propertyName,
+          PropertyChangeListener listener)
+  {
     changeSupport.addJalviewPropertyChangeListener(propertyName, listener);
   }
 
@@ -220,8 +226,11 @@ public class Desktop extends jalview.jbgui.GDesktop
    * @see jalview.gui.JalviewChangeSupport#removeJalviewPropertyChangeListener(java.lang.String,
    *      java.beans.PropertyChangeListener)
    */
-  public void removeJalviewPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
-    changeSupport.removeJalviewPropertyChangeListener(propertyName, listener);
+  public void removeJalviewPropertyChangeListener(String propertyName,
+          PropertyChangeListener listener)
+  {
+    changeSupport.removeJalviewPropertyChangeListener(propertyName,
+            listener);
   }
 
   /** Singleton Desktop instance */
@@ -229,7 +238,8 @@ public class Desktop extends jalview.jbgui.GDesktop
 
   public static MyDesktopPane desktop;
 
-  public static MyDesktopPane getDesktop() {
+  public static MyDesktopPane getDesktop()
+  {
     // BH 2018 could use currentThread() here as a reference to a
     // Hashtable in JavaScript
     return desktop;
@@ -249,99 +259,122 @@ public class Desktop extends jalview.jbgui.GDesktop
 
   static int fileLoadingCount = 0;
 
-  class MyDesktopManager implements DesktopManager {
+  class MyDesktopManager implements DesktopManager
+  {
 
     private DesktopManager delegate;
 
-    public MyDesktopManager(DesktopManager delegate) {
+    public MyDesktopManager(DesktopManager delegate)
+    {
       this.delegate = delegate;
     }
 
     @Override
-    public void activateFrame(JInternalFrame f) {
-      try {
+    public void activateFrame(JInternalFrame f)
+    {
+      try
+      {
         delegate.activateFrame(f);
-      } catch (NullPointerException npe) {
+      } catch (NullPointerException npe)
+      {
         Point p = getMousePosition();
         instance.showPasteMenu(p.x, p.y);
       }
     }
 
     @Override
-    public void beginDraggingFrame(JComponent f) {
+    public void beginDraggingFrame(JComponent f)
+    {
       delegate.beginDraggingFrame(f);
     }
 
     @Override
-    public void beginResizingFrame(JComponent f, int direction) {
+    public void beginResizingFrame(JComponent f, int direction)
+    {
       delegate.beginResizingFrame(f, direction);
     }
 
     @Override
-    public void closeFrame(JInternalFrame f) {
+    public void closeFrame(JInternalFrame f)
+    {
       delegate.closeFrame(f);
     }
 
     @Override
-    public void deactivateFrame(JInternalFrame f) {
+    public void deactivateFrame(JInternalFrame f)
+    {
       delegate.deactivateFrame(f);
     }
 
     @Override
-    public void deiconifyFrame(JInternalFrame f) {
+    public void deiconifyFrame(JInternalFrame f)
+    {
       delegate.deiconifyFrame(f);
     }
 
     @Override
-    public void dragFrame(JComponent f, int newX, int newY) {
-      if (newY < 0) {
+    public void dragFrame(JComponent f, int newX, int newY)
+    {
+      if (newY < 0)
+      {
         newY = 0;
       }
       delegate.dragFrame(f, newX, newY);
     }
 
     @Override
-    public void endDraggingFrame(JComponent f) {
+    public void endDraggingFrame(JComponent f)
+    {
       delegate.endDraggingFrame(f);
       desktop.repaint();
     }
 
     @Override
-    public void endResizingFrame(JComponent f) {
+    public void endResizingFrame(JComponent f)
+    {
       delegate.endResizingFrame(f);
       desktop.repaint();
     }
 
     @Override
-    public void iconifyFrame(JInternalFrame f) {
+    public void iconifyFrame(JInternalFrame f)
+    {
       delegate.iconifyFrame(f);
     }
 
     @Override
-    public void maximizeFrame(JInternalFrame f) {
+    public void maximizeFrame(JInternalFrame f)
+    {
       delegate.maximizeFrame(f);
     }
 
     @Override
-    public void minimizeFrame(JInternalFrame f) {
+    public void minimizeFrame(JInternalFrame f)
+    {
       delegate.minimizeFrame(f);
     }
 
     @Override
-    public void openFrame(JInternalFrame f) {
+    public void openFrame(JInternalFrame f)
+    {
       delegate.openFrame(f);
     }
 
     @Override
-    public void resizeFrame(JComponent f, int newX, int newY, int newWidth, int newHeight) {
-      if (newY < 0) {
+    public void resizeFrame(JComponent f, int newX, int newY, int newWidth,
+            int newHeight)
+    {
+      if (newY < 0)
+      {
         newY = 0;
       }
       delegate.resizeFrame(f, newX, newY, newWidth, newHeight);
     }
 
     @Override
-    public void setBoundsForFrame(JComponent f, int newX, int newY, int newWidth, int newHeight) {
+    public void setBoundsForFrame(JComponent f, int newX, int newY,
+            int newWidth, int newHeight)
+    {
       delegate.setBoundsForFrame(f, newX, newY, newWidth, newHeight);
     }
 
@@ -352,72 +385,91 @@ public class Desktop extends jalview.jbgui.GDesktop
   /**
    * Creates a new Desktop object.
    */
-  public Desktop() {
+  public Desktop()
+  {
     super();
     /**
-     * A note to implementors. It is ESSENTIAL that any activities that might block
-     * are spawned off as threads rather than waited for during this constructor.
+     * A note to implementors. It is ESSENTIAL that any activities that might
+     * block are spawned off as threads rather than waited for during this
+     * constructor.
      */
     instance = this;
 
     doConfigureStructurePrefs();
-    setTitle(ChannelProperties.getProperty("app_name") + " " + Cache.getProperty("VERSION"));
+    setTitle(ChannelProperties.getProperty("app_name") + " "
+            + Cache.getProperty("VERSION"));
 
     /**
      * Set taskbar "grouped windows" name for linux desktops (works in GNOME and
-     * KDE). This uses sun.awt.X11.XToolkit.awtAppClassName which is not officially
-     * documented or guaranteed to exist, so we access it via reflection. There
-     * appear to be unfathomable criteria about what this string can contain, and it
-     * if doesn't meet those criteria then "java" (KDE) or "jalview-bin-Jalview"
-     * (GNOME) is used. "Jalview", "Jalview Develop" and "Jalview Test" seem okay,
-     * but "Jalview non-release" does not. The reflection access may generate a
-     * warning: WARNING: An illegal reflective access operation has occurred
-     * WARNING: Illegal reflective access by jalview.gui.Desktop () to field
+     * KDE). This uses sun.awt.X11.XToolkit.awtAppClassName which is not
+     * officially documented or guaranteed to exist, so we access it via
+     * reflection. There appear to be unfathomable criteria about what this
+     * string can contain, and it if doesn't meet those criteria then "java"
+     * (KDE) or "jalview-bin-Jalview" (GNOME) is used. "Jalview", "Jalview
+     * Develop" and "Jalview Test" seem okay, but "Jalview non-release" does
+     * not. The reflection access may generate a warning: WARNING: An illegal
+     * reflective access operation has occurred WARNING: Illegal reflective
+     * access by jalview.gui.Desktop () to field
      * sun.awt.X11.XToolkit.awtAppClassName which I don't think can be avoided.
      */
-    if (Platform.isLinux()) {
-      try {
+    if (Platform.isLinux())
+    {
+      try
+      {
         Toolkit xToolkit = Toolkit.getDefaultToolkit();
         Field[] declaredFields = xToolkit.getClass().getDeclaredFields();
         Field awtAppClassNameField = null;
 
-        if (Arrays.stream(declaredFields).anyMatch(f -> f.getName().equals("awtAppClassName"))) {
-          awtAppClassNameField = xToolkit.getClass().getDeclaredField("awtAppClassName");
+        if (Arrays.stream(declaredFields)
+                .anyMatch(f -> f.getName().equals("awtAppClassName")))
+        {
+          awtAppClassNameField = xToolkit.getClass()
+                  .getDeclaredField("awtAppClassName");
         }
 
         String title = ChannelProperties.getProperty("app_name");
-        if (awtAppClassNameField != null) {
+        if (awtAppClassNameField != null)
+        {
           awtAppClassNameField.setAccessible(true);
           awtAppClassNameField.set(xToolkit, title);
-        } else {
+        }
+        else
+        {
           jalview.bin.Console.debug("XToolkit: awtAppClassName not found");
         }
-      } catch (Exception e) {
+      } catch (Exception e)
+      {
         jalview.bin.Console.debug("Error setting awtAppClassName");
         jalview.bin.Console.trace(Cache.getStackTraceString(e));
       }
     }
 
     /**
-     * APQHandlers sets handlers for About, Preferences and Quit actions peculiar to
-     * macOS's application menu. APQHandlers will check to see if a handler is
-     * supported before setting it.
+     * APQHandlers sets handlers for About, Preferences and Quit actions
+     * peculiar to macOS's application menu. APQHandlers will check to see if a
+     * handler is supported before setting it.
      */
-    try {
+    try
+    {
       APQHandlers.setAPQHandlers(this);
-    } catch (Exception e) {
+    } catch (Exception e)
+    {
       System.out.println("Cannot set APQHandlers");
       // e.printStackTrace();
-    } catch (Throwable t) {
-      jalview.bin.Console.warn("Error setting APQHandlers: " + t.toString());
+    } catch (Throwable t)
+    {
+      jalview.bin.Console
+              .warn("Error setting APQHandlers: " + t.toString());
       jalview.bin.Console.trace(Cache.getStackTraceString(t));
     }
     setIconImages(ChannelProperties.getIconList());
 
-    addWindowListener(new WindowAdapter() {
+    addWindowListener(new WindowAdapter()
+    {
 
       @Override
-      public void windowClosing(WindowEvent ev) {
+      public void windowClosing(WindowEvent ev)
+      {
         quit();
       }
     });
@@ -437,7 +489,8 @@ public class Desktop extends jalview.jbgui.GDesktop
     // getContentPane().add(sp, BorderLayout.CENTER);
 
     // BH 2018 - just an experiment to try unclipped JInternalFrames.
-    if (Platform.isJS()) {
+    if (Platform.isJS())
+    {
       getRootPane().putClientProperty("swingjs.overflow.hidden", "false");
     }
 
@@ -446,14 +499,20 @@ public class Desktop extends jalview.jbgui.GDesktop
 
     // This line prevents Windows Look&Feel resizing all new windows to maximum
     // if previous window was maximised
-    desktop.setDesktopManager(new MyDesktopManager((Platform.isWindowsAndNotJS() ? new DefaultDesktopManager()
-        : Platform.isAMacAndNotJS() ? new AquaInternalFrameManager(desktop.getDesktopManager())
-            : desktop.getDesktopManager())));
+    desktop.setDesktopManager(new MyDesktopManager(
+            (Platform.isWindowsAndNotJS() ? new DefaultDesktopManager()
+                    : Platform.isAMacAndNotJS()
+                            ? new AquaInternalFrameManager(
+                                    desktop.getDesktopManager())
+                            : desktop.getDesktopManager())));
 
     Rectangle dims = getLastKnownDimensions("");
-    if (dims != null) {
+    if (dims != null)
+    {
       setBounds(dims);
-    } else {
+    }
+    else
+    {
       Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
       int xPos = Math.max(5, (screenSize.width - 900) / 2);
       int yPos = Math.max(5, (screenSize.height - 650) / 2);
@@ -480,10 +539,13 @@ public class Desktop extends jalview.jbgui.GDesktop
       checkURLLinks();
 
       // Spawn a thread that shows the splashscreen
-      if (!nosplash) {
-        SwingUtilities.invokeLater(new Runnable() {
+      if (!nosplash)
+      {
+        SwingUtilities.invokeLater(new Runnable()
+        {
           @Override
-          public void run() {
+          public void run()
+          {
             new SplashScreen(true);
           }
         });
@@ -492,39 +554,51 @@ public class Desktop extends jalview.jbgui.GDesktop
       // Thread off a new instance of the file chooser - this reduces the time
       // it
       // takes to open it later on.
-      new Thread(new Runnable() {
+      new Thread(new Runnable()
+      {
         @Override
-        public void run() {
+        public void run()
+        {
           jalview.bin.Console.debug("Filechooser init thread started.");
           String fileFormat = Cache.getProperty("DEFAULT_FILE_FORMAT");
-          JalviewFileChooser.forRead(Cache.getProperty("LAST_DIRECTORY"), fileFormat);
+          JalviewFileChooser.forRead(Cache.getProperty("LAST_DIRECTORY"),
+                  fileFormat);
           jalview.bin.Console.debug("Filechooser init thread finished.");
         }
       }).start();
       // Add the service change listener
-      changeSupport.addJalviewPropertyChangeListener("services", new PropertyChangeListener() {
+      changeSupport.addJalviewPropertyChangeListener("services",
+              new PropertyChangeListener()
+              {
 
-        @Override
-        public void propertyChange(PropertyChangeEvent evt) {
-          jalview.bin.Console.debug("Firing service changed event for " + evt.getNewValue());
-          JalviewServicesChanged(evt);
-        }
-      });
+                @Override
+                public void propertyChange(PropertyChangeEvent evt)
+                {
+                  jalview.bin.Console
+                          .debug("Firing service changed event for "
+                                  + evt.getNewValue());
+                  JalviewServicesChanged(evt);
+                }
+              });
     }
 
     this.setDropTarget(new java.awt.dnd.DropTarget(desktop, this));
 
-    this.addWindowListener(new WindowAdapter() {
+    this.addWindowListener(new WindowAdapter()
+    {
       @Override
-      public void windowClosing(WindowEvent evt) {
+      public void windowClosing(WindowEvent evt)
+      {
         quit();
       }
     });
 
     MouseAdapter ma;
-    this.addMouseListener(ma = new MouseAdapter() {
+    this.addMouseListener(ma = new MouseAdapter()
+    {
       @Override
-      public void mousePressed(MouseEvent evt) {
+      public void mousePressed(MouseEvent evt)
+      {
         if (evt.isPopupTrigger()) // Mac
         {
           showPasteMenu(evt.getX(), evt.getY());
@@ -532,7 +606,8 @@ public class Desktop extends jalview.jbgui.GDesktop
       }
 
       @Override
-      public void mouseReleased(MouseEvent evt) {
+      public void mouseReleased(MouseEvent evt)
+      {
         if (evt.isPopupTrigger()) // Windows
         {
           showPasteMenu(evt.getX(), evt.getY());
@@ -548,32 +623,45 @@ public class Desktop extends jalview.jbgui.GDesktop
    * 
    * @return
    */
-  public boolean showExperimental() {
-    String experimental = Cache.getDefault(EXPERIMENTAL_FEATURES, Boolean.FALSE.toString());
+  public boolean showExperimental()
+  {
+    String experimental = Cache.getDefault(EXPERIMENTAL_FEATURES,
+            Boolean.FALSE.toString());
     return Boolean.valueOf(experimental).booleanValue();
   }
 
-  public void doConfigureStructurePrefs() {
+  public void doConfigureStructurePrefs()
+  {
     // configure services
-    StructureSelectionManager ssm = StructureSelectionManager.getStructureSelectionManager(this);
-    if (Cache.getDefault(Preferences.ADD_SS_ANN, true)) {
-      ssm.setAddTempFacAnnot(Cache.getDefault(Preferences.ADD_TEMPFACT_ANN, true));
-      ssm.setProcessSecondaryStructure(Cache.getDefault(Preferences.STRUCT_FROM_PDB, true));
+    StructureSelectionManager ssm = StructureSelectionManager
+            .getStructureSelectionManager(this);
+    if (Cache.getDefault(Preferences.ADD_SS_ANN, true))
+    {
+      ssm.setAddTempFacAnnot(
+              Cache.getDefault(Preferences.ADD_TEMPFACT_ANN, true));
+      ssm.setProcessSecondaryStructure(
+              Cache.getDefault(Preferences.STRUCT_FROM_PDB, true));
       // JAL-3915 - RNAView is no longer an option so this has no effect
-      ssm.setSecStructServices(Cache.getDefault(Preferences.USE_RNAVIEW, false));
-    } else {
+      ssm.setSecStructServices(
+              Cache.getDefault(Preferences.USE_RNAVIEW, false));
+    }
+    else
+    {
       ssm.setAddTempFacAnnot(false);
       ssm.setProcessSecondaryStructure(false);
       ssm.setSecStructServices(false);
     }
   }
 
-  public void checkForNews() {
+  public void checkForNews()
+  {
     final Desktop me = this;
     // Thread off the news reader, in case there are connection problems.
-    new Thread(new Runnable() {
+    new Thread(new Runnable()
+    {
       @Override
-      public void run() {
+      public void run()
+      {
         jalview.bin.Console.debug("Starting news thread.");
         jvnews = new BlogReader(me);
         showNews.setVisible(true);
@@ -591,15 +679,17 @@ public class Desktop extends jalview.jbgui.GDesktop
         @Override
         public void run()
         {
-          jalview.bin.Console.debug("Downloading data from identifiers.org");
+          jalview.bin.Console
+                  .debug("Downloading data from identifiers.org");
           try
           {
             UrlDownloadClient.download(IdOrgSettings.getUrl(),
                     IdOrgSettings.getDownloadLocation());
           } catch (IOException e)
           {
-            jalview.bin.Console.debug("Exception downloading identifiers.org data"
-                    + e.getMessage());
+            jalview.bin.Console
+                    .debug("Exception downloading identifiers.org data"
+                            + e.getMessage());
           }
         }
       }).start();
@@ -608,19 +698,25 @@ public class Desktop extends jalview.jbgui.GDesktop
   }
 
   @Override
-  protected void showNews_actionPerformed(ActionEvent e) {
+  protected void showNews_actionPerformed(ActionEvent e)
+  {
     showNews(showNews.isSelected());
   }
 
-  void showNews(boolean visible) {
+  void showNews(boolean visible)
+  {
     jalview.bin.Console.debug((visible ? "Showing" : "Hiding") + " news.");
     showNews.setSelected(visible);
-    if (visible && !jvnews.isVisible()) {
-      new Thread(new Runnable() {
+    if (visible && !jvnews.isVisible())
+    {
+      new Thread(new Runnable()
+      {
         @Override
-        public void run() {
+        public void run()
+        {
           long now = System.currentTimeMillis();
-          Desktop.instance.setProgressBar(MessageManager.getString("status.refreshing_news"), now);
+          Desktop.instance.setProgressBar(
+                  MessageManager.getString("status.refreshing_news"), now);
           jvnews.refreshNews();
           Desktop.instance.setProgressBar(null, now);
           jvnews.showNews();
@@ -632,42 +728,52 @@ public class Desktop extends jalview.jbgui.GDesktop
   /**
    * recover the last known dimensions for a jalview window
    * 
-   * @param windowName - empty string is desktop, all other windows have unique
-   *                   prefix
+   * @param windowName
+   *          - empty string is desktop, all other windows have unique prefix
    * @return null or last known dimensions scaled to current geometry (if last
    *         window geom was known)
    */
-  Rectangle getLastKnownDimensions(String windowName) {
+  Rectangle getLastKnownDimensions(String windowName)
+  {
     // TODO: lock aspect ratio for scaling desktop Bug #0058199
     Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
     String x = Cache.getProperty(windowName + "SCREEN_X");
     String y = Cache.getProperty(windowName + "SCREEN_Y");
     String width = Cache.getProperty(windowName + "SCREEN_WIDTH");
     String height = Cache.getProperty(windowName + "SCREEN_HEIGHT");
-    if ((x != null) && (y != null) && (width != null) && (height != null)) {
-      int ix = Integer.parseInt(x), iy = Integer.parseInt(y), iw = Integer.parseInt(width),
-          ih = Integer.parseInt(height);
-      if (Cache.getProperty("SCREENGEOMETRY_WIDTH") != null) {
+    if ((x != null) && (y != null) && (width != null) && (height != null))
+    {
+      int ix = Integer.parseInt(x), iy = Integer.parseInt(y),
+              iw = Integer.parseInt(width), ih = Integer.parseInt(height);
+      if (Cache.getProperty("SCREENGEOMETRY_WIDTH") != null)
+      {
         // attempt #1 - try to cope with change in screen geometry - this
         // version doesn't preserve original jv aspect ratio.
         // take ratio of current screen size vs original screen size.
-        double sw = ((1f * screenSize.width) / (1f * Integer.parseInt(Cache.getProperty("SCREENGEOMETRY_WIDTH"))));
-        double sh = ((1f * screenSize.height) / (1f * Integer.parseInt(Cache.getProperty("SCREENGEOMETRY_HEIGHT"))));
+        double sw = ((1f * screenSize.width) / (1f * Integer
+                .parseInt(Cache.getProperty("SCREENGEOMETRY_WIDTH"))));
+        double sh = ((1f * screenSize.height) / (1f * Integer
+                .parseInt(Cache.getProperty("SCREENGEOMETRY_HEIGHT"))));
         // rescale the bounds depending upon the current screen geometry.
         ix = (int) (ix * sw);
         iw = (int) (iw * sw);
         iy = (int) (iy * sh);
         ih = (int) (ih * sh);
-        while (ix >= screenSize.width) {
-          jalview.bin.Console.debug("Window geometry location recall error: shifting horizontal to within screenbounds.");
+        while (ix >= screenSize.width)
+        {
+          jalview.bin.Console.debug(
+                  "Window geometry location recall error: shifting horizontal to within screenbounds.");
           ix -= screenSize.width;
         }
-        while (iy >= screenSize.height) {
-          jalview.bin.Console.debug("Window geometry location recall error: shifting vertical to within screenbounds.");
+        while (iy >= screenSize.height)
+        {
+          jalview.bin.Console.debug(
+                  "Window geometry location recall error: shifting vertical to within screenbounds.");
           iy -= screenSize.height;
         }
-        jalview.bin.Console.debug("Got last known dimensions for " + windowName + ": x:" + ix + " y:" + iy + " width:" + iw
-            + " height:" + ih);
+        jalview.bin.Console.debug(
+                "Got last known dimensions for " + windowName + ": x:" + ix
+                        + " y:" + iy + " width:" + iw + " height:" + ih);
       }
       // return dimensions for new instance
       return new Rectangle(ix, iy, iw, ih);
@@ -675,12 +781,16 @@ public class Desktop extends jalview.jbgui.GDesktop
     return null;
   }
 
-  void showPasteMenu(int x, int y) {
+  void showPasteMenu(int x, int y)
+  {
     JPopupMenu popup = new JPopupMenu();
-    JMenuItem item = new JMenuItem(MessageManager.getString("label.paste_new_window"));
-    item.addActionListener(new ActionListener() {
+    JMenuItem item = new JMenuItem(
+            MessageManager.getString("label.paste_new_window"));
+    item.addActionListener(new ActionListener()
+    {
       @Override
-      public void actionPerformed(ActionEvent evt) {
+      public void actionPerformed(ActionEvent evt)
+      {
         paste();
       }
     });
@@ -689,79 +799,115 @@ public class Desktop extends jalview.jbgui.GDesktop
     popup.show(this, x, y);
   }
 
-  public void paste() {
-    try {
+  public void paste()
+  {
+    try
+    {
       Clipboard c = Toolkit.getDefaultToolkit().getSystemClipboard();
       Transferable contents = c.getContents(this);
 
-      if (contents != null) {
-        String file = (String) contents.getTransferData(DataFlavor.stringFlavor);
+      if (contents != null)
+      {
+        String file = (String) contents
+                .getTransferData(DataFlavor.stringFlavor);
 
-        FileFormatI format = new IdentifyFile().identify(file, DataSourceType.PASTE);
+        FileFormatI format = new IdentifyFile().identify(file,
+                DataSourceType.PASTE);
 
         new FileLoader().LoadFile(file, DataSourceType.PASTE, format);
 
       }
-    } catch (Exception ex) {
-      System.out.println("Unable to paste alignment from system clipboard:\n" + ex);
+    } catch (Exception ex)
+    {
+      System.out.println(
+              "Unable to paste alignment from system clipboard:\n" + ex);
     }
   }
 
   /**
    * Adds and opens the given frame to the desktop
    * 
-   * @param frame Frame to show
-   * @param title Visible Title
-   * @param w     width
-   * @param h     height
-   */
-  public static synchronized void addInternalFrame(final JInternalFrame frame, String title, int w, int h) {
+   * @param frame
+   *          Frame to show
+   * @param title
+   *          Visible Title
+   * @param w
+   *          width
+   * @param h
+   *          height
+   */
+  public static synchronized void addInternalFrame(
+          final JInternalFrame frame, String title, int w, int h)
+  {
     addInternalFrame(frame, title, true, w, h, true, false);
   }
 
   /**
    * Add an internal frame to the Jalview desktop
    * 
-   * @param frame       Frame to show
-   * @param title       Visible Title
-   * @param makeVisible When true, display frame immediately, otherwise, caller
-   *                    must call setVisible themselves.
-   * @param w           width
-   * @param h           height
-   */
-  public static synchronized void addInternalFrame(final JInternalFrame frame, String title, boolean makeVisible, int w,
-      int h) {
+   * @param frame
+   *          Frame to show
+   * @param title
+   *          Visible Title
+   * @param makeVisible
+   *          When true, display frame immediately, otherwise, caller must call
+   *          setVisible themselves.
+   * @param w
+   *          width
+   * @param h
+   *          height
+   */
+  public static synchronized void addInternalFrame(
+          final JInternalFrame frame, String title, boolean makeVisible,
+          int w, int h)
+  {
     addInternalFrame(frame, title, makeVisible, w, h, true, false);
   }
 
   /**
    * Add an internal frame to the Jalview desktop and make it visible
    * 
-   * @param frame     Frame to show
-   * @param title     Visible Title
-   * @param w         width
-   * @param h         height
-   * @param resizable Allow resize
-   */
-  public static synchronized void addInternalFrame(final JInternalFrame frame, String title, int w, int h,
-      boolean resizable) {
+   * @param frame
+   *          Frame to show
+   * @param title
+   *          Visible Title
+   * @param w
+   *          width
+   * @param h
+   *          height
+   * @param resizable
+   *          Allow resize
+   */
+  public static synchronized void addInternalFrame(
+          final JInternalFrame frame, String title, int w, int h,
+          boolean resizable)
+  {
     addInternalFrame(frame, title, true, w, h, resizable, false);
   }
 
   /**
    * Add an internal frame to the Jalview desktop
    * 
-   * @param frame         Frame to show
-   * @param title         Visible Title
-   * @param makeVisible   When true, display frame immediately, otherwise, caller
-   *                      must call setVisible themselves.
-   * @param w             width
-   * @param h             height
-   * @param resizable     Allow resize
-   * @param ignoreMinSize Do not set the default minimum size for frame
-   */
-  public static synchronized void addInternalFrame(final JInternalFrame frame, String title, boolean makeVisible, int w,
-      int h, boolean resizable, boolean ignoreMinSize) {
+   * @param frame
+   *          Frame to show
+   * @param title
+   *          Visible Title
+   * @param makeVisible
+   *          When true, display frame immediately, otherwise, caller must call
+   *          setVisible themselves.
+   * @param w
+   *          width
+   * @param h
+   *          height
+   * @param resizable
+   *          Allow resize
+   * @param ignoreMinSize
+   *          Do not set the default minimum size for frame
+   */
+  public static synchronized void addInternalFrame(
+          final JInternalFrame frame, String title, boolean makeVisible,
+          int w, int h, boolean resizable, boolean ignoreMinSize)
+  {
 
     // TODO: allow callers to determine X and Y position of frame (eg. via
     // bounds object).
@@ -769,7 +915,8 @@ public class Desktop extends jalview.jbgui.GDesktop
     // the current window title
 
     frame.setTitle(title);
-    if (frame.getWidth() < 1 || frame.getHeight() < 1) {
+    if (frame.getWidth() < 1 || frame.getHeight() < 1)
+    {
       frame.setSize(w, h);
     }
     // THIS IS A PUBLIC STATIC METHOD, SO IT MAY BE CALLED EVEN IN
@@ -777,21 +924,26 @@ public class Desktop extends jalview.jbgui.GDesktop
     // IF JALVIEW IS RUNNING HEADLESS
     // ///////////////////////////////////////////////
     if (instance == null || (System.getProperty("java.awt.headless") != null
-        && System.getProperty("java.awt.headless").equals("true"))) {
+            && System.getProperty("java.awt.headless").equals("true")))
+    {
       return;
     }
 
     openFrameCount++;
 
-    if (!ignoreMinSize) {
-      frame.setMinimumSize(new Dimension(DEFAULT_MIN_WIDTH, DEFAULT_MIN_HEIGHT));
+    if (!ignoreMinSize)
+    {
+      frame.setMinimumSize(
+              new Dimension(DEFAULT_MIN_WIDTH, DEFAULT_MIN_HEIGHT));
 
       // Set default dimension for Alignment Frame window.
       // The Alignment Frame window could be added from a number of places,
       // hence,
       // I did this here in order not to miss out on any Alignment frame.
-      if (frame instanceof AlignFrame) {
-        frame.setMinimumSize(new Dimension(ALIGN_FRAME_DEFAULT_MIN_WIDTH, ALIGN_FRAME_DEFAULT_MIN_HEIGHT));
+      if (frame instanceof AlignFrame)
+      {
+        frame.setMinimumSize(new Dimension(ALIGN_FRAME_DEFAULT_MIN_WIDTH,
+                ALIGN_FRAME_DEFAULT_MIN_HEIGHT));
       }
     }
 
@@ -802,8 +954,10 @@ public class Desktop extends jalview.jbgui.GDesktop
     frame.setIconifiable(resizable);
     frame.setOpaque(Platform.isJS());
 
-    if (frame.getX() < 1 && frame.getY() < 1) {
-      frame.setLocation(xOffset * openFrameCount, yOffset * ((openFrameCount - 1) % 10) + yOffset);
+    if (frame.getX() < 1 && frame.getY() < 1)
+    {
+      frame.setLocation(xOffset * openFrameCount,
+              yOffset * ((openFrameCount - 1) % 10) + yOffset);
     }
 
     /*
@@ -811,12 +965,16 @@ public class Desktop extends jalview.jbgui.GDesktop
      * frame is closed)
      */
     final JMenuItem menuItem = new JMenuItem(title);
-    frame.addInternalFrameListener(new InternalFrameAdapter() {
+    frame.addInternalFrameListener(new InternalFrameAdapter()
+    {
       @Override
-      public void internalFrameActivated(InternalFrameEvent evt) {
+      public void internalFrameActivated(InternalFrameEvent evt)
+      {
         JInternalFrame itf = desktop.getSelectedFrame();
-        if (itf != null) {
-          if (itf instanceof AlignFrame) {
+        if (itf != null)
+        {
+          if (itf instanceof AlignFrame)
+          {
             Jalview.setCurrentAlignFrame((AlignFrame) itf);
           }
           itf.requestFocus();
@@ -824,33 +982,40 @@ public class Desktop extends jalview.jbgui.GDesktop
       }
 
       @Override
-      public void internalFrameClosed(InternalFrameEvent evt) {
+      public void internalFrameClosed(InternalFrameEvent evt)
+      {
         PaintRefresher.RemoveComponent(frame);
 
         /*
          * defensive check to prevent frames being added half off the window
          */
-        if (openFrameCount > 0) {
+        if (openFrameCount > 0)
+        {
           openFrameCount--;
         }
 
         /*
          * ensure no reference to alignFrame retained by menu item listener
          */
-        if (menuItem.getActionListeners().length > 0) {
+        if (menuItem.getActionListeners().length > 0)
+        {
           menuItem.removeActionListener(menuItem.getActionListeners()[0]);
         }
         windowMenu.remove(menuItem);
       }
     });
 
-    menuItem.addActionListener(new ActionListener() {
+    menuItem.addActionListener(new ActionListener()
+    {
       @Override
-      public void actionPerformed(ActionEvent e) {
-        try {
+      public void actionPerformed(ActionEvent e)
+      {
+        try
+        {
           frame.setSelected(true);
           frame.setIcon(false);
-        } catch (java.beans.PropertyVetoException ex) {
+        } catch (java.beans.PropertyVetoException ex)
+        {
 
         }
       }
@@ -863,28 +1028,34 @@ public class Desktop extends jalview.jbgui.GDesktop
     windowMenu.add(menuItem);
 
     frame.toFront();
-    try {
+    try
+    {
       frame.setSelected(true);
       frame.requestFocus();
-    } catch (java.beans.PropertyVetoException ve) {
-    } catch (java.lang.ClassCastException cex) {
+    } catch (java.beans.PropertyVetoException ve)
+    {
+    } catch (java.lang.ClassCastException cex)
+    {
       jalview.bin.Console.warn(
-          "Squashed a possible GUI implementation error. If you can recreate this, please look at https://issues.jalview.org/browse/JAL-869",
-          cex);
+              "Squashed a possible GUI implementation error. If you can recreate this, please look at https://issues.jalview.org/browse/JAL-869",
+              cex);
     }
   }
 
   /**
-   * Add key bindings to a JInternalFrame so that Ctrl-W and Cmd-W will close the
-   * window
+   * Add key bindings to a JInternalFrame so that Ctrl-W and Cmd-W will close
+   * the window
    * 
    * @param frame
    */
-  private static void setKeyBindings(JInternalFrame frame) {
+  private static void setKeyBindings(JInternalFrame frame)
+  {
     @SuppressWarnings("serial")
-    final Action closeAction = new AbstractAction() {
+    final Action closeAction = new AbstractAction()
+    {
       @Override
-      public void actionPerformed(ActionEvent e) {
+      public void actionPerformed(ActionEvent e)
+      {
         frame.dispose();
       }
     };
@@ -892,10 +1063,13 @@ public class Desktop extends jalview.jbgui.GDesktop
     /*
      * set up key bindings for Ctrl-W and Cmd-W, with the same (Close) action
      */
-    KeyStroke ctrlWKey = KeyStroke.getKeyStroke(KeyEvent.VK_W, InputEvent.CTRL_DOWN_MASK);
-    KeyStroke cmdWKey = KeyStroke.getKeyStroke(KeyEvent.VK_W, ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx());
+    KeyStroke ctrlWKey = KeyStroke.getKeyStroke(KeyEvent.VK_W,
+            InputEvent.CTRL_DOWN_MASK);
+    KeyStroke cmdWKey = KeyStroke.getKeyStroke(KeyEvent.VK_W,
+            ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx());
 
-    InputMap inputMap = frame.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
+    InputMap inputMap = frame
+            .getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
     String ctrlW = ctrlWKey.toString();
     inputMap.put(ctrlWKey, ctrlW);
     inputMap.put(cmdWKey, ctrlW);
@@ -905,8 +1079,10 @@ public class Desktop extends jalview.jbgui.GDesktop
   }
 
   @Override
-  public void lostOwnership(Clipboard clipboard, Transferable contents) {
-    if (!internalCopy) {
+  public void lostOwnership(Clipboard clipboard, Transferable contents)
+  {
+    if (!internalCopy)
+    {
       Desktop.jalviewClipboard = null;
     }
 
@@ -914,28 +1090,34 @@ public class Desktop extends jalview.jbgui.GDesktop
   }
 
   @Override
-  public void dragEnter(DropTargetDragEvent evt) {
+  public void dragEnter(DropTargetDragEvent evt)
+  {
   }
 
   @Override
-  public void dragExit(DropTargetEvent evt) {
+  public void dragExit(DropTargetEvent evt)
+  {
   }
 
   @Override
-  public void dragOver(DropTargetDragEvent evt) {
+  public void dragOver(DropTargetDragEvent evt)
+  {
   }
 
   @Override
-  public void dropActionChanged(DropTargetDragEvent evt) {
+  public void dropActionChanged(DropTargetDragEvent evt)
+  {
   }
 
   /**
    * DOCUMENT ME!
    * 
-   * @param evt DOCUMENT ME!
+   * @param evt
+   *          DOCUMENT ME!
    */
   @Override
-  public void drop(DropTargetDropEvent evt) {
+  public void drop(DropTargetDropEvent evt)
+  {
     boolean success = true;
     // JAL-1552 - acceptDrop required before getTransferable call for
     // Java's Transferable for native dnd
@@ -944,35 +1126,47 @@ public class Desktop extends jalview.jbgui.GDesktop
     List files = new ArrayList<>();
     List protocols = new ArrayList<>();
 
-    try {
+    try
+    {
       Desktop.transferFromDropTarget(files, protocols, evt, t);
-    } catch (Exception e) {
+    } catch (Exception e)
+    {
       e.printStackTrace();
       success = false;
     }
 
-    if (files != null) {
-      try {
-        for (int i = 0; i < files.size(); i++) {
+    if (files != null)
+    {
+      try
+      {
+        for (int i = 0; i < files.size(); i++)
+        {
           // BH 2018 File or String
           Object file = files.get(i);
           String fileName = file.toString();
-          DataSourceType protocol = (protocols == null) ? DataSourceType.FILE : protocols.get(i);
+          DataSourceType protocol = (protocols == null)
+                  ? DataSourceType.FILE
+                  : protocols.get(i);
           FileFormatI format = null;
 
-          if (fileName.endsWith(".jar")) {
+          if (fileName.endsWith(".jar"))
+          {
             format = FileFormat.Jalview;
 
-          } else {
+          }
+          else
+          {
             format = new IdentifyFile().identify(file, protocol);
           }
-          if (file instanceof File) {
+          if (file instanceof File)
+          {
             Platform.cacheFileData((File) file);
           }
           new FileLoader().LoadFile(null, file, protocol, format);
 
         }
-      } catch (Exception ex) {
+      } catch (Exception ex)
+      {
         success = false;
       }
     }
@@ -983,21 +1177,27 @@ public class Desktop extends jalview.jbgui.GDesktop
   /**
    * DOCUMENT ME!
    * 
-   * @param e DOCUMENT ME!
+   * @param e
+   *          DOCUMENT ME!
    */
   @Override
-  public void inputLocalFileMenuItem_actionPerformed(AlignViewport viewport) {
+  public void inputLocalFileMenuItem_actionPerformed(AlignViewport viewport)
+  {
     String fileFormat = Cache.getProperty("DEFAULT_FILE_FORMAT");
-    JalviewFileChooser chooser = JalviewFileChooser.forRead(Cache.getProperty("LAST_DIRECTORY"), fileFormat,
-        BackupFiles.getEnabled());
+    JalviewFileChooser chooser = JalviewFileChooser.forRead(
+            Cache.getProperty("LAST_DIRECTORY"), fileFormat,
+            BackupFiles.getEnabled());
 
     chooser.setFileView(new JalviewFileView());
-    chooser.setDialogTitle(MessageManager.getString("label.open_local_file"));
+    chooser.setDialogTitle(
+            MessageManager.getString("label.open_local_file"));
     chooser.setToolTipText(MessageManager.getString("action.open"));
 
-    chooser.setResponseHandler(0, new Runnable() {
+    chooser.setResponseHandler(0, new Runnable()
+    {
       @Override
-      public void run() {
+      public void run()
+      {
         File selectedFile = chooser.getSelectedFile();
         Cache.setProperty("LAST_DIRECTORY", selectedFile.getParent());
 
@@ -1008,15 +1208,20 @@ public class Desktop extends jalview.jbgui.GDesktop
          * Skip this step for dynamically added file formats, because IdentifyFile does
          * not know how to recognise them.
          */
-        if (FileFormats.getInstance().isIdentifiable(format)) {
-          try {
-            format = new IdentifyFile().identify(selectedFile, DataSourceType.FILE);
-          } catch (FileFormatException e) {
+        if (FileFormats.getInstance().isIdentifiable(format))
+        {
+          try
+          {
+            format = new IdentifyFile().identify(selectedFile,
+                    DataSourceType.FILE);
+          } catch (FileFormatException e)
+          {
             // format = null; //??
           }
         }
 
-        new FileLoader().LoadFile(viewport, selectedFile, DataSourceType.FILE, format);
+        new FileLoader().LoadFile(viewport, selectedFile,
+                DataSourceType.FILE, format);
       }
     });
     chooser.showOpenDialog(this);
@@ -1028,10 +1233,12 @@ public class Desktop extends jalview.jbgui.GDesktop
    * @param viewport
    */
   @Override
-  public void inputURLMenuItem_actionPerformed(AlignViewport viewport) {
+  public void inputURLMenuItem_actionPerformed(AlignViewport viewport)
+  {
     // This construct allows us to have a wider textfield
     // for viewing
-    JLabel label = new JLabel(MessageManager.getString("label.input_file_url"));
+    JLabel label = new JLabel(
+            MessageManager.getString("label.input_file_url"));
 
     JPanel panel = new JPanel(new GridLayout(2, 1));
     panel.add(label);
@@ -1042,9 +1249,11 @@ public class Desktop extends jalview.jbgui.GDesktop
      */
     JComponent history;
     String urlBase = "https://www.";
-    if (Platform.isJS()) {
+    if (Platform.isJS())
+    {
       history = new JTextField(urlBase, 35);
-    } else
+    }
+    else
     /**
      * Java only
      * 
@@ -1056,8 +1265,10 @@ public class Desktop extends jalview.jbgui.GDesktop
       asCombo.setEditable(true);
       asCombo.addItem(urlBase);
       String historyItems = Cache.getProperty("RECENT_URL");
-      if (historyItems != null) {
-        for (String token : historyItems.split("\\t")) {
+      if (historyItems != null)
+      {
+        for (String token : historyItems.split("\\t"))
+        {
           asCombo.addItem(token);
         }
       }
@@ -1067,87 +1278,122 @@ public class Desktop extends jalview.jbgui.GDesktop
 
     Object[] options = new Object[] { MessageManager.getString("action.ok"),
         MessageManager.getString("action.cancel") };
-    Runnable action = new Runnable() {
+    Runnable action = new Runnable()
+    {
       @Override
-      public void run() {
+      public void run()
+      {
         @SuppressWarnings("unchecked")
-        String url = (history instanceof JTextField ? ((JTextField) history).getText()
-            : ((JComboBox) history).getEditor().getItem().toString().trim());
-
-        if (url.toLowerCase(Locale.ROOT).endsWith(".jar")) {
-          if (viewport != null) {
-            new FileLoader().LoadFile(viewport, url, DataSourceType.URL, FileFormat.Jalview);
-          } else {
-            new FileLoader().LoadFile(url, DataSourceType.URL, FileFormat.Jalview);
+        String url = (history instanceof JTextField
+                ? ((JTextField) history).getText()
+                : ((JComboBox) history).getEditor().getItem()
+                        .toString().trim());
+
+        if (url.toLowerCase(Locale.ROOT).endsWith(".jar"))
+        {
+          if (viewport != null)
+          {
+            new FileLoader().LoadFile(viewport, url, DataSourceType.URL,
+                    FileFormat.Jalview);
           }
-        } else {
+          else
+          {
+            new FileLoader().LoadFile(url, DataSourceType.URL,
+                    FileFormat.Jalview);
+          }
+        }
+        else
+        {
           FileFormatI format = null;
-          try {
+          try
+          {
             format = new IdentifyFile().identify(url, DataSourceType.URL);
-          } catch (FileFormatException e) {
+          } catch (FileFormatException e)
+          {
             // TODO revise error handling, distinguish between
             // URL not found and response not valid
           }
 
-          if (format == null) {
-            String msg = MessageManager.formatMessage("label.couldnt_locate", url);
+          if (format == null)
+          {
+            String msg = MessageManager
+                    .formatMessage("label.couldnt_locate", url);
             JvOptionPane.showInternalMessageDialog(Desktop.desktop, msg,
-                MessageManager.getString("label.url_not_found"), JvOptionPane.WARNING_MESSAGE);
+                    MessageManager.getString("label.url_not_found"),
+                    JvOptionPane.WARNING_MESSAGE);
 
             return;
           }
 
-          if (viewport != null) {
-            new FileLoader().LoadFile(viewport, url, DataSourceType.URL, format);
-          } else {
+          if (viewport != null)
+          {
+            new FileLoader().LoadFile(viewport, url, DataSourceType.URL,
+                    format);
+          }
+          else
+          {
             new FileLoader().LoadFile(url, DataSourceType.URL, format);
           }
         }
       }
     };
-    String dialogOption = MessageManager.getString("label.input_alignment_from_url");
-    JvOptionPane.newOptionDialog(desktop).setResponseHandler(0, action).showInternalDialog(panel, dialogOption,
-        JvOptionPane.YES_NO_CANCEL_OPTION, JvOptionPane.PLAIN_MESSAGE, null, options,
-        MessageManager.getString("action.ok"));
+    String dialogOption = MessageManager
+            .getString("label.input_alignment_from_url");
+    JvOptionPane.newOptionDialog(desktop).setResponseHandler(0, action)
+            .showInternalDialog(panel, dialogOption,
+                    JvOptionPane.YES_NO_CANCEL_OPTION,
+                    JvOptionPane.PLAIN_MESSAGE, null, options,
+                    MessageManager.getString("action.ok"));
   }
 
   /**
    * Opens the CutAndPaste window for the user to paste an alignment in to
    * 
-   * @param viewPanel - if not null, the pasted alignment is added to the current
-   *                  alignment; if null, to a new alignment window
+   * @param viewPanel
+   *          - if not null, the pasted alignment is added to the current
+   *          alignment; if null, to a new alignment window
    */
   @Override
-  public void inputTextboxMenuItem_actionPerformed(AlignmentViewPanel viewPanel) {
+  public void inputTextboxMenuItem_actionPerformed(
+          AlignmentViewPanel viewPanel)
+  {
     CutAndPasteTransfer cap = new CutAndPasteTransfer();
     cap.setForInput(viewPanel);
-    Desktop.addInternalFrame(cap, MessageManager.getString("label.cut_paste_alignmen_file"), true, 600, 500);
+    Desktop.addInternalFrame(cap,
+            MessageManager.getString("label.cut_paste_alignmen_file"), true,
+            600, 500);
   }
 
   /*
    * Exit the program
    */
   @Override
-  public void quit() {
+  public void quit()
+  {
     Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
     Cache.setProperty("SCREENGEOMETRY_WIDTH", screen.width + "");
     Cache.setProperty("SCREENGEOMETRY_HEIGHT", screen.height + "");
-    storeLastKnownDimensions("", new Rectangle(getBounds().x, getBounds().y, getWidth(), getHeight()));
+    storeLastKnownDimensions("", new Rectangle(getBounds().x, getBounds().y,
+            getWidth(), getHeight()));
 
-    if (jconsole != null) {
+    if (jconsole != null)
+    {
       storeLastKnownDimensions("JAVA_CONSOLE_", jconsole.getBounds());
       jconsole.stopConsole();
     }
-    if (jvnews != null) {
+    if (jvnews != null)
+    {
       storeLastKnownDimensions("JALVIEW_RSS_WINDOW_", jvnews.getBounds());
 
     }
-    if (dialogExecutor != null) {
+    if (dialogExecutor != null)
+    {
       dialogExecutor.shutdownNow();
     }
     closeAll_actionPerformed(null);
 
-    if (groovyConsole != null) {
+    if (groovyConsole != null)
+    {
       // suppress a possible repeat prompt to save script
       groovyConsole.setDirty(false);
       groovyConsole.exit();
@@ -1155,9 +1401,11 @@ public class Desktop extends jalview.jbgui.GDesktop
     System.exit(0);
   }
 
-  private void storeLastKnownDimensions(String string, Rectangle jc) {
-    jalview.bin.Console.debug("Storing last known dimensions for " + string + ": x:" + jc.x + " y:" + jc.y + " width:" + jc.width
-        + " height:" + jc.height);
+  private void storeLastKnownDimensions(String string, Rectangle jc)
+  {
+    jalview.bin.Console.debug("Storing last known dimensions for " + string
+            + ": x:" + jc.x + " y:" + jc.y + " width:" + jc.width
+            + " height:" + jc.height);
 
     Cache.setProperty(string + "SCREEN_X", jc.x + "");
     Cache.setProperty(string + "SCREEN_Y", jc.y + "");
@@ -1168,13 +1416,17 @@ public class Desktop extends jalview.jbgui.GDesktop
   /**
    * DOCUMENT ME!
    * 
-   * @param e DOCUMENT ME!
+   * @param e
+   *          DOCUMENT ME!
    */
   @Override
-  public void aboutMenuItem_actionPerformed(ActionEvent e) {
-    new Thread(new Runnable() {
+  public void aboutMenuItem_actionPerformed(ActionEvent e)
+  {
+    new Thread(new Runnable()
+    {
       @Override
-      public void run() {
+      public void run()
+      {
         new SplashScreen(false);
       }
     }).start();
@@ -1182,35 +1434,48 @@ public class Desktop extends jalview.jbgui.GDesktop
 
   /**
    * Returns the html text for the About screen, including any available version
-   * number, build details, author details and citation reference, but without the
-   * enclosing {@code html} tags
+   * number, build details, author details and citation reference, but without
+   * the enclosing {@code html} tags
    * 
    * @return
    */
-  public String getAboutMessage() {
+  public String getAboutMessage()
+  {
     StringBuilder message = new StringBuilder(1024);
-    message.append("
").append("

Version: ") - .append(Cache.getProperty("VERSION")).append("

").append("Built: ") - .append(Cache.getDefault("BUILD_DATE", "unknown")).append(" from ") - .append(Cache.getBuildDetailsForSplash()).append(""); + message.append("
") + .append("

Version: ") + .append(Cache.getProperty("VERSION")).append("

") + .append("Built: ") + .append(Cache.getDefault("BUILD_DATE", "unknown")) + .append(" from ").append(Cache.getBuildDetailsForSplash()) + .append(""); String latestVersion = Cache.getDefault("LATEST_VERSION", "Checking"); - if (latestVersion.equals("Checking")) { + if (latestVersion.equals("Checking")) + { // JBP removed this message for 2.11: May be reinstated in future version // message.append("
...Checking latest version...
"); - } else if (!latestVersion.equals(Cache.getProperty("VERSION"))) { + } + else if (!latestVersion.equals(Cache.getProperty("VERSION"))) + { boolean red = false; - if (Cache.getProperty("VERSION").toLowerCase(Locale.ROOT).indexOf("automated build") == -1) { + if (Cache.getProperty("VERSION").toLowerCase(Locale.ROOT) + .indexOf("automated build") == -1) + { red = true; // Displayed when code version and jnlp version do not match and code // version is not a development build message.append("
"); } - message.append("
!! Version ").append(Cache.getDefault("LATEST_VERSION", "..Checking..")) - .append(" is available for download from ") - .append(Cache.getDefault("www.jalview.org", "https://www.jalview.org")).append(" !!"); - if (red) { + message.append("
!! Version ") + .append(Cache.getDefault("LATEST_VERSION", "..Checking..")) + .append(" is available for download from ") + .append(Cache.getDefault("www.jalview.org", + "https://www.jalview.org")) + .append(" !!"); + if (red) + { message.append("
"); } } @@ -1227,11 +1492,15 @@ public class Desktop extends jalview.jbgui.GDesktop * Action on requesting Help documentation */ @Override - public void documentationMenuItem_actionPerformed() { - try { - if (Platform.isJS()) { + public void documentationMenuItem_actionPerformed() + { + try + { + if (Platform.isJS()) + { BrowserLauncher.openURL("https://www.jalview.org/help.html"); - } else + } + else /** * Java only * @@ -1240,19 +1509,24 @@ public class Desktop extends jalview.jbgui.GDesktop { Help.showHelpWindow(); } - } catch (Exception ex) { + } catch (Exception ex) + { System.err.println("Error opening help: " + ex.getMessage()); } } @Override - public void closeAll_actionPerformed(ActionEvent e) { + public void closeAll_actionPerformed(ActionEvent e) + { // TODO show a progress bar while closing? JInternalFrame[] frames = desktop.getAllFrames(); - for (int i = 0; i < frames.length; i++) { - try { + for (int i = 0; i < frames.length; i++) + { + try + { frames[i].setClosed(true); - } catch (java.beans.PropertyVetoException ex) { + } catch (java.beans.PropertyVetoException ex) + { } } Jalview.setCurrentAlignFrame(null); @@ -1262,23 +1536,28 @@ public class Desktop extends jalview.jbgui.GDesktop * reset state of singleton objects as appropriate (clear down session state * when all windows are closed) */ - StructureSelectionManager ssm = StructureSelectionManager.getStructureSelectionManager(this); - if (ssm != null) { + StructureSelectionManager ssm = StructureSelectionManager + .getStructureSelectionManager(this); + if (ssm != null) + { ssm.resetAll(); } } @Override - public void raiseRelated_actionPerformed(ActionEvent e) { + public void raiseRelated_actionPerformed(ActionEvent e) + { reorderAssociatedWindows(false, false); } @Override - public void minimizeAssociated_actionPerformed(ActionEvent e) { + public void minimizeAssociated_actionPerformed(ActionEvent e) + { reorderAssociatedWindows(true, false); } - void closeAssociatedWindows() { + void closeAssociatedWindows() + { reorderAssociatedWindows(false, true); } @@ -1289,7 +1568,8 @@ public class Desktop extends jalview.jbgui.GDesktop * ActionEvent) */ @Override - protected void garbageCollect_actionPerformed(ActionEvent e) { + protected void garbageCollect_actionPerformed(ActionEvent e) + { // We simply collect the garbage jalview.bin.Console.debug("Collecting garbage..."); System.gc(); @@ -1303,7 +1583,8 @@ public class Desktop extends jalview.jbgui.GDesktop * ActionEvent ) */ @Override - protected void showMemusage_actionPerformed(ActionEvent e) { + protected void showMemusage_actionPerformed(ActionEvent e) + { desktop.showMemoryUsage(showMemusage.isSelected()); } @@ -1315,7 +1596,8 @@ public class Desktop extends jalview.jbgui.GDesktop * ) */ @Override - protected void showConsole_actionPerformed(ActionEvent e) { + protected void showConsole_actionPerformed(ActionEvent e) + { showConsole(showConsole.isSelected()); } @@ -1326,61 +1608,89 @@ public class Desktop extends jalview.jbgui.GDesktop * * @param selected */ - void showConsole(boolean selected) { + void showConsole(boolean selected) + { // TODO: decide if we should update properties file if (jconsole != null) // BH 2018 { showConsole.setSelected(selected); - Cache.setProperty("SHOW_JAVA_CONSOLE", Boolean.valueOf(selected).toString()); + Cache.setProperty("SHOW_JAVA_CONSOLE", + Boolean.valueOf(selected).toString()); jconsole.setVisible(selected); } } - void reorderAssociatedWindows(boolean minimize, boolean close) { + void reorderAssociatedWindows(boolean minimize, boolean close) + { JInternalFrame[] frames = desktop.getAllFrames(); - if (frames == null || frames.length < 1) { + if (frames == null || frames.length < 1) + { return; } AlignmentViewport source = null, target = null; - if (frames[0] instanceof AlignFrame) { + if (frames[0] instanceof AlignFrame) + { source = ((AlignFrame) frames[0]).getCurrentView(); - } else if (frames[0] instanceof TreePanel) { + } + else if (frames[0] instanceof TreePanel) + { source = ((TreePanel) frames[0]).getViewPort(); - } else if (frames[0] instanceof PCAPanel) { + } + else if (frames[0] instanceof PCAPanel) + { source = ((PCAPanel) frames[0]).av; - } else if (frames[0].getContentPane() instanceof PairwiseAlignPanel) { + } + else if (frames[0].getContentPane() instanceof PairwiseAlignPanel) + { source = ((PairwiseAlignPanel) frames[0].getContentPane()).av; } - if (source != null) { - for (int i = 0; i < frames.length; i++) { + if (source != null) + { + for (int i = 0; i < frames.length; i++) + { target = null; - if (frames[i] == null) { + if (frames[i] == null) + { continue; } - if (frames[i] instanceof AlignFrame) { + if (frames[i] instanceof AlignFrame) + { target = ((AlignFrame) frames[i]).getCurrentView(); - } else if (frames[i] instanceof TreePanel) { + } + else if (frames[i] instanceof TreePanel) + { target = ((TreePanel) frames[i]).getViewPort(); - } else if (frames[i] instanceof PCAPanel) { + } + else if (frames[i] instanceof PCAPanel) + { target = ((PCAPanel) frames[i]).av; - } else if (frames[i].getContentPane() instanceof PairwiseAlignPanel) { + } + else if (frames[i].getContentPane() instanceof PairwiseAlignPanel) + { target = ((PairwiseAlignPanel) frames[i].getContentPane()).av; } - if (source == target) { - try { - if (close) { + if (source == target) + { + try + { + if (close) + { frames[i].setClosed(true); - } else { + } + else + { frames[i].setIcon(minimize); - if (!minimize) { + if (!minimize) + { frames[i].toFront(); } } - } catch (java.beans.PropertyVetoException ex) { + } catch (java.beans.PropertyVetoException ex) + { } } } @@ -1390,10 +1700,12 @@ public class Desktop extends jalview.jbgui.GDesktop /** * DOCUMENT ME! * - * @param e DOCUMENT ME! + * @param e + * DOCUMENT ME! */ @Override - protected void preferences_actionPerformed(ActionEvent e) { + protected void preferences_actionPerformed(ActionEvent e) + { Preferences.openPreferences(); } @@ -1402,66 +1714,86 @@ public class Desktop extends jalview.jbgui.GDesktop * Jalview project file */ @Override - public void saveState_actionPerformed() { + public void saveState_actionPerformed() + { saveState_actionPerformed(false); } - public void saveState_actionPerformed(boolean saveAs) { + public void saveState_actionPerformed(boolean saveAs) + { java.io.File projectFile = getProjectFile(); // autoSave indicates we already have a file and don't need to ask - boolean autoSave = projectFile != null && !saveAs && BackupFiles.getEnabled(); + boolean autoSave = projectFile != null && !saveAs + && BackupFiles.getEnabled(); // System.out.println("autoSave="+autoSave+", projectFile='"+projectFile+"', // saveAs="+saveAs+", Backups // "+(BackupFiles.getEnabled()?"enabled":"disabled")); boolean approveSave = false; - if (!autoSave) { - JalviewFileChooser chooser = new JalviewFileChooser("jvp", "Jalview Project"); + if (!autoSave) + { + JalviewFileChooser chooser = new JalviewFileChooser("jvp", + "Jalview Project"); chooser.setFileView(new JalviewFileView()); chooser.setDialogTitle(MessageManager.getString("label.save_state")); int value = chooser.showSaveDialog(this); - if (value == JalviewFileChooser.APPROVE_OPTION) { + if (value == JalviewFileChooser.APPROVE_OPTION) + { projectFile = chooser.getSelectedFile(); setProjectFile(projectFile); approveSave = true; } } - if (approveSave || autoSave) { + if (approveSave || autoSave) + { final Desktop me = this; final java.io.File chosenFile = projectFile; - new Thread(new Runnable() { + new Thread(new Runnable() + { @Override - public void run() { + public void run() + { // TODO: refactor to Jalview desktop session controller action. - setProgressBar( - MessageManager.formatMessage("label.saving_jalview_project", new Object[] { chosenFile.getName() }), - chosenFile.hashCode()); + setProgressBar(MessageManager.formatMessage( + "label.saving_jalview_project", new Object[] + { chosenFile.getName() }), chosenFile.hashCode()); Cache.setProperty("LAST_DIRECTORY", chosenFile.getParent()); // TODO catch and handle errors for savestate // TODO prevent user from messing with the Desktop whilst we're saving - try { + try + { boolean doBackup = BackupFiles.getEnabled(); - BackupFiles backupfiles = doBackup ? new BackupFiles(chosenFile) : null; + BackupFiles backupfiles = doBackup ? new BackupFiles(chosenFile) + : null; - new Jalview2XML().saveState(doBackup ? backupfiles.getTempFile() : chosenFile); + new Jalview2XML().saveState( + doBackup ? backupfiles.getTempFile() : chosenFile); - if (doBackup) { + if (doBackup) + { backupfiles.setWriteSuccess(true); backupfiles.rollBackupsAndRenameTempFile(); } - } catch (OutOfMemoryError oom) { - new OOMWarning("Whilst saving current state to " + chosenFile.getName(), oom); - } catch (Exception ex) { - jalview.bin.Console.error("Problems whilst trying to save to " + chosenFile.getName(), ex); + } catch (OutOfMemoryError oom) + { + new OOMWarning("Whilst saving current state to " + + chosenFile.getName(), oom); + } catch (Exception ex) + { + jalview.bin.Console.error("Problems whilst trying to save to " + + chosenFile.getName(), ex); JvOptionPane.showMessageDialog(me, - MessageManager.formatMessage("label.error_whilst_saving_current_state_to", - new Object[] { chosenFile.getName() }), - MessageManager.getString("label.couldnt_save_project"), JvOptionPane.WARNING_MESSAGE); + MessageManager.formatMessage( + "label.error_whilst_saving_current_state_to", + new Object[] + { chosenFile.getName() }), + MessageManager.getString("label.couldnt_save_project"), + JvOptionPane.WARNING_MESSAGE); } setProgressBar(null, chosenFile.hashCode()); } @@ -1470,15 +1802,18 @@ public class Desktop extends jalview.jbgui.GDesktop } @Override - public void saveAsState_actionPerformed(ActionEvent e) { + public void saveAsState_actionPerformed(ActionEvent e) + { saveState_actionPerformed(true); } - private void setProjectFile(File choice) { + private void setProjectFile(File choice) + { this.projectFile = choice; } - public File getProjectFile() { + public File getProjectFile() + { return this.projectFile; } @@ -1487,35 +1822,51 @@ public class Desktop extends jalview.jbgui.GDesktop * Jalview project */ @Override - public void loadState_actionPerformed() { + public void loadState_actionPerformed() + { final String[] suffix = new String[] { "jvp", "jar" }; - final String[] desc = new String[] { "Jalview Project", "Jalview Project (old)" }; - JalviewFileChooser chooser = new JalviewFileChooser(Cache.getProperty("LAST_DIRECTORY"), suffix, desc, - "Jalview Project", true, BackupFiles.getEnabled()); // last two - // booleans: - // allFiles, + final String[] desc = new String[] { "Jalview Project", + "Jalview Project (old)" }; + JalviewFileChooser chooser = new JalviewFileChooser( + Cache.getProperty("LAST_DIRECTORY"), suffix, desc, + "Jalview Project", true, BackupFiles.getEnabled()); // last two + // booleans: + // allFiles, // allowBackupFiles chooser.setFileView(new JalviewFileView()); chooser.setDialogTitle(MessageManager.getString("label.restore_state")); - chooser.setResponseHandler(0, new Runnable() { + chooser.setResponseHandler(0, new Runnable() + { @Override - public void run() { + public void run() + { File selectedFile = chooser.getSelectedFile(); setProjectFile(selectedFile); String choice = selectedFile.getAbsolutePath(); Cache.setProperty("LAST_DIRECTORY", selectedFile.getParent()); - new Thread(new Runnable() { + new Thread(new Runnable() + { @Override - public void run() { - try { + public void run() + { + try + { new Jalview2XML().loadJalviewAlign(selectedFile); - } catch (OutOfMemoryError oom) { + } catch (OutOfMemoryError oom) + { new OOMWarning("Whilst loading project from " + choice, oom); - } catch (Exception ex) { - jalview.bin.Console.error("Problems whilst loading project from " + choice, ex); + } catch (Exception ex) + { + jalview.bin.Console.error( + "Problems whilst loading project from " + choice, ex); JvOptionPane.showMessageDialog(Desktop.desktop, - MessageManager.formatMessage("label.error_whilst_loading_project_from", new Object[] { choice }), - MessageManager.getString("label.couldnt_load_project"), JvOptionPane.WARNING_MESSAGE); + MessageManager.formatMessage( + "label.error_whilst_loading_project_from", + new Object[] + { choice }), + MessageManager + .getString("label.couldnt_load_project"), + JvOptionPane.WARNING_MESSAGE); } } }, "Project Loader").start(); @@ -1526,7 +1877,8 @@ public class Desktop extends jalview.jbgui.GDesktop } @Override - public void inputSequence_actionPerformed(ActionEvent e) { + public void inputSequence_actionPerformed(ActionEvent e) + { new SequenceFetcher(this); } @@ -1534,16 +1886,21 @@ public class Desktop extends jalview.jbgui.GDesktop ArrayList fileLoadingPanels = new ArrayList<>(); - public void startLoading(final Object fileName) { - if (fileLoadingCount == 0) { - fileLoadingPanels - .add(addProgressPanel(MessageManager.formatMessage("label.loading_file", new Object[] { fileName }))); + public void startLoading(final Object fileName) + { + if (fileLoadingCount == 0) + { + fileLoadingPanels.add(addProgressPanel(MessageManager + .formatMessage("label.loading_file", new Object[] + { fileName }))); } fileLoadingCount++; } - private JPanel addProgressPanel(String string) { - if (progressPanel == null) { + private JPanel addProgressPanel(String string) + { + if (progressPanel == null) + { progressPanel = new JPanel(new GridLayout(1, 1)); totalProgressCount = 0; instance.getContentPane().add(progressPanel, BorderLayout.SOUTH); @@ -1556,7 +1913,8 @@ public class Desktop extends jalview.jbgui.GDesktop thisprogress.add(progressBar, BorderLayout.CENTER); progressPanel.add(thisprogress); - ((GridLayout) progressPanel.getLayout()).setRows(((GridLayout) progressPanel.getLayout()).getRows() + 1); + ((GridLayout) progressPanel.getLayout()).setRows( + ((GridLayout) progressPanel.getLayout()).getRows() + 1); ++totalProgressCount; instance.validate(); return thisprogress; @@ -1564,13 +1922,17 @@ public class Desktop extends jalview.jbgui.GDesktop int totalProgressCount = 0; - private void removeProgressPanel(JPanel progbar) { - if (progressPanel != null) { - synchronized (progressPanel) { + private void removeProgressPanel(JPanel progbar) + { + if (progressPanel != null) + { + synchronized (progressPanel) + { progressPanel.remove(progbar); GridLayout gl = (GridLayout) progressPanel.getLayout(); gl.setRows(gl.getRows() - 1); - if (--totalProgressCount < 1) { + if (--totalProgressCount < 1) + { this.getContentPane().remove(progressPanel); progressPanel = null; } @@ -1579,10 +1941,13 @@ public class Desktop extends jalview.jbgui.GDesktop validate(); } - public void stopLoading() { + public void stopLoading() + { fileLoadingCount--; - if (fileLoadingCount < 1) { - while (fileLoadingPanels.size() > 0) { + if (fileLoadingCount < 1) + { + while (fileLoadingPanels.size() > 0) + { removeProgressPanel(fileLoadingPanels.remove(0)); } fileLoadingPanels.clear(); @@ -1591,35 +1956,45 @@ public class Desktop extends jalview.jbgui.GDesktop validate(); } - public static int getViewCount(String alignmentId) { + public static int getViewCount(String alignmentId) + { AlignmentViewport[] aps = getViewports(alignmentId); return (aps == null) ? 0 : aps.length; } /** * - * @param alignmentId - if null, all sets are returned + * @param alignmentId + * - if null, all sets are returned * @return all AlignmentPanels concerning the alignmentId sequence set */ - public static AlignmentPanel[] getAlignmentPanels(String alignmentId) { - if (Desktop.desktop == null) { + public static AlignmentPanel[] getAlignmentPanels(String alignmentId) + { + if (Desktop.desktop == null) + { // no frames created and in headless mode // TODO: verify that frames are recoverable when in headless mode return null; } List aps = new ArrayList<>(); AlignFrame[] frames = getAlignFrames(); - if (frames == null) { + if (frames == null) + { return null; } - for (AlignFrame af : frames) { - for (AlignmentPanel ap : af.alignPanels) { - if (alignmentId == null || alignmentId.equals(ap.av.getSequenceSetId())) { + for (AlignFrame af : frames) + { + for (AlignmentPanel ap : af.alignPanels) + { + if (alignmentId == null + || alignmentId.equals(ap.av.getSequenceSetId())) + { aps.add(ap); } } } - if (aps.size() == 0) { + if (aps.size() == 0) + { return null; } AlignmentPanel[] vap = aps.toArray(new AlignmentPanel[aps.size()]); @@ -1629,29 +2004,42 @@ public class Desktop extends jalview.jbgui.GDesktop /** * get all the viewports on an alignment. * - * @param sequenceSetId unique alignment id (may be null - all viewports - * returned in that case) + * @param sequenceSetId + * unique alignment id (may be null - all viewports returned in that + * case) * @return all viewports on the alignment bound to sequenceSetId */ - public static AlignmentViewport[] getViewports(String sequenceSetId) { + public static AlignmentViewport[] getViewports(String sequenceSetId) + { List viewp = new ArrayList<>(); - if (desktop != null) { + if (desktop != null) + { AlignFrame[] frames = Desktop.getAlignFrames(); - for (AlignFrame afr : frames) { - if (sequenceSetId == null || afr.getViewport().getSequenceSetId().equals(sequenceSetId)) { - if (afr.alignPanels != null) { - for (AlignmentPanel ap : afr.alignPanels) { - if (sequenceSetId == null || sequenceSetId.equals(ap.av.getSequenceSetId())) { + for (AlignFrame afr : frames) + { + if (sequenceSetId == null || afr.getViewport().getSequenceSetId() + .equals(sequenceSetId)) + { + if (afr.alignPanels != null) + { + for (AlignmentPanel ap : afr.alignPanels) + { + if (sequenceSetId == null + || sequenceSetId.equals(ap.av.getSequenceSetId())) + { viewp.add(ap.av); } } - } else { + } + else + { viewp.add(afr.getViewport()); } } } - if (viewp.size() > 0) { + if (viewp.size() > 0) + { return viewp.toArray(new AlignmentViewport[viewp.size()]); } } @@ -1663,25 +2051,29 @@ public class Desktop extends jalview.jbgui.GDesktop * * @param af */ - public static void explodeViews(AlignFrame af) { + public static void explodeViews(AlignFrame af) + { int size = af.alignPanels.size(); - if (size < 2) { + if (size < 2) + { return; } // FIXME: ideally should use UI interface API - FeatureSettings viewFeatureSettings = (af.featureSettings != null && af.featureSettings.isOpen()) - ? af.featureSettings - : null; + FeatureSettings viewFeatureSettings = (af.featureSettings != null + && af.featureSettings.isOpen()) ? af.featureSettings : null; Rectangle fsBounds = af.getFeatureSettingsGeometry(); - for (int i = 0; i < size; i++) { + for (int i = 0; i < size; i++) + { AlignmentPanel ap = af.alignPanels.get(i); AlignFrame newaf = new AlignFrame(ap); // transfer reference for existing feature settings to new alignFrame - if (ap == af.alignPanel) { - if (viewFeatureSettings != null && viewFeatureSettings.fr.ap == ap) { + if (ap == af.alignPanel) + { + if (viewFeatureSettings != null && viewFeatureSettings.fr.ap == ap) + { newaf.featureSettings = viewFeatureSettings; } newaf.setFeatureSettingsGeometry(fsBounds); @@ -1692,18 +2084,22 @@ public class Desktop extends jalview.jbgui.GDesktop * one exploded frame share and restore the same (frame) position and size. */ Rectangle geometry = ap.av.getExplodedGeometry(); - if (geometry != null) { + if (geometry != null) + { newaf.setBounds(geometry); } ap.av.setGatherViewsHere(false); - addInternalFrame(newaf, af.getTitle(), AlignFrame.DEFAULT_WIDTH, AlignFrame.DEFAULT_HEIGHT); + addInternalFrame(newaf, af.getTitle(), AlignFrame.DEFAULT_WIDTH, + AlignFrame.DEFAULT_HEIGHT); // and materialise a new feature settings dialog instance for the new // alignframe // (closes the old as if 'OK' was pressed) - if (ap == af.alignPanel && newaf.featureSettings != null && newaf.featureSettings.isOpen() - && af.alignPanel.getAlignViewport().isShowSequenceFeatures()) { + if (ap == af.alignPanel && newaf.featureSettings != null + && newaf.featureSettings.isOpen() + && af.alignPanel.getAlignViewport().isShowSequenceFeatures()) + { newaf.showFeatureSettingsUI(); } } @@ -1716,24 +2112,29 @@ public class Desktop extends jalview.jbgui.GDesktop /** * Gather expanded views (separate AlignFrame's) with the same sequence set - * identifier back in to this frame as additional views, and close the expanded - * views. Note the expanded frames may themselves have multiple views. We take - * the lot. + * identifier back in to this frame as additional views, and close the + * expanded views. Note the expanded frames may themselves have multiple + * views. We take the lot. * * @param source */ - public void gatherViews(AlignFrame source) { + public void gatherViews(AlignFrame source) + { source.viewport.setGatherViewsHere(true); source.viewport.setExplodedGeometry(source.getBounds()); JInternalFrame[] frames = desktop.getAllFrames(); String viewId = source.viewport.getSequenceSetId(); - for (int t = 0; t < frames.length; t++) { - if (frames[t] instanceof AlignFrame && frames[t] != source) { + for (int t = 0; t < frames.length; t++) + { + if (frames[t] instanceof AlignFrame && frames[t] != source) + { AlignFrame af = (AlignFrame) frames[t]; boolean gatherThis = false; - for (int a = 0; a < af.alignPanels.size(); a++) { + for (int a = 0; a < af.alignPanels.size(); a++) + { AlignmentPanel ap = af.alignPanels.get(a); - if (viewId.equals(ap.av.getSequenceSetId())) { + if (viewId.equals(ap.av.getSequenceSetId())) + { gatherThis = true; ap.av.setGatherViewsHere(false); ap.av.setExplodedGeometry(af.getBounds()); @@ -1741,13 +2142,19 @@ public class Desktop extends jalview.jbgui.GDesktop } } - if (gatherThis) { - if (af.featureSettings != null && af.featureSettings.isOpen()) { - if (source.featureSettings == null) { + if (gatherThis) + { + if (af.featureSettings != null && af.featureSettings.isOpen()) + { + if (source.featureSettings == null) + { // preserve the feature settings geometry for this frame source.featureSettings = af.featureSettings; - source.setFeatureSettingsGeometry(af.getFeatureSettingsGeometry()); - } else { + source.setFeatureSettingsGeometry( + af.getFeatureSettingsGeometry()); + } + else + { // close it and forget af.featureSettings.close(); } @@ -1759,13 +2166,15 @@ public class Desktop extends jalview.jbgui.GDesktop } // refresh the feature setting UI for the source frame if it exists - if (source.featureSettings != null && source.featureSettings.isOpen()) { + if (source.featureSettings != null && source.featureSettings.isOpen()) + { source.showFeatureSettingsUI(); } } - public JInternalFrame[] getAllFrames() { + public JInternalFrame[] getAllFrames() + { return desktop.getAllFrames(); } @@ -1775,37 +2184,49 @@ public class Desktop extends jalview.jbgui.GDesktop * * @param url */ - public void checkForQuestionnaire(String url) { + public void checkForQuestionnaire(String url) + { UserQuestionnaireCheck jvq = new UserQuestionnaireCheck(url); // javax.swing.SwingUtilities.invokeLater(jvq); new Thread(jvq).start(); } - public void checkURLLinks() { + public void checkURLLinks() + { // Thread off the URL link checker - addDialogThread(new Runnable() { + addDialogThread(new Runnable() + { @Override - public void run() { - if (Cache.getDefault("CHECKURLLINKS", true)) { + public void run() + { + if (Cache.getDefault("CHECKURLLINKS", true)) + { // check what the actual links are - if it's just the default don't // bother with the warning - List links = Preferences.sequenceUrlLinks.getLinksForMenu(); + List links = Preferences.sequenceUrlLinks + .getLinksForMenu(); // only need to check links if there is one with a // SEQUENCE_ID which is not the default EMBL_EBI link ListIterator li = links.listIterator(); boolean check = false; List urls = new ArrayList<>(); - while (li.hasNext()) { + while (li.hasNext()) + { String link = li.next(); - if (link.contains(jalview.util.UrlConstants.SEQUENCE_ID) && !UrlConstants.isDefaultString(link)) { + if (link.contains(jalview.util.UrlConstants.SEQUENCE_ID) + && !UrlConstants.isDefaultString(link)) + { check = true; int barPos = link.indexOf("|"); - String urlMsg = barPos == -1 ? link : link.substring(0, barPos) + ": " + link.substring(barPos + 1); + String urlMsg = barPos == -1 ? link + : link.substring(0, barPos) + ": " + + link.substring(barPos + 1); urls.add(new JLabel(urlMsg)); } } - if (!check) { + if (!check) + { return; } @@ -1814,27 +2235,36 @@ public class Desktop extends jalview.jbgui.GDesktop JPanel msgPanel = new JPanel(); msgPanel.setLayout(new BoxLayout(msgPanel, BoxLayout.PAGE_AXIS)); msgPanel.add(Box.createVerticalGlue()); - JLabel msg = new JLabel(MessageManager.getString("label.SEQUENCE_ID_for_DB_ACCESSION1")); - JLabel msg2 = new JLabel(MessageManager.getString("label.SEQUENCE_ID_for_DB_ACCESSION2")); + JLabel msg = new JLabel(MessageManager + .getString("label.SEQUENCE_ID_for_DB_ACCESSION1")); + JLabel msg2 = new JLabel(MessageManager + .getString("label.SEQUENCE_ID_for_DB_ACCESSION2")); msgPanel.add(msg); - for (JLabel url : urls) { + for (JLabel url : urls) + { msgPanel.add(url); } msgPanel.add(msg2); - final JCheckBox jcb = new JCheckBox(MessageManager.getString("label.do_not_display_again")); - jcb.addActionListener(new ActionListener() { + final JCheckBox jcb = new JCheckBox( + MessageManager.getString("label.do_not_display_again")); + jcb.addActionListener(new ActionListener() + { @Override - public void actionPerformed(ActionEvent e) { + public void actionPerformed(ActionEvent e) + { // update Cache settings for "don't show this again" boolean showWarningAgain = !jcb.isSelected(); - Cache.setProperty("CHECKURLLINKS", Boolean.valueOf(showWarningAgain).toString()); + Cache.setProperty("CHECKURLLINKS", + Boolean.valueOf(showWarningAgain).toString()); } }); msgPanel.add(jcb); JvOptionPane.showMessageDialog(Desktop.desktop, msgPanel, - MessageManager.getString("label.SEQUENCE_ID_no_longer_used"), JvOptionPane.WARNING_MESSAGE); + MessageManager + .getString("label.SEQUENCE_ID_no_longer_used"), + JvOptionPane.WARNING_MESSAGE); } } }); @@ -1842,11 +2272,13 @@ public class Desktop extends jalview.jbgui.GDesktop /** * Proxy class for JDesktopPane which optionally displays the current memory - * usage and highlights the desktop area with a red bar if free memory runs low. + * usage and highlights the desktop area with a red bar if free memory runs + * low. * * @author AMW */ - public class MyDesktopPane extends JDesktopPane implements Runnable { + public class MyDesktopPane extends JDesktopPane implements Runnable + { private static final float ONE_MB = 1048576f; boolean showMemoryUsage = false; @@ -1855,33 +2287,41 @@ public class Desktop extends jalview.jbgui.GDesktop java.text.NumberFormat df; - float maxMemory, allocatedMemory, freeMemory, totalFreeMemory, percentUsage; + float maxMemory, allocatedMemory, freeMemory, totalFreeMemory, + percentUsage; - public MyDesktopPane(boolean showMemoryUsage) { + public MyDesktopPane(boolean showMemoryUsage) + { showMemoryUsage(showMemoryUsage); } - public void showMemoryUsage(boolean showMemory) { + public void showMemoryUsage(boolean showMemory) + { this.showMemoryUsage = showMemory; - if (showMemory) { + if (showMemory) + { Thread worker = new Thread(this); worker.start(); } repaint(); } - public boolean isShowMemoryUsage() { + public boolean isShowMemoryUsage() + { return showMemoryUsage; } @Override - public void run() { + public void run() + { df = java.text.NumberFormat.getNumberInstance(); df.setMaximumFractionDigits(2); runtime = Runtime.getRuntime(); - while (showMemoryUsage) { - try { + while (showMemoryUsage) + { + try + { maxMemory = runtime.maxMemory() / ONE_MB; allocatedMemory = runtime.totalMemory() / ONE_MB; freeMemory = runtime.freeMemory() / ONE_MB; @@ -1898,24 +2338,30 @@ public class Desktop extends jalview.jbgui.GDesktop repaint(); // sleep after showing usage Thread.sleep(3000); - } catch (Exception ex) { + } catch (Exception ex) + { ex.printStackTrace(); } } } @Override - public void paintComponent(Graphics g) { - if (showMemoryUsage && g != null && df != null) { - if (percentUsage < 20) { + public void paintComponent(Graphics g) + { + if (showMemoryUsage && g != null && df != null) + { + if (percentUsage < 20) + { g.setColor(Color.red); } FontMetrics fm = g.getFontMetrics(); - if (fm != null) { - g.drawString( - MessageManager.formatMessage("label.memory_stats", - new Object[] { df.format(totalFreeMemory), df.format(maxMemory), df.format(percentUsage) }), - 10, getHeight() - fm.getHeight()); + if (fm != null) + { + g.drawString(MessageManager.formatMessage("label.memory_stats", + new Object[] + { df.format(totalFreeMemory), df.format(maxMemory), + df.format(percentUsage) }), + 10, getHeight() - fm.getHeight()); } } @@ -1929,36 +2375,46 @@ public class Desktop extends jalview.jbgui.GDesktop * * @return an array of AlignFrame, or null if none found */ - public static AlignFrame[] getAlignFrames() { - if (Jalview.isHeadlessMode()) { + public static AlignFrame[] getAlignFrames() + { + if (Jalview.isHeadlessMode()) + { // Desktop.desktop is null in headless mode return new AlignFrame[] { Jalview.currentAlignFrame }; } JInternalFrame[] frames = Desktop.desktop.getAllFrames(); - if (frames == null) { + if (frames == null) + { return null; } List avp = new ArrayList<>(); // REVERSE ORDER - for (int i = frames.length - 1; i > -1; i--) { - if (frames[i] instanceof AlignFrame) { + for (int i = frames.length - 1; i > -1; i--) + { + if (frames[i] instanceof AlignFrame) + { avp.add((AlignFrame) frames[i]); - } else if (frames[i] instanceof SplitFrame) { + } + else if (frames[i] instanceof SplitFrame) + { /* * Also check for a split frame containing an AlignFrame */ GSplitFrame sf = (GSplitFrame) frames[i]; - if (sf.getTopFrame() instanceof AlignFrame) { + if (sf.getTopFrame() instanceof AlignFrame) + { avp.add((AlignFrame) sf.getTopFrame()); } - if (sf.getBottomFrame() instanceof AlignFrame) { + if (sf.getBottomFrame() instanceof AlignFrame) + { avp.add((AlignFrame) sf.getBottomFrame()); } } } - if (avp.size() == 0) { + if (avp.size() == 0) + { return null; } AlignFrame afs[] = avp.toArray(new AlignFrame[avp.size()]); @@ -1970,21 +2426,26 @@ public class Desktop extends jalview.jbgui.GDesktop * * @return */ - public GStructureViewer[] getJmols() { + public GStructureViewer[] getJmols() + { JInternalFrame[] frames = Desktop.desktop.getAllFrames(); - if (frames == null) { + if (frames == null) + { return null; } List avp = new ArrayList<>(); // REVERSE ORDER - for (int i = frames.length - 1; i > -1; i--) { - if (frames[i] instanceof AppJmol) { + for (int i = frames.length - 1; i > -1; i--) + { + if (frames[i] instanceof AppJmol) + { GStructureViewer af = (GStructureViewer) frames[i]; avp.add(af); } } - if (avp.size() == 0) { + if (avp.size() == 0) + { return null; } GStructureViewer afs[] = avp.toArray(new GStructureViewer[avp.size()]); @@ -1995,23 +2456,29 @@ public class Desktop extends jalview.jbgui.GDesktop * Add Groovy Support to Jalview */ @Override - public void groovyShell_actionPerformed() { - try { + public void groovyShell_actionPerformed() + { + try + { openGroovyConsole(); - } catch (Exception ex) { + } catch (Exception ex) + { jalview.bin.Console.error("Groovy Shell Creation failed.", ex); JvOptionPane.showInternalMessageDialog(Desktop.desktop, - MessageManager.getString("label.couldnt_create_groovy_shell"), - MessageManager.getString("label.groovy_support_failed"), JvOptionPane.ERROR_MESSAGE); + MessageManager.getString("label.couldnt_create_groovy_shell"), + MessageManager.getString("label.groovy_support_failed"), + JvOptionPane.ERROR_MESSAGE); } } /** * Open the Groovy console */ - void openGroovyConsole() { - if (groovyConsole == null) { + void openGroovyConsole() + { + if (groovyConsole == null) + { groovyConsole = new groovy.ui.Console(); groovyConsole.setVariable("Jalview", this); groovyConsole.run(); @@ -2023,9 +2490,11 @@ public class Desktop extends jalview.jbgui.GDesktop * closed */ Window window = (Window) groovyConsole.getFrame(); - window.addWindowListener(new WindowAdapter() { + window.addWindowListener(new WindowAdapter() + { @Override - public void windowClosed(WindowEvent e) { + public void windowClosed(WindowEvent e) + { /* * rebind CMD-Q from Groovy Console to Jalview Quit */ @@ -2048,16 +2517,23 @@ public class Desktop extends jalview.jbgui.GDesktop } /** - * Bind Ctrl/Cmd-Q to Quit - for reset as Groovy Console takes over this binding - * when opened - */ - protected void addQuitHandler() { - getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put( - KeyStroke.getKeyStroke(KeyEvent.VK_Q, jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()), - "Quit"); - getRootPane().getActionMap().put("Quit", new AbstractAction() { + * Bind Ctrl/Cmd-Q to Quit - for reset as Groovy Console takes over this + * binding when opened + */ + protected void addQuitHandler() + { + getRootPane() + .getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put( + KeyStroke + .getKeyStroke(KeyEvent.VK_Q, + jalview.util.ShortcutKeyMaskExWrapper + .getMenuShortcutKeyMaskEx()), + "Quit"); + getRootPane().getActionMap().put("Quit", new AbstractAction() + { @Override - public void actionPerformed(ActionEvent e) { + public void actionPerformed(ActionEvent e) + { quit(); } }); @@ -2066,9 +2542,11 @@ public class Desktop extends jalview.jbgui.GDesktop /** * Enable or disable 'Run Groovy script' in AlignFrame calculate menus * - * @param enabled true if Groovy console is open + * @param enabled + * true if Groovy console is open */ - public void enableExecuteGroovy(boolean enabled) { + public void enableExecuteGroovy(boolean enabled) + { /* * disable opening a second Groovy console (or re-enable when the console is * closed) @@ -2076,8 +2554,10 @@ public class Desktop extends jalview.jbgui.GDesktop groovyShell.setEnabled(!enabled); AlignFrame[] alignFrames = getAlignFrames(); - if (alignFrames != null) { - for (AlignFrame af : alignFrames) { + if (alignFrames != null) + { + for (AlignFrame af : alignFrames) + { af.setGroovyEnabled(enabled); } } @@ -2096,19 +2576,25 @@ public class Desktop extends jalview.jbgui.GDesktop * @see jalview.gui.IProgressIndicator#setProgressBar(java.lang.String, long) */ @Override - public void setProgressBar(String message, long id) { - if (progressBars == null) { + public void setProgressBar(String message, long id) + { + if (progressBars == null) + { progressBars = new Hashtable<>(); progressBarHandlers = new Hashtable<>(); } - if (progressBars.get(Long.valueOf(id)) != null) { + if (progressBars.get(Long.valueOf(id)) != null) + { JPanel panel = progressBars.remove(Long.valueOf(id)); - if (progressBarHandlers.contains(Long.valueOf(id))) { + if (progressBarHandlers.contains(Long.valueOf(id))) + { progressBarHandlers.remove(Long.valueOf(id)); } removeProgressPanel(panel); - } else { + } + else + { progressBars.put(Long.valueOf(id), addProgressPanel(message)); } } @@ -2120,22 +2606,33 @@ public class Desktop extends jalview.jbgui.GDesktop * jalview.gui.IProgressIndicatorHandler) */ @Override - public void registerHandler(final long id, final IProgressIndicatorHandler handler) { - if (progressBarHandlers == null || !progressBars.containsKey(Long.valueOf(id))) { - throw new Error(MessageManager.getString("error.call_setprogressbar_before_registering_handler")); + public void registerHandler(final long id, + final IProgressIndicatorHandler handler) + { + if (progressBarHandlers == null + || !progressBars.containsKey(Long.valueOf(id))) + { + throw new Error(MessageManager.getString( + "error.call_setprogressbar_before_registering_handler")); } progressBarHandlers.put(Long.valueOf(id), handler); final JPanel progressPanel = progressBars.get(Long.valueOf(id)); - if (handler.canCancel()) { - JButton cancel = new JButton(MessageManager.getString("action.cancel")); + if (handler.canCancel()) + { + JButton cancel = new JButton( + MessageManager.getString("action.cancel")); final IProgressIndicator us = this; - cancel.addActionListener(new ActionListener() { + cancel.addActionListener(new ActionListener() + { @Override - public void actionPerformed(ActionEvent e) { + public void actionPerformed(ActionEvent e) + { handler.cancelActivity(id); - us.setProgressBar(MessageManager.formatMessage("label.cancelled_params", - new Object[] { ((JLabel) progressPanel.getComponent(0)).getText() }), id); + us.setProgressBar(MessageManager + .formatMessage("label.cancelled_params", new Object[] + { ((JLabel) progressPanel.getComponent(0)).getText() }), + id); } }); progressPanel.add(cancel, BorderLayout.EAST); @@ -2147,25 +2644,33 @@ public class Desktop extends jalview.jbgui.GDesktop * @return true if any progress bars are still active */ @Override - public boolean operationInProgress() { - if (progressBars != null && progressBars.size() > 0) { + public boolean operationInProgress() + { + if (progressBars != null && progressBars.size() > 0) + { return true; } return false; } /** - * This will return the first AlignFrame holding the given viewport instance. It - * will break if there are more than one AlignFrames viewing a particular av. + * This will return the first AlignFrame holding the given viewport instance. + * It will break if there are more than one AlignFrames viewing a particular + * av. * * @param viewport * @return alignFrame for viewport */ - public static AlignFrame getAlignFrameFor(AlignViewportI viewport) { - if (desktop != null) { - AlignmentPanel[] aps = getAlignmentPanels(viewport.getSequenceSetId()); - for (int panel = 0; aps != null && panel < aps.length; panel++) { - if (aps[panel] != null && aps[panel].av == viewport) { + public static AlignFrame getAlignFrameFor(AlignViewportI viewport) + { + if (desktop != null) + { + AlignmentPanel[] aps = getAlignmentPanels( + viewport.getSequenceSetId()); + for (int panel = 0; aps != null && panel < aps.length; panel++) + { + if (aps[panel] != null && aps[panel].av == viewport) + { return aps[panel].alignFrame; } } @@ -2173,7 +2678,8 @@ public class Desktop extends jalview.jbgui.GDesktop return null; } - public VamsasApplication getVamsasApplication() { + public VamsasApplication getVamsasApplication() + { // TODO: JAL-3311 remove remaining code from Jalview relating to VAMSAS return null; @@ -2189,7 +2695,8 @@ public class Desktop extends jalview.jbgui.GDesktop * * @return inBatchMode */ - public boolean isInBatchMode() { + public boolean isInBatchMode() + { return inBatchMode; } @@ -2198,7 +2705,8 @@ public class Desktop extends jalview.jbgui.GDesktop * * @param inBatchMode */ - public void setInBatchMode(boolean inBatchMode) { + public void setInBatchMode(boolean inBatchMode) + { this.inBatchMode = inBatchMode; } @@ -2217,25 +2725,29 @@ public class Desktop extends jalview.jbgui.GDesktop */ public void startServiceDiscovery(boolean blocking) { - startServiceDiscovery(blocking,false); + startServiceDiscovery(blocking, false); } /** * start service discovery threads * - * @param blocking - false means call returns - * immediately - * @param ignore_SHOW_JWS2_SERVICES_preference - when true JABA services are - * discovered regardless of user's - * JWS2 discovery preference setting + * @param blocking + * - false means call returns immediately + * @param ignore_SHOW_JWS2_SERVICES_preference + * - when true JABA services are discovered regardless of user's JWS2 + * discovery preference setting */ - public void startServiceDiscovery(boolean blocking, boolean ignore_SHOW_JWS2_SERVICES_preference) { + public void startServiceDiscovery(boolean blocking, + boolean ignore_SHOW_JWS2_SERVICES_preference) + { boolean alive = true; Thread t0 = null, t1 = null, t2 = null; // JAL-940 - JALVIEW 1 services are now being EOLed as of JABA 2.1 release - if (true) { + if (true) + { // todo: changesupport handlers need to be transferred - if (discoverer == null) { + if (discoverer == null) + { discoverer = new jalview.ws.jws1.Discoverer(); // register PCS handler for desktop. discoverer.addPropertyChangeListener(changeSupport); @@ -2245,21 +2757,29 @@ public class Desktop extends jalview.jbgui.GDesktop (t0 = new Thread(discoverer)).start(); } - if (ignore_SHOW_JWS2_SERVICES_preference || Cache.getDefault("SHOW_JWS2_SERVICES", true)) { - t2 = jalview.ws.jws2.Jws2Discoverer.getDiscoverer().startDiscoverer(changeSupport); + if (ignore_SHOW_JWS2_SERVICES_preference + || Cache.getDefault("SHOW_JWS2_SERVICES", true)) + { + t2 = jalview.ws.jws2.Jws2Discoverer.getDiscoverer() + .startDiscoverer(changeSupport); } Thread t3 = null; { // TODO: do rest service discovery } - if (blocking) { - while (alive) { - try { + if (blocking) + { + while (alive) + { + try + { Thread.sleep(15); - } catch (Exception e) { + } catch (Exception e) + { } - alive = (t1 != null && t1.isAlive()) || (t2 != null && t2.isAlive()) || (t3 != null && t3.isAlive()) - || (t0 != null && t0.isAlive()); + alive = (t1 != null && t1.isAlive()) || (t2 != null && t2.isAlive()) + || (t3 != null && t3.isAlive()) + || (t0 != null && t0.isAlive()); } } } @@ -2269,16 +2789,24 @@ public class Desktop extends jalview.jbgui.GDesktop * * @param evt */ - protected void JalviewServicesChanged(PropertyChangeEvent evt) { - if (evt.getNewValue() == null || evt.getNewValue() instanceof Vector) { - final String ermsg = jalview.ws.jws2.Jws2Discoverer.getDiscoverer().getErrorMessages(); - if (ermsg != null) { - if (Cache.getDefault("SHOW_WSDISCOVERY_ERRORS", true)) { - if (serviceChangedDialog == null) { + protected void JalviewServicesChanged(PropertyChangeEvent evt) + { + if (evt.getNewValue() == null || evt.getNewValue() instanceof Vector) + { + final String ermsg = jalview.ws.jws2.Jws2Discoverer.getDiscoverer() + .getErrorMessages(); + if (ermsg != null) + { + if (Cache.getDefault("SHOW_WSDISCOVERY_ERRORS", true)) + { + if (serviceChangedDialog == null) + { // only run if we aren't already displaying one of these. - addDialogThread(serviceChangedDialog = new Runnable() { + addDialogThread(serviceChangedDialog = new Runnable() + { @Override - public void run() { + public void run() + { /* * JalviewDialog jd =new JalviewDialog() { @@ -2300,19 +2828,26 @@ public class Desktop extends jalview.jbgui.GDesktop * jd.waitForInput(); */ JvOptionPane.showConfirmDialog(Desktop.desktop, - new JLabel("
" + ermsg + "
" - + "

It may be that you have invalid JABA URLs
in your web service preferences," - + "
or as a command-line argument, or mis-configured HTTP proxy settings.

" - + "

Check the Connections and Web services tab
of the" - + " Tools->Preferences dialog box to change them.

"), - "Web Service Configuration Problem", JvOptionPane.DEFAULT_OPTION, JvOptionPane.ERROR_MESSAGE); + new JLabel("
" + + ermsg + "
" + + "

It may be that you have invalid JABA URLs
in your web service preferences," + + "
or as a command-line argument, or mis-configured HTTP proxy settings.

" + + "

Check the Connections and Web services tab
of the" + + " Tools->Preferences dialog box to change them.

"), + "Web Service Configuration Problem", + JvOptionPane.DEFAULT_OPTION, + JvOptionPane.ERROR_MESSAGE); serviceChangedDialog = null; } }); } - } else { - jalview.bin.Console.error("Errors reported by JABA discovery service. Check web services preferences.\n" + ermsg); + } + else + { + jalview.bin.Console.error( + "Errors reported by JABA discovery service. Check web services preferences.\n" + + ermsg); } } } @@ -2327,7 +2862,8 @@ public class Desktop extends jalview.jbgui.GDesktop * * @param url */ - public static void showUrl(final String url) { + public static void showUrl(final String url) + { showUrl(url, Desktop.instance); } @@ -2335,26 +2871,38 @@ public class Desktop extends jalview.jbgui.GDesktop * Like showUrl but allows progress handler to be specified * * @param url - * @param progress (null) or object implementing IProgressIndicator + * @param progress + * (null) or object implementing IProgressIndicator */ - public static void showUrl(final String url, final IProgressIndicator progress) { - new Thread(new Runnable() { + public static void showUrl(final String url, + final IProgressIndicator progress) + { + new Thread(new Runnable() + { @Override - public void run() { - try { - if (progress != null) { - progress.setProgressBar(MessageManager.formatMessage("status.opening_params", new Object[] { url }), - this.hashCode()); + public void run() + { + try + { + if (progress != null) + { + progress.setProgressBar(MessageManager + .formatMessage("status.opening_params", new Object[] + { url }), this.hashCode()); } jalview.util.BrowserLauncher.openURL(url); - } catch (Exception ex) { + } catch (Exception ex) + { JvOptionPane.showInternalMessageDialog(Desktop.desktop, - MessageManager.getString("label.web_browser_not_found_unix"), - MessageManager.getString("label.web_browser_not_found"), JvOptionPane.WARNING_MESSAGE); + MessageManager + .getString("label.web_browser_not_found_unix"), + MessageManager.getString("label.web_browser_not_found"), + JvOptionPane.WARNING_MESSAGE); ex.printStackTrace(); } - if (progress != null) { + if (progress != null) + { progress.setProgressBar(null, this.hashCode()); } } @@ -2363,8 +2911,10 @@ public class Desktop extends jalview.jbgui.GDesktop public static WsParamSetManager wsparamManager = null; - public static ParamManager getUserParameterStore() { - if (wsparamManager == null) { + public static ParamManager getUserParameterStore() + { + if (wsparamManager == null) + { wsparamManager = new WsParamSetManager(); } return wsparamManager; @@ -2375,15 +2925,21 @@ public class Desktop extends jalview.jbgui.GDesktop * * @param e */ - public static void hyperlinkUpdate(HyperlinkEvent e) { - if (e.getEventType() == EventType.ACTIVATED) { + public static void hyperlinkUpdate(HyperlinkEvent e) + { + if (e.getEventType() == EventType.ACTIVATED) + { String url = null; - try { + try + { url = e.getURL().toString(); Desktop.showUrl(url); - } catch (Exception x) { - if (url != null) { - jalview.bin.Console.error("Couldn't handle string " + url + " as a URL."); + } catch (Exception x) + { + if (url != null) + { + jalview.bin.Console + .error("Couldn't handle string " + url + " as a URL."); } // ignore any exceptions due to dud links. } @@ -2413,29 +2969,40 @@ public class Desktop extends jalview.jbgui.GDesktop * * @param prompter */ - public void addDialogThread(final Runnable prompter) { - dialogExecutor.submit(new Runnable() { + public void addDialogThread(final Runnable prompter) + { + dialogExecutor.submit(new Runnable() + { @Override - public void run() { - if (dialogPause) { - try { + public void run() + { + if (dialogPause) + { + try + { block.acquire(); - } catch (InterruptedException x) { + } catch (InterruptedException x) + { } } - if (instance == null) { + if (instance == null) + { return; } - try { + try + { SwingUtilities.invokeAndWait(prompter); - } catch (Exception q) { - jalview.bin.Console.warn("Unexpected Exception in dialog thread.", q); + } catch (Exception q) + { + jalview.bin.Console.warn("Unexpected Exception in dialog thread.", + q); } } }); } - public void startDialogQueue() { + public void startDialogQueue() + { // set the flag so we don't pause waiting for another permit and semaphore // the current task to begin dialogPause = false; @@ -2452,41 +3019,51 @@ public class Desktop extends jalview.jbgui.GDesktop * */ @Override - protected void snapShotWindow_actionPerformed(ActionEvent e) { + protected void snapShotWindow_actionPerformed(ActionEvent e) + { // currently the menu option to do this is not shown invalidate(); int width = getWidth(); int height = getHeight(); - File of = new File("Jalview_snapshot_" + System.currentTimeMillis() + ".eps"); - ImageWriterI writer = new ImageWriterI() { + File of = new File( + "Jalview_snapshot_" + System.currentTimeMillis() + ".eps"); + ImageWriterI writer = new ImageWriterI() + { @Override - public void exportImage(Graphics g) throws Exception { + public void exportImage(Graphics g) throws Exception + { paintAll(g); - jalview.bin.Console.info("Successfully written snapshot to file " + of.getAbsolutePath()); + jalview.bin.Console.info("Successfully written snapshot to file " + + of.getAbsolutePath()); } }; String title = "View of desktop"; - ImageExporter exporter = new ImageExporter(writer, null, TYPE.EPS, title); + ImageExporter exporter = new ImageExporter(writer, null, TYPE.EPS, + title); exporter.doExport(of, this, width, height, title); } /** * Explode the views in the given SplitFrame into separate SplitFrame windows. - * This respects (remembers) any previous 'exploded geometry' i.e. the size and - * location last time the view was expanded (if any). However it does not + * This respects (remembers) any previous 'exploded geometry' i.e. the size + * and location last time the view was expanded (if any). However it does not * remember the split pane divider location - this is set to match the * 'exploding' frame. * * @param sf */ - public void explodeViews(SplitFrame sf) { + public void explodeViews(SplitFrame sf) + { AlignFrame oldTopFrame = (AlignFrame) sf.getTopFrame(); AlignFrame oldBottomFrame = (AlignFrame) sf.getBottomFrame(); - List topPanels = oldTopFrame.getAlignPanels(); - List bottomPanels = oldBottomFrame.getAlignPanels(); + List topPanels = oldTopFrame + .getAlignPanels(); + List bottomPanels = oldBottomFrame + .getAlignPanels(); int viewCount = topPanels.size(); - if (viewCount < 2) { + if (viewCount < 2) + { return; } @@ -2494,7 +3071,8 @@ public class Desktop extends jalview.jbgui.GDesktop * Processing in reverse order works, forwards order leaves the first panels not * visible. I don't know why! */ - for (int i = viewCount - 1; i >= 0; i--) { + for (int i = viewCount - 1; i >= 0; i--) + { /* * Make new top and bottom frames. These take over the respective AlignmentPanel * objects, including their AlignmentViewports, so the cdna/protein @@ -2507,8 +3085,10 @@ public class Desktop extends jalview.jbgui.GDesktop AlignFrame newTopFrame = new AlignFrame(topPanel); newTopFrame.setSize(oldTopFrame.getSize()); newTopFrame.setVisible(true); - Rectangle geometry = ((AlignViewport) topPanel.getAlignViewport()).getExplodedGeometry(); - if (geometry != null) { + Rectangle geometry = ((AlignViewport) topPanel.getAlignViewport()) + .getExplodedGeometry(); + if (geometry != null) + { newTopFrame.setSize(geometry.getSize()); } @@ -2516,15 +3096,19 @@ public class Desktop extends jalview.jbgui.GDesktop AlignFrame newBottomFrame = new AlignFrame(bottomPanel); newBottomFrame.setSize(oldBottomFrame.getSize()); newBottomFrame.setVisible(true); - geometry = ((AlignViewport) bottomPanel.getAlignViewport()).getExplodedGeometry(); - if (geometry != null) { + geometry = ((AlignViewport) bottomPanel.getAlignViewport()) + .getExplodedGeometry(); + if (geometry != null) + { newBottomFrame.setSize(geometry.getSize()); } topPanel.av.setGatherViewsHere(false); bottomPanel.av.setGatherViewsHere(false); - JInternalFrame splitFrame = new SplitFrame(newTopFrame, newBottomFrame); - if (geometry != null) { + JInternalFrame splitFrame = new SplitFrame(newTopFrame, + newBottomFrame); + if (geometry != null) + { splitFrame.setLocation(geometry.getLocation()); } Desktop.addInternalFrame(splitFrame, sf.getTitle(), -1, -1); @@ -2546,7 +3130,8 @@ public class Desktop extends jalview.jbgui.GDesktop * * @param source */ - public void gatherViews(GSplitFrame source) { + public void gatherViews(GSplitFrame source) + { /* * special handling of explodedGeometry for a view within a SplitFrame: - it * holds the (x, y) position of the enclosing SplitFrame, and the (width, @@ -2554,38 +3139,46 @@ public class Desktop extends jalview.jbgui.GDesktop */ AlignFrame myTopFrame = (AlignFrame) source.getTopFrame(); AlignFrame myBottomFrame = (AlignFrame) source.getBottomFrame(); - myTopFrame.viewport.setExplodedGeometry( - new Rectangle(source.getX(), source.getY(), myTopFrame.getWidth(), myTopFrame.getHeight())); - myBottomFrame.viewport.setExplodedGeometry( - new Rectangle(source.getX(), source.getY(), myBottomFrame.getWidth(), myBottomFrame.getHeight())); + myTopFrame.viewport.setExplodedGeometry(new Rectangle(source.getX(), + source.getY(), myTopFrame.getWidth(), myTopFrame.getHeight())); + myBottomFrame.viewport + .setExplodedGeometry(new Rectangle(source.getX(), source.getY(), + myBottomFrame.getWidth(), myBottomFrame.getHeight())); myTopFrame.viewport.setGatherViewsHere(true); myBottomFrame.viewport.setGatherViewsHere(true); String topViewId = myTopFrame.viewport.getSequenceSetId(); String bottomViewId = myBottomFrame.viewport.getSequenceSetId(); JInternalFrame[] frames = desktop.getAllFrames(); - for (JInternalFrame frame : frames) { - if (frame instanceof SplitFrame && frame != source) { + for (JInternalFrame frame : frames) + { + if (frame instanceof SplitFrame && frame != source) + { SplitFrame sf = (SplitFrame) frame; AlignFrame topFrame = (AlignFrame) sf.getTopFrame(); AlignFrame bottomFrame = (AlignFrame) sf.getBottomFrame(); boolean gatherThis = false; - for (int a = 0; a < topFrame.alignPanels.size(); a++) { + for (int a = 0; a < topFrame.alignPanels.size(); a++) + { AlignmentPanel topPanel = topFrame.alignPanels.get(a); AlignmentPanel bottomPanel = bottomFrame.alignPanels.get(a); if (topViewId.equals(topPanel.av.getSequenceSetId()) - && bottomViewId.equals(bottomPanel.av.getSequenceSetId())) { + && bottomViewId.equals(bottomPanel.av.getSequenceSetId())) + { gatherThis = true; topPanel.av.setGatherViewsHere(false); bottomPanel.av.setGatherViewsHere(false); - topPanel.av.setExplodedGeometry(new Rectangle(sf.getLocation(), topFrame.getSize())); - bottomPanel.av.setExplodedGeometry(new Rectangle(sf.getLocation(), bottomFrame.getSize())); + topPanel.av.setExplodedGeometry( + new Rectangle(sf.getLocation(), topFrame.getSize())); + bottomPanel.av.setExplodedGeometry( + new Rectangle(sf.getLocation(), bottomFrame.getSize())); myTopFrame.addAlignmentPanel(topPanel, false); myBottomFrame.addAlignmentPanel(bottomPanel, false); } } - if (gatherThis) { + if (gatherThis) + { topFrame.getAlignPanels().clear(); bottomFrame.getAlignPanels().clear(); sf.close(); @@ -2599,7 +3192,8 @@ public class Desktop extends jalview.jbgui.GDesktop myTopFrame.setDisplayedView(myTopFrame.alignPanel); } - public static groovy.ui.Console getGroovyConsole() { + public static groovy.ui.Console getGroovyConsole() + { return groovyConsole; } @@ -2608,88 +3202,127 @@ public class Desktop extends jalview.jbgui.GDesktop * * TODO refactor to desktop utilities class * - * @param files - Data source strings extracted from the drop event - * @param protocols - protocol for each data source extracted from the drop - * event - * @param evt - the drop event - * @param t - the payload from the drop event + * @param files + * - Data source strings extracted from the drop event + * @param protocols + * - protocol for each data source extracted from the drop event + * @param evt + * - the drop event + * @param t + * - the payload from the drop event * @throws Exception */ - public static void transferFromDropTarget(List files, List protocols, DropTargetDropEvent evt, - Transferable t) throws Exception { + public static void transferFromDropTarget(List files, + List protocols, DropTargetDropEvent evt, + Transferable t) throws Exception + { - DataFlavor uriListFlavor = new DataFlavor("text/uri-list;class=java.lang.String"), urlFlavour = null; - try { - urlFlavour = new DataFlavor("application/x-java-url; class=java.net.URL"); - } catch (ClassNotFoundException cfe) { - jalview.bin.Console.debug("Couldn't instantiate the URL dataflavor.", cfe); + DataFlavor uriListFlavor = new DataFlavor( + "text/uri-list;class=java.lang.String"), urlFlavour = null; + try + { + urlFlavour = new DataFlavor( + "application/x-java-url; class=java.net.URL"); + } catch (ClassNotFoundException cfe) + { + jalview.bin.Console.debug("Couldn't instantiate the URL dataflavor.", + cfe); } - if (urlFlavour != null && t.isDataFlavorSupported(urlFlavour)) { + if (urlFlavour != null && t.isDataFlavorSupported(urlFlavour)) + { - try { + try + { java.net.URL url = (URL) t.getTransferData(urlFlavour); // nb: java 8 osx bug https://bugs.openjdk.java.net/browse/JDK-8156099 // means url may be null. - if (url != null) { + if (url != null) + { protocols.add(DataSourceType.URL); files.add(url.toString()); - jalview.bin.Console.debug("Drop handled as URL dataflavor " + files.get(files.size() - 1)); + jalview.bin.Console.debug("Drop handled as URL dataflavor " + + files.get(files.size() - 1)); return; - } else { - if (Platform.isAMacAndNotJS()) { - System.err.println("Please ignore plist error - occurs due to problem with java 8 on OSX"); + } + else + { + if (Platform.isAMacAndNotJS()) + { + System.err.println( + "Please ignore plist error - occurs due to problem with java 8 on OSX"); } } - } catch (Throwable ex) { + } catch (Throwable ex) + { jalview.bin.Console.debug("URL drop handler failed.", ex); } } - if (t.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) { + if (t.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) + { // Works on Windows and MacOSX jalview.bin.Console.debug("Drop handled as javaFileListFlavor"); - for (Object file : (List) t.getTransferData(DataFlavor.javaFileListFlavor)) { + for (Object file : (List) t + .getTransferData(DataFlavor.javaFileListFlavor)) + { files.add(file); protocols.add(DataSourceType.FILE); } - } else { + } + else + { // Unix like behaviour boolean added = false; String data = null; - if (t.isDataFlavorSupported(uriListFlavor)) { + if (t.isDataFlavorSupported(uriListFlavor)) + { jalview.bin.Console.debug("Drop handled as uriListFlavor"); // This is used by Unix drag system data = (String) t.getTransferData(uriListFlavor); } - if (data == null) { + if (data == null) + { // fallback to text: workaround - on OSX where there's a JVM bug - jalview.bin.Console.debug("standard URIListFlavor failed. Trying text"); + jalview.bin.Console + .debug("standard URIListFlavor failed. Trying text"); // try text fallback - DataFlavor textDf = new DataFlavor("text/plain;class=java.lang.String"); - if (t.isDataFlavorSupported(textDf)) { + DataFlavor textDf = new DataFlavor( + "text/plain;class=java.lang.String"); + if (t.isDataFlavorSupported(textDf)) + { data = (String) t.getTransferData(textDf); } - jalview.bin.Console.debug("Plain text drop content returned " + (data == null ? "Null - failed" : data)); + jalview.bin.Console.debug("Plain text drop content returned " + + (data == null ? "Null - failed" : data)); } - if (data != null) { - while (protocols.size() < files.size()) { - jalview.bin.Console.debug("Adding missing FILE protocol for " + files.get(protocols.size())); + if (data != null) + { + while (protocols.size() < files.size()) + { + jalview.bin.Console.debug("Adding missing FILE protocol for " + + files.get(protocols.size())); protocols.add(DataSourceType.FILE); } - for (java.util.StringTokenizer st = new java.util.StringTokenizer(data, "\r\n"); st.hasMoreTokens();) { + for (java.util.StringTokenizer st = new java.util.StringTokenizer( + data, "\r\n"); st.hasMoreTokens();) + { added = true; String s = st.nextToken(); - if (s.startsWith("#")) { + if (s.startsWith("#")) + { // the line is a comment (as per the RFC 2483) continue; } java.net.URI uri = new java.net.URI(s); - if (uri.getScheme().toLowerCase(Locale.ROOT).startsWith("http")) { + if (uri.getScheme().toLowerCase(Locale.ROOT).startsWith("http")) + { protocols.add(DataSourceType.URL); files.add(uri.toString()); - } else { + } + else + { // otherwise preserve old behaviour: catch all for file objects java.io.File file = new java.io.File(uri); protocols.add(DataSourceType.FILE); @@ -2698,46 +3331,71 @@ public class Desktop extends jalview.jbgui.GDesktop } } - if (jalview.bin.Console.isDebugEnabled()) { - if (data == null || !added) { + if (jalview.bin.Console.isDebugEnabled()) + { + if (data == null || !added) + { - if (t.getTransferDataFlavors() != null && t.getTransferDataFlavors().length > 0) { - jalview.bin.Console.debug("Couldn't resolve drop data. Here are the supported flavors:"); - for (DataFlavor fl : t.getTransferDataFlavors()) { - jalview.bin.Console.debug("Supported transfer dataflavor: " + fl.toString()); + if (t.getTransferDataFlavors() != null + && t.getTransferDataFlavors().length > 0) + { + jalview.bin.Console.debug( + "Couldn't resolve drop data. Here are the supported flavors:"); + for (DataFlavor fl : t.getTransferDataFlavors()) + { + jalview.bin.Console.debug( + "Supported transfer dataflavor: " + fl.toString()); Object df = t.getTransferData(fl); - if (df != null) { + if (df != null) + { jalview.bin.Console.debug("Retrieves: " + df); - } else { + } + else + { jalview.bin.Console.debug("Retrieved nothing"); } } - } else { - jalview.bin.Console.debug("Couldn't resolve dataflavor for drop: " + t.toString()); + } + else + { + jalview.bin.Console + .debug("Couldn't resolve dataflavor for drop: " + + t.toString()); } } } } - if (Platform.isWindowsAndNotJS()) { - jalview.bin.Console.debug("Scanning dropped content for Windows Link Files"); + if (Platform.isWindowsAndNotJS()) + { + jalview.bin.Console + .debug("Scanning dropped content for Windows Link Files"); // resolve any .lnk files in the file drop - for (int f = 0; f < files.size(); f++) { + for (int f = 0; f < files.size(); f++) + { String source = files.get(f).toString().toLowerCase(Locale.ROOT); if (protocols.get(f).equals(DataSourceType.FILE) - && (source.endsWith(".lnk") || source.endsWith(".url") || source.endsWith(".site"))) { - try { + && (source.endsWith(".lnk") || source.endsWith(".url") + || source.endsWith(".site"))) + { + try + { Object obj = files.get(f); - File lf = (obj instanceof File ? (File) obj : new File((String) obj)); + File lf = (obj instanceof File ? (File) obj + : new File((String) obj)); // process link file to get a URL jalview.bin.Console.debug("Found potential link file: " + lf); WindowsShortcut wscfile = new WindowsShortcut(lf); String fullname = wscfile.getRealFilename(); protocols.set(f, FormatAdapter.checkProtocol(fullname)); files.set(f, fullname); - jalview.bin.Console.debug("Parsed real filename " + fullname + " to extract protocol: " + protocols.get(f)); - } catch (Exception ex) { - jalview.bin.Console.error("Couldn't parse " + files.get(f) + " as a link file.", ex); + jalview.bin.Console.debug("Parsed real filename " + fullname + + " to extract protocol: " + protocols.get(f)); + } catch (Exception ex) + { + jalview.bin.Console.error( + "Couldn't parse " + files.get(f) + " as a link file.", + ex); } } } @@ -2749,30 +3407,40 @@ public class Desktop extends jalview.jbgui.GDesktop * depending on the state of the controlling menu item */ @Override - protected void showExperimental_actionPerformed(boolean selected) { + protected void showExperimental_actionPerformed(boolean selected) + { Cache.setProperty(EXPERIMENTAL_FEATURES, Boolean.toString(selected)); } /** - * Answers a (possibly empty) list of any structure viewer frames (currently for - * either Jmol or Chimera) which are currently open. This may optionally be - * restricted to viewers of a specified class, or viewers linked to a specified - * alignment panel. + * Answers a (possibly empty) list of any structure viewer frames (currently + * for either Jmol or Chimera) which are currently open. This may optionally + * be restricted to viewers of a specified class, or viewers linked to a + * specified alignment panel. * - * @param apanel if not null, only return viewers linked to this - * panel - * @param structureViewerClass if not null, only return viewers of this class + * @param apanel + * if not null, only return viewers linked to this panel + * @param structureViewerClass + * if not null, only return viewers of this class * @return */ - public List getStructureViewers(AlignmentPanel apanel, - Class structureViewerClass) { + public List getStructureViewers( + AlignmentPanel apanel, + Class structureViewerClass) + { List result = new ArrayList<>(); JInternalFrame[] frames = Desktop.instance.getAllFrames(); - for (JInternalFrame frame : frames) { - if (frame instanceof StructureViewerBase) { - if (structureViewerClass == null || structureViewerClass.isInstance(frame)) { - if (apanel == null || ((StructureViewerBase) frame).isLinkedWith(apanel)) { + for (JInternalFrame frame : frames) + { + if (frame instanceof StructureViewerBase) + { + if (structureViewerClass == null + || structureViewerClass.isInstance(frame)) + { + if (apanel == null + || ((StructureViewerBase) frame).isLinkedWith(apanel)) + { result.add((StructureViewerBase) frame); } } @@ -2785,24 +3453,31 @@ public class Desktop extends jalview.jbgui.GDesktop private static boolean debugScaleMessageDone = false; - public static void debugScaleMessage(Graphics g) { - if (debugScaleMessageDone) { + public static void debugScaleMessage(Graphics g) + { + if (debugScaleMessageDone) + { return; } // output used by tests to check HiDPI scaling settings in action - try { + try + { Graphics2D gg = (Graphics2D) g; - if (gg != null) { + if (gg != null) + { AffineTransform t = gg.getTransform(); double scaleX = t.getScaleX(); double scaleY = t.getScaleY(); jalview.bin.Console.debug(debugScaleMessage + scaleX + " (X)"); jalview.bin.Console.debug(debugScaleMessage + scaleY + " (Y)"); debugScaleMessageDone = true; - } else { + } + else + { jalview.bin.Console.debug("Desktop graphics null"); } - } catch (Exception e) { + } catch (Exception e) + { jalview.bin.Console.debug(Cache.getStackTraceString(e)); } } diff --git a/src/jalview/gui/EditNameDialog.java b/src/jalview/gui/EditNameDialog.java index 8aaebc8..52791c8 100644 --- a/src/jalview/gui/EditNameDialog.java +++ b/src/jalview/gui/EditNameDialog.java @@ -39,6 +39,7 @@ public class EditNameDialog { private static final Font COURIER_12 = new Font("Courier", Font.PLAIN, 12); + JTextField id; JTextField description; @@ -110,8 +111,7 @@ public class EditNameDialog * * @param action */ - public void showDialog(JComponent parent, String title, - Runnable action) + public void showDialog(JComponent parent, String title, Runnable action) { Object[] options = new Object[] { MessageManager.getString("action.ok"), MessageManager.getString("action.cancel") }; diff --git a/src/jalview/gui/FeatureEditor.java b/src/jalview/gui/FeatureEditor.java index d547c58..6a7bee6 100644 --- a/src/jalview/gui/FeatureEditor.java +++ b/src/jalview/gui/FeatureEditor.java @@ -170,30 +170,30 @@ public class FeatureEditor }); description = new JTextArea(3, 25); - + start = new JSpinner(); end = new JSpinner(); start.setPreferredSize(new Dimension(80, 20)); end.setPreferredSize(new Dimension(80, 20)); - + /* * ensure that start can never be more than end */ - start.addChangeListener(new ChangeListener() + start.addChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { - Integer startVal = (Integer) start.getValue(); + Integer startVal = (Integer) start.getValue(); ((SpinnerNumberModel) end.getModel()).setMinimum(startVal); } }); - end.addChangeListener(new ChangeListener() + end.addChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { - Integer endVal = (Integer) end.getValue(); + Integer endVal = (Integer) end.getValue(); ((SpinnerNumberModel) start.getModel()).setMaximum(endVal); } }); @@ -381,8 +381,10 @@ public class FeatureEditor start.setValue(new Integer(firstFeature.getBegin())); end.setValue(new Integer(firstFeature.getEnd())); - ((SpinnerNumberModel) start.getModel()).setMaximum(firstFeature.getEnd()); - ((SpinnerNumberModel) end.getModel()).setMinimum(firstFeature.getBegin()); + ((SpinnerNumberModel) start.getModel()) + .setMaximum(firstFeature.getEnd()); + ((SpinnerNumberModel) end.getModel()) + .setMinimum(firstFeature.getBegin()); description.setText(firstFeature.getDescription()); featureColour = fr.getFeatureStyle(featureType); @@ -405,15 +407,16 @@ public class FeatureEditor */ public void showDialog() { - Runnable okAction = forCreate ? getCreateAction() : getAmendAction(); - Runnable cancelAction = getCancelAction(); + Runnable okAction = forCreate ? getCreateAction() : getAmendAction(); + Runnable cancelAction = getCancelAction(); /* * set dialog action handlers for OK (create/Amend) and Cancel options * also for Delete if applicable (when amending features) */ JvOptionPane dialog = JvOptionPane.newOptionDialog(Desktop.desktop) - .setResponseHandler(0, okAction).setResponseHandler(2, cancelAction); + .setResponseHandler(0, okAction) + .setResponseHandler(2, cancelAction); if (!forCreate) { dialog.setResponseHandler(1, getDeleteAction()); @@ -439,9 +442,8 @@ public class FeatureEditor } dialog.showInternalDialog(mainPanel, title, - JvOptionPane.YES_NO_CANCEL_OPTION, - JvOptionPane.PLAIN_MESSAGE, null, options, - MessageManager.getString("action.ok")); + JvOptionPane.YES_NO_CANCEL_OPTION, JvOptionPane.PLAIN_MESSAGE, + null, options, MessageManager.getString("action.ok")); } /** @@ -454,7 +456,7 @@ public class FeatureEditor */ protected Runnable getCancelAction() { - Runnable okAction = new Runnable() + Runnable okAction = new Runnable() { @Override public void run() @@ -478,7 +480,7 @@ public class FeatureEditor */ protected Runnable getCreateAction() { - Runnable okAction = new Runnable() + Runnable okAction = new Runnable() { boolean useLastDefaults = features.get(0).getType() == null; @@ -536,7 +538,7 @@ public class FeatureEditor */ protected Runnable getDeleteAction() { - Runnable deleteAction = new Runnable() + Runnable deleteAction = new Runnable() { public void run() { @@ -638,14 +640,14 @@ public class FeatureEditor */ protected Runnable getAmendAction() { - Runnable okAction = new Runnable() + Runnable okAction = new Runnable() { boolean useLastDefaults = features.get(0).getType() == null; - + String featureType = name.getText(); - + String featureGroup = group.getText(); - + public void run() { final String enteredType = name.getText().trim(); diff --git a/src/jalview/gui/FeatureSettings.java b/src/jalview/gui/FeatureSettings.java index ac04a1f..bb15b55 100644 --- a/src/jalview/gui/FeatureSettings.java +++ b/src/jalview/gui/FeatureSettings.java @@ -217,6 +217,7 @@ public class FeatureSettings extends JPanel transparency.setValue(100 - transparencyAsPercent); inConstruction = incon; } + /** * Constructor * @@ -457,8 +458,8 @@ public class FeatureSettings extends JPanel }); frame.setLayer(JLayeredPane.PALETTE_LAYER); } - inConstruction = false; - } + inConstruction = false; + } /** * Sets the state of buttons to show complement features from viewport @@ -484,16 +485,17 @@ public class FeatureSettings extends JPanel change = null; } - /** - * Constructs and shows a popup menu of possible actions on the selected row and - * feature type - * - * @param rowSelected - * @param type - * @param typeCol - * @param pt - */ - protected void showPopupMenu(final int rowSelected, final String type, final Object typeCol, final Point pt) + /** + * Constructs and shows a popup menu of possible actions on the selected row + * and feature type + * + * @param rowSelected + * @param type + * @param typeCol + * @param pt + */ + protected void showPopupMenu(final int rowSelected, final String type, + final Object typeCol, final Point pt) { JPopupMenu men = new JPopupMenu(MessageManager .formatMessage("label.settings_for_param", new String[] @@ -1201,8 +1203,8 @@ public class FeatureSettings extends JPanel } /** - * close ourselves but leave any existing UI handlers (e.g a CDS/Protein tabbed - * feature settings dialog) intact + * close ourselves but leave any existing UI handlers (e.g a CDS/Protein + * tabbed feature settings dialog) intact */ public void closeOldSettings() { @@ -1318,7 +1320,8 @@ public class FeatureSettings extends JPanel } }); - final String byScoreLabel = MessageManager.getString("label.seq_sort_by_score"); + final String byScoreLabel = MessageManager + .getString("label.seq_sort_by_score"); JButton sortByScore = new JButton(byScoreLabel); sortByScore.setFont(JvSwingUtils.getLabelFont()); sortByScore.addActionListener(new ActionListener() @@ -1332,7 +1335,8 @@ public class FeatureSettings extends JPanel } } }); - final String byDensityLabel = MessageManager.getString("label.sequence_sort_by_density"); + final String byDensityLabel = MessageManager + .getString("label.sequence_sort_by_density"); JButton sortByDens = new JButton(byDensityLabel); sortByDens.setFont(JvSwingUtils.getLabelFont()); sortByDens.addActionListener(new ActionListener() @@ -1363,7 +1367,8 @@ public class FeatureSettings extends JPanel } } }); - // Cancel for a SplitFrame should just revert changes to the currently displayed + // Cancel for a SplitFrame should just revert changes to the currently + // displayed // settings. May want to do this for either or both - so need a splitview // feature settings cancel/OK. JButton cancel = new JButton(MessageManager @@ -1453,11 +1458,12 @@ public class FeatureSettings extends JPanel MessageManager.getString("label.transparency_tip")); boolean nucleotide = af.getViewport().getAlignment().isNucleotide(); - String text = MessageManager.formatMessage("label.show_linked_features", - nucleotide - ? MessageManager.getString("label.protein") - .toLowerCase(Locale.ROOT) - : "CDS"); + String text = MessageManager + .formatMessage("label.show_linked_features", + nucleotide + ? MessageManager.getString("label.protein") + .toLowerCase(Locale.ROOT) + : "CDS"); showComplement = new JCheckBox(text); showComplement.addActionListener(new ActionListener() { @@ -1541,7 +1547,7 @@ public class FeatureSettings extends JPanel * * @param fcol * @param withHint - * if true include 'click to edit' and similar text + * if true include 'click to edit' and similar text * @return */ public static String getColorTooltip(FeatureColourI fcol, diff --git a/src/jalview/gui/FeatureTypeSettings.java b/src/jalview/gui/FeatureTypeSettings.java index a2a2700..09bb2a3 100644 --- a/src/jalview/gui/FeatureTypeSettings.java +++ b/src/jalview/gui/FeatureTypeSettings.java @@ -155,7 +155,7 @@ public class FeatureTypeSettings extends JalviewDialog JRadioButton graduatedColour = new JRadioButton(); JPanel coloursPanel; - + JPanel filtersPanel; JPanel singleColour = new JPanel(); @@ -217,9 +217,9 @@ public class FeatureTypeSettings extends JalviewDialog ap = fr.ap; originalFilter = fr.getFeatureFilter(theType); originalColour = fr.getFeatureColours().get(theType); - + adjusting = true; - + try { initialise(); @@ -228,15 +228,15 @@ public class FeatureTypeSettings extends JalviewDialog ex.printStackTrace(); return; } - + updateColoursPanel(); - + updateFiltersPanel(); - + adjusting = false; - + colourChanged(false); - + String title = MessageManager .formatMessage("label.display_settings_for", new String[] { theType }); @@ -245,8 +245,8 @@ public class FeatureTypeSettings extends JalviewDialog } /** - * Configures the widgets on the Colours panel according to the current feature - * colour scheme + * Configures the widgets on the Colours panel according to the current + * feature colour scheme */ private void updateColoursPanel() { @@ -537,7 +537,8 @@ public class FeatureTypeSettings extends JalviewDialog { if (minColour.isEnabled()) { - String ttl = MessageManager.getString("label.select_colour_minimum_value"); + String ttl = MessageManager + .getString("label.select_colour_minimum_value"); showColourChooser(minColour, ttl); } } @@ -554,7 +555,8 @@ public class FeatureTypeSettings extends JalviewDialog { if (maxColour.isEnabled()) { - String ttl = MessageManager.getString("label.select_colour_maximum_value"); + String ttl = MessageManager + .getString("label.select_colour_maximum_value"); showColourChooser(maxColour, ttl); } } @@ -762,8 +764,8 @@ public class FeatureTypeSettings extends JalviewDialog // } // else // { - singleColour.setBackground(originalColour.getColour()); - singleColour.setForeground(originalColour.getColour()); + singleColour.setBackground(originalColour.getColour()); + singleColour.setForeground(originalColour.getColour()); // } singleColour.addMouseListener(new MouseAdapter() { @@ -772,7 +774,8 @@ public class FeatureTypeSettings extends JalviewDialog { if (simpleColour.isSelected()) { - String ttl = MessageManager.formatMessage("label.select_colour_for", featureType); + String ttl = MessageManager + .formatMessage("label.select_colour_for", featureType); showColourChooser(singleColour, ttl); } } @@ -857,8 +860,8 @@ public class FeatureTypeSettings extends JalviewDialog colourChanged(true); } }; - JalviewColourChooser.showColourChooser(this, title, - colourPanel.getBackground(), listener); + JalviewColourChooser.showColourChooser(this, title, + colourPanel.getBackground(), listener); } /** @@ -1045,7 +1048,7 @@ public class FeatureTypeSettings extends JalviewDialog */ adjusting = true; float f = Float.parseFloat(thresholdValue.getText()); - f = Float.max(f, this.min); + f = Float.max(f, this.min); f = Float.min(f, this.max); setThresholdValueText(f); slider.setSliderValue(f); @@ -1061,7 +1064,8 @@ public class FeatureTypeSettings extends JalviewDialog } /** - * Sets the text field for threshold value, rounded to four significant figures + * Sets the text field for threshold value, rounded to four significant + * figures * * @param f */ @@ -1160,7 +1164,7 @@ public class FeatureTypeSettings extends JalviewDialog List displayAttsObjects = new ArrayList<>(displayAtts); JComboBox attCombo = JvSwingUtils .buildComboWithTooltips(displayAttsObjects, tooltips); - + return attCombo; } diff --git a/src/jalview/gui/Finder.java b/src/jalview/gui/Finder.java index 93dcadf..358d9a4 100755 --- a/src/jalview/gui/Finder.java +++ b/src/jalview/gui/Finder.java @@ -336,9 +336,8 @@ public class Finder extends GFinder { if (idMatch.size() > 0 && searchResults.getCount() > 0) { - message.append(" ").append( - MessageManager.getString("label.and").toLowerCase(Locale.ROOT)) - .append(" "); + message.append(" ").append(MessageManager.getString("label.and") + .toLowerCase(Locale.ROOT)).append(" "); } message.append(MessageManager.formatMessage( "label.subsequence_matches_found", diff --git a/src/jalview/gui/IdCanvas.java b/src/jalview/gui/IdCanvas.java index 1a8e79f..c94dee0 100755 --- a/src/jalview/gui/IdCanvas.java +++ b/src/jalview/gui/IdCanvas.java @@ -55,7 +55,7 @@ public class IdCanvas extends JPanel implements ViewportListenerI BufferedImage image; -// Graphics2D gg; + // Graphics2D gg; int imgHeight = 0; @@ -79,7 +79,7 @@ public class IdCanvas extends JPanel implements ViewportListenerI this.av = av; PaintRefresher.Register(this, av.getSequenceSetId()); av.getRanges().addPropertyChangeListener(this); - } + } /** * DOCUMENT ME! @@ -203,7 +203,7 @@ public class IdCanvas extends JPanel implements ViewportListenerI gg.translate(0, -transY); gg.dispose(); - + fastPaint = true; // Call repaint on alignment panel so that repaints from other alignment @@ -223,41 +223,42 @@ public class IdCanvas extends JPanel implements ViewportListenerI { g.setColor(Color.white); g.fillRect(0, 0, getWidth(), getHeight()); - + if (fastPaint) { fastPaint = false; g.drawImage(image, 0, 0, this); - + return; } - + int oldHeight = imgHeight; - + imgHeight = getHeight(); imgHeight -= (imgHeight % av.getCharHeight()); - + if (imgHeight < 1) { return; } - + if (oldHeight != imgHeight || image.getWidth(this) != getWidth()) { - image = new BufferedImage(getWidth(), imgHeight, - BufferedImage.TYPE_INT_RGB); + image = new BufferedImage(getWidth(), imgHeight, + BufferedImage.TYPE_INT_RGB); } - + Graphics2D gg = image.createGraphics(); - + // Fill in the background gg.setColor(Color.white); gg.fillRect(0, 0, getWidth(), imgHeight); - - drawIds(gg, av, av.getRanges().getStartSeq(), av.getRanges().getEndSeq(), searchResults); + + drawIds(gg, av, av.getRanges().getStartSeq(), + av.getRanges().getEndSeq(), searchResults); gg.dispose(); - + g.drawImage(image, 0, 0, this); } @@ -273,14 +274,13 @@ public class IdCanvas extends JPanel implements ViewportListenerI * @param endSeq * @param selection */ - void drawIds(Graphics2D g, AlignViewport alignViewport, final int startSeq, - final int endSeq, List selection) + void drawIds(Graphics2D g, AlignViewport alignViewport, + final int startSeq, final int endSeq, List selection) { Font font = alignViewport.getFont(); if (alignViewport.isSeqNameItalics()) { - setIdfont(new Font(font.getName(), Font.ITALIC, - font.getSize())); + setIdfont(new Font(font.getName(), Font.ITALIC, font.getSize())); } else { @@ -348,8 +348,7 @@ public class IdCanvas extends JPanel implements ViewportListenerI g.setColor(currentColor); int charHeight = alignViewport.getCharHeight(); - g.fillRect(0, (i - startSeq) * charHeight, - getWidth(), charHeight); + g.fillRect(0, (i - startSeq) * charHeight, getWidth(), charHeight); g.setColor(currentTextColor); @@ -361,8 +360,9 @@ public class IdCanvas extends JPanel implements ViewportListenerI xPos = panelWidth - fm.stringWidth(string) - 4; } - g.drawString(string, xPos, (((i - startSeq) * charHeight) + charHeight) - - (charHeight / 5)); + g.drawString(string, xPos, + (((i - startSeq) * charHeight) + charHeight) + - (charHeight / 5)); if (hasHiddenRows && av.getShowHiddenMarkers()) { @@ -448,7 +448,8 @@ public class IdCanvas extends JPanel implements ViewportListenerI * @param starty * @param yoffset */ - void drawMarker(Graphics2D g, AlignViewport alignViewport, int seqIndex, int starty, int yoffset) + void drawMarker(Graphics2D g, AlignViewport alignViewport, int seqIndex, + int starty, int yoffset) { SequenceI[] hseqs = alignViewport.getAlignment() .getHiddenSequences().hiddenSequences; @@ -491,8 +492,7 @@ public class IdCanvas extends JPanel implements ViewportListenerI /* * vertices of the triangle, below or above hidden seqs */ - int[] xPoints = new int[] - { getWidth() - charHeight, + int[] xPoints = new int[] { getWidth() - charHeight, getWidth() - charHeight, getWidth() }; int yShift = seqIndex - starty; diff --git a/src/jalview/gui/IdPanel.java b/src/jalview/gui/IdPanel.java index 4b5e9d4..7b491e4 100755 --- a/src/jalview/gui/IdPanel.java +++ b/src/jalview/gui/IdPanel.java @@ -131,8 +131,7 @@ public class IdPanel extends JPanel StringBuilder text = new StringBuilder(); text.append("Sequence ").append(String.valueOf(seq + 1)) - .append(" ID: ") - .append(sequence.getName()); + .append(" ID: ").append(sequence.getName()); alignPanel.alignFrame.setStatus(text.toString()); } } @@ -378,7 +377,7 @@ public class IdPanel extends JPanel } MousePos pos = alignPanel.getSeqPanel().findMousePosition(e); - + if (e.isPopupTrigger()) // Mac reports this in mousePressed { showPopupMenu(e, pos); diff --git a/src/jalview/gui/ImageExporter.java b/src/jalview/gui/ImageExporter.java index 5fb6951..545d1c4 100644 --- a/src/jalview/gui/ImageExporter.java +++ b/src/jalview/gui/ImageExporter.java @@ -38,8 +38,7 @@ public class ImageExporter */ public interface ImageWriterI { - void exportImage(Graphics g) - throws Exception; + void exportImage(Graphics g) throws Exception; } private IProgressIndicator messageBoard; @@ -188,10 +187,10 @@ public class ImageExporter String type = imageType.getName(); try { -// setStatus( -// MessageManager.formatMessage( -// "status.exporting_alignment_as_x_file", type), -// messageId); + // setStatus( + // MessageManager.formatMessage( + // "status.exporting_alignment_as_x_file", type), + // messageId); ImageMaker im = new ImageMaker(imageType, width, height, chosenFile, title, asLineart); imageWriter.exportImage(im.getGraphics()); @@ -201,9 +200,8 @@ public class ImageExporter messageId); } catch (Exception e) { - System.out - .println(String.format("Error creating %s file: %s", type, - e.toString())); + System.out.println(String.format("Error creating %s file: %s", type, + e.toString())); setStatus(MessageManager.formatMessage("info.error_creating_file", type), messageId); } diff --git a/src/jalview/gui/JDatabaseTree.java b/src/jalview/gui/JDatabaseTree.java index 7bdcb2e..327eade 100644 --- a/src/jalview/gui/JDatabaseTree.java +++ b/src/jalview/gui/JDatabaseTree.java @@ -233,7 +233,8 @@ public class JDatabaseTree extends JalviewDialog implements KeyListener } else { - names[i] = ((String) child.getUserObject()).toLowerCase(Locale.ROOT); + names[i] = ((String) child.getUserObject()) + .toLowerCase(Locale.ROOT); sortTreeNodes(child); } } @@ -518,7 +519,6 @@ public class JDatabaseTree extends JalviewDialog implements KeyListener lstners.remove(actionListener); } - @Override public void keyPressed(KeyEvent arg0) { diff --git a/src/jalview/gui/JalviewBooleanRadioButtons.java b/src/jalview/gui/JalviewBooleanRadioButtons.java index aa09849..ae3d748 100644 --- a/src/jalview/gui/JalviewBooleanRadioButtons.java +++ b/src/jalview/gui/JalviewBooleanRadioButtons.java @@ -107,7 +107,7 @@ public class JalviewBooleanRadioButtons extends AbstractButton { return buttonFalse; } - + @Override public void addActionListener(ActionListener l) { diff --git a/src/jalview/gui/JalviewChimeraXBindingModel.java b/src/jalview/gui/JalviewChimeraXBindingModel.java index cfd44c7..58b1300 100644 --- a/src/jalview/gui/JalviewChimeraXBindingModel.java +++ b/src/jalview/gui/JalviewChimeraXBindingModel.java @@ -42,7 +42,7 @@ public class JalviewChimeraXBindingModel extends JalviewChimeraBindingModel int modelNumber = chimeraMaps.size() + 1; String command = "setattr #" + modelNumber + " models name " + pe.getId(); - executeCommand(new StructureCommand(command), false); + executeCommand(new StructureCommand(command), false); modelsToMap.add(new ChimeraModel(pe.getId(), ModelType.PDB_MODEL, modelNumber, 0)); } @@ -89,7 +89,9 @@ public class JalviewChimeraXBindingModel extends JalviewChimeraBindingModel } /** - * Returns a model of the structure positions described by the ChimeraX format atomspec + * Returns a model of the structure positions described by the ChimeraX format + * atomspec + * * @param atomSpec * @return */ diff --git a/src/jalview/gui/JalviewColourChooser.java b/src/jalview/gui/JalviewColourChooser.java index 6dc8a2b..d808ebd 100644 --- a/src/jalview/gui/JalviewColourChooser.java +++ b/src/jalview/gui/JalviewColourChooser.java @@ -17,8 +17,10 @@ public class JalviewColourChooser public interface ColourChooserListener { void colourSelected(Color c); - - default void cancel() {}; + + default void cancel() + { + }; } /** @@ -39,11 +41,12 @@ public class JalviewColourChooser { colorChooser.setColor(initialColour); } - ActionListener onChoose = evt -> listener.colourSelected(colorChooser.getColor()); + ActionListener onChoose = evt -> listener + .colourSelected(colorChooser.getColor()); ActionListener onCancel = evt -> listener.cancel(); - JDialog dialog = JColorChooser.createDialog(parent, title, true, colorChooser, - onChoose, onCancel); - dialog.setVisible(true); + JDialog dialog = JColorChooser.createDialog(parent, title, true, + colorChooser, onChoose, onCancel); + dialog.setVisible(true); } /** diff --git a/src/jalview/gui/JvOptionPane.java b/src/jalview/gui/JvOptionPane.java index bf15b86..22396fb 100644 --- a/src/jalview/gui/JvOptionPane.java +++ b/src/jalview/gui/JvOptionPane.java @@ -37,8 +37,8 @@ import javax.swing.Icon; import javax.swing.JOptionPane; import javax.swing.JPanel; -public class JvOptionPane extends JOptionPane implements DialogRunnerI, - PropertyChangeListener +public class JvOptionPane extends JOptionPane + implements DialogRunnerI, PropertyChangeListener { private static final long serialVersionUID = -3019167117756785229L; @@ -55,7 +55,7 @@ public class JvOptionPane extends JOptionPane implements DialogRunnerI, * option (text); this list allows conversion to index (int) */ List ourOptions; - + public JvOptionPane(final Component parent) { this.parentComponent = Platform.isJS() ? this : parent; @@ -91,7 +91,7 @@ public class JvOptionPane extends JOptionPane implements DialogRunnerI, switch (optionType) { case JvOptionPane.YES_NO_CANCEL_OPTION: - // FeatureRenderer amendFeatures ?? TODO ?? + // FeatureRenderer amendFeatures ?? TODO ?? // Chimera close // PromptUserConfig // $FALL-THROUGH$ @@ -164,8 +164,10 @@ public class JvOptionPane extends JOptionPane implements DialogRunnerI, Object message) { // JvOptionPaneTest only; - return isInteractiveMode() ? JOptionPane.showInternalConfirmDialog( - parentComponent, message) : (int) getMockResponse(); + return isInteractiveMode() + ? JOptionPane.showInternalConfirmDialog(parentComponent, + message) + : (int) getMockResponse(); } /** @@ -399,7 +401,6 @@ public class JvOptionPane extends JOptionPane implements DialogRunnerI, JOptionPane.showMessageDialog(parentComponent, message); } - /** * Adds title and messageType * @@ -506,6 +507,7 @@ public class JvOptionPane extends JOptionPane implements DialogRunnerI, return JOptionPane.showInputDialog(message, initialSelectionValue); } + /** * centered on parent * @@ -535,15 +537,14 @@ public class JvOptionPane extends JOptionPane implements DialogRunnerI, public static String showInputDialog(Component parentComponent, String message, String initialSelectionValue) { - + // AnnotationPanel - + return isInteractiveMode() ? JOptionPane.showInputDialog(parentComponent, message, initialSelectionValue) : getMockResponse().toString(); } - /** * input with initial selection @@ -556,9 +557,9 @@ public class JvOptionPane extends JOptionPane implements DialogRunnerI, public static String showInputDialog(Component parentComponent, Object message, Object initialSelectionValue) { - + // AnnotationPanel - + return isInteractiveMode() ? JOptionPane.showInputDialog(parentComponent, message, initialSelectionValue) @@ -581,13 +582,14 @@ public class JvOptionPane extends JOptionPane implements DialogRunnerI, // test only - return isInteractiveMode() ? JOptionPane - .showInputDialog(parentComponent, message, title, messageType) + return isInteractiveMode() + ? JOptionPane.showInputDialog(parentComponent, message, title, + messageType) : getMockResponse().toString(); } /** - * Customized input option + * Customized input option * * @param parentComponent * @param message @@ -604,9 +606,9 @@ public class JvOptionPane extends JOptionPane implements DialogRunnerI, Object[] selectionValues, Object initialSelectionValue) throws HeadlessException { - + // test only - + return isInteractiveMode() ? JOptionPane.showInputDialog(parentComponent, message, title, messageType, icon, selectionValues, @@ -614,8 +616,6 @@ public class JvOptionPane extends JOptionPane implements DialogRunnerI, : getMockResponse().toString(); } - - /** * internal version * @@ -627,13 +627,12 @@ public class JvOptionPane extends JOptionPane implements DialogRunnerI, String message) { // test only - + return isInteractiveMode() ? JOptionPane.showInternalInputDialog(parentComponent, message) : getMockResponse().toString(); } - /** * internal with title and messageType * @@ -646,9 +645,9 @@ public class JvOptionPane extends JOptionPane implements DialogRunnerI, public static String showInternalInputDialog(Component parentComponent, String message, String title, int messageType) { - + // AlignFrame tabbedPane_mousePressed - + return isInteractiveMode() ? JOptionPane.showInternalInputDialog(parentComponent, getPrefix(messageType) + message, title, messageType) @@ -672,7 +671,7 @@ public class JvOptionPane extends JOptionPane implements DialogRunnerI, Object[] selectionValues, Object initialSelectionValue) { // test only - + return isInteractiveMode() ? JOptionPane.showInternalInputDialog(parentComponent, message, title, messageType, icon, selectionValues, @@ -680,10 +679,8 @@ public class JvOptionPane extends JOptionPane implements DialogRunnerI, : getMockResponse().toString(); } - ///////////// end of options /////////////// - - + private static void outputMessage(Object message) { System.out.println(">>> JOption Message : " + message.toString()); @@ -717,8 +714,8 @@ public class JvOptionPane extends JOptionPane implements DialogRunnerI, private static String getPrefix(int messageType) { - String prefix = ""; - + String prefix = ""; + // JavaScript only if (Platform.isJS()) { @@ -756,9 +753,8 @@ public class JvOptionPane extends JOptionPane implements DialogRunnerI, return new JvOptionPane(parentComponent); } - public void showDialog( - String message, String title, int optionType, int messageType, - Icon icon, Object[] options, Object initialValue) + public void showDialog(String message, String title, int optionType, + int messageType, Icon icon, Object[] options, Object initialValue) { if (!isInteractiveMode()) @@ -779,12 +775,12 @@ public class JvOptionPane extends JOptionPane implements DialogRunnerI, // // 2) UserDefinedColors warning about saving over a name already defined // - + ourOptions = Arrays.asList(options); - - int response = JOptionPane.showOptionDialog(parentComponent, message, title, - optionType, messageType, icon, options, initialValue); - + + int response = JOptionPane.showOptionDialog(parentComponent, message, + title, optionType, messageType, icon, options, initialValue); + /* * In Java, the response is returned to this thread and handled here; * (for Javascript, see propertyChange) @@ -808,19 +804,19 @@ public class JvOptionPane extends JOptionPane implements DialogRunnerI, { handleResponse(getMockResponse()); } - + ourOptions = Arrays.asList(options); int response; - if (parentComponent != this) + if (parentComponent != this) { - response = JOptionPane.showInternalOptionDialog(parentComponent, mainPanel, - title, yesNoCancelOption, questionMessage, icon, options, - initresponse); + response = JOptionPane.showInternalOptionDialog(parentComponent, + mainPanel, title, yesNoCancelOption, questionMessage, icon, + options, initresponse); } else { - response = JOptionPane.showOptionDialog(parentComponent, mainPanel, title, - yesNoCancelOption, questionMessage, icon, options, + response = JOptionPane.showOptionDialog(parentComponent, mainPanel, + title, yesNoCancelOption, questionMessage, icon, options, initresponse); } if (!Platform.isJS()) @@ -833,18 +829,18 @@ public class JvOptionPane extends JOptionPane implements DialogRunnerI, handleResponse(response); } } - + @Override public JvOptionPane setResponseHandler(Object response, Runnable action) { - callbacks.put(response, action); + callbacks.put(response, action); return this; } /** - * JalviewJS signals option selection by a property change event - * for the option e.g. "OK". This methods responds to that by - * running the response action that corresponds to that option. + * JalviewJS signals option selection by a property change event for the + * option e.g. "OK". This methods responds to that by running the response + * action that corresponds to that option. * * @param evt */ @@ -852,7 +848,7 @@ public class JvOptionPane extends JOptionPane implements DialogRunnerI, public void propertyChange(PropertyChangeEvent evt) { Object newValue = evt.getNewValue(); - int ourOption = ourOptions.indexOf(newValue); + int ourOption = ourOptions.indexOf(newValue); if (ourOption >= 0) { handleResponse(ourOption); @@ -868,8 +864,8 @@ public class JvOptionPane extends JOptionPane implements DialogRunnerI, public void handleResponse(Object response) { /* - * this test is for NaN in Chrome - */ + * this test is for NaN in Chrome + */ if (response != null && !response.equals(response)) { return; diff --git a/src/jalview/gui/JvSwingUtils.java b/src/jalview/gui/JvSwingUtils.java index 2f4a0fe..e7f992d 100644 --- a/src/jalview/gui/JvSwingUtils.java +++ b/src/jalview/gui/JvSwingUtils.java @@ -96,13 +96,13 @@ public final class JvSwingUtils } return (enclose ? "" : "") - // BH 2018 + // BH 2018 + "
" -// + "

" - + ttext - + "

" -// + "

" + // + "

" + + ttext + " " + // + "

" + ((enclose ? "" : "")); } @@ -346,6 +346,7 @@ public final class JvSwingUtils combo.setToolTipText(tooltips.get(j)); } } + @Override public void mouseExited(MouseEvent e) { diff --git a/src/jalview/gui/OOMWarning.java b/src/jalview/gui/OOMWarning.java index 9bdbf61..2bb01ee 100644 --- a/src/jalview/gui/OOMWarning.java +++ b/src/jalview/gui/OOMWarning.java @@ -55,8 +55,7 @@ public class OOMWarning implements Runnable desktop = instance; if (oomex != null) { - Console.error("Out of Memory when " + action, - oomex); + Console.error("Out of Memory when " + action, oomex); } javax.swing.SwingUtilities.invokeLater(this); System.gc(); diff --git a/src/jalview/gui/OptsAndParamsPage.java b/src/jalview/gui/OptsAndParamsPage.java index 53b0305..e0427cc 100644 --- a/src/jalview/gui/OptsAndParamsPage.java +++ b/src/jalview/gui/OptsAndParamsPage.java @@ -574,9 +574,8 @@ public class OptsAndParamsPage if (!adjusting) { float value = slider.getSliderValue(); - valueField.setText( - integ ? Integer.toString((int) value) - : Float.toString(value)); + valueField.setText(integ ? Integer.toString((int) value) + : Float.toString(value)); checkIfModified(); } } @@ -622,14 +621,15 @@ public class OptsAndParamsPage { } }); - valueField.addFocusListener(new FocusAdapter() { + valueField.addFocusListener(new FocusAdapter() + { @Override public void focusLost(FocusEvent e) { actionPerformed(null); } - + }); valueField.setPreferredSize(new Dimension(60, 25)); valueField.setText(parm.getValue()); @@ -701,8 +701,7 @@ public class OptsAndParamsPage { valueField.setText(valueField.getText().trim()); iVal = Integer.valueOf(valueField.getText()); - if (minValue != null - && minValue.intValue() > iVal) + if (minValue != null && minValue.intValue() > iVal) { iVal = minValue.intValue(); // TODO: provide visual indication that hard limit was reached for @@ -733,8 +732,7 @@ public class OptsAndParamsPage { valueField.setText(valueField.getText().trim()); fVal = Float.valueOf(valueField.getText()); - if (minValue != null - && minValue.floatValue() > fVal) + if (minValue != null && minValue.floatValue() > fVal) { fVal = minValue.floatValue(); // TODO: provide visual indication that hard limit was reached for @@ -742,8 +740,7 @@ public class OptsAndParamsPage // update value field to reflect any bound checking we performed. valueField.setText("" + fVal); } - if (maxValue != null - && maxValue.floatValue() < fVal) + if (maxValue != null && maxValue.floatValue() < fVal) { fVal = maxValue.floatValue(); // TODO: provide visual indication that hard limit was reached for diff --git a/src/jalview/gui/OverviewCanvas.java b/src/jalview/gui/OverviewCanvas.java index 8e67992..470fd64 100644 --- a/src/jalview/gui/OverviewCanvas.java +++ b/src/jalview/gui/OverviewCanvas.java @@ -182,7 +182,7 @@ public class OverviewCanvas extends JPanel @Override public void paintComponent(Graphics g) { - //super.paintComponent(g); + // super.paintComponent(g); if (restart) { @@ -207,9 +207,8 @@ public class OverviewCanvas extends JPanel { // if there is annotation, scale the alignment and annotation // separately - if (od.getGraphHeight() > 0 - && od.getSequencesHeight() > 0 // BH 2019 - ) + if (od.getGraphHeight() > 0 && od.getSequencesHeight() > 0 // BH 2019 + ) { BufferedImage topImage = lastMiniMe.getSubimage(0, 0, od.getWidth(), od.getSequencesHeight()); @@ -250,13 +249,12 @@ public class OverviewCanvas extends JPanel { g.drawImage(lastMiniMe, 0, 0, getWidth(), getHeight(), this); } - + // draw the box g.setColor(Color.red); od.drawBox(g); } - public void dispose() { dispose = true; diff --git a/src/jalview/gui/OverviewPanel.java b/src/jalview/gui/OverviewPanel.java index a5aaf7c..adde919 100755 --- a/src/jalview/gui/OverviewPanel.java +++ b/src/jalview/gui/OverviewPanel.java @@ -91,8 +91,8 @@ public class OverviewPanel extends JPanel if (showHidden) { od = new OverviewDimensionsShowHidden(av.getRanges(), - (av.isShowAnnotation() - && av.getAlignmentConservationAnnotation() != null)); + (av.isShowAnnotation() + && av.getAlignmentConservationAnnotation() != null)); } else { @@ -113,7 +113,7 @@ public class OverviewPanel extends JPanel // without this the overview window does not size to fit the overview canvas setPreferredSize(new Dimension(od.getWidth(), od.getHeight())); - + addComponentListener(new ComponentAdapter() { @Override @@ -195,37 +195,39 @@ public class OverviewPanel extends JPanel @Override public void mousePressed(MouseEvent evt) { - - if (Platform.isWinRightButton(evt)) { - showPopupMenu(evt); - return; - } - if (SwingUtilities.isRightMouseButton(evt)) { - return; + + if (Platform.isWinRightButton(evt)) + { + showPopupMenu(evt); + return; } - // don't do anything if the mouse press is in the overview's box - // (wait to see if it's a drag instead) - // otherwise update the viewport - if (!od.isPositionInBox(evt.getX(), evt.getY())) - { - draggingBox = false; + if (SwingUtilities.isRightMouseButton(evt)) + { + return; + } + // don't do anything if the mouse press is in the overview's box + // (wait to see if it's a drag instead) + // otherwise update the viewport + if (!od.isPositionInBox(evt.getX(), evt.getY())) + { + draggingBox = false; - // display drag cursor at mouse position - setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR)); + // display drag cursor at mouse position + setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR)); - od.updateViewportFromMouse(evt.getX(), evt.getY(), - av.getAlignment().getHiddenSequences(), - av.getAlignment().getHiddenColumns()); - getParent().setCursor( - Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); - } - else - { - draggingBox = true; - od.setDragPoint(evt.getX(), evt.getY(), - av.getAlignment().getHiddenSequences(), - av.getAlignment().getHiddenColumns()); - } + od.updateViewportFromMouse(evt.getX(), evt.getY(), + av.getAlignment().getHiddenSequences(), + av.getAlignment().getHiddenColumns()); + getParent().setCursor( + Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); + } + else + { + draggingBox = true; + od.setDragPoint(evt.getX(), evt.getY(), + av.getAlignment().getHiddenSequences(), + av.getAlignment().getHiddenColumns()); + } } @Override @@ -322,7 +324,7 @@ public class OverviewPanel extends JPanel od.setWidth(getWidth()); od.setHeight(getHeight() - progressPanel.getHeight()); } - + setPreferredSize(new Dimension(od.getWidth(), od.getHeight() + progressPanel.getHeight())); @@ -335,7 +337,6 @@ public class OverviewPanel extends JPanel thread.start(); repaint(); - } @Override @@ -406,8 +407,9 @@ public class OverviewPanel extends JPanel * close the parent frame (which also removes it from the * Desktop Windows menu) */ - ((JInternalFrame) SwingUtilities.getAncestorOfClass( - JInternalFrame.class, (this))).setClosed(true); + ((JInternalFrame) SwingUtilities + .getAncestorOfClass(JInternalFrame.class, (this))) + .setClosed(true); } catch (PropertyVetoException e) { // ignore diff --git a/src/jalview/gui/PCAPanel.java b/src/jalview/gui/PCAPanel.java index c0c347a..e6b6b83 100644 --- a/src/jalview/gui/PCAPanel.java +++ b/src/jalview/gui/PCAPanel.java @@ -122,8 +122,8 @@ public class PCAPanel extends GPCAPanel ScoreModelI scoreModel = ScoreModels.getInstance() .getScoreModel(modelName, ap); - setPcaModel(new PCAModel(seqstrings, seqs, nucleotide, scoreModel, - params)); + setPcaModel( + new PCAModel(seqstrings, seqs, nucleotide, scoreModel, params)); PaintRefresher.Register(this, av.getSequenceSetId()); setRotatableCanvas(new RotatableCanvas(alignPanel)); @@ -426,9 +426,9 @@ public class PCAPanel extends GPCAPanel @Override public void exportImage(Graphics g) throws Exception { - RotatableCanvas canvas = getRotatableCanvas(); - canvas.drawBackground(g); - canvas.drawScene(g); + RotatableCanvas canvas = getRotatableCanvas(); + canvas.drawBackground(g); + canvas.drawScene(g); if (canvas.drawAxes) { canvas.drawAxes(g); @@ -621,7 +621,8 @@ public class PCAPanel extends GPCAPanel final IProgressIndicatorHandler handler) { progressBar.registerHandler(id, handler); - // if (progressBarHandlers == null || !progressBars.contains(Long.valueOf(id))) + // if (progressBarHandlers == null || + // !progressBars.contains(Long.valueOf(id))) // { // throw new // Error(MessageManager.getString("error.call_setprogressbar_before_registering_handler")); diff --git a/src/jalview/gui/PairwiseAlignPanel.java b/src/jalview/gui/PairwiseAlignPanel.java index d081794..c4b5367 100755 --- a/src/jalview/gui/PairwiseAlignPanel.java +++ b/src/jalview/gui/PairwiseAlignPanel.java @@ -65,14 +65,14 @@ public class PairwiseAlignPanel extends GPairwiseAlignPanel && selectionGroup.getSize() > 0; AlignmentView view = viewport.getAlignmentView(isSelection); // String[] seqStrings = viewport.getViewAsString(true); - String[] seqStrings = view.getSequenceStrings(viewport - .getGapCharacter()); + String[] seqStrings = view + .getSequenceStrings(viewport.getGapCharacter()); SequenceI[] seqs; if (isSelection) { - seqs = (SequenceI[]) view.getAlignmentAndHiddenColumns(viewport - .getGapCharacter())[0]; + seqs = (SequenceI[]) view + .getAlignmentAndHiddenColumns(viewport.getGapCharacter())[0]; } else { @@ -109,8 +109,7 @@ public class PairwiseAlignPanel extends GPairwiseAlignPanel } first = false; as.printAlignment(System.out); - scores[i][j] = as.getMaxScore() - / as.getASeq1().length; + scores[i][j] = as.getMaxScore() / as.getASeq1().length; totscore = totscore + scores[i][j]; textarea.append(as.getOutput()); @@ -140,8 +139,8 @@ public class PairwiseAlignPanel extends GPairwiseAlignPanel for (int i = 0; i < seqs.length; i++) { - System.out.println(String.format("%3d %s", i + 1, - seqs[i].getDisplayId(true))); + System.out.println( + String.format("%3d %s", i + 1, seqs[i].getDisplayId(true))); } /* diff --git a/src/jalview/gui/PopupMenu.java b/src/jalview/gui/PopupMenu.java index 1c3ab8f..fcd8171 100644 --- a/src/jalview/gui/PopupMenu.java +++ b/src/jalview/gui/PopupMenu.java @@ -359,14 +359,15 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener } /** - * Constructor for a PopupMenu for a click in the alignment panel (on a residue) + * Constructor for a PopupMenu for a click in the alignment panel (on a + * residue) * * @param ap - * the panel in which the mouse is clicked + * the panel in which the mouse is clicked * @param seq - * the sequence under the mouse + * the sequence under the mouse * @throws NullPointerException - * if seq is null + * if seq is null */ public PopupMenu(final AlignmentPanel ap, SequenceI seq, int column) { @@ -377,13 +378,13 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener * Constructor for a PopupMenu for a click in the sequence id panel * * @param alignPanel - * the panel in which the mouse is clicked + * the panel in which the mouse is clicked * @param seq - * the sequence under the mouse click + * the sequence under the mouse click * @param groupLinks - * templates for sequence external links + * templates for sequence external links * @throws NullPointerException - * if seq is null + * if seq is null */ public PopupMenu(final AlignmentPanel alignPanel, final SequenceI seq, List groupLinks) @@ -399,11 +400,10 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener * @param alignPanel * @param seq * @param column - * aligned column position (0...) + * aligned column position (0...) * @param groupLinks */ - private PopupMenu(boolean fromIdPanel, - final AlignmentPanel alignPanel, + private PopupMenu(boolean fromIdPanel, final AlignmentPanel alignPanel, final SequenceI seq, final int column, List groupLinks) { Objects.requireNonNull(seq); @@ -443,9 +443,10 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener /* * And repeat for the current selection group (if there is one): */ - final List selectedGroup = (alignPanel.av.getSelectionGroup() == null - ? Collections. emptyList() - : alignPanel.av.getSelectionGroup().getSequences()); + final List selectedGroup = (alignPanel.av + .getSelectionGroup() == null + ? Collections. emptyList() + : alignPanel.av.getSelectionGroup().getSequences()); buildAnnotationTypesMenus(groupShowAnnotationsMenu, groupHideAnnotationsMenu, selectedGroup); configureReferenceAnnotationsMenu(groupAddReferenceAnnotations, @@ -671,7 +672,8 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener buildGroupURLMenu(sg, groupLinks); } // Add a 'show all structures' for the current selection - Hashtable pdbe = new Hashtable<>(), reppdb = new Hashtable<>(); + Hashtable pdbe = new Hashtable<>(), + reppdb = new Hashtable<>(); SequenceI sqass = null; for (SequenceI sq : alignPanel.av.getSequenceSelection()) @@ -708,7 +710,8 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener { createGroupMenuItem.setVisible(true); unGroupMenuItem.setVisible(false); - editGroupMenu.setText(MessageManager.getString("action.edit_new_group")); + editGroupMenu + .setText(MessageManager.getString("action.edit_new_group")); } else { @@ -735,8 +738,8 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener *
  • positional feature links (alignment panel popup menu)
  • *
  • feature details links (alignment panel popup menu)
  • * - * If this panel is also showed complementary (CDS/protein) features, then links - * to their feature details are also added. + * If this panel is also showed complementary (CDS/protein) features, then + * links to their feature details are also added. * * @param seq * @param column @@ -1144,8 +1147,8 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener if (((String[]) sarray[1])[sq] == null) { - if (!e.hasMap() || (e.getMap() - .locateMappedRange(start, end) != null)) + if (!e.hasMap() + || (e.getMap().locateMappedRange(start, end) != null)) { ((String[]) sarray[1])[sq] = e.getAccessionId(); ((int[]) sarray[0])[0]++; @@ -1784,7 +1787,8 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener } inserts.and(sq.getInsertionsAsBits()); } - hidden.clearAndHideColumns(inserts, ap.av.getSelectionGroup().getStartRes(), + hidden.clearAndHideColumns(inserts, + ap.av.getSelectionGroup().getStartRes(), ap.av.getSelectionGroup().getEndRes()); } @@ -2014,8 +2018,8 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener /** * Shows a dialog where the sequence name and description may be edited. If a - * name containing spaces is entered, these are converted to underscores, with a - * warning message. + * name containing spaces is entered, these are converted to underscores, with + * a warning message. */ void sequenceName_actionPerformed() { @@ -2023,10 +2027,8 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener sequence.getDescription(), MessageManager.getString("label.sequence_name"), MessageManager.getString("label.sequence_description")); - dialog.showDialog(ap.alignFrame, - MessageManager.getString( - "label.edit_sequence_name_description"), - new Runnable() + dialog.showDialog(ap.alignFrame, MessageManager.getString( + "label.edit_sequence_name_description"), new Runnable() { @Override public void run() @@ -2078,8 +2080,7 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener */ protected void outline_actionPerformed() { - String title = MessageManager - .getString("label.select_outline_colour"); + String title = MessageManager.getString("label.select_outline_colour"); ColourChooserListener listener = new ColourChooserListener() { @Override @@ -2089,8 +2090,8 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener refresh(); } }; - JalviewColourChooser.showColourChooser(Desktop.getDesktop(), - title, Color.BLUE, listener); + JalviewColourChooser.showColourChooser(Desktop.getDesktop(), title, + Color.BLUE, listener); } /** diff --git a/src/jalview/gui/ProgressPanel.java b/src/jalview/gui/ProgressPanel.java index 170e9eb..0230805 100644 --- a/src/jalview/gui/ProgressPanel.java +++ b/src/jalview/gui/ProgressPanel.java @@ -100,7 +100,7 @@ public class ProgressPanel extends JPanel implements RendererListenerI // changing visibility labelPanel.setLayout(labelLayout); barPanel.setLayout(barLayout); - + labelPanel.add(progressLabel, VISIBLE); labelPanel.add(new JPanel(), INVISIBLE); barPanel.add(progressBar, VISIBLE); diff --git a/src/jalview/gui/PromptUserConfig.java b/src/jalview/gui/PromptUserConfig.java index 31db21d..6dbbbb0 100644 --- a/src/jalview/gui/PromptUserConfig.java +++ b/src/jalview/gui/PromptUserConfig.java @@ -232,8 +232,8 @@ public class PromptUserConfig implements Runnable // verify the property is set for debugging if (Console.isDebugEnabled()) { - Console.debug("User set property to " - + Cache.getProperty(property)); + Console.debug( + "User set property to " + Cache.getProperty(property)); } } catch (Exception e) { diff --git a/src/jalview/gui/PymolBindingModel.java b/src/jalview/gui/PymolBindingModel.java index 42a537b..6ca663a 100644 --- a/src/jalview/gui/PymolBindingModel.java +++ b/src/jalview/gui/PymolBindingModel.java @@ -77,8 +77,7 @@ public class PymolBindingModel extends AAStructureBindingModel { // todo promote to StructureCommandsI.showLabel() String modelId = getModelIdForFile(atom.getPdbFile()); - sb.append(String.format(" %s//%s/%d/*", modelId, - atom.getChain(), + sb.append(String.format(" %s//%s/%d/*", modelId, atom.getChain(), atom.getPdbResNum())); } String labelSpec = sb.toString(); @@ -121,7 +120,7 @@ public class PymolBindingModel extends AAStructureBindingModel @Override public boolean isViewerRunning() { - return pymolManager !=null && pymolManager.isPymolLaunched(); + return pymolManager != null && pymolManager.isPymolLaunched(); } @Override @@ -161,20 +160,21 @@ public class PymolBindingModel extends AAStructureBindingModel * a second parameter sets the pdbid as the loaded PyMOL object name */ String pdbId = pe.getId(); - try { - String safePDBId = java.net.URLEncoder.encode(pdbId,"UTF-8"); + try + { + String safePDBId = java.net.URLEncoder.encode(pdbId, "UTF-8"); pdbId = safePDBId.replace('%', '_'); pdbId = pdbId.replace("-", "__"); char fc = pdbId.charAt(0); // put an 's' before any numerics - if (fc>='0' && fc<='9') + if (fc >= '0' && fc <= '9') { - pdbId = 's'+pdbId; + pdbId = 's' + pdbId; } -// pdbId.replace('-', 0) + // pdbId.replace('-', 0) } catch (Exception x) { - Console.error("Unxpected encoding exception for '"+pdbId+"'",x); + Console.error("Unxpected encoding exception for '" + pdbId + "'", x); } cmd.addParameter(pdbId); diff --git a/src/jalview/gui/PymolViewer.java b/src/jalview/gui/PymolViewer.java index 2fd4957..665b137 100644 --- a/src/jalview/gui/PymolViewer.java +++ b/src/jalview/gui/PymolViewer.java @@ -50,9 +50,7 @@ public class PymolViewer extends StructureViewerBase AlignmentPanel ap) { this(); - openNewPymol(ap, new PDBEntry[] { pdb }, - new SequenceI[][] - { seqs }); + openNewPymol(ap, new PDBEntry[] { pdb }, new SequenceI[][] { seqs }); } public PymolViewer(PDBEntry[] pe, boolean alignAdded, SequenceI[][] seqs, @@ -161,11 +159,12 @@ public class PymolViewer extends StructureViewerBase public void run() { // todo pull up much of this - + StringBuilder errormsgs = new StringBuilder(128); List filePDB = new ArrayList<>(); List filePDBpos = new ArrayList<>(); - String[] curfiles = binding.getStructureFiles(); // files currently in viewer + String[] curfiles = binding.getStructureFiles(); // files currently in + // viewer for (int pi = 0; pi < binding.getPdbCount(); pi++) { String file = null; @@ -186,8 +185,7 @@ public class PymolViewer extends StructureViewerBase /* * got file already */ - file = new File(thePdbEntry.getFile()).getAbsoluteFile() - .getPath(); + file = new File(thePdbEntry.getFile()).getAbsoluteFile().getPath(); // todo - skip if already loaded in PyMOL } if (file != null) @@ -196,7 +194,7 @@ public class PymolViewer extends StructureViewerBase filePDBpos.add(Integer.valueOf(pi)); } } - + if (!filePDB.isEmpty()) { /* @@ -254,14 +252,12 @@ public class PymolViewer extends StructureViewerBase StructureFile pdb = binding.getSsm().setMapping( binding.getSequence()[pos], binding.getChains()[pos], - pe.getFile(), protocol, - getProgressIndicator()); + pe.getFile(), protocol, getProgressIndicator()); binding.stashFoundChains(pdb, pe.getFile()); } catch (Exception ex) { - Console.error( - "Couldn't open " + pe.getFile() + " in "+getViewerName()+"!", - ex); + Console.error("Couldn't open " + pe.getFile() + " in " + + getViewerName() + "!", ex); } finally { // Cache.debug("File locations are " + files); @@ -334,8 +330,7 @@ public class PymolViewer extends StructureViewerBase boolean opened = binding.openSession(pymolSessionFile); if (!opened) { - Console.error( - "An error occurred opening PyMOL session file " + Console.error("An error occurred opening PyMOL session file " + pymolSessionFile); } } @@ -359,7 +354,9 @@ public class PymolViewer extends StructureViewerBase { return "PyMOL"; } + JMenuItem writeFeatures = null; + @Override protected void initMenus() { @@ -370,8 +367,8 @@ public class PymolViewer extends StructureViewerBase writeFeatures = new JMenuItem( MessageManager.getString("label.create_viewer_attributes")); - writeFeatures.setToolTipText(MessageManager - .getString("label.create_viewer_attributes_tip")); + writeFeatures.setToolTipText( + MessageManager.getString("label.create_viewer_attributes_tip")); writeFeatures.addActionListener(new ActionListener() { @Override @@ -382,7 +379,7 @@ public class PymolViewer extends StructureViewerBase }); viewerActionMenu.add(writeFeatures); } - + @Override protected void buildActionMenu() { @@ -393,8 +390,8 @@ public class PymolViewer extends StructureViewerBase protected void sendFeaturesToPymol() { int count = binding.sendFeaturesToViewer(getAlignmentPanel()); - statusBar.setText( - MessageManager.formatMessage("label.attributes_set", count, getViewerName())); + statusBar.setText(MessageManager.formatMessage("label.attributes_set", + count, getViewerName())); } } diff --git a/src/jalview/gui/RotatableCanvas.java b/src/jalview/gui/RotatableCanvas.java index d7cb78a..d695ebb 100755 --- a/src/jalview/gui/RotatableCanvas.java +++ b/src/jalview/gui/RotatableCanvas.java @@ -57,9 +57,9 @@ import javax.swing.ToolTipManager; * Models a Panel on which a set of points, and optionally x/y/z axes, can be * drawn, and rotated or zoomed with the mouse */ -public class RotatableCanvas extends JPanel implements MouseListener, - MouseMotionListener, KeyListener, RotatableCanvasI, - MouseWheelListener +public class RotatableCanvas extends JPanel + implements MouseListener, MouseMotionListener, KeyListener, + RotatableCanvasI, MouseWheelListener { private static final float ZOOM_OUT = 0.9f; @@ -198,15 +198,15 @@ public class RotatableCanvas extends JPanel implements MouseListener, { float[] max = new float[DIMS]; float[] min = new float[DIMS]; - + max[0] = -Float.MAX_VALUE; max[1] = -Float.MAX_VALUE; max[2] = -Float.MAX_VALUE; - + min[0] = Float.MAX_VALUE; min[1] = Float.MAX_VALUE; min[2] = Float.MAX_VALUE; - + for (SequencePoint sp : sequencePoints) { max[0] = Math.max(max[0], sp.coord.x); @@ -216,7 +216,7 @@ public class RotatableCanvas extends JPanel implements MouseListener, min[1] = Math.min(min[1], sp.coord.y); min[2] = Math.min(min[2], sp.coord.z); } - + seqMin = min; seqMax = max; } @@ -699,7 +699,7 @@ public class RotatableCanvas extends JPanel implements MouseListener, // Now translate back again sp.translate(centre[0], centre[1], centre[2]); - + zMin = Math.min(zMin, sp.coord.z); zMax = Math.max(zMax, sp.coord.z); } @@ -758,8 +758,7 @@ public class RotatableCanvas extends JPanel implements MouseListener, if (av != null) { SequenceI sequence = sp.getSequence(); - if (!av.getSelectionGroup().getSequences(null) - .contains(sequence)) + if (!av.getSelectionGroup().getSequences(null).contains(sequence)) { av.getSelectionGroup().addSequence(sequence, true); } @@ -794,10 +793,8 @@ public class RotatableCanvas extends JPanel implements MouseListener, for (int i = 0; i < npoint; i++) { SequencePoint sp = sequencePoints.get(i); - int px = (int) ((sp.coord.x - centre[0]) * scaleBy) - + halfwidth; - int py = (int) ((sp.coord.y - centre[1]) * scaleBy) - + halfheight; + int px = (int) ((sp.coord.x - centre[0]) * scaleBy) + halfwidth; + int py = (int) ((sp.coord.y - centre[1]) * scaleBy) + halfheight; if ((Math.abs(px - x) < NEARBY) && (Math.abs(py - y) < NEARBY)) { diff --git a/src/jalview/gui/ScalePanel.java b/src/jalview/gui/ScalePanel.java index a6b4b49..ca3faf8 100755 --- a/src/jalview/gui/ScalePanel.java +++ b/src/jalview/gui/ScalePanel.java @@ -187,7 +187,8 @@ public class ScalePanel extends JPanel }); pop.add(item); - if (av.getAlignment().getHiddenColumns().hasMultiHiddenColumnRegions()) + if (av.getAlignment().getHiddenColumns() + .hasMultiHiddenColumnRegions()) { item = new JMenuItem(MessageManager.getString("action.reveal_all")); item.addActionListener(new ActionListener() @@ -287,8 +288,7 @@ public class ScalePanel extends JPanel // todo res calculation should be a method on AlignViewport int xCords = Math.max(0, evt.getX()); // prevent negative X coordinates ViewportRanges ranges = av.getRanges(); - int res = (xCords / av.getCharWidth()) - + ranges.getStartRes(); + int res = (xCords / av.getCharWidth()) + ranges.getStartRes(); res = Math.min(res, ranges.getEndRes()); if (av.hasHiddenColumns()) { @@ -435,7 +435,7 @@ public class ScalePanel extends JPanel @Override public void paintComponent(Graphics g) { - //super.paintComponent(g); // BH 2019 + // super.paintComponent(g); // BH 2019 /* * shouldn't get called in wrapped mode as the scale above is @@ -523,10 +523,11 @@ public class ScalePanel extends JPanel gg.fillPolygon( new int[] - { -1 + res * avCharWidth - avCharHeight / 4, - -1 + res * avCharWidth + avCharHeight / 4, - -1 + res * avCharWidth }, new int[] - { y, y, y + 2 * yOf }, 3); + { -1 + res * avCharWidth - avCharHeight / 4, + -1 + res * avCharWidth + avCharHeight / 4, + -1 + res * avCharWidth }, + new int[] + { y, y, y + 2 * yOf }, 3); } } } @@ -577,10 +578,11 @@ public class ScalePanel extends JPanel || evt.getPropertyName().equals(ViewportRanges.MOVE_VIEWPORT)) { // scroll event, repaint panel - - // Call repaint on alignment panel so that repaints from other alignment - // panel components can be aggregated. Otherwise performance of the overview - // window and others may be adversely affected. + + // Call repaint on alignment panel so that repaints from other alignment + // panel components can be aggregated. Otherwise performance of the + // overview + // window and others may be adversely affected. av.getAlignPanel().repaint(); } } diff --git a/src/jalview/gui/SeqCanvas.java b/src/jalview/gui/SeqCanvas.java index a9b9d4d..ac7cf10 100755 --- a/src/jalview/gui/SeqCanvas.java +++ b/src/jalview/gui/SeqCanvas.java @@ -57,7 +57,8 @@ import javax.swing.JPanel; public class SeqCanvas extends JPanel implements ViewportListenerI { /** - * vertical gap in pixels between sequences and annotations when in wrapped mode + * vertical gap in pixels between sequences and annotations when in wrapped + * mode */ static final int SEQS_ANNOTATION_GAP = 3; @@ -95,7 +96,7 @@ public class SeqCanvas extends JPanel implements ViewportListenerI private int wrappedVisibleWidths; // number of wrapped widths displayed // Don't do this! Graphics handles are supposed to be transient - //private Graphics2D gg; + // private Graphics2D gg; /** * Creates a new SeqCanvas object. @@ -116,7 +117,7 @@ public class SeqCanvas extends JPanel implements ViewportListenerI public SequenceRenderer getSequenceRenderer() { - return seqRdr; + return seqRdr; } public FeatureRenderer getFeatureRenderer() @@ -202,7 +203,7 @@ public class SeqCanvas extends JPanel implements ViewportListenerI int yPos = ypos + charHeight; int startX = startx; int endX = endx; - + if (av.hasHiddenColumns()) { HiddenColumns hiddenColumns = av.getAlignment().getHiddenColumns(); @@ -238,7 +239,6 @@ public class SeqCanvas extends JPanel implements ViewportListenerI } } - /* * white fill the space for the scale */ @@ -343,7 +343,6 @@ public class SeqCanvas extends JPanel implements ViewportListenerI } } - // System.err.println(">>> FastPaint to " + transX + " " + transY + " " // + horizontal + " " + vertical + " " + startRes + " " + endRes // + " " + startSeq + " " + endSeq); @@ -474,7 +473,7 @@ public class SeqCanvas extends JPanel implements ViewportListenerI drawCursor(g, startRes, endRes, startSeq, endSeq); } } - + /** * Draw an alignment panel for printing * @@ -494,8 +493,7 @@ public class SeqCanvas extends JPanel implements ViewportListenerI { drawPanel(g1, startRes, endRes, startSeq, endSeq, 0); - drawSelectionGroup((Graphics2D) g1, startRes, endRes, - startSeq, endSeq); + drawSelectionGroup((Graphics2D) g1, startRes, endRes, startSeq, endSeq); } /** @@ -519,7 +517,7 @@ public class SeqCanvas extends JPanel implements ViewportListenerI if (group != null) { drawWrappedSelection((Graphics2D) g, group, canvasWidth, canvasHeight, - startRes); + startRes); } } @@ -539,7 +537,7 @@ public class SeqCanvas extends JPanel implements ViewportListenerI FontMetrics fm = getFontMetrics(av.getFont()); int labelWidth = 0; - + if (av.getScaleRightWrapped() || av.getScaleLeftWrapped()) { labelWidth = getLabelWidth(fm); @@ -623,8 +621,8 @@ public class SeqCanvas extends JPanel implements ViewportListenerI int currentWidth = 0; while ((currentWidth < wrappedVisibleWidths) && (start < maxWidth)) { - int endColumn = Math - .min(maxWidth, start + wrappedWidthInResidues - 1); + int endColumn = Math.min(maxWidth, + start + wrappedWidthInResidues - 1); drawWrappedWidth(g, ypos, start, endColumn, canvasHeight); ypos += wrappedRepeatHeightPx; start += wrappedWidthInResidues; @@ -664,8 +662,7 @@ public class SeqCanvas extends JPanel implements ViewportListenerI * - start with space above plus sequences */ wrappedRepeatHeightPx = wrappedSpaceAboveAlignment; - wrappedRepeatHeightPx += av.getAlignment().getHeight() - * charHeight; + wrappedRepeatHeightPx += av.getAlignment().getHeight() * charHeight; /* * add annotations panel height if shown @@ -736,7 +733,7 @@ public class SeqCanvas extends JPanel implements ViewportListenerI int charWidth = av.getCharWidth(); int xOffset = labelWidthWest + ((startColumn - ranges.getStartRes()) % viewportWidth) - * charWidth; + * charWidth; g.translate(xOffset, 0); @@ -803,7 +800,7 @@ public class SeqCanvas extends JPanel implements ViewportListenerI if (av.getScaleRightWrapped()) { int x = labelWidthWest + viewportWidth * charWidth; - + g.translate(x, 0); drawVerticalScale(g, startCol, endColumn, ypos, false); g.translate(-x, 0); @@ -815,8 +812,9 @@ public class SeqCanvas extends JPanel implements ViewportListenerI */ g.translate(labelWidthWest, 0); g.setColor(Color.white); - g.fillRect(0, ypos - wrappedSpaceAboveAlignment, viewportWidth - * charWidth + labelWidthWest, wrappedSpaceAboveAlignment); + g.fillRect(0, ypos - wrappedSpaceAboveAlignment, + viewportWidth * charWidth + labelWidthWest, + wrappedSpaceAboveAlignment); g.setColor(Color.black); g.translate(-labelWidthWest, 0); @@ -887,8 +885,7 @@ public class SeqCanvas extends JPanel implements ViewportListenerI * Draw a selection group over a wrapped alignment */ private void drawWrappedSelection(Graphics2D g, SequenceGroup group, - int canvasWidth, - int canvasHeight, int startRes) + int canvasWidth, int canvasHeight, int startRes) { // chop the wrapped alignment extent up into panel-sized blocks and treat // each block as if it were a block from an unwrapped alignment @@ -916,8 +913,7 @@ public class SeqCanvas extends JPanel implements ViewportListenerI g.translate(labelWidthWest, 0); drawUnwrappedSelection(g, group, startx, endx, 0, - av.getAlignment().getHeight() - 1, - ypos); + av.getAlignment().getHeight() - 1, ypos); g.translate(-labelWidthWest, 0); ypos += wrappedRepeatHeightPx; @@ -928,8 +924,8 @@ public class SeqCanvas extends JPanel implements ViewportListenerI } /** - * Answers zero if annotations are not shown, otherwise recalculates and answers - * the total height of all annotation rows in pixels + * Answers zero if annotations are not shown, otherwise recalculates and + * answers the total height of all annotation rows in pixels * * @return */ @@ -1190,8 +1186,7 @@ public class SeqCanvas extends JPanel implements ViewportListenerI * the cursor drawn on it, if any */ private void drawCursor(Graphics g, int startRes, int endRes, - int startSeq, - int endSeq) + int startSeq, int endSeq) { // convert the cursorY into a position on the visible alignment int cursor_ypos = cursorY; @@ -1262,7 +1257,6 @@ public class SeqCanvas extends JPanel implements ViewportListenerI } } - /** * Draw a selection group over an unwrapped alignment * @@ -1285,7 +1279,7 @@ public class SeqCanvas extends JPanel implements ViewportListenerI int startRes, int endRes, int startSeq, int endSeq, int offset) { int charWidth = av.getCharWidth(); - + if (!av.hasHiddenColumns()) { drawPartialGroupOutline(g, group, startRes, endRes, startSeq, endSeq, @@ -1308,8 +1302,8 @@ public class SeqCanvas extends JPanel implements ViewportListenerI blockStart = region[0]; g.translate(screenY * charWidth, 0); - drawPartialGroupOutline(g, group, - blockStart, blockEnd, startSeq, endSeq, offset); + drawPartialGroupOutline(g, group, blockStart, blockEnd, startSeq, + endSeq, offset); g.translate(-screenY * charWidth, 0); screenY += blockEnd - blockStart + 1; @@ -1478,7 +1472,7 @@ public class SeqCanvas extends JPanel implements ViewportListenerI g.drawLine(sx + xwidth, oldY, sx + xwidth, sy); } } - + /** * Highlights search results in the visible region by rendering as white text * on a black background. Any previous highlighting is removed. Answers true @@ -1494,7 +1488,7 @@ public class SeqCanvas extends JPanel implements ViewportListenerI return highlightSearchResults(results, false); } - + /** * Highlights search results in the visible region by rendering as white text * on a black background. Any previous highlighting is removed. Answers true @@ -1652,7 +1646,8 @@ public class SeqCanvas extends JPanel implements ViewportListenerI { firstCol = alignment.getHiddenColumns() .absoluteToVisibleColumn(firstCol); - lastCol = alignment.getHiddenColumns().absoluteToVisibleColumn(lastCol); + lastCol = alignment.getHiddenColumns() + .absoluteToVisibleColumn(lastCol); } int transX = (firstCol - ranges.getStartRes()) * av.getCharWidth(); int transY = (firstSeq - ranges.getStartSeq()) * av.getCharHeight(); @@ -1792,9 +1787,9 @@ public class SeqCanvas extends JPanel implements ViewportListenerI try { - + Graphics gg = img.getGraphics(); - + calculateWrappedGeometry(getWidth(), getHeight()); /* @@ -1810,8 +1805,8 @@ public class SeqCanvas extends JPanel implements ViewportListenerI if (scrollX < 0) { int startRes = ranges.getStartRes(); - drawWrappedWidth(gg, wrappedSpaceAboveAlignment, startRes, startRes - - scrollX - 1, getHeight()); + drawWrappedWidth(gg, wrappedSpaceAboveAlignment, startRes, + startRes - scrollX - 1, getHeight()); } else { @@ -1824,7 +1819,7 @@ public class SeqCanvas extends JPanel implements ViewportListenerI drawWrappedDecorators(gg, ranges.getStartRes()); gg.dispose(); - + repaint(); } finally { @@ -1849,7 +1844,7 @@ public class SeqCanvas extends JPanel implements ViewportListenerI } Graphics gg = img.getGraphics(); - + ViewportRanges ranges = av.getRanges(); int viewportWidth = ranges.getViewportWidth(); int charWidth = av.getCharWidth(); @@ -1860,7 +1855,8 @@ public class SeqCanvas extends JPanel implements ViewportListenerI */ int visibleWidths = wrappedVisibleWidths; int canvasHeight = getHeight(); - boolean lastWidthPartHeight = (wrappedVisibleWidths * wrappedRepeatHeightPx) > canvasHeight; + boolean lastWidthPartHeight = (wrappedVisibleWidths + * wrappedRepeatHeightPx) > canvasHeight; if (lastWidthPartHeight) { @@ -1876,16 +1872,15 @@ public class SeqCanvas extends JPanel implements ViewportListenerI /* * white fill first to erase annotations */ - - + gg.translate(xOffset, 0); gg.setColor(Color.white); - gg.fillRect(labelWidthWest, ypos, - (endRes - startRes + 1) * charWidth, wrappedRepeatHeightPx); + gg.fillRect(labelWidthWest, ypos, (endRes - startRes + 1) * charWidth, + wrappedRepeatHeightPx); gg.translate(-xOffset, 0); drawWrappedWidth(gg, ypos, startRes, endRes, canvasHeight); - + } /* @@ -1930,7 +1925,7 @@ public class SeqCanvas extends JPanel implements ViewportListenerI gg.fillRect(0, canvasHeight - heightBelow, getWidth(), heightBelow); } gg.dispose(); - } + } /** * Shifts the visible alignment by the specified number of columns - left if @@ -2018,8 +2013,8 @@ public class SeqCanvas extends JPanel implements ViewportListenerI if (y + wrappedRepeatHeightPx < canvasHeight - wrappedRepeatHeightPx && (xpos + viewportWidth <= xMax)) { - gg.copyArea(labelWidthWest, y + wrappedRepeatHeightPx, -positions - * charWidth, heightToCopy, widthToCopy, + gg.copyArea(labelWidthWest, y + wrappedRepeatHeightPx, + -positions * charWidth, heightToCopy, widthToCopy, -wrappedRepeatHeightPx); } y += wrappedRepeatHeightPx; @@ -2029,7 +2024,6 @@ public class SeqCanvas extends JPanel implements ViewportListenerI gg.dispose(); } - /** * Redraws any positions in the search results in the visible region of a * wrapped alignment. Any highlights are drawn depending on the search results @@ -2063,8 +2057,8 @@ public class SeqCanvas extends JPanel implements ViewportListenerI } int firstVisibleColumn = ranges.getStartRes(); - int lastVisibleColumn = ranges.getStartRes() + repeats - * ranges.getViewportWidth() - 1; + int lastVisibleColumn = ranges.getStartRes() + + repeats * ranges.getViewportWidth() - 1; AlignmentI alignment = av.getAlignment(); if (av.hasHiddenColumns()) @@ -2077,7 +2071,6 @@ public class SeqCanvas extends JPanel implements ViewportListenerI int gapHeight = charHeight * (av.getScaleAboveWrapped() ? 2 : 1); - Graphics gg = img.getGraphics(); for (int seqNo = ranges.getStartSeq(); seqNo <= ranges @@ -2121,8 +2114,8 @@ public class SeqCanvas extends JPanel implements ViewportListenerI * transX: offset from left edge of canvas to residue position */ int transX = labelWidthWest - + ((displayColumn - ranges.getStartRes()) % wrappedWidth) - * av.getCharWidth(); + + ((displayColumn - ranges.getStartRes()) + % wrappedWidth) * av.getCharWidth(); /* * transY: offset from top edge of canvas to residue position @@ -2149,7 +2142,7 @@ public class SeqCanvas extends JPanel implements ViewportListenerI } } } - + gg.dispose(); return matchFound; diff --git a/src/jalview/gui/SeqPanel.java b/src/jalview/gui/SeqPanel.java index 827c315..54e3db7 100644 --- a/src/jalview/gui/SeqPanel.java +++ b/src/jalview/gui/SeqPanel.java @@ -246,8 +246,7 @@ public class SeqPanel extends JPanel ToolTipManager.sharedInstance().registerComponent(this); ToolTipManager.sharedInstance().setInitialDelay(0); ToolTipManager.sharedInstance().setDismissDelay(10000); - - + this.av = viewport; setBackground(Color.white); @@ -342,6 +341,7 @@ public class SeqPanel extends JPanel return new MousePos(col, seqIndex, annIndex); } + /** * Returns the aligned sequence position (base 0) at the mouse position, or * the closest visible one @@ -483,8 +483,9 @@ public class SeqPanel extends JPanel void moveCursor(int dx, int dy) { - moveCursor(dx, dy,false); + moveCursor(dx, dy, false); } + void moveCursor(int dx, int dy, boolean nextWord) { HiddenColumns hidden = av.getAlignment().getHiddenColumns(); @@ -492,11 +493,13 @@ public class SeqPanel extends JPanel if (nextWord) { int maxWidth = av.getAlignment().getWidth(); - int maxHeight=av.getAlignment().getHeight(); - SequenceI seqAtRow = av.getAlignment().getSequenceAt(seqCanvas.cursorY); + int maxHeight = av.getAlignment().getHeight(); + SequenceI seqAtRow = av.getAlignment() + .getSequenceAt(seqCanvas.cursorY); // look for next gap or residue - boolean isGap = Comparison.isGap(seqAtRow.getCharAt(seqCanvas.cursorX)); - int p = seqCanvas.cursorX,lastP,r=seqCanvas.cursorY,lastR; + boolean isGap = Comparison + .isGap(seqAtRow.getCharAt(seqCanvas.cursorX)); + int p = seqCanvas.cursorX, lastP, r = seqCanvas.cursorY, lastR; do { lastP = p; @@ -517,19 +520,23 @@ public class SeqPanel extends JPanel p = nextVisible(hidden, maxWidth, p, dx); } while ((dx != 0 ? p != lastP : r != lastR) && isGap == Comparison.isGap(seqAtRow.getCharAt(p))); - seqCanvas.cursorX=p; - seqCanvas.cursorY=r; - } else { + seqCanvas.cursorX = p; + seqCanvas.cursorY = r; + } + else + { int maxWidth = av.getAlignment().getWidth(); - seqCanvas.cursorX = nextVisible(hidden, maxWidth, seqCanvas.cursorX, dx); + seqCanvas.cursorX = nextVisible(hidden, maxWidth, seqCanvas.cursorX, + dx); seqCanvas.cursorY += dy; } scrollToVisible(false); } - private int nextVisible(HiddenColumns hidden,int maxWidth, int original, int dx) + private int nextVisible(HiddenColumns hidden, int maxWidth, int original, + int dx) { - int newCursorX=original+dx; + int newCursorX = original + dx; if (av.hasHiddenColumns() && !hidden.isVisible(newCursorX)) { int visx = hidden.absoluteToVisibleColumn(newCursorX - dx); @@ -550,13 +557,13 @@ public class SeqPanel extends JPanel } } newCursorX = (newCursorX < 0) ? 0 : newCursorX; - if (newCursorX >= maxWidth - || !hidden.isVisible(newCursorX)) + if (newCursorX >= maxWidth || !hidden.isVisible(newCursorX)) { newCursorX = original; } return newCursorX; } + /** * Scroll to make the cursor visible in the viewport. * @@ -612,7 +619,7 @@ public class SeqPanel extends JPanel if (av.getAlignment().getHiddenColumns().isVisible(seqCanvas.cursorX)) { setStatusMessage(av.getAlignment().getSequenceAt(seqCanvas.cursorY), - seqCanvas.cursorX, seqCanvas.cursorY); + seqCanvas.cursorX, seqCanvas.cursorY); } if (repaintNeeded) @@ -621,7 +628,6 @@ public class SeqPanel extends JPanel } } - void setSelectionAreaAtCursor(boolean topLeft) { SequenceI sequence = av.getAlignment().getSequenceAt(seqCanvas.cursorY); @@ -960,8 +966,7 @@ public class SeqPanel extends JPanel SequenceI seq = match.getSequence(); SequenceI ds = seq.getDatasetSequence() == null ? seq : seq.getDatasetSequence(); - MappedFeatures mf = fr2 - .findComplementFeaturesAtResidue(ds, pos); + MappedFeatures mf = fr2.findComplementFeaturesAtResidue(ds, pos); if (mf != null) { for (SequenceFeature sf : mf.features) @@ -1104,9 +1109,8 @@ public class SeqPanel extends JPanel { List features = ap.getFeatureRenderer() .findFeaturesAtColumn(sequence, column + 1); - unshownFeatures = seqARep.appendFeatures(tooltipText, pos, - features, this.ap.getSeqPanel().seqCanvas.fr, - MAX_TOOLTIP_LENGTH); + unshownFeatures = seqARep.appendFeatures(tooltipText, pos, features, + this.ap.getSeqPanel().seqCanvas.fr, MAX_TOOLTIP_LENGTH); /* * add features in CDS/protein complement at the corresponding @@ -1124,8 +1128,8 @@ public class SeqPanel extends JPanel pos); if (mf != null) { - unshownFeatures += seqARep.appendFeatures(tooltipText, - pos, mf, fr2, MAX_TOOLTIP_LENGTH); + unshownFeatures += seqARep.appendFeatures(tooltipText, pos, mf, + fr2, MAX_TOOLTIP_LENGTH); } } } @@ -1153,8 +1157,7 @@ public class SeqPanel extends JPanel if (!textString.equals(lastTooltip)) { lastTooltip = textString; - lastFormattedTooltip = JvSwingUtils.wrapTooltip(true, - textString); + lastFormattedTooltip = JvSwingUtils.wrapTooltip(true, textString); setToolTipText(lastFormattedTooltip); } } @@ -1237,8 +1240,8 @@ public class SeqPanel extends JPanel tempTip.setTipText(lastFormattedTooltip); int tipWidth = (int) tempTip.getPreferredSize().getWidth(); - - // was x += (w - x < 200) ? -(w / 2) : 5; + + // was x += (w - x < 200) ? -(w / 2) : 5; x = (x + tipWidth < w ? x + 10 : w - tipWidth); Point p = new Point(x, y + av.getCharHeight()); // BH 2018 was - 20? @@ -1252,7 +1255,8 @@ public class SeqPanel extends JPanel * changed, so selective redraws can be applied (ie. only structures, only * overview, etc) */ - private boolean updateOverviewAndStructs = false; // TODO: refactor to avcontroller + private boolean updateOverviewAndStructs = false; // TODO: refactor to + // avcontroller /** * set if av.getSelectionGroup() refers to a group that is defined on the @@ -1314,8 +1318,7 @@ public class SeqPanel extends JPanel * Sequence number (if known), and sequence name. */ String seqno = seqIndex == -1 ? "" : " " + (seqIndex + 1); - text.append("Sequence").append(seqno).append(" ID: ") - .append(seqName); + text.append("Sequence").append(seqno).append(" ID: ").append(seqName); String residue = null; @@ -1574,12 +1577,12 @@ public class SeqPanel extends JPanel String label = null; if (groupEditing) { - message.append("Edit group:"); + message.append("Edit group:"); label = MessageManager.getString("action.edit_group"); } else { - message.append("Edit sequence: " + seq.getName()); + message.append("Edit sequence: " + seq.getName()); label = seq.getName(); if (label.length() > 10) { @@ -1771,8 +1774,7 @@ public class SeqPanel extends JPanel { for (int j = 0; j < startres - editLastRes; j++) { - if (!Comparison - .isGap(groupSeqs[g].getCharAt(fixedRight - j))) + if (!Comparison.isGap(groupSeqs[g].getCharAt(fixedRight - j))) { blank = false; break; @@ -2164,8 +2166,8 @@ public class SeqPanel extends JPanel * highlight the first feature at the position on the alignment */ SearchResultsI highlight = new SearchResults(); - highlight.addResult(sequence, features.get(0).getBegin(), features - .get(0).getEnd()); + highlight.addResult(sequence, features.get(0).getBegin(), + features.get(0).getEnd()); seqCanvas.highlightSearchResults(highlight, true); /* @@ -2429,7 +2431,7 @@ public class SeqPanel extends JPanel return; } - res = Math.min(res, av.getAlignment().getWidth()-1); + res = Math.min(res, av.getAlignment().getWidth() - 1); if (stretchGroup.getEndRes() == res) { diff --git a/src/jalview/gui/SequenceRenderer.java b/src/jalview/gui/SequenceRenderer.java index fb967ed..43fef15 100755 --- a/src/jalview/gui/SequenceRenderer.java +++ b/src/jalview/gui/SequenceRenderer.java @@ -100,9 +100,7 @@ public class SequenceRenderer implements jalview.api.SequenceRenderer { allGroups = av.getAlignment().findAllGroups(seq); return resColourFinder.getResidueColour(av.getShowBoxes(), - av.getResidueShading(), - allGroups, seq, position, - finder); + av.getResidueShading(), allGroups, seq, position, finder); } /** @@ -183,15 +181,13 @@ public class SequenceRenderer implements jalview.api.SequenceRenderer if (i < length) { SequenceGroup currentSequenceGroup = resColourFinder - .getCurrentSequenceGroup( - allGroups, i); + .getCurrentSequenceGroup(allGroups, i); if (currentSequenceGroup != null) { if (currentSequenceGroup.getDisplayBoxes()) { resBoxColour = resColourFinder.getBoxColour( - currentSequenceGroup.getGroupColourScheme(), seq, - i); + currentSequenceGroup.getGroupColourScheme(), seq, i); } } else if (av.getShowBoxes()) @@ -257,8 +253,9 @@ public class SequenceRenderer implements jalview.api.SequenceRenderer } graphics.setColor(av.getTextColour()); - boolean drawAllText = monospacedFont && av.getShowText() && allGroups.length == 0 - && !av.getColourText() && av.getThresholdTextColour() == 0; + boolean drawAllText = monospacedFont && av.getShowText() + && allGroups.length == 0 && !av.getColourText() + && av.getThresholdTextColour() == 0; /* * EPS or SVG misaligns monospaced strings (JAL-3239) @@ -303,8 +300,7 @@ public class SequenceRenderer implements jalview.api.SequenceRenderer } SequenceGroup currentSequenceGroup = resColourFinder - .getCurrentSequenceGroup( - allGroups, i); + .getCurrentSequenceGroup(allGroups, i); if (currentSequenceGroup != null) { if (!currentSequenceGroup.getDisplayText()) @@ -317,8 +313,7 @@ public class SequenceRenderer implements jalview.api.SequenceRenderer { getboxColour = true; resBoxColour = resColourFinder.getBoxColour( - currentSequenceGroup.getGroupColourScheme(), seq, - i); + currentSequenceGroup.getGroupColourScheme(), seq, i); if (currentSequenceGroup.getColourText()) { @@ -340,7 +335,8 @@ public class SequenceRenderer implements jalview.api.SequenceRenderer graphics.setColor(currentSequenceGroup.textColour); } boolean isgrep = currentSequenceGroup != null - ? currentSequenceGroup.getSeqrep() == seq : false; + ? currentSequenceGroup.getSeqrep() == seq + : false; if (!isarep && !isgrep && currentSequenceGroup.getShowNonconserved()) // todo // optimize diff --git a/src/jalview/gui/Slider.java b/src/jalview/gui/Slider.java index 714e770..184304c 100644 --- a/src/jalview/gui/Slider.java +++ b/src/jalview/gui/Slider.java @@ -95,8 +95,8 @@ public class Slider extends JSlider } /** - * Answers the value of the slider position as a percentage between minimum and - * maximum of its range + * Answers the value of the slider position as a percentage between minimum + * and maximum of its range * * @return */ diff --git a/src/jalview/gui/SplitFrame.java b/src/jalview/gui/SplitFrame.java index 7ce8673..6ebedb7 100644 --- a/src/jalview/gui/SplitFrame.java +++ b/src/jalview/gui/SplitFrame.java @@ -259,8 +259,8 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI * calculate the maximum ratio that leaves at least the height * of two sequences (after rounding) visible in the bottom panel */ - int bottomSequencesHeight = bottomFrame.alignPanel.getSeqPanel().seqCanvas - .getHeight(); + int bottomSequencesHeight = bottomFrame.alignPanel + .getSeqPanel().seqCanvas.getHeight(); int bottomPanelMinHeight = bottomPanelHeight - Math.max(0, bottomSequencesHeight - 3 * bottomCharHeight); double maxRatio = (totalHeight - bottomPanelMinHeight) / totalHeight; @@ -427,7 +427,9 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI * Ctrl-W / Cmd-W - close view or window */ KeyStroke key_cmdW = KeyStroke.getKeyStroke(KeyEvent.VK_W, - jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false); + jalview.util.ShortcutKeyMaskExWrapper + .getMenuShortcutKeyMaskEx(), + false); action = new AbstractAction() { @Override @@ -448,7 +450,9 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI * Ctrl-T / Cmd-T open new view */ KeyStroke key_cmdT = KeyStroke.getKeyStroke(KeyEvent.VK_T, - jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false); + jalview.util.ShortcutKeyMaskExWrapper + .getMenuShortcutKeyMaskEx(), + false); AbstractAction action = new AbstractAction() { @Override @@ -804,7 +808,9 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI * Ctrl-F / Cmd-F open Finder dialog, 'focused' on the right alignment */ KeyStroke key_cmdF = KeyStroke.getKeyStroke(KeyEvent.VK_F, - jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false); + jalview.util.ShortcutKeyMaskExWrapper + .getMenuShortcutKeyMaskEx(), + false); AbstractAction action = new AbstractAction() { @Override @@ -851,7 +857,8 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI } /** - * holds the frame for feature settings, so Protein and DNA tabs can be managed + * holds the frame for feature settings, so Protein and DNA tabs can be + * managed */ JInternalFrame featureSettingsUI; diff --git a/src/jalview/gui/StructureChooser.java b/src/jalview/gui/StructureChooser.java index 34fa751..af5f8a4 100644 --- a/src/jalview/gui/StructureChooser.java +++ b/src/jalview/gui/StructureChooser.java @@ -244,7 +244,9 @@ public class StructureChooser extends GStructureChooser /** * raises dialog for Uniprot fetch followed by 3D beacons search - * @param ignoreGui - when true, don't ask, just fetch + * + * @param ignoreGui + * - when true, don't ask, just fetch */ public void promptForTDBFetch(boolean ignoreGui) { @@ -258,22 +260,29 @@ public class StructureChooser extends GStructureChooser { mainFrame.setEnabled(false); cmb_filterOption.setEnabled(false); - progressBar.setProgressBar(MessageManager.getString("status.searching_3d_beacons"), progressId); + progressBar.setProgressBar( + MessageManager.getString("status.searching_3d_beacons"), + progressId); // TODO: warn if no accessions discovered populateSeqsWithoutSourceDBRef(); // redo initial discovery - this time with 3d beacons // Executors. - previousWantedFields=null; - lastSelected=(FilterOption) cmb_filterOption.getSelectedItem(); + previousWantedFields = null; + lastSelected = (FilterOption) cmb_filterOption.getSelectedItem(); cmb_filterOption.setSelectedItem(null); - cachedPDBExists=false; // reset to initial + cachedPDBExists = false; // reset to initial initialStructureDiscovery(); if (!isStructuresDiscovered()) { - progressBar.setProgressBar(MessageManager.getString("status.no_structures_discovered_from_3d_beacons"), progressId); - btn_queryTDB.setToolTipText(MessageManager.getString("status.no_structures_discovered_from_3d_beacons")); + progressBar.setProgressBar(MessageManager.getString( + "status.no_structures_discovered_from_3d_beacons"), + progressId); + btn_queryTDB.setToolTipText(MessageManager.getString( + "status.no_structures_discovered_from_3d_beacons")); btn_queryTDB.setEnabled(false); - } else { + } + else + { cmb_filterOption.setSelectedIndex(0); // select 'best' btn_queryTDB.setVisible(false); progressBar.setProgressBar(null, progressId); @@ -285,7 +294,7 @@ public class StructureChooser extends GStructureChooser final FetchFinishedListenerI afterDbRefFetch = new FetchFinishedListenerI() { - + @Override public void finished() { @@ -293,12 +302,12 @@ public class StructureChooser extends GStructureChooser notQueriedTDBYet = false; // new thread to discover structures - via 3d beacons Executors.defaultThreadFactory().newThread(strucDiscovery).start(); - + } }; - + // fetch db refs if OK pressed - final Runnable discoverCanonicalDBrefs = new Runnable() + final Runnable discoverCanonicalDBrefs = new Runnable() { @Override public void run() @@ -316,23 +325,29 @@ public class StructureChooser extends GStructureChooser dbRefFetcher.addListener(afterDbRefFetch); // ideally this would also gracefully run with callbacks dbRefFetcher.fetchDBRefs(true); - } else { + } + else + { // call finished action directly afterDbRefFetch.finished(); } } }; - final Runnable revertview = new Runnable() { - public void run() { - if (lastSelected!=null) { + final Runnable revertview = new Runnable() + { + public void run() + { + if (lastSelected != null) + { cmb_filterOption.setSelectedItem(lastSelected); } }; }; if (ignoreGui) { - Executors.defaultThreadFactory().newThread(discoverCanonicalDBrefs).start(); + Executors.defaultThreadFactory().newThread(discoverCanonicalDBrefs) + .start(); return; } // need cancel and no to result in the discoverPDB action - mocked is @@ -346,8 +361,7 @@ public class StructureChooser extends GStructureChooser MessageManager.formatMessage( "label.fetch_references_for_3dbeacons", seqsWithoutSourceDBRef.size()), - MessageManager - .getString("label.3dbeacons"), + MessageManager.getString("label.3dbeacons"), JvOptionPane.YES_NO_OPTION, JvOptionPane.PLAIN_MESSAGE, null, new Object[] { MessageManager.getString("action.ok"), @@ -720,7 +734,7 @@ public class StructureChooser extends GStructureChooser { FilterOption selectedFilterOpt = ((FilterOption) cmb_filterOption .getSelectedItem()); - + if (lastSelected == selectedFilterOpt) { // don't need to do anything, probably @@ -735,7 +749,7 @@ public class StructureChooser extends GStructureChooser String filterTitle = mainFrame.getTitle(); mainFrame.setTitle(frameTitle); chk_invertFilter.setVisible(false); - + if (selectedFilterOpt.getView() == VIEWS_FILTER) { mainFrame.setTitle(filterTitle); @@ -826,32 +840,39 @@ public class StructureChooser extends GStructureChooser FilterOption selectedFilterOpt = ((FilterOption) cmb_filterOption .getSelectedItem()); String currentView = selectedFilterOpt.getView(); - - if (currentView == VIEWS_FILTER && data instanceof ThreeDBStructureChooserQuerySource) + + if (currentView == VIEWS_FILTER + && data instanceof ThreeDBStructureChooserQuerySource) { - - TDB_FTSData row=((ThreeDBStructureChooserQuerySource)data).getFTSDataFor(getResultTable(), selectedRow, discoveredStructuresSet); - String pageUrl = row.getModelViewUrl(); + + TDB_FTSData row = ((ThreeDBStructureChooserQuerySource) data) + .getFTSDataFor(getResultTable(), selectedRow, + discoveredStructuresSet); + String pageUrl = row.getModelViewUrl(); JPopupMenu popup = new JPopupMenu("3D Beacons"); JMenuItem viewUrl = new JMenuItem("View model web page"); - viewUrl.addActionListener( - new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) - { - Desktop.showUrl(pageUrl); - } - } - ); + viewUrl.addActionListener(new ActionListener() + { + @Override + public void actionPerformed(ActionEvent e) + { + Desktop.showUrl(pageUrl); + } + }); popup.add(viewUrl); - SwingUtilities.invokeLater(new Runnable() { - public void run() { popup.show(getResultTable(), x, y); } + SwingUtilities.invokeLater(new Runnable() + { + public void run() + { + popup.show(getResultTable(), x, y); + } }); return true; } // event not handled by us return false; } + /** * Validates inputs from the Manual PDB entry panel */ @@ -923,7 +944,9 @@ public class StructureChooser extends GStructureChooser { validateSelections(); } - private FilterOption lastSelected=null; + + private FilterOption lastSelected = null; + /** * Handles the state change event for the 'filter' combo-box and 'invert' * check-box @@ -1080,7 +1103,8 @@ public class StructureChooser extends GStructureChooser if (pdbIdStr.split(":").length > 1) { pdbEntry.setId(pdbIdStr.split(":")[0]); - pdbEntry.setChainCode(pdbIdStr.split(":")[1].toUpperCase(Locale.ROOT)); + pdbEntry.setChainCode( + pdbIdStr.split(":")[1].toUpperCase(Locale.ROOT)); } else { @@ -1517,12 +1541,14 @@ public class StructureChooser extends GStructureChooser && mainFrame.isVisible() && cmb_filterOption.getSelectedItem() != null; } + /** * * @return true if the 3D-Beacons query button will/has been displayed */ - public boolean isCanQueryTDB() { - return canQueryTDB; + public boolean isCanQueryTDB() + { + return canQueryTDB; } public boolean isNotQueriedTDBYet() diff --git a/src/jalview/gui/StructureViewer.java b/src/jalview/gui/StructureViewer.java index ad412b0..5effa1a 100644 --- a/src/jalview/gui/StructureViewer.java +++ b/src/jalview/gui/StructureViewer.java @@ -64,7 +64,8 @@ public class StructureViewer * * @param structureSelectionManager */ - public StructureViewer(StructureSelectionManager structureSelectionManager) + public StructureViewer( + StructureSelectionManager structureSelectionManager) { ssm = structureSelectionManager; } @@ -81,7 +82,6 @@ public class StructureViewer return sv; } - @Override public String toString() { @@ -91,9 +91,10 @@ public class StructureViewer } return "New View"; } + /** * - * @return ViewerType for currently configured structure viewer + * @return ViewerType for currently configured structure viewer */ public static ViewerType getViewerType() { @@ -131,10 +132,10 @@ public class StructureViewer Map seqsForPdbs = getSequencesForPdbs(pdbs, seqs); - PDBEntry[] pdbsForFile = seqsForPdbs.keySet().toArray( - new PDBEntry[seqsForPdbs.size()]); - SequenceI[][] theSeqs = seqsForPdbs.values().toArray( - new SequenceI[seqsForPdbs.size()][]); + PDBEntry[] pdbsForFile = seqsForPdbs.keySet() + .toArray(new PDBEntry[seqsForPdbs.size()]); + SequenceI[][] theSeqs = seqsForPdbs.values() + .toArray(new SequenceI[seqsForPdbs.size()][]); if (sview != null) { sview.setAlignAddedStructures(superposeAdded); @@ -372,7 +373,6 @@ public class StructureViewer return viewer; } - public boolean isBusy() { if (sview != null) diff --git a/src/jalview/gui/TextColourChooser.java b/src/jalview/gui/TextColourChooser.java index 5d22abb..17c1f29 100644 --- a/src/jalview/gui/TextColourChooser.java +++ b/src/jalview/gui/TextColourChooser.java @@ -101,7 +101,8 @@ public class TextColourChooser @Override public void mousePressed(MouseEvent e) { - String ttl = MessageManager.getString("label.select_colour_for_text"); + String ttl = MessageManager + .getString("label.select_colour_for_text"); ColourChooserListener listener = new ColourChooserListener() { @Override @@ -121,7 +122,8 @@ public class TextColourChooser @Override public void mousePressed(MouseEvent e) { - String ttl = MessageManager.getString("label.select_colour_for_text"); + String ttl = MessageManager + .getString("label.select_colour_for_text"); ColourChooserListener listener = new ColourChooserListener() { @Override diff --git a/src/jalview/gui/TreeCanvas.java b/src/jalview/gui/TreeCanvas.java index 40cf080..0012888 100755 --- a/src/jalview/gui/TreeCanvas.java +++ b/src/jalview/gui/TreeCanvas.java @@ -459,8 +459,8 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable, if ((node.left() == null) && (node.right() == null)) { double height = node.height; -// double dist = node.dist; -// int xstart = (int) ((height - dist) * wscale) + offx; + // double dist = node.dist; + // int xstart = (int) ((height - dist) * wscale) + offx; int xend = (int) (height * wscale) + offx; int ypos = (int) (node.ycount * chunk) + offy; @@ -826,7 +826,8 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable, void chooseSubtreeColour() { String ttl = MessageManager.getString("label.select_subtree_colour"); - ColourChooserListener listener = new ColourChooserListener() { + ColourChooserListener listener = new ColourChooserListener() + { @Override public void colourSelected(Color c) { @@ -835,7 +836,8 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable, repaint(); } }; - JalviewColourChooser.showColourChooser(this, ttl, highlightNode.color, listener); + JalviewColourChooser.showColourChooser(this, ttl, highlightNode.color, + listener); } @Override @@ -914,7 +916,8 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable, if (ob instanceof SequenceI) { treeSelectionChanged((Sequence) ob); - PaintRefresher.Refresh(tp, getAssociatedPanel().av.getSequenceSetId()); + PaintRefresher.Refresh(tp, + getAssociatedPanel().av.getSequenceSetId()); repaint(); av.sendSelection(); return; @@ -960,7 +963,8 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable, } } - PaintRefresher.Refresh(tp, getAssociatedPanel().av.getSequenceSetId()); + PaintRefresher.Refresh(tp, + getAssociatedPanel().av.getSequenceSetId()); repaint(); } diff --git a/src/jalview/gui/TreePanel.java b/src/jalview/gui/TreePanel.java index db6ba42..d735402 100755 --- a/src/jalview/gui/TreePanel.java +++ b/src/jalview/gui/TreePanel.java @@ -322,9 +322,8 @@ public class TreePanel extends GTreePanel } else { - ScoreModelI sm = ScoreModels.getInstance() - .getScoreModel(scoreModelName, - treeCanvas.getAssociatedPanel()); + ScoreModelI sm = ScoreModels.getInstance().getScoreModel( + scoreModelName, treeCanvas.getAssociatedPanel()); TreeBuilder njtree = treeType.equals(TreeBuilder.NEIGHBOUR_JOINING) ? new NJTree(av, sm, similarityParams) : new AverageDistanceTree(av, sm, similarityParams); @@ -590,9 +589,8 @@ public class TreePanel extends GTreePanel } else { - treeCanvas.getAssociatedPanel().alignFrame - .addHistoryItem( - sortAlignmentIn(treeCanvas.getAssociatedPanel())); + treeCanvas.getAssociatedPanel().alignFrame.addHistoryItem( + sortAlignmentIn(treeCanvas.getAssociatedPanel())); } } @@ -697,7 +695,8 @@ public class TreePanel extends GTreePanel String tree = MessageManager.getString("label.tree"); ImageExporter exporter = new ImageExporter(writer, null, imageFormat, tree); - exporter.doExport(null, this, width, height, tree.toLowerCase(Locale.ROOT)); + exporter.doExport(null, this, width, height, + tree.toLowerCase(Locale.ROOT)); } /** @@ -789,8 +788,8 @@ public class TreePanel extends GTreePanel /* * i18n description of Neighbour Joining or Average Distance method */ - String treecalcnm = MessageManager - .getString("label.tree_calc_" + treeType.toLowerCase(Locale.ROOT)); + String treecalcnm = MessageManager.getString( + "label.tree_calc_" + treeType.toLowerCase(Locale.ROOT)); /* * short score model name (long description can be too long) @@ -819,8 +818,7 @@ public class TreePanel extends GTreePanel int width = treeCanvas.getWidth(); int height = treeCanvas.getHeight(); - FileOutputStream out = new FileOutputStream( - outFile); + FileOutputStream out = new FileOutputStream(outFile); EpsGraphics2D pg = new EpsGraphics2D("Tree", out, 0, 0, width, height); pg.setAccurateTextMode(!textOption); @@ -834,7 +832,7 @@ public class TreePanel extends GTreePanel ex.printStackTrace(); } } - + public AlignViewport getViewport() { return av; diff --git a/src/jalview/gui/UserDefinedColours.java b/src/jalview/gui/UserDefinedColours.java index c3f132b..1836e33 100755 --- a/src/jalview/gui/UserDefinedColours.java +++ b/src/jalview/gui/UserDefinedColours.java @@ -207,8 +207,10 @@ public class UserDefinedColours extends GUserDefinedColours { int row = i / cols + 1; int index = (row * cols) + i; - JButton button = makeButton(ResidueProperties.aa[i].toLowerCase(Locale.ROOT), - ResidueProperties.aa[i].toLowerCase(Locale.ROOT), lowerCaseButtons, i); + JButton button = makeButton( + ResidueProperties.aa[i].toLowerCase(Locale.ROOT), + ResidueProperties.aa[i].toLowerCase(Locale.ROOT), + lowerCaseButtons, i); buttonPanel.add(button, index); } @@ -650,47 +652,47 @@ public class UserDefinedColours extends GUserDefinedColours chooser.setDialogTitle( MessageManager.getString("label.load_colour_scheme")); chooser.setToolTipText(MessageManager.getString("action.load")); - chooser.setResponseHandler(0, new Runnable() - { - @Override - public void run() - { - File choice = chooser.getSelectedFile(); - Cache.setProperty(LAST_DIRECTORY, choice.getParent()); - - UserColourScheme ucs = ColourSchemeLoader - .loadColourScheme(choice.getAbsolutePath()); - Color[] colors = ucs.getColours(); - schemeName.setText(ucs.getSchemeName()); - - if (ucs.getLowerCaseColours() != null) - { - caseSensitive.setSelected(true); - lcaseColour.setEnabled(true); - resetButtonPanel(true); - for (int i = 0; i < lowerCaseButtons.size(); i++) - { - JButton button = lowerCaseButtons.get(i); - button.setBackground(ucs.getLowerCaseColours()[i]); - } - } - else - { - caseSensitive.setSelected(false); - lcaseColour.setEnabled(false); - resetButtonPanel(false); - } - - for (int i = 0; i < upperCaseButtons.size(); i++) - { - JButton button = upperCaseButtons.get(i); - button.setBackground(colors[i]); - } - - addNewColourScheme(choice.getPath()); - } - }); - + chooser.setResponseHandler(0, new Runnable() + { + @Override + public void run() + { + File choice = chooser.getSelectedFile(); + Cache.setProperty(LAST_DIRECTORY, choice.getParent()); + + UserColourScheme ucs = ColourSchemeLoader + .loadColourScheme(choice.getAbsolutePath()); + Color[] colors = ucs.getColours(); + schemeName.setText(ucs.getSchemeName()); + + if (ucs.getLowerCaseColours() != null) + { + caseSensitive.setSelected(true); + lcaseColour.setEnabled(true); + resetButtonPanel(true); + for (int i = 0; i < lowerCaseButtons.size(); i++) + { + JButton button = lowerCaseButtons.get(i); + button.setBackground(ucs.getLowerCaseColours()[i]); + } + } + else + { + caseSensitive.setSelected(false); + lcaseColour.setEnabled(false); + resetButtonPanel(false); + } + + for (int i = 0; i < upperCaseButtons.size(); i++) + { + JButton button = upperCaseButtons.get(i); + button.setBackground(colors[i]); + } + + addNewColourScheme(choice.getPath()); + } + }); + chooser.showOpenDialog(this); } diff --git a/src/jalview/gui/VamsasApplication.java b/src/jalview/gui/VamsasApplication.java index 9defed4..8a8ba8d 100644 --- a/src/jalview/gui/VamsasApplication.java +++ b/src/jalview/gui/VamsasApplication.java @@ -202,8 +202,7 @@ public class VamsasApplication implements SelectionSource, VamsasSource } catch (Exception e) { - Console.error("Couldn't instantiate vamsas client !", - e); + Console.error("Couldn't instantiate vamsas client !", e); return false; } return true; @@ -272,8 +271,7 @@ public class VamsasApplication implements SelectionSource, VamsasSource addStoreDocumentHandler(); startSession(); inInitialUpdate = true; - Console.debug( - "Jalview loading the Vamsas Session for the first time."); + Console.debug("Jalview loading the Vamsas Session for the first time."); dealWithDocumentUpdate(false); // we don't push an update out to the inInitialUpdate = false; // document yet. @@ -482,8 +480,7 @@ public class VamsasApplication implements SelectionSource, VamsasSource } catch (Exception e) { errorsDuringUpdate = true; - Console.error("Exception synchronizing " + af.getTitle() - + " " + Console.error("Exception synchronizing " + af.getTitle() + " " + (af.getViewport().getViewName() == null ? "" : " view " + af.getViewport().getViewName()) + " to document.", e); diff --git a/src/jalview/gui/ViewSelectionMenu.java b/src/jalview/gui/ViewSelectionMenu.java index 134164e..f77f410 100644 --- a/src/jalview/gui/ViewSelectionMenu.java +++ b/src/jalview/gui/ViewSelectionMenu.java @@ -262,7 +262,7 @@ public class ViewSelectionMenu extends JMenu } } }); - final ViewSelectionMenu us=this; + final ViewSelectionMenu us = this; checkBox.addMouseListener(new MouseAdapter() { @Override diff --git a/src/jalview/gui/WsJobParameters.java b/src/jalview/gui/WsJobParameters.java index d9a0dda..e1613da 100644 --- a/src/jalview/gui/WsJobParameters.java +++ b/src/jalview/gui/WsJobParameters.java @@ -1341,8 +1341,8 @@ public class WsJobParameters extends JPanel implements ItemListener, final String setname = (String) setName.getSelectedItem(); if (Console.isDebugEnabled()) { - Console.debug("Item state changed for " + setname - + " (handling ? " + !settingDialog + ")"); + Console.debug("Item state changed for " + setname + " (handling ? " + + !settingDialog + ")"); } if (settingDialog) { diff --git a/src/jalview/gui/WsParamSetManager.java b/src/jalview/gui/WsParamSetManager.java index de1be5d..3c9f65c 100644 --- a/src/jalview/gui/WsParamSetManager.java +++ b/src/jalview/gui/WsParamSetManager.java @@ -148,8 +148,8 @@ public class WsParamSetManager implements ParamManager if (parser != null) { WsParamSetI pset = parser.parseServiceParameterFile( - wspset.getName(), wspset.getDescription(), - urlArray, wspset.getParameters()); + wspset.getName(), wspset.getDescription(), urlArray, + wspset.getParameters()); if (pset != null) { pset.setSourceFile(filename); @@ -219,8 +219,7 @@ public class WsParamSetManager implements ParamManager } if (outfile != null) { - String paramFiles = Cache.getDefault("WS_PARAM_FILES", - filename); + String paramFiles = Cache.getDefault("WS_PARAM_FILES", filename); if (paramFiles.indexOf(filename) == -1) { if (paramFiles.length() > 0) diff --git a/src/jalview/gui/structurechooser/PDBStructureChooserQuerySource.java b/src/jalview/gui/structurechooser/PDBStructureChooserQuerySource.java index 727d8e0..da2c02b 100644 --- a/src/jalview/gui/structurechooser/PDBStructureChooserQuerySource.java +++ b/src/jalview/gui/structurechooser/PDBStructureChooserQuerySource.java @@ -52,7 +52,6 @@ public class PDBStructureChooserQuerySource } - /** * Builds a query string for a given sequences using its DBRef entries * @@ -237,25 +236,28 @@ public class PDBStructureChooserQuerySource lastPdbRequest = pdbRequest; return resultList; } + public List getAvailableFilterOptions(String VIEWS_FILTER) { List filters = new ArrayList(); - filters.add(new FilterOption("PDBe "+ - MessageManager.getString("label.best_quality"), - "overall_quality", VIEWS_FILTER, false,this)); - filters.add(new FilterOption("PDBe "+ - MessageManager.getString("label.best_resolution"), - "resolution", VIEWS_FILTER, false,this)); - filters.add(new FilterOption("PDBe "+ - MessageManager.getString("label.most_protein_chain"), - "number_of_protein_chains", VIEWS_FILTER, false,this)); - filters.add(new FilterOption("PDBe "+ - MessageManager.getString("label.most_bound_molecules"), - "number_of_bound_molecules", VIEWS_FILTER, false,this)); - filters.add(new FilterOption("PDBe "+ - MessageManager.getString("label.most_polymer_residues"), - "number_of_polymer_residues", VIEWS_FILTER, true,this)); - + filters.add(new FilterOption( + "PDBe " + MessageManager.getString("label.best_quality"), + "overall_quality", VIEWS_FILTER, false, this)); + filters.add(new FilterOption( + "PDBe " + MessageManager.getString("label.best_resolution"), + "resolution", VIEWS_FILTER, false, this)); + filters.add(new FilterOption( + "PDBe " + MessageManager.getString("label.most_protein_chain"), + "number_of_protein_chains", VIEWS_FILTER, false, this)); + filters.add(new FilterOption( + "PDBe " + MessageManager + .getString("label.most_bound_molecules"), + "number_of_bound_molecules", VIEWS_FILTER, false, this)); + filters.add(new FilterOption( + "PDBe " + MessageManager + .getString("label.most_polymer_residues"), + "number_of_polymer_residues", VIEWS_FILTER, true, this)); + return filters; } @@ -281,7 +283,8 @@ public class PDBStructureChooserQuerySource * @return * @throws Exception */ - public FTSRestResponse selectFirstRankedQuery(SequenceI seq, Collection collectedResults, + public FTSRestResponse selectFirstRankedQuery(SequenceI seq, + Collection collectedResults, Collection wantedFields, String fieldToFilterBy, boolean b) throws Exception { @@ -316,33 +319,29 @@ public class PDBStructureChooserQuerySource return resultList; } - @Override public PDBEntry[] collectSelectedRows(JTable restable, int[] selectedRows, List selectedSeqsToView) { - int refSeqColIndex = restable.getColumn("Ref Sequence") - .getModelIndex(); + int refSeqColIndex = restable.getColumn("Ref Sequence").getModelIndex(); - PDBEntry[] pdbEntriesToView=new PDBEntry[selectedRows.length]; + PDBEntry[] pdbEntriesToView = new PDBEntry[selectedRows.length]; int count = 0; - int idColumnIndex=-1; - boolean fromTDB=true; + int idColumnIndex = -1; + boolean fromTDB = true; idColumnIndex = restable.getColumn("PDB Id").getModelIndex(); - + for (int row : selectedRows) { - - String pdbIdStr = restable.getValueAt(row,idColumnIndex) - .toString(); + + String pdbIdStr = restable.getValueAt(row, idColumnIndex).toString(); SequenceI selectedSeq = (SequenceI) restable.getValueAt(row, refSeqColIndex); selectedSeqsToView.add(selectedSeq); PDBEntry pdbEntry = selectedSeq.getPDBEntry(pdbIdStr); if (pdbEntry == null) { - pdbEntry = getFindEntry(pdbIdStr, - selectedSeq.getAllPDBEntries()); + pdbEntry = getFindEntry(pdbIdStr, selectedSeq.getAllPDBEntries()); } if (pdbEntry == null) @@ -357,15 +356,14 @@ public class PDBStructureChooserQuerySource return pdbEntriesToView; } - @Override protected FTSRestRequest getLastFTSRequest() { return lastPdbRequest; } - - public FTSRestResponse executePDBFTSRestRequest(FTSRestRequest pdbRequest) throws Exception + public FTSRestResponse executePDBFTSRestRequest(FTSRestRequest pdbRequest) + throws Exception { return pdbRestClient.executeRequest(pdbRequest); } diff --git a/src/jalview/gui/structurechooser/StructureChooserQuerySource.java b/src/jalview/gui/structurechooser/StructureChooserQuerySource.java index 1aad2e0..a4cf4ab 100644 --- a/src/jalview/gui/structurechooser/StructureChooserQuerySource.java +++ b/src/jalview/gui/structurechooser/StructureChooserQuerySource.java @@ -237,13 +237,17 @@ public abstract class StructureChooserQuerySource if (refsAvailable > -1) { hasCanonical = true; - } else { + } + else + { protWithoutCanon++; } hasUniprot = true; - } else { + } + else + { protWithoutUni++; - + } } } @@ -251,7 +255,8 @@ public abstract class StructureChooserQuerySource // logic: all canonicals - no fetchdb // some uniprot no canonicals: defer to PDB, user can optionally fetch // - if (hasProtein && hasCanonical && !hasNA && protWithoutCanon == 0 && protWithoutUni == 0) + if (hasProtein && hasCanonical && !hasNA && protWithoutCanon == 0 + && protWithoutUni == 0) { return tdbSource; diff --git a/src/jalview/gui/structurechooser/TDBResultAnalyser.java b/src/jalview/gui/structurechooser/TDBResultAnalyser.java index a453529..09ff0aa 100644 --- a/src/jalview/gui/structurechooser/TDBResultAnalyser.java +++ b/src/jalview/gui/structurechooser/TDBResultAnalyser.java @@ -116,8 +116,8 @@ public class TDBResultAnalyser String provider = (String) row.getSummaryData()[idx_mprov]; String mcat = (String) row.getSummaryData()[idx_mcat]; // this makes sure all new categories are in the score array. - int scorecat = scoreCategory(mcat); - if (sourceFilter == null || sourceFilter.equals(provider)) + int scorecat = scoreCategory(mcat); + if (sourceFilter == null || sourceFilter.equals(provider)) { if (seq == row.getSummaryData()[0] && up_e > seq.getStart() && up_s < seq.getEnd()) @@ -138,12 +138,13 @@ public class TDBResultAnalyser int o1_s = (Integer) o1data[idx_ups]; int o1_e = (Integer) o1data[idx_upe]; int o1_cat = scoreCategory((String) o1data[idx_mcat]); - String o1_prov= ((String) o1data[idx_mprov]).toUpperCase(Locale.ROOT); + String o1_prov = ((String) o1data[idx_mprov]) + .toUpperCase(Locale.ROOT); int o2_s = (Integer) o2data[idx_ups]; int o2_e = (Integer) o2data[idx_upe]; int o2_cat = scoreCategory((String) o2data[idx_mcat]); - String o2_prov= ((String) o2data[idx_mprov]).toUpperCase(Locale.ROOT); - + String o2_prov = ((String) o2data[idx_mprov]) + .toUpperCase(Locale.ROOT); if (o1_cat == o2_cat) { @@ -155,27 +156,37 @@ public class TDBResultAnalyser { if (o1_cat == scoreCategory(EXP_CATEGORIES.get(0))) { - if (o1_prov.equals(o2_prov)) { - if ("PDBE".equals(o1_prov)) { - if (eitherNull(idx_resol,o1data,o2data)) + if (o1_prov.equals(o2_prov)) + { + if ("PDBE".equals(o1_prov)) + { + if (eitherNull(idx_resol, o1data, o2data)) { - return nonNullFirst(idx_resol,o1data,o2data); + return nonNullFirst(idx_resol, o1data, o2data); } - // experimental structures, so rank on quality - double o1_res = (Double) o1data[idx_resol]; - double o2_res = (Double) o2data[idx_resol]; - return (o2_res < o1_res) ? 1 : (o2_res == o1_res) ? 0 : -1; - } else { - return 0; // no change in order + // experimental structures, so rank on quality + double o1_res = (Double) o1data[idx_resol]; + double o2_res = (Double) o2data[idx_resol]; + return (o2_res < o1_res) ? 1 + : (o2_res == o1_res) ? 0 : -1; + } + else + { + return 0; // no change in order + } + } + else + { + // PDBe always ranked above all other experimentally + // determined categories + return "PDBE".equals(o1_prov) ? -1 + : "PDBE".equals(o2_prov) ? 1 : 0; } - } else { - // PDBe always ranked above all other experimentally determined categories - return "PDBE".equals(o1_prov) ? -1 : "PDBE".equals(o2_prov) ? 1 : 0; - } } else { - if (eitherNull(idx_mqual,o1data, o2data)) { + if (eitherNull(idx_mqual, o1data, o2data)) + { return nonNullFirst(idx_mqual, o1data, o2data); } // models, so rank on qmean - b @@ -203,13 +214,14 @@ public class TDBResultAnalyser private int nonNullFirst(int idx_resol, Object[] o1data, Object[] o2data) { - return o1data[idx_resol] == o2data[idx_resol] ? 0: o1data[idx_resol] != null ? -1 : 1; + return o1data[idx_resol] == o2data[idx_resol] ? 0 + : o1data[idx_resol] != null ? -1 : 1; } private boolean eitherNull(int idx_resol, Object[] o1data, Object[] o2data) { - return (o1data[idx_resol] == null || o2data[idx_resol]==null); + return (o1data[idx_resol] == null || o2data[idx_resol] == null); } @Override @@ -254,7 +266,7 @@ public class TDBResultAnalyser cover.andNot(scover); } } - if (selected.size()==0) + if (selected.size() == 0) { return selected; } diff --git a/src/jalview/io/AnnotationFile.java b/src/jalview/io/AnnotationFile.java index 934be41..09859c9 100755 --- a/src/jalview/io/AnnotationFile.java +++ b/src/jalview/io/AnnotationFile.java @@ -1087,8 +1087,8 @@ public class AnnotationFile if (rowset != null && rowset.size() > 0) { AlignmentAnnotation alan = null; - for (int elm = 0, - elmSize = rowset.size(); elm < elmSize; elm++) + for (int elm = 0, elmSize = rowset + .size(); elm < elmSize; elm++) { alan = (AlignmentAnnotation) rowset.elementAt(elm); alan.groupRef = theGroup; diff --git a/src/jalview/io/AppletFormatAdapter.java b/src/jalview/io/AppletFormatAdapter.java index e9c9ce2..00fcb9c 100755 --- a/src/jalview/io/AppletFormatAdapter.java +++ b/src/jalview/io/AppletFormatAdapter.java @@ -154,9 +154,10 @@ public class AppletFormatAdapter { return readFile(null, file, sourceType, fileFormat); } - - public AlignmentI readFile(File selectedFile, String file, DataSourceType sourceType, - FileFormatI fileFormat) throws IOException + + public AlignmentI readFile(File selectedFile, String file, + DataSourceType sourceType, FileFormatI fileFormat) + throws IOException { this.selectedFile = selectedFile; @@ -179,7 +180,8 @@ public class AppletFormatAdapter if (isParseWithJMOL) { // needs a File option - alignFile = new JmolParser(selectedFile == null ? inFile : selectedFile, sourceType); + alignFile = new JmolParser( + selectedFile == null ? inFile : selectedFile, sourceType); } else { @@ -192,9 +194,12 @@ public class AppletFormatAdapter ((StructureFile) alignFile).setDbRefType( FileFormat.PDB.equals(fileFormat) ? Type.PDB : Type.MMCIF); } - else if (selectedFile != null) { - alignFile = fileFormat.getReader(new FileParse(selectedFile, sourceType)); - } else + else if (selectedFile != null) + { + alignFile = fileFormat + .getReader(new FileParse(selectedFile, sourceType)); + } + else { // alignFile = fileFormat.getAlignmentFile(inFile, sourceType); alignFile = fileFormat.getReader(new FileParse(inFile, sourceType)); @@ -426,23 +431,23 @@ public class AppletFormatAdapter return null; } - /** * Determines the protocol (i.e DataSourceType.{FILE|PASTE|URL}) for the input * data * * BH 2018 allows File or String, and can return RELATIVE_URL * - * @param dataObject File or String + * @param dataObject + * File or String * @return the protocol for the input data */ public static DataSourceType checkProtocol(Object dataObject) { - if(dataObject instanceof File) + if (dataObject instanceof File) { return DataSourceType.FILE; } - + String data = dataObject.toString(); DataSourceType protocol = DataSourceType.PASTE; String ft = data.toLowerCase(Locale.ROOT).trim(); diff --git a/src/jalview/io/BackupFilenameParts.java b/src/jalview/io/BackupFilenameParts.java index 339cefa..19b8e3c 100644 --- a/src/jalview/io/BackupFilenameParts.java +++ b/src/jalview/io/BackupFilenameParts.java @@ -71,7 +71,8 @@ public class BackupFilenameParts } String savedFilename = ""; - // if extensionOnly is set then reset the filename to the last occurrence of the extension+templateStart and try the match + // if extensionOnly is set then reset the filename to the last occurrence of + // the extension+templateStart and try the match if (extensionMatch) { // only trying to match from extension onwards diff --git a/src/jalview/io/BackupFiles.java b/src/jalview/io/BackupFiles.java index defc47b..2039d3c 100644 --- a/src/jalview/io/BackupFiles.java +++ b/src/jalview/io/BackupFiles.java @@ -381,8 +381,8 @@ public class BackupFiles boolean delete = confirmNewerDeleteFile(fileToBeDeleted, replacementFile, true); - Console.trace("BACKUPFILES " + (delete ? "confirmed" : "not") - + " deleting file " + Console.trace("BACKUPFILES " + + (delete ? "confirmed" : "not") + " deleting file " + fileToBeDeleted.getAbsolutePath() + " which is newer than " + replacementFile.getAbsolutePath()); @@ -484,7 +484,8 @@ public class BackupFiles File fileToBeDeleted = backupFiles[i]; boolean delete = true; - Console.trace("BACKUPFILES fileToBeDeleted: " + fileToBeDeleted); + Console.trace( + "BACKUPFILES fileToBeDeleted: " + fileToBeDeleted); boolean newer = false; if (replacementFile != null) @@ -551,8 +552,9 @@ public class BackupFiles // using boolean '&' instead of '&&' as don't want moveFileToFile attempt to // be conditional (short-circuit) ret = ret & moveFileToFile(file, new File(latestBackupFilename)); - Console.debug("BACKUPFILES moving " + file + " to " + latestBackupFilename - + " was " + (ret ? "" : "NOT ") + "successful"); + Console.debug( + "BACKUPFILES moving " + file + " to " + latestBackupFilename + + " was " + (ret ? "" : "NOT ") + "successful"); if (tidyUp) { Console.debug("BACKUPFILES tidying up files"); @@ -899,8 +901,8 @@ public class BackupFiles // delete destination file - not usually necessary but Just In Case... Console.trace("BACKUPFILES deleting " + newFile.getAbsolutePath()); newFile.delete(); - Console.trace("BACKUPFILES moving " + oldFile.getAbsolutePath() + " to " - + newFile.getAbsolutePath()); + Console.trace("BACKUPFILES moving " + oldFile.getAbsolutePath() + + " to " + newFile.getAbsolutePath()); Files.move(oldPath, newPath, StandardCopyOption.REPLACE_EXISTING); ret = true; Console.trace("BACKUPFILES move seems to have succeeded"); diff --git a/src/jalview/io/BioJsHTMLOutput.java b/src/jalview/io/BioJsHTMLOutput.java index 48988cf..c88d8eb 100644 --- a/src/jalview/io/BioJsHTMLOutput.java +++ b/src/jalview/io/BioJsHTMLOutput.java @@ -51,9 +51,9 @@ public class BioJsHTMLOutput extends HTMLOutput public static final String BJS_TEMPLATES_LOCAL_DIRECTORY = Cache .getDefault("biojs_template_directory", DEFAULT_DIR); - public static final String BJS_TEMPLATE_GIT_REPO = Cache - .getDefault("biojs_template_git_repo", - "https://raw.githubusercontent.com/jalview/exporter-templates/master/biojs/package.json"); + public static final String BJS_TEMPLATE_GIT_REPO = Cache.getDefault( + "biojs_template_git_repo", + "https://raw.githubusercontent.com/jalview/exporter-templates/master/biojs/package.json"); public BioJsHTMLOutput(AlignmentPanel ap) { diff --git a/src/jalview/io/EMBLLikeFlatFile.java b/src/jalview/io/EMBLLikeFlatFile.java index e8ce34b..7671412 100644 --- a/src/jalview/io/EMBLLikeFlatFile.java +++ b/src/jalview/io/EMBLLikeFlatFile.java @@ -160,8 +160,7 @@ public abstract class EMBLLikeFlatFile extends AlignFile * when true, interpret the mol_type 'source' feature attribute * and generate an RNA sequence from the DNA record */ - protected boolean produceRna=true; - + protected boolean produceRna = true; /* * values parsed from the data file @@ -178,7 +177,7 @@ public abstract class EMBLLikeFlatFile extends AlignFile protected List dbrefs; - protected boolean sequenceStringIsRNA=false; + protected boolean sequenceStringIsRNA = false; protected String sequenceString; @@ -201,13 +200,14 @@ public abstract class EMBLLikeFlatFile extends AlignFile * using TreeMap gives CDS sequences in alphabetical, so readable, order */ cds = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); - + parse(); } /** - * process attributes for 'source' until the next FT feature entry - * only interested in 'mol_type' + * process attributes for 'source' until the next FT feature entry only + * interested in 'mol_type' + * * @param tokens * @return * @throws IOException @@ -236,7 +236,7 @@ public abstract class EMBLLikeFlatFile extends AlignFile int p = line.indexOf("\\mol_type"); int qs = line.indexOf("\"", p); int qe = line.indexOf("\"", qs + 1); - String qualifier=line.substring(qs,qe).toLowerCase(Locale.ROOT); + String qualifier = line.substring(qs, qe).toLowerCase(Locale.ROOT); if (qualifier.indexOf("rna") > -1) { sequenceStringIsRNA = true; @@ -245,12 +245,11 @@ public abstract class EMBLLikeFlatFile extends AlignFile { sequenceStringIsRNA = false; } - line=parseFeatureQualifier(sb, false); + line = parseFeatureQualifier(sb, false); } return line; } - /** * Parses one (GenBank or EMBL format) CDS feature, saves the parsed data, and * returns the next line @@ -715,8 +714,8 @@ public abstract class EMBLLikeFlatFile extends AlignFile String[] tokens = line.split(WHITESPACE); if (tokens.length < 2) { - Console.error("Ignoring bad EMBL line for " + this.accession - + ": " + line); + Console.error("Ignoring bad EMBL line for " + this.accession + ": " + + line); break; } if (tokens[1].startsWith("/")) @@ -797,7 +796,8 @@ public abstract class EMBLLikeFlatFile extends AlignFile protected String parseFeature(String line) throws IOException { String[] tokens = line.trim().split(WHITESPACE); - if (tokens.length < 2 || (!"CDS".equals(tokens[0]) && (!"source".equals(tokens[0])))) + if (tokens.length < 2 + || (!"CDS".equals(tokens[0]) && (!"source".equals(tokens[0])))) { return nextLine(); } diff --git a/src/jalview/io/FeaturesFile.java b/src/jalview/io/FeaturesFile.java index 71fc659..745bce3 100755 --- a/src/jalview/io/FeaturesFile.java +++ b/src/jalview/io/FeaturesFile.java @@ -110,12 +110,12 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI /** * Constructor which does not parse the file immediately * - * @param file File or String filename + * @param file + * File or String filename * @param paste * @throws IOException */ - public FeaturesFile(Object file, DataSourceType paste) - throws IOException + public FeaturesFile(Object file, DataSourceType paste) throws IOException { super(false, file, paste); } @@ -568,21 +568,19 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI } /** - * Returns contents of a Jalview format features file, for visible features, as - * filtered by type and group. Features with a null group are displayed if their - * feature type is visible. Non-positional features may optionally be included - * (with no check on type or group). + * Returns contents of a Jalview format features file, for visible features, + * as filtered by type and group. Features with a null group are displayed if + * their feature type is visible. Non-positional features may optionally be + * included (with no check on type or group). * * @param sequences * @param fr * @param includeNonPositional - * if true, include non-positional features - * (regardless of group or type) + * if true, include non-positional features (regardless of group or + * type) * @param includeComplement - * if true, include visible complementary - * (CDS/protein) positional features, with - * locations converted to local sequence - * coordinates + * if true, include visible complementary (CDS/protein) positional + * features, with locations converted to local sequence coordinates * @return */ public String printJalviewFormat(SequenceI[] sequences, @@ -604,8 +602,8 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI .entrySet()) { FeatureColourI colour = featureColour.getValue(); - out.append(colour.toJalviewFormat(featureColour.getKey())).append( - newline); + out.append(colour.toJalviewFormat(featureColour.getKey())) + .append(newline); } } @@ -634,8 +632,9 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI /** * Outputs any visible complementary (CDS/peptide) positional features as - * Jalview format, within feature group. The coordinates of the linked features - * are converted to the corresponding positions of the local sequences. + * Jalview format, within feature group. The coordinates of the linked + * features are converted to the corresponding positions of the local + * sequences. * * @param out * @param fr @@ -686,7 +685,8 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI /* * output features by group */ - for (Entry>> groupFeatures : map.entrySet()) + for (Entry>> groupFeatures : map + .entrySet()) { out.append(newline); String group = groupFeatures.getKey(); @@ -766,8 +766,8 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI } /** - * Outputs any feature filters defined for visible feature types, sandwiched by - * STARTFILTERS and ENDFILTERS lines + * Outputs any feature filters defined for visible feature types, sandwiched + * by STARTFILTERS and ENDFILTERS lines * * @param out * @param visible @@ -817,9 +817,9 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI * @param includeNonPositional * @return */ - private int outputFeaturesByGroup(StringBuilder out, - FeatureRenderer fr, String[] featureTypes, - SequenceI[] sequences, boolean includeNonPositional) + private int outputFeaturesByGroup(StringBuilder out, FeatureRenderer fr, + String[] featureTypes, SequenceI[] sequences, + boolean includeNonPositional) { List featureGroups = fr.getFeatureGroups(); @@ -868,8 +868,8 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI if (featureTypes.length > 0 && (isNullGroup || visibleGroups.contains(group))) { - features.addAll(sequences[i].getFeatures().getFeaturesForGroup( - true, group, featureTypes)); + features.addAll(sequences[i].getFeatures() + .getFeaturesForGroup(true, group, featureTypes)); } for (SequenceFeature sf : features) @@ -907,9 +907,8 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI * @param sequenceName * @param sequenceFeature */ - protected void formatJalviewFeature( - StringBuilder out, String sequenceName, - SequenceFeature sequenceFeature) + protected void formatJalviewFeature(StringBuilder out, + String sequenceName, SequenceFeature sequenceFeature) { if (sequenceFeature.description == null || sequenceFeature.description.equals("")) @@ -1019,19 +1018,16 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI * Returns features output in GFF2 format * * @param sequences - * the sequences whose features are to be - * output + * the sequences whose features are to be output * @param visible - * a map whose keys are the type names of - * visible features + * a map whose keys are the type names of visible features * @param visibleFeatureGroups * @param includeNonPositionalFeatures * @param includeComplement * @return */ - public String printGffFormat(SequenceI[] sequences, - FeatureRenderer fr, boolean includeNonPositionalFeatures, - boolean includeComplement) + public String printGffFormat(SequenceI[] sequences, FeatureRenderer fr, + boolean includeNonPositionalFeatures, boolean includeComplement) { FeatureRenderer fr2 = null; if (includeComplement) @@ -1040,11 +1036,13 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI fr2 = Desktop.getAlignFrameFor(comp).getFeatureRenderer(); } - Map visibleColours = fr.getDisplayedFeatureCols(); + Map visibleColours = fr + .getDisplayedFeatureCols(); StringBuilder out = new StringBuilder(256); - out.append(String.format("%s %d\n", GFF_VERSION, gffVersion == 0 ? 2 : gffVersion)); + out.append(String.format("%s %d\n", GFF_VERSION, + gffVersion == 0 ? 2 : gffVersion)); String[] types = visibleColours == null ? new String[0] : visibleColours.keySet() @@ -1139,17 +1137,17 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI * AC_Male=0;AF_NFE=0.00000e 00;Hom_FIN=0;GQ_MEDIAN=9 * * - * A map-valued attribute is formatted as a comma-delimited list within braces, - * for example + * A map-valued attribute is formatted as a comma-delimited list within + * braces, for example * *
        * jvmap_CSQ={ALLELE_NUM=1,UNIPARC=UPI0002841053,Feature=ENST00000585561}
        * 
    * - * The {@code jvmap_} prefix designates a values map and is removed if the value - * is parsed when read in. (The GFF3 specification allows 'semi-structured data' - * to be represented provided the attribute name begins with a lower case - * letter.) + * The {@code jvmap_} prefix designates a values map and is removed if the + * value is parsed when read in. (The GFF3 specification allows + * 'semi-structured data' to be represented provided the attribute name begins + * with a lower case letter.) * * @param sb * @param map @@ -1236,11 +1234,11 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI * format) * * @param alignedRegions - * a list of "Align fromStart toStart fromCount" + * a list of "Align fromStart toStart fromCount" * @param mapIsFromCdna - * if true, 'from' is dna, else 'from' is protein + * if true, 'from' is dna, else 'from' is protein * @param strand - * either 1 (forward) or -1 (reverse) + * either 1 (forward) or -1 (reverse) * @return * @throws IOException */ @@ -1458,8 +1456,8 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI List sfs = seq.getFeatures().getPositionalFeatures(); if (!sfs.isEmpty()) { - String newName = (String) sfs.get(0).getValue( - GffHelperI.RENAME_TOKEN); + String newName = (String) sfs.get(0) + .getValue(GffHelperI.RENAME_TOKEN); if (newName != null) { seq.setName(newName); diff --git a/src/jalview/io/FileFormat.java b/src/jalview/io/FileFormat.java index a743694..b701963 100644 --- a/src/jalview/io/FileFormat.java +++ b/src/jalview/io/FileFormat.java @@ -439,8 +439,11 @@ public enum FileFormat implements FileFormatI * @param shortName * @param extensions * comma-separated list of file extensions associated with the format - * @param isReadable - can be recognised by IdentifyFile and imported with the given reader - * @param isWritable - can be exported with the returned writer + * @param isReadable + * - can be recognised by IdentifyFile and imported with the given + * reader + * @param isWritable + * - can be exported with the returned writer */ private FileFormat(String shortName, String extensions, boolean isReadable, boolean isWritable) diff --git a/src/jalview/io/FileFormats.java b/src/jalview/io/FileFormats.java index 9e0a7f7..b7dd834 100644 --- a/src/jalview/io/FileFormats.java +++ b/src/jalview/io/FileFormats.java @@ -176,7 +176,8 @@ public class FileFormats */ public FileFormatI forName(String format) { - return format == null ? null : formats.get(format.toUpperCase(Locale.ROOT)); + return format == null ? null + : formats.get(format.toUpperCase(Locale.ROOT)); } /** diff --git a/src/jalview/io/FileLoader.java b/src/jalview/io/FileLoader.java index 3d2dded..4016e71 100755 --- a/src/jalview/io/FileLoader.java +++ b/src/jalview/io/FileLoader.java @@ -96,7 +96,8 @@ public class FileLoader implements Runnable DataSourceType protocol, FileFormatI format) { this.viewport = viewport; - if (file instanceof File) { + if (file instanceof File) + { this.selectedFile = (File) file; file = selectedFile.getPath(); } @@ -285,7 +286,8 @@ public class FileLoader implements Runnable format = new IdentifyFile().identify(source, false); // identify stream and rewind rather than close } - else if (selectedFile != null) { + else if (selectedFile != null) + { format = new IdentifyFile().identify(selectedFile, protocol); } else @@ -334,7 +336,8 @@ public class FileLoader implements Runnable // We read the data anyway - it might make sense. } // BH 2018 switch to File object here instead of filename - alignFrame = new Jalview2XML(raiseGUI).loadJalviewAlign(selectedFile == null ? file : selectedFile); + alignFrame = new Jalview2XML(raiseGUI).loadJalviewAlign( + selectedFile == null ? file : selectedFile); } else { @@ -362,27 +365,29 @@ public class FileLoader implements Runnable file.lastIndexOf(".")); String tempStructureFileStr = createNamedJvTempFile( urlLeafName, structExt); - + // BH - switching to File object here so as to hold // ._bytes array directly File tempFile = new File(tempStructureFileStr); UrlDownloadClient.download(file, tempFile); - - al = fa.readFile(tempFile, DataSourceType.FILE, - format); + + al = fa.readFile(tempFile, DataSourceType.FILE, format); source = fa.getAlignFile(); } else { - if (selectedFile == null) { + if (selectedFile == null) + { al = fa.readFile(file, protocol, format); - - } else { + + } + else + { al = fa.readFile(selectedFile, protocol, format); - } + } source = fa.getAlignFile(); // keep reference for later if - - // necessary. + + // necessary. } } } catch (java.io.IOException ex) @@ -483,8 +488,8 @@ public class FileLoader implements Runnable try { - alignFrame.setMaximum(Cache - .getDefault("SHOW_FULLSCREEN", false)); + alignFrame.setMaximum( + Cache.getDefault("SHOW_FULLSCREEN", false)); } catch (java.beans.PropertyVetoException ex) { } diff --git a/src/jalview/io/FormatAdapter.java b/src/jalview/io/FormatAdapter.java index 00920db..735619f 100755 --- a/src/jalview/io/FormatAdapter.java +++ b/src/jalview/io/FormatAdapter.java @@ -67,12 +67,9 @@ public class FormatAdapter extends AppletFormatAdapter { if (Cache.getDefault("STRUCT_FROM_PDB", true)) { - annotFromStructure = Cache.getDefault("ADD_TEMPFACT_ANN", - true); - localSecondaryStruct = Cache.getDefault("ADD_SS_ANN", - true); - serviceSecondaryStruct = Cache.getDefault("USE_RNAVIEW", - true); + annotFromStructure = Cache.getDefault("ADD_TEMPFACT_ANN", true); + localSecondaryStruct = Cache.getDefault("ADD_SS_ANN", true); + serviceSecondaryStruct = Cache.getDefault("USE_RNAVIEW", true); } else { @@ -164,8 +161,8 @@ public class FormatAdapter extends AppletFormatAdapter public boolean getCacheSuffixDefault(FileFormatI format) { - return Cache.getDefault(format.getName().toUpperCase(Locale.ROOT) + "_JVSUFFIX", - true); + return Cache.getDefault( + format.getName().toUpperCase(Locale.ROOT) + "_JVSUFFIX", true); } public String formatSequences(FileFormatI format, AlignmentI alignment, diff --git a/src/jalview/io/HtmlSvgOutput.java b/src/jalview/io/HtmlSvgOutput.java index 81773bc..4b66f81 100644 --- a/src/jalview/io/HtmlSvgOutput.java +++ b/src/jalview/io/HtmlSvgOutput.java @@ -58,8 +58,8 @@ public class HtmlSvgOutput extends HTMLOutput return ap.printWrappedAlignment(pwidth, pheight, pi, pg[0]); } - String getHtml(String titleSvg, String alignmentSvg, - String jsonData, boolean wrapped) + String getHtml(String titleSvg, String alignmentSvg, String jsonData, + boolean wrapped) { StringBuilder htmlSvg = new StringBuilder(); htmlSvg.append("\n"); @@ -188,8 +188,8 @@ public class HtmlSvgOutput extends HTMLOutput @Override public boolean isEmbedData() { - return Boolean.valueOf( - Cache.getDefault("EXPORT_EMBBED_BIOJSON", "true")); + return Boolean + .valueOf(Cache.getDefault("EXPORT_EMBBED_BIOJSON", "true")); } @Override @@ -278,11 +278,9 @@ public class HtmlSvgOutput extends HTMLOutput aDimension.getWidth(), aDimension.getHeight()); if (!textCharacters) // Lineart selected { - idPanelGraphics.setRenderingHint( - SVGHints.KEY_DRAW_STRING_TYPE, + idPanelGraphics.setRenderingHint(SVGHints.KEY_DRAW_STRING_TYPE, SVGHints.VALUE_DRAW_STRING_TYPE_VECTOR); - alignPanelGraphics.setRenderingHint( - SVGHints.KEY_DRAW_STRING_TYPE, + alignPanelGraphics.setRenderingHint(SVGHints.KEY_DRAW_STRING_TYPE, SVGHints.VALUE_DRAW_STRING_TYPE_VECTOR); } if (ap.av.getWrapAlignment()) @@ -292,15 +290,15 @@ public class HtmlSvgOutput extends HTMLOutput } else { - printUnwrapped(aDimension.getWidth(), aDimension.getHeight(), - 0, idPanelGraphics, alignPanelGraphics); + printUnwrapped(aDimension.getWidth(), aDimension.getHeight(), 0, + idPanelGraphics, alignPanelGraphics); } String idPanelSvgData = idPanelGraphics.getSVGDocument(); String alignPanelSvgData = alignPanelGraphics.getSVGDocument(); String jsonData = getBioJSONData(); - String htmlData = getHtml(idPanelSvgData, alignPanelSvgData, - jsonData, ap.av.getWrapAlignment()); + String htmlData = getHtml(idPanelSvgData, alignPanelSvgData, jsonData, + ap.av.getWrapAlignment()); FileOutputStream out = new FileOutputStream(generatedFile); out.write(htmlData.getBytes()); out.flush(); diff --git a/src/jalview/io/IdentifyFile.java b/src/jalview/io/IdentifyFile.java index 5a3d700..c21127e 100755 --- a/src/jalview/io/IdentifyFile.java +++ b/src/jalview/io/IdentifyFile.java @@ -33,12 +33,14 @@ import java.io.IOException; */ public class IdentifyFile { - - public FileFormatI identify(Object file, DataSourceType protocol) throws FileFormatException + + public FileFormatI identify(Object file, DataSourceType protocol) + throws FileFormatException { // BH 2018 - return (file instanceof File ? identify((File) file, protocol) : identify((String) file, protocol)); - + return (file instanceof File ? identify((File) file, protocol) + : identify((String) file, protocol)); + } public FileFormatI identify(File file, DataSourceType sourceType) @@ -167,8 +169,8 @@ public class IdentifyFile if (source.inFile != null) { String fileStr = source.inFile.getName(); - if (fileStr.contains(".jar") - || fileStr.contains(".zip") || fileStr.contains(".jvp")) + if (fileStr.contains(".jar") || fileStr.contains(".zip") + || fileStr.contains(".jvp")) { // possibly a Jalview archive (but check further) reply = FileFormat.Jalview; @@ -495,5 +497,4 @@ public class IdentifyFile } } - } diff --git a/src/jalview/io/JSONFile.java b/src/jalview/io/JSONFile.java index 022148a..2ee305f 100644 --- a/src/jalview/io/JSONFile.java +++ b/src/jalview/io/JSONFile.java @@ -218,7 +218,7 @@ public class JSONFile extends AlignFile implements ComplexAlignFile jsonAlignmentPojo.getSeqGroups().add(seqGrpPojo); } } - + jsonOutput = JSONUtils.stringify(jsonAlignmentPojo); return jsonOutput.replaceAll("xstart", "xStart").replaceAll("xend", "xEnd"); @@ -291,16 +291,16 @@ public class JSONFile extends AlignFile implements ComplexAlignFile /* * get all features currently visible (and any non-positional features) */ - List seqFeatures = seq.getFeatures().getAllFeatures( - visibleFeatureTypes); + List seqFeatures = seq.getFeatures() + .getAllFeatures(visibleFeatureTypes); for (SequenceFeature sf : seqFeatures) { SequenceFeaturesPojo jsonFeature = new SequenceFeaturesPojo( String.valueOf(seq.hashCode())); - String featureColour = (fr == null) ? null : Format - .getHexString(finder.findFeatureColour(Color.white, seq, - seq.findIndex(sf.getBegin()))); + String featureColour = (fr == null) ? null + : Format.getHexString(finder.findFeatureColour(Color.white, + seq, seq.findIndex(sf.getBegin()))); int xStart = sf.getBegin() == 0 ? 0 : seq.findIndex(sf.getBegin()) - 1; int xEnd = sf.getEnd() == 0 ? 0 : seq.findIndex(sf.getEnd()); @@ -395,8 +395,10 @@ public class JSONFile extends AlignFile implements ComplexAlignFile { try { - Map alignmentJsonObj = (Map) JSONUtils.parse(jsonAlignmentString); - List seqJsonArray = (List) alignmentJsonObj.get("seqs"); + Map alignmentJsonObj = (Map) JSONUtils + .parse(jsonAlignmentString); + List seqJsonArray = (List) alignmentJsonObj + .get("seqs"); List alAnnotJsonArray = (List) alignmentJsonObj .get("alignAnnotation"); List jsonSeqArray = (List) alignmentJsonObj @@ -419,9 +421,11 @@ public class JSONFile extends AlignFile implements ComplexAlignFile hiddenSequences = new ArrayList<>(); seqMap = new Hashtable<>(); - for (Iterator sequenceIter = seqJsonArray.iterator(); sequenceIter.hasNext();) + for (Iterator sequenceIter = seqJsonArray + .iterator(); sequenceIter.hasNext();) { - Map sequence = (Map) sequenceIter.next(); + Map sequence = (Map) sequenceIter + .next(); String sequcenceString = sequence.get("seq").toString(); String sequenceName = sequence.get("name").toString(); String seqUniqueId = sequence.get("id").toString(); @@ -439,9 +443,11 @@ public class JSONFile extends AlignFile implements ComplexAlignFile parseFeatures(jsonSeqArray); - for (Iterator seqGrpIter = seqGrpJsonArray.iterator(); seqGrpIter.hasNext();) + for (Iterator seqGrpIter = seqGrpJsonArray + .iterator(); seqGrpIter.hasNext();) { - Map seqGrpObj = (Map)seqGrpIter.next(); + Map seqGrpObj = (Map) seqGrpIter + .next(); String grpName = seqGrpObj.get("groupName").toString(); String colourScheme = seqGrpObj.get("colourScheme").toString(); String description = (seqGrpObj.get("description") == null) ? null @@ -457,7 +463,8 @@ public class JSONFile extends AlignFile implements ComplexAlignFile int startRes = Integer .valueOf(seqGrpObj.get("startRes").toString()); int endRes = Integer.valueOf(seqGrpObj.get("endRes").toString()); - List sequenceRefs = (List) seqGrpObj.get("sequenceRefs"); + List sequenceRefs = (List) seqGrpObj + .get("sequenceRefs"); ArrayList grpSeqs = new ArrayList<>(); if (sequenceRefs.size() > 0) @@ -482,15 +489,20 @@ public class JSONFile extends AlignFile implements ComplexAlignFile } - for (Iterator alAnnotIter = alAnnotJsonArray.iterator(); alAnnotIter.hasNext();) + for (Iterator alAnnotIter = alAnnotJsonArray + .iterator(); alAnnotIter.hasNext();) { - Map alAnnot = (Map) alAnnotIter.next(); - List annotJsonArray = (List) alAnnot.get("annotations"); + Map alAnnot = (Map) alAnnotIter + .next(); + List annotJsonArray = (List) alAnnot + .get("annotations"); Annotation[] annotations = new Annotation[annotJsonArray.size()]; int count = 0; - for (Iterator annotIter = annotJsonArray.iterator(); annotIter.hasNext();) + for (Iterator annotIter = annotJsonArray + .iterator(); annotIter.hasNext();) { - Map annot = (Map) annotIter.next(); + Map annot = (Map) annotIter + .next(); if (annot == null) { annotations[count] = null; @@ -632,7 +644,7 @@ public class JSONFile extends AlignFile implements ComplexAlignFile displayedFeatures = new FeaturesDisplayed(); for (Object o : jsonSeqFeatures) { - Map jsonFeature = (Map) o; + Map jsonFeature = (Map) o; Long begin = (Long) jsonFeature.get("xStart"); Long end = (Long) jsonFeature.get("xEnd"); String type = (String) jsonFeature.get("type"); @@ -646,15 +658,16 @@ public class JSONFile extends AlignFile implements ComplexAlignFile /* * begin/end of 0 is for a non-positional feature */ - int featureBegin = begin.intValue() == 0 ? 0 : seq - .findPosition(begin.intValue()); - int featureEnd = end.intValue() == 0 ? 0 : seq.findPosition(end - .intValue()) - 1; + int featureBegin = begin.intValue() == 0 ? 0 + : seq.findPosition(begin.intValue()); + int featureEnd = end.intValue() == 0 ? 0 + : seq.findPosition(end.intValue()) - 1; SequenceFeature sequenceFeature = new SequenceFeature(type, description, featureBegin, featureEnd, score, featureGrp); - List linksJsonArray = (List) jsonFeature.get("links"); + List linksJsonArray = (List) jsonFeature + .get("links"); if (linksJsonArray != null && linksJsonArray.size() > 0) { Iterator linkList = linksJsonArray.iterator(); diff --git a/src/jalview/io/JalviewFileChooser.java b/src/jalview/io/JalviewFileChooser.java index 88a20e7..a9101a1 100755 --- a/src/jalview/io/JalviewFileChooser.java +++ b/src/jalview/io/JalviewFileChooser.java @@ -65,13 +65,13 @@ import javax.swing.plaf.basic.BasicFileChooserUI; * @author AMW * */ -public class JalviewFileChooser extends JFileChooser implements DialogRunnerI, - PropertyChangeListener +public class JalviewFileChooser extends JFileChooser + implements DialogRunnerI, PropertyChangeListener { private static final long serialVersionUID = 1L; private Map callbacks = new HashMap<>(); - + File selectedFile = null; /** @@ -211,15 +211,15 @@ public class JalviewFileChooser extends JFileChooser implements DialogRunnerI, } /** - * Overridden for JalviewJS compatibility: only one thread in Javascript, - * so we can't wait for user choice in another thread and then perform the + * Overridden for JalviewJS compatibility: only one thread in Javascript, so + * we can't wait for user choice in another thread and then perform the * desired action */ @Override public int showOpenDialog(Component parent) { int value = super.showOpenDialog(this); - + if (!Platform.isJS()) /** * Java only @@ -284,7 +284,8 @@ public class JalviewFileChooser extends JFileChooser implements DialogRunnerI, multi.setLayout(new BoxLayout(multi, BoxLayout.PAGE_AXIS)); if (backupfilesCheckBox == null) { - try { + try + { includeBackupFiles = Boolean.parseBoolean( Cache.getProperty(BackupFiles.NS + "_FC_INCLUDE")); } catch (Exception e) @@ -314,8 +315,8 @@ public class JalviewFileChooser extends JFileChooser implements DialogRunnerI, } // fake the OK button changing (to force it to upate) String s = jfc.getApproveButtonText(); - jfc.firePropertyChange( - APPROVE_BUTTON_TEXT_CHANGED_PROPERTY, null, s); + jfc.firePropertyChange(APPROVE_BUTTON_TEXT_CHANGED_PROPERTY, + null, s); // fake the file filter changing (its behaviour actually has) jfc.firePropertyChange(FILE_FILTER_CHANGED_PROPERTY, null, f); @@ -524,11 +525,12 @@ public class JalviewFileChooser extends JFileChooser implements DialogRunnerI, class RecentlyOpened extends JPanel { private static final long serialVersionUID = 1L; + JList list; RecentlyOpened() { - setPreferredSize(new Dimension(300,100)); + setPreferredSize(new Dimension(300, 100)); String historyItems = Cache.getProperty("RECENT_FILE"); StringTokenizer st; Vector recent = new Vector<>(); @@ -544,7 +546,7 @@ public class JalviewFileChooser extends JFileChooser implements DialogRunnerI, } list = new JList<>(recent); - + DefaultListCellRenderer dlcr = new DefaultListCellRenderer(); dlcr.setHorizontalAlignment(DefaultListCellRenderer.RIGHT); list.setCellRenderer(dlcr); @@ -597,16 +599,16 @@ public class JalviewFileChooser extends JFileChooser implements DialogRunnerI, @Override public DialogRunnerI setResponseHandler(Object response, Runnable action) { - callbacks.put(response, action); - return this; + callbacks.put(response, action); + return this; } @Override public void handleResponse(Object response) { /* - * this test is for NaN in Chrome - */ + * this test is for NaN in Chrome + */ if (response != null && !response.equals(response)) { return; @@ -619,9 +621,9 @@ public class JalviewFileChooser extends JFileChooser implements DialogRunnerI, } /** - * JalviewJS signals file selection by a property change event - * for property "SelectedFile". This methods responds to that by - * running the response action for 'OK' in the dialog. + * JalviewJS signals file selection by a property change event for property + * "SelectedFile". This methods responds to that by running the response + * action for 'OK' in the dialog. * * @param evt */ @@ -634,7 +636,7 @@ public class JalviewFileChooser extends JFileChooser implements DialogRunnerI, /* * property name here matches that used in JFileChooser.js */ - case "SelectedFile": + case "SelectedFile": handleResponse(APPROVE_OPTION); break; } diff --git a/src/jalview/io/JalviewFileFilter.java b/src/jalview/io/JalviewFileFilter.java index 28dd2eb..10dc9ea 100755 --- a/src/jalview/io/JalviewFileFilter.java +++ b/src/jalview/io/JalviewFileFilter.java @@ -123,7 +123,7 @@ public class JalviewFileFilter extends FileFilter } } } - + return false; } diff --git a/src/jalview/io/JalviewFileView.java b/src/jalview/io/JalviewFileView.java index b90bd7a..a9fc7ed 100755 --- a/src/jalview/io/JalviewFileView.java +++ b/src/jalview/io/JalviewFileView.java @@ -50,8 +50,7 @@ public class JalviewFileView extends FileView for (String ext : exts.split(",")) { ext = ext.trim().toLowerCase(Locale.ROOT); - extensions.put(ext, - desc + ("jar".equals(ext) ? " (old)" : "")); + extensions.put(ext, desc + ("jar".equals(ext) ? " (old)" : "")); } } } @@ -60,9 +59,9 @@ public class JalviewFileView extends FileView public String getTypeDescription(File f) { String extension = getExtension(f); - + String type = getDescriptionForExtension(extension); - + if (extension != null) { if (extensions.containsKey(extension)) diff --git a/src/jalview/io/MSFfile.java b/src/jalview/io/MSFfile.java index e954703..158feb9 100755 --- a/src/jalview/io/MSFfile.java +++ b/src/jalview/io/MSFfile.java @@ -372,8 +372,7 @@ public class MSFfile extends AlignFile int end = start + 10; int length = s[j].getLength(); - if ((end < length) - && (start < length)) + if ((end < length) && (start < length)) { out.append(s[j].getSequence(start, end)); diff --git a/src/jalview/io/ModellerDescription.java b/src/jalview/io/ModellerDescription.java index d66fe6c..e184d74 100755 --- a/src/jalview/io/ModellerDescription.java +++ b/src/jalview/io/ModellerDescription.java @@ -99,8 +99,7 @@ public class ModellerDescription private resCode validResidueCode(String field) { Integer val = null; - Regex r = new Regex( - "\\s*((([-0-9]+).?)|FIRST|LAST|@)"); + Regex r = new Regex("\\s*((([-0-9]+).?)|FIRST|LAST|@)"); if (!r.search(field)) { @@ -280,15 +279,14 @@ public class ModellerDescription List dbr = seq.getDatasetSequence().getDBRefs(); for (int i = 0, ni = dbr.size(); i < ni; i++) { - DBRefEntry dbri = dbr.get(i); + DBRefEntry dbri = dbr.get(i); if (dbri != null) { // JBPNote PDB dbRefEntry needs properties to propagate onto // ModellerField // JBPNote Need to get info from the user about whether the sequence // is the one being modelled, or if it is a template. - if (dbri.getSource() - .equals(jalview.datamodel.DBRefSource.PDB)) + if (dbri.getSource().equals(jalview.datamodel.DBRefSource.PDB)) { fields.put(Fields[LOCALID], dbri.getAccessionId()); t = 2; diff --git a/src/jalview/io/NewickFile.java b/src/jalview/io/NewickFile.java index ec5d267..4a30d73 100755 --- a/src/jalview/io/NewickFile.java +++ b/src/jalview/io/NewickFile.java @@ -296,8 +296,7 @@ public class NewickFile extends FileParse boolean ascending = false; // flag indicating that we are leaving the // current node - Regex majorsyms = new Regex( - "[(\\['),;]"); + Regex majorsyms = new Regex("[(\\['),;]"); int nextcp = 0; int ncp = cp; @@ -356,8 +355,7 @@ public class NewickFile extends FileParse // Deal with quoted fields case '\'': - Regex qnodename = new Regex( - "'([^']|'')+'"); + Regex qnodename = new Regex("'([^']|'')+'"); if (qnodename.searchFrom(nf, fcp)) { @@ -365,8 +363,7 @@ public class NewickFile extends FileParse nodename = new String( qnodename.stringMatched().substring(1, nl - 1)); // unpack any escaped colons - Regex xpandquotes = Regex - .perlCode("s/''/'/"); + Regex xpandquotes = Regex.perlCode("s/''/'/"); String widernodename = xpandquotes.replaceAll(nodename); nodename = widernodename; // jump to after end of quoted nodename @@ -400,8 +397,7 @@ public class NewickFile extends FileParse * '"+nf.substring(cp,fcp)+"'"); } */ // verify termination. - Regex comment = new Regex( - "]"); + Regex comment = new Regex("]"); if (comment.searchFrom(nf, fcp)) { // Skip the comment field @@ -432,12 +428,9 @@ public class NewickFile extends FileParse + fstring.substring(cend + 1); } - Regex uqnodename = new Regex( - "\\b([^' :;\\](),]+)"); - Regex nbootstrap = new Regex( - "\\s*([0-9+]+)\\s*:"); - Regex ndist = new Regex( - ":([-0-9Ee.+]+)"); + Regex uqnodename = new Regex("\\b([^' :;\\](),]+)"); + Regex nbootstrap = new Regex("\\s*([0-9+]+)\\s*:"); + Regex ndist = new Regex(":([-0-9Ee.+]+)"); if (!parsednodename && uqnodename.search(fstring) && ((uqnodename.matchedFrom(1) == 0) || (fstring diff --git a/src/jalview/io/PhylipFile.java b/src/jalview/io/PhylipFile.java index 539826f..12e87a6 100644 --- a/src/jalview/io/PhylipFile.java +++ b/src/jalview/io/PhylipFile.java @@ -247,9 +247,7 @@ public class PhylipFile extends AlignFile StringBuffer sb = new StringBuffer(Integer.toString(sqs.length)); sb.append(" "); // if there are no sequences, then define the number of characters as 0 - sb.append( -(sqs.length > 0) ? Integer.toString(sqs[0].getLength()) - : "0") + sb.append((sqs.length > 0) ? Integer.toString(sqs[0].getLength()) : "0") .append(newline); // Due to how IO is handled, there doesn't appear to be a way to store diff --git a/src/jalview/io/PileUpfile.java b/src/jalview/io/PileUpfile.java index f7f718b..ede258e 100755 --- a/src/jalview/io/PileUpfile.java +++ b/src/jalview/io/PileUpfile.java @@ -92,8 +92,8 @@ public class PileUpfile extends MSFfile i++; } - out.append(" MSF: " + s[0].getLength() - + " Type: P Check: " + bigChecksum % 10000 + " .."); + out.append(" MSF: " + s[0].getLength() + " Type: P Check: " + + bigChecksum % 10000 + " .."); out.append(newline); out.append(newline); out.append(newline); diff --git a/src/jalview/io/SequenceAnnotationReport.java b/src/jalview/io/SequenceAnnotationReport.java index 9ffdf21..c5bc902 100644 --- a/src/jalview/io/SequenceAnnotationReport.java +++ b/src/jalview/io/SequenceAnnotationReport.java @@ -59,7 +59,7 @@ public class SequenceAnnotationReport private static String linkImageURL; - // public static final String[][] PRIMARY_SOURCES moved to DBRefSource.java + // public static final String[][] PRIMARY_SOURCES moved to DBRefSource.java /* * Comparator to order DBRefEntry by Source + accession id (case-insensitive), @@ -91,32 +91,32 @@ public class SequenceAnnotationReport { return 1; } - int comp = s1 == null ? -1 : (s2 == null ? 1 : s1 - .compareToIgnoreCase(s2)); + int comp = s1 == null ? -1 + : (s2 == null ? 1 : s1.compareToIgnoreCase(s2)); if (comp == 0) { String a1 = ref1.getAccessionId(); String a2 = ref2.getAccessionId(); - comp = a1 == null ? -1 : (a2 == null ? 1 : a1 - .compareToIgnoreCase(a2)); + comp = a1 == null ? -1 + : (a2 == null ? 1 : a1.compareToIgnoreCase(a2)); } return comp; } -// private boolean isPrimarySource(String source) -// { -// for (String[] primary : DBRefSource.PRIMARY_SOURCES) -// { -// for (String s : primary) -// { -// if (source.equals(s)) -// { -// return true; -// } -// } -// } -// return false; -// } + // private boolean isPrimarySource(String source) + // { + // for (String[] primary : DBRefSource.PRIMARY_SOURCES) + // { + // for (String s : primary) + // { + // if (source.equals(s)) + // { + // return true; + // } + // } + // } + // return false; + // } }; private boolean forTooltip; @@ -150,9 +150,9 @@ public class SequenceAnnotationReport * @param minmax * @param maxlength */ - public int appendFeatures(final StringBuilder sb, - int residuePos, List features, - FeatureRendererModel fr, int maxlength) + public int appendFeatures(final StringBuilder sb, int residuePos, + List features, FeatureRendererModel fr, + int maxlength) { for (int i = 0; i < features.size(); i++) { @@ -412,21 +412,19 @@ public class SequenceAnnotationReport { for (List urllink : createLinksFrom(null, urlstring)) { - sb.append("
    " - + (urllink.get(0).toLowerCase(Locale.ROOT) - .equals(urllink.get(1).toLowerCase(Locale.ROOT)) ? urllink - .get(0) : (urllink.get(0) + ":" + urllink - .get(1))) + sb.append("
    " + + (urllink.get(0).toLowerCase(Locale.ROOT).equals( + urllink.get(1).toLowerCase(Locale.ROOT)) + ? urllink.get(0) + : (urllink.get(0) + ":" + + urllink.get(1))) + "
    "); } } catch (Exception x) { - System.err.println("problem when creating links from " - + urlstring); + System.err.println( + "problem when creating links from " + urlstring); x.printStackTrace(); } } @@ -620,8 +618,8 @@ public class SequenceAnnotationReport SequenceI sequence, boolean showDbRefs, boolean showNpFeats, FeatureRendererModel fr) { - int maxWidth = createSequenceAnnotationReport(tip, sequence, - showDbRefs, showNpFeats, fr, true); + int maxWidth = createSequenceAnnotationReport(tip, sequence, showDbRefs, + showNpFeats, fr, true); if (maxWidth > 60) { diff --git a/src/jalview/io/StructureFile.java b/src/jalview/io/StructureFile.java index 94a832b..6b623a1 100644 --- a/src/jalview/io/StructureFile.java +++ b/src/jalview/io/StructureFile.java @@ -342,10 +342,10 @@ public abstract class StructureFile extends AlignFile } StructureImportSettings.setShowSeqFeatures(true); } - + /** - * Answers the first PDBChain found matching the given id, or null if none - * is found + * Answers the first PDBChain found matching the given id, or null if none is + * found * * @param id * @return diff --git a/src/jalview/io/VamsasAppDatastore.java b/src/jalview/io/VamsasAppDatastore.java index 5365dfa..dd4b72c 100644 --- a/src/jalview/io/VamsasAppDatastore.java +++ b/src/jalview/io/VamsasAppDatastore.java @@ -1427,7 +1427,7 @@ public class VamsasAppDatastore String seqsetidobj = av.getSequenceSetId(); views = Desktop.getViewports(seqsetidobj); Console.debug("Found " + (views == null ? " no " : "" + views.length) - + " views for '" + av.getSequenceSetId() + "'"); + + " views for '" + av.getSequenceSetId() + "'"); if (views.length > 1) { // we need to close the original document view. diff --git a/src/jalview/io/gff/GffHelperBase.java b/src/jalview/io/gff/GffHelperBase.java index 3db1755..22386d4 100644 --- a/src/jalview/io/gff/GffHelperBase.java +++ b/src/jalview/io/gff/GffHelperBase.java @@ -381,7 +381,8 @@ public abstract class GffHelperBase implements GffHelperI * @return */ protected SequenceFeature buildSequenceFeature(String[] gff, - int typeColumn, String group, Map> attributes) + int typeColumn, String group, + Map> attributes) { try { diff --git a/src/jalview/io/gff/InterProScanHelper.java b/src/jalview/io/gff/InterProScanHelper.java index 948cdd2..91f0018 100644 --- a/src/jalview/io/gff/InterProScanHelper.java +++ b/src/jalview/io/gff/InterProScanHelper.java @@ -75,7 +75,8 @@ public class InterProScanHelper extends Gff3Helper /** * An override that *
      - *
    • uses Source (column 2) as feature type instead of the default column 3
    • + *
    • uses Source (column 2) as feature type instead of the default column + * 3
    • *
    • sets "InterProScan" as the feature group
    • *
    • extracts "signature_desc" attribute as the feature description
    • *
    diff --git a/src/jalview/io/vamsas/Datasetsequence.java b/src/jalview/io/vamsas/Datasetsequence.java index d24e947..0362776 100644 --- a/src/jalview/io/vamsas/Datasetsequence.java +++ b/src/jalview/io/vamsas/Datasetsequence.java @@ -186,7 +186,8 @@ public class Datasetsequence extends DatastoreItem { modifiedthedoc |= new jalview.io.vamsas.Dbref(datastore, // dbentry = - entries.get(db), sq, (Sequence) vobj, dataset).docWasUpdated(); + entries.get(db), sq, (Sequence) vobj, dataset) + .docWasUpdated(); } diff --git a/src/jalview/io/vamsas/Dbref.java b/src/jalview/io/vamsas/Dbref.java index 91bf666..e9f44d0 100644 --- a/src/jalview/io/vamsas/Dbref.java +++ b/src/jalview/io/vamsas/Dbref.java @@ -160,7 +160,7 @@ public class Dbref extends Rangetype if (vobj.getMapCount() > 1) { Console.debug("Ignoring additional mappings on DbRef: " - + jvobj.getSource() + ":" + jvobj.getAccessionId()); + + jvobj.getSource() + ":" + jvobj.getAccessionId()); } jalview.datamodel.Mapping mp = new jalview.datamodel.Mapping( parsemapType(vobj.getMap(0))); @@ -176,7 +176,7 @@ public class Dbref extends Rangetype DbRef vobj = (DbRef) this.vobj; DBRefEntry jvobj = (DBRefEntry) this.jvobj; Console.debug("Conflict in dbentry update for " + vobj.getAccessionId() - + vobj.getSource() + " " + vobj.getVorbaId()); + + vobj.getSource() + " " + vobj.getVorbaId()); // TODO Auto-generated method stub } @@ -195,7 +195,7 @@ public class Dbref extends Rangetype if (vobj.getMapCount() > 1) { Console.debug("Ignoring additional mappings on DbRef: " - + jvobj.getSource() + ":" + jvobj.getAccessionId()); + + jvobj.getSource() + ":" + jvobj.getAccessionId()); } jalview.datamodel.Mapping mp = new jalview.datamodel.Mapping( parsemapType(vobj.getMap(0))); diff --git a/src/jalview/io/vamsas/Rangetype.java b/src/jalview/io/vamsas/Rangetype.java index bd25c62..9c94ddd 100644 --- a/src/jalview/io/vamsas/Rangetype.java +++ b/src/jalview/io/vamsas/Rangetype.java @@ -273,8 +273,8 @@ public abstract class Rangetype extends DatastoreItem if (!map.getLocal().hasUnit() || map.getMapped().hasUnit()) { Console.warn("using default mapping length of 1:1 for map " - + (map.isRegistered() ? map.getVorbaId().toString() - : (" " + map.toString()))); + + (map.isRegistered() ? map.getVorbaId().toString() + : (" " + map.toString()))); } return parsemapType(map, 1, 1); } diff --git a/src/jalview/io/vamsas/Sequencemapping.java b/src/jalview/io/vamsas/Sequencemapping.java index 5a172fe..a33390f 100644 --- a/src/jalview/io/vamsas/Sequencemapping.java +++ b/src/jalview/io/vamsas/Sequencemapping.java @@ -244,8 +244,7 @@ public class Sequencemapping extends Rangetype private void update(jalview.datamodel.Mapping mjvmapping, SequenceMapping sequenceMapping) { - Console.error( - "Not implemented: Jalview Update Sequence DBRef Mapping"); + Console.error("Not implemented: Jalview Update Sequence DBRef Mapping"); } /** @@ -390,28 +389,28 @@ public class Sequencemapping extends Rangetype { if (Console.isDebugEnabled()) { - Console.debug("Not matching conjugate refs for " - + from.getName() + " and " + to.getName()); + Console.debug("Not matching conjugate refs for " + from.getName() + + " and " + to.getName()); } return; } if (Console.isDebugEnabled()) { - Console.debug("Matching conjugate refs for " - + from.getName() + " and " + to.getName()); + Console.debug("Matching conjugate refs for " + from.getName() + + " and " + to.getName()); } List fdb = from.getDBRefs(); List tdb = new ArrayList(to.getDBRefs()); int tdblen = to.getDBRefs().size(); -// -// -// YOWSER -// -// System.arraycopy(to.getDBRefs(), 0, tdb, 0, tdblen); -// -// -// -// + // + // + // YOWSER + // + // System.arraycopy(to.getDBRefs(), 0, tdb, 0, tdblen); + // + // + // + // Vector matched = new Vector(); jalview.util.MapList smapI = smap.getInverse(); for (int f = 0, fn = fdb.size(); f < fn; f++) diff --git a/src/jalview/io/vamsas/Tree.java b/src/jalview/io/vamsas/Tree.java index 1b7a8bf..e8f6f6b 100644 --- a/src/jalview/io/vamsas/Tree.java +++ b/src/jalview/io/vamsas/Tree.java @@ -319,8 +319,7 @@ public class Tree extends DatastoreItem if (tp.getTree() == null) { - Console.warn( - "Not updating SequenceTreeMap for " + tree.getVorbaId()); + Console.warn("Not updating SequenceTreeMap for " + tree.getVorbaId()); return; } Vector leaves = tp.getTree() @@ -532,9 +531,8 @@ public class Tree extends DatastoreItem { if (tp.getEntry(pe).getInputCount() > 1) { - Console.warn( - "Ignoring additional input spec in provenance entry " - + tp.getEntry(pe).toString()); + Console.warn("Ignoring additional input spec in provenance entry " + + tp.getEntry(pe).toString()); } // LATER: deal sensibly with multiple inputs Input vInput = tp.getEntry(pe).getInput(0); diff --git a/src/jalview/io/vcf/VCFLoader.java b/src/jalview/io/vcf/VCFLoader.java index 29b3004..ea5b8e0 100644 --- a/src/jalview/io/vcf/VCFLoader.java +++ b/src/jalview/io/vcf/VCFLoader.java @@ -96,13 +96,14 @@ public class VCFLoader private static final String DEFAULT_SPECIES = "homo_sapiens"; /** - * A class to model the mapping from sequence to VCF coordinates. Cases include + * A class to model the mapping from sequence to VCF coordinates. Cases + * include *
      *
    • a direct 1:1 mapping where the sequence is one of the VCF contigs
    • - *
    • a mapping of sequence to chromosomal coordinates, where sequence and VCF - * use the same reference assembly
    • - *
    • a modified mapping of sequence to chromosomal coordinates, where sequence - * and VCF use different reference assembles
    • + *
    • a mapping of sequence to chromosomal coordinates, where sequence and + * VCF use the same reference assembly
    • + *
    • a modified mapping of sequence to chromosomal coordinates, where + * sequence and VCF use different reference assembles
    • *
    */ class VCFMap @@ -146,15 +147,20 @@ public class VCFLoader private static final String VCF_SPECIES = "VCF_SPECIES"; // default is human - private static final String DEFAULT_REFERENCE = "grch37"; // fallback default is human GRCh37 + private static final String DEFAULT_REFERENCE = "grch37"; // fallback default + // is human GRCh37 /* * keys to fields of VEP CSQ consequence data * see https://www.ensembl.org/info/docs/tools/vep/vep_formats.html */ private static final String CSQ_CONSEQUENCE_KEY = "Consequence"; + private static final String CSQ_ALLELE_KEY = "Allele"; - private static final String CSQ_ALLELE_NUM_KEY = "ALLELE_NUM"; // 0 (ref), 1... + + private static final String CSQ_ALLELE_NUM_KEY = "ALLELE_NUM"; // 0 (ref), + // 1... + private static final String CSQ_FEATURE_KEY = "Feature"; // Ensembl stable id /* @@ -225,8 +231,11 @@ public class VCFLoader * see http://www.ensembl.org/info/docs/tools/vep/vep_formats.html */ private int csqConsequenceFieldIndex = -1; + private int csqAlleleFieldIndex = -1; + private int csqAlleleNumberFieldIndex = -1; + private int csqFeatureFieldIndex = -1; // todo the same fields for SnpEff ANN data if wanted @@ -312,7 +321,8 @@ public class VCFLoader */ public SequenceI loadVCFContig(String contig) { - VCFHeaderLine headerLine = header.getOtherHeaderLine(VCFHeader.REFERENCE_KEY); + VCFHeaderLine headerLine = header + .getOtherHeaderLine(VCFHeader.REFERENCE_KEY); if (headerLine == null) { Console.error("VCF reference header not found"); @@ -413,9 +423,9 @@ public class VCFLoader /** * Attempts to determine and save the species and genome assembly version to - * which the VCF data applies. This may be done by parsing the {@code reference} - * header line, configured in a property file, or (potentially) confirmed - * interactively by the user. + * which the VCF data applies. This may be done by parsing the + * {@code reference} header line, configured in a property file, or + * (potentially) confirmed interactively by the user. *

    * The saved values should be identifiers valid for Ensembl's REST service * {@code map} endpoint, so they can be used (if necessary) to retrieve the @@ -665,7 +675,7 @@ public class VCFLoader { try { - patterns.add(Pattern.compile(token.toUpperCase(Locale.ROOT))); + patterns.add(Pattern.compile(token.toUpperCase(Locale.ROOT))); } catch (PatternSyntaxException e) { System.err.println("Invalid pattern ignored: " + token); @@ -723,8 +733,8 @@ public class VCFLoader } /** - * Tries to add overlapping variants read from a VCF file to the given sequence, - * and returns the number of variant features added + * Tries to add overlapping variants read from a VCF file to the given + * sequence, and returns the number of variant features added * * @param seq * @return @@ -821,10 +831,9 @@ public class VCFLoader vcfAssembly); if (newRange == null) { - Console.error( - String.format("Failed to map %s:%s:%s:%d:%d to %s", species, - chromosome, seqRef, range[0], range[1], - vcfAssembly)); + Console.error(String.format("Failed to map %s:%s:%s:%d:%d to %s", + species, chromosome, seqRef, range[0], range[1], + vcfAssembly)); continue; } else @@ -920,7 +929,7 @@ public class VCFLoader * RuntimeException throwable by htsjdk */ String msg = String.format("Error reading VCF for %s:%d-%d: %s ", - map.chromosome, vcfStart, vcfEnd,e.getLocalizedMessage()); + map.chromosome, vcfStart, vcfEnd, e.getLocalizedMessage()); Console.error(msg); } } @@ -985,8 +994,8 @@ public class VCFLoader /** * Inspects one allele and attempts to add a variant feature for it to the * sequence. The additional data associated with this allele is extracted to - * store in the feature's key-value map. Answers the number of features added (0 - * or 1). + * store in the feature's key-value map. Answers the number of features added + * (0 or 1). * * @param seq * @param variant @@ -1034,10 +1043,10 @@ public class VCFLoader * pick out the consequence data (if any) that is for the current allele * and feature (transcript) that matches the current sequence */ - String consequence = getConsequenceForAlleleAndFeature(variant, CSQ_FIELD, - altAlleleIndex, csqAlleleFieldIndex, - csqAlleleNumberFieldIndex, seq.getName().toLowerCase(Locale.ROOT), - csqFeatureFieldIndex); + String consequence = getConsequenceForAlleleAndFeature(variant, + CSQ_FIELD, altAlleleIndex, csqAlleleFieldIndex, + csqAlleleNumberFieldIndex, + seq.getName().toLowerCase(Locale.ROOT), csqFeatureFieldIndex); /* * pick out the ontology term for the consequence type @@ -1077,8 +1086,8 @@ public class VCFLoader /** * Answers the VCF FILTER value for the variant - or an approximation to it. * This field is either PASS, or a semi-colon separated list of filters not - * passed. htsjdk saves filters as a HashSet, so the order when reassembled into - * a list may be different. + * passed. htsjdk saves filters as a HashSet, so the order when reassembled + * into a list may be different. * * @param variant * @return @@ -1122,9 +1131,9 @@ public class VCFLoader } /** - * Determines the Sequence Ontology term to use for the variant feature type in - * Jalview. The default is 'sequence_variant', but a more specific term is used - * if: + * Determines the Sequence Ontology term to use for the variant feature type + * in Jalview. The default is 'sequence_variant', but a more specific term is + * used if: *

      *
    • VEP (or SnpEff) Consequence annotation is included in the VCF
    • *
    • sequence id can be matched to VEP Feature (or SnpEff Feature_ID)
    • @@ -1202,8 +1211,7 @@ public class VCFLoader */ private String getConsequenceForAlleleAndFeature(VariantContext variant, String vcfInfoId, int altAlleleIndex, int alleleFieldIndex, - int alleleNumberFieldIndex, - String seqName, int featureFieldIndex) + int alleleNumberFieldIndex, String seqName, int featureFieldIndex) { if (alleleFieldIndex == -1 || featureFieldIndex == -1) { @@ -1228,8 +1236,8 @@ public class VCFLoader if (csqFields.length > featureFieldIndex) { String featureIdentifier = csqFields[featureFieldIndex]; - if (featureIdentifier.length() > 4 - && seqName.indexOf(featureIdentifier.toLowerCase(Locale.ROOT)) > -1) + if (featureIdentifier.length() > 4 && seqName + .indexOf(featureIdentifier.toLowerCase(Locale.ROOT)) > -1) { /* * feature (transcript) matched - now check for allele match @@ -1364,9 +1372,9 @@ public class VCFLoader } /** - * Answers true for '.', null, or an empty value, or if the INFO type is String. - * If the INFO type is Integer or Float, answers false if the value is not in - * valid format. + * Answers true for '.', null, or an empty value, or if the INFO type is + * String. If the INFO type is Integer or Float, answers false if the value is + * not in valid format. * * @param variant * @param infoId @@ -1591,8 +1599,8 @@ public class VCFLoader * @param toRef * @return */ - protected int[] findSubsumedRangeMapping(int[] queryRange, String chromosome, - String species, String fromRef, String toRef) + protected int[] findSubsumedRangeMapping(int[] queryRange, + String chromosome, String species, String fromRef, String toRef) { String key = makeRangesKey(chromosome, species, fromRef, toRef); if (assemblyMappings.containsKey(key)) @@ -1614,7 +1622,8 @@ public class VCFLoader */ int offset = queryRange[0] - fromRange[0]; int mappedRangeFrom = toRange[0] + offset; - int mappedRangeTo = mappedRangeFrom + (queryRange[1] - queryRange[0]); + int mappedRangeTo = mappedRangeFrom + + (queryRange[1] - queryRange[0]); return new int[] { mappedRangeFrom, mappedRangeTo }; } } @@ -1637,7 +1646,7 @@ public class VCFLoader SequenceI targetSequence, MapList mapping) { int[] mappedRange = mapping.locateInTo(sf.getBegin(), sf.getEnd()); - + if (mappedRange != null) { String group = sf.getFeatureGroup(); @@ -1661,7 +1670,6 @@ public class VCFLoader protected static String makeRangesKey(String chromosome, String species, String fromRef, String toRef) { - return species + EXCL + chromosome + EXCL + fromRef + EXCL - + toRef; + return species + EXCL + chromosome + EXCL + fromRef + EXCL + toRef; } } diff --git a/src/jalview/javascript/MouseOverStructureListener.java b/src/jalview/javascript/MouseOverStructureListener.java index 8d83e75..e90b968 100644 --- a/src/jalview/javascript/MouseOverStructureListener.java +++ b/src/jalview/javascript/MouseOverStructureListener.java @@ -221,9 +221,8 @@ public class MouseOverStructureListener extends JSFunctionExec // structure ArrayList ccomands = new ArrayList<>(); ArrayList pdbfn = new ArrayList<>(); - String[] colcommands = new JmolCommands() - .colourBySequence(ssm, modelSet, sequence, sr, - (AlignmentViewPanel) source); + String[] colcommands = new JmolCommands().colourBySequence(ssm, + modelSet, sequence, sr, (AlignmentViewPanel) source); if (colcommands == null) { return; diff --git a/src/jalview/javascript/json/JSON.java b/src/jalview/javascript/json/JSON.java index 4e9d1dd..ff5dc44 100644 --- a/src/jalview/javascript/json/JSON.java +++ b/src/jalview/javascript/json/JSON.java @@ -19,27 +19,35 @@ import java.net.URL; * @author hansonr Bob Hanson St. Olaf College 1/24/2019 * */ -public class JSON { - - /** - * A simple encoding of sequential key/value pairs for a jQuery.ajax call. If - * the first key is "url" and the second is an object, then the ajax object is - * attached to that url as well, just for transport purposes within the system. - * - * @param keyValues assumed to be simple String,Object pairs. String objects - * will be surrounded by double quotes. - */ - @SuppressWarnings("static-access") - public static Object setAjax(Object... keyValues) { - return /** @j2sNative swingjs.JSUtil.setAjax$OA(keyValues) || */null; - } - - public static void setAjax(URL url) { +public class JSON +{ + + /** + * A simple encoding of sequential key/value pairs for a jQuery.ajax call. If + * the first key is "url" and the second is an object, then the ajax object is + * attached to that url as well, just for transport purposes within the + * system. + * + * @param keyValues + * assumed to be simple String,Object pairs. String objects will be + * surrounded by double quotes. + */ + @SuppressWarnings("static-access") + public static Object setAjax(Object... keyValues) + { + return /** @j2sNative swingjs.JSUtil.setAjax$OA(keyValues) || */ + null; + } + + public static void setAjax(URL url) + { /** @j2sNative swingjs.JSUtil.setAjax$java_net_URL(url); */ - } + } - public static BufferedReader getJSONReader(InputStream is) { - return /** @j2sNative swingjs.JSUtil.getJSONReader$O(is) || */null; + public static BufferedReader getJSONReader(InputStream is) + { + return /** @j2sNative swingjs.JSUtil.getJSONReader$O(is) || */ + null; } /** @@ -54,8 +62,10 @@ public class JSON { null; } - public static String stringify(Object obj) { - return /** @j2sNative swingjs.JSUtil.stringifyJSON$O(obj) || */null; - } + public static String stringify(Object obj) + { + return /** @j2sNative swingjs.JSUtil.stringifyJSON$O(obj) || */ + null; + } } diff --git a/src/jalview/javascript/web/Client.java b/src/jalview/javascript/web/Client.java index 1fe35f5..9c6bafb 100644 --- a/src/jalview/javascript/web/Client.java +++ b/src/jalview/javascript/web/Client.java @@ -11,7 +11,7 @@ import com.sun.jersey.api.client.config.ClientConfig; public class Client { - public static Client create(ClientConfig clientConfig) + public static Client create(ClientConfig clientConfig) { return new Client(); } diff --git a/src/jalview/javascript/web/ClientResponse.java b/src/jalview/javascript/web/ClientResponse.java index 23580ed..d2b88de 100644 --- a/src/jalview/javascript/web/ClientResponse.java +++ b/src/jalview/javascript/web/ClientResponse.java @@ -58,26 +58,27 @@ public class ClientResponse } // https://www.ebi.ac.uk/pdbe/search/pdb/select?wt=json&fl=pdb_id,title,experimental_method,resolution&rows=500&start=0&q=(text:q93xj9_soltu)+AND+molecule_sequence:%5B%27%27+TO+*%5D+AND+status:REL&sort=overall_quality+desc - -//{ -//"responseHeader":{ -// "status":0, -// "QTime":0, -// "params":{ -// "q":"(text:q93xj9_soltu) AND molecule_sequence:['' TO *] AND status:REL", -// "fl":"pdb_id,title,experimental_method,resolution", -// "start":"0", -// "sort":"overall_quality desc", -// "rows":"500", -// "wt":"json"}}, -//"response":{"numFound":1,"start":0,"docs":[ -// { -// "experimental_method":["X-ray diffraction"], -// "pdb_id":"4zhp", -// "resolution":2.46, -// "title":"The crystal structure of Potato ferredoxin I with 2Fe-2S cluster"}] -//}} -// + + // { + // "responseHeader":{ + // "status":0, + // "QTime":0, + // "params":{ + // "q":"(text:q93xj9_soltu) AND molecule_sequence:['' TO *] AND status:REL", + // "fl":"pdb_id,title,experimental_method,resolution", + // "start":"0", + // "sort":"overall_quality desc", + // "rows":"500", + // "wt":"json"}}, + // "response":{"numFound":1,"start":0,"docs":[ + // { + // "experimental_method":["X-ray diffraction"], + // "pdb_id":"4zhp", + // "resolution":2.46, + // "title":"The crystal structure of Potato ferredoxin I with 2Fe-2S + // cluster"}] + // }} + // public int getStatus() { diff --git a/src/jalview/jbgui/FilterOption.java b/src/jalview/jbgui/FilterOption.java index 57a1a42..f731727 100644 --- a/src/jalview/jbgui/FilterOption.java +++ b/src/jalview/jbgui/FilterOption.java @@ -101,10 +101,14 @@ public class FilterOption @Override public boolean equals(Object obj) { - if (obj instanceof FilterOption) { - FilterOption o=(FilterOption) obj; - return o.name.equals(name) && o.querySource==querySource && o.value.equals(value) && o.view==view; - } else { + if (obj instanceof FilterOption) + { + FilterOption o = (FilterOption) obj; + return o.name.equals(name) && o.querySource == querySource + && o.value.equals(value) && o.view == view; + } + else + { return super.equals(obj); } } diff --git a/src/jalview/jbgui/GAlignFrame.java b/src/jalview/jbgui/GAlignFrame.java index 6aaba84..71b6b9e 100755 --- a/src/jalview/jbgui/GAlignFrame.java +++ b/src/jalview/jbgui/GAlignFrame.java @@ -283,7 +283,9 @@ public class GAlignFrame extends JInternalFrame closeMenuItem.setText(MessageManager.getString("action.close")); keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_W, - jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false); + jalview.util.ShortcutKeyMaskExWrapper + .getMenuShortcutKeyMaskEx(), + false); al = new ActionListener() { @Override @@ -306,7 +308,9 @@ public class GAlignFrame extends JInternalFrame JMenuItem selectAllSequenceMenuItem = new JMenuItem( MessageManager.getString("action.select_all")); keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_A, - jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false); + jalview.util.ShortcutKeyMaskExWrapper + .getMenuShortcutKeyMaskEx(), + false); al = new ActionListener() { @Override @@ -333,7 +337,9 @@ public class GAlignFrame extends JInternalFrame JMenuItem invertSequenceMenuItem = new JMenuItem( MessageManager.getString("action.invert_sequence_selection")); keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I, - jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false); + jalview.util.ShortcutKeyMaskExWrapper + .getMenuShortcutKeyMaskEx(), + false); al = new ActionListener() { @Override @@ -369,7 +375,9 @@ public class GAlignFrame extends JInternalFrame JMenuItem remove2LeftMenuItem = new JMenuItem( MessageManager.getString("action.remove_left")); keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_L, - jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false); + jalview.util.ShortcutKeyMaskExWrapper + .getMenuShortcutKeyMaskEx(), + false); al = new ActionListener() { @Override @@ -383,7 +391,9 @@ public class GAlignFrame extends JInternalFrame JMenuItem remove2RightMenuItem = new JMenuItem( MessageManager.getString("action.remove_right")); keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_R, - jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false); + jalview.util.ShortcutKeyMaskExWrapper + .getMenuShortcutKeyMaskEx(), + false); al = new ActionListener() { @Override @@ -397,7 +407,9 @@ public class GAlignFrame extends JInternalFrame JMenuItem removeGappedColumnMenuItem = new JMenuItem( MessageManager.getString("action.remove_empty_columns")); keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E, - jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false); + jalview.util.ShortcutKeyMaskExWrapper + .getMenuShortcutKeyMaskEx(), + false); al = new ActionListener() { @Override @@ -519,7 +531,9 @@ public class GAlignFrame extends JInternalFrame JMenuItem removeRedundancyMenuItem = new JMenuItem( MessageManager.getString("action.remove_redundancy")); keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_D, - jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false); + jalview.util.ShortcutKeyMaskExWrapper + .getMenuShortcutKeyMaskEx(), + false); al = new ActionListener() { @Override @@ -694,7 +708,9 @@ public class GAlignFrame extends JInternalFrame undoMenuItem.setEnabled(false); undoMenuItem.setText(MessageManager.getString("action.undo")); keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Z, - jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false); + jalview.util.ShortcutKeyMaskExWrapper + .getMenuShortcutKeyMaskEx(), + false); al = new ActionListener() { @Override @@ -708,7 +724,9 @@ public class GAlignFrame extends JInternalFrame redoMenuItem.setEnabled(false); redoMenuItem.setText(MessageManager.getString("action.redo")); keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Y, - jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false); + jalview.util.ShortcutKeyMaskExWrapper + .getMenuShortcutKeyMaskEx(), + false); al = new ActionListener() { @Override @@ -732,7 +750,9 @@ public class GAlignFrame extends JInternalFrame JMenuItem printMenuItem = new JMenuItem( MessageManager.getString("action.print")); keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_P, - jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false); + jalview.util.ShortcutKeyMaskExWrapper + .getMenuShortcutKeyMaskEx(), + false); al = new ActionListener() { @Override @@ -758,7 +778,9 @@ public class GAlignFrame extends JInternalFrame JMenuItem findMenuItem = new JMenuItem( MessageManager.getString("action.find")); keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_F, - jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false); + jalview.util.ShortcutKeyMaskExWrapper + .getMenuShortcutKeyMaskEx(), + false); findMenuItem.setToolTipText(JvSwingUtils.wrapTooltip(true, MessageManager.getString("label.find_tip"))); al = new ActionListener() @@ -919,7 +941,9 @@ public class GAlignFrame extends JInternalFrame JMenuItem deleteGroups = new JMenuItem( MessageManager.getString("action.undefine_groups")); keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_U, - jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false); + jalview.util.ShortcutKeyMaskExWrapper + .getMenuShortcutKeyMaskEx(), + false); al = new ActionListener() { @Override @@ -944,7 +968,9 @@ public class GAlignFrame extends JInternalFrame JMenuItem createGroup = new JMenuItem( MessageManager.getString("action.create_group")); keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, - jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false); + jalview.util.ShortcutKeyMaskExWrapper + .getMenuShortcutKeyMaskEx(), + false); al = new ActionListener() { @Override @@ -973,7 +999,9 @@ public class GAlignFrame extends JInternalFrame copy.setText(MessageManager.getString("action.copy")); keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_C, - jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false); + jalview.util.ShortcutKeyMaskExWrapper + .getMenuShortcutKeyMaskEx(), + false); al = new ActionListener() { @@ -987,7 +1015,9 @@ public class GAlignFrame extends JInternalFrame cut.setText(MessageManager.getString("action.cut")); keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X, - jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false); + jalview.util.ShortcutKeyMaskExWrapper + .getMenuShortcutKeyMaskEx(), + false); al = new ActionListener() { @Override @@ -1029,7 +1059,9 @@ public class GAlignFrame extends JInternalFrame JMenuItem pasteThis = new JMenuItem( MessageManager.getString("label.to_this_alignment")); keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V, - jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false); + jalview.util.ShortcutKeyMaskExWrapper + .getMenuShortcutKeyMaskEx(), + false); al = new ActionListener() { @Override @@ -1213,8 +1245,7 @@ public class GAlignFrame extends JInternalFrame .setText(MessageManager.getString("action.calculate_tree_pca")); padGapsMenuitem.setText(MessageManager.getString("label.pad_gaps")); - padGapsMenuitem - .setState(Cache.getDefault("PAD_GAPS", false)); + padGapsMenuitem.setState(Cache.getDefault("PAD_GAPS", false)); padGapsMenuitem.addActionListener(new ActionListener() { @Override @@ -1357,8 +1388,7 @@ public class GAlignFrame extends JInternalFrame }); autoCalculate.setText( MessageManager.getString("label.autocalculate_consensus")); - autoCalculate.setState( - Cache.getDefault("AUTO_CALC_CONSENSUS", true)); + autoCalculate.setState(Cache.getDefault("AUTO_CALC_CONSENSUS", true)); autoCalculate.addActionListener(new ActionListener() { @Override @@ -1371,8 +1401,7 @@ public class GAlignFrame extends JInternalFrame MessageManager.getString("label.sort_alignment_new_tree")); sortByTree.setToolTipText("" + MessageManager.getString( "label.enable_automatically_sort_alignment_when_open_new_tree")); - sortByTree - .setState(Cache.getDefault("SORT_BY_TREE", false)); + sortByTree.setState(Cache.getDefault("SORT_BY_TREE", false)); sortByTree.addActionListener(new ActionListener() { @Override @@ -1610,7 +1639,9 @@ public class GAlignFrame extends JInternalFrame JMenuItem save = new JMenuItem(MessageManager.getString("action.save")); keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S, - jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false); + jalview.util.ShortcutKeyMaskExWrapper + .getMenuShortcutKeyMaskEx(), + false); al = new ActionListener() { @Override @@ -1635,7 +1666,9 @@ public class GAlignFrame extends JInternalFrame JMenuItem newView = new JMenuItem( MessageManager.getString("action.new_view")); keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_T, - jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false); + jalview.util.ShortcutKeyMaskExWrapper + .getMenuShortcutKeyMaskEx(), + false); al = new ActionListener() { @Override diff --git a/src/jalview/jbgui/GAlignmentPanel.java b/src/jalview/jbgui/GAlignmentPanel.java index b703b47..6594e2d 100755 --- a/src/jalview/jbgui/GAlignmentPanel.java +++ b/src/jalview/jbgui/GAlignmentPanel.java @@ -34,52 +34,57 @@ import javax.swing.border.Border; @SuppressWarnings("serial") public class GAlignmentPanel extends JPanel { - protected JScrollBar vscroll = new JScrollBar(); + protected JScrollBar vscroll = new JScrollBar(); - protected JScrollBar hscroll = new JScrollBar(); + protected JScrollBar hscroll = new JScrollBar(); - BorderLayout borderLayout1 = new BorderLayout(); + BorderLayout borderLayout1 = new BorderLayout(); - BorderLayout borderLayout3 = new BorderLayout(); + BorderLayout borderLayout3 = new BorderLayout(); - BorderLayout borderLayout5 = new BorderLayout(); + BorderLayout borderLayout5 = new BorderLayout(); - BorderLayout borderLayout6 = new BorderLayout(); + BorderLayout borderLayout6 = new BorderLayout(); - ButtonGroup buttonGroup1 = new ButtonGroup(); + ButtonGroup buttonGroup1 = new ButtonGroup(); - BorderLayout borderLayout7 = new BorderLayout(); + BorderLayout borderLayout7 = new BorderLayout(); - BorderLayout borderLayout10 = new BorderLayout(); + BorderLayout borderLayout10 = new BorderLayout(); - BorderLayout borderLayout11 = new BorderLayout(); + BorderLayout borderLayout11 = new BorderLayout(); public JScrollPane annotationScroller = new JScrollPane(); - Border border1; + Border border1; - BorderLayout borderLayout4 = new BorderLayout(); + BorderLayout borderLayout4 = new BorderLayout(); - - static JPanel newJPanel() { // BH 2019 - JPanel p = new JPanel(); - // leaving this in, as it prevents - // the checkerboard business, despite how - // funky that looks. Remove if you want to. - p.setBackground(Color.white); - return p; - } + static JPanel newJPanel() + { // BH 2019 + JPanel p = new JPanel(); + // leaving this in, as it prevents + // the checkerboard business, despite how + // funky that looks. Remove if you want to. + p.setBackground(Color.white); + return p; + } protected JPanel sequenceHolderPanel = newJPanel(); + protected JPanel seqPanelHolder = newJPanel(); + protected JPanel scalePanelHolder = newJPanel(); + protected JPanel idPanelHolder = newJPanel(); + protected JPanel idSpaceFillerPanel1 = newJPanel(); + public JPanel annotationSpaceFillerHolder = newJPanel(); - protected JPanel hscrollFillerPanel = newJPanel(); - JPanel hscrollHolder = newJPanel(); + protected JPanel hscrollFillerPanel = newJPanel(); + JPanel hscrollHolder = newJPanel(); public GAlignmentPanel() { @@ -94,8 +99,8 @@ public class GAlignmentPanel extends JPanel private void jbInit() throws Exception { - // annotationScroller.setBackground(Color.white); // BH 2019 - + // annotationScroller.setBackground(Color.white); // BH 2019 + border1 = BorderFactory.createLineBorder(Color.gray, 1); idPanelHolder.setBorder(null); idPanelHolder.setPreferredSize(new Dimension(70, 10)); diff --git a/src/jalview/jbgui/GCutAndPasteHtmlTransfer.java b/src/jalview/jbgui/GCutAndPasteHtmlTransfer.java index 1c9e907..ad1c1cf 100644 --- a/src/jalview/jbgui/GCutAndPasteHtmlTransfer.java +++ b/src/jalview/jbgui/GCutAndPasteHtmlTransfer.java @@ -133,17 +133,19 @@ public class GCutAndPasteHtmlTransfer extends JInternalFrame cancel_actionPerformed(e); } }); - close.setAccelerator(javax.swing.KeyStroke.getKeyStroke( - java.awt.event.KeyEvent.VK_W, - jalview.util.ShortcutKeyMaskExWrapper - .getMenuShortcutKeyMaskEx(), - false)); + close.setAccelerator( + javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_W, + jalview.util.ShortcutKeyMaskExWrapper + .getMenuShortcutKeyMaskEx(), + false)); selectAll.setText(MessageManager.getString("action.select_all")); - selectAll.setAccelerator(javax.swing.KeyStroke.getKeyStroke( - java.awt.event.KeyEvent.VK_A, - jalview.util.ShortcutKeyMaskExWrapper - .getMenuShortcutKeyMaskEx(), - false)); + selectAll + .setAccelerator( + javax.swing.KeyStroke + .getKeyStroke(java.awt.event.KeyEvent.VK_A, + jalview.util.ShortcutKeyMaskExWrapper + .getMenuShortcutKeyMaskEx(), + false)); selectAll.addActionListener(new ActionListener() { @Override @@ -154,11 +156,11 @@ public class GCutAndPasteHtmlTransfer extends JInternalFrame }); jMenu1.setText(MessageManager.getString("action.file")); save.setText(MessageManager.getString("action.save")); - save.setAccelerator(javax.swing.KeyStroke.getKeyStroke( - java.awt.event.KeyEvent.VK_S, - jalview.util.ShortcutKeyMaskExWrapper - .getMenuShortcutKeyMaskEx(), - false)); + save.setAccelerator( + javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, + jalview.util.ShortcutKeyMaskExWrapper + .getMenuShortcutKeyMaskEx(), + false)); save.addActionListener(new ActionListener() { @Override @@ -167,11 +169,11 @@ public class GCutAndPasteHtmlTransfer extends JInternalFrame save_actionPerformed(e); } }); - copyItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke( - java.awt.event.KeyEvent.VK_C, - jalview.util.ShortcutKeyMaskExWrapper - .getMenuShortcutKeyMaskEx(), - false)); + copyItem.setAccelerator( + javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, + jalview.util.ShortcutKeyMaskExWrapper + .getMenuShortcutKeyMaskEx(), + false)); editMenubar.add(jMenu1); editMenubar.add(editMenu); diff --git a/src/jalview/jbgui/GCutAndPasteTransfer.java b/src/jalview/jbgui/GCutAndPasteTransfer.java index 94a4677..b75dd8c 100755 --- a/src/jalview/jbgui/GCutAndPasteTransfer.java +++ b/src/jalview/jbgui/GCutAndPasteTransfer.java @@ -121,9 +121,13 @@ public class GCutAndPasteTransfer extends JInternalFrame textarea.setBorder(null); selectAll.setText(MessageManager.getString("action.select_all")); - selectAll.setAccelerator(javax.swing.KeyStroke.getKeyStroke( - java.awt.event.KeyEvent.VK_A, - jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false)); + selectAll + .setAccelerator( + javax.swing.KeyStroke + .getKeyStroke(java.awt.event.KeyEvent.VK_A, + jalview.util.ShortcutKeyMaskExWrapper + .getMenuShortcutKeyMaskEx(), + false)); selectAll.addActionListener(new ActionListener() { @Override @@ -134,9 +138,11 @@ public class GCutAndPasteTransfer extends JInternalFrame }); jMenu1.setText(MessageManager.getString("action.file")); save.setText(MessageManager.getString("action.save")); - save.setAccelerator(javax.swing.KeyStroke.getKeyStroke( - java.awt.event.KeyEvent.VK_S, - jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false)); + save.setAccelerator( + javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, + jalview.util.ShortcutKeyMaskExWrapper + .getMenuShortcutKeyMaskEx(), + false)); save.addActionListener(new ActionListener() { @Override @@ -145,12 +151,18 @@ public class GCutAndPasteTransfer extends JInternalFrame save_actionPerformed(e); } }); - copyItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke( - java.awt.event.KeyEvent.VK_C, - jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false)); - pasteMenu.setAccelerator(javax.swing.KeyStroke.getKeyStroke( - java.awt.event.KeyEvent.VK_V, - jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false)); + copyItem.setAccelerator( + javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, + jalview.util.ShortcutKeyMaskExWrapper + .getMenuShortcutKeyMaskEx(), + false)); + pasteMenu + .setAccelerator( + javax.swing.KeyStroke + .getKeyStroke(java.awt.event.KeyEvent.VK_V, + jalview.util.ShortcutKeyMaskExWrapper + .getMenuShortcutKeyMaskEx(), + false)); editMenubar.add(jMenu1); editMenubar.add(editMenu); textarea.setFont(new java.awt.Font("Monospaced", Font.PLAIN, 12)); diff --git a/src/jalview/jbgui/GDesktop.java b/src/jalview/jbgui/GDesktop.java index e4a5905..e1224c2 100755 --- a/src/jalview/jbgui/GDesktop.java +++ b/src/jalview/jbgui/GDesktop.java @@ -116,10 +116,10 @@ public class GDesktop extends JFrame e.printStackTrace(); } - if (Platform.allowMnemonics()) + if (Platform.allowMnemonics()) { - //BH was !Platform.isAMacAndNotJS()) i.e. "JS or not Mac" - // but here we want just not a Mac, period, right? + // BH was !Platform.isAMacAndNotJS()) i.e. "JS or not Mac" + // but here we want just not a Mac, period, right? FileMenu.setMnemonic('F'); inputLocalFileMenuItem.setMnemonic('L'); inputURLMenuItem.setMnemonic('U'); @@ -144,10 +144,13 @@ public class GDesktop extends JFrame HelpMenu.setText(MessageManager.getString("action.help")); inputLocalFileMenuItem .setText(MessageManager.getString("label.load_tree_from_file")); - inputLocalFileMenuItem.setAccelerator( - javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, - jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), - false)); + inputLocalFileMenuItem + .setAccelerator( + javax.swing.KeyStroke + .getKeyStroke(java.awt.event.KeyEvent.VK_O, + jalview.util.ShortcutKeyMaskExWrapper + .getMenuShortcutKeyMaskEx(), + false)); inputLocalFileMenuItem .addActionListener(new java.awt.event.ActionListener() { @@ -369,7 +372,7 @@ public class GDesktop extends JFrame Float specversion = Platform.isJS() ? Float.valueOf(8) : Float.parseFloat( System.getProperty("java.specification.version")); - + desktopMenubar.add(FileMenu); desktopMenubar.add(toolsMenu); desktopMenubar.add(HelpMenu); @@ -377,7 +380,7 @@ public class GDesktop extends JFrame FileMenu.add(inputMenu); FileMenu.add(inputSequence); FileMenu.addSeparator(); - //FileMenu.add(saveState); + // FileMenu.add(saveState); FileMenu.add(saveAsState); FileMenu.add(loadState); FileMenu.addSeparator(); @@ -493,7 +496,7 @@ public class GDesktop extends JFrame */ protected void quit() { - //System.out.println("********** GDesktop.quit()"); + // System.out.println("********** GDesktop.quit()"); } /** diff --git a/src/jalview/jbgui/GFinder.java b/src/jalview/jbgui/GFinder.java index 9788fba..c5488f0 100755 --- a/src/jalview/jbgui/GFinder.java +++ b/src/jalview/jbgui/GFinder.java @@ -124,21 +124,21 @@ public class GFinder extends JPanel searchBox = new JvCacheableInputBox<>(FINDER_CACHE_KEY, 25); searchBox.getComponent().setFont(VERDANA_12); searchBox.addCaretListener(new CaretListener() - { - @Override - public void caretUpdate(CaretEvent e) - { - textfield_caretUpdate(); - } - }); + { + @Override + public void caretUpdate(CaretEvent e) + { + textfield_caretUpdate(); + } + }); searchBox.addKeyListener(new KeyAdapter() - { - @Override - public void keyPressed(KeyEvent e) - { - textfield_keyPressed(e); - } - }); + { + @Override + public void keyPressed(KeyEvent e) + { + textfield_keyPressed(e); + } + }); centrePanel.add(searchBox.getComponent()); /* @@ -156,7 +156,7 @@ public class GFinder extends JPanel ignoreHidden.setText(MessageManager.getString("label.ignore_hidden")); ignoreHidden.setToolTipText( MessageManager.getString("label.ignore_hidden_tooltip")); - + centrePanel.add(caseSensitive); centrePanel.add(searchDescription); centrePanel.add(ignoreHidden); diff --git a/src/jalview/jbgui/GRnaStructureViewer.java b/src/jalview/jbgui/GRnaStructureViewer.java index e0bec25..5dc726f 100644 --- a/src/jalview/jbgui/GRnaStructureViewer.java +++ b/src/jalview/jbgui/GRnaStructureViewer.java @@ -38,7 +38,7 @@ public class GRnaStructureViewer extends JInternalFrame private void jbInit() throws Exception { - + setName("jalview-rnastructureviewer"); } diff --git a/src/jalview/jbgui/GSliderPanel.java b/src/jalview/jbgui/GSliderPanel.java index d841be5..2dabd1b 100755 --- a/src/jalview/jbgui/GSliderPanel.java +++ b/src/jalview/jbgui/GSliderPanel.java @@ -51,7 +51,8 @@ import javax.swing.SwingConstants; */ public class GSliderPanel extends JPanel { - private static final Font VERDANA_11 = new java.awt.Font("Verdana", 0, 11); + private static final Font VERDANA_11 = new java.awt.Font("Verdana", 0, + 11); protected static final int FRAME_WIDTH = 420; diff --git a/src/jalview/jbgui/GSplitFrame.java b/src/jalview/jbgui/GSplitFrame.java index a75760d..5e65047 100644 --- a/src/jalview/jbgui/GSplitFrame.java +++ b/src/jalview/jbgui/GSplitFrame.java @@ -112,8 +112,8 @@ public class GSplitFrame extends JInternalFrame } else { - ((BasicInternalFrameUI) topFrame.getUI()).setNorthPane(null); - ((BasicInternalFrameUI) bottomFrame.getUI()).setNorthPane(null); + ((BasicInternalFrameUI) topFrame.getUI()).setNorthPane(null); + ((BasicInternalFrameUI) bottomFrame.getUI()).setNorthPane(null); } } diff --git a/src/jalview/jbgui/GStructureChooser.java b/src/jalview/jbgui/GStructureChooser.java index 70d99c1..10e000f 100644 --- a/src/jalview/jbgui/GStructureChooser.java +++ b/src/jalview/jbgui/GStructureChooser.java @@ -121,7 +121,7 @@ public abstract class GStructureChooser extends JPanel protected JButton btn_newView; protected JButton btn_pdbFromFile = new JButton(); - + protected JButton btn_queryTDB = new JButton(); protected JCheckBox chk_superpose = new JCheckBox( @@ -149,8 +149,8 @@ public abstract class GStructureChooser extends JPanel protected ImageIcon warningImage = new ImageIcon( getClass().getResource("/images/warning.gif")); - protected ImageIcon tdbImage = new ImageIcon( - getClass().getResource("/images/3d-beacons-logo-transparent.png")); + protected ImageIcon tdbImage = new ImageIcon(getClass() + .getResource("/images/3d-beacons-logo-transparent.png")); protected JLabel lbl_loading = new JLabel(loadingImage); @@ -169,8 +169,9 @@ public abstract class GStructureChooser extends JPanel protected JTabbedPane pnl_filter = new JTabbedPane(); protected abstract FTSDataColumnPreferences getFTSDocFieldPrefs(); - protected abstract void setFTSDocFieldPrefs(FTSDataColumnPreferences newPrefs); + protected abstract void setFTSDocFieldPrefs( + FTSDataColumnPreferences newPrefs); protected FTSDataColumnI[] previousWantedFields; @@ -251,12 +252,13 @@ public abstract class GStructureChooser extends JPanel + "...\"") : JvSwingUtils.wrapTooltip(true, toolTipText))); return toolTipText; - } + } }; public GStructureChooser() { } + protected void initDialog() { @@ -272,29 +274,33 @@ public abstract class GStructureChooser extends JPanel e.printStackTrace(); } } - + // BH SwingJS optimization // (a) 100-ms interruptable timer for text entry -- BH 1/10/2019 // (b) two-character minimum, at least for JavaScript. - - private Timer timer; - - protected void txt_search_ActionPerformedDelayed() { - if (timer != null) { - timer.stop(); - } - timer = new Timer(300, new ActionListener() { - - @Override - public void actionPerformed(ActionEvent e) { - txt_search_ActionPerformed(); - } - }); - timer.setRepeats(false); - timer.start(); + + private Timer timer; + + protected void txt_search_ActionPerformedDelayed() + { + if (timer != null) + { + timer.stop(); + } + timer = new Timer(300, new ActionListener() + { + + @Override + public void actionPerformed(ActionEvent e) + { + txt_search_ActionPerformed(); + } + }); + timer.setRepeats(false); + timer.start(); } // - + /** * Initializes the GUI default properties * @@ -320,6 +326,7 @@ public abstract class GStructureChooser extends JPanel super.mousePressed(e); } } + @Override public void mouseClicked(MouseEvent e) { @@ -334,21 +341,22 @@ public abstract class GStructureChooser extends JPanel { if (!popupAction(e)) { - validateSelections(); + validateSelections(); } } + boolean popupAction(MouseEvent e) { - if (e.isPopupTrigger()) - { - Point pt = e.getPoint(); - int selectedRow = tbl_summary.rowAtPoint(pt); - if (showPopupFor(selectedRow,pt.x,pt.y)) - { - return true; - } - } - return false; + if (e.isPopupTrigger()) + { + Point pt = e.getPoint(); + int selectedRow = tbl_summary.rowAtPoint(pt); + if (showPopupFor(selectedRow, pt.x, pt.y)) + { + return true; + } + } + return false; } }); tbl_summary.addKeyListener(new KeyAdapter() @@ -488,8 +496,9 @@ public abstract class GStructureChooser extends JPanel } } }); - - // TODO: JAL-3898 - get list of available external programs to view structures with + + // TODO: JAL-3898 - get list of available external programs to view + // structures with btn_add = new JButton(MessageManager.getString("action.add")); btn_add.setFont(VERDANA_12); @@ -586,9 +595,11 @@ public abstract class GStructureChooser extends JPanel chk_invertFilter.addItemListener(this); btn_queryTDB.setFont(VERDANA_12); - //btn_queryTDB.setPreferredSize(new Dimension(200,22)); - btn_queryTDB.setText(MessageManager.getString("label.search_3dbeacons")); - btn_queryTDB.setToolTipText(MessageManager.getString("label.find_models_from_3dbeacons")); + // btn_queryTDB.setPreferredSize(new Dimension(200,22)); + btn_queryTDB + .setText(MessageManager.getString("label.search_3dbeacons")); + btn_queryTDB.setToolTipText( + MessageManager.getString("label.find_models_from_3dbeacons")); btn_queryTDB.setIcon(tdbImage); btn_queryTDB.setVisible(false); @@ -603,11 +614,11 @@ public abstract class GStructureChooser extends JPanel JPanel pnl_main = new JPanel(new BorderLayout()); JPanel pnl_controls = new JPanel(); - pnl_main.add(btn_queryTDB,BorderLayout.NORTH); + pnl_main.add(btn_queryTDB, BorderLayout.NORTH); pnl_controls.add(cmb_filterOption); pnl_controls.add(lbl_loading); pnl_controls.add(chk_invertFilter); - pnl_main.add(pnl_controls,BorderLayout.CENTER); + pnl_main.add(pnl_controls, BorderLayout.CENTER); lbl_loading.setVisible(false); JPanel pnl_fileChooser = new JPanel(new FlowLayout()); @@ -712,9 +723,9 @@ public abstract class GStructureChooser extends JPanel Desktop.addInternalFrame(mainFrame, frameTitle, width, height); } + protected abstract boolean showPopupFor(int selectedRow, int x, int y); -protected abstract boolean showPopupFor(int selectedRow, int x, int y); -protected void closeAction(int preferredHeight) + protected void closeAction(int preferredHeight) { // System.out.println(">>>>>>>>>> closing internal frame!!!"); // System.out.println("width : " + mainFrame.getWidth()); diff --git a/src/jalview/jbgui/GWebserviceInfo.java b/src/jalview/jbgui/GWebserviceInfo.java index cddbb3b..8e8e505 100755 --- a/src/jalview/jbgui/GWebserviceInfo.java +++ b/src/jalview/jbgui/GWebserviceInfo.java @@ -119,7 +119,7 @@ public class GWebserviceInfo extends JPanel cancel.addActionListener(new java.awt.event.ActionListener() { @Override - public void actionPerformed(ActionEvent e) + public void actionPerformed(ActionEvent e) { cancel_actionPerformed(e); } diff --git a/src/jalview/json/binding/biojs/BioJSRepositoryPojo.java b/src/jalview/json/binding/biojs/BioJSRepositoryPojo.java index ad50305..daf28f5 100644 --- a/src/jalview/json/binding/biojs/BioJSRepositoryPojo.java +++ b/src/jalview/json/binding/biojs/BioJSRepositoryPojo.java @@ -60,12 +60,14 @@ public class BioJSRepositoryPojo { Objects.requireNonNull(jsonString, "Supplied jsonString must not be null"); - Map JsonObj = (Map) JSONUtils.parse(jsonString); + Map JsonObj = (Map) JSONUtils + .parse(jsonString); this.description = (String) JsonObj.get("description"); this.latestReleaseVersion = (String) JsonObj .get("latestReleaseVersion"); - List repositoriesJsonArray = (List) JsonObj.get("releases"); + List repositoriesJsonArray = (List) JsonObj + .get("releases"); for (Iterator repoIter = repositoriesJsonArray .iterator(); repoIter.hasNext();) { diff --git a/src/jalview/math/MatrixI.java b/src/jalview/math/MatrixI.java index 2c78653..e98007e 100644 --- a/src/jalview/math/MatrixI.java +++ b/src/jalview/math/MatrixI.java @@ -161,8 +161,9 @@ public interface MatrixI void multiply(double d); /** - * Answers true if the two matrices have the same dimensions, and corresponding values all differ by no - * more than delta (which should be a positive value), else false + * Answers true if the two matrices have the same dimensions, and + * corresponding values all differ by no more than delta (which should be a + * positive value), else false * * @param m2 * @param delta diff --git a/src/jalview/project/Jalview2XML.java b/src/jalview/project/Jalview2XML.java index 8877af2..d4b2c04 100644 --- a/src/jalview/project/Jalview2XML.java +++ b/src/jalview/project/Jalview2XML.java @@ -882,8 +882,7 @@ public class Jalview2XML { System.err.println("error writing date: " + e.toString()); } - object.setVersion( - Cache.getDefault("VERSION", "Development Build")); + object.setVersion(Cache.getDefault("VERSION", "Development Build")); /** * rjal is full height alignment, jal is actual alignment with full metadata @@ -1633,7 +1632,8 @@ public class Jalview2XML .getHiddenColumns(); if (hidden == null) { - Console.warn("REPORT BUG: avoided null columnselection bug (DMAM reported). Please contact Jim about this."); + Console.warn( + "REPORT BUG: avoided null columnselection bug (DMAM reported). Please contact Jim about this."); } else { @@ -2418,7 +2418,8 @@ public class Jalview2XML } else { - Console.warn("Cannot resolve a service for the parameters used in this project. Try configuring a JABAWS server."); + Console.warn( + "Cannot resolve a service for the parameters used in this project. Try configuring a JABAWS server."); return false; } } @@ -2462,7 +2463,8 @@ public class Jalview2XML return id.toString(); } // give up and warn that something has gone wrong - Console.warn("Cannot find ID for object in external mapping : " + jvobj); + Console.warn( + "Cannot find ID for object in external mapping : " + jvobj); } return altCode; } @@ -3230,7 +3232,8 @@ public class Jalview2XML } else { - Console.warn("Couldn't find entry in Jalview Jar for " + jarEntryName); + Console.warn( + "Couldn't find entry in Jalview Jar for " + jarEntryName); } } catch (Exception ex) { @@ -4205,8 +4208,9 @@ public class Jalview2XML tp.getTreeCanvas().setApplyToAllViews(tree.isLinkToAllViews()); if (tp == null) { - Console.warn("There was a problem recovering stored Newick tree: \n" - + tree.getNewick()); + Console.warn( + "There was a problem recovering stored Newick tree: \n" + + tree.getNewick()); continue; } @@ -5282,14 +5286,16 @@ public class Jalview2XML { if (ds != null && ds != seqSetDS) { - Console.warn("JAL-3171 regression: Overwriting a dataset reference for an alignment" - + " - CDS/Protein crossreference data may be lost"); + Console.warn( + "JAL-3171 regression: Overwriting a dataset reference for an alignment" + + " - CDS/Protein crossreference data may be lost"); if (xtant_ds != null) { // This can only happen if the unique sequence set ID was bound to a // dataset that did not contain any of the sequences in the view // currently being restored. - Console.warn("JAL-3171 SERIOUS! TOTAL CONFUSION - please consider contacting the Jalview Development team so they can investigate why your project caused this message to be displayed."); + Console.warn( + "JAL-3171 SERIOUS! TOTAL CONFUSION - please consider contacting the Jalview Development team so they can investigate why your project caused this message to be displayed."); } } ds = seqSetDS; @@ -5573,7 +5579,8 @@ public class Jalview2XML { if (dataset.getDataset() != null) { - Console.warn("Serious issue! Dataset Object passed to getDatasetIdRef is not a Jalview DATASET alignment..."); + Console.warn( + "Serious issue! Dataset Object passed to getDatasetIdRef is not a Jalview DATASET alignment..."); } String datasetId = makeHashCode(dataset, null); if (datasetId == null) @@ -5905,7 +5912,8 @@ public class Jalview2XML } else { - Console.warn("Couldn't find entry in Jalview Jar for " + jarEntryName); + Console.warn( + "Couldn't find entry in Jalview Jar for " + jarEntryName); } } catch (Exception ex) { diff --git a/src/jalview/renderer/AnnotationRenderer.java b/src/jalview/renderer/AnnotationRenderer.java index deb2b6f..be4f497 100644 --- a/src/jalview/renderer/AnnotationRenderer.java +++ b/src/jalview/renderer/AnnotationRenderer.java @@ -460,8 +460,8 @@ public class AnnotationRenderer boolean validRes = false; boolean validEnd = false; boolean labelAllCols = false; -// boolean centreColLabels; -// boolean centreColLabelsDef = av.isCentreColumnLabels(); + // boolean centreColLabels; + // boolean centreColLabelsDef = av.isCentreColumnLabels(); boolean scaleColLabel = false; final AlignmentAnnotation consensusAnnot = av .getAlignmentConsensusAnnotation(); @@ -507,7 +507,7 @@ public class AnnotationRenderer { continue; } -// centreColLabels = row.centreColLabels || centreColLabelsDef; + // centreColLabels = row.centreColLabels || centreColLabelsDef; labelAllCols = row.showAllColLabels; scaleColLabel = row.scaleColLabel; lastSS = ' '; diff --git a/src/jalview/renderer/OverviewRenderer.java b/src/jalview/renderer/OverviewRenderer.java index c9096e2..1b5d5da 100644 --- a/src/jalview/renderer/OverviewRenderer.java +++ b/src/jalview/renderer/OverviewRenderer.java @@ -76,8 +76,8 @@ public class OverviewRenderer private OverviewResColourFinder resColFinder; public OverviewRenderer(FeatureRenderer fr, OverviewDimensions od, - AlignmentI alignment, - ResidueShaderI resshader, OverviewResColourFinder colFinder) + AlignmentI alignment, ResidueShaderI resshader, + OverviewResColourFinder colFinder) { finder = new FeatureColourFinder(fr); resColFinder = colFinder; @@ -120,7 +120,7 @@ public class OverviewRenderer { break; } - + // get details of this alignment row SequenceI seq = rows.getSequence(alignmentRow); @@ -130,7 +130,7 @@ public class OverviewRenderer // calculate where this row extends to in pixels int endRow = Math.min(Math.round((seqIndex + 1) * pixelsPerSeq) - 1, miniMe.getHeight() - 1); - + int colIndex = 0; int pixelCol = 0; for (int alignmentCol : cols) @@ -139,11 +139,11 @@ public class OverviewRenderer { break; } - + // calculate where this column extends to in pixels int endCol = Math.min(Math.round((colIndex + 1) * pixelsPerCol) - 1, miniMe.getWidth() - 1); - + // don't do expensive colour determination if we're not going to use it // NB this is important to avoid performance issues in the overview // panel @@ -151,7 +151,7 @@ public class OverviewRenderer { rgbcolor = getColumnColourFromSequence(allGroups, seq, alignmentCol); - + // fill in the appropriate number of pixels for (int row = pixelRow; row <= endRow; ++row) { @@ -222,8 +222,8 @@ public class OverviewRenderer * column position to get colour for * @return colour of sequence at this position, as RGB */ - int getColumnColourFromSequence(SequenceGroup[] allGroups, - SequenceI seq, int lastcol) + int getColumnColourFromSequence(SequenceGroup[] allGroups, SequenceI seq, + int lastcol) { Color color = resColFinder.GAP_COLOUR; diff --git a/src/jalview/renderer/OverviewResColourFinder.java b/src/jalview/renderer/OverviewResColourFinder.java index a497d92..57cae1c 100644 --- a/src/jalview/renderer/OverviewResColourFinder.java +++ b/src/jalview/renderer/OverviewResColourFinder.java @@ -113,8 +113,8 @@ public class OverviewResColourFinder extends ResidueColourFinder */ @Override protected Color getResidueBoxColour(boolean showBoxes, - ResidueShaderI shader, - SequenceGroup[] allGroups, SequenceI seq, int i) + ResidueShaderI shader, SequenceGroup[] allGroups, SequenceI seq, + int i) { ResidueShaderI currentShader; SequenceGroup currentSequenceGroup = getCurrentSequenceGroup(allGroups, diff --git a/src/jalview/renderer/ResidueColourFinder.java b/src/jalview/renderer/ResidueColourFinder.java index 2da7233..21d7241 100644 --- a/src/jalview/renderer/ResidueColourFinder.java +++ b/src/jalview/renderer/ResidueColourFinder.java @@ -50,8 +50,8 @@ public class ResidueColourFinder * @return colour of the residue */ public Color getResidueColour(boolean showBoxes, ResidueShaderI shader, - SequenceGroup[] allGroups, - final SequenceI seq, int position, FeatureColourFinder finder) + SequenceGroup[] allGroups, final SequenceI seq, int position, + FeatureColourFinder finder) { Color col = getResidueBoxColour(showBoxes, shader, allGroups, seq, position); @@ -81,9 +81,8 @@ public class ResidueColourFinder * @return */ protected Color getResidueBoxColour(boolean showBoxes, - ResidueShaderI shader, - SequenceGroup[] allGroups, - SequenceI seq, int i) + ResidueShaderI shader, SequenceGroup[] allGroups, SequenceI seq, + int i) { SequenceGroup currentSequenceGroup = getCurrentSequenceGroup(allGroups, i); @@ -99,7 +98,7 @@ public class ResidueColourFinder { return getBoxColour(shader, seq, i); } - + return Color.white; } diff --git a/src/jalview/renderer/seqfeatures/FeatureRenderer.java b/src/jalview/renderer/seqfeatures/FeatureRenderer.java index aa3328b..ee12a5e 100644 --- a/src/jalview/renderer/seqfeatures/FeatureRenderer.java +++ b/src/jalview/renderer/seqfeatures/FeatureRenderer.java @@ -358,8 +358,8 @@ public class FeatureRenderer extends FeatureRendererModel } int featureStartCol = seq.findIndex(visibleStart); - int featureEndCol = sf.begin == sf.end ? featureStartCol : seq - .findIndex(visibleEnd); + int featureEndCol = sf.begin == sf.end ? featureStartCol + : seq.findIndex(visibleEnd); // Color featureColour = getColour(sequenceFeature); @@ -400,14 +400,13 @@ public class FeatureRenderer extends FeatureRendererModel else { */ - boolean drawn = renderFeature(g, seq, - featureStartCol - 1, - featureEndCol - 1, featureColour, - start, end, y1, colourOnly); - if (drawn) - { - drawnColour = featureColour; - } + boolean drawn = renderFeature(g, seq, featureStartCol - 1, + featureEndCol - 1, featureColour, start, end, y1, + colourOnly); + if (drawn) + { + drawnColour = featureColour; + } /*}*/ } } @@ -463,8 +462,7 @@ public class FeatureRenderer extends FeatureRendererModel for (int pos = visibleStart; pos <= visibleEnd; pos++) { int column = seq.findIndex(pos); - MappedFeatures mf = fr2 - .findComplementFeaturesAtResidue(seq, pos); + MappedFeatures mf = fr2.findComplementFeaturesAtResidue(seq, pos); if (mf != null) { for (SequenceFeature sf : mf.features) @@ -572,8 +570,8 @@ public class FeatureRenderer extends FeatureRendererModel AlignViewportI complement = av.getCodingComplement(); AlignFrame af = Desktop.getAlignFrameFor(complement); FeatureRendererModel fr2 = af.getFeatureRenderer(); - MappedFeatures mf = fr2.findComplementFeaturesAtResidue( - seq, seq.findPosition(column - 1)); + MappedFeatures mf = fr2.findComplementFeaturesAtResidue(seq, + seq.findPosition(column - 1)); if (mf == null) { return null; diff --git a/src/jalview/schemes/AnnotationColourGradient.java b/src/jalview/schemes/AnnotationColourGradient.java index 75a07b9..a390a15 100755 --- a/src/jalview/schemes/AnnotationColourGradient.java +++ b/src/jalview/schemes/AnnotationColourGradient.java @@ -417,7 +417,7 @@ public class AnnotationColourGradient extends FollowerColourScheme { range = ann.graphMax == ann.threshold.value ? 1f : (value - ann.threshold.value) - / (ann.graphMax - ann.threshold.value); + / (ann.graphMax - ann.threshold.value); } else if (thresholdIsMinMax && ann.threshold != null && aboveAnnotationThreshold == BELOW_THRESHOLD diff --git a/src/jalview/schemes/ColourSchemeProperty.java b/src/jalview/schemes/ColourSchemeProperty.java index 2d5b23d..98e90bd 100755 --- a/src/jalview/schemes/ColourSchemeProperty.java +++ b/src/jalview/schemes/ColourSchemeProperty.java @@ -77,8 +77,7 @@ public class ColourSchemeProperty * @return */ public static ColourSchemeI getColourScheme(AlignViewportI view, - AnnotatedCollectionI forData, - String name) + AnnotatedCollectionI forData, String name) { if (ResidueColourScheme.NONE.equalsIgnoreCase(name)) { @@ -91,8 +90,7 @@ public class ColourSchemeProperty * create a new instance of it */ ColourSchemeI scheme = ColourSchemes.getInstance().getColourScheme(name, - view, - forData, null); + view, forData, null); if (scheme != null) { return scheme; diff --git a/src/jalview/schemes/ColourSchemes.java b/src/jalview/schemes/ColourSchemes.java index faada0e..14daed6 100644 --- a/src/jalview/schemes/ColourSchemes.java +++ b/src/jalview/schemes/ColourSchemes.java @@ -142,8 +142,8 @@ public class ColourSchemes * represent * @return */ - public ColourSchemeI getColourScheme(String name, - AlignViewportI viewport, AnnotatedCollectionI forData, + public ColourSchemeI getColourScheme(String name, AlignViewportI viewport, + AnnotatedCollectionI forData, Map hiddenRepSequences) { if (name == null) @@ -151,8 +151,7 @@ public class ColourSchemes return null; } ColourSchemeI cs = schemes.get(name.toLowerCase(Locale.ROOT)); - return cs == null ? null - : cs.getInstance(viewport, forData); + return cs == null ? null : cs.getInstance(viewport, forData); } /** diff --git a/src/jalview/schemes/FeatureColour.java b/src/jalview/schemes/FeatureColour.java index e5bda58..f1bade1 100644 --- a/src/jalview/schemes/FeatureColour.java +++ b/src/jalview/schemes/FeatureColour.java @@ -48,8 +48,9 @@ import java.util.StringTokenizer; *
    • the range may be the full value range, or may be limited by the threshold * value
    • * - *
    • colour by (text) value of a named attribute
    • graduated colour by - * (numeric) value of a named attribute
    • + *
    • colour by (text) value of a named attribute
    • + *
    • graduated colour by (numeric) value of a named attribute
    • + * */ public class FeatureColour implements FeatureColourI { @@ -698,8 +699,8 @@ public class FeatureColour implements FeatureColourI { String label = attributeName == null ? feature.getDescription() : feature.getValueAsString(attributeName); - return label == null ? noColour : ColorUtils - .createColourFromName(label); + return label == null ? noColour + : ColorUtils.createColourFromName(label); } if (!isGraduatedColour()) @@ -825,7 +826,7 @@ public class FeatureColour implements FeatureColourI sb.append(BAR).append(Format.getHexString(getMinColour())) .append(BAR); sb.append(Format.getHexString(getMaxColour())).append(BAR); - + /* * 'no value' colour should be null, min or max colour; * if none of these, coerce to minColour diff --git a/src/jalview/schemes/IdColourScheme.java b/src/jalview/schemes/IdColourScheme.java index 5add470..10d23a2 100644 --- a/src/jalview/schemes/IdColourScheme.java +++ b/src/jalview/schemes/IdColourScheme.java @@ -43,12 +43,12 @@ public class IdColourScheme implements ColourSchemeI { } + public IdColourScheme(AlignViewportI view, AnnotatedCollectionI coll) { this.view = view; } - @Override public String getSchemeName() { diff --git a/src/jalview/schemes/ResidueProperties.java b/src/jalview/schemes/ResidueProperties.java index 2eb303d..ab86400 100755 --- a/src/jalview/schemes/ResidueProperties.java +++ b/src/jalview/schemes/ResidueProperties.java @@ -502,7 +502,8 @@ public class ResidueProperties public static String STOP = "STOP"; - public static List STOP_CODONS = Arrays.asList("TGA", "TAA", "TAG"); + public static List STOP_CODONS = Arrays.asList("TGA", "TAA", + "TAG"); public static String START = "ATG"; diff --git a/src/jalview/structure/AtomSpec.java b/src/jalview/structure/AtomSpec.java index f404d35..54aab7f 100644 --- a/src/jalview/structure/AtomSpec.java +++ b/src/jalview/structure/AtomSpec.java @@ -175,8 +175,8 @@ public class AtomSpec } /** - * Parses a ChimeraX atomspec to construct an AtomSpec model (with - * null pdb file name) + * Parses a ChimeraX atomspec to construct an AtomSpec model (with null pdb + * file name) * *
          * ChimeraX format:
      diff --git a/src/jalview/structure/StructureCommand.java b/src/jalview/structure/StructureCommand.java
      index 0a7000b..67c944f 100644
      --- a/src/jalview/structure/StructureCommand.java
      +++ b/src/jalview/structure/StructureCommand.java
      @@ -52,7 +52,7 @@ public class StructureCommand implements StructureCommandI
         @Override
         public String toString()
         {
      -    if (!hasParameters()) 
      +    if (!hasParameters())
           {
             return command;
           }
      diff --git a/src/jalview/structure/StructureCommandsBase.java b/src/jalview/structure/StructureCommandsBase.java
      index fdc8d16..381c988 100644
      --- a/src/jalview/structure/StructureCommandsBase.java
      +++ b/src/jalview/structure/StructureCommandsBase.java
      @@ -41,8 +41,9 @@ public abstract class StructureCommandsBase implements StructureCommandsI
         }
       
         /**
      -   * Helper method to add one contiguous range to the AtomSpec model for the given
      -   * value (creating the model if necessary). As used by Jalview, {@code value} is
      +   * Helper method to add one contiguous range to the AtomSpec model for the
      +   * given value (creating the model if necessary). As used by Jalview,
      +   * {@code value} is
          * 
        *
      • a colour, when building a 'colour structure by sequence' command
      • *
      • a feature value, when building a 'set Chimera attributes from features' @@ -69,7 +70,7 @@ public abstract class StructureCommandsBase implements StructureCommandsI atomSpec = new AtomSpecModel(); map.put(value, atomSpec); } - + atomSpec.addRange(model, startPos, endPos, chain); } diff --git a/src/jalview/structure/StructureCommandsI.java b/src/jalview/structure/StructureCommandsI.java index 0489bda..e83a971 100644 --- a/src/jalview/structure/StructureCommandsI.java +++ b/src/jalview/structure/StructureCommandsI.java @@ -86,7 +86,8 @@ public interface StructureCommandsI * * @param refAtoms * @param atomSpec - * @param backbone - superpose based on which kind of atomType + * @param backbone + * - superpose based on which kind of atomType * @return */ List superposeStructures(AtomSpecModel refAtoms, @@ -109,7 +110,11 @@ public interface StructureCommandsI */ StructureCommandI saveSession(String filepath); - enum AtomSpecType { RESIDUE_ONLY, ALPHA, PHOSPHATE }; + enum AtomSpecType + { + RESIDUE_ONLY, ALPHA, PHOSPHATE + }; + /** * Returns a representation of the atom set represented by the model, in * viewer syntax format. If {@code alphaOnly} is true, this is restricted to diff --git a/src/jalview/structure/StructureSelectionManager.java b/src/jalview/structure/StructureSelectionManager.java index 0209e20..c8a846c 100644 --- a/src/jalview/structure/StructureSelectionManager.java +++ b/src/jalview/structure/StructureSelectionManager.java @@ -321,7 +321,7 @@ public class StructureSelectionManager * @return null or the structure data parsed as a pdb file */ synchronized public StructureFile setMapping(SequenceI[] sequence, - String[] targetChains, String pdbFile, DataSourceType protocol, + String[] targetChains, String pdbFile, DataSourceType protocol, IProgressIndicator progress) { return computeMapping(true, sequence, targetChains, pdbFile, protocol, @@ -378,9 +378,9 @@ public class StructureSelectionManager * mapping operation * @return null or the structure data parsed as a pdb file */ - synchronized public StructureFile computeMapping( - boolean forStructureView, SequenceI[] sequenceArray, - String[] targetChainIds, String pdbFile, DataSourceType sourceType, + synchronized public StructureFile computeMapping(boolean forStructureView, + SequenceI[] sequenceArray, String[] targetChainIds, + String pdbFile, DataSourceType sourceType, IProgressIndicator progress) { long progressSessionId = System.currentTimeMillis() * 3; @@ -411,17 +411,20 @@ public class StructureSelectionManager registerPDBFile(pdb.getId().trim(), pdbFile); } // if PDBId is unavailable then skip SIFTS mapping execution path - // TODO: JAL-3868 need to know if structure is actually from - // PDB (has valid PDB ID and has provenance suggesting it + // TODO: JAL-3868 need to know if structure is actually from + // PDB (has valid PDB ID and has provenance suggesting it // actually came from PDB) boolean isProtein = false; - for (SequenceI s:sequenceArray) { - if (s.isProtein()) { + for (SequenceI s : sequenceArray) + { + if (s.isProtein()) + { isProtein = true; break; } } - isMapUsingSIFTs = isMapUsingSIFTs && pdb.isPPDBIdAvailable() && !pdb.getId().startsWith("AF-") && isProtein; + isMapUsingSIFTs = isMapUsingSIFTs && pdb.isPPDBIdAvailable() + && !pdb.getId().startsWith("AF-") && isProtein; } catch (Exception ex) { @@ -533,9 +536,11 @@ public class StructureSelectionManager List seqToStrucMapping = new ArrayList<>(); if (isMapUsingSIFTs && seq.isProtein()) { - if (progress!=null) { - progress.setProgressBar(MessageManager - .getString("status.obtaining_mapping_with_sifts"), + if (progress != null) + { + progress.setProgressBar( + MessageManager + .getString("status.obtaining_mapping_with_sifts"), progressSessionId); } jalview.datamodel.Mapping sqmpping = maxAlignseq @@ -549,7 +554,8 @@ public class StructureSelectionManager pdb, maxChain, sqmpping, maxAlignseq, siftsClient); seqToStrucMapping.add(siftsMapping); maxChain.makeExactMapping(siftsMapping, seq); - maxChain.transferRESNUMFeatures(seq, "IEA: SIFTS",pdb.getId().toLowerCase(Locale.ROOT)); + maxChain.transferRESNUMFeatures(seq, "IEA: SIFTS", + pdb.getId().toLowerCase(Locale.ROOT)); maxChain.transferResidueAnnotation(siftsMapping, null); ds.addPDBId(maxChain.sequence.getAllPDBEntries().get(0)); @@ -561,9 +567,10 @@ public class StructureSelectionManager targetChainId, maxChain, pdb, maxAlignseq); seqToStrucMapping.add(nwMapping); maxChain.makeExactMapping(maxAlignseq, seq); - maxChain.transferRESNUMFeatures(seq, "IEA:Jalview",pdb.getId().toLowerCase(Locale.ROOT)); // FIXME: is - // this - // "IEA:Jalview" ? + maxChain.transferRESNUMFeatures(seq, "IEA:Jalview", + pdb.getId().toLowerCase(Locale.ROOT)); // FIXME: is + // this + // "IEA:Jalview" ? maxChain.transferResidueAnnotation(nwMapping, sqmpping); ds.addPDBId(maxChain.sequence.getAllPDBEntries().get(0)); } @@ -576,23 +583,21 @@ public class StructureSelectionManager StructureMapping siftsMapping = null; try { - siftsMapping = getStructureMapping(seq, - pdbFile, chain.id, pdb, chain, sqmpping, maxAlignseq, - siftsClient); + siftsMapping = getStructureMapping(seq, pdbFile, chain.id, + pdb, chain, sqmpping, maxAlignseq, siftsClient); foundSiftsMappings.add(siftsMapping); chain.makeExactMapping(siftsMapping, seq); - chain.transferRESNUMFeatures(seq, "IEA: SIFTS",pdb.getId().toLowerCase(Locale.ROOT));// FIXME: is this + chain.transferRESNUMFeatures(seq, "IEA: SIFTS", + pdb.getId().toLowerCase(Locale.ROOT));// FIXME: is this // "IEA:SIFTS" ? chain.transferResidueAnnotation(siftsMapping, null); } catch (SiftsException e) { System.err.println(e.getMessage()); - } - catch (Exception e) + } catch (Exception e) { - System.err - .println( - "Unexpected exception during SIFTS mapping - falling back to NW for this sequence/structure pair"); + System.err.println( + "Unexpected exception during SIFTS mapping - falling back to NW for this sequence/structure pair"); System.err.println(e.getMessage()); } } @@ -606,8 +611,9 @@ public class StructureSelectionManager StructureMapping nwMapping = getNWMappings(seq, pdbFile, maxChainId, maxChain, pdb, maxAlignseq); seqToStrucMapping.add(nwMapping); - maxChain.transferRESNUMFeatures(seq, null,pdb.getId().toLowerCase(Locale.ROOT)); // FIXME: is this - // "IEA:Jalview" ? + maxChain.transferRESNUMFeatures(seq, null, + pdb.getId().toLowerCase(Locale.ROOT)); // FIXME: is this + // "IEA:Jalview" ? maxChain.transferResidueAnnotation(nwMapping, sqmpping); ds.addPDBId(maxChain.sequence.getAllPDBEntries().get(0)); } @@ -617,8 +623,9 @@ public class StructureSelectionManager { if (progress != null) { - progress.setProgressBar(MessageManager - .getString("status.obtaining_mapping_with_nw_alignment"), + progress.setProgressBar( + MessageManager.getString( + "status.obtaining_mapping_with_nw_alignment"), progressSessionId); } StructureMapping nwMapping = getNWMappings(seq, pdbFile, maxChainId, @@ -708,7 +715,8 @@ public class StructureSelectionManager private StructureMapping getStructureMapping(SequenceI seq, String pdbFile, String targetChainId, StructureFile pdb, PDBChain maxChain, jalview.datamodel.Mapping sqmpping, - AlignSeq maxAlignseq, SiftsClient siftsClient) throws SiftsException + AlignSeq maxAlignseq, SiftsClient siftsClient) + throws SiftsException { StructureMapping curChainMapping = siftsClient .getSiftsStructureMapping(seq, pdbFile, targetChainId); @@ -774,7 +782,8 @@ public class StructureSelectionManager maxChain.makeExactMapping(maxAlignseq, seq); jalview.datamodel.Mapping sqmpping = maxAlignseq .getMappingFromS1(false); - maxChain.transferRESNUMFeatures(seq, null, pdb.getId().toLowerCase(Locale.ROOT)); + maxChain.transferRESNUMFeatures(seq, null, + pdb.getId().toLowerCase(Locale.ROOT)); HashMap mapping = new HashMap<>(); int resNum = -10000; diff --git a/src/jalview/structures/models/AAStructureBindingModel.java b/src/jalview/structures/models/AAStructureBindingModel.java index 9ecf630..44d698d 100644 --- a/src/jalview/structures/models/AAStructureBindingModel.java +++ b/src/jalview/structures/models/AAStructureBindingModel.java @@ -70,9 +70,9 @@ import jalview.util.MessageManager; /** * - * A base class to hold common function for 3D structure model binding. - * Initial version created by refactoring JMol and Chimera binding models, but - * other structure viewers could in principle be accommodated in future. + * A base class to hold common function for 3D structure model binding. Initial + * version created by refactoring JMol and Chimera binding models, but other + * structure viewers could in principle be accommodated in future. * * @author gmcarstairs * @@ -591,7 +591,6 @@ public abstract class AAStructureBindingModel } } } - @Override public abstract void highlightAtoms(List atoms); @@ -925,8 +924,10 @@ public abstract class AAStructureBindingModel */ // todo better way to ensure synchronous than setting getReply true!! executeCommands(commandGenerator.showBackbone(), true, null); - - AtomSpecType backbone = structures[refStructure].isRna ? AtomSpecType.PHOSPHATE : AtomSpecType.ALPHA; + + AtomSpecType backbone = structures[refStructure].isRna + ? AtomSpecType.PHOSPHATE + : AtomSpecType.ALPHA; /* * superpose each (other) structure to the reference in turn */ @@ -941,7 +942,8 @@ public abstract class AAStructureBindingModel for (String reply : replies) { // return this error (Chimera only) to the user - if (reply.toLowerCase(Locale.ROOT).contains("unequal numbers of atoms")) + if (reply.toLowerCase(Locale.ROOT) + .contains("unequal numbers of atoms")) { error += "; " + reply; } diff --git a/src/jalview/urls/IdentifiersUrlProvider.java b/src/jalview/urls/IdentifiersUrlProvider.java index 07eb23e..850a230 100644 --- a/src/jalview/urls/IdentifiersUrlProvider.java +++ b/src/jalview/urls/IdentifiersUrlProvider.java @@ -75,7 +75,7 @@ public class IdentifiersUrlProvider extends UrlProviderImpl * @return hashmap of identifiers.org data, keyed by MIRIAM id */ @SuppressWarnings("unchecked") -private HashMap readIdentifiers(String idFileName) + private HashMap readIdentifiers(String idFileName) { // identifiers.org data HashMap idData = new HashMap<>(); @@ -83,11 +83,12 @@ private HashMap readIdentifiers(String idFileName) String errorMessage = null; try { - // NOTE: THIS WILL FAIL IN SWINGJS BECAUSE IT INVOLVES A FILE READER - + // NOTE: THIS WILL FAIL IN SWINGJS BECAUSE IT INVOLVES A FILE READER + FileReader reader = new FileReader(idFileName); String key = ""; - Map obj = (Map) JSONUtils.parse(reader); + Map obj = (Map) JSONUtils + .parse(reader); if (obj.containsKey(ID_ORG_KEY)) { key = ID_ORG_KEY; @@ -119,9 +120,11 @@ private HashMap readIdentifiers(String idFileName) } catch (IOException | ParseException e) { // unnecessary e.printStackTrace(); - // Note how in JavaScript we can grab the first bytes from any file reader. + // Note how in JavaScript we can grab the first bytes from any file + // reader. // Typical report here is "NetworkError" because the file does not exist. - // "https://." is coming from System.getProperty("user.home"), but this could + // "https://." is coming from System.getProperty("user.home"), but this + // could // be set by the page developer to anything, of course. errorMessage = e.toString(); idData.clear(); @@ -129,7 +132,8 @@ private HashMap readIdentifiers(String idFileName) // BH 2018 -- added more valuable report if (errorMessage != null) { - System.err.println("IdentifiersUrlProvider: cannot read " + idFileName + ": " + errorMessage); + System.err.println("IdentifiersUrlProvider: cannot read " + idFileName + + ": " + errorMessage); } return idData; } diff --git a/src/jalview/util/ColorUtils.java b/src/jalview/util/ColorUtils.java index 5db333f..6734735 100644 --- a/src/jalview/util/ColorUtils.java +++ b/src/jalview/util/ColorUtils.java @@ -34,6 +34,7 @@ import java.util.Random; public class ColorUtils { private static final int MAX_CACHE_SIZE = 1729; + /* * a cache for colours generated from text strings */ diff --git a/src/jalview/util/Comparison.java b/src/jalview/util/Comparison.java index 0d945ac..cd98ee7 100644 --- a/src/jalview/util/Comparison.java +++ b/src/jalview/util/Comparison.java @@ -268,7 +268,7 @@ public class Comparison */ public static final boolean isNucleotide(SequenceI seq) { - if (seq==null) + if (seq == null) { return false; } @@ -297,9 +297,10 @@ public class Comparison * Check for nucleotide count > 85% of total count (in a form that evades * int / float conversion or divide by zero). */ - if ((ntCount+nCount) * 100 > EIGHTY_FIVE * (ntCount + aaCount)) + if ((ntCount + nCount) * 100 > EIGHTY_FIVE * (ntCount + aaCount)) { - return ntCount>0; // all N is considered protein. Could use a threshold here too + return ntCount > 0; // all N is considered protein. Could use a threshold + // here too } else { diff --git a/src/jalview/util/DBRefUtils.java b/src/jalview/util/DBRefUtils.java index bcb0bd3..5337852 100755 --- a/src/jalview/util/DBRefUtils.java +++ b/src/jalview/util/DBRefUtils.java @@ -47,96 +47,106 @@ public class DBRefUtils */ private static Map canonicalSourceNameLookup = new HashMap<>(); - public final static int DB_SOURCE = 1; - public final static int DB_VERSION = 2; - public final static int DB_ID = 4; - public final static int DB_MAP = 8; - - public final static int SEARCH_MODE_NO_MAP_NO_VERSION = DB_SOURCE | DB_ID; - public final static int SEARCH_MODE_FULL = DB_SOURCE | DB_VERSION | DB_ID | DB_MAP; - - static - { - // TODO load these from a resource file? - canonicalSourceNameLookup.put("uniprotkb/swiss-prot", DBRefSource.UNIPROT); - canonicalSourceNameLookup.put("uniprotkb/trembl", DBRefSource.UNIPROT); - - // Ensembl values for dbname in xref REST service: - canonicalSourceNameLookup.put("uniprot/sptrembl", DBRefSource.UNIPROT); - canonicalSourceNameLookup.put("uniprot/swissprot", DBRefSource.UNIPROT); - - canonicalSourceNameLookup.put("pdb", DBRefSource.PDB); - canonicalSourceNameLookup.put("ensembl", DBRefSource.ENSEMBL); - // Ensembl Gn and Tr are for Ensembl genomic and transcript IDs as served - // from ENA. - canonicalSourceNameLookup.put("ensembl-tr", DBRefSource.ENSEMBL); - canonicalSourceNameLookup.put("ensembl-gn", DBRefSource.ENSEMBL); - - // guarantee we always have lowercase entries for canonical string lookups - for (String k : canonicalSourceNameLookup.keySet()) - { - canonicalSourceNameLookup.put(k.toLowerCase(Locale.ROOT), - canonicalSourceNameLookup.get(k)); - } - } + public final static int DB_SOURCE = 1; + + public final static int DB_VERSION = 2; + + public final static int DB_ID = 4; + + public final static int DB_MAP = 8; + + public final static int SEARCH_MODE_NO_MAP_NO_VERSION = DB_SOURCE | DB_ID; + + public final static int SEARCH_MODE_FULL = DB_SOURCE | DB_VERSION | DB_ID + | DB_MAP; + + static + { + // TODO load these from a resource file? + canonicalSourceNameLookup.put("uniprotkb/swiss-prot", + DBRefSource.UNIPROT); + canonicalSourceNameLookup.put("uniprotkb/trembl", DBRefSource.UNIPROT); + + // Ensembl values for dbname in xref REST service: + canonicalSourceNameLookup.put("uniprot/sptrembl", DBRefSource.UNIPROT); + canonicalSourceNameLookup.put("uniprot/swissprot", DBRefSource.UNIPROT); + + canonicalSourceNameLookup.put("pdb", DBRefSource.PDB); + canonicalSourceNameLookup.put("ensembl", DBRefSource.ENSEMBL); + // Ensembl Gn and Tr are for Ensembl genomic and transcript IDs as served + // from ENA. + canonicalSourceNameLookup.put("ensembl-tr", DBRefSource.ENSEMBL); + canonicalSourceNameLookup.put("ensembl-gn", DBRefSource.ENSEMBL); + + // guarantee we always have lowercase entries for canonical string lookups + for (String k : canonicalSourceNameLookup.keySet()) + { + canonicalSourceNameLookup.put(k.toLowerCase(Locale.ROOT), + canonicalSourceNameLookup.get(k)); + } + } /** * Returns those DBRefEntry objects whose source identifier (once converted to * Jalview's canonical form) is in the list of sources to search for. Returns * null if no matches found. * - * @param dbrefs DBRefEntry objects to search - * @param sources array of sources to select + * @param dbrefs + * DBRefEntry objects to search + * @param sources + * array of sources to select * @return */ - public static List selectRefs(List dbrefs, String[] sources) + public static List selectRefs(List dbrefs, + String[] sources) { - if (dbrefs == null || sources == null) - { - return dbrefs; - } - - // BH TODO (what?) - HashSet srcs = new HashSet(); - for (String src : sources) - { - srcs.add(src.toUpperCase(Locale.ROOT)); - } - - int nrefs = dbrefs.size(); - List res = new ArrayList(); - for (int ib = 0; ib < nrefs; ib++) - { - DBRefEntry dbr = dbrefs.get(ib); - String source = getCanonicalName(dbr.getSource()); - if (srcs.contains(source.toUpperCase(Locale.ROOT))) - { - res.add(dbr); - } - } - if (res.size() > 0) - { - // List reply = new DBRefEntry[res.size()]; - return res;// .toArray(reply); - } - return null; + if (dbrefs == null || sources == null) + { + return dbrefs; + } + + // BH TODO (what?) + HashSet srcs = new HashSet(); + for (String src : sources) + { + srcs.add(src.toUpperCase(Locale.ROOT)); + } + + int nrefs = dbrefs.size(); + List res = new ArrayList(); + for (int ib = 0; ib < nrefs; ib++) + { + DBRefEntry dbr = dbrefs.get(ib); + String source = getCanonicalName(dbr.getSource()); + if (srcs.contains(source.toUpperCase(Locale.ROOT))) + { + res.add(dbr); + } + } + if (res.size() > 0) + { + // List reply = new DBRefEntry[res.size()]; + return res;// .toArray(reply); + } + return null; } - private static boolean selectRefsBS(List dbrefs, int sourceKeys, BitSet bsSelect) + private static boolean selectRefsBS(List dbrefs, + int sourceKeys, BitSet bsSelect) { - if (dbrefs == null || sourceKeys == 0) - { - return false; - } - for (int i = 0, n = dbrefs.size(); i < n; i++) - { - DBRefEntry dbr = dbrefs.get(i); - if ((dbr.getSourceKey() & sourceKeys) != 0) - { - bsSelect.clear(i); - } - } - return !bsSelect.isEmpty(); + if (dbrefs == null || sourceKeys == 0) + { + return false; + } + for (int i = 0, n = dbrefs.size(); i < n; i++) + { + DBRefEntry dbr = dbrefs.get(i); + if ((dbr.getSourceKey() & sourceKeys) != 0) + { + bsSelect.clear(i); + } + } + return !bsSelect.isEmpty(); } /** @@ -168,146 +178,180 @@ public class DBRefUtils return rfs; } - /** - * look up source in an internal list of database reference sources and return - * the canonical jalview name for the source, or the original string if it has - * no canonical form. - * - * @param source - * @return canonical jalview source (one of jalview.datamodel.DBRefSource.*) or - * original source - */ - public static String getCanonicalName(String source) - { - if (source == null) - { - return null; - } - String canonical = canonicalSourceNameLookup.get(source.toLowerCase(Locale.ROOT)); - return canonical == null ? source : canonical; - } - - /** - * Returns a (possibly empty) list of those references that match the given - * entry. Currently uses a comparator which matches if - *
          - *
        • database sources are the same
        • - *
        • accession ids are the same
        • - *
        • both have no mapping, or the mappings are the same
        • - *
        - * - * @param ref Set of references to search - * @param entry pattern to match - * @param mode SEARCH_MODE_FULL for all; SEARCH_MODE_NO_MAP_NO_VERSION optional - * @return - */ - public static List searchRefs(List ref, DBRefEntry entry, int mode) { - return searchRefs(ref, entry, matchDbAndIdAndEitherMapOrEquivalentMapList, mode); - } - - /** - * Returns a list of those references that match the given accession id - *
          - *
        • database sources are the same
        • - *
        • accession ids are the same
        • - *
        • both have no mapping, or the mappings are the same
        • - *
        - * - * @param refs Set of references to search - * @param accId accession id to match - * @return - */ - public static List searchRefs(List refs, String accId) { - List rfs = new ArrayList(); - if (refs == null || accId == null) { - return rfs; - } - for (int i = 0, n = refs.size(); i < n; i++) { - DBRefEntry e = refs.get(i); - if (accId.equals(e.getAccessionId())) { - rfs.add(e); - } - } - return rfs; -// return searchRefs(refs, new DBRefEntry("", "", accId), matchId, SEARCH_MODE_FULL); - } - - /** - * Returns a (possibly empty) list of those references that match the given - * entry, according to the given comparator. - * - * @param refs an array of database references to search - * @param entry an entry to compare against - * @param comparator - * @param mode SEARCH_MODE_FULL for all; SEARCH_MODE_NO_MAP_NO_VERSION - * optional - * @return - */ - static List searchRefs(List refs, DBRefEntry entry, DbRefComp comparator, int mode) { - List rfs = new ArrayList(); - if (refs == null || entry == null) { - return rfs; - } - for (int i = 0, n = refs.size(); i < n; i++) { - DBRefEntry e = refs.get(i); - if (comparator.matches(entry, e, SEARCH_MODE_FULL)) { - rfs.add(e); - } - } - return rfs; - } - - interface DbRefComp { - default public boolean matches(DBRefEntry refa, DBRefEntry refb) { - return matches(refa, refb, SEARCH_MODE_FULL); - }; - - public boolean matches(DBRefEntry refa, DBRefEntry refb, int mode); - } - - /** - * match on all non-null fields in refa - */ - // TODO unused - remove? would be broken by equating "" with null - public static DbRefComp matchNonNullonA = new DbRefComp() { - @Override - public boolean matches(DBRefEntry refa, DBRefEntry refb, int mode) { - if ((mode & DB_SOURCE) != 0 && - (refa.getSource() == null || DBRefUtils.getCanonicalName(refb.getSource()) - .equals(DBRefUtils.getCanonicalName(refa.getSource())))) { - if ((mode & DB_VERSION) != 0 && - (refa.getVersion() == null || refb.getVersion().equals(refa.getVersion()))) { - if ((mode & DB_ID) != 0 && - (refa.getAccessionId() == null || refb.getAccessionId().equals(refa.getAccessionId()))) { - if ((mode & DB_MAP) != 0 && - (refa.getMap() == null || (refb.getMap() != null && refb.getMap().equals(refa.getMap())))) { - return true; - } - } - } - } - return false; - } - }; - - /** - * either field is null or field matches for all of source, version, accession - * id and map. - */ - // TODO unused - remove? - public static DbRefComp matchEitherNonNull = new DbRefComp() { - @Override - public boolean matches(DBRefEntry refa, DBRefEntry refb, int mode) { - if (nullOrEqualSource(refa.getSource(), refb.getSource()) - && nullOrEqual(refa.getVersion(), refb.getVersion()) - && nullOrEqual(refa.getAccessionId(), refb.getAccessionId()) - && nullOrEqual(refa.getMap(), refb.getMap())) { - return true; - } - return false; - } - - }; + /** + * look up source in an internal list of database reference sources and return + * the canonical jalview name for the source, or the original string if it has + * no canonical form. + * + * @param source + * @return canonical jalview source (one of jalview.datamodel.DBRefSource.*) + * or original source + */ + public static String getCanonicalName(String source) + { + if (source == null) + { + return null; + } + String canonical = canonicalSourceNameLookup + .get(source.toLowerCase(Locale.ROOT)); + return canonical == null ? source : canonical; + } + + /** + * Returns a (possibly empty) list of those references that match the given + * entry. Currently uses a comparator which matches if + *
          + *
        • database sources are the same
        • + *
        • accession ids are the same
        • + *
        • both have no mapping, or the mappings are the same
        • + *
        + * + * @param ref + * Set of references to search + * @param entry + * pattern to match + * @param mode + * SEARCH_MODE_FULL for all; SEARCH_MODE_NO_MAP_NO_VERSION optional + * @return + */ + public static List searchRefs(List ref, + DBRefEntry entry, int mode) + { + return searchRefs(ref, entry, + matchDbAndIdAndEitherMapOrEquivalentMapList, mode); + } + + /** + * Returns a list of those references that match the given accession id + *
          + *
        • database sources are the same
        • + *
        • accession ids are the same
        • + *
        • both have no mapping, or the mappings are the same
        • + *
        + * + * @param refs + * Set of references to search + * @param accId + * accession id to match + * @return + */ + public static List searchRefs(List refs, + String accId) + { + List rfs = new ArrayList(); + if (refs == null || accId == null) + { + return rfs; + } + for (int i = 0, n = refs.size(); i < n; i++) + { + DBRefEntry e = refs.get(i); + if (accId.equals(e.getAccessionId())) + { + rfs.add(e); + } + } + return rfs; + // return searchRefs(refs, new DBRefEntry("", "", accId), matchId, + // SEARCH_MODE_FULL); + } + + /** + * Returns a (possibly empty) list of those references that match the given + * entry, according to the given comparator. + * + * @param refs + * an array of database references to search + * @param entry + * an entry to compare against + * @param comparator + * @param mode + * SEARCH_MODE_FULL for all; SEARCH_MODE_NO_MAP_NO_VERSION optional + * @return + */ + static List searchRefs(List refs, + DBRefEntry entry, DbRefComp comparator, int mode) + { + List rfs = new ArrayList(); + if (refs == null || entry == null) + { + return rfs; + } + for (int i = 0, n = refs.size(); i < n; i++) + { + DBRefEntry e = refs.get(i); + if (comparator.matches(entry, e, SEARCH_MODE_FULL)) + { + rfs.add(e); + } + } + return rfs; + } + + interface DbRefComp + { + default public boolean matches(DBRefEntry refa, DBRefEntry refb) + { + return matches(refa, refb, SEARCH_MODE_FULL); + }; + + public boolean matches(DBRefEntry refa, DBRefEntry refb, int mode); + } + + /** + * match on all non-null fields in refa + */ + // TODO unused - remove? would be broken by equating "" with null + public static DbRefComp matchNonNullonA = new DbRefComp() + { + @Override + public boolean matches(DBRefEntry refa, DBRefEntry refb, int mode) + { + if ((mode & DB_SOURCE) != 0 && (refa.getSource() == null + || DBRefUtils.getCanonicalName(refb.getSource()).equals( + DBRefUtils.getCanonicalName(refa.getSource())))) + { + if ((mode & DB_VERSION) != 0 && (refa.getVersion() == null + || refb.getVersion().equals(refa.getVersion()))) + { + if ((mode & DB_ID) != 0 && (refa.getAccessionId() == null + || refb.getAccessionId().equals(refa.getAccessionId()))) + { + if ((mode & DB_MAP) != 0 + && (refa.getMap() == null || (refb.getMap() != null + && refb.getMap().equals(refa.getMap())))) + { + return true; + } + } + } + } + return false; + } + }; + + /** + * either field is null or field matches for all of source, version, accession + * id and map. + */ + // TODO unused - remove? + public static DbRefComp matchEitherNonNull = new DbRefComp() + { + @Override + public boolean matches(DBRefEntry refa, DBRefEntry refb, int mode) + { + if (nullOrEqualSource(refa.getSource(), refb.getSource()) + && nullOrEqual(refa.getVersion(), refb.getVersion()) + && nullOrEqual(refa.getAccessionId(), refb.getAccessionId()) + && nullOrEqual(refa.getMap(), refb.getMap())) + { + return true; + } + return false; + } + + }; /** * Parses a DBRefEntry and adds it to the sequence, also a PDBEntry if the @@ -378,124 +422,156 @@ public class DBRefUtils return ref; } - /** - * accession ID and DB must be identical. Version is ignored. Map is either not - * defined or is a match (or is compatible?) - */ - // TODO unused - remove? - public static DbRefComp matchDbAndIdAndEitherMap = new DbRefComp() { - @Override - public boolean matches(DBRefEntry refa, DBRefEntry refb, int mode) { - if (refa.getSource() != null && refb.getSource() != null && DBRefUtils.getCanonicalName(refb.getSource()) - .equals(DBRefUtils.getCanonicalName(refa.getSource()))) { - // We dont care about version - if (refa.getAccessionId() != null && refb.getAccessionId() != null - // FIXME should be && not || here? - || refb.getAccessionId().equals(refa.getAccessionId())) { - if ((refa.getMap() == null || refb.getMap() == null) || (refa.getMap() != null - && refb.getMap() != null && refb.getMap().equals(refa.getMap()))) { - return true; - } - } - } - return false; - } - }; - - /** - * accession ID and DB must be identical. Version is ignored. No map on either - * or map but no maplist on either or maplist of map on a is the complement of - * maplist of map on b. - */ - // TODO unused - remove? - public static DbRefComp matchDbAndIdAndComplementaryMapList = new DbRefComp() { - @Override - public boolean matches(DBRefEntry refa, DBRefEntry refb, int mode) { - if (refa.getSource() != null && refb.getSource() != null && DBRefUtils.getCanonicalName(refb.getSource()) - .equals(DBRefUtils.getCanonicalName(refa.getSource()))) { - // We dont care about version - if (refa.getAccessionId() != null && refb.getAccessionId() != null - || refb.getAccessionId().equals(refa.getAccessionId())) { - if ((refa.getMap() == null && refb.getMap() == null) - || (refa.getMap() != null && refb.getMap() != null)) { - if ((refb.getMap().getMap() == null && refa.getMap().getMap() == null) - || (refb.getMap().getMap() != null && refa.getMap().getMap() != null - && refb.getMap().getMap().getInverse().equals(refa.getMap().getMap()))) { - return true; - } - } - } - } - return false; - } - }; - - /** - * accession ID and DB must be identical. Version is ignored. No map on both or - * or map but no maplist on either or maplist of map on a is equivalent to the - * maplist of map on b. - */ - // TODO unused - remove? - public static DbRefComp matchDbAndIdAndEquivalentMapList = new DbRefComp() { - @Override - public boolean matches(DBRefEntry refa, DBRefEntry refb, int mode) { - if (refa.getSource() != null && refb.getSource() != null && DBRefUtils.getCanonicalName(refb.getSource()) - .equals(DBRefUtils.getCanonicalName(refa.getSource()))) { - // We dont care about version - // if ((refa.getVersion()==null || refb.getVersion()==null) - // || refb.getVersion().equals(refa.getVersion())) - // { - if (refa.getAccessionId() != null && refb.getAccessionId() != null - || refb.getAccessionId().equals(refa.getAccessionId())) { - if (refa.getMap() == null && refb.getMap() == null) { - return true; - } - if (refa.getMap() != null && refb.getMap() != null - && ((refb.getMap().getMap() == null && refa.getMap().getMap() == null) - || (refb.getMap().getMap() != null && refa.getMap().getMap() != null - && refb.getMap().getMap().equals(refa.getMap().getMap())))) { - return true; - } - } - } - return false; - } - }; - - /** - * accession ID and DB must be identical, or null on a. Version is ignored. No - * map on either or map but no maplist on either or maplist of map on a is - * equivalent to the maplist of map on b. - */ - public static DbRefComp matchDbAndIdAndEitherMapOrEquivalentMapList = new DbRefComp() - { - @Override - public boolean matches(DBRefEntry refa, DBRefEntry refb, int mode) - { - if (refa.getSource() != null && refb.getSource() != null && DBRefUtils.getCanonicalName(refb.getSource()) - .equals(DBRefUtils.getCanonicalName(refa.getSource()))) - { - // We dont care about version - if (refa.getAccessionId() == null || refa.getAccessionId().equals(refb.getAccessionId())) - { - if (refa.getMap() == null || refb.getMap() == null) - { - return true; - } - if ((refa.getMap() != null && refb.getMap() != null) - && (refb.getMap().getMap() == null && refa.getMap().getMap() == null) - || (refb.getMap().getMap() != null && refa.getMap().getMap() != null - && (refb.getMap().getMap().equals(refa.getMap().getMap())))) - { - return true; - } - } - } - return false; - } - }; - - /** + /** + * accession ID and DB must be identical. Version is ignored. Map is either + * not defined or is a match (or is compatible?) + */ + // TODO unused - remove? + public static DbRefComp matchDbAndIdAndEitherMap = new DbRefComp() + { + @Override + public boolean matches(DBRefEntry refa, DBRefEntry refb, int mode) + { + if (refa.getSource() != null && refb.getSource() != null + && DBRefUtils.getCanonicalName(refb.getSource()).equals( + DBRefUtils.getCanonicalName(refa.getSource()))) + { + // We dont care about version + if (refa.getAccessionId() != null && refb.getAccessionId() != null + // FIXME should be && not || here? + || refb.getAccessionId().equals(refa.getAccessionId())) + { + if ((refa.getMap() == null || refb.getMap() == null) + || (refa.getMap() != null && refb.getMap() != null + && refb.getMap().equals(refa.getMap()))) + { + return true; + } + } + } + return false; + } + }; + + /** + * accession ID and DB must be identical. Version is ignored. No map on either + * or map but no maplist on either or maplist of map on a is the complement of + * maplist of map on b. + */ + // TODO unused - remove? + public static DbRefComp matchDbAndIdAndComplementaryMapList = new DbRefComp() + { + @Override + public boolean matches(DBRefEntry refa, DBRefEntry refb, int mode) + { + if (refa.getSource() != null && refb.getSource() != null + && DBRefUtils.getCanonicalName(refb.getSource()).equals( + DBRefUtils.getCanonicalName(refa.getSource()))) + { + // We dont care about version + if (refa.getAccessionId() != null && refb.getAccessionId() != null + || refb.getAccessionId().equals(refa.getAccessionId())) + { + if ((refa.getMap() == null && refb.getMap() == null) + || (refa.getMap() != null && refb.getMap() != null)) + { + if ((refb.getMap().getMap() == null + && refa.getMap().getMap() == null) + || (refb.getMap().getMap() != null + && refa.getMap().getMap() != null + && refb.getMap().getMap().getInverse() + .equals(refa.getMap().getMap()))) + { + return true; + } + } + } + } + return false; + } + }; + + /** + * accession ID and DB must be identical. Version is ignored. No map on both + * or or map but no maplist on either or maplist of map on a is equivalent to + * the maplist of map on b. + */ + // TODO unused - remove? + public static DbRefComp matchDbAndIdAndEquivalentMapList = new DbRefComp() + { + @Override + public boolean matches(DBRefEntry refa, DBRefEntry refb, int mode) + { + if (refa.getSource() != null && refb.getSource() != null + && DBRefUtils.getCanonicalName(refb.getSource()).equals( + DBRefUtils.getCanonicalName(refa.getSource()))) + { + // We dont care about version + // if ((refa.getVersion()==null || refb.getVersion()==null) + // || refb.getVersion().equals(refa.getVersion())) + // { + if (refa.getAccessionId() != null && refb.getAccessionId() != null + || refb.getAccessionId().equals(refa.getAccessionId())) + { + if (refa.getMap() == null && refb.getMap() == null) + { + return true; + } + if (refa.getMap() != null && refb.getMap() != null + && ((refb.getMap().getMap() == null + && refa.getMap().getMap() == null) + || (refb.getMap().getMap() != null + && refa.getMap().getMap() != null + && refb.getMap().getMap() + .equals(refa.getMap().getMap())))) + { + return true; + } + } + } + return false; + } + }; + + /** + * accession ID and DB must be identical, or null on a. Version is ignored. No + * map on either or map but no maplist on either or maplist of map on a is + * equivalent to the maplist of map on b. + */ + public static DbRefComp matchDbAndIdAndEitherMapOrEquivalentMapList = new DbRefComp() + { + @Override + public boolean matches(DBRefEntry refa, DBRefEntry refb, int mode) + { + if (refa.getSource() != null && refb.getSource() != null + && DBRefUtils.getCanonicalName(refb.getSource()).equals( + DBRefUtils.getCanonicalName(refa.getSource()))) + { + // We dont care about version + if (refa.getAccessionId() == null + || refa.getAccessionId().equals(refb.getAccessionId())) + { + if (refa.getMap() == null || refb.getMap() == null) + { + return true; + } + if ((refa.getMap() != null && refb.getMap() != null) + && (refb.getMap().getMap() == null + && refa.getMap().getMap() == null) + || (refb.getMap().getMap() != null + && refa.getMap().getMap() != null + && (refb.getMap().getMap() + .equals(refa.getMap().getMap())))) + { + return true; + } + } + } + return false; + } + }; + + /** * Returns the (possibly empty) list of those supplied dbrefs which have the * specified source database, with a case-insensitive match of source name * @@ -520,191 +596,228 @@ public class DBRefUtils return matches; } - /** - * Returns true if either object is null, or they are equal - * - * @param o1 - * @param o2 - * @return - */ - public static boolean nullOrEqual(Object o1, Object o2) { - if (o1 == null || o2 == null) { - return true; - } - return o1.equals(o2); - } - - /** - * canonicalise source string before comparing. null is always wildcard - * - * @param o1 - null or source string to compare - * @param o2 - null or source string to compare - * @return true if either o1 or o2 are null, or o1 equals o2 under - * DBRefUtils.getCanonicalName - * (o1).equals(DBRefUtils.getCanonicalName(o2)) - */ - public static boolean nullOrEqualSource(String o1, String o2) { - if (o1 == null || o2 == null) { - return true; - } - return DBRefUtils.getCanonicalName(o1).equals(DBRefUtils.getCanonicalName(o2)); - } - - /** - * Selects just the DNA or protein references from a set of references - * - * @param selectDna if true, select references to 'standard' DNA databases, else - * to 'standard' peptide databases - * @param refs a set of references to select from - * @return - */ - public static List selectDbRefs(boolean selectDna, List refs) { - return selectRefs(refs, selectDna ? DBRefSource.DNACODINGDBS : DBRefSource.PROTEINDBS); - // could attempt to find other cross - // refs here - ie PDB xrefs - // (not dna, not protein seq) - } - - /** - * Returns the (possibly empty) list of those supplied dbrefs which have the - * specified source database, with a case-insensitive match of source name - * - * @param dbRefs - * @param source - * @return - */ - public static List searchRefsForSource(List dbRefs, String source) { - List matches = new ArrayList(); - if (dbRefs != null && source != null) { - for (DBRefEntry dbref : dbRefs) { - if (source.equalsIgnoreCase(dbref.getSource())) { - matches.add(dbref); - } - } - } - return matches; - } - - /** - * promote direct database references to primary for nucleotide or protein - * sequences if they have an appropriate primary ref - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
        Seq TypePrimary DBDirect which will be promoted
        peptidesEnsemblUniprot
        peptidesEnsemblUniprot
        dnaEnsemblENA
        - * - * @param sequence - */ - public static void ensurePrimaries(SequenceI sequence, List pr) { - if (pr.size() == 0) { - // nothing to do - return; - } - int sstart = sequence.getStart(); - int send = sequence.getEnd(); - boolean isProtein = sequence.isProtein(); - BitSet bsSelect = new BitSet(); - -// List selfs = new ArrayList(); -// { - -// List selddfs = selectDbRefs(!isprot, sequence.getDBRefs()); -// if (selfs == null || selfs.size() == 0) -// { -// // nothing to do -// return; -// } - - List dbrefs = sequence.getDBRefs(); - bsSelect.set(0, dbrefs.size()); - - if (!selectRefsBS(dbrefs, isProtein ? DBRefSource.PROTEIN_MASK : DBRefSource.DNA_CODING_MASK, bsSelect)) - return; - -// selfs.addAll(selfArray); -// } - - // filter non-primary refs - for (int ip = pr.size(); --ip >= 0;) { - DBRefEntry p = pr.get(ip); - for (int i = bsSelect.nextSetBit(0); i >= 0; i = bsSelect.nextSetBit(i + 1)) { - if (dbrefs.get(i) == p) - bsSelect.clear(i); - } -// while (selfs.contains(p)) -// { -// selfs.remove(p); -// } - } -// List toPromote = new ArrayList(); - - for (int ip = pr.size(), keys = 0; --ip >= 0 && keys != DBRefSource.PRIMARY_MASK;) { - DBRefEntry p = pr.get(ip); - if (isProtein) { - switch (getCanonicalName(p.getSource())) { - case DBRefSource.UNIPROT: - keys |= DBRefSource.UNIPROT_MASK; - break; - case DBRefSource.ENSEMBL: - keys |= DBRefSource.ENSEMBL_MASK; - break; - } - } else { - // TODO: promote transcript refs ?? - } - if (keys == 0 || !selectRefsBS(dbrefs, keys, bsSelect)) - return; -// if (candidates != null) - { - for (int ic = bsSelect.nextSetBit(0); ic >= 0; ic = bsSelect.nextSetBit(ic + 1)) -// for (int ic = 0, n = candidates.size(); ic < n; ic++) - { - DBRefEntry cand = dbrefs.get(ic);// candidates.get(ic); - if (cand.hasMap()) { - Mapping map = cand.getMap(); - SequenceI cto = map.getTo(); - if (cto != null && cto != sequence) { - // can't promote refs with mappings to other sequences - continue; - } - MapList mlist = map.getMap(); - if (mlist.getFromLowest() != sstart && mlist.getFromHighest() != send) { - // can't promote refs with mappings from a region of this sequence - // - eg CDS - continue; - } - } - // and promote - not that version must be non-null here, - // as p must have passed isPrimaryCandidate() - cand.setVersion(p.getVersion() + " (promoted)"); - bsSelect.clear(ic); - // selfs.remove(cand); -// toPromote.add(cand); - if (!cand.isPrimaryCandidate()) { - System.out.println("Warning: Couldn't promote dbref " + cand.toString() + " for sequence " - + sequence.toString()); - } - } - } - } - } + /** + * Returns true if either object is null, or they are equal + * + * @param o1 + * @param o2 + * @return + */ + public static boolean nullOrEqual(Object o1, Object o2) + { + if (o1 == null || o2 == null) + { + return true; + } + return o1.equals(o2); + } + + /** + * canonicalise source string before comparing. null is always wildcard + * + * @param o1 + * - null or source string to compare + * @param o2 + * - null or source string to compare + * @return true if either o1 or o2 are null, or o1 equals o2 under + * DBRefUtils.getCanonicalName + * (o1).equals(DBRefUtils.getCanonicalName(o2)) + */ + public static boolean nullOrEqualSource(String o1, String o2) + { + if (o1 == null || o2 == null) + { + return true; + } + return DBRefUtils.getCanonicalName(o1) + .equals(DBRefUtils.getCanonicalName(o2)); + } + + /** + * Selects just the DNA or protein references from a set of references + * + * @param selectDna + * if true, select references to 'standard' DNA databases, else to + * 'standard' peptide databases + * @param refs + * a set of references to select from + * @return + */ + public static List selectDbRefs(boolean selectDna, + List refs) + { + return selectRefs(refs, + selectDna ? DBRefSource.DNACODINGDBS : DBRefSource.PROTEINDBS); + // could attempt to find other cross + // refs here - ie PDB xrefs + // (not dna, not protein seq) + } + + /** + * Returns the (possibly empty) list of those supplied dbrefs which have the + * specified source database, with a case-insensitive match of source name + * + * @param dbRefs + * @param source + * @return + */ + public static List searchRefsForSource( + List dbRefs, String source) + { + List matches = new ArrayList(); + if (dbRefs != null && source != null) + { + for (DBRefEntry dbref : dbRefs) + { + if (source.equalsIgnoreCase(dbref.getSource())) + { + matches.add(dbref); + } + } + } + return matches; + } + + /** + * promote direct database references to primary for nucleotide or protein + * sequences if they have an appropriate primary ref + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
        Seq TypePrimary DBDirect which will be promoted
        peptidesEnsemblUniprot
        peptidesEnsemblUniprot
        dnaEnsemblENA
        + * + * @param sequence + */ + public static void ensurePrimaries(SequenceI sequence, + List pr) + { + if (pr.size() == 0) + { + // nothing to do + return; + } + int sstart = sequence.getStart(); + int send = sequence.getEnd(); + boolean isProtein = sequence.isProtein(); + BitSet bsSelect = new BitSet(); + + // List selfs = new ArrayList(); + // { + + // List selddfs = selectDbRefs(!isprot, sequence.getDBRefs()); + // if (selfs == null || selfs.size() == 0) + // { + // // nothing to do + // return; + // } + + List dbrefs = sequence.getDBRefs(); + bsSelect.set(0, dbrefs.size()); + + if (!selectRefsBS(dbrefs, isProtein ? DBRefSource.PROTEIN_MASK + : DBRefSource.DNA_CODING_MASK, bsSelect)) + return; + + // selfs.addAll(selfArray); + // } + + // filter non-primary refs + for (int ip = pr.size(); --ip >= 0;) + { + DBRefEntry p = pr.get(ip); + for (int i = bsSelect.nextSetBit(0); i >= 0; i = bsSelect + .nextSetBit(i + 1)) + { + if (dbrefs.get(i) == p) + bsSelect.clear(i); + } + // while (selfs.contains(p)) + // { + // selfs.remove(p); + // } + } + // List toPromote = new ArrayList(); + + for (int ip = pr.size(), keys = 0; --ip >= 0 + && keys != DBRefSource.PRIMARY_MASK;) + { + DBRefEntry p = pr.get(ip); + if (isProtein) + { + switch (getCanonicalName(p.getSource())) + { + case DBRefSource.UNIPROT: + keys |= DBRefSource.UNIPROT_MASK; + break; + case DBRefSource.ENSEMBL: + keys |= DBRefSource.ENSEMBL_MASK; + break; + } + } + else + { + // TODO: promote transcript refs ?? + } + if (keys == 0 || !selectRefsBS(dbrefs, keys, bsSelect)) + return; + // if (candidates != null) + { + for (int ic = bsSelect.nextSetBit(0); ic >= 0; ic = bsSelect + .nextSetBit(ic + 1)) + // for (int ic = 0, n = candidates.size(); ic < n; ic++) + { + DBRefEntry cand = dbrefs.get(ic);// candidates.get(ic); + if (cand.hasMap()) + { + Mapping map = cand.getMap(); + SequenceI cto = map.getTo(); + if (cto != null && cto != sequence) + { + // can't promote refs with mappings to other sequences + continue; + } + MapList mlist = map.getMap(); + if (mlist.getFromLowest() != sstart + && mlist.getFromHighest() != send) + { + // can't promote refs with mappings from a region of this sequence + // - eg CDS + continue; + } + } + // and promote - not that version must be non-null here, + // as p must have passed isPrimaryCandidate() + cand.setVersion(p.getVersion() + " (promoted)"); + bsSelect.clear(ic); + // selfs.remove(cand); + // toPromote.add(cand); + if (!cand.isPrimaryCandidate()) + { + System.out.println( + "Warning: Couldn't promote dbref " + cand.toString() + + " for sequence " + sequence.toString()); + } + } + } + } + } } diff --git a/src/jalview/util/HttpUtils.java b/src/jalview/util/HttpUtils.java index 5473f5a..0454cab 100644 --- a/src/jalview/util/HttpUtils.java +++ b/src/jalview/util/HttpUtils.java @@ -73,10 +73,10 @@ public class HttpUtils { return file.startsWith("http://") || file.startsWith("https://"); } - /** * wrapper to get/post to a URL or check headers + * * @param url * @param ids * @param readTimeout @@ -84,8 +84,8 @@ public class HttpUtils * @throws IOException * @throws ProtocolException */ - public static boolean checkUrlAvailable(URL url, - int readTimeout) throws IOException, ProtocolException + public static boolean checkUrlAvailable(URL url, int readTimeout) + throws IOException, ProtocolException { // System.out.println(System.currentTimeMillis() + " " + url); diff --git a/src/jalview/util/ImageMaker.java b/src/jalview/util/ImageMaker.java index e89596b..0cd017f 100755 --- a/src/jalview/util/ImageMaker.java +++ b/src/jalview/util/ImageMaker.java @@ -112,9 +112,8 @@ public class ImageMaker * @param useLineart * @throws IOException */ - public ImageMaker(TYPE imageType, int width, int height, - File file, String fileTitle, boolean useLineart) - throws IOException + public ImageMaker(TYPE imageType, int width, int height, File file, + String fileTitle, boolean useLineart) throws IOException { this.type = imageType; diff --git a/src/jalview/util/MapList.java b/src/jalview/util/MapList.java index d6a125b..b3eabae 100644 --- a/src/jalview/util/MapList.java +++ b/src/jalview/util/MapList.java @@ -323,8 +323,8 @@ public class MapList if (range.length != 2) { // throw new IllegalArgumentException(range); - Console.error("Invalid format for toRange " - + Arrays.toString(range) + " may cause errors"); + Console.error("Invalid format for toRange " + Arrays.toString(range) + + " may cause errors"); } toLowest = Math.min(toLowest, Math.min(range[0], range[1])); toHighest = Math.max(toHighest, Math.max(range[0], range[1])); diff --git a/src/jalview/util/MappingUtils.java b/src/jalview/util/MappingUtils.java index 8d34ea8..25cb810 100644 --- a/src/jalview/util/MappingUtils.java +++ b/src/jalview/util/MappingUtils.java @@ -372,47 +372,48 @@ public final class MappingUtils { // rather than use acf.getCoveringMapping() we iterate through all // mappings to make sure all CDS are selected for a protein - for (SequenceToSequenceMapping map: acf.getMappings()) + for (SequenceToSequenceMapping map : acf.getMappings()) { - if (map.covers(selected) && map.covers(seq)) - { - /* - * Found a sequence mapping. Locate the start/end mapped residues. - */ - List mapping = Arrays - .asList(new AlignedCodonFrame[] - { acf }); - // locate start - SearchResultsI sr = buildSearchResults(selected, - startResiduePos, mapping); - for (SearchResultMatchI m : sr.getResults()) + if (map.covers(selected) && map.covers(seq)) { - mappedStartResidue = m.getStart(); - mappedEndResidue = m.getEnd(); - } - // locate end - allowing for adjustment of start range - sr = buildSearchResults(selected, endResiduePos, mapping); - for (SearchResultMatchI m : sr.getResults()) - { - mappedStartResidue = Math.min(mappedStartResidue, - m.getStart()); - mappedEndResidue = Math.max(mappedEndResidue, m.getEnd()); - } + /* + * Found a sequence mapping. Locate the start/end mapped residues. + */ + List mapping = Arrays + .asList(new AlignedCodonFrame[] + { acf }); + // locate start + SearchResultsI sr = buildSearchResults(selected, + startResiduePos, mapping); + for (SearchResultMatchI m : sr.getResults()) + { + mappedStartResidue = m.getStart(); + mappedEndResidue = m.getEnd(); + } + // locate end - allowing for adjustment of start range + sr = buildSearchResults(selected, endResiduePos, mapping); + for (SearchResultMatchI m : sr.getResults()) + { + mappedStartResidue = Math.min(mappedStartResidue, + m.getStart()); + mappedEndResidue = Math.max(mappedEndResidue, m.getEnd()); + } - /* - * Find the mapped aligned columns, save the range. Note findIndex - * returns a base 1 position, SequenceGroup uses base 0 - */ - int mappedStartCol = seq.findIndex(mappedStartResidue) - 1; - minStartCol = minStartCol == -1 ? mappedStartCol - : Math.min(minStartCol, mappedStartCol); - int mappedEndCol = seq.findIndex(mappedEndResidue) - 1; - maxEndCol = maxEndCol == -1 ? mappedEndCol - : Math.max(maxEndCol, mappedEndCol); - mappedGroup.addSequence(seq, false); - break; + /* + * Find the mapped aligned columns, save the range. Note findIndex + * returns a base 1 position, SequenceGroup uses base 0 + */ + int mappedStartCol = seq.findIndex(mappedStartResidue) - 1; + minStartCol = minStartCol == -1 ? mappedStartCol + : Math.min(minStartCol, mappedStartCol); + int mappedEndCol = seq.findIndex(mappedEndResidue) - 1; + maxEndCol = maxEndCol == -1 ? mappedEndCol + : Math.max(maxEndCol, mappedEndCol); + mappedGroup.addSequence(seq, false); + break; + } } - }} + } } } mappedGroup.setStartRes(minStartCol < 0 ? 0 : minStartCol); @@ -451,23 +452,23 @@ public final class MappingUtils { for (AlignedCodonFrame acf : mappings) { - for (SequenceI seq2 : mapTo.getSequences()) + for (SequenceI seq2 : mapTo.getSequences()) + { + /* + * the corresponding peptide / CDS is the one for which there is + * a complete ('covering') mapping to 'seq' + */ + SequenceI peptide = mappingToNucleotide ? seq2 : seq; + SequenceI cds = mappingToNucleotide ? seq : seq2; + SequenceToSequenceMapping s2s = acf.getCoveringMapping(cds, + peptide); + if (s2s != null) { - /* - * the corresponding peptide / CDS is the one for which there is - * a complete ('covering') mapping to 'seq' - */ - SequenceI peptide = mappingToNucleotide ? seq2 : seq; - SequenceI cds = mappingToNucleotide ? seq : seq2; - SequenceToSequenceMapping s2s = acf.getCoveringMapping(cds, - peptide); - if (s2s != null) - { - mappedOrder.add(seq2); - j++; - break; - } + mappedOrder.add(seq2); + j++; + break; } + } } } @@ -529,7 +530,7 @@ public final class MappingUtils if (colsel == null) { - return; + return; } char fromGapChar = mapFrom.getAlignment().getGapCharacter(); @@ -553,7 +554,7 @@ public final class MappingUtils mapHiddenColumns(regions.next(), codonFrames, newHidden, fromSequences, toSequences, fromGapChar); } - return; + return; } /** diff --git a/src/jalview/util/Platform.java b/src/jalview/util/Platform.java index 2d05a1b..573e2d5 100644 --- a/src/jalview/util/Platform.java +++ b/src/jalview/util/Platform.java @@ -88,7 +88,8 @@ public class Platform public static boolean isLinux() { return (isLinux == null - ? (isLinux = (System.getProperty("os.name").indexOf("Linux") >= 0)) + ? (isLinux = (System.getProperty("os.name") + .indexOf("Linux") >= 0)) : isLinux); } @@ -522,8 +523,7 @@ public class Platform public static Object parseJSON(String json) throws ParseException { - return (isJS() ? JSON.parse(json) - : new JSONParser().parse(json)); + return (isJS() ? JSON.parse(json) : new JSONParser().parse(json)); } public static Object parseJSON(Reader r) @@ -555,8 +555,8 @@ public class Platform * @param is * @param outFile * @throws IOException - * if the file cannot be created or there is a problem - * reading the input stream. + * if the file cannot be created or there is a problem reading the + * input stream. */ public static void streamToFile(InputStream is, File outFile) throws IOException @@ -600,8 +600,8 @@ public class Platform if (isJS()) { System.out.println( - "Platform adding known access-control-allow-origin * for domain " - + domain); + "Platform adding known access-control-allow-origin * for domain " + + domain); /** * @j2sNative * @@ -613,7 +613,8 @@ public class Platform public static void getURLCommandArguments() { - try { + try + { /** * Retrieve the first query field as command arguments to Jalview. Include * only if prior to "?j2s" or "&j2s" or "#". Assign the applet's @@ -621,9 +622,13 @@ public class Platform * * @j2sNative var a = * decodeURI((document.location.href.replace("&","?").split("?j2s")[0] - * + "?").split("?")[1].split("#")[0]); a && (System.out.println("URL arguments detected were "+a)) && - * (J2S.thisApplet.__Info.urlargs = a.split(" ")); - * (!J2S.thisApplet.__Info.args || J2S.thisApplet.__Info.args == "" || J2S.thisApplet.__Info.args == "??") && (J2S.thisApplet.__Info.args = a) && (System.out.println("URL arguments were passed to J2S main.")); + * + "?").split("?")[1].split("#")[0]); a && + * (System.out.println("URL arguments detected were "+a)) && + * (J2S.thisApplet.__Info.urlargs = a.split(" ")); + * (!J2S.thisApplet.__Info.args || J2S.thisApplet.__Info.args + * == "" || J2S.thisApplet.__Info.args == "??") && + * (J2S.thisApplet.__Info.args = a) && (System.out.println("URL + * arguments were passed to J2S main.")); */ } catch (Throwable t) { @@ -631,8 +636,8 @@ public class Platform } /** - * A (case sensitive) file path comparator that ignores the difference between / - * and \ + * A (case sensitive) file path comparator that ignores the difference between + * / and \ * * @param path1 * @param path2 diff --git a/src/jalview/util/ShortcutKeyMaskExWrapper11.java b/src/jalview/util/ShortcutKeyMaskExWrapper11.java index 9877b5d..d60c02b3 100644 --- a/src/jalview/util/ShortcutKeyMaskExWrapper11.java +++ b/src/jalview/util/ShortcutKeyMaskExWrapper11.java @@ -58,5 +58,4 @@ public class ShortcutKeyMaskExWrapper11 implements ShortcutKeyMaskExWrapperI return e.getModifiersEx(); } - } diff --git a/src/jalview/util/StringUtils.java b/src/jalview/util/StringUtils.java index ff1c944..8b62e48 100644 --- a/src/jalview/util/StringUtils.java +++ b/src/jalview/util/StringUtils.java @@ -413,7 +413,8 @@ public class StringUtils { return s.toUpperCase(Locale.ROOT); } - return s.substring(0, 1).toUpperCase(Locale.ROOT) + s.substring(1).toLowerCase(Locale.ROOT); + return s.substring(0, 1).toUpperCase(Locale.ROOT) + + s.substring(1).toLowerCase(Locale.ROOT); } /** diff --git a/src/jalview/util/dialogrunner/DialogRunnerI.java b/src/jalview/util/dialogrunner/DialogRunnerI.java index 0cb90c2..fde80f7 100644 --- a/src/jalview/util/dialogrunner/DialogRunnerI.java +++ b/src/jalview/util/dialogrunner/DialogRunnerI.java @@ -29,28 +29,30 @@ package jalview.util.dialogrunner; * @author jprocter * */ -public interface DialogRunnerI { +public interface DialogRunnerI +{ - /** - * Sets the action to be performed when the dialog returns the given response. - * Note this also handles int-valued responses, which will be - * converted to Integer when this method is invoked. - * - * @param response - * @param action - * @return - */ - DialogRunnerI setResponseHandler(Object response, Runnable action); + /** + * Sets the action to be performed when the dialog returns the given response. + * Note this also handles int-valued responses, which will be + * converted to Integer when this method is invoked. + * + * @param response + * @param action + * @return + */ + DialogRunnerI setResponseHandler(Object response, Runnable action); - /** - * Runs the registered handler (if any) for the given response. The default - * action is to do nothing. Typically an action will be need on 'OK' or other - * positive selection in the dialog. An action might in some cases also be - * needed for a 'Cancel' response. - * - * @param response - * @return - */ - default void handleResponse(Object response) { - } + /** + * Runs the registered handler (if any) for the given response. The default + * action is to do nothing. Typically an action will be need on 'OK' or other + * positive selection in the dialog. An action might in some cases also be + * needed for a 'Cancel' response. + * + * @param response + * @return + */ + default void handleResponse(Object response) + { + } } diff --git a/src/jalview/util/matcher/Matcher.java b/src/jalview/util/matcher/Matcher.java index e43ead2..cbd5458 100644 --- a/src/jalview/util/matcher/Matcher.java +++ b/src/jalview/util/matcher/Matcher.java @@ -104,7 +104,8 @@ public class Matcher implements MatcherI patternType = PatternType.String; } - uppercasePattern = pattern == null ? null : pattern.toUpperCase(Locale.ROOT); + uppercasePattern = pattern == null ? null + : pattern.toUpperCase(Locale.ROOT); // if we add regex conditions (e.g. matchesPattern), then // pattern should hold the raw regex, and @@ -175,7 +176,8 @@ public class Matcher implements MatcherI { boolean matched = false; String upper = compareTo.toUpperCase(Locale.ROOT).trim(); - switch(condition) { + switch (condition) + { case Matches: matched = upper.equals(uppercasePattern); break; @@ -220,9 +222,10 @@ public class Matcher implements MatcherI { return false; } - + boolean matched = false; - switch (condition) { + switch (condition) + { case LT: matched = f < compareTo; break; @@ -337,9 +340,10 @@ public class Matcher implements MatcherI */ return matchesFloat(compareTo, longValue); } - + boolean matched = false; - switch (condition) { + switch (condition) + { case LT: matched = val < longValue; break; @@ -361,7 +365,7 @@ public class Matcher implements MatcherI default: break; } - + return matched; } diff --git a/src/jalview/viewmodel/AlignmentViewport.java b/src/jalview/viewmodel/AlignmentViewport.java index 75cb45b..08af2ec 100644 --- a/src/jalview/viewmodel/AlignmentViewport.java +++ b/src/jalview/viewmodel/AlignmentViewport.java @@ -664,8 +664,7 @@ public abstract class AlignmentViewport * retain any colour thresholds per group while * changing choice of colour scheme (JAL-2386) */ - sg.setColourScheme( - cs == null ? null : cs.getInstance(this, sg)); + sg.setColourScheme(cs == null ? null : cs.getInstance(this, sg)); if (cs != null) { sg.getGroupColourScheme().alignmentChanged(sg, @@ -1821,9 +1820,8 @@ public abstract class AlignmentViewport AlignmentAnnotation clone = new AlignmentAnnotation(annot); if (selectedOnly && selectionGroup != null) { - clone.makeVisibleAnnotation( - selectionGroup.getStartRes(), selectionGroup.getEndRes(), - alignment.getHiddenColumns()); + clone.makeVisibleAnnotation(selectionGroup.getStartRes(), + selectionGroup.getEndRes(), alignment.getHiddenColumns()); } else { @@ -2987,7 +2985,8 @@ public abstract class AlignmentViewport } @Override - public AlignmentExportData getAlignExportData(AlignExportSettingsI options) + public AlignmentExportData getAlignExportData( + AlignExportSettingsI options) { AlignmentI alignmentToExport = null; String[] omitHidden = null; @@ -3015,7 +3014,7 @@ public abstract class AlignmentViewport omitHidden, alignmentStartEnd); return ed; } - + /** * flag set to indicate if structure views might be out of sync with sequences * in the alignment diff --git a/src/jalview/viewmodel/OverviewDimensionsShowHidden.java b/src/jalview/viewmodel/OverviewDimensionsShowHidden.java index 3aa6e1b..4c36cfa 100644 --- a/src/jalview/viewmodel/OverviewDimensionsShowHidden.java +++ b/src/jalview/viewmodel/OverviewDimensionsShowHidden.java @@ -237,7 +237,6 @@ public class OverviewDimensionsShowHidden extends OverviewDimensions heightRatio = (float) alheight / sequencesHeight; } - /** * {@inheritDoc} Callers should have already called resetAlignmentDims to * refresh widthRatio diff --git a/src/jalview/viewmodel/ViewportRanges.java b/src/jalview/viewmodel/ViewportRanges.java index 4f671da..104fb62 100644 --- a/src/jalview/viewmodel/ViewportRanges.java +++ b/src/jalview/viewmodel/ViewportRanges.java @@ -585,8 +585,8 @@ public class ViewportRanges extends ViewportProperties } int residuesToScroll = width * widthsToScroll; - int newStartRes = up ? oldStartRes - residuesToScroll : oldStartRes - + residuesToScroll; + int newStartRes = up ? oldStartRes - residuesToScroll + : oldStartRes + residuesToScroll; if (newStartRes < 0) { newStartRes = 0; @@ -612,7 +612,7 @@ public class ViewportRanges extends ViewportProperties { scrollUp(false); } - + HiddenColumns hidden = al.getHiddenColumns(); while (x < hidden.visibleToAbsoluteColumn(startRes)) { diff --git a/src/jalview/viewmodel/seqfeatures/FeatureRendererModel.java b/src/jalview/viewmodel/seqfeatures/FeatureRendererModel.java index eb1030c..e812ed5 100644 --- a/src/jalview/viewmodel/seqfeatures/FeatureRendererModel.java +++ b/src/jalview/viewmodel/seqfeatures/FeatureRendererModel.java @@ -314,7 +314,8 @@ public abstract class FeatureRendererModel } @Override - public List findFeaturesAtColumn(SequenceI sequence, int column) + public List findFeaturesAtColumn(SequenceI sequence, + int column) { /* * include features at the position provided their feature type is @@ -408,8 +409,8 @@ public abstract class FeatureRendererModel } if (groupDisplayed) { - Set types = asq.getFeatures().getFeatureTypesForGroups( - true, group); + Set types = asq.getFeatures() + .getFeatureTypesForGroups(true, group); for (String type : types) { if (!allfeatures.contains(type)) // or use HashSet and no test? @@ -488,6 +489,7 @@ public abstract class FeatureRendererModel } } } + protected Boolean firing = Boolean.FALSE; /** @@ -628,8 +630,9 @@ public abstract class FeatureRendererModel */ public boolean showFeatureOfType(String type) { - return type == null ? false : (av.getFeaturesDisplayed() == null ? true - : av.getFeaturesDisplayed().isVisible(type)); + return type == null ? false + : (av.getFeaturesDisplayed() == null ? true + : av.getFeaturesDisplayed().isVisible(type)); } @Override @@ -707,15 +710,15 @@ public abstract class FeatureRendererModel } /** - * Sets the priority order for features, with the highest priority (displayed on - * top) at the start of the data array + * Sets the priority order for features, with the highest priority (displayed + * on top) at the start of the data array * * @param data * an array of { Type, Colour, Filter, Boolean } * @param visibleNew * when true current featureDisplay list will be cleared - * @return true if any visible features have been reordered or recoloured, else - * false (i.e. no need to repaint) + * @return true if any visible features have been reordered or recoloured, + * else false (i.e. no need to repaint) */ public boolean setFeaturePriority(FeatureSettingsBean[] data, boolean visibleNew) @@ -999,8 +1002,7 @@ public abstract class FeatureRendererModel */ public boolean featureGroupNotShown(final SequenceFeature sequenceFeature) { - return featureGroups != null - && sequenceFeature.featureGroup != null + return featureGroups != null && sequenceFeature.featureGroup != null && sequenceFeature.featureGroup.length() != 0 && featureGroups.containsKey(sequenceFeature.featureGroup) && !featureGroups.get(sequenceFeature.featureGroup) @@ -1028,9 +1030,9 @@ public abstract class FeatureRendererModel List visibleFeatures = getDisplayedFeatureTypes(); String[] visibleTypes = visibleFeatures .toArray(new String[visibleFeatures.size()]); - List features = sequence.getFeatures().findFeatures( - fromResNo, toResNo, visibleTypes); - + List features = sequence.getFeatures() + .findFeatures(fromResNo, toResNo, visibleTypes); + for (SequenceFeature sf : features) { if (!featureGroupNotShown(sf) && getColour(sf) != null) @@ -1090,8 +1092,7 @@ public abstract class FeatureRendererModel * (checking type and isContactFeature as a fail-safe here, although * currently they are guaranteed to match in this context) */ - if (lastFeature != null - && sf.getBegin() == lastFeature.getBegin() + if (lastFeature != null && sf.getBegin() == lastFeature.getBegin() && sf.getEnd() == lastFeature.getEnd() && sf.isContactFeature() == lastFeature.isContactFeature() && sf.getType().equals(lastFeature.getType())) @@ -1121,7 +1122,8 @@ public abstract class FeatureRendererModel } @Override - public void setFeatureFilter(String featureType, FeatureMatcherSetI filter) + public void setFeatureFilter(String featureType, + FeatureMatcherSetI filter) { if (filter == null || filter.isEmpty()) { @@ -1159,7 +1161,7 @@ public abstract class FeatureRendererModel { return null; } - + return fc.getColor(sf); } @@ -1250,8 +1252,8 @@ public abstract class FeatureRendererModel int fromRes = match.getStart(); int toRes = match.getEnd(); mapFrom = match.getSequence(); - List fs = findFeaturesAtResidue( - mapFrom, fromRes, toRes); + List fs = findFeaturesAtResidue(mapFrom, fromRes, + toRes); for (SequenceFeature sf : fs) { if (!found.contains(sf)) @@ -1296,8 +1298,9 @@ public abstract class FeatureRendererModel } } } - - return new MappedFeatures(mapping.getMapping(), mapFrom, pos, residue, result); + + return new MappedFeatures(mapping.getMapping(), mapFrom, pos, residue, + result); } @Override diff --git a/src/jalview/ws/AWSThread.java b/src/jalview/ws/AWSThread.java index b64a526..6746d1a 100644 --- a/src/jalview/ws/AWSThread.java +++ b/src/jalview/ws/AWSThread.java @@ -127,9 +127,8 @@ public abstract class AWSThread extends Thread throw (new Exception( "Timed out when communicating with server\nTry again later.\n")); } - Console.debug("Job " + j + " Result state " - + jobs[j].getState() + "(ServerError=" - + jobs[j].isServerError() + ")"); + Console.debug("Job " + j + " Result state " + jobs[j].getState() + + "(ServerError=" + jobs[j].isServerError() + ")"); } catch (Exception ex) { // Deal with Transaction exceptions @@ -167,8 +166,8 @@ public abstract class AWSThread extends Thread jobs[j].clearResponse(); // may contain out of date result data wsInfo.setStatus(jobs[j].jobnum, WebserviceInfo.STATE_STOPPED_ERROR); - Console.error("Out of memory when retrieving Job " + j - + " id:" + WsUrl + "/" + jobs[j].jobId, er); + Console.error("Out of memory when retrieving Job " + j + " id:" + + WsUrl + "/" + jobs[j].jobId, er); new jalview.gui.OOMWarning( "retrieving result for " + WebServiceName, er); System.gc(); @@ -185,8 +184,7 @@ public abstract class AWSThread extends Thread Thread.sleep(5000); } catch (InterruptedException e) { - Console.debug("Interrupted sleep waiting for next job poll.", - e); + Console.debug("Interrupted sleep waiting for next job poll.", e); } // System.out.println("I'm alive "+alTitle); } diff --git a/src/jalview/ws/DBRefFetcher.java b/src/jalview/ws/DBRefFetcher.java index 4705fe5..d8858a9 100644 --- a/src/jalview/ws/DBRefFetcher.java +++ b/src/jalview/ws/DBRefFetcher.java @@ -306,8 +306,7 @@ public class DBRefFetcher implements Runnable e.printStackTrace(); } - Vector sdataset = new Vector<>( - Arrays.asList(dataset)); + Vector sdataset = new Vector<>(Arrays.asList(dataset)); List warningMessages = new ArrayList<>(); // clear any old feature display settings recorded from past sessions @@ -365,8 +364,8 @@ public class DBRefFetcher implements Runnable { if (Console.isDebugEnabled()) { - Console.debug("Querying " + dbsource.getDbName() - + " with : '" + queryString.toString() + "'"); + Console.debug("Querying " + dbsource.getDbName() + " with : '" + + queryString.toString() + "'"); } retrieved = dbsource.getSequenceRecords(queryString.toString()); } catch (Exception ex) @@ -379,8 +378,8 @@ public class DBRefFetcher implements Runnable } if (retrieved != null) { - transferReferences(sdataset, dbsource, retrieved, - trimDsSeqs, warningMessages); + transferReferences(sdataset, dbsource, retrieved, trimDsSeqs, + warningMessages); } } else @@ -399,7 +398,7 @@ public class DBRefFetcher implements Runnable { for (int j = 0, n = uprefs.size(); j < n; j++) { - DBRefEntry upref = uprefs.get(j); + DBRefEntry upref = uprefs.get(j); addSeqId(sequence, upref.getAccessionId()); queries.addElement( upref.getAccessionId().toUpperCase(Locale.ROOT)); @@ -407,10 +406,10 @@ public class DBRefFetcher implements Runnable } else { - Pattern possibleIds = Pattern.compile("[A-Za-z0-9_]+"); + Pattern possibleIds = Pattern.compile("[A-Za-z0-9_]+"); // generate queries from sequence ID string Matcher tokens = possibleIds.matcher(sequence.getName()); - int p=0; + int p = 0; while (tokens.find(p)) { String token = tokens.group(); @@ -510,9 +509,8 @@ public class DBRefFetcher implements Runnable * a list of messages to add to */ boolean transferReferences(Vector sdataset, - DbSourceProxy dbSourceProxy, - AlignmentI retrievedAl, boolean trimDatasetSeqs, - List warningMessages) + DbSourceProxy dbSourceProxy, AlignmentI retrievedAl, + boolean trimDatasetSeqs, List warningMessages) { // System.out.println("trimming ? " + trimDatasetSeqs); if (retrievedAl == null || retrievedAl.getHeight() == 0) @@ -544,7 +542,7 @@ public class DBRefFetcher implements Runnable } for (int j = 0, n = entryRefs.size(); j < n; j++) { - DBRefEntry ref = entryRefs.get(j); + DBRefEntry ref = entryRefs.get(j); String accessionId = ref.getAccessionId(); // match up on accessionId if (seqRefs.containsKey(accessionId.toUpperCase(Locale.ROOT))) @@ -741,7 +739,8 @@ public class DBRefFetcher implements Runnable .toUpperCase(Locale.ROOT); int oldstrt = alseqs[alsq].getStart(); alseqs[alsq].setStart(sequence.getSequenceAsString() - .toUpperCase(Locale.ROOT).indexOf(ngAlsq) + sequence.getStart()); + .toUpperCase(Locale.ROOT).indexOf(ngAlsq) + + sequence.getStart()); if (oldstrt != alseqs[alsq].getStart()) { alseqs[alsq].setEnd( @@ -782,15 +781,17 @@ public class DBRefFetcher implements Runnable /** * - * @return any feature settings associated with sources that have provided sequences + * @return any feature settings associated with sources that have provided + * sequences */ - public ListgetFeatureSettingsModels() + public List getFeatureSettingsModels() { return featureDisplaySettings == null ? Arrays.asList(new FeatureSettingsModelI[0]) : Arrays.asList(featureDisplaySettings.values() .toArray(new FeatureSettingsModelI[1])); } + /** * Adds the message to the list unless it already contains it * @@ -813,11 +814,11 @@ public class DBRefFetcher implements Runnable */ private SequenceI[] recoverDbSequences(SequenceI[] sequencesArray) { - int n; - if (sequencesArray == null || (n = sequencesArray.length) == 0) - return sequencesArray; + int n; + if (sequencesArray == null || (n = sequencesArray.length) == 0) + return sequencesArray; ArrayList nseq = new ArrayList<>(); - for (int i = 0;i < n; i++) + for (int i = 0; i < n; i++) { nseq.add(sequencesArray[i]); List dbr = sequencesArray[i].getDBRefs(); @@ -832,11 +833,12 @@ public class DBRefFetcher implements Runnable { nseq.add(map.getTo()); } - } + } } } } - // BH 2019.01.25 question here if this is the right logic. Return the original if nothing found? + // BH 2019.01.25 question here if this is the right logic. Return the + // original if nothing found? if (nseq.size() > 0) { return nseq.toArray(new SequenceI[nseq.size()]); diff --git a/src/jalview/ws/HttpClientUtils.java b/src/jalview/ws/HttpClientUtils.java index 8f97226..8c3dca4 100644 --- a/src/jalview/ws/HttpClientUtils.java +++ b/src/jalview/ws/HttpClientUtils.java @@ -217,7 +217,7 @@ public class HttpClientUtils // httpGet.setEntity(ue); HttpResponse response = httpclient.execute(httpGet); HttpEntity resEntity = response.getEntity(); - + if (resEntity != null) { BufferedReader r = new BufferedReader( diff --git a/src/jalview/ws/SequenceFetcher.java b/src/jalview/ws/SequenceFetcher.java index 8fb69be..48aafca 100644 --- a/src/jalview/ws/SequenceFetcher.java +++ b/src/jalview/ws/SequenceFetcher.java @@ -64,7 +64,8 @@ public class SequenceFetcher extends ASequenceFetcher } /** - * return an ordered list of database sources excluding alignment only databases + * return an ordered list of database sources excluding alignment only + * databases */ public String[] getNonAlignmentSources() { diff --git a/src/jalview/ws/dbsources/EBIAlfaFold.java b/src/jalview/ws/dbsources/EBIAlfaFold.java index 4449b0b..e3687bd 100644 --- a/src/jalview/ws/dbsources/EBIAlfaFold.java +++ b/src/jalview/ws/dbsources/EBIAlfaFold.java @@ -84,7 +84,7 @@ public class EBIAlfaFold extends EbiFileRetrievedProxy @Override public Regex getAccessionValidator() { - Regex validator = new Regex("(AF-[A-Z]+[0-9]+[A-Z0-9]+-F1)"); + Regex validator = new Regex("(AF-[A-Z]+[0-9]+[A-Z0-9]+-F1)"); validator.setIgnoreCase(true); return validator; } @@ -126,7 +126,9 @@ public class EBIAlfaFold extends EbiFileRetrievedProxy { return getSequenceRecords(queries, null); } - public AlignmentI getSequenceRecords(String queries, String retrievalUrl) throws Exception + + public AlignmentI getSequenceRecords(String queries, String retrievalUrl) + throws Exception { AlignmentI pdbAlignment = null; String chain = null; @@ -158,7 +160,7 @@ public class EBIAlfaFold extends EbiFileRetrievedProxy { File tmpFile = File.createTempFile(id, ".cif"); UrlDownloadClient.download(alphaFoldCif, tmpFile); - + // may not need this check ? file = tmpFile.getAbsolutePath(); if (file == null) @@ -166,8 +168,8 @@ public class EBIAlfaFold extends EbiFileRetrievedProxy return null; } - pdbAlignment = importDownloadedStructureFromUrl(alphaFoldCif, tmpFile, id, chain, getDbSource(),getDbVersion()); - + pdbAlignment = importDownloadedStructureFromUrl(alphaFoldCif, tmpFile, + id, chain, getDbSource(), getDbVersion()); if (pdbAlignment == null || pdbAlignment.getHeight() < 1) { @@ -185,7 +187,9 @@ public class EBIAlfaFold extends EbiFileRetrievedProxy } /** - * general purpose structure importer - designed to yield alignment useful for transfer of annotation to associated sequences + * general purpose structure importer - designed to yield alignment useful for + * transfer of annotation to associated sequences + * * @param alphaFoldCif * @param tmpFile * @param id @@ -195,8 +199,9 @@ public class EBIAlfaFold extends EbiFileRetrievedProxy * @return * @throws Exception */ - public static AlignmentI importDownloadedStructureFromUrl(String alphaFoldCif, - File tmpFile, String id, String chain, String dbSource, String dbVersion) throws Exception + public static AlignmentI importDownloadedStructureFromUrl( + String alphaFoldCif, File tmpFile, String id, String chain, + String dbSource, String dbVersion) throws Exception { String file = tmpFile.getAbsolutePath(); // todo get rid of Type and use FileFormatI instead? @@ -249,15 +254,17 @@ public class EBIAlfaFold extends EbiFileRetrievedProxy // dbentry.setMap() pdbcs.addDBRef(dbentry); // update any feature groups - List allsf = pdbcs.getFeatures().getAllFeatures(); + List allsf = pdbcs.getFeatures() + .getAllFeatures(); List newsf = new ArrayList(); - if (allsf!=null && allsf.size()>0) + if (allsf != null && allsf.size() > 0) { - for (SequenceFeature f:allsf) + for (SequenceFeature f : allsf) { if (file.equals(f.getFeatureGroup())) { - f = new SequenceFeature(f, f.type, f.begin, f.end, id, f.score); + f = new SequenceFeature(f, f.type, f.begin, f.end, id, + f.score); } newsf.add(f); } diff --git a/src/jalview/ws/dbsources/EmblFlatfileSource.java b/src/jalview/ws/dbsources/EmblFlatfileSource.java index 7cb8f09..c7537c3 100644 --- a/src/jalview/ws/dbsources/EmblFlatfileSource.java +++ b/src/jalview/ws/dbsources/EmblFlatfileSource.java @@ -75,7 +75,8 @@ public abstract class EmblFlatfileSource extends EbiFileRetrievedProxy try { reply = dbFetch.fetchDataAsFile( - dbName.toLowerCase(Locale.ROOT) + ":" + query.trim(), null, "gz"); + dbName.toLowerCase(Locale.ROOT) + ":" + query.trim(), null, + "gz"); } catch (Exception e) { stopQuery(); @@ -105,8 +106,7 @@ public abstract class EmblFlatfileSource extends EbiFileRetrievedProxy if (al == null) { - Console.error( - "No record found for '" + dbName + ":" + query + "'"); + Console.error("No record found for '" + dbName + ":" + query + "'"); } } diff --git a/src/jalview/ws/dbsources/Pdb.java b/src/jalview/ws/dbsources/Pdb.java index a658089..bb5c165 100644 --- a/src/jalview/ws/dbsources/Pdb.java +++ b/src/jalview/ws/dbsources/Pdb.java @@ -165,8 +165,8 @@ public class Pdb extends EbiFileRetrievedProxy // todo get rid of Type and use FileFormatI instead? FileFormatI fileFormat = (pdbFileFormat == Type.PDB) ? FileFormat.PDB : FileFormat.MMCif; - pdbAlignment = new FormatAdapter().readFile(tmpFile, DataSourceType.FILE, - fileFormat); + pdbAlignment = new FormatAdapter().readFile(tmpFile, + DataSourceType.FILE, fileFormat); if (pdbAlignment != null) { List toremove = new ArrayList(); diff --git a/src/jalview/ws/dbsources/Pfam.java b/src/jalview/ws/dbsources/Pfam.java index 456236a..2587bac 100644 --- a/src/jalview/ws/dbsources/Pfam.java +++ b/src/jalview/ws/dbsources/Pfam.java @@ -44,7 +44,8 @@ abstract public class Pfam extends Xfam static final String PFAM_BASEURL_KEY = "PFAM_BASEURL"; private static final String DEFAULT_PFAM_BASEURL = "https://pfam.xfam.org"; - static { + static + { Platform.addJ2SDirectDatabaseCall(DEFAULT_PFAM_BASEURL); } diff --git a/src/jalview/ws/dbsources/Rfam.java b/src/jalview/ws/dbsources/Rfam.java index 04b3669..98df166 100644 --- a/src/jalview/ws/dbsources/Rfam.java +++ b/src/jalview/ws/dbsources/Rfam.java @@ -37,9 +37,11 @@ abstract public class Rfam extends Xfam private static final String DEFAULT_RFAM_BASEURL = "https://rfam.xfam.org"; - static { + static + { Platform.addJ2SDirectDatabaseCall(DEFAULT_RFAM_BASEURL); } + /* * append to URLs to retrieve as a gzipped file */ diff --git a/src/jalview/ws/dbsources/TDBeacons.java b/src/jalview/ws/dbsources/TDBeacons.java index 345e217..7326c6e 100644 --- a/src/jalview/ws/dbsources/TDBeacons.java +++ b/src/jalview/ws/dbsources/TDBeacons.java @@ -72,7 +72,7 @@ public class TDBeacons extends DbSourceProxyImpl private static final String DEFAULT_UNIPROT_DOMAIN = "https://www.uniprot.org"; private static final String BAR_DELIMITER = "|"; - + private static final String DEFAULT_THREEDBEACONS_DOMAIN = "https://wwwdev.ebi.ac.uk/pdbe/pdbe-kb/3dbeacons-hub-api/uniprot/summary/"; /** @@ -86,7 +86,7 @@ public class TDBeacons extends DbSourceProxyImpl private String getDomain() { return Cache.getDefault("UNIPROT_DOMAIN", DEFAULT_UNIPROT_DOMAIN); - //return Cache.getDefault("3DB_DOMAIN", DEFAULT_THREEDBEACONS_DOMAIN ); + // return Cache.getDefault("3DB_DOMAIN", DEFAULT_THREEDBEACONS_DOMAIN ); } /* @@ -148,9 +148,8 @@ public class TDBeacons extends DbSourceProxyImpl "(UNIPROT\\|?|UNIPROT_|UNIREF\\d+_|UNIREF\\d+\\|?)", ""); AlignmentI al = null; - String downloadstring = getDomain() + "/uniprot/" + queries - + ".xml"; -// String downloadstring = getDomain() + queries + ".json"; + String downloadstring = getDomain() + "/uniprot/" + queries + ".xml"; + // String downloadstring = getDomain() + queries + ".json"; URL url = new URL(downloadstring); URLConnection urlconn = url.openConnection(); @@ -192,8 +191,7 @@ public class TDBeacons extends DbSourceProxyImpl String seqString = entry.getSequence().getValue().replaceAll("\\s*", ""); - SequenceI sequence = new Sequence(id, - seqString); + SequenceI sequence = new Sequence(id, seqString); sequence.setDescription(getUniprotEntryDescription(entry)); /* @@ -509,10 +507,12 @@ public class TDBeacons extends DbSourceProxyImpl XMLStreamReader streamReader = XMLInputFactory.newInstance() .createXMLStreamReader(is); javax.xml.bind.Unmarshaller um = jc.createUnmarshaller(); - JAXBElement uniprotElement = - um.unmarshal(streamReader, jalview.xml.binding.uniprot.Uniprot.class); - jalview.xml.binding.uniprot.Uniprot uniprot = uniprotElement.getValue(); - + JAXBElement uniprotElement = um + .unmarshal(streamReader, + jalview.xml.binding.uniprot.Uniprot.class); + jalview.xml.binding.uniprot.Uniprot uniprot = uniprotElement + .getValue(); + if (uniprot != null && !uniprot.getEntry().isEmpty()) { entries = uniprot.getEntry(); diff --git a/src/jalview/ws/dbsources/Uniprot.java b/src/jalview/ws/dbsources/Uniprot.java index b9fe52f..371eb50 100644 --- a/src/jalview/ws/dbsources/Uniprot.java +++ b/src/jalview/ws/dbsources/Uniprot.java @@ -144,13 +144,12 @@ public class Uniprot extends DbSourceProxyImpl "(UNIPROT\\|?|UNIPROT_|UNIREF\\d+_|UNIREF\\d+\\|?)", ""); AlignmentI al = null; - String downloadstring = getDomain() + "/uniprot/" + queries - + ".xml"; + String downloadstring = getDomain() + "/uniprot/" + queries + ".xml"; URL url = new URL(downloadstring); - HttpURLConnection urlconn = (HttpURLConnection)url.openConnection(); + HttpURLConnection urlconn = (HttpURLConnection) url.openConnection(); // anything other than 200 means we don't have data - // TODO: JAL-3882 reuse the EnsemblRestClient's fair + // TODO: JAL-3882 reuse the EnsemblRestClient's fair // use/backoff logic to retry when the server tells us to go away if (urlconn.getResponseCode() == 200) { @@ -168,7 +167,7 @@ public class Uniprot extends DbSourceProxyImpl } stopQuery(); return al; - + } catch (Exception e) { throw (e); @@ -193,8 +192,7 @@ public class Uniprot extends DbSourceProxyImpl String seqString = entry.getSequence().getValue().replaceAll("\\s*", ""); - SequenceI sequence = new Sequence(id, - seqString); + SequenceI sequence = new Sequence(id, seqString); sequence.setDescription(getUniprotEntryDescription(entry)); /* @@ -202,12 +200,12 @@ public class Uniprot extends DbSourceProxyImpl */ final String dbVersion = getDbVersion(); List dbRefs = new ArrayList<>(); - boolean canonical=true; + boolean canonical = true; for (String accessionId : entry.getAccession()) { DBRefEntry dbRef = new DBRefEntry(DBRefSource.UNIPROT, dbVersion, - accessionId,null,canonical); - canonical=false; + accessionId, null, canonical); + canonical = false; dbRefs.add(dbRef); } @@ -512,10 +510,12 @@ public class Uniprot extends DbSourceProxyImpl XMLStreamReader streamReader = XMLInputFactory.newInstance() .createXMLStreamReader(is); javax.xml.bind.Unmarshaller um = jc.createUnmarshaller(); - JAXBElement uniprotElement = - um.unmarshal(streamReader, jalview.xml.binding.uniprot.Uniprot.class); - jalview.xml.binding.uniprot.Uniprot uniprot = uniprotElement.getValue(); - + JAXBElement uniprotElement = um + .unmarshal(streamReader, + jalview.xml.binding.uniprot.Uniprot.class); + jalview.xml.binding.uniprot.Uniprot uniprot = uniprotElement + .getValue(); + if (uniprot != null && !uniprot.getEntry().isEmpty()) { entries = uniprot.getEntry(); @@ -523,7 +523,10 @@ public class Uniprot extends DbSourceProxyImpl } catch (JAXBException | XMLStreamException | FactoryConfigurationError e) { - if (e instanceof javax.xml.bind.UnmarshalException && e.getCause()!=null && e.getCause() instanceof XMLStreamException && e.getCause().getMessage().contains("[row,col]:[1,1]")) + if (e instanceof javax.xml.bind.UnmarshalException + && e.getCause() != null + && e.getCause() instanceof XMLStreamException + && e.getCause().getMessage().contains("[row,col]:[1,1]")) { // trying to parse an empty stream return null; diff --git a/src/jalview/ws/dbsources/Xfam.java b/src/jalview/ws/dbsources/Xfam.java index e39f0ab..36d9891 100644 --- a/src/jalview/ws/dbsources/Xfam.java +++ b/src/jalview/ws/dbsources/Xfam.java @@ -87,8 +87,8 @@ public abstract class Xfam extends DbSourceProxyImpl String getURL(String queries) { - return getURLPrefix() + "/family/" + queries.trim().toUpperCase(Locale.ROOT) - + getURLSuffix(); + return getURLPrefix() + "/family/" + + queries.trim().toUpperCase(Locale.ROOT) + getURLSuffix(); } /** diff --git a/src/jalview/ws/ebi/EBIFetchClient.java b/src/jalview/ws/ebi/EBIFetchClient.java index 1f833d0..65b9655 100644 --- a/src/jalview/ws/ebi/EBIFetchClient.java +++ b/src/jalview/ws/ebi/EBIFetchClient.java @@ -266,9 +266,12 @@ public class EBIFetchClient } return null; } - static { + + static + { Platform.addJ2SDirectDatabaseCall("https://www.ebi.ac.uk/"); } + /** * Constructs the URL to fetch from * @@ -289,7 +292,8 @@ public class EBIFetchClient else { url = "https://www.ebi.ac.uk/Tools/dbfetch/dbfetch/" - + database.toLowerCase(Locale.ROOT) + "/" + ids.toLowerCase(Locale.ROOT) + + database.toLowerCase(Locale.ROOT) + "/" + + ids.toLowerCase(Locale.ROOT) + (format != null ? "/" + format : ""); } return url; diff --git a/src/jalview/ws/jws1/Discoverer.java b/src/jalview/ws/jws1/Discoverer.java index 4a8f512..69e47a3 100644 --- a/src/jalview/ws/jws1/Discoverer.java +++ b/src/jalview/ws/jws1/Discoverer.java @@ -151,7 +151,7 @@ public class Discoverer implements Runnable } catch (Exception ex) { Console.warn("Problem whilst trying to make a URL from '" - + ((url != null) ? url : "") + "'"); + + ((url != null) ? url : "") + "'"); Console.warn( "This was probably due to a malformed comma separated list" + " in the DISCOVERY_URLS entry of $(HOME)/.jalview_properties)"); @@ -179,8 +179,7 @@ public class Discoverer implements Runnable Console.debug("(Re)-Initialising the discovery URL list."); try { - reallyDiscoverServices = Cache - .getDefault("DISCOVERY_START", false); + reallyDiscoverServices = Cache.getDefault("DISCOVERY_START", false); if (reallyDiscoverServices) { ServiceURLList = getDiscoveryURLS(); @@ -292,9 +291,9 @@ public class Discoverer implements Runnable { if (!cat.contains(sh[i])) { - Console.debug("A " + sh[i].getAbstractName() - + " service called " + sh[i].getName() + " exists at " - + sh[i].getEndpointURL() + "\n"); + Console.debug("A " + sh[i].getAbstractName() + " service called " + + sh[i].getName() + " exists at " + sh[i].getEndpointURL() + + "\n"); if (!sscat.containsKey(sh[i].getAbstractName())) { sscat.put(sh[i].getAbstractName(), cat = new Vector<>()); @@ -322,7 +321,7 @@ public class Discoverer implements Runnable } catch (Exception e) { Console.debug("Ignoring bad discovery service URL " - + sh[i].getEndpointURL(), e); + + sh[i].getEndpointURL(), e); } } } @@ -344,16 +343,14 @@ public class Discoverer implements Runnable } while (s_url < ServiceURLList.size()) { - if ((sh = getServices( - ServiceURLList.get(s_url))) != null) + if ((sh = getServices(ServiceURLList.get(s_url))) != null) { buildServiceLists(sh, cat, sscat); } else { - Console.warn("No services at " - + (ServiceURLList.get(s_url)) + Console.warn("No services at " + (ServiceURLList.get(s_url)) + " - check DISCOVERY_URLS property in .jalview_properties"); } s_url++; @@ -404,8 +401,7 @@ public class Discoverer implements Runnable serviceClientBindings.put("SecStrPred", new JPredClient()); serviceClientBindings.put("SeqSearch", new SeqSearchWSClient()); } - WS1Client instance = serviceClientBindings - .get(sh.getAbstractName()); + WS1Client instance = serviceClientBindings.get(sh.getAbstractName()); if (instance == null) { System.err.println( diff --git a/src/jalview/ws/jws2/AADisorderClient.java b/src/jalview/ws/jws2/AADisorderClient.java index 315e69f..a706896 100644 --- a/src/jalview/ws/jws2/AADisorderClient.java +++ b/src/jalview/ws/jws2/AADisorderClient.java @@ -208,9 +208,8 @@ public class AADisorderClient extends JabawsCalcWorker } catch (Exception q) { Console.info("Couldn't recover disorder prediction for sequence " - + seq.getName() + "(Prediction name was " + seqId - + ")" - + "\nSee http://issues.jalview.org/browse/JAL-1319 for one possible reason why disorder predictions might fail."); + + seq.getName() + "(Prediction name was " + seqId + ")" + + "\nSee http://issues.jalview.org/browse/JAL-1319 for one possible reason why disorder predictions might fail."); } float last = Float.NaN, val = Float.NaN; int lastAnnot = ourAnnot.size(); @@ -238,13 +237,13 @@ public class AADisorderClient extends JabawsCalcWorker if (vals.hasNext()) { val = vals.next().floatValue(); - sf = new SequenceFeature(type[0], type[1], - base + rn.from, base + rn.to, val, methodName); + sf = new SequenceFeature(type[0], type[1], base + rn.from, + base + rn.to, val, methodName); } else { - sf = new SequenceFeature(type[0], type[1], - base + rn.from, base + rn.to, methodName); + sf = new SequenceFeature(type[0], type[1], base + rn.from, + base + rn.to, methodName); } dseq.addSequenceFeature(sf); if (last != val && !Float.isNaN(last)) diff --git a/src/jalview/ws/jws2/AbstractJabaCalcWorker.java b/src/jalview/ws/jws2/AbstractJabaCalcWorker.java index 4ed92fb..9d56de4 100644 --- a/src/jalview/ws/jws2/AbstractJabaCalcWorker.java +++ b/src/jalview/ws/jws2/AbstractJabaCalcWorker.java @@ -345,8 +345,8 @@ public abstract class AbstractJabaCalcWorker extends AlignCalcWorker } if (collectAnnotationResultsFor(rslt)) { - Console.debug("Updating result annotation from Job " - + rslt + " at " + service.getUri()); + Console.debug("Updating result annotation from Job " + rslt + + " at " + service.getUri()); updateResultAnnotation(true); ap.adjustAnnotationHeight(); } diff --git a/src/jalview/ws/jws2/Jws2Discoverer.java b/src/jalview/ws/jws2/Jws2Discoverer.java index d624c5c..b6b4b2e 100644 --- a/src/jalview/ws/jws2/Jws2Discoverer.java +++ b/src/jalview/ws/jws2/Jws2Discoverer.java @@ -492,8 +492,7 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI ArrayList hostservices = hosts.get(service.getHost()); if (hostservices == null) { - hosts.put(service.getHost(), - hostservices = new ArrayList<>()); + hosts.put(service.getHost(), hostservices = new ArrayList<>()); hostlist.add(service.getHost()); } hostservices.add(service); @@ -736,8 +735,7 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI public Vector getServices() { - return (services == null) ? new Vector<>() - : new Vector<>(services); + return (services == null) ? new Vector<>() : new Vector<>(services); } /** diff --git a/src/jalview/ws/jws2/MsaWSClient.java b/src/jalview/ws/jws2/MsaWSClient.java index 8ed4a36..9caa803 100644 --- a/src/jalview/ws/jws2/MsaWSClient.java +++ b/src/jalview/ws/jws2/MsaWSClient.java @@ -269,10 +269,8 @@ public class MsaWSClient extends Jws2Client if (msa != null) { - new MsaWSClient(service, af.getTitle(), msa, withGaps, - true, - af.getViewport().getAlignment().getDataset(), - af); + new MsaWSClient(service, af.getTitle(), msa, withGaps, true, + af.getViewport().getAlignment().getDataset(), af); } } @@ -345,16 +343,13 @@ public class MsaWSClient extends Jws2Client @Override public void actionPerformed(ActionEvent e) { - AlignmentView msa = af - .gatherSequencesForAlignment(); + AlignmentView msa = af.gatherSequencesForAlignment(); if (msa != null) { MsaWSClient msac = new MsaWSClient(service, preSet, af.getTitle(), msa, false, true, - af.getViewport().getAlignment() - .getDataset(), - af); + af.getViewport().getAlignment().getDataset(), af); } } @@ -380,12 +375,13 @@ public class MsaWSClient extends Jws2Client protected void startJob(final Jws2Instance service, final AlignFrame af, final boolean withGaps, AlignmentView msa) { - try { - new MsaWSClient(service, null, null, true, - af.getTitle(), msa, withGaps, true, - af.getViewport().getAlignment().getDataset(), - af); - } catch (Exception e) { + try + { + new MsaWSClient(service, null, null, true, af.getTitle(), msa, + withGaps, true, af.getViewport().getAlignment().getDataset(), + af); + } catch (Exception e) + { JvOptionPane.showMessageDialog(alignFrame, e.getMessage(), MessageManager.getString("label.state_job_error"), JvOptionPane.WARNING_MESSAGE); diff --git a/src/jalview/ws/rest/InputType.java b/src/jalview/ws/rest/InputType.java index a96b6d9..fb291da 100644 --- a/src/jalview/ws/rest/InputType.java +++ b/src/jalview/ws/rest/InputType.java @@ -234,8 +234,8 @@ public abstract class InputType { valid = false; warnings.append("Invalid value for parameter " - + mtch.group(1).toLowerCase(Locale.ROOT) + " '" + mtch.group(2) - + "' (expected an integer)\n"); + + mtch.group(1).toLowerCase(Locale.ROOT) + " '" + + mtch.group(2) + "' (expected an integer)\n"); } if (!configureProperty(mtch.group(1), mtch.group(2), warnings)) diff --git a/src/jalview/ws/rest/RestClient.java b/src/jalview/ws/rest/RestClient.java index fdab105..255ab58 100644 --- a/src/jalview/ws/rest/RestClient.java +++ b/src/jalview/ws/rest/RestClient.java @@ -411,9 +411,8 @@ public class RestClient extends WSClient try { for (RestServiceDescription descr : RestServiceDescription - .parseDescriptions( - Cache.getDefault(RSBS_SERVICES, - makeShmmrRestClient().service.toString()))) + .parseDescriptions(Cache.getDefault(RSBS_SERVICES, + makeShmmrRestClient().service.toString()))) { services.add(descr.toString()); } diff --git a/src/jalview/ws/rest/RestJobThread.java b/src/jalview/ws/rest/RestJobThread.java index f32535c..eff38fb 100644 --- a/src/jalview/ws/rest/RestJobThread.java +++ b/src/jalview/ws/rest/RestJobThread.java @@ -340,8 +340,7 @@ public class RestJobThread extends AWSThread + "
        Filtered response content below:
        "); } catch (IOException e) { - Console.debug("IOException when consuming unhandled response", - e); + Console.debug("IOException when consuming unhandled response", e); } ; } diff --git a/src/jalview/ws/seqfetcher/ASequenceFetcher.java b/src/jalview/ws/seqfetcher/ASequenceFetcher.java index 5b80541..0d0a314 100644 --- a/src/jalview/ws/seqfetcher/ASequenceFetcher.java +++ b/src/jalview/ws/seqfetcher/ASequenceFetcher.java @@ -208,7 +208,8 @@ public class ASequenceFetcher // BH 2015.01.25 check about version/accessid being null here List frefs = DBRefUtils.searchRefs( seqs[is].getDBRefs(), - new DBRefEntry(db, null, null), DBRefUtils.SEARCH_MODE_FULL); + new DBRefEntry(db, null, null), + DBRefUtils.SEARCH_MODE_FULL); for (DBRefEntry dbr : frefs) { queriesFound.add(dbr.getAccessionId()); @@ -365,8 +366,7 @@ public class ASequenceFetcher .get(proxy.getDbSource()); if (slist == null) { - fetchableDbs.put(proxy.getDbSource(), - slist = new Hashtable<>()); + fetchableDbs.put(proxy.getDbSource(), slist = new Hashtable<>()); } slist.put(proxy.getDbName(), proxy); } diff --git a/src/jalview/ws/sifts/SiftsClient.java b/src/jalview/ws/sifts/SiftsClient.java index 5a03aea..0c707e5 100644 --- a/src/jalview/ws/sifts/SiftsClient.java +++ b/src/jalview/ws/sifts/SiftsClient.java @@ -432,8 +432,8 @@ public class SiftsClient implements SiftsClientI .getMapRegion(); for (MapRegion mapRegion : mapRegions) { - accessions - .add(mapRegion.getDb().getDbAccessionId().toLowerCase(Locale.ROOT)); + accessions.add(mapRegion.getDb().getDbAccessionId() + .toLowerCase(Locale.ROOT)); } } } @@ -503,9 +503,11 @@ public class SiftsClient implements SiftsClientI HashSet dbRefAccessionIdsString = new HashSet(); for (DBRefEntry dbref : seq.getDBRefs()) { - dbRefAccessionIdsString.add(dbref.getAccessionId().toLowerCase(Locale.ROOT)); + dbRefAccessionIdsString + .add(dbref.getAccessionId().toLowerCase(Locale.ROOT)); } - dbRefAccessionIdsString.add(sourceDBRef.getAccessionId().toLowerCase(Locale.ROOT)); + dbRefAccessionIdsString + .add(sourceDBRef.getAccessionId().toLowerCase(Locale.ROOT)); curDBRefAccessionIdsString = dbRefAccessionIdsString; curSourceDBRef = sourceDBRef.getAccessionId(); @@ -893,7 +895,8 @@ public class SiftsClient implements SiftsClientI { boolean isStrictMatch = true; return isStrictMatch ? curSourceDBRef.equalsIgnoreCase(accession) - : curDBRefAccessionIdsString.contains(accession.toLowerCase(Locale.ROOT)); + : curDBRefAccessionIdsString + .contains(accession.toLowerCase(Locale.ROOT)); } private boolean isFoundInSiftsEntry(String accessionId) diff --git a/src/jalview/ws/utils/UrlDownloadClient.java b/src/jalview/ws/utils/UrlDownloadClient.java index 235d271..e2fb1b8 100644 --- a/src/jalview/ws/utils/UrlDownloadClient.java +++ b/src/jalview/ws/utils/UrlDownloadClient.java @@ -49,66 +49,67 @@ public class UrlDownloadClient throws IOException { - FileOutputStream fos = null; - ReadableByteChannel rbc = null; - Path temp = null; - try - { - temp = Files.createTempFile(".jalview_", ".tmp"); + FileOutputStream fos = null; + ReadableByteChannel rbc = null; + Path temp = null; + try + { + temp = Files.createTempFile(".jalview_", ".tmp"); - URL url = new URL(urlstring); - rbc = Channels.newChannel(url.openStream()); - fos = new FileOutputStream(temp.toString()); - fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + URL url = new URL(urlstring); + rbc = Channels.newChannel(url.openStream()); + fos = new FileOutputStream(temp.toString()); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); - // copy tempfile to outfile once our download completes - // incase something goes wrong - Files.copy(temp, Paths.get(outfile), - StandardCopyOption.REPLACE_EXISTING); - } catch (IOException e) - { - throw e; - } finally + // copy tempfile to outfile once our download completes + // incase something goes wrong + Files.copy(temp, Paths.get(outfile), + StandardCopyOption.REPLACE_EXISTING); + } catch (IOException e) + { + throw e; + } finally + { + try { - try - { - if (fos != null) - { - fos.close(); - } - } catch (IOException e) + if (fos != null) { - System.out.println( - "Exception while closing download file output stream: " - + e.getMessage()); + fos.close(); } - try - { - if (rbc != null) - { - rbc.close(); - } - } catch (IOException e) + } catch (IOException e) + { + System.out.println( + "Exception while closing download file output stream: " + + e.getMessage()); + } + try + { + if (rbc != null) { - System.out.println("Exception while closing download channel: " - + e.getMessage()); + rbc.close(); } - try - { - if (temp != null) - { - Files.deleteIfExists(temp); - } - } catch (IOException e) + } catch (IOException e) + { + System.out.println("Exception while closing download channel: " + + e.getMessage()); + } + try + { + if (temp != null) { - System.out.println("Exception while deleting download temp file: " - + e.getMessage()); + Files.deleteIfExists(temp); } + } catch (IOException e) + { + System.out.println("Exception while deleting download temp file: " + + e.getMessage()); } + } } - public static void download(String urlstring, File tempFile) throws IOException + public static void download(String urlstring, File tempFile) + throws IOException { if (!Platform.setFileBytes(tempFile, urlstring)) { diff --git a/src/jalview/xml/binding/embl/EntrySetType.java b/src/jalview/xml/binding/embl/EntrySetType.java index 09947ec..6e73e7b 100644 --- a/src/jalview/xml/binding/embl/EntrySetType.java +++ b/src/jalview/xml/binding/embl/EntrySetType.java @@ -5,7 +5,6 @@ // Generated on: 2018.09.14 at 02:46:00 PM BST // - package jalview.xml.binding.embl; import java.util.ArrayList; @@ -15,11 +14,13 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; - /** - *

        Java class for EntrySetType complex type. + *

        + * Java class for EntrySetType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="EntrySetType">
        @@ -36,41 +37,42 @@ import javax.xml.bind.annotation.XmlType;
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "EntrySetType", propOrder = {
        -    "entry"
        -})
        -public class EntrySetType {
        +@XmlType(name = "EntrySetType", propOrder = { "entry" })
        +public class EntrySetType
        +{
         
        -    @XmlElement(required = true)
        -    protected List entry;
        +  @XmlElement(required = true)
        +  protected List entry;
         
        -    /**
        -     * Gets the value of the entry property.
        -     * 
        -     * 

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the entry property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getEntry().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link EntryType } - * - * - */ - public List getEntry() { - if (entry == null) { - entry = new ArrayList(); - } - return this.entry; + /** + * Gets the value of the entry property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the entry property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getEntry().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link EntryType } + * + * + */ + public List getEntry() + { + if (entry == null) + { + entry = new ArrayList(); } + return this.entry; + } } diff --git a/src/jalview/xml/binding/embl/EntryType.java b/src/jalview/xml/binding/embl/EntryType.java index 8964a3f..6bdc35f 100644 --- a/src/jalview/xml/binding/embl/EntryType.java +++ b/src/jalview/xml/binding/embl/EntryType.java @@ -5,7 +5,6 @@ // Generated on: 2018.09.14 at 02:46:00 PM BST // - package jalview.xml.binding.embl; import java.math.BigInteger; @@ -20,11 +19,13 @@ import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; import javax.xml.datatype.XMLGregorianCalendar; - /** - *

        Java class for EntryType complex type. + *

        + * Java class for EntryType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="EntryType">
        @@ -225,669 +226,1666 @@ import javax.xml.datatype.XMLGregorianCalendar;
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "EntryType", propOrder = {
        -    "secondaryAccession",
        -    "projectAccession",
        -    "description",
        -    "comment",
        -    "keyword",
        -    "reference",
        -    "xref",
        -    "feature",
        -    "assembly",
        -    "contig",
        -    "sequence"
        -})
        -public class EntryType {
        -
        -    protected List secondaryAccession;
        -    protected List projectAccession;
        +@XmlType(
        +  name = "EntryType",
        +  propOrder =
        +  { "secondaryAccession", "projectAccession", "description", "comment",
        +      "keyword", "reference", "xref", "feature", "assembly", "contig",
        +      "sequence" })
        +public class EntryType
        +{
        +
        +  protected List secondaryAccession;
        +
        +  protected List projectAccession;
        +
        +  @XmlElement(required = true)
        +  protected String description;
        +
        +  protected String comment;
        +
        +  protected List keyword;
        +
        +  protected List reference;
        +
        +  protected List xref;
        +
        +  protected List feature;
        +
        +  protected EntryType.Assembly assembly;
        +
        +  protected EntryType.Contig contig;
        +
        +  protected String sequence;
        +
        +  @XmlAttribute(name = "accession", required = true)
        +  protected String accession;
        +
        +  @XmlAttribute(name = "version", required = true)
        +  protected BigInteger version;
        +
        +  @XmlAttribute(name = "entryVersion")
        +  protected BigInteger entryVersion;
        +
        +  @XmlAttribute(name = "dataClass", required = true)
        +  protected String dataClass;
        +
        +  @XmlAttribute(name = "taxonomicDivision", required = true)
        +  protected String taxonomicDivision;
        +
        +  @XmlAttribute(name = "moleculeType", required = true)
        +  protected String moleculeType;
        +
        +  @XmlAttribute(name = "sequenceLength", required = true)
        +  protected BigInteger sequenceLength;
        +
        +  @XmlAttribute(name = "topology", required = true)
        +  protected String topology;
        +
        +  @XmlAttribute(name = "firstPublic")
        +  @XmlSchemaType(name = "date")
        +  protected XMLGregorianCalendar firstPublic;
        +
        +  @XmlAttribute(name = "firstPublicRelease")
        +  protected BigInteger firstPublicRelease;
        +
        +  @XmlAttribute(name = "lastUpdated")
        +  @XmlSchemaType(name = "date")
        +  protected XMLGregorianCalendar lastUpdated;
        +
        +  @XmlAttribute(name = "lastUpdatedRelease")
        +  protected BigInteger lastUpdatedRelease;
        +
        +  /**
        +   * Gets the value of the secondaryAccession property.
        +   * 
        +   * 

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the secondaryAccession property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getSecondaryAccession().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link String } + * + * + */ + public List getSecondaryAccession() + { + if (secondaryAccession == null) + { + secondaryAccession = new ArrayList(); + } + return this.secondaryAccession; + } + + /** + * Gets the value of the projectAccession property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the projectAccession property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getProjectAccession().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link String } + * + * + */ + public List getProjectAccession() + { + if (projectAccession == null) + { + projectAccession = new ArrayList(); + } + return this.projectAccession; + } + + /** + * Gets the value of the description property. + * + * @return possible object is {@link String } + * + */ + public String getDescription() + { + return description; + } + + /** + * Sets the value of the description property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDescription(String value) + { + this.description = value; + } + + /** + * Gets the value of the comment property. + * + * @return possible object is {@link String } + * + */ + public String getComment() + { + return comment; + } + + /** + * Sets the value of the comment property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setComment(String value) + { + this.comment = value; + } + + /** + * Gets the value of the keyword property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the keyword property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getKeyword().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link String } + * + * + */ + public List getKeyword() + { + if (keyword == null) + { + keyword = new ArrayList(); + } + return this.keyword; + } + + /** + * Gets the value of the reference property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the reference property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getReference().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link EntryType.Reference } + * + * + */ + public List getReference() + { + if (reference == null) + { + reference = new ArrayList(); + } + return this.reference; + } + + /** + * Gets the value of the xref property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the xref property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getXref().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link XrefType } + * + * + */ + public List getXref() + { + if (xref == null) + { + xref = new ArrayList(); + } + return this.xref; + } + + /** + * Gets the value of the feature property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the feature property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getFeature().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link EntryType.Feature } + * + * + */ + public List getFeature() + { + if (feature == null) + { + feature = new ArrayList(); + } + return this.feature; + } + + /** + * Gets the value of the assembly property. + * + * @return possible object is {@link EntryType.Assembly } + * + */ + public EntryType.Assembly getAssembly() + { + return assembly; + } + + /** + * Sets the value of the assembly property. + * + * @param value + * allowed object is {@link EntryType.Assembly } + * + */ + public void setAssembly(EntryType.Assembly value) + { + this.assembly = value; + } + + /** + * Gets the value of the contig property. + * + * @return possible object is {@link EntryType.Contig } + * + */ + public EntryType.Contig getContig() + { + return contig; + } + + /** + * Sets the value of the contig property. + * + * @param value + * allowed object is {@link EntryType.Contig } + * + */ + public void setContig(EntryType.Contig value) + { + this.contig = value; + } + + /** + * Gets the value of the sequence property. + * + * @return possible object is {@link String } + * + */ + public String getSequence() + { + return sequence; + } + + /** + * Sets the value of the sequence property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setSequence(String value) + { + this.sequence = value; + } + + /** + * Gets the value of the accession property. + * + * @return possible object is {@link String } + * + */ + public String getAccession() + { + return accession; + } + + /** + * Sets the value of the accession property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setAccession(String value) + { + this.accession = value; + } + + /** + * Gets the value of the version property. + * + * @return possible object is {@link BigInteger } + * + */ + public BigInteger getVersion() + { + return version; + } + + /** + * Sets the value of the version property. + * + * @param value + * allowed object is {@link BigInteger } + * + */ + public void setVersion(BigInteger value) + { + this.version = value; + } + + /** + * Gets the value of the entryVersion property. + * + * @return possible object is {@link BigInteger } + * + */ + public BigInteger getEntryVersion() + { + return entryVersion; + } + + /** + * Sets the value of the entryVersion property. + * + * @param value + * allowed object is {@link BigInteger } + * + */ + public void setEntryVersion(BigInteger value) + { + this.entryVersion = value; + } + + /** + * Gets the value of the dataClass property. + * + * @return possible object is {@link String } + * + */ + public String getDataClass() + { + return dataClass; + } + + /** + * Sets the value of the dataClass property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDataClass(String value) + { + this.dataClass = value; + } + + /** + * Gets the value of the taxonomicDivision property. + * + * @return possible object is {@link String } + * + */ + public String getTaxonomicDivision() + { + return taxonomicDivision; + } + + /** + * Sets the value of the taxonomicDivision property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setTaxonomicDivision(String value) + { + this.taxonomicDivision = value; + } + + /** + * Gets the value of the moleculeType property. + * + * @return possible object is {@link String } + * + */ + public String getMoleculeType() + { + return moleculeType; + } + + /** + * Sets the value of the moleculeType property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setMoleculeType(String value) + { + this.moleculeType = value; + } + + /** + * Gets the value of the sequenceLength property. + * + * @return possible object is {@link BigInteger } + * + */ + public BigInteger getSequenceLength() + { + return sequenceLength; + } + + /** + * Sets the value of the sequenceLength property. + * + * @param value + * allowed object is {@link BigInteger } + * + */ + public void setSequenceLength(BigInteger value) + { + this.sequenceLength = value; + } + + /** + * Gets the value of the topology property. + * + * @return possible object is {@link String } + * + */ + public String getTopology() + { + return topology; + } + + /** + * Sets the value of the topology property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setTopology(String value) + { + this.topology = value; + } + + /** + * Gets the value of the firstPublic property. + * + * @return possible object is {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getFirstPublic() + { + return firstPublic; + } + + /** + * Sets the value of the firstPublic property. + * + * @param value + * allowed object is {@link XMLGregorianCalendar } + * + */ + public void setFirstPublic(XMLGregorianCalendar value) + { + this.firstPublic = value; + } + + /** + * Gets the value of the firstPublicRelease property. + * + * @return possible object is {@link BigInteger } + * + */ + public BigInteger getFirstPublicRelease() + { + return firstPublicRelease; + } + + /** + * Sets the value of the firstPublicRelease property. + * + * @param value + * allowed object is {@link BigInteger } + * + */ + public void setFirstPublicRelease(BigInteger value) + { + this.firstPublicRelease = value; + } + + /** + * Gets the value of the lastUpdated property. + * + * @return possible object is {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getLastUpdated() + { + return lastUpdated; + } + + /** + * Sets the value of the lastUpdated property. + * + * @param value + * allowed object is {@link XMLGregorianCalendar } + * + */ + public void setLastUpdated(XMLGregorianCalendar value) + { + this.lastUpdated = value; + } + + /** + * Gets the value of the lastUpdatedRelease property. + * + * @return possible object is {@link BigInteger } + * + */ + public BigInteger getLastUpdatedRelease() + { + return lastUpdatedRelease; + } + + /** + * Sets the value of the lastUpdatedRelease property. + * + * @param value + * allowed object is {@link BigInteger } + * + */ + public void setLastUpdatedRelease(BigInteger value) + { + this.lastUpdatedRelease = value; + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <complexContent>
        +   *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *       <sequence>
        +   *         <element name="range" maxOccurs="unbounded">
        +   *           <complexType>
        +   *             <complexContent>
        +   *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                 <attribute name="begin" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        +   *                 <attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        +   *                 <attribute name="primaryBegin" type="{http://www.w3.org/2001/XMLSchema}integer" />
        +   *                 <attribute name="primaryEnd" type="{http://www.w3.org/2001/XMLSchema}integer" />
        +   *                 <attribute name="accession" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *                 <attribute name="version" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        +   *                 <attribute name="complement" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        +   *               </restriction>
        +   *             </complexContent>
        +   *           </complexType>
        +   *         </element>
        +   *       </sequence>
        +   *     </restriction>
        +   *   </complexContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "range" }) + public static class Assembly + { + @XmlElement(required = true) - protected String description; - protected String comment; - protected List keyword; - protected List reference; - protected List xref; - protected List feature; - protected EntryType.Assembly assembly; - protected EntryType.Contig contig; - protected String sequence; - @XmlAttribute(name = "accession", required = true) - protected String accession; - @XmlAttribute(name = "version", required = true) - protected BigInteger version; - @XmlAttribute(name = "entryVersion") - protected BigInteger entryVersion; - @XmlAttribute(name = "dataClass", required = true) - protected String dataClass; - @XmlAttribute(name = "taxonomicDivision", required = true) - protected String taxonomicDivision; - @XmlAttribute(name = "moleculeType", required = true) - protected String moleculeType; - @XmlAttribute(name = "sequenceLength", required = true) - protected BigInteger sequenceLength; - @XmlAttribute(name = "topology", required = true) - protected String topology; - @XmlAttribute(name = "firstPublic") - @XmlSchemaType(name = "date") - protected XMLGregorianCalendar firstPublic; - @XmlAttribute(name = "firstPublicRelease") - protected BigInteger firstPublicRelease; - @XmlAttribute(name = "lastUpdated") - @XmlSchemaType(name = "date") - protected XMLGregorianCalendar lastUpdated; - @XmlAttribute(name = "lastUpdatedRelease") - protected BigInteger lastUpdatedRelease; + protected List range; /** - * Gets the value of the secondaryAccession property. + * Gets the value of the range property. * *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the secondaryAccession property. + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the range property. * *

        * For example, to add a new item, do as follows: + * *

        -     *    getSecondaryAccession().add(newItem);
        +     * getRange().add(newItem);
              * 
        * * *

        * Objects of the following type(s) are allowed in the list - * {@link String } + * {@link EntryType.Assembly.Range } * * */ - public List getSecondaryAccession() { - if (secondaryAccession == null) { - secondaryAccession = new ArrayList(); - } - return this.secondaryAccession; + public List getRange() + { + if (range == null) + { + range = new ArrayList(); + } + return this.range; } /** - * Gets the value of the projectAccession property. - * *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the projectAccession property. + * Java class for anonymous complex type. * *

        - * For example, to add a new item, do as follows: + * The following schema fragment specifies the expected content contained + * within this class. + * *

        -     *    getProjectAccession().add(newItem);
        +     * <complexType>
        +     *   <complexContent>
        +     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +     *       <attribute name="begin" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        +     *       <attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        +     *       <attribute name="primaryBegin" type="{http://www.w3.org/2001/XMLSchema}integer" />
        +     *       <attribute name="primaryEnd" type="{http://www.w3.org/2001/XMLSchema}integer" />
        +     *       <attribute name="accession" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        +     *       <attribute name="version" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        +     *       <attribute name="complement" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        +     *     </restriction>
        +     *   </complexContent>
        +     * </complexType>
              * 
        * * - *

        - * Objects of the following type(s) are allowed in the list - * {@link String } - * - * */ - public List getProjectAccession() { - if (projectAccession == null) { - projectAccession = new ArrayList(); + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class Range + { + + @XmlAttribute(name = "begin", required = true) + protected BigInteger begin; + + @XmlAttribute(name = "end", required = true) + protected BigInteger end; + + @XmlAttribute(name = "primaryBegin") + protected BigInteger primaryBegin; + + @XmlAttribute(name = "primaryEnd") + protected BigInteger primaryEnd; + + @XmlAttribute(name = "accession", required = true) + protected String accession; + + @XmlAttribute(name = "version", required = true) + protected BigInteger version; + + @XmlAttribute(name = "complement") + protected Boolean complement; + + /** + * Gets the value of the begin property. + * + * @return possible object is {@link BigInteger } + * + */ + public BigInteger getBegin() + { + return begin; + } + + /** + * Sets the value of the begin property. + * + * @param value + * allowed object is {@link BigInteger } + * + */ + public void setBegin(BigInteger value) + { + this.begin = value; + } + + /** + * Gets the value of the end property. + * + * @return possible object is {@link BigInteger } + * + */ + public BigInteger getEnd() + { + return end; + } + + /** + * Sets the value of the end property. + * + * @param value + * allowed object is {@link BigInteger } + * + */ + public void setEnd(BigInteger value) + { + this.end = value; + } + + /** + * Gets the value of the primaryBegin property. + * + * @return possible object is {@link BigInteger } + * + */ + public BigInteger getPrimaryBegin() + { + return primaryBegin; + } + + /** + * Sets the value of the primaryBegin property. + * + * @param value + * allowed object is {@link BigInteger } + * + */ + public void setPrimaryBegin(BigInteger value) + { + this.primaryBegin = value; + } + + /** + * Gets the value of the primaryEnd property. + * + * @return possible object is {@link BigInteger } + * + */ + public BigInteger getPrimaryEnd() + { + return primaryEnd; + } + + /** + * Sets the value of the primaryEnd property. + * + * @param value + * allowed object is {@link BigInteger } + * + */ + public void setPrimaryEnd(BigInteger value) + { + this.primaryEnd = value; + } + + /** + * Gets the value of the accession property. + * + * @return possible object is {@link String } + * + */ + public String getAccession() + { + return accession; + } + + /** + * Sets the value of the accession property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setAccession(String value) + { + this.accession = value; + } + + /** + * Gets the value of the version property. + * + * @return possible object is {@link BigInteger } + * + */ + public BigInteger getVersion() + { + return version; + } + + /** + * Sets the value of the version property. + * + * @param value + * allowed object is {@link BigInteger } + * + */ + public void setVersion(BigInteger value) + { + this.version = value; + } + + /** + * Gets the value of the complement property. + * + * @return possible object is {@link Boolean } + * + */ + public boolean isComplement() + { + if (complement == null) + { + return false; } - return this.projectAccession; - } - - /** - * Gets the value of the description property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDescription() { - return description; - } - - /** - * Sets the value of the description property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDescription(String value) { - this.description = value; - } + else + { + return complement; + } + } + + /** + * Sets the value of the complement property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setComplement(Boolean value) + { + this.complement = value; + } - /** - * Gets the value of the comment property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getComment() { - return comment; } - /** - * Sets the value of the comment property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setComment(String value) { - this.comment = value; - } + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <complexContent>
        +   *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *       <sequence>
        +   *         <choice maxOccurs="unbounded" minOccurs="0">
        +   *           <element name="range">
        +   *             <complexType>
        +   *               <complexContent>
        +   *                 <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                   <attribute name="begin" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        +   *                   <attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        +   *                   <attribute name="primaryBegin" type="{http://www.w3.org/2001/XMLSchema}integer" />
        +   *                   <attribute name="primaryEnd" type="{http://www.w3.org/2001/XMLSchema}integer" />
        +   *                   <attribute name="accession" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *                   <attribute name="version" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        +   *                   <attribute name="complement" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        +   *                 </restriction>
        +   *               </complexContent>
        +   *             </complexType>
        +   *           </element>
        +   *           <element name="gap">
        +   *             <complexType>
        +   *               <complexContent>
        +   *                 <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                   <attribute name="begin" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        +   *                   <attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        +   *                   <attribute name="length" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        +   *                   <attribute name="unknownLength" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        +   *                 </restriction>
        +   *               </complexContent>
        +   *             </complexType>
        +   *           </element>
        +   *         </choice>
        +   *       </sequence>
        +   *     </restriction>
        +   *   </complexContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "rangeOrGap" }) + public static class Contig + { + + @XmlElements({ + @XmlElement(name = "range", type = EntryType.Contig.Range.class), + @XmlElement(name = "gap", type = EntryType.Contig.Gap.class) }) + protected List rangeOrGap; /** - * Gets the value of the keyword property. + * Gets the value of the rangeOrGap property. * *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the keyword property. + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the rangeOrGap property. * *

        * For example, to add a new item, do as follows: - *

        -     *    getKeyword().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link String } - * - * - */ - public List getKeyword() { - if (keyword == null) { - keyword = new ArrayList(); - } - return this.keyword; - } - - /** - * Gets the value of the reference property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the reference property. * - *

        - * For example, to add a new item, do as follows: *

        -     *    getReference().add(newItem);
        +     * getRangeOrGap().add(newItem);
              * 
        * * *

        * Objects of the following type(s) are allowed in the list - * {@link EntryType.Reference } + * {@link EntryType.Contig.Range } {@link EntryType.Contig.Gap } * * */ - public List getReference() { - if (reference == null) { - reference = new ArrayList(); - } - return this.reference; + public List getRangeOrGap() + { + if (rangeOrGap == null) + { + rangeOrGap = new ArrayList(); + } + return this.rangeOrGap; } /** - * Gets the value of the xref property. - * *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the xref property. + * Java class for anonymous complex type. * *

        - * For example, to add a new item, do as follows: + * The following schema fragment specifies the expected content contained + * within this class. + * *

        -     *    getXref().add(newItem);
        +     * <complexType>
        +     *   <complexContent>
        +     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +     *       <attribute name="begin" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        +     *       <attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        +     *       <attribute name="length" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        +     *       <attribute name="unknownLength" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        +     *     </restriction>
        +     *   </complexContent>
        +     * </complexType>
              * 
        * * - *

        - * Objects of the following type(s) are allowed in the list - * {@link XrefType } - * - * */ - public List getXref() { - if (xref == null) { - xref = new ArrayList(); + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class Gap + { + + @XmlAttribute(name = "begin", required = true) + protected BigInteger begin; + + @XmlAttribute(name = "end", required = true) + protected BigInteger end; + + @XmlAttribute(name = "length", required = true) + protected BigInteger length; + + @XmlAttribute(name = "unknownLength") + protected Boolean unknownLength; + + /** + * Gets the value of the begin property. + * + * @return possible object is {@link BigInteger } + * + */ + public BigInteger getBegin() + { + return begin; + } + + /** + * Sets the value of the begin property. + * + * @param value + * allowed object is {@link BigInteger } + * + */ + public void setBegin(BigInteger value) + { + this.begin = value; + } + + /** + * Gets the value of the end property. + * + * @return possible object is {@link BigInteger } + * + */ + public BigInteger getEnd() + { + return end; + } + + /** + * Sets the value of the end property. + * + * @param value + * allowed object is {@link BigInteger } + * + */ + public void setEnd(BigInteger value) + { + this.end = value; + } + + /** + * Gets the value of the length property. + * + * @return possible object is {@link BigInteger } + * + */ + public BigInteger getLength() + { + return length; + } + + /** + * Sets the value of the length property. + * + * @param value + * allowed object is {@link BigInteger } + * + */ + public void setLength(BigInteger value) + { + this.length = value; + } + + /** + * Gets the value of the unknownLength property. + * + * @return possible object is {@link Boolean } + * + */ + public boolean isUnknownLength() + { + if (unknownLength == null) + { + return false; + } + else + { + return unknownLength; } - return this.xref; + } + + /** + * Sets the value of the unknownLength property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setUnknownLength(Boolean value) + { + this.unknownLength = value; + } + } /** - * Gets the value of the feature property. - * *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the feature property. + * Java class for anonymous complex type. * *

        - * For example, to add a new item, do as follows: + * The following schema fragment specifies the expected content contained + * within this class. + * *

        -     *    getFeature().add(newItem);
        +     * <complexType>
        +     *   <complexContent>
        +     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +     *       <attribute name="begin" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        +     *       <attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        +     *       <attribute name="primaryBegin" type="{http://www.w3.org/2001/XMLSchema}integer" />
        +     *       <attribute name="primaryEnd" type="{http://www.w3.org/2001/XMLSchema}integer" />
        +     *       <attribute name="accession" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        +     *       <attribute name="version" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        +     *       <attribute name="complement" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        +     *     </restriction>
        +     *   </complexContent>
        +     * </complexType>
              * 
        * * - *

        - * Objects of the following type(s) are allowed in the list - * {@link EntryType.Feature } - * - * */ - public List getFeature() { - if (feature == null) { - feature = new ArrayList(); + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class Range + { + + @XmlAttribute(name = "begin", required = true) + protected BigInteger begin; + + @XmlAttribute(name = "end", required = true) + protected BigInteger end; + + @XmlAttribute(name = "primaryBegin") + protected BigInteger primaryBegin; + + @XmlAttribute(name = "primaryEnd") + protected BigInteger primaryEnd; + + @XmlAttribute(name = "accession", required = true) + protected String accession; + + @XmlAttribute(name = "version", required = true) + protected BigInteger version; + + @XmlAttribute(name = "complement") + protected Boolean complement; + + /** + * Gets the value of the begin property. + * + * @return possible object is {@link BigInteger } + * + */ + public BigInteger getBegin() + { + return begin; + } + + /** + * Sets the value of the begin property. + * + * @param value + * allowed object is {@link BigInteger } + * + */ + public void setBegin(BigInteger value) + { + this.begin = value; + } + + /** + * Gets the value of the end property. + * + * @return possible object is {@link BigInteger } + * + */ + public BigInteger getEnd() + { + return end; + } + + /** + * Sets the value of the end property. + * + * @param value + * allowed object is {@link BigInteger } + * + */ + public void setEnd(BigInteger value) + { + this.end = value; + } + + /** + * Gets the value of the primaryBegin property. + * + * @return possible object is {@link BigInteger } + * + */ + public BigInteger getPrimaryBegin() + { + return primaryBegin; + } + + /** + * Sets the value of the primaryBegin property. + * + * @param value + * allowed object is {@link BigInteger } + * + */ + public void setPrimaryBegin(BigInteger value) + { + this.primaryBegin = value; + } + + /** + * Gets the value of the primaryEnd property. + * + * @return possible object is {@link BigInteger } + * + */ + public BigInteger getPrimaryEnd() + { + return primaryEnd; + } + + /** + * Sets the value of the primaryEnd property. + * + * @param value + * allowed object is {@link BigInteger } + * + */ + public void setPrimaryEnd(BigInteger value) + { + this.primaryEnd = value; + } + + /** + * Gets the value of the accession property. + * + * @return possible object is {@link String } + * + */ + public String getAccession() + { + return accession; + } + + /** + * Sets the value of the accession property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setAccession(String value) + { + this.accession = value; + } + + /** + * Gets the value of the version property. + * + * @return possible object is {@link BigInteger } + * + */ + public BigInteger getVersion() + { + return version; + } + + /** + * Sets the value of the version property. + * + * @param value + * allowed object is {@link BigInteger } + * + */ + public void setVersion(BigInteger value) + { + this.version = value; + } + + /** + * Gets the value of the complement property. + * + * @return possible object is {@link Boolean } + * + */ + public boolean isComplement() + { + if (complement == null) + { + return false; } - return this.feature; - } + else + { + return complement; + } + } + + /** + * Sets the value of the complement property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setComplement(Boolean value) + { + this.complement = value; + } - /** - * Gets the value of the assembly property. - * - * @return - * possible object is - * {@link EntryType.Assembly } - * - */ - public EntryType.Assembly getAssembly() { - return assembly; } - /** - * Sets the value of the assembly property. - * - * @param value - * allowed object is - * {@link EntryType.Assembly } - * - */ - public void setAssembly(EntryType.Assembly value) { - this.assembly = value; - } + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <complexContent>
        +   *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *       <sequence>
        +   *         <element name="taxon" minOccurs="0">
        +   *           <complexType>
        +   *             <complexContent>
        +   *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                 <sequence>
        +   *                   <element name="lineage" minOccurs="0">
        +   *                     <complexType>
        +   *                       <complexContent>
        +   *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                           <sequence>
        +   *                             <element name="taxon" maxOccurs="unbounded">
        +   *                               <complexType>
        +   *                                 <complexContent>
        +   *                                   <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                                     <attribute name="scientificName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *                                   </restriction>
        +   *                                 </complexContent>
        +   *                               </complexType>
        +   *                             </element>
        +   *                           </sequence>
        +   *                         </restriction>
        +   *                       </complexContent>
        +   *                     </complexType>
        +   *                   </element>
        +   *                 </sequence>
        +   *                 <attribute name="scientificName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *                 <attribute name="commonName" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *                 <attribute name="taxId" type="{http://www.w3.org/2001/XMLSchema}integer" />
        +   *               </restriction>
        +   *             </complexContent>
        +   *           </complexType>
        +   *         </element>
        +   *         <element name="xref" type="{}XrefType" maxOccurs="unbounded" minOccurs="0"/>
        +   *         <element name="qualifier" maxOccurs="unbounded" minOccurs="0">
        +   *           <complexType>
        +   *             <complexContent>
        +   *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                 <sequence>
        +   *                   <element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
        +   *                 </sequence>
        +   *                 <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *               </restriction>
        +   *             </complexContent>
        +   *           </complexType>
        +   *         </element>
        +   *       </sequence>
        +   *       <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *       <attribute name="location" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *     </restriction>
        +   *   </complexContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "taxon", "xref", "qualifier" }) + public static class Feature + { + + protected EntryType.Feature.FeatureTaxon taxon; - /** - * Gets the value of the contig property. - * - * @return - * possible object is - * {@link EntryType.Contig } - * - */ - public EntryType.Contig getContig() { - return contig; - } + protected List xref; - /** - * Sets the value of the contig property. - * - * @param value - * allowed object is - * {@link EntryType.Contig } - * - */ - public void setContig(EntryType.Contig value) { - this.contig = value; - } + protected List qualifier; - /** - * Gets the value of the sequence property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getSequence() { - return sequence; - } + @XmlAttribute(name = "name", required = true) + protected String name; - /** - * Sets the value of the sequence property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setSequence(String value) { - this.sequence = value; - } + @XmlAttribute(name = "location", required = true) + protected String location; /** - * Gets the value of the accession property. + * Gets the value of the taxon property. + * + * @return possible object is {@link EntryType.Feature.FeatureTaxon } * - * @return - * possible object is - * {@link String } - * */ - public String getAccession() { - return accession; + public EntryType.Feature.FeatureTaxon getTaxon() + { + return taxon; } /** - * Sets the value of the accession property. + * Sets the value of the taxon property. * * @param value - * allowed object is - * {@link String } - * - */ - public void setAccession(String value) { - this.accession = value; - } - - /** - * Gets the value of the version property. + * allowed object is {@link EntryType.Feature.FeatureTaxon } * - * @return - * possible object is - * {@link BigInteger } - * */ - public BigInteger getVersion() { - return version; + public void setTaxon(EntryType.Feature.FeatureTaxon value) + { + this.taxon = value; } /** - * Sets the value of the version property. + * Gets the value of the xref property. * - * @param value - * allowed object is - * {@link BigInteger } - * - */ - public void setVersion(BigInteger value) { - this.version = value; - } - - /** - * Gets the value of the entryVersion property. + *

        + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the xref property. * - * @return - * possible object is - * {@link BigInteger } - * - */ - public BigInteger getEntryVersion() { - return entryVersion; - } - - /** - * Sets the value of the entryVersion property. + *

        + * For example, to add a new item, do as follows: * - * @param value - * allowed object is - * {@link BigInteger } - * - */ - public void setEntryVersion(BigInteger value) { - this.entryVersion = value; - } - - /** - * Gets the value of the dataClass property. + *

        +     * getXref().add(newItem);
        +     * 
        * - * @return - * possible object is - * {@link String } - * - */ - public String getDataClass() { - return dataClass; - } - - /** - * Sets the value of the dataClass property. * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDataClass(String value) { - this.dataClass = value; - } - - /** - * Gets the value of the taxonomicDivision property. + *

        + * Objects of the following type(s) are allowed in the list {@link XrefType + * } * - * @return - * possible object is - * {@link String } - * - */ - public String getTaxonomicDivision() { - return taxonomicDivision; - } - - /** - * Sets the value of the taxonomicDivision property. * - * @param value - * allowed object is - * {@link String } - * */ - public void setTaxonomicDivision(String value) { - this.taxonomicDivision = value; + public List getXref() + { + if (xref == null) + { + xref = new ArrayList(); + } + return this.xref; } /** - * Gets the value of the moleculeType property. + * Gets the value of the qualifier property. * - * @return - * possible object is - * {@link String } - * - */ - public String getMoleculeType() { - return moleculeType; - } - - /** - * Sets the value of the moleculeType property. + *

        + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the qualifier property. * - * @param value - * allowed object is - * {@link String } - * - */ - public void setMoleculeType(String value) { - this.moleculeType = value; - } - - /** - * Gets the value of the sequenceLength property. + *

        + * For example, to add a new item, do as follows: * - * @return - * possible object is - * {@link BigInteger } - * - */ - public BigInteger getSequenceLength() { - return sequenceLength; - } - - /** - * Sets the value of the sequenceLength property. + *

        +     * getQualifier().add(newItem);
        +     * 
        * - * @param value - * allowed object is - * {@link BigInteger } - * - */ - public void setSequenceLength(BigInteger value) { - this.sequenceLength = value; - } - - /** - * Gets the value of the topology property. * - * @return - * possible object is - * {@link String } - * - */ - public String getTopology() { - return topology; - } - - /** - * Sets the value of the topology property. + *

        + * Objects of the following type(s) are allowed in the list + * {@link EntryType.Feature.Qualifier } * - * @param value - * allowed object is - * {@link String } - * - */ - public void setTopology(String value) { - this.topology = value; - } - - /** - * Gets the value of the firstPublic property. * - * @return - * possible object is - * {@link XMLGregorianCalendar } - * */ - public XMLGregorianCalendar getFirstPublic() { - return firstPublic; + public List getQualifier() + { + if (qualifier == null) + { + qualifier = new ArrayList(); + } + return this.qualifier; } /** - * Sets the value of the firstPublic property. + * Gets the value of the name property. * - * @param value - * allowed object is - * {@link XMLGregorianCalendar } - * - */ - public void setFirstPublic(XMLGregorianCalendar value) { - this.firstPublic = value; - } - - /** - * Gets the value of the firstPublicRelease property. + * @return possible object is {@link String } * - * @return - * possible object is - * {@link BigInteger } - * */ - public BigInteger getFirstPublicRelease() { - return firstPublicRelease; + public String getName() + { + return name; } /** - * Sets the value of the firstPublicRelease property. + * Sets the value of the name property. * * @param value - * allowed object is - * {@link BigInteger } - * - */ - public void setFirstPublicRelease(BigInteger value) { - this.firstPublicRelease = value; - } - - /** - * Gets the value of the lastUpdated property. + * allowed object is {@link String } * - * @return - * possible object is - * {@link XMLGregorianCalendar } - * */ - public XMLGregorianCalendar getLastUpdated() { - return lastUpdated; + public void setName(String value) + { + this.name = value; } /** - * Sets the value of the lastUpdated property. + * Gets the value of the location property. * - * @param value - * allowed object is - * {@link XMLGregorianCalendar } - * - */ - public void setLastUpdated(XMLGregorianCalendar value) { - this.lastUpdated = value; - } - - /** - * Gets the value of the lastUpdatedRelease property. + * @return possible object is {@link String } * - * @return - * possible object is - * {@link BigInteger } - * */ - public BigInteger getLastUpdatedRelease() { - return lastUpdatedRelease; + public String getLocation() + { + return location; } /** - * Sets the value of the lastUpdatedRelease property. + * Sets the value of the location property. * * @param value - * allowed object is - * {@link BigInteger } - * + * allowed object is {@link String } + * */ - public void setLastUpdatedRelease(BigInteger value) { - this.lastUpdatedRelease = value; + public void setLocation(String value) + { + this.location = value; } - /** - *

        Java class for anonymous complex type. + *

        + * Java class for anonymous complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained + * within this class. * *

              * <complexType>
              *   <complexContent>
              *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
              *       <sequence>
        -     *         <element name="range" maxOccurs="unbounded">
        +     *         <element name="lineage" minOccurs="0">
              *           <complexType>
              *             <complexContent>
              *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *                 <attribute name="begin" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        -     *                 <attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        -     *                 <attribute name="primaryBegin" type="{http://www.w3.org/2001/XMLSchema}integer" />
        -     *                 <attribute name="primaryEnd" type="{http://www.w3.org/2001/XMLSchema}integer" />
        -     *                 <attribute name="accession" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *                 <attribute name="version" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        -     *                 <attribute name="complement" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        +     *                 <sequence>
        +     *                   <element name="taxon" maxOccurs="unbounded">
        +     *                     <complexType>
        +     *                       <complexContent>
        +     *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +     *                           <attribute name="scientificName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        +     *                         </restriction>
        +     *                       </complexContent>
        +     *                     </complexType>
        +     *                   </element>
        +     *                 </sequence>
              *               </restriction>
              *             </complexContent>
              *           </complexType>
              *         </element>
              *       </sequence>
        +     *       <attribute name="scientificName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        +     *       <attribute name="commonName" type="{http://www.w3.org/2001/XMLSchema}string" />
        +     *       <attribute name="taxId" type="{http://www.w3.org/2001/XMLSchema}integer" />
              *     </restriction>
              *   </complexContent>
              * </complexType>
        @@ -896,366 +1894,198 @@ public class EntryType {
              * 
              */
             @XmlAccessorType(XmlAccessType.FIELD)
        -    @XmlType(name = "", propOrder = {
        -        "range"
        -    })
        -    public static class Assembly {
        +    @XmlType(name = "", propOrder = { "lineage" })
        +    public static class FeatureTaxon
        +    {
        +
        +      protected EntryType.Feature.FeatureTaxon.Lineage lineage;
        +
        +      @XmlAttribute(name = "scientificName", required = true)
        +      protected String scientificName;
        +
        +      @XmlAttribute(name = "commonName")
        +      protected String commonName;
        +
        +      @XmlAttribute(name = "taxId")
        +      protected BigInteger taxId;
        +
        +      /**
        +       * Gets the value of the lineage property.
        +       * 
        +       * @return possible object is
        +       *         {@link EntryType.Feature.FeatureTaxon.Lineage }
        +       * 
        +       */
        +      public EntryType.Feature.FeatureTaxon.Lineage getLineage()
        +      {
        +        return lineage;
        +      }
        +
        +      /**
        +       * Sets the value of the lineage property.
        +       * 
        +       * @param value
        +       *          allowed object is
        +       *          {@link EntryType.Feature.FeatureTaxon.Lineage }
        +       * 
        +       */
        +      public void setLineage(EntryType.Feature.FeatureTaxon.Lineage value)
        +      {
        +        this.lineage = value;
        +      }
        +
        +      /**
        +       * Gets the value of the scientificName property.
        +       * 
        +       * @return possible object is {@link String }
        +       * 
        +       */
        +      public String getScientificName()
        +      {
        +        return scientificName;
        +      }
        +
        +      /**
        +       * Sets the value of the scientificName property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link String }
        +       * 
        +       */
        +      public void setScientificName(String value)
        +      {
        +        this.scientificName = value;
        +      }
        +
        +      /**
        +       * Gets the value of the commonName property.
        +       * 
        +       * @return possible object is {@link String }
        +       * 
        +       */
        +      public String getCommonName()
        +      {
        +        return commonName;
        +      }
        +
        +      /**
        +       * Sets the value of the commonName property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link String }
        +       * 
        +       */
        +      public void setCommonName(String value)
        +      {
        +        this.commonName = value;
        +      }
        +
        +      /**
        +       * Gets the value of the taxId property.
        +       * 
        +       * @return possible object is {@link BigInteger }
        +       * 
        +       */
        +      public BigInteger getTaxId()
        +      {
        +        return taxId;
        +      }
        +
        +      /**
        +       * Sets the value of the taxId property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link BigInteger }
        +       * 
        +       */
        +      public void setTaxId(BigInteger value)
        +      {
        +        this.taxId = value;
        +      }
        +
        +      /**
        +       * 

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +       * <complexType>
        +       *   <complexContent>
        +       *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +       *       <sequence>
        +       *         <element name="taxon" maxOccurs="unbounded">
        +       *           <complexType>
        +       *             <complexContent>
        +       *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +       *                 <attribute name="scientificName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        +       *               </restriction>
        +       *             </complexContent>
        +       *           </complexType>
        +       *         </element>
        +       *       </sequence>
        +       *     </restriction>
        +       *   </complexContent>
        +       * </complexType>
        +       * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "taxon" }) + public static class Lineage + { @XmlElement(required = true) - protected List range; + protected List taxon; /** - * Gets the value of the range property. + * Gets the value of the taxon property. * *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the range property. + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list + * will be present inside the JAXB object. This is why there is not a + * set method for the taxon property. * *

        * For example, to add a new item, do as follows: + * *

        -         *    getRange().add(newItem);
        +         * getTaxon().add(newItem);
                  * 
        * * *

        * Objects of the following type(s) are allowed in the list - * {@link EntryType.Assembly.Range } - * - * - */ - public List getRange() { - if (range == null) { - range = new ArrayList(); - } - return this.range; - } - - - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -         * <complexType>
        -         *   <complexContent>
        -         *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *       <attribute name="begin" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        -         *       <attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        -         *       <attribute name="primaryBegin" type="{http://www.w3.org/2001/XMLSchema}integer" />
        -         *       <attribute name="primaryEnd" type="{http://www.w3.org/2001/XMLSchema}integer" />
        -         *       <attribute name="accession" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        -         *       <attribute name="version" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        -         *       <attribute name="complement" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        -         *     </restriction>
        -         *   </complexContent>
        -         * </complexType>
        -         * 
        + * {@link EntryType.Feature.FeatureTaxon.Lineage.Taxon } * * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class Range { - - @XmlAttribute(name = "begin", required = true) - protected BigInteger begin; - @XmlAttribute(name = "end", required = true) - protected BigInteger end; - @XmlAttribute(name = "primaryBegin") - protected BigInteger primaryBegin; - @XmlAttribute(name = "primaryEnd") - protected BigInteger primaryEnd; - @XmlAttribute(name = "accession", required = true) - protected String accession; - @XmlAttribute(name = "version", required = true) - protected BigInteger version; - @XmlAttribute(name = "complement") - protected Boolean complement; - - /** - * Gets the value of the begin property. - * - * @return - * possible object is - * {@link BigInteger } - * - */ - public BigInteger getBegin() { - return begin; - } - - /** - * Sets the value of the begin property. - * - * @param value - * allowed object is - * {@link BigInteger } - * - */ - public void setBegin(BigInteger value) { - this.begin = value; - } - - /** - * Gets the value of the end property. - * - * @return - * possible object is - * {@link BigInteger } - * - */ - public BigInteger getEnd() { - return end; - } - - /** - * Sets the value of the end property. - * - * @param value - * allowed object is - * {@link BigInteger } - * - */ - public void setEnd(BigInteger value) { - this.end = value; - } - - /** - * Gets the value of the primaryBegin property. - * - * @return - * possible object is - * {@link BigInteger } - * - */ - public BigInteger getPrimaryBegin() { - return primaryBegin; - } - - /** - * Sets the value of the primaryBegin property. - * - * @param value - * allowed object is - * {@link BigInteger } - * - */ - public void setPrimaryBegin(BigInteger value) { - this.primaryBegin = value; - } - - /** - * Gets the value of the primaryEnd property. - * - * @return - * possible object is - * {@link BigInteger } - * - */ - public BigInteger getPrimaryEnd() { - return primaryEnd; - } - - /** - * Sets the value of the primaryEnd property. - * - * @param value - * allowed object is - * {@link BigInteger } - * - */ - public void setPrimaryEnd(BigInteger value) { - this.primaryEnd = value; - } - - /** - * Gets the value of the accession property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getAccession() { - return accession; - } - - /** - * Sets the value of the accession property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setAccession(String value) { - this.accession = value; - } - - /** - * Gets the value of the version property. - * - * @return - * possible object is - * {@link BigInteger } - * - */ - public BigInteger getVersion() { - return version; - } - - /** - * Sets the value of the version property. - * - * @param value - * allowed object is - * {@link BigInteger } - * - */ - public void setVersion(BigInteger value) { - this.version = value; - } - - /** - * Gets the value of the complement property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public boolean isComplement() { - if (complement == null) { - return false; - } else { - return complement; - } - } - - /** - * Sets the value of the complement property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setComplement(Boolean value) { - this.complement = value; - } - + public List getTaxon() + { + if (taxon == null) + { + taxon = new ArrayList(); + } + return this.taxon; } - } - - - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -     * <complexType>
        -     *   <complexContent>
        -     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *       <sequence>
        -     *         <choice maxOccurs="unbounded" minOccurs="0">
        -     *           <element name="range">
        -     *             <complexType>
        -     *               <complexContent>
        -     *                 <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *                   <attribute name="begin" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        -     *                   <attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        -     *                   <attribute name="primaryBegin" type="{http://www.w3.org/2001/XMLSchema}integer" />
        -     *                   <attribute name="primaryEnd" type="{http://www.w3.org/2001/XMLSchema}integer" />
        -     *                   <attribute name="accession" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *                   <attribute name="version" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        -     *                   <attribute name="complement" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        -     *                 </restriction>
        -     *               </complexContent>
        -     *             </complexType>
        -     *           </element>
        -     *           <element name="gap">
        -     *             <complexType>
        -     *               <complexContent>
        -     *                 <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *                   <attribute name="begin" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        -     *                   <attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        -     *                   <attribute name="length" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        -     *                   <attribute name="unknownLength" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        -     *                 </restriction>
        -     *               </complexContent>
        -     *             </complexType>
        -     *           </element>
        -     *         </choice>
        -     *       </sequence>
        -     *     </restriction>
        -     *   </complexContent>
        -     * </complexType>
        -     * 
        - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "rangeOrGap" - }) - public static class Contig { - - @XmlElements({ - @XmlElement(name = "range", type = EntryType.Contig.Range.class), - @XmlElement(name = "gap", type = EntryType.Contig.Gap.class) - }) - protected List rangeOrGap; - /** - * Gets the value of the rangeOrGap property. - * *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the rangeOrGap property. + * Java class for anonymous complex type. * *

        - * For example, to add a new item, do as follows: - *

        -         *    getRangeOrGap().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link EntryType.Contig.Range } - * {@link EntryType.Contig.Gap } - * - * - */ - public List getRangeOrGap() { - if (rangeOrGap == null) { - rangeOrGap = new ArrayList(); - } - return this.rangeOrGap; - } - - - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. + * The following schema fragment specifies the expected content + * contained within this class. * *

                  * <complexType>
                  *   <complexContent>
                  *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *       <attribute name="begin" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        -         *       <attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        -         *       <attribute name="length" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        -         *       <attribute name="unknownLength" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        +         *       <attribute name="scientificName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
                  *     </restriction>
                  *   </complexContent>
                  * </complexType>
        @@ -1265,397 +2095,57 @@ public class EntryType {
                  */
                 @XmlAccessorType(XmlAccessType.FIELD)
                 @XmlType(name = "")
        -        public static class Gap {
        -
        -            @XmlAttribute(name = "begin", required = true)
        -            protected BigInteger begin;
        -            @XmlAttribute(name = "end", required = true)
        -            protected BigInteger end;
        -            @XmlAttribute(name = "length", required = true)
        -            protected BigInteger length;
        -            @XmlAttribute(name = "unknownLength")
        -            protected Boolean unknownLength;
        -
        -            /**
        -             * Gets the value of the begin property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link BigInteger }
        -             *     
        -             */
        -            public BigInteger getBegin() {
        -                return begin;
        -            }
        -
        -            /**
        -             * Sets the value of the begin property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link BigInteger }
        -             *     
        -             */
        -            public void setBegin(BigInteger value) {
        -                this.begin = value;
        -            }
        -
        -            /**
        -             * Gets the value of the end property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link BigInteger }
        -             *     
        -             */
        -            public BigInteger getEnd() {
        -                return end;
        -            }
        -
        -            /**
        -             * Sets the value of the end property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link BigInteger }
        -             *     
        -             */
        -            public void setEnd(BigInteger value) {
        -                this.end = value;
        -            }
        -
        -            /**
        -             * Gets the value of the length property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link BigInteger }
        -             *     
        -             */
        -            public BigInteger getLength() {
        -                return length;
        -            }
        -
        -            /**
        -             * Sets the value of the length property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link BigInteger }
        -             *     
        -             */
        -            public void setLength(BigInteger value) {
        -                this.length = value;
        -            }
        -
        -            /**
        -             * Gets the value of the unknownLength property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link Boolean }
        -             *     
        -             */
        -            public boolean isUnknownLength() {
        -                if (unknownLength == null) {
        -                    return false;
        -                } else {
        -                    return unknownLength;
        -                }
        -            }
        -
        -            /**
        -             * Sets the value of the unknownLength property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link Boolean }
        -             *     
        -             */
        -            public void setUnknownLength(Boolean value) {
        -                this.unknownLength = value;
        -            }
        +        public static class Taxon
        +        {
        +
        +          @XmlAttribute(name = "scientificName", required = true)
        +          protected String scientificName;
        +
        +          /**
        +           * Gets the value of the scientificName property.
        +           * 
        +           * @return possible object is {@link String }
        +           * 
        +           */
        +          public String getScientificName()
        +          {
        +            return scientificName;
        +          }
        +
        +          /**
        +           * Sets the value of the scientificName property.
        +           * 
        +           * @param value
        +           *          allowed object is {@link String }
        +           * 
        +           */
        +          public void setScientificName(String value)
        +          {
        +            this.scientificName = value;
        +          }
         
                 }
         
        -
        -        /**
        -         * 

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -         * <complexType>
        -         *   <complexContent>
        -         *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *       <attribute name="begin" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        -         *       <attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        -         *       <attribute name="primaryBegin" type="{http://www.w3.org/2001/XMLSchema}integer" />
        -         *       <attribute name="primaryEnd" type="{http://www.w3.org/2001/XMLSchema}integer" />
        -         *       <attribute name="accession" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        -         *       <attribute name="version" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        -         *       <attribute name="complement" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        -         *     </restriction>
        -         *   </complexContent>
        -         * </complexType>
        -         * 
        - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class Range { - - @XmlAttribute(name = "begin", required = true) - protected BigInteger begin; - @XmlAttribute(name = "end", required = true) - protected BigInteger end; - @XmlAttribute(name = "primaryBegin") - protected BigInteger primaryBegin; - @XmlAttribute(name = "primaryEnd") - protected BigInteger primaryEnd; - @XmlAttribute(name = "accession", required = true) - protected String accession; - @XmlAttribute(name = "version", required = true) - protected BigInteger version; - @XmlAttribute(name = "complement") - protected Boolean complement; - - /** - * Gets the value of the begin property. - * - * @return - * possible object is - * {@link BigInteger } - * - */ - public BigInteger getBegin() { - return begin; - } - - /** - * Sets the value of the begin property. - * - * @param value - * allowed object is - * {@link BigInteger } - * - */ - public void setBegin(BigInteger value) { - this.begin = value; - } - - /** - * Gets the value of the end property. - * - * @return - * possible object is - * {@link BigInteger } - * - */ - public BigInteger getEnd() { - return end; - } - - /** - * Sets the value of the end property. - * - * @param value - * allowed object is - * {@link BigInteger } - * - */ - public void setEnd(BigInteger value) { - this.end = value; - } - - /** - * Gets the value of the primaryBegin property. - * - * @return - * possible object is - * {@link BigInteger } - * - */ - public BigInteger getPrimaryBegin() { - return primaryBegin; - } - - /** - * Sets the value of the primaryBegin property. - * - * @param value - * allowed object is - * {@link BigInteger } - * - */ - public void setPrimaryBegin(BigInteger value) { - this.primaryBegin = value; - } - - /** - * Gets the value of the primaryEnd property. - * - * @return - * possible object is - * {@link BigInteger } - * - */ - public BigInteger getPrimaryEnd() { - return primaryEnd; - } - - /** - * Sets the value of the primaryEnd property. - * - * @param value - * allowed object is - * {@link BigInteger } - * - */ - public void setPrimaryEnd(BigInteger value) { - this.primaryEnd = value; - } - - /** - * Gets the value of the accession property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getAccession() { - return accession; - } - - /** - * Sets the value of the accession property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setAccession(String value) { - this.accession = value; - } - - /** - * Gets the value of the version property. - * - * @return - * possible object is - * {@link BigInteger } - * - */ - public BigInteger getVersion() { - return version; - } - - /** - * Sets the value of the version property. - * - * @param value - * allowed object is - * {@link BigInteger } - * - */ - public void setVersion(BigInteger value) { - this.version = value; - } - - /** - * Gets the value of the complement property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public boolean isComplement() { - if (complement == null) { - return false; - } else { - return complement; - } - } - - /** - * Sets the value of the complement property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setComplement(Boolean value) { - this.complement = value; - } - - } + } } - /** - *

        Java class for anonymous complex type. + *

        + * Java class for anonymous complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained + * within this class. * *

              * <complexType>
              *   <complexContent>
              *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
              *       <sequence>
        -     *         <element name="taxon" minOccurs="0">
        -     *           <complexType>
        -     *             <complexContent>
        -     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *                 <sequence>
        -     *                   <element name="lineage" minOccurs="0">
        -     *                     <complexType>
        -     *                       <complexContent>
        -     *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *                           <sequence>
        -     *                             <element name="taxon" maxOccurs="unbounded">
        -     *                               <complexType>
        -     *                                 <complexContent>
        -     *                                   <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *                                     <attribute name="scientificName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *                                   </restriction>
        -     *                                 </complexContent>
        -     *                               </complexType>
        -     *                             </element>
        -     *                           </sequence>
        -     *                         </restriction>
        -     *                       </complexContent>
        -     *                     </complexType>
        -     *                   </element>
        -     *                 </sequence>
        -     *                 <attribute name="scientificName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *                 <attribute name="commonName" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *                 <attribute name="taxId" type="{http://www.w3.org/2001/XMLSchema}integer" />
        -     *               </restriction>
        -     *             </complexContent>
        -     *           </complexType>
        -     *         </element>
        -     *         <element name="xref" type="{}XrefType" maxOccurs="unbounded" minOccurs="0"/>
        -     *         <element name="qualifier" maxOccurs="unbounded" minOccurs="0">
        -     *           <complexType>
        -     *             <complexContent>
        -     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *                 <sequence>
        -     *                   <element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
        -     *                 </sequence>
        -     *                 <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *               </restriction>
        -     *             </complexContent>
        -     *           </complexType>
        -     *         </element>
        +     *         <element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
              *       </sequence>
              *       <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *       <attribute name="location" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
              *     </restriction>
              *   </complexContent>
              * </complexType>
        @@ -1664,1017 +2154,578 @@ public class EntryType {
              * 
              */
             @XmlAccessorType(XmlAccessType.FIELD)
        -    @XmlType(name = "", propOrder = {
        -        "taxon",
        -        "xref",
        -        "qualifier"
        -    })
        -    public static class Feature {
        -
        -        protected EntryType.Feature.FeatureTaxon taxon;
        -        protected List xref;
        -        protected List qualifier;
        -        @XmlAttribute(name = "name", required = true)
        -        protected String name;
        -        @XmlAttribute(name = "location", required = true)
        -        protected String location;
        +    @XmlType(name = "", propOrder = { "value" })
        +    public static class Qualifier
        +    {
        +
        +      protected String value;
        +
        +      @XmlAttribute(name = "name", required = true)
        +      protected String name;
        +
        +      /**
        +       * Gets the value of the value property.
        +       * 
        +       * @return possible object is {@link String }
        +       * 
        +       */
        +      public String getValue()
        +      {
        +        return value;
        +      }
        +
        +      /**
        +       * Sets the value of the value property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link String }
        +       * 
        +       */
        +      public void setValue(String value)
        +      {
        +        this.value = value;
        +      }
        +
        +      /**
        +       * Gets the value of the name property.
        +       * 
        +       * @return possible object is {@link String }
        +       * 
        +       */
        +      public String getName()
        +      {
        +        return name;
        +      }
        +
        +      /**
        +       * Sets the value of the name property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link String }
        +       * 
        +       */
        +      public void setName(String value)
        +      {
        +        this.name = value;
        +      }
         
        -        /**
        -         * Gets the value of the taxon property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link EntryType.Feature.FeatureTaxon }
        -         *     
        -         */
        -        public EntryType.Feature.FeatureTaxon getTaxon() {
        -            return taxon;
        -        }
        +    }
         
        -        /**
        -         * Sets the value of the taxon property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link EntryType.Feature.FeatureTaxon }
        -         *     
        -         */
        -        public void setTaxon(EntryType.Feature.FeatureTaxon value) {
        -            this.taxon = value;
        -        }
        +  }
        +
        +  /**
        +   * 

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <complexContent>
        +   *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *       <sequence>
        +   *         <element name="title" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
        +   *         <element name="author" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
        +   *         <element name="applicant" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
        +   *         <element name="consortium" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
        +   *         <element name="submissionDate" type="{http://www.w3.org/2001/XMLSchema}date" minOccurs="0"/>
        +   *         <element name="journal" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
        +   *         <element name="year" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
        +   *         <element name="volume" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
        +   *         <element name="issue" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
        +   *         <element name="firstPage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
        +   *         <element name="lastPage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
        +   *         <element name="comment" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
        +   *         <element name="referenceLocation" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
        +   *         <element name="xref" type="{}XrefType" maxOccurs="unbounded" minOccurs="0"/>
        +   *       </sequence>
        +   *       <attribute name="type" use="required">
        +   *         <simpleType>
        +   *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
        +   *             <enumeration value="submission"/>
        +   *             <enumeration value="book"/>
        +   *             <enumeration value="article"/>
        +   *             <enumeration value="patent"/>
        +   *             <enumeration value="thesis"/>
        +   *             <enumeration value="unpublished"/>
        +   *           </restriction>
        +   *         </simpleType>
        +   *       </attribute>
        +   *       <attribute name="number" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        +   *       <attribute name="location" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *     </restriction>
        +   *   </complexContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType( + name = "", + propOrder = + { "title", "author", "applicant", "consortium", "submissionDate", + "journal", "year", "volume", "issue", "firstPage", "lastPage", + "comment", "referenceLocation", "xref" }) + public static class Reference + { + + protected String title; + + protected List author; + + protected List applicant; + + protected String consortium; - /** - * Gets the value of the xref property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the xref property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getXref().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link XrefType } - * - * - */ - public List getXref() { - if (xref == null) { - xref = new ArrayList(); - } - return this.xref; - } + @XmlSchemaType(name = "date") + protected XMLGregorianCalendar submissionDate; - /** - * Gets the value of the qualifier property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the qualifier property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getQualifier().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link EntryType.Feature.Qualifier } - * - * - */ - public List getQualifier() { - if (qualifier == null) { - qualifier = new ArrayList(); - } - return this.qualifier; - } + protected String journal; - /** - * Gets the value of the name property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getName() { - return name; - } + protected String year; - /** - * Sets the value of the name property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setName(String value) { - this.name = value; - } + protected String volume; - /** - * Gets the value of the location property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getLocation() { - return location; - } + protected String issue; - /** - * Sets the value of the location property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setLocation(String value) { - this.location = value; - } + protected String firstPage; + protected String lastPage; - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -         * <complexType>
        -         *   <complexContent>
        -         *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *       <sequence>
        -         *         <element name="lineage" minOccurs="0">
        -         *           <complexType>
        -         *             <complexContent>
        -         *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *                 <sequence>
        -         *                   <element name="taxon" maxOccurs="unbounded">
        -         *                     <complexType>
        -         *                       <complexContent>
        -         *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *                           <attribute name="scientificName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        -         *                         </restriction>
        -         *                       </complexContent>
        -         *                     </complexType>
        -         *                   </element>
        -         *                 </sequence>
        -         *               </restriction>
        -         *             </complexContent>
        -         *           </complexType>
        -         *         </element>
        -         *       </sequence>
        -         *       <attribute name="scientificName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        -         *       <attribute name="commonName" type="{http://www.w3.org/2001/XMLSchema}string" />
        -         *       <attribute name="taxId" type="{http://www.w3.org/2001/XMLSchema}integer" />
        -         *     </restriction>
        -         *   </complexContent>
        -         * </complexType>
        -         * 
        - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "lineage" - }) - public static class FeatureTaxon { - - protected EntryType.Feature.FeatureTaxon.Lineage lineage; - @XmlAttribute(name = "scientificName", required = true) - protected String scientificName; - @XmlAttribute(name = "commonName") - protected String commonName; - @XmlAttribute(name = "taxId") - protected BigInteger taxId; - - /** - * Gets the value of the lineage property. - * - * @return - * possible object is - * {@link EntryType.Feature.FeatureTaxon.Lineage } - * - */ - public EntryType.Feature.FeatureTaxon.Lineage getLineage() { - return lineage; - } - - /** - * Sets the value of the lineage property. - * - * @param value - * allowed object is - * {@link EntryType.Feature.FeatureTaxon.Lineage } - * - */ - public void setLineage(EntryType.Feature.FeatureTaxon.Lineage value) { - this.lineage = value; - } - - /** - * Gets the value of the scientificName property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getScientificName() { - return scientificName; - } - - /** - * Sets the value of the scientificName property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setScientificName(String value) { - this.scientificName = value; - } - - /** - * Gets the value of the commonName property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getCommonName() { - return commonName; - } - - /** - * Sets the value of the commonName property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setCommonName(String value) { - this.commonName = value; - } - - /** - * Gets the value of the taxId property. - * - * @return - * possible object is - * {@link BigInteger } - * - */ - public BigInteger getTaxId() { - return taxId; - } - - /** - * Sets the value of the taxId property. - * - * @param value - * allowed object is - * {@link BigInteger } - * - */ - public void setTaxId(BigInteger value) { - this.taxId = value; - } - - - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -             * <complexType>
        -             *   <complexContent>
        -             *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -             *       <sequence>
        -             *         <element name="taxon" maxOccurs="unbounded">
        -             *           <complexType>
        -             *             <complexContent>
        -             *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -             *                 <attribute name="scientificName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        -             *               </restriction>
        -             *             </complexContent>
        -             *           </complexType>
        -             *         </element>
        -             *       </sequence>
        -             *     </restriction>
        -             *   </complexContent>
        -             * </complexType>
        -             * 
        - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "taxon" - }) - public static class Lineage { - - @XmlElement(required = true) - protected List taxon; - - /** - * Gets the value of the taxon property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the taxon property. - * - *

        - * For example, to add a new item, do as follows: - *

        -                 *    getTaxon().add(newItem);
        -                 * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link EntryType.Feature.FeatureTaxon.Lineage.Taxon } - * - * - */ - public List getTaxon() { - if (taxon == null) { - taxon = new ArrayList(); - } - return this.taxon; - } - - - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -                 * <complexType>
        -                 *   <complexContent>
        -                 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -                 *       <attribute name="scientificName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        -                 *     </restriction>
        -                 *   </complexContent>
        -                 * </complexType>
        -                 * 
        - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class Taxon { - - @XmlAttribute(name = "scientificName", required = true) - protected String scientificName; - - /** - * Gets the value of the scientificName property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getScientificName() { - return scientificName; - } - - /** - * Sets the value of the scientificName property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setScientificName(String value) { - this.scientificName = value; - } - - } - - } + protected String comment; - } + protected String referenceLocation; + protected List xref; - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -         * <complexType>
        -         *   <complexContent>
        -         *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *       <sequence>
        -         *         <element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
        -         *       </sequence>
        -         *       <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        -         *     </restriction>
        -         *   </complexContent>
        -         * </complexType>
        -         * 
        - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "value" - }) - public static class Qualifier { - - protected String value; - @XmlAttribute(name = "name", required = true) - protected String name; - - /** - * Gets the value of the value property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the name property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getName() { - return name; - } - - /** - * Sets the value of the name property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setName(String value) { - this.name = value; - } + @XmlAttribute(name = "type", required = true) + protected String type; - } + @XmlAttribute(name = "number", required = true) + protected BigInteger number; + + @XmlAttribute(name = "location") + protected String location; + /** + * Gets the value of the title property. + * + * @return possible object is {@link String } + * + */ + public String getTitle() + { + return title; } + /** + * Sets the value of the title property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setTitle(String value) + { + this.title = value; + } /** - *

        Java class for anonymous complex type. + * Gets the value of the author property. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the author property. + * + *

        + * For example, to add a new item, do as follows: * *

        -     * <complexType>
        -     *   <complexContent>
        -     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *       <sequence>
        -     *         <element name="title" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
        -     *         <element name="author" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
        -     *         <element name="applicant" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
        -     *         <element name="consortium" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
        -     *         <element name="submissionDate" type="{http://www.w3.org/2001/XMLSchema}date" minOccurs="0"/>
        -     *         <element name="journal" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
        -     *         <element name="year" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
        -     *         <element name="volume" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
        -     *         <element name="issue" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
        -     *         <element name="firstPage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
        -     *         <element name="lastPage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
        -     *         <element name="comment" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
        -     *         <element name="referenceLocation" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
        -     *         <element name="xref" type="{}XrefType" maxOccurs="unbounded" minOccurs="0"/>
        -     *       </sequence>
        -     *       <attribute name="type" use="required">
        -     *         <simpleType>
        -     *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
        -     *             <enumeration value="submission"/>
        -     *             <enumeration value="book"/>
        -     *             <enumeration value="article"/>
        -     *             <enumeration value="patent"/>
        -     *             <enumeration value="thesis"/>
        -     *             <enumeration value="unpublished"/>
        -     *           </restriction>
        -     *         </simpleType>
        -     *       </attribute>
        -     *       <attribute name="number" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        -     *       <attribute name="location" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *     </restriction>
        -     *   </complexContent>
        -     * </complexType>
        +     * getAuthor().add(newItem);
              * 
        * * + *

        + * Objects of the following type(s) are allowed in the list {@link String } + * + * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "title", - "author", - "applicant", - "consortium", - "submissionDate", - "journal", - "year", - "volume", - "issue", - "firstPage", - "lastPage", - "comment", - "referenceLocation", - "xref" - }) - public static class Reference { - - protected String title; - protected List author; - protected List applicant; - protected String consortium; - @XmlSchemaType(name = "date") - protected XMLGregorianCalendar submissionDate; - protected String journal; - protected String year; - protected String volume; - protected String issue; - protected String firstPage; - protected String lastPage; - protected String comment; - protected String referenceLocation; - protected List xref; - @XmlAttribute(name = "type", required = true) - protected String type; - @XmlAttribute(name = "number", required = true) - protected BigInteger number; - @XmlAttribute(name = "location") - protected String location; - - /** - * Gets the value of the title property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getTitle() { - return title; - } - - /** - * Sets the value of the title property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setTitle(String value) { - this.title = value; - } + public List getAuthor() + { + if (author == null) + { + author = new ArrayList(); + } + return this.author; + } - /** - * Gets the value of the author property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the author property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getAuthor().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link String } - * - * - */ - public List getAuthor() { - if (author == null) { - author = new ArrayList(); - } - return this.author; - } - - /** - * Gets the value of the applicant property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the applicant property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getApplicant().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link String } - * - * - */ - public List getApplicant() { - if (applicant == null) { - applicant = new ArrayList(); - } - return this.applicant; - } - - /** - * Gets the value of the consortium property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getConsortium() { - return consortium; - } + /** + * Gets the value of the applicant property. + * + *

        + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the applicant property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +     * getApplicant().add(newItem);
        +     * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link String } + * + * + */ + public List getApplicant() + { + if (applicant == null) + { + applicant = new ArrayList(); + } + return this.applicant; + } - /** - * Sets the value of the consortium property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setConsortium(String value) { - this.consortium = value; - } + /** + * Gets the value of the consortium property. + * + * @return possible object is {@link String } + * + */ + public String getConsortium() + { + return consortium; + } - /** - * Gets the value of the submissionDate property. - * - * @return - * possible object is - * {@link XMLGregorianCalendar } - * - */ - public XMLGregorianCalendar getSubmissionDate() { - return submissionDate; - } + /** + * Sets the value of the consortium property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setConsortium(String value) + { + this.consortium = value; + } - /** - * Sets the value of the submissionDate property. - * - * @param value - * allowed object is - * {@link XMLGregorianCalendar } - * - */ - public void setSubmissionDate(XMLGregorianCalendar value) { - this.submissionDate = value; - } + /** + * Gets the value of the submissionDate property. + * + * @return possible object is {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getSubmissionDate() + { + return submissionDate; + } - /** - * Gets the value of the journal property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getJournal() { - return journal; - } + /** + * Sets the value of the submissionDate property. + * + * @param value + * allowed object is {@link XMLGregorianCalendar } + * + */ + public void setSubmissionDate(XMLGregorianCalendar value) + { + this.submissionDate = value; + } - /** - * Sets the value of the journal property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setJournal(String value) { - this.journal = value; - } + /** + * Gets the value of the journal property. + * + * @return possible object is {@link String } + * + */ + public String getJournal() + { + return journal; + } - /** - * Gets the value of the year property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getYear() { - return year; - } + /** + * Sets the value of the journal property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setJournal(String value) + { + this.journal = value; + } - /** - * Sets the value of the year property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setYear(String value) { - this.year = value; - } + /** + * Gets the value of the year property. + * + * @return possible object is {@link String } + * + */ + public String getYear() + { + return year; + } - /** - * Gets the value of the volume property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getVolume() { - return volume; - } + /** + * Sets the value of the year property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setYear(String value) + { + this.year = value; + } - /** - * Sets the value of the volume property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setVolume(String value) { - this.volume = value; - } + /** + * Gets the value of the volume property. + * + * @return possible object is {@link String } + * + */ + public String getVolume() + { + return volume; + } - /** - * Gets the value of the issue property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getIssue() { - return issue; - } + /** + * Sets the value of the volume property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setVolume(String value) + { + this.volume = value; + } - /** - * Sets the value of the issue property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setIssue(String value) { - this.issue = value; - } + /** + * Gets the value of the issue property. + * + * @return possible object is {@link String } + * + */ + public String getIssue() + { + return issue; + } - /** - * Gets the value of the firstPage property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getFirstPage() { - return firstPage; - } + /** + * Sets the value of the issue property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setIssue(String value) + { + this.issue = value; + } - /** - * Sets the value of the firstPage property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setFirstPage(String value) { - this.firstPage = value; - } + /** + * Gets the value of the firstPage property. + * + * @return possible object is {@link String } + * + */ + public String getFirstPage() + { + return firstPage; + } - /** - * Gets the value of the lastPage property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getLastPage() { - return lastPage; - } + /** + * Sets the value of the firstPage property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setFirstPage(String value) + { + this.firstPage = value; + } - /** - * Sets the value of the lastPage property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setLastPage(String value) { - this.lastPage = value; - } + /** + * Gets the value of the lastPage property. + * + * @return possible object is {@link String } + * + */ + public String getLastPage() + { + return lastPage; + } - /** - * Gets the value of the comment property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getComment() { - return comment; - } + /** + * Sets the value of the lastPage property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setLastPage(String value) + { + this.lastPage = value; + } - /** - * Sets the value of the comment property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setComment(String value) { - this.comment = value; - } + /** + * Gets the value of the comment property. + * + * @return possible object is {@link String } + * + */ + public String getComment() + { + return comment; + } - /** - * Gets the value of the referenceLocation property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getReferenceLocation() { - return referenceLocation; - } + /** + * Sets the value of the comment property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setComment(String value) + { + this.comment = value; + } - /** - * Sets the value of the referenceLocation property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setReferenceLocation(String value) { - this.referenceLocation = value; - } + /** + * Gets the value of the referenceLocation property. + * + * @return possible object is {@link String } + * + */ + public String getReferenceLocation() + { + return referenceLocation; + } - /** - * Gets the value of the xref property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the xref property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getXref().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link XrefType } - * - * - */ - public List getXref() { - if (xref == null) { - xref = new ArrayList(); - } - return this.xref; - } + /** + * Sets the value of the referenceLocation property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setReferenceLocation(String value) + { + this.referenceLocation = value; + } - /** - * Gets the value of the type property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getType() { - return type; - } + /** + * Gets the value of the xref property. + * + *

        + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the xref property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +     * getXref().add(newItem);
        +     * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link XrefType + * } + * + * + */ + public List getXref() + { + if (xref == null) + { + xref = new ArrayList(); + } + return this.xref; + } - /** - * Sets the value of the type property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setType(String value) { - this.type = value; - } + /** + * Gets the value of the type property. + * + * @return possible object is {@link String } + * + */ + public String getType() + { + return type; + } - /** - * Gets the value of the number property. - * - * @return - * possible object is - * {@link BigInteger } - * - */ - public BigInteger getNumber() { - return number; - } + /** + * Sets the value of the type property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setType(String value) + { + this.type = value; + } - /** - * Sets the value of the number property. - * - * @param value - * allowed object is - * {@link BigInteger } - * - */ - public void setNumber(BigInteger value) { - this.number = value; - } + /** + * Gets the value of the number property. + * + * @return possible object is {@link BigInteger } + * + */ + public BigInteger getNumber() + { + return number; + } - /** - * Gets the value of the location property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getLocation() { - return location; - } + /** + * Sets the value of the number property. + * + * @param value + * allowed object is {@link BigInteger } + * + */ + public void setNumber(BigInteger value) + { + this.number = value; + } - /** - * Sets the value of the location property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setLocation(String value) { - this.location = value; - } + /** + * Gets the value of the location property. + * + * @return possible object is {@link String } + * + */ + public String getLocation() + { + return location; + } + /** + * Sets the value of the location property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setLocation(String value) + { + this.location = value; } + } + } diff --git a/src/jalview/xml/binding/embl/ObjectFactory.java b/src/jalview/xml/binding/embl/ObjectFactory.java index d5629ca..f622bd6 100644 --- a/src/jalview/xml/binding/embl/ObjectFactory.java +++ b/src/jalview/xml/binding/embl/ObjectFactory.java @@ -5,155 +5,167 @@ // Generated on: 2018.09.14 at 02:46:00 PM BST // - package jalview.xml.binding.embl; import javax.xml.bind.annotation.XmlRegistry; - /** - * This object contains factory methods for each - * Java content interface and Java element interface - * generated in the jalview.xml.binding.embl package. - *

        An ObjectFactory allows you to programatically - * construct new instances of the Java representation - * for XML content. The Java representation of XML - * content can consist of schema derived interfaces - * and classes representing the binding of schema - * type definitions, element declarations and model - * groups. Factory methods for each of these are - * provided in this class. + * This object contains factory methods for each Java content interface and Java + * element interface generated in the jalview.xml.binding.embl package. + *

        + * An ObjectFactory allows you to programatically construct new instances of the + * Java representation for XML content. The Java representation of XML content + * can consist of schema derived interfaces and classes representing the binding + * of schema type definitions, element declarations and model groups. Factory + * methods for each of these are provided in this class. * */ @XmlRegistry -public class ObjectFactory { - - - /** - * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: jalview.xml.binding.embl - * - */ - public ObjectFactory() { - } - - /** - * Create an instance of {@link EntryType } - * - */ - public EntryType createEntryType() { - return new EntryType(); - } - - /** - * Create an instance of {@link EntryType.Contig } - * - */ - public EntryType.Contig createEntryTypeContig() { - return new EntryType.Contig(); - } - - /** - * Create an instance of {@link EntryType.Assembly } - * - */ - public EntryType.Assembly createEntryTypeAssembly() { - return new EntryType.Assembly(); - } - - /** - * Create an instance of {@link EntryType.Feature } - * - */ - public EntryType.Feature createEntryTypeFeature() { - return new EntryType.Feature(); - } - - /** - * Create an instance of {@link EntryType.Feature.FeatureTaxon } - * - */ - public EntryType.Feature.FeatureTaxon createEntryTypeFeatureFeatureTaxon() { - return new EntryType.Feature.FeatureTaxon(); - } - - /** - * Create an instance of {@link EntryType.Feature.FeatureTaxon.Lineage } - * - */ - public EntryType.Feature.FeatureTaxon.Lineage createEntryTypeFeatureFeatureTaxonLineage() { - return new EntryType.Feature.FeatureTaxon.Lineage(); - } - - /** - * Create an instance of {@link ROOT } - * - */ - public ROOT createROOT() { - return new ROOT(); - } - - /** - * Create an instance of {@link EntrySetType } - * - */ - public EntrySetType createEntrySetType() { - return new EntrySetType(); - } - - /** - * Create an instance of {@link XrefType } - * - */ - public XrefType createXrefType() { - return new XrefType(); - } - - /** - * Create an instance of {@link EntryType.Reference } - * - */ - public EntryType.Reference createEntryTypeReference() { - return new EntryType.Reference(); - } - - /** - * Create an instance of {@link EntryType.Contig.Range } - * - */ - public EntryType.Contig.Range createEntryTypeContigRange() { - return new EntryType.Contig.Range(); - } - - /** - * Create an instance of {@link EntryType.Contig.Gap } - * - */ - public EntryType.Contig.Gap createEntryTypeContigGap() { - return new EntryType.Contig.Gap(); - } - - /** - * Create an instance of {@link EntryType.Assembly.Range } - * - */ - public EntryType.Assembly.Range createEntryTypeAssemblyRange() { - return new EntryType.Assembly.Range(); - } - - /** - * Create an instance of {@link EntryType.Feature.Qualifier } - * - */ - public EntryType.Feature.Qualifier createEntryTypeFeatureQualifier() { - return new EntryType.Feature.Qualifier(); - } - - /** - * Create an instance of {@link EntryType.Feature.FeatureTaxon.Lineage.Taxon } - * - */ - public EntryType.Feature.FeatureTaxon.Lineage.Taxon createEntryTypeFeatureFeatureTaxonLineageTaxon() { - return new EntryType.Feature.FeatureTaxon.Lineage.Taxon(); - } +public class ObjectFactory +{ + + /** + * Create a new ObjectFactory that can be used to create new instances of + * schema derived classes for package: jalview.xml.binding.embl + * + */ + public ObjectFactory() + { + } + + /** + * Create an instance of {@link EntryType } + * + */ + public EntryType createEntryType() + { + return new EntryType(); + } + + /** + * Create an instance of {@link EntryType.Contig } + * + */ + public EntryType.Contig createEntryTypeContig() + { + return new EntryType.Contig(); + } + + /** + * Create an instance of {@link EntryType.Assembly } + * + */ + public EntryType.Assembly createEntryTypeAssembly() + { + return new EntryType.Assembly(); + } + + /** + * Create an instance of {@link EntryType.Feature } + * + */ + public EntryType.Feature createEntryTypeFeature() + { + return new EntryType.Feature(); + } + + /** + * Create an instance of {@link EntryType.Feature.FeatureTaxon } + * + */ + public EntryType.Feature.FeatureTaxon createEntryTypeFeatureFeatureTaxon() + { + return new EntryType.Feature.FeatureTaxon(); + } + + /** + * Create an instance of {@link EntryType.Feature.FeatureTaxon.Lineage } + * + */ + public EntryType.Feature.FeatureTaxon.Lineage createEntryTypeFeatureFeatureTaxonLineage() + { + return new EntryType.Feature.FeatureTaxon.Lineage(); + } + + /** + * Create an instance of {@link ROOT } + * + */ + public ROOT createROOT() + { + return new ROOT(); + } + + /** + * Create an instance of {@link EntrySetType } + * + */ + public EntrySetType createEntrySetType() + { + return new EntrySetType(); + } + + /** + * Create an instance of {@link XrefType } + * + */ + public XrefType createXrefType() + { + return new XrefType(); + } + + /** + * Create an instance of {@link EntryType.Reference } + * + */ + public EntryType.Reference createEntryTypeReference() + { + return new EntryType.Reference(); + } + + /** + * Create an instance of {@link EntryType.Contig.Range } + * + */ + public EntryType.Contig.Range createEntryTypeContigRange() + { + return new EntryType.Contig.Range(); + } + + /** + * Create an instance of {@link EntryType.Contig.Gap } + * + */ + public EntryType.Contig.Gap createEntryTypeContigGap() + { + return new EntryType.Contig.Gap(); + } + + /** + * Create an instance of {@link EntryType.Assembly.Range } + * + */ + public EntryType.Assembly.Range createEntryTypeAssemblyRange() + { + return new EntryType.Assembly.Range(); + } + + /** + * Create an instance of {@link EntryType.Feature.Qualifier } + * + */ + public EntryType.Feature.Qualifier createEntryTypeFeatureQualifier() + { + return new EntryType.Feature.Qualifier(); + } + + /** + * Create an instance of {@link EntryType.Feature.FeatureTaxon.Lineage.Taxon } + * + */ + public EntryType.Feature.FeatureTaxon.Lineage.Taxon createEntryTypeFeatureFeatureTaxonLineageTaxon() + { + return new EntryType.Feature.FeatureTaxon.Lineage.Taxon(); + } } diff --git a/src/jalview/xml/binding/embl/ROOT.java b/src/jalview/xml/binding/embl/ROOT.java index f7f522d..6a09d79 100644 --- a/src/jalview/xml/binding/embl/ROOT.java +++ b/src/jalview/xml/binding/embl/ROOT.java @@ -5,7 +5,6 @@ // Generated on: 2018.09.14 at 02:46:00 PM BST // - package jalview.xml.binding.embl; import javax.xml.bind.annotation.XmlAccessType; @@ -13,11 +12,13 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; - /** - *

        Java class for anonymous complex type. + *

        + * Java class for anonymous complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType>
        @@ -35,62 +36,59 @@ import javax.xml.bind.annotation.XmlType;
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "", propOrder = {
        -    "entrySet",
        -    "entry"
        -})
        +@XmlType(name = "", propOrder = { "entrySet", "entry" })
         @XmlRootElement(name = "ROOT")
        -public class ROOT {
        +public class ROOT
        +{
        +
        +  protected EntrySetType entrySet;
         
        -    protected EntrySetType entrySet;
        -    protected EntryType entry;
        +  protected EntryType entry;
         
        -    /**
        -     * Gets the value of the entrySet property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link EntrySetType }
        -     *     
        -     */
        -    public EntrySetType getEntrySet() {
        -        return entrySet;
        -    }
        +  /**
        +   * Gets the value of the entrySet property.
        +   * 
        +   * @return possible object is {@link EntrySetType }
        +   * 
        +   */
        +  public EntrySetType getEntrySet()
        +  {
        +    return entrySet;
        +  }
         
        -    /**
        -     * Sets the value of the entrySet property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link EntrySetType }
        -     *     
        -     */
        -    public void setEntrySet(EntrySetType value) {
        -        this.entrySet = value;
        -    }
        +  /**
        +   * Sets the value of the entrySet property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link EntrySetType }
        +   * 
        +   */
        +  public void setEntrySet(EntrySetType value)
        +  {
        +    this.entrySet = value;
        +  }
         
        -    /**
        -     * Gets the value of the entry property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link EntryType }
        -     *     
        -     */
        -    public EntryType getEntry() {
        -        return entry;
        -    }
        +  /**
        +   * Gets the value of the entry property.
        +   * 
        +   * @return possible object is {@link EntryType }
        +   * 
        +   */
        +  public EntryType getEntry()
        +  {
        +    return entry;
        +  }
         
        -    /**
        -     * Sets the value of the entry property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link EntryType }
        -     *     
        -     */
        -    public void setEntry(EntryType value) {
        -        this.entry = value;
        -    }
        +  /**
        +   * Sets the value of the entry property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link EntryType }
        +   * 
        +   */
        +  public void setEntry(EntryType value)
        +  {
        +    this.entry = value;
        +  }
         
         }
        diff --git a/src/jalview/xml/binding/embl/XrefType.java b/src/jalview/xml/binding/embl/XrefType.java
        index 9608b79..cdfd438 100644
        --- a/src/jalview/xml/binding/embl/XrefType.java
        +++ b/src/jalview/xml/binding/embl/XrefType.java
        @@ -5,7 +5,6 @@
         // Generated on: 2018.09.14 at 02:46:00 PM BST 
         //
         
        -
         package jalview.xml.binding.embl;
         
         import javax.xml.bind.annotation.XmlAccessType;
        @@ -13,13 +12,15 @@ import javax.xml.bind.annotation.XmlAccessorType;
         import javax.xml.bind.annotation.XmlAttribute;
         import javax.xml.bind.annotation.XmlType;
         
        -
         /**
          * Database cross-reference.
          * 
        - * 

        Java class for XrefType complex type. + *

        + * Java class for XrefType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="XrefType">
        @@ -37,85 +38,85 @@ import javax.xml.bind.annotation.XmlType;
          */
         @XmlAccessorType(XmlAccessType.FIELD)
         @XmlType(name = "XrefType")
        -public class XrefType {
        +public class XrefType
        +{
        +
        +  @XmlAttribute(name = "db", required = true)
        +  protected String db;
        +
        +  @XmlAttribute(name = "id", required = true)
        +  protected String id;
         
        -    @XmlAttribute(name = "db", required = true)
        -    protected String db;
        -    @XmlAttribute(name = "id", required = true)
        -    protected String id;
        -    @XmlAttribute(name = "secondaryId")
        -    protected String secondaryId;
        +  @XmlAttribute(name = "secondaryId")
        +  protected String secondaryId;
         
        -    /**
        -     * Gets the value of the db property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getDb() {
        -        return db;
        -    }
        +  /**
        +   * Gets the value of the db property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getDb()
        +  {
        +    return db;
        +  }
         
        -    /**
        -     * Sets the value of the db property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setDb(String value) {
        -        this.db = value;
        -    }
        +  /**
        +   * Sets the value of the db property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setDb(String value)
        +  {
        +    this.db = value;
        +  }
         
        -    /**
        -     * Gets the value of the id property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getId() {
        -        return id;
        -    }
        +  /**
        +   * Gets the value of the id property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getId()
        +  {
        +    return id;
        +  }
         
        -    /**
        -     * Sets the value of the id property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setId(String value) {
        -        this.id = value;
        -    }
        +  /**
        +   * Sets the value of the id property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setId(String value)
        +  {
        +    this.id = value;
        +  }
         
        -    /**
        -     * Gets the value of the secondaryId property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getSecondaryId() {
        -        return secondaryId;
        -    }
        +  /**
        +   * Gets the value of the secondaryId property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getSecondaryId()
        +  {
        +    return secondaryId;
        +  }
         
        -    /**
        -     * Sets the value of the secondaryId property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setSecondaryId(String value) {
        -        this.secondaryId = value;
        -    }
        +  /**
        +   * Sets the value of the secondaryId property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setSecondaryId(String value)
        +  {
        +    this.secondaryId = value;
        +  }
         
         }
        diff --git a/src/jalview/xml/binding/jalview/AlcodonFrame.java b/src/jalview/xml/binding/jalview/AlcodonFrame.java
        index e52eefb..9a2c488 100644
        --- a/src/jalview/xml/binding/jalview/AlcodonFrame.java
        +++ b/src/jalview/xml/binding/jalview/AlcodonFrame.java
        @@ -5,7 +5,6 @@
         // Generated on: 2021.08.30 at 11:05:22 AM BST 
         //
         
        -
         package jalview.xml.binding.jalview;
         
         import java.math.BigInteger;
        @@ -18,309 +17,288 @@ import javax.xml.bind.annotation.XmlElement;
         import javax.xml.bind.annotation.XmlRootElement;
         import javax.xml.bind.annotation.XmlType;
         
        -
         /**
          * <p>Java class for anonymous complex type.
          * 
        - * <p>The following schema fragment specifies the expected content contained within this class.
        + * <p>The following schema fragment specifies the expected content
        + * contained within this class.
          * 
        - * <pre>
        - * &lt;complexType&gt;
        - *   &lt;complexContent&gt;
        - *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        - *       &lt;sequence&gt;
        - *         &lt;element name="alcodon" maxOccurs="unbounded" minOccurs="0"&gt;
        - *           &lt;complexType&gt;
        - *             &lt;complexContent&gt;
        - *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        - *                 &lt;attribute name="pos1" type="{http://www.w3.org/2001/XMLSchema}integer" /&gt;
        - *                 &lt;attribute name="pos2" type="{http://www.w3.org/2001/XMLSchema}integer" /&gt;
        - *                 &lt;attribute name="pos3" type="{http://www.w3.org/2001/XMLSchema}integer" /&gt;
        - *               &lt;/restriction&gt;
        - *             &lt;/complexContent&gt;
        - *           &lt;/complexType&gt;
        - *         &lt;/element&gt;
        - *         &lt;element name="alcodMap" maxOccurs="unbounded" minOccurs="0"&gt;
        - *           &lt;complexType&gt;
        - *             &lt;complexContent&gt;
        - *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        - *                 &lt;sequence&gt;
        - *                   &lt;element ref="{www.vamsas.ac.uk/jalview/version2}Mapping"/&gt;
        - *                 &lt;/sequence&gt;
        - *                 &lt;attribute name="dnasq" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *               &lt;/restriction&gt;
        - *             &lt;/complexContent&gt;
        - *           &lt;/complexType&gt;
        - *         &lt;/element&gt;
        - *       &lt;/sequence&gt;
        - *     &lt;/restriction&gt;
        - *   &lt;/complexContent&gt;
        - * &lt;/complexType&gt;
        - * </pre>
        + * <pre> &lt;complexType&gt; &lt;complexContent&gt;
        + * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        + * &lt;sequence&gt; &lt;element name="alcodon" maxOccurs="unbounded"
        + * minOccurs="0"&gt; &lt;complexType&gt;
        + * &lt;complexContent&gt; &lt;restriction
        + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; &lt;attribute
        + * name="pos1" type="{http://www.w3.org/2001/XMLSchema}integer" /&gt;
        + * &lt;attribute name="pos2"
        + * type="{http://www.w3.org/2001/XMLSchema}integer" /&gt; &lt;attribute
        + * name="pos3" type="{http://www.w3.org/2001/XMLSchema}integer" /&gt;
        + * &lt;/restriction&gt; &lt;/complexContent&gt;
        + * &lt;/complexType&gt; &lt;/element&gt; &lt;element
        + * name="alcodMap" maxOccurs="unbounded" minOccurs="0"&gt;
        + * &lt;complexType&gt; &lt;complexContent&gt;
        + * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        + * &lt;sequence&gt; &lt;element
        + * ref="{www.vamsas.ac.uk/jalview/version2}Mapping"/&gt;
        + * &lt;/sequence&gt; &lt;attribute name="dnasq" use="required"
        + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        + * &lt;/restriction&gt; &lt;/complexContent&gt;
        + * &lt;/complexType&gt; &lt;/element&gt;
        + * &lt;/sequence&gt; &lt;/restriction&gt;
        + * &lt;/complexContent&gt; &lt;/complexType&gt; </pre>
          * 
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "", propOrder = {
        -    "alcodon",
        -    "alcodMap"
        -})
        +@XmlType(name = "", propOrder = { "alcodon", "alcodMap" })
         @XmlRootElement(name = "AlcodonFrame")
        -public class AlcodonFrame {
        +public class AlcodonFrame
        +{
        +
        +  protected List alcodon;
        +
        +  protected List alcodMap;
         
        -    protected List alcodon;
        -    protected List alcodMap;
        +  /**
        +   * Gets the value of the alcodon property.
        +   * 
        +   * <p> This accessor method returns a reference to the live list, not a
        +   * snapshot. Therefore any modification you make to the returned list will be
        +   * present inside the JAXB object. This is why there is not a
        +   * <CODE>set</CODE> method for the alcodon property.
        +   * 
        +   * <p> For example, to add a new item, do as follows: <pre>
        +   * getAlcodon().add(newItem); </pre>
        +   * 
        +   * 
        +   * <p> Objects of the following type(s) are allowed in the list
        +   * {@link AlcodonFrame.Alcodon }
        +   * 
        +   * 
        +   */
        +  public List getAlcodon()
        +  {
        +    if (alcodon == null)
        +    {
        +      alcodon = new ArrayList();
        +    }
        +    return this.alcodon;
        +  }
        +
        +  /**
        +   * Gets the value of the alcodMap property.
        +   * 
        +   * <p> This accessor method returns a reference to the live list, not a
        +   * snapshot. Therefore any modification you make to the returned list will be
        +   * present inside the JAXB object. This is why there is not a
        +   * <CODE>set</CODE> method for the alcodMap property.
        +   * 
        +   * <p> For example, to add a new item, do as follows: <pre>
        +   * getAlcodMap().add(newItem); </pre>
        +   * 
        +   * 
        +   * <p> Objects of the following type(s) are allowed in the list
        +   * {@link AlcodonFrame.AlcodMap }
        +   * 
        +   * 
        +   */
        +  public List getAlcodMap()
        +  {
        +    if (alcodMap == null)
        +    {
        +      alcodMap = new ArrayList();
        +    }
        +    return this.alcodMap;
        +  }
        +
        +  /**
        +   * <p>Java class for anonymous complex type.
        +   * 
        +   * <p>The following schema fragment specifies the expected content
        +   * contained within this class.
        +   * 
        +   * <pre> &lt;complexType&gt; &lt;complexContent&gt;
        +   * &lt;restriction
        +   * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        +   * &lt;sequence&gt; &lt;element
        +   * ref="{www.vamsas.ac.uk/jalview/version2}Mapping"/&gt;
        +   * &lt;/sequence&gt; &lt;attribute name="dnasq" use="required"
        +   * type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        +   * &lt;/restriction&gt; &lt;/complexContent&gt;
        +   * &lt;/complexType&gt; </pre>
        +   * 
        +   * 
        +   */
        +  @XmlAccessorType(XmlAccessType.FIELD)
        +  @XmlType(name = "", propOrder = { "mapping" })
        +  public static class AlcodMap
        +  {
        +
        +    @XmlElement(name = "Mapping", required = true)
        +    protected Mapping mapping;
        +
        +    @XmlAttribute(name = "dnasq", required = true)
        +    protected String dnasq;
         
             /**
        -     * Gets the value of the alcodon property.
              * 
        -     * <p>
        -     * This accessor method returns a reference to the live list,
        -     * not a snapshot. Therefore any modification you make to the
        -     * returned list will be present inside the JAXB object.
        -     * This is why there is not a <CODE>set</CODE> method for the alcodon property.
        +     * a Mapping entry and an associated protein sequence
              * 
        -     * <p>
        -     * For example, to add a new item, do as follows:
        -     * <pre>
        -     *    getAlcodon().add(newItem);
        -     * </pre>
        -     * 
        -     * 
        -     * <p>
        -     * Objects of the following type(s) are allowed in the list
        -     * {@link AlcodonFrame.Alcodon }
              * 
        +     * @return possible object is {@link Mapping }
              * 
              */
        -    public List getAlcodon() {
        -        if (alcodon == null) {
        -            alcodon = new ArrayList();
        -        }
        -        return this.alcodon;
        +    public Mapping getMapping()
        +    {
        +      return mapping;
             }
         
             /**
        -     * Gets the value of the alcodMap property.
        -     * 
        -     * <p>
        -     * This accessor method returns a reference to the live list,
        -     * not a snapshot. Therefore any modification you make to the
        -     * returned list will be present inside the JAXB object.
        -     * This is why there is not a <CODE>set</CODE> method for the alcodMap property.
        -     * 
        -     * <p>
        -     * For example, to add a new item, do as follows:
        -     * <pre>
        -     *    getAlcodMap().add(newItem);
        -     * </pre>
        -     * 
        -     * 
        -     * <p>
        -     * Objects of the following type(s) are allowed in the list
        -     * {@link AlcodonFrame.AlcodMap }
        +     * Sets the value of the mapping property.
              * 
        +     * @param value
        +     *          allowed object is {@link Mapping }
              * 
              */
        -    public List getAlcodMap() {
        -        if (alcodMap == null) {
        -            alcodMap = new ArrayList();
        -        }
        -        return this.alcodMap;
        +    public void setMapping(Mapping value)
        +    {
        +      this.mapping = value;
             }
         
        -
             /**
        -     * <p>Java class for anonymous complex type.
        +     * Gets the value of the dnasq property.
              * 
        -     * <p>The following schema fragment specifies the expected content contained within this class.
        +     * @return possible object is {@link String }
              * 
        -     * <pre>
        -     * &lt;complexType&gt;
        -     *   &lt;complexContent&gt;
        -     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        -     *       &lt;sequence&gt;
        -     *         &lt;element ref="{www.vamsas.ac.uk/jalview/version2}Mapping"/&gt;
        -     *       &lt;/sequence&gt;
        -     *       &lt;attribute name="dnasq" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -     *     &lt;/restriction&gt;
        -     *   &lt;/complexContent&gt;
        -     * &lt;/complexType&gt;
        -     * </pre>
        +     */
        +    public String getDnasq()
        +    {
        +      return dnasq;
        +    }
        +
        +    /**
        +     * Sets the value of the dnasq property.
              * 
        +     * @param value
        +     *          allowed object is {@link String }
              * 
              */
        -    @XmlAccessorType(XmlAccessType.FIELD)
        -    @XmlType(name = "", propOrder = {
        -        "mapping"
        -    })
        -    public static class AlcodMap {
        +    public void setDnasq(String value)
        +    {
        +      this.dnasq = value;
        +    }
         
        -        @XmlElement(name = "Mapping", required = true)
        -        protected Mapping mapping;
        -        @XmlAttribute(name = "dnasq", required = true)
        -        protected String dnasq;
        +  }
         
        -        /**
        -         * 
        -         * 										a Mapping entry and an associated protein sequence
        -         * 									
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Mapping }
        -         *     
        -         */
        -        public Mapping getMapping() {
        -            return mapping;
        -        }
        +  /**
        +   * 
        +   * specifies a series of aligned codons from an associated DNA sequence
        +   * alignment that when translated correspond to columns of a peptide
        +   * alignment. Element may have either all pos1,2,3 attributes specified, or
        +   * none at all (indicating a gapped column with no translated peptide).
        +   * 
        +   * 
        +   * <p>Java class for anonymous complex type.
        +   * 
        +   * <p>The following schema fragment specifies the expected content
        +   * contained within this class.
        +   * 
        +   * <pre> &lt;complexType&gt; &lt;complexContent&gt;
        +   * &lt;restriction
        +   * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; &lt;attribute
        +   * name="pos1" type="{http://www.w3.org/2001/XMLSchema}integer" /&gt;
        +   * &lt;attribute name="pos2"
        +   * type="{http://www.w3.org/2001/XMLSchema}integer" /&gt;
        +   * &lt;attribute name="pos3"
        +   * type="{http://www.w3.org/2001/XMLSchema}integer" /&gt;
        +   * &lt;/restriction&gt; &lt;/complexContent&gt;
        +   * &lt;/complexType&gt; </pre>
        +   * 
        +   * 
        +   */
        +  @XmlAccessorType(XmlAccessType.FIELD)
        +  @XmlType(name = "")
        +  public static class Alcodon
        +  {
         
        -        /**
        -         * Sets the value of the mapping property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Mapping }
        -         *     
        -         */
        -        public void setMapping(Mapping value) {
        -            this.mapping = value;
        -        }
        +    @XmlAttribute(name = "pos1")
        +    protected BigInteger pos1;
         
        -        /**
        -         * Gets the value of the dnasq property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link String }
        -         *     
        -         */
        -        public String getDnasq() {
        -            return dnasq;
        -        }
        +    @XmlAttribute(name = "pos2")
        +    protected BigInteger pos2;
         
        -        /**
        -         * Sets the value of the dnasq property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link String }
        -         *     
        -         */
        -        public void setDnasq(String value) {
        -            this.dnasq = value;
        -        }
        +    @XmlAttribute(name = "pos3")
        +    protected BigInteger pos3;
         
        +    /**
        +     * Gets the value of the pos1 property.
        +     * 
        +     * @return possible object is {@link BigInteger }
        +     * 
        +     */
        +    public BigInteger getPos1()
        +    {
        +      return pos1;
             }
         
        -
             /**
        +     * Sets the value of the pos1 property.
              * 
        -     * 								specifies a series of aligned codons from an associated DNA sequence alignment that when translated correspond to columns of a peptide alignment.
        -     * 								Element may have either all pos1,2,3 attributes specified, or none at all (indicating a gapped column with no translated peptide).
        -     * 							
        +     * @param value
        +     *          allowed object is {@link BigInteger }
              * 
        -     * <p>Java class for anonymous complex type.
        +     */
        +    public void setPos1(BigInteger value)
        +    {
        +      this.pos1 = value;
        +    }
        +
        +    /**
        +     * Gets the value of the pos2 property.
              * 
        -     * <p>The following schema fragment specifies the expected content contained within this class.
        +     * @return possible object is {@link BigInteger }
              * 
        -     * <pre>
        -     * &lt;complexType&gt;
        -     *   &lt;complexContent&gt;
        -     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        -     *       &lt;attribute name="pos1" type="{http://www.w3.org/2001/XMLSchema}integer" /&gt;
        -     *       &lt;attribute name="pos2" type="{http://www.w3.org/2001/XMLSchema}integer" /&gt;
        -     *       &lt;attribute name="pos3" type="{http://www.w3.org/2001/XMLSchema}integer" /&gt;
        -     *     &lt;/restriction&gt;
        -     *   &lt;/complexContent&gt;
        -     * &lt;/complexType&gt;
        -     * </pre>
        +     */
        +    public BigInteger getPos2()
        +    {
        +      return pos2;
        +    }
        +
        +    /**
        +     * Sets the value of the pos2 property.
              * 
        +     * @param value
        +     *          allowed object is {@link BigInteger }
              * 
              */
        -    @XmlAccessorType(XmlAccessType.FIELD)
        -    @XmlType(name = "")
        -    public static class Alcodon {
        -
        -        @XmlAttribute(name = "pos1")
        -        protected BigInteger pos1;
        -        @XmlAttribute(name = "pos2")
        -        protected BigInteger pos2;
        -        @XmlAttribute(name = "pos3")
        -        protected BigInteger pos3;
        -
        -        /**
        -         * Gets the value of the pos1 property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link BigInteger }
        -         *     
        -         */
        -        public BigInteger getPos1() {
        -            return pos1;
        -        }
        -
        -        /**
        -         * Sets the value of the pos1 property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link BigInteger }
        -         *     
        -         */
        -        public void setPos1(BigInteger value) {
        -            this.pos1 = value;
        -        }
        -
        -        /**
        -         * Gets the value of the pos2 property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link BigInteger }
        -         *     
        -         */
        -        public BigInteger getPos2() {
        -            return pos2;
        -        }
        -
        -        /**
        -         * Sets the value of the pos2 property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link BigInteger }
        -         *     
        -         */
        -        public void setPos2(BigInteger value) {
        -            this.pos2 = value;
        -        }
        -
        -        /**
        -         * Gets the value of the pos3 property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link BigInteger }
        -         *     
        -         */
        -        public BigInteger getPos3() {
        -            return pos3;
        -        }
        +    public void setPos2(BigInteger value)
        +    {
        +      this.pos2 = value;
        +    }
         
        -        /**
        -         * Sets the value of the pos3 property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link BigInteger }
        -         *     
        -         */
        -        public void setPos3(BigInteger value) {
        -            this.pos3 = value;
        -        }
        +    /**
        +     * Gets the value of the pos3 property.
        +     * 
        +     * @return possible object is {@link BigInteger }
        +     * 
        +     */
        +    public BigInteger getPos3()
        +    {
        +      return pos3;
        +    }
         
        +    /**
        +     * Sets the value of the pos3 property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link BigInteger }
        +     * 
        +     */
        +    public void setPos3(BigInteger value)
        +    {
        +      this.pos3 = value;
             }
         
        +  }
        +
         }
        diff --git a/src/jalview/xml/binding/jalview/Annotation.java b/src/jalview/xml/binding/jalview/Annotation.java
        index 6c1573f..8d66aa3 100644
        --- a/src/jalview/xml/binding/jalview/Annotation.java
        +++ b/src/jalview/xml/binding/jalview/Annotation.java
        @@ -5,7 +5,6 @@
         // Generated on: 2021.08.30 at 11:05:22 AM BST 
         //
         
        -
         package jalview.xml.binding.jalview;
         
         import java.util.ArrayList;
        @@ -17,841 +16,846 @@ import javax.xml.bind.annotation.XmlElement;
         import javax.xml.bind.annotation.XmlRootElement;
         import javax.xml.bind.annotation.XmlType;
         
        -
         /**
          * <p>Java class for anonymous complex type.
          * 
        - * <p>The following schema fragment specifies the expected content contained within this class.
        + * <p>The following schema fragment specifies the expected content
        + * contained within this class.
          * 
        - * <pre>
        - * &lt;complexType&gt;
        - *   &lt;complexContent&gt;
        - *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        - *       &lt;sequence&gt;
        - *         &lt;element ref="{www.vamsas.ac.uk/jalview/version2}annotationElement" maxOccurs="unbounded" minOccurs="0"/&gt;
        - *         &lt;element name="label" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
        - *         &lt;element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
        - *         &lt;element name="thresholdLine" minOccurs="0"&gt;
        - *           &lt;complexType&gt;
        - *             &lt;complexContent&gt;
        - *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        - *                 &lt;attribute name="label" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *                 &lt;attribute name="value" type="{http://www.w3.org/2001/XMLSchema}float" /&gt;
        - *                 &lt;attribute name="colour" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *               &lt;/restriction&gt;
        - *             &lt;/complexContent&gt;
        - *           &lt;/complexType&gt;
        - *         &lt;/element&gt;
        - *         &lt;element name="property" maxOccurs="unbounded" minOccurs="0"&gt;
        - *           &lt;complexType&gt;
        - *             &lt;complexContent&gt;
        - *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        - *                 &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *                 &lt;attribute name="value" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *               &lt;/restriction&gt;
        - *             &lt;/complexContent&gt;
        - *           &lt;/complexType&gt;
        - *         &lt;/element&gt;
        - *       &lt;/sequence&gt;
        - *       &lt;attribute name="graph" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *       &lt;attribute name="graphType" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *       &lt;attribute name="sequenceRef" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *       &lt;attribute name="groupRef" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *       &lt;attribute name="graphColour" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *       &lt;attribute name="graphGroup" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *       &lt;attribute name="graphHeight" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *       &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *       &lt;attribute name="scoreOnly" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        - *       &lt;attribute name="score" type="{http://www.w3.org/2001/XMLSchema}double" /&gt;
        - *       &lt;attribute name="visible" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *       &lt;attribute name="centreColLabels" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *       &lt;attribute name="scaleColLabels" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *       &lt;attribute name="showAllColLabels" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *       &lt;attribute name="autoCalculated" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        - *       &lt;attribute name="belowAlignment" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        - *       &lt;attribute name="calcId" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *     &lt;/restriction&gt;
        - *   &lt;/complexContent&gt;
        - * &lt;/complexType&gt;
        - * </pre>
        + * <pre> &lt;complexType&gt; &lt;complexContent&gt;
        + * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        + * &lt;sequence&gt; &lt;element
        + * ref="{www.vamsas.ac.uk/jalview/version2}annotationElement"
        + * maxOccurs="unbounded" minOccurs="0"/&gt; &lt;element name="label"
        + * type="{http://www.w3.org/2001/XMLSchema}string"/&gt; &lt;element
        + * name="description" type="{http://www.w3.org/2001/XMLSchema}string"
        + * minOccurs="0"/&gt; &lt;element name="thresholdLine"
        + * minOccurs="0"&gt; &lt;complexType&gt;
        + * &lt;complexContent&gt; &lt;restriction
        + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; &lt;attribute
        + * name="label" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        + * &lt;attribute name="value" type="{http://www.w3.org/2001/XMLSchema}float"
        + * /&gt; &lt;attribute name="colour"
        + * type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        + * &lt;/restriction&gt; &lt;/complexContent&gt;
        + * &lt;/complexType&gt; &lt;/element&gt; &lt;element
        + * name="property" maxOccurs="unbounded" minOccurs="0"&gt;
        + * &lt;complexType&gt; &lt;complexContent&gt;
        + * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        + * &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string"
        + * /&gt; &lt;attribute name="value"
        + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        + * &lt;/restriction&gt; &lt;/complexContent&gt;
        + * &lt;/complexType&gt; &lt;/element&gt;
        + * &lt;/sequence&gt; &lt;attribute name="graph" use="required"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt; &lt;attribute
        + * name="graphType" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        + * &lt;attribute name="sequenceRef"
        + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute
        + * name="groupRef" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        + * &lt;attribute name="graphColour"
        + * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        + * name="graphGroup" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        + * &lt;attribute name="graphHeight"
        + * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        + * name="id" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        + * &lt;attribute name="scoreOnly"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        + * &lt;attribute name="score"
        + * type="{http://www.w3.org/2001/XMLSchema}double" /&gt; &lt;attribute
        + * name="visible" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        + * &lt;attribute name="centreColLabels"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt; &lt;attribute
        + * name="scaleColLabels" type="{http://www.w3.org/2001/XMLSchema}boolean"
        + * /&gt; &lt;attribute name="showAllColLabels"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt; &lt;attribute
        + * name="autoCalculated" type="{http://www.w3.org/2001/XMLSchema}boolean"
        + * default="false" /&gt; &lt;attribute name="belowAlignment"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        + * &lt;attribute name="calcId"
        + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        + * &lt;/restriction&gt; &lt;/complexContent&gt;
        + * &lt;/complexType&gt; </pre>
          * 
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "", propOrder = {
        -    "annotationElement",
        -    "label",
        -    "description",
        -    "thresholdLine",
        -    "property"
        -})
        +@XmlType(
        +  name = "",
        +  propOrder =
        +  { "annotationElement", "label", "description", "thresholdLine",
        +      "property" })
         @XmlRootElement(name = "Annotation")
        -public class Annotation {
        +public class Annotation
        +{
         
        -    protected List annotationElement;
        -    @XmlElement(required = true)
        -    protected String label;
        -    protected String description;
        -    protected Annotation.ThresholdLine thresholdLine;
        -    protected List property;
        -    @XmlAttribute(name = "graph", required = true)
        -    protected boolean graph;
        -    @XmlAttribute(name = "graphType")
        -    protected Integer graphType;
        -    @XmlAttribute(name = "sequenceRef")
        -    protected String sequenceRef;
        -    @XmlAttribute(name = "groupRef")
        -    protected String groupRef;
        -    @XmlAttribute(name = "graphColour")
        -    protected Integer graphColour;
        -    @XmlAttribute(name = "graphGroup")
        -    protected Integer graphGroup;
        -    @XmlAttribute(name = "graphHeight")
        -    protected Integer graphHeight;
        -    @XmlAttribute(name = "id")
        -    protected String id;
        -    @XmlAttribute(name = "scoreOnly")
        -    protected Boolean scoreOnly;
        -    @XmlAttribute(name = "score")
        -    protected Double score;
        -    @XmlAttribute(name = "visible")
        -    protected Boolean visible;
        -    @XmlAttribute(name = "centreColLabels")
        -    protected Boolean centreColLabels;
        -    @XmlAttribute(name = "scaleColLabels")
        -    protected Boolean scaleColLabels;
        -    @XmlAttribute(name = "showAllColLabels")
        -    protected Boolean showAllColLabels;
        -    @XmlAttribute(name = "autoCalculated")
        -    protected Boolean autoCalculated;
        -    @XmlAttribute(name = "belowAlignment")
        -    protected Boolean belowAlignment;
        -    @XmlAttribute(name = "calcId")
        -    protected String calcId;
        +  protected List annotationElement;
         
        -    /**
        -     * Gets the value of the annotationElement property.
        -     * 
        -     * <p>
        -     * This accessor method returns a reference to the live list,
        -     * not a snapshot. Therefore any modification you make to the
        -     * returned list will be present inside the JAXB object.
        -     * This is why there is not a <CODE>set</CODE> method for the annotationElement property.
        -     * 
        -     * <p>
        -     * For example, to add a new item, do as follows:
        -     * <pre>
        -     *    getAnnotationElement().add(newItem);
        -     * </pre>
        -     * 
        -     * 
        -     * <p>
        -     * Objects of the following type(s) are allowed in the list
        -     * {@link AnnotationElement }
        -     * 
        -     * 
        -     */
        -    public List getAnnotationElement() {
        -        if (annotationElement == null) {
        -            annotationElement = new ArrayList();
        -        }
        -        return this.annotationElement;
        -    }
        -
        -    /**
        -     * Gets the value of the label property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getLabel() {
        -        return label;
        -    }
        -
        -    /**
        -     * Sets the value of the label property.
        +  @XmlElement(required = true)
        +  protected String label;
        +
        +  protected String description;
        +
        +  protected Annotation.ThresholdLine thresholdLine;
        +
        +  protected List property;
        +
        +  @XmlAttribute(name = "graph", required = true)
        +  protected boolean graph;
        +
        +  @XmlAttribute(name = "graphType")
        +  protected Integer graphType;
        +
        +  @XmlAttribute(name = "sequenceRef")
        +  protected String sequenceRef;
        +
        +  @XmlAttribute(name = "groupRef")
        +  protected String groupRef;
        +
        +  @XmlAttribute(name = "graphColour")
        +  protected Integer graphColour;
        +
        +  @XmlAttribute(name = "graphGroup")
        +  protected Integer graphGroup;
        +
        +  @XmlAttribute(name = "graphHeight")
        +  protected Integer graphHeight;
        +
        +  @XmlAttribute(name = "id")
        +  protected String id;
        +
        +  @XmlAttribute(name = "scoreOnly")
        +  protected Boolean scoreOnly;
        +
        +  @XmlAttribute(name = "score")
        +  protected Double score;
        +
        +  @XmlAttribute(name = "visible")
        +  protected Boolean visible;
        +
        +  @XmlAttribute(name = "centreColLabels")
        +  protected Boolean centreColLabels;
        +
        +  @XmlAttribute(name = "scaleColLabels")
        +  protected Boolean scaleColLabels;
        +
        +  @XmlAttribute(name = "showAllColLabels")
        +  protected Boolean showAllColLabels;
        +
        +  @XmlAttribute(name = "autoCalculated")
        +  protected Boolean autoCalculated;
        +
        +  @XmlAttribute(name = "belowAlignment")
        +  protected Boolean belowAlignment;
        +
        +  @XmlAttribute(name = "calcId")
        +  protected String calcId;
        +
        +  /**
        +   * Gets the value of the annotationElement property.
        +   * 
        +   * <p> This accessor method returns a reference to the live list, not a
        +   * snapshot. Therefore any modification you make to the returned list will be
        +   * present inside the JAXB object. This is why there is not a
        +   * <CODE>set</CODE> method for the annotationElement property.
        +   * 
        +   * <p> For example, to add a new item, do as follows: <pre>
        +   * getAnnotationElement().add(newItem); </pre>
        +   * 
        +   * 
        +   * <p> Objects of the following type(s) are allowed in the list
        +   * {@link AnnotationElement }
        +   * 
        +   * 
        +   */
        +  public List getAnnotationElement()
        +  {
        +    if (annotationElement == null)
        +    {
        +      annotationElement = new ArrayList();
        +    }
        +    return this.annotationElement;
        +  }
        +
        +  /**
        +   * Gets the value of the label property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getLabel()
        +  {
        +    return label;
        +  }
        +
        +  /**
        +   * Sets the value of the label property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setLabel(String value)
        +  {
        +    this.label = value;
        +  }
        +
        +  /**
        +   * Gets the value of the description property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getDescription()
        +  {
        +    return description;
        +  }
        +
        +  /**
        +   * Sets the value of the description property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setDescription(String value)
        +  {
        +    this.description = value;
        +  }
        +
        +  /**
        +   * Gets the value of the thresholdLine property.
        +   * 
        +   * @return possible object is {@link Annotation.ThresholdLine }
        +   * 
        +   */
        +  public Annotation.ThresholdLine getThresholdLine()
        +  {
        +    return thresholdLine;
        +  }
        +
        +  /**
        +   * Sets the value of the thresholdLine property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link Annotation.ThresholdLine }
        +   * 
        +   */
        +  public void setThresholdLine(Annotation.ThresholdLine value)
        +  {
        +    this.thresholdLine = value;
        +  }
        +
        +  /**
        +   * Gets the value of the property property.
        +   * 
        +   * <p> This accessor method returns a reference to the live list, not a
        +   * snapshot. Therefore any modification you make to the returned list will be
        +   * present inside the JAXB object. This is why there is not a
        +   * <CODE>set</CODE> method for the property property.
        +   * 
        +   * <p> For example, to add a new item, do as follows: <pre>
        +   * getProperty().add(newItem); </pre>
        +   * 
        +   * 
        +   * <p> Objects of the following type(s) are allowed in the list
        +   * {@link Annotation.Property }
        +   * 
        +   * 
        +   */
        +  public List getProperty()
        +  {
        +    if (property == null)
        +    {
        +      property = new ArrayList();
        +    }
        +    return this.property;
        +  }
        +
        +  /**
        +   * Gets the value of the graph property.
        +   * 
        +   */
        +  public boolean isGraph()
        +  {
        +    return graph;
        +  }
        +
        +  /**
        +   * Sets the value of the graph property.
        +   * 
        +   */
        +  public void setGraph(boolean value)
        +  {
        +    this.graph = value;
        +  }
        +
        +  /**
        +   * Gets the value of the graphType property.
        +   * 
        +   * @return possible object is {@link Integer }
        +   * 
        +   */
        +  public Integer getGraphType()
        +  {
        +    return graphType;
        +  }
        +
        +  /**
        +   * Sets the value of the graphType property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link Integer }
        +   * 
        +   */
        +  public void setGraphType(Integer value)
        +  {
        +    this.graphType = value;
        +  }
        +
        +  /**
        +   * Gets the value of the sequenceRef property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getSequenceRef()
        +  {
        +    return sequenceRef;
        +  }
        +
        +  /**
        +   * Sets the value of the sequenceRef property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setSequenceRef(String value)
        +  {
        +    this.sequenceRef = value;
        +  }
        +
        +  /**
        +   * Gets the value of the groupRef property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getGroupRef()
        +  {
        +    return groupRef;
        +  }
        +
        +  /**
        +   * Sets the value of the groupRef property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setGroupRef(String value)
        +  {
        +    this.groupRef = value;
        +  }
        +
        +  /**
        +   * Gets the value of the graphColour property.
        +   * 
        +   * @return possible object is {@link Integer }
        +   * 
        +   */
        +  public Integer getGraphColour()
        +  {
        +    return graphColour;
        +  }
        +
        +  /**
        +   * Sets the value of the graphColour property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link Integer }
        +   * 
        +   */
        +  public void setGraphColour(Integer value)
        +  {
        +    this.graphColour = value;
        +  }
        +
        +  /**
        +   * Gets the value of the graphGroup property.
        +   * 
        +   * @return possible object is {@link Integer }
        +   * 
        +   */
        +  public Integer getGraphGroup()
        +  {
        +    return graphGroup;
        +  }
        +
        +  /**
        +   * Sets the value of the graphGroup property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link Integer }
        +   * 
        +   */
        +  public void setGraphGroup(Integer value)
        +  {
        +    this.graphGroup = value;
        +  }
        +
        +  /**
        +   * Gets the value of the graphHeight property.
        +   * 
        +   * @return possible object is {@link Integer }
        +   * 
        +   */
        +  public Integer getGraphHeight()
        +  {
        +    return graphHeight;
        +  }
        +
        +  /**
        +   * Sets the value of the graphHeight property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link Integer }
        +   * 
        +   */
        +  public void setGraphHeight(Integer value)
        +  {
        +    this.graphHeight = value;
        +  }
        +
        +  /**
        +   * Gets the value of the id property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getId()
        +  {
        +    return id;
        +  }
        +
        +  /**
        +   * Sets the value of the id property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setId(String value)
        +  {
        +    this.id = value;
        +  }
        +
        +  /**
        +   * Gets the value of the scoreOnly property.
        +   * 
        +   * @return possible object is {@link Boolean }
        +   * 
        +   */
        +  public boolean isScoreOnly()
        +  {
        +    if (scoreOnly == null)
        +    {
        +      return false;
        +    }
        +    else
        +    {
        +      return scoreOnly;
        +    }
        +  }
        +
        +  /**
        +   * Sets the value of the scoreOnly property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link Boolean }
        +   * 
        +   */
        +  public void setScoreOnly(Boolean value)
        +  {
        +    this.scoreOnly = value;
        +  }
        +
        +  /**
        +   * Gets the value of the score property.
        +   * 
        +   * @return possible object is {@link Double }
        +   * 
        +   */
        +  public Double getScore()
        +  {
        +    return score;
        +  }
        +
        +  /**
        +   * Sets the value of the score property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link Double }
        +   * 
        +   */
        +  public void setScore(Double value)
        +  {
        +    this.score = value;
        +  }
        +
        +  /**
        +   * Gets the value of the visible property.
        +   * 
        +   * @return possible object is {@link Boolean }
        +   * 
        +   */
        +  public Boolean isVisible()
        +  {
        +    return visible;
        +  }
        +
        +  /**
        +   * Sets the value of the visible property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link Boolean }
        +   * 
        +   */
        +  public void setVisible(Boolean value)
        +  {
        +    this.visible = value;
        +  }
        +
        +  /**
        +   * Gets the value of the centreColLabels property.
        +   * 
        +   * @return possible object is {@link Boolean }
        +   * 
        +   */
        +  public Boolean isCentreColLabels()
        +  {
        +    return centreColLabels;
        +  }
        +
        +  /**
        +   * Sets the value of the centreColLabels property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link Boolean }
        +   * 
        +   */
        +  public void setCentreColLabels(Boolean value)
        +  {
        +    this.centreColLabels = value;
        +  }
        +
        +  /**
        +   * Gets the value of the scaleColLabels property.
        +   * 
        +   * @return possible object is {@link Boolean }
        +   * 
        +   */
        +  public Boolean isScaleColLabels()
        +  {
        +    return scaleColLabels;
        +  }
        +
        +  /**
        +   * Sets the value of the scaleColLabels property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link Boolean }
        +   * 
        +   */
        +  public void setScaleColLabels(Boolean value)
        +  {
        +    this.scaleColLabels = value;
        +  }
        +
        +  /**
        +   * Gets the value of the showAllColLabels property.
        +   * 
        +   * @return possible object is {@link Boolean }
        +   * 
        +   */
        +  public Boolean isShowAllColLabels()
        +  {
        +    return showAllColLabels;
        +  }
        +
        +  /**
        +   * Sets the value of the showAllColLabels property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link Boolean }
        +   * 
        +   */
        +  public void setShowAllColLabels(Boolean value)
        +  {
        +    this.showAllColLabels = value;
        +  }
        +
        +  /**
        +   * Gets the value of the autoCalculated property.
        +   * 
        +   * @return possible object is {@link Boolean }
        +   * 
        +   */
        +  public boolean isAutoCalculated()
        +  {
        +    if (autoCalculated == null)
        +    {
        +      return false;
        +    }
        +    else
        +    {
        +      return autoCalculated;
        +    }
        +  }
        +
        +  /**
        +   * Sets the value of the autoCalculated property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link Boolean }
        +   * 
        +   */
        +  public void setAutoCalculated(Boolean value)
        +  {
        +    this.autoCalculated = value;
        +  }
        +
        +  /**
        +   * Gets the value of the belowAlignment property.
        +   * 
        +   * @return possible object is {@link Boolean }
        +   * 
        +   */
        +  public boolean isBelowAlignment()
        +  {
        +    if (belowAlignment == null)
        +    {
        +      return true;
        +    }
        +    else
        +    {
        +      return belowAlignment;
        +    }
        +  }
        +
        +  /**
        +   * Sets the value of the belowAlignment property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link Boolean }
        +   * 
        +   */
        +  public void setBelowAlignment(Boolean value)
        +  {
        +    this.belowAlignment = value;
        +  }
        +
        +  /**
        +   * Gets the value of the calcId property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getCalcId()
        +  {
        +    return calcId;
        +  }
        +
        +  /**
        +   * Sets the value of the calcId property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setCalcId(String value)
        +  {
        +    this.calcId = value;
        +  }
        +
        +  /**
        +   * <p>Java class for anonymous complex type.
        +   * 
        +   * <p>The following schema fragment specifies the expected content
        +   * contained within this class.
        +   * 
        +   * <pre> &lt;complexType&gt; &lt;complexContent&gt;
        +   * &lt;restriction
        +   * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; &lt;attribute
        +   * name="name" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        +   * &lt;attribute name="value"
        +   * type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        +   * &lt;/restriction&gt; &lt;/complexContent&gt;
        +   * &lt;/complexType&gt; </pre>
        +   * 
        +   * 
        +   */
        +  @XmlAccessorType(XmlAccessType.FIELD)
        +  @XmlType(name = "")
        +  public static class Property
        +  {
        +
        +    @XmlAttribute(name = "name")
        +    protected String name;
        +
        +    @XmlAttribute(name = "value")
        +    protected String value;
        +
        +    /**
        +     * Gets the value of the name property.
        +     * 
        +     * @return possible object is {@link String }
        +     * 
        +     */
        +    public String getName()
        +    {
        +      return name;
        +    }
        +
        +    /**
        +     * Sets the value of the name property.
              * 
              * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setLabel(String value) {
        -        this.label = value;
        -    }
        -
        -    /**
        -     * Gets the value of the description property.
        +     *          allowed object is {@link String }
              * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
              */
        -    public String getDescription() {
        -        return description;
        +    public void setName(String value)
        +    {
        +      this.name = value;
             }
         
             /**
        -     * Sets the value of the description property.
        +     * Gets the value of the value property.
              * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setDescription(String value) {
        -        this.description = value;
        -    }
        -
        -    /**
        -     * Gets the value of the thresholdLine property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link Annotation.ThresholdLine }
        -     *     
        -     */
        -    public Annotation.ThresholdLine getThresholdLine() {
        -        return thresholdLine;
        -    }
        -
        -    /**
        -     * Sets the value of the thresholdLine property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link Annotation.ThresholdLine }
        -     *     
        -     */
        -    public void setThresholdLine(Annotation.ThresholdLine value) {
        -        this.thresholdLine = value;
        -    }
        -
        -    /**
        -     * Gets the value of the property property.
        -     * 
        -     * <p>
        -     * This accessor method returns a reference to the live list,
        -     * not a snapshot. Therefore any modification you make to the
        -     * returned list will be present inside the JAXB object.
        -     * This is why there is not a <CODE>set</CODE> method for the property property.
        -     * 
        -     * <p>
        -     * For example, to add a new item, do as follows:
        -     * <pre>
        -     *    getProperty().add(newItem);
        -     * </pre>
        -     * 
        -     * 
        -     * <p>
        -     * Objects of the following type(s) are allowed in the list
        -     * {@link Annotation.Property }
        -     * 
        -     * 
        -     */
        -    public List getProperty() {
        -        if (property == null) {
        -            property = new ArrayList();
        -        }
        -        return this.property;
        -    }
        -
        -    /**
        -     * Gets the value of the graph property.
        -     * 
        -     */
        -    public boolean isGraph() {
        -        return graph;
        -    }
        -
        -    /**
        -     * Sets the value of the graph property.
        -     * 
        -     */
        -    public void setGraph(boolean value) {
        -        this.graph = value;
        -    }
        -
        -    /**
        -     * Gets the value of the graphType property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link Integer }
        -     *     
        -     */
        -    public Integer getGraphType() {
        -        return graphType;
        -    }
        -
        -    /**
        -     * Sets the value of the graphType property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link Integer }
        -     *     
        -     */
        -    public void setGraphType(Integer value) {
        -        this.graphType = value;
        -    }
        -
        -    /**
        -     * Gets the value of the sequenceRef property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getSequenceRef() {
        -        return sequenceRef;
        -    }
        -
        -    /**
        -     * Sets the value of the sequenceRef property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setSequenceRef(String value) {
        -        this.sequenceRef = value;
        -    }
        -
        -    /**
        -     * Gets the value of the groupRef property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getGroupRef() {
        -        return groupRef;
        -    }
        -
        -    /**
        -     * Sets the value of the groupRef property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setGroupRef(String value) {
        -        this.groupRef = value;
        -    }
        -
        -    /**
        -     * Gets the value of the graphColour property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link Integer }
        -     *     
        -     */
        -    public Integer getGraphColour() {
        -        return graphColour;
        -    }
        -
        -    /**
        -     * Sets the value of the graphColour property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link Integer }
        -     *     
        -     */
        -    public void setGraphColour(Integer value) {
        -        this.graphColour = value;
        -    }
        -
        -    /**
        -     * Gets the value of the graphGroup property.
        +     * @return possible object is {@link String }
              * 
        -     * @return
        -     *     possible object is
        -     *     {@link Integer }
        -     *     
              */
        -    public Integer getGraphGroup() {
        -        return graphGroup;
        +    public String getValue()
        +    {
        +      return value;
             }
         
             /**
        -     * Sets the value of the graphGroup property.
        +     * Sets the value of the value property.
              * 
              * @param value
        -     *     allowed object is
        -     *     {@link Integer }
        -     *     
        -     */
        -    public void setGraphGroup(Integer value) {
        -        this.graphGroup = value;
        -    }
        -
        -    /**
        -     * Gets the value of the graphHeight property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link Integer }
        -     *     
        -     */
        -    public Integer getGraphHeight() {
        -        return graphHeight;
        -    }
        -
        -    /**
        -     * Sets the value of the graphHeight property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link Integer }
        -     *     
        -     */
        -    public void setGraphHeight(Integer value) {
        -        this.graphHeight = value;
        -    }
        -
        -    /**
        -     * Gets the value of the id property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getId() {
        -        return id;
        -    }
        -
        -    /**
        -     * Sets the value of the id property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setId(String value) {
        -        this.id = value;
        -    }
        -
        -    /**
        -     * Gets the value of the scoreOnly property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link Boolean }
        -     *     
        -     */
        -    public boolean isScoreOnly() {
        -        if (scoreOnly == null) {
        -            return false;
        -        } else {
        -            return scoreOnly;
        -        }
        -    }
        -
        -    /**
        -     * Sets the value of the scoreOnly property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link Boolean }
        -     *     
        -     */
        -    public void setScoreOnly(Boolean value) {
        -        this.scoreOnly = value;
        -    }
        -
        -    /**
        -     * Gets the value of the score property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link Double }
        -     *     
        -     */
        -    public Double getScore() {
        -        return score;
        -    }
        -
        -    /**
        -     * Sets the value of the score property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link Double }
        -     *     
        -     */
        -    public void setScore(Double value) {
        -        this.score = value;
        -    }
        -
        -    /**
        -     * Gets the value of the visible property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link Boolean }
        -     *     
        -     */
        -    public Boolean isVisible() {
        -        return visible;
        -    }
        +     *          allowed object is {@link String }
        +     * 
        +     */
        +    public void setValue(String value)
        +    {
        +      this.value = value;
        +    }
        +
        +  }
        +
        +  /**
        +   * <p>Java class for anonymous complex type.
        +   * 
        +   * <p>The following schema fragment specifies the expected content
        +   * contained within this class.
        +   * 
        +   * <pre> &lt;complexType&gt; &lt;complexContent&gt;
        +   * &lt;restriction
        +   * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; &lt;attribute
        +   * name="label" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        +   * &lt;attribute name="value"
        +   * type="{http://www.w3.org/2001/XMLSchema}float" /&gt; &lt;attribute
        +   * name="colour" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        +   * &lt;/restriction&gt; &lt;/complexContent&gt;
        +   * &lt;/complexType&gt; </pre>
        +   * 
        +   * 
        +   */
        +  @XmlAccessorType(XmlAccessType.FIELD)
        +  @XmlType(name = "")
        +  public static class ThresholdLine
        +  {
        +
        +    @XmlAttribute(name = "label")
        +    protected String label;
         
        -    /**
        -     * Sets the value of the visible property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link Boolean }
        -     *     
        -     */
        -    public void setVisible(Boolean value) {
        -        this.visible = value;
        -    }
        +    @XmlAttribute(name = "value")
        +    protected Float value;
         
        -    /**
        -     * Gets the value of the centreColLabels property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link Boolean }
        -     *     
        -     */
        -    public Boolean isCentreColLabels() {
        -        return centreColLabels;
        -    }
        +    @XmlAttribute(name = "colour")
        +    protected Integer colour;
         
             /**
        -     * Sets the value of the centreColLabels property.
        +     * Gets the value of the label property.
              * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link Boolean }
        -     *     
        -     */
        -    public void setCentreColLabels(Boolean value) {
        -        this.centreColLabels = value;
        -    }
        -
        -    /**
        -     * Gets the value of the scaleColLabels property.
        +     * @return possible object is {@link String }
              * 
        -     * @return
        -     *     possible object is
        -     *     {@link Boolean }
        -     *     
              */
        -    public Boolean isScaleColLabels() {
        -        return scaleColLabels;
        +    public String getLabel()
        +    {
        +      return label;
             }
         
             /**
        -     * Sets the value of the scaleColLabels property.
        +     * Sets the value of the label property.
              * 
              * @param value
        -     *     allowed object is
        -     *     {@link Boolean }
        -     *     
        -     */
        -    public void setScaleColLabels(Boolean value) {
        -        this.scaleColLabels = value;
        -    }
        -
        -    /**
        -     * Gets the value of the showAllColLabels property.
        +     *          allowed object is {@link String }
              * 
        -     * @return
        -     *     possible object is
        -     *     {@link Boolean }
        -     *     
              */
        -    public Boolean isShowAllColLabels() {
        -        return showAllColLabels;
        +    public void setLabel(String value)
        +    {
        +      this.label = value;
             }
         
             /**
        -     * Sets the value of the showAllColLabels property.
        +     * Gets the value of the value property.
              * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link Boolean }
        -     *     
        -     */
        -    public void setShowAllColLabels(Boolean value) {
        -        this.showAllColLabels = value;
        -    }
        -
        -    /**
        -     * Gets the value of the autoCalculated property.
        +     * @return possible object is {@link Float }
              * 
        -     * @return
        -     *     possible object is
        -     *     {@link Boolean }
        -     *     
              */
        -    public boolean isAutoCalculated() {
        -        if (autoCalculated == null) {
        -            return false;
        -        } else {
        -            return autoCalculated;
        -        }
        +    public Float getValue()
        +    {
        +      return value;
             }
         
             /**
        -     * Sets the value of the autoCalculated property.
        +     * Sets the value of the value property.
              * 
              * @param value
        -     *     allowed object is
        -     *     {@link Boolean }
        -     *     
        -     */
        -    public void setAutoCalculated(Boolean value) {
        -        this.autoCalculated = value;
        -    }
        -
        -    /**
        -     * Gets the value of the belowAlignment property.
        +     *          allowed object is {@link Float }
              * 
        -     * @return
        -     *     possible object is
        -     *     {@link Boolean }
        -     *     
              */
        -    public boolean isBelowAlignment() {
        -        if (belowAlignment == null) {
        -            return true;
        -        } else {
        -            return belowAlignment;
        -        }
        +    public void setValue(Float value)
        +    {
        +      this.value = value;
             }
         
             /**
        -     * Sets the value of the belowAlignment property.
        +     * Gets the value of the colour property.
              * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link Boolean }
        -     *     
        -     */
        -    public void setBelowAlignment(Boolean value) {
        -        this.belowAlignment = value;
        -    }
        -
        -    /**
        -     * Gets the value of the calcId property.
        +     * @return possible object is {@link Integer }
              * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
              */
        -    public String getCalcId() {
        -        return calcId;
        +    public Integer getColour()
        +    {
        +      return colour;
             }
         
             /**
        -     * Sets the value of the calcId property.
        +     * Sets the value of the colour property.
              * 
              * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setCalcId(String value) {
        -        this.calcId = value;
        -    }
        -
        -
        -    /**
        -     * <p>Java class for anonymous complex type.
        -     * 
        -     * <p>The following schema fragment specifies the expected content contained within this class.
        -     * 
        -     * <pre>
        -     * &lt;complexType&gt;
        -     *   &lt;complexContent&gt;
        -     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        -     *       &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -     *       &lt;attribute name="value" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -     *     &lt;/restriction&gt;
        -     *   &lt;/complexContent&gt;
        -     * &lt;/complexType&gt;
        -     * </pre>
        -     * 
        +     *          allowed object is {@link Integer }
              * 
              */
        -    @XmlAccessorType(XmlAccessType.FIELD)
        -    @XmlType(name = "")
        -    public static class Property {
        -
        -        @XmlAttribute(name = "name")
        -        protected String name;
        -        @XmlAttribute(name = "value")
        -        protected String value;
        -
        -        /**
        -         * Gets the value of the name property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link String }
        -         *     
        -         */
        -        public String getName() {
        -            return name;
        -        }
        -
        -        /**
        -         * Sets the value of the name property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link String }
        -         *     
        -         */
        -        public void setName(String value) {
        -            this.name = value;
        -        }
        -
        -        /**
        -         * Gets the value of the value property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link String }
        -         *     
        -         */
        -        public String getValue() {
        -            return value;
        -        }
        -
        -        /**
        -         * Sets the value of the value property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link String }
        -         *     
        -         */
        -        public void setValue(String value) {
        -            this.value = value;
        -        }
        -
        +    public void setColour(Integer value)
        +    {
        +      this.colour = value;
             }
         
        -
        -    /**
        -     * <p>Java class for anonymous complex type.
        -     * 
        -     * <p>The following schema fragment specifies the expected content contained within this class.
        -     * 
        -     * <pre>
        -     * &lt;complexType&gt;
        -     *   &lt;complexContent&gt;
        -     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        -     *       &lt;attribute name="label" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -     *       &lt;attribute name="value" type="{http://www.w3.org/2001/XMLSchema}float" /&gt;
        -     *       &lt;attribute name="colour" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -     *     &lt;/restriction&gt;
        -     *   &lt;/complexContent&gt;
        -     * &lt;/complexType&gt;
        -     * </pre>
        -     * 
        -     * 
        -     */
        -    @XmlAccessorType(XmlAccessType.FIELD)
        -    @XmlType(name = "")
        -    public static class ThresholdLine {
        -
        -        @XmlAttribute(name = "label")
        -        protected String label;
        -        @XmlAttribute(name = "value")
        -        protected Float value;
        -        @XmlAttribute(name = "colour")
        -        protected Integer colour;
        -
        -        /**
        -         * Gets the value of the label property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link String }
        -         *     
        -         */
        -        public String getLabel() {
        -            return label;
        -        }
        -
        -        /**
        -         * Sets the value of the label property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link String }
        -         *     
        -         */
        -        public void setLabel(String value) {
        -            this.label = value;
        -        }
        -
        -        /**
        -         * Gets the value of the value property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Float }
        -         *     
        -         */
        -        public Float getValue() {
        -            return value;
        -        }
        -
        -        /**
        -         * Sets the value of the value property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Float }
        -         *     
        -         */
        -        public void setValue(Float value) {
        -            this.value = value;
        -        }
        -
        -        /**
        -         * Gets the value of the colour property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public Integer getColour() {
        -            return colour;
        -        }
        -
        -        /**
        -         * Sets the value of the colour property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public void setColour(Integer value) {
        -            this.colour = value;
        -        }
        -
        -    }
        +  }
         
         }
        diff --git a/src/jalview/xml/binding/jalview/AnnotationColourScheme.java b/src/jalview/xml/binding/jalview/AnnotationColourScheme.java
        index 1b31b22..e697228 100644
        --- a/src/jalview/xml/binding/jalview/AnnotationColourScheme.java
        +++ b/src/jalview/xml/binding/jalview/AnnotationColourScheme.java
        @@ -5,7 +5,6 @@
         // Generated on: 2021.08.30 at 11:05:22 AM BST 
         //
         
        -
         package jalview.xml.binding.jalview;
         
         import javax.xml.bind.annotation.XmlAccessType;
        @@ -13,242 +12,243 @@ import javax.xml.bind.annotation.XmlAccessorType;
         import javax.xml.bind.annotation.XmlAttribute;
         import javax.xml.bind.annotation.XmlType;
         
        -
         /**
          * <p>Java class for AnnotationColourScheme complex type.
          * 
        - * <p>The following schema fragment specifies the expected content contained within this class.
        + * <p>The following schema fragment specifies the expected content
        + * contained within this class.
          * 
        - * <pre>
        - * &lt;complexType name="AnnotationColourScheme"&gt;
        - *   &lt;complexContent&gt;
        - *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        - *       &lt;attribute name="aboveThreshold" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *       &lt;attribute name="annotation" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *       &lt;attribute name="minColour" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *       &lt;attribute name="maxColour" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *       &lt;attribute name="colourScheme" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *       &lt;attribute name="threshold" type="{http://www.w3.org/2001/XMLSchema}float" /&gt;
        - *       &lt;attribute name="perSequence" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *       &lt;attribute name="predefinedColours" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *     &lt;/restriction&gt;
        - *   &lt;/complexContent&gt;
        - * &lt;/complexType&gt;
        - * </pre>
        + * <pre> &lt;complexType name="AnnotationColourScheme"&gt;
        + * &lt;complexContent&gt; &lt;restriction
        + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; &lt;attribute
        + * name="aboveThreshold" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        + * &lt;attribute name="annotation"
        + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute
        + * name="minColour" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        + * &lt;attribute name="maxColour"
        + * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        + * name="colourScheme" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        + * &lt;attribute name="threshold"
        + * type="{http://www.w3.org/2001/XMLSchema}float" /&gt; &lt;attribute
        + * name="perSequence" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        + * &lt;attribute name="predefinedColours"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        + * &lt;/restriction&gt; &lt;/complexContent&gt;
        + * &lt;/complexType&gt; </pre>
          * 
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
         @XmlType(name = "AnnotationColourScheme", namespace = "www.jalview.org")
        -public class AnnotationColourScheme {
        -
        -    @XmlAttribute(name = "aboveThreshold")
        -    protected Integer aboveThreshold;
        -    @XmlAttribute(name = "annotation")
        -    protected String annotation;
        -    @XmlAttribute(name = "minColour")
        -    protected Integer minColour;
        -    @XmlAttribute(name = "maxColour")
        -    protected Integer maxColour;
        -    @XmlAttribute(name = "colourScheme")
        -    protected String colourScheme;
        -    @XmlAttribute(name = "threshold")
        -    protected Float threshold;
        -    @XmlAttribute(name = "perSequence")
        -    protected Boolean perSequence;
        -    @XmlAttribute(name = "predefinedColours")
        -    protected Boolean predefinedColours;
        -
        -    /**
        -     * Gets the value of the aboveThreshold property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link Integer }
        -     *     
        -     */
        -    public Integer getAboveThreshold() {
        -        return aboveThreshold;
        -    }
        -
        -    /**
        -     * Sets the value of the aboveThreshold property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link Integer }
        -     *     
        -     */
        -    public void setAboveThreshold(Integer value) {
        -        this.aboveThreshold = value;
        -    }
        -
        -    /**
        -     * Gets the value of the annotation property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getAnnotation() {
        -        return annotation;
        -    }
        -
        -    /**
        -     * Sets the value of the annotation property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setAnnotation(String value) {
        -        this.annotation = value;
        -    }
        -
        -    /**
        -     * Gets the value of the minColour property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link Integer }
        -     *     
        -     */
        -    public Integer getMinColour() {
        -        return minColour;
        -    }
        -
        -    /**
        -     * Sets the value of the minColour property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link Integer }
        -     *     
        -     */
        -    public void setMinColour(Integer value) {
        -        this.minColour = value;
        -    }
        -
        -    /**
        -     * Gets the value of the maxColour property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link Integer }
        -     *     
        -     */
        -    public Integer getMaxColour() {
        -        return maxColour;
        -    }
        -
        -    /**
        -     * Sets the value of the maxColour property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link Integer }
        -     *     
        -     */
        -    public void setMaxColour(Integer value) {
        -        this.maxColour = value;
        -    }
        -
        -    /**
        -     * Gets the value of the colourScheme property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getColourScheme() {
        -        return colourScheme;
        -    }
        -
        -    /**
        -     * Sets the value of the colourScheme property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setColourScheme(String value) {
        -        this.colourScheme = value;
        -    }
        -
        -    /**
        -     * Gets the value of the threshold property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link Float }
        -     *     
        -     */
        -    public Float getThreshold() {
        -        return threshold;
        -    }
        -
        -    /**
        -     * Sets the value of the threshold property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link Float }
        -     *     
        -     */
        -    public void setThreshold(Float value) {
        -        this.threshold = value;
        -    }
        -
        -    /**
        -     * Gets the value of the perSequence property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link Boolean }
        -     *     
        -     */
        -    public Boolean isPerSequence() {
        -        return perSequence;
        -    }
        -
        -    /**
        -     * Sets the value of the perSequence property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link Boolean }
        -     *     
        -     */
        -    public void setPerSequence(Boolean value) {
        -        this.perSequence = value;
        -    }
        -
        -    /**
        -     * Gets the value of the predefinedColours property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link Boolean }
        -     *     
        -     */
        -    public Boolean isPredefinedColours() {
        -        return predefinedColours;
        -    }
        -
        -    /**
        -     * Sets the value of the predefinedColours property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link Boolean }
        -     *     
        -     */
        -    public void setPredefinedColours(Boolean value) {
        -        this.predefinedColours = value;
        -    }
        +public class AnnotationColourScheme
        +{
        +
        +  @XmlAttribute(name = "aboveThreshold")
        +  protected Integer aboveThreshold;
        +
        +  @XmlAttribute(name = "annotation")
        +  protected String annotation;
        +
        +  @XmlAttribute(name = "minColour")
        +  protected Integer minColour;
        +
        +  @XmlAttribute(name = "maxColour")
        +  protected Integer maxColour;
        +
        +  @XmlAttribute(name = "colourScheme")
        +  protected String colourScheme;
        +
        +  @XmlAttribute(name = "threshold")
        +  protected Float threshold;
        +
        +  @XmlAttribute(name = "perSequence")
        +  protected Boolean perSequence;
        +
        +  @XmlAttribute(name = "predefinedColours")
        +  protected Boolean predefinedColours;
        +
        +  /**
        +   * Gets the value of the aboveThreshold property.
        +   * 
        +   * @return possible object is {@link Integer }
        +   * 
        +   */
        +  public Integer getAboveThreshold()
        +  {
        +    return aboveThreshold;
        +  }
        +
        +  /**
        +   * Sets the value of the aboveThreshold property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link Integer }
        +   * 
        +   */
        +  public void setAboveThreshold(Integer value)
        +  {
        +    this.aboveThreshold = value;
        +  }
        +
        +  /**
        +   * Gets the value of the annotation property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getAnnotation()
        +  {
        +    return annotation;
        +  }
        +
        +  /**
        +   * Sets the value of the annotation property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setAnnotation(String value)
        +  {
        +    this.annotation = value;
        +  }
        +
        +  /**
        +   * Gets the value of the minColour property.
        +   * 
        +   * @return possible object is {@link Integer }
        +   * 
        +   */
        +  public Integer getMinColour()
        +  {
        +    return minColour;
        +  }
        +
        +  /**
        +   * Sets the value of the minColour property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link Integer }
        +   * 
        +   */
        +  public void setMinColour(Integer value)
        +  {
        +    this.minColour = value;
        +  }
        +
        +  /**
        +   * Gets the value of the maxColour property.
        +   * 
        +   * @return possible object is {@link Integer }
        +   * 
        +   */
        +  public Integer getMaxColour()
        +  {
        +    return maxColour;
        +  }
        +
        +  /**
        +   * Sets the value of the maxColour property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link Integer }
        +   * 
        +   */
        +  public void setMaxColour(Integer value)
        +  {
        +    this.maxColour = value;
        +  }
        +
        +  /**
        +   * Gets the value of the colourScheme property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getColourScheme()
        +  {
        +    return colourScheme;
        +  }
        +
        +  /**
        +   * Sets the value of the colourScheme property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setColourScheme(String value)
        +  {
        +    this.colourScheme = value;
        +  }
        +
        +  /**
        +   * Gets the value of the threshold property.
        +   * 
        +   * @return possible object is {@link Float }
        +   * 
        +   */
        +  public Float getThreshold()
        +  {
        +    return threshold;
        +  }
        +
        +  /**
        +   * Sets the value of the threshold property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link Float }
        +   * 
        +   */
        +  public void setThreshold(Float value)
        +  {
        +    this.threshold = value;
        +  }
        +
        +  /**
        +   * Gets the value of the perSequence property.
        +   * 
        +   * @return possible object is {@link Boolean }
        +   * 
        +   */
        +  public Boolean isPerSequence()
        +  {
        +    return perSequence;
        +  }
        +
        +  /**
        +   * Sets the value of the perSequence property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link Boolean }
        +   * 
        +   */
        +  public void setPerSequence(Boolean value)
        +  {
        +    this.perSequence = value;
        +  }
        +
        +  /**
        +   * Gets the value of the predefinedColours property.
        +   * 
        +   * @return possible object is {@link Boolean }
        +   * 
        +   */
        +  public Boolean isPredefinedColours()
        +  {
        +    return predefinedColours;
        +  }
        +
        +  /**
        +   * Sets the value of the predefinedColours property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link Boolean }
        +   * 
        +   */
        +  public void setPredefinedColours(Boolean value)
        +  {
        +    this.predefinedColours = value;
        +  }
         
         }
        diff --git a/src/jalview/xml/binding/jalview/AnnotationElement.java b/src/jalview/xml/binding/jalview/AnnotationElement.java
        index d141272..ec1216b 100644
        --- a/src/jalview/xml/binding/jalview/AnnotationElement.java
        +++ b/src/jalview/xml/binding/jalview/AnnotationElement.java
        @@ -5,7 +5,6 @@
         // Generated on: 2021.08.30 at 11:05:22 AM BST 
         //
         
        -
         package jalview.xml.binding.jalview;
         
         import javax.xml.bind.annotation.XmlAccessType;
        @@ -14,190 +13,186 @@ import javax.xml.bind.annotation.XmlAttribute;
         import javax.xml.bind.annotation.XmlRootElement;
         import javax.xml.bind.annotation.XmlType;
         
        -
         /**
          * <p>Java class for anonymous complex type.
          * 
        - * <p>The following schema fragment specifies the expected content contained within this class.
        + * <p>The following schema fragment specifies the expected content
        + * contained within this class.
          * 
        - * <pre>
        - * &lt;complexType&gt;
        - *   &lt;complexContent&gt;
        - *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        - *       &lt;sequence&gt;
        - *         &lt;element name="displayCharacter" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
        - *         &lt;element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
        - *         &lt;element name="secondaryStructure" minOccurs="0"&gt;
        - *           &lt;simpleType&gt;
        - *             &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"&gt;
        - *               &lt;length value="1"/&gt;
        - *             &lt;/restriction&gt;
        - *           &lt;/simpleType&gt;
        - *         &lt;/element&gt;
        - *         &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}float" minOccurs="0"/&gt;
        - *       &lt;/sequence&gt;
        - *       &lt;attribute name="position" use="required" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *       &lt;attribute name="colour" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *     &lt;/restriction&gt;
        - *   &lt;/complexContent&gt;
        - * &lt;/complexType&gt;
        - * </pre>
        + * <pre> &lt;complexType&gt; &lt;complexContent&gt;
        + * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        + * &lt;sequence&gt; &lt;element name="displayCharacter"
        + * type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
        + * &lt;element name="description"
        + * type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
        + * &lt;element name="secondaryStructure" minOccurs="0"&gt;
        + * &lt;simpleType&gt; &lt;restriction
        + * base="{http://www.w3.org/2001/XMLSchema}string"&gt; &lt;length
        + * value="1"/&gt; &lt;/restriction&gt; &lt;/simpleType&gt;
        + * &lt;/element&gt; &lt;element name="value"
        + * type="{http://www.w3.org/2001/XMLSchema}float" minOccurs="0"/&gt;
        + * &lt;/sequence&gt; &lt;attribute name="position" use="required"
        + * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        + * name="colour" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        + * &lt;/restriction&gt; &lt;/complexContent&gt;
        + * &lt;/complexType&gt; </pre>
          * 
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "", propOrder = {
        -    "displayCharacter",
        -    "description",
        -    "secondaryStructure",
        -    "value"
        -})
        +@XmlType(
        +  name = "",
        +  propOrder =
        +  { "displayCharacter", "description", "secondaryStructure", "value" })
         @XmlRootElement(name = "annotationElement")
        -public class AnnotationElement {
        -
        -    protected String displayCharacter;
        -    protected String description;
        -    protected String secondaryStructure;
        -    protected Float value;
        -    @XmlAttribute(name = "position", required = true)
        -    protected int position;
        -    @XmlAttribute(name = "colour")
        -    protected Integer colour;
        -
        -    /**
        -     * Gets the value of the displayCharacter property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getDisplayCharacter() {
        -        return displayCharacter;
        -    }
        -
        -    /**
        -     * Sets the value of the displayCharacter property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setDisplayCharacter(String value) {
        -        this.displayCharacter = value;
        -    }
        -
        -    /**
        -     * Gets the value of the description property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getDescription() {
        -        return description;
        -    }
        -
        -    /**
        -     * Sets the value of the description property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setDescription(String value) {
        -        this.description = value;
        -    }
        -
        -    /**
        -     * Gets the value of the secondaryStructure property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getSecondaryStructure() {
        -        return secondaryStructure;
        -    }
        -
        -    /**
        -     * Sets the value of the secondaryStructure property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setSecondaryStructure(String value) {
        -        this.secondaryStructure = value;
        -    }
        -
        -    /**
        -     * Gets the value of the value property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link Float }
        -     *     
        -     */
        -    public Float getValue() {
        -        return value;
        -    }
        -
        -    /**
        -     * Sets the value of the value property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link Float }
        -     *     
        -     */
        -    public void setValue(Float value) {
        -        this.value = value;
        -    }
        -
        -    /**
        -     * Gets the value of the position property.
        -     * 
        -     */
        -    public int getPosition() {
        -        return position;
        -    }
        -
        -    /**
        -     * Sets the value of the position property.
        -     * 
        -     */
        -    public void setPosition(int value) {
        -        this.position = value;
        -    }
        -
        -    /**
        -     * Gets the value of the colour property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link Integer }
        -     *     
        -     */
        -    public Integer getColour() {
        -        return colour;
        -    }
        -
        -    /**
        -     * Sets the value of the colour property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link Integer }
        -     *     
        -     */
        -    public void setColour(Integer value) {
        -        this.colour = value;
        -    }
        +public class AnnotationElement
        +{
        +
        +  protected String displayCharacter;
        +
        +  protected String description;
        +
        +  protected String secondaryStructure;
        +
        +  protected Float value;
        +
        +  @XmlAttribute(name = "position", required = true)
        +  protected int position;
        +
        +  @XmlAttribute(name = "colour")
        +  protected Integer colour;
        +
        +  /**
        +   * Gets the value of the displayCharacter property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getDisplayCharacter()
        +  {
        +    return displayCharacter;
        +  }
        +
        +  /**
        +   * Sets the value of the displayCharacter property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setDisplayCharacter(String value)
        +  {
        +    this.displayCharacter = value;
        +  }
        +
        +  /**
        +   * Gets the value of the description property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getDescription()
        +  {
        +    return description;
        +  }
        +
        +  /**
        +   * Sets the value of the description property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setDescription(String value)
        +  {
        +    this.description = value;
        +  }
        +
        +  /**
        +   * Gets the value of the secondaryStructure property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getSecondaryStructure()
        +  {
        +    return secondaryStructure;
        +  }
        +
        +  /**
        +   * Sets the value of the secondaryStructure property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setSecondaryStructure(String value)
        +  {
        +    this.secondaryStructure = value;
        +  }
        +
        +  /**
        +   * Gets the value of the value property.
        +   * 
        +   * @return possible object is {@link Float }
        +   * 
        +   */
        +  public Float getValue()
        +  {
        +    return value;
        +  }
        +
        +  /**
        +   * Sets the value of the value property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link Float }
        +   * 
        +   */
        +  public void setValue(Float value)
        +  {
        +    this.value = value;
        +  }
        +
        +  /**
        +   * Gets the value of the position property.
        +   * 
        +   */
        +  public int getPosition()
        +  {
        +    return position;
        +  }
        +
        +  /**
        +   * Sets the value of the position property.
        +   * 
        +   */
        +  public void setPosition(int value)
        +  {
        +    this.position = value;
        +  }
        +
        +  /**
        +   * Gets the value of the colour property.
        +   * 
        +   * @return possible object is {@link Integer }
        +   * 
        +   */
        +  public Integer getColour()
        +  {
        +    return colour;
        +  }
        +
        +  /**
        +   * Sets the value of the colour property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link Integer }
        +   * 
        +   */
        +  public void setColour(Integer value)
        +  {
        +    this.colour = value;
        +  }
         
         }
        diff --git a/src/jalview/xml/binding/jalview/DoubleMatrix.java b/src/jalview/xml/binding/jalview/DoubleMatrix.java
        index bff4959..7ce2892 100644
        --- a/src/jalview/xml/binding/jalview/DoubleMatrix.java
        +++ b/src/jalview/xml/binding/jalview/DoubleMatrix.java
        @@ -5,7 +5,6 @@
         // Generated on: 2021.08.30 at 11:05:22 AM BST 
         //
         
        -
         package jalview.xml.binding.jalview;
         
         import java.util.ArrayList;
        @@ -16,171 +15,167 @@ import javax.xml.bind.annotation.XmlAttribute;
         import javax.xml.bind.annotation.XmlElement;
         import javax.xml.bind.annotation.XmlType;
         
        -
         /**
          * <p>Java class for DoubleMatrix complex type.
          * 
        - * <p>The following schema fragment specifies the expected content contained within this class.
        + * <p>The following schema fragment specifies the expected content
        + * contained within this class.
          * 
        - * <pre>
        - * &lt;complexType name="DoubleMatrix"&gt;
        - *   &lt;complexContent&gt;
        - *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        - *       &lt;sequence&gt;
        - *         &lt;element name="row" type="{www.jalview.org}DoubleVector" maxOccurs="unbounded" minOccurs="0"/&gt;
        - *         &lt;element name="D" type="{www.jalview.org}DoubleVector" minOccurs="0"/&gt;
        - *         &lt;element name="E" type="{www.jalview.org}DoubleVector" minOccurs="0"/&gt;
        - *       &lt;/sequence&gt;
        - *       &lt;attribute name="rows" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *       &lt;attribute name="columns" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *     &lt;/restriction&gt;
        - *   &lt;/complexContent&gt;
        - * &lt;/complexType&gt;
        - * </pre>
        + * <pre> &lt;complexType name="DoubleMatrix"&gt;
        + * &lt;complexContent&gt; &lt;restriction
        + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        + * &lt;sequence&gt; &lt;element name="row"
        + * type="{www.jalview.org}DoubleVector" maxOccurs="unbounded"
        + * minOccurs="0"/&gt; &lt;element name="D"
        + * type="{www.jalview.org}DoubleVector" minOccurs="0"/&gt; &lt;element
        + * name="E" type="{www.jalview.org}DoubleVector" minOccurs="0"/&gt;
        + * &lt;/sequence&gt; &lt;attribute name="rows"
        + * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        + * name="columns" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        + * &lt;/restriction&gt; &lt;/complexContent&gt;
        + * &lt;/complexType&gt; </pre>
          * 
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "DoubleMatrix", namespace = "www.jalview.org", propOrder = {
        -    "row",
        -    "d",
        -    "e"
        -})
        -public class DoubleMatrix {
        -
        -    protected List row;
        -    @XmlElement(name = "D")
        -    protected DoubleVector d;
        -    @XmlElement(name = "E")
        -    protected DoubleVector e;
        -    @XmlAttribute(name = "rows")
        -    protected Integer rows;
        -    @XmlAttribute(name = "columns")
        -    protected Integer columns;
        -
        -    /**
        -     * Gets the value of the row property.
        -     * 
        -     * <p>
        -     * This accessor method returns a reference to the live list,
        -     * not a snapshot. Therefore any modification you make to the
        -     * returned list will be present inside the JAXB object.
        -     * This is why there is not a <CODE>set</CODE> method for the row property.
        -     * 
        -     * <p>
        -     * For example, to add a new item, do as follows:
        -     * <pre>
        -     *    getRow().add(newItem);
        -     * </pre>
        -     * 
        -     * 
        -     * <p>
        -     * Objects of the following type(s) are allowed in the list
        -     * {@link DoubleVector }
        -     * 
        -     * 
        -     */
        -    public List getRow() {
        -        if (row == null) {
        -            row = new ArrayList();
        -        }
        -        return this.row;
        -    }
        -
        -    /**
        -     * Gets the value of the d property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link DoubleVector }
        -     *     
        -     */
        -    public DoubleVector getD() {
        -        return d;
        -    }
        -
        -    /**
        -     * Sets the value of the d property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link DoubleVector }
        -     *     
        -     */
        -    public void setD(DoubleVector value) {
        -        this.d = value;
        -    }
        -
        -    /**
        -     * Gets the value of the e property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link DoubleVector }
        -     *     
        -     */
        -    public DoubleVector getE() {
        -        return e;
        -    }
        -
        -    /**
        -     * Sets the value of the e property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link DoubleVector }
        -     *     
        -     */
        -    public void setE(DoubleVector value) {
        -        this.e = value;
        -    }
        -
        -    /**
        -     * Gets the value of the rows property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link Integer }
        -     *     
        -     */
        -    public Integer getRows() {
        -        return rows;
        -    }
        -
        -    /**
        -     * Sets the value of the rows property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link Integer }
        -     *     
        -     */
        -    public void setRows(Integer value) {
        -        this.rows = value;
        -    }
        -
        -    /**
        -     * Gets the value of the columns property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link Integer }
        -     *     
        -     */
        -    public Integer getColumns() {
        -        return columns;
        -    }
        -
        -    /**
        -     * Sets the value of the columns property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link Integer }
        -     *     
        -     */
        -    public void setColumns(Integer value) {
        -        this.columns = value;
        +@XmlType(
        +  name = "DoubleMatrix",
        +  namespace = "www.jalview.org",
        +  propOrder =
        +  { "row", "d", "e" })
        +public class DoubleMatrix
        +{
        +
        +  protected List row;
        +
        +  @XmlElement(name = "D")
        +  protected DoubleVector d;
        +
        +  @XmlElement(name = "E")
        +  protected DoubleVector e;
        +
        +  @XmlAttribute(name = "rows")
        +  protected Integer rows;
        +
        +  @XmlAttribute(name = "columns")
        +  protected Integer columns;
        +
        +  /**
        +   * Gets the value of the row property.
        +   * 
        +   * <p> This accessor method returns a reference to the live list, not a
        +   * snapshot. Therefore any modification you make to the returned list will be
        +   * present inside the JAXB object. This is why there is not a
        +   * <CODE>set</CODE> method for the row property.
        +   * 
        +   * <p> For example, to add a new item, do as follows: <pre>
        +   * getRow().add(newItem); </pre>
        +   * 
        +   * 
        +   * <p> Objects of the following type(s) are allowed in the list
        +   * {@link DoubleVector }
        +   * 
        +   * 
        +   */
        +  public List getRow()
        +  {
        +    if (row == null)
        +    {
        +      row = new ArrayList();
             }
        +    return this.row;
        +  }
        +
        +  /**
        +   * Gets the value of the d property.
        +   * 
        +   * @return possible object is {@link DoubleVector }
        +   * 
        +   */
        +  public DoubleVector getD()
        +  {
        +    return d;
        +  }
        +
        +  /**
        +   * Sets the value of the d property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link DoubleVector }
        +   * 
        +   */
        +  public void setD(DoubleVector value)
        +  {
        +    this.d = value;
        +  }
        +
        +  /**
        +   * Gets the value of the e property.
        +   * 
        +   * @return possible object is {@link DoubleVector }
        +   * 
        +   */
        +  public DoubleVector getE()
        +  {
        +    return e;
        +  }
        +
        +  /**
        +   * Sets the value of the e property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link DoubleVector }
        +   * 
        +   */
        +  public void setE(DoubleVector value)
        +  {
        +    this.e = value;
        +  }
        +
        +  /**
        +   * Gets the value of the rows property.
        +   * 
        +   * @return possible object is {@link Integer }
        +   * 
        +   */
        +  public Integer getRows()
        +  {
        +    return rows;
        +  }
        +
        +  /**
        +   * Sets the value of the rows property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link Integer }
        +   * 
        +   */
        +  public void setRows(Integer value)
        +  {
        +    this.rows = value;
        +  }
        +
        +  /**
        +   * Gets the value of the columns property.
        +   * 
        +   * @return possible object is {@link Integer }
        +   * 
        +   */
        +  public Integer getColumns()
        +  {
        +    return columns;
        +  }
        +
        +  /**
        +   * Sets the value of the columns property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link Integer }
        +   * 
        +   */
        +  public void setColumns(Integer value)
        +  {
        +    this.columns = value;
        +  }
         
         }
        diff --git a/src/jalview/xml/binding/jalview/DoubleVector.java b/src/jalview/xml/binding/jalview/DoubleVector.java
        index a255c74..4995dd3 100644
        --- a/src/jalview/xml/binding/jalview/DoubleVector.java
        +++ b/src/jalview/xml/binding/jalview/DoubleVector.java
        @@ -5,7 +5,6 @@
         // Generated on: 2021.08.30 at 11:05:22 AM BST 
         //
         
        -
         package jalview.xml.binding.jalview;
         
         import java.util.ArrayList;
        @@ -15,62 +14,58 @@ import javax.xml.bind.annotation.XmlAccessorType;
         import javax.xml.bind.annotation.XmlElement;
         import javax.xml.bind.annotation.XmlType;
         
        -
         /**
          * <p>Java class for DoubleVector complex type.
          * 
        - * <p>The following schema fragment specifies the expected content contained within this class.
        + * <p>The following schema fragment specifies the expected content
        + * contained within this class.
          * 
        - * <pre>
        - * &lt;complexType name="DoubleVector"&gt;
        - *   &lt;complexContent&gt;
        - *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        - *       &lt;sequence&gt;
        - *         &lt;element name="v" type="{http://www.w3.org/2001/XMLSchema}double" maxOccurs="unbounded" minOccurs="0"/&gt;
        - *       &lt;/sequence&gt;
        - *     &lt;/restriction&gt;
        - *   &lt;/complexContent&gt;
        - * &lt;/complexType&gt;
        - * </pre>
        + * <pre> &lt;complexType name="DoubleVector"&gt;
        + * &lt;complexContent&gt; &lt;restriction
        + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        + * &lt;sequence&gt; &lt;element name="v"
        + * type="{http://www.w3.org/2001/XMLSchema}double" maxOccurs="unbounded"
        + * minOccurs="0"/&gt; &lt;/sequence&gt; &lt;/restriction&gt;
        + * &lt;/complexContent&gt; &lt;/complexType&gt; </pre>
          * 
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "DoubleVector", namespace = "www.jalview.org", propOrder = {
        -    "v"
        -})
        -public class DoubleVector {
        +@XmlType(
        +  name = "DoubleVector",
        +  namespace = "www.jalview.org",
        +  propOrder =
        +  { "v" })
        +public class DoubleVector
        +{
         
        -    @XmlElement(type = Double.class)
        -    protected List v;
        +  @XmlElement(type = Double.class)
        +  protected List v;
         
        -    /**
        -     * Gets the value of the v property.
        -     * 
        -     * <p>
        -     * This accessor method returns a reference to the live list,
        -     * not a snapshot. Therefore any modification you make to the
        -     * returned list will be present inside the JAXB object.
        -     * This is why there is not a <CODE>set</CODE> method for the v property.
        -     * 
        -     * <p>
        -     * For example, to add a new item, do as follows:
        -     * <pre>
        -     *    getV().add(newItem);
        -     * </pre>
        -     * 
        -     * 
        -     * <p>
        -     * Objects of the following type(s) are allowed in the list
        -     * {@link Double }
        -     * 
        -     * 
        -     */
        -    public List getV() {
        -        if (v == null) {
        -            v = new ArrayList();
        -        }
        -        return this.v;
        +  /**
        +   * Gets the value of the v property.
        +   * 
        +   * <p> This accessor method returns a reference to the live list, not a
        +   * snapshot. Therefore any modification you make to the returned list will be
        +   * present inside the JAXB object. This is why there is not a
        +   * <CODE>set</CODE> method for the v property.
        +   * 
        +   * <p> For example, to add a new item, do as follows: <pre>
        +   * getV().add(newItem); </pre>
        +   * 
        +   * 
        +   * <p> Objects of the following type(s) are allowed in the list
        +   * {@link Double }
        +   * 
        +   * 
        +   */
        +  public List getV()
        +  {
        +    if (v == null)
        +    {
        +      v = new ArrayList();
             }
        +    return this.v;
        +  }
         
         }
        diff --git a/src/jalview/xml/binding/jalview/Feature.java b/src/jalview/xml/binding/jalview/Feature.java
        index 73468c9..4c496e5 100644
        --- a/src/jalview/xml/binding/jalview/Feature.java
        +++ b/src/jalview/xml/binding/jalview/Feature.java
        @@ -5,7 +5,6 @@
         // Generated on: 2021.08.30 at 11:05:22 AM BST 
         //
         
        -
         package jalview.xml.binding.jalview;
         
         import java.util.ArrayList;
        @@ -15,349 +14,350 @@ import javax.xml.bind.annotation.XmlAccessorType;
         import javax.xml.bind.annotation.XmlAttribute;
         import javax.xml.bind.annotation.XmlType;
         
        -
         /**
          * <p>Java class for feature complex type.
          * 
        - * <p>The following schema fragment specifies the expected content contained within this class.
        + * <p>The following schema fragment specifies the expected content
        + * contained within this class.
          * 
        - * <pre>
        - * &lt;complexType name="feature"&gt;
        - *   &lt;complexContent&gt;
        - *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        - *       &lt;sequence&gt;
        - *         &lt;element name="otherData" maxOccurs="unbounded" minOccurs="0"&gt;
        - *           &lt;complexType&gt;
        - *             &lt;complexContent&gt;
        - *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        - *                 &lt;attribute name="key" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *                 &lt;attribute name="key2" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *                 &lt;attribute name="value" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *               &lt;/restriction&gt;
        - *             &lt;/complexContent&gt;
        - *           &lt;/complexType&gt;
        - *         &lt;/element&gt;
        - *       &lt;/sequence&gt;
        - *       &lt;attribute name="begin" use="required" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *       &lt;attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *       &lt;attribute name="type" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *       &lt;attribute name="description" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *       &lt;attribute name="status" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *       &lt;attribute name="featureGroup" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *       &lt;attribute name="score" type="{http://www.w3.org/2001/XMLSchema}float" /&gt;
        - *     &lt;/restriction&gt;
        - *   &lt;/complexContent&gt;
        - * &lt;/complexType&gt;
        - * </pre>
        + * <pre> &lt;complexType name="feature"&gt;
        + * &lt;complexContent&gt; &lt;restriction
        + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        + * &lt;sequence&gt; &lt;element name="otherData"
        + * maxOccurs="unbounded" minOccurs="0"&gt; &lt;complexType&gt;
        + * &lt;complexContent&gt; &lt;restriction
        + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; &lt;attribute
        + * name="key" use="required" type="{http://www.w3.org/2001/XMLSchema}string"
        + * /&gt; &lt;attribute name="key2"
        + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute
        + * name="value" use="required" type="{http://www.w3.org/2001/XMLSchema}string"
        + * /&gt; &lt;/restriction&gt; &lt;/complexContent&gt;
        + * &lt;/complexType&gt; &lt;/element&gt;
        + * &lt;/sequence&gt; &lt;attribute name="begin" use="required"
        + * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        + * name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}int"
        + * /&gt; &lt;attribute name="type" use="required"
        + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute
        + * name="description" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        + * &lt;attribute name="status"
        + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute
        + * name="featureGroup" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        + * &lt;attribute name="score" type="{http://www.w3.org/2001/XMLSchema}float"
        + * /&gt; &lt;/restriction&gt; &lt;/complexContent&gt;
        + * &lt;/complexType&gt; </pre>
          * 
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "feature", namespace = "www.jalview.org", propOrder = {
        -    "otherData"
        -})
        -public class Feature {
        -
        -    protected List otherData;
        -    @XmlAttribute(name = "begin", required = true)
        -    protected int begin;
        -    @XmlAttribute(name = "end", required = true)
        -    protected int end;
        -    @XmlAttribute(name = "type", required = true)
        -    protected String type;
        -    @XmlAttribute(name = "description")
        -    protected String description;
        -    @XmlAttribute(name = "status")
        -    protected String status;
        -    @XmlAttribute(name = "featureGroup")
        -    protected String featureGroup;
        -    @XmlAttribute(name = "score")
        -    protected Float score;
        -
        -    /**
        -     * Gets the value of the otherData property.
        -     * 
        -     * <p>
        -     * This accessor method returns a reference to the live list,
        -     * not a snapshot. Therefore any modification you make to the
        -     * returned list will be present inside the JAXB object.
        -     * This is why there is not a <CODE>set</CODE> method for the otherData property.
        -     * 
        -     * <p>
        -     * For example, to add a new item, do as follows:
        -     * <pre>
        -     *    getOtherData().add(newItem);
        -     * </pre>
        -     * 
        -     * 
        -     * <p>
        -     * Objects of the following type(s) are allowed in the list
        -     * {@link Feature.OtherData }
        -     * 
        -     * 
        -     */
        -    public List getOtherData() {
        -        if (otherData == null) {
        -            otherData = new ArrayList();
        -        }
        -        return this.otherData;
        +@XmlType(
        +  name = "feature",
        +  namespace = "www.jalview.org",
        +  propOrder =
        +  { "otherData" })
        +public class Feature
        +{
        +
        +  protected List otherData;
        +
        +  @XmlAttribute(name = "begin", required = true)
        +  protected int begin;
        +
        +  @XmlAttribute(name = "end", required = true)
        +  protected int end;
        +
        +  @XmlAttribute(name = "type", required = true)
        +  protected String type;
        +
        +  @XmlAttribute(name = "description")
        +  protected String description;
        +
        +  @XmlAttribute(name = "status")
        +  protected String status;
        +
        +  @XmlAttribute(name = "featureGroup")
        +  protected String featureGroup;
        +
        +  @XmlAttribute(name = "score")
        +  protected Float score;
        +
        +  /**
        +   * Gets the value of the otherData property.
        +   * 
        +   * <p> This accessor method returns a reference to the live list, not a
        +   * snapshot. Therefore any modification you make to the returned list will be
        +   * present inside the JAXB object. This is why there is not a
        +   * <CODE>set</CODE> method for the otherData property.
        +   * 
        +   * <p> For example, to add a new item, do as follows: <pre>
        +   * getOtherData().add(newItem); </pre>
        +   * 
        +   * 
        +   * <p> Objects of the following type(s) are allowed in the list
        +   * {@link Feature.OtherData }
        +   * 
        +   * 
        +   */
        +  public List getOtherData()
        +  {
        +    if (otherData == null)
        +    {
        +      otherData = new ArrayList();
             }
        +    return this.otherData;
        +  }
        +
        +  /**
        +   * Gets the value of the begin property.
        +   * 
        +   */
        +  public int getBegin()
        +  {
        +    return begin;
        +  }
        +
        +  /**
        +   * Sets the value of the begin property.
        +   * 
        +   */
        +  public void setBegin(int value)
        +  {
        +    this.begin = value;
        +  }
        +
        +  /**
        +   * Gets the value of the end property.
        +   * 
        +   */
        +  public int getEnd()
        +  {
        +    return end;
        +  }
        +
        +  /**
        +   * Sets the value of the end property.
        +   * 
        +   */
        +  public void setEnd(int value)
        +  {
        +    this.end = value;
        +  }
        +
        +  /**
        +   * Gets the value of the type property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getType()
        +  {
        +    return type;
        +  }
        +
        +  /**
        +   * Sets the value of the type property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setType(String value)
        +  {
        +    this.type = value;
        +  }
        +
        +  /**
        +   * Gets the value of the description property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getDescription()
        +  {
        +    return description;
        +  }
        +
        +  /**
        +   * Sets the value of the description property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setDescription(String value)
        +  {
        +    this.description = value;
        +  }
        +
        +  /**
        +   * Gets the value of the status property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getStatus()
        +  {
        +    return status;
        +  }
        +
        +  /**
        +   * Sets the value of the status property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setStatus(String value)
        +  {
        +    this.status = value;
        +  }
        +
        +  /**
        +   * Gets the value of the featureGroup property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getFeatureGroup()
        +  {
        +    return featureGroup;
        +  }
        +
        +  /**
        +   * Sets the value of the featureGroup property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setFeatureGroup(String value)
        +  {
        +    this.featureGroup = value;
        +  }
        +
        +  /**
        +   * Gets the value of the score property.
        +   * 
        +   * @return possible object is {@link Float }
        +   * 
        +   */
        +  public Float getScore()
        +  {
        +    return score;
        +  }
        +
        +  /**
        +   * Sets the value of the score property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link Float }
        +   * 
        +   */
        +  public void setScore(Float value)
        +  {
        +    this.score = value;
        +  }
        +
        +  /**
        +   * <p>Java class for anonymous complex type.
        +   * 
        +   * <p>The following schema fragment specifies the expected content
        +   * contained within this class.
        +   * 
        +   * <pre> &lt;complexType&gt; &lt;complexContent&gt;
        +   * &lt;restriction
        +   * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; &lt;attribute
        +   * name="key" use="required" type="{http://www.w3.org/2001/XMLSchema}string"
        +   * /&gt; &lt;attribute name="key2"
        +   * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute
        +   * name="value" use="required" type="{http://www.w3.org/2001/XMLSchema}string"
        +   * /&gt; &lt;/restriction&gt; &lt;/complexContent&gt;
        +   * &lt;/complexType&gt; </pre>
        +   * 
        +   * 
        +   */
        +  @XmlAccessorType(XmlAccessType.FIELD)
        +  @XmlType(name = "")
        +  public static class OtherData
        +  {
        +
        +    @XmlAttribute(name = "key", required = true)
        +    protected String key;
        +
        +    @XmlAttribute(name = "key2")
        +    protected String key2;
        +
        +    @XmlAttribute(name = "value", required = true)
        +    protected String value;
         
             /**
        -     * Gets the value of the begin property.
        +     * Gets the value of the key property.
              * 
        -     */
        -    public int getBegin() {
        -        return begin;
        -    }
        -
        -    /**
        -     * Sets the value of the begin property.
        -     * 
        -     */
        -    public void setBegin(int value) {
        -        this.begin = value;
        -    }
        -
        -    /**
        -     * Gets the value of the end property.
        -     * 
        -     */
        -    public int getEnd() {
        -        return end;
        -    }
        -
        -    /**
        -     * Sets the value of the end property.
        -     * 
        -     */
        -    public void setEnd(int value) {
        -        this.end = value;
        -    }
        -
        -    /**
        -     * Gets the value of the type property.
        +     * @return possible object is {@link String }
              * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
              */
        -    public String getType() {
        -        return type;
        +    public String getKey()
        +    {
        +      return key;
             }
         
             /**
        -     * Sets the value of the type property.
        +     * Sets the value of the key property.
              * 
              * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setType(String value) {
        -        this.type = value;
        -    }
        -
        -    /**
        -     * Gets the value of the description property.
        +     *          allowed object is {@link String }
              * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
              */
        -    public String getDescription() {
        -        return description;
        +    public void setKey(String value)
        +    {
        +      this.key = value;
             }
         
             /**
        -     * Sets the value of the description property.
        +     * Gets the value of the key2 property.
              * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setDescription(String value) {
        -        this.description = value;
        -    }
        -
        -    /**
        -     * Gets the value of the status property.
        +     * @return possible object is {@link String }
              * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
              */
        -    public String getStatus() {
        -        return status;
        +    public String getKey2()
        +    {
        +      return key2;
             }
         
             /**
        -     * Sets the value of the status property.
        +     * Sets the value of the key2 property.
              * 
              * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setStatus(String value) {
        -        this.status = value;
        -    }
        -
        -    /**
        -     * Gets the value of the featureGroup property.
        +     *          allowed object is {@link String }
              * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
              */
        -    public String getFeatureGroup() {
        -        return featureGroup;
        +    public void setKey2(String value)
        +    {
        +      this.key2 = value;
             }
         
             /**
        -     * Sets the value of the featureGroup property.
        +     * Gets the value of the value property.
              * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setFeatureGroup(String value) {
        -        this.featureGroup = value;
        -    }
        -
        -    /**
        -     * Gets the value of the score property.
        +     * @return possible object is {@link String }
              * 
        -     * @return
        -     *     possible object is
        -     *     {@link Float }
        -     *     
              */
        -    public Float getScore() {
        -        return score;
        +    public String getValue()
        +    {
        +      return value;
             }
         
             /**
        -     * Sets the value of the score property.
        +     * Sets the value of the value property.
              * 
              * @param value
        -     *     allowed object is
        -     *     {@link Float }
        -     *     
        -     */
        -    public void setScore(Float value) {
        -        this.score = value;
        -    }
        -
        -
        -    /**
        -     * <p>Java class for anonymous complex type.
        -     * 
        -     * <p>The following schema fragment specifies the expected content contained within this class.
        -     * 
        -     * <pre>
        -     * &lt;complexType&gt;
        -     *   &lt;complexContent&gt;
        -     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        -     *       &lt;attribute name="key" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -     *       &lt;attribute name="key2" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -     *       &lt;attribute name="value" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -     *     &lt;/restriction&gt;
        -     *   &lt;/complexContent&gt;
        -     * &lt;/complexType&gt;
        -     * </pre>
        -     * 
        +     *          allowed object is {@link String }
              * 
              */
        -    @XmlAccessorType(XmlAccessType.FIELD)
        -    @XmlType(name = "")
        -    public static class OtherData {
        -
        -        @XmlAttribute(name = "key", required = true)
        -        protected String key;
        -        @XmlAttribute(name = "key2")
        -        protected String key2;
        -        @XmlAttribute(name = "value", required = true)
        -        protected String value;
        -
        -        /**
        -         * Gets the value of the key property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link String }
        -         *     
        -         */
        -        public String getKey() {
        -            return key;
        -        }
        -
        -        /**
        -         * Sets the value of the key property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link String }
        -         *     
        -         */
        -        public void setKey(String value) {
        -            this.key = value;
        -        }
        -
        -        /**
        -         * Gets the value of the key2 property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link String }
        -         *     
        -         */
        -        public String getKey2() {
        -            return key2;
        -        }
        -
        -        /**
        -         * Sets the value of the key2 property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link String }
        -         *     
        -         */
        -        public void setKey2(String value) {
        -            this.key2 = value;
        -        }
        -
        -        /**
        -         * Gets the value of the value property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link String }
        -         *     
        -         */
        -        public String getValue() {
        -            return value;
        -        }
        -
        -        /**
        -         * Sets the value of the value property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link String }
        -         *     
        -         */
        -        public void setValue(String value) {
        -            this.value = value;
        -        }
        -
        +    public void setValue(String value)
        +    {
        +      this.value = value;
             }
         
        +  }
        +
         }
        diff --git a/src/jalview/xml/binding/jalview/FeatureMatcher.java b/src/jalview/xml/binding/jalview/FeatureMatcher.java
        index dee9bc1d..7fd14fa 100644
        --- a/src/jalview/xml/binding/jalview/FeatureMatcher.java
        +++ b/src/jalview/xml/binding/jalview/FeatureMatcher.java
        @@ -5,7 +5,6 @@
         // Generated on: 2021.08.30 at 11:05:22 AM BST 
         //
         
        -
         package jalview.xml.binding.jalview;
         
         import java.util.ArrayList;
        @@ -16,145 +15,141 @@ import javax.xml.bind.annotation.XmlAttribute;
         import javax.xml.bind.annotation.XmlElement;
         import javax.xml.bind.annotation.XmlType;
         
        -
         /**
          * <p>Java class for FeatureMatcher complex type.
          * 
        - * <p>The following schema fragment specifies the expected content contained within this class.
        + * <p>The following schema fragment specifies the expected content
        + * contained within this class.
          * 
        - * <pre>
        - * &lt;complexType name="FeatureMatcher"&gt;
        - *   &lt;complexContent&gt;
        - *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        - *       &lt;sequence&gt;
        - *         &lt;element name="attributeName" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="2" minOccurs="0"/&gt;
        - *         &lt;element name="condition" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
        - *         &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
        - *       &lt;/sequence&gt;
        - *       &lt;attribute name="by" type="{www.jalview.org/colours}FilterBy" /&gt;
        - *     &lt;/restriction&gt;
        - *   &lt;/complexContent&gt;
        - * &lt;/complexType&gt;
        - * </pre>
        + * <pre> &lt;complexType name="FeatureMatcher"&gt;
        + * &lt;complexContent&gt; &lt;restriction
        + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        + * &lt;sequence&gt; &lt;element name="attributeName"
        + * type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="2"
        + * minOccurs="0"/&gt; &lt;element name="condition"
        + * type="{http://www.w3.org/2001/XMLSchema}string"/&gt; &lt;element
        + * name="value" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
        + * &lt;/sequence&gt; &lt;attribute name="by"
        + * type="{www.jalview.org/colours}FilterBy" /&gt;
        + * &lt;/restriction&gt; &lt;/complexContent&gt;
        + * &lt;/complexType&gt; </pre>
          * 
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "FeatureMatcher", namespace = "www.jalview.org/colours", propOrder = {
        -    "attributeName",
        -    "condition",
        -    "value"
        -})
        -public class FeatureMatcher {
        +@XmlType(
        +  name = "FeatureMatcher",
        +  namespace = "www.jalview.org/colours",
        +  propOrder =
        +  { "attributeName", "condition", "value" })
        +public class FeatureMatcher
        +{
         
        -    @XmlElement(namespace = "")
        -    protected List attributeName;
        -    @XmlElement(namespace = "", required = true)
        -    protected String condition;
        -    @XmlElement(namespace = "", required = true)
        -    protected String value;
        -    @XmlAttribute(name = "by")
        -    protected FilterBy by;
        +  @XmlElement(namespace = "")
        +  protected List attributeName;
         
        -    /**
        -     * Gets the value of the attributeName property.
        -     * 
        -     * <p>
        -     * This accessor method returns a reference to the live list,
        -     * not a snapshot. Therefore any modification you make to the
        -     * returned list will be present inside the JAXB object.
        -     * This is why there is not a <CODE>set</CODE> method for the attributeName property.
        -     * 
        -     * <p>
        -     * For example, to add a new item, do as follows:
        -     * <pre>
        -     *    getAttributeName().add(newItem);
        -     * </pre>
        -     * 
        -     * 
        -     * <p>
        -     * Objects of the following type(s) are allowed in the list
        -     * {@link String }
        -     * 
        -     * 
        -     */
        -    public List getAttributeName() {
        -        if (attributeName == null) {
        -            attributeName = new ArrayList();
        -        }
        -        return this.attributeName;
        -    }
        +  @XmlElement(namespace = "", required = true)
        +  protected String condition;
         
        -    /**
        -     * Gets the value of the condition property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getCondition() {
        -        return condition;
        -    }
        +  @XmlElement(namespace = "", required = true)
        +  protected String value;
         
        -    /**
        -     * Sets the value of the condition property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setCondition(String value) {
        -        this.condition = value;
        -    }
        +  @XmlAttribute(name = "by")
        +  protected FilterBy by;
         
        -    /**
        -     * Gets the value of the value property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getValue() {
        -        return value;
        +  /**
        +   * Gets the value of the attributeName property.
        +   * 
        +   * <p> This accessor method returns a reference to the live list, not a
        +   * snapshot. Therefore any modification you make to the returned list will be
        +   * present inside the JAXB object. This is why there is not a
        +   * <CODE>set</CODE> method for the attributeName property.
        +   * 
        +   * <p> For example, to add a new item, do as follows: <pre>
        +   * getAttributeName().add(newItem); </pre>
        +   * 
        +   * 
        +   * <p> Objects of the following type(s) are allowed in the list
        +   * {@link String }
        +   * 
        +   * 
        +   */
        +  public List getAttributeName()
        +  {
        +    if (attributeName == null)
        +    {
        +      attributeName = new ArrayList();
             }
        +    return this.attributeName;
        +  }
         
        -    /**
        -     * Sets the value of the value property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setValue(String value) {
        -        this.value = value;
        -    }
        +  /**
        +   * Gets the value of the condition property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getCondition()
        +  {
        +    return condition;
        +  }
         
        -    /**
        -     * Gets the value of the by property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link FilterBy }
        -     *     
        -     */
        -    public FilterBy getBy() {
        -        return by;
        -    }
        +  /**
        +   * Sets the value of the condition property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setCondition(String value)
        +  {
        +    this.condition = value;
        +  }
         
        -    /**
        -     * Sets the value of the by property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link FilterBy }
        -     *     
        -     */
        -    public void setBy(FilterBy value) {
        -        this.by = value;
        -    }
        +  /**
        +   * Gets the value of the value property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getValue()
        +  {
        +    return value;
        +  }
        +
        +  /**
        +   * Sets the value of the value property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setValue(String value)
        +  {
        +    this.value = value;
        +  }
        +
        +  /**
        +   * Gets the value of the by property.
        +   * 
        +   * @return possible object is {@link FilterBy }
        +   * 
        +   */
        +  public FilterBy getBy()
        +  {
        +    return by;
        +  }
        +
        +  /**
        +   * Sets the value of the by property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link FilterBy }
        +   * 
        +   */
        +  public void setBy(FilterBy value)
        +  {
        +    this.by = value;
        +  }
         
         }
        diff --git a/src/jalview/xml/binding/jalview/FeatureMatcherSet.java b/src/jalview/xml/binding/jalview/FeatureMatcherSet.java
        index 4c0848f..d2bdaaa 100644
        --- a/src/jalview/xml/binding/jalview/FeatureMatcherSet.java
        +++ b/src/jalview/xml/binding/jalview/FeatureMatcherSet.java
        @@ -5,7 +5,6 @@
         // Generated on: 2021.08.30 at 11:05:22 AM BST 
         //
         
        -
         package jalview.xml.binding.jalview;
         
         import java.util.ArrayList;
        @@ -16,177 +15,167 @@ import javax.xml.bind.annotation.XmlAttribute;
         import javax.xml.bind.annotation.XmlElement;
         import javax.xml.bind.annotation.XmlType;
         
        -
         /**
          * A feature match condition, which may be simple or compound
          * 
          * <p>Java class for FeatureMatcherSet complex type.
          * 
        - * <p>The following schema fragment specifies the expected content contained within this class.
        + * <p>The following schema fragment specifies the expected content
        + * contained within this class.
          * 
        - * <pre>
        - * &lt;complexType name="FeatureMatcherSet"&gt;
        - *   &lt;complexContent&gt;
        - *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        - *       &lt;choice&gt;
        - *         &lt;element name="matchCondition" type="{www.jalview.org/colours}FeatureMatcher"/&gt;
        - *         &lt;element name="compoundMatcher"&gt;
        - *           &lt;complexType&gt;
        - *             &lt;complexContent&gt;
        - *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        - *                 &lt;sequence&gt;
        - *                   &lt;element name="matcherSet" type="{www.jalview.org/colours}FeatureMatcherSet" maxOccurs="2" minOccurs="2"/&gt;
        - *                 &lt;/sequence&gt;
        - *                 &lt;attribute name="and" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *               &lt;/restriction&gt;
        - *             &lt;/complexContent&gt;
        - *           &lt;/complexType&gt;
        - *         &lt;/element&gt;
        - *       &lt;/choice&gt;
        - *     &lt;/restriction&gt;
        - *   &lt;/complexContent&gt;
        - * &lt;/complexType&gt;
        - * </pre>
        + * <pre> &lt;complexType name="FeatureMatcherSet"&gt;
        + * &lt;complexContent&gt; &lt;restriction
        + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        + * &lt;choice&gt; &lt;element name="matchCondition"
        + * type="{www.jalview.org/colours}FeatureMatcher"/&gt; &lt;element
        + * name="compoundMatcher"&gt; &lt;complexType&gt;
        + * &lt;complexContent&gt; &lt;restriction
        + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        + * &lt;sequence&gt; &lt;element name="matcherSet"
        + * type="{www.jalview.org/colours}FeatureMatcherSet" maxOccurs="2"
        + * minOccurs="2"/&gt; &lt;/sequence&gt; &lt;attribute name="and"
        + * use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        + * &lt;/restriction&gt; &lt;/complexContent&gt;
        + * &lt;/complexType&gt; &lt;/element&gt; &lt;/choice&gt;
        + * &lt;/restriction&gt; &lt;/complexContent&gt;
        + * &lt;/complexType&gt; </pre>
          * 
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "FeatureMatcherSet", namespace = "www.jalview.org/colours", propOrder = {
        -    "matchCondition",
        -    "compoundMatcher"
        -})
        -public class FeatureMatcherSet {
        -
        -    @XmlElement(namespace = "")
        -    protected FeatureMatcher matchCondition;
        -    @XmlElement(namespace = "")
        -    protected FeatureMatcherSet.CompoundMatcher compoundMatcher;
        +@XmlType(
        +  name = "FeatureMatcherSet",
        +  namespace = "www.jalview.org/colours",
        +  propOrder =
        +  { "matchCondition", "compoundMatcher" })
        +public class FeatureMatcherSet
        +{
        +
        +  @XmlElement(namespace = "")
        +  protected FeatureMatcher matchCondition;
        +
        +  @XmlElement(namespace = "")
        +  protected FeatureMatcherSet.CompoundMatcher compoundMatcher;
        +
        +  /**
        +   * Gets the value of the matchCondition property.
        +   * 
        +   * @return possible object is {@link FeatureMatcher }
        +   * 
        +   */
        +  public FeatureMatcher getMatchCondition()
        +  {
        +    return matchCondition;
        +  }
        +
        +  /**
        +   * Sets the value of the matchCondition property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link FeatureMatcher }
        +   * 
        +   */
        +  public void setMatchCondition(FeatureMatcher value)
        +  {
        +    this.matchCondition = value;
        +  }
        +
        +  /**
        +   * Gets the value of the compoundMatcher property.
        +   * 
        +   * @return possible object is {@link FeatureMatcherSet.CompoundMatcher }
        +   * 
        +   */
        +  public FeatureMatcherSet.CompoundMatcher getCompoundMatcher()
        +  {
        +    return compoundMatcher;
        +  }
        +
        +  /**
        +   * Sets the value of the compoundMatcher property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link FeatureMatcherSet.CompoundMatcher }
        +   * 
        +   */
        +  public void setCompoundMatcher(FeatureMatcherSet.CompoundMatcher value)
        +  {
        +    this.compoundMatcher = value;
        +  }
        +
        +  /**
        +   * <p>Java class for anonymous complex type.
        +   * 
        +   * <p>The following schema fragment specifies the expected content
        +   * contained within this class.
        +   * 
        +   * <pre> &lt;complexType&gt; &lt;complexContent&gt;
        +   * &lt;restriction
        +   * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        +   * &lt;sequence&gt; &lt;element name="matcherSet"
        +   * type="{www.jalview.org/colours}FeatureMatcherSet" maxOccurs="2"
        +   * minOccurs="2"/&gt; &lt;/sequence&gt; &lt;attribute
        +   * name="and" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean"
        +   * /&gt; &lt;/restriction&gt; &lt;/complexContent&gt;
        +   * &lt;/complexType&gt; </pre>
        +   * 
        +   * 
        +   */
        +  @XmlAccessorType(XmlAccessType.FIELD)
        +  @XmlType(name = "", propOrder = { "matcherSet" })
        +  public static class CompoundMatcher
        +  {
        +
        +    @XmlElement(namespace = "", required = true)
        +    protected List matcherSet;
        +
        +    @XmlAttribute(name = "and", required = true)
        +    protected boolean and;
         
             /**
        -     * Gets the value of the matchCondition property.
        +     * Gets the value of the matcherSet property.
              * 
        -     * @return
        -     *     possible object is
        -     *     {@link FeatureMatcher }
        -     *     
        -     */
        -    public FeatureMatcher getMatchCondition() {
        -        return matchCondition;
        -    }
        -
        -    /**
        -     * Sets the value of the matchCondition property.
        +     * <p> This accessor method returns a reference to the live list, not
        +     * a snapshot. Therefore any modification you make to the returned list will
        +     * be present inside the JAXB object. This is why there is not a
        +     * <CODE>set</CODE> method for the matcherSet property.
        +     * 
        +     * <p> For example, to add a new item, do as follows: <pre>
        +     * getMatcherSet().add(newItem); </pre>
        +     * 
        +     * 
        +     * <p> Objects of the following type(s) are allowed in the list
        +     * {@link FeatureMatcherSet }
              * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link FeatureMatcher }
        -     *     
        -     */
        -    public void setMatchCondition(FeatureMatcher value) {
        -        this.matchCondition = value;
        -    }
        -
        -    /**
        -     * Gets the value of the compoundMatcher property.
              * 
        -     * @return
        -     *     possible object is
        -     *     {@link FeatureMatcherSet.CompoundMatcher }
        -     *     
              */
        -    public FeatureMatcherSet.CompoundMatcher getCompoundMatcher() {
        -        return compoundMatcher;
        +    public List getMatcherSet()
        +    {
        +      if (matcherSet == null)
        +      {
        +        matcherSet = new ArrayList();
        +      }
        +      return this.matcherSet;
             }
         
             /**
        -     * Sets the value of the compoundMatcher property.
        +     * Gets the value of the and property.
              * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link FeatureMatcherSet.CompoundMatcher }
        -     *     
              */
        -    public void setCompoundMatcher(FeatureMatcherSet.CompoundMatcher value) {
        -        this.compoundMatcher = value;
        +    public boolean isAnd()
        +    {
        +      return and;
             }
         
        -
             /**
        -     * <p>Java class for anonymous complex type.
        -     * 
        -     * <p>The following schema fragment specifies the expected content contained within this class.
        -     * 
        -     * <pre>
        -     * &lt;complexType&gt;
        -     *   &lt;complexContent&gt;
        -     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        -     *       &lt;sequence&gt;
        -     *         &lt;element name="matcherSet" type="{www.jalview.org/colours}FeatureMatcherSet" maxOccurs="2" minOccurs="2"/&gt;
        -     *       &lt;/sequence&gt;
        -     *       &lt;attribute name="and" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -     *     &lt;/restriction&gt;
        -     *   &lt;/complexContent&gt;
        -     * &lt;/complexType&gt;
        -     * </pre>
        -     * 
        +     * Sets the value of the and property.
              * 
              */
        -    @XmlAccessorType(XmlAccessType.FIELD)
        -    @XmlType(name = "", propOrder = {
        -        "matcherSet"
        -    })
        -    public static class CompoundMatcher {
        -
        -        @XmlElement(namespace = "", required = true)
        -        protected List matcherSet;
        -        @XmlAttribute(name = "and", required = true)
        -        protected boolean and;
        -
        -        /**
        -         * Gets the value of the matcherSet property.
        -         * 
        -         * <p>
        -         * This accessor method returns a reference to the live list,
        -         * not a snapshot. Therefore any modification you make to the
        -         * returned list will be present inside the JAXB object.
        -         * This is why there is not a <CODE>set</CODE> method for the matcherSet property.
        -         * 
        -         * <p>
        -         * For example, to add a new item, do as follows:
        -         * <pre>
        -         *    getMatcherSet().add(newItem);
        -         * </pre>
        -         * 
        -         * 
        -         * <p>
        -         * Objects of the following type(s) are allowed in the list
        -         * {@link FeatureMatcherSet }
        -         * 
        -         * 
        -         */
        -        public List getMatcherSet() {
        -            if (matcherSet == null) {
        -                matcherSet = new ArrayList();
        -            }
        -            return this.matcherSet;
        -        }
        -
        -        /**
        -         * Gets the value of the and property.
        -         * 
        -         */
        -        public boolean isAnd() {
        -            return and;
        -        }
        -
        -        /**
        -         * Sets the value of the and property.
        -         * 
        -         */
        -        public void setAnd(boolean value) {
        -            this.and = value;
        -        }
        -
        +    public void setAnd(boolean value)
        +    {
        +      this.and = value;
             }
         
        +  }
        +
         }
        diff --git a/src/jalview/xml/binding/jalview/FilterBy.java b/src/jalview/xml/binding/jalview/FilterBy.java
        index bbb84a4..9614490 100644
        --- a/src/jalview/xml/binding/jalview/FilterBy.java
        +++ b/src/jalview/xml/binding/jalview/FilterBy.java
        @@ -5,56 +5,56 @@
         // Generated on: 2021.08.30 at 11:05:22 AM BST 
         //
         
        -
         package jalview.xml.binding.jalview;
         
         import javax.xml.bind.annotation.XmlEnum;
         import javax.xml.bind.annotation.XmlEnumValue;
         import javax.xml.bind.annotation.XmlType;
         
        -
         /**
          * <p>Java class for FilterBy.
          * 
        - * <p>The following schema fragment specifies the expected content contained within this class.
        - * <pre>
        - * &lt;simpleType name="FilterBy"&gt;
        - *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"&gt;
        - *     &lt;enumeration value="byLabel"/&gt;
        - *     &lt;enumeration value="byScore"/&gt;
        - *     &lt;enumeration value="byAttribute"/&gt;
        - *   &lt;/restriction&gt;
        - * &lt;/simpleType&gt;
        - * </pre>
        + * <p>The following schema fragment specifies the expected content
        + * contained within this class. <pre> &lt;simpleType
        + * name="FilterBy"&gt; &lt;restriction
        + * base="{http://www.w3.org/2001/XMLSchema}string"&gt; &lt;enumeration
        + * value="byLabel"/&gt; &lt;enumeration value="byScore"/&gt;
        + * &lt;enumeration value="byAttribute"/&gt; &lt;/restriction&gt;
        + * &lt;/simpleType&gt; </pre>
          * 
          */
         @XmlType(name = "FilterBy", namespace = "www.jalview.org/colours")
         @XmlEnum
        -public enum FilterBy {
        -
        -    @XmlEnumValue("byLabel")
        -    BY_LABEL("byLabel"),
        -    @XmlEnumValue("byScore")
        -    BY_SCORE("byScore"),
        -    @XmlEnumValue("byAttribute")
        -    BY_ATTRIBUTE("byAttribute");
        -    private final String value;
        -
        -    FilterBy(String v) {
        -        value = v;
        -    }
        -
        -    public String value() {
        -        return value;
        -    }
        -
        -    public static FilterBy fromValue(String v) {
        -        for (FilterBy c: FilterBy.values()) {
        -            if (c.value.equals(v)) {
        -                return c;
        -            }
        -        }
        -        throw new IllegalArgumentException(v);
        +public enum FilterBy
        +{
        +
        +  @XmlEnumValue("byLabel")
        +  BY_LABEL("byLabel"), @XmlEnumValue("byScore")
        +  BY_SCORE("byScore"), @XmlEnumValue("byAttribute")
        +  BY_ATTRIBUTE("byAttribute");
        +
        +  private final String value;
        +
        +  FilterBy(String v)
        +  {
        +    value = v;
        +  }
        +
        +  public String value()
        +  {
        +    return value;
        +  }
        +
        +  public static FilterBy fromValue(String v)
        +  {
        +    for (FilterBy c : FilterBy.values())
        +    {
        +      if (c.value.equals(v))
        +      {
        +        return c;
        +      }
             }
        +    throw new IllegalArgumentException(v);
        +  }
         
         }
        diff --git a/src/jalview/xml/binding/jalview/JalviewModel.java b/src/jalview/xml/binding/jalview/JalviewModel.java
        index 90819d7..9909b08 100644
        --- a/src/jalview/xml/binding/jalview/JalviewModel.java
        +++ b/src/jalview/xml/binding/jalview/JalviewModel.java
        @@ -5,7 +5,6 @@
         // Generated on: 2021.08.30 at 11:05:22 AM BST 
         //
         
        -
         package jalview.xml.binding.jalview;
         
         import java.util.ArrayList;
        @@ -22,6358 +21,6393 @@ import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
         import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
         import javax.xml.datatype.XMLGregorianCalendar;
         
        -
         /**
          * <p>Java class for JalviewModel complex type.
          * 
        - * <p>The following schema fragment specifies the expected content contained within this class.
        + * <p>The following schema fragment specifies the expected content
        + * contained within this class.
          * 
        - * <pre>
        - * &lt;complexType name="JalviewModel"&gt;
        - *   &lt;complexContent&gt;
        - *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        - *       &lt;sequence&gt;
        - *         &lt;element name="creationDate" type="{http://www.w3.org/2001/XMLSchema}dateTime"/&gt;
        - *         &lt;element name="version" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
        - *         &lt;element name="vamsasModel" type="{www.vamsas.ac.uk/jalview/version2}VAMSAS"/&gt;
        - *         &lt;sequence&gt;
        - *           &lt;element name="JSeq" maxOccurs="unbounded" minOccurs="0"&gt;
        - *             &lt;complexType&gt;
        - *               &lt;complexContent&gt;
        - *                 &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        - *                   &lt;sequence&gt;
        - *                     &lt;element name="features" type="{www.jalview.org}feature" maxOccurs="unbounded" minOccurs="0"/&gt;
        - *                     &lt;element name="pdbids" maxOccurs="unbounded" minOccurs="0"&gt;
        - *                       &lt;complexType&gt;
        - *                         &lt;complexContent&gt;
        - *                           &lt;extension base="{www.jalview.org}pdbentry"&gt;
        - *                             &lt;sequence&gt;
        - *                               &lt;element name="structureState" maxOccurs="unbounded" minOccurs="0"&gt;
        - *                                 &lt;complexType&gt;
        - *                                   &lt;simpleContent&gt;
        - *                                     &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema&gt;string"&gt;
        - *                                       &lt;attGroup ref="{www.jalview.org}swingwindow"/&gt;
        - *                                       &lt;attribute name="visible" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *                                       &lt;attribute name="viewId" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *                                       &lt;attribute name="alignwithAlignPanel" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        - *                                       &lt;attribute name="colourwithAlignPanel" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        - *                                       &lt;attribute name="colourByJmol" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        - *                                       &lt;attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *                                     &lt;/extension&gt;
        - *                                   &lt;/simpleContent&gt;
        - *                                 &lt;/complexType&gt;
        - *                               &lt;/element&gt;
        - *                             &lt;/sequence&gt;
        - *                           &lt;/extension&gt;
        - *                         &lt;/complexContent&gt;
        - *                       &lt;/complexType&gt;
        - *                     &lt;/element&gt;
        - *                     &lt;element name="hiddenSequences" type="{http://www.w3.org/2001/XMLSchema}int" maxOccurs="unbounded" minOccurs="0"/&gt;
        - *                     &lt;element name="rnaViewer" maxOccurs="unbounded" minOccurs="0"&gt;
        - *                       &lt;complexType&gt;
        - *                         &lt;complexContent&gt;
        - *                           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        - *                             &lt;sequence&gt;
        - *                               &lt;element name="secondaryStructure" maxOccurs="unbounded"&gt;
        - *                                 &lt;complexType&gt;
        - *                                   &lt;complexContent&gt;
        - *                                     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        - *                                       &lt;attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *                                       &lt;attribute name="annotationId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *                                       &lt;attribute name="gapped" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *                                       &lt;attribute name="viewerState" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *                                     &lt;/restriction&gt;
        - *                                   &lt;/complexContent&gt;
        - *                                 &lt;/complexType&gt;
        - *                               &lt;/element&gt;
        - *                             &lt;/sequence&gt;
        - *                             &lt;attGroup ref="{www.jalview.org}swingwindow"/&gt;
        - *                             &lt;attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *                             &lt;attribute name="viewId" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *                             &lt;attribute name="dividerLocation" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *                             &lt;attribute name="selectedRna" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *                           &lt;/restriction&gt;
        - *                         &lt;/complexContent&gt;
        - *                       &lt;/complexType&gt;
        - *                     &lt;/element&gt;
        - *                   &lt;/sequence&gt;
        - *                   &lt;attribute name="colour" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *                   &lt;attribute name="start" use="required" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *                   &lt;attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *                   &lt;attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *                   &lt;attribute name="hidden" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *                   &lt;attribute name="viewreference" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *                 &lt;/restriction&gt;
        - *               &lt;/complexContent&gt;
        - *             &lt;/complexType&gt;
        - *           &lt;/element&gt;
        - *           &lt;element name="JGroup" maxOccurs="unbounded" minOccurs="0"&gt;
        - *             &lt;complexType&gt;
        - *               &lt;complexContent&gt;
        - *                 &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        - *                   &lt;sequence&gt;
        - *                     &lt;element name="seq" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/&gt;
        - *                     &lt;element name="annotationColours" type="{www.jalview.org}AnnotationColourScheme" minOccurs="0"/&gt;
        - *                   &lt;/sequence&gt;
        - *                   &lt;attribute name="start" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *                   &lt;attribute name="end" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *                   &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *                   &lt;attribute name="colour" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *                   &lt;attribute name="consThreshold" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *                   &lt;attribute name="pidThreshold" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *                   &lt;attribute name="outlineColour" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *                   &lt;attribute name="displayBoxes" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *                   &lt;attribute name="displayText" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *                   &lt;attribute name="colourText" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *                   &lt;attribute name="textCol1" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *                   &lt;attribute name="textCol2" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *                   &lt;attribute name="textColThreshold" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *                   &lt;attribute name="showUnconserved" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *                   &lt;attribute name="ignoreGapsinConsensus" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        - *                   &lt;attribute name="showConsensusHistogram" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        - *                   &lt;attribute name="showSequenceLogo" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        - *                   &lt;attribute name="normaliseSequenceLogo" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        - *                   &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *                 &lt;/restriction&gt;
        - *               &lt;/complexContent&gt;
        - *             &lt;/complexType&gt;
        - *           &lt;/element&gt;
        - *           &lt;element name="Viewport" maxOccurs="unbounded" minOccurs="0"&gt;
        - *             &lt;complexType&gt;
        - *               &lt;complexContent&gt;
        - *                 &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        - *                   &lt;sequence&gt;
        - *                     &lt;element name="AnnotationColours" type="{www.jalview.org}AnnotationColourScheme" minOccurs="0"/&gt;
        - *                     &lt;element name="hiddenColumns" maxOccurs="unbounded" minOccurs="0"&gt;
        - *                       &lt;complexType&gt;
        - *                         &lt;complexContent&gt;
        - *                           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        - *                             &lt;attribute name="start" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *                             &lt;attribute name="end" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *                           &lt;/restriction&gt;
        - *                         &lt;/complexContent&gt;
        - *                       &lt;/complexType&gt;
        - *                     &lt;/element&gt;
        - *                     &lt;element name="calcIdParam" maxOccurs="unbounded" minOccurs="0"&gt;
        - *                       &lt;complexType&gt;
        - *                         &lt;complexContent&gt;
        - *                           &lt;extension base="{www.jalview.org/xml/wsparamset}WebServiceParameterSet"&gt;
        - *                             &lt;attribute name="calcId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *                             &lt;attribute name="needsUpdate" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        - *                             &lt;attribute name="autoUpdate" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *                           &lt;/extension&gt;
        - *                         &lt;/complexContent&gt;
        - *                       &lt;/complexType&gt;
        - *                     &lt;/element&gt;
        - *                   &lt;/sequence&gt;
        - *                   &lt;attGroup ref="{www.jalview.org}swingwindow"/&gt;
        - *                   &lt;attribute name="conservationSelected" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *                   &lt;attribute name="pidSelected" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *                   &lt;attribute name="bgColour" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *                   &lt;attribute name="consThreshold" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *                   &lt;attribute name="pidThreshold" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *                   &lt;attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *                   &lt;attribute name="showFullId" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *                   &lt;attribute name="rightAlignIds" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *                   &lt;attribute name="showText" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *                   &lt;attribute name="showColourText" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *                   &lt;attribute name="showUnconserved" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        - *                   &lt;attribute name="showBoxes" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *                   &lt;attribute name="wrapAlignment" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *                   &lt;attribute name="renderGaps" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *                   &lt;attribute name="showSequenceFeatures" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *                   &lt;attribute name="showNPfeatureTooltip" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *                   &lt;attribute name="showDbRefTooltip" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *                   &lt;attribute name="followHighlight" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        - *                   &lt;attribute name="followSelection" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        - *                   &lt;attribute name="showAnnotation" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *                   &lt;attribute name="centreColumnLabels" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        - *                   &lt;attribute name="showGroupConservation" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        - *                   &lt;attribute name="showGroupConsensus" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        - *                   &lt;attribute name="showConsensusHistogram" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        - *                   &lt;attribute name="showSequenceLogo" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        - *                   &lt;attribute name="normaliseSequenceLogo" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        - *                   &lt;attribute name="ignoreGapsinConsensus" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        - *                   &lt;attribute name="startRes" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *                   &lt;attribute name="startSeq" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *                   &lt;attribute name="fontName" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *                   &lt;attribute name="fontSize" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *                   &lt;attribute name="fontStyle" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *                   &lt;attribute name="scaleProteinAsCdna" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        - *                   &lt;attribute name="viewName" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *                   &lt;attribute name="sequenceSetId" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *                   &lt;attribute name="gatheredViews" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *                   &lt;attribute name="textCol1" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *                   &lt;attribute name="textCol2" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *                   &lt;attribute name="textColThreshold" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *                   &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID" /&gt;
        - *                   &lt;attribute name="complementId" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *                   &lt;attribute name="showComplementFeatures" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        - *                   &lt;attribute name="showComplementFeaturesOnTop" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        - *                 &lt;/restriction&gt;
        - *               &lt;/complexContent&gt;
        - *             &lt;/complexType&gt;
        - *           &lt;/element&gt;
        - *           &lt;element name="UserColours" maxOccurs="unbounded" minOccurs="0"&gt;
        - *             &lt;complexType&gt;
        - *               &lt;complexContent&gt;
        - *                 &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        - *                   &lt;sequence&gt;
        - *                     &lt;element name="UserColourScheme" type="{www.jalview.org/colours}JalviewUserColours"/&gt;
        - *                   &lt;/sequence&gt;
        - *                   &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *                 &lt;/restriction&gt;
        - *               &lt;/complexContent&gt;
        - *             &lt;/complexType&gt;
        - *           &lt;/element&gt;
        - *           &lt;element name="tree" maxOccurs="unbounded" minOccurs="0"&gt;
        - *             &lt;complexType&gt;
        - *               &lt;complexContent&gt;
        - *                 &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        - *                   &lt;sequence minOccurs="0"&gt;
        - *                     &lt;element name="title" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
        - *                     &lt;element name="newick" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
        - *                   &lt;/sequence&gt;
        - *                   &lt;attGroup ref="{www.jalview.org}swingwindow"/&gt;
        - *                   &lt;attribute name="fontName" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *                   &lt;attribute name="fontSize" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *                   &lt;attribute name="fontStyle" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *                   &lt;attribute name="threshold" type="{http://www.w3.org/2001/XMLSchema}float" /&gt;
        - *                   &lt;attribute name="showBootstrap" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *                   &lt;attribute name="showDistances" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *                   &lt;attribute name="markUnlinked" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *                   &lt;attribute name="fitToWindow" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *                   &lt;attribute name="currentTree" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *                   &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID" /&gt;
        - *                   &lt;attribute name="linkToAllViews" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        - *                 &lt;/restriction&gt;
        - *               &lt;/complexContent&gt;
        - *             &lt;/complexType&gt;
        - *           &lt;/element&gt;
        - *           &lt;element name="PcaViewer" maxOccurs="unbounded" minOccurs="0"&gt;
        - *             &lt;complexType&gt;
        - *               &lt;complexContent&gt;
        - *                 &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        - *                   &lt;sequence&gt;
        - *                     &lt;element name="sequencePoint" maxOccurs="unbounded"&gt;
        - *                       &lt;complexType&gt;
        - *                         &lt;complexContent&gt;
        - *                           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        - *                             &lt;attGroup ref="{www.jalview.org}position"/&gt;
        - *                             &lt;attribute name="sequenceRef" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *                           &lt;/restriction&gt;
        - *                         &lt;/complexContent&gt;
        - *                       &lt;/complexType&gt;
        - *                     &lt;/element&gt;
        - *                     &lt;element name="axis" maxOccurs="3" minOccurs="3"&gt;
        - *                       &lt;complexType&gt;
        - *                         &lt;complexContent&gt;
        - *                           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        - *                             &lt;attGroup ref="{www.jalview.org}position"/&gt;
        - *                           &lt;/restriction&gt;
        - *                         &lt;/complexContent&gt;
        - *                       &lt;/complexType&gt;
        - *                     &lt;/element&gt;
        - *                     &lt;element name="seqPointMin"&gt;
        - *                       &lt;complexType&gt;
        - *                         &lt;complexContent&gt;
        - *                           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        - *                             &lt;attGroup ref="{www.jalview.org}position"/&gt;
        - *                           &lt;/restriction&gt;
        - *                         &lt;/complexContent&gt;
        - *                       &lt;/complexType&gt;
        - *                     &lt;/element&gt;
        - *                     &lt;element name="seqPointMax"&gt;
        - *                       &lt;complexType&gt;
        - *                         &lt;complexContent&gt;
        - *                           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        - *                             &lt;attGroup ref="{www.jalview.org}position"/&gt;
        - *                           &lt;/restriction&gt;
        - *                         &lt;/complexContent&gt;
        - *                       &lt;/complexType&gt;
        - *                     &lt;/element&gt;
        - *                     &lt;element name="pcaData" type="{www.jalview.org}PcaDataType"/&gt;
        - *                   &lt;/sequence&gt;
        - *                   &lt;attGroup ref="{www.jalview.org}swingwindow"/&gt;
        - *                   &lt;attGroup ref="{www.jalview.org}SimilarityParams"/&gt;
        - *                   &lt;attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *                   &lt;attribute name="scoreModelName" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *                   &lt;attribute name="xDim" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *                   &lt;attribute name="yDim" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *                   &lt;attribute name="zDim" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *                   &lt;attribute name="bgColour" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *                   &lt;attribute name="scaleFactor" type="{http://www.w3.org/2001/XMLSchema}float" /&gt;
        - *                   &lt;attribute name="showLabels" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *                   &lt;attribute name="linkToAllViews" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *                 &lt;/restriction&gt;
        - *               &lt;/complexContent&gt;
        - *             &lt;/complexType&gt;
        - *           &lt;/element&gt;
        - *           &lt;element name="FeatureSettings" minOccurs="0"&gt;
        - *             &lt;complexType&gt;
        - *               &lt;complexContent&gt;
        - *                 &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        - *                   &lt;sequence&gt;
        - *                     &lt;element name="setting" maxOccurs="unbounded" minOccurs="0"&gt;
        - *                       &lt;complexType&gt;
        - *                         &lt;complexContent&gt;
        - *                           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        - *                             &lt;sequence&gt;
        - *                               &lt;element name="attributeName" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="2" minOccurs="0"/&gt;
        - *                               &lt;element name="matcherSet" type="{www.jalview.org/colours}FeatureMatcherSet" minOccurs="0"/&gt;
        - *                             &lt;/sequence&gt;
        - *                             &lt;attribute name="type" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *                             &lt;attribute name="colour" use="required" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *                             &lt;attribute name="display" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *                             &lt;attribute name="order" type="{http://www.w3.org/2001/XMLSchema}float" /&gt;
        - *                             &lt;attribute name="mincolour" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *                             &lt;attribute name="noValueColour" type="{www.jalview.org/colours}NoValueColour" default="Min" /&gt;
        - *                             &lt;attribute name="threshold" type="{http://www.w3.org/2001/XMLSchema}float" /&gt;
        - *                             &lt;attribute name="threshstate" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        - *                             &lt;attribute name="max" type="{http://www.w3.org/2001/XMLSchema}float" /&gt;
        - *                             &lt;attribute name="min" type="{http://www.w3.org/2001/XMLSchema}float" /&gt;
        - *                             &lt;attribute name="colourByLabel" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *                             &lt;attribute name="autoScale" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *                           &lt;/restriction&gt;
        - *                         &lt;/complexContent&gt;
        - *                       &lt;/complexType&gt;
        - *                     &lt;/element&gt;
        - *                     &lt;element name="group" maxOccurs="unbounded" minOccurs="0"&gt;
        - *                       &lt;complexType&gt;
        - *                         &lt;complexContent&gt;
        - *                           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        - *                             &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        - *                             &lt;attribute name="display" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        - *                           &lt;/restriction&gt;
        - *                         &lt;/complexContent&gt;
        - *                       &lt;/complexType&gt;
        - *                     &lt;/element&gt;
        - *                   &lt;/sequence&gt;
        - *                 &lt;/restriction&gt;
        - *               &lt;/complexContent&gt;
        - *             &lt;/complexType&gt;
        - *           &lt;/element&gt;
        - *         &lt;/sequence&gt;
        - *       &lt;/sequence&gt;
        - *     &lt;/restriction&gt;
        - *   &lt;/complexContent&gt;
        - * &lt;/complexType&gt;
        - * </pre>
        + * <pre> &lt;complexType name="JalviewModel"&gt;
        + * &lt;complexContent&gt; &lt;restriction
        + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        + * &lt;sequence&gt; &lt;element name="creationDate"
        + * type="{http://www.w3.org/2001/XMLSchema}dateTime"/&gt; &lt;element
        + * name="version" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
        + * &lt;element name="vamsasModel"
        + * type="{www.vamsas.ac.uk/jalview/version2}VAMSAS"/&gt;
        + * &lt;sequence&gt; &lt;element name="JSeq" maxOccurs="unbounded"
        + * minOccurs="0"&gt; &lt;complexType&gt;
        + * &lt;complexContent&gt; &lt;restriction
        + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        + * &lt;sequence&gt; &lt;element name="features"
        + * type="{www.jalview.org}feature" maxOccurs="unbounded" minOccurs="0"/&gt;
        + * &lt;element name="pdbids" maxOccurs="unbounded" minOccurs="0"&gt;
        + * &lt;complexType&gt; &lt;complexContent&gt; &lt;extension
        + * base="{www.jalview.org}pdbentry"&gt; &lt;sequence&gt;
        + * &lt;element name="structureState" maxOccurs="unbounded"
        + * minOccurs="0"&gt; &lt;complexType&gt;
        + * &lt;simpleContent&gt; &lt;extension
        + * base="&lt;http://www.w3.org/2001/XMLSchema&gt;string"&gt;
        + * &lt;attGroup ref="{www.jalview.org}swingwindow"/&gt;
        + * &lt;attribute name="visible"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt; &lt;attribute
        + * name="viewId" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        + * &lt;attribute name="alignwithAlignPanel"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        + * &lt;attribute name="colourwithAlignPanel"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        + * &lt;attribute name="colourByJmol"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        + * &lt;attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string"
        + * /&gt; &lt;/extension&gt; &lt;/simpleContent&gt;
        + * &lt;/complexType&gt; &lt;/element&gt;
        + * &lt;/sequence&gt; &lt;/extension&gt;
        + * &lt;/complexContent&gt; &lt;/complexType&gt;
        + * &lt;/element&gt; &lt;element name="hiddenSequences"
        + * type="{http://www.w3.org/2001/XMLSchema}int" maxOccurs="unbounded"
        + * minOccurs="0"/&gt; &lt;element name="rnaViewer" maxOccurs="unbounded"
        + * minOccurs="0"&gt; &lt;complexType&gt;
        + * &lt;complexContent&gt; &lt;restriction
        + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        + * &lt;sequence&gt; &lt;element name="secondaryStructure"
        + * maxOccurs="unbounded"&gt; &lt;complexType&gt;
        + * &lt;complexContent&gt; &lt;restriction
        + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; &lt;attribute
        + * name="title" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        + * &lt;attribute name="annotationId" use="required"
        + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute
        + * name="gapped" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        + * &lt;attribute name="viewerState"
        + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        + * &lt;/restriction&gt; &lt;/complexContent&gt;
        + * &lt;/complexType&gt; &lt;/element&gt;
        + * &lt;/sequence&gt; &lt;attGroup
        + * ref="{www.jalview.org}swingwindow"/&gt; &lt;attribute name="title"
        + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute
        + * name="viewId" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        + * &lt;attribute name="dividerLocation"
        + * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        + * name="selectedRna" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        + * &lt;/restriction&gt; &lt;/complexContent&gt;
        + * &lt;/complexType&gt; &lt;/element&gt;
        + * &lt;/sequence&gt; &lt;attribute name="colour"
        + * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        + * name="start" use="required" type="{http://www.w3.org/2001/XMLSchema}int"
        + * /&gt; &lt;attribute name="end" use="required"
        + * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        + * name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string"
        + * /&gt; &lt;attribute name="hidden"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt; &lt;attribute
        + * name="viewreference" type="{http://www.w3.org/2001/XMLSchema}boolean"
        + * /&gt; &lt;/restriction&gt; &lt;/complexContent&gt;
        + * &lt;/complexType&gt; &lt;/element&gt; &lt;element
        + * name="JGroup" maxOccurs="unbounded" minOccurs="0"&gt;
        + * &lt;complexType&gt; &lt;complexContent&gt;
        + * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        + * &lt;sequence&gt; &lt;element name="seq"
        + * type="{http://www.w3.org/2001/XMLSchema}string"
        + * maxOccurs="unbounded"/&gt; &lt;element name="annotationColours"
        + * type="{www.jalview.org}AnnotationColourScheme" minOccurs="0"/&gt;
        + * &lt;/sequence&gt; &lt;attribute name="start"
        + * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        + * name="end" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        + * &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string"
        + * /&gt; &lt;attribute name="colour"
        + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute
        + * name="consThreshold" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        + * &lt;attribute name="pidThreshold"
        + * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        + * name="outlineColour" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        + * &lt;attribute name="displayBoxes"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt; &lt;attribute
        + * name="displayText" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        + * &lt;attribute name="colourText"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt; &lt;attribute
        + * name="textCol1" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        + * &lt;attribute name="textCol2"
        + * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        + * name="textColThreshold" type="{http://www.w3.org/2001/XMLSchema}int"
        + * /&gt; &lt;attribute name="showUnconserved"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt; &lt;attribute
        + * name="ignoreGapsinConsensus" type="{http://www.w3.org/2001/XMLSchema}boolean"
        + * default="true" /&gt; &lt;attribute name="showConsensusHistogram"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        + * &lt;attribute name="showSequenceLogo"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        + * &lt;attribute name="normaliseSequenceLogo"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        + * &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string"
        + * /&gt; &lt;/restriction&gt; &lt;/complexContent&gt;
        + * &lt;/complexType&gt; &lt;/element&gt; &lt;element
        + * name="Viewport" maxOccurs="unbounded" minOccurs="0"&gt;
        + * &lt;complexType&gt; &lt;complexContent&gt;
        + * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        + * &lt;sequence&gt; &lt;element name="AnnotationColours"
        + * type="{www.jalview.org}AnnotationColourScheme" minOccurs="0"/&gt;
        + * &lt;element name="hiddenColumns" maxOccurs="unbounded"
        + * minOccurs="0"&gt; &lt;complexType&gt;
        + * &lt;complexContent&gt; &lt;restriction
        + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; &lt;attribute
        + * name="start" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        + * &lt;attribute name="end" type="{http://www.w3.org/2001/XMLSchema}int"
        + * /&gt; &lt;/restriction&gt; &lt;/complexContent&gt;
        + * &lt;/complexType&gt; &lt;/element&gt; &lt;element
        + * name="calcIdParam" maxOccurs="unbounded" minOccurs="0"&gt;
        + * &lt;complexType&gt; &lt;complexContent&gt; &lt;extension
        + * base="{www.jalview.org/xml/wsparamset}WebServiceParameterSet"&gt;
        + * &lt;attribute name="calcId" use="required"
        + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute
        + * name="needsUpdate" type="{http://www.w3.org/2001/XMLSchema}boolean"
        + * default="false" /&gt; &lt;attribute name="autoUpdate" use="required"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        + * &lt;/extension&gt; &lt;/complexContent&gt;
        + * &lt;/complexType&gt; &lt;/element&gt;
        + * &lt;/sequence&gt; &lt;attGroup
        + * ref="{www.jalview.org}swingwindow"/&gt; &lt;attribute
        + * name="conservationSelected" type="{http://www.w3.org/2001/XMLSchema}boolean"
        + * /&gt; &lt;attribute name="pidSelected"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt; &lt;attribute
        + * name="bgColour" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        + * &lt;attribute name="consThreshold"
        + * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        + * name="pidThreshold" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        + * &lt;attribute name="title"
        + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute
        + * name="showFullId" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        + * &lt;attribute name="rightAlignIds"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt; &lt;attribute
        + * name="showText" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        + * &lt;attribute name="showColourText"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt; &lt;attribute
        + * name="showUnconserved" type="{http://www.w3.org/2001/XMLSchema}boolean"
        + * default="false" /&gt; &lt;attribute name="showBoxes"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt; &lt;attribute
        + * name="wrapAlignment" type="{http://www.w3.org/2001/XMLSchema}boolean"
        + * /&gt; &lt;attribute name="renderGaps"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt; &lt;attribute
        + * name="showSequenceFeatures" type="{http://www.w3.org/2001/XMLSchema}boolean"
        + * /&gt; &lt;attribute name="showNPfeatureTooltip"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt; &lt;attribute
        + * name="showDbRefTooltip" type="{http://www.w3.org/2001/XMLSchema}boolean"
        + * /&gt; &lt;attribute name="followHighlight"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        + * &lt;attribute name="followSelection"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        + * &lt;attribute name="showAnnotation"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt; &lt;attribute
        + * name="centreColumnLabels" type="{http://www.w3.org/2001/XMLSchema}boolean"
        + * default="false" /&gt; &lt;attribute name="showGroupConservation"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        + * &lt;attribute name="showGroupConsensus"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        + * &lt;attribute name="showConsensusHistogram"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        + * &lt;attribute name="showSequenceLogo"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        + * &lt;attribute name="normaliseSequenceLogo"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        + * &lt;attribute name="ignoreGapsinConsensus"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        + * &lt;attribute name="startRes"
        + * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        + * name="startSeq" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        + * &lt;attribute name="fontName"
        + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute
        + * name="fontSize" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        + * &lt;attribute name="fontStyle"
        + * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        + * name="scaleProteinAsCdna" type="{http://www.w3.org/2001/XMLSchema}boolean"
        + * default="true" /&gt; &lt;attribute name="viewName"
        + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute
        + * name="sequenceSetId" type="{http://www.w3.org/2001/XMLSchema}string"
        + * /&gt; &lt;attribute name="gatheredViews"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt; &lt;attribute
        + * name="textCol1" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        + * &lt;attribute name="textCol2"
        + * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        + * name="textColThreshold" type="{http://www.w3.org/2001/XMLSchema}int"
        + * /&gt; &lt;attribute name="id"
        + * type="{http://www.w3.org/2001/XMLSchema}ID" /&gt; &lt;attribute
        + * name="complementId" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        + * &lt;attribute name="showComplementFeatures"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        + * &lt;attribute name="showComplementFeaturesOnTop"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        + * &lt;/restriction&gt; &lt;/complexContent&gt;
        + * &lt;/complexType&gt; &lt;/element&gt; &lt;element
        + * name="UserColours" maxOccurs="unbounded" minOccurs="0"&gt;
        + * &lt;complexType&gt; &lt;complexContent&gt;
        + * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        + * &lt;sequence&gt; &lt;element name="UserColourScheme"
        + * type="{www.jalview.org/colours}JalviewUserColours"/&gt;
        + * &lt;/sequence&gt; &lt;attribute name="id"
        + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        + * &lt;/restriction&gt; &lt;/complexContent&gt;
        + * &lt;/complexType&gt; &lt;/element&gt; &lt;element
        + * name="tree" maxOccurs="unbounded" minOccurs="0"&gt;
        + * &lt;complexType&gt; &lt;complexContent&gt;
        + * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        + * &lt;sequence minOccurs="0"&gt; &lt;element name="title"
        + * type="{http://www.w3.org/2001/XMLSchema}string"/&gt; &lt;element
        + * name="newick" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
        + * &lt;/sequence&gt; &lt;attGroup
        + * ref="{www.jalview.org}swingwindow"/&gt; &lt;attribute name="fontName"
        + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute
        + * name="fontSize" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        + * &lt;attribute name="fontStyle"
        + * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        + * name="threshold" type="{http://www.w3.org/2001/XMLSchema}float" /&gt;
        + * &lt;attribute name="showBootstrap"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt; &lt;attribute
        + * name="showDistances" type="{http://www.w3.org/2001/XMLSchema}boolean"
        + * /&gt; &lt;attribute name="markUnlinked"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt; &lt;attribute
        + * name="fitToWindow" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        + * &lt;attribute name="currentTree"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt; &lt;attribute
        + * name="id" type="{http://www.w3.org/2001/XMLSchema}ID" /&gt;
        + * &lt;attribute name="linkToAllViews"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        + * &lt;/restriction&gt; &lt;/complexContent&gt;
        + * &lt;/complexType&gt; &lt;/element&gt; &lt;element
        + * name="PcaViewer" maxOccurs="unbounded" minOccurs="0"&gt;
        + * &lt;complexType&gt; &lt;complexContent&gt;
        + * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        + * &lt;sequence&gt; &lt;element name="sequencePoint"
        + * maxOccurs="unbounded"&gt; &lt;complexType&gt;
        + * &lt;complexContent&gt; &lt;restriction
        + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; &lt;attGroup
        + * ref="{www.jalview.org}position"/&gt; &lt;attribute name="sequenceRef"
        + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        + * &lt;/restriction&gt; &lt;/complexContent&gt;
        + * &lt;/complexType&gt; &lt;/element&gt; &lt;element
        + * name="axis" maxOccurs="3" minOccurs="3"&gt; &lt;complexType&gt;
        + * &lt;complexContent&gt; &lt;restriction
        + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; &lt;attGroup
        + * ref="{www.jalview.org}position"/&gt; &lt;/restriction&gt;
        + * &lt;/complexContent&gt; &lt;/complexType&gt;
        + * &lt;/element&gt; &lt;element name="seqPointMin"&gt;
        + * &lt;complexType&gt; &lt;complexContent&gt;
        + * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        + * &lt;attGroup ref="{www.jalview.org}position"/&gt;
        + * &lt;/restriction&gt; &lt;/complexContent&gt;
        + * &lt;/complexType&gt; &lt;/element&gt; &lt;element
        + * name="seqPointMax"&gt; &lt;complexType&gt;
        + * &lt;complexContent&gt; &lt;restriction
        + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; &lt;attGroup
        + * ref="{www.jalview.org}position"/&gt; &lt;/restriction&gt;
        + * &lt;/complexContent&gt; &lt;/complexType&gt;
        + * &lt;/element&gt; &lt;element name="pcaData"
        + * type="{www.jalview.org}PcaDataType"/&gt; &lt;/sequence&gt;
        + * &lt;attGroup ref="{www.jalview.org}swingwindow"/&gt; &lt;attGroup
        + * ref="{www.jalview.org}SimilarityParams"/&gt; &lt;attribute
        + * name="title" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        + * &lt;attribute name="scoreModelName"
        + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute
        + * name="xDim" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        + * &lt;attribute name="yDim" type="{http://www.w3.org/2001/XMLSchema}int"
        + * /&gt; &lt;attribute name="zDim"
        + * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        + * name="bgColour" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        + * &lt;attribute name="scaleFactor"
        + * type="{http://www.w3.org/2001/XMLSchema}float" /&gt; &lt;attribute
        + * name="showLabels" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        + * &lt;attribute name="linkToAllViews"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        + * &lt;/restriction&gt; &lt;/complexContent&gt;
        + * &lt;/complexType&gt; &lt;/element&gt; &lt;element
        + * name="FeatureSettings" minOccurs="0"&gt; &lt;complexType&gt;
        + * &lt;complexContent&gt; &lt;restriction
        + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        + * &lt;sequence&gt; &lt;element name="setting" maxOccurs="unbounded"
        + * minOccurs="0"&gt; &lt;complexType&gt;
        + * &lt;complexContent&gt; &lt;restriction
        + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        + * &lt;sequence&gt; &lt;element name="attributeName"
        + * type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="2"
        + * minOccurs="0"/&gt; &lt;element name="matcherSet"
        + * type="{www.jalview.org/colours}FeatureMatcherSet" minOccurs="0"/&gt;
        + * &lt;/sequence&gt; &lt;attribute name="type" use="required"
        + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute
        + * name="colour" use="required" type="{http://www.w3.org/2001/XMLSchema}int"
        + * /&gt; &lt;attribute name="display" use="required"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt; &lt;attribute
        + * name="order" type="{http://www.w3.org/2001/XMLSchema}float" /&gt;
        + * &lt;attribute name="mincolour"
        + * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        + * name="noValueColour" type="{www.jalview.org/colours}NoValueColour"
        + * default="Min" /&gt; &lt;attribute name="threshold"
        + * type="{http://www.w3.org/2001/XMLSchema}float" /&gt; &lt;attribute
        + * name="threshstate" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        + * &lt;attribute name="max" type="{http://www.w3.org/2001/XMLSchema}float"
        + * /&gt; &lt;attribute name="min"
        + * type="{http://www.w3.org/2001/XMLSchema}float" /&gt; &lt;attribute
        + * name="colourByLabel" type="{http://www.w3.org/2001/XMLSchema}boolean"
        + * /&gt; &lt;attribute name="autoScale"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        + * &lt;/restriction&gt; &lt;/complexContent&gt;
        + * &lt;/complexType&gt; &lt;/element&gt; &lt;element
        + * name="group" maxOccurs="unbounded" minOccurs="0"&gt;
        + * &lt;complexType&gt; &lt;complexContent&gt;
        + * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        + * &lt;attribute name="name" use="required"
        + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute
        + * name="display" use="required"
        + * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        + * &lt;/restriction&gt; &lt;/complexContent&gt;
        + * &lt;/complexType&gt; &lt;/element&gt;
        + * &lt;/sequence&gt; &lt;/restriction&gt;
        + * &lt;/complexContent&gt; &lt;/complexType&gt;
        + * &lt;/element&gt; &lt;/sequence&gt; &lt;/sequence&gt;
        + * &lt;/restriction&gt; &lt;/complexContent&gt;
        + * &lt;/complexType&gt; </pre>
          * 
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "JalviewModel", namespace = "www.jalview.org", propOrder = {
        -    "creationDate",
        -    "version",
        -    "vamsasModel",
        -    "jSeq",
        -    "jGroup",
        -    "viewport",
        -    "userColours",
        -    "tree",
        -    "pcaViewer",
        -    "featureSettings"
        -})
        -public class JalviewModel {
        -
        -    @XmlElement(required = true)
        -    @XmlSchemaType(name = "dateTime")
        -    protected XMLGregorianCalendar creationDate;
        -    @XmlElement(required = true)
        -    protected String version;
        -    @XmlElement(required = true)
        -    protected VAMSAS vamsasModel;
        -    @XmlElement(name = "JSeq")
        -    protected List jSeq;
        -    @XmlElement(name = "JGroup")
        -    protected List jGroup;
        -    @XmlElement(name = "Viewport")
        -    protected List viewport;
        -    @XmlElement(name = "UserColours")
        -    protected List userColours;
        -    protected List tree;
        -    @XmlElement(name = "PcaViewer")
        -    protected List pcaViewer;
        -    @XmlElement(name = "FeatureSettings")
        -    protected JalviewModel.FeatureSettings featureSettings;
        -
        -    /**
        -     * Gets the value of the creationDate property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link XMLGregorianCalendar }
        -     *     
        -     */
        -    public XMLGregorianCalendar getCreationDate() {
        -        return creationDate;
        -    }
        -
        -    /**
        -     * Sets the value of the creationDate property.
        +@XmlType(
        +  name = "JalviewModel",
        +  namespace = "www.jalview.org",
        +  propOrder =
        +  { "creationDate", "version", "vamsasModel", "jSeq", "jGroup", "viewport",
        +      "userColours", "tree", "pcaViewer", "featureSettings" })
        +public class JalviewModel
        +{
        +
        +  @XmlElement(required = true)
        +  @XmlSchemaType(name = "dateTime")
        +  protected XMLGregorianCalendar creationDate;
        +
        +  @XmlElement(required = true)
        +  protected String version;
        +
        +  @XmlElement(required = true)
        +  protected VAMSAS vamsasModel;
        +
        +  @XmlElement(name = "JSeq")
        +  protected List jSeq;
        +
        +  @XmlElement(name = "JGroup")
        +  protected List jGroup;
        +
        +  @XmlElement(name = "Viewport")
        +  protected List viewport;
        +
        +  @XmlElement(name = "UserColours")
        +  protected List userColours;
        +
        +  protected List tree;
        +
        +  @XmlElement(name = "PcaViewer")
        +  protected List pcaViewer;
        +
        +  @XmlElement(name = "FeatureSettings")
        +  protected JalviewModel.FeatureSettings featureSettings;
        +
        +  /**
        +   * Gets the value of the creationDate property.
        +   * 
        +   * @return possible object is {@link XMLGregorianCalendar }
        +   * 
        +   */
        +  public XMLGregorianCalendar getCreationDate()
        +  {
        +    return creationDate;
        +  }
        +
        +  /**
        +   * Sets the value of the creationDate property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link XMLGregorianCalendar }
        +   * 
        +   */
        +  public void setCreationDate(XMLGregorianCalendar value)
        +  {
        +    this.creationDate = value;
        +  }
        +
        +  /**
        +   * Gets the value of the version property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getVersion()
        +  {
        +    return version;
        +  }
        +
        +  /**
        +   * Sets the value of the version property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setVersion(String value)
        +  {
        +    this.version = value;
        +  }
        +
        +  /**
        +   * Gets the value of the vamsasModel property.
        +   * 
        +   * @return possible object is {@link VAMSAS }
        +   * 
        +   */
        +  public VAMSAS getVamsasModel()
        +  {
        +    return vamsasModel;
        +  }
        +
        +  /**
        +   * Sets the value of the vamsasModel property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link VAMSAS }
        +   * 
        +   */
        +  public void setVamsasModel(VAMSAS value)
        +  {
        +    this.vamsasModel = value;
        +  }
        +
        +  /**
        +   * Gets the value of the jSeq property.
        +   * 
        +   * <p> This accessor method returns a reference to the live list, not a
        +   * snapshot. Therefore any modification you make to the returned list will be
        +   * present inside the JAXB object. This is why there is not a
        +   * <CODE>set</CODE> method for the jSeq property.
        +   * 
        +   * <p> For example, to add a new item, do as follows: <pre>
        +   * getJSeq().add(newItem); </pre>
        +   * 
        +   * 
        +   * <p> Objects of the following type(s) are allowed in the list
        +   * {@link JalviewModel.JSeq }
        +   * 
        +   * 
        +   */
        +  public List getJSeq()
        +  {
        +    if (jSeq == null)
        +    {
        +      jSeq = new ArrayList();
        +    }
        +    return this.jSeq;
        +  }
        +
        +  /**
        +   * Gets the value of the jGroup property.
        +   * 
        +   * <p> This accessor method returns a reference to the live list, not a
        +   * snapshot. Therefore any modification you make to the returned list will be
        +   * present inside the JAXB object. This is why there is not a
        +   * <CODE>set</CODE> method for the jGroup property.
        +   * 
        +   * <p> For example, to add a new item, do as follows: <pre>
        +   * getJGroup().add(newItem); </pre>
        +   * 
        +   * 
        +   * <p> Objects of the following type(s) are allowed in the list
        +   * {@link JalviewModel.JGroup }
        +   * 
        +   * 
        +   */
        +  public List getJGroup()
        +  {
        +    if (jGroup == null)
        +    {
        +      jGroup = new ArrayList();
        +    }
        +    return this.jGroup;
        +  }
        +
        +  /**
        +   * Gets the value of the viewport property.
        +   * 
        +   * <p> This accessor method returns a reference to the live list, not a
        +   * snapshot. Therefore any modification you make to the returned list will be
        +   * present inside the JAXB object. This is why there is not a
        +   * <CODE>set</CODE> method for the viewport property.
        +   * 
        +   * <p> For example, to add a new item, do as follows: <pre>
        +   * getViewport().add(newItem); </pre>
        +   * 
        +   * 
        +   * <p> Objects of the following type(s) are allowed in the list
        +   * {@link JalviewModel.Viewport }
        +   * 
        +   * 
        +   */
        +  public List getViewport()
        +  {
        +    if (viewport == null)
        +    {
        +      viewport = new ArrayList();
        +    }
        +    return this.viewport;
        +  }
        +
        +  /**
        +   * Gets the value of the userColours property.
        +   * 
        +   * <p> This accessor method returns a reference to the live list, not a
        +   * snapshot. Therefore any modification you make to the returned list will be
        +   * present inside the JAXB object. This is why there is not a
        +   * <CODE>set</CODE> method for the userColours property.
        +   * 
        +   * <p> For example, to add a new item, do as follows: <pre>
        +   * getUserColours().add(newItem); </pre>
        +   * 
        +   * 
        +   * <p> Objects of the following type(s) are allowed in the list
        +   * {@link JalviewModel.UserColours }
        +   * 
        +   * 
        +   */
        +  public List getUserColours()
        +  {
        +    if (userColours == null)
        +    {
        +      userColours = new ArrayList();
        +    }
        +    return this.userColours;
        +  }
        +
        +  /**
        +   * Gets the value of the tree property.
        +   * 
        +   * <p> This accessor method returns a reference to the live list, not a
        +   * snapshot. Therefore any modification you make to the returned list will be
        +   * present inside the JAXB object. This is why there is not a
        +   * <CODE>set</CODE> method for the tree property.
        +   * 
        +   * <p> For example, to add a new item, do as follows: <pre>
        +   * getTree().add(newItem); </pre>
        +   * 
        +   * 
        +   * <p> Objects of the following type(s) are allowed in the list
        +   * {@link JalviewModel.Tree }
        +   * 
        +   * 
        +   */
        +  public List getTree()
        +  {
        +    if (tree == null)
        +    {
        +      tree = new ArrayList();
        +    }
        +    return this.tree;
        +  }
        +
        +  /**
        +   * Gets the value of the pcaViewer property.
        +   * 
        +   * <p> This accessor method returns a reference to the live list, not a
        +   * snapshot. Therefore any modification you make to the returned list will be
        +   * present inside the JAXB object. This is why there is not a
        +   * <CODE>set</CODE> method for the pcaViewer property.
        +   * 
        +   * <p> For example, to add a new item, do as follows: <pre>
        +   * getPcaViewer().add(newItem); </pre>
        +   * 
        +   * 
        +   * <p> Objects of the following type(s) are allowed in the list
        +   * {@link JalviewModel.PcaViewer }
        +   * 
        +   * 
        +   */
        +  public List getPcaViewer()
        +  {
        +    if (pcaViewer == null)
        +    {
        +      pcaViewer = new ArrayList();
        +    }
        +    return this.pcaViewer;
        +  }
        +
        +  /**
        +   * Gets the value of the featureSettings property.
        +   * 
        +   * @return possible object is {@link JalviewModel.FeatureSettings }
        +   * 
        +   */
        +  public JalviewModel.FeatureSettings getFeatureSettings()
        +  {
        +    return featureSettings;
        +  }
        +
        +  /**
        +   * Sets the value of the featureSettings property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link JalviewModel.FeatureSettings }
        +   * 
        +   */
        +  public void setFeatureSettings(JalviewModel.FeatureSettings value)
        +  {
        +    this.featureSettings = value;
        +  }
        +
        +  /**
        +   * <p>Java class for anonymous complex type.
        +   * 
        +   * <p>The following schema fragment specifies the expected content
        +   * contained within this class.
        +   * 
        +   * <pre> &lt;complexType&gt; &lt;complexContent&gt;
        +   * &lt;restriction
        +   * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        +   * &lt;sequence&gt; &lt;element name="setting"
        +   * maxOccurs="unbounded" minOccurs="0"&gt; &lt;complexType&gt;
        +   * &lt;complexContent&gt; &lt;restriction
        +   * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        +   * &lt;sequence&gt; &lt;element name="attributeName"
        +   * type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="2"
        +   * minOccurs="0"/&gt; &lt;element name="matcherSet"
        +   * type="{www.jalview.org/colours}FeatureMatcherSet" minOccurs="0"/&gt;
        +   * &lt;/sequence&gt; &lt;attribute name="type" use="required"
        +   * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute
        +   * name="colour" use="required" type="{http://www.w3.org/2001/XMLSchema}int"
        +   * /&gt; &lt;attribute name="display" use="required"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +   * &lt;attribute name="order"
        +   * type="{http://www.w3.org/2001/XMLSchema}float" /&gt; &lt;attribute
        +   * name="mincolour" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        +   * &lt;attribute name="noValueColour"
        +   * type="{www.jalview.org/colours}NoValueColour" default="Min" /&gt;
        +   * &lt;attribute name="threshold"
        +   * type="{http://www.w3.org/2001/XMLSchema}float" /&gt; &lt;attribute
        +   * name="threshstate" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        +   * &lt;attribute name="max" type="{http://www.w3.org/2001/XMLSchema}float"
        +   * /&gt; &lt;attribute name="min"
        +   * type="{http://www.w3.org/2001/XMLSchema}float" /&gt; &lt;attribute
        +   * name="colourByLabel" type="{http://www.w3.org/2001/XMLSchema}boolean"
        +   * /&gt; &lt;attribute name="autoScale"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +   * &lt;/restriction&gt; &lt;/complexContent&gt;
        +   * &lt;/complexType&gt; &lt;/element&gt; &lt;element
        +   * name="group" maxOccurs="unbounded" minOccurs="0"&gt;
        +   * &lt;complexType&gt; &lt;complexContent&gt;
        +   * &lt;restriction
        +   * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; &lt;attribute
        +   * name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string"
        +   * /&gt; &lt;attribute name="display" use="required"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +   * &lt;/restriction&gt; &lt;/complexContent&gt;
        +   * &lt;/complexType&gt; &lt;/element&gt;
        +   * &lt;/sequence&gt; &lt;/restriction&gt;
        +   * &lt;/complexContent&gt; &lt;/complexType&gt; </pre>
        +   * 
        +   * 
        +   */
        +  @XmlAccessorType(XmlAccessType.FIELD)
        +  @XmlType(name = "", propOrder = { "setting", "group" })
        +  public static class FeatureSettings
        +  {
        +
        +    @XmlElement(namespace = "www.jalview.org")
        +    protected List setting;
        +
        +    @XmlElement(namespace = "www.jalview.org")
        +    protected List group;
        +
        +    /**
        +     * Gets the value of the setting property.
        +     * 
        +     * <p> This accessor method returns a reference to the live list, not
        +     * a snapshot. Therefore any modification you make to the returned list will
        +     * be present inside the JAXB object. This is why there is not a
        +     * <CODE>set</CODE> method for the setting property.
        +     * 
        +     * <p> For example, to add a new item, do as follows: <pre>
        +     * getSetting().add(newItem); </pre>
        +     * 
        +     * 
        +     * <p> Objects of the following type(s) are allowed in the list
        +     * {@link JalviewModel.FeatureSettings.Setting }
        +     * 
        +     * 
        +     */
        +    public List getSetting()
        +    {
        +      if (setting == null)
        +      {
        +        setting = new ArrayList();
        +      }
        +      return this.setting;
        +    }
        +
        +    /**
        +     * Gets the value of the group property.
        +     * 
        +     * <p> This accessor method returns a reference to the live list, not
        +     * a snapshot. Therefore any modification you make to the returned list will
        +     * be present inside the JAXB object. This is why there is not a
        +     * <CODE>set</CODE> method for the group property.
        +     * 
        +     * <p> For example, to add a new item, do as follows: <pre>
        +     * getGroup().add(newItem); </pre>
        +     * 
        +     * 
        +     * <p> Objects of the following type(s) are allowed in the list
        +     * {@link JalviewModel.FeatureSettings.Group }
        +     * 
        +     * 
        +     */
        +    public List getGroup()
        +    {
        +      if (group == null)
        +      {
        +        group = new ArrayList();
        +      }
        +      return this.group;
        +    }
        +
        +    /**
        +     * <p>Java class for anonymous complex type.
        +     * 
        +     * <p>The following schema fragment specifies the expected content
        +     * contained within this class.
        +     * 
        +     * <pre> &lt;complexType&gt; &lt;complexContent&gt;
        +     * &lt;restriction
        +     * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        +     * &lt;attribute name="name" use="required"
        +     * type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        +     * &lt;attribute name="display" use="required"
        +     * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +     * &lt;/restriction&gt; &lt;/complexContent&gt;
        +     * &lt;/complexType&gt; </pre>
        +     * 
        +     * 
        +     */
        +    @XmlAccessorType(XmlAccessType.FIELD)
        +    @XmlType(name = "")
        +    public static class Group
        +    {
        +
        +      @XmlAttribute(name = "name", required = true)
        +      protected String name;
        +
        +      @XmlAttribute(name = "display", required = true)
        +      protected boolean display;
        +
        +      /**
        +       * Gets the value of the name property.
        +       * 
        +       * @return possible object is {@link String }
        +       * 
        +       */
        +      public String getName()
        +      {
        +        return name;
        +      }
        +
        +      /**
        +       * Sets the value of the name property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link String }
        +       * 
        +       */
        +      public void setName(String value)
        +      {
        +        this.name = value;
        +      }
        +
        +      /**
        +       * Gets the value of the display property.
        +       * 
        +       */
        +      public boolean isDisplay()
        +      {
        +        return display;
        +      }
        +
        +      /**
        +       * Sets the value of the display property.
        +       * 
        +       */
        +      public void setDisplay(boolean value)
        +      {
        +        this.display = value;
        +      }
        +
        +    }
        +
        +    /**
        +     * <p>Java class for anonymous complex type.
        +     * 
        +     * <p>The following schema fragment specifies the expected content
        +     * contained within this class.
        +     * 
        +     * <pre> &lt;complexType&gt; &lt;complexContent&gt;
        +     * &lt;restriction
        +     * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        +     * &lt;sequence&gt; &lt;element name="attributeName"
        +     * type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="2"
        +     * minOccurs="0"/&gt; &lt;element name="matcherSet"
        +     * type="{www.jalview.org/colours}FeatureMatcherSet" minOccurs="0"/&gt;
        +     * &lt;/sequence&gt; &lt;attribute name="type" use="required"
        +     * type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        +     * &lt;attribute name="colour" use="required"
        +     * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        +     * name="display" use="required"
        +     * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +     * &lt;attribute name="order"
        +     * type="{http://www.w3.org/2001/XMLSchema}float" /&gt;
        +     * &lt;attribute name="mincolour"
        +     * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        +     * name="noValueColour" type="{www.jalview.org/colours}NoValueColour"
        +     * default="Min" /&gt; &lt;attribute name="threshold"
        +     * type="{http://www.w3.org/2001/XMLSchema}float" /&gt;
        +     * &lt;attribute name="threshstate"
        +     * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        +     * name="max" type="{http://www.w3.org/2001/XMLSchema}float" /&gt;
        +     * &lt;attribute name="min"
        +     * type="{http://www.w3.org/2001/XMLSchema}float" /&gt;
        +     * &lt;attribute name="colourByLabel"
        +     * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +     * &lt;attribute name="autoScale"
        +     * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +     * &lt;/restriction&gt; &lt;/complexContent&gt;
        +     * &lt;/complexType&gt; </pre>
        +     * 
        +     * 
        +     */
        +    @XmlAccessorType(XmlAccessType.FIELD)
        +    @XmlType(name = "", propOrder = { "attributeName", "matcherSet" })
        +    public static class Setting
        +    {
        +
        +      @XmlElement(namespace = "www.jalview.org")
        +      protected List attributeName;
        +
        +      @XmlElement(namespace = "www.jalview.org")
        +      protected FeatureMatcherSet matcherSet;
        +
        +      @XmlAttribute(name = "type", required = true)
        +      protected String type;
        +
        +      @XmlAttribute(name = "colour", required = true)
        +      protected int colour;
        +
        +      @XmlAttribute(name = "display", required = true)
        +      protected boolean display;
        +
        +      @XmlAttribute(name = "order")
        +      protected Float order;
        +
        +      @XmlAttribute(name = "mincolour")
        +      protected Integer mincolour;
        +
        +      @XmlAttribute(name = "noValueColour")
        +      protected NoValueColour noValueColour;
        +
        +      @XmlAttribute(name = "threshold")
        +      protected Float threshold;
        +
        +      @XmlAttribute(name = "threshstate")
        +      protected Integer threshstate;
        +
        +      @XmlAttribute(name = "max")
        +      protected Float max;
        +
        +      @XmlAttribute(name = "min")
        +      protected Float min;
        +
        +      @XmlAttribute(name = "colourByLabel")
        +      protected Boolean colourByLabel;
        +
        +      @XmlAttribute(name = "autoScale")
        +      protected Boolean autoScale;
        +
        +      /**
        +       * Gets the value of the attributeName property.
        +       * 
        +       * <p> This accessor method returns a reference to the live list,
        +       * not a snapshot. Therefore any modification you make to the returned
        +       * list will be present inside the JAXB object. This is why there is not a
        +       * <CODE>set</CODE> method for the attributeName property.
        +       * 
        +       * <p> For example, to add a new item, do as follows: <pre>
        +       * getAttributeName().add(newItem); </pre>
        +       * 
        +       * 
        +       * <p> Objects of the following type(s) are allowed in the list
        +       * {@link String }
        +       * 
        +       * 
        +       */
        +      public List getAttributeName()
        +      {
        +        if (attributeName == null)
        +        {
        +          attributeName = new ArrayList();
        +        }
        +        return this.attributeName;
        +      }
        +
        +      /**
        +       * Gets the value of the matcherSet property.
        +       * 
        +       * @return possible object is {@link FeatureMatcherSet }
        +       * 
        +       */
        +      public FeatureMatcherSet getMatcherSet()
        +      {
        +        return matcherSet;
        +      }
        +
        +      /**
        +       * Sets the value of the matcherSet property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link FeatureMatcherSet }
        +       * 
        +       */
        +      public void setMatcherSet(FeatureMatcherSet value)
        +      {
        +        this.matcherSet = value;
        +      }
        +
        +      /**
        +       * Gets the value of the type property.
        +       * 
        +       * @return possible object is {@link String }
        +       * 
        +       */
        +      public String getType()
        +      {
        +        return type;
        +      }
        +
        +      /**
        +       * Sets the value of the type property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link String }
        +       * 
        +       */
        +      public void setType(String value)
        +      {
        +        this.type = value;
        +      }
        +
        +      /**
        +       * Gets the value of the colour property.
        +       * 
        +       */
        +      public int getColour()
        +      {
        +        return colour;
        +      }
        +
        +      /**
        +       * Sets the value of the colour property.
        +       * 
        +       */
        +      public void setColour(int value)
        +      {
        +        this.colour = value;
        +      }
        +
        +      /**
        +       * Gets the value of the display property.
        +       * 
        +       */
        +      public boolean isDisplay()
        +      {
        +        return display;
        +      }
        +
        +      /**
        +       * Sets the value of the display property.
        +       * 
        +       */
        +      public void setDisplay(boolean value)
        +      {
        +        this.display = value;
        +      }
        +
        +      /**
        +       * Gets the value of the order property.
        +       * 
        +       * @return possible object is {@link Float }
        +       * 
        +       */
        +      public Float getOrder()
        +      {
        +        return order;
        +      }
        +
        +      /**
        +       * Sets the value of the order property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Float }
        +       * 
        +       */
        +      public void setOrder(Float value)
        +      {
        +        this.order = value;
        +      }
        +
        +      /**
        +       * Gets the value of the mincolour property.
        +       * 
        +       * @return possible object is {@link Integer }
        +       * 
        +       */
        +      public Integer getMincolour()
        +      {
        +        return mincolour;
        +      }
        +
        +      /**
        +       * Sets the value of the mincolour property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Integer }
        +       * 
        +       */
        +      public void setMincolour(Integer value)
        +      {
        +        this.mincolour = value;
        +      }
        +
        +      /**
        +       * Gets the value of the noValueColour property.
        +       * 
        +       * @return possible object is {@link NoValueColour }
        +       * 
        +       */
        +      public NoValueColour getNoValueColour()
        +      {
        +        if (noValueColour == null)
        +        {
        +          return NoValueColour.MIN;
        +        }
        +        else
        +        {
        +          return noValueColour;
        +        }
        +      }
        +
        +      /**
        +       * Sets the value of the noValueColour property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link NoValueColour }
        +       * 
        +       */
        +      public void setNoValueColour(NoValueColour value)
        +      {
        +        this.noValueColour = value;
        +      }
        +
        +      /**
        +       * Gets the value of the threshold property.
        +       * 
        +       * @return possible object is {@link Float }
        +       * 
        +       */
        +      public Float getThreshold()
        +      {
        +        return threshold;
        +      }
        +
        +      /**
        +       * Sets the value of the threshold property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Float }
        +       * 
        +       */
        +      public void setThreshold(Float value)
        +      {
        +        this.threshold = value;
        +      }
        +
        +      /**
        +       * Gets the value of the threshstate property.
        +       * 
        +       * @return possible object is {@link Integer }
        +       * 
        +       */
        +      public Integer getThreshstate()
        +      {
        +        return threshstate;
        +      }
        +
        +      /**
        +       * Sets the value of the threshstate property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Integer }
        +       * 
        +       */
        +      public void setThreshstate(Integer value)
        +      {
        +        this.threshstate = value;
        +      }
        +
        +      /**
        +       * Gets the value of the max property.
        +       * 
        +       * @return possible object is {@link Float }
        +       * 
        +       */
        +      public Float getMax()
        +      {
        +        return max;
        +      }
        +
        +      /**
        +       * Sets the value of the max property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Float }
        +       * 
        +       */
        +      public void setMax(Float value)
        +      {
        +        this.max = value;
        +      }
        +
        +      /**
        +       * Gets the value of the min property.
        +       * 
        +       * @return possible object is {@link Float }
        +       * 
        +       */
        +      public Float getMin()
        +      {
        +        return min;
        +      }
        +
        +      /**
        +       * Sets the value of the min property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Float }
        +       * 
        +       */
        +      public void setMin(Float value)
        +      {
        +        this.min = value;
        +      }
        +
        +      /**
        +       * Gets the value of the colourByLabel property.
        +       * 
        +       * @return possible object is {@link Boolean }
        +       * 
        +       */
        +      public Boolean isColourByLabel()
        +      {
        +        return colourByLabel;
        +      }
        +
        +      /**
        +       * Sets the value of the colourByLabel property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Boolean }
        +       * 
        +       */
        +      public void setColourByLabel(Boolean value)
        +      {
        +        this.colourByLabel = value;
        +      }
        +
        +      /**
        +       * Gets the value of the autoScale property.
        +       * 
        +       * @return possible object is {@link Boolean }
        +       * 
        +       */
        +      public Boolean isAutoScale()
        +      {
        +        return autoScale;
        +      }
        +
        +      /**
        +       * Sets the value of the autoScale property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Boolean }
        +       * 
        +       */
        +      public void setAutoScale(Boolean value)
        +      {
        +        this.autoScale = value;
        +      }
        +
        +    }
        +
        +  }
        +
        +  /**
        +   * <p>Java class for anonymous complex type.
        +   * 
        +   * <p>The following schema fragment specifies the expected content
        +   * contained within this class.
        +   * 
        +   * <pre> &lt;complexType&gt; &lt;complexContent&gt;
        +   * &lt;restriction
        +   * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        +   * &lt;sequence&gt; &lt;element name="seq"
        +   * type="{http://www.w3.org/2001/XMLSchema}string"
        +   * maxOccurs="unbounded"/&gt; &lt;element name="annotationColours"
        +   * type="{www.jalview.org}AnnotationColourScheme" minOccurs="0"/&gt;
        +   * &lt;/sequence&gt; &lt;attribute name="start"
        +   * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        +   * name="end" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        +   * &lt;attribute name="name"
        +   * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute
        +   * name="colour" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        +   * &lt;attribute name="consThreshold"
        +   * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        +   * name="pidThreshold" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        +   * &lt;attribute name="outlineColour"
        +   * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        +   * name="displayBoxes" type="{http://www.w3.org/2001/XMLSchema}boolean"
        +   * /&gt; &lt;attribute name="displayText"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +   * &lt;attribute name="colourText"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +   * &lt;attribute name="textCol1"
        +   * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        +   * name="textCol2" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        +   * &lt;attribute name="textColThreshold"
        +   * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        +   * name="showUnconserved" type="{http://www.w3.org/2001/XMLSchema}boolean"
        +   * /&gt; &lt;attribute name="ignoreGapsinConsensus"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        +   * &lt;attribute name="showConsensusHistogram"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        +   * &lt;attribute name="showSequenceLogo"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        +   * &lt;attribute name="normaliseSequenceLogo"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        +   * &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string"
        +   * /&gt; &lt;/restriction&gt; &lt;/complexContent&gt;
        +   * &lt;/complexType&gt; </pre>
        +   * 
        +   * 
        +   */
        +  @XmlAccessorType(XmlAccessType.FIELD)
        +  @XmlType(name = "", propOrder = { "seq", "annotationColours" })
        +  public static class JGroup
        +  {
        +
        +    @XmlElement(namespace = "www.jalview.org", required = true)
        +    protected List seq;
        +
        +    @XmlElement(namespace = "www.jalview.org")
        +    protected AnnotationColourScheme annotationColours;
        +
        +    @XmlAttribute(name = "start")
        +    protected Integer start;
        +
        +    @XmlAttribute(name = "end")
        +    protected Integer end;
        +
        +    @XmlAttribute(name = "name")
        +    protected String name;
        +
        +    @XmlAttribute(name = "colour")
        +    protected String colour;
        +
        +    @XmlAttribute(name = "consThreshold")
        +    protected Integer consThreshold;
        +
        +    @XmlAttribute(name = "pidThreshold")
        +    protected Integer pidThreshold;
        +
        +    @XmlAttribute(name = "outlineColour")
        +    protected Integer outlineColour;
        +
        +    @XmlAttribute(name = "displayBoxes")
        +    protected Boolean displayBoxes;
        +
        +    @XmlAttribute(name = "displayText")
        +    protected Boolean displayText;
        +
        +    @XmlAttribute(name = "colourText")
        +    protected Boolean colourText;
        +
        +    @XmlAttribute(name = "textCol1")
        +    protected Integer textCol1;
        +
        +    @XmlAttribute(name = "textCol2")
        +    protected Integer textCol2;
        +
        +    @XmlAttribute(name = "textColThreshold")
        +    protected Integer textColThreshold;
        +
        +    @XmlAttribute(name = "showUnconserved")
        +    protected Boolean showUnconserved;
        +
        +    @XmlAttribute(name = "ignoreGapsinConsensus")
        +    protected Boolean ignoreGapsinConsensus;
        +
        +    @XmlAttribute(name = "showConsensusHistogram")
        +    protected Boolean showConsensusHistogram;
        +
        +    @XmlAttribute(name = "showSequenceLogo")
        +    protected Boolean showSequenceLogo;
        +
        +    @XmlAttribute(name = "normaliseSequenceLogo")
        +    protected Boolean normaliseSequenceLogo;
        +
        +    @XmlAttribute(name = "id")
        +    protected String id;
        +
        +    /**
        +     * Gets the value of the seq property.
        +     * 
        +     * <p> This accessor method returns a reference to the live list, not
        +     * a snapshot. Therefore any modification you make to the returned list will
        +     * be present inside the JAXB object. This is why there is not a
        +     * <CODE>set</CODE> method for the seq property.
        +     * 
        +     * <p> For example, to add a new item, do as follows: <pre>
        +     * getSeq().add(newItem); </pre>
        +     * 
        +     * 
        +     * <p> Objects of the following type(s) are allowed in the list
        +     * {@link String }
        +     * 
              * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link XMLGregorianCalendar }
        -     *     
              */
        -    public void setCreationDate(XMLGregorianCalendar value) {
        -        this.creationDate = value;
        +    public List getSeq()
        +    {
        +      if (seq == null)
        +      {
        +        seq = new ArrayList();
        +      }
        +      return this.seq;
             }
         
             /**
        -     * Gets the value of the version property.
        +     * Gets the value of the annotationColours property.
        +     * 
        +     * @return possible object is {@link AnnotationColourScheme }
              * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
              */
        -    public String getVersion() {
        -        return version;
        +    public AnnotationColourScheme getAnnotationColours()
        +    {
        +      return annotationColours;
             }
         
             /**
        -     * Sets the value of the version property.
        +     * Sets the value of the annotationColours property.
              * 
              * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        +     *          allowed object is {@link AnnotationColourScheme }
        +     * 
              */
        -    public void setVersion(String value) {
        -        this.version = value;
        +    public void setAnnotationColours(AnnotationColourScheme value)
        +    {
        +      this.annotationColours = value;
             }
         
             /**
        -     * Gets the value of the vamsasModel property.
        +     * Gets the value of the start property.
        +     * 
        +     * @return possible object is {@link Integer }
              * 
        -     * @return
        -     *     possible object is
        -     *     {@link VAMSAS }
        -     *     
              */
        -    public VAMSAS getVamsasModel() {
        -        return vamsasModel;
        +    public Integer getStart()
        +    {
        +      return start;
             }
         
             /**
        -     * Sets the value of the vamsasModel property.
        +     * Sets the value of the start property.
              * 
              * @param value
        -     *     allowed object is
        -     *     {@link VAMSAS }
        -     *     
        +     *          allowed object is {@link Integer }
        +     * 
              */
        -    public void setVamsasModel(VAMSAS value) {
        -        this.vamsasModel = value;
        +    public void setStart(Integer value)
        +    {
        +      this.start = value;
             }
         
             /**
        -     * Gets the value of the jSeq property.
        +     * Gets the value of the end property.
              * 
        -     * <p>
        -     * This accessor method returns a reference to the live list,
        -     * not a snapshot. Therefore any modification you make to the
        -     * returned list will be present inside the JAXB object.
        -     * This is why there is not a <CODE>set</CODE> method for the jSeq property.
        +     * @return possible object is {@link Integer }
              * 
        -     * <p>
        -     * For example, to add a new item, do as follows:
        -     * <pre>
        -     *    getJSeq().add(newItem);
        -     * </pre>
        +     */
        +    public Integer getEnd()
        +    {
        +      return end;
        +    }
        +
        +    /**
        +     * Sets the value of the end property.
              * 
        +     * @param value
        +     *          allowed object is {@link Integer }
              * 
        -     * <p>
        -     * Objects of the following type(s) are allowed in the list
        -     * {@link JalviewModel.JSeq }
        +     */
        +    public void setEnd(Integer value)
        +    {
        +      this.end = value;
        +    }
        +
        +    /**
        +     * Gets the value of the name property.
              * 
        +     * @return possible object is {@link String }
              * 
              */
        -    public List getJSeq() {
        -        if (jSeq == null) {
        -            jSeq = new ArrayList();
        -        }
        -        return this.jSeq;
        +    public String getName()
        +    {
        +      return name;
             }
         
             /**
        -     * Gets the value of the jGroup property.
        +     * Sets the value of the name property.
              * 
        -     * <p>
        -     * This accessor method returns a reference to the live list,
        -     * not a snapshot. Therefore any modification you make to the
        -     * returned list will be present inside the JAXB object.
        -     * This is why there is not a <CODE>set</CODE> method for the jGroup property.
        +     * @param value
        +     *          allowed object is {@link String }
              * 
        -     * <p>
        -     * For example, to add a new item, do as follows:
        -     * <pre>
        -     *    getJGroup().add(newItem);
        -     * </pre>
        +     */
        +    public void setName(String value)
        +    {
        +      this.name = value;
        +    }
        +
        +    /**
        +     * Gets the value of the colour property.
              * 
        +     * @return possible object is {@link String }
              * 
        -     * <p>
        -     * Objects of the following type(s) are allowed in the list
        -     * {@link JalviewModel.JGroup }
        +     */
        +    public String getColour()
        +    {
        +      return colour;
        +    }
        +
        +    /**
        +     * Sets the value of the colour property.
              * 
        +     * @param value
        +     *          allowed object is {@link String }
              * 
              */
        -    public List getJGroup() {
        -        if (jGroup == null) {
        -            jGroup = new ArrayList();
        -        }
        -        return this.jGroup;
        +    public void setColour(String value)
        +    {
        +      this.colour = value;
             }
         
             /**
        -     * Gets the value of the viewport property.
        +     * Gets the value of the consThreshold property.
              * 
        -     * <p>
        -     * This accessor method returns a reference to the live list,
        -     * not a snapshot. Therefore any modification you make to the
        -     * returned list will be present inside the JAXB object.
        -     * This is why there is not a <CODE>set</CODE> method for the viewport property.
        +     * @return possible object is {@link Integer }
              * 
        -     * <p>
        -     * For example, to add a new item, do as follows:
        -     * <pre>
        -     *    getViewport().add(newItem);
        -     * </pre>
        +     */
        +    public Integer getConsThreshold()
        +    {
        +      return consThreshold;
        +    }
        +
        +    /**
        +     * Sets the value of the consThreshold property.
              * 
        +     * @param value
        +     *          allowed object is {@link Integer }
              * 
        -     * <p>
        -     * Objects of the following type(s) are allowed in the list
        -     * {@link JalviewModel.Viewport }
        +     */
        +    public void setConsThreshold(Integer value)
        +    {
        +      this.consThreshold = value;
        +    }
        +
        +    /**
        +     * Gets the value of the pidThreshold property.
              * 
        +     * @return possible object is {@link Integer }
              * 
              */
        -    public List getViewport() {
        -        if (viewport == null) {
        -            viewport = new ArrayList();
        -        }
        -        return this.viewport;
        +    public Integer getPidThreshold()
        +    {
        +      return pidThreshold;
             }
         
             /**
        -     * Gets the value of the userColours property.
        +     * Sets the value of the pidThreshold property.
              * 
        -     * <p>
        -     * This accessor method returns a reference to the live list,
        -     * not a snapshot. Therefore any modification you make to the
        -     * returned list will be present inside the JAXB object.
        -     * This is why there is not a <CODE>set</CODE> method for the userColours property.
        +     * @param value
        +     *          allowed object is {@link Integer }
              * 
        -     * <p>
        -     * For example, to add a new item, do as follows:
        -     * <pre>
        -     *    getUserColours().add(newItem);
        -     * </pre>
        +     */
        +    public void setPidThreshold(Integer value)
        +    {
        +      this.pidThreshold = value;
        +    }
        +
        +    /**
        +     * Gets the value of the outlineColour property.
              * 
        +     * @return possible object is {@link Integer }
              * 
        -     * <p>
        -     * Objects of the following type(s) are allowed in the list
        -     * {@link JalviewModel.UserColours }
        +     */
        +    public Integer getOutlineColour()
        +    {
        +      return outlineColour;
        +    }
        +
        +    /**
        +     * Sets the value of the outlineColour property.
              * 
        +     * @param value
        +     *          allowed object is {@link Integer }
              * 
              */
        -    public List getUserColours() {
        -        if (userColours == null) {
        -            userColours = new ArrayList();
        -        }
        -        return this.userColours;
        +    public void setOutlineColour(Integer value)
        +    {
        +      this.outlineColour = value;
             }
         
             /**
        -     * Gets the value of the tree property.
        +     * Gets the value of the displayBoxes property.
              * 
        -     * <p>
        -     * This accessor method returns a reference to the live list,
        -     * not a snapshot. Therefore any modification you make to the
        -     * returned list will be present inside the JAXB object.
        -     * This is why there is not a <CODE>set</CODE> method for the tree property.
        +     * @return possible object is {@link Boolean }
              * 
        -     * <p>
        -     * For example, to add a new item, do as follows:
        -     * <pre>
        -     *    getTree().add(newItem);
        -     * </pre>
        +     */
        +    public Boolean isDisplayBoxes()
        +    {
        +      return displayBoxes;
        +    }
        +
        +    /**
        +     * Sets the value of the displayBoxes property.
              * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
              * 
        -     * <p>
        -     * Objects of the following type(s) are allowed in the list
        -     * {@link JalviewModel.Tree }
        +     */
        +    public void setDisplayBoxes(Boolean value)
        +    {
        +      this.displayBoxes = value;
        +    }
        +
        +    /**
        +     * Gets the value of the displayText property.
              * 
        +     * @return possible object is {@link Boolean }
              * 
              */
        -    public List getTree() {
        -        if (tree == null) {
        -            tree = new ArrayList();
        -        }
        -        return this.tree;
        +    public Boolean isDisplayText()
        +    {
        +      return displayText;
             }
         
             /**
        -     * Gets the value of the pcaViewer property.
        +     * Sets the value of the displayText property.
              * 
        -     * <p>
        -     * This accessor method returns a reference to the live list,
        -     * not a snapshot. Therefore any modification you make to the
        -     * returned list will be present inside the JAXB object.
        -     * This is why there is not a <CODE>set</CODE> method for the pcaViewer property.
        +     * @param value
        +     *          allowed object is {@link Boolean }
              * 
        -     * <p>
        -     * For example, to add a new item, do as follows:
        -     * <pre>
        -     *    getPcaViewer().add(newItem);
        -     * </pre>
        +     */
        +    public void setDisplayText(Boolean value)
        +    {
        +      this.displayText = value;
        +    }
        +
        +    /**
        +     * Gets the value of the colourText property.
              * 
        +     * @return possible object is {@link Boolean }
              * 
        -     * <p>
        -     * Objects of the following type(s) are allowed in the list
        -     * {@link JalviewModel.PcaViewer }
        +     */
        +    public Boolean isColourText()
        +    {
        +      return colourText;
        +    }
        +
        +    /**
        +     * Sets the value of the colourText property.
              * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
              * 
              */
        -    public List getPcaViewer() {
        -        if (pcaViewer == null) {
        -            pcaViewer = new ArrayList();
        -        }
        -        return this.pcaViewer;
        +    public void setColourText(Boolean value)
        +    {
        +      this.colourText = value;
             }
         
             /**
        -     * Gets the value of the featureSettings property.
        +     * Gets the value of the textCol1 property.
        +     * 
        +     * @return possible object is {@link Integer }
              * 
        -     * @return
        -     *     possible object is
        -     *     {@link JalviewModel.FeatureSettings }
        -     *     
              */
        -    public JalviewModel.FeatureSettings getFeatureSettings() {
        -        return featureSettings;
        +    public Integer getTextCol1()
        +    {
        +      return textCol1;
             }
         
             /**
        -     * Sets the value of the featureSettings property.
        +     * Sets the value of the textCol1 property.
              * 
              * @param value
        -     *     allowed object is
        -     *     {@link JalviewModel.FeatureSettings }
        -     *     
        +     *          allowed object is {@link Integer }
        +     * 
              */
        -    public void setFeatureSettings(JalviewModel.FeatureSettings value) {
        -        this.featureSettings = value;
        +    public void setTextCol1(Integer value)
        +    {
        +      this.textCol1 = value;
             }
         
        +    /**
        +     * Gets the value of the textCol2 property.
        +     * 
        +     * @return possible object is {@link Integer }
        +     * 
        +     */
        +    public Integer getTextCol2()
        +    {
        +      return textCol2;
        +    }
         
             /**
        -     * <p>Java class for anonymous complex type.
        +     * Sets the value of the textCol2 property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Integer }
              * 
        -     * <p>The following schema fragment specifies the expected content contained within this class.
        -     * 
        -     * <pre>
        -     * &lt;complexType&gt;
        -     *   &lt;complexContent&gt;
        -     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        -     *       &lt;sequence&gt;
        -     *         &lt;element name="setting" maxOccurs="unbounded" minOccurs="0"&gt;
        -     *           &lt;complexType&gt;
        -     *             &lt;complexContent&gt;
        -     *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        -     *                 &lt;sequence&gt;
        -     *                   &lt;element name="attributeName" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="2" minOccurs="0"/&gt;
        -     *                   &lt;element name="matcherSet" type="{www.jalview.org/colours}FeatureMatcherSet" minOccurs="0"/&gt;
        -     *                 &lt;/sequence&gt;
        -     *                 &lt;attribute name="type" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -     *                 &lt;attribute name="colour" use="required" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -     *                 &lt;attribute name="display" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -     *                 &lt;attribute name="order" type="{http://www.w3.org/2001/XMLSchema}float" /&gt;
        -     *                 &lt;attribute name="mincolour" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -     *                 &lt;attribute name="noValueColour" type="{www.jalview.org/colours}NoValueColour" default="Min" /&gt;
        -     *                 &lt;attribute name="threshold" type="{http://www.w3.org/2001/XMLSchema}float" /&gt;
        -     *                 &lt;attribute name="threshstate" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -     *                 &lt;attribute name="max" type="{http://www.w3.org/2001/XMLSchema}float" /&gt;
        -     *                 &lt;attribute name="min" type="{http://www.w3.org/2001/XMLSchema}float" /&gt;
        -     *                 &lt;attribute name="colourByLabel" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -     *                 &lt;attribute name="autoScale" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -     *               &lt;/restriction&gt;
        -     *             &lt;/complexContent&gt;
        -     *           &lt;/complexType&gt;
        -     *         &lt;/element&gt;
        -     *         &lt;element name="group" maxOccurs="unbounded" minOccurs="0"&gt;
        -     *           &lt;complexType&gt;
        -     *             &lt;complexContent&gt;
        -     *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        -     *                 &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -     *                 &lt;attribute name="display" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -     *               &lt;/restriction&gt;
        -     *             &lt;/complexContent&gt;
        -     *           &lt;/complexType&gt;
        -     *         &lt;/element&gt;
        -     *       &lt;/sequence&gt;
        -     *     &lt;/restriction&gt;
        -     *   &lt;/complexContent&gt;
        -     * &lt;/complexType&gt;
        -     * </pre>
        +     */
        +    public void setTextCol2(Integer value)
        +    {
        +      this.textCol2 = value;
        +    }
        +
        +    /**
        +     * Gets the value of the textColThreshold property.
              * 
        +     * @return possible object is {@link Integer }
              * 
              */
        -    @XmlAccessorType(XmlAccessType.FIELD)
        -    @XmlType(name = "", propOrder = {
        -        "setting",
        -        "group"
        -    })
        -    public static class FeatureSettings {
        +    public Integer getTextColThreshold()
        +    {
        +      return textColThreshold;
        +    }
         
        -        @XmlElement(namespace = "www.jalview.org")
        -        protected List setting;
        -        @XmlElement(namespace = "www.jalview.org")
        -        protected List group;
        +    /**
        +     * Sets the value of the textColThreshold property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Integer }
        +     * 
        +     */
        +    public void setTextColThreshold(Integer value)
        +    {
        +      this.textColThreshold = value;
        +    }
         
        -        /**
        -         * Gets the value of the setting property.
        -         * 
        -         * <p>
        -         * This accessor method returns a reference to the live list,
        -         * not a snapshot. Therefore any modification you make to the
        -         * returned list will be present inside the JAXB object.
        -         * This is why there is not a <CODE>set</CODE> method for the setting property.
        -         * 
        -         * <p>
        -         * For example, to add a new item, do as follows:
        -         * <pre>
        -         *    getSetting().add(newItem);
        -         * </pre>
        -         * 
        -         * 
        -         * <p>
        -         * Objects of the following type(s) are allowed in the list
        -         * {@link JalviewModel.FeatureSettings.Setting }
        -         * 
        -         * 
        -         */
        -        public List getSetting() {
        -            if (setting == null) {
        -                setting = new ArrayList();
        -            }
        -            return this.setting;
        -        }
        +    /**
        +     * Gets the value of the showUnconserved property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public Boolean isShowUnconserved()
        +    {
        +      return showUnconserved;
        +    }
         
        -        /**
        -         * Gets the value of the group property.
        -         * 
        -         * <p>
        -         * This accessor method returns a reference to the live list,
        -         * not a snapshot. Therefore any modification you make to the
        -         * returned list will be present inside the JAXB object.
        -         * This is why there is not a <CODE>set</CODE> method for the group property.
        -         * 
        -         * <p>
        -         * For example, to add a new item, do as follows:
        -         * <pre>
        -         *    getGroup().add(newItem);
        -         * </pre>
        -         * 
        -         * 
        -         * <p>
        -         * Objects of the following type(s) are allowed in the list
        -         * {@link JalviewModel.FeatureSettings.Group }
        -         * 
        -         * 
        -         */
        -        public List getGroup() {
        -            if (group == null) {
        -                group = new ArrayList();
        -            }
        -            return this.group;
        -        }
        +    /**
        +     * Sets the value of the showUnconserved property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setShowUnconserved(Boolean value)
        +    {
        +      this.showUnconserved = value;
        +    }
         
        +    /**
        +     * Gets the value of the ignoreGapsinConsensus property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public boolean isIgnoreGapsinConsensus()
        +    {
        +      if (ignoreGapsinConsensus == null)
        +      {
        +        return true;
        +      }
        +      else
        +      {
        +        return ignoreGapsinConsensus;
        +      }
        +    }
         
        -        /**
        -         * <p>Java class for anonymous complex type.
        -         * 
        -         * <p>The following schema fragment specifies the expected content contained within this class.
        -         * 
        -         * <pre>
        -         * &lt;complexType&gt;
        -         *   &lt;complexContent&gt;
        -         *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        -         *       &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -         *       &lt;attribute name="display" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -         *     &lt;/restriction&gt;
        -         *   &lt;/complexContent&gt;
        -         * &lt;/complexType&gt;
        -         * </pre>
        -         * 
        -         * 
        -         */
        -        @XmlAccessorType(XmlAccessType.FIELD)
        -        @XmlType(name = "")
        -        public static class Group {
        -
        -            @XmlAttribute(name = "name", required = true)
        -            protected String name;
        -            @XmlAttribute(name = "display", required = true)
        -            protected boolean display;
        -
        -            /**
        -             * Gets the value of the name property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link String }
        -             *     
        -             */
        -            public String getName() {
        -                return name;
        -            }
        -
        -            /**
        -             * Sets the value of the name property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link String }
        -             *     
        -             */
        -            public void setName(String value) {
        -                this.name = value;
        -            }
        -
        -            /**
        -             * Gets the value of the display property.
        -             * 
        -             */
        -            public boolean isDisplay() {
        -                return display;
        -            }
        -
        -            /**
        -             * Sets the value of the display property.
        -             * 
        -             */
        -            public void setDisplay(boolean value) {
        -                this.display = value;
        -            }
        +    /**
        +     * Sets the value of the ignoreGapsinConsensus property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setIgnoreGapsinConsensus(Boolean value)
        +    {
        +      this.ignoreGapsinConsensus = value;
        +    }
         
        -        }
        +    /**
        +     * Gets the value of the showConsensusHistogram property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public boolean isShowConsensusHistogram()
        +    {
        +      if (showConsensusHistogram == null)
        +      {
        +        return true;
        +      }
        +      else
        +      {
        +        return showConsensusHistogram;
        +      }
        +    }
         
        +    /**
        +     * Sets the value of the showConsensusHistogram property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setShowConsensusHistogram(Boolean value)
        +    {
        +      this.showConsensusHistogram = value;
        +    }
         
        -        /**
        -         * <p>Java class for anonymous complex type.
        -         * 
        -         * <p>The following schema fragment specifies the expected content contained within this class.
        -         * 
        -         * <pre>
        -         * &lt;complexType&gt;
        -         *   &lt;complexContent&gt;
        -         *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        -         *       &lt;sequence&gt;
        -         *         &lt;element name="attributeName" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="2" minOccurs="0"/&gt;
        -         *         &lt;element name="matcherSet" type="{www.jalview.org/colours}FeatureMatcherSet" minOccurs="0"/&gt;
        -         *       &lt;/sequence&gt;
        -         *       &lt;attribute name="type" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -         *       &lt;attribute name="colour" use="required" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -         *       &lt;attribute name="display" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -         *       &lt;attribute name="order" type="{http://www.w3.org/2001/XMLSchema}float" /&gt;
        -         *       &lt;attribute name="mincolour" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -         *       &lt;attribute name="noValueColour" type="{www.jalview.org/colours}NoValueColour" default="Min" /&gt;
        -         *       &lt;attribute name="threshold" type="{http://www.w3.org/2001/XMLSchema}float" /&gt;
        -         *       &lt;attribute name="threshstate" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -         *       &lt;attribute name="max" type="{http://www.w3.org/2001/XMLSchema}float" /&gt;
        -         *       &lt;attribute name="min" type="{http://www.w3.org/2001/XMLSchema}float" /&gt;
        -         *       &lt;attribute name="colourByLabel" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -         *       &lt;attribute name="autoScale" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -         *     &lt;/restriction&gt;
        -         *   &lt;/complexContent&gt;
        -         * &lt;/complexType&gt;
        -         * </pre>
        -         * 
        -         * 
        -         */
        -        @XmlAccessorType(XmlAccessType.FIELD)
        -        @XmlType(name = "", propOrder = {
        -            "attributeName",
        -            "matcherSet"
        -        })
        -        public static class Setting {
        -
        -            @XmlElement(namespace = "www.jalview.org")
        -            protected List attributeName;
        -            @XmlElement(namespace = "www.jalview.org")
        -            protected FeatureMatcherSet matcherSet;
        -            @XmlAttribute(name = "type", required = true)
        -            protected String type;
        -            @XmlAttribute(name = "colour", required = true)
        -            protected int colour;
        -            @XmlAttribute(name = "display", required = true)
        -            protected boolean display;
        -            @XmlAttribute(name = "order")
        -            protected Float order;
        -            @XmlAttribute(name = "mincolour")
        -            protected Integer mincolour;
        -            @XmlAttribute(name = "noValueColour")
        -            protected NoValueColour noValueColour;
        -            @XmlAttribute(name = "threshold")
        -            protected Float threshold;
        -            @XmlAttribute(name = "threshstate")
        -            protected Integer threshstate;
        -            @XmlAttribute(name = "max")
        -            protected Float max;
        -            @XmlAttribute(name = "min")
        -            protected Float min;
        -            @XmlAttribute(name = "colourByLabel")
        -            protected Boolean colourByLabel;
        -            @XmlAttribute(name = "autoScale")
        -            protected Boolean autoScale;
        -
        -            /**
        -             * Gets the value of the attributeName property.
        -             * 
        -             * <p>
        -             * This accessor method returns a reference to the live list,
        -             * not a snapshot. Therefore any modification you make to the
        -             * returned list will be present inside the JAXB object.
        -             * This is why there is not a <CODE>set</CODE> method for the attributeName property.
        -             * 
        -             * <p>
        -             * For example, to add a new item, do as follows:
        -             * <pre>
        -             *    getAttributeName().add(newItem);
        -             * </pre>
        -             * 
        -             * 
        -             * <p>
        -             * Objects of the following type(s) are allowed in the list
        -             * {@link String }
        -             * 
        -             * 
        -             */
        -            public List getAttributeName() {
        -                if (attributeName == null) {
        -                    attributeName = new ArrayList();
        -                }
        -                return this.attributeName;
        -            }
        -
        -            /**
        -             * Gets the value of the matcherSet property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link FeatureMatcherSet }
        -             *     
        -             */
        -            public FeatureMatcherSet getMatcherSet() {
        -                return matcherSet;
        -            }
        -
        -            /**
        -             * Sets the value of the matcherSet property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link FeatureMatcherSet }
        -             *     
        -             */
        -            public void setMatcherSet(FeatureMatcherSet value) {
        -                this.matcherSet = value;
        -            }
        -
        -            /**
        -             * Gets the value of the type property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link String }
        -             *     
        -             */
        -            public String getType() {
        -                return type;
        -            }
        -
        -            /**
        -             * Sets the value of the type property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link String }
        -             *     
        -             */
        -            public void setType(String value) {
        -                this.type = value;
        -            }
        -
        -            /**
        -             * Gets the value of the colour property.
        -             * 
        -             */
        -            public int getColour() {
        -                return colour;
        -            }
        -
        -            /**
        -             * Sets the value of the colour property.
        -             * 
        -             */
        -            public void setColour(int value) {
        -                this.colour = value;
        -            }
        -
        -            /**
        -             * Gets the value of the display property.
        -             * 
        -             */
        -            public boolean isDisplay() {
        -                return display;
        -            }
        -
        -            /**
        -             * Sets the value of the display property.
        -             * 
        -             */
        -            public void setDisplay(boolean value) {
        -                this.display = value;
        -            }
        -
        -            /**
        -             * Gets the value of the order property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link Float }
        -             *     
        -             */
        -            public Float getOrder() {
        -                return order;
        -            }
        -
        -            /**
        -             * Sets the value of the order property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link Float }
        -             *     
        -             */
        -            public void setOrder(Float value) {
        -                this.order = value;
        -            }
        -
        -            /**
        -             * Gets the value of the mincolour property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link Integer }
        -             *     
        -             */
        -            public Integer getMincolour() {
        -                return mincolour;
        -            }
        -
        -            /**
        -             * Sets the value of the mincolour property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link Integer }
        -             *     
        -             */
        -            public void setMincolour(Integer value) {
        -                this.mincolour = value;
        -            }
        -
        -            /**
        -             * Gets the value of the noValueColour property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link NoValueColour }
        -             *     
        -             */
        -            public NoValueColour getNoValueColour() {
        -                if (noValueColour == null) {
        -                    return NoValueColour.MIN;
        -                } else {
        -                    return noValueColour;
        -                }
        -            }
        -
        -            /**
        -             * Sets the value of the noValueColour property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link NoValueColour }
        -             *     
        -             */
        -            public void setNoValueColour(NoValueColour value) {
        -                this.noValueColour = value;
        -            }
        -
        -            /**
        -             * Gets the value of the threshold property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link Float }
        -             *     
        -             */
        -            public Float getThreshold() {
        -                return threshold;
        -            }
        -
        -            /**
        -             * Sets the value of the threshold property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link Float }
        -             *     
        -             */
        -            public void setThreshold(Float value) {
        -                this.threshold = value;
        -            }
        -
        -            /**
        -             * Gets the value of the threshstate property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link Integer }
        -             *     
        -             */
        -            public Integer getThreshstate() {
        -                return threshstate;
        -            }
        -
        -            /**
        -             * Sets the value of the threshstate property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link Integer }
        -             *     
        -             */
        -            public void setThreshstate(Integer value) {
        -                this.threshstate = value;
        -            }
        -
        -            /**
        -             * Gets the value of the max property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link Float }
        -             *     
        -             */
        -            public Float getMax() {
        -                return max;
        -            }
        -
        -            /**
        -             * Sets the value of the max property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link Float }
        -             *     
        -             */
        -            public void setMax(Float value) {
        -                this.max = value;
        -            }
        -
        -            /**
        -             * Gets the value of the min property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link Float }
        -             *     
        -             */
        -            public Float getMin() {
        -                return min;
        -            }
        -
        -            /**
        -             * Sets the value of the min property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link Float }
        -             *     
        -             */
        -            public void setMin(Float value) {
        -                this.min = value;
        -            }
        -
        -            /**
        -             * Gets the value of the colourByLabel property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link Boolean }
        -             *     
        -             */
        -            public Boolean isColourByLabel() {
        -                return colourByLabel;
        -            }
        -
        -            /**
        -             * Sets the value of the colourByLabel property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link Boolean }
        -             *     
        -             */
        -            public void setColourByLabel(Boolean value) {
        -                this.colourByLabel = value;
        -            }
        -
        -            /**
        -             * Gets the value of the autoScale property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link Boolean }
        -             *     
        -             */
        -            public Boolean isAutoScale() {
        -                return autoScale;
        -            }
        -
        -            /**
        -             * Sets the value of the autoScale property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link Boolean }
        -             *     
        -             */
        -            public void setAutoScale(Boolean value) {
        -                this.autoScale = value;
        -            }
        +    /**
        +     * Gets the value of the showSequenceLogo property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public boolean isShowSequenceLogo()
        +    {
        +      if (showSequenceLogo == null)
        +      {
        +        return false;
        +      }
        +      else
        +      {
        +        return showSequenceLogo;
        +      }
        +    }
         
        -        }
        +    /**
        +     * Sets the value of the showSequenceLogo property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setShowSequenceLogo(Boolean value)
        +    {
        +      this.showSequenceLogo = value;
        +    }
         
        +    /**
        +     * Gets the value of the normaliseSequenceLogo property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public boolean isNormaliseSequenceLogo()
        +    {
        +      if (normaliseSequenceLogo == null)
        +      {
        +        return false;
        +      }
        +      else
        +      {
        +        return normaliseSequenceLogo;
        +      }
             }
         
        +    /**
        +     * Sets the value of the normaliseSequenceLogo property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setNormaliseSequenceLogo(Boolean value)
        +    {
        +      this.normaliseSequenceLogo = value;
        +    }
         
             /**
        -     * <p>Java class for anonymous complex type.
        +     * Gets the value of the id property.
        +     * 
        +     * @return possible object is {@link String }
              * 
        -     * <p>The following schema fragment specifies the expected content contained within this class.
        -     * 
        -     * <pre>
        -     * &lt;complexType&gt;
        -     *   &lt;complexContent&gt;
        -     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        -     *       &lt;sequence&gt;
        -     *         &lt;element name="seq" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/&gt;
        -     *         &lt;element name="annotationColours" type="{www.jalview.org}AnnotationColourScheme" minOccurs="0"/&gt;
        -     *       &lt;/sequence&gt;
        -     *       &lt;attribute name="start" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -     *       &lt;attribute name="end" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -     *       &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -     *       &lt;attribute name="colour" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -     *       &lt;attribute name="consThreshold" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -     *       &lt;attribute name="pidThreshold" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -     *       &lt;attribute name="outlineColour" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -     *       &lt;attribute name="displayBoxes" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -     *       &lt;attribute name="displayText" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -     *       &lt;attribute name="colourText" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -     *       &lt;attribute name="textCol1" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -     *       &lt;attribute name="textCol2" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -     *       &lt;attribute name="textColThreshold" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -     *       &lt;attribute name="showUnconserved" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -     *       &lt;attribute name="ignoreGapsinConsensus" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        -     *       &lt;attribute name="showConsensusHistogram" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        -     *       &lt;attribute name="showSequenceLogo" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        -     *       &lt;attribute name="normaliseSequenceLogo" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        -     *       &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -     *     &lt;/restriction&gt;
        -     *   &lt;/complexContent&gt;
        -     * &lt;/complexType&gt;
        -     * </pre>
        +     */
        +    public String getId()
        +    {
        +      return id;
        +    }
        +
        +    /**
        +     * Sets the value of the id property.
              * 
        +     * @param value
        +     *          allowed object is {@link String }
              * 
              */
        -    @XmlAccessorType(XmlAccessType.FIELD)
        -    @XmlType(name = "", propOrder = {
        -        "seq",
        -        "annotationColours"
        -    })
        -    public static class JGroup {
        -
        -        @XmlElement(namespace = "www.jalview.org", required = true)
        -        protected List seq;
        -        @XmlElement(namespace = "www.jalview.org")
        -        protected AnnotationColourScheme annotationColours;
        -        @XmlAttribute(name = "start")
        -        protected Integer start;
        -        @XmlAttribute(name = "end")
        -        protected Integer end;
        -        @XmlAttribute(name = "name")
        -        protected String name;
        -        @XmlAttribute(name = "colour")
        -        protected String colour;
        -        @XmlAttribute(name = "consThreshold")
        -        protected Integer consThreshold;
        -        @XmlAttribute(name = "pidThreshold")
        -        protected Integer pidThreshold;
        -        @XmlAttribute(name = "outlineColour")
        -        protected Integer outlineColour;
        -        @XmlAttribute(name = "displayBoxes")
        -        protected Boolean displayBoxes;
        -        @XmlAttribute(name = "displayText")
        -        protected Boolean displayText;
        -        @XmlAttribute(name = "colourText")
        -        protected Boolean colourText;
        -        @XmlAttribute(name = "textCol1")
        -        protected Integer textCol1;
        -        @XmlAttribute(name = "textCol2")
        -        protected Integer textCol2;
        -        @XmlAttribute(name = "textColThreshold")
        -        protected Integer textColThreshold;
        -        @XmlAttribute(name = "showUnconserved")
        -        protected Boolean showUnconserved;
        -        @XmlAttribute(name = "ignoreGapsinConsensus")
        -        protected Boolean ignoreGapsinConsensus;
        -        @XmlAttribute(name = "showConsensusHistogram")
        -        protected Boolean showConsensusHistogram;
        -        @XmlAttribute(name = "showSequenceLogo")
        -        protected Boolean showSequenceLogo;
        -        @XmlAttribute(name = "normaliseSequenceLogo")
        -        protected Boolean normaliseSequenceLogo;
        -        @XmlAttribute(name = "id")
        -        protected String id;
        +    public void setId(String value)
        +    {
        +      this.id = value;
        +    }
         
        -        /**
        -         * Gets the value of the seq property.
        -         * 
        -         * <p>
        -         * This accessor method returns a reference to the live list,
        -         * not a snapshot. Therefore any modification you make to the
        -         * returned list will be present inside the JAXB object.
        -         * This is why there is not a <CODE>set</CODE> method for the seq property.
        -         * 
        -         * <p>
        -         * For example, to add a new item, do as follows:
        -         * <pre>
        -         *    getSeq().add(newItem);
        -         * </pre>
        -         * 
        -         * 
        -         * <p>
        -         * Objects of the following type(s) are allowed in the list
        -         * {@link String }
        -         * 
        -         * 
        -         */
        -        public List getSeq() {
        -            if (seq == null) {
        -                seq = new ArrayList();
        -            }
        -            return this.seq;
        -        }
        +  }
        +
        +  /**
        +   * <p>Java class for anonymous complex type.
        +   * 
        +   * <p>The following schema fragment specifies the expected content
        +   * contained within this class.
        +   * 
        +   * <pre> &lt;complexType&gt; &lt;complexContent&gt;
        +   * &lt;restriction
        +   * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        +   * &lt;sequence&gt; &lt;element name="features"
        +   * type="{www.jalview.org}feature" maxOccurs="unbounded"
        +   * minOccurs="0"/&gt; &lt;element name="pdbids" maxOccurs="unbounded"
        +   * minOccurs="0"&gt; &lt;complexType&gt;
        +   * &lt;complexContent&gt; &lt;extension
        +   * base="{www.jalview.org}pdbentry"&gt; &lt;sequence&gt;
        +   * &lt;element name="structureState" maxOccurs="unbounded"
        +   * minOccurs="0"&gt; &lt;complexType&gt;
        +   * &lt;simpleContent&gt; &lt;extension
        +   * base="&lt;http://www.w3.org/2001/XMLSchema&gt;string"&gt;
        +   * &lt;attGroup ref="{www.jalview.org}swingwindow"/&gt;
        +   * &lt;attribute name="visible"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +   * &lt;attribute name="viewId"
        +   * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute
        +   * name="alignwithAlignPanel" type="{http://www.w3.org/2001/XMLSchema}boolean"
        +   * default="true" /&gt; &lt;attribute name="colourwithAlignPanel"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        +   * &lt;attribute name="colourByJmol"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        +   * &lt;attribute name="type"
        +   * type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        +   * &lt;/extension&gt; &lt;/simpleContent&gt;
        +   * &lt;/complexType&gt; &lt;/element&gt;
        +   * &lt;/sequence&gt; &lt;/extension&gt;
        +   * &lt;/complexContent&gt; &lt;/complexType&gt;
        +   * &lt;/element&gt; &lt;element name="hiddenSequences"
        +   * type="{http://www.w3.org/2001/XMLSchema}int" maxOccurs="unbounded"
        +   * minOccurs="0"/&gt; &lt;element name="rnaViewer"
        +   * maxOccurs="unbounded" minOccurs="0"&gt; &lt;complexType&gt;
        +   * &lt;complexContent&gt; &lt;restriction
        +   * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        +   * &lt;sequence&gt; &lt;element name="secondaryStructure"
        +   * maxOccurs="unbounded"&gt; &lt;complexType&gt;
        +   * &lt;complexContent&gt; &lt;restriction
        +   * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; &lt;attribute
        +   * name="title" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        +   * &lt;attribute name="annotationId" use="required"
        +   * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute
        +   * name="gapped" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +   * &lt;attribute name="viewerState"
        +   * type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        +   * &lt;/restriction&gt; &lt;/complexContent&gt;
        +   * &lt;/complexType&gt; &lt;/element&gt;
        +   * &lt;/sequence&gt; &lt;attGroup
        +   * ref="{www.jalview.org}swingwindow"/&gt; &lt;attribute name="title"
        +   * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute
        +   * name="viewId" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        +   * &lt;attribute name="dividerLocation"
        +   * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        +   * name="selectedRna" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        +   * &lt;/restriction&gt; &lt;/complexContent&gt;
        +   * &lt;/complexType&gt; &lt;/element&gt;
        +   * &lt;/sequence&gt; &lt;attribute name="colour"
        +   * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        +   * name="start" use="required" type="{http://www.w3.org/2001/XMLSchema}int"
        +   * /&gt; &lt;attribute name="end" use="required"
        +   * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        +   * name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string"
        +   * /&gt; &lt;attribute name="hidden"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +   * &lt;attribute name="viewreference"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +   * &lt;/restriction&gt; &lt;/complexContent&gt;
        +   * &lt;/complexType&gt; </pre>
        +   * 
        +   * 
        +   */
        +  @XmlAccessorType(XmlAccessType.FIELD)
        +  @XmlType(
        +    name = "",
        +    propOrder =
        +    { "features", "pdbids", "hiddenSequences", "rnaViewer" })
        +  public static class JSeq
        +  {
        +
        +    @XmlElement(namespace = "www.jalview.org")
        +    protected List features;
        +
        +    @XmlElement(namespace = "www.jalview.org")
        +    protected List pdbids;
        +
        +    @XmlElement(namespace = "www.jalview.org", type = Integer.class)
        +    protected List hiddenSequences;
        +
        +    @XmlElement(namespace = "www.jalview.org")
        +    protected List rnaViewer;
        +
        +    @XmlAttribute(name = "colour")
        +    protected Integer colour;
        +
        +    @XmlAttribute(name = "start", required = true)
        +    protected int start;
        +
        +    @XmlAttribute(name = "end", required = true)
        +    protected int end;
        +
        +    @XmlAttribute(name = "id", required = true)
        +    protected String id;
        +
        +    @XmlAttribute(name = "hidden")
        +    protected Boolean hidden;
        +
        +    @XmlAttribute(name = "viewreference")
        +    protected Boolean viewreference;
         
        -        /**
        -         * Gets the value of the annotationColours property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link AnnotationColourScheme }
        -         *     
        -         */
        -        public AnnotationColourScheme getAnnotationColours() {
        -            return annotationColours;
        -        }
        +    /**
        +     * Gets the value of the features property.
        +     * 
        +     * <p> This accessor method returns a reference to the live list, not
        +     * a snapshot. Therefore any modification you make to the returned list will
        +     * be present inside the JAXB object. This is why there is not a
        +     * <CODE>set</CODE> method for the features property.
        +     * 
        +     * <p> For example, to add a new item, do as follows: <pre>
        +     * getFeatures().add(newItem); </pre>
        +     * 
        +     * 
        +     * <p> Objects of the following type(s) are allowed in the list
        +     * {@link Feature }
        +     * 
        +     * 
        +     */
        +    public List getFeatures()
        +    {
        +      if (features == null)
        +      {
        +        features = new ArrayList();
        +      }
        +      return this.features;
        +    }
         
        -        /**
        -         * Sets the value of the annotationColours property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link AnnotationColourScheme }
        -         *     
        -         */
        -        public void setAnnotationColours(AnnotationColourScheme value) {
        -            this.annotationColours = value;
        -        }
        +    /**
        +     * Gets the value of the pdbids property.
        +     * 
        +     * <p> This accessor method returns a reference to the live list, not
        +     * a snapshot. Therefore any modification you make to the returned list will
        +     * be present inside the JAXB object. This is why there is not a
        +     * <CODE>set</CODE> method for the pdbids property.
        +     * 
        +     * <p> For example, to add a new item, do as follows: <pre>
        +     * getPdbids().add(newItem); </pre>
        +     * 
        +     * 
        +     * <p> Objects of the following type(s) are allowed in the list
        +     * {@link JalviewModel.JSeq.Pdbids }
        +     * 
        +     * 
        +     */
        +    public List getPdbids()
        +    {
        +      if (pdbids == null)
        +      {
        +        pdbids = new ArrayList();
        +      }
        +      return this.pdbids;
        +    }
         
        -        /**
        -         * Gets the value of the start property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public Integer getStart() {
        -            return start;
        -        }
        +    /**
        +     * Gets the value of the hiddenSequences property.
        +     * 
        +     * <p> This accessor method returns a reference to the live list, not
        +     * a snapshot. Therefore any modification you make to the returned list will
        +     * be present inside the JAXB object. This is why there is not a
        +     * <CODE>set</CODE> method for the hiddenSequences property.
        +     * 
        +     * <p> For example, to add a new item, do as follows: <pre>
        +     * getHiddenSequences().add(newItem); </pre>
        +     * 
        +     * 
        +     * <p> Objects of the following type(s) are allowed in the list
        +     * {@link Integer }
        +     * 
        +     * 
        +     */
        +    public List getHiddenSequences()
        +    {
        +      if (hiddenSequences == null)
        +      {
        +        hiddenSequences = new ArrayList();
        +      }
        +      return this.hiddenSequences;
        +    }
         
        -        /**
        -         * Sets the value of the start property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public void setStart(Integer value) {
        -            this.start = value;
        -        }
        +    /**
        +     * Gets the value of the rnaViewer property.
        +     * 
        +     * <p> This accessor method returns a reference to the live list, not
        +     * a snapshot. Therefore any modification you make to the returned list will
        +     * be present inside the JAXB object. This is why there is not a
        +     * <CODE>set</CODE> method for the rnaViewer property.
        +     * 
        +     * <p> For example, to add a new item, do as follows: <pre>
        +     * getRnaViewer().add(newItem); </pre>
        +     * 
        +     * 
        +     * <p> Objects of the following type(s) are allowed in the list
        +     * {@link JalviewModel.JSeq.RnaViewer }
        +     * 
        +     * 
        +     */
        +    public List getRnaViewer()
        +    {
        +      if (rnaViewer == null)
        +      {
        +        rnaViewer = new ArrayList();
        +      }
        +      return this.rnaViewer;
        +    }
         
        -        /**
        -         * Gets the value of the end property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public Integer getEnd() {
        -            return end;
        -        }
        +    /**
        +     * Gets the value of the colour property.
        +     * 
        +     * @return possible object is {@link Integer }
        +     * 
        +     */
        +    public Integer getColour()
        +    {
        +      return colour;
        +    }
         
        -        /**
        -         * Sets the value of the end property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public void setEnd(Integer value) {
        -            this.end = value;
        -        }
        +    /**
        +     * Sets the value of the colour property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Integer }
        +     * 
        +     */
        +    public void setColour(Integer value)
        +    {
        +      this.colour = value;
        +    }
         
        -        /**
        -         * Gets the value of the name property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link String }
        -         *     
        -         */
        -        public String getName() {
        -            return name;
        -        }
        +    /**
        +     * Gets the value of the start property.
        +     * 
        +     */
        +    public int getStart()
        +    {
        +      return start;
        +    }
         
        -        /**
        -         * Sets the value of the name property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link String }
        -         *     
        -         */
        -        public void setName(String value) {
        -            this.name = value;
        -        }
        +    /**
        +     * Sets the value of the start property.
        +     * 
        +     */
        +    public void setStart(int value)
        +    {
        +      this.start = value;
        +    }
        +
        +    /**
        +     * Gets the value of the end property.
        +     * 
        +     */
        +    public int getEnd()
        +    {
        +      return end;
        +    }
        +
        +    /**
        +     * Sets the value of the end property.
        +     * 
        +     */
        +    public void setEnd(int value)
        +    {
        +      this.end = value;
        +    }
        +
        +    /**
        +     * Gets the value of the id property.
        +     * 
        +     * @return possible object is {@link String }
        +     * 
        +     */
        +    public String getId()
        +    {
        +      return id;
        +    }
        +
        +    /**
        +     * Sets the value of the id property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link String }
        +     * 
        +     */
        +    public void setId(String value)
        +    {
        +      this.id = value;
        +    }
        +
        +    /**
        +     * Gets the value of the hidden property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public Boolean isHidden()
        +    {
        +      return hidden;
        +    }
        +
        +    /**
        +     * Sets the value of the hidden property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setHidden(Boolean value)
        +    {
        +      this.hidden = value;
        +    }
        +
        +    /**
        +     * Gets the value of the viewreference property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public Boolean isViewreference()
        +    {
        +      return viewreference;
        +    }
        +
        +    /**
        +     * Sets the value of the viewreference property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setViewreference(Boolean value)
        +    {
        +      this.viewreference = value;
        +    }
        +
        +    /**
        +     * <p>Java class for anonymous complex type.
        +     * 
        +     * <p>The following schema fragment specifies the expected content
        +     * contained within this class.
        +     * 
        +     * <pre> &lt;complexType&gt; &lt;complexContent&gt;
        +     * &lt;extension base="{www.jalview.org}pdbentry"&gt;
        +     * &lt;sequence&gt; &lt;element name="structureState"
        +     * maxOccurs="unbounded" minOccurs="0"&gt; &lt;complexType&gt;
        +     * &lt;simpleContent&gt; &lt;extension
        +     * base="&lt;http://www.w3.org/2001/XMLSchema&gt;string"&gt;
        +     * &lt;attGroup ref="{www.jalview.org}swingwindow"/&gt;
        +     * &lt;attribute name="visible"
        +     * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +     * &lt;attribute name="viewId"
        +     * type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        +     * &lt;attribute name="alignwithAlignPanel"
        +     * type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        +     * &lt;attribute name="colourwithAlignPanel"
        +     * type="{http://www.w3.org/2001/XMLSchema}boolean" default="false"
        +     * /&gt; &lt;attribute name="colourByJmol"
        +     * type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        +     * &lt;attribute name="type"
        +     * type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        +     * &lt;/extension&gt; &lt;/simpleContent&gt;
        +     * &lt;/complexType&gt; &lt;/element&gt;
        +     * &lt;/sequence&gt; &lt;/extension&gt;
        +     * &lt;/complexContent&gt; &lt;/complexType&gt; </pre>
        +     * 
        +     * 
        +     */
        +    @XmlAccessorType(XmlAccessType.FIELD)
        +    @XmlType(name = "", propOrder = { "structureState" })
        +    public static class Pdbids extends Pdbentry
        +    {
        +
        +      @XmlElement(namespace = "www.jalview.org")
        +      protected List structureState;
        +
        +      /**
        +       * Gets the value of the structureState property.
        +       * 
        +       * <p> This accessor method returns a reference to the live list,
        +       * not a snapshot. Therefore any modification you make to the returned
        +       * list will be present inside the JAXB object. This is why there is not a
        +       * <CODE>set</CODE> method for the structureState property.
        +       * 
        +       * <p> For example, to add a new item, do as follows: <pre>
        +       * getStructureState().add(newItem); </pre>
        +       * 
        +       * 
        +       * <p> Objects of the following type(s) are allowed in the list
        +       * {@link JalviewModel.JSeq.Pdbids.StructureState }
        +       * 
        +       * 
        +       */
        +      public List getStructureState()
        +      {
        +        if (structureState == null)
        +        {
        +          structureState = new ArrayList();
        +        }
        +        return this.structureState;
        +      }
        +
        +      /**
        +       * <p>Java class for anonymous complex type.
        +       * 
        +       * <p>The following schema fragment specifies the expected content
        +       * contained within this class.
        +       * 
        +       * <pre> &lt;complexType&gt; &lt;simpleContent&gt;
        +       * &lt;extension
        +       * base="&lt;http://www.w3.org/2001/XMLSchema&gt;string"&gt;
        +       * &lt;attGroup ref="{www.jalview.org}swingwindow"/&gt;
        +       * &lt;attribute name="visible"
        +       * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +       * &lt;attribute name="viewId"
        +       * type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        +       * &lt;attribute name="alignwithAlignPanel"
        +       * type="{http://www.w3.org/2001/XMLSchema}boolean" default="true"
        +       * /&gt; &lt;attribute name="colourwithAlignPanel"
        +       * type="{http://www.w3.org/2001/XMLSchema}boolean" default="false"
        +       * /&gt; &lt;attribute name="colourByJmol"
        +       * type="{http://www.w3.org/2001/XMLSchema}boolean" default="true"
        +       * /&gt; &lt;attribute name="type"
        +       * type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        +       * &lt;/extension&gt; &lt;/simpleContent&gt;
        +       * &lt;/complexType&gt; </pre>
        +       * 
        +       * 
        +       */
        +      @XmlAccessorType(XmlAccessType.FIELD)
        +      @XmlType(name = "", propOrder = { "value" })
        +      public static class StructureState
        +      {
        +
        +        @XmlValue
        +        protected String value;
        +
        +        @XmlAttribute(name = "visible")
        +        protected Boolean visible;
        +
        +        @XmlAttribute(name = "viewId")
        +        protected String viewId;
        +
        +        @XmlAttribute(name = "alignwithAlignPanel")
        +        protected Boolean alignwithAlignPanel;
        +
        +        @XmlAttribute(name = "colourwithAlignPanel")
        +        protected Boolean colourwithAlignPanel;
        +
        +        @XmlAttribute(name = "colourByJmol")
        +        protected Boolean colourByJmol;
        +
        +        @XmlAttribute(name = "type")
        +        protected String type;
        +
        +        @XmlAttribute(name = "width")
        +        protected Integer width;
        +
        +        @XmlAttribute(name = "height")
        +        protected Integer height;
        +
        +        @XmlAttribute(name = "xpos")
        +        protected Integer xpos;
        +
        +        @XmlAttribute(name = "ypos")
        +        protected Integer ypos;
         
                 /**
        -         * Gets the value of the colour property.
        +         * Gets the value of the value property.
        +         * 
        +         * @return possible object is {@link String }
                  * 
        -         * @return
        -         *     possible object is
        -         *     {@link String }
        -         *     
                  */
        -        public String getColour() {
        -            return colour;
        +        public String getValue()
        +        {
        +          return value;
                 }
         
                 /**
        -         * Sets the value of the colour property.
        +         * Sets the value of the value property.
                  * 
                  * @param value
        -         *     allowed object is
        -         *     {@link String }
        -         *     
        +         *          allowed object is {@link String }
        +         * 
                  */
        -        public void setColour(String value) {
        -            this.colour = value;
        +        public void setValue(String value)
        +        {
        +          this.value = value;
                 }
         
                 /**
        -         * Gets the value of the consThreshold property.
        +         * Gets the value of the visible property.
        +         * 
        +         * @return possible object is {@link Boolean }
                  * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
                  */
        -        public Integer getConsThreshold() {
        -            return consThreshold;
        +        public Boolean isVisible()
        +        {
        +          return visible;
                 }
         
                 /**
        -         * Sets the value of the consThreshold property.
        +         * Sets the value of the visible property.
                  * 
                  * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        +         *          allowed object is {@link Boolean }
        +         * 
                  */
        -        public void setConsThreshold(Integer value) {
        -            this.consThreshold = value;
        +        public void setVisible(Boolean value)
        +        {
        +          this.visible = value;
                 }
         
                 /**
        -         * Gets the value of the pidThreshold property.
        +         * Gets the value of the viewId property.
        +         * 
        +         * @return possible object is {@link String }
                  * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
                  */
        -        public Integer getPidThreshold() {
        -            return pidThreshold;
        +        public String getViewId()
        +        {
        +          return viewId;
                 }
         
                 /**
        -         * Sets the value of the pidThreshold property.
        +         * Sets the value of the viewId property.
                  * 
                  * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        +         *          allowed object is {@link String }
        +         * 
                  */
        -        public void setPidThreshold(Integer value) {
        -            this.pidThreshold = value;
        +        public void setViewId(String value)
        +        {
        +          this.viewId = value;
                 }
         
                 /**
        -         * Gets the value of the outlineColour property.
        +         * Gets the value of the alignwithAlignPanel property.
        +         * 
        +         * @return possible object is {@link Boolean }
                  * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
                  */
        -        public Integer getOutlineColour() {
        -            return outlineColour;
        +        public boolean isAlignwithAlignPanel()
        +        {
        +          if (alignwithAlignPanel == null)
        +          {
        +            return true;
        +          }
        +          else
        +          {
        +            return alignwithAlignPanel;
        +          }
                 }
         
                 /**
        -         * Sets the value of the outlineColour property.
        +         * Sets the value of the alignwithAlignPanel property.
                  * 
                  * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        +         *          allowed object is {@link Boolean }
        +         * 
                  */
        -        public void setOutlineColour(Integer value) {
        -            this.outlineColour = value;
        +        public void setAlignwithAlignPanel(Boolean value)
        +        {
        +          this.alignwithAlignPanel = value;
                 }
         
                 /**
        -         * Gets the value of the displayBoxes property.
        +         * Gets the value of the colourwithAlignPanel property.
        +         * 
        +         * @return possible object is {@link Boolean }
                  * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
                  */
        -        public Boolean isDisplayBoxes() {
        -            return displayBoxes;
        +        public boolean isColourwithAlignPanel()
        +        {
        +          if (colourwithAlignPanel == null)
        +          {
        +            return false;
        +          }
        +          else
        +          {
        +            return colourwithAlignPanel;
        +          }
                 }
         
                 /**
        -         * Sets the value of the displayBoxes property.
        +         * Sets the value of the colourwithAlignPanel property.
                  * 
                  * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        +         *          allowed object is {@link Boolean }
        +         * 
                  */
        -        public void setDisplayBoxes(Boolean value) {
        -            this.displayBoxes = value;
        +        public void setColourwithAlignPanel(Boolean value)
        +        {
        +          this.colourwithAlignPanel = value;
                 }
         
                 /**
        -         * Gets the value of the displayText property.
        +         * Gets the value of the colourByJmol property.
        +         * 
        +         * @return possible object is {@link Boolean }
                  * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
                  */
        -        public Boolean isDisplayText() {
        -            return displayText;
        +        public boolean isColourByJmol()
        +        {
        +          if (colourByJmol == null)
        +          {
        +            return true;
        +          }
        +          else
        +          {
        +            return colourByJmol;
        +          }
                 }
         
                 /**
        -         * Sets the value of the displayText property.
        +         * Sets the value of the colourByJmol property.
                  * 
                  * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        +         *          allowed object is {@link Boolean }
        +         * 
                  */
        -        public void setDisplayText(Boolean value) {
        -            this.displayText = value;
        +        public void setColourByJmol(Boolean value)
        +        {
        +          this.colourByJmol = value;
                 }
         
                 /**
        -         * Gets the value of the colourText property.
        +         * Gets the value of the type property.
        +         * 
        +         * @return possible object is {@link String }
                  * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
                  */
        -        public Boolean isColourText() {
        -            return colourText;
        +        public String getType()
        +        {
        +          return type;
                 }
         
                 /**
        -         * Sets the value of the colourText property.
        +         * Sets the value of the type property.
                  * 
                  * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        +         *          allowed object is {@link String }
        +         * 
                  */
        -        public void setColourText(Boolean value) {
        -            this.colourText = value;
        +        public void setType(String value)
        +        {
        +          this.type = value;
                 }
         
                 /**
        -         * Gets the value of the textCol1 property.
        +         * Gets the value of the width property.
        +         * 
        +         * @return possible object is {@link Integer }
                  * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
                  */
        -        public Integer getTextCol1() {
        -            return textCol1;
        +        public Integer getWidth()
        +        {
        +          return width;
                 }
         
                 /**
        -         * Sets the value of the textCol1 property.
        +         * Sets the value of the width property.
                  * 
                  * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        +         *          allowed object is {@link Integer }
        +         * 
                  */
        -        public void setTextCol1(Integer value) {
        -            this.textCol1 = value;
        +        public void setWidth(Integer value)
        +        {
        +          this.width = value;
                 }
         
                 /**
        -         * Gets the value of the textCol2 property.
        +         * Gets the value of the height property.
        +         * 
        +         * @return possible object is {@link Integer }
                  * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
                  */
        -        public Integer getTextCol2() {
        -            return textCol2;
        +        public Integer getHeight()
        +        {
        +          return height;
                 }
         
                 /**
        -         * Sets the value of the textCol2 property.
        +         * Sets the value of the height property.
                  * 
                  * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        +         *          allowed object is {@link Integer }
        +         * 
                  */
        -        public void setTextCol2(Integer value) {
        -            this.textCol2 = value;
        +        public void setHeight(Integer value)
        +        {
        +          this.height = value;
                 }
         
                 /**
        -         * Gets the value of the textColThreshold property.
        +         * Gets the value of the xpos property.
        +         * 
        +         * @return possible object is {@link Integer }
                  * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
                  */
        -        public Integer getTextColThreshold() {
        -            return textColThreshold;
        +        public Integer getXpos()
        +        {
        +          return xpos;
                 }
         
                 /**
        -         * Sets the value of the textColThreshold property.
        +         * Sets the value of the xpos property.
                  * 
                  * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        +         *          allowed object is {@link Integer }
        +         * 
                  */
        -        public void setTextColThreshold(Integer value) {
        -            this.textColThreshold = value;
        +        public void setXpos(Integer value)
        +        {
        +          this.xpos = value;
                 }
         
                 /**
        -         * Gets the value of the showUnconserved property.
        +         * Gets the value of the ypos property.
        +         * 
        +         * @return possible object is {@link Integer }
                  * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
                  */
        -        public Boolean isShowUnconserved() {
        -            return showUnconserved;
        +        public Integer getYpos()
        +        {
        +          return ypos;
                 }
         
                 /**
        -         * Sets the value of the showUnconserved property.
        +         * Sets the value of the ypos property.
                  * 
                  * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        +         *          allowed object is {@link Integer }
        +         * 
                  */
        -        public void setShowUnconserved(Boolean value) {
        -            this.showUnconserved = value;
        +        public void setYpos(Integer value)
        +        {
        +          this.ypos = value;
                 }
         
        +      }
        +
        +    }
        +
        +    /**
        +     * <p>Java class for anonymous complex type.
        +     * 
        +     * <p>The following schema fragment specifies the expected content
        +     * contained within this class.
        +     * 
        +     * <pre> &lt;complexType&gt; &lt;complexContent&gt;
        +     * &lt;restriction
        +     * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        +     * &lt;sequence&gt; &lt;element name="secondaryStructure"
        +     * maxOccurs="unbounded"&gt; &lt;complexType&gt;
        +     * &lt;complexContent&gt; &lt;restriction
        +     * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        +     * &lt;attribute name="title"
        +     * type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        +     * &lt;attribute name="annotationId" use="required"
        +     * type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        +     * &lt;attribute name="gapped"
        +     * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +     * &lt;attribute name="viewerState"
        +     * type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        +     * &lt;/restriction&gt; &lt;/complexContent&gt;
        +     * &lt;/complexType&gt; &lt;/element&gt;
        +     * &lt;/sequence&gt; &lt;attGroup
        +     * ref="{www.jalview.org}swingwindow"/&gt; &lt;attribute
        +     * name="title" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        +     * &lt;attribute name="viewId"
        +     * type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        +     * &lt;attribute name="dividerLocation"
        +     * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        +     * name="selectedRna" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        +     * &lt;/restriction&gt; &lt;/complexContent&gt;
        +     * &lt;/complexType&gt; </pre>
        +     * 
        +     * 
        +     */
        +    @XmlAccessorType(XmlAccessType.FIELD)
        +    @XmlType(name = "", propOrder = { "secondaryStructure" })
        +    public static class RnaViewer
        +    {
        +
        +      @XmlElement(namespace = "www.jalview.org", required = true)
        +      protected List secondaryStructure;
        +
        +      @XmlAttribute(name = "title")
        +      protected String title;
        +
        +      @XmlAttribute(name = "viewId")
        +      protected String viewId;
        +
        +      @XmlAttribute(name = "dividerLocation")
        +      protected Integer dividerLocation;
        +
        +      @XmlAttribute(name = "selectedRna")
        +      protected Integer selectedRna;
        +
        +      @XmlAttribute(name = "width")
        +      protected Integer width;
        +
        +      @XmlAttribute(name = "height")
        +      protected Integer height;
        +
        +      @XmlAttribute(name = "xpos")
        +      protected Integer xpos;
        +
        +      @XmlAttribute(name = "ypos")
        +      protected Integer ypos;
        +
        +      /**
        +       * Gets the value of the secondaryStructure property.
        +       * 
        +       * <p> This accessor method returns a reference to the live list,
        +       * not a snapshot. Therefore any modification you make to the returned
        +       * list will be present inside the JAXB object. This is why there is not a
        +       * <CODE>set</CODE> method for the secondaryStructure
        +       * property.
        +       * 
        +       * <p> For example, to add a new item, do as follows: <pre>
        +       * getSecondaryStructure().add(newItem); </pre>
        +       * 
        +       * 
        +       * <p> Objects of the following type(s) are allowed in the list
        +       * {@link JalviewModel.JSeq.RnaViewer.SecondaryStructure }
        +       * 
        +       * 
        +       */
        +      public List getSecondaryStructure()
        +      {
        +        if (secondaryStructure == null)
        +        {
        +          secondaryStructure = new ArrayList();
        +        }
        +        return this.secondaryStructure;
        +      }
        +
        +      /**
        +       * Gets the value of the title property.
        +       * 
        +       * @return possible object is {@link String }
        +       * 
        +       */
        +      public String getTitle()
        +      {
        +        return title;
        +      }
        +
        +      /**
        +       * Sets the value of the title property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link String }
        +       * 
        +       */
        +      public void setTitle(String value)
        +      {
        +        this.title = value;
        +      }
        +
        +      /**
        +       * Gets the value of the viewId property.
        +       * 
        +       * @return possible object is {@link String }
        +       * 
        +       */
        +      public String getViewId()
        +      {
        +        return viewId;
        +      }
        +
        +      /**
        +       * Sets the value of the viewId property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link String }
        +       * 
        +       */
        +      public void setViewId(String value)
        +      {
        +        this.viewId = value;
        +      }
        +
        +      /**
        +       * Gets the value of the dividerLocation property.
        +       * 
        +       * @return possible object is {@link Integer }
        +       * 
        +       */
        +      public Integer getDividerLocation()
        +      {
        +        return dividerLocation;
        +      }
        +
        +      /**
        +       * Sets the value of the dividerLocation property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Integer }
        +       * 
        +       */
        +      public void setDividerLocation(Integer value)
        +      {
        +        this.dividerLocation = value;
        +      }
        +
        +      /**
        +       * Gets the value of the selectedRna property.
        +       * 
        +       * @return possible object is {@link Integer }
        +       * 
        +       */
        +      public Integer getSelectedRna()
        +      {
        +        return selectedRna;
        +      }
        +
        +      /**
        +       * Sets the value of the selectedRna property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Integer }
        +       * 
        +       */
        +      public void setSelectedRna(Integer value)
        +      {
        +        this.selectedRna = value;
        +      }
        +
        +      /**
        +       * Gets the value of the width property.
        +       * 
        +       * @return possible object is {@link Integer }
        +       * 
        +       */
        +      public Integer getWidth()
        +      {
        +        return width;
        +      }
        +
        +      /**
        +       * Sets the value of the width property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Integer }
        +       * 
        +       */
        +      public void setWidth(Integer value)
        +      {
        +        this.width = value;
        +      }
        +
        +      /**
        +       * Gets the value of the height property.
        +       * 
        +       * @return possible object is {@link Integer }
        +       * 
        +       */
        +      public Integer getHeight()
        +      {
        +        return height;
        +      }
        +
        +      /**
        +       * Sets the value of the height property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Integer }
        +       * 
        +       */
        +      public void setHeight(Integer value)
        +      {
        +        this.height = value;
        +      }
        +
        +      /**
        +       * Gets the value of the xpos property.
        +       * 
        +       * @return possible object is {@link Integer }
        +       * 
        +       */
        +      public Integer getXpos()
        +      {
        +        return xpos;
        +      }
        +
        +      /**
        +       * Sets the value of the xpos property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Integer }
        +       * 
        +       */
        +      public void setXpos(Integer value)
        +      {
        +        this.xpos = value;
        +      }
        +
        +      /**
        +       * Gets the value of the ypos property.
        +       * 
        +       * @return possible object is {@link Integer }
        +       * 
        +       */
        +      public Integer getYpos()
        +      {
        +        return ypos;
        +      }
        +
        +      /**
        +       * Sets the value of the ypos property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Integer }
        +       * 
        +       */
        +      public void setYpos(Integer value)
        +      {
        +        this.ypos = value;
        +      }
        +
        +      /**
        +       * <p>Java class for anonymous complex type.
        +       * 
        +       * <p>The following schema fragment specifies the expected content
        +       * contained within this class.
        +       * 
        +       * <pre> &lt;complexType&gt; &lt;complexContent&gt;
        +       * &lt;restriction
        +       * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        +       * &lt;attribute name="title"
        +       * type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        +       * &lt;attribute name="annotationId" use="required"
        +       * type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        +       * &lt;attribute name="gapped"
        +       * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +       * &lt;attribute name="viewerState"
        +       * type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        +       * &lt;/restriction&gt; &lt;/complexContent&gt;
        +       * &lt;/complexType&gt; </pre>
        +       * 
        +       * 
        +       */
        +      @XmlAccessorType(XmlAccessType.FIELD)
        +      @XmlType(name = "")
        +      public static class SecondaryStructure
        +      {
        +
        +        @XmlAttribute(name = "title")
        +        protected String title;
        +
        +        @XmlAttribute(name = "annotationId", required = true)
        +        protected String annotationId;
        +
        +        @XmlAttribute(name = "gapped")
        +        protected Boolean gapped;
        +
        +        @XmlAttribute(name = "viewerState")
        +        protected String viewerState;
        +
                 /**
        -         * Gets the value of the ignoreGapsinConsensus property.
        +         * Gets the value of the title property.
        +         * 
        +         * @return possible object is {@link String }
                  * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
                  */
        -        public boolean isIgnoreGapsinConsensus() {
        -            if (ignoreGapsinConsensus == null) {
        -                return true;
        -            } else {
        -                return ignoreGapsinConsensus;
        -            }
        +        public String getTitle()
        +        {
        +          return title;
                 }
         
                 /**
        -         * Sets the value of the ignoreGapsinConsensus property.
        +         * Sets the value of the title property.
                  * 
                  * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        +         *          allowed object is {@link String }
        +         * 
                  */
        -        public void setIgnoreGapsinConsensus(Boolean value) {
        -            this.ignoreGapsinConsensus = value;
        +        public void setTitle(String value)
        +        {
        +          this.title = value;
                 }
         
                 /**
        -         * Gets the value of the showConsensusHistogram property.
        +         * Gets the value of the annotationId property.
        +         * 
        +         * @return possible object is {@link String }
                  * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
                  */
        -        public boolean isShowConsensusHistogram() {
        -            if (showConsensusHistogram == null) {
        -                return true;
        -            } else {
        -                return showConsensusHistogram;
        -            }
        +        public String getAnnotationId()
        +        {
        +          return annotationId;
                 }
         
                 /**
        -         * Sets the value of the showConsensusHistogram property.
        +         * Sets the value of the annotationId property.
                  * 
                  * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        +         *          allowed object is {@link String }
        +         * 
                  */
        -        public void setShowConsensusHistogram(Boolean value) {
        -            this.showConsensusHistogram = value;
        +        public void setAnnotationId(String value)
        +        {
        +          this.annotationId = value;
                 }
         
                 /**
        -         * Gets the value of the showSequenceLogo property.
        +         * Gets the value of the gapped property.
        +         * 
        +         * @return possible object is {@link Boolean }
                  * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
                  */
        -        public boolean isShowSequenceLogo() {
        -            if (showSequenceLogo == null) {
        -                return false;
        -            } else {
        -                return showSequenceLogo;
        -            }
        +        public Boolean isGapped()
        +        {
        +          return gapped;
                 }
         
                 /**
        -         * Sets the value of the showSequenceLogo property.
        +         * Sets the value of the gapped property.
                  * 
                  * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        +         *          allowed object is {@link Boolean }
        +         * 
                  */
        -        public void setShowSequenceLogo(Boolean value) {
        -            this.showSequenceLogo = value;
        +        public void setGapped(Boolean value)
        +        {
        +          this.gapped = value;
                 }
         
                 /**
        -         * Gets the value of the normaliseSequenceLogo property.
        +         * Gets the value of the viewerState property.
        +         * 
        +         * @return possible object is {@link String }
                  * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
                  */
        -        public boolean isNormaliseSequenceLogo() {
        -            if (normaliseSequenceLogo == null) {
        -                return false;
        -            } else {
        -                return normaliseSequenceLogo;
        -            }
        +        public String getViewerState()
        +        {
        +          return viewerState;
                 }
         
                 /**
        -         * Sets the value of the normaliseSequenceLogo property.
        +         * Sets the value of the viewerState property.
                  * 
                  * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setNormaliseSequenceLogo(Boolean value) {
        -            this.normaliseSequenceLogo = value;
        -        }
        -
        -        /**
        -         * Gets the value of the id property.
        +         *          allowed object is {@link String }
                  * 
        -         * @return
        -         *     possible object is
        -         *     {@link String }
        -         *     
                  */
        -        public String getId() {
        -            return id;
        +        public void setViewerState(String value)
        +        {
        +          this.viewerState = value;
                 }
         
        -        /**
        -         * Sets the value of the id property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link String }
        -         *     
        -         */
        -        public void setId(String value) {
        -            this.id = value;
        -        }
        +      }
         
             }
         
        +  }
        +
        +  /**
        +   * <p>Java class for anonymous complex type.
        +   * 
        +   * <p>The following schema fragment specifies the expected content
        +   * contained within this class.
        +   * 
        +   * <pre> &lt;complexType&gt; &lt;complexContent&gt;
        +   * &lt;restriction
        +   * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        +   * &lt;sequence&gt; &lt;element name="sequencePoint"
        +   * maxOccurs="unbounded"&gt; &lt;complexType&gt;
        +   * &lt;complexContent&gt; &lt;restriction
        +   * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; &lt;attGroup
        +   * ref="{www.jalview.org}position"/&gt; &lt;attribute
        +   * name="sequenceRef" type="{http://www.w3.org/2001/XMLSchema}string"
        +   * /&gt; &lt;/restriction&gt; &lt;/complexContent&gt;
        +   * &lt;/complexType&gt; &lt;/element&gt; &lt;element
        +   * name="axis" maxOccurs="3" minOccurs="3"&gt; &lt;complexType&gt;
        +   * &lt;complexContent&gt; &lt;restriction
        +   * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; &lt;attGroup
        +   * ref="{www.jalview.org}position"/&gt; &lt;/restriction&gt;
        +   * &lt;/complexContent&gt; &lt;/complexType&gt;
        +   * &lt;/element&gt; &lt;element name="seqPointMin"&gt;
        +   * &lt;complexType&gt; &lt;complexContent&gt;
        +   * &lt;restriction
        +   * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; &lt;attGroup
        +   * ref="{www.jalview.org}position"/&gt; &lt;/restriction&gt;
        +   * &lt;/complexContent&gt; &lt;/complexType&gt;
        +   * &lt;/element&gt; &lt;element name="seqPointMax"&gt;
        +   * &lt;complexType&gt; &lt;complexContent&gt;
        +   * &lt;restriction
        +   * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; &lt;attGroup
        +   * ref="{www.jalview.org}position"/&gt; &lt;/restriction&gt;
        +   * &lt;/complexContent&gt; &lt;/complexType&gt;
        +   * &lt;/element&gt; &lt;element name="pcaData"
        +   * type="{www.jalview.org}PcaDataType"/&gt; &lt;/sequence&gt;
        +   * &lt;attGroup ref="{www.jalview.org}swingwindow"/&gt;
        +   * &lt;attGroup ref="{www.jalview.org}SimilarityParams"/&gt;
        +   * &lt;attribute name="title"
        +   * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute
        +   * name="scoreModelName" type="{http://www.w3.org/2001/XMLSchema}string"
        +   * /&gt; &lt;attribute name="xDim"
        +   * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        +   * name="yDim" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        +   * &lt;attribute name="zDim" type="{http://www.w3.org/2001/XMLSchema}int"
        +   * /&gt; &lt;attribute name="bgColour"
        +   * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        +   * name="scaleFactor" type="{http://www.w3.org/2001/XMLSchema}float" /&gt;
        +   * &lt;attribute name="showLabels"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +   * &lt;attribute name="linkToAllViews"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +   * &lt;/restriction&gt; &lt;/complexContent&gt;
        +   * &lt;/complexType&gt; </pre>
        +   * 
        +   * 
        +   */
        +  @XmlAccessorType(XmlAccessType.FIELD)
        +  @XmlType(
        +    name = "",
        +    propOrder =
        +    { "sequencePoint", "axis", "seqPointMin", "seqPointMax", "pcaData" })
        +  public static class PcaViewer
        +  {
        +
        +    @XmlElement(namespace = "www.jalview.org", required = true)
        +    protected List sequencePoint;
        +
        +    @XmlElement(namespace = "www.jalview.org", required = true)
        +    protected List axis;
        +
        +    @XmlElement(namespace = "www.jalview.org", required = true)
        +    protected JalviewModel.PcaViewer.SeqPointMin seqPointMin;
        +
        +    @XmlElement(namespace = "www.jalview.org", required = true)
        +    protected JalviewModel.PcaViewer.SeqPointMax seqPointMax;
        +
        +    @XmlElement(namespace = "www.jalview.org", required = true)
        +    protected PcaDataType pcaData;
        +
        +    @XmlAttribute(name = "title")
        +    protected String title;
        +
        +    @XmlAttribute(name = "scoreModelName")
        +    protected String scoreModelName;
        +
        +    @XmlAttribute(name = "xDim")
        +    protected Integer xDim;
        +
        +    @XmlAttribute(name = "yDim")
        +    protected Integer yDim;
        +
        +    @XmlAttribute(name = "zDim")
        +    protected Integer zDim;
        +
        +    @XmlAttribute(name = "bgColour")
        +    protected Integer bgColour;
        +
        +    @XmlAttribute(name = "scaleFactor")
        +    protected Float scaleFactor;
        +
        +    @XmlAttribute(name = "showLabels")
        +    protected Boolean showLabels;
        +
        +    @XmlAttribute(name = "linkToAllViews")
        +    protected Boolean linkToAllViews;
        +
        +    @XmlAttribute(name = "width")
        +    protected Integer width;
        +
        +    @XmlAttribute(name = "height")
        +    protected Integer height;
        +
        +    @XmlAttribute(name = "xpos")
        +    protected Integer xpos;
        +
        +    @XmlAttribute(name = "ypos")
        +    protected Integer ypos;
        +
        +    @XmlAttribute(name = "includeGaps")
        +    protected Boolean includeGaps;
        +
        +    @XmlAttribute(name = "matchGaps")
        +    protected Boolean matchGaps;
        +
        +    @XmlAttribute(name = "includeGappedColumns")
        +    protected Boolean includeGappedColumns;
        +
        +    @XmlAttribute(name = "denominateByShortestLength")
        +    protected Boolean denominateByShortestLength;
         
             /**
        -     * <p>Java class for anonymous complex type.
        +     * Gets the value of the sequencePoint property.
              * 
        -     * <p>The following schema fragment specifies the expected content contained within this class.
        -     * 
        -     * <pre>
        -     * &lt;complexType&gt;
        -     *   &lt;complexContent&gt;
        -     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        -     *       &lt;sequence&gt;
        -     *         &lt;element name="features" type="{www.jalview.org}feature" maxOccurs="unbounded" minOccurs="0"/&gt;
        -     *         &lt;element name="pdbids" maxOccurs="unbounded" minOccurs="0"&gt;
        -     *           &lt;complexType&gt;
        -     *             &lt;complexContent&gt;
        -     *               &lt;extension base="{www.jalview.org}pdbentry"&gt;
        -     *                 &lt;sequence&gt;
        -     *                   &lt;element name="structureState" maxOccurs="unbounded" minOccurs="0"&gt;
        -     *                     &lt;complexType&gt;
        -     *                       &lt;simpleContent&gt;
        -     *                         &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema&gt;string"&gt;
        -     *                           &lt;attGroup ref="{www.jalview.org}swingwindow"/&gt;
        -     *                           &lt;attribute name="visible" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -     *                           &lt;attribute name="viewId" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -     *                           &lt;attribute name="alignwithAlignPanel" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        -     *                           &lt;attribute name="colourwithAlignPanel" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        -     *                           &lt;attribute name="colourByJmol" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        -     *                           &lt;attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -     *                         &lt;/extension&gt;
        -     *                       &lt;/simpleContent&gt;
        -     *                     &lt;/complexType&gt;
        -     *                   &lt;/element&gt;
        -     *                 &lt;/sequence&gt;
        -     *               &lt;/extension&gt;
        -     *             &lt;/complexContent&gt;
        -     *           &lt;/complexType&gt;
        -     *         &lt;/element&gt;
        -     *         &lt;element name="hiddenSequences" type="{http://www.w3.org/2001/XMLSchema}int" maxOccurs="unbounded" minOccurs="0"/&gt;
        -     *         &lt;element name="rnaViewer" maxOccurs="unbounded" minOccurs="0"&gt;
        -     *           &lt;complexType&gt;
        -     *             &lt;complexContent&gt;
        -     *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        -     *                 &lt;sequence&gt;
        -     *                   &lt;element name="secondaryStructure" maxOccurs="unbounded"&gt;
        -     *                     &lt;complexType&gt;
        -     *                       &lt;complexContent&gt;
        -     *                         &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        -     *                           &lt;attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -     *                           &lt;attribute name="annotationId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -     *                           &lt;attribute name="gapped" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -     *                           &lt;attribute name="viewerState" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -     *                         &lt;/restriction&gt;
        -     *                       &lt;/complexContent&gt;
        -     *                     &lt;/complexType&gt;
        -     *                   &lt;/element&gt;
        -     *                 &lt;/sequence&gt;
        -     *                 &lt;attGroup ref="{www.jalview.org}swingwindow"/&gt;
        -     *                 &lt;attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -     *                 &lt;attribute name="viewId" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -     *                 &lt;attribute name="dividerLocation" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -     *                 &lt;attribute name="selectedRna" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -     *               &lt;/restriction&gt;
        -     *             &lt;/complexContent&gt;
        -     *           &lt;/complexType&gt;
        -     *         &lt;/element&gt;
        -     *       &lt;/sequence&gt;
        -     *       &lt;attribute name="colour" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -     *       &lt;attribute name="start" use="required" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -     *       &lt;attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -     *       &lt;attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -     *       &lt;attribute name="hidden" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -     *       &lt;attribute name="viewreference" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -     *     &lt;/restriction&gt;
        -     *   &lt;/complexContent&gt;
        -     * &lt;/complexType&gt;
        -     * </pre>
        +     * <p> This accessor method returns a reference to the live list, not
        +     * a snapshot. Therefore any modification you make to the returned list will
        +     * be present inside the JAXB object. This is why there is not a
        +     * <CODE>set</CODE> method for the sequencePoint property.
        +     * 
        +     * <p> For example, to add a new item, do as follows: <pre>
        +     * getSequencePoint().add(newItem); </pre>
        +     * 
        +     * 
        +     * <p> Objects of the following type(s) are allowed in the list
        +     * {@link JalviewModel.PcaViewer.SequencePoint }
              * 
              * 
              */
        -    @XmlAccessorType(XmlAccessType.FIELD)
        -    @XmlType(name = "", propOrder = {
        -        "features",
        -        "pdbids",
        -        "hiddenSequences",
        -        "rnaViewer"
        -    })
        -    public static class JSeq {
        -
        -        @XmlElement(namespace = "www.jalview.org")
        -        protected List features;
        -        @XmlElement(namespace = "www.jalview.org")
        -        protected List pdbids;
        -        @XmlElement(namespace = "www.jalview.org", type = Integer.class)
        -        protected List hiddenSequences;
        -        @XmlElement(namespace = "www.jalview.org")
        -        protected List rnaViewer;
        -        @XmlAttribute(name = "colour")
        -        protected Integer colour;
        -        @XmlAttribute(name = "start", required = true)
        -        protected int start;
        -        @XmlAttribute(name = "end", required = true)
        -        protected int end;
        -        @XmlAttribute(name = "id", required = true)
        -        protected String id;
        -        @XmlAttribute(name = "hidden")
        -        protected Boolean hidden;
        -        @XmlAttribute(name = "viewreference")
        -        protected Boolean viewreference;
        -
        -        /**
        -         * Gets the value of the features property.
        -         * 
        -         * <p>
        -         * This accessor method returns a reference to the live list,
        -         * not a snapshot. Therefore any modification you make to the
        -         * returned list will be present inside the JAXB object.
        -         * This is why there is not a <CODE>set</CODE> method for the features property.
        -         * 
        -         * <p>
        -         * For example, to add a new item, do as follows:
        -         * <pre>
        -         *    getFeatures().add(newItem);
        -         * </pre>
        -         * 
        -         * 
        -         * <p>
        -         * Objects of the following type(s) are allowed in the list
        -         * {@link Feature }
        -         * 
        -         * 
        -         */
        -        public List getFeatures() {
        -            if (features == null) {
        -                features = new ArrayList();
        -            }
        -            return this.features;
        -        }
        +    public List getSequencePoint()
        +    {
        +      if (sequencePoint == null)
        +      {
        +        sequencePoint = new ArrayList();
        +      }
        +      return this.sequencePoint;
        +    }
         
        -        /**
        -         * Gets the value of the pdbids property.
        -         * 
        -         * <p>
        -         * This accessor method returns a reference to the live list,
        -         * not a snapshot. Therefore any modification you make to the
        -         * returned list will be present inside the JAXB object.
        -         * This is why there is not a <CODE>set</CODE> method for the pdbids property.
        -         * 
        -         * <p>
        -         * For example, to add a new item, do as follows:
        -         * <pre>
        -         *    getPdbids().add(newItem);
        -         * </pre>
        -         * 
        -         * 
        -         * <p>
        -         * Objects of the following type(s) are allowed in the list
        -         * {@link JalviewModel.JSeq.Pdbids }
        -         * 
        -         * 
        -         */
        -        public List getPdbids() {
        -            if (pdbids == null) {
        -                pdbids = new ArrayList();
        -            }
        -            return this.pdbids;
        -        }
        +    /**
        +     * Gets the value of the axis property.
        +     * 
        +     * <p> This accessor method returns a reference to the live list, not
        +     * a snapshot. Therefore any modification you make to the returned list will
        +     * be present inside the JAXB object. This is why there is not a
        +     * <CODE>set</CODE> method for the axis property.
        +     * 
        +     * <p> For example, to add a new item, do as follows: <pre>
        +     * getAxis().add(newItem); </pre>
        +     * 
        +     * 
        +     * <p> Objects of the following type(s) are allowed in the list
        +     * {@link JalviewModel.PcaViewer.Axis }
        +     * 
        +     * 
        +     */
        +    public List getAxis()
        +    {
        +      if (axis == null)
        +      {
        +        axis = new ArrayList();
        +      }
        +      return this.axis;
        +    }
         
        -        /**
        -         * Gets the value of the hiddenSequences property.
        -         * 
        -         * <p>
        -         * This accessor method returns a reference to the live list,
        -         * not a snapshot. Therefore any modification you make to the
        -         * returned list will be present inside the JAXB object.
        -         * This is why there is not a <CODE>set</CODE> method for the hiddenSequences property.
        -         * 
        -         * <p>
        -         * For example, to add a new item, do as follows:
        -         * <pre>
        -         *    getHiddenSequences().add(newItem);
        -         * </pre>
        -         * 
        -         * 
        -         * <p>
        -         * Objects of the following type(s) are allowed in the list
        -         * {@link Integer }
        -         * 
        -         * 
        -         */
        -        public List getHiddenSequences() {
        -            if (hiddenSequences == null) {
        -                hiddenSequences = new ArrayList();
        -            }
        -            return this.hiddenSequences;
        -        }
        +    /**
        +     * Gets the value of the seqPointMin property.
        +     * 
        +     * @return possible object is {@link JalviewModel.PcaViewer.SeqPointMin }
        +     * 
        +     */
        +    public JalviewModel.PcaViewer.SeqPointMin getSeqPointMin()
        +    {
        +      return seqPointMin;
        +    }
         
        -        /**
        -         * Gets the value of the rnaViewer property.
        -         * 
        -         * <p>
        -         * This accessor method returns a reference to the live list,
        -         * not a snapshot. Therefore any modification you make to the
        -         * returned list will be present inside the JAXB object.
        -         * This is why there is not a <CODE>set</CODE> method for the rnaViewer property.
        -         * 
        -         * <p>
        -         * For example, to add a new item, do as follows:
        -         * <pre>
        -         *    getRnaViewer().add(newItem);
        -         * </pre>
        -         * 
        -         * 
        -         * <p>
        -         * Objects of the following type(s) are allowed in the list
        -         * {@link JalviewModel.JSeq.RnaViewer }
        -         * 
        -         * 
        -         */
        -        public List getRnaViewer() {
        -            if (rnaViewer == null) {
        -                rnaViewer = new ArrayList();
        -            }
        -            return this.rnaViewer;
        -        }
        +    /**
        +     * Sets the value of the seqPointMin property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link JalviewModel.PcaViewer.SeqPointMin }
        +     * 
        +     */
        +    public void setSeqPointMin(JalviewModel.PcaViewer.SeqPointMin value)
        +    {
        +      this.seqPointMin = value;
        +    }
         
        -        /**
        -         * Gets the value of the colour property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public Integer getColour() {
        -            return colour;
        -        }
        +    /**
        +     * Gets the value of the seqPointMax property.
        +     * 
        +     * @return possible object is {@link JalviewModel.PcaViewer.SeqPointMax }
        +     * 
        +     */
        +    public JalviewModel.PcaViewer.SeqPointMax getSeqPointMax()
        +    {
        +      return seqPointMax;
        +    }
         
        -        /**
        -         * Sets the value of the colour property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public void setColour(Integer value) {
        -            this.colour = value;
        -        }
        +    /**
        +     * Sets the value of the seqPointMax property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link JalviewModel.PcaViewer.SeqPointMax }
        +     * 
        +     */
        +    public void setSeqPointMax(JalviewModel.PcaViewer.SeqPointMax value)
        +    {
        +      this.seqPointMax = value;
        +    }
         
        -        /**
        -         * Gets the value of the start property.
        -         * 
        -         */
        -        public int getStart() {
        -            return start;
        -        }
        +    /**
        +     * Gets the value of the pcaData property.
        +     * 
        +     * @return possible object is {@link PcaDataType }
        +     * 
        +     */
        +    public PcaDataType getPcaData()
        +    {
        +      return pcaData;
        +    }
         
        -        /**
        -         * Sets the value of the start property.
        -         * 
        -         */
        -        public void setStart(int value) {
        -            this.start = value;
        -        }
        +    /**
        +     * Sets the value of the pcaData property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link PcaDataType }
        +     * 
        +     */
        +    public void setPcaData(PcaDataType value)
        +    {
        +      this.pcaData = value;
        +    }
         
        -        /**
        -         * Gets the value of the end property.
        -         * 
        -         */
        -        public int getEnd() {
        -            return end;
        -        }
        +    /**
        +     * Gets the value of the title property.
        +     * 
        +     * @return possible object is {@link String }
        +     * 
        +     */
        +    public String getTitle()
        +    {
        +      return title;
        +    }
         
        -        /**
        -         * Sets the value of the end property.
        -         * 
        -         */
        -        public void setEnd(int value) {
        -            this.end = value;
        -        }
        +    /**
        +     * Sets the value of the title property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link String }
        +     * 
        +     */
        +    public void setTitle(String value)
        +    {
        +      this.title = value;
        +    }
         
        -        /**
        -         * Gets the value of the id property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link String }
        -         *     
        -         */
        -        public String getId() {
        -            return id;
        -        }
        +    /**
        +     * Gets the value of the scoreModelName property.
        +     * 
        +     * @return possible object is {@link String }
        +     * 
        +     */
        +    public String getScoreModelName()
        +    {
        +      return scoreModelName;
        +    }
         
        -        /**
        -         * Sets the value of the id property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link String }
        -         *     
        -         */
        -        public void setId(String value) {
        -            this.id = value;
        -        }
        +    /**
        +     * Sets the value of the scoreModelName property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link String }
        +     * 
        +     */
        +    public void setScoreModelName(String value)
        +    {
        +      this.scoreModelName = value;
        +    }
         
        -        /**
        -         * Gets the value of the hidden property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public Boolean isHidden() {
        -            return hidden;
        -        }
        +    /**
        +     * Gets the value of the xDim property.
        +     * 
        +     * @return possible object is {@link Integer }
        +     * 
        +     */
        +    public Integer getXDim()
        +    {
        +      return xDim;
        +    }
         
        -        /**
        -         * Sets the value of the hidden property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setHidden(Boolean value) {
        -            this.hidden = value;
        -        }
        +    /**
        +     * Sets the value of the xDim property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Integer }
        +     * 
        +     */
        +    public void setXDim(Integer value)
        +    {
        +      this.xDim = value;
        +    }
         
        -        /**
        -         * Gets the value of the viewreference property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public Boolean isViewreference() {
        -            return viewreference;
        -        }
        +    /**
        +     * Gets the value of the yDim property.
        +     * 
        +     * @return possible object is {@link Integer }
        +     * 
        +     */
        +    public Integer getYDim()
        +    {
        +      return yDim;
        +    }
         
        -        /**
        -         * Sets the value of the viewreference property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setViewreference(Boolean value) {
        -            this.viewreference = value;
        -        }
        +    /**
        +     * Sets the value of the yDim property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Integer }
        +     * 
        +     */
        +    public void setYDim(Integer value)
        +    {
        +      this.yDim = value;
        +    }
         
        +    /**
        +     * Gets the value of the zDim property.
        +     * 
        +     * @return possible object is {@link Integer }
        +     * 
        +     */
        +    public Integer getZDim()
        +    {
        +      return zDim;
        +    }
         
        -        /**
        -         * <p>Java class for anonymous complex type.
        -         * 
        -         * <p>The following schema fragment specifies the expected content contained within this class.
        -         * 
        -         * <pre>
        -         * &lt;complexType&gt;
        -         *   &lt;complexContent&gt;
        -         *     &lt;extension base="{www.jalview.org}pdbentry"&gt;
        -         *       &lt;sequence&gt;
        -         *         &lt;element name="structureState" maxOccurs="unbounded" minOccurs="0"&gt;
        -         *           &lt;complexType&gt;
        -         *             &lt;simpleContent&gt;
        -         *               &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema&gt;string"&gt;
        -         *                 &lt;attGroup ref="{www.jalview.org}swingwindow"/&gt;
        -         *                 &lt;attribute name="visible" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -         *                 &lt;attribute name="viewId" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -         *                 &lt;attribute name="alignwithAlignPanel" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        -         *                 &lt;attribute name="colourwithAlignPanel" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        -         *                 &lt;attribute name="colourByJmol" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        -         *                 &lt;attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -         *               &lt;/extension&gt;
        -         *             &lt;/simpleContent&gt;
        -         *           &lt;/complexType&gt;
        -         *         &lt;/element&gt;
        -         *       &lt;/sequence&gt;
        -         *     &lt;/extension&gt;
        -         *   &lt;/complexContent&gt;
        -         * &lt;/complexType&gt;
        -         * </pre>
        -         * 
        -         * 
        -         */
        -        @XmlAccessorType(XmlAccessType.FIELD)
        -        @XmlType(name = "", propOrder = {
        -            "structureState"
        -        })
        -        public static class Pdbids
        -            extends Pdbentry
        -        {
        +    /**
        +     * Sets the value of the zDim property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Integer }
        +     * 
        +     */
        +    public void setZDim(Integer value)
        +    {
        +      this.zDim = value;
        +    }
         
        -            @XmlElement(namespace = "www.jalview.org")
        -            protected List structureState;
        -
        -            /**
        -             * Gets the value of the structureState property.
        -             * 
        -             * <p>
        -             * This accessor method returns a reference to the live list,
        -             * not a snapshot. Therefore any modification you make to the
        -             * returned list will be present inside the JAXB object.
        -             * This is why there is not a <CODE>set</CODE> method for the structureState property.
        -             * 
        -             * <p>
        -             * For example, to add a new item, do as follows:
        -             * <pre>
        -             *    getStructureState().add(newItem);
        -             * </pre>
        -             * 
        -             * 
        -             * <p>
        -             * Objects of the following type(s) are allowed in the list
        -             * {@link JalviewModel.JSeq.Pdbids.StructureState }
        -             * 
        -             * 
        -             */
        -            public List getStructureState() {
        -                if (structureState == null) {
        -                    structureState = new ArrayList();
        -                }
        -                return this.structureState;
        -            }
        -
        -
        -            /**
        -             * <p>Java class for anonymous complex type.
        -             * 
        -             * <p>The following schema fragment specifies the expected content contained within this class.
        -             * 
        -             * <pre>
        -             * &lt;complexType&gt;
        -             *   &lt;simpleContent&gt;
        -             *     &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema&gt;string"&gt;
        -             *       &lt;attGroup ref="{www.jalview.org}swingwindow"/&gt;
        -             *       &lt;attribute name="visible" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -             *       &lt;attribute name="viewId" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -             *       &lt;attribute name="alignwithAlignPanel" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        -             *       &lt;attribute name="colourwithAlignPanel" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        -             *       &lt;attribute name="colourByJmol" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        -             *       &lt;attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -             *     &lt;/extension&gt;
        -             *   &lt;/simpleContent&gt;
        -             * &lt;/complexType&gt;
        -             * </pre>
        -             * 
        -             * 
        -             */
        -            @XmlAccessorType(XmlAccessType.FIELD)
        -            @XmlType(name = "", propOrder = {
        -                "value"
        -            })
        -            public static class StructureState {
        -
        -                @XmlValue
        -                protected String value;
        -                @XmlAttribute(name = "visible")
        -                protected Boolean visible;
        -                @XmlAttribute(name = "viewId")
        -                protected String viewId;
        -                @XmlAttribute(name = "alignwithAlignPanel")
        -                protected Boolean alignwithAlignPanel;
        -                @XmlAttribute(name = "colourwithAlignPanel")
        -                protected Boolean colourwithAlignPanel;
        -                @XmlAttribute(name = "colourByJmol")
        -                protected Boolean colourByJmol;
        -                @XmlAttribute(name = "type")
        -                protected String type;
        -                @XmlAttribute(name = "width")
        -                protected Integer width;
        -                @XmlAttribute(name = "height")
        -                protected Integer height;
        -                @XmlAttribute(name = "xpos")
        -                protected Integer xpos;
        -                @XmlAttribute(name = "ypos")
        -                protected Integer ypos;
        -
        -                /**
        -                 * Gets the value of the value property.
        -                 * 
        -                 * @return
        -                 *     possible object is
        -                 *     {@link String }
        -                 *     
        -                 */
        -                public String getValue() {
        -                    return value;
        -                }
        -
        -                /**
        -                 * Sets the value of the value property.
        -                 * 
        -                 * @param value
        -                 *     allowed object is
        -                 *     {@link String }
        -                 *     
        -                 */
        -                public void setValue(String value) {
        -                    this.value = value;
        -                }
        -
        -                /**
        -                 * Gets the value of the visible property.
        -                 * 
        -                 * @return
        -                 *     possible object is
        -                 *     {@link Boolean }
        -                 *     
        -                 */
        -                public Boolean isVisible() {
        -                    return visible;
        -                }
        -
        -                /**
        -                 * Sets the value of the visible property.
        -                 * 
        -                 * @param value
        -                 *     allowed object is
        -                 *     {@link Boolean }
        -                 *     
        -                 */
        -                public void setVisible(Boolean value) {
        -                    this.visible = value;
        -                }
        -
        -                /**
        -                 * Gets the value of the viewId property.
        -                 * 
        -                 * @return
        -                 *     possible object is
        -                 *     {@link String }
        -                 *     
        -                 */
        -                public String getViewId() {
        -                    return viewId;
        -                }
        -
        -                /**
        -                 * Sets the value of the viewId property.
        -                 * 
        -                 * @param value
        -                 *     allowed object is
        -                 *     {@link String }
        -                 *     
        -                 */
        -                public void setViewId(String value) {
        -                    this.viewId = value;
        -                }
        -
        -                /**
        -                 * Gets the value of the alignwithAlignPanel property.
        -                 * 
        -                 * @return
        -                 *     possible object is
        -                 *     {@link Boolean }
        -                 *     
        -                 */
        -                public boolean isAlignwithAlignPanel() {
        -                    if (alignwithAlignPanel == null) {
        -                        return true;
        -                    } else {
        -                        return alignwithAlignPanel;
        -                    }
        -                }
        -
        -                /**
        -                 * Sets the value of the alignwithAlignPanel property.
        -                 * 
        -                 * @param value
        -                 *     allowed object is
        -                 *     {@link Boolean }
        -                 *     
        -                 */
        -                public void setAlignwithAlignPanel(Boolean value) {
        -                    this.alignwithAlignPanel = value;
        -                }
        -
        -                /**
        -                 * Gets the value of the colourwithAlignPanel property.
        -                 * 
        -                 * @return
        -                 *     possible object is
        -                 *     {@link Boolean }
        -                 *     
        -                 */
        -                public boolean isColourwithAlignPanel() {
        -                    if (colourwithAlignPanel == null) {
        -                        return false;
        -                    } else {
        -                        return colourwithAlignPanel;
        -                    }
        -                }
        -
        -                /**
        -                 * Sets the value of the colourwithAlignPanel property.
        -                 * 
        -                 * @param value
        -                 *     allowed object is
        -                 *     {@link Boolean }
        -                 *     
        -                 */
        -                public void setColourwithAlignPanel(Boolean value) {
        -                    this.colourwithAlignPanel = value;
        -                }
        -
        -                /**
        -                 * Gets the value of the colourByJmol property.
        -                 * 
        -                 * @return
        -                 *     possible object is
        -                 *     {@link Boolean }
        -                 *     
        -                 */
        -                public boolean isColourByJmol() {
        -                    if (colourByJmol == null) {
        -                        return true;
        -                    } else {
        -                        return colourByJmol;
        -                    }
        -                }
        -
        -                /**
        -                 * Sets the value of the colourByJmol property.
        -                 * 
        -                 * @param value
        -                 *     allowed object is
        -                 *     {@link Boolean }
        -                 *     
        -                 */
        -                public void setColourByJmol(Boolean value) {
        -                    this.colourByJmol = value;
        -                }
        -
        -                /**
        -                 * Gets the value of the type property.
        -                 * 
        -                 * @return
        -                 *     possible object is
        -                 *     {@link String }
        -                 *     
        -                 */
        -                public String getType() {
        -                    return type;
        -                }
        -
        -                /**
        -                 * Sets the value of the type property.
        -                 * 
        -                 * @param value
        -                 *     allowed object is
        -                 *     {@link String }
        -                 *     
        -                 */
        -                public void setType(String value) {
        -                    this.type = value;
        -                }
        -
        -                /**
        -                 * Gets the value of the width property.
        -                 * 
        -                 * @return
        -                 *     possible object is
        -                 *     {@link Integer }
        -                 *     
        -                 */
        -                public Integer getWidth() {
        -                    return width;
        -                }
        -
        -                /**
        -                 * Sets the value of the width property.
        -                 * 
        -                 * @param value
        -                 *     allowed object is
        -                 *     {@link Integer }
        -                 *     
        -                 */
        -                public void setWidth(Integer value) {
        -                    this.width = value;
        -                }
        -
        -                /**
        -                 * Gets the value of the height property.
        -                 * 
        -                 * @return
        -                 *     possible object is
        -                 *     {@link Integer }
        -                 *     
        -                 */
        -                public Integer getHeight() {
        -                    return height;
        -                }
        -
        -                /**
        -                 * Sets the value of the height property.
        -                 * 
        -                 * @param value
        -                 *     allowed object is
        -                 *     {@link Integer }
        -                 *     
        -                 */
        -                public void setHeight(Integer value) {
        -                    this.height = value;
        -                }
        -
        -                /**
        -                 * Gets the value of the xpos property.
        -                 * 
        -                 * @return
        -                 *     possible object is
        -                 *     {@link Integer }
        -                 *     
        -                 */
        -                public Integer getXpos() {
        -                    return xpos;
        -                }
        -
        -                /**
        -                 * Sets the value of the xpos property.
        -                 * 
        -                 * @param value
        -                 *     allowed object is
        -                 *     {@link Integer }
        -                 *     
        -                 */
        -                public void setXpos(Integer value) {
        -                    this.xpos = value;
        -                }
        -
        -                /**
        -                 * Gets the value of the ypos property.
        -                 * 
        -                 * @return
        -                 *     possible object is
        -                 *     {@link Integer }
        -                 *     
        -                 */
        -                public Integer getYpos() {
        -                    return ypos;
        -                }
        -
        -                /**
        -                 * Sets the value of the ypos property.
        -                 * 
        -                 * @param value
        -                 *     allowed object is
        -                 *     {@link Integer }
        -                 *     
        -                 */
        -                public void setYpos(Integer value) {
        -                    this.ypos = value;
        -                }
        -
        -            }
        +    /**
        +     * Gets the value of the bgColour property.
        +     * 
        +     * @return possible object is {@link Integer }
        +     * 
        +     */
        +    public Integer getBgColour()
        +    {
        +      return bgColour;
        +    }
         
        -        }
        +    /**
        +     * Sets the value of the bgColour property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Integer }
        +     * 
        +     */
        +    public void setBgColour(Integer value)
        +    {
        +      this.bgColour = value;
        +    }
         
        +    /**
        +     * Gets the value of the scaleFactor property.
        +     * 
        +     * @return possible object is {@link Float }
        +     * 
        +     */
        +    public Float getScaleFactor()
        +    {
        +      return scaleFactor;
        +    }
         
        -        /**
        -         * <p>Java class for anonymous complex type.
        -         * 
        -         * <p>The following schema fragment specifies the expected content contained within this class.
        -         * 
        -         * <pre>
        -         * &lt;complexType&gt;
        -         *   &lt;complexContent&gt;
        -         *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        -         *       &lt;sequence&gt;
        -         *         &lt;element name="secondaryStructure" maxOccurs="unbounded"&gt;
        -         *           &lt;complexType&gt;
        -         *             &lt;complexContent&gt;
        -         *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        -         *                 &lt;attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -         *                 &lt;attribute name="annotationId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -         *                 &lt;attribute name="gapped" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -         *                 &lt;attribute name="viewerState" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -         *               &lt;/restriction&gt;
        -         *             &lt;/complexContent&gt;
        -         *           &lt;/complexType&gt;
        -         *         &lt;/element&gt;
        -         *       &lt;/sequence&gt;
        -         *       &lt;attGroup ref="{www.jalview.org}swingwindow"/&gt;
        -         *       &lt;attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -         *       &lt;attribute name="viewId" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -         *       &lt;attribute name="dividerLocation" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -         *       &lt;attribute name="selectedRna" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -         *     &lt;/restriction&gt;
        -         *   &lt;/complexContent&gt;
        -         * &lt;/complexType&gt;
        -         * </pre>
        -         * 
        -         * 
        -         */
        -        @XmlAccessorType(XmlAccessType.FIELD)
        -        @XmlType(name = "", propOrder = {
        -            "secondaryStructure"
        -        })
        -        public static class RnaViewer {
        -
        -            @XmlElement(namespace = "www.jalview.org", required = true)
        -            protected List secondaryStructure;
        -            @XmlAttribute(name = "title")
        -            protected String title;
        -            @XmlAttribute(name = "viewId")
        -            protected String viewId;
        -            @XmlAttribute(name = "dividerLocation")
        -            protected Integer dividerLocation;
        -            @XmlAttribute(name = "selectedRna")
        -            protected Integer selectedRna;
        -            @XmlAttribute(name = "width")
        -            protected Integer width;
        -            @XmlAttribute(name = "height")
        -            protected Integer height;
        -            @XmlAttribute(name = "xpos")
        -            protected Integer xpos;
        -            @XmlAttribute(name = "ypos")
        -            protected Integer ypos;
        -
        -            /**
        -             * Gets the value of the secondaryStructure property.
        -             * 
        -             * <p>
        -             * This accessor method returns a reference to the live list,
        -             * not a snapshot. Therefore any modification you make to the
        -             * returned list will be present inside the JAXB object.
        -             * This is why there is not a <CODE>set</CODE> method for the secondaryStructure property.
        -             * 
        -             * <p>
        -             * For example, to add a new item, do as follows:
        -             * <pre>
        -             *    getSecondaryStructure().add(newItem);
        -             * </pre>
        -             * 
        -             * 
        -             * <p>
        -             * Objects of the following type(s) are allowed in the list
        -             * {@link JalviewModel.JSeq.RnaViewer.SecondaryStructure }
        -             * 
        -             * 
        -             */
        -            public List getSecondaryStructure() {
        -                if (secondaryStructure == null) {
        -                    secondaryStructure = new ArrayList();
        -                }
        -                return this.secondaryStructure;
        -            }
        -
        -            /**
        -             * Gets the value of the title property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link String }
        -             *     
        -             */
        -            public String getTitle() {
        -                return title;
        -            }
        -
        -            /**
        -             * Sets the value of the title property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link String }
        -             *     
        -             */
        -            public void setTitle(String value) {
        -                this.title = value;
        -            }
        -
        -            /**
        -             * Gets the value of the viewId property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link String }
        -             *     
        -             */
        -            public String getViewId() {
        -                return viewId;
        -            }
        -
        -            /**
        -             * Sets the value of the viewId property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link String }
        -             *     
        -             */
        -            public void setViewId(String value) {
        -                this.viewId = value;
        -            }
        -
        -            /**
        -             * Gets the value of the dividerLocation property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link Integer }
        -             *     
        -             */
        -            public Integer getDividerLocation() {
        -                return dividerLocation;
        -            }
        -
        -            /**
        -             * Sets the value of the dividerLocation property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link Integer }
        -             *     
        -             */
        -            public void setDividerLocation(Integer value) {
        -                this.dividerLocation = value;
        -            }
        -
        -            /**
        -             * Gets the value of the selectedRna property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link Integer }
        -             *     
        -             */
        -            public Integer getSelectedRna() {
        -                return selectedRna;
        -            }
        -
        -            /**
        -             * Sets the value of the selectedRna property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link Integer }
        -             *     
        -             */
        -            public void setSelectedRna(Integer value) {
        -                this.selectedRna = value;
        -            }
        -
        -            /**
        -             * Gets the value of the width property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link Integer }
        -             *     
        -             */
        -            public Integer getWidth() {
        -                return width;
        -            }
        -
        -            /**
        -             * Sets the value of the width property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link Integer }
        -             *     
        -             */
        -            public void setWidth(Integer value) {
        -                this.width = value;
        -            }
        -
        -            /**
        -             * Gets the value of the height property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link Integer }
        -             *     
        -             */
        -            public Integer getHeight() {
        -                return height;
        -            }
        -
        -            /**
        -             * Sets the value of the height property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link Integer }
        -             *     
        -             */
        -            public void setHeight(Integer value) {
        -                this.height = value;
        -            }
        -
        -            /**
        -             * Gets the value of the xpos property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link Integer }
        -             *     
        -             */
        -            public Integer getXpos() {
        -                return xpos;
        -            }
        -
        -            /**
        -             * Sets the value of the xpos property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link Integer }
        -             *     
        -             */
        -            public void setXpos(Integer value) {
        -                this.xpos = value;
        -            }
        -
        -            /**
        -             * Gets the value of the ypos property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link Integer }
        -             *     
        -             */
        -            public Integer getYpos() {
        -                return ypos;
        -            }
        -
        -            /**
        -             * Sets the value of the ypos property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link Integer }
        -             *     
        -             */
        -            public void setYpos(Integer value) {
        -                this.ypos = value;
        -            }
        -
        -
        -            /**
        -             * <p>Java class for anonymous complex type.
        -             * 
        -             * <p>The following schema fragment specifies the expected content contained within this class.
        -             * 
        -             * <pre>
        -             * &lt;complexType&gt;
        -             *   &lt;complexContent&gt;
        -             *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        -             *       &lt;attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -             *       &lt;attribute name="annotationId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -             *       &lt;attribute name="gapped" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -             *       &lt;attribute name="viewerState" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -             *     &lt;/restriction&gt;
        -             *   &lt;/complexContent&gt;
        -             * &lt;/complexType&gt;
        -             * </pre>
        -             * 
        -             * 
        -             */
        -            @XmlAccessorType(XmlAccessType.FIELD)
        -            @XmlType(name = "")
        -            public static class SecondaryStructure {
        -
        -                @XmlAttribute(name = "title")
        -                protected String title;
        -                @XmlAttribute(name = "annotationId", required = true)
        -                protected String annotationId;
        -                @XmlAttribute(name = "gapped")
        -                protected Boolean gapped;
        -                @XmlAttribute(name = "viewerState")
        -                protected String viewerState;
        -
        -                /**
        -                 * Gets the value of the title property.
        -                 * 
        -                 * @return
        -                 *     possible object is
        -                 *     {@link String }
        -                 *     
        -                 */
        -                public String getTitle() {
        -                    return title;
        -                }
        -
        -                /**
        -                 * Sets the value of the title property.
        -                 * 
        -                 * @param value
        -                 *     allowed object is
        -                 *     {@link String }
        -                 *     
        -                 */
        -                public void setTitle(String value) {
        -                    this.title = value;
        -                }
        -
        -                /**
        -                 * Gets the value of the annotationId property.
        -                 * 
        -                 * @return
        -                 *     possible object is
        -                 *     {@link String }
        -                 *     
        -                 */
        -                public String getAnnotationId() {
        -                    return annotationId;
        -                }
        -
        -                /**
        -                 * Sets the value of the annotationId property.
        -                 * 
        -                 * @param value
        -                 *     allowed object is
        -                 *     {@link String }
        -                 *     
        -                 */
        -                public void setAnnotationId(String value) {
        -                    this.annotationId = value;
        -                }
        -
        -                /**
        -                 * Gets the value of the gapped property.
        -                 * 
        -                 * @return
        -                 *     possible object is
        -                 *     {@link Boolean }
        -                 *     
        -                 */
        -                public Boolean isGapped() {
        -                    return gapped;
        -                }
        -
        -                /**
        -                 * Sets the value of the gapped property.
        -                 * 
        -                 * @param value
        -                 *     allowed object is
        -                 *     {@link Boolean }
        -                 *     
        -                 */
        -                public void setGapped(Boolean value) {
        -                    this.gapped = value;
        -                }
        -
        -                /**
        -                 * Gets the value of the viewerState property.
        -                 * 
        -                 * @return
        -                 *     possible object is
        -                 *     {@link String }
        -                 *     
        -                 */
        -                public String getViewerState() {
        -                    return viewerState;
        -                }
        -
        -                /**
        -                 * Sets the value of the viewerState property.
        -                 * 
        -                 * @param value
        -                 *     allowed object is
        -                 *     {@link String }
        -                 *     
        -                 */
        -                public void setViewerState(String value) {
        -                    this.viewerState = value;
        -                }
        -
        -            }
        +    /**
        +     * Sets the value of the scaleFactor property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Float }
        +     * 
        +     */
        +    public void setScaleFactor(Float value)
        +    {
        +      this.scaleFactor = value;
        +    }
         
        -        }
        +    /**
        +     * Gets the value of the showLabels property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public Boolean isShowLabels()
        +    {
        +      return showLabels;
        +    }
         
        +    /**
        +     * Sets the value of the showLabels property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setShowLabels(Boolean value)
        +    {
        +      this.showLabels = value;
             }
         
        +    /**
        +     * Gets the value of the linkToAllViews property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public Boolean isLinkToAllViews()
        +    {
        +      return linkToAllViews;
        +    }
         
             /**
        -     * <p>Java class for anonymous complex type.
        +     * Sets the value of the linkToAllViews property.
              * 
        -     * <p>The following schema fragment specifies the expected content contained within this class.
        -     * 
        -     * <pre>
        -     * &lt;complexType&gt;
        -     *   &lt;complexContent&gt;
        -     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        -     *       &lt;sequence&gt;
        -     *         &lt;element name="sequencePoint" maxOccurs="unbounded"&gt;
        -     *           &lt;complexType&gt;
        -     *             &lt;complexContent&gt;
        -     *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        -     *                 &lt;attGroup ref="{www.jalview.org}position"/&gt;
        -     *                 &lt;attribute name="sequenceRef" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -     *               &lt;/restriction&gt;
        -     *             &lt;/complexContent&gt;
        -     *           &lt;/complexType&gt;
        -     *         &lt;/element&gt;
        -     *         &lt;element name="axis" maxOccurs="3" minOccurs="3"&gt;
        -     *           &lt;complexType&gt;
        -     *             &lt;complexContent&gt;
        -     *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        -     *                 &lt;attGroup ref="{www.jalview.org}position"/&gt;
        -     *               &lt;/restriction&gt;
        -     *             &lt;/complexContent&gt;
        -     *           &lt;/complexType&gt;
        -     *         &lt;/element&gt;
        -     *         &lt;element name="seqPointMin"&gt;
        -     *           &lt;complexType&gt;
        -     *             &lt;complexContent&gt;
        -     *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        -     *                 &lt;attGroup ref="{www.jalview.org}position"/&gt;
        -     *               &lt;/restriction&gt;
        -     *             &lt;/complexContent&gt;
        -     *           &lt;/complexType&gt;
        -     *         &lt;/element&gt;
        -     *         &lt;element name="seqPointMax"&gt;
        -     *           &lt;complexType&gt;
        -     *             &lt;complexContent&gt;
        -     *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        -     *                 &lt;attGroup ref="{www.jalview.org}position"/&gt;
        -     *               &lt;/restriction&gt;
        -     *             &lt;/complexContent&gt;
        -     *           &lt;/complexType&gt;
        -     *         &lt;/element&gt;
        -     *         &lt;element name="pcaData" type="{www.jalview.org}PcaDataType"/&gt;
        -     *       &lt;/sequence&gt;
        -     *       &lt;attGroup ref="{www.jalview.org}swingwindow"/&gt;
        -     *       &lt;attGroup ref="{www.jalview.org}SimilarityParams"/&gt;
        -     *       &lt;attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -     *       &lt;attribute name="scoreModelName" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -     *       &lt;attribute name="xDim" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -     *       &lt;attribute name="yDim" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -     *       &lt;attribute name="zDim" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -     *       &lt;attribute name="bgColour" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -     *       &lt;attribute name="scaleFactor" type="{http://www.w3.org/2001/XMLSchema}float" /&gt;
        -     *       &lt;attribute name="showLabels" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -     *       &lt;attribute name="linkToAllViews" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -     *     &lt;/restriction&gt;
        -     *   &lt;/complexContent&gt;
        -     * &lt;/complexType&gt;
        -     * </pre>
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setLinkToAllViews(Boolean value)
        +    {
        +      this.linkToAllViews = value;
        +    }
        +
        +    /**
        +     * Gets the value of the width property.
              * 
        +     * @return possible object is {@link Integer }
              * 
              */
        -    @XmlAccessorType(XmlAccessType.FIELD)
        -    @XmlType(name = "", propOrder = {
        -        "sequencePoint",
        -        "axis",
        -        "seqPointMin",
        -        "seqPointMax",
        -        "pcaData"
        -    })
        -    public static class PcaViewer {
        -
        -        @XmlElement(namespace = "www.jalview.org", required = true)
        -        protected List sequencePoint;
        -        @XmlElement(namespace = "www.jalview.org", required = true)
        -        protected List axis;
        -        @XmlElement(namespace = "www.jalview.org", required = true)
        -        protected JalviewModel.PcaViewer.SeqPointMin seqPointMin;
        -        @XmlElement(namespace = "www.jalview.org", required = true)
        -        protected JalviewModel.PcaViewer.SeqPointMax seqPointMax;
        -        @XmlElement(namespace = "www.jalview.org", required = true)
        -        protected PcaDataType pcaData;
        -        @XmlAttribute(name = "title")
        -        protected String title;
        -        @XmlAttribute(name = "scoreModelName")
        -        protected String scoreModelName;
        -        @XmlAttribute(name = "xDim")
        -        protected Integer xDim;
        -        @XmlAttribute(name = "yDim")
        -        protected Integer yDim;
        -        @XmlAttribute(name = "zDim")
        -        protected Integer zDim;
        -        @XmlAttribute(name = "bgColour")
        -        protected Integer bgColour;
        -        @XmlAttribute(name = "scaleFactor")
        -        protected Float scaleFactor;
        -        @XmlAttribute(name = "showLabels")
        -        protected Boolean showLabels;
        -        @XmlAttribute(name = "linkToAllViews")
        -        protected Boolean linkToAllViews;
        -        @XmlAttribute(name = "width")
        -        protected Integer width;
        -        @XmlAttribute(name = "height")
        -        protected Integer height;
        -        @XmlAttribute(name = "xpos")
        -        protected Integer xpos;
        -        @XmlAttribute(name = "ypos")
        -        protected Integer ypos;
        -        @XmlAttribute(name = "includeGaps")
        -        protected Boolean includeGaps;
        -        @XmlAttribute(name = "matchGaps")
        -        protected Boolean matchGaps;
        -        @XmlAttribute(name = "includeGappedColumns")
        -        protected Boolean includeGappedColumns;
        -        @XmlAttribute(name = "denominateByShortestLength")
        -        protected Boolean denominateByShortestLength;
        -
        -        /**
        -         * Gets the value of the sequencePoint property.
        -         * 
        -         * <p>
        -         * This accessor method returns a reference to the live list,
        -         * not a snapshot. Therefore any modification you make to the
        -         * returned list will be present inside the JAXB object.
        -         * This is why there is not a <CODE>set</CODE> method for the sequencePoint property.
        -         * 
        -         * <p>
        -         * For example, to add a new item, do as follows:
        -         * <pre>
        -         *    getSequencePoint().add(newItem);
        -         * </pre>
        -         * 
        -         * 
        -         * <p>
        -         * Objects of the following type(s) are allowed in the list
        -         * {@link JalviewModel.PcaViewer.SequencePoint }
        -         * 
        -         * 
        -         */
        -        public List getSequencePoint() {
        -            if (sequencePoint == null) {
        -                sequencePoint = new ArrayList();
        -            }
        -            return this.sequencePoint;
        -        }
        -
        -        /**
        -         * Gets the value of the axis property.
        -         * 
        -         * <p>
        -         * This accessor method returns a reference to the live list,
        -         * not a snapshot. Therefore any modification you make to the
        -         * returned list will be present inside the JAXB object.
        -         * This is why there is not a <CODE>set</CODE> method for the axis property.
        -         * 
        -         * <p>
        -         * For example, to add a new item, do as follows:
        -         * <pre>
        -         *    getAxis().add(newItem);
        -         * </pre>
        -         * 
        -         * 
        -         * <p>
        -         * Objects of the following type(s) are allowed in the list
        -         * {@link JalviewModel.PcaViewer.Axis }
        -         * 
        -         * 
        -         */
        -        public List getAxis() {
        -            if (axis == null) {
        -                axis = new ArrayList();
        -            }
        -            return this.axis;
        -        }
        -
        -        /**
        -         * Gets the value of the seqPointMin property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link JalviewModel.PcaViewer.SeqPointMin }
        -         *     
        -         */
        -        public JalviewModel.PcaViewer.SeqPointMin getSeqPointMin() {
        -            return seqPointMin;
        -        }
        -
        -        /**
        -         * Sets the value of the seqPointMin property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link JalviewModel.PcaViewer.SeqPointMin }
        -         *     
        -         */
        -        public void setSeqPointMin(JalviewModel.PcaViewer.SeqPointMin value) {
        -            this.seqPointMin = value;
        -        }
        -
        -        /**
        -         * Gets the value of the seqPointMax property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link JalviewModel.PcaViewer.SeqPointMax }
        -         *     
        -         */
        -        public JalviewModel.PcaViewer.SeqPointMax getSeqPointMax() {
        -            return seqPointMax;
        -        }
        -
        -        /**
        -         * Sets the value of the seqPointMax property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link JalviewModel.PcaViewer.SeqPointMax }
        -         *     
        -         */
        -        public void setSeqPointMax(JalviewModel.PcaViewer.SeqPointMax value) {
        -            this.seqPointMax = value;
        -        }
        -
        -        /**
        -         * Gets the value of the pcaData property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link PcaDataType }
        -         *     
        -         */
        -        public PcaDataType getPcaData() {
        -            return pcaData;
        -        }
        -
        -        /**
        -         * Sets the value of the pcaData property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link PcaDataType }
        -         *     
        -         */
        -        public void setPcaData(PcaDataType value) {
        -            this.pcaData = value;
        -        }
        -
        -        /**
        -         * Gets the value of the title property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link String }
        -         *     
        -         */
        -        public String getTitle() {
        -            return title;
        -        }
        -
        -        /**
        -         * Sets the value of the title property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link String }
        -         *     
        -         */
        -        public void setTitle(String value) {
        -            this.title = value;
        -        }
        -
        -        /**
        -         * Gets the value of the scoreModelName property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link String }
        -         *     
        -         */
        -        public String getScoreModelName() {
        -            return scoreModelName;
        -        }
        +    public Integer getWidth()
        +    {
        +      return width;
        +    }
         
        -        /**
        -         * Sets the value of the scoreModelName property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link String }
        -         *     
        -         */
        -        public void setScoreModelName(String value) {
        -            this.scoreModelName = value;
        -        }
        +    /**
        +     * Sets the value of the width property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Integer }
        +     * 
        +     */
        +    public void setWidth(Integer value)
        +    {
        +      this.width = value;
        +    }
         
        -        /**
        -         * Gets the value of the xDim property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public Integer getXDim() {
        -            return xDim;
        -        }
        +    /**
        +     * Gets the value of the height property.
        +     * 
        +     * @return possible object is {@link Integer }
        +     * 
        +     */
        +    public Integer getHeight()
        +    {
        +      return height;
        +    }
         
        -        /**
        -         * Sets the value of the xDim property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public void setXDim(Integer value) {
        -            this.xDim = value;
        -        }
        +    /**
        +     * Sets the value of the height property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Integer }
        +     * 
        +     */
        +    public void setHeight(Integer value)
        +    {
        +      this.height = value;
        +    }
         
        -        /**
        -         * Gets the value of the yDim property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public Integer getYDim() {
        -            return yDim;
        -        }
        +    /**
        +     * Gets the value of the xpos property.
        +     * 
        +     * @return possible object is {@link Integer }
        +     * 
        +     */
        +    public Integer getXpos()
        +    {
        +      return xpos;
        +    }
         
        -        /**
        -         * Sets the value of the yDim property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public void setYDim(Integer value) {
        -            this.yDim = value;
        -        }
        +    /**
        +     * Sets the value of the xpos property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Integer }
        +     * 
        +     */
        +    public void setXpos(Integer value)
        +    {
        +      this.xpos = value;
        +    }
         
        -        /**
        -         * Gets the value of the zDim property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public Integer getZDim() {
        -            return zDim;
        -        }
        +    /**
        +     * Gets the value of the ypos property.
        +     * 
        +     * @return possible object is {@link Integer }
        +     * 
        +     */
        +    public Integer getYpos()
        +    {
        +      return ypos;
        +    }
         
        -        /**
        -         * Sets the value of the zDim property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public void setZDim(Integer value) {
        -            this.zDim = value;
        -        }
        +    /**
        +     * Sets the value of the ypos property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Integer }
        +     * 
        +     */
        +    public void setYpos(Integer value)
        +    {
        +      this.ypos = value;
        +    }
         
        -        /**
        -         * Gets the value of the bgColour property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public Integer getBgColour() {
        -            return bgColour;
        -        }
        +    /**
        +     * Gets the value of the includeGaps property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public Boolean isIncludeGaps()
        +    {
        +      return includeGaps;
        +    }
         
        -        /**
        -         * Sets the value of the bgColour property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public void setBgColour(Integer value) {
        -            this.bgColour = value;
        -        }
        +    /**
        +     * Sets the value of the includeGaps property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setIncludeGaps(Boolean value)
        +    {
        +      this.includeGaps = value;
        +    }
         
        -        /**
        -         * Gets the value of the scaleFactor property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Float }
        -         *     
        -         */
        -        public Float getScaleFactor() {
        -            return scaleFactor;
        -        }
        +    /**
        +     * Gets the value of the matchGaps property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public Boolean isMatchGaps()
        +    {
        +      return matchGaps;
        +    }
         
        -        /**
        -         * Sets the value of the scaleFactor property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Float }
        -         *     
        -         */
        -        public void setScaleFactor(Float value) {
        -            this.scaleFactor = value;
        -        }
        +    /**
        +     * Sets the value of the matchGaps property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setMatchGaps(Boolean value)
        +    {
        +      this.matchGaps = value;
        +    }
         
        -        /**
        -         * Gets the value of the showLabels property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public Boolean isShowLabels() {
        -            return showLabels;
        -        }
        +    /**
        +     * Gets the value of the includeGappedColumns property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public Boolean isIncludeGappedColumns()
        +    {
        +      return includeGappedColumns;
        +    }
         
        -        /**
        -         * Sets the value of the showLabels property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setShowLabels(Boolean value) {
        -            this.showLabels = value;
        -        }
        +    /**
        +     * Sets the value of the includeGappedColumns property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setIncludeGappedColumns(Boolean value)
        +    {
        +      this.includeGappedColumns = value;
        +    }
         
        -        /**
        -         * Gets the value of the linkToAllViews property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public Boolean isLinkToAllViews() {
        -            return linkToAllViews;
        -        }
        +    /**
        +     * Gets the value of the denominateByShortestLength property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public Boolean isDenominateByShortestLength()
        +    {
        +      return denominateByShortestLength;
        +    }
         
        -        /**
        -         * Sets the value of the linkToAllViews property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setLinkToAllViews(Boolean value) {
        -            this.linkToAllViews = value;
        -        }
        +    /**
        +     * Sets the value of the denominateByShortestLength property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setDenominateByShortestLength(Boolean value)
        +    {
        +      this.denominateByShortestLength = value;
        +    }
         
        -        /**
        -         * Gets the value of the width property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public Integer getWidth() {
        -            return width;
        -        }
        +    /**
        +     * <p>Java class for anonymous complex type.
        +     * 
        +     * <p>The following schema fragment specifies the expected content
        +     * contained within this class.
        +     * 
        +     * <pre> &lt;complexType&gt; &lt;complexContent&gt;
        +     * &lt;restriction
        +     * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; &lt;attGroup
        +     * ref="{www.jalview.org}position"/&gt; &lt;/restriction&gt;
        +     * &lt;/complexContent&gt; &lt;/complexType&gt; </pre>
        +     * 
        +     * 
        +     */
        +    @XmlAccessorType(XmlAccessType.FIELD)
        +    @XmlType(name = "")
        +    public static class Axis
        +    {
        +
        +      @XmlAttribute(name = "xPos")
        +      protected Float xPos;
        +
        +      @XmlAttribute(name = "yPos")
        +      protected Float yPos;
        +
        +      @XmlAttribute(name = "zPos")
        +      protected Float zPos;
        +
        +      /**
        +       * Gets the value of the xPos property.
        +       * 
        +       * @return possible object is {@link Float }
        +       * 
        +       */
        +      public Float getXPos()
        +      {
        +        return xPos;
        +      }
        +
        +      /**
        +       * Sets the value of the xPos property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Float }
        +       * 
        +       */
        +      public void setXPos(Float value)
        +      {
        +        this.xPos = value;
        +      }
        +
        +      /**
        +       * Gets the value of the yPos property.
        +       * 
        +       * @return possible object is {@link Float }
        +       * 
        +       */
        +      public Float getYPos()
        +      {
        +        return yPos;
        +      }
        +
        +      /**
        +       * Sets the value of the yPos property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Float }
        +       * 
        +       */
        +      public void setYPos(Float value)
        +      {
        +        this.yPos = value;
        +      }
        +
        +      /**
        +       * Gets the value of the zPos property.
        +       * 
        +       * @return possible object is {@link Float }
        +       * 
        +       */
        +      public Float getZPos()
        +      {
        +        return zPos;
        +      }
        +
        +      /**
        +       * Sets the value of the zPos property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Float }
        +       * 
        +       */
        +      public void setZPos(Float value)
        +      {
        +        this.zPos = value;
        +      }
         
        -        /**
        -         * Sets the value of the width property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public void setWidth(Integer value) {
        -            this.width = value;
        -        }
        +    }
         
        -        /**
        -         * Gets the value of the height property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public Integer getHeight() {
        -            return height;
        -        }
        +    /**
        +     * <p>Java class for anonymous complex type.
        +     * 
        +     * <p>The following schema fragment specifies the expected content
        +     * contained within this class.
        +     * 
        +     * <pre> &lt;complexType&gt; &lt;complexContent&gt;
        +     * &lt;restriction
        +     * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; &lt;attGroup
        +     * ref="{www.jalview.org}position"/&gt; &lt;/restriction&gt;
        +     * &lt;/complexContent&gt; &lt;/complexType&gt; </pre>
        +     * 
        +     * 
        +     */
        +    @XmlAccessorType(XmlAccessType.FIELD)
        +    @XmlType(name = "")
        +    public static class SeqPointMax
        +    {
        +
        +      @XmlAttribute(name = "xPos")
        +      protected Float xPos;
        +
        +      @XmlAttribute(name = "yPos")
        +      protected Float yPos;
        +
        +      @XmlAttribute(name = "zPos")
        +      protected Float zPos;
        +
        +      /**
        +       * Gets the value of the xPos property.
        +       * 
        +       * @return possible object is {@link Float }
        +       * 
        +       */
        +      public Float getXPos()
        +      {
        +        return xPos;
        +      }
        +
        +      /**
        +       * Sets the value of the xPos property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Float }
        +       * 
        +       */
        +      public void setXPos(Float value)
        +      {
        +        this.xPos = value;
        +      }
        +
        +      /**
        +       * Gets the value of the yPos property.
        +       * 
        +       * @return possible object is {@link Float }
        +       * 
        +       */
        +      public Float getYPos()
        +      {
        +        return yPos;
        +      }
        +
        +      /**
        +       * Sets the value of the yPos property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Float }
        +       * 
        +       */
        +      public void setYPos(Float value)
        +      {
        +        this.yPos = value;
        +      }
        +
        +      /**
        +       * Gets the value of the zPos property.
        +       * 
        +       * @return possible object is {@link Float }
        +       * 
        +       */
        +      public Float getZPos()
        +      {
        +        return zPos;
        +      }
        +
        +      /**
        +       * Sets the value of the zPos property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Float }
        +       * 
        +       */
        +      public void setZPos(Float value)
        +      {
        +        this.zPos = value;
        +      }
         
        -        /**
        -         * Sets the value of the height property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public void setHeight(Integer value) {
        -            this.height = value;
        -        }
        +    }
         
        -        /**
        -         * Gets the value of the xpos property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public Integer getXpos() {
        -            return xpos;
        -        }
        +    /**
        +     * <p>Java class for anonymous complex type.
        +     * 
        +     * <p>The following schema fragment specifies the expected content
        +     * contained within this class.
        +     * 
        +     * <pre> &lt;complexType&gt; &lt;complexContent&gt;
        +     * &lt;restriction
        +     * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; &lt;attGroup
        +     * ref="{www.jalview.org}position"/&gt; &lt;/restriction&gt;
        +     * &lt;/complexContent&gt; &lt;/complexType&gt; </pre>
        +     * 
        +     * 
        +     */
        +    @XmlAccessorType(XmlAccessType.FIELD)
        +    @XmlType(name = "")
        +    public static class SeqPointMin
        +    {
        +
        +      @XmlAttribute(name = "xPos")
        +      protected Float xPos;
        +
        +      @XmlAttribute(name = "yPos")
        +      protected Float yPos;
        +
        +      @XmlAttribute(name = "zPos")
        +      protected Float zPos;
        +
        +      /**
        +       * Gets the value of the xPos property.
        +       * 
        +       * @return possible object is {@link Float }
        +       * 
        +       */
        +      public Float getXPos()
        +      {
        +        return xPos;
        +      }
        +
        +      /**
        +       * Sets the value of the xPos property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Float }
        +       * 
        +       */
        +      public void setXPos(Float value)
        +      {
        +        this.xPos = value;
        +      }
        +
        +      /**
        +       * Gets the value of the yPos property.
        +       * 
        +       * @return possible object is {@link Float }
        +       * 
        +       */
        +      public Float getYPos()
        +      {
        +        return yPos;
        +      }
        +
        +      /**
        +       * Sets the value of the yPos property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Float }
        +       * 
        +       */
        +      public void setYPos(Float value)
        +      {
        +        this.yPos = value;
        +      }
        +
        +      /**
        +       * Gets the value of the zPos property.
        +       * 
        +       * @return possible object is {@link Float }
        +       * 
        +       */
        +      public Float getZPos()
        +      {
        +        return zPos;
        +      }
        +
        +      /**
        +       * Sets the value of the zPos property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Float }
        +       * 
        +       */
        +      public void setZPos(Float value)
        +      {
        +        this.zPos = value;
        +      }
         
        -        /**
        -         * Sets the value of the xpos property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public void setXpos(Integer value) {
        -            this.xpos = value;
        -        }
        +    }
         
        -        /**
        -         * Gets the value of the ypos property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public Integer getYpos() {
        -            return ypos;
        -        }
        +    /**
        +     * <p>Java class for anonymous complex type.
        +     * 
        +     * <p>The following schema fragment specifies the expected content
        +     * contained within this class.
        +     * 
        +     * <pre> &lt;complexType&gt; &lt;complexContent&gt;
        +     * &lt;restriction
        +     * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; &lt;attGroup
        +     * ref="{www.jalview.org}position"/&gt; &lt;attribute
        +     * name="sequenceRef" type="{http://www.w3.org/2001/XMLSchema}string"
        +     * /&gt; &lt;/restriction&gt; &lt;/complexContent&gt;
        +     * &lt;/complexType&gt; </pre>
        +     * 
        +     * 
        +     */
        +    @XmlAccessorType(XmlAccessType.FIELD)
        +    @XmlType(name = "")
        +    public static class SequencePoint
        +    {
        +
        +      @XmlAttribute(name = "sequenceRef")
        +      protected String sequenceRef;
        +
        +      @XmlAttribute(name = "xPos")
        +      protected Float xPos;
        +
        +      @XmlAttribute(name = "yPos")
        +      protected Float yPos;
        +
        +      @XmlAttribute(name = "zPos")
        +      protected Float zPos;
        +
        +      /**
        +       * Gets the value of the sequenceRef property.
        +       * 
        +       * @return possible object is {@link String }
        +       * 
        +       */
        +      public String getSequenceRef()
        +      {
        +        return sequenceRef;
        +      }
        +
        +      /**
        +       * Sets the value of the sequenceRef property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link String }
        +       * 
        +       */
        +      public void setSequenceRef(String value)
        +      {
        +        this.sequenceRef = value;
        +      }
        +
        +      /**
        +       * Gets the value of the xPos property.
        +       * 
        +       * @return possible object is {@link Float }
        +       * 
        +       */
        +      public Float getXPos()
        +      {
        +        return xPos;
        +      }
        +
        +      /**
        +       * Sets the value of the xPos property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Float }
        +       * 
        +       */
        +      public void setXPos(Float value)
        +      {
        +        this.xPos = value;
        +      }
        +
        +      /**
        +       * Gets the value of the yPos property.
        +       * 
        +       * @return possible object is {@link Float }
        +       * 
        +       */
        +      public Float getYPos()
        +      {
        +        return yPos;
        +      }
        +
        +      /**
        +       * Sets the value of the yPos property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Float }
        +       * 
        +       */
        +      public void setYPos(Float value)
        +      {
        +        this.yPos = value;
        +      }
        +
        +      /**
        +       * Gets the value of the zPos property.
        +       * 
        +       * @return possible object is {@link Float }
        +       * 
        +       */
        +      public Float getZPos()
        +      {
        +        return zPos;
        +      }
        +
        +      /**
        +       * Sets the value of the zPos property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Float }
        +       * 
        +       */
        +      public void setZPos(Float value)
        +      {
        +        this.zPos = value;
        +      }
         
        -        /**
        -         * Sets the value of the ypos property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public void setYpos(Integer value) {
        -            this.ypos = value;
        -        }
        +    }
         
        -        /**
        -         * Gets the value of the includeGaps property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public Boolean isIncludeGaps() {
        -            return includeGaps;
        -        }
        +  }
        +
        +  /**
        +   * <p>Java class for anonymous complex type.
        +   * 
        +   * <p>The following schema fragment specifies the expected content
        +   * contained within this class.
        +   * 
        +   * <pre> &lt;complexType&gt; &lt;complexContent&gt;
        +   * &lt;restriction
        +   * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; &lt;sequence
        +   * minOccurs="0"&gt; &lt;element name="title"
        +   * type="{http://www.w3.org/2001/XMLSchema}string"/&gt; &lt;element
        +   * name="newick" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
        +   * &lt;/sequence&gt; &lt;attGroup
        +   * ref="{www.jalview.org}swingwindow"/&gt; &lt;attribute
        +   * name="fontName" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        +   * &lt;attribute name="fontSize"
        +   * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        +   * name="fontStyle" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        +   * &lt;attribute name="threshold"
        +   * type="{http://www.w3.org/2001/XMLSchema}float" /&gt; &lt;attribute
        +   * name="showBootstrap" type="{http://www.w3.org/2001/XMLSchema}boolean"
        +   * /&gt; &lt;attribute name="showDistances"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +   * &lt;attribute name="markUnlinked"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +   * &lt;attribute name="fitToWindow"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +   * &lt;attribute name="currentTree"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +   * &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID"
        +   * /&gt; &lt;attribute name="linkToAllViews"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        +   * &lt;/restriction&gt; &lt;/complexContent&gt;
        +   * &lt;/complexType&gt; </pre>
        +   * 
        +   * 
        +   */
        +  @XmlAccessorType(XmlAccessType.FIELD)
        +  @XmlType(name = "", propOrder = { "title", "newick" })
        +  public static class Tree
        +  {
        +
        +    @XmlElement(namespace = "www.jalview.org")
        +    protected String title;
        +
        +    @XmlElement(namespace = "www.jalview.org")
        +    protected String newick;
        +
        +    @XmlAttribute(name = "fontName")
        +    protected String fontName;
        +
        +    @XmlAttribute(name = "fontSize")
        +    protected Integer fontSize;
        +
        +    @XmlAttribute(name = "fontStyle")
        +    protected Integer fontStyle;
        +
        +    @XmlAttribute(name = "threshold")
        +    protected Float threshold;
        +
        +    @XmlAttribute(name = "showBootstrap")
        +    protected Boolean showBootstrap;
        +
        +    @XmlAttribute(name = "showDistances")
        +    protected Boolean showDistances;
        +
        +    @XmlAttribute(name = "markUnlinked")
        +    protected Boolean markUnlinked;
        +
        +    @XmlAttribute(name = "fitToWindow")
        +    protected Boolean fitToWindow;
        +
        +    @XmlAttribute(name = "currentTree")
        +    protected Boolean currentTree;
        +
        +    @XmlAttribute(name = "id")
        +    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
        +    @XmlID
        +    @XmlSchemaType(name = "ID")
        +    protected String id;
        +
        +    @XmlAttribute(name = "linkToAllViews")
        +    protected Boolean linkToAllViews;
        +
        +    @XmlAttribute(name = "width")
        +    protected Integer width;
        +
        +    @XmlAttribute(name = "height")
        +    protected Integer height;
        +
        +    @XmlAttribute(name = "xpos")
        +    protected Integer xpos;
        +
        +    @XmlAttribute(name = "ypos")
        +    protected Integer ypos;
         
        -        /**
        -         * Sets the value of the includeGaps property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setIncludeGaps(Boolean value) {
        -            this.includeGaps = value;
        -        }
        +    /**
        +     * Gets the value of the title property.
        +     * 
        +     * @return possible object is {@link String }
        +     * 
        +     */
        +    public String getTitle()
        +    {
        +      return title;
        +    }
         
        -        /**
        -         * Gets the value of the matchGaps property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public Boolean isMatchGaps() {
        -            return matchGaps;
        -        }
        +    /**
        +     * Sets the value of the title property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link String }
        +     * 
        +     */
        +    public void setTitle(String value)
        +    {
        +      this.title = value;
        +    }
         
        -        /**
        -         * Sets the value of the matchGaps property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setMatchGaps(Boolean value) {
        -            this.matchGaps = value;
        -        }
        +    /**
        +     * Gets the value of the newick property.
        +     * 
        +     * @return possible object is {@link String }
        +     * 
        +     */
        +    public String getNewick()
        +    {
        +      return newick;
        +    }
         
        -        /**
        -         * Gets the value of the includeGappedColumns property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public Boolean isIncludeGappedColumns() {
        -            return includeGappedColumns;
        -        }
        +    /**
        +     * Sets the value of the newick property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link String }
        +     * 
        +     */
        +    public void setNewick(String value)
        +    {
        +      this.newick = value;
        +    }
         
        -        /**
        -         * Sets the value of the includeGappedColumns property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setIncludeGappedColumns(Boolean value) {
        -            this.includeGappedColumns = value;
        -        }
        +    /**
        +     * Gets the value of the fontName property.
        +     * 
        +     * @return possible object is {@link String }
        +     * 
        +     */
        +    public String getFontName()
        +    {
        +      return fontName;
        +    }
         
        -        /**
        -         * Gets the value of the denominateByShortestLength property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public Boolean isDenominateByShortestLength() {
        -            return denominateByShortestLength;
        -        }
        +    /**
        +     * Sets the value of the fontName property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link String }
        +     * 
        +     */
        +    public void setFontName(String value)
        +    {
        +      this.fontName = value;
        +    }
         
        -        /**
        -         * Sets the value of the denominateByShortestLength property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setDenominateByShortestLength(Boolean value) {
        -            this.denominateByShortestLength = value;
        -        }
        +    /**
        +     * Gets the value of the fontSize property.
        +     * 
        +     * @return possible object is {@link Integer }
        +     * 
        +     */
        +    public Integer getFontSize()
        +    {
        +      return fontSize;
        +    }
         
        +    /**
        +     * Sets the value of the fontSize property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Integer }
        +     * 
        +     */
        +    public void setFontSize(Integer value)
        +    {
        +      this.fontSize = value;
        +    }
         
        -        /**
        -         * <p>Java class for anonymous complex type.
        -         * 
        -         * <p>The following schema fragment specifies the expected content contained within this class.
        -         * 
        -         * <pre>
        -         * &lt;complexType&gt;
        -         *   &lt;complexContent&gt;
        -         *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        -         *       &lt;attGroup ref="{www.jalview.org}position"/&gt;
        -         *     &lt;/restriction&gt;
        -         *   &lt;/complexContent&gt;
        -         * &lt;/complexType&gt;
        -         * </pre>
        -         * 
        -         * 
        -         */
        -        @XmlAccessorType(XmlAccessType.FIELD)
        -        @XmlType(name = "")
        -        public static class Axis {
        -
        -            @XmlAttribute(name = "xPos")
        -            protected Float xPos;
        -            @XmlAttribute(name = "yPos")
        -            protected Float yPos;
        -            @XmlAttribute(name = "zPos")
        -            protected Float zPos;
        -
        -            /**
        -             * Gets the value of the xPos property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link Float }
        -             *     
        -             */
        -            public Float getXPos() {
        -                return xPos;
        -            }
        -
        -            /**
        -             * Sets the value of the xPos property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link Float }
        -             *     
        -             */
        -            public void setXPos(Float value) {
        -                this.xPos = value;
        -            }
        -
        -            /**
        -             * Gets the value of the yPos property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link Float }
        -             *     
        -             */
        -            public Float getYPos() {
        -                return yPos;
        -            }
        -
        -            /**
        -             * Sets the value of the yPos property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link Float }
        -             *     
        -             */
        -            public void setYPos(Float value) {
        -                this.yPos = value;
        -            }
        -
        -            /**
        -             * Gets the value of the zPos property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link Float }
        -             *     
        -             */
        -            public Float getZPos() {
        -                return zPos;
        -            }
        -
        -            /**
        -             * Sets the value of the zPos property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link Float }
        -             *     
        -             */
        -            public void setZPos(Float value) {
        -                this.zPos = value;
        -            }
        +    /**
        +     * Gets the value of the fontStyle property.
        +     * 
        +     * @return possible object is {@link Integer }
        +     * 
        +     */
        +    public Integer getFontStyle()
        +    {
        +      return fontStyle;
        +    }
         
        -        }
        +    /**
        +     * Sets the value of the fontStyle property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Integer }
        +     * 
        +     */
        +    public void setFontStyle(Integer value)
        +    {
        +      this.fontStyle = value;
        +    }
         
        +    /**
        +     * Gets the value of the threshold property.
        +     * 
        +     * @return possible object is {@link Float }
        +     * 
        +     */
        +    public Float getThreshold()
        +    {
        +      return threshold;
        +    }
         
        -        /**
        -         * <p>Java class for anonymous complex type.
        -         * 
        -         * <p>The following schema fragment specifies the expected content contained within this class.
        -         * 
        -         * <pre>
        -         * &lt;complexType&gt;
        -         *   &lt;complexContent&gt;
        -         *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        -         *       &lt;attGroup ref="{www.jalview.org}position"/&gt;
        -         *     &lt;/restriction&gt;
        -         *   &lt;/complexContent&gt;
        -         * &lt;/complexType&gt;
        -         * </pre>
        -         * 
        -         * 
        -         */
        -        @XmlAccessorType(XmlAccessType.FIELD)
        -        @XmlType(name = "")
        -        public static class SeqPointMax {
        -
        -            @XmlAttribute(name = "xPos")
        -            protected Float xPos;
        -            @XmlAttribute(name = "yPos")
        -            protected Float yPos;
        -            @XmlAttribute(name = "zPos")
        -            protected Float zPos;
        -
        -            /**
        -             * Gets the value of the xPos property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link Float }
        -             *     
        -             */
        -            public Float getXPos() {
        -                return xPos;
        -            }
        -
        -            /**
        -             * Sets the value of the xPos property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link Float }
        -             *     
        -             */
        -            public void setXPos(Float value) {
        -                this.xPos = value;
        -            }
        -
        -            /**
        -             * Gets the value of the yPos property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link Float }
        -             *     
        -             */
        -            public Float getYPos() {
        -                return yPos;
        -            }
        -
        -            /**
        -             * Sets the value of the yPos property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link Float }
        -             *     
        -             */
        -            public void setYPos(Float value) {
        -                this.yPos = value;
        -            }
        -
        -            /**
        -             * Gets the value of the zPos property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link Float }
        -             *     
        -             */
        -            public Float getZPos() {
        -                return zPos;
        -            }
        -
        -            /**
        -             * Sets the value of the zPos property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link Float }
        -             *     
        -             */
        -            public void setZPos(Float value) {
        -                this.zPos = value;
        -            }
        +    /**
        +     * Sets the value of the threshold property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Float }
        +     * 
        +     */
        +    public void setThreshold(Float value)
        +    {
        +      this.threshold = value;
        +    }
         
        -        }
        +    /**
        +     * Gets the value of the showBootstrap property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public Boolean isShowBootstrap()
        +    {
        +      return showBootstrap;
        +    }
         
        +    /**
        +     * Sets the value of the showBootstrap property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setShowBootstrap(Boolean value)
        +    {
        +      this.showBootstrap = value;
        +    }
         
        -        /**
        -         * <p>Java class for anonymous complex type.
        -         * 
        -         * <p>The following schema fragment specifies the expected content contained within this class.
        -         * 
        -         * <pre>
        -         * &lt;complexType&gt;
        -         *   &lt;complexContent&gt;
        -         *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        -         *       &lt;attGroup ref="{www.jalview.org}position"/&gt;
        -         *     &lt;/restriction&gt;
        -         *   &lt;/complexContent&gt;
        -         * &lt;/complexType&gt;
        -         * </pre>
        -         * 
        -         * 
        -         */
        -        @XmlAccessorType(XmlAccessType.FIELD)
        -        @XmlType(name = "")
        -        public static class SeqPointMin {
        -
        -            @XmlAttribute(name = "xPos")
        -            protected Float xPos;
        -            @XmlAttribute(name = "yPos")
        -            protected Float yPos;
        -            @XmlAttribute(name = "zPos")
        -            protected Float zPos;
        -
        -            /**
        -             * Gets the value of the xPos property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link Float }
        -             *     
        -             */
        -            public Float getXPos() {
        -                return xPos;
        -            }
        -
        -            /**
        -             * Sets the value of the xPos property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link Float }
        -             *     
        -             */
        -            public void setXPos(Float value) {
        -                this.xPos = value;
        -            }
        -
        -            /**
        -             * Gets the value of the yPos property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link Float }
        -             *     
        -             */
        -            public Float getYPos() {
        -                return yPos;
        -            }
        -
        -            /**
        -             * Sets the value of the yPos property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link Float }
        -             *     
        -             */
        -            public void setYPos(Float value) {
        -                this.yPos = value;
        -            }
        -
        -            /**
        -             * Gets the value of the zPos property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link Float }
        -             *     
        -             */
        -            public Float getZPos() {
        -                return zPos;
        -            }
        -
        -            /**
        -             * Sets the value of the zPos property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link Float }
        -             *     
        -             */
        -            public void setZPos(Float value) {
        -                this.zPos = value;
        -            }
        +    /**
        +     * Gets the value of the showDistances property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public Boolean isShowDistances()
        +    {
        +      return showDistances;
        +    }
         
        -        }
        +    /**
        +     * Sets the value of the showDistances property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setShowDistances(Boolean value)
        +    {
        +      this.showDistances = value;
        +    }
         
        +    /**
        +     * Gets the value of the markUnlinked property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public Boolean isMarkUnlinked()
        +    {
        +      return markUnlinked;
        +    }
         
        -        /**
        -         * <p>Java class for anonymous complex type.
        -         * 
        -         * <p>The following schema fragment specifies the expected content contained within this class.
        -         * 
        -         * <pre>
        -         * &lt;complexType&gt;
        -         *   &lt;complexContent&gt;
        -         *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        -         *       &lt;attGroup ref="{www.jalview.org}position"/&gt;
        -         *       &lt;attribute name="sequenceRef" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -         *     &lt;/restriction&gt;
        -         *   &lt;/complexContent&gt;
        -         * &lt;/complexType&gt;
        -         * </pre>
        -         * 
        -         * 
        -         */
        -        @XmlAccessorType(XmlAccessType.FIELD)
        -        @XmlType(name = "")
        -        public static class SequencePoint {
        -
        -            @XmlAttribute(name = "sequenceRef")
        -            protected String sequenceRef;
        -            @XmlAttribute(name = "xPos")
        -            protected Float xPos;
        -            @XmlAttribute(name = "yPos")
        -            protected Float yPos;
        -            @XmlAttribute(name = "zPos")
        -            protected Float zPos;
        -
        -            /**
        -             * Gets the value of the sequenceRef property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link String }
        -             *     
        -             */
        -            public String getSequenceRef() {
        -                return sequenceRef;
        -            }
        -
        -            /**
        -             * Sets the value of the sequenceRef property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link String }
        -             *     
        -             */
        -            public void setSequenceRef(String value) {
        -                this.sequenceRef = value;
        -            }
        -
        -            /**
        -             * Gets the value of the xPos property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link Float }
        -             *     
        -             */
        -            public Float getXPos() {
        -                return xPos;
        -            }
        -
        -            /**
        -             * Sets the value of the xPos property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link Float }
        -             *     
        -             */
        -            public void setXPos(Float value) {
        -                this.xPos = value;
        -            }
        -
        -            /**
        -             * Gets the value of the yPos property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link Float }
        -             *     
        -             */
        -            public Float getYPos() {
        -                return yPos;
        -            }
        -
        -            /**
        -             * Sets the value of the yPos property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link Float }
        -             *     
        -             */
        -            public void setYPos(Float value) {
        -                this.yPos = value;
        -            }
        -
        -            /**
        -             * Gets the value of the zPos property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link Float }
        -             *     
        -             */
        -            public Float getZPos() {
        -                return zPos;
        -            }
        -
        -            /**
        -             * Sets the value of the zPos property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link Float }
        -             *     
        -             */
        -            public void setZPos(Float value) {
        -                this.zPos = value;
        -            }
        +    /**
        +     * Sets the value of the markUnlinked property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setMarkUnlinked(Boolean value)
        +    {
        +      this.markUnlinked = value;
        +    }
         
        -        }
        +    /**
        +     * Gets the value of the fitToWindow property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public Boolean isFitToWindow()
        +    {
        +      return fitToWindow;
        +    }
         
        +    /**
        +     * Sets the value of the fitToWindow property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setFitToWindow(Boolean value)
        +    {
        +      this.fitToWindow = value;
             }
         
        +    /**
        +     * Gets the value of the currentTree property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public Boolean isCurrentTree()
        +    {
        +      return currentTree;
        +    }
         
             /**
        -     * <p>Java class for anonymous complex type.
        +     * Sets the value of the currentTree property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
              * 
        -     * <p>The following schema fragment specifies the expected content contained within this class.
        -     * 
        -     * <pre>
        -     * &lt;complexType&gt;
        -     *   &lt;complexContent&gt;
        -     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        -     *       &lt;sequence minOccurs="0"&gt;
        -     *         &lt;element name="title" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
        -     *         &lt;element name="newick" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
        -     *       &lt;/sequence&gt;
        -     *       &lt;attGroup ref="{www.jalview.org}swingwindow"/&gt;
        -     *       &lt;attribute name="fontName" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -     *       &lt;attribute name="fontSize" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -     *       &lt;attribute name="fontStyle" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -     *       &lt;attribute name="threshold" type="{http://www.w3.org/2001/XMLSchema}float" /&gt;
        -     *       &lt;attribute name="showBootstrap" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -     *       &lt;attribute name="showDistances" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -     *       &lt;attribute name="markUnlinked" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -     *       &lt;attribute name="fitToWindow" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -     *       &lt;attribute name="currentTree" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -     *       &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID" /&gt;
        -     *       &lt;attribute name="linkToAllViews" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        -     *     &lt;/restriction&gt;
        -     *   &lt;/complexContent&gt;
        -     * &lt;/complexType&gt;
        -     * </pre>
        +     */
        +    public void setCurrentTree(Boolean value)
        +    {
        +      this.currentTree = value;
        +    }
        +
        +    /**
        +     * Gets the value of the id property.
              * 
        +     * @return possible object is {@link String }
              * 
              */
        -    @XmlAccessorType(XmlAccessType.FIELD)
        -    @XmlType(name = "", propOrder = {
        -        "title",
        -        "newick"
        -    })
        -    public static class Tree {
        +    public String getId()
        +    {
        +      return id;
        +    }
         
        -        @XmlElement(namespace = "www.jalview.org")
        -        protected String title;
        -        @XmlElement(namespace = "www.jalview.org")
        -        protected String newick;
        -        @XmlAttribute(name = "fontName")
        -        protected String fontName;
        -        @XmlAttribute(name = "fontSize")
        -        protected Integer fontSize;
        -        @XmlAttribute(name = "fontStyle")
        -        protected Integer fontStyle;
        -        @XmlAttribute(name = "threshold")
        -        protected Float threshold;
        -        @XmlAttribute(name = "showBootstrap")
        -        protected Boolean showBootstrap;
        -        @XmlAttribute(name = "showDistances")
        -        protected Boolean showDistances;
        -        @XmlAttribute(name = "markUnlinked")
        -        protected Boolean markUnlinked;
        -        @XmlAttribute(name = "fitToWindow")
        -        protected Boolean fitToWindow;
        -        @XmlAttribute(name = "currentTree")
        -        protected Boolean currentTree;
        -        @XmlAttribute(name = "id")
        -        @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
        -        @XmlID
        -        @XmlSchemaType(name = "ID")
        -        protected String id;
        -        @XmlAttribute(name = "linkToAllViews")
        -        protected Boolean linkToAllViews;
        -        @XmlAttribute(name = "width")
        -        protected Integer width;
        -        @XmlAttribute(name = "height")
        -        protected Integer height;
        -        @XmlAttribute(name = "xpos")
        -        protected Integer xpos;
        -        @XmlAttribute(name = "ypos")
        -        protected Integer ypos;
        +    /**
        +     * Sets the value of the id property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link String }
        +     * 
        +     */
        +    public void setId(String value)
        +    {
        +      this.id = value;
        +    }
         
        -        /**
        -         * Gets the value of the title property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link String }
        -         *     
        -         */
        -        public String getTitle() {
        -            return title;
        -        }
        +    /**
        +     * Gets the value of the linkToAllViews property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public boolean isLinkToAllViews()
        +    {
        +      if (linkToAllViews == null)
        +      {
        +        return false;
        +      }
        +      else
        +      {
        +        return linkToAllViews;
        +      }
        +    }
         
        -        /**
        -         * Sets the value of the title property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link String }
        -         *     
        -         */
        -        public void setTitle(String value) {
        -            this.title = value;
        -        }
        +    /**
        +     * Sets the value of the linkToAllViews property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setLinkToAllViews(Boolean value)
        +    {
        +      this.linkToAllViews = value;
        +    }
         
        -        /**
        -         * Gets the value of the newick property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link String }
        -         *     
        -         */
        -        public String getNewick() {
        -            return newick;
        -        }
        +    /**
        +     * Gets the value of the width property.
        +     * 
        +     * @return possible object is {@link Integer }
        +     * 
        +     */
        +    public Integer getWidth()
        +    {
        +      return width;
        +    }
         
        -        /**
        -         * Sets the value of the newick property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link String }
        -         *     
        -         */
        -        public void setNewick(String value) {
        -            this.newick = value;
        -        }
        +    /**
        +     * Sets the value of the width property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Integer }
        +     * 
        +     */
        +    public void setWidth(Integer value)
        +    {
        +      this.width = value;
        +    }
         
        -        /**
        -         * Gets the value of the fontName property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link String }
        -         *     
        -         */
        -        public String getFontName() {
        -            return fontName;
        -        }
        +    /**
        +     * Gets the value of the height property.
        +     * 
        +     * @return possible object is {@link Integer }
        +     * 
        +     */
        +    public Integer getHeight()
        +    {
        +      return height;
        +    }
         
        -        /**
        -         * Sets the value of the fontName property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link String }
        -         *     
        -         */
        -        public void setFontName(String value) {
        -            this.fontName = value;
        -        }
        +    /**
        +     * Sets the value of the height property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Integer }
        +     * 
        +     */
        +    public void setHeight(Integer value)
        +    {
        +      this.height = value;
        +    }
         
        -        /**
        -         * Gets the value of the fontSize property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public Integer getFontSize() {
        -            return fontSize;
        -        }
        +    /**
        +     * Gets the value of the xpos property.
        +     * 
        +     * @return possible object is {@link Integer }
        +     * 
        +     */
        +    public Integer getXpos()
        +    {
        +      return xpos;
        +    }
         
        -        /**
        -         * Sets the value of the fontSize property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public void setFontSize(Integer value) {
        -            this.fontSize = value;
        -        }
        +    /**
        +     * Sets the value of the xpos property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Integer }
        +     * 
        +     */
        +    public void setXpos(Integer value)
        +    {
        +      this.xpos = value;
        +    }
         
        -        /**
        -         * Gets the value of the fontStyle property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public Integer getFontStyle() {
        -            return fontStyle;
        -        }
        +    /**
        +     * Gets the value of the ypos property.
        +     * 
        +     * @return possible object is {@link Integer }
        +     * 
        +     */
        +    public Integer getYpos()
        +    {
        +      return ypos;
        +    }
         
        -        /**
        -         * Sets the value of the fontStyle property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public void setFontStyle(Integer value) {
        -            this.fontStyle = value;
        -        }
        +    /**
        +     * Sets the value of the ypos property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Integer }
        +     * 
        +     */
        +    public void setYpos(Integer value)
        +    {
        +      this.ypos = value;
        +    }
         
        -        /**
        -         * Gets the value of the threshold property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Float }
        -         *     
        -         */
        -        public Float getThreshold() {
        -            return threshold;
        -        }
        +  }
        +
        +  /**
        +   * <p>Java class for anonymous complex type.
        +   * 
        +   * <p>The following schema fragment specifies the expected content
        +   * contained within this class.
        +   * 
        +   * <pre> &lt;complexType&gt; &lt;complexContent&gt;
        +   * &lt;restriction
        +   * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        +   * &lt;sequence&gt; &lt;element name="UserColourScheme"
        +   * type="{www.jalview.org/colours}JalviewUserColours"/&gt;
        +   * &lt;/sequence&gt; &lt;attribute name="id"
        +   * type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        +   * &lt;/restriction&gt; &lt;/complexContent&gt;
        +   * &lt;/complexType&gt; </pre>
        +   * 
        +   * 
        +   */
        +  @XmlAccessorType(XmlAccessType.FIELD)
        +  @XmlType(name = "", propOrder = { "userColourScheme" })
        +  public static class UserColours
        +  {
        +
        +    @XmlElement(
        +      name = "UserColourScheme",
        +      namespace = "www.jalview.org",
        +      required = true)
        +    protected JalviewUserColours userColourScheme;
        +
        +    @XmlAttribute(name = "id")
        +    protected String id;
         
        -        /**
        -         * Sets the value of the threshold property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Float }
        -         *     
        -         */
        -        public void setThreshold(Float value) {
        -            this.threshold = value;
        -        }
        +    /**
        +     * Gets the value of the userColourScheme property.
        +     * 
        +     * @return possible object is {@link JalviewUserColours }
        +     * 
        +     */
        +    public JalviewUserColours getUserColourScheme()
        +    {
        +      return userColourScheme;
        +    }
         
        -        /**
        -         * Gets the value of the showBootstrap property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public Boolean isShowBootstrap() {
        -            return showBootstrap;
        -        }
        +    /**
        +     * Sets the value of the userColourScheme property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link JalviewUserColours }
        +     * 
        +     */
        +    public void setUserColourScheme(JalviewUserColours value)
        +    {
        +      this.userColourScheme = value;
        +    }
         
        -        /**
        -         * Sets the value of the showBootstrap property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setShowBootstrap(Boolean value) {
        -            this.showBootstrap = value;
        -        }
        +    /**
        +     * Gets the value of the id property.
        +     * 
        +     * @return possible object is {@link String }
        +     * 
        +     */
        +    public String getId()
        +    {
        +      return id;
        +    }
         
        -        /**
        -         * Gets the value of the showDistances property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public Boolean isShowDistances() {
        -            return showDistances;
        -        }
        +    /**
        +     * Sets the value of the id property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link String }
        +     * 
        +     */
        +    public void setId(String value)
        +    {
        +      this.id = value;
        +    }
         
        -        /**
        -         * Sets the value of the showDistances property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setShowDistances(Boolean value) {
        -            this.showDistances = value;
        -        }
        +  }
        +
        +  /**
        +   * <p>Java class for anonymous complex type.
        +   * 
        +   * <p>The following schema fragment specifies the expected content
        +   * contained within this class.
        +   * 
        +   * <pre> &lt;complexType&gt; &lt;complexContent&gt;
        +   * &lt;restriction
        +   * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        +   * &lt;sequence&gt; &lt;element name="AnnotationColours"
        +   * type="{www.jalview.org}AnnotationColourScheme" minOccurs="0"/&gt;
        +   * &lt;element name="hiddenColumns" maxOccurs="unbounded"
        +   * minOccurs="0"&gt; &lt;complexType&gt;
        +   * &lt;complexContent&gt; &lt;restriction
        +   * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; &lt;attribute
        +   * name="start" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        +   * &lt;attribute name="end" type="{http://www.w3.org/2001/XMLSchema}int"
        +   * /&gt; &lt;/restriction&gt; &lt;/complexContent&gt;
        +   * &lt;/complexType&gt; &lt;/element&gt; &lt;element
        +   * name="calcIdParam" maxOccurs="unbounded" minOccurs="0"&gt;
        +   * &lt;complexType&gt; &lt;complexContent&gt;
        +   * &lt;extension
        +   * base="{www.jalview.org/xml/wsparamset}WebServiceParameterSet"&gt;
        +   * &lt;attribute name="calcId" use="required"
        +   * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute
        +   * name="needsUpdate" type="{http://www.w3.org/2001/XMLSchema}boolean"
        +   * default="false" /&gt; &lt;attribute name="autoUpdate"
        +   * use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +   * &lt;/extension&gt; &lt;/complexContent&gt;
        +   * &lt;/complexType&gt; &lt;/element&gt;
        +   * &lt;/sequence&gt; &lt;attGroup
        +   * ref="{www.jalview.org}swingwindow"/&gt; &lt;attribute
        +   * name="conservationSelected"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +   * &lt;attribute name="pidSelected"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +   * &lt;attribute name="bgColour"
        +   * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute
        +   * name="consThreshold" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        +   * &lt;attribute name="pidThreshold"
        +   * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        +   * name="title" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        +   * &lt;attribute name="showFullId"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +   * &lt;attribute name="rightAlignIds"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +   * &lt;attribute name="showText"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +   * &lt;attribute name="showColourText"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +   * &lt;attribute name="showUnconserved"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        +   * &lt;attribute name="showBoxes"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +   * &lt;attribute name="wrapAlignment"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +   * &lt;attribute name="renderGaps"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +   * &lt;attribute name="showSequenceFeatures"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +   * &lt;attribute name="showNPfeatureTooltip"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +   * &lt;attribute name="showDbRefTooltip"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +   * &lt;attribute name="followHighlight"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        +   * &lt;attribute name="followSelection"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        +   * &lt;attribute name="showAnnotation"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +   * &lt;attribute name="centreColumnLabels"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        +   * &lt;attribute name="showGroupConservation"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        +   * &lt;attribute name="showGroupConsensus"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        +   * &lt;attribute name="showConsensusHistogram"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        +   * &lt;attribute name="showSequenceLogo"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        +   * &lt;attribute name="normaliseSequenceLogo"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        +   * &lt;attribute name="ignoreGapsinConsensus"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        +   * &lt;attribute name="startRes"
        +   * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        +   * name="startSeq" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        +   * &lt;attribute name="fontName"
        +   * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute
        +   * name="fontSize" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        +   * &lt;attribute name="fontStyle"
        +   * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        +   * name="scaleProteinAsCdna" type="{http://www.w3.org/2001/XMLSchema}boolean"
        +   * default="true" /&gt; &lt;attribute name="viewName"
        +   * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute
        +   * name="sequenceSetId" type="{http://www.w3.org/2001/XMLSchema}string"
        +   * /&gt; &lt;attribute name="gatheredViews"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +   * &lt;attribute name="textCol1"
        +   * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        +   * name="textCol2" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        +   * &lt;attribute name="textColThreshold"
        +   * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        +   * name="id" type="{http://www.w3.org/2001/XMLSchema}ID" /&gt;
        +   * &lt;attribute name="complementId"
        +   * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute
        +   * name="showComplementFeatures"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        +   * &lt;attribute name="showComplementFeaturesOnTop"
        +   * type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        +   * &lt;/restriction&gt; &lt;/complexContent&gt;
        +   * &lt;/complexType&gt; </pre>
        +   * 
        +   * 
        +   */
        +  @XmlAccessorType(XmlAccessType.FIELD)
        +  @XmlType(
        +    name = "",
        +    propOrder =
        +    { "annotationColours", "hiddenColumns", "calcIdParam" })
        +  public static class Viewport
        +  {
        +
        +    @XmlElement(name = "AnnotationColours", namespace = "www.jalview.org")
        +    protected AnnotationColourScheme annotationColours;
        +
        +    @XmlElement(namespace = "www.jalview.org")
        +    protected List hiddenColumns;
        +
        +    @XmlElement(namespace = "www.jalview.org")
        +    protected List calcIdParam;
        +
        +    @XmlAttribute(name = "conservationSelected")
        +    protected Boolean conservationSelected;
        +
        +    @XmlAttribute(name = "pidSelected")
        +    protected Boolean pidSelected;
        +
        +    @XmlAttribute(name = "bgColour")
        +    protected String bgColour;
        +
        +    @XmlAttribute(name = "consThreshold")
        +    protected Integer consThreshold;
        +
        +    @XmlAttribute(name = "pidThreshold")
        +    protected Integer pidThreshold;
        +
        +    @XmlAttribute(name = "title")
        +    protected String title;
        +
        +    @XmlAttribute(name = "showFullId")
        +    protected Boolean showFullId;
        +
        +    @XmlAttribute(name = "rightAlignIds")
        +    protected Boolean rightAlignIds;
        +
        +    @XmlAttribute(name = "showText")
        +    protected Boolean showText;
        +
        +    @XmlAttribute(name = "showColourText")
        +    protected Boolean showColourText;
        +
        +    @XmlAttribute(name = "showUnconserved")
        +    protected Boolean showUnconserved;
        +
        +    @XmlAttribute(name = "showBoxes")
        +    protected Boolean showBoxes;
        +
        +    @XmlAttribute(name = "wrapAlignment")
        +    protected Boolean wrapAlignment;
        +
        +    @XmlAttribute(name = "renderGaps")
        +    protected Boolean renderGaps;
         
        -        /**
        -         * Gets the value of the markUnlinked property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public Boolean isMarkUnlinked() {
        -            return markUnlinked;
        -        }
        +    @XmlAttribute(name = "showSequenceFeatures")
        +    protected Boolean showSequenceFeatures;
         
        -        /**
        -         * Sets the value of the markUnlinked property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setMarkUnlinked(Boolean value) {
        -            this.markUnlinked = value;
        -        }
        +    @XmlAttribute(name = "showNPfeatureTooltip")
        +    protected Boolean showNPfeatureTooltip;
         
        -        /**
        -         * Gets the value of the fitToWindow property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public Boolean isFitToWindow() {
        -            return fitToWindow;
        -        }
        +    @XmlAttribute(name = "showDbRefTooltip")
        +    protected Boolean showDbRefTooltip;
         
        -        /**
        -         * Sets the value of the fitToWindow property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setFitToWindow(Boolean value) {
        -            this.fitToWindow = value;
        -        }
        +    @XmlAttribute(name = "followHighlight")
        +    protected Boolean followHighlight;
         
        -        /**
        -         * Gets the value of the currentTree property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public Boolean isCurrentTree() {
        -            return currentTree;
        -        }
        +    @XmlAttribute(name = "followSelection")
        +    protected Boolean followSelection;
         
        -        /**
        -         * Sets the value of the currentTree property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setCurrentTree(Boolean value) {
        -            this.currentTree = value;
        -        }
        +    @XmlAttribute(name = "showAnnotation")
        +    protected Boolean showAnnotation;
         
        -        /**
        -         * Gets the value of the id property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link String }
        -         *     
        -         */
        -        public String getId() {
        -            return id;
        -        }
        +    @XmlAttribute(name = "centreColumnLabels")
        +    protected Boolean centreColumnLabels;
         
        -        /**
        -         * Sets the value of the id property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link String }
        -         *     
        -         */
        -        public void setId(String value) {
        -            this.id = value;
        -        }
        +    @XmlAttribute(name = "showGroupConservation")
        +    protected Boolean showGroupConservation;
         
        -        /**
        -         * Gets the value of the linkToAllViews property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public boolean isLinkToAllViews() {
        -            if (linkToAllViews == null) {
        -                return false;
        -            } else {
        -                return linkToAllViews;
        -            }
        -        }
        +    @XmlAttribute(name = "showGroupConsensus")
        +    protected Boolean showGroupConsensus;
         
        -        /**
        -         * Sets the value of the linkToAllViews property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setLinkToAllViews(Boolean value) {
        -            this.linkToAllViews = value;
        -        }
        +    @XmlAttribute(name = "showConsensusHistogram")
        +    protected Boolean showConsensusHistogram;
         
        -        /**
        -         * Gets the value of the width property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public Integer getWidth() {
        -            return width;
        -        }
        +    @XmlAttribute(name = "showSequenceLogo")
        +    protected Boolean showSequenceLogo;
         
        -        /**
        -         * Sets the value of the width property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public void setWidth(Integer value) {
        -            this.width = value;
        -        }
        +    @XmlAttribute(name = "normaliseSequenceLogo")
        +    protected Boolean normaliseSequenceLogo;
         
        -        /**
        -         * Gets the value of the height property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public Integer getHeight() {
        -            return height;
        -        }
        +    @XmlAttribute(name = "ignoreGapsinConsensus")
        +    protected Boolean ignoreGapsinConsensus;
         
        -        /**
        -         * Sets the value of the height property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public void setHeight(Integer value) {
        -            this.height = value;
        -        }
        +    @XmlAttribute(name = "startRes")
        +    protected Integer startRes;
         
        -        /**
        -         * Gets the value of the xpos property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public Integer getXpos() {
        -            return xpos;
        -        }
        +    @XmlAttribute(name = "startSeq")
        +    protected Integer startSeq;
         
        -        /**
        -         * Sets the value of the xpos property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public void setXpos(Integer value) {
        -            this.xpos = value;
        -        }
        +    @XmlAttribute(name = "fontName")
        +    protected String fontName;
         
        -        /**
        -         * Gets the value of the ypos property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public Integer getYpos() {
        -            return ypos;
        -        }
        +    @XmlAttribute(name = "fontSize")
        +    protected Integer fontSize;
         
        -        /**
        -         * Sets the value of the ypos property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public void setYpos(Integer value) {
        -            this.ypos = value;
        -        }
        +    @XmlAttribute(name = "fontStyle")
        +    protected Integer fontStyle;
         
        -    }
        +    @XmlAttribute(name = "scaleProteinAsCdna")
        +    protected Boolean scaleProteinAsCdna;
         
        +    @XmlAttribute(name = "viewName")
        +    protected String viewName;
         
        -    /**
        -     * <p>Java class for anonymous complex type.
        -     * 
        -     * <p>The following schema fragment specifies the expected content contained within this class.
        -     * 
        -     * <pre>
        -     * &lt;complexType&gt;
        -     *   &lt;complexContent&gt;
        -     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        -     *       &lt;sequence&gt;
        -     *         &lt;element name="UserColourScheme" type="{www.jalview.org/colours}JalviewUserColours"/&gt;
        -     *       &lt;/sequence&gt;
        -     *       &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -     *     &lt;/restriction&gt;
        -     *   &lt;/complexContent&gt;
        -     * &lt;/complexType&gt;
        -     * </pre>
        -     * 
        -     * 
        -     */
        -    @XmlAccessorType(XmlAccessType.FIELD)
        -    @XmlType(name = "", propOrder = {
        -        "userColourScheme"
        -    })
        -    public static class UserColours {
        +    @XmlAttribute(name = "sequenceSetId")
        +    protected String sequenceSetId;
         
        -        @XmlElement(name = "UserColourScheme", namespace = "www.jalview.org", required = true)
        -        protected JalviewUserColours userColourScheme;
        -        @XmlAttribute(name = "id")
        -        protected String id;
        +    @XmlAttribute(name = "gatheredViews")
        +    protected Boolean gatheredViews;
         
        -        /**
        -         * Gets the value of the userColourScheme property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link JalviewUserColours }
        -         *     
        -         */
        -        public JalviewUserColours getUserColourScheme() {
        -            return userColourScheme;
        -        }
        +    @XmlAttribute(name = "textCol1")
        +    protected Integer textCol1;
         
        -        /**
        -         * Sets the value of the userColourScheme property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link JalviewUserColours }
        -         *     
        -         */
        -        public void setUserColourScheme(JalviewUserColours value) {
        -            this.userColourScheme = value;
        -        }
        +    @XmlAttribute(name = "textCol2")
        +    protected Integer textCol2;
         
        -        /**
        -         * Gets the value of the id property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link String }
        -         *     
        -         */
        -        public String getId() {
        -            return id;
        -        }
        +    @XmlAttribute(name = "textColThreshold")
        +    protected Integer textColThreshold;
         
        -        /**
        -         * Sets the value of the id property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link String }
        -         *     
        -         */
        -        public void setId(String value) {
        -            this.id = value;
        -        }
        +    @XmlAttribute(name = "id")
        +    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
        +    @XmlID
        +    @XmlSchemaType(name = "ID")
        +    protected String id;
         
        -    }
        +    @XmlAttribute(name = "complementId")
        +    protected String complementId;
         
        +    @XmlAttribute(name = "showComplementFeatures")
        +    protected Boolean showComplementFeatures;
         
        -    /**
        -     * <p>Java class for anonymous complex type.
        -     * 
        -     * <p>The following schema fragment specifies the expected content contained within this class.
        -     * 
        -     * <pre>
        -     * &lt;complexType&gt;
        -     *   &lt;complexContent&gt;
        -     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        -     *       &lt;sequence&gt;
        -     *         &lt;element name="AnnotationColours" type="{www.jalview.org}AnnotationColourScheme" minOccurs="0"/&gt;
        -     *         &lt;element name="hiddenColumns" maxOccurs="unbounded" minOccurs="0"&gt;
        -     *           &lt;complexType&gt;
        -     *             &lt;complexContent&gt;
        -     *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        -     *                 &lt;attribute name="start" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -     *                 &lt;attribute name="end" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -     *               &lt;/restriction&gt;
        -     *             &lt;/complexContent&gt;
        -     *           &lt;/complexType&gt;
        -     *         &lt;/element&gt;
        -     *         &lt;element name="calcIdParam" maxOccurs="unbounded" minOccurs="0"&gt;
        -     *           &lt;complexType&gt;
        -     *             &lt;complexContent&gt;
        -     *               &lt;extension base="{www.jalview.org/xml/wsparamset}WebServiceParameterSet"&gt;
        -     *                 &lt;attribute name="calcId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -     *                 &lt;attribute name="needsUpdate" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        -     *                 &lt;attribute name="autoUpdate" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -     *               &lt;/extension&gt;
        -     *             &lt;/complexContent&gt;
        -     *           &lt;/complexType&gt;
        -     *         &lt;/element&gt;
        -     *       &lt;/sequence&gt;
        -     *       &lt;attGroup ref="{www.jalview.org}swingwindow"/&gt;
        -     *       &lt;attribute name="conservationSelected" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -     *       &lt;attribute name="pidSelected" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -     *       &lt;attribute name="bgColour" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -     *       &lt;attribute name="consThreshold" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -     *       &lt;attribute name="pidThreshold" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -     *       &lt;attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -     *       &lt;attribute name="showFullId" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -     *       &lt;attribute name="rightAlignIds" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -     *       &lt;attribute name="showText" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -     *       &lt;attribute name="showColourText" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -     *       &lt;attribute name="showUnconserved" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        -     *       &lt;attribute name="showBoxes" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -     *       &lt;attribute name="wrapAlignment" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -     *       &lt;attribute name="renderGaps" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -     *       &lt;attribute name="showSequenceFeatures" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -     *       &lt;attribute name="showNPfeatureTooltip" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -     *       &lt;attribute name="showDbRefTooltip" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -     *       &lt;attribute name="followHighlight" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        -     *       &lt;attribute name="followSelection" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        -     *       &lt;attribute name="showAnnotation" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -     *       &lt;attribute name="centreColumnLabels" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        -     *       &lt;attribute name="showGroupConservation" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        -     *       &lt;attribute name="showGroupConsensus" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        -     *       &lt;attribute name="showConsensusHistogram" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        -     *       &lt;attribute name="showSequenceLogo" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        -     *       &lt;attribute name="normaliseSequenceLogo" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        -     *       &lt;attribute name="ignoreGapsinConsensus" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        -     *       &lt;attribute name="startRes" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -     *       &lt;attribute name="startSeq" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -     *       &lt;attribute name="fontName" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -     *       &lt;attribute name="fontSize" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -     *       &lt;attribute name="fontStyle" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -     *       &lt;attribute name="scaleProteinAsCdna" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /&gt;
        -     *       &lt;attribute name="viewName" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -     *       &lt;attribute name="sequenceSetId" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -     *       &lt;attribute name="gatheredViews" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -     *       &lt;attribute name="textCol1" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -     *       &lt;attribute name="textCol2" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -     *       &lt;attribute name="textColThreshold" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -     *       &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID" /&gt;
        -     *       &lt;attribute name="complementId" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -     *       &lt;attribute name="showComplementFeatures" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        -     *       &lt;attribute name="showComplementFeaturesOnTop" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        -     *     &lt;/restriction&gt;
        -     *   &lt;/complexContent&gt;
        -     * &lt;/complexType&gt;
        -     * </pre>
        -     * 
        -     * 
        -     */
        -    @XmlAccessorType(XmlAccessType.FIELD)
        -    @XmlType(name = "", propOrder = {
        -        "annotationColours",
        -        "hiddenColumns",
        -        "calcIdParam"
        -    })
        -    public static class Viewport {
        -
        -        @XmlElement(name = "AnnotationColours", namespace = "www.jalview.org")
        -        protected AnnotationColourScheme annotationColours;
        -        @XmlElement(namespace = "www.jalview.org")
        -        protected List hiddenColumns;
        -        @XmlElement(namespace = "www.jalview.org")
        -        protected List calcIdParam;
        -        @XmlAttribute(name = "conservationSelected")
        -        protected Boolean conservationSelected;
        -        @XmlAttribute(name = "pidSelected")
        -        protected Boolean pidSelected;
        -        @XmlAttribute(name = "bgColour")
        -        protected String bgColour;
        -        @XmlAttribute(name = "consThreshold")
        -        protected Integer consThreshold;
        -        @XmlAttribute(name = "pidThreshold")
        -        protected Integer pidThreshold;
        -        @XmlAttribute(name = "title")
        -        protected String title;
        -        @XmlAttribute(name = "showFullId")
        -        protected Boolean showFullId;
        -        @XmlAttribute(name = "rightAlignIds")
        -        protected Boolean rightAlignIds;
        -        @XmlAttribute(name = "showText")
        -        protected Boolean showText;
        -        @XmlAttribute(name = "showColourText")
        -        protected Boolean showColourText;
        -        @XmlAttribute(name = "showUnconserved")
        -        protected Boolean showUnconserved;
        -        @XmlAttribute(name = "showBoxes")
        -        protected Boolean showBoxes;
        -        @XmlAttribute(name = "wrapAlignment")
        -        protected Boolean wrapAlignment;
        -        @XmlAttribute(name = "renderGaps")
        -        protected Boolean renderGaps;
        -        @XmlAttribute(name = "showSequenceFeatures")
        -        protected Boolean showSequenceFeatures;
        -        @XmlAttribute(name = "showNPfeatureTooltip")
        -        protected Boolean showNPfeatureTooltip;
        -        @XmlAttribute(name = "showDbRefTooltip")
        -        protected Boolean showDbRefTooltip;
        -        @XmlAttribute(name = "followHighlight")
        -        protected Boolean followHighlight;
        -        @XmlAttribute(name = "followSelection")
        -        protected Boolean followSelection;
        -        @XmlAttribute(name = "showAnnotation")
        -        protected Boolean showAnnotation;
        -        @XmlAttribute(name = "centreColumnLabels")
        -        protected Boolean centreColumnLabels;
        -        @XmlAttribute(name = "showGroupConservation")
        -        protected Boolean showGroupConservation;
        -        @XmlAttribute(name = "showGroupConsensus")
        -        protected Boolean showGroupConsensus;
        -        @XmlAttribute(name = "showConsensusHistogram")
        -        protected Boolean showConsensusHistogram;
        -        @XmlAttribute(name = "showSequenceLogo")
        -        protected Boolean showSequenceLogo;
        -        @XmlAttribute(name = "normaliseSequenceLogo")
        -        protected Boolean normaliseSequenceLogo;
        -        @XmlAttribute(name = "ignoreGapsinConsensus")
        -        protected Boolean ignoreGapsinConsensus;
        -        @XmlAttribute(name = "startRes")
        -        protected Integer startRes;
        -        @XmlAttribute(name = "startSeq")
        -        protected Integer startSeq;
        -        @XmlAttribute(name = "fontName")
        -        protected String fontName;
        -        @XmlAttribute(name = "fontSize")
        -        protected Integer fontSize;
        -        @XmlAttribute(name = "fontStyle")
        -        protected Integer fontStyle;
        -        @XmlAttribute(name = "scaleProteinAsCdna")
        -        protected Boolean scaleProteinAsCdna;
        -        @XmlAttribute(name = "viewName")
        -        protected String viewName;
        -        @XmlAttribute(name = "sequenceSetId")
        -        protected String sequenceSetId;
        -        @XmlAttribute(name = "gatheredViews")
        -        protected Boolean gatheredViews;
        -        @XmlAttribute(name = "textCol1")
        -        protected Integer textCol1;
        -        @XmlAttribute(name = "textCol2")
        -        protected Integer textCol2;
        -        @XmlAttribute(name = "textColThreshold")
        -        protected Integer textColThreshold;
        -        @XmlAttribute(name = "id")
        -        @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
        -        @XmlID
        -        @XmlSchemaType(name = "ID")
        -        protected String id;
        -        @XmlAttribute(name = "complementId")
        -        protected String complementId;
        -        @XmlAttribute(name = "showComplementFeatures")
        -        protected Boolean showComplementFeatures;
        -        @XmlAttribute(name = "showComplementFeaturesOnTop")
        -        protected Boolean showComplementFeaturesOnTop;
        -        @XmlAttribute(name = "width")
        -        protected Integer width;
        -        @XmlAttribute(name = "height")
        -        protected Integer height;
        -        @XmlAttribute(name = "xpos")
        -        protected Integer xpos;
        -        @XmlAttribute(name = "ypos")
        -        protected Integer ypos;
        +    @XmlAttribute(name = "showComplementFeaturesOnTop")
        +    protected Boolean showComplementFeaturesOnTop;
         
        -        /**
        -         * Gets the value of the annotationColours property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link AnnotationColourScheme }
        -         *     
        -         */
        -        public AnnotationColourScheme getAnnotationColours() {
        -            return annotationColours;
        -        }
        +    @XmlAttribute(name = "width")
        +    protected Integer width;
         
        -        /**
        -         * Sets the value of the annotationColours property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link AnnotationColourScheme }
        -         *     
        -         */
        -        public void setAnnotationColours(AnnotationColourScheme value) {
        -            this.annotationColours = value;
        -        }
        +    @XmlAttribute(name = "height")
        +    protected Integer height;
         
        -        /**
        -         * Gets the value of the hiddenColumns property.
        -         * 
        -         * <p>
        -         * This accessor method returns a reference to the live list,
        -         * not a snapshot. Therefore any modification you make to the
        -         * returned list will be present inside the JAXB object.
        -         * This is why there is not a <CODE>set</CODE> method for the hiddenColumns property.
        -         * 
        -         * <p>
        -         * For example, to add a new item, do as follows:
        -         * <pre>
        -         *    getHiddenColumns().add(newItem);
        -         * </pre>
        -         * 
        -         * 
        -         * <p>
        -         * Objects of the following type(s) are allowed in the list
        -         * {@link JalviewModel.Viewport.HiddenColumns }
        -         * 
        -         * 
        -         */
        -        public List getHiddenColumns() {
        -            if (hiddenColumns == null) {
        -                hiddenColumns = new ArrayList();
        -            }
        -            return this.hiddenColumns;
        -        }
        +    @XmlAttribute(name = "xpos")
        +    protected Integer xpos;
         
        -        /**
        -         * Gets the value of the calcIdParam property.
        -         * 
        -         * <p>
        -         * This accessor method returns a reference to the live list,
        -         * not a snapshot. Therefore any modification you make to the
        -         * returned list will be present inside the JAXB object.
        -         * This is why there is not a <CODE>set</CODE> method for the calcIdParam property.
        -         * 
        -         * <p>
        -         * For example, to add a new item, do as follows:
        -         * <pre>
        -         *    getCalcIdParam().add(newItem);
        -         * </pre>
        -         * 
        -         * 
        -         * <p>
        -         * Objects of the following type(s) are allowed in the list
        -         * {@link JalviewModel.Viewport.CalcIdParam }
        -         * 
        -         * 
        -         */
        -        public List getCalcIdParam() {
        -            if (calcIdParam == null) {
        -                calcIdParam = new ArrayList();
        -            }
        -            return this.calcIdParam;
        -        }
        +    @XmlAttribute(name = "ypos")
        +    protected Integer ypos;
         
        -        /**
        -         * Gets the value of the conservationSelected property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public Boolean isConservationSelected() {
        -            return conservationSelected;
        -        }
        +    /**
        +     * Gets the value of the annotationColours property.
        +     * 
        +     * @return possible object is {@link AnnotationColourScheme }
        +     * 
        +     */
        +    public AnnotationColourScheme getAnnotationColours()
        +    {
        +      return annotationColours;
        +    }
         
        -        /**
        -         * Sets the value of the conservationSelected property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setConservationSelected(Boolean value) {
        -            this.conservationSelected = value;
        -        }
        +    /**
        +     * Sets the value of the annotationColours property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link AnnotationColourScheme }
        +     * 
        +     */
        +    public void setAnnotationColours(AnnotationColourScheme value)
        +    {
        +      this.annotationColours = value;
        +    }
         
        -        /**
        -         * Gets the value of the pidSelected property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public Boolean isPidSelected() {
        -            return pidSelected;
        -        }
        +    /**
        +     * Gets the value of the hiddenColumns property.
        +     * 
        +     * <p> This accessor method returns a reference to the live list, not
        +     * a snapshot. Therefore any modification you make to the returned list will
        +     * be present inside the JAXB object. This is why there is not a
        +     * <CODE>set</CODE> method for the hiddenColumns property.
        +     * 
        +     * <p> For example, to add a new item, do as follows: <pre>
        +     * getHiddenColumns().add(newItem); </pre>
        +     * 
        +     * 
        +     * <p> Objects of the following type(s) are allowed in the list
        +     * {@link JalviewModel.Viewport.HiddenColumns }
        +     * 
        +     * 
        +     */
        +    public List getHiddenColumns()
        +    {
        +      if (hiddenColumns == null)
        +      {
        +        hiddenColumns = new ArrayList();
        +      }
        +      return this.hiddenColumns;
        +    }
         
        -        /**
        -         * Sets the value of the pidSelected property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setPidSelected(Boolean value) {
        -            this.pidSelected = value;
        -        }
        +    /**
        +     * Gets the value of the calcIdParam property.
        +     * 
        +     * <p> This accessor method returns a reference to the live list, not
        +     * a snapshot. Therefore any modification you make to the returned list will
        +     * be present inside the JAXB object. This is why there is not a
        +     * <CODE>set</CODE> method for the calcIdParam property.
        +     * 
        +     * <p> For example, to add a new item, do as follows: <pre>
        +     * getCalcIdParam().add(newItem); </pre>
        +     * 
        +     * 
        +     * <p> Objects of the following type(s) are allowed in the list
        +     * {@link JalviewModel.Viewport.CalcIdParam }
        +     * 
        +     * 
        +     */
        +    public List getCalcIdParam()
        +    {
        +      if (calcIdParam == null)
        +      {
        +        calcIdParam = new ArrayList();
        +      }
        +      return this.calcIdParam;
        +    }
         
        -        /**
        -         * Gets the value of the bgColour property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link String }
        -         *     
        -         */
        -        public String getBgColour() {
        -            return bgColour;
        -        }
        +    /**
        +     * Gets the value of the conservationSelected property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public Boolean isConservationSelected()
        +    {
        +      return conservationSelected;
        +    }
         
        -        /**
        -         * Sets the value of the bgColour property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link String }
        -         *     
        -         */
        -        public void setBgColour(String value) {
        -            this.bgColour = value;
        -        }
        +    /**
        +     * Sets the value of the conservationSelected property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setConservationSelected(Boolean value)
        +    {
        +      this.conservationSelected = value;
        +    }
         
        -        /**
        -         * Gets the value of the consThreshold property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public Integer getConsThreshold() {
        -            return consThreshold;
        -        }
        +    /**
        +     * Gets the value of the pidSelected property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public Boolean isPidSelected()
        +    {
        +      return pidSelected;
        +    }
         
        -        /**
        -         * Sets the value of the consThreshold property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public void setConsThreshold(Integer value) {
        -            this.consThreshold = value;
        -        }
        +    /**
        +     * Sets the value of the pidSelected property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setPidSelected(Boolean value)
        +    {
        +      this.pidSelected = value;
        +    }
         
        -        /**
        -         * Gets the value of the pidThreshold property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public Integer getPidThreshold() {
        -            return pidThreshold;
        -        }
        +    /**
        +     * Gets the value of the bgColour property.
        +     * 
        +     * @return possible object is {@link String }
        +     * 
        +     */
        +    public String getBgColour()
        +    {
        +      return bgColour;
        +    }
         
        -        /**
        -         * Sets the value of the pidThreshold property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public void setPidThreshold(Integer value) {
        -            this.pidThreshold = value;
        -        }
        +    /**
        +     * Sets the value of the bgColour property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link String }
        +     * 
        +     */
        +    public void setBgColour(String value)
        +    {
        +      this.bgColour = value;
        +    }
         
        -        /**
        -         * Gets the value of the title property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link String }
        -         *     
        -         */
        -        public String getTitle() {
        -            return title;
        -        }
        +    /**
        +     * Gets the value of the consThreshold property.
        +     * 
        +     * @return possible object is {@link Integer }
        +     * 
        +     */
        +    public Integer getConsThreshold()
        +    {
        +      return consThreshold;
        +    }
         
        -        /**
        -         * Sets the value of the title property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link String }
        -         *     
        -         */
        -        public void setTitle(String value) {
        -            this.title = value;
        -        }
        +    /**
        +     * Sets the value of the consThreshold property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Integer }
        +     * 
        +     */
        +    public void setConsThreshold(Integer value)
        +    {
        +      this.consThreshold = value;
        +    }
         
        -        /**
        -         * Gets the value of the showFullId property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public Boolean isShowFullId() {
        -            return showFullId;
        -        }
        +    /**
        +     * Gets the value of the pidThreshold property.
        +     * 
        +     * @return possible object is {@link Integer }
        +     * 
        +     */
        +    public Integer getPidThreshold()
        +    {
        +      return pidThreshold;
        +    }
         
        -        /**
        -         * Sets the value of the showFullId property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setShowFullId(Boolean value) {
        -            this.showFullId = value;
        -        }
        +    /**
        +     * Sets the value of the pidThreshold property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Integer }
        +     * 
        +     */
        +    public void setPidThreshold(Integer value)
        +    {
        +      this.pidThreshold = value;
        +    }
         
        -        /**
        -         * Gets the value of the rightAlignIds property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public Boolean isRightAlignIds() {
        -            return rightAlignIds;
        -        }
        +    /**
        +     * Gets the value of the title property.
        +     * 
        +     * @return possible object is {@link String }
        +     * 
        +     */
        +    public String getTitle()
        +    {
        +      return title;
        +    }
         
        -        /**
        -         * Sets the value of the rightAlignIds property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setRightAlignIds(Boolean value) {
        -            this.rightAlignIds = value;
        -        }
        +    /**
        +     * Sets the value of the title property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link String }
        +     * 
        +     */
        +    public void setTitle(String value)
        +    {
        +      this.title = value;
        +    }
         
        -        /**
        -         * Gets the value of the showText property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public Boolean isShowText() {
        -            return showText;
        -        }
        +    /**
        +     * Gets the value of the showFullId property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public Boolean isShowFullId()
        +    {
        +      return showFullId;
        +    }
         
        -        /**
        -         * Sets the value of the showText property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setShowText(Boolean value) {
        -            this.showText = value;
        -        }
        +    /**
        +     * Sets the value of the showFullId property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setShowFullId(Boolean value)
        +    {
        +      this.showFullId = value;
        +    }
         
        -        /**
        -         * Gets the value of the showColourText property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public Boolean isShowColourText() {
        -            return showColourText;
        -        }
        +    /**
        +     * Gets the value of the rightAlignIds property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public Boolean isRightAlignIds()
        +    {
        +      return rightAlignIds;
        +    }
         
        -        /**
        -         * Sets the value of the showColourText property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setShowColourText(Boolean value) {
        -            this.showColourText = value;
        -        }
        +    /**
        +     * Sets the value of the rightAlignIds property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setRightAlignIds(Boolean value)
        +    {
        +      this.rightAlignIds = value;
        +    }
         
        -        /**
        -         * Gets the value of the showUnconserved property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public boolean isShowUnconserved() {
        -            if (showUnconserved == null) {
        -                return false;
        -            } else {
        -                return showUnconserved;
        -            }
        -        }
        +    /**
        +     * Gets the value of the showText property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public Boolean isShowText()
        +    {
        +      return showText;
        +    }
         
        -        /**
        -         * Sets the value of the showUnconserved property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setShowUnconserved(Boolean value) {
        -            this.showUnconserved = value;
        -        }
        +    /**
        +     * Sets the value of the showText property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setShowText(Boolean value)
        +    {
        +      this.showText = value;
        +    }
         
        -        /**
        -         * Gets the value of the showBoxes property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public Boolean isShowBoxes() {
        -            return showBoxes;
        -        }
        +    /**
        +     * Gets the value of the showColourText property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public Boolean isShowColourText()
        +    {
        +      return showColourText;
        +    }
         
        -        /**
        -         * Sets the value of the showBoxes property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setShowBoxes(Boolean value) {
        -            this.showBoxes = value;
        -        }
        +    /**
        +     * Sets the value of the showColourText property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setShowColourText(Boolean value)
        +    {
        +      this.showColourText = value;
        +    }
         
        -        /**
        -         * Gets the value of the wrapAlignment property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public Boolean isWrapAlignment() {
        -            return wrapAlignment;
        -        }
        +    /**
        +     * Gets the value of the showUnconserved property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public boolean isShowUnconserved()
        +    {
        +      if (showUnconserved == null)
        +      {
        +        return false;
        +      }
        +      else
        +      {
        +        return showUnconserved;
        +      }
        +    }
         
        -        /**
        -         * Sets the value of the wrapAlignment property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setWrapAlignment(Boolean value) {
        -            this.wrapAlignment = value;
        -        }
        +    /**
        +     * Sets the value of the showUnconserved property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setShowUnconserved(Boolean value)
        +    {
        +      this.showUnconserved = value;
        +    }
         
        -        /**
        -         * Gets the value of the renderGaps property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public Boolean isRenderGaps() {
        -            return renderGaps;
        -        }
        +    /**
        +     * Gets the value of the showBoxes property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public Boolean isShowBoxes()
        +    {
        +      return showBoxes;
        +    }
         
        -        /**
        -         * Sets the value of the renderGaps property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setRenderGaps(Boolean value) {
        -            this.renderGaps = value;
        -        }
        +    /**
        +     * Sets the value of the showBoxes property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setShowBoxes(Boolean value)
        +    {
        +      this.showBoxes = value;
        +    }
         
        -        /**
        -         * Gets the value of the showSequenceFeatures property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public Boolean isShowSequenceFeatures() {
        -            return showSequenceFeatures;
        -        }
        +    /**
        +     * Gets the value of the wrapAlignment property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public Boolean isWrapAlignment()
        +    {
        +      return wrapAlignment;
        +    }
         
        -        /**
        -         * Sets the value of the showSequenceFeatures property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setShowSequenceFeatures(Boolean value) {
        -            this.showSequenceFeatures = value;
        -        }
        +    /**
        +     * Sets the value of the wrapAlignment property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setWrapAlignment(Boolean value)
        +    {
        +      this.wrapAlignment = value;
        +    }
         
        -        /**
        -         * Gets the value of the showNPfeatureTooltip property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public Boolean isShowNPfeatureTooltip() {
        -            return showNPfeatureTooltip;
        -        }
        +    /**
        +     * Gets the value of the renderGaps property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public Boolean isRenderGaps()
        +    {
        +      return renderGaps;
        +    }
         
        -        /**
        -         * Sets the value of the showNPfeatureTooltip property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setShowNPfeatureTooltip(Boolean value) {
        -            this.showNPfeatureTooltip = value;
        -        }
        +    /**
        +     * Sets the value of the renderGaps property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setRenderGaps(Boolean value)
        +    {
        +      this.renderGaps = value;
        +    }
         
        -        /**
        -         * Gets the value of the showDbRefTooltip property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public Boolean isShowDbRefTooltip() {
        -            return showDbRefTooltip;
        -        }
        +    /**
        +     * Gets the value of the showSequenceFeatures property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public Boolean isShowSequenceFeatures()
        +    {
        +      return showSequenceFeatures;
        +    }
         
        -        /**
        -         * Sets the value of the showDbRefTooltip property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setShowDbRefTooltip(Boolean value) {
        -            this.showDbRefTooltip = value;
        -        }
        +    /**
        +     * Sets the value of the showSequenceFeatures property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setShowSequenceFeatures(Boolean value)
        +    {
        +      this.showSequenceFeatures = value;
        +    }
         
        -        /**
        -         * Gets the value of the followHighlight property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public boolean isFollowHighlight() {
        -            if (followHighlight == null) {
        -                return true;
        -            } else {
        -                return followHighlight;
        -            }
        -        }
        +    /**
        +     * Gets the value of the showNPfeatureTooltip property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public Boolean isShowNPfeatureTooltip()
        +    {
        +      return showNPfeatureTooltip;
        +    }
         
        -        /**
        -         * Sets the value of the followHighlight property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setFollowHighlight(Boolean value) {
        -            this.followHighlight = value;
        -        }
        +    /**
        +     * Sets the value of the showNPfeatureTooltip property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setShowNPfeatureTooltip(Boolean value)
        +    {
        +      this.showNPfeatureTooltip = value;
        +    }
         
        -        /**
        -         * Gets the value of the followSelection property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public boolean isFollowSelection() {
        -            if (followSelection == null) {
        -                return true;
        -            } else {
        -                return followSelection;
        -            }
        -        }
        +    /**
        +     * Gets the value of the showDbRefTooltip property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public Boolean isShowDbRefTooltip()
        +    {
        +      return showDbRefTooltip;
        +    }
         
        -        /**
        -         * Sets the value of the followSelection property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setFollowSelection(Boolean value) {
        -            this.followSelection = value;
        -        }
        +    /**
        +     * Sets the value of the showDbRefTooltip property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setShowDbRefTooltip(Boolean value)
        +    {
        +      this.showDbRefTooltip = value;
        +    }
         
        -        /**
        -         * Gets the value of the showAnnotation property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public Boolean isShowAnnotation() {
        -            return showAnnotation;
        -        }
        +    /**
        +     * Gets the value of the followHighlight property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public boolean isFollowHighlight()
        +    {
        +      if (followHighlight == null)
        +      {
        +        return true;
        +      }
        +      else
        +      {
        +        return followHighlight;
        +      }
        +    }
         
        -        /**
        -         * Sets the value of the showAnnotation property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setShowAnnotation(Boolean value) {
        -            this.showAnnotation = value;
        -        }
        +    /**
        +     * Sets the value of the followHighlight property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setFollowHighlight(Boolean value)
        +    {
        +      this.followHighlight = value;
        +    }
         
        -        /**
        -         * Gets the value of the centreColumnLabels property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public boolean isCentreColumnLabels() {
        -            if (centreColumnLabels == null) {
        -                return false;
        -            } else {
        -                return centreColumnLabels;
        -            }
        -        }
        +    /**
        +     * Gets the value of the followSelection property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public boolean isFollowSelection()
        +    {
        +      if (followSelection == null)
        +      {
        +        return true;
        +      }
        +      else
        +      {
        +        return followSelection;
        +      }
        +    }
         
        -        /**
        -         * Sets the value of the centreColumnLabels property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setCentreColumnLabels(Boolean value) {
        -            this.centreColumnLabels = value;
        -        }
        +    /**
        +     * Sets the value of the followSelection property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setFollowSelection(Boolean value)
        +    {
        +      this.followSelection = value;
        +    }
         
        -        /**
        -         * Gets the value of the showGroupConservation property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public boolean isShowGroupConservation() {
        -            if (showGroupConservation == null) {
        -                return false;
        -            } else {
        -                return showGroupConservation;
        -            }
        -        }
        +    /**
        +     * Gets the value of the showAnnotation property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public Boolean isShowAnnotation()
        +    {
        +      return showAnnotation;
        +    }
         
        -        /**
        -         * Sets the value of the showGroupConservation property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setShowGroupConservation(Boolean value) {
        -            this.showGroupConservation = value;
        -        }
        +    /**
        +     * Sets the value of the showAnnotation property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setShowAnnotation(Boolean value)
        +    {
        +      this.showAnnotation = value;
        +    }
         
        -        /**
        -         * Gets the value of the showGroupConsensus property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public boolean isShowGroupConsensus() {
        -            if (showGroupConsensus == null) {
        -                return false;
        -            } else {
        -                return showGroupConsensus;
        -            }
        -        }
        +    /**
        +     * Gets the value of the centreColumnLabels property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public boolean isCentreColumnLabels()
        +    {
        +      if (centreColumnLabels == null)
        +      {
        +        return false;
        +      }
        +      else
        +      {
        +        return centreColumnLabels;
        +      }
        +    }
         
        -        /**
        -         * Sets the value of the showGroupConsensus property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setShowGroupConsensus(Boolean value) {
        -            this.showGroupConsensus = value;
        -        }
        +    /**
        +     * Sets the value of the centreColumnLabels property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setCentreColumnLabels(Boolean value)
        +    {
        +      this.centreColumnLabels = value;
        +    }
         
        -        /**
        -         * Gets the value of the showConsensusHistogram property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public boolean isShowConsensusHistogram() {
        -            if (showConsensusHistogram == null) {
        -                return true;
        -            } else {
        -                return showConsensusHistogram;
        -            }
        -        }
        +    /**
        +     * Gets the value of the showGroupConservation property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public boolean isShowGroupConservation()
        +    {
        +      if (showGroupConservation == null)
        +      {
        +        return false;
        +      }
        +      else
        +      {
        +        return showGroupConservation;
        +      }
        +    }
         
        -        /**
        -         * Sets the value of the showConsensusHistogram property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setShowConsensusHistogram(Boolean value) {
        -            this.showConsensusHistogram = value;
        -        }
        +    /**
        +     * Sets the value of the showGroupConservation property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setShowGroupConservation(Boolean value)
        +    {
        +      this.showGroupConservation = value;
        +    }
         
        -        /**
        -         * Gets the value of the showSequenceLogo property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public boolean isShowSequenceLogo() {
        -            if (showSequenceLogo == null) {
        -                return false;
        -            } else {
        -                return showSequenceLogo;
        -            }
        -        }
        +    /**
        +     * Gets the value of the showGroupConsensus property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public boolean isShowGroupConsensus()
        +    {
        +      if (showGroupConsensus == null)
        +      {
        +        return false;
        +      }
        +      else
        +      {
        +        return showGroupConsensus;
        +      }
        +    }
        +
        +    /**
        +     * Sets the value of the showGroupConsensus property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setShowGroupConsensus(Boolean value)
        +    {
        +      this.showGroupConsensus = value;
        +    }
         
        -        /**
        -         * Sets the value of the showSequenceLogo property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setShowSequenceLogo(Boolean value) {
        -            this.showSequenceLogo = value;
        -        }
        +    /**
        +     * Gets the value of the showConsensusHistogram property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public boolean isShowConsensusHistogram()
        +    {
        +      if (showConsensusHistogram == null)
        +      {
        +        return true;
        +      }
        +      else
        +      {
        +        return showConsensusHistogram;
        +      }
        +    }
         
        -        /**
        -         * Gets the value of the normaliseSequenceLogo property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public boolean isNormaliseSequenceLogo() {
        -            if (normaliseSequenceLogo == null) {
        -                return false;
        -            } else {
        -                return normaliseSequenceLogo;
        -            }
        -        }
        +    /**
        +     * Sets the value of the showConsensusHistogram property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setShowConsensusHistogram(Boolean value)
        +    {
        +      this.showConsensusHistogram = value;
        +    }
         
        -        /**
        -         * Sets the value of the normaliseSequenceLogo property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setNormaliseSequenceLogo(Boolean value) {
        -            this.normaliseSequenceLogo = value;
        -        }
        +    /**
        +     * Gets the value of the showSequenceLogo property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public boolean isShowSequenceLogo()
        +    {
        +      if (showSequenceLogo == null)
        +      {
        +        return false;
        +      }
        +      else
        +      {
        +        return showSequenceLogo;
        +      }
        +    }
         
        -        /**
        -         * Gets the value of the ignoreGapsinConsensus property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public boolean isIgnoreGapsinConsensus() {
        -            if (ignoreGapsinConsensus == null) {
        -                return true;
        -            } else {
        -                return ignoreGapsinConsensus;
        -            }
        -        }
        +    /**
        +     * Sets the value of the showSequenceLogo property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setShowSequenceLogo(Boolean value)
        +    {
        +      this.showSequenceLogo = value;
        +    }
         
        -        /**
        -         * Sets the value of the ignoreGapsinConsensus property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setIgnoreGapsinConsensus(Boolean value) {
        -            this.ignoreGapsinConsensus = value;
        -        }
        +    /**
        +     * Gets the value of the normaliseSequenceLogo property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public boolean isNormaliseSequenceLogo()
        +    {
        +      if (normaliseSequenceLogo == null)
        +      {
        +        return false;
        +      }
        +      else
        +      {
        +        return normaliseSequenceLogo;
        +      }
        +    }
         
        -        /**
        -         * Gets the value of the startRes property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public Integer getStartRes() {
        -            return startRes;
        -        }
        +    /**
        +     * Sets the value of the normaliseSequenceLogo property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setNormaliseSequenceLogo(Boolean value)
        +    {
        +      this.normaliseSequenceLogo = value;
        +    }
         
        -        /**
        -         * Sets the value of the startRes property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public void setStartRes(Integer value) {
        -            this.startRes = value;
        -        }
        +    /**
        +     * Gets the value of the ignoreGapsinConsensus property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public boolean isIgnoreGapsinConsensus()
        +    {
        +      if (ignoreGapsinConsensus == null)
        +      {
        +        return true;
        +      }
        +      else
        +      {
        +        return ignoreGapsinConsensus;
        +      }
        +    }
         
        -        /**
        -         * Gets the value of the startSeq property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public Integer getStartSeq() {
        -            return startSeq;
        -        }
        +    /**
        +     * Sets the value of the ignoreGapsinConsensus property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setIgnoreGapsinConsensus(Boolean value)
        +    {
        +      this.ignoreGapsinConsensus = value;
        +    }
         
        -        /**
        -         * Sets the value of the startSeq property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public void setStartSeq(Integer value) {
        -            this.startSeq = value;
        -        }
        +    /**
        +     * Gets the value of the startRes property.
        +     * 
        +     * @return possible object is {@link Integer }
        +     * 
        +     */
        +    public Integer getStartRes()
        +    {
        +      return startRes;
        +    }
         
        -        /**
        -         * Gets the value of the fontName property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link String }
        -         *     
        -         */
        -        public String getFontName() {
        -            return fontName;
        -        }
        +    /**
        +     * Sets the value of the startRes property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Integer }
        +     * 
        +     */
        +    public void setStartRes(Integer value)
        +    {
        +      this.startRes = value;
        +    }
         
        -        /**
        -         * Sets the value of the fontName property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link String }
        -         *     
        -         */
        -        public void setFontName(String value) {
        -            this.fontName = value;
        -        }
        +    /**
        +     * Gets the value of the startSeq property.
        +     * 
        +     * @return possible object is {@link Integer }
        +     * 
        +     */
        +    public Integer getStartSeq()
        +    {
        +      return startSeq;
        +    }
         
        -        /**
        -         * Gets the value of the fontSize property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public Integer getFontSize() {
        -            return fontSize;
        -        }
        +    /**
        +     * Sets the value of the startSeq property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Integer }
        +     * 
        +     */
        +    public void setStartSeq(Integer value)
        +    {
        +      this.startSeq = value;
        +    }
         
        -        /**
        -         * Sets the value of the fontSize property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public void setFontSize(Integer value) {
        -            this.fontSize = value;
        -        }
        +    /**
        +     * Gets the value of the fontName property.
        +     * 
        +     * @return possible object is {@link String }
        +     * 
        +     */
        +    public String getFontName()
        +    {
        +      return fontName;
        +    }
         
        -        /**
        -         * Gets the value of the fontStyle property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public Integer getFontStyle() {
        -            return fontStyle;
        -        }
        +    /**
        +     * Sets the value of the fontName property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link String }
        +     * 
        +     */
        +    public void setFontName(String value)
        +    {
        +      this.fontName = value;
        +    }
         
        -        /**
        -         * Sets the value of the fontStyle property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public void setFontStyle(Integer value) {
        -            this.fontStyle = value;
        -        }
        +    /**
        +     * Gets the value of the fontSize property.
        +     * 
        +     * @return possible object is {@link Integer }
        +     * 
        +     */
        +    public Integer getFontSize()
        +    {
        +      return fontSize;
        +    }
         
        -        /**
        -         * Gets the value of the scaleProteinAsCdna property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public boolean isScaleProteinAsCdna() {
        -            if (scaleProteinAsCdna == null) {
        -                return true;
        -            } else {
        -                return scaleProteinAsCdna;
        -            }
        -        }
        +    /**
        +     * Sets the value of the fontSize property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Integer }
        +     * 
        +     */
        +    public void setFontSize(Integer value)
        +    {
        +      this.fontSize = value;
        +    }
         
        -        /**
        -         * Sets the value of the scaleProteinAsCdna property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setScaleProteinAsCdna(Boolean value) {
        -            this.scaleProteinAsCdna = value;
        -        }
        +    /**
        +     * Gets the value of the fontStyle property.
        +     * 
        +     * @return possible object is {@link Integer }
        +     * 
        +     */
        +    public Integer getFontStyle()
        +    {
        +      return fontStyle;
        +    }
         
        -        /**
        -         * Gets the value of the viewName property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link String }
        -         *     
        -         */
        -        public String getViewName() {
        -            return viewName;
        -        }
        +    /**
        +     * Sets the value of the fontStyle property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Integer }
        +     * 
        +     */
        +    public void setFontStyle(Integer value)
        +    {
        +      this.fontStyle = value;
        +    }
         
        -        /**
        -         * Sets the value of the viewName property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link String }
        -         *     
        -         */
        -        public void setViewName(String value) {
        -            this.viewName = value;
        -        }
        +    /**
        +     * Gets the value of the scaleProteinAsCdna property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public boolean isScaleProteinAsCdna()
        +    {
        +      if (scaleProteinAsCdna == null)
        +      {
        +        return true;
        +      }
        +      else
        +      {
        +        return scaleProteinAsCdna;
        +      }
        +    }
         
        -        /**
        -         * Gets the value of the sequenceSetId property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link String }
        -         *     
        -         */
        -        public String getSequenceSetId() {
        -            return sequenceSetId;
        -        }
        +    /**
        +     * Sets the value of the scaleProteinAsCdna property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setScaleProteinAsCdna(Boolean value)
        +    {
        +      this.scaleProteinAsCdna = value;
        +    }
         
        -        /**
        -         * Sets the value of the sequenceSetId property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link String }
        -         *     
        -         */
        -        public void setSequenceSetId(String value) {
        -            this.sequenceSetId = value;
        -        }
        +    /**
        +     * Gets the value of the viewName property.
        +     * 
        +     * @return possible object is {@link String }
        +     * 
        +     */
        +    public String getViewName()
        +    {
        +      return viewName;
        +    }
         
        -        /**
        -         * Gets the value of the gatheredViews property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public Boolean isGatheredViews() {
        -            return gatheredViews;
        -        }
        +    /**
        +     * Sets the value of the viewName property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link String }
        +     * 
        +     */
        +    public void setViewName(String value)
        +    {
        +      this.viewName = value;
        +    }
         
        -        /**
        -         * Sets the value of the gatheredViews property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setGatheredViews(Boolean value) {
        -            this.gatheredViews = value;
        -        }
        +    /**
        +     * Gets the value of the sequenceSetId property.
        +     * 
        +     * @return possible object is {@link String }
        +     * 
        +     */
        +    public String getSequenceSetId()
        +    {
        +      return sequenceSetId;
        +    }
         
        -        /**
        -         * Gets the value of the textCol1 property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public Integer getTextCol1() {
        -            return textCol1;
        -        }
        +    /**
        +     * Sets the value of the sequenceSetId property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link String }
        +     * 
        +     */
        +    public void setSequenceSetId(String value)
        +    {
        +      this.sequenceSetId = value;
        +    }
         
        -        /**
        -         * Sets the value of the textCol1 property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public void setTextCol1(Integer value) {
        -            this.textCol1 = value;
        -        }
        +    /**
        +     * Gets the value of the gatheredViews property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public Boolean isGatheredViews()
        +    {
        +      return gatheredViews;
        +    }
         
        -        /**
        -         * Gets the value of the textCol2 property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public Integer getTextCol2() {
        -            return textCol2;
        -        }
        +    /**
        +     * Sets the value of the gatheredViews property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setGatheredViews(Boolean value)
        +    {
        +      this.gatheredViews = value;
        +    }
         
        -        /**
        -         * Sets the value of the textCol2 property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public void setTextCol2(Integer value) {
        -            this.textCol2 = value;
        -        }
        +    /**
        +     * Gets the value of the textCol1 property.
        +     * 
        +     * @return possible object is {@link Integer }
        +     * 
        +     */
        +    public Integer getTextCol1()
        +    {
        +      return textCol1;
        +    }
         
        -        /**
        -         * Gets the value of the textColThreshold property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public Integer getTextColThreshold() {
        -            return textColThreshold;
        -        }
        +    /**
        +     * Sets the value of the textCol1 property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Integer }
        +     * 
        +     */
        +    public void setTextCol1(Integer value)
        +    {
        +      this.textCol1 = value;
        +    }
         
        -        /**
        -         * Sets the value of the textColThreshold property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public void setTextColThreshold(Integer value) {
        -            this.textColThreshold = value;
        -        }
        +    /**
        +     * Gets the value of the textCol2 property.
        +     * 
        +     * @return possible object is {@link Integer }
        +     * 
        +     */
        +    public Integer getTextCol2()
        +    {
        +      return textCol2;
        +    }
         
        -        /**
        -         * Gets the value of the id property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link String }
        -         *     
        -         */
        -        public String getId() {
        -            return id;
        -        }
        +    /**
        +     * Sets the value of the textCol2 property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Integer }
        +     * 
        +     */
        +    public void setTextCol2(Integer value)
        +    {
        +      this.textCol2 = value;
        +    }
         
        -        /**
        -         * Sets the value of the id property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link String }
        -         *     
        -         */
        -        public void setId(String value) {
        -            this.id = value;
        -        }
        +    /**
        +     * Gets the value of the textColThreshold property.
        +     * 
        +     * @return possible object is {@link Integer }
        +     * 
        +     */
        +    public Integer getTextColThreshold()
        +    {
        +      return textColThreshold;
        +    }
         
        -        /**
        -         * Gets the value of the complementId property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link String }
        -         *     
        -         */
        -        public String getComplementId() {
        -            return complementId;
        -        }
        +    /**
        +     * Sets the value of the textColThreshold property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Integer }
        +     * 
        +     */
        +    public void setTextColThreshold(Integer value)
        +    {
        +      this.textColThreshold = value;
        +    }
         
        -        /**
        -         * Sets the value of the complementId property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link String }
        -         *     
        -         */
        -        public void setComplementId(String value) {
        -            this.complementId = value;
        -        }
        +    /**
        +     * Gets the value of the id property.
        +     * 
        +     * @return possible object is {@link String }
        +     * 
        +     */
        +    public String getId()
        +    {
        +      return id;
        +    }
         
        -        /**
        -         * Gets the value of the showComplementFeatures property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public boolean isShowComplementFeatures() {
        -            if (showComplementFeatures == null) {
        -                return false;
        -            } else {
        -                return showComplementFeatures;
        -            }
        -        }
        +    /**
        +     * Sets the value of the id property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link String }
        +     * 
        +     */
        +    public void setId(String value)
        +    {
        +      this.id = value;
        +    }
         
        -        /**
        -         * Sets the value of the showComplementFeatures property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setShowComplementFeatures(Boolean value) {
        -            this.showComplementFeatures = value;
        -        }
        +    /**
        +     * Gets the value of the complementId property.
        +     * 
        +     * @return possible object is {@link String }
        +     * 
        +     */
        +    public String getComplementId()
        +    {
        +      return complementId;
        +    }
         
        -        /**
        -         * Gets the value of the showComplementFeaturesOnTop property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public boolean isShowComplementFeaturesOnTop() {
        -            if (showComplementFeaturesOnTop == null) {
        -                return false;
        -            } else {
        -                return showComplementFeaturesOnTop;
        -            }
        -        }
        +    /**
        +     * Sets the value of the complementId property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link String }
        +     * 
        +     */
        +    public void setComplementId(String value)
        +    {
        +      this.complementId = value;
        +    }
         
        -        /**
        -         * Sets the value of the showComplementFeaturesOnTop property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Boolean }
        -         *     
        -         */
        -        public void setShowComplementFeaturesOnTop(Boolean value) {
        -            this.showComplementFeaturesOnTop = value;
        -        }
        +    /**
        +     * Gets the value of the showComplementFeatures property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public boolean isShowComplementFeatures()
        +    {
        +      if (showComplementFeatures == null)
        +      {
        +        return false;
        +      }
        +      else
        +      {
        +        return showComplementFeatures;
        +      }
        +    }
         
        -        /**
        -         * Gets the value of the width property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public Integer getWidth() {
        -            return width;
        -        }
        +    /**
        +     * Sets the value of the showComplementFeatures property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setShowComplementFeatures(Boolean value)
        +    {
        +      this.showComplementFeatures = value;
        +    }
         
        -        /**
        -         * Sets the value of the width property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public void setWidth(Integer value) {
        -            this.width = value;
        -        }
        +    /**
        +     * Gets the value of the showComplementFeaturesOnTop property.
        +     * 
        +     * @return possible object is {@link Boolean }
        +     * 
        +     */
        +    public boolean isShowComplementFeaturesOnTop()
        +    {
        +      if (showComplementFeaturesOnTop == null)
        +      {
        +        return false;
        +      }
        +      else
        +      {
        +        return showComplementFeaturesOnTop;
        +      }
        +    }
         
        -        /**
        -         * Gets the value of the height property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public Integer getHeight() {
        -            return height;
        -        }
        +    /**
        +     * Sets the value of the showComplementFeaturesOnTop property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Boolean }
        +     * 
        +     */
        +    public void setShowComplementFeaturesOnTop(Boolean value)
        +    {
        +      this.showComplementFeaturesOnTop = value;
        +    }
         
        -        /**
        -         * Sets the value of the height property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public void setHeight(Integer value) {
        -            this.height = value;
        -        }
        +    /**
        +     * Gets the value of the width property.
        +     * 
        +     * @return possible object is {@link Integer }
        +     * 
        +     */
        +    public Integer getWidth()
        +    {
        +      return width;
        +    }
         
        -        /**
        -         * Gets the value of the xpos property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public Integer getXpos() {
        -            return xpos;
        -        }
        +    /**
        +     * Sets the value of the width property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Integer }
        +     * 
        +     */
        +    public void setWidth(Integer value)
        +    {
        +      this.width = value;
        +    }
         
        -        /**
        -         * Sets the value of the xpos property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public void setXpos(Integer value) {
        -            this.xpos = value;
        -        }
        +    /**
        +     * Gets the value of the height property.
        +     * 
        +     * @return possible object is {@link Integer }
        +     * 
        +     */
        +    public Integer getHeight()
        +    {
        +      return height;
        +    }
         
        -        /**
        -         * Gets the value of the ypos property.
        -         * 
        -         * @return
        -         *     possible object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public Integer getYpos() {
        -            return ypos;
        -        }
        +    /**
        +     * Sets the value of the height property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Integer }
        +     * 
        +     */
        +    public void setHeight(Integer value)
        +    {
        +      this.height = value;
        +    }
         
        -        /**
        -         * Sets the value of the ypos property.
        -         * 
        -         * @param value
        -         *     allowed object is
        -         *     {@link Integer }
        -         *     
        -         */
        -        public void setYpos(Integer value) {
        -            this.ypos = value;
        -        }
        +    /**
        +     * Gets the value of the xpos property.
        +     * 
        +     * @return possible object is {@link Integer }
        +     * 
        +     */
        +    public Integer getXpos()
        +    {
        +      return xpos;
        +    }
         
        +    /**
        +     * Sets the value of the xpos property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Integer }
        +     * 
        +     */
        +    public void setXpos(Integer value)
        +    {
        +      this.xpos = value;
        +    }
         
        -        /**
        -         * <p>Java class for anonymous complex type.
        -         * 
        -         * <p>The following schema fragment specifies the expected content contained within this class.
        -         * 
        -         * <pre>
        -         * &lt;complexType&gt;
        -         *   &lt;complexContent&gt;
        -         *     &lt;extension base="{www.jalview.org/xml/wsparamset}WebServiceParameterSet"&gt;
        -         *       &lt;attribute name="calcId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        -         *       &lt;attribute name="needsUpdate" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
        -         *       &lt;attribute name="autoUpdate" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        -         *     &lt;/extension&gt;
        -         *   &lt;/complexContent&gt;
        -         * &lt;/complexType&gt;
        -         * </pre>
        -         * 
        -         * 
        -         */
        -        @XmlAccessorType(XmlAccessType.FIELD)
        -        @XmlType(name = "")
        -        public static class CalcIdParam
        -            extends WebServiceParameterSet
        -        {
        +    /**
        +     * Gets the value of the ypos property.
        +     * 
        +     * @return possible object is {@link Integer }
        +     * 
        +     */
        +    public Integer getYpos()
        +    {
        +      return ypos;
        +    }
         
        -            @XmlAttribute(name = "calcId", required = true)
        -            protected String calcId;
        -            @XmlAttribute(name = "needsUpdate")
        -            protected Boolean needsUpdate;
        -            @XmlAttribute(name = "autoUpdate", required = true)
        -            protected boolean autoUpdate;
        -
        -            /**
        -             * Gets the value of the calcId property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link String }
        -             *     
        -             */
        -            public String getCalcId() {
        -                return calcId;
        -            }
        -
        -            /**
        -             * Sets the value of the calcId property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link String }
        -             *     
        -             */
        -            public void setCalcId(String value) {
        -                this.calcId = value;
        -            }
        -
        -            /**
        -             * Gets the value of the needsUpdate property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link Boolean }
        -             *     
        -             */
        -            public boolean isNeedsUpdate() {
        -                if (needsUpdate == null) {
        -                    return false;
        -                } else {
        -                    return needsUpdate;
        -                }
        -            }
        -
        -            /**
        -             * Sets the value of the needsUpdate property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link Boolean }
        -             *     
        -             */
        -            public void setNeedsUpdate(Boolean value) {
        -                this.needsUpdate = value;
        -            }
        -
        -            /**
        -             * Gets the value of the autoUpdate property.
        -             * 
        -             */
        -            public boolean isAutoUpdate() {
        -                return autoUpdate;
        -            }
        -
        -            /**
        -             * Sets the value of the autoUpdate property.
        -             * 
        -             */
        -            public void setAutoUpdate(boolean value) {
        -                this.autoUpdate = value;
        -            }
        +    /**
        +     * Sets the value of the ypos property.
        +     * 
        +     * @param value
        +     *          allowed object is {@link Integer }
        +     * 
        +     */
        +    public void setYpos(Integer value)
        +    {
        +      this.ypos = value;
        +    }
         
        +    /**
        +     * <p>Java class for anonymous complex type.
        +     * 
        +     * <p>The following schema fragment specifies the expected content
        +     * contained within this class.
        +     * 
        +     * <pre> &lt;complexType&gt; &lt;complexContent&gt;
        +     * &lt;extension
        +     * base="{www.jalview.org/xml/wsparamset}WebServiceParameterSet"&gt;
        +     * &lt;attribute name="calcId" use="required"
        +     * type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
        +     * &lt;attribute name="needsUpdate"
        +     * type="{http://www.w3.org/2001/XMLSchema}boolean" default="false"
        +     * /&gt; &lt;attribute name="autoUpdate" use="required"
        +     * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
        +     * &lt;/extension&gt; &lt;/complexContent&gt;
        +     * &lt;/complexType&gt; </pre>
        +     * 
        +     * 
        +     */
        +    @XmlAccessorType(XmlAccessType.FIELD)
        +    @XmlType(name = "")
        +    public static class CalcIdParam extends WebServiceParameterSet
        +    {
        +
        +      @XmlAttribute(name = "calcId", required = true)
        +      protected String calcId;
        +
        +      @XmlAttribute(name = "needsUpdate")
        +      protected Boolean needsUpdate;
        +
        +      @XmlAttribute(name = "autoUpdate", required = true)
        +      protected boolean autoUpdate;
        +
        +      /**
        +       * Gets the value of the calcId property.
        +       * 
        +       * @return possible object is {@link String }
        +       * 
        +       */
        +      public String getCalcId()
        +      {
        +        return calcId;
        +      }
        +
        +      /**
        +       * Sets the value of the calcId property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link String }
        +       * 
        +       */
        +      public void setCalcId(String value)
        +      {
        +        this.calcId = value;
        +      }
        +
        +      /**
        +       * Gets the value of the needsUpdate property.
        +       * 
        +       * @return possible object is {@link Boolean }
        +       * 
        +       */
        +      public boolean isNeedsUpdate()
        +      {
        +        if (needsUpdate == null)
        +        {
        +          return false;
                 }
        +        else
        +        {
        +          return needsUpdate;
        +        }
        +      }
        +
        +      /**
        +       * Sets the value of the needsUpdate property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Boolean }
        +       * 
        +       */
        +      public void setNeedsUpdate(Boolean value)
        +      {
        +        this.needsUpdate = value;
        +      }
        +
        +      /**
        +       * Gets the value of the autoUpdate property.
        +       * 
        +       */
        +      public boolean isAutoUpdate()
        +      {
        +        return autoUpdate;
        +      }
        +
        +      /**
        +       * Sets the value of the autoUpdate property.
        +       * 
        +       */
        +      public void setAutoUpdate(boolean value)
        +      {
        +        this.autoUpdate = value;
        +      }
         
        +    }
         
        -        /**
        -         * <p>Java class for anonymous complex type.
        -         * 
        -         * <p>The following schema fragment specifies the expected content contained within this class.
        -         * 
        -         * <pre>
        -         * &lt;complexType&gt;
        -         *   &lt;complexContent&gt;
        -         *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        -         *       &lt;attribute name="start" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -         *       &lt;attribute name="end" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        -         *     &lt;/restriction&gt;
        -         *   &lt;/complexContent&gt;
        -         * &lt;/complexType&gt;
        -         * </pre>
        -         * 
        -         * 
        -         */
        -        @XmlAccessorType(XmlAccessType.FIELD)
        -        @XmlType(name = "")
        -        public static class HiddenColumns {
        -
        -            @XmlAttribute(name = "start")
        -            protected Integer start;
        -            @XmlAttribute(name = "end")
        -            protected Integer end;
        -
        -            /**
        -             * Gets the value of the start property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link Integer }
        -             *     
        -             */
        -            public Integer getStart() {
        -                return start;
        -            }
        -
        -            /**
        -             * Sets the value of the start property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link Integer }
        -             *     
        -             */
        -            public void setStart(Integer value) {
        -                this.start = value;
        -            }
        -
        -            /**
        -             * Gets the value of the end property.
        -             * 
        -             * @return
        -             *     possible object is
        -             *     {@link Integer }
        -             *     
        -             */
        -            public Integer getEnd() {
        -                return end;
        -            }
        -
        -            /**
        -             * Sets the value of the end property.
        -             * 
        -             * @param value
        -             *     allowed object is
        -             *     {@link Integer }
        -             *     
        -             */
        -            public void setEnd(Integer value) {
        -                this.end = value;
        -            }
        -
        -        }
        +    /**
        +     * <p>Java class for anonymous complex type.
        +     * 
        +     * <p>The following schema fragment specifies the expected content
        +     * contained within this class.
        +     * 
        +     * <pre> &lt;complexType&gt; &lt;complexContent&gt;
        +     * &lt;restriction
        +     * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
        +     * &lt;attribute name="start"
        +     * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute
        +     * name="end" type="{http://www.w3.org/2001/XMLSchema}int" /&gt;
        +     * &lt;/restriction&gt; &lt;/complexContent&gt;
        +     * &lt;/complexType&gt; </pre>
        +     * 
        +     * 
        +     */
        +    @XmlAccessorType(XmlAccessType.FIELD)
        +    @XmlType(name = "")
        +    public static class HiddenColumns
        +    {
        +
        +      @XmlAttribute(name = "start")
        +      protected Integer start;
        +
        +      @XmlAttribute(name = "end")
        +      protected Integer end;
        +
        +      /**
        +       * Gets the value of the start property.
        +       * 
        +       * @return possible object is {@link Integer }
        +       * 
        +       */
        +      public Integer getStart()
        +      {
        +        return start;
        +      }
        +
        +      /**
        +       * Sets the value of the start property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Integer }
        +       * 
        +       */
        +      public void setStart(Integer value)
        +      {
        +        this.start = value;
        +      }
        +
        +      /**
        +       * Gets the value of the end property.
        +       * 
        +       * @return possible object is {@link Integer }
        +       * 
        +       */
        +      public Integer getEnd()
        +      {
        +        return end;
        +      }
        +
        +      /**
        +       * Sets the value of the end property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Integer }
        +       * 
        +       */
        +      public void setEnd(Integer value)
        +      {
        +        this.end = value;
        +      }
         
             }
         
        +  }
        +
         }
        diff --git a/src/jalview/xml/binding/jalview/JalviewModelType.java b/src/jalview/xml/binding/jalview/JalviewModelType.java
        index f084bc3..0541d7a 100644
        --- a/src/jalview/xml/binding/jalview/JalviewModelType.java
        +++ b/src/jalview/xml/binding/jalview/JalviewModelType.java
        @@ -5,7 +5,6 @@
         // Generated on: 2018.09.18 at 01:33:02 PM BST 
         //
         
        -
         package jalview.xml.binding.jalview;
         
         import java.util.ArrayList;
        @@ -22,11 +21,13 @@ import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
         import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
         import javax.xml.datatype.XMLGregorianCalendar;
         
        -
         /**
        - * 

        Java class for JalviewModelType complex type. + *

        + * Java class for JalviewModelType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="JalviewModelType">
        @@ -301,1564 +302,1947 @@ import javax.xml.datatype.XMLGregorianCalendar;
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "JalviewModelType", namespace = "www.jalview.org", propOrder = {
        -    "creationDate",
        -    "version",
        -    "vamsasModel",
        -    "jSeq",
        -    "jGroup",
        -    "viewport",
        -    "userColours",
        -    "tree",
        -    "featureSettings"
        -})
        -public class JalviewModelType {
        -
        -    @XmlElement(required = true)
        -    @XmlSchemaType(name = "dateTime")
        -    protected XMLGregorianCalendar creationDate;
        -    @XmlElement(required = true)
        -    protected String version;
        -    @XmlElement(required = true)
        -    protected VAMSAS vamsasModel;
        -    @XmlElement(name = "JSeq")
        -    protected List jSeq;
        -    @XmlElement(name = "JGroup")
        -    protected List jGroup;
        -    @XmlElement(name = "Viewport")
        -    protected List viewport;
        -    @XmlElement(name = "UserColours")
        -    protected List userColours;
        -    protected List tree;
        -    @XmlElement(name = "FeatureSettings")
        -    protected JalviewModelType.FeatureSettings featureSettings;
        -
        -    /**
        -     * Gets the value of the creationDate property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link XMLGregorianCalendar }
        -     *     
        -     */
        -    public XMLGregorianCalendar getCreationDate() {
        -        return creationDate;
        -    }
        -
        -    /**
        -     * Sets the value of the creationDate property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link XMLGregorianCalendar }
        -     *     
        -     */
        -    public void setCreationDate(XMLGregorianCalendar value) {
        -        this.creationDate = value;
        +@XmlType(
        +  name = "JalviewModelType",
        +  namespace = "www.jalview.org",
        +  propOrder =
        +  { "creationDate", "version", "vamsasModel", "jSeq", "jGroup", "viewport",
        +      "userColours", "tree", "featureSettings" })
        +public class JalviewModelType
        +{
        +
        +  @XmlElement(required = true)
        +  @XmlSchemaType(name = "dateTime")
        +  protected XMLGregorianCalendar creationDate;
        +
        +  @XmlElement(required = true)
        +  protected String version;
        +
        +  @XmlElement(required = true)
        +  protected VAMSAS vamsasModel;
        +
        +  @XmlElement(name = "JSeq")
        +  protected List jSeq;
        +
        +  @XmlElement(name = "JGroup")
        +  protected List jGroup;
        +
        +  @XmlElement(name = "Viewport")
        +  protected List viewport;
        +
        +  @XmlElement(name = "UserColours")
        +  protected List userColours;
        +
        +  protected List tree;
        +
        +  @XmlElement(name = "FeatureSettings")
        +  protected JalviewModelType.FeatureSettings featureSettings;
        +
        +  /**
        +   * Gets the value of the creationDate property.
        +   * 
        +   * @return possible object is {@link XMLGregorianCalendar }
        +   * 
        +   */
        +  public XMLGregorianCalendar getCreationDate()
        +  {
        +    return creationDate;
        +  }
        +
        +  /**
        +   * Sets the value of the creationDate property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link XMLGregorianCalendar }
        +   * 
        +   */
        +  public void setCreationDate(XMLGregorianCalendar value)
        +  {
        +    this.creationDate = value;
        +  }
        +
        +  /**
        +   * Gets the value of the version property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getVersion()
        +  {
        +    return version;
        +  }
        +
        +  /**
        +   * Sets the value of the version property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setVersion(String value)
        +  {
        +    this.version = value;
        +  }
        +
        +  /**
        +   * Gets the value of the vamsasModel property.
        +   * 
        +   * @return possible object is {@link VAMSAS }
        +   * 
        +   */
        +  public VAMSAS getVamsasModel()
        +  {
        +    return vamsasModel;
        +  }
        +
        +  /**
        +   * Sets the value of the vamsasModel property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link VAMSAS }
        +   * 
        +   */
        +  public void setVamsasModel(VAMSAS value)
        +  {
        +    this.vamsasModel = value;
        +  }
        +
        +  /**
        +   * Gets the value of the jSeq property.
        +   * 
        +   * 

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the jSeq property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getJSeq().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link JalviewModelType.JSeq } + * + * + */ + public List getJSeq() + { + if (jSeq == null) + { + jSeq = new ArrayList(); } - - /** - * Gets the value of the version property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getVersion() { - return version; + return this.jSeq; + } + + /** + * Gets the value of the jGroup property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the jGroup property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getJGroup().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link JalviewModelType.JGroup } + * + * + */ + public List getJGroup() + { + if (jGroup == null) + { + jGroup = new ArrayList(); } - - /** - * Sets the value of the version property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setVersion(String value) { - this.version = value; + return this.jGroup; + } + + /** + * Gets the value of the viewport property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the viewport property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getViewport().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link JalviewModelType.Viewport } + * + * + */ + public List getViewport() + { + if (viewport == null) + { + viewport = new ArrayList(); } - - /** - * Gets the value of the vamsasModel property. - * - * @return - * possible object is - * {@link VAMSAS } - * - */ - public VAMSAS getVamsasModel() { - return vamsasModel; + return this.viewport; + } + + /** + * Gets the value of the userColours property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the userColours property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getUserColours().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link JalviewModelType.UserColours } + * + * + */ + public List getUserColours() + { + if (userColours == null) + { + userColours = new ArrayList(); } - - /** - * Sets the value of the vamsasModel property. - * - * @param value - * allowed object is - * {@link VAMSAS } - * - */ - public void setVamsasModel(VAMSAS value) { - this.vamsasModel = value; + return this.userColours; + } + + /** + * Gets the value of the tree property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the tree property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getTree().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link JalviewModelType.Tree } + * + * + */ + public List getTree() + { + if (tree == null) + { + tree = new ArrayList(); } + return this.tree; + } + + /** + * Gets the value of the featureSettings property. + * + * @return possible object is {@link JalviewModelType.FeatureSettings } + * + */ + public JalviewModelType.FeatureSettings getFeatureSettings() + { + return featureSettings; + } + + /** + * Sets the value of the featureSettings property. + * + * @param value + * allowed object is {@link JalviewModelType.FeatureSettings } + * + */ + public void setFeatureSettings(JalviewModelType.FeatureSettings value) + { + this.featureSettings = value; + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <complexContent>
        +   *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *       <sequence>
        +   *         <element name="setting" maxOccurs="unbounded" minOccurs="0">
        +   *           <complexType>
        +   *             <complexContent>
        +   *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                 <sequence>
        +   *                   <element name="attributeName" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="2" minOccurs="0"/>
        +   *                   <element name="matcherSet" type="{www.jalview.org/colours}FeatureMatcherSet" minOccurs="0"/>
        +   *                 </sequence>
        +   *                 <attribute name="type" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *                 <attribute name="colour" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
        +   *                 <attribute name="display" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +   *                 <attribute name="order" type="{http://www.w3.org/2001/XMLSchema}float" />
        +   *                 <attribute name="mincolour" type="{http://www.w3.org/2001/XMLSchema}int" />
        +   *                 <attribute name="noValueColour" type="{www.jalview.org/colours}NoValueColour" default="Min" />
        +   *                 <attribute name="threshold" type="{http://www.w3.org/2001/XMLSchema}float" />
        +   *                 <attribute name="threshstate" type="{http://www.w3.org/2001/XMLSchema}int" />
        +   *                 <attribute name="max" type="{http://www.w3.org/2001/XMLSchema}float" />
        +   *                 <attribute name="min" type="{http://www.w3.org/2001/XMLSchema}float" />
        +   *                 <attribute name="colourByLabel" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +   *                 <attribute name="autoScale" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +   *               </restriction>
        +   *             </complexContent>
        +   *           </complexType>
        +   *         </element>
        +   *         <element name="group" maxOccurs="unbounded" minOccurs="0">
        +   *           <complexType>
        +   *             <complexContent>
        +   *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                 <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *                 <attribute name="display" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +   *               </restriction>
        +   *             </complexContent>
        +   *           </complexType>
        +   *         </element>
        +   *       </sequence>
        +   *     </restriction>
        +   *   </complexContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "setting", "group" }) + public static class FeatureSettings + { + + @XmlElement(namespace = "www.jalview.org") + protected List setting; + + @XmlElement(namespace = "www.jalview.org") + protected List group; /** - * Gets the value of the jSeq property. + * Gets the value of the setting property. * *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the jSeq property. + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the setting property. * *

        * For example, to add a new item, do as follows: + * *

        -     *    getJSeq().add(newItem);
        +     * getSetting().add(newItem);
              * 
        * * *

        * Objects of the following type(s) are allowed in the list - * {@link JalviewModelType.JSeq } + * {@link JalviewModelType.FeatureSettings.Setting } * * */ - public List getJSeq() { - if (jSeq == null) { - jSeq = new ArrayList(); - } - return this.jSeq; + public List getSetting() + { + if (setting == null) + { + setting = new ArrayList(); + } + return this.setting; } /** - * Gets the value of the jGroup property. + * Gets the value of the group property. * *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the jGroup property. + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the group property. * *

        * For example, to add a new item, do as follows: + * *

        -     *    getJGroup().add(newItem);
        +     * getGroup().add(newItem);
              * 
        * * *

        * Objects of the following type(s) are allowed in the list - * {@link JalviewModelType.JGroup } + * {@link JalviewModelType.FeatureSettings.Group } * * */ - public List getJGroup() { - if (jGroup == null) { - jGroup = new ArrayList(); - } - return this.jGroup; + public List getGroup() + { + if (group == null) + { + group = new ArrayList(); + } + return this.group; } /** - * Gets the value of the viewport property. - * *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the viewport property. + * Java class for anonymous complex type. * *

        - * For example, to add a new item, do as follows: + * The following schema fragment specifies the expected content contained + * within this class. + * *

        -     *    getViewport().add(newItem);
        +     * <complexType>
        +     *   <complexContent>
        +     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +     *       <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        +     *       <attribute name="display" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +     *     </restriction>
        +     *   </complexContent>
        +     * </complexType>
              * 
        * * - *

        - * Objects of the following type(s) are allowed in the list - * {@link JalviewModelType.Viewport } - * - * */ - public List getViewport() { - if (viewport == null) { - viewport = new ArrayList(); - } - return this.viewport; + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class Group + { + + @XmlAttribute(name = "name", required = true) + protected String name; + + @XmlAttribute(name = "display", required = true) + protected boolean display; + + /** + * Gets the value of the name property. + * + * @return possible object is {@link String } + * + */ + public String getName() + { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setName(String value) + { + this.name = value; + } + + /** + * Gets the value of the display property. + * + */ + public boolean isDisplay() + { + return display; + } + + /** + * Sets the value of the display property. + * + */ + public void setDisplay(boolean value) + { + this.display = value; + } + } /** - * Gets the value of the userColours property. - * *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the userColours property. + * Java class for anonymous complex type. * *

        - * For example, to add a new item, do as follows: + * The following schema fragment specifies the expected content contained + * within this class. + * *

        -     *    getUserColours().add(newItem);
        +     * <complexType>
        +     *   <complexContent>
        +     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +     *       <sequence>
        +     *         <element name="attributeName" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="2" minOccurs="0"/>
        +     *         <element name="matcherSet" type="{www.jalview.org/colours}FeatureMatcherSet" minOccurs="0"/>
        +     *       </sequence>
        +     *       <attribute name="type" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        +     *       <attribute name="colour" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
        +     *       <attribute name="display" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +     *       <attribute name="order" type="{http://www.w3.org/2001/XMLSchema}float" />
        +     *       <attribute name="mincolour" type="{http://www.w3.org/2001/XMLSchema}int" />
        +     *       <attribute name="noValueColour" type="{www.jalview.org/colours}NoValueColour" default="Min" />
        +     *       <attribute name="threshold" type="{http://www.w3.org/2001/XMLSchema}float" />
        +     *       <attribute name="threshstate" type="{http://www.w3.org/2001/XMLSchema}int" />
        +     *       <attribute name="max" type="{http://www.w3.org/2001/XMLSchema}float" />
        +     *       <attribute name="min" type="{http://www.w3.org/2001/XMLSchema}float" />
        +     *       <attribute name="colourByLabel" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +     *       <attribute name="autoScale" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +     *     </restriction>
        +     *   </complexContent>
        +     * </complexType>
              * 
        * * - *

        - * Objects of the following type(s) are allowed in the list - * {@link JalviewModelType.UserColours } - * - * */ - public List getUserColours() { - if (userColours == null) { - userColours = new ArrayList(); + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "attributeName", "matcherSet" }) + public static class Setting + { + + @XmlElement(namespace = "www.jalview.org") + protected List attributeName; + + @XmlElement(namespace = "www.jalview.org") + protected FeatureMatcherSet matcherSet; + + @XmlAttribute(name = "type", required = true) + protected String type; + + @XmlAttribute(name = "colour", required = true) + protected int colour; + + @XmlAttribute(name = "display", required = true) + protected boolean display; + + @XmlAttribute(name = "order") + protected Float order; + + @XmlAttribute(name = "mincolour") + protected Integer mincolour; + + @XmlAttribute(name = "noValueColour") + protected NoValueColour noValueColour; + + @XmlAttribute(name = "threshold") + protected Float threshold; + + @XmlAttribute(name = "threshstate") + protected Integer threshstate; + + @XmlAttribute(name = "max") + protected Float max; + + @XmlAttribute(name = "min") + protected Float min; + + @XmlAttribute(name = "colourByLabel") + protected Boolean colourByLabel; + + @XmlAttribute(name = "autoScale") + protected Boolean autoScale; + + /** + * Gets the value of the attributeName property. + * + *

        + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the attributeName property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +       * getAttributeName().add(newItem);
        +       * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link String + * } + * + * + */ + public List getAttributeName() + { + if (attributeName == null) + { + attributeName = new ArrayList(); + } + return this.attributeName; + } + + /** + * Gets the value of the matcherSet property. + * + * @return possible object is {@link FeatureMatcherSet } + * + */ + public FeatureMatcherSet getMatcherSet() + { + return matcherSet; + } + + /** + * Sets the value of the matcherSet property. + * + * @param value + * allowed object is {@link FeatureMatcherSet } + * + */ + public void setMatcherSet(FeatureMatcherSet value) + { + this.matcherSet = value; + } + + /** + * Gets the value of the type property. + * + * @return possible object is {@link String } + * + */ + public String getType() + { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setType(String value) + { + this.type = value; + } + + /** + * Gets the value of the colour property. + * + */ + public int getColour() + { + return colour; + } + + /** + * Sets the value of the colour property. + * + */ + public void setColour(int value) + { + this.colour = value; + } + + /** + * Gets the value of the display property. + * + */ + public boolean isDisplay() + { + return display; + } + + /** + * Sets the value of the display property. + * + */ + public void setDisplay(boolean value) + { + this.display = value; + } + + /** + * Gets the value of the order property. + * + * @return possible object is {@link Float } + * + */ + public Float getOrder() + { + return order; + } + + /** + * Sets the value of the order property. + * + * @param value + * allowed object is {@link Float } + * + */ + public void setOrder(Float value) + { + this.order = value; + } + + /** + * Gets the value of the mincolour property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getMincolour() + { + return mincolour; + } + + /** + * Sets the value of the mincolour property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setMincolour(Integer value) + { + this.mincolour = value; + } + + /** + * Gets the value of the noValueColour property. + * + * @return possible object is {@link NoValueColour } + * + */ + public NoValueColour getNoValueColour() + { + if (noValueColour == null) + { + return NoValueColour.MIN; } - return this.userColours; + else + { + return noValueColour; + } + } + + /** + * Sets the value of the noValueColour property. + * + * @param value + * allowed object is {@link NoValueColour } + * + */ + public void setNoValueColour(NoValueColour value) + { + this.noValueColour = value; + } + + /** + * Gets the value of the threshold property. + * + * @return possible object is {@link Float } + * + */ + public Float getThreshold() + { + return threshold; + } + + /** + * Sets the value of the threshold property. + * + * @param value + * allowed object is {@link Float } + * + */ + public void setThreshold(Float value) + { + this.threshold = value; + } + + /** + * Gets the value of the threshstate property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getThreshstate() + { + return threshstate; + } + + /** + * Sets the value of the threshstate property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setThreshstate(Integer value) + { + this.threshstate = value; + } + + /** + * Gets the value of the max property. + * + * @return possible object is {@link Float } + * + */ + public Float getMax() + { + return max; + } + + /** + * Sets the value of the max property. + * + * @param value + * allowed object is {@link Float } + * + */ + public void setMax(Float value) + { + this.max = value; + } + + /** + * Gets the value of the min property. + * + * @return possible object is {@link Float } + * + */ + public Float getMin() + { + return min; + } + + /** + * Sets the value of the min property. + * + * @param value + * allowed object is {@link Float } + * + */ + public void setMin(Float value) + { + this.min = value; + } + + /** + * Gets the value of the colourByLabel property. + * + * @return possible object is {@link Boolean } + * + */ + public Boolean isColourByLabel() + { + return colourByLabel; + } + + /** + * Sets the value of the colourByLabel property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setColourByLabel(Boolean value) + { + this.colourByLabel = value; + } + + /** + * Gets the value of the autoScale property. + * + * @return possible object is {@link Boolean } + * + */ + public Boolean isAutoScale() + { + return autoScale; + } + + /** + * Sets the value of the autoScale property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setAutoScale(Boolean value) + { + this.autoScale = value; + } + } + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <complexContent>
        +   *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *       <sequence>
        +   *         <element name="seq" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
        +   *         <element name="annotationColours" type="{www.jalview.org}AnnotationColourScheme" minOccurs="0"/>
        +   *       </sequence>
        +   *       <attribute name="start" type="{http://www.w3.org/2001/XMLSchema}int" />
        +   *       <attribute name="end" type="{http://www.w3.org/2001/XMLSchema}int" />
        +   *       <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *       <attribute name="colour" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *       <attribute name="consThreshold" type="{http://www.w3.org/2001/XMLSchema}int" />
        +   *       <attribute name="pidThreshold" type="{http://www.w3.org/2001/XMLSchema}int" />
        +   *       <attribute name="outlineColour" type="{http://www.w3.org/2001/XMLSchema}int" />
        +   *       <attribute name="displayBoxes" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +   *       <attribute name="displayText" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +   *       <attribute name="colourText" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +   *       <attribute name="textCol1" type="{http://www.w3.org/2001/XMLSchema}int" />
        +   *       <attribute name="textCol2" type="{http://www.w3.org/2001/XMLSchema}int" />
        +   *       <attribute name="textColThreshold" type="{http://www.w3.org/2001/XMLSchema}int" />
        +   *       <attribute name="showUnconserved" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +   *       <attribute name="ignoreGapsinConsensus" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
        +   *       <attribute name="showConsensusHistogram" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
        +   *       <attribute name="showSequenceLogo" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        +   *       <attribute name="normaliseSequenceLogo" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        +   *       <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *     </restriction>
        +   *   </complexContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "seq", "annotationColours" }) + public static class JGroup + { + + @XmlElement(namespace = "www.jalview.org", required = true) + protected List seq; + + @XmlElement(namespace = "www.jalview.org") + protected AnnotationColourScheme annotationColours; + + @XmlAttribute(name = "start") + protected Integer start; + + @XmlAttribute(name = "end") + protected Integer end; + + @XmlAttribute(name = "name") + protected String name; + + @XmlAttribute(name = "colour") + protected String colour; + + @XmlAttribute(name = "consThreshold") + protected Integer consThreshold; + + @XmlAttribute(name = "pidThreshold") + protected Integer pidThreshold; + + @XmlAttribute(name = "outlineColour") + protected Integer outlineColour; + + @XmlAttribute(name = "displayBoxes") + protected Boolean displayBoxes; + + @XmlAttribute(name = "displayText") + protected Boolean displayText; + + @XmlAttribute(name = "colourText") + protected Boolean colourText; + + @XmlAttribute(name = "textCol1") + protected Integer textCol1; + + @XmlAttribute(name = "textCol2") + protected Integer textCol2; + + @XmlAttribute(name = "textColThreshold") + protected Integer textColThreshold; + + @XmlAttribute(name = "showUnconserved") + protected Boolean showUnconserved; + + @XmlAttribute(name = "ignoreGapsinConsensus") + protected Boolean ignoreGapsinConsensus; + + @XmlAttribute(name = "showConsensusHistogram") + protected Boolean showConsensusHistogram; + + @XmlAttribute(name = "showSequenceLogo") + protected Boolean showSequenceLogo; + + @XmlAttribute(name = "normaliseSequenceLogo") + protected Boolean normaliseSequenceLogo; + + @XmlAttribute(name = "id") + protected String id; + /** - * Gets the value of the tree property. + * Gets the value of the seq property. * *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the tree property. + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the seq property. * *

        * For example, to add a new item, do as follows: + * *

        -     *    getTree().add(newItem);
        +     * getSeq().add(newItem);
              * 
        * * *

        - * Objects of the following type(s) are allowed in the list - * {@link JalviewModelType.Tree } + * Objects of the following type(s) are allowed in the list {@link String } * * */ - public List getTree() { - if (tree == null) { - tree = new ArrayList(); - } - return this.tree; + public List getSeq() + { + if (seq == null) + { + seq = new ArrayList(); + } + return this.seq; } /** - * Gets the value of the featureSettings property. + * Gets the value of the annotationColours property. + * + * @return possible object is {@link AnnotationColourScheme } * - * @return - * possible object is - * {@link JalviewModelType.FeatureSettings } - * */ - public JalviewModelType.FeatureSettings getFeatureSettings() { - return featureSettings; + public AnnotationColourScheme getAnnotationColours() + { + return annotationColours; } /** - * Sets the value of the featureSettings property. + * Sets the value of the annotationColours property. * * @param value - * allowed object is - * {@link JalviewModelType.FeatureSettings } - * + * allowed object is {@link AnnotationColourScheme } + * */ - public void setFeatureSettings(JalviewModelType.FeatureSettings value) { - this.featureSettings = value; + public void setAnnotationColours(AnnotationColourScheme value) + { + this.annotationColours = value; } - /** - *

        Java class for anonymous complex type. + * Gets the value of the start property. * - *

        The following schema fragment specifies the expected content contained within this class. + * @return possible object is {@link Integer } * - *

        -     * <complexType>
        -     *   <complexContent>
        -     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *       <sequence>
        -     *         <element name="setting" maxOccurs="unbounded" minOccurs="0">
        -     *           <complexType>
        -     *             <complexContent>
        -     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *                 <sequence>
        -     *                   <element name="attributeName" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="2" minOccurs="0"/>
        -     *                   <element name="matcherSet" type="{www.jalview.org/colours}FeatureMatcherSet" minOccurs="0"/>
        -     *                 </sequence>
        -     *                 <attribute name="type" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *                 <attribute name="colour" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
        -     *                 <attribute name="display" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -     *                 <attribute name="order" type="{http://www.w3.org/2001/XMLSchema}float" />
        -     *                 <attribute name="mincolour" type="{http://www.w3.org/2001/XMLSchema}int" />
        -     *                 <attribute name="noValueColour" type="{www.jalview.org/colours}NoValueColour" default="Min" />
        -     *                 <attribute name="threshold" type="{http://www.w3.org/2001/XMLSchema}float" />
        -     *                 <attribute name="threshstate" type="{http://www.w3.org/2001/XMLSchema}int" />
        -     *                 <attribute name="max" type="{http://www.w3.org/2001/XMLSchema}float" />
        -     *                 <attribute name="min" type="{http://www.w3.org/2001/XMLSchema}float" />
        -     *                 <attribute name="colourByLabel" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -     *                 <attribute name="autoScale" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -     *               </restriction>
        -     *             </complexContent>
        -     *           </complexType>
        -     *         </element>
        -     *         <element name="group" maxOccurs="unbounded" minOccurs="0">
        -     *           <complexType>
        -     *             <complexContent>
        -     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *                 <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *                 <attribute name="display" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -     *               </restriction>
        -     *             </complexContent>
        -     *           </complexType>
        -     *         </element>
        -     *       </sequence>
        -     *     </restriction>
        -     *   </complexContent>
        -     * </complexType>
        -     * 
        + */ + public Integer getStart() + { + return start; + } + + /** + * Sets the value of the start property. * + * @param value + * allowed object is {@link Integer } * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "setting", - "group" - }) - public static class FeatureSettings { + public void setStart(Integer value) + { + this.start = value; + } - @XmlElement(namespace = "www.jalview.org") - protected List setting; - @XmlElement(namespace = "www.jalview.org") - protected List group; + /** + * Gets the value of the end property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getEnd() + { + return end; + } - /** - * Gets the value of the setting property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the setting property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getSetting().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link JalviewModelType.FeatureSettings.Setting } - * - * - */ - public List getSetting() { - if (setting == null) { - setting = new ArrayList(); - } - return this.setting; - } + /** + * Sets the value of the end property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setEnd(Integer value) + { + this.end = value; + } - /** - * Gets the value of the group property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the group property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getGroup().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link JalviewModelType.FeatureSettings.Group } - * - * - */ - public List getGroup() { - if (group == null) { - group = new ArrayList(); - } - return this.group; - } + /** + * Gets the value of the name property. + * + * @return possible object is {@link String } + * + */ + public String getName() + { + return name; + } + /** + * Sets the value of the name property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setName(String value) + { + this.name = value; + } - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -         * <complexType>
        -         *   <complexContent>
        -         *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *       <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        -         *       <attribute name="display" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -         *     </restriction>
        -         *   </complexContent>
        -         * </complexType>
        -         * 
        - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class Group { - - @XmlAttribute(name = "name", required = true) - protected String name; - @XmlAttribute(name = "display", required = true) - protected boolean display; - - /** - * Gets the value of the name property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getName() { - return name; - } - - /** - * Sets the value of the name property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setName(String value) { - this.name = value; - } - - /** - * Gets the value of the display property. - * - */ - public boolean isDisplay() { - return display; - } - - /** - * Sets the value of the display property. - * - */ - public void setDisplay(boolean value) { - this.display = value; - } + /** + * Gets the value of the colour property. + * + * @return possible object is {@link String } + * + */ + public String getColour() + { + return colour; + } - } + /** + * Sets the value of the colour property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setColour(String value) + { + this.colour = value; + } + /** + * Gets the value of the consThreshold property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getConsThreshold() + { + return consThreshold; + } - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -         * <complexType>
        -         *   <complexContent>
        -         *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *       <sequence>
        -         *         <element name="attributeName" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="2" minOccurs="0"/>
        -         *         <element name="matcherSet" type="{www.jalview.org/colours}FeatureMatcherSet" minOccurs="0"/>
        -         *       </sequence>
        -         *       <attribute name="type" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        -         *       <attribute name="colour" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
        -         *       <attribute name="display" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -         *       <attribute name="order" type="{http://www.w3.org/2001/XMLSchema}float" />
        -         *       <attribute name="mincolour" type="{http://www.w3.org/2001/XMLSchema}int" />
        -         *       <attribute name="noValueColour" type="{www.jalview.org/colours}NoValueColour" default="Min" />
        -         *       <attribute name="threshold" type="{http://www.w3.org/2001/XMLSchema}float" />
        -         *       <attribute name="threshstate" type="{http://www.w3.org/2001/XMLSchema}int" />
        -         *       <attribute name="max" type="{http://www.w3.org/2001/XMLSchema}float" />
        -         *       <attribute name="min" type="{http://www.w3.org/2001/XMLSchema}float" />
        -         *       <attribute name="colourByLabel" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -         *       <attribute name="autoScale" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -         *     </restriction>
        -         *   </complexContent>
        -         * </complexType>
        -         * 
        - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "attributeName", - "matcherSet" - }) - public static class Setting { - - @XmlElement(namespace = "www.jalview.org") - protected List attributeName; - @XmlElement(namespace = "www.jalview.org") - protected FeatureMatcherSet matcherSet; - @XmlAttribute(name = "type", required = true) - protected String type; - @XmlAttribute(name = "colour", required = true) - protected int colour; - @XmlAttribute(name = "display", required = true) - protected boolean display; - @XmlAttribute(name = "order") - protected Float order; - @XmlAttribute(name = "mincolour") - protected Integer mincolour; - @XmlAttribute(name = "noValueColour") - protected NoValueColour noValueColour; - @XmlAttribute(name = "threshold") - protected Float threshold; - @XmlAttribute(name = "threshstate") - protected Integer threshstate; - @XmlAttribute(name = "max") - protected Float max; - @XmlAttribute(name = "min") - protected Float min; - @XmlAttribute(name = "colourByLabel") - protected Boolean colourByLabel; - @XmlAttribute(name = "autoScale") - protected Boolean autoScale; - - /** - * Gets the value of the attributeName property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the attributeName property. - * - *

        - * For example, to add a new item, do as follows: - *

        -             *    getAttributeName().add(newItem);
        -             * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link String } - * - * - */ - public List getAttributeName() { - if (attributeName == null) { - attributeName = new ArrayList(); - } - return this.attributeName; - } - - /** - * Gets the value of the matcherSet property. - * - * @return - * possible object is - * {@link FeatureMatcherSet } - * - */ - public FeatureMatcherSet getMatcherSet() { - return matcherSet; - } - - /** - * Sets the value of the matcherSet property. - * - * @param value - * allowed object is - * {@link FeatureMatcherSet } - * - */ - public void setMatcherSet(FeatureMatcherSet value) { - this.matcherSet = value; - } - - /** - * Gets the value of the type property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getType() { - return type; - } - - /** - * Sets the value of the type property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setType(String value) { - this.type = value; - } - - /** - * Gets the value of the colour property. - * - */ - public int getColour() { - return colour; - } - - /** - * Sets the value of the colour property. - * - */ - public void setColour(int value) { - this.colour = value; - } - - /** - * Gets the value of the display property. - * - */ - public boolean isDisplay() { - return display; - } - - /** - * Sets the value of the display property. - * - */ - public void setDisplay(boolean value) { - this.display = value; - } - - /** - * Gets the value of the order property. - * - * @return - * possible object is - * {@link Float } - * - */ - public Float getOrder() { - return order; - } - - /** - * Sets the value of the order property. - * - * @param value - * allowed object is - * {@link Float } - * - */ - public void setOrder(Float value) { - this.order = value; - } - - /** - * Gets the value of the mincolour property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getMincolour() { - return mincolour; - } - - /** - * Sets the value of the mincolour property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setMincolour(Integer value) { - this.mincolour = value; - } - - /** - * Gets the value of the noValueColour property. - * - * @return - * possible object is - * {@link NoValueColour } - * - */ - public NoValueColour getNoValueColour() { - if (noValueColour == null) { - return NoValueColour.MIN; - } else { - return noValueColour; - } - } - - /** - * Sets the value of the noValueColour property. - * - * @param value - * allowed object is - * {@link NoValueColour } - * - */ - public void setNoValueColour(NoValueColour value) { - this.noValueColour = value; - } - - /** - * Gets the value of the threshold property. - * - * @return - * possible object is - * {@link Float } - * - */ - public Float getThreshold() { - return threshold; - } - - /** - * Sets the value of the threshold property. - * - * @param value - * allowed object is - * {@link Float } - * - */ - public void setThreshold(Float value) { - this.threshold = value; - } - - /** - * Gets the value of the threshstate property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getThreshstate() { - return threshstate; - } - - /** - * Sets the value of the threshstate property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setThreshstate(Integer value) { - this.threshstate = value; - } - - /** - * Gets the value of the max property. - * - * @return - * possible object is - * {@link Float } - * - */ - public Float getMax() { - return max; - } - - /** - * Sets the value of the max property. - * - * @param value - * allowed object is - * {@link Float } - * - */ - public void setMax(Float value) { - this.max = value; - } - - /** - * Gets the value of the min property. - * - * @return - * possible object is - * {@link Float } - * - */ - public Float getMin() { - return min; - } - - /** - * Sets the value of the min property. - * - * @param value - * allowed object is - * {@link Float } - * - */ - public void setMin(Float value) { - this.min = value; - } - - /** - * Gets the value of the colourByLabel property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public Boolean isColourByLabel() { - return colourByLabel; - } - - /** - * Sets the value of the colourByLabel property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setColourByLabel(Boolean value) { - this.colourByLabel = value; - } - - /** - * Gets the value of the autoScale property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public Boolean isAutoScale() { - return autoScale; - } - - /** - * Sets the value of the autoScale property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setAutoScale(Boolean value) { - this.autoScale = value; - } + /** + * Sets the value of the consThreshold property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setConsThreshold(Integer value) + { + this.consThreshold = value; + } - } + /** + * Gets the value of the pidThreshold property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getPidThreshold() + { + return pidThreshold; + } + /** + * Sets the value of the pidThreshold property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setPidThreshold(Integer value) + { + this.pidThreshold = value; } + /** + * Gets the value of the outlineColour property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getOutlineColour() + { + return outlineColour; + } /** - *

        Java class for anonymous complex type. + * Sets the value of the outlineColour property. * - *

        The following schema fragment specifies the expected content contained within this class. + * @param value + * allowed object is {@link Integer } * - *

        -     * <complexType>
        -     *   <complexContent>
        -     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *       <sequence>
        -     *         <element name="seq" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
        -     *         <element name="annotationColours" type="{www.jalview.org}AnnotationColourScheme" minOccurs="0"/>
        -     *       </sequence>
        -     *       <attribute name="start" type="{http://www.w3.org/2001/XMLSchema}int" />
        -     *       <attribute name="end" type="{http://www.w3.org/2001/XMLSchema}int" />
        -     *       <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *       <attribute name="colour" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *       <attribute name="consThreshold" type="{http://www.w3.org/2001/XMLSchema}int" />
        -     *       <attribute name="pidThreshold" type="{http://www.w3.org/2001/XMLSchema}int" />
        -     *       <attribute name="outlineColour" type="{http://www.w3.org/2001/XMLSchema}int" />
        -     *       <attribute name="displayBoxes" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -     *       <attribute name="displayText" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -     *       <attribute name="colourText" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -     *       <attribute name="textCol1" type="{http://www.w3.org/2001/XMLSchema}int" />
        -     *       <attribute name="textCol2" type="{http://www.w3.org/2001/XMLSchema}int" />
        -     *       <attribute name="textColThreshold" type="{http://www.w3.org/2001/XMLSchema}int" />
        -     *       <attribute name="showUnconserved" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -     *       <attribute name="ignoreGapsinConsensus" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
        -     *       <attribute name="showConsensusHistogram" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
        -     *       <attribute name="showSequenceLogo" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        -     *       <attribute name="normaliseSequenceLogo" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        -     *       <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *     </restriction>
        -     *   </complexContent>
        -     * </complexType>
        -     * 
        + */ + public void setOutlineColour(Integer value) + { + this.outlineColour = value; + } + + /** + * Gets the value of the displayBoxes property. * + * @return possible object is {@link Boolean } * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "seq", - "annotationColours" - }) - public static class JGroup { - - @XmlElement(namespace = "www.jalview.org", required = true) - protected List seq; - @XmlElement(namespace = "www.jalview.org") - protected AnnotationColourScheme annotationColours; - @XmlAttribute(name = "start") - protected Integer start; - @XmlAttribute(name = "end") - protected Integer end; - @XmlAttribute(name = "name") - protected String name; - @XmlAttribute(name = "colour") - protected String colour; - @XmlAttribute(name = "consThreshold") - protected Integer consThreshold; - @XmlAttribute(name = "pidThreshold") - protected Integer pidThreshold; - @XmlAttribute(name = "outlineColour") - protected Integer outlineColour; - @XmlAttribute(name = "displayBoxes") - protected Boolean displayBoxes; - @XmlAttribute(name = "displayText") - protected Boolean displayText; - @XmlAttribute(name = "colourText") - protected Boolean colourText; - @XmlAttribute(name = "textCol1") - protected Integer textCol1; - @XmlAttribute(name = "textCol2") - protected Integer textCol2; - @XmlAttribute(name = "textColThreshold") - protected Integer textColThreshold; - @XmlAttribute(name = "showUnconserved") - protected Boolean showUnconserved; - @XmlAttribute(name = "ignoreGapsinConsensus") - protected Boolean ignoreGapsinConsensus; - @XmlAttribute(name = "showConsensusHistogram") - protected Boolean showConsensusHistogram; - @XmlAttribute(name = "showSequenceLogo") - protected Boolean showSequenceLogo; - @XmlAttribute(name = "normaliseSequenceLogo") - protected Boolean normaliseSequenceLogo; - @XmlAttribute(name = "id") - protected String id; + public Boolean isDisplayBoxes() + { + return displayBoxes; + } - /** - * Gets the value of the seq property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the seq property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getSeq().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link String } - * - * - */ - public List getSeq() { - if (seq == null) { - seq = new ArrayList(); - } - return this.seq; - } + /** + * Sets the value of the displayBoxes property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setDisplayBoxes(Boolean value) + { + this.displayBoxes = value; + } - /** - * Gets the value of the annotationColours property. - * - * @return - * possible object is - * {@link AnnotationColourScheme } - * - */ - public AnnotationColourScheme getAnnotationColours() { - return annotationColours; - } + /** + * Gets the value of the displayText property. + * + * @return possible object is {@link Boolean } + * + */ + public Boolean isDisplayText() + { + return displayText; + } - /** - * Sets the value of the annotationColours property. - * - * @param value - * allowed object is - * {@link AnnotationColourScheme } - * - */ - public void setAnnotationColours(AnnotationColourScheme value) { - this.annotationColours = value; - } + /** + * Sets the value of the displayText property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setDisplayText(Boolean value) + { + this.displayText = value; + } - /** - * Gets the value of the start property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getStart() { - return start; - } + /** + * Gets the value of the colourText property. + * + * @return possible object is {@link Boolean } + * + */ + public Boolean isColourText() + { + return colourText; + } - /** - * Sets the value of the start property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setStart(Integer value) { - this.start = value; - } - - /** - * Gets the value of the end property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getEnd() { - return end; - } - - /** - * Sets the value of the end property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setEnd(Integer value) { - this.end = value; - } - - /** - * Gets the value of the name property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getName() { - return name; - } + /** + * Sets the value of the colourText property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setColourText(Boolean value) + { + this.colourText = value; + } - /** - * Sets the value of the name property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setName(String value) { - this.name = value; - } + /** + * Gets the value of the textCol1 property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getTextCol1() + { + return textCol1; + } - /** - * Gets the value of the colour property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getColour() { - return colour; - } + /** + * Sets the value of the textCol1 property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setTextCol1(Integer value) + { + this.textCol1 = value; + } - /** - * Sets the value of the colour property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setColour(String value) { - this.colour = value; - } + /** + * Gets the value of the textCol2 property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getTextCol2() + { + return textCol2; + } - /** - * Gets the value of the consThreshold property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getConsThreshold() { - return consThreshold; - } + /** + * Sets the value of the textCol2 property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setTextCol2(Integer value) + { + this.textCol2 = value; + } - /** - * Sets the value of the consThreshold property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setConsThreshold(Integer value) { - this.consThreshold = value; - } + /** + * Gets the value of the textColThreshold property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getTextColThreshold() + { + return textColThreshold; + } - /** - * Gets the value of the pidThreshold property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getPidThreshold() { - return pidThreshold; - } + /** + * Sets the value of the textColThreshold property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setTextColThreshold(Integer value) + { + this.textColThreshold = value; + } - /** - * Sets the value of the pidThreshold property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setPidThreshold(Integer value) { - this.pidThreshold = value; - } + /** + * Gets the value of the showUnconserved property. + * + * @return possible object is {@link Boolean } + * + */ + public Boolean isShowUnconserved() + { + return showUnconserved; + } - /** - * Gets the value of the outlineColour property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getOutlineColour() { - return outlineColour; - } + /** + * Sets the value of the showUnconserved property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setShowUnconserved(Boolean value) + { + this.showUnconserved = value; + } - /** - * Sets the value of the outlineColour property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setOutlineColour(Integer value) { - this.outlineColour = value; - } + /** + * Gets the value of the ignoreGapsinConsensus property. + * + * @return possible object is {@link Boolean } + * + */ + public boolean isIgnoreGapsinConsensus() + { + if (ignoreGapsinConsensus == null) + { + return true; + } + else + { + return ignoreGapsinConsensus; + } + } - /** - * Gets the value of the displayBoxes property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public Boolean isDisplayBoxes() { - return displayBoxes; - } + /** + * Sets the value of the ignoreGapsinConsensus property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setIgnoreGapsinConsensus(Boolean value) + { + this.ignoreGapsinConsensus = value; + } - /** - * Sets the value of the displayBoxes property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setDisplayBoxes(Boolean value) { - this.displayBoxes = value; - } + /** + * Gets the value of the showConsensusHistogram property. + * + * @return possible object is {@link Boolean } + * + */ + public boolean isShowConsensusHistogram() + { + if (showConsensusHistogram == null) + { + return true; + } + else + { + return showConsensusHistogram; + } + } - /** - * Gets the value of the displayText property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public Boolean isDisplayText() { - return displayText; - } + /** + * Sets the value of the showConsensusHistogram property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setShowConsensusHistogram(Boolean value) + { + this.showConsensusHistogram = value; + } - /** - * Sets the value of the displayText property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setDisplayText(Boolean value) { - this.displayText = value; - } + /** + * Gets the value of the showSequenceLogo property. + * + * @return possible object is {@link Boolean } + * + */ + public boolean isShowSequenceLogo() + { + if (showSequenceLogo == null) + { + return false; + } + else + { + return showSequenceLogo; + } + } - /** - * Gets the value of the colourText property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public Boolean isColourText() { - return colourText; - } + /** + * Sets the value of the showSequenceLogo property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setShowSequenceLogo(Boolean value) + { + this.showSequenceLogo = value; + } - /** - * Sets the value of the colourText property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setColourText(Boolean value) { - this.colourText = value; - } + /** + * Gets the value of the normaliseSequenceLogo property. + * + * @return possible object is {@link Boolean } + * + */ + public boolean isNormaliseSequenceLogo() + { + if (normaliseSequenceLogo == null) + { + return false; + } + else + { + return normaliseSequenceLogo; + } + } - /** - * Gets the value of the textCol1 property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getTextCol1() { - return textCol1; - } + /** + * Sets the value of the normaliseSequenceLogo property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setNormaliseSequenceLogo(Boolean value) + { + this.normaliseSequenceLogo = value; + } - /** - * Sets the value of the textCol1 property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setTextCol1(Integer value) { - this.textCol1 = value; - } + /** + * Gets the value of the id property. + * + * @return possible object is {@link String } + * + */ + public String getId() + { + return id; + } - /** - * Gets the value of the textCol2 property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getTextCol2() { - return textCol2; - } + /** + * Sets the value of the id property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setId(String value) + { + this.id = value; + } - /** - * Sets the value of the textCol2 property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setTextCol2(Integer value) { - this.textCol2 = value; - } + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <complexContent>
        +   *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *       <sequence>
        +   *         <element name="features" type="{www.jalview.org}feature" maxOccurs="unbounded" minOccurs="0"/>
        +   *         <element name="pdbids" maxOccurs="unbounded" minOccurs="0">
        +   *           <complexType>
        +   *             <complexContent>
        +   *               <extension base="{www.jalview.org}pdbentry">
        +   *                 <sequence>
        +   *                   <element name="structureState" maxOccurs="unbounded" minOccurs="0">
        +   *                     <complexType>
        +   *                       <simpleContent>
        +   *                         <extension base="<http://www.w3.org/2001/XMLSchema>string">
        +   *                           <attGroup ref="{www.jalview.org}swingwindow"/>
        +   *                           <attribute name="visible" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +   *                           <attribute name="viewId" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *                           <attribute name="alignwithAlignPanel" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
        +   *                           <attribute name="colourwithAlignPanel" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        +   *                           <attribute name="colourByJmol" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
        +   *                           <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *                         </extension>
        +   *                       </simpleContent>
        +   *                     </complexType>
        +   *                   </element>
        +   *                 </sequence>
        +   *               </extension>
        +   *             </complexContent>
        +   *           </complexType>
        +   *         </element>
        +   *         <element name="hiddenSequences" type="{http://www.w3.org/2001/XMLSchema}int" maxOccurs="unbounded" minOccurs="0"/>
        +   *         <element name="rnaViewer" maxOccurs="unbounded" minOccurs="0">
        +   *           <complexType>
        +   *             <complexContent>
        +   *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                 <sequence>
        +   *                   <element name="secondaryStructure" maxOccurs="unbounded">
        +   *                     <complexType>
        +   *                       <complexContent>
        +   *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                           <attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *                           <attribute name="annotationId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *                           <attribute name="gapped" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +   *                           <attribute name="viewerState" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *                         </restriction>
        +   *                       </complexContent>
        +   *                     </complexType>
        +   *                   </element>
        +   *                 </sequence>
        +   *                 <attGroup ref="{www.jalview.org}swingwindow"/>
        +   *                 <attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *                 <attribute name="viewId" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *                 <attribute name="dividerLocation" type="{http://www.w3.org/2001/XMLSchema}int" />
        +   *                 <attribute name="selectedRna" type="{http://www.w3.org/2001/XMLSchema}int" />
        +   *               </restriction>
        +   *             </complexContent>
        +   *           </complexType>
        +   *         </element>
        +   *       </sequence>
        +   *       <attribute name="colour" type="{http://www.w3.org/2001/XMLSchema}int" />
        +   *       <attribute name="start" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
        +   *       <attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
        +   *       <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *       <attribute name="hidden" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +   *       <attribute name="viewreference" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +   *     </restriction>
        +   *   </complexContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType( + name = "", + propOrder = + { "features", "pdbids", "hiddenSequences", "rnaViewer" }) + public static class JSeq + { + + @XmlElement(namespace = "www.jalview.org") + protected List features; + + @XmlElement(namespace = "www.jalview.org") + protected List pdbids; + + @XmlElement(namespace = "www.jalview.org", type = Integer.class) + protected List hiddenSequences; + + @XmlElement(namespace = "www.jalview.org") + protected List rnaViewer; + + @XmlAttribute(name = "colour") + protected Integer colour; + + @XmlAttribute(name = "start", required = true) + protected int start; + + @XmlAttribute(name = "end", required = true) + protected int end; + + @XmlAttribute(name = "id", required = true) + protected String id; + + @XmlAttribute(name = "hidden") + protected Boolean hidden; + + @XmlAttribute(name = "viewreference") + protected Boolean viewreference; - /** - * Gets the value of the textColThreshold property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getTextColThreshold() { - return textColThreshold; - } + /** + * Gets the value of the features property. + * + *

        + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the features property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +     * getFeatures().add(newItem);
        +     * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link Feature } + * + * + */ + public List getFeatures() + { + if (features == null) + { + features = new ArrayList(); + } + return this.features; + } - /** - * Sets the value of the textColThreshold property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setTextColThreshold(Integer value) { - this.textColThreshold = value; - } + /** + * Gets the value of the pdbids property. + * + *

        + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the pdbids property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +     * getPdbids().add(newItem);
        +     * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link JalviewModelType.JSeq.Pdbids } + * + * + */ + public List getPdbids() + { + if (pdbids == null) + { + pdbids = new ArrayList(); + } + return this.pdbids; + } - /** - * Gets the value of the showUnconserved property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public Boolean isShowUnconserved() { - return showUnconserved; - } + /** + * Gets the value of the hiddenSequences property. + * + *

        + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the hiddenSequences property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +     * getHiddenSequences().add(newItem);
        +     * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link Integer } + * + * + */ + public List getHiddenSequences() + { + if (hiddenSequences == null) + { + hiddenSequences = new ArrayList(); + } + return this.hiddenSequences; + } - /** - * Sets the value of the showUnconserved property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setShowUnconserved(Boolean value) { - this.showUnconserved = value; - } + /** + * Gets the value of the rnaViewer property. + * + *

        + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the rnaViewer property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +     * getRnaViewer().add(newItem);
        +     * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link JalviewModelType.JSeq.RnaViewer } + * + * + */ + public List getRnaViewer() + { + if (rnaViewer == null) + { + rnaViewer = new ArrayList(); + } + return this.rnaViewer; + } - /** - * Gets the value of the ignoreGapsinConsensus property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public boolean isIgnoreGapsinConsensus() { - if (ignoreGapsinConsensus == null) { - return true; - } else { - return ignoreGapsinConsensus; - } - } + /** + * Gets the value of the colour property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getColour() + { + return colour; + } - /** - * Sets the value of the ignoreGapsinConsensus property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setIgnoreGapsinConsensus(Boolean value) { - this.ignoreGapsinConsensus = value; - } + /** + * Sets the value of the colour property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setColour(Integer value) + { + this.colour = value; + } - /** - * Gets the value of the showConsensusHistogram property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public boolean isShowConsensusHistogram() { - if (showConsensusHistogram == null) { - return true; - } else { - return showConsensusHistogram; - } - } + /** + * Gets the value of the start property. + * + */ + public int getStart() + { + return start; + } - /** - * Sets the value of the showConsensusHistogram property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setShowConsensusHistogram(Boolean value) { - this.showConsensusHistogram = value; - } + /** + * Sets the value of the start property. + * + */ + public void setStart(int value) + { + this.start = value; + } - /** - * Gets the value of the showSequenceLogo property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public boolean isShowSequenceLogo() { - if (showSequenceLogo == null) { - return false; - } else { - return showSequenceLogo; - } - } + /** + * Gets the value of the end property. + * + */ + public int getEnd() + { + return end; + } - /** - * Sets the value of the showSequenceLogo property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setShowSequenceLogo(Boolean value) { - this.showSequenceLogo = value; - } + /** + * Sets the value of the end property. + * + */ + public void setEnd(int value) + { + this.end = value; + } - /** - * Gets the value of the normaliseSequenceLogo property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public boolean isNormaliseSequenceLogo() { - if (normaliseSequenceLogo == null) { - return false; - } else { - return normaliseSequenceLogo; - } - } + /** + * Gets the value of the id property. + * + * @return possible object is {@link String } + * + */ + public String getId() + { + return id; + } - /** - * Sets the value of the normaliseSequenceLogo property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setNormaliseSequenceLogo(Boolean value) { - this.normaliseSequenceLogo = value; - } + /** + * Sets the value of the id property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setId(String value) + { + this.id = value; + } - /** - * Gets the value of the id property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getId() { - return id; - } + /** + * Gets the value of the hidden property. + * + * @return possible object is {@link Boolean } + * + */ + public Boolean isHidden() + { + return hidden; + } - /** - * Sets the value of the id property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setId(String value) { - this.id = value; - } + /** + * Sets the value of the hidden property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setHidden(Boolean value) + { + this.hidden = value; + } + /** + * Gets the value of the viewreference property. + * + * @return possible object is {@link Boolean } + * + */ + public Boolean isViewreference() + { + return viewreference; } + /** + * Sets the value of the viewreference property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setViewreference(Boolean value) + { + this.viewreference = value; + } /** - *

        Java class for anonymous complex type. + *

        + * Java class for anonymous complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained + * within this class. * *

              * <complexType>
              *   <complexContent>
        -     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +     *     <extension base="{www.jalview.org}pdbentry">
              *       <sequence>
        -     *         <element name="features" type="{www.jalview.org}feature" maxOccurs="unbounded" minOccurs="0"/>
        -     *         <element name="pdbids" maxOccurs="unbounded" minOccurs="0">
        -     *           <complexType>
        -     *             <complexContent>
        -     *               <extension base="{www.jalview.org}pdbentry">
        -     *                 <sequence>
        -     *                   <element name="structureState" maxOccurs="unbounded" minOccurs="0">
        -     *                     <complexType>
        -     *                       <simpleContent>
        -     *                         <extension base="<http://www.w3.org/2001/XMLSchema>string">
        -     *                           <attGroup ref="{www.jalview.org}swingwindow"/>
        -     *                           <attribute name="visible" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -     *                           <attribute name="viewId" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *                           <attribute name="alignwithAlignPanel" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
        -     *                           <attribute name="colourwithAlignPanel" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        -     *                           <attribute name="colourByJmol" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
        -     *                           <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *                         </extension>
        -     *                       </simpleContent>
        -     *                     </complexType>
        -     *                   </element>
        -     *                 </sequence>
        -     *               </extension>
        -     *             </complexContent>
        -     *           </complexType>
        -     *         </element>
        -     *         <element name="hiddenSequences" type="{http://www.w3.org/2001/XMLSchema}int" maxOccurs="unbounded" minOccurs="0"/>
        -     *         <element name="rnaViewer" maxOccurs="unbounded" minOccurs="0">
        +     *         <element name="structureState" maxOccurs="unbounded" minOccurs="0">
              *           <complexType>
        -     *             <complexContent>
        -     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *                 <sequence>
        -     *                   <element name="secondaryStructure" maxOccurs="unbounded">
        -     *                     <complexType>
        -     *                       <complexContent>
        -     *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *                           <attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *                           <attribute name="annotationId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *                           <attribute name="gapped" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -     *                           <attribute name="viewerState" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *                         </restriction>
        -     *                       </complexContent>
        -     *                     </complexType>
        -     *                   </element>
        -     *                 </sequence>
        +     *             <simpleContent>
        +     *               <extension base="<http://www.w3.org/2001/XMLSchema>string">
              *                 <attGroup ref="{www.jalview.org}swingwindow"/>
        -     *                 <attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" />
        +     *                 <attribute name="visible" type="{http://www.w3.org/2001/XMLSchema}boolean" />
              *                 <attribute name="viewId" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *                 <attribute name="dividerLocation" type="{http://www.w3.org/2001/XMLSchema}int" />
        -     *                 <attribute name="selectedRna" type="{http://www.w3.org/2001/XMLSchema}int" />
        -     *               </restriction>
        -     *             </complexContent>
        +     *                 <attribute name="alignwithAlignPanel" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
        +     *                 <attribute name="colourwithAlignPanel" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        +     *                 <attribute name="colourByJmol" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
        +     *                 <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
        +     *               </extension>
        +     *             </simpleContent>
              *           </complexType>
              *         </element>
              *       </sequence>
        -     *       <attribute name="colour" type="{http://www.w3.org/2001/XMLSchema}int" />
        -     *       <attribute name="start" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
        -     *       <attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
        -     *       <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *       <attribute name="hidden" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -     *       <attribute name="viewreference" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -     *     </restriction>
        +     *     </extension>
              *   </complexContent>
              * </complexType>
              * 
        @@ -1866,1129 +2250,418 @@ public class JalviewModelType { * */ @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "features", - "pdbids", - "hiddenSequences", - "rnaViewer" - }) - public static class JSeq { - - @XmlElement(namespace = "www.jalview.org") - protected List features; - @XmlElement(namespace = "www.jalview.org") - protected List pdbids; - @XmlElement(namespace = "www.jalview.org", type = Integer.class) - protected List hiddenSequences; - @XmlElement(namespace = "www.jalview.org") - protected List rnaViewer; - @XmlAttribute(name = "colour") - protected Integer colour; - @XmlAttribute(name = "start", required = true) - protected int start; - @XmlAttribute(name = "end", required = true) - protected int end; - @XmlAttribute(name = "id", required = true) - protected String id; - @XmlAttribute(name = "hidden") - protected Boolean hidden; - @XmlAttribute(name = "viewreference") - protected Boolean viewreference; + @XmlType(name = "", propOrder = { "structureState" }) + public static class Pdbids extends Pdbentry + { + + @XmlElement(namespace = "www.jalview.org") + protected List structureState; + + /** + * Gets the value of the structureState property. + * + *

        + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the structureState property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +       * getStructureState().add(newItem);
        +       * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link JalviewModelType.JSeq.Pdbids.StructureState } + * + * + */ + public List getStructureState() + { + if (structureState == null) + { + structureState = new ArrayList(); + } + return this.structureState; + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +       * <complexType>
        +       *   <simpleContent>
        +       *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
        +       *       <attGroup ref="{www.jalview.org}swingwindow"/>
        +       *       <attribute name="visible" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +       *       <attribute name="viewId" type="{http://www.w3.org/2001/XMLSchema}string" />
        +       *       <attribute name="alignwithAlignPanel" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
        +       *       <attribute name="colourwithAlignPanel" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        +       *       <attribute name="colourByJmol" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
        +       *       <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
        +       *     </extension>
        +       *   </simpleContent>
        +       * </complexType>
        +       * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "value" }) + public static class StructureState + { + + @XmlValue + protected String value; + + @XmlAttribute(name = "visible") + protected Boolean visible; + + @XmlAttribute(name = "viewId") + protected String viewId; + + @XmlAttribute(name = "alignwithAlignPanel") + protected Boolean alignwithAlignPanel; + + @XmlAttribute(name = "colourwithAlignPanel") + protected Boolean colourwithAlignPanel; + + @XmlAttribute(name = "colourByJmol") + protected Boolean colourByJmol; + + @XmlAttribute(name = "type") + protected String type; + + @XmlAttribute(name = "width") + protected Integer width; + + @XmlAttribute(name = "height") + protected Integer height; + + @XmlAttribute(name = "xpos") + protected Integer xpos; + + @XmlAttribute(name = "ypos") + protected Integer ypos; /** - * Gets the value of the features property. + * Gets the value of the value property. * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the features property. + * @return possible object is {@link String } * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getFeatures().add(newItem);
        -         * 
        + */ + public String getValue() + { + return value; + } + + /** + * Sets the value of the value property. * + * @param value + * allowed object is {@link String } * - *

        - * Objects of the following type(s) are allowed in the list - * {@link Feature } + */ + public void setValue(String value) + { + this.value = value; + } + + /** + * Gets the value of the visible property. * + * @return possible object is {@link Boolean } * */ - public List getFeatures() { - if (features == null) { - features = new ArrayList(); - } - return this.features; + public Boolean isVisible() + { + return visible; } /** - * Gets the value of the pdbids property. + * Sets the value of the visible property. * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the pdbids property. + * @param value + * allowed object is {@link Boolean } * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getPdbids().add(newItem);
        -         * 
        + */ + public void setVisible(Boolean value) + { + this.visible = value; + } + + /** + * Gets the value of the viewId property. * + * @return possible object is {@link String } * - *

        - * Objects of the following type(s) are allowed in the list - * {@link JalviewModelType.JSeq.Pdbids } + */ + public String getViewId() + { + return viewId; + } + + /** + * Sets the value of the viewId property. * + * @param value + * allowed object is {@link String } * */ - public List getPdbids() { - if (pdbids == null) { - pdbids = new ArrayList(); - } - return this.pdbids; + public void setViewId(String value) + { + this.viewId = value; } /** - * Gets the value of the hiddenSequences property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the hiddenSequences property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getHiddenSequences().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link Integer } + * Gets the value of the alignwithAlignPanel property. * + * @return possible object is {@link Boolean } * */ - public List getHiddenSequences() { - if (hiddenSequences == null) { - hiddenSequences = new ArrayList(); - } - return this.hiddenSequences; + public boolean isAlignwithAlignPanel() + { + if (alignwithAlignPanel == null) + { + return true; + } + else + { + return alignwithAlignPanel; + } } /** - * Gets the value of the rnaViewer property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the rnaViewer property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getRnaViewer().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link JalviewModelType.JSeq.RnaViewer } + * Sets the value of the alignwithAlignPanel property. * + * @param value + * allowed object is {@link Boolean } * */ - public List getRnaViewer() { - if (rnaViewer == null) { - rnaViewer = new ArrayList(); - } - return this.rnaViewer; + public void setAlignwithAlignPanel(Boolean value) + { + this.alignwithAlignPanel = value; } /** - * Gets the value of the colour property. + * Gets the value of the colourwithAlignPanel property. + * + * @return possible object is {@link Boolean } * - * @return - * possible object is - * {@link Integer } - * */ - public Integer getColour() { - return colour; + public boolean isColourwithAlignPanel() + { + if (colourwithAlignPanel == null) + { + return false; + } + else + { + return colourwithAlignPanel; + } } /** - * Sets the value of the colour property. + * Sets the value of the colourwithAlignPanel property. * * @param value - * allowed object is - * {@link Integer } - * + * allowed object is {@link Boolean } + * */ - public void setColour(Integer value) { - this.colour = value; + public void setColourwithAlignPanel(Boolean value) + { + this.colourwithAlignPanel = value; } /** - * Gets the value of the start property. + * Gets the value of the colourByJmol property. + * + * @return possible object is {@link Boolean } * */ - public int getStart() { - return start; + public boolean isColourByJmol() + { + if (colourByJmol == null) + { + return true; + } + else + { + return colourByJmol; + } } /** - * Sets the value of the start property. + * Sets the value of the colourByJmol property. + * + * @param value + * allowed object is {@link Boolean } * */ - public void setStart(int value) { - this.start = value; + public void setColourByJmol(Boolean value) + { + this.colourByJmol = value; } /** - * Gets the value of the end property. + * Gets the value of the type property. + * + * @return possible object is {@link String } * */ - public int getEnd() { - return end; + public String getType() + { + return type; } /** - * Sets the value of the end property. + * Sets the value of the type property. + * + * @param value + * allowed object is {@link String } * */ - public void setEnd(int value) { - this.end = value; + public void setType(String value) + { + this.type = value; } /** - * Gets the value of the id property. + * Gets the value of the width property. + * + * @return possible object is {@link Integer } * - * @return - * possible object is - * {@link String } - * */ - public String getId() { - return id; + public Integer getWidth() + { + return width; } /** - * Sets the value of the id property. + * Sets the value of the width property. * * @param value - * allowed object is - * {@link String } - * + * allowed object is {@link Integer } + * */ - public void setId(String value) { - this.id = value; + public void setWidth(Integer value) + { + this.width = value; } /** - * Gets the value of the hidden property. + * Gets the value of the height property. + * + * @return possible object is {@link Integer } * - * @return - * possible object is - * {@link Boolean } - * */ - public Boolean isHidden() { - return hidden; + public Integer getHeight() + { + return height; } /** - * Sets the value of the hidden property. + * Sets the value of the height property. * * @param value - * allowed object is - * {@link Boolean } - * + * allowed object is {@link Integer } + * */ - public void setHidden(Boolean value) { - this.hidden = value; + public void setHeight(Integer value) + { + this.height = value; } /** - * Gets the value of the viewreference property. + * Gets the value of the xpos property. + * + * @return possible object is {@link Integer } * - * @return - * possible object is - * {@link Boolean } - * */ - public Boolean isViewreference() { - return viewreference; + public Integer getXpos() + { + return xpos; } /** - * Sets the value of the viewreference property. + * Sets the value of the xpos property. * * @param value - * allowed object is - * {@link Boolean } - * + * allowed object is {@link Integer } + * */ - public void setViewreference(Boolean value) { - this.viewreference = value; + public void setXpos(Integer value) + { + this.xpos = value; } - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -         * <complexType>
        -         *   <complexContent>
        -         *     <extension base="{www.jalview.org}pdbentry">
        -         *       <sequence>
        -         *         <element name="structureState" maxOccurs="unbounded" minOccurs="0">
        -         *           <complexType>
        -         *             <simpleContent>
        -         *               <extension base="<http://www.w3.org/2001/XMLSchema>string">
        -         *                 <attGroup ref="{www.jalview.org}swingwindow"/>
        -         *                 <attribute name="visible" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -         *                 <attribute name="viewId" type="{http://www.w3.org/2001/XMLSchema}string" />
        -         *                 <attribute name="alignwithAlignPanel" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
        -         *                 <attribute name="colourwithAlignPanel" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        -         *                 <attribute name="colourByJmol" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
        -         *                 <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
        -         *               </extension>
        -         *             </simpleContent>
        -         *           </complexType>
        -         *         </element>
        -         *       </sequence>
        -         *     </extension>
        -         *   </complexContent>
        -         * </complexType>
        -         * 
        + * Gets the value of the ypos property. * + * @return possible object is {@link Integer } * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "structureState" - }) - public static class Pdbids - extends Pdbentry + public Integer getYpos() { - - @XmlElement(namespace = "www.jalview.org") - protected List structureState; - - /** - * Gets the value of the structureState property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the structureState property. - * - *

        - * For example, to add a new item, do as follows: - *

        -             *    getStructureState().add(newItem);
        -             * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link JalviewModelType.JSeq.Pdbids.StructureState } - * - * - */ - public List getStructureState() { - if (structureState == null) { - structureState = new ArrayList(); - } - return this.structureState; - } - - - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -             * <complexType>
        -             *   <simpleContent>
        -             *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
        -             *       <attGroup ref="{www.jalview.org}swingwindow"/>
        -             *       <attribute name="visible" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -             *       <attribute name="viewId" type="{http://www.w3.org/2001/XMLSchema}string" />
        -             *       <attribute name="alignwithAlignPanel" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
        -             *       <attribute name="colourwithAlignPanel" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        -             *       <attribute name="colourByJmol" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
        -             *       <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
        -             *     </extension>
        -             *   </simpleContent>
        -             * </complexType>
        -             * 
        - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "value" - }) - public static class StructureState { - - @XmlValue - protected String value; - @XmlAttribute(name = "visible") - protected Boolean visible; - @XmlAttribute(name = "viewId") - protected String viewId; - @XmlAttribute(name = "alignwithAlignPanel") - protected Boolean alignwithAlignPanel; - @XmlAttribute(name = "colourwithAlignPanel") - protected Boolean colourwithAlignPanel; - @XmlAttribute(name = "colourByJmol") - protected Boolean colourByJmol; - @XmlAttribute(name = "type") - protected String type; - @XmlAttribute(name = "width") - protected Integer width; - @XmlAttribute(name = "height") - protected Integer height; - @XmlAttribute(name = "xpos") - protected Integer xpos; - @XmlAttribute(name = "ypos") - protected Integer ypos; - - /** - * Gets the value of the value property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the visible property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public Boolean isVisible() { - return visible; - } - - /** - * Sets the value of the visible property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setVisible(Boolean value) { - this.visible = value; - } - - /** - * Gets the value of the viewId property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getViewId() { - return viewId; - } - - /** - * Sets the value of the viewId property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setViewId(String value) { - this.viewId = value; - } - - /** - * Gets the value of the alignwithAlignPanel property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public boolean isAlignwithAlignPanel() { - if (alignwithAlignPanel == null) { - return true; - } else { - return alignwithAlignPanel; - } - } - - /** - * Sets the value of the alignwithAlignPanel property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setAlignwithAlignPanel(Boolean value) { - this.alignwithAlignPanel = value; - } - - /** - * Gets the value of the colourwithAlignPanel property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public boolean isColourwithAlignPanel() { - if (colourwithAlignPanel == null) { - return false; - } else { - return colourwithAlignPanel; - } - } - - /** - * Sets the value of the colourwithAlignPanel property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setColourwithAlignPanel(Boolean value) { - this.colourwithAlignPanel = value; - } - - /** - * Gets the value of the colourByJmol property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public boolean isColourByJmol() { - if (colourByJmol == null) { - return true; - } else { - return colourByJmol; - } - } - - /** - * Sets the value of the colourByJmol property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setColourByJmol(Boolean value) { - this.colourByJmol = value; - } - - /** - * Gets the value of the type property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getType() { - return type; - } - - /** - * Sets the value of the type property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setType(String value) { - this.type = value; - } - - /** - * Gets the value of the width property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getWidth() { - return width; - } - - /** - * Sets the value of the width property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setWidth(Integer value) { - this.width = value; - } - - /** - * Gets the value of the height property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getHeight() { - return height; - } - - /** - * Sets the value of the height property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setHeight(Integer value) { - this.height = value; - } - - /** - * Gets the value of the xpos property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getXpos() { - return xpos; - } - - /** - * Sets the value of the xpos property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setXpos(Integer value) { - this.xpos = value; - } - - /** - * Gets the value of the ypos property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getYpos() { - return ypos; - } - - /** - * Sets the value of the ypos property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setYpos(Integer value) { - this.ypos = value; - } - - } - + return ypos; } - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -         * <complexType>
        -         *   <complexContent>
        -         *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *       <sequence>
        -         *         <element name="secondaryStructure" maxOccurs="unbounded">
        -         *           <complexType>
        -         *             <complexContent>
        -         *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *                 <attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" />
        -         *                 <attribute name="annotationId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        -         *                 <attribute name="gapped" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -         *                 <attribute name="viewerState" type="{http://www.w3.org/2001/XMLSchema}string" />
        -         *               </restriction>
        -         *             </complexContent>
        -         *           </complexType>
        -         *         </element>
        -         *       </sequence>
        -         *       <attGroup ref="{www.jalview.org}swingwindow"/>
        -         *       <attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" />
        -         *       <attribute name="viewId" type="{http://www.w3.org/2001/XMLSchema}string" />
        -         *       <attribute name="dividerLocation" type="{http://www.w3.org/2001/XMLSchema}int" />
        -         *       <attribute name="selectedRna" type="{http://www.w3.org/2001/XMLSchema}int" />
        -         *     </restriction>
        -         *   </complexContent>
        -         * </complexType>
        -         * 
        + * Sets the value of the ypos property. * + * @param value + * allowed object is {@link Integer } * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "secondaryStructure" - }) - public static class RnaViewer { - - @XmlElement(namespace = "www.jalview.org", required = true) - protected List secondaryStructure; - @XmlAttribute(name = "title") - protected String title; - @XmlAttribute(name = "viewId") - protected String viewId; - @XmlAttribute(name = "dividerLocation") - protected Integer dividerLocation; - @XmlAttribute(name = "selectedRna") - protected Integer selectedRna; - @XmlAttribute(name = "width") - protected Integer width; - @XmlAttribute(name = "height") - protected Integer height; - @XmlAttribute(name = "xpos") - protected Integer xpos; - @XmlAttribute(name = "ypos") - protected Integer ypos; - - /** - * Gets the value of the secondaryStructure property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the secondaryStructure property. - * - *

        - * For example, to add a new item, do as follows: - *

        -             *    getSecondaryStructure().add(newItem);
        -             * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link JalviewModelType.JSeq.RnaViewer.SecondaryStructure } - * - * - */ - public List getSecondaryStructure() { - if (secondaryStructure == null) { - secondaryStructure = new ArrayList(); - } - return this.secondaryStructure; - } - - /** - * Gets the value of the title property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getTitle() { - return title; - } - - /** - * Sets the value of the title property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setTitle(String value) { - this.title = value; - } - - /** - * Gets the value of the viewId property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getViewId() { - return viewId; - } - - /** - * Sets the value of the viewId property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setViewId(String value) { - this.viewId = value; - } - - /** - * Gets the value of the dividerLocation property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getDividerLocation() { - return dividerLocation; - } - - /** - * Sets the value of the dividerLocation property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setDividerLocation(Integer value) { - this.dividerLocation = value; - } - - /** - * Gets the value of the selectedRna property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getSelectedRna() { - return selectedRna; - } - - /** - * Sets the value of the selectedRna property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setSelectedRna(Integer value) { - this.selectedRna = value; - } - - /** - * Gets the value of the width property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getWidth() { - return width; - } - - /** - * Sets the value of the width property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setWidth(Integer value) { - this.width = value; - } - - /** - * Gets the value of the height property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getHeight() { - return height; - } - - /** - * Sets the value of the height property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setHeight(Integer value) { - this.height = value; - } - - /** - * Gets the value of the xpos property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getXpos() { - return xpos; - } - - /** - * Sets the value of the xpos property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setXpos(Integer value) { - this.xpos = value; - } - - /** - * Gets the value of the ypos property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getYpos() { - return ypos; - } - - /** - * Sets the value of the ypos property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setYpos(Integer value) { - this.ypos = value; - } - - - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -             * <complexType>
        -             *   <complexContent>
        -             *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -             *       <attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" />
        -             *       <attribute name="annotationId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        -             *       <attribute name="gapped" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -             *       <attribute name="viewerState" type="{http://www.w3.org/2001/XMLSchema}string" />
        -             *     </restriction>
        -             *   </complexContent>
        -             * </complexType>
        -             * 
        - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class SecondaryStructure { - - @XmlAttribute(name = "title") - protected String title; - @XmlAttribute(name = "annotationId", required = true) - protected String annotationId; - @XmlAttribute(name = "gapped") - protected Boolean gapped; - @XmlAttribute(name = "viewerState") - protected String viewerState; - - /** - * Gets the value of the title property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getTitle() { - return title; - } - - /** - * Sets the value of the title property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setTitle(String value) { - this.title = value; - } - - /** - * Gets the value of the annotationId property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getAnnotationId() { - return annotationId; - } - - /** - * Sets the value of the annotationId property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setAnnotationId(String value) { - this.annotationId = value; - } - - /** - * Gets the value of the gapped property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public Boolean isGapped() { - return gapped; - } - - /** - * Sets the value of the gapped property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setGapped(Boolean value) { - this.gapped = value; - } - - /** - * Gets the value of the viewerState property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getViewerState() { - return viewerState; - } - - /** - * Sets the value of the viewerState property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setViewerState(String value) { - this.viewerState = value; - } - - } - + public void setYpos(Integer value) + { + this.ypos = value; } - } + } + } /** - *

        Java class for anonymous complex type. + *

        + * Java class for anonymous complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained + * within this class. * *

              * <complexType>
              *   <complexContent>
              *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *       <sequence minOccurs="0">
        -     *         <element name="title" type="{http://www.w3.org/2001/XMLSchema}string"/>
        -     *         <element name="newick" type="{http://www.w3.org/2001/XMLSchema}string"/>
        +     *       <sequence>
        +     *         <element name="secondaryStructure" maxOccurs="unbounded">
        +     *           <complexType>
        +     *             <complexContent>
        +     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +     *                 <attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" />
        +     *                 <attribute name="annotationId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        +     *                 <attribute name="gapped" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +     *                 <attribute name="viewerState" type="{http://www.w3.org/2001/XMLSchema}string" />
        +     *               </restriction>
        +     *             </complexContent>
        +     *           </complexType>
        +     *         </element>
              *       </sequence>
              *       <attGroup ref="{www.jalview.org}swingwindow"/>
        -     *       <attribute name="fontName" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *       <attribute name="fontSize" type="{http://www.w3.org/2001/XMLSchema}int" />
        -     *       <attribute name="fontStyle" type="{http://www.w3.org/2001/XMLSchema}int" />
        -     *       <attribute name="threshold" type="{http://www.w3.org/2001/XMLSchema}float" />
        -     *       <attribute name="showBootstrap" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -     *       <attribute name="showDistances" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -     *       <attribute name="markUnlinked" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -     *       <attribute name="fitToWindow" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -     *       <attribute name="currentTree" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -     *       <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID" />
        +     *       <attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" />
        +     *       <attribute name="viewId" type="{http://www.w3.org/2001/XMLSchema}string" />
        +     *       <attribute name="dividerLocation" type="{http://www.w3.org/2001/XMLSchema}int" />
        +     *       <attribute name="selectedRna" type="{http://www.w3.org/2001/XMLSchema}int" />
              *     </restriction>
              *   </complexContent>
              * </complexType>
        @@ -2997,2094 +2670,2564 @@ public class JalviewModelType {
              * 
              */
             @XmlAccessorType(XmlAccessType.FIELD)
        -    @XmlType(name = "", propOrder = {
        -        "title",
        -        "newick"
        -    })
        -    public static class Tree {
        +    @XmlType(name = "", propOrder = { "secondaryStructure" })
        +    public static class RnaViewer
        +    {
        +
        +      @XmlElement(namespace = "www.jalview.org", required = true)
        +      protected List secondaryStructure;
        +
        +      @XmlAttribute(name = "title")
        +      protected String title;
        +
        +      @XmlAttribute(name = "viewId")
        +      protected String viewId;
        +
        +      @XmlAttribute(name = "dividerLocation")
        +      protected Integer dividerLocation;
        +
        +      @XmlAttribute(name = "selectedRna")
        +      protected Integer selectedRna;
        +
        +      @XmlAttribute(name = "width")
        +      protected Integer width;
        +
        +      @XmlAttribute(name = "height")
        +      protected Integer height;
        +
        +      @XmlAttribute(name = "xpos")
        +      protected Integer xpos;
        +
        +      @XmlAttribute(name = "ypos")
        +      protected Integer ypos;
        +
        +      /**
        +       * Gets the value of the secondaryStructure property.
        +       * 
        +       * 

        + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the secondaryStructure property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +       * getSecondaryStructure().add(newItem);
        +       * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link JalviewModelType.JSeq.RnaViewer.SecondaryStructure } + * + * + */ + public List getSecondaryStructure() + { + if (secondaryStructure == null) + { + secondaryStructure = new ArrayList(); + } + return this.secondaryStructure; + } + + /** + * Gets the value of the title property. + * + * @return possible object is {@link String } + * + */ + public String getTitle() + { + return title; + } + + /** + * Sets the value of the title property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setTitle(String value) + { + this.title = value; + } + + /** + * Gets the value of the viewId property. + * + * @return possible object is {@link String } + * + */ + public String getViewId() + { + return viewId; + } + + /** + * Sets the value of the viewId property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setViewId(String value) + { + this.viewId = value; + } + + /** + * Gets the value of the dividerLocation property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getDividerLocation() + { + return dividerLocation; + } + + /** + * Sets the value of the dividerLocation property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setDividerLocation(Integer value) + { + this.dividerLocation = value; + } + + /** + * Gets the value of the selectedRna property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getSelectedRna() + { + return selectedRna; + } + + /** + * Sets the value of the selectedRna property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setSelectedRna(Integer value) + { + this.selectedRna = value; + } + + /** + * Gets the value of the width property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getWidth() + { + return width; + } + + /** + * Sets the value of the width property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setWidth(Integer value) + { + this.width = value; + } + + /** + * Gets the value of the height property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getHeight() + { + return height; + } + + /** + * Sets the value of the height property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setHeight(Integer value) + { + this.height = value; + } + + /** + * Gets the value of the xpos property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getXpos() + { + return xpos; + } + + /** + * Sets the value of the xpos property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setXpos(Integer value) + { + this.xpos = value; + } + + /** + * Gets the value of the ypos property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getYpos() + { + return ypos; + } + + /** + * Sets the value of the ypos property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setYpos(Integer value) + { + this.ypos = value; + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +       * <complexType>
        +       *   <complexContent>
        +       *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +       *       <attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" />
        +       *       <attribute name="annotationId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        +       *       <attribute name="gapped" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +       *       <attribute name="viewerState" type="{http://www.w3.org/2001/XMLSchema}string" />
        +       *     </restriction>
        +       *   </complexContent>
        +       * </complexType>
        +       * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class SecondaryStructure + { - @XmlElement(namespace = "www.jalview.org") + @XmlAttribute(name = "title") protected String title; - @XmlElement(namespace = "www.jalview.org") - protected String newick; - @XmlAttribute(name = "fontName") - protected String fontName; - @XmlAttribute(name = "fontSize") - protected Integer fontSize; - @XmlAttribute(name = "fontStyle") - protected Integer fontStyle; - @XmlAttribute(name = "threshold") - protected Float threshold; - @XmlAttribute(name = "showBootstrap") - protected Boolean showBootstrap; - @XmlAttribute(name = "showDistances") - protected Boolean showDistances; - @XmlAttribute(name = "markUnlinked") - protected Boolean markUnlinked; - @XmlAttribute(name = "fitToWindow") - protected Boolean fitToWindow; - @XmlAttribute(name = "currentTree") - protected Boolean currentTree; - @XmlAttribute(name = "id") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlID - @XmlSchemaType(name = "ID") - protected String id; - @XmlAttribute(name = "width") - protected Integer width; - @XmlAttribute(name = "height") - protected Integer height; - @XmlAttribute(name = "xpos") - protected Integer xpos; - @XmlAttribute(name = "ypos") - protected Integer ypos; + + @XmlAttribute(name = "annotationId", required = true) + protected String annotationId; + + @XmlAttribute(name = "gapped") + protected Boolean gapped; + + @XmlAttribute(name = "viewerState") + protected String viewerState; /** * Gets the value of the title property. * - * @return - * possible object is - * {@link String } - * + * @return possible object is {@link String } + * */ - public String getTitle() { - return title; + public String getTitle() + { + return title; } /** * Sets the value of the title property. * * @param value - * allowed object is - * {@link String } - * - */ - public void setTitle(String value) { - this.title = value; - } - - /** - * Gets the value of the newick property. + * allowed object is {@link String } * - * @return - * possible object is - * {@link String } - * */ - public String getNewick() { - return newick; + public void setTitle(String value) + { + this.title = value; } /** - * Sets the value of the newick property. + * Gets the value of the annotationId property. * - * @param value - * allowed object is - * {@link String } - * - */ - public void setNewick(String value) { - this.newick = value; - } - - /** - * Gets the value of the fontName property. + * @return possible object is {@link String } * - * @return - * possible object is - * {@link String } - * */ - public String getFontName() { - return fontName; + public String getAnnotationId() + { + return annotationId; } /** - * Sets the value of the fontName property. + * Sets the value of the annotationId property. * * @param value - * allowed object is - * {@link String } - * - */ - public void setFontName(String value) { - this.fontName = value; - } - - /** - * Gets the value of the fontSize property. + * allowed object is {@link String } * - * @return - * possible object is - * {@link Integer } - * */ - public Integer getFontSize() { - return fontSize; + public void setAnnotationId(String value) + { + this.annotationId = value; } /** - * Sets the value of the fontSize property. + * Gets the value of the gapped property. * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setFontSize(Integer value) { - this.fontSize = value; - } - - /** - * Gets the value of the fontStyle property. + * @return possible object is {@link Boolean } * - * @return - * possible object is - * {@link Integer } - * */ - public Integer getFontStyle() { - return fontStyle; + public Boolean isGapped() + { + return gapped; } /** - * Sets the value of the fontStyle property. + * Sets the value of the gapped property. * * @param value - * allowed object is - * {@link Integer } - * - */ - public void setFontStyle(Integer value) { - this.fontStyle = value; - } - - /** - * Gets the value of the threshold property. + * allowed object is {@link Boolean } * - * @return - * possible object is - * {@link Float } - * */ - public Float getThreshold() { - return threshold; + public void setGapped(Boolean value) + { + this.gapped = value; } /** - * Sets the value of the threshold property. + * Gets the value of the viewerState property. * - * @param value - * allowed object is - * {@link Float } - * - */ - public void setThreshold(Float value) { - this.threshold = value; - } - - /** - * Gets the value of the showBootstrap property. + * @return possible object is {@link String } * - * @return - * possible object is - * {@link Boolean } - * */ - public Boolean isShowBootstrap() { - return showBootstrap; + public String getViewerState() + { + return viewerState; } /** - * Sets the value of the showBootstrap property. + * Sets the value of the viewerState property. * * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setShowBootstrap(Boolean value) { - this.showBootstrap = value; - } - - /** - * Gets the value of the showDistances property. + * allowed object is {@link String } * - * @return - * possible object is - * {@link Boolean } - * */ - public Boolean isShowDistances() { - return showDistances; + public void setViewerState(String value) + { + this.viewerState = value; } - /** - * Sets the value of the showDistances property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setShowDistances(Boolean value) { - this.showDistances = value; - } + } - /** - * Gets the value of the markUnlinked property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public Boolean isMarkUnlinked() { - return markUnlinked; - } + } - /** - * Sets the value of the markUnlinked property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setMarkUnlinked(Boolean value) { - this.markUnlinked = value; - } + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <complexContent>
        +   *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *       <sequence minOccurs="0">
        +   *         <element name="title" type="{http://www.w3.org/2001/XMLSchema}string"/>
        +   *         <element name="newick" type="{http://www.w3.org/2001/XMLSchema}string"/>
        +   *       </sequence>
        +   *       <attGroup ref="{www.jalview.org}swingwindow"/>
        +   *       <attribute name="fontName" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *       <attribute name="fontSize" type="{http://www.w3.org/2001/XMLSchema}int" />
        +   *       <attribute name="fontStyle" type="{http://www.w3.org/2001/XMLSchema}int" />
        +   *       <attribute name="threshold" type="{http://www.w3.org/2001/XMLSchema}float" />
        +   *       <attribute name="showBootstrap" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +   *       <attribute name="showDistances" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +   *       <attribute name="markUnlinked" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +   *       <attribute name="fitToWindow" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +   *       <attribute name="currentTree" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +   *       <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID" />
        +   *     </restriction>
        +   *   </complexContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "title", "newick" }) + public static class Tree + { + + @XmlElement(namespace = "www.jalview.org") + protected String title; + + @XmlElement(namespace = "www.jalview.org") + protected String newick; + + @XmlAttribute(name = "fontName") + protected String fontName; + + @XmlAttribute(name = "fontSize") + protected Integer fontSize; + + @XmlAttribute(name = "fontStyle") + protected Integer fontStyle; + + @XmlAttribute(name = "threshold") + protected Float threshold; + + @XmlAttribute(name = "showBootstrap") + protected Boolean showBootstrap; + + @XmlAttribute(name = "showDistances") + protected Boolean showDistances; + + @XmlAttribute(name = "markUnlinked") + protected Boolean markUnlinked; + + @XmlAttribute(name = "fitToWindow") + protected Boolean fitToWindow; + + @XmlAttribute(name = "currentTree") + protected Boolean currentTree; + + @XmlAttribute(name = "id") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; + + @XmlAttribute(name = "width") + protected Integer width; + + @XmlAttribute(name = "height") + protected Integer height; + + @XmlAttribute(name = "xpos") + protected Integer xpos; + + @XmlAttribute(name = "ypos") + protected Integer ypos; - /** - * Gets the value of the fitToWindow property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public Boolean isFitToWindow() { - return fitToWindow; - } + /** + * Gets the value of the title property. + * + * @return possible object is {@link String } + * + */ + public String getTitle() + { + return title; + } - /** - * Sets the value of the fitToWindow property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setFitToWindow(Boolean value) { - this.fitToWindow = value; - } + /** + * Sets the value of the title property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setTitle(String value) + { + this.title = value; + } - /** - * Gets the value of the currentTree property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public Boolean isCurrentTree() { - return currentTree; - } + /** + * Gets the value of the newick property. + * + * @return possible object is {@link String } + * + */ + public String getNewick() + { + return newick; + } - /** - * Sets the value of the currentTree property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setCurrentTree(Boolean value) { - this.currentTree = value; - } + /** + * Sets the value of the newick property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setNewick(String value) + { + this.newick = value; + } - /** - * Gets the value of the id property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getId() { - return id; - } + /** + * Gets the value of the fontName property. + * + * @return possible object is {@link String } + * + */ + public String getFontName() + { + return fontName; + } + + /** + * Sets the value of the fontName property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setFontName(String value) + { + this.fontName = value; + } + + /** + * Gets the value of the fontSize property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getFontSize() + { + return fontSize; + } + + /** + * Sets the value of the fontSize property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setFontSize(Integer value) + { + this.fontSize = value; + } + + /** + * Gets the value of the fontStyle property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getFontStyle() + { + return fontStyle; + } + + /** + * Sets the value of the fontStyle property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setFontStyle(Integer value) + { + this.fontStyle = value; + } + + /** + * Gets the value of the threshold property. + * + * @return possible object is {@link Float } + * + */ + public Float getThreshold() + { + return threshold; + } + + /** + * Sets the value of the threshold property. + * + * @param value + * allowed object is {@link Float } + * + */ + public void setThreshold(Float value) + { + this.threshold = value; + } + + /** + * Gets the value of the showBootstrap property. + * + * @return possible object is {@link Boolean } + * + */ + public Boolean isShowBootstrap() + { + return showBootstrap; + } + + /** + * Sets the value of the showBootstrap property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setShowBootstrap(Boolean value) + { + this.showBootstrap = value; + } + + /** + * Gets the value of the showDistances property. + * + * @return possible object is {@link Boolean } + * + */ + public Boolean isShowDistances() + { + return showDistances; + } - /** - * Sets the value of the id property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setId(String value) { - this.id = value; - } + /** + * Sets the value of the showDistances property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setShowDistances(Boolean value) + { + this.showDistances = value; + } - /** - * Gets the value of the width property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getWidth() { - return width; - } + /** + * Gets the value of the markUnlinked property. + * + * @return possible object is {@link Boolean } + * + */ + public Boolean isMarkUnlinked() + { + return markUnlinked; + } - /** - * Sets the value of the width property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setWidth(Integer value) { - this.width = value; - } + /** + * Sets the value of the markUnlinked property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setMarkUnlinked(Boolean value) + { + this.markUnlinked = value; + } - /** - * Gets the value of the height property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getHeight() { - return height; - } + /** + * Gets the value of the fitToWindow property. + * + * @return possible object is {@link Boolean } + * + */ + public Boolean isFitToWindow() + { + return fitToWindow; + } - /** - * Sets the value of the height property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setHeight(Integer value) { - this.height = value; - } + /** + * Sets the value of the fitToWindow property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setFitToWindow(Boolean value) + { + this.fitToWindow = value; + } - /** - * Gets the value of the xpos property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getXpos() { - return xpos; - } + /** + * Gets the value of the currentTree property. + * + * @return possible object is {@link Boolean } + * + */ + public Boolean isCurrentTree() + { + return currentTree; + } - /** - * Sets the value of the xpos property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setXpos(Integer value) { - this.xpos = value; - } + /** + * Sets the value of the currentTree property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setCurrentTree(Boolean value) + { + this.currentTree = value; + } - /** - * Gets the value of the ypos property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getYpos() { - return ypos; - } + /** + * Gets the value of the id property. + * + * @return possible object is {@link String } + * + */ + public String getId() + { + return id; + } - /** - * Sets the value of the ypos property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setYpos(Integer value) { - this.ypos = value; - } + /** + * Sets the value of the id property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setId(String value) + { + this.id = value; + } + /** + * Gets the value of the width property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getWidth() + { + return width; } + /** + * Sets the value of the width property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setWidth(Integer value) + { + this.width = value; + } /** - *

        Java class for anonymous complex type. + * Gets the value of the height property. * - *

        The following schema fragment specifies the expected content contained within this class. + * @return possible object is {@link Integer } * - *

        -     * <complexType>
        -     *   <complexContent>
        -     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *       <sequence>
        -     *         <element name="UserColourScheme" type="{www.jalview.org/colours}JalviewUserColours"/>
        -     *       </sequence>
        -     *       <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *     </restriction>
        -     *   </complexContent>
        -     * </complexType>
        -     * 
        + */ + public Integer getHeight() + { + return height; + } + + /** + * Sets the value of the height property. * + * @param value + * allowed object is {@link Integer } * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "userColourScheme" - }) - public static class UserColours { + public void setHeight(Integer value) + { + this.height = value; + } - @XmlElement(name = "UserColourScheme", namespace = "www.jalview.org", required = true) - protected JalviewUserColours userColourScheme; - @XmlAttribute(name = "id") - protected String id; + /** + * Gets the value of the xpos property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getXpos() + { + return xpos; + } - /** - * Gets the value of the userColourScheme property. - * - * @return - * possible object is - * {@link JalviewUserColours } - * - */ - public JalviewUserColours getUserColourScheme() { - return userColourScheme; - } + /** + * Sets the value of the xpos property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setXpos(Integer value) + { + this.xpos = value; + } - /** - * Sets the value of the userColourScheme property. - * - * @param value - * allowed object is - * {@link JalviewUserColours } - * - */ - public void setUserColourScheme(JalviewUserColours value) { - this.userColourScheme = value; - } + /** + * Gets the value of the ypos property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getYpos() + { + return ypos; + } - /** - * Gets the value of the id property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getId() { - return id; - } + /** + * Sets the value of the ypos property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setYpos(Integer value) + { + this.ypos = value; + } - /** - * Sets the value of the id property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setId(String value) { - this.id = value; - } + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <complexContent>
        +   *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *       <sequence>
        +   *         <element name="UserColourScheme" type="{www.jalview.org/colours}JalviewUserColours"/>
        +   *       </sequence>
        +   *       <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *     </restriction>
        +   *   </complexContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "userColourScheme" }) + public static class UserColours + { + + @XmlElement( + name = "UserColourScheme", + namespace = "www.jalview.org", + required = true) + protected JalviewUserColours userColourScheme; + + @XmlAttribute(name = "id") + protected String id; + /** + * Gets the value of the userColourScheme property. + * + * @return possible object is {@link JalviewUserColours } + * + */ + public JalviewUserColours getUserColourScheme() + { + return userColourScheme; } + /** + * Sets the value of the userColourScheme property. + * + * @param value + * allowed object is {@link JalviewUserColours } + * + */ + public void setUserColourScheme(JalviewUserColours value) + { + this.userColourScheme = value; + } /** - *

        Java class for anonymous complex type. + * Gets the value of the id property. * - *

        The following schema fragment specifies the expected content contained within this class. + * @return possible object is {@link String } * - *

        -     * <complexType>
        -     *   <complexContent>
        -     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *       <sequence>
        -     *         <element name="AnnotationColours" type="{www.jalview.org}AnnotationColourScheme" minOccurs="0"/>
        -     *         <element name="hiddenColumns" maxOccurs="unbounded" minOccurs="0">
        -     *           <complexType>
        -     *             <complexContent>
        -     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *                 <attribute name="start" type="{http://www.w3.org/2001/XMLSchema}int" />
        -     *                 <attribute name="end" type="{http://www.w3.org/2001/XMLSchema}int" />
        -     *               </restriction>
        -     *             </complexContent>
        -     *           </complexType>
        -     *         </element>
        -     *         <element name="calcIdParam" maxOccurs="unbounded" minOccurs="0">
        -     *           <complexType>
        -     *             <complexContent>
        -     *               <extension base="{www.jalview.org/xml/wsparamset}WebServiceParameterSet">
        -     *                 <attribute name="calcId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *                 <attribute name="needsUpdate" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        -     *                 <attribute name="autoUpdate" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -     *               </extension>
        -     *             </complexContent>
        -     *           </complexType>
        -     *         </element>
        -     *       </sequence>
        -     *       <attGroup ref="{www.jalview.org}swingwindow"/>
        -     *       <attribute name="conservationSelected" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -     *       <attribute name="pidSelected" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -     *       <attribute name="bgColour" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *       <attribute name="consThreshold" type="{http://www.w3.org/2001/XMLSchema}int" />
        -     *       <attribute name="pidThreshold" type="{http://www.w3.org/2001/XMLSchema}int" />
        -     *       <attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *       <attribute name="showFullId" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -     *       <attribute name="rightAlignIds" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -     *       <attribute name="showText" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -     *       <attribute name="showColourText" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -     *       <attribute name="showUnconserved" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        -     *       <attribute name="showBoxes" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -     *       <attribute name="wrapAlignment" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -     *       <attribute name="renderGaps" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -     *       <attribute name="showSequenceFeatures" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -     *       <attribute name="showNPfeatureTooltip" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -     *       <attribute name="showDbRefTooltip" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -     *       <attribute name="followHighlight" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
        -     *       <attribute name="followSelection" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
        -     *       <attribute name="showAnnotation" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -     *       <attribute name="centreColumnLabels" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        -     *       <attribute name="showGroupConservation" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        -     *       <attribute name="showGroupConsensus" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        -     *       <attribute name="showConsensusHistogram" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
        -     *       <attribute name="showSequenceLogo" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        -     *       <attribute name="normaliseSequenceLogo" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        -     *       <attribute name="ignoreGapsinConsensus" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
        -     *       <attribute name="startRes" type="{http://www.w3.org/2001/XMLSchema}int" />
        -     *       <attribute name="startSeq" type="{http://www.w3.org/2001/XMLSchema}int" />
        -     *       <attribute name="fontName" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *       <attribute name="fontSize" type="{http://www.w3.org/2001/XMLSchema}int" />
        -     *       <attribute name="fontStyle" type="{http://www.w3.org/2001/XMLSchema}int" />
        -     *       <attribute name="scaleProteinAsCdna" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
        -     *       <attribute name="viewName" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *       <attribute name="sequenceSetId" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *       <attribute name="gatheredViews" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -     *       <attribute name="textCol1" type="{http://www.w3.org/2001/XMLSchema}int" />
        -     *       <attribute name="textCol2" type="{http://www.w3.org/2001/XMLSchema}int" />
        -     *       <attribute name="textColThreshold" type="{http://www.w3.org/2001/XMLSchema}int" />
        -     *       <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID" />
        -     *       <attribute name="complementId" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *     </restriction>
        -     *   </complexContent>
        -     * </complexType>
        -     * 
        + */ + public String getId() + { + return id; + } + + /** + * Sets the value of the id property. * + * @param value + * allowed object is {@link String } * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "annotationColours", - "hiddenColumns", - "calcIdParam" - }) - public static class Viewport { - - @XmlElement(name = "AnnotationColours", namespace = "www.jalview.org") - protected AnnotationColourScheme annotationColours; - @XmlElement(namespace = "www.jalview.org") - protected List hiddenColumns; - @XmlElement(namespace = "www.jalview.org") - protected List calcIdParam; - @XmlAttribute(name = "conservationSelected") - protected Boolean conservationSelected; - @XmlAttribute(name = "pidSelected") - protected Boolean pidSelected; - @XmlAttribute(name = "bgColour") - protected String bgColour; - @XmlAttribute(name = "consThreshold") - protected Integer consThreshold; - @XmlAttribute(name = "pidThreshold") - protected Integer pidThreshold; - @XmlAttribute(name = "title") - protected String title; - @XmlAttribute(name = "showFullId") - protected Boolean showFullId; - @XmlAttribute(name = "rightAlignIds") - protected Boolean rightAlignIds; - @XmlAttribute(name = "showText") - protected Boolean showText; - @XmlAttribute(name = "showColourText") - protected Boolean showColourText; - @XmlAttribute(name = "showUnconserved") - protected Boolean showUnconserved; - @XmlAttribute(name = "showBoxes") - protected Boolean showBoxes; - @XmlAttribute(name = "wrapAlignment") - protected Boolean wrapAlignment; - @XmlAttribute(name = "renderGaps") - protected Boolean renderGaps; - @XmlAttribute(name = "showSequenceFeatures") - protected Boolean showSequenceFeatures; - @XmlAttribute(name = "showNPfeatureTooltip") - protected Boolean showNPfeatureTooltip; - @XmlAttribute(name = "showDbRefTooltip") - protected Boolean showDbRefTooltip; - @XmlAttribute(name = "followHighlight") - protected Boolean followHighlight; - @XmlAttribute(name = "followSelection") - protected Boolean followSelection; - @XmlAttribute(name = "showAnnotation") - protected Boolean showAnnotation; - @XmlAttribute(name = "centreColumnLabels") - protected Boolean centreColumnLabels; - @XmlAttribute(name = "showGroupConservation") - protected Boolean showGroupConservation; - @XmlAttribute(name = "showGroupConsensus") - protected Boolean showGroupConsensus; - @XmlAttribute(name = "showConsensusHistogram") - protected Boolean showConsensusHistogram; - @XmlAttribute(name = "showSequenceLogo") - protected Boolean showSequenceLogo; - @XmlAttribute(name = "normaliseSequenceLogo") - protected Boolean normaliseSequenceLogo; - @XmlAttribute(name = "ignoreGapsinConsensus") - protected Boolean ignoreGapsinConsensus; - @XmlAttribute(name = "startRes") - protected Integer startRes; - @XmlAttribute(name = "startSeq") - protected Integer startSeq; - @XmlAttribute(name = "fontName") - protected String fontName; - @XmlAttribute(name = "fontSize") - protected Integer fontSize; - @XmlAttribute(name = "fontStyle") - protected Integer fontStyle; - @XmlAttribute(name = "scaleProteinAsCdna") - protected Boolean scaleProteinAsCdna; - @XmlAttribute(name = "viewName") - protected String viewName; - @XmlAttribute(name = "sequenceSetId") - protected String sequenceSetId; - @XmlAttribute(name = "gatheredViews") - protected Boolean gatheredViews; - @XmlAttribute(name = "textCol1") - protected Integer textCol1; - @XmlAttribute(name = "textCol2") - protected Integer textCol2; - @XmlAttribute(name = "textColThreshold") - protected Integer textColThreshold; - @XmlAttribute(name = "id") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlID - @XmlSchemaType(name = "ID") - protected String id; - @XmlAttribute(name = "complementId") - protected String complementId; - @XmlAttribute(name = "width") - protected Integer width; - @XmlAttribute(name = "height") - protected Integer height; - @XmlAttribute(name = "xpos") - protected Integer xpos; - @XmlAttribute(name = "ypos") - protected Integer ypos; + public void setId(String value) + { + this.id = value; + } - /** - * Gets the value of the annotationColours property. - * - * @return - * possible object is - * {@link AnnotationColourScheme } - * - */ - public AnnotationColourScheme getAnnotationColours() { - return annotationColours; - } + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <complexContent>
        +   *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *       <sequence>
        +   *         <element name="AnnotationColours" type="{www.jalview.org}AnnotationColourScheme" minOccurs="0"/>
        +   *         <element name="hiddenColumns" maxOccurs="unbounded" minOccurs="0">
        +   *           <complexType>
        +   *             <complexContent>
        +   *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                 <attribute name="start" type="{http://www.w3.org/2001/XMLSchema}int" />
        +   *                 <attribute name="end" type="{http://www.w3.org/2001/XMLSchema}int" />
        +   *               </restriction>
        +   *             </complexContent>
        +   *           </complexType>
        +   *         </element>
        +   *         <element name="calcIdParam" maxOccurs="unbounded" minOccurs="0">
        +   *           <complexType>
        +   *             <complexContent>
        +   *               <extension base="{www.jalview.org/xml/wsparamset}WebServiceParameterSet">
        +   *                 <attribute name="calcId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *                 <attribute name="needsUpdate" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        +   *                 <attribute name="autoUpdate" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +   *               </extension>
        +   *             </complexContent>
        +   *           </complexType>
        +   *         </element>
        +   *       </sequence>
        +   *       <attGroup ref="{www.jalview.org}swingwindow"/>
        +   *       <attribute name="conservationSelected" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +   *       <attribute name="pidSelected" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +   *       <attribute name="bgColour" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *       <attribute name="consThreshold" type="{http://www.w3.org/2001/XMLSchema}int" />
        +   *       <attribute name="pidThreshold" type="{http://www.w3.org/2001/XMLSchema}int" />
        +   *       <attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *       <attribute name="showFullId" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +   *       <attribute name="rightAlignIds" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +   *       <attribute name="showText" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +   *       <attribute name="showColourText" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +   *       <attribute name="showUnconserved" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        +   *       <attribute name="showBoxes" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +   *       <attribute name="wrapAlignment" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +   *       <attribute name="renderGaps" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +   *       <attribute name="showSequenceFeatures" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +   *       <attribute name="showNPfeatureTooltip" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +   *       <attribute name="showDbRefTooltip" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +   *       <attribute name="followHighlight" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
        +   *       <attribute name="followSelection" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
        +   *       <attribute name="showAnnotation" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +   *       <attribute name="centreColumnLabels" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        +   *       <attribute name="showGroupConservation" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        +   *       <attribute name="showGroupConsensus" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        +   *       <attribute name="showConsensusHistogram" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
        +   *       <attribute name="showSequenceLogo" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        +   *       <attribute name="normaliseSequenceLogo" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        +   *       <attribute name="ignoreGapsinConsensus" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
        +   *       <attribute name="startRes" type="{http://www.w3.org/2001/XMLSchema}int" />
        +   *       <attribute name="startSeq" type="{http://www.w3.org/2001/XMLSchema}int" />
        +   *       <attribute name="fontName" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *       <attribute name="fontSize" type="{http://www.w3.org/2001/XMLSchema}int" />
        +   *       <attribute name="fontStyle" type="{http://www.w3.org/2001/XMLSchema}int" />
        +   *       <attribute name="scaleProteinAsCdna" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
        +   *       <attribute name="viewName" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *       <attribute name="sequenceSetId" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *       <attribute name="gatheredViews" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +   *       <attribute name="textCol1" type="{http://www.w3.org/2001/XMLSchema}int" />
        +   *       <attribute name="textCol2" type="{http://www.w3.org/2001/XMLSchema}int" />
        +   *       <attribute name="textColThreshold" type="{http://www.w3.org/2001/XMLSchema}int" />
        +   *       <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID" />
        +   *       <attribute name="complementId" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *     </restriction>
        +   *   </complexContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType( + name = "", + propOrder = + { "annotationColours", "hiddenColumns", "calcIdParam" }) + public static class Viewport + { + + @XmlElement(name = "AnnotationColours", namespace = "www.jalview.org") + protected AnnotationColourScheme annotationColours; + + @XmlElement(namespace = "www.jalview.org") + protected List hiddenColumns; + + @XmlElement(namespace = "www.jalview.org") + protected List calcIdParam; + + @XmlAttribute(name = "conservationSelected") + protected Boolean conservationSelected; + + @XmlAttribute(name = "pidSelected") + protected Boolean pidSelected; + + @XmlAttribute(name = "bgColour") + protected String bgColour; + + @XmlAttribute(name = "consThreshold") + protected Integer consThreshold; + + @XmlAttribute(name = "pidThreshold") + protected Integer pidThreshold; + + @XmlAttribute(name = "title") + protected String title; + + @XmlAttribute(name = "showFullId") + protected Boolean showFullId; + + @XmlAttribute(name = "rightAlignIds") + protected Boolean rightAlignIds; + + @XmlAttribute(name = "showText") + protected Boolean showText; + + @XmlAttribute(name = "showColourText") + protected Boolean showColourText; + + @XmlAttribute(name = "showUnconserved") + protected Boolean showUnconserved; + + @XmlAttribute(name = "showBoxes") + protected Boolean showBoxes; + + @XmlAttribute(name = "wrapAlignment") + protected Boolean wrapAlignment; + + @XmlAttribute(name = "renderGaps") + protected Boolean renderGaps; - /** - * Sets the value of the annotationColours property. - * - * @param value - * allowed object is - * {@link AnnotationColourScheme } - * - */ - public void setAnnotationColours(AnnotationColourScheme value) { - this.annotationColours = value; - } + @XmlAttribute(name = "showSequenceFeatures") + protected Boolean showSequenceFeatures; - /** - * Gets the value of the hiddenColumns property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the hiddenColumns property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getHiddenColumns().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link JalviewModelType.Viewport.HiddenColumns } - * - * - */ - public List getHiddenColumns() { - if (hiddenColumns == null) { - hiddenColumns = new ArrayList(); - } - return this.hiddenColumns; - } + @XmlAttribute(name = "showNPfeatureTooltip") + protected Boolean showNPfeatureTooltip; + + @XmlAttribute(name = "showDbRefTooltip") + protected Boolean showDbRefTooltip; + + @XmlAttribute(name = "followHighlight") + protected Boolean followHighlight; + + @XmlAttribute(name = "followSelection") + protected Boolean followSelection; + + @XmlAttribute(name = "showAnnotation") + protected Boolean showAnnotation; + + @XmlAttribute(name = "centreColumnLabels") + protected Boolean centreColumnLabels; + + @XmlAttribute(name = "showGroupConservation") + protected Boolean showGroupConservation; + + @XmlAttribute(name = "showGroupConsensus") + protected Boolean showGroupConsensus; + + @XmlAttribute(name = "showConsensusHistogram") + protected Boolean showConsensusHistogram; + + @XmlAttribute(name = "showSequenceLogo") + protected Boolean showSequenceLogo; + + @XmlAttribute(name = "normaliseSequenceLogo") + protected Boolean normaliseSequenceLogo; + + @XmlAttribute(name = "ignoreGapsinConsensus") + protected Boolean ignoreGapsinConsensus; + + @XmlAttribute(name = "startRes") + protected Integer startRes; + + @XmlAttribute(name = "startSeq") + protected Integer startSeq; + + @XmlAttribute(name = "fontName") + protected String fontName; + + @XmlAttribute(name = "fontSize") + protected Integer fontSize; + + @XmlAttribute(name = "fontStyle") + protected Integer fontStyle; + + @XmlAttribute(name = "scaleProteinAsCdna") + protected Boolean scaleProteinAsCdna; + + @XmlAttribute(name = "viewName") + protected String viewName; + + @XmlAttribute(name = "sequenceSetId") + protected String sequenceSetId; + + @XmlAttribute(name = "gatheredViews") + protected Boolean gatheredViews; - /** - * Gets the value of the calcIdParam property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the calcIdParam property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getCalcIdParam().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link JalviewModelType.Viewport.CalcIdParam } - * - * - */ - public List getCalcIdParam() { - if (calcIdParam == null) { - calcIdParam = new ArrayList(); - } - return this.calcIdParam; - } + @XmlAttribute(name = "textCol1") + protected Integer textCol1; - /** - * Gets the value of the conservationSelected property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public Boolean isConservationSelected() { - return conservationSelected; - } + @XmlAttribute(name = "textCol2") + protected Integer textCol2; - /** - * Sets the value of the conservationSelected property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setConservationSelected(Boolean value) { - this.conservationSelected = value; - } + @XmlAttribute(name = "textColThreshold") + protected Integer textColThreshold; - /** - * Gets the value of the pidSelected property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public Boolean isPidSelected() { - return pidSelected; - } + @XmlAttribute(name = "id") + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String id; - /** - * Sets the value of the pidSelected property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setPidSelected(Boolean value) { - this.pidSelected = value; - } + @XmlAttribute(name = "complementId") + protected String complementId; - /** - * Gets the value of the bgColour property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getBgColour() { - return bgColour; - } + @XmlAttribute(name = "width") + protected Integer width; - /** - * Sets the value of the bgColour property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setBgColour(String value) { - this.bgColour = value; - } + @XmlAttribute(name = "height") + protected Integer height; - /** - * Gets the value of the consThreshold property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getConsThreshold() { - return consThreshold; - } + @XmlAttribute(name = "xpos") + protected Integer xpos; - /** - * Sets the value of the consThreshold property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setConsThreshold(Integer value) { - this.consThreshold = value; - } + @XmlAttribute(name = "ypos") + protected Integer ypos; - /** - * Gets the value of the pidThreshold property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getPidThreshold() { - return pidThreshold; - } + /** + * Gets the value of the annotationColours property. + * + * @return possible object is {@link AnnotationColourScheme } + * + */ + public AnnotationColourScheme getAnnotationColours() + { + return annotationColours; + } - /** - * Sets the value of the pidThreshold property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setPidThreshold(Integer value) { - this.pidThreshold = value; - } + /** + * Sets the value of the annotationColours property. + * + * @param value + * allowed object is {@link AnnotationColourScheme } + * + */ + public void setAnnotationColours(AnnotationColourScheme value) + { + this.annotationColours = value; + } - /** - * Gets the value of the title property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getTitle() { - return title; - } + /** + * Gets the value of the hiddenColumns property. + * + *

        + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the hiddenColumns property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +     * getHiddenColumns().add(newItem);
        +     * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link JalviewModelType.Viewport.HiddenColumns } + * + * + */ + public List getHiddenColumns() + { + if (hiddenColumns == null) + { + hiddenColumns = new ArrayList(); + } + return this.hiddenColumns; + } - /** - * Sets the value of the title property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setTitle(String value) { - this.title = value; - } + /** + * Gets the value of the calcIdParam property. + * + *

        + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the calcIdParam property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +     * getCalcIdParam().add(newItem);
        +     * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link JalviewModelType.Viewport.CalcIdParam } + * + * + */ + public List getCalcIdParam() + { + if (calcIdParam == null) + { + calcIdParam = new ArrayList(); + } + return this.calcIdParam; + } - /** - * Gets the value of the showFullId property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public Boolean isShowFullId() { - return showFullId; - } + /** + * Gets the value of the conservationSelected property. + * + * @return possible object is {@link Boolean } + * + */ + public Boolean isConservationSelected() + { + return conservationSelected; + } - /** - * Sets the value of the showFullId property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setShowFullId(Boolean value) { - this.showFullId = value; - } + /** + * Sets the value of the conservationSelected property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setConservationSelected(Boolean value) + { + this.conservationSelected = value; + } - /** - * Gets the value of the rightAlignIds property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public Boolean isRightAlignIds() { - return rightAlignIds; - } + /** + * Gets the value of the pidSelected property. + * + * @return possible object is {@link Boolean } + * + */ + public Boolean isPidSelected() + { + return pidSelected; + } - /** - * Sets the value of the rightAlignIds property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setRightAlignIds(Boolean value) { - this.rightAlignIds = value; - } + /** + * Sets the value of the pidSelected property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setPidSelected(Boolean value) + { + this.pidSelected = value; + } - /** - * Gets the value of the showText property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public Boolean isShowText() { - return showText; - } + /** + * Gets the value of the bgColour property. + * + * @return possible object is {@link String } + * + */ + public String getBgColour() + { + return bgColour; + } - /** - * Sets the value of the showText property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setShowText(Boolean value) { - this.showText = value; - } + /** + * Sets the value of the bgColour property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setBgColour(String value) + { + this.bgColour = value; + } - /** - * Gets the value of the showColourText property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public Boolean isShowColourText() { - return showColourText; - } + /** + * Gets the value of the consThreshold property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getConsThreshold() + { + return consThreshold; + } - /** - * Sets the value of the showColourText property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setShowColourText(Boolean value) { - this.showColourText = value; - } + /** + * Sets the value of the consThreshold property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setConsThreshold(Integer value) + { + this.consThreshold = value; + } - /** - * Gets the value of the showUnconserved property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public boolean isShowUnconserved() { - if (showUnconserved == null) { - return false; - } else { - return showUnconserved; - } - } + /** + * Gets the value of the pidThreshold property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getPidThreshold() + { + return pidThreshold; + } - /** - * Sets the value of the showUnconserved property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setShowUnconserved(Boolean value) { - this.showUnconserved = value; - } + /** + * Sets the value of the pidThreshold property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setPidThreshold(Integer value) + { + this.pidThreshold = value; + } - /** - * Gets the value of the showBoxes property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public Boolean isShowBoxes() { - return showBoxes; - } + /** + * Gets the value of the title property. + * + * @return possible object is {@link String } + * + */ + public String getTitle() + { + return title; + } - /** - * Sets the value of the showBoxes property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setShowBoxes(Boolean value) { - this.showBoxes = value; - } + /** + * Sets the value of the title property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setTitle(String value) + { + this.title = value; + } + + /** + * Gets the value of the showFullId property. + * + * @return possible object is {@link Boolean } + * + */ + public Boolean isShowFullId() + { + return showFullId; + } + + /** + * Sets the value of the showFullId property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setShowFullId(Boolean value) + { + this.showFullId = value; + } + + /** + * Gets the value of the rightAlignIds property. + * + * @return possible object is {@link Boolean } + * + */ + public Boolean isRightAlignIds() + { + return rightAlignIds; + } + + /** + * Sets the value of the rightAlignIds property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setRightAlignIds(Boolean value) + { + this.rightAlignIds = value; + } - /** - * Gets the value of the wrapAlignment property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public Boolean isWrapAlignment() { - return wrapAlignment; - } + /** + * Gets the value of the showText property. + * + * @return possible object is {@link Boolean } + * + */ + public Boolean isShowText() + { + return showText; + } - /** - * Sets the value of the wrapAlignment property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setWrapAlignment(Boolean value) { - this.wrapAlignment = value; - } + /** + * Sets the value of the showText property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setShowText(Boolean value) + { + this.showText = value; + } - /** - * Gets the value of the renderGaps property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public Boolean isRenderGaps() { - return renderGaps; - } + /** + * Gets the value of the showColourText property. + * + * @return possible object is {@link Boolean } + * + */ + public Boolean isShowColourText() + { + return showColourText; + } - /** - * Sets the value of the renderGaps property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setRenderGaps(Boolean value) { - this.renderGaps = value; - } + /** + * Sets the value of the showColourText property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setShowColourText(Boolean value) + { + this.showColourText = value; + } - /** - * Gets the value of the showSequenceFeatures property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public Boolean isShowSequenceFeatures() { - return showSequenceFeatures; - } + /** + * Gets the value of the showUnconserved property. + * + * @return possible object is {@link Boolean } + * + */ + public boolean isShowUnconserved() + { + if (showUnconserved == null) + { + return false; + } + else + { + return showUnconserved; + } + } - /** - * Sets the value of the showSequenceFeatures property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setShowSequenceFeatures(Boolean value) { - this.showSequenceFeatures = value; - } + /** + * Sets the value of the showUnconserved property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setShowUnconserved(Boolean value) + { + this.showUnconserved = value; + } - /** - * Gets the value of the showNPfeatureTooltip property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public Boolean isShowNPfeatureTooltip() { - return showNPfeatureTooltip; - } + /** + * Gets the value of the showBoxes property. + * + * @return possible object is {@link Boolean } + * + */ + public Boolean isShowBoxes() + { + return showBoxes; + } - /** - * Sets the value of the showNPfeatureTooltip property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setShowNPfeatureTooltip(Boolean value) { - this.showNPfeatureTooltip = value; - } + /** + * Sets the value of the showBoxes property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setShowBoxes(Boolean value) + { + this.showBoxes = value; + } - /** - * Gets the value of the showDbRefTooltip property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public Boolean isShowDbRefTooltip() { - return showDbRefTooltip; - } + /** + * Gets the value of the wrapAlignment property. + * + * @return possible object is {@link Boolean } + * + */ + public Boolean isWrapAlignment() + { + return wrapAlignment; + } - /** - * Sets the value of the showDbRefTooltip property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setShowDbRefTooltip(Boolean value) { - this.showDbRefTooltip = value; - } + /** + * Sets the value of the wrapAlignment property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setWrapAlignment(Boolean value) + { + this.wrapAlignment = value; + } - /** - * Gets the value of the followHighlight property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public boolean isFollowHighlight() { - if (followHighlight == null) { - return true; - } else { - return followHighlight; - } - } + /** + * Gets the value of the renderGaps property. + * + * @return possible object is {@link Boolean } + * + */ + public Boolean isRenderGaps() + { + return renderGaps; + } - /** - * Sets the value of the followHighlight property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setFollowHighlight(Boolean value) { - this.followHighlight = value; - } + /** + * Sets the value of the renderGaps property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setRenderGaps(Boolean value) + { + this.renderGaps = value; + } - /** - * Gets the value of the followSelection property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public boolean isFollowSelection() { - if (followSelection == null) { - return true; - } else { - return followSelection; - } - } + /** + * Gets the value of the showSequenceFeatures property. + * + * @return possible object is {@link Boolean } + * + */ + public Boolean isShowSequenceFeatures() + { + return showSequenceFeatures; + } - /** - * Sets the value of the followSelection property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setFollowSelection(Boolean value) { - this.followSelection = value; - } + /** + * Sets the value of the showSequenceFeatures property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setShowSequenceFeatures(Boolean value) + { + this.showSequenceFeatures = value; + } - /** - * Gets the value of the showAnnotation property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public Boolean isShowAnnotation() { - return showAnnotation; - } + /** + * Gets the value of the showNPfeatureTooltip property. + * + * @return possible object is {@link Boolean } + * + */ + public Boolean isShowNPfeatureTooltip() + { + return showNPfeatureTooltip; + } - /** - * Sets the value of the showAnnotation property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setShowAnnotation(Boolean value) { - this.showAnnotation = value; - } + /** + * Sets the value of the showNPfeatureTooltip property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setShowNPfeatureTooltip(Boolean value) + { + this.showNPfeatureTooltip = value; + } - /** - * Gets the value of the centreColumnLabels property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public boolean isCentreColumnLabels() { - if (centreColumnLabels == null) { - return false; - } else { - return centreColumnLabels; - } - } + /** + * Gets the value of the showDbRefTooltip property. + * + * @return possible object is {@link Boolean } + * + */ + public Boolean isShowDbRefTooltip() + { + return showDbRefTooltip; + } - /** - * Sets the value of the centreColumnLabels property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setCentreColumnLabels(Boolean value) { - this.centreColumnLabels = value; - } + /** + * Sets the value of the showDbRefTooltip property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setShowDbRefTooltip(Boolean value) + { + this.showDbRefTooltip = value; + } - /** - * Gets the value of the showGroupConservation property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public boolean isShowGroupConservation() { - if (showGroupConservation == null) { - return false; - } else { - return showGroupConservation; - } - } + /** + * Gets the value of the followHighlight property. + * + * @return possible object is {@link Boolean } + * + */ + public boolean isFollowHighlight() + { + if (followHighlight == null) + { + return true; + } + else + { + return followHighlight; + } + } - /** - * Sets the value of the showGroupConservation property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setShowGroupConservation(Boolean value) { - this.showGroupConservation = value; - } + /** + * Sets the value of the followHighlight property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setFollowHighlight(Boolean value) + { + this.followHighlight = value; + } - /** - * Gets the value of the showGroupConsensus property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public boolean isShowGroupConsensus() { - if (showGroupConsensus == null) { - return false; - } else { - return showGroupConsensus; - } - } + /** + * Gets the value of the followSelection property. + * + * @return possible object is {@link Boolean } + * + */ + public boolean isFollowSelection() + { + if (followSelection == null) + { + return true; + } + else + { + return followSelection; + } + } - /** - * Sets the value of the showGroupConsensus property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setShowGroupConsensus(Boolean value) { - this.showGroupConsensus = value; - } + /** + * Sets the value of the followSelection property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setFollowSelection(Boolean value) + { + this.followSelection = value; + } - /** - * Gets the value of the showConsensusHistogram property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public boolean isShowConsensusHistogram() { - if (showConsensusHistogram == null) { - return true; - } else { - return showConsensusHistogram; - } - } + /** + * Gets the value of the showAnnotation property. + * + * @return possible object is {@link Boolean } + * + */ + public Boolean isShowAnnotation() + { + return showAnnotation; + } - /** - * Sets the value of the showConsensusHistogram property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setShowConsensusHistogram(Boolean value) { - this.showConsensusHistogram = value; - } + /** + * Sets the value of the showAnnotation property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setShowAnnotation(Boolean value) + { + this.showAnnotation = value; + } - /** - * Gets the value of the showSequenceLogo property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public boolean isShowSequenceLogo() { - if (showSequenceLogo == null) { - return false; - } else { - return showSequenceLogo; - } - } + /** + * Gets the value of the centreColumnLabels property. + * + * @return possible object is {@link Boolean } + * + */ + public boolean isCentreColumnLabels() + { + if (centreColumnLabels == null) + { + return false; + } + else + { + return centreColumnLabels; + } + } + + /** + * Sets the value of the centreColumnLabels property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setCentreColumnLabels(Boolean value) + { + this.centreColumnLabels = value; + } - /** - * Sets the value of the showSequenceLogo property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setShowSequenceLogo(Boolean value) { - this.showSequenceLogo = value; - } + /** + * Gets the value of the showGroupConservation property. + * + * @return possible object is {@link Boolean } + * + */ + public boolean isShowGroupConservation() + { + if (showGroupConservation == null) + { + return false; + } + else + { + return showGroupConservation; + } + } - /** - * Gets the value of the normaliseSequenceLogo property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public boolean isNormaliseSequenceLogo() { - if (normaliseSequenceLogo == null) { - return false; - } else { - return normaliseSequenceLogo; - } - } + /** + * Sets the value of the showGroupConservation property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setShowGroupConservation(Boolean value) + { + this.showGroupConservation = value; + } - /** - * Sets the value of the normaliseSequenceLogo property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setNormaliseSequenceLogo(Boolean value) { - this.normaliseSequenceLogo = value; - } + /** + * Gets the value of the showGroupConsensus property. + * + * @return possible object is {@link Boolean } + * + */ + public boolean isShowGroupConsensus() + { + if (showGroupConsensus == null) + { + return false; + } + else + { + return showGroupConsensus; + } + } - /** - * Gets the value of the ignoreGapsinConsensus property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public boolean isIgnoreGapsinConsensus() { - if (ignoreGapsinConsensus == null) { - return true; - } else { - return ignoreGapsinConsensus; - } - } + /** + * Sets the value of the showGroupConsensus property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setShowGroupConsensus(Boolean value) + { + this.showGroupConsensus = value; + } - /** - * Sets the value of the ignoreGapsinConsensus property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setIgnoreGapsinConsensus(Boolean value) { - this.ignoreGapsinConsensus = value; - } + /** + * Gets the value of the showConsensusHistogram property. + * + * @return possible object is {@link Boolean } + * + */ + public boolean isShowConsensusHistogram() + { + if (showConsensusHistogram == null) + { + return true; + } + else + { + return showConsensusHistogram; + } + } - /** - * Gets the value of the startRes property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getStartRes() { - return startRes; - } + /** + * Sets the value of the showConsensusHistogram property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setShowConsensusHistogram(Boolean value) + { + this.showConsensusHistogram = value; + } - /** - * Sets the value of the startRes property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setStartRes(Integer value) { - this.startRes = value; - } + /** + * Gets the value of the showSequenceLogo property. + * + * @return possible object is {@link Boolean } + * + */ + public boolean isShowSequenceLogo() + { + if (showSequenceLogo == null) + { + return false; + } + else + { + return showSequenceLogo; + } + } - /** - * Gets the value of the startSeq property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getStartSeq() { - return startSeq; - } + /** + * Sets the value of the showSequenceLogo property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setShowSequenceLogo(Boolean value) + { + this.showSequenceLogo = value; + } - /** - * Sets the value of the startSeq property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setStartSeq(Integer value) { - this.startSeq = value; - } + /** + * Gets the value of the normaliseSequenceLogo property. + * + * @return possible object is {@link Boolean } + * + */ + public boolean isNormaliseSequenceLogo() + { + if (normaliseSequenceLogo == null) + { + return false; + } + else + { + return normaliseSequenceLogo; + } + } - /** - * Gets the value of the fontName property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getFontName() { - return fontName; - } + /** + * Sets the value of the normaliseSequenceLogo property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setNormaliseSequenceLogo(Boolean value) + { + this.normaliseSequenceLogo = value; + } - /** - * Sets the value of the fontName property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setFontName(String value) { - this.fontName = value; - } + /** + * Gets the value of the ignoreGapsinConsensus property. + * + * @return possible object is {@link Boolean } + * + */ + public boolean isIgnoreGapsinConsensus() + { + if (ignoreGapsinConsensus == null) + { + return true; + } + else + { + return ignoreGapsinConsensus; + } + } - /** - * Gets the value of the fontSize property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getFontSize() { - return fontSize; - } + /** + * Sets the value of the ignoreGapsinConsensus property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setIgnoreGapsinConsensus(Boolean value) + { + this.ignoreGapsinConsensus = value; + } - /** - * Sets the value of the fontSize property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setFontSize(Integer value) { - this.fontSize = value; - } + /** + * Gets the value of the startRes property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getStartRes() + { + return startRes; + } - /** - * Gets the value of the fontStyle property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getFontStyle() { - return fontStyle; - } + /** + * Sets the value of the startRes property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setStartRes(Integer value) + { + this.startRes = value; + } - /** - * Sets the value of the fontStyle property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setFontStyle(Integer value) { - this.fontStyle = value; - } + /** + * Gets the value of the startSeq property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getStartSeq() + { + return startSeq; + } - /** - * Gets the value of the scaleProteinAsCdna property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public boolean isScaleProteinAsCdna() { - if (scaleProteinAsCdna == null) { - return true; - } else { - return scaleProteinAsCdna; - } - } + /** + * Sets the value of the startSeq property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setStartSeq(Integer value) + { + this.startSeq = value; + } - /** - * Sets the value of the scaleProteinAsCdna property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setScaleProteinAsCdna(Boolean value) { - this.scaleProteinAsCdna = value; - } + /** + * Gets the value of the fontName property. + * + * @return possible object is {@link String } + * + */ + public String getFontName() + { + return fontName; + } - /** - * Gets the value of the viewName property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getViewName() { - return viewName; - } + /** + * Sets the value of the fontName property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setFontName(String value) + { + this.fontName = value; + } - /** - * Sets the value of the viewName property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setViewName(String value) { - this.viewName = value; - } + /** + * Gets the value of the fontSize property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getFontSize() + { + return fontSize; + } - /** - * Gets the value of the sequenceSetId property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getSequenceSetId() { - return sequenceSetId; - } + /** + * Sets the value of the fontSize property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setFontSize(Integer value) + { + this.fontSize = value; + } - /** - * Sets the value of the sequenceSetId property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setSequenceSetId(String value) { - this.sequenceSetId = value; - } + /** + * Gets the value of the fontStyle property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getFontStyle() + { + return fontStyle; + } - /** - * Gets the value of the gatheredViews property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public Boolean isGatheredViews() { - return gatheredViews; - } + /** + * Sets the value of the fontStyle property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setFontStyle(Integer value) + { + this.fontStyle = value; + } - /** - * Sets the value of the gatheredViews property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setGatheredViews(Boolean value) { - this.gatheredViews = value; - } + /** + * Gets the value of the scaleProteinAsCdna property. + * + * @return possible object is {@link Boolean } + * + */ + public boolean isScaleProteinAsCdna() + { + if (scaleProteinAsCdna == null) + { + return true; + } + else + { + return scaleProteinAsCdna; + } + } - /** - * Gets the value of the textCol1 property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getTextCol1() { - return textCol1; - } + /** + * Sets the value of the scaleProteinAsCdna property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setScaleProteinAsCdna(Boolean value) + { + this.scaleProteinAsCdna = value; + } - /** - * Sets the value of the textCol1 property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setTextCol1(Integer value) { - this.textCol1 = value; - } + /** + * Gets the value of the viewName property. + * + * @return possible object is {@link String } + * + */ + public String getViewName() + { + return viewName; + } + + /** + * Sets the value of the viewName property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setViewName(String value) + { + this.viewName = value; + } - /** - * Gets the value of the textCol2 property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getTextCol2() { - return textCol2; - } + /** + * Gets the value of the sequenceSetId property. + * + * @return possible object is {@link String } + * + */ + public String getSequenceSetId() + { + return sequenceSetId; + } - /** - * Sets the value of the textCol2 property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setTextCol2(Integer value) { - this.textCol2 = value; - } + /** + * Sets the value of the sequenceSetId property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setSequenceSetId(String value) + { + this.sequenceSetId = value; + } - /** - * Gets the value of the textColThreshold property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getTextColThreshold() { - return textColThreshold; - } + /** + * Gets the value of the gatheredViews property. + * + * @return possible object is {@link Boolean } + * + */ + public Boolean isGatheredViews() + { + return gatheredViews; + } - /** - * Sets the value of the textColThreshold property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setTextColThreshold(Integer value) { - this.textColThreshold = value; - } + /** + * Sets the value of the gatheredViews property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setGatheredViews(Boolean value) + { + this.gatheredViews = value; + } - /** - * Gets the value of the id property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getId() { - return id; - } + /** + * Gets the value of the textCol1 property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getTextCol1() + { + return textCol1; + } - /** - * Sets the value of the id property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setId(String value) { - this.id = value; - } + /** + * Sets the value of the textCol1 property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setTextCol1(Integer value) + { + this.textCol1 = value; + } - /** - * Gets the value of the complementId property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getComplementId() { - return complementId; - } + /** + * Gets the value of the textCol2 property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getTextCol2() + { + return textCol2; + } - /** - * Sets the value of the complementId property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setComplementId(String value) { - this.complementId = value; - } + /** + * Sets the value of the textCol2 property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setTextCol2(Integer value) + { + this.textCol2 = value; + } - /** - * Gets the value of the width property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getWidth() { - return width; - } + /** + * Gets the value of the textColThreshold property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getTextColThreshold() + { + return textColThreshold; + } - /** - * Sets the value of the width property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setWidth(Integer value) { - this.width = value; - } + /** + * Sets the value of the textColThreshold property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setTextColThreshold(Integer value) + { + this.textColThreshold = value; + } - /** - * Gets the value of the height property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getHeight() { - return height; - } + /** + * Gets the value of the id property. + * + * @return possible object is {@link String } + * + */ + public String getId() + { + return id; + } - /** - * Sets the value of the height property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setHeight(Integer value) { - this.height = value; - } + /** + * Sets the value of the id property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setId(String value) + { + this.id = value; + } - /** - * Gets the value of the xpos property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getXpos() { - return xpos; - } + /** + * Gets the value of the complementId property. + * + * @return possible object is {@link String } + * + */ + public String getComplementId() + { + return complementId; + } - /** - * Sets the value of the xpos property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setXpos(Integer value) { - this.xpos = value; - } + /** + * Sets the value of the complementId property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setComplementId(String value) + { + this.complementId = value; + } - /** - * Gets the value of the ypos property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getYpos() { - return ypos; - } + /** + * Gets the value of the width property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getWidth() + { + return width; + } - /** - * Sets the value of the ypos property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setYpos(Integer value) { - this.ypos = value; - } + /** + * Sets the value of the width property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setWidth(Integer value) + { + this.width = value; + } + /** + * Gets the value of the height property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getHeight() + { + return height; + } - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -         * <complexType>
        -         *   <complexContent>
        -         *     <extension base="{www.jalview.org/xml/wsparamset}WebServiceParameterSet">
        -         *       <attribute name="calcId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        -         *       <attribute name="needsUpdate" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        -         *       <attribute name="autoUpdate" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        -         *     </extension>
        -         *   </complexContent>
        -         * </complexType>
        -         * 
        - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class CalcIdParam - extends WebServiceParameterSet - { + /** + * Sets the value of the height property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setHeight(Integer value) + { + this.height = value; + } - @XmlAttribute(name = "calcId", required = true) - protected String calcId; - @XmlAttribute(name = "needsUpdate") - protected Boolean needsUpdate; - @XmlAttribute(name = "autoUpdate", required = true) - protected boolean autoUpdate; - - /** - * Gets the value of the calcId property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getCalcId() { - return calcId; - } - - /** - * Sets the value of the calcId property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setCalcId(String value) { - this.calcId = value; - } - - /** - * Gets the value of the needsUpdate property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public boolean isNeedsUpdate() { - if (needsUpdate == null) { - return false; - } else { - return needsUpdate; - } - } - - /** - * Sets the value of the needsUpdate property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setNeedsUpdate(Boolean value) { - this.needsUpdate = value; - } - - /** - * Gets the value of the autoUpdate property. - * - */ - public boolean isAutoUpdate() { - return autoUpdate; - } - - /** - * Sets the value of the autoUpdate property. - * - */ - public void setAutoUpdate(boolean value) { - this.autoUpdate = value; - } + /** + * Gets the value of the xpos property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getXpos() + { + return xpos; + } - } + /** + * Sets the value of the xpos property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setXpos(Integer value) + { + this.xpos = value; + } + /** + * Gets the value of the ypos property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getYpos() + { + return ypos; + } - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -         * <complexType>
        -         *   <complexContent>
        -         *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *       <attribute name="start" type="{http://www.w3.org/2001/XMLSchema}int" />
        -         *       <attribute name="end" type="{http://www.w3.org/2001/XMLSchema}int" />
        -         *     </restriction>
        -         *   </complexContent>
        -         * </complexType>
        -         * 
        - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class HiddenColumns { - - @XmlAttribute(name = "start") - protected Integer start; - @XmlAttribute(name = "end") - protected Integer end; - - /** - * Gets the value of the start property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getStart() { - return start; - } - - /** - * Sets the value of the start property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setStart(Integer value) { - this.start = value; - } - - /** - * Gets the value of the end property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getEnd() { - return end; - } - - /** - * Sets the value of the end property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setEnd(Integer value) { - this.end = value; - } + /** + * Sets the value of the ypos property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setYpos(Integer value) + { + this.ypos = value; + } + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +     * <complexType>
        +     *   <complexContent>
        +     *     <extension base="{www.jalview.org/xml/wsparamset}WebServiceParameterSet">
        +     *       <attribute name="calcId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        +     *       <attribute name="needsUpdate" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
        +     *       <attribute name="autoUpdate" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
        +     *     </extension>
        +     *   </complexContent>
        +     * </complexType>
        +     * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class CalcIdParam extends WebServiceParameterSet + { + + @XmlAttribute(name = "calcId", required = true) + protected String calcId; + + @XmlAttribute(name = "needsUpdate") + protected Boolean needsUpdate; + + @XmlAttribute(name = "autoUpdate", required = true) + protected boolean autoUpdate; + + /** + * Gets the value of the calcId property. + * + * @return possible object is {@link String } + * + */ + public String getCalcId() + { + return calcId; + } + + /** + * Sets the value of the calcId property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setCalcId(String value) + { + this.calcId = value; + } + + /** + * Gets the value of the needsUpdate property. + * + * @return possible object is {@link Boolean } + * + */ + public boolean isNeedsUpdate() + { + if (needsUpdate == null) + { + return false; } + else + { + return needsUpdate; + } + } + + /** + * Sets the value of the needsUpdate property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setNeedsUpdate(Boolean value) + { + this.needsUpdate = value; + } + + /** + * Gets the value of the autoUpdate property. + * + */ + public boolean isAutoUpdate() + { + return autoUpdate; + } + + /** + * Sets the value of the autoUpdate property. + * + */ + public void setAutoUpdate(boolean value) + { + this.autoUpdate = value; + } + + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +     * <complexType>
        +     *   <complexContent>
        +     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +     *       <attribute name="start" type="{http://www.w3.org/2001/XMLSchema}int" />
        +     *       <attribute name="end" type="{http://www.w3.org/2001/XMLSchema}int" />
        +     *     </restriction>
        +     *   </complexContent>
        +     * </complexType>
        +     * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class HiddenColumns + { + + @XmlAttribute(name = "start") + protected Integer start; + + @XmlAttribute(name = "end") + protected Integer end; + + /** + * Gets the value of the start property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getStart() + { + return start; + } + + /** + * Sets the value of the start property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setStart(Integer value) + { + this.start = value; + } + + /** + * Gets the value of the end property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getEnd() + { + return end; + } + + /** + * Sets the value of the end property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setEnd(Integer value) + { + this.end = value; + } } + } + } diff --git a/src/jalview/xml/binding/jalview/JalviewUserColours.java b/src/jalview/xml/binding/jalview/JalviewUserColours.java index e1ee27e..be68266 100644 --- a/src/jalview/xml/binding/jalview/JalviewUserColours.java +++ b/src/jalview/xml/binding/jalview/JalviewUserColours.java @@ -5,7 +5,6 @@ // Generated on: 2021.08.30 at 11:05:22 AM BST // - package jalview.xml.binding.jalview; import java.util.ArrayList; @@ -16,597 +15,585 @@ import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; - /** * <p>Java class for JalviewUserColours complex type. * - * <p>The following schema fragment specifies the expected content contained within this class. + * <p>The following schema fragment specifies the expected content + * contained within this class. * - * <pre> - * &lt;complexType name="JalviewUserColours"&gt; - * &lt;complexContent&gt; - * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; - * &lt;sequence&gt; - * &lt;element name="Version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt; - * &lt;element name="colour" maxOccurs="unbounded" minOccurs="0"&gt; - * &lt;complexType&gt; - * &lt;complexContent&gt; - * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; - * &lt;sequence&gt; - * &lt;element name="attributeName" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="2" minOccurs="0"/&gt; - * &lt;/sequence&gt; - * &lt;attribute name="Name" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; - * &lt;attribute name="RGB" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; - * &lt;attribute name="minRGB" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; - * &lt;attribute name="noValueColour" type="{www.jalview.org/colours}NoValueColour" default="Min" /&gt; - * &lt;attribute name="threshType" type="{www.jalview.org/colours}ThresholdType" /&gt; - * &lt;attribute name="threshold" type="{http://www.w3.org/2001/XMLSchema}float" /&gt; - * &lt;attribute name="max" type="{http://www.w3.org/2001/XMLSchema}float" /&gt; - * &lt;attribute name="min" type="{http://www.w3.org/2001/XMLSchema}float" /&gt; - * &lt;attribute name="colourByLabel" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt; - * &lt;attribute name="autoScale" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt; - * &lt;/restriction&gt; - * &lt;/complexContent&gt; - * &lt;/complexType&gt; - * &lt;/element&gt; - * &lt;element name="filter" maxOccurs="unbounded" minOccurs="0"&gt; - * &lt;complexType&gt; - * &lt;complexContent&gt; - * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; - * &lt;sequence&gt; - * &lt;element name="matcherSet" type="{www.jalview.org/colours}FeatureMatcherSet"/&gt; - * &lt;/sequence&gt; - * &lt;attribute name="featureType" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; - * &lt;/restriction&gt; - * &lt;/complexContent&gt; - * &lt;/complexType&gt; - * &lt;/element&gt; - * &lt;/sequence&gt; - * &lt;attribute name="schemeName" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; - * &lt;/restriction&gt; - * &lt;/complexContent&gt; - * &lt;/complexType&gt; - * </pre> + * <pre> &lt;complexType name="JalviewUserColours"&gt; + * &lt;complexContent&gt; &lt;restriction + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; + * &lt;sequence&gt; &lt;element name="Version" + * type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt; + * &lt;element name="colour" maxOccurs="unbounded" minOccurs="0"&gt; + * &lt;complexType&gt; &lt;complexContent&gt; + * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; + * &lt;sequence&gt; &lt;element name="attributeName" + * type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="2" + * minOccurs="0"/&gt; &lt;/sequence&gt; &lt;attribute + * name="Name" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; + * &lt;attribute name="RGB" use="required" + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute + * name="minRGB" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; + * &lt;attribute name="noValueColour" + * type="{www.jalview.org/colours}NoValueColour" default="Min" /&gt; + * &lt;attribute name="threshType" + * type="{www.jalview.org/colours}ThresholdType" /&gt; &lt;attribute + * name="threshold" type="{http://www.w3.org/2001/XMLSchema}float" /&gt; + * &lt;attribute name="max" type="{http://www.w3.org/2001/XMLSchema}float" + * /&gt; &lt;attribute name="min" + * type="{http://www.w3.org/2001/XMLSchema}float" /&gt; &lt;attribute + * name="colourByLabel" type="{http://www.w3.org/2001/XMLSchema}boolean" + * /&gt; &lt;attribute name="autoScale" + * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt; + * &lt;/restriction&gt; &lt;/complexContent&gt; + * &lt;/complexType&gt; &lt;/element&gt; &lt;element + * name="filter" maxOccurs="unbounded" minOccurs="0"&gt; + * &lt;complexType&gt; &lt;complexContent&gt; + * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; + * &lt;sequence&gt; &lt;element name="matcherSet" + * type="{www.jalview.org/colours}FeatureMatcherSet"/&gt; + * &lt;/sequence&gt; &lt;attribute name="featureType" use="required" + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; + * &lt;/restriction&gt; &lt;/complexContent&gt; + * &lt;/complexType&gt; &lt;/element&gt; + * &lt;/sequence&gt; &lt;attribute name="schemeName" + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; + * &lt;/restriction&gt; &lt;/complexContent&gt; + * &lt;/complexType&gt; </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "JalviewUserColours", namespace = "www.jalview.org/colours", propOrder = { - "version", - "colour", - "filter" -}) -public class JalviewUserColours { - - @XmlElement(name = "Version", namespace = "") - protected String version; - @XmlElement(namespace = "") - protected List colour; +@XmlType( + name = "JalviewUserColours", + namespace = "www.jalview.org/colours", + propOrder = + { "version", "colour", "filter" }) +public class JalviewUserColours +{ + + @XmlElement(name = "Version", namespace = "") + protected String version; + + @XmlElement(namespace = "") + protected List colour; + + @XmlElement(namespace = "") + protected List filter; + + @XmlAttribute(name = "schemeName") + protected String schemeName; + + /** + * Gets the value of the version property. + * + * @return possible object is {@link String } + * + */ + public String getVersion() + { + return version; + } + + /** + * Sets the value of the version property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setVersion(String value) + { + this.version = value; + } + + /** + * Gets the value of the colour property. + * + * <p> This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will be + * present inside the JAXB object. This is why there is not a + * <CODE>set</CODE> method for the colour property. + * + * <p> For example, to add a new item, do as follows: <pre> + * getColour().add(newItem); </pre> + * + * + * <p> Objects of the following type(s) are allowed in the list + * {@link JalviewUserColours.Colour } + * + * + */ + public List getColour() + { + if (colour == null) + { + colour = new ArrayList(); + } + return this.colour; + } + + /** + * Gets the value of the filter property. + * + * <p> This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will be + * present inside the JAXB object. This is why there is not a + * <CODE>set</CODE> method for the filter property. + * + * <p> For example, to add a new item, do as follows: <pre> + * getFilter().add(newItem); </pre> + * + * + * <p> Objects of the following type(s) are allowed in the list + * {@link JalviewUserColours.Filter } + * + * + */ + public List getFilter() + { + if (filter == null) + { + filter = new ArrayList(); + } + return this.filter; + } + + /** + * Gets the value of the schemeName property. + * + * @return possible object is {@link String } + * + */ + public String getSchemeName() + { + return schemeName; + } + + /** + * Sets the value of the schemeName property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setSchemeName(String value) + { + this.schemeName = value; + } + + /** + * <p>Java class for anonymous complex type. + * + * <p>The following schema fragment specifies the expected content + * contained within this class. + * + * <pre> &lt;complexType&gt; &lt;complexContent&gt; + * &lt;restriction + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; + * &lt;sequence&gt; &lt;element name="attributeName" + * type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="2" + * minOccurs="0"/&gt; &lt;/sequence&gt; &lt;attribute + * name="Name" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; + * &lt;attribute name="RGB" use="required" + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute + * name="minRGB" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; + * &lt;attribute name="noValueColour" + * type="{www.jalview.org/colours}NoValueColour" default="Min" /&gt; + * &lt;attribute name="threshType" + * type="{www.jalview.org/colours}ThresholdType" /&gt; &lt;attribute + * name="threshold" type="{http://www.w3.org/2001/XMLSchema}float" /&gt; + * &lt;attribute name="max" type="{http://www.w3.org/2001/XMLSchema}float" + * /&gt; &lt;attribute name="min" + * type="{http://www.w3.org/2001/XMLSchema}float" /&gt; &lt;attribute + * name="colourByLabel" type="{http://www.w3.org/2001/XMLSchema}boolean" + * /&gt; &lt;attribute name="autoScale" + * type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt; + * &lt;/restriction&gt; &lt;/complexContent&gt; + * &lt;/complexType&gt; </pre> + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "attributeName" }) + public static class Colour + { + @XmlElement(namespace = "") - protected List filter; - @XmlAttribute(name = "schemeName") - protected String schemeName; + protected List attributeName; + + @XmlAttribute(name = "Name") + protected String name; + + @XmlAttribute(name = "RGB", required = true) + protected String rgb; + + @XmlAttribute(name = "minRGB") + protected String minRGB; + + @XmlAttribute(name = "noValueColour") + protected NoValueColour noValueColour; + + @XmlAttribute(name = "threshType") + protected ThresholdType threshType; + + @XmlAttribute(name = "threshold") + protected Float threshold; + + @XmlAttribute(name = "max") + protected Float max; + + @XmlAttribute(name = "min") + protected Float min; + + @XmlAttribute(name = "colourByLabel") + protected Boolean colourByLabel; + + @XmlAttribute(name = "autoScale") + protected Boolean autoScale; + + /** + * Gets the value of the attributeName property. + * + * <p> This accessor method returns a reference to the live list, not + * a snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * <CODE>set</CODE> method for the attributeName property. + * + * <p> For example, to add a new item, do as follows: <pre> + * getAttributeName().add(newItem); </pre> + * + * + * <p> Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getAttributeName() + { + if (attributeName == null) + { + attributeName = new ArrayList(); + } + return this.attributeName; + } + + /** + * Gets the value of the name property. + * + * @return possible object is {@link String } + * + */ + public String getName() + { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setName(String value) + { + this.name = value; + } + + /** + * Gets the value of the rgb property. + * + * @return possible object is {@link String } + * + */ + public String getRGB() + { + return rgb; + } + + /** + * Sets the value of the rgb property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setRGB(String value) + { + this.rgb = value; + } + + /** + * Gets the value of the minRGB property. + * + * @return possible object is {@link String } + * + */ + public String getMinRGB() + { + return minRGB; + } + + /** + * Sets the value of the minRGB property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setMinRGB(String value) + { + this.minRGB = value; + } /** - * Gets the value of the version property. + * Gets the value of the noValueColour property. + * + * @return possible object is {@link NoValueColour } * - * @return - * possible object is - * {@link String } - * */ - public String getVersion() { - return version; + public NoValueColour getNoValueColour() + { + if (noValueColour == null) + { + return NoValueColour.MIN; + } + else + { + return noValueColour; + } } /** - * Sets the value of the version property. + * Sets the value of the noValueColour property. * * @param value - * allowed object is - * {@link String } - * + * allowed object is {@link NoValueColour } + * */ - public void setVersion(String value) { - this.version = value; + public void setNoValueColour(NoValueColour value) + { + this.noValueColour = value; } /** - * Gets the value of the colour property. + * Gets the value of the threshType property. * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the colour property. + * @return possible object is {@link ThresholdType } * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getColour().add(newItem); - * </pre> + */ + public ThresholdType getThreshType() + { + return threshType; + } + + /** + * Sets the value of the threshType property. * + * @param value + * allowed object is {@link ThresholdType } * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link JalviewUserColours.Colour } + */ + public void setThreshType(ThresholdType value) + { + this.threshType = value; + } + + /** + * Gets the value of the threshold property. * + * @return possible object is {@link Float } * */ - public List getColour() { - if (colour == null) { - colour = new ArrayList(); - } - return this.colour; + public Float getThreshold() + { + return threshold; } /** - * Gets the value of the filter property. + * Sets the value of the threshold property. * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the filter property. + * @param value + * allowed object is {@link Float } * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getFilter().add(newItem); - * </pre> + */ + public void setThreshold(Float value) + { + this.threshold = value; + } + + /** + * Gets the value of the max property. * + * @return possible object is {@link Float } * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link JalviewUserColours.Filter } + */ + public Float getMax() + { + return max; + } + + /** + * Sets the value of the max property. * + * @param value + * allowed object is {@link Float } * */ - public List getFilter() { - if (filter == null) { - filter = new ArrayList(); - } - return this.filter; + public void setMax(Float value) + { + this.max = value; } /** - * Gets the value of the schemeName property. + * Gets the value of the min property. + * + * @return possible object is {@link Float } * - * @return - * possible object is - * {@link String } - * */ - public String getSchemeName() { - return schemeName; + public Float getMin() + { + return min; } /** - * Sets the value of the schemeName property. + * Sets the value of the min property. * * @param value - * allowed object is - * {@link String } - * + * allowed object is {@link Float } + * + */ + public void setMin(Float value) + { + this.min = value; + } + + /** + * Gets the value of the colourByLabel property. + * + * @return possible object is {@link Boolean } + * */ - public void setSchemeName(String value) { - this.schemeName = value; + public Boolean isColourByLabel() + { + return colourByLabel; } + /** + * Sets the value of the colourByLabel property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setColourByLabel(Boolean value) + { + this.colourByLabel = value; + } /** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * &lt;complexType&gt; - * &lt;complexContent&gt; - * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; - * &lt;sequence&gt; - * &lt;element name="attributeName" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="2" minOccurs="0"/&gt; - * &lt;/sequence&gt; - * &lt;attribute name="Name" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; - * &lt;attribute name="RGB" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; - * &lt;attribute name="minRGB" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; - * &lt;attribute name="noValueColour" type="{www.jalview.org/colours}NoValueColour" default="Min" /&gt; - * &lt;attribute name="threshType" type="{www.jalview.org/colours}ThresholdType" /&gt; - * &lt;attribute name="threshold" type="{http://www.w3.org/2001/XMLSchema}float" /&gt; - * &lt;attribute name="max" type="{http://www.w3.org/2001/XMLSchema}float" /&gt; - * &lt;attribute name="min" type="{http://www.w3.org/2001/XMLSchema}float" /&gt; - * &lt;attribute name="colourByLabel" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt; - * &lt;attribute name="autoScale" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt; - * &lt;/restriction&gt; - * &lt;/complexContent&gt; - * &lt;/complexType&gt; - * </pre> + * Gets the value of the autoScale property. * + * @return possible object is {@link Boolean } * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "attributeName" - }) - public static class Colour { - - @XmlElement(namespace = "") - protected List attributeName; - @XmlAttribute(name = "Name") - protected String name; - @XmlAttribute(name = "RGB", required = true) - protected String rgb; - @XmlAttribute(name = "minRGB") - protected String minRGB; - @XmlAttribute(name = "noValueColour") - protected NoValueColour noValueColour; - @XmlAttribute(name = "threshType") - protected ThresholdType threshType; - @XmlAttribute(name = "threshold") - protected Float threshold; - @XmlAttribute(name = "max") - protected Float max; - @XmlAttribute(name = "min") - protected Float min; - @XmlAttribute(name = "colourByLabel") - protected Boolean colourByLabel; - @XmlAttribute(name = "autoScale") - protected Boolean autoScale; - - /** - * Gets the value of the attributeName property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the attributeName property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getAttributeName().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link String } - * - * - */ - public List getAttributeName() { - if (attributeName == null) { - attributeName = new ArrayList(); - } - return this.attributeName; - } - - /** - * Gets the value of the name property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getName() { - return name; - } - - /** - * Sets the value of the name property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setName(String value) { - this.name = value; - } - - /** - * Gets the value of the rgb property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getRGB() { - return rgb; - } - - /** - * Sets the value of the rgb property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setRGB(String value) { - this.rgb = value; - } - - /** - * Gets the value of the minRGB property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getMinRGB() { - return minRGB; - } - - /** - * Sets the value of the minRGB property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setMinRGB(String value) { - this.minRGB = value; - } - - /** - * Gets the value of the noValueColour property. - * - * @return - * possible object is - * {@link NoValueColour } - * - */ - public NoValueColour getNoValueColour() { - if (noValueColour == null) { - return NoValueColour.MIN; - } else { - return noValueColour; - } - } - - /** - * Sets the value of the noValueColour property. - * - * @param value - * allowed object is - * {@link NoValueColour } - * - */ - public void setNoValueColour(NoValueColour value) { - this.noValueColour = value; - } - - /** - * Gets the value of the threshType property. - * - * @return - * possible object is - * {@link ThresholdType } - * - */ - public ThresholdType getThreshType() { - return threshType; - } - - /** - * Sets the value of the threshType property. - * - * @param value - * allowed object is - * {@link ThresholdType } - * - */ - public void setThreshType(ThresholdType value) { - this.threshType = value; - } - - /** - * Gets the value of the threshold property. - * - * @return - * possible object is - * {@link Float } - * - */ - public Float getThreshold() { - return threshold; - } - - /** - * Sets the value of the threshold property. - * - * @param value - * allowed object is - * {@link Float } - * - */ - public void setThreshold(Float value) { - this.threshold = value; - } - - /** - * Gets the value of the max property. - * - * @return - * possible object is - * {@link Float } - * - */ - public Float getMax() { - return max; - } - - /** - * Sets the value of the max property. - * - * @param value - * allowed object is - * {@link Float } - * - */ - public void setMax(Float value) { - this.max = value; - } - - /** - * Gets the value of the min property. - * - * @return - * possible object is - * {@link Float } - * - */ - public Float getMin() { - return min; - } - - /** - * Sets the value of the min property. - * - * @param value - * allowed object is - * {@link Float } - * - */ - public void setMin(Float value) { - this.min = value; - } - - /** - * Gets the value of the colourByLabel property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public Boolean isColourByLabel() { - return colourByLabel; - } - - /** - * Sets the value of the colourByLabel property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setColourByLabel(Boolean value) { - this.colourByLabel = value; - } - - /** - * Gets the value of the autoScale property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public Boolean isAutoScale() { - return autoScale; - } - - /** - * Sets the value of the autoScale property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setAutoScale(Boolean value) { - this.autoScale = value; - } + public Boolean isAutoScale() + { + return autoScale; + } + /** + * Sets the value of the autoScale property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setAutoScale(Boolean value) + { + this.autoScale = value; } + } + + /** + * <p>Java class for anonymous complex type. + * + * <p>The following schema fragment specifies the expected content + * contained within this class. + * + * <pre> &lt;complexType&gt; &lt;complexContent&gt; + * &lt;restriction + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; + * &lt;sequence&gt; &lt;element name="matcherSet" + * type="{www.jalview.org/colours}FeatureMatcherSet"/&gt; + * &lt;/sequence&gt; &lt;attribute name="featureType" + * use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; + * &lt;/restriction&gt; &lt;/complexContent&gt; + * &lt;/complexType&gt; </pre> + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "matcherSet" }) + public static class Filter + { + + @XmlElement(namespace = "", required = true) + protected FeatureMatcherSet matcherSet; + + @XmlAttribute(name = "featureType", required = true) + protected String featureType; /** - * <p>Java class for anonymous complex type. + * Gets the value of the matcherSet property. * - * <p>The following schema fragment specifies the expected content contained within this class. + * @return possible object is {@link FeatureMatcherSet } * - * <pre> - * &lt;complexType&gt; - * &lt;complexContent&gt; - * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; - * &lt;sequence&gt; - * &lt;element name="matcherSet" type="{www.jalview.org/colours}FeatureMatcherSet"/&gt; - * &lt;/sequence&gt; - * &lt;attribute name="featureType" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; - * &lt;/restriction&gt; - * &lt;/complexContent&gt; - * &lt;/complexType&gt; - * </pre> + */ + public FeatureMatcherSet getMatcherSet() + { + return matcherSet; + } + + /** + * Sets the value of the matcherSet property. * + * @param value + * allowed object is {@link FeatureMatcherSet } * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "matcherSet" - }) - public static class Filter { - - @XmlElement(namespace = "", required = true) - protected FeatureMatcherSet matcherSet; - @XmlAttribute(name = "featureType", required = true) - protected String featureType; - - /** - * Gets the value of the matcherSet property. - * - * @return - * possible object is - * {@link FeatureMatcherSet } - * - */ - public FeatureMatcherSet getMatcherSet() { - return matcherSet; - } - - /** - * Sets the value of the matcherSet property. - * - * @param value - * allowed object is - * {@link FeatureMatcherSet } - * - */ - public void setMatcherSet(FeatureMatcherSet value) { - this.matcherSet = value; - } - - /** - * Gets the value of the featureType property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getFeatureType() { - return featureType; - } - - /** - * Sets the value of the featureType property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setFeatureType(String value) { - this.featureType = value; - } + public void setMatcherSet(FeatureMatcherSet value) + { + this.matcherSet = value; + } + /** + * Gets the value of the featureType property. + * + * @return possible object is {@link String } + * + */ + public String getFeatureType() + { + return featureType; } + /** + * Sets the value of the featureType property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setFeatureType(String value) + { + this.featureType = value; + } + + } + } diff --git a/src/jalview/xml/binding/jalview/MapListType.java b/src/jalview/xml/binding/jalview/MapListType.java index c93112c..edc69b4 100644 --- a/src/jalview/xml/binding/jalview/MapListType.java +++ b/src/jalview/xml/binding/jalview/MapListType.java @@ -5,7 +5,6 @@ // Generated on: 2021.08.30 at 11:05:22 AM BST // - package jalview.xml.binding.jalview; import java.math.BigInteger; @@ -18,298 +17,291 @@ import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.bind.annotation.XmlType; - /** * - * This effectively represents a java.util.MapList object - * + * This effectively represents a java.util.MapList object + * * * <p>Java class for mapListType complex type. * - * <p>The following schema fragment specifies the expected content contained within this class. + * <p>The following schema fragment specifies the expected content + * contained within this class. * - * <pre> - * &lt;complexType name="mapListType"&gt; - * &lt;complexContent&gt; - * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; - * &lt;sequence&gt; - * &lt;element name="mapListFrom" maxOccurs="unbounded" minOccurs="0"&gt; - * &lt;complexType&gt; - * &lt;complexContent&gt; - * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; - * &lt;attribute name="start" use="required" type="{http://www.w3.org/2001/XMLSchema}int" /&gt; - * &lt;attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}int" /&gt; - * &lt;/restriction&gt; - * &lt;/complexContent&gt; - * &lt;/complexType&gt; - * &lt;/element&gt; - * &lt;element name="mapListTo" maxOccurs="unbounded" minOccurs="0"&gt; - * &lt;complexType&gt; - * &lt;complexContent&gt; - * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; - * &lt;attribute name="start" use="required" type="{http://www.w3.org/2001/XMLSchema}int" /&gt; - * &lt;attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}int" /&gt; - * &lt;/restriction&gt; - * &lt;/complexContent&gt; - * &lt;/complexType&gt; - * &lt;/element&gt; - * &lt;/sequence&gt; - * &lt;attribute name="mapFromUnit" use="required" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" /&gt; - * &lt;attribute name="mapToUnit" use="required" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" /&gt; - * &lt;/restriction&gt; - * &lt;/complexContent&gt; - * &lt;/complexType&gt; - * </pre> + * <pre> &lt;complexType name="mapListType"&gt; + * &lt;complexContent&gt; &lt;restriction + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; + * &lt;sequence&gt; &lt;element name="mapListFrom" + * maxOccurs="unbounded" minOccurs="0"&gt; &lt;complexType&gt; + * &lt;complexContent&gt; &lt;restriction + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; &lt;attribute + * name="start" use="required" type="{http://www.w3.org/2001/XMLSchema}int" + * /&gt; &lt;attribute name="end" use="required" + * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; + * &lt;/restriction&gt; &lt;/complexContent&gt; + * &lt;/complexType&gt; &lt;/element&gt; &lt;element + * name="mapListTo" maxOccurs="unbounded" minOccurs="0"&gt; + * &lt;complexType&gt; &lt;complexContent&gt; + * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; + * &lt;attribute name="start" use="required" + * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; &lt;attribute + * name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}int" + * /&gt; &lt;/restriction&gt; &lt;/complexContent&gt; + * &lt;/complexType&gt; &lt;/element&gt; + * &lt;/sequence&gt; &lt;attribute name="mapFromUnit" use="required" + * type="{http://www.w3.org/2001/XMLSchema}positiveInteger" /&gt; + * &lt;attribute name="mapToUnit" use="required" + * type="{http://www.w3.org/2001/XMLSchema}positiveInteger" /&gt; + * &lt;/restriction&gt; &lt;/complexContent&gt; + * &lt;/complexType&gt; </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "mapListType", propOrder = { - "mapListFrom", - "mapListTo" -}) -@XmlSeeAlso({ - Mapping.class -}) -public class MapListType { +@XmlType(name = "mapListType", propOrder = { "mapListFrom", "mapListTo" }) +@XmlSeeAlso({ Mapping.class }) +public class MapListType +{ + + protected List mapListFrom; + + protected List mapListTo; + + @XmlAttribute(name = "mapFromUnit", required = true) + @XmlSchemaType(name = "positiveInteger") + protected BigInteger mapFromUnit; + + @XmlAttribute(name = "mapToUnit", required = true) + @XmlSchemaType(name = "positiveInteger") + protected BigInteger mapToUnit; + + /** + * Gets the value of the mapListFrom property. + * + * <p> This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will be + * present inside the JAXB object. This is why there is not a + * <CODE>set</CODE> method for the mapListFrom property. + * + * <p> For example, to add a new item, do as follows: <pre> + * getMapListFrom().add(newItem); </pre> + * + * + * <p> Objects of the following type(s) are allowed in the list + * {@link MapListType.MapListFrom } + * + * + */ + public List getMapListFrom() + { + if (mapListFrom == null) + { + mapListFrom = new ArrayList(); + } + return this.mapListFrom; + } + + /** + * Gets the value of the mapListTo property. + * + * <p> This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will be + * present inside the JAXB object. This is why there is not a + * <CODE>set</CODE> method for the mapListTo property. + * + * <p> For example, to add a new item, do as follows: <pre> + * getMapListTo().add(newItem); </pre> + * + * + * <p> Objects of the following type(s) are allowed in the list + * {@link MapListType.MapListTo } + * + * + */ + public List getMapListTo() + { + if (mapListTo == null) + { + mapListTo = new ArrayList(); + } + return this.mapListTo; + } + + /** + * Gets the value of the mapFromUnit property. + * + * @return possible object is {@link BigInteger } + * + */ + public BigInteger getMapFromUnit() + { + return mapFromUnit; + } + + /** + * Sets the value of the mapFromUnit property. + * + * @param value + * allowed object is {@link BigInteger } + * + */ + public void setMapFromUnit(BigInteger value) + { + this.mapFromUnit = value; + } - protected List mapListFrom; - protected List mapListTo; - @XmlAttribute(name = "mapFromUnit", required = true) - @XmlSchemaType(name = "positiveInteger") - protected BigInteger mapFromUnit; - @XmlAttribute(name = "mapToUnit", required = true) - @XmlSchemaType(name = "positiveInteger") - protected BigInteger mapToUnit; + /** + * Gets the value of the mapToUnit property. + * + * @return possible object is {@link BigInteger } + * + */ + public BigInteger getMapToUnit() + { + return mapToUnit; + } + + /** + * Sets the value of the mapToUnit property. + * + * @param value + * allowed object is {@link BigInteger } + * + */ + public void setMapToUnit(BigInteger value) + { + this.mapToUnit = value; + } + + /** + * <p>Java class for anonymous complex type. + * + * <p>The following schema fragment specifies the expected content + * contained within this class. + * + * <pre> &lt;complexType&gt; &lt;complexContent&gt; + * &lt;restriction + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; &lt;attribute + * name="start" use="required" type="{http://www.w3.org/2001/XMLSchema}int" + * /&gt; &lt;attribute name="end" use="required" + * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; + * &lt;/restriction&gt; &lt;/complexContent&gt; + * &lt;/complexType&gt; </pre> + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class MapListFrom + { + + @XmlAttribute(name = "start", required = true) + protected int start; + + @XmlAttribute(name = "end", required = true) + protected int end; /** - * Gets the value of the mapListFrom property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the mapListFrom property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getMapListFrom().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link MapListType.MapListFrom } - * + * Gets the value of the start property. * */ - public List getMapListFrom() { - if (mapListFrom == null) { - mapListFrom = new ArrayList(); - } - return this.mapListFrom; + public int getStart() + { + return start; } /** - * Gets the value of the mapListTo property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the mapListTo property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getMapListTo().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link MapListType.MapListTo } - * + * Sets the value of the start property. * */ - public List getMapListTo() { - if (mapListTo == null) { - mapListTo = new ArrayList(); - } - return this.mapListTo; + public void setStart(int value) + { + this.start = value; } /** - * Gets the value of the mapFromUnit property. + * Gets the value of the end property. * - * @return - * possible object is - * {@link BigInteger } - * */ - public BigInteger getMapFromUnit() { - return mapFromUnit; + public int getEnd() + { + return end; } /** - * Sets the value of the mapFromUnit property. + * Sets the value of the end property. * - * @param value - * allowed object is - * {@link BigInteger } - * */ - public void setMapFromUnit(BigInteger value) { - this.mapFromUnit = value; + public void setEnd(int value) + { + this.end = value; } + } + + /** + * <p>Java class for anonymous complex type. + * + * <p>The following schema fragment specifies the expected content + * contained within this class. + * + * <pre> &lt;complexType&gt; &lt;complexContent&gt; + * &lt;restriction + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; &lt;attribute + * name="start" use="required" type="{http://www.w3.org/2001/XMLSchema}int" + * /&gt; &lt;attribute name="end" use="required" + * type="{http://www.w3.org/2001/XMLSchema}int" /&gt; + * &lt;/restriction&gt; &lt;/complexContent&gt; + * &lt;/complexType&gt; </pre> + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class MapListTo + { + + @XmlAttribute(name = "start", required = true) + protected int start; + + @XmlAttribute(name = "end", required = true) + protected int end; + /** - * Gets the value of the mapToUnit property. + * Gets the value of the start property. * - * @return - * possible object is - * {@link BigInteger } - * */ - public BigInteger getMapToUnit() { - return mapToUnit; + public int getStart() + { + return start; } /** - * Sets the value of the mapToUnit property. + * Sets the value of the start property. * - * @param value - * allowed object is - * {@link BigInteger } - * */ - public void setMapToUnit(BigInteger value) { - this.mapToUnit = value; + public void setStart(int value) + { + this.start = value; } - /** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * &lt;complexType&gt; - * &lt;complexContent&gt; - * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; - * &lt;attribute name="start" use="required" type="{http://www.w3.org/2001/XMLSchema}int" /&gt; - * &lt;attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}int" /&gt; - * &lt;/restriction&gt; - * &lt;/complexContent&gt; - * &lt;/complexType&gt; - * </pre> - * + * Gets the value of the end property. * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class MapListFrom { - - @XmlAttribute(name = "start", required = true) - protected int start; - @XmlAttribute(name = "end", required = true) - protected int end; - - /** - * Gets the value of the start property. - * - */ - public int getStart() { - return start; - } - - /** - * Sets the value of the start property. - * - */ - public void setStart(int value) { - this.start = value; - } - - /** - * Gets the value of the end property. - * - */ - public int getEnd() { - return end; - } - - /** - * Sets the value of the end property. - * - */ - public void setEnd(int value) { - this.end = value; - } - + public int getEnd() + { + return end; } - /** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * &lt;complexType&gt; - * &lt;complexContent&gt; - * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; - * &lt;attribute name="start" use="required" type="{http://www.w3.org/2001/XMLSchema}int" /&gt; - * &lt;attribute name="end" use="required" type="{http://www.w3.org/2001/XMLSchema}int" /&gt; - * &lt;/restriction&gt; - * &lt;/complexContent&gt; - * &lt;/complexType&gt; - * </pre> - * + * Sets the value of the end property. * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class MapListTo { - - @XmlAttribute(name = "start", required = true) - protected int start; - @XmlAttribute(name = "end", required = true) - protected int end; - - /** - * Gets the value of the start property. - * - */ - public int getStart() { - return start; - } - - /** - * Sets the value of the start property. - * - */ - public void setStart(int value) { - this.start = value; - } - - /** - * Gets the value of the end property. - * - */ - public int getEnd() { - return end; - } - - /** - * Sets the value of the end property. - * - */ - public void setEnd(int value) { - this.end = value; - } - + public void setEnd(int value) + { + this.end = value; } + } + } diff --git a/src/jalview/xml/binding/jalview/Mapping.java b/src/jalview/xml/binding/jalview/Mapping.java index 24f5b01..d79bdee 100644 --- a/src/jalview/xml/binding/jalview/Mapping.java +++ b/src/jalview/xml/binding/jalview/Mapping.java @@ -5,7 +5,6 @@ // Generated on: 2021.08.30 at 11:05:22 AM BST // - package jalview.xml.binding.jalview; import javax.xml.bind.annotation.XmlAccessType; @@ -15,127 +14,115 @@ import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; - /** * - * Represent the jalview.datamodel.Mapping object - it also provides - * a way of storing sequences that are mapped 'to' without adding them - * to the sequence set (which will mean they are then added to the alignment too). - * + * Represent the jalview.datamodel.Mapping object - it also provides a way of + * storing sequences that are mapped 'to' without adding them to the sequence + * set (which will mean they are then added to the alignment too). + * * * <p>Java class for anonymous complex type. * - * <p>The following schema fragment specifies the expected content contained within this class. + * <p>The following schema fragment specifies the expected content + * contained within this class. * - * <pre> - * &lt;complexType&gt; - * &lt;complexContent&gt; - * &lt;extension base="{www.vamsas.ac.uk/jalview/version2}mapListType"&gt; - * &lt;sequence&gt; - * &lt;choice minOccurs="0"&gt; - * &lt;element ref="{www.vamsas.ac.uk/jalview/version2}Sequence"/&gt; - * &lt;element name="dseqFor"&gt; - * &lt;simpleType&gt; - * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"&gt; - * &lt;/restriction&gt; - * &lt;/simpleType&gt; - * &lt;/element&gt; - * &lt;/choice&gt; - * &lt;/sequence&gt; - * &lt;attribute name="mappingType" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; - * &lt;/extension&gt; - * &lt;/complexContent&gt; - * &lt;/complexType&gt; - * </pre> + * <pre> &lt;complexType&gt; &lt;complexContent&gt; + * &lt;extension + * base="{www.vamsas.ac.uk/jalview/version2}mapListType"&gt; + * &lt;sequence&gt; &lt;choice minOccurs="0"&gt; &lt;element + * ref="{www.vamsas.ac.uk/jalview/version2}Sequence"/&gt; &lt;element + * name="dseqFor"&gt; &lt;simpleType&gt; &lt;restriction + * base="{http://www.w3.org/2001/XMLSchema}string"&gt; + * &lt;/restriction&gt; &lt;/simpleType&gt; + * &lt;/element&gt; &lt;/choice&gt; &lt;/sequence&gt; + * &lt;attribute name="mappingType" + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; + * &lt;/extension&gt; &lt;/complexContent&gt; + * &lt;/complexType&gt; </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "sequence", - "dseqFor" -}) +@XmlType(name = "", propOrder = { "sequence", "dseqFor" }) @XmlRootElement(name = "Mapping") -public class Mapping - extends MapListType +public class Mapping extends MapListType { - @XmlElement(name = "Sequence") - protected Sequence sequence; - protected String dseqFor; - @XmlAttribute(name = "mappingType") - protected String mappingType; + @XmlElement(name = "Sequence") + protected Sequence sequence; + + protected String dseqFor; + + @XmlAttribute(name = "mappingType") + protected String mappingType; - /** - * Gets the value of the sequence property. - * - * @return - * possible object is - * {@link Sequence } - * - */ - public Sequence getSequence() { - return sequence; - } + /** + * Gets the value of the sequence property. + * + * @return possible object is {@link Sequence } + * + */ + public Sequence getSequence() + { + return sequence; + } - /** - * Sets the value of the sequence property. - * - * @param value - * allowed object is - * {@link Sequence } - * - */ - public void setSequence(Sequence value) { - this.sequence = value; - } + /** + * Sets the value of the sequence property. + * + * @param value + * allowed object is {@link Sequence } + * + */ + public void setSequence(Sequence value) + { + this.sequence = value; + } - /** - * Gets the value of the dseqFor property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDseqFor() { - return dseqFor; - } + /** + * Gets the value of the dseqFor property. + * + * @return possible object is {@link String } + * + */ + public String getDseqFor() + { + return dseqFor; + } - /** - * Sets the value of the dseqFor property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDseqFor(String value) { - this.dseqFor = value; - } + /** + * Sets the value of the dseqFor property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDseqFor(String value) + { + this.dseqFor = value; + } - /** - * Gets the value of the mappingType property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getMappingType() { - return mappingType; - } + /** + * Gets the value of the mappingType property. + * + * @return possible object is {@link String } + * + */ + public String getMappingType() + { + return mappingType; + } - /** - * Sets the value of the mappingType property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setMappingType(String value) { - this.mappingType = value; - } + /** + * Sets the value of the mappingType property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setMappingType(String value) + { + this.mappingType = value; + } } diff --git a/src/jalview/xml/binding/jalview/NoValueColour.java b/src/jalview/xml/binding/jalview/NoValueColour.java index 7e42db8..b0d667c 100644 --- a/src/jalview/xml/binding/jalview/NoValueColour.java +++ b/src/jalview/xml/binding/jalview/NoValueColour.java @@ -5,56 +5,56 @@ // Generated on: 2021.08.30 at 11:05:22 AM BST // - package jalview.xml.binding.jalview; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlType; - /** * <p>Java class for NoValueColour. * - * <p>The following schema fragment specifies the expected content contained within this class. - * <pre> - * &lt;simpleType name="NoValueColour"&gt; - * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"&gt; - * &lt;enumeration value="None"/&gt; - * &lt;enumeration value="Min"/&gt; - * &lt;enumeration value="Max"/&gt; - * &lt;/restriction&gt; - * &lt;/simpleType&gt; - * </pre> + * <p>The following schema fragment specifies the expected content + * contained within this class. <pre> &lt;simpleType + * name="NoValueColour"&gt; &lt;restriction + * base="{http://www.w3.org/2001/XMLSchema}string"&gt; &lt;enumeration + * value="None"/&gt; &lt;enumeration value="Min"/&gt; + * &lt;enumeration value="Max"/&gt; &lt;/restriction&gt; + * &lt;/simpleType&gt; </pre> * */ @XmlType(name = "NoValueColour", namespace = "www.jalview.org/colours") @XmlEnum -public enum NoValueColour { - - @XmlEnumValue("None") - NONE("None"), - @XmlEnumValue("Min") - MIN("Min"), - @XmlEnumValue("Max") - MAX("Max"); - private final String value; - - NoValueColour(String v) { - value = v; - } - - public String value() { - return value; - } - - public static NoValueColour fromValue(String v) { - for (NoValueColour c: NoValueColour.values()) { - if (c.value.equals(v)) { - return c; - } - } - throw new IllegalArgumentException(v); +public enum NoValueColour +{ + + @XmlEnumValue("None") + NONE("None"), @XmlEnumValue("Min") + MIN("Min"), @XmlEnumValue("Max") + MAX("Max"); + + private final String value; + + NoValueColour(String v) + { + value = v; + } + + public String value() + { + return value; + } + + public static NoValueColour fromValue(String v) + { + for (NoValueColour c : NoValueColour.values()) + { + if (c.value.equals(v)) + { + return c; + } } + throw new IllegalArgumentException(v); + } } diff --git a/src/jalview/xml/binding/jalview/ObjectFactory.java b/src/jalview/xml/binding/jalview/ObjectFactory.java index b6ea489..46ae594 100644 --- a/src/jalview/xml/binding/jalview/ObjectFactory.java +++ b/src/jalview/xml/binding/jalview/ObjectFactory.java @@ -5,7 +5,6 @@ // Generated on: 2021.08.30 at 11:05:22 AM BST // - package jalview.xml.binding.jalview; import javax.xml.bind.JAXBElement; @@ -13,488 +12,560 @@ import javax.xml.bind.annotation.XmlElementDecl; import javax.xml.bind.annotation.XmlRegistry; import javax.xml.namespace.QName; - /** - * This object contains factory methods for each - * Java content interface and Java element interface - * generated in the jalview.xml.binding.jalview package. - * <p>An ObjectFactory allows you to programatically - * construct new instances of the Java representation - * for XML content. The Java representation of XML - * content can consist of schema derived interfaces - * and classes representing the binding of schema - * type definitions, element declarations and model - * groups. Factory methods for each of these are - * provided in this class. + * This object contains factory methods for each Java content interface and Java + * element interface generated in the jalview.xml.binding.jalview package. + * <p>An ObjectFactory allows you to programatically construct new + * instances of the Java representation for XML content. The Java representation + * of XML content can consist of schema derived interfaces and classes + * representing the binding of schema type definitions, element declarations and + * model groups. Factory methods for each of these are provided in this class. * */ @XmlRegistry -public class ObjectFactory { - - private final static QName _JalviewModel_QNAME = new QName("www.jalview.org", "JalviewModel"); - private final static QName _JalviewUserColours_QNAME = new QName("www.jalview.org/colours", "JalviewUserColours"); - private final static QName _WebServiceParameterSet_QNAME = new QName("www.jalview.org/xml/wsparamset", "WebServiceParameterSet"); - - /** - * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: jalview.xml.binding.jalview - * - */ - public ObjectFactory() { - } - - /** - * Create an instance of {@link MapListType } - * - */ - public MapListType createMapListType() { - return new MapListType(); - } - - /** - * Create an instance of {@link Sequence } - * - */ - public Sequence createSequence() { - return new Sequence(); - } - - /** - * Create an instance of {@link AlcodonFrame } - * - */ - public AlcodonFrame createAlcodonFrame() { - return new AlcodonFrame(); - } - - /** - * Create an instance of {@link Annotation } - * - */ - public Annotation createAnnotation() { - return new Annotation(); - } - - /** - * Create an instance of {@link SequenceSet } - * - */ - public SequenceSet createSequenceSet() { - return new SequenceSet(); - } - - /** - * Create an instance of {@link FeatureMatcherSet } - * - */ - public FeatureMatcherSet createFeatureMatcherSet() { - return new FeatureMatcherSet(); - } - - /** - * Create an instance of {@link JalviewUserColours } - * - */ - public JalviewUserColours createJalviewUserColours() { - return new JalviewUserColours(); - } - - /** - * Create an instance of {@link Pdbentry } - * - */ - public Pdbentry createPdbentry() { - return new Pdbentry(); - } - - /** - * Create an instance of {@link Feature } - * - */ - public Feature createFeature() { - return new Feature(); - } - - /** - * Create an instance of {@link JalviewModel } - * - */ - public JalviewModel createJalviewModel() { - return new JalviewModel(); - } - - /** - * Create an instance of {@link JalviewModel.FeatureSettings } - * - */ - public JalviewModel.FeatureSettings createJalviewModelFeatureSettings() { - return new JalviewModel.FeatureSettings(); - } - - /** - * Create an instance of {@link JalviewModel.PcaViewer } - * - */ - public JalviewModel.PcaViewer createJalviewModelPcaViewer() { - return new JalviewModel.PcaViewer(); - } - - /** - * Create an instance of {@link JalviewModel.Viewport } - * - */ - public JalviewModel.Viewport createJalviewModelViewport() { - return new JalviewModel.Viewport(); - } - - /** - * Create an instance of {@link JalviewModel.JSeq } - * - */ - public JalviewModel.JSeq createJalviewModelJSeq() { - return new JalviewModel.JSeq(); - } - - /** - * Create an instance of {@link JalviewModel.JSeq.RnaViewer } - * - */ - public JalviewModel.JSeq.RnaViewer createJalviewModelJSeqRnaViewer() { - return new JalviewModel.JSeq.RnaViewer(); - } - - /** - * Create an instance of {@link JalviewModel.JSeq.Pdbids } - * - */ - public JalviewModel.JSeq.Pdbids createJalviewModelJSeqPdbids() { - return new JalviewModel.JSeq.Pdbids(); - } - - /** - * Create an instance of {@link AnnotationColourScheme } - * - */ - public AnnotationColourScheme createAnnotationColourScheme() { - return new AnnotationColourScheme(); - } - - /** - * Create an instance of {@link PcaDataType } - * - */ - public PcaDataType createPcaDataType() { - return new PcaDataType(); - } - - /** - * Create an instance of {@link DoubleVector } - * - */ - public DoubleVector createDoubleVector() { - return new DoubleVector(); - } - - /** - * Create an instance of {@link DoubleMatrix } - * - */ - public DoubleMatrix createDoubleMatrix() { - return new DoubleMatrix(); - } - - /** - * Create an instance of {@link Mapping } - * - */ - public Mapping createMapping() { - return new Mapping(); - } - - /** - * Create an instance of {@link MapListType.MapListFrom } - * - */ - public MapListType.MapListFrom createMapListTypeMapListFrom() { - return new MapListType.MapListFrom(); - } - - /** - * Create an instance of {@link MapListType.MapListTo } - * - */ - public MapListType.MapListTo createMapListTypeMapListTo() { - return new MapListType.MapListTo(); - } - - /** - * Create an instance of {@link SequenceType } - * - */ - public SequenceType createSequenceType() { - return new SequenceType(); - } - - /** - * Create an instance of {@link Sequence.DBRef } - * - */ - public Sequence.DBRef createSequenceDBRef() { - return new Sequence.DBRef(); - } - - /** - * Create an instance of {@link AlcodonFrame.Alcodon } - * - */ - public AlcodonFrame.Alcodon createAlcodonFrameAlcodon() { - return new AlcodonFrame.Alcodon(); - } - - /** - * Create an instance of {@link AlcodonFrame.AlcodMap } - * - */ - public AlcodonFrame.AlcodMap createAlcodonFrameAlcodMap() { - return new AlcodonFrame.AlcodMap(); - } - - /** - * Create an instance of {@link AnnotationElement } - * - */ - public AnnotationElement createAnnotationElement() { - return new AnnotationElement(); - } - - /** - * Create an instance of {@link Annotation.ThresholdLine } - * - */ - public Annotation.ThresholdLine createAnnotationThresholdLine() { - return new Annotation.ThresholdLine(); - } - - /** - * Create an instance of {@link Annotation.Property } - * - */ - public Annotation.Property createAnnotationProperty() { - return new Annotation.Property(); - } - - /** - * Create an instance of {@link SequenceSet.SequenceSetProperties } - * - */ - public SequenceSet.SequenceSetProperties createSequenceSetSequenceSetProperties() { - return new SequenceSet.SequenceSetProperties(); - } - - /** - * Create an instance of {@link VAMSAS } - * - */ - public VAMSAS createVAMSAS() { - return new VAMSAS(); - } - - /** - * Create an instance of {@link FeatureMatcher } - * - */ - public FeatureMatcher createFeatureMatcher() { - return new FeatureMatcher(); - } - - /** - * Create an instance of {@link WebServiceParameterSet } - * - */ - public WebServiceParameterSet createWebServiceParameterSet() { - return new WebServiceParameterSet(); - } - - /** - * Create an instance of {@link FeatureMatcherSet.CompoundMatcher } - * - */ - public FeatureMatcherSet.CompoundMatcher createFeatureMatcherSetCompoundMatcher() { - return new FeatureMatcherSet.CompoundMatcher(); - } - - /** - * Create an instance of {@link JalviewUserColours.Colour } - * - */ - public JalviewUserColours.Colour createJalviewUserColoursColour() { - return new JalviewUserColours.Colour(); - } - - /** - * Create an instance of {@link JalviewUserColours.Filter } - * - */ - public JalviewUserColours.Filter createJalviewUserColoursFilter() { - return new JalviewUserColours.Filter(); - } - - /** - * Create an instance of {@link Pdbentry.Property } - * - */ - public Pdbentry.Property createPdbentryProperty() { - return new Pdbentry.Property(); - } - - /** - * Create an instance of {@link Feature.OtherData } - * - */ - public Feature.OtherData createFeatureOtherData() { - return new Feature.OtherData(); - } - - /** - * Create an instance of {@link JalviewModel.JGroup } - * - */ - public JalviewModel.JGroup createJalviewModelJGroup() { - return new JalviewModel.JGroup(); - } - - /** - * Create an instance of {@link JalviewModel.UserColours } - * - */ - public JalviewModel.UserColours createJalviewModelUserColours() { - return new JalviewModel.UserColours(); - } - - /** - * Create an instance of {@link JalviewModel.Tree } - * - */ - public JalviewModel.Tree createJalviewModelTree() { - return new JalviewModel.Tree(); - } - - /** - * Create an instance of {@link JalviewModel.FeatureSettings.Setting } - * - */ - public JalviewModel.FeatureSettings.Setting createJalviewModelFeatureSettingsSetting() { - return new JalviewModel.FeatureSettings.Setting(); - } - - /** - * Create an instance of {@link JalviewModel.FeatureSettings.Group } - * - */ - public JalviewModel.FeatureSettings.Group createJalviewModelFeatureSettingsGroup() { - return new JalviewModel.FeatureSettings.Group(); - } - - /** - * Create an instance of {@link JalviewModel.PcaViewer.SequencePoint } - * - */ - public JalviewModel.PcaViewer.SequencePoint createJalviewModelPcaViewerSequencePoint() { - return new JalviewModel.PcaViewer.SequencePoint(); - } - - /** - * Create an instance of {@link JalviewModel.PcaViewer.Axis } - * - */ - public JalviewModel.PcaViewer.Axis createJalviewModelPcaViewerAxis() { - return new JalviewModel.PcaViewer.Axis(); - } - - /** - * Create an instance of {@link JalviewModel.PcaViewer.SeqPointMin } - * - */ - public JalviewModel.PcaViewer.SeqPointMin createJalviewModelPcaViewerSeqPointMin() { - return new JalviewModel.PcaViewer.SeqPointMin(); - } - - /** - * Create an instance of {@link JalviewModel.PcaViewer.SeqPointMax } - * - */ - public JalviewModel.PcaViewer.SeqPointMax createJalviewModelPcaViewerSeqPointMax() { - return new JalviewModel.PcaViewer.SeqPointMax(); - } - - /** - * Create an instance of {@link JalviewModel.Viewport.HiddenColumns } - * - */ - public JalviewModel.Viewport.HiddenColumns createJalviewModelViewportHiddenColumns() { - return new JalviewModel.Viewport.HiddenColumns(); - } - - /** - * Create an instance of {@link JalviewModel.Viewport.CalcIdParam } - * - */ - public JalviewModel.Viewport.CalcIdParam createJalviewModelViewportCalcIdParam() { - return new JalviewModel.Viewport.CalcIdParam(); - } - - /** - * Create an instance of {@link JalviewModel.JSeq.RnaViewer.SecondaryStructure } - * - */ - public JalviewModel.JSeq.RnaViewer.SecondaryStructure createJalviewModelJSeqRnaViewerSecondaryStructure() { - return new JalviewModel.JSeq.RnaViewer.SecondaryStructure(); - } - - /** - * Create an instance of {@link JalviewModel.JSeq.Pdbids.StructureState } - * - */ - public JalviewModel.JSeq.Pdbids.StructureState createJalviewModelJSeqPdbidsStructureState() { - return new JalviewModel.JSeq.Pdbids.StructureState(); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link JalviewModel }{@code >} - * - * @param value - * Java instance representing xml element's value. - * @return - * the new instance of {@link JAXBElement }{@code <}{@link JalviewModel }{@code >} - */ - @XmlElementDecl(namespace = "www.jalview.org", name = "JalviewModel") - public JAXBElement createJalviewModel(JalviewModel value) { - return new JAXBElement(_JalviewModel_QNAME, JalviewModel.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link JalviewUserColours }{@code >} - * - * @param value - * Java instance representing xml element's value. - * @return - * the new instance of {@link JAXBElement }{@code <}{@link JalviewUserColours }{@code >} - */ - @XmlElementDecl(namespace = "www.jalview.org/colours", name = "JalviewUserColours") - public JAXBElement createJalviewUserColours(JalviewUserColours value) { - return new JAXBElement(_JalviewUserColours_QNAME, JalviewUserColours.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link WebServiceParameterSet }{@code >} - * - * @param value - * Java instance representing xml element's value. - * @return - * the new instance of {@link JAXBElement }{@code <}{@link WebServiceParameterSet }{@code >} - */ - @XmlElementDecl(namespace = "www.jalview.org/xml/wsparamset", name = "WebServiceParameterSet") - public JAXBElement createWebServiceParameterSet(WebServiceParameterSet value) { - return new JAXBElement(_WebServiceParameterSet_QNAME, WebServiceParameterSet.class, null, value); - } +public class ObjectFactory +{ + + private final static QName _JalviewModel_QNAME = new QName( + "www.jalview.org", "JalviewModel"); + + private final static QName _JalviewUserColours_QNAME = new QName( + "www.jalview.org/colours", "JalviewUserColours"); + + private final static QName _WebServiceParameterSet_QNAME = new QName( + "www.jalview.org/xml/wsparamset", "WebServiceParameterSet"); + + /** + * Create a new ObjectFactory that can be used to create new instances of + * schema derived classes for package: jalview.xml.binding.jalview + * + */ + public ObjectFactory() + { + } + + /** + * Create an instance of {@link MapListType } + * + */ + public MapListType createMapListType() + { + return new MapListType(); + } + + /** + * Create an instance of {@link Sequence } + * + */ + public Sequence createSequence() + { + return new Sequence(); + } + + /** + * Create an instance of {@link AlcodonFrame } + * + */ + public AlcodonFrame createAlcodonFrame() + { + return new AlcodonFrame(); + } + + /** + * Create an instance of {@link Annotation } + * + */ + public Annotation createAnnotation() + { + return new Annotation(); + } + + /** + * Create an instance of {@link SequenceSet } + * + */ + public SequenceSet createSequenceSet() + { + return new SequenceSet(); + } + + /** + * Create an instance of {@link FeatureMatcherSet } + * + */ + public FeatureMatcherSet createFeatureMatcherSet() + { + return new FeatureMatcherSet(); + } + + /** + * Create an instance of {@link JalviewUserColours } + * + */ + public JalviewUserColours createJalviewUserColours() + { + return new JalviewUserColours(); + } + + /** + * Create an instance of {@link Pdbentry } + * + */ + public Pdbentry createPdbentry() + { + return new Pdbentry(); + } + + /** + * Create an instance of {@link Feature } + * + */ + public Feature createFeature() + { + return new Feature(); + } + + /** + * Create an instance of {@link JalviewModel } + * + */ + public JalviewModel createJalviewModel() + { + return new JalviewModel(); + } + + /** + * Create an instance of {@link JalviewModel.FeatureSettings } + * + */ + public JalviewModel.FeatureSettings createJalviewModelFeatureSettings() + { + return new JalviewModel.FeatureSettings(); + } + + /** + * Create an instance of {@link JalviewModel.PcaViewer } + * + */ + public JalviewModel.PcaViewer createJalviewModelPcaViewer() + { + return new JalviewModel.PcaViewer(); + } + + /** + * Create an instance of {@link JalviewModel.Viewport } + * + */ + public JalviewModel.Viewport createJalviewModelViewport() + { + return new JalviewModel.Viewport(); + } + + /** + * Create an instance of {@link JalviewModel.JSeq } + * + */ + public JalviewModel.JSeq createJalviewModelJSeq() + { + return new JalviewModel.JSeq(); + } + + /** + * Create an instance of {@link JalviewModel.JSeq.RnaViewer } + * + */ + public JalviewModel.JSeq.RnaViewer createJalviewModelJSeqRnaViewer() + { + return new JalviewModel.JSeq.RnaViewer(); + } + + /** + * Create an instance of {@link JalviewModel.JSeq.Pdbids } + * + */ + public JalviewModel.JSeq.Pdbids createJalviewModelJSeqPdbids() + { + return new JalviewModel.JSeq.Pdbids(); + } + + /** + * Create an instance of {@link AnnotationColourScheme } + * + */ + public AnnotationColourScheme createAnnotationColourScheme() + { + return new AnnotationColourScheme(); + } + + /** + * Create an instance of {@link PcaDataType } + * + */ + public PcaDataType createPcaDataType() + { + return new PcaDataType(); + } + + /** + * Create an instance of {@link DoubleVector } + * + */ + public DoubleVector createDoubleVector() + { + return new DoubleVector(); + } + + /** + * Create an instance of {@link DoubleMatrix } + * + */ + public DoubleMatrix createDoubleMatrix() + { + return new DoubleMatrix(); + } + + /** + * Create an instance of {@link Mapping } + * + */ + public Mapping createMapping() + { + return new Mapping(); + } + + /** + * Create an instance of {@link MapListType.MapListFrom } + * + */ + public MapListType.MapListFrom createMapListTypeMapListFrom() + { + return new MapListType.MapListFrom(); + } + + /** + * Create an instance of {@link MapListType.MapListTo } + * + */ + public MapListType.MapListTo createMapListTypeMapListTo() + { + return new MapListType.MapListTo(); + } + + /** + * Create an instance of {@link SequenceType } + * + */ + public SequenceType createSequenceType() + { + return new SequenceType(); + } + + /** + * Create an instance of {@link Sequence.DBRef } + * + */ + public Sequence.DBRef createSequenceDBRef() + { + return new Sequence.DBRef(); + } + + /** + * Create an instance of {@link AlcodonFrame.Alcodon } + * + */ + public AlcodonFrame.Alcodon createAlcodonFrameAlcodon() + { + return new AlcodonFrame.Alcodon(); + } + + /** + * Create an instance of {@link AlcodonFrame.AlcodMap } + * + */ + public AlcodonFrame.AlcodMap createAlcodonFrameAlcodMap() + { + return new AlcodonFrame.AlcodMap(); + } + + /** + * Create an instance of {@link AnnotationElement } + * + */ + public AnnotationElement createAnnotationElement() + { + return new AnnotationElement(); + } + + /** + * Create an instance of {@link Annotation.ThresholdLine } + * + */ + public Annotation.ThresholdLine createAnnotationThresholdLine() + { + return new Annotation.ThresholdLine(); + } + + /** + * Create an instance of {@link Annotation.Property } + * + */ + public Annotation.Property createAnnotationProperty() + { + return new Annotation.Property(); + } + + /** + * Create an instance of {@link SequenceSet.SequenceSetProperties } + * + */ + public SequenceSet.SequenceSetProperties createSequenceSetSequenceSetProperties() + { + return new SequenceSet.SequenceSetProperties(); + } + + /** + * Create an instance of {@link VAMSAS } + * + */ + public VAMSAS createVAMSAS() + { + return new VAMSAS(); + } + + /** + * Create an instance of {@link FeatureMatcher } + * + */ + public FeatureMatcher createFeatureMatcher() + { + return new FeatureMatcher(); + } + + /** + * Create an instance of {@link WebServiceParameterSet } + * + */ + public WebServiceParameterSet createWebServiceParameterSet() + { + return new WebServiceParameterSet(); + } + + /** + * Create an instance of {@link FeatureMatcherSet.CompoundMatcher } + * + */ + public FeatureMatcherSet.CompoundMatcher createFeatureMatcherSetCompoundMatcher() + { + return new FeatureMatcherSet.CompoundMatcher(); + } + + /** + * Create an instance of {@link JalviewUserColours.Colour } + * + */ + public JalviewUserColours.Colour createJalviewUserColoursColour() + { + return new JalviewUserColours.Colour(); + } + + /** + * Create an instance of {@link JalviewUserColours.Filter } + * + */ + public JalviewUserColours.Filter createJalviewUserColoursFilter() + { + return new JalviewUserColours.Filter(); + } + + /** + * Create an instance of {@link Pdbentry.Property } + * + */ + public Pdbentry.Property createPdbentryProperty() + { + return new Pdbentry.Property(); + } + + /** + * Create an instance of {@link Feature.OtherData } + * + */ + public Feature.OtherData createFeatureOtherData() + { + return new Feature.OtherData(); + } + + /** + * Create an instance of {@link JalviewModel.JGroup } + * + */ + public JalviewModel.JGroup createJalviewModelJGroup() + { + return new JalviewModel.JGroup(); + } + + /** + * Create an instance of {@link JalviewModel.UserColours } + * + */ + public JalviewModel.UserColours createJalviewModelUserColours() + { + return new JalviewModel.UserColours(); + } + + /** + * Create an instance of {@link JalviewModel.Tree } + * + */ + public JalviewModel.Tree createJalviewModelTree() + { + return new JalviewModel.Tree(); + } + + /** + * Create an instance of {@link JalviewModel.FeatureSettings.Setting } + * + */ + public JalviewModel.FeatureSettings.Setting createJalviewModelFeatureSettingsSetting() + { + return new JalviewModel.FeatureSettings.Setting(); + } + + /** + * Create an instance of {@link JalviewModel.FeatureSettings.Group } + * + */ + public JalviewModel.FeatureSettings.Group createJalviewModelFeatureSettingsGroup() + { + return new JalviewModel.FeatureSettings.Group(); + } + + /** + * Create an instance of {@link JalviewModel.PcaViewer.SequencePoint } + * + */ + public JalviewModel.PcaViewer.SequencePoint createJalviewModelPcaViewerSequencePoint() + { + return new JalviewModel.PcaViewer.SequencePoint(); + } + + /** + * Create an instance of {@link JalviewModel.PcaViewer.Axis } + * + */ + public JalviewModel.PcaViewer.Axis createJalviewModelPcaViewerAxis() + { + return new JalviewModel.PcaViewer.Axis(); + } + + /** + * Create an instance of {@link JalviewModel.PcaViewer.SeqPointMin } + * + */ + public JalviewModel.PcaViewer.SeqPointMin createJalviewModelPcaViewerSeqPointMin() + { + return new JalviewModel.PcaViewer.SeqPointMin(); + } + + /** + * Create an instance of {@link JalviewModel.PcaViewer.SeqPointMax } + * + */ + public JalviewModel.PcaViewer.SeqPointMax createJalviewModelPcaViewerSeqPointMax() + { + return new JalviewModel.PcaViewer.SeqPointMax(); + } + + /** + * Create an instance of {@link JalviewModel.Viewport.HiddenColumns } + * + */ + public JalviewModel.Viewport.HiddenColumns createJalviewModelViewportHiddenColumns() + { + return new JalviewModel.Viewport.HiddenColumns(); + } + + /** + * Create an instance of {@link JalviewModel.Viewport.CalcIdParam } + * + */ + public JalviewModel.Viewport.CalcIdParam createJalviewModelViewportCalcIdParam() + { + return new JalviewModel.Viewport.CalcIdParam(); + } + + /** + * Create an instance of + * {@link JalviewModel.JSeq.RnaViewer.SecondaryStructure } + * + */ + public JalviewModel.JSeq.RnaViewer.SecondaryStructure createJalviewModelJSeqRnaViewerSecondaryStructure() + { + return new JalviewModel.JSeq.RnaViewer.SecondaryStructure(); + } + + /** + * Create an instance of {@link JalviewModel.JSeq.Pdbids.StructureState } + * + */ + public JalviewModel.JSeq.Pdbids.StructureState createJalviewModelJSeqPdbidsStructureState() + { + return new JalviewModel.JSeq.Pdbids.StructureState(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link JalviewModel + * }{@code >} + * + * @param value + * Java instance representing xml element's value. + * @return the new instance of {@link JAXBElement + * }{@code <}{@link JalviewModel }{@code >} + */ + @XmlElementDecl(namespace = "www.jalview.org", name = "JalviewModel") + public JAXBElement createJalviewModel(JalviewModel value) + { + return new JAXBElement(_JalviewModel_QNAME, + JalviewModel.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement + * }{@code <}{@link JalviewUserColours }{@code >} + * + * @param value + * Java instance representing xml element's value. + * @return the new instance of {@link JAXBElement + * }{@code <}{@link JalviewUserColours }{@code >} + */ + @XmlElementDecl( + namespace = "www.jalview.org/colours", + name = "JalviewUserColours") + public JAXBElement createJalviewUserColours( + JalviewUserColours value) + { + return new JAXBElement(_JalviewUserColours_QNAME, + JalviewUserColours.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement + * }{@code <}{@link WebServiceParameterSet }{@code >} + * + * @param value + * Java instance representing xml element's value. + * @return the new instance of {@link JAXBElement + * }{@code <}{@link WebServiceParameterSet }{@code >} + */ + @XmlElementDecl( + namespace = "www.jalview.org/xml/wsparamset", + name = "WebServiceParameterSet") + public JAXBElement createWebServiceParameterSet( + WebServiceParameterSet value) + { + return new JAXBElement( + _WebServiceParameterSet_QNAME, WebServiceParameterSet.class, + null, value); + } } diff --git a/src/jalview/xml/binding/jalview/PcaDataType.java b/src/jalview/xml/binding/jalview/PcaDataType.java index 717ce89..0717541 100644 --- a/src/jalview/xml/binding/jalview/PcaDataType.java +++ b/src/jalview/xml/binding/jalview/PcaDataType.java @@ -5,7 +5,6 @@ // Generated on: 2021.08.30 at 11:05:22 AM BST // - package jalview.xml.binding.jalview; import javax.xml.bind.annotation.XmlAccessType; @@ -13,117 +12,114 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; - /** * - * The results of a PCA calculation - * + * The results of a PCA calculation + * * * <p>Java class for PcaDataType complex type. * - * <p>The following schema fragment specifies the expected content contained within this class. + * <p>The following schema fragment specifies the expected content + * contained within this class. * - * <pre> - * &lt;complexType name="PcaDataType"&gt; - * &lt;complexContent&gt; - * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; - * &lt;sequence&gt; - * &lt;element name="pairwiseMatrix" type="{www.jalview.org}DoubleMatrix"/&gt; - * &lt;element name="tridiagonalMatrix" type="{www.jalview.org}DoubleMatrix"/&gt; - * &lt;element name="eigenMatrix" type="{www.jalview.org}DoubleMatrix"/&gt; - * &lt;/sequence&gt; - * &lt;/restriction&gt; - * &lt;/complexContent&gt; - * &lt;/complexType&gt; - * </pre> + * <pre> &lt;complexType name="PcaDataType"&gt; + * &lt;complexContent&gt; &lt;restriction + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; + * &lt;sequence&gt; &lt;element name="pairwiseMatrix" + * type="{www.jalview.org}DoubleMatrix"/&gt; &lt;element + * name="tridiagonalMatrix" type="{www.jalview.org}DoubleMatrix"/&gt; + * &lt;element name="eigenMatrix" + * type="{www.jalview.org}DoubleMatrix"/&gt; &lt;/sequence&gt; + * &lt;/restriction&gt; &lt;/complexContent&gt; + * &lt;/complexType&gt; </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "PcaDataType", namespace = "www.jalview.org", propOrder = { - "pairwiseMatrix", - "tridiagonalMatrix", - "eigenMatrix" -}) -public class PcaDataType { +@XmlType( + name = "PcaDataType", + namespace = "www.jalview.org", + propOrder = + { "pairwiseMatrix", "tridiagonalMatrix", "eigenMatrix" }) +public class PcaDataType +{ + + @XmlElement(required = true) + protected DoubleMatrix pairwiseMatrix; + + @XmlElement(required = true) + protected DoubleMatrix tridiagonalMatrix; - @XmlElement(required = true) - protected DoubleMatrix pairwiseMatrix; - @XmlElement(required = true) - protected DoubleMatrix tridiagonalMatrix; - @XmlElement(required = true) - protected DoubleMatrix eigenMatrix; + @XmlElement(required = true) + protected DoubleMatrix eigenMatrix; - /** - * Gets the value of the pairwiseMatrix property. - * - * @return - * possible object is - * {@link DoubleMatrix } - * - */ - public DoubleMatrix getPairwiseMatrix() { - return pairwiseMatrix; - } + /** + * Gets the value of the pairwiseMatrix property. + * + * @return possible object is {@link DoubleMatrix } + * + */ + public DoubleMatrix getPairwiseMatrix() + { + return pairwiseMatrix; + } - /** - * Sets the value of the pairwiseMatrix property. - * - * @param value - * allowed object is - * {@link DoubleMatrix } - * - */ - public void setPairwiseMatrix(DoubleMatrix value) { - this.pairwiseMatrix = value; - } + /** + * Sets the value of the pairwiseMatrix property. + * + * @param value + * allowed object is {@link DoubleMatrix } + * + */ + public void setPairwiseMatrix(DoubleMatrix value) + { + this.pairwiseMatrix = value; + } - /** - * Gets the value of the tridiagonalMatrix property. - * - * @return - * possible object is - * {@link DoubleMatrix } - * - */ - public DoubleMatrix getTridiagonalMatrix() { - return tridiagonalMatrix; - } + /** + * Gets the value of the tridiagonalMatrix property. + * + * @return possible object is {@link DoubleMatrix } + * + */ + public DoubleMatrix getTridiagonalMatrix() + { + return tridiagonalMatrix; + } - /** - * Sets the value of the tridiagonalMatrix property. - * - * @param value - * allowed object is - * {@link DoubleMatrix } - * - */ - public void setTridiagonalMatrix(DoubleMatrix value) { - this.tridiagonalMatrix = value; - } + /** + * Sets the value of the tridiagonalMatrix property. + * + * @param value + * allowed object is {@link DoubleMatrix } + * + */ + public void setTridiagonalMatrix(DoubleMatrix value) + { + this.tridiagonalMatrix = value; + } - /** - * Gets the value of the eigenMatrix property. - * - * @return - * possible object is - * {@link DoubleMatrix } - * - */ - public DoubleMatrix getEigenMatrix() { - return eigenMatrix; - } + /** + * Gets the value of the eigenMatrix property. + * + * @return possible object is {@link DoubleMatrix } + * + */ + public DoubleMatrix getEigenMatrix() + { + return eigenMatrix; + } - /** - * Sets the value of the eigenMatrix property. - * - * @param value - * allowed object is - * {@link DoubleMatrix } - * - */ - public void setEigenMatrix(DoubleMatrix value) { - this.eigenMatrix = value; - } + /** + * Sets the value of the eigenMatrix property. + * + * @param value + * allowed object is {@link DoubleMatrix } + * + */ + public void setEigenMatrix(DoubleMatrix value) + { + this.eigenMatrix = value; + } } diff --git a/src/jalview/xml/binding/jalview/Pdbentry.java b/src/jalview/xml/binding/jalview/Pdbentry.java index 6983c04..7d5447b 100644 --- a/src/jalview/xml/binding/jalview/Pdbentry.java +++ b/src/jalview/xml/binding/jalview/Pdbentry.java @@ -5,7 +5,6 @@ // Generated on: 2021.08.30 at 11:05:22 AM BST // - package jalview.xml.binding.jalview; import java.util.ArrayList; @@ -16,232 +15,223 @@ import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.bind.annotation.XmlType; - /** * <p>Java class for pdbentry complex type. * - * <p>The following schema fragment specifies the expected content contained within this class. + * <p>The following schema fragment specifies the expected content + * contained within this class. * - * <pre> - * &lt;complexType name="pdbentry"&gt; - * &lt;complexContent&gt; - * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; - * &lt;sequence maxOccurs="unbounded" minOccurs="0"&gt; - * &lt;element name="property" maxOccurs="unbounded" minOccurs="0"&gt; - * &lt;complexType&gt; - * &lt;complexContent&gt; - * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; - * &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; - * &lt;attribute name="value" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; - * &lt;/restriction&gt; - * &lt;/complexContent&gt; - * &lt;/complexType&gt; - * &lt;/element&gt; - * &lt;/sequence&gt; - * &lt;attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; - * &lt;attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; - * &lt;attribute name="file" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; - * &lt;/restriction&gt; - * &lt;/complexContent&gt; - * &lt;/complexType&gt; - * </pre> + * <pre> &lt;complexType name="pdbentry"&gt; + * &lt;complexContent&gt; &lt;restriction + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; &lt;sequence + * maxOccurs="unbounded" minOccurs="0"&gt; &lt;element name="property" + * maxOccurs="unbounded" minOccurs="0"&gt; &lt;complexType&gt; + * &lt;complexContent&gt; &lt;restriction + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; &lt;attribute + * name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" + * /&gt; &lt;attribute name="value" use="required" + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; + * &lt;/restriction&gt; &lt;/complexContent&gt; + * &lt;/complexType&gt; &lt;/element&gt; + * &lt;/sequence&gt; &lt;attribute name="id" use="required" + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute + * name="type" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; + * &lt;attribute name="file" type="{http://www.w3.org/2001/XMLSchema}string" + * /&gt; &lt;/restriction&gt; &lt;/complexContent&gt; + * &lt;/complexType&gt; </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "pdbentry", namespace = "www.jalview.org", propOrder = { - "property" -}) -@XmlSeeAlso({ - jalview.xml.binding.jalview.JalviewModel.JSeq.Pdbids.class -}) -public class Pdbentry { - - protected List property; - @XmlAttribute(name = "id", required = true) - protected String id; - @XmlAttribute(name = "type") - protected String type; - @XmlAttribute(name = "file") - protected String file; - - /** - * Gets the value of the property property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the property property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getProperty().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link Pdbentry.Property } - * - * - */ - public List getProperty() { - if (property == null) { - property = new ArrayList(); - } - return this.property; +@XmlType( + name = "pdbentry", + namespace = "www.jalview.org", + propOrder = + { "property" }) +@XmlSeeAlso({ jalview.xml.binding.jalview.JalviewModel.JSeq.Pdbids.class }) +public class Pdbentry +{ + + protected List property; + + @XmlAttribute(name = "id", required = true) + protected String id; + + @XmlAttribute(name = "type") + protected String type; + + @XmlAttribute(name = "file") + protected String file; + + /** + * Gets the value of the property property. + * + * <p> This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will be + * present inside the JAXB object. This is why there is not a + * <CODE>set</CODE> method for the property property. + * + * <p> For example, to add a new item, do as follows: <pre> + * getProperty().add(newItem); </pre> + * + * + * <p> Objects of the following type(s) are allowed in the list + * {@link Pdbentry.Property } + * + * + */ + public List getProperty() + { + if (property == null) + { + property = new ArrayList(); } + return this.property; + } + + /** + * Gets the value of the id property. + * + * @return possible object is {@link String } + * + */ + public String getId() + { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setId(String value) + { + this.id = value; + } + + /** + * Gets the value of the type property. + * + * @return possible object is {@link String } + * + */ + public String getType() + { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setType(String value) + { + this.type = value; + } + + /** + * Gets the value of the file property. + * + * @return possible object is {@link String } + * + */ + public String getFile() + { + return file; + } + + /** + * Sets the value of the file property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setFile(String value) + { + this.file = value; + } + + /** + * <p>Java class for anonymous complex type. + * + * <p>The following schema fragment specifies the expected content + * contained within this class. + * + * <pre> &lt;complexType&gt; &lt;complexContent&gt; + * &lt;restriction + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; &lt;attribute + * name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" + * /&gt; &lt;attribute name="value" use="required" + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; + * &lt;/restriction&gt; &lt;/complexContent&gt; + * &lt;/complexType&gt; </pre> + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class Property + { + + @XmlAttribute(name = "name", required = true) + protected String name; + + @XmlAttribute(name = "value", required = true) + protected String value; /** - * Gets the value of the id property. + * Gets the value of the name property. + * + * @return possible object is {@link String } * - * @return - * possible object is - * {@link String } - * */ - public String getId() { - return id; + public String getName() + { + return name; } /** - * Sets the value of the id property. + * Sets the value of the name property. * * @param value - * allowed object is - * {@link String } - * - */ - public void setId(String value) { - this.id = value; - } - - /** - * Gets the value of the type property. + * allowed object is {@link String } * - * @return - * possible object is - * {@link String } - * */ - public String getType() { - return type; + public void setName(String value) + { + this.name = value; } /** - * Sets the value of the type property. + * Gets the value of the value property. * - * @param value - * allowed object is - * {@link String } - * - */ - public void setType(String value) { - this.type = value; - } - - /** - * Gets the value of the file property. + * @return possible object is {@link String } * - * @return - * possible object is - * {@link String } - * */ - public String getFile() { - return file; + public String getValue() + { + return value; } /** - * Sets the value of the file property. + * Sets the value of the value property. * * @param value - * allowed object is - * {@link String } - * - */ - public void setFile(String value) { - this.file = value; - } - - - /** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * &lt;complexType&gt; - * &lt;complexContent&gt; - * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; - * &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; - * &lt;attribute name="value" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; - * &lt;/restriction&gt; - * &lt;/complexContent&gt; - * &lt;/complexType&gt; - * </pre> - * + * allowed object is {@link String } * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class Property { - - @XmlAttribute(name = "name", required = true) - protected String name; - @XmlAttribute(name = "value", required = true) - protected String value; - - /** - * Gets the value of the name property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getName() { - return name; - } - - /** - * Sets the value of the name property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setName(String value) { - this.name = value; - } - - /** - * Gets the value of the value property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - + public void setValue(String value) + { + this.value = value; } + } + } diff --git a/src/jalview/xml/binding/jalview/Sequence.java b/src/jalview/xml/binding/jalview/Sequence.java index 5381c32..2001845 100644 --- a/src/jalview/xml/binding/jalview/Sequence.java +++ b/src/jalview/xml/binding/jalview/Sequence.java @@ -5,7 +5,6 @@ // Generated on: 2021.08.30 at 11:05:22 AM BST // - package jalview.xml.binding.jalview; import java.util.ArrayList; @@ -17,332 +16,325 @@ import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; - /** * <p>Java class for anonymous complex type. * - * <p>The following schema fragment specifies the expected content contained within this class. + * <p>The following schema fragment specifies the expected content + * contained within this class. * - * <pre> - * &lt;complexType&gt; - * &lt;complexContent&gt; - * &lt;extension base="{www.vamsas.ac.uk/jalview/version2}SequenceType"&gt; - * &lt;sequence&gt; - * &lt;element name="DBRef" maxOccurs="unbounded" minOccurs="0"&gt; - * &lt;complexType&gt; - * &lt;complexContent&gt; - * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; - * &lt;sequence&gt; - * &lt;element ref="{www.vamsas.ac.uk/jalview/version2}Mapping" minOccurs="0"/&gt; - * &lt;/sequence&gt; - * &lt;attribute name="source" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; - * &lt;attribute name="version" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; - * &lt;attribute name="accessionId" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; - * &lt;attribute name="locus" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt; - * &lt;attribute name="canonical" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt; - * &lt;/restriction&gt; - * &lt;/complexContent&gt; - * &lt;/complexType&gt; - * &lt;/element&gt; - * &lt;/sequence&gt; - * &lt;attribute name="dsseqid" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; - * &lt;attribute name="biotype" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; - * &lt;/extension&gt; - * &lt;/complexContent&gt; - * &lt;/complexType&gt; - * </pre> + * <pre> &lt;complexType&gt; &lt;complexContent&gt; + * &lt;extension + * base="{www.vamsas.ac.uk/jalview/version2}SequenceType"&gt; + * &lt;sequence&gt; &lt;element name="DBRef" maxOccurs="unbounded" + * minOccurs="0"&gt; &lt;complexType&gt; + * &lt;complexContent&gt; &lt;restriction + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; + * &lt;sequence&gt; &lt;element + * ref="{www.vamsas.ac.uk/jalview/version2}Mapping" minOccurs="0"/&gt; + * &lt;/sequence&gt; &lt;attribute name="source" + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute + * name="version" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; + * &lt;attribute name="accessionId" + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute + * name="locus" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" + * /&gt; &lt;attribute name="canonical" + * type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt; + * &lt;/restriction&gt; &lt;/complexContent&gt; + * &lt;/complexType&gt; &lt;/element&gt; + * &lt;/sequence&gt; &lt;attribute name="dsseqid" + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute + * name="biotype" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; + * &lt;/extension&gt; &lt;/complexContent&gt; + * &lt;/complexType&gt; </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "dbRef" -}) +@XmlType(name = "", propOrder = { "dbRef" }) @XmlRootElement(name = "Sequence") -public class Sequence - extends SequenceType +public class Sequence extends SequenceType { - @XmlElement(name = "DBRef") - protected List dbRef; - @XmlAttribute(name = "dsseqid") - protected String dsseqid; - @XmlAttribute(name = "biotype") - protected String biotype; + @XmlElement(name = "DBRef") + protected List dbRef; + + @XmlAttribute(name = "dsseqid") + protected String dsseqid; + + @XmlAttribute(name = "biotype") + protected String biotype; + + /** + * Gets the value of the dbRef property. + * + * <p> This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will be + * present inside the JAXB object. This is why there is not a + * <CODE>set</CODE> method for the dbRef property. + * + * <p> For example, to add a new item, do as follows: <pre> + * getDBRef().add(newItem); </pre> + * + * + * <p> Objects of the following type(s) are allowed in the list + * {@link Sequence.DBRef } + * + * + */ + public List getDBRef() + { + if (dbRef == null) + { + dbRef = new ArrayList(); + } + return this.dbRef; + } + + /** + * Gets the value of the dsseqid property. + * + * @return possible object is {@link String } + * + */ + public String getDsseqid() + { + return dsseqid; + } + + /** + * Sets the value of the dsseqid property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDsseqid(String value) + { + this.dsseqid = value; + } + + /** + * Gets the value of the biotype property. + * + * @return possible object is {@link String } + * + */ + public String getBiotype() + { + return biotype; + } + + /** + * Sets the value of the biotype property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setBiotype(String value) + { + this.biotype = value; + } + + /** + * <p>Java class for anonymous complex type. + * + * <p>The following schema fragment specifies the expected content + * contained within this class. + * + * <pre> &lt;complexType&gt; &lt;complexContent&gt; + * &lt;restriction + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; + * &lt;sequence&gt; &lt;element + * ref="{www.vamsas.ac.uk/jalview/version2}Mapping" minOccurs="0"/&gt; + * &lt;/sequence&gt; &lt;attribute name="source" + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute + * name="version" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; + * &lt;attribute name="accessionId" + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute + * name="locus" type="{http://www.w3.org/2001/XMLSchema}boolean" + * default="false" /&gt; &lt;attribute name="canonical" + * type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt; + * &lt;/restriction&gt; &lt;/complexContent&gt; + * &lt;/complexType&gt; </pre> + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "mapping" }) + public static class DBRef + { + + @XmlElement(name = "Mapping") + protected Mapping mapping; + + @XmlAttribute(name = "source") + protected String source; + + @XmlAttribute(name = "version") + protected String version; + + @XmlAttribute(name = "accessionId") + protected String accessionId; + + @XmlAttribute(name = "locus") + protected Boolean locus; + + @XmlAttribute(name = "canonical") + protected Boolean canonical; /** - * Gets the value of the dbRef property. + * Gets the value of the mapping property. * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the dbRef property. + * @return possible object is {@link Mapping } * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getDBRef().add(newItem); - * </pre> + */ + public Mapping getMapping() + { + return mapping; + } + + /** + * Sets the value of the mapping property. + * + * @param value + * allowed object is {@link Mapping } + * + */ + public void setMapping(Mapping value) + { + this.mapping = value; + } + + /** + * Gets the value of the source property. * + * @return possible object is {@link String } * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link Sequence.DBRef } + */ + public String getSource() + { + return source; + } + + /** + * Sets the value of the source property. * + * @param value + * allowed object is {@link String } * */ - public List getDBRef() { - if (dbRef == null) { - dbRef = new ArrayList(); - } - return this.dbRef; + public void setSource(String value) + { + this.source = value; } /** - * Gets the value of the dsseqid property. + * Gets the value of the version property. + * + * @return possible object is {@link String } * - * @return - * possible object is - * {@link String } - * */ - public String getDsseqid() { - return dsseqid; + public String getVersion() + { + return version; } /** - * Sets the value of the dsseqid property. + * Sets the value of the version property. * * @param value - * allowed object is - * {@link String } - * + * allowed object is {@link String } + * */ - public void setDsseqid(String value) { - this.dsseqid = value; + public void setVersion(String value) + { + this.version = value; } /** - * Gets the value of the biotype property. + * Gets the value of the accessionId property. + * + * @return possible object is {@link String } * - * @return - * possible object is - * {@link String } - * */ - public String getBiotype() { - return biotype; + public String getAccessionId() + { + return accessionId; } /** - * Sets the value of the biotype property. + * Sets the value of the accessionId property. * * @param value - * allowed object is - * {@link String } - * + * allowed object is {@link String } + * */ - public void setBiotype(String value) { - this.biotype = value; + public void setAccessionId(String value) + { + this.accessionId = value; } + /** + * Gets the value of the locus property. + * + * @return possible object is {@link Boolean } + * + */ + public boolean isLocus() + { + if (locus == null) + { + return false; + } + else + { + return locus; + } + } /** - * <p>Java class for anonymous complex type. + * Sets the value of the locus property. * - * <p>The following schema fragment specifies the expected content contained within this class. + * @param value + * allowed object is {@link Boolean } * - * <pre> - * &lt;complexType&gt; - * &lt;complexContent&gt; - * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; - * &lt;sequence&gt; - * &lt;element ref="{www.vamsas.ac.uk/jalview/version2}Mapping" minOccurs="0"/&gt; - * &lt;/sequence&gt; - * &lt;attribute name="source" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; - * &lt;attribute name="version" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; - * &lt;attribute name="accessionId" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; - * &lt;attribute name="locus" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt; - * &lt;attribute name="canonical" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt; - * &lt;/restriction&gt; - * &lt;/complexContent&gt; - * &lt;/complexType&gt; - * </pre> + */ + public void setLocus(Boolean value) + { + this.locus = value; + } + + /** + * Gets the value of the canonical property. * + * @return possible object is {@link Boolean } * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "mapping" - }) - public static class DBRef { - - @XmlElement(name = "Mapping") - protected Mapping mapping; - @XmlAttribute(name = "source") - protected String source; - @XmlAttribute(name = "version") - protected String version; - @XmlAttribute(name = "accessionId") - protected String accessionId; - @XmlAttribute(name = "locus") - protected Boolean locus; - @XmlAttribute(name = "canonical") - protected Boolean canonical; - - /** - * Gets the value of the mapping property. - * - * @return - * possible object is - * {@link Mapping } - * - */ - public Mapping getMapping() { - return mapping; - } - - /** - * Sets the value of the mapping property. - * - * @param value - * allowed object is - * {@link Mapping } - * - */ - public void setMapping(Mapping value) { - this.mapping = value; - } - - /** - * Gets the value of the source property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getSource() { - return source; - } - - /** - * Sets the value of the source property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setSource(String value) { - this.source = value; - } - - /** - * Gets the value of the version property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getVersion() { - return version; - } - - /** - * Sets the value of the version property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setVersion(String value) { - this.version = value; - } - - /** - * Gets the value of the accessionId property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getAccessionId() { - return accessionId; - } - - /** - * Sets the value of the accessionId property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setAccessionId(String value) { - this.accessionId = value; - } - - /** - * Gets the value of the locus property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public boolean isLocus() { - if (locus == null) { - return false; - } else { - return locus; - } - } - - /** - * Sets the value of the locus property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setLocus(Boolean value) { - this.locus = value; - } - - /** - * Gets the value of the canonical property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public boolean isCanonical() { - if (canonical == null) { - return false; - } else { - return canonical; - } - } - - /** - * Sets the value of the canonical property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setCanonical(Boolean value) { - this.canonical = value; - } + public boolean isCanonical() + { + if (canonical == null) + { + return false; + } + else + { + return canonical; + } + } + /** + * Sets the value of the canonical property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setCanonical(Boolean value) + { + this.canonical = value; } + } + } diff --git a/src/jalview/xml/binding/jalview/SequenceSet.java b/src/jalview/xml/binding/jalview/SequenceSet.java index c69334e..d6464b3 100644 --- a/src/jalview/xml/binding/jalview/SequenceSet.java +++ b/src/jalview/xml/binding/jalview/SequenceSet.java @@ -5,7 +5,6 @@ // Generated on: 2021.08.30 at 11:05:22 AM BST // - package jalview.xml.binding.jalview; import java.util.ArrayList; @@ -17,302 +16,287 @@ import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; - /** * <p>Java class for anonymous complex type. * - * <p>The following schema fragment specifies the expected content contained within this class. + * <p>The following schema fragment specifies the expected content + * contained within this class. * - * <pre> - * &lt;complexType&gt; - * &lt;complexContent&gt; - * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; - * &lt;sequence&gt; - * &lt;element ref="{www.vamsas.ac.uk/jalview/version2}Sequence" maxOccurs="unbounded" minOccurs="0"/&gt; - * &lt;element ref="{www.vamsas.ac.uk/jalview/version2}Annotation" maxOccurs="unbounded" minOccurs="0"/&gt; - * &lt;element name="sequenceSetProperties" maxOccurs="unbounded" minOccurs="0"&gt; - * &lt;complexType&gt; - * &lt;complexContent&gt; - * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; - * &lt;attribute name="key" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; - * &lt;attribute name="value" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; - * &lt;/restriction&gt; - * &lt;/complexContent&gt; - * &lt;/complexType&gt; - * &lt;/element&gt; - * &lt;element ref="{www.vamsas.ac.uk/jalview/version2}AlcodonFrame" maxOccurs="unbounded" minOccurs="0"/&gt; - * &lt;/sequence&gt; - * &lt;attribute name="gapChar" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; - * &lt;attribute name="datasetId" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; - * &lt;/restriction&gt; - * &lt;/complexContent&gt; - * &lt;/complexType&gt; - * </pre> + * <pre> &lt;complexType&gt; &lt;complexContent&gt; + * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; + * &lt;sequence&gt; &lt;element + * ref="{www.vamsas.ac.uk/jalview/version2}Sequence" maxOccurs="unbounded" + * minOccurs="0"/&gt; &lt;element + * ref="{www.vamsas.ac.uk/jalview/version2}Annotation" maxOccurs="unbounded" + * minOccurs="0"/&gt; &lt;element name="sequenceSetProperties" + * maxOccurs="unbounded" minOccurs="0"&gt; &lt;complexType&gt; + * &lt;complexContent&gt; &lt;restriction + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; &lt;attribute + * name="key" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; + * &lt;attribute name="value" + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; + * &lt;/restriction&gt; &lt;/complexContent&gt; + * &lt;/complexType&gt; &lt;/element&gt; &lt;element + * ref="{www.vamsas.ac.uk/jalview/version2}AlcodonFrame" maxOccurs="unbounded" + * minOccurs="0"/&gt; &lt;/sequence&gt; &lt;attribute + * name="gapChar" use="required" type="{http://www.w3.org/2001/XMLSchema}string" + * /&gt; &lt;attribute name="datasetId" + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; + * &lt;/restriction&gt; &lt;/complexContent&gt; + * &lt;/complexType&gt; </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "sequence", - "annotation", - "sequenceSetProperties", - "alcodonFrame" -}) +@XmlType( + name = "", + propOrder = + { "sequence", "annotation", "sequenceSetProperties", "alcodonFrame" }) @XmlRootElement(name = "SequenceSet") -public class SequenceSet { +public class SequenceSet +{ - @XmlElement(name = "Sequence") - protected List sequence; - @XmlElement(name = "Annotation") - protected List annotation; - protected List sequenceSetProperties; - @XmlElement(name = "AlcodonFrame") - protected List alcodonFrame; - @XmlAttribute(name = "gapChar", required = true) - protected String gapChar; - @XmlAttribute(name = "datasetId") - protected String datasetId; + @XmlElement(name = "Sequence") + protected List sequence; - /** - * Gets the value of the sequence property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the sequence property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getSequence().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link Sequence } - * - * - */ - public List getSequence() { - if (sequence == null) { - sequence = new ArrayList(); - } - return this.sequence; + @XmlElement(name = "Annotation") + protected List annotation; + + protected List sequenceSetProperties; + + @XmlElement(name = "AlcodonFrame") + protected List alcodonFrame; + + @XmlAttribute(name = "gapChar", required = true) + protected String gapChar; + + @XmlAttribute(name = "datasetId") + protected String datasetId; + + /** + * Gets the value of the sequence property. + * + * <p> This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will be + * present inside the JAXB object. This is why there is not a + * <CODE>set</CODE> method for the sequence property. + * + * <p> For example, to add a new item, do as follows: <pre> + * getSequence().add(newItem); </pre> + * + * + * <p> Objects of the following type(s) are allowed in the list + * {@link Sequence } + * + * + */ + public List getSequence() + { + if (sequence == null) + { + sequence = new ArrayList(); } + return this.sequence; + } - /** - * Gets the value of the annotation property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the annotation property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getAnnotation().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link Annotation } - * - * - */ - public List getAnnotation() { - if (annotation == null) { - annotation = new ArrayList(); - } - return this.annotation; + /** + * Gets the value of the annotation property. + * + * <p> This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will be + * present inside the JAXB object. This is why there is not a + * <CODE>set</CODE> method for the annotation property. + * + * <p> For example, to add a new item, do as follows: <pre> + * getAnnotation().add(newItem); </pre> + * + * + * <p> Objects of the following type(s) are allowed in the list + * {@link Annotation } + * + * + */ + public List getAnnotation() + { + if (annotation == null) + { + annotation = new ArrayList(); } + return this.annotation; + } - /** - * Gets the value of the sequenceSetProperties property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the sequenceSetProperties property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getSequenceSetProperties().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link SequenceSet.SequenceSetProperties } - * - * - */ - public List getSequenceSetProperties() { - if (sequenceSetProperties == null) { - sequenceSetProperties = new ArrayList(); - } - return this.sequenceSetProperties; + /** + * Gets the value of the sequenceSetProperties property. + * + * <p> This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will be + * present inside the JAXB object. This is why there is not a + * <CODE>set</CODE> method for the sequenceSetProperties property. + * + * <p> For example, to add a new item, do as follows: <pre> + * getSequenceSetProperties().add(newItem); </pre> + * + * + * <p> Objects of the following type(s) are allowed in the list + * {@link SequenceSet.SequenceSetProperties } + * + * + */ + public List getSequenceSetProperties() + { + if (sequenceSetProperties == null) + { + sequenceSetProperties = new ArrayList(); } + return this.sequenceSetProperties; + } - /** - * Gets the value of the alcodonFrame property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the alcodonFrame property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getAlcodonFrame().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link AlcodonFrame } - * - * - */ - public List getAlcodonFrame() { - if (alcodonFrame == null) { - alcodonFrame = new ArrayList(); - } - return this.alcodonFrame; + /** + * Gets the value of the alcodonFrame property. + * + * <p> This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will be + * present inside the JAXB object. This is why there is not a + * <CODE>set</CODE> method for the alcodonFrame property. + * + * <p> For example, to add a new item, do as follows: <pre> + * getAlcodonFrame().add(newItem); </pre> + * + * + * <p> Objects of the following type(s) are allowed in the list + * {@link AlcodonFrame } + * + * + */ + public List getAlcodonFrame() + { + if (alcodonFrame == null) + { + alcodonFrame = new ArrayList(); } + return this.alcodonFrame; + } + + /** + * Gets the value of the gapChar property. + * + * @return possible object is {@link String } + * + */ + public String getGapChar() + { + return gapChar; + } + + /** + * Sets the value of the gapChar property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setGapChar(String value) + { + this.gapChar = value; + } + + /** + * Gets the value of the datasetId property. + * + * @return possible object is {@link String } + * + */ + public String getDatasetId() + { + return datasetId; + } + + /** + * Sets the value of the datasetId property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDatasetId(String value) + { + this.datasetId = value; + } + + /** + * <p>Java class for anonymous complex type. + * + * <p>The following schema fragment specifies the expected content + * contained within this class. + * + * <pre> &lt;complexType&gt; &lt;complexContent&gt; + * &lt;restriction + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; &lt;attribute + * name="key" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; + * &lt;attribute name="value" + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; + * &lt;/restriction&gt; &lt;/complexContent&gt; + * &lt;/complexType&gt; </pre> + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class SequenceSetProperties + { + + @XmlAttribute(name = "key") + protected String key; + + @XmlAttribute(name = "value") + protected String value; /** - * Gets the value of the gapChar property. + * Gets the value of the key property. + * + * @return possible object is {@link String } * - * @return - * possible object is - * {@link String } - * */ - public String getGapChar() { - return gapChar; + public String getKey() + { + return key; } /** - * Sets the value of the gapChar property. + * Sets the value of the key property. * * @param value - * allowed object is - * {@link String } - * - */ - public void setGapChar(String value) { - this.gapChar = value; - } - - /** - * Gets the value of the datasetId property. + * allowed object is {@link String } * - * @return - * possible object is - * {@link String } - * */ - public String getDatasetId() { - return datasetId; + public void setKey(String value) + { + this.key = value; } /** - * Sets the value of the datasetId property. + * Gets the value of the value property. + * + * @return possible object is {@link String } * - * @param value - * allowed object is - * {@link String } - * */ - public void setDatasetId(String value) { - this.datasetId = value; + public String getValue() + { + return value; } - /** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * &lt;complexType&gt; - * &lt;complexContent&gt; - * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; - * &lt;attribute name="key" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; - * &lt;attribute name="value" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; - * &lt;/restriction&gt; - * &lt;/complexContent&gt; - * &lt;/complexType&gt; - * </pre> + * Sets the value of the value property. * + * @param value + * allowed object is {@link String } * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class SequenceSetProperties { - - @XmlAttribute(name = "key") - protected String key; - @XmlAttribute(name = "value") - protected String value; - - /** - * Gets the value of the key property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getKey() { - return key; - } - - /** - * Sets the value of the key property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setKey(String value) { - this.key = value; - } - - /** - * Gets the value of the value property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - + public void setValue(String value) + { + this.value = value; } + } + } diff --git a/src/jalview/xml/binding/jalview/SequenceType.java b/src/jalview/xml/binding/jalview/SequenceType.java index 29982ae..2e378da 100644 --- a/src/jalview/xml/binding/jalview/SequenceType.java +++ b/src/jalview/xml/binding/jalview/SequenceType.java @@ -5,7 +5,6 @@ // Generated on: 2021.08.30 at 11:05:22 AM BST // - package jalview.xml.binding.jalview; import javax.xml.bind.annotation.XmlAccessType; @@ -14,140 +13,132 @@ import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.bind.annotation.XmlType; - /** * <p>Java class for SequenceType complex type. * - * <p>The following schema fragment specifies the expected content contained within this class. + * <p>The following schema fragment specifies the expected content + * contained within this class. * - * <pre> - * &lt;complexType name="SequenceType"&gt; - * &lt;complexContent&gt; - * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; - * &lt;sequence&gt; - * &lt;element name="sequence" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt; - * &lt;element name="name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt; - * &lt;/sequence&gt; - * &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; - * &lt;attribute name="description" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; - * &lt;/restriction&gt; - * &lt;/complexContent&gt; - * &lt;/complexType&gt; - * </pre> + * <pre> &lt;complexType name="SequenceType"&gt; + * &lt;complexContent&gt; &lt;restriction + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; + * &lt;sequence&gt; &lt;element name="sequence" + * type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt; + * &lt;element name="name" type="{http://www.w3.org/2001/XMLSchema}string" + * minOccurs="0"/&gt; &lt;/sequence&gt; &lt;attribute name="id" + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; &lt;attribute + * name="description" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; + * &lt;/restriction&gt; &lt;/complexContent&gt; + * &lt;/complexType&gt; </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "SequenceType", propOrder = { - "sequence", - "name" -}) -@XmlSeeAlso({ - Sequence.class -}) -public class SequenceType { - - protected String sequence; - protected String name; - @XmlAttribute(name = "id") - protected String id; - @XmlAttribute(name = "description") - protected String description; - - /** - * Gets the value of the sequence property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getSequence() { - return sequence; - } - - /** - * Sets the value of the sequence property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setSequence(String value) { - this.sequence = value; - } - - /** - * Gets the value of the name property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getName() { - return name; - } - - /** - * Sets the value of the name property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setName(String value) { - this.name = value; - } - - /** - * Gets the value of the id property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getId() { - return id; - } - - /** - * Sets the value of the id property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setId(String value) { - this.id = value; - } - - /** - * Gets the value of the description property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDescription() { - return description; - } - - /** - * Sets the value of the description property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDescription(String value) { - this.description = value; - } +@XmlType(name = "SequenceType", propOrder = { "sequence", "name" }) +@XmlSeeAlso({ Sequence.class }) +public class SequenceType +{ + + protected String sequence; + + protected String name; + + @XmlAttribute(name = "id") + protected String id; + + @XmlAttribute(name = "description") + protected String description; + + /** + * Gets the value of the sequence property. + * + * @return possible object is {@link String } + * + */ + public String getSequence() + { + return sequence; + } + + /** + * Sets the value of the sequence property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setSequence(String value) + { + this.sequence = value; + } + + /** + * Gets the value of the name property. + * + * @return possible object is {@link String } + * + */ + public String getName() + { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setName(String value) + { + this.name = value; + } + + /** + * Gets the value of the id property. + * + * @return possible object is {@link String } + * + */ + public String getId() + { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setId(String value) + { + this.id = value; + } + + /** + * Gets the value of the description property. + * + * @return possible object is {@link String } + * + */ + public String getDescription() + { + return description; + } + + /** + * Sets the value of the description property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDescription(String value) + { + this.description = value; + } } diff --git a/src/jalview/xml/binding/jalview/ThresholdType.java b/src/jalview/xml/binding/jalview/ThresholdType.java index edb9152..501c729 100644 --- a/src/jalview/xml/binding/jalview/ThresholdType.java +++ b/src/jalview/xml/binding/jalview/ThresholdType.java @@ -5,42 +5,38 @@ // Generated on: 2021.08.30 at 11:05:22 AM BST // - package jalview.xml.binding.jalview; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlType; - /** * <p>Java class for ThresholdType. * - * <p>The following schema fragment specifies the expected content contained within this class. - * <pre> - * &lt;simpleType name="ThresholdType"&gt; - * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"&gt; - * &lt;enumeration value="NONE"/&gt; - * &lt;enumeration value="ABOVE"/&gt; - * &lt;enumeration value="BELOW"/&gt; - * &lt;/restriction&gt; - * &lt;/simpleType&gt; - * </pre> + * <p>The following schema fragment specifies the expected content + * contained within this class. <pre> &lt;simpleType + * name="ThresholdType"&gt; &lt;restriction + * base="{http://www.w3.org/2001/XMLSchema}string"&gt; &lt;enumeration + * value="NONE"/&gt; &lt;enumeration value="ABOVE"/&gt; + * &lt;enumeration value="BELOW"/&gt; &lt;/restriction&gt; + * &lt;/simpleType&gt; </pre> * */ @XmlType(name = "ThresholdType", namespace = "www.jalview.org/colours") @XmlEnum -public enum ThresholdType { +public enum ThresholdType +{ - NONE, - ABOVE, - BELOW; + NONE, ABOVE, BELOW; - public String value() { - return name(); - } + public String value() + { + return name(); + } - public static ThresholdType fromValue(String v) { - return valueOf(v); - } + public static ThresholdType fromValue(String v) + { + return valueOf(v); + } } diff --git a/src/jalview/xml/binding/jalview/VAMSAS.java b/src/jalview/xml/binding/jalview/VAMSAS.java index 48b2012..932ba3b 100644 --- a/src/jalview/xml/binding/jalview/VAMSAS.java +++ b/src/jalview/xml/binding/jalview/VAMSAS.java @@ -5,7 +5,6 @@ // Generated on: 2021.08.30 at 11:05:22 AM BST // - package jalview.xml.binding.jalview; import java.util.ArrayList; @@ -15,95 +14,85 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; - /** * <p>Java class for VAMSAS complex type. * - * <p>The following schema fragment specifies the expected content contained within this class. + * <p>The following schema fragment specifies the expected content + * contained within this class. * - * <pre> - * &lt;complexType name="VAMSAS"&gt; - * &lt;complexContent&gt; - * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; - * &lt;sequence&gt; - * &lt;element name="Tree" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/&gt; - * &lt;element ref="{www.vamsas.ac.uk/jalview/version2}SequenceSet" maxOccurs="unbounded" minOccurs="0"/&gt; - * &lt;/sequence&gt; - * &lt;/restriction&gt; - * &lt;/complexContent&gt; - * &lt;/complexType&gt; - * </pre> + * <pre> &lt;complexType name="VAMSAS"&gt; + * &lt;complexContent&gt; &lt;restriction + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; + * &lt;sequence&gt; &lt;element name="Tree" + * type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" + * minOccurs="0"/&gt; &lt;element + * ref="{www.vamsas.ac.uk/jalview/version2}SequenceSet" maxOccurs="unbounded" + * minOccurs="0"/&gt; &lt;/sequence&gt; &lt;/restriction&gt; + * &lt;/complexContent&gt; &lt;/complexType&gt; </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "VAMSAS", propOrder = { - "tree", - "sequenceSet" -}) -public class VAMSAS { +@XmlType(name = "VAMSAS", propOrder = { "tree", "sequenceSet" }) +public class VAMSAS +{ + + @XmlElement(name = "Tree") + protected List tree; - @XmlElement(name = "Tree") - protected List tree; - @XmlElement(name = "SequenceSet") - protected List sequenceSet; + @XmlElement(name = "SequenceSet") + protected List sequenceSet; - /** - * Gets the value of the tree property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the tree property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getTree().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link String } - * - * - */ - public List getTree() { - if (tree == null) { - tree = new ArrayList(); - } - return this.tree; + /** + * Gets the value of the tree property. + * + * <p> This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will be + * present inside the JAXB object. This is why there is not a + * <CODE>set</CODE> method for the tree property. + * + * <p> For example, to add a new item, do as follows: <pre> + * getTree().add(newItem); </pre> + * + * + * <p> Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getTree() + { + if (tree == null) + { + tree = new ArrayList(); } + return this.tree; + } - /** - * Gets the value of the sequenceSet property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the sequenceSet property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getSequenceSet().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link SequenceSet } - * - * - */ - public List getSequenceSet() { - if (sequenceSet == null) { - sequenceSet = new ArrayList(); - } - return this.sequenceSet; + /** + * Gets the value of the sequenceSet property. + * + * <p> This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will be + * present inside the JAXB object. This is why there is not a + * <CODE>set</CODE> method for the sequenceSet property. + * + * <p> For example, to add a new item, do as follows: <pre> + * getSequenceSet().add(newItem); </pre> + * + * + * <p> Objects of the following type(s) are allowed in the list + * {@link SequenceSet } + * + * + */ + public List getSequenceSet() + { + if (sequenceSet == null) + { + sequenceSet = new ArrayList(); } + return this.sequenceSet; + } } diff --git a/src/jalview/xml/binding/jalview/WebServiceParameterSet.java b/src/jalview/xml/binding/jalview/WebServiceParameterSet.java index 87e275d..44d5829 100644 --- a/src/jalview/xml/binding/jalview/WebServiceParameterSet.java +++ b/src/jalview/xml/binding/jalview/WebServiceParameterSet.java @@ -5,7 +5,6 @@ // Generated on: 2021.08.30 at 11:05:22 AM BST // - package jalview.xml.binding.jalview; import java.util.ArrayList; @@ -18,177 +17,173 @@ import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.bind.annotation.XmlType; - /** * <p>Java class for WebServiceParameterSet complex type. * - * <p>The following schema fragment specifies the expected content contained within this class. + * <p>The following schema fragment specifies the expected content + * contained within this class. * - * <pre> - * &lt;complexType name="WebServiceParameterSet"&gt; - * &lt;complexContent&gt; - * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; - * &lt;sequence&gt; - * &lt;element name="Version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt; - * &lt;element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt; - * &lt;element name="serviceURL" type="{http://www.w3.org/2001/XMLSchema}anyURI" maxOccurs="unbounded"/&gt; - * &lt;element name="parameters" type="{http://www.w3.org/2001/XMLSchema}string"/&gt; - * &lt;/sequence&gt; - * &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; - * &lt;/restriction&gt; - * &lt;/complexContent&gt; - * &lt;/complexType&gt; - * </pre> + * <pre> &lt;complexType name="WebServiceParameterSet"&gt; + * &lt;complexContent&gt; &lt;restriction + * base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; + * &lt;sequence&gt; &lt;element name="Version" + * type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt; + * &lt;element name="description" + * type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt; + * &lt;element name="serviceURL" + * type="{http://www.w3.org/2001/XMLSchema}anyURI" + * maxOccurs="unbounded"/&gt; &lt;element name="parameters" + * type="{http://www.w3.org/2001/XMLSchema}string"/&gt; + * &lt;/sequence&gt; &lt;attribute name="name" use="required" + * type="{http://www.w3.org/2001/XMLSchema}string" /&gt; + * &lt;/restriction&gt; &lt;/complexContent&gt; + * &lt;/complexType&gt; </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "WebServiceParameterSet", namespace = "www.jalview.org/xml/wsparamset", propOrder = { - "version", - "description", - "serviceURL", - "parameters" -}) +@XmlType( + name = "WebServiceParameterSet", + namespace = "www.jalview.org/xml/wsparamset", + propOrder = + { "version", "description", "serviceURL", "parameters" }) @XmlSeeAlso({ - jalview.xml.binding.jalview.JalviewModel.Viewport.CalcIdParam.class -}) -public class WebServiceParameterSet { - - @XmlElement(name = "Version", namespace = "") - protected String version; - @XmlElement(namespace = "") - protected String description; - @XmlElement(namespace = "", required = true) - @XmlSchemaType(name = "anyURI") - protected List serviceURL; - @XmlElement(namespace = "", required = true) - protected String parameters; - @XmlAttribute(name = "name", required = true) - protected String name; - - /** - * Gets the value of the version property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getVersion() { - return version; - } - - /** - * Sets the value of the version property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setVersion(String value) { - this.version = value; - } - - /** - * Gets the value of the description property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDescription() { - return description; - } - - /** - * Sets the value of the description property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDescription(String value) { - this.description = value; - } - - /** - * Gets the value of the serviceURL property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the serviceURL property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getServiceURL().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link String } - * - * - */ - public List getServiceURL() { - if (serviceURL == null) { - serviceURL = new ArrayList(); - } - return this.serviceURL; - } - - /** - * Gets the value of the parameters property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getParameters() { - return parameters; - } - - /** - * Sets the value of the parameters property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setParameters(String value) { - this.parameters = value; - } - - /** - * Gets the value of the name property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getName() { - return name; - } - - /** - * Sets the value of the name property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setName(String value) { - this.name = value; + jalview.xml.binding.jalview.JalviewModel.Viewport.CalcIdParam.class }) +public class WebServiceParameterSet +{ + + @XmlElement(name = "Version", namespace = "") + protected String version; + + @XmlElement(namespace = "") + protected String description; + + @XmlElement(namespace = "", required = true) + @XmlSchemaType(name = "anyURI") + protected List serviceURL; + + @XmlElement(namespace = "", required = true) + protected String parameters; + + @XmlAttribute(name = "name", required = true) + protected String name; + + /** + * Gets the value of the version property. + * + * @return possible object is {@link String } + * + */ + public String getVersion() + { + return version; + } + + /** + * Sets the value of the version property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setVersion(String value) + { + this.version = value; + } + + /** + * Gets the value of the description property. + * + * @return possible object is {@link String } + * + */ + public String getDescription() + { + return description; + } + + /** + * Sets the value of the description property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDescription(String value) + { + this.description = value; + } + + /** + * Gets the value of the serviceURL property. + * + * <p> This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will be + * present inside the JAXB object. This is why there is not a + * <CODE>set</CODE> method for the serviceURL property. + * + * <p> For example, to add a new item, do as follows: <pre> + * getServiceURL().add(newItem); </pre> + * + * + * <p> Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getServiceURL() + { + if (serviceURL == null) + { + serviceURL = new ArrayList(); } + return this.serviceURL; + } + + /** + * Gets the value of the parameters property. + * + * @return possible object is {@link String } + * + */ + public String getParameters() + { + return parameters; + } + + /** + * Sets the value of the parameters property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setParameters(String value) + { + this.parameters = value; + } + + /** + * Gets the value of the name property. + * + * @return possible object is {@link String } + * + */ + public String getName() + { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setName(String value) + { + this.name = value; + } } diff --git a/src/jalview/xml/binding/jalview/package-info.java b/src/jalview/xml/binding/jalview/package-info.java index 2700ffa..aa2ab9e 100644 --- a/src/jalview/xml/binding/jalview/package-info.java +++ b/src/jalview/xml/binding/jalview/package-info.java @@ -5,5 +5,7 @@ // Generated on: 2021.08.30 at 11:05:22 AM BST // -@javax.xml.bind.annotation.XmlSchema(namespace = "www.vamsas.ac.uk/jalview/version2", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) +@javax.xml.bind.annotation.XmlSchema( + namespace = "www.vamsas.ac.uk/jalview/version2", + elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) package jalview.xml.binding.jalview; diff --git a/src/jalview/xml/binding/sifts/Alignment.java b/src/jalview/xml/binding/sifts/Alignment.java index 650ea19..b73d5d7 100644 --- a/src/jalview/xml/binding/sifts/Alignment.java +++ b/src/jalview/xml/binding/sifts/Alignment.java @@ -5,7 +5,6 @@ // Generated on: 2015.10.09 at 03:18:33 PM BST // - package jalview.xml.binding.sifts; import java.math.BigInteger; @@ -20,11 +19,13 @@ import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlValue; - /** - *

        Java class for anonymous complex type. + *

        + * Java class for anonymous complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType>
        @@ -222,199 +223,1311 @@ import javax.xml.bind.annotation.XmlValue;
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "", propOrder = {
        -    "alignObject",
        -    "score",
        -    "block",
        -    "geo3D"
        -})
        +@XmlType(
        +  name = "",
        +  propOrder =
        +  { "alignObject", "score", "block", "geo3D" })
         @XmlRootElement(name = "alignment")
        -public class Alignment {
        -
        -    @XmlElement(required = true)
        -    protected List alignObject;
        -    protected List score;
        -    @XmlElement(required = true)
        -    protected List block;
        -    @XmlElement(name = "geo3d")
        -    protected List geo3D;
        -    @XmlAttribute(name = "alignType", required = true)
        -    protected String alignType;
        +public class Alignment
        +{
        +
        +  @XmlElement(required = true)
        +  protected List alignObject;
        +
        +  protected List score;
        +
        +  @XmlElement(required = true)
        +  protected List block;
        +
        +  @XmlElement(name = "geo3d")
        +  protected List geo3D;
        +
        +  @XmlAttribute(name = "alignType", required = true)
        +  protected String alignType;
        +
        +  /**
        +   * Gets the value of the alignObject property.
        +   * 
        +   * 

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the alignObject property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getAlignObject().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link Alignment.AlignObject } + * + * + */ + public List getAlignObject() + { + if (alignObject == null) + { + alignObject = new ArrayList(); + } + return this.alignObject; + } + + /** + * Gets the value of the score property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the score property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getScore().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link Alignment.Score } + * + * + */ + public List getScore() + { + if (score == null) + { + score = new ArrayList(); + } + return this.score; + } + + /** + * Gets the value of the block property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the block property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getBlock().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link Alignment.Block } + * + * + */ + public List getBlock() + { + if (block == null) + { + block = new ArrayList(); + } + return this.block; + } + + /** + * Gets the value of the geo3D property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the geo3D property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getGeo3D().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link Alignment.Geo3D } + * + * + */ + public List getGeo3D() + { + if (geo3D == null) + { + geo3D = new ArrayList(); + } + return this.geo3D; + } + + /** + * Gets the value of the alignType property. + * + * @return possible object is {@link String } + * + */ + public String getAlignType() + { + return alignType; + } + + /** + * Sets the value of the alignType property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setAlignType(String value) + { + this.alignType = value; + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <complexContent>
        +   *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *       <sequence>
        +   *         <element name="alignObjectDetail" maxOccurs="unbounded" minOccurs="0">
        +   *           <complexType>
        +   *             <complexContent>
        +   *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
        +   *               </restriction>
        +   *             </complexContent>
        +   *           </complexType>
        +   *         </element>
        +   *         <element name="sequence" minOccurs="0">
        +   *           <complexType>
        +   *             <complexContent>
        +   *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
        +   *               </restriction>
        +   *             </complexContent>
        +   *           </complexType>
        +   *         </element>
        +   *       </sequence>
        +   *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
        +   *       <attribute name="objectVersion" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *       <attribute name="intObjectId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *       <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *     </restriction>
        +   *   </complexContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "alignObjectDetail", "sequence" }) + public static class AlignObject + { + + protected List alignObjectDetail; + + protected Alignment.AlignObject.Sequence sequence; + + @XmlAttribute(name = "objectVersion", required = true) + protected String objectVersion; + + @XmlAttribute(name = "intObjectId", required = true) + protected String intObjectId; + + @XmlAttribute(name = "type") + protected String type; + + @XmlAttribute(name = "dbSource", required = true) + protected String dbSource; + + @XmlAttribute(name = "dbCoordSys", required = true) + protected String dbCoordSys; + + @XmlAttribute(name = "dbAccessionId", required = true) + protected String dbAccessionId; + + @XmlAttribute(name = "dbEvidence") + protected String dbEvidence; + + @XmlAttribute(name = "dbVersion") + protected String dbVersion; /** - * Gets the value of the alignObject property. + * Gets the value of the alignObjectDetail property. * *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the alignObject property. + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the alignObjectDetail property. * *

        * For example, to add a new item, do as follows: + * *

        -     *    getAlignObject().add(newItem);
        +     * getAlignObjectDetail().add(newItem);
              * 
        * * *

        * Objects of the following type(s) are allowed in the list - * {@link Alignment.AlignObject } + * {@link Alignment.AlignObject.AlignObjectDetail } * * */ - public List getAlignObject() { - if (alignObject == null) { - alignObject = new ArrayList(); - } - return this.alignObject; + public List getAlignObjectDetail() + { + if (alignObjectDetail == null) + { + alignObjectDetail = new ArrayList(); + } + return this.alignObjectDetail; + } + + /** + * Gets the value of the sequence property. + * + * @return possible object is {@link Alignment.AlignObject.Sequence } + * + */ + public Alignment.AlignObject.Sequence getSequence() + { + return sequence; + } + + /** + * Sets the value of the sequence property. + * + * @param value + * allowed object is {@link Alignment.AlignObject.Sequence } + * + */ + public void setSequence(Alignment.AlignObject.Sequence value) + { + this.sequence = value; + } + + /** + * Gets the value of the objectVersion property. + * + * @return possible object is {@link String } + * + */ + public String getObjectVersion() + { + return objectVersion; + } + + /** + * Sets the value of the objectVersion property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setObjectVersion(String value) + { + this.objectVersion = value; + } + + /** + * Gets the value of the intObjectId property. + * + * @return possible object is {@link String } + * + */ + public String getIntObjectId() + { + return intObjectId; } /** - * Gets the value of the score property. + * Sets the value of the intObjectId property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setIntObjectId(String value) + { + this.intObjectId = value; + } + + /** + * Gets the value of the type property. + * + * @return possible object is {@link String } + * + */ + public String getType() + { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setType(String value) + { + this.type = value; + } + + /** + * Gets the value of the dbSource property. + * + * @return possible object is {@link String } + * + */ + public String getDbSource() + { + return dbSource; + } + + /** + * Sets the value of the dbSource property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDbSource(String value) + { + this.dbSource = value; + } + + /** + * Gets the value of the dbCoordSys property. + * + * @return possible object is {@link String } + * + */ + public String getDbCoordSys() + { + return dbCoordSys; + } + + /** + * Sets the value of the dbCoordSys property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDbCoordSys(String value) + { + this.dbCoordSys = value; + } + + /** + * Gets the value of the dbAccessionId property. + * + * @return possible object is {@link String } + * + */ + public String getDbAccessionId() + { + return dbAccessionId; + } + + /** + * Sets the value of the dbAccessionId property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDbAccessionId(String value) + { + this.dbAccessionId = value; + } + + /** + * Gets the value of the dbEvidence property. + * + * @return possible object is {@link String } + * + */ + public String getDbEvidence() + { + return dbEvidence; + } + + /** + * Sets the value of the dbEvidence property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDbEvidence(String value) + { + this.dbEvidence = value; + } + + /** + * Gets the value of the dbVersion property. + * + * @return possible object is {@link String } + * + */ + public String getDbVersion() + { + return dbVersion; + } + + /** + * Sets the value of the dbVersion property. + * + * @param value + * allowed object is {@link String } * + */ + public void setDbVersion(String value) + { + this.dbVersion = value; + } + + /** *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the score property. + * Java class for anonymous complex type. * *

        - * For example, to add a new item, do as follows: + * The following schema fragment specifies the expected content contained + * within this class. + * *

        -     *    getScore().add(newItem);
        +     * <complexType>
        +     *   <complexContent>
        +     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +     *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
        +     *     </restriction>
        +     *   </complexContent>
        +     * </complexType>
              * 
        * * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "content" }) + public static class AlignObjectDetail + { + + @XmlValue + protected String content; + + @XmlAttribute(name = "dbSource") + protected String dbSource; + + @XmlAttribute(name = "property", required = true) + protected String property; + + /** + * Gets the value of the content property. + * + * @return possible object is {@link String } + * + */ + public String getContent() + { + return content; + } + + /** + * Sets the value of the content property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setContent(String value) + { + this.content = value; + } + + /** + * Gets the value of the dbSource property. + * + * @return possible object is {@link String } + * + */ + public String getDbSource() + { + return dbSource; + } + + /** + * Sets the value of the dbSource property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDbSource(String value) + { + this.dbSource = value; + } + + /** + * Gets the value of the property property. + * + * @return possible object is {@link String } + * + */ + public String getProperty() + { + return property; + } + + /** + * Sets the value of the property property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setProperty(String value) + { + this.property = value; + } + + } + + /** *

        - * Objects of the following type(s) are allowed in the list - * {@link Alignment.Score } + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +     * <complexType>
        +     *   <complexContent>
        +     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +     *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
        +     *     </restriction>
        +     *   </complexContent>
        +     * </complexType>
        +     * 
        * * */ - public List getScore() { - if (score == null) { - score = new ArrayList(); - } - return this.score; + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "content" }) + public static class Sequence + { + + @XmlValue + protected String content; + + @XmlAttribute(name = "start") + protected String start; + + @XmlAttribute(name = "end") + protected String end; + + /** + * Gets the value of the content property. + * + * @return possible object is {@link String } + * + */ + public String getContent() + { + return content; + } + + /** + * Sets the value of the content property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setContent(String value) + { + this.content = value; + } + + /** + * Gets the value of the start property. + * + * @return possible object is {@link String } + * + */ + public String getStart() + { + return start; + } + + /** + * Sets the value of the start property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setStart(String value) + { + this.start = value; + } + + /** + * Gets the value of the end property. + * + * @return possible object is {@link String } + * + */ + public String getEnd() + { + return end; + } + + /** + * Sets the value of the end property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setEnd(String value) + { + this.end = value; + } + } + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <complexContent>
        +   *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *       <sequence>
        +   *         <element name="segment" maxOccurs="unbounded">
        +   *           <complexType>
        +   *             <complexContent>
        +   *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                 <sequence minOccurs="0">
        +   *                   <element name="cigar" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}cigarstring"/>
        +   *                 </sequence>
        +   *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
        +   *                 <attribute name="intObjectId" use="required" type="{http://www.w3.org/2001/XMLSchema}anySimpleType" />
        +   *                 <attribute name="strand" type="{http://www.w3.org/2001/XMLSchema}anySimpleType" />
        +   *               </restriction>
        +   *             </complexContent>
        +   *           </complexType>
        +   *         </element>
        +   *       </sequence>
        +   *       <attribute name="blockScore" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *       <attribute name="blockOrder" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        +   *     </restriction>
        +   *   </complexContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "segment" }) + public static class Block + { + + @XmlElement(required = true) + protected List segment; + + @XmlAttribute(name = "blockScore") + protected String blockScore; + + @XmlAttribute(name = "blockOrder", required = true) + protected BigInteger blockOrder; + /** - * Gets the value of the block property. + * Gets the value of the segment property. * *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the block property. + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the segment property. * *

        * For example, to add a new item, do as follows: + * *

        -     *    getBlock().add(newItem);
        +     * getSegment().add(newItem);
              * 
        * * *

        * Objects of the following type(s) are allowed in the list - * {@link Alignment.Block } + * {@link Alignment.Block.Segment } * * */ - public List getBlock() { - if (block == null) { - block = new ArrayList(); - } - return this.block; + public List getSegment() + { + if (segment == null) + { + segment = new ArrayList(); + } + return this.segment; + } + + /** + * Gets the value of the blockScore property. + * + * @return possible object is {@link String } + * + */ + public String getBlockScore() + { + return blockScore; + } + + /** + * Sets the value of the blockScore property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setBlockScore(String value) + { + this.blockScore = value; + } + + /** + * Gets the value of the blockOrder property. + * + * @return possible object is {@link BigInteger } + * + */ + public BigInteger getBlockOrder() + { + return blockOrder; + } + + /** + * Sets the value of the blockOrder property. + * + * @param value + * allowed object is {@link BigInteger } + * + */ + public void setBlockOrder(BigInteger value) + { + this.blockOrder = value; } /** - * Gets the value of the geo3D property. + *

        + * Java class for anonymous complex type. * *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the geo3D property. + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +     * <complexType>
        +     *   <complexContent>
        +     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +     *       <sequence minOccurs="0">
        +     *         <element name="cigar" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}cigarstring"/>
        +     *       </sequence>
        +     *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
        +     *       <attribute name="intObjectId" use="required" type="{http://www.w3.org/2001/XMLSchema}anySimpleType" />
        +     *       <attribute name="strand" type="{http://www.w3.org/2001/XMLSchema}anySimpleType" />
        +     *     </restriction>
        +     *   </complexContent>
        +     * </complexType>
        +     * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "cigar" }) + public static class Segment + { + + protected String cigar; + + @XmlAttribute(name = "intObjectId", required = true) + @XmlSchemaType(name = "anySimpleType") + protected String intObjectId; + + @XmlAttribute(name = "strand") + @XmlSchemaType(name = "anySimpleType") + protected String strand; + + @XmlAttribute(name = "start") + protected String start; + + @XmlAttribute(name = "end") + protected String end; + + /** + * Gets the value of the cigar property. + * + * @return possible object is {@link String } + * + */ + public String getCigar() + { + return cigar; + } + + /** + * Sets the value of the cigar property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setCigar(String value) + { + this.cigar = value; + } + + /** + * Gets the value of the intObjectId property. + * + * @return possible object is {@link String } + * + */ + public String getIntObjectId() + { + return intObjectId; + } + + /** + * Sets the value of the intObjectId property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setIntObjectId(String value) + { + this.intObjectId = value; + } + + /** + * Gets the value of the strand property. + * + * @return possible object is {@link String } + * + */ + public String getStrand() + { + return strand; + } + + /** + * Sets the value of the strand property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setStrand(String value) + { + this.strand = value; + } + + /** + * Gets the value of the start property. + * + * @return possible object is {@link String } + * + */ + public String getStart() + { + return start; + } + + /** + * Sets the value of the start property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setStart(String value) + { + this.start = value; + } + + /** + * Gets the value of the end property. + * + * @return possible object is {@link String } + * + */ + public String getEnd() + { + return end; + } + + /** + * Sets the value of the end property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setEnd(String value) + { + this.end = value; + } + + } + + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <complexContent>
        +   *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *       <sequence>
        +   *         <element name="vector">
        +   *           <complexType>
        +   *             <complexContent>
        +   *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                 <attribute name="x" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        +   *                 <attribute name="y" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        +   *                 <attribute name="z" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        +   *               </restriction>
        +   *             </complexContent>
        +   *           </complexType>
        +   *         </element>
        +   *         <element name="matrix" maxOccurs="unbounded">
        +   *           <complexType>
        +   *             <complexContent>
        +   *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                 <sequence>
        +   *                   <element name="max11">
        +   *                     <complexType>
        +   *                       <complexContent>
        +   *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                           <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        +   *                         </restriction>
        +   *                       </complexContent>
        +   *                     </complexType>
        +   *                   </element>
        +   *                   <element name="max12">
        +   *                     <complexType>
        +   *                       <complexContent>
        +   *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                           <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        +   *                         </restriction>
        +   *                       </complexContent>
        +   *                     </complexType>
        +   *                   </element>
        +   *                   <element name="max13">
        +   *                     <complexType>
        +   *                       <complexContent>
        +   *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                           <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        +   *                         </restriction>
        +   *                       </complexContent>
        +   *                     </complexType>
        +   *                   </element>
        +   *                   <element name="max21">
        +   *                     <complexType>
        +   *                       <complexContent>
        +   *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                           <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        +   *                         </restriction>
        +   *                       </complexContent>
        +   *                     </complexType>
        +   *                   </element>
        +   *                   <element name="max22">
        +   *                     <complexType>
        +   *                       <complexContent>
        +   *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                           <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        +   *                         </restriction>
        +   *                       </complexContent>
        +   *                     </complexType>
        +   *                   </element>
        +   *                   <element name="max23">
        +   *                     <complexType>
        +   *                       <complexContent>
        +   *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                           <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        +   *                         </restriction>
        +   *                       </complexContent>
        +   *                     </complexType>
        +   *                   </element>
        +   *                   <element name="max31">
        +   *                     <complexType>
        +   *                       <complexContent>
        +   *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                           <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        +   *                         </restriction>
        +   *                       </complexContent>
        +   *                     </complexType>
        +   *                   </element>
        +   *                   <element name="max32">
        +   *                     <complexType>
        +   *                       <complexContent>
        +   *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                           <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        +   *                         </restriction>
        +   *                       </complexContent>
        +   *                     </complexType>
        +   *                   </element>
        +   *                   <element name="max33">
        +   *                     <complexType>
        +   *                       <complexContent>
        +   *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                           <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        +   *                         </restriction>
        +   *                       </complexContent>
        +   *                     </complexType>
        +   *                   </element>
        +   *                 </sequence>
        +   *               </restriction>
        +   *             </complexContent>
        +   *           </complexType>
        +   *         </element>
        +   *       </sequence>
        +   *       <attribute name="intObjectId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *     </restriction>
        +   *   </complexContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "vector", "matrix" }) + public static class Geo3D + { + + @XmlElement(required = true) + protected Alignment.Geo3D.Vector vector; + + @XmlElement(required = true) + protected List matrix; + + @XmlAttribute(name = "intObjectId", required = true) + protected String intObjectId; + + /** + * Gets the value of the vector property. + * + * @return possible object is {@link Alignment.Geo3D.Vector } + * + */ + public Alignment.Geo3D.Vector getVector() + { + return vector; + } + + /** + * Sets the value of the vector property. + * + * @param value + * allowed object is {@link Alignment.Geo3D.Vector } + * + */ + public void setVector(Alignment.Geo3D.Vector value) + { + this.vector = value; + } + + /** + * Gets the value of the matrix property. + * + *

        + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the matrix property. * *

        * For example, to add a new item, do as follows: + * *

        -     *    getGeo3D().add(newItem);
        +     * getMatrix().add(newItem);
              * 
        * * *

        * Objects of the following type(s) are allowed in the list - * {@link Alignment.Geo3D } + * {@link Alignment.Geo3D.Matrix } * * */ - public List getGeo3D() { - if (geo3D == null) { - geo3D = new ArrayList(); - } - return this.geo3D; + public List getMatrix() + { + if (matrix == null) + { + matrix = new ArrayList(); + } + return this.matrix; } /** - * Gets the value of the alignType property. + * Gets the value of the intObjectId property. + * + * @return possible object is {@link String } * - * @return - * possible object is - * {@link String } - * */ - public String getAlignType() { - return alignType; + public String getIntObjectId() + { + return intObjectId; } /** - * Sets the value of the alignType property. + * Sets the value of the intObjectId property. * * @param value - * allowed object is - * {@link String } - * + * allowed object is {@link String } + * */ - public void setAlignType(String value) { - this.alignType = value; + public void setIntObjectId(String value) + { + this.intObjectId = value; } - /** - *

        Java class for anonymous complex type. + *

        + * Java class for anonymous complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained + * within this class. * *

              * <complexType>
              *   <complexContent>
              *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
              *       <sequence>
        -     *         <element name="alignObjectDetail" maxOccurs="unbounded" minOccurs="0">
        +     *         <element name="max11">
              *           <complexType>
              *             <complexContent>
              *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
        +     *                 <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
              *               </restriction>
              *             </complexContent>
              *           </complexType>
              *         </element>
        -     *         <element name="sequence" minOccurs="0">
        +     *         <element name="max12">
              *           <complexType>
              *             <complexContent>
              *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
        +     *                 <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        +     *               </restriction>
        +     *             </complexContent>
        +     *           </complexType>
        +     *         </element>
        +     *         <element name="max13">
        +     *           <complexType>
        +     *             <complexContent>
        +     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +     *                 <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        +     *               </restriction>
        +     *             </complexContent>
        +     *           </complexType>
        +     *         </element>
        +     *         <element name="max21">
        +     *           <complexType>
        +     *             <complexContent>
        +     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +     *                 <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        +     *               </restriction>
        +     *             </complexContent>
        +     *           </complexType>
        +     *         </element>
        +     *         <element name="max22">
        +     *           <complexType>
        +     *             <complexContent>
        +     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +     *                 <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        +     *               </restriction>
        +     *             </complexContent>
        +     *           </complexType>
        +     *         </element>
        +     *         <element name="max23">
        +     *           <complexType>
        +     *             <complexContent>
        +     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +     *                 <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        +     *               </restriction>
        +     *             </complexContent>
        +     *           </complexType>
        +     *         </element>
        +     *         <element name="max31">
        +     *           <complexType>
        +     *             <complexContent>
        +     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +     *                 <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        +     *               </restriction>
        +     *             </complexContent>
        +     *           </complexType>
        +     *         </element>
        +     *         <element name="max32">
        +     *           <complexType>
        +     *             <complexContent>
        +     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +     *                 <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        +     *               </restriction>
        +     *             </complexContent>
        +     *           </complexType>
        +     *         </element>
        +     *         <element name="max33">
        +     *           <complexType>
        +     *             <complexContent>
        +     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +     *                 <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
              *               </restriction>
              *             </complexContent>
              *           </complexType>
              *         </element>
              *       </sequence>
        -     *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
        -     *       <attribute name="objectVersion" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *       <attribute name="intObjectId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *       <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
              *     </restriction>
              *   </complexContent>
              * </complexType>
        @@ -423,516 +1536,697 @@ public class Alignment {
              * 
              */
             @XmlAccessorType(XmlAccessType.FIELD)
        -    @XmlType(name = "", propOrder = {
        -        "alignObjectDetail",
        -        "sequence"
        -    })
        -    public static class AlignObject {
        -
        -        protected List alignObjectDetail;
        -        protected Alignment.AlignObject.Sequence sequence;
        -        @XmlAttribute(name = "objectVersion", required = true)
        -        protected String objectVersion;
        -        @XmlAttribute(name = "intObjectId", required = true)
        -        protected String intObjectId;
        -        @XmlAttribute(name = "type")
        -        protected String type;
        -        @XmlAttribute(name = "dbSource", required = true)
        -        protected String dbSource;
        -        @XmlAttribute(name = "dbCoordSys", required = true)
        -        protected String dbCoordSys;
        -        @XmlAttribute(name = "dbAccessionId", required = true)
        -        protected String dbAccessionId;
        -        @XmlAttribute(name = "dbEvidence")
        -        protected String dbEvidence;
        -        @XmlAttribute(name = "dbVersion")
        -        protected String dbVersion;
        +    @XmlType(
        +      name = "",
        +      propOrder =
        +      { "max11", "max12", "max13", "max21", "max22", "max23", "max31",
        +          "max32", "max33" })
        +    public static class Matrix
        +    {
        +
        +      @XmlElement(required = true)
        +      protected Alignment.Geo3D.Matrix.Max11 max11;
        +
        +      @XmlElement(required = true)
        +      protected Alignment.Geo3D.Matrix.Max12 max12;
        +
        +      @XmlElement(required = true)
        +      protected Alignment.Geo3D.Matrix.Max13 max13;
        +
        +      @XmlElement(required = true)
        +      protected Alignment.Geo3D.Matrix.Max21 max21;
        +
        +      @XmlElement(required = true)
        +      protected Alignment.Geo3D.Matrix.Max22 max22;
        +
        +      @XmlElement(required = true)
        +      protected Alignment.Geo3D.Matrix.Max23 max23;
        +
        +      @XmlElement(required = true)
        +      protected Alignment.Geo3D.Matrix.Max31 max31;
        +
        +      @XmlElement(required = true)
        +      protected Alignment.Geo3D.Matrix.Max32 max32;
        +
        +      @XmlElement(required = true)
        +      protected Alignment.Geo3D.Matrix.Max33 max33;
        +
        +      /**
        +       * Gets the value of the max11 property.
        +       * 
        +       * @return possible object is {@link Alignment.Geo3D.Matrix.Max11 }
        +       * 
        +       */
        +      public Alignment.Geo3D.Matrix.Max11 getMax11()
        +      {
        +        return max11;
        +      }
        +
        +      /**
        +       * Sets the value of the max11 property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Alignment.Geo3D.Matrix.Max11 }
        +       * 
        +       */
        +      public void setMax11(Alignment.Geo3D.Matrix.Max11 value)
        +      {
        +        this.max11 = value;
        +      }
        +
        +      /**
        +       * Gets the value of the max12 property.
        +       * 
        +       * @return possible object is {@link Alignment.Geo3D.Matrix.Max12 }
        +       * 
        +       */
        +      public Alignment.Geo3D.Matrix.Max12 getMax12()
        +      {
        +        return max12;
        +      }
        +
        +      /**
        +       * Sets the value of the max12 property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Alignment.Geo3D.Matrix.Max12 }
        +       * 
        +       */
        +      public void setMax12(Alignment.Geo3D.Matrix.Max12 value)
        +      {
        +        this.max12 = value;
        +      }
        +
        +      /**
        +       * Gets the value of the max13 property.
        +       * 
        +       * @return possible object is {@link Alignment.Geo3D.Matrix.Max13 }
        +       * 
        +       */
        +      public Alignment.Geo3D.Matrix.Max13 getMax13()
        +      {
        +        return max13;
        +      }
        +
        +      /**
        +       * Sets the value of the max13 property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Alignment.Geo3D.Matrix.Max13 }
        +       * 
        +       */
        +      public void setMax13(Alignment.Geo3D.Matrix.Max13 value)
        +      {
        +        this.max13 = value;
        +      }
        +
        +      /**
        +       * Gets the value of the max21 property.
        +       * 
        +       * @return possible object is {@link Alignment.Geo3D.Matrix.Max21 }
        +       * 
        +       */
        +      public Alignment.Geo3D.Matrix.Max21 getMax21()
        +      {
        +        return max21;
        +      }
        +
        +      /**
        +       * Sets the value of the max21 property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Alignment.Geo3D.Matrix.Max21 }
        +       * 
        +       */
        +      public void setMax21(Alignment.Geo3D.Matrix.Max21 value)
        +      {
        +        this.max21 = value;
        +      }
        +
        +      /**
        +       * Gets the value of the max22 property.
        +       * 
        +       * @return possible object is {@link Alignment.Geo3D.Matrix.Max22 }
        +       * 
        +       */
        +      public Alignment.Geo3D.Matrix.Max22 getMax22()
        +      {
        +        return max22;
        +      }
        +
        +      /**
        +       * Sets the value of the max22 property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Alignment.Geo3D.Matrix.Max22 }
        +       * 
        +       */
        +      public void setMax22(Alignment.Geo3D.Matrix.Max22 value)
        +      {
        +        this.max22 = value;
        +      }
        +
        +      /**
        +       * Gets the value of the max23 property.
        +       * 
        +       * @return possible object is {@link Alignment.Geo3D.Matrix.Max23 }
        +       * 
        +       */
        +      public Alignment.Geo3D.Matrix.Max23 getMax23()
        +      {
        +        return max23;
        +      }
        +
        +      /**
        +       * Sets the value of the max23 property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Alignment.Geo3D.Matrix.Max23 }
        +       * 
        +       */
        +      public void setMax23(Alignment.Geo3D.Matrix.Max23 value)
        +      {
        +        this.max23 = value;
        +      }
        +
        +      /**
        +       * Gets the value of the max31 property.
        +       * 
        +       * @return possible object is {@link Alignment.Geo3D.Matrix.Max31 }
        +       * 
        +       */
        +      public Alignment.Geo3D.Matrix.Max31 getMax31()
        +      {
        +        return max31;
        +      }
        +
        +      /**
        +       * Sets the value of the max31 property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Alignment.Geo3D.Matrix.Max31 }
        +       * 
        +       */
        +      public void setMax31(Alignment.Geo3D.Matrix.Max31 value)
        +      {
        +        this.max31 = value;
        +      }
        +
        +      /**
        +       * Gets the value of the max32 property.
        +       * 
        +       * @return possible object is {@link Alignment.Geo3D.Matrix.Max32 }
        +       * 
        +       */
        +      public Alignment.Geo3D.Matrix.Max32 getMax32()
        +      {
        +        return max32;
        +      }
        +
        +      /**
        +       * Sets the value of the max32 property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Alignment.Geo3D.Matrix.Max32 }
        +       * 
        +       */
        +      public void setMax32(Alignment.Geo3D.Matrix.Max32 value)
        +      {
        +        this.max32 = value;
        +      }
        +
        +      /**
        +       * Gets the value of the max33 property.
        +       * 
        +       * @return possible object is {@link Alignment.Geo3D.Matrix.Max33 }
        +       * 
        +       */
        +      public Alignment.Geo3D.Matrix.Max33 getMax33()
        +      {
        +        return max33;
        +      }
        +
        +      /**
        +       * Sets the value of the max33 property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Alignment.Geo3D.Matrix.Max33 }
        +       * 
        +       */
        +      public void setMax33(Alignment.Geo3D.Matrix.Max33 value)
        +      {
        +        this.max33 = value;
        +      }
        +
        +      /**
        +       * 

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +       * <complexType>
        +       *   <complexContent>
        +       *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +       *       <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        +       *     </restriction>
        +       *   </complexContent>
        +       * </complexType>
        +       * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class Max11 + { + + @XmlAttribute(name = "coord", required = true) + protected float coord; /** - * Gets the value of the alignObjectDetail property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the alignObjectDetail property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getAlignObjectDetail().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link Alignment.AlignObject.AlignObjectDetail } - * + * Gets the value of the coord property. * */ - public List getAlignObjectDetail() { - if (alignObjectDetail == null) { - alignObjectDetail = new ArrayList(); - } - return this.alignObjectDetail; + public float getCoord() + { + return coord; } /** - * Gets the value of the sequence property. + * Sets the value of the coord property. * - * @return - * possible object is - * {@link Alignment.AlignObject.Sequence } - * */ - public Alignment.AlignObject.Sequence getSequence() { - return sequence; + public void setCoord(float value) + { + this.coord = value; } - /** - * Sets the value of the sequence property. - * - * @param value - * allowed object is - * {@link Alignment.AlignObject.Sequence } - * - */ - public void setSequence(Alignment.AlignObject.Sequence value) { - this.sequence = value; - } + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +       * <complexType>
        +       *   <complexContent>
        +       *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +       *       <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        +       *     </restriction>
        +       *   </complexContent>
        +       * </complexType>
        +       * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class Max12 + { + + @XmlAttribute(name = "coord", required = true) + protected float coord; /** - * Gets the value of the objectVersion property. + * Gets the value of the coord property. * - * @return - * possible object is - * {@link String } - * */ - public String getObjectVersion() { - return objectVersion; + public float getCoord() + { + return coord; } /** - * Sets the value of the objectVersion property. + * Sets the value of the coord property. * - * @param value - * allowed object is - * {@link String } - * */ - public void setObjectVersion(String value) { - this.objectVersion = value; + public void setCoord(float value) + { + this.coord = value; } - /** - * Gets the value of the intObjectId property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getIntObjectId() { - return intObjectId; - } + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +       * <complexType>
        +       *   <complexContent>
        +       *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +       *       <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        +       *     </restriction>
        +       *   </complexContent>
        +       * </complexType>
        +       * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class Max13 + { + + @XmlAttribute(name = "coord", required = true) + protected float coord; /** - * Sets the value of the intObjectId property. + * Gets the value of the coord property. * - * @param value - * allowed object is - * {@link String } - * */ - public void setIntObjectId(String value) { - this.intObjectId = value; + public float getCoord() + { + return coord; } /** - * Gets the value of the type property. + * Sets the value of the coord property. * - * @return - * possible object is - * {@link String } - * */ - public String getType() { - return type; + public void setCoord(float value) + { + this.coord = value; } - /** - * Sets the value of the type property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setType(String value) { - this.type = value; - } + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +       * <complexType>
        +       *   <complexContent>
        +       *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +       *       <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        +       *     </restriction>
        +       *   </complexContent>
        +       * </complexType>
        +       * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class Max21 + { + + @XmlAttribute(name = "coord", required = true) + protected float coord; /** - * Gets the value of the dbSource property. + * Gets the value of the coord property. * - * @return - * possible object is - * {@link String } - * */ - public String getDbSource() { - return dbSource; + public float getCoord() + { + return coord; } /** - * Sets the value of the dbSource property. + * Sets the value of the coord property. * - * @param value - * allowed object is - * {@link String } - * */ - public void setDbSource(String value) { - this.dbSource = value; + public void setCoord(float value) + { + this.coord = value; } + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +       * <complexType>
        +       *   <complexContent>
        +       *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +       *       <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        +       *     </restriction>
        +       *   </complexContent>
        +       * </complexType>
        +       * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class Max22 + { + + @XmlAttribute(name = "coord", required = true) + protected float coord; + /** - * Gets the value of the dbCoordSys property. + * Gets the value of the coord property. * - * @return - * possible object is - * {@link String } - * */ - public String getDbCoordSys() { - return dbCoordSys; + public float getCoord() + { + return coord; } /** - * Sets the value of the dbCoordSys property. + * Sets the value of the coord property. * - * @param value - * allowed object is - * {@link String } - * */ - public void setDbCoordSys(String value) { - this.dbCoordSys = value; + public void setCoord(float value) + { + this.coord = value; } + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +       * <complexType>
        +       *   <complexContent>
        +       *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +       *       <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        +       *     </restriction>
        +       *   </complexContent>
        +       * </complexType>
        +       * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class Max23 + { + + @XmlAttribute(name = "coord", required = true) + protected float coord; + /** - * Gets the value of the dbAccessionId property. + * Gets the value of the coord property. * - * @return - * possible object is - * {@link String } - * */ - public String getDbAccessionId() { - return dbAccessionId; + public float getCoord() + { + return coord; } /** - * Sets the value of the dbAccessionId property. + * Sets the value of the coord property. * - * @param value - * allowed object is - * {@link String } - * */ - public void setDbAccessionId(String value) { - this.dbAccessionId = value; + public void setCoord(float value) + { + this.coord = value; } + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +       * <complexType>
        +       *   <complexContent>
        +       *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +       *       <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        +       *     </restriction>
        +       *   </complexContent>
        +       * </complexType>
        +       * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class Max31 + { + + @XmlAttribute(name = "coord", required = true) + protected float coord; + /** - * Gets the value of the dbEvidence property. + * Gets the value of the coord property. * - * @return - * possible object is - * {@link String } - * */ - public String getDbEvidence() { - return dbEvidence; + public float getCoord() + { + return coord; } /** - * Sets the value of the dbEvidence property. + * Sets the value of the coord property. * - * @param value - * allowed object is - * {@link String } - * */ - public void setDbEvidence(String value) { - this.dbEvidence = value; + public void setCoord(float value) + { + this.coord = value; } + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +       * <complexType>
        +       *   <complexContent>
        +       *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +       *       <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        +       *     </restriction>
        +       *   </complexContent>
        +       * </complexType>
        +       * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class Max32 + { + + @XmlAttribute(name = "coord", required = true) + protected float coord; + /** - * Gets the value of the dbVersion property. + * Gets the value of the coord property. * - * @return - * possible object is - * {@link String } - * */ - public String getDbVersion() { - return dbVersion; + public float getCoord() + { + return coord; } /** - * Sets the value of the dbVersion property. + * Sets the value of the coord property. * - * @param value - * allowed object is - * {@link String } - * */ - public void setDbVersion(String value) { - this.dbVersion = value; + public void setCoord(float value) + { + this.coord = value; } + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +       * <complexType>
        +       *   <complexContent>
        +       *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +       *       <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        +       *     </restriction>
        +       *   </complexContent>
        +       * </complexType>
        +       * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class Max33 + { + + @XmlAttribute(name = "coord", required = true) + protected float coord; /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -         * <complexType>
        -         *   <complexContent>
        -         *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
        -         *     </restriction>
        -         *   </complexContent>
        -         * </complexType>
        -         * 
        - * + * Gets the value of the coord property. * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "content" - }) - public static class AlignObjectDetail { - - @XmlValue - protected String content; - @XmlAttribute(name = "dbSource") - protected String dbSource; - @XmlAttribute(name = "property", required = true) - protected String property; - - /** - * Gets the value of the content property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getContent() { - return content; - } - - /** - * Sets the value of the content property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setContent(String value) { - this.content = value; - } - - /** - * Gets the value of the dbSource property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDbSource() { - return dbSource; - } - - /** - * Sets the value of the dbSource property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDbSource(String value) { - this.dbSource = value; - } - - /** - * Gets the value of the property property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getProperty() { - return property; - } - - /** - * Sets the value of the property property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setProperty(String value) { - this.property = value; - } - + public float getCoord() + { + return coord; } - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -         * <complexType>
        -         *   <complexContent>
        -         *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
        -         *     </restriction>
        -         *   </complexContent>
        -         * </complexType>
        -         * 
        - * + * Sets the value of the coord property. * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "content" - }) - public static class Sequence { - - @XmlValue - protected String content; - @XmlAttribute(name = "start") - protected String start; - @XmlAttribute(name = "end") - protected String end; - - /** - * Gets the value of the content property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getContent() { - return content; - } - - /** - * Sets the value of the content property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setContent(String value) { - this.content = value; - } - - /** - * Gets the value of the start property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getStart() { - return start; - } - - /** - * Sets the value of the start property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setStart(String value) { - this.start = value; - } - - /** - * Gets the value of the end property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getEnd() { - return end; - } - - /** - * Sets the value of the end property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setEnd(String value) { - this.end = value; - } - + public void setCoord(float value) + { + this.coord = value; } - } + } + } /** - *

        Java class for anonymous complex type. + *

        + * Java class for anonymous complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained + * within this class. * *

              * <complexType>
              *   <complexContent>
              *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *       <sequence>
        -     *         <element name="segment" maxOccurs="unbounded">
        -     *           <complexType>
        -     *             <complexContent>
        -     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *                 <sequence minOccurs="0">
        -     *                   <element name="cigar" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}cigarstring"/>
        -     *                 </sequence>
        -     *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
        -     *                 <attribute name="intObjectId" use="required" type="{http://www.w3.org/2001/XMLSchema}anySimpleType" />
        -     *                 <attribute name="strand" type="{http://www.w3.org/2001/XMLSchema}anySimpleType" />
        -     *               </restriction>
        -     *             </complexContent>
        -     *           </complexType>
        -     *         </element>
        -     *       </sequence>
        -     *       <attribute name="blockScore" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *       <attribute name="blockOrder" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
        +     *       <attribute name="x" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        +     *       <attribute name="y" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        +     *       <attribute name="z" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
              *     </restriction>
              *   </complexContent>
              * </complexType>
        @@ -941,1370 +2235,155 @@ public class Alignment {
              * 
              */
             @XmlAccessorType(XmlAccessType.FIELD)
        -    @XmlType(name = "", propOrder = {
        -        "segment"
        -    })
        -    public static class Block {
        -
        -        @XmlElement(required = true)
        -        protected List segment;
        -        @XmlAttribute(name = "blockScore")
        -        protected String blockScore;
        -        @XmlAttribute(name = "blockOrder", required = true)
        -        protected BigInteger blockOrder;
        -
        -        /**
        -         * Gets the value of the segment property.
        -         * 
        -         * 

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the segment property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getSegment().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link Alignment.Block.Segment } - * - * - */ - public List getSegment() { - if (segment == null) { - segment = new ArrayList(); - } - return this.segment; - } - - /** - * Gets the value of the blockScore property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getBlockScore() { - return blockScore; - } - - /** - * Sets the value of the blockScore property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setBlockScore(String value) { - this.blockScore = value; - } - - /** - * Gets the value of the blockOrder property. - * - * @return - * possible object is - * {@link BigInteger } - * - */ - public BigInteger getBlockOrder() { - return blockOrder; - } - - /** - * Sets the value of the blockOrder property. - * - * @param value - * allowed object is - * {@link BigInteger } - * - */ - public void setBlockOrder(BigInteger value) { - this.blockOrder = value; - } - - - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -         * <complexType>
        -         *   <complexContent>
        -         *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *       <sequence minOccurs="0">
        -         *         <element name="cigar" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}cigarstring"/>
        -         *       </sequence>
        -         *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
        -         *       <attribute name="intObjectId" use="required" type="{http://www.w3.org/2001/XMLSchema}anySimpleType" />
        -         *       <attribute name="strand" type="{http://www.w3.org/2001/XMLSchema}anySimpleType" />
        -         *     </restriction>
        -         *   </complexContent>
        -         * </complexType>
        -         * 
        - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "cigar" - }) - public static class Segment { - - protected String cigar; - @XmlAttribute(name = "intObjectId", required = true) - @XmlSchemaType(name = "anySimpleType") - protected String intObjectId; - @XmlAttribute(name = "strand") - @XmlSchemaType(name = "anySimpleType") - protected String strand; - @XmlAttribute(name = "start") - protected String start; - @XmlAttribute(name = "end") - protected String end; - - /** - * Gets the value of the cigar property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getCigar() { - return cigar; - } - - /** - * Sets the value of the cigar property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setCigar(String value) { - this.cigar = value; - } - - /** - * Gets the value of the intObjectId property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getIntObjectId() { - return intObjectId; - } - - /** - * Sets the value of the intObjectId property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setIntObjectId(String value) { - this.intObjectId = value; - } - - /** - * Gets the value of the strand property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getStrand() { - return strand; - } - - /** - * Sets the value of the strand property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setStrand(String value) { - this.strand = value; - } - - /** - * Gets the value of the start property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getStart() { - return start; - } - - /** - * Sets the value of the start property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setStart(String value) { - this.start = value; - } - - /** - * Gets the value of the end property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getEnd() { - return end; - } - - /** - * Sets the value of the end property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setEnd(String value) { - this.end = value; - } - - } + @XmlType(name = "") + public static class Vector + { + + @XmlAttribute(name = "x", required = true) + protected float x; + + @XmlAttribute(name = "y", required = true) + protected float y; + + @XmlAttribute(name = "z", required = true) + protected float z; + + /** + * Gets the value of the x property. + * + */ + public float getX() + { + return x; + } + + /** + * Sets the value of the x property. + * + */ + public void setX(float value) + { + this.x = value; + } + + /** + * Gets the value of the y property. + * + */ + public float getY() + { + return y; + } + + /** + * Sets the value of the y property. + * + */ + public void setY(float value) + { + this.y = value; + } + + /** + * Gets the value of the z property. + * + */ + public float getZ() + { + return z; + } + + /** + * Sets the value of the z property. + * + */ + public void setZ(float value) + { + this.z = value; + } } + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <complexContent>
        +   *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *       <attribute name="methodName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *       <attribute name="scoreValue" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *     </restriction>
        +   *   </complexContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class Score + { + + @XmlAttribute(name = "methodName", required = true) + protected String methodName; + + @XmlAttribute(name = "scoreValue", required = true) + protected String scoreValue; /** - *

        Java class for anonymous complex type. + * Gets the value of the methodName property. * - *

        The following schema fragment specifies the expected content contained within this class. + * @return possible object is {@link String } * - *

        -     * <complexType>
        -     *   <complexContent>
        -     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *       <sequence>
        -     *         <element name="vector">
        -     *           <complexType>
        -     *             <complexContent>
        -     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *                 <attribute name="x" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        -     *                 <attribute name="y" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        -     *                 <attribute name="z" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        -     *               </restriction>
        -     *             </complexContent>
        -     *           </complexType>
        -     *         </element>
        -     *         <element name="matrix" maxOccurs="unbounded">
        -     *           <complexType>
        -     *             <complexContent>
        -     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *                 <sequence>
        -     *                   <element name="max11">
        -     *                     <complexType>
        -     *                       <complexContent>
        -     *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *                           <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        -     *                         </restriction>
        -     *                       </complexContent>
        -     *                     </complexType>
        -     *                   </element>
        -     *                   <element name="max12">
        -     *                     <complexType>
        -     *                       <complexContent>
        -     *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *                           <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        -     *                         </restriction>
        -     *                       </complexContent>
        -     *                     </complexType>
        -     *                   </element>
        -     *                   <element name="max13">
        -     *                     <complexType>
        -     *                       <complexContent>
        -     *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *                           <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        -     *                         </restriction>
        -     *                       </complexContent>
        -     *                     </complexType>
        -     *                   </element>
        -     *                   <element name="max21">
        -     *                     <complexType>
        -     *                       <complexContent>
        -     *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *                           <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        -     *                         </restriction>
        -     *                       </complexContent>
        -     *                     </complexType>
        -     *                   </element>
        -     *                   <element name="max22">
        -     *                     <complexType>
        -     *                       <complexContent>
        -     *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *                           <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        -     *                         </restriction>
        -     *                       </complexContent>
        -     *                     </complexType>
        -     *                   </element>
        -     *                   <element name="max23">
        -     *                     <complexType>
        -     *                       <complexContent>
        -     *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *                           <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        -     *                         </restriction>
        -     *                       </complexContent>
        -     *                     </complexType>
        -     *                   </element>
        -     *                   <element name="max31">
        -     *                     <complexType>
        -     *                       <complexContent>
        -     *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *                           <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        -     *                         </restriction>
        -     *                       </complexContent>
        -     *                     </complexType>
        -     *                   </element>
        -     *                   <element name="max32">
        -     *                     <complexType>
        -     *                       <complexContent>
        -     *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *                           <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        -     *                         </restriction>
        -     *                       </complexContent>
        -     *                     </complexType>
        -     *                   </element>
        -     *                   <element name="max33">
        -     *                     <complexType>
        -     *                       <complexContent>
        -     *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *                           <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        -     *                         </restriction>
        -     *                       </complexContent>
        -     *                     </complexType>
        -     *                   </element>
        -     *                 </sequence>
        -     *               </restriction>
        -     *             </complexContent>
        -     *           </complexType>
        -     *         </element>
        -     *       </sequence>
        -     *       <attribute name="intObjectId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *     </restriction>
        -     *   </complexContent>
        -     * </complexType>
        -     * 
        + */ + public String getMethodName() + { + return methodName; + } + + /** + * Sets the value of the methodName property. * + * @param value + * allowed object is {@link String } * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "vector", - "matrix" - }) - public static class Geo3D { - - @XmlElement(required = true) - protected Alignment.Geo3D.Vector vector; - @XmlElement(required = true) - protected List matrix; - @XmlAttribute(name = "intObjectId", required = true) - protected String intObjectId; - - /** - * Gets the value of the vector property. - * - * @return - * possible object is - * {@link Alignment.Geo3D.Vector } - * - */ - public Alignment.Geo3D.Vector getVector() { - return vector; - } - - /** - * Sets the value of the vector property. - * - * @param value - * allowed object is - * {@link Alignment.Geo3D.Vector } - * - */ - public void setVector(Alignment.Geo3D.Vector value) { - this.vector = value; - } - - /** - * Gets the value of the matrix property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the matrix property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getMatrix().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link Alignment.Geo3D.Matrix } - * - * - */ - public List getMatrix() { - if (matrix == null) { - matrix = new ArrayList(); - } - return this.matrix; - } - - /** - * Gets the value of the intObjectId property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getIntObjectId() { - return intObjectId; - } - - /** - * Sets the value of the intObjectId property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setIntObjectId(String value) { - this.intObjectId = value; - } - - - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -         * <complexType>
        -         *   <complexContent>
        -         *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *       <sequence>
        -         *         <element name="max11">
        -         *           <complexType>
        -         *             <complexContent>
        -         *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *                 <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        -         *               </restriction>
        -         *             </complexContent>
        -         *           </complexType>
        -         *         </element>
        -         *         <element name="max12">
        -         *           <complexType>
        -         *             <complexContent>
        -         *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *                 <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        -         *               </restriction>
        -         *             </complexContent>
        -         *           </complexType>
        -         *         </element>
        -         *         <element name="max13">
        -         *           <complexType>
        -         *             <complexContent>
        -         *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *                 <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        -         *               </restriction>
        -         *             </complexContent>
        -         *           </complexType>
        -         *         </element>
        -         *         <element name="max21">
        -         *           <complexType>
        -         *             <complexContent>
        -         *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *                 <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        -         *               </restriction>
        -         *             </complexContent>
        -         *           </complexType>
        -         *         </element>
        -         *         <element name="max22">
        -         *           <complexType>
        -         *             <complexContent>
        -         *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *                 <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        -         *               </restriction>
        -         *             </complexContent>
        -         *           </complexType>
        -         *         </element>
        -         *         <element name="max23">
        -         *           <complexType>
        -         *             <complexContent>
        -         *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *                 <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        -         *               </restriction>
        -         *             </complexContent>
        -         *           </complexType>
        -         *         </element>
        -         *         <element name="max31">
        -         *           <complexType>
        -         *             <complexContent>
        -         *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *                 <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        -         *               </restriction>
        -         *             </complexContent>
        -         *           </complexType>
        -         *         </element>
        -         *         <element name="max32">
        -         *           <complexType>
        -         *             <complexContent>
        -         *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *                 <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        -         *               </restriction>
        -         *             </complexContent>
        -         *           </complexType>
        -         *         </element>
        -         *         <element name="max33">
        -         *           <complexType>
        -         *             <complexContent>
        -         *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *                 <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        -         *               </restriction>
        -         *             </complexContent>
        -         *           </complexType>
        -         *         </element>
        -         *       </sequence>
        -         *     </restriction>
        -         *   </complexContent>
        -         * </complexType>
        -         * 
        - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "max11", - "max12", - "max13", - "max21", - "max22", - "max23", - "max31", - "max32", - "max33" - }) - public static class Matrix { - - @XmlElement(required = true) - protected Alignment.Geo3D.Matrix.Max11 max11; - @XmlElement(required = true) - protected Alignment.Geo3D.Matrix.Max12 max12; - @XmlElement(required = true) - protected Alignment.Geo3D.Matrix.Max13 max13; - @XmlElement(required = true) - protected Alignment.Geo3D.Matrix.Max21 max21; - @XmlElement(required = true) - protected Alignment.Geo3D.Matrix.Max22 max22; - @XmlElement(required = true) - protected Alignment.Geo3D.Matrix.Max23 max23; - @XmlElement(required = true) - protected Alignment.Geo3D.Matrix.Max31 max31; - @XmlElement(required = true) - protected Alignment.Geo3D.Matrix.Max32 max32; - @XmlElement(required = true) - protected Alignment.Geo3D.Matrix.Max33 max33; - - /** - * Gets the value of the max11 property. - * - * @return - * possible object is - * {@link Alignment.Geo3D.Matrix.Max11 } - * - */ - public Alignment.Geo3D.Matrix.Max11 getMax11() { - return max11; - } - - /** - * Sets the value of the max11 property. - * - * @param value - * allowed object is - * {@link Alignment.Geo3D.Matrix.Max11 } - * - */ - public void setMax11(Alignment.Geo3D.Matrix.Max11 value) { - this.max11 = value; - } - - /** - * Gets the value of the max12 property. - * - * @return - * possible object is - * {@link Alignment.Geo3D.Matrix.Max12 } - * - */ - public Alignment.Geo3D.Matrix.Max12 getMax12() { - return max12; - } - - /** - * Sets the value of the max12 property. - * - * @param value - * allowed object is - * {@link Alignment.Geo3D.Matrix.Max12 } - * - */ - public void setMax12(Alignment.Geo3D.Matrix.Max12 value) { - this.max12 = value; - } - - /** - * Gets the value of the max13 property. - * - * @return - * possible object is - * {@link Alignment.Geo3D.Matrix.Max13 } - * - */ - public Alignment.Geo3D.Matrix.Max13 getMax13() { - return max13; - } - - /** - * Sets the value of the max13 property. - * - * @param value - * allowed object is - * {@link Alignment.Geo3D.Matrix.Max13 } - * - */ - public void setMax13(Alignment.Geo3D.Matrix.Max13 value) { - this.max13 = value; - } - - /** - * Gets the value of the max21 property. - * - * @return - * possible object is - * {@link Alignment.Geo3D.Matrix.Max21 } - * - */ - public Alignment.Geo3D.Matrix.Max21 getMax21() { - return max21; - } - - /** - * Sets the value of the max21 property. - * - * @param value - * allowed object is - * {@link Alignment.Geo3D.Matrix.Max21 } - * - */ - public void setMax21(Alignment.Geo3D.Matrix.Max21 value) { - this.max21 = value; - } - - /** - * Gets the value of the max22 property. - * - * @return - * possible object is - * {@link Alignment.Geo3D.Matrix.Max22 } - * - */ - public Alignment.Geo3D.Matrix.Max22 getMax22() { - return max22; - } - - /** - * Sets the value of the max22 property. - * - * @param value - * allowed object is - * {@link Alignment.Geo3D.Matrix.Max22 } - * - */ - public void setMax22(Alignment.Geo3D.Matrix.Max22 value) { - this.max22 = value; - } - - /** - * Gets the value of the max23 property. - * - * @return - * possible object is - * {@link Alignment.Geo3D.Matrix.Max23 } - * - */ - public Alignment.Geo3D.Matrix.Max23 getMax23() { - return max23; - } - - /** - * Sets the value of the max23 property. - * - * @param value - * allowed object is - * {@link Alignment.Geo3D.Matrix.Max23 } - * - */ - public void setMax23(Alignment.Geo3D.Matrix.Max23 value) { - this.max23 = value; - } - - /** - * Gets the value of the max31 property. - * - * @return - * possible object is - * {@link Alignment.Geo3D.Matrix.Max31 } - * - */ - public Alignment.Geo3D.Matrix.Max31 getMax31() { - return max31; - } - - /** - * Sets the value of the max31 property. - * - * @param value - * allowed object is - * {@link Alignment.Geo3D.Matrix.Max31 } - * - */ - public void setMax31(Alignment.Geo3D.Matrix.Max31 value) { - this.max31 = value; - } - - /** - * Gets the value of the max32 property. - * - * @return - * possible object is - * {@link Alignment.Geo3D.Matrix.Max32 } - * - */ - public Alignment.Geo3D.Matrix.Max32 getMax32() { - return max32; - } - - /** - * Sets the value of the max32 property. - * - * @param value - * allowed object is - * {@link Alignment.Geo3D.Matrix.Max32 } - * - */ - public void setMax32(Alignment.Geo3D.Matrix.Max32 value) { - this.max32 = value; - } - - /** - * Gets the value of the max33 property. - * - * @return - * possible object is - * {@link Alignment.Geo3D.Matrix.Max33 } - * - */ - public Alignment.Geo3D.Matrix.Max33 getMax33() { - return max33; - } - - /** - * Sets the value of the max33 property. - * - * @param value - * allowed object is - * {@link Alignment.Geo3D.Matrix.Max33 } - * - */ - public void setMax33(Alignment.Geo3D.Matrix.Max33 value) { - this.max33 = value; - } - - - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -             * <complexType>
        -             *   <complexContent>
        -             *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -             *       <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        -             *     </restriction>
        -             *   </complexContent>
        -             * </complexType>
        -             * 
        - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class Max11 { - - @XmlAttribute(name = "coord", required = true) - protected float coord; - - /** - * Gets the value of the coord property. - * - */ - public float getCoord() { - return coord; - } - - /** - * Sets the value of the coord property. - * - */ - public void setCoord(float value) { - this.coord = value; - } - - } - - - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -             * <complexType>
        -             *   <complexContent>
        -             *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -             *       <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        -             *     </restriction>
        -             *   </complexContent>
        -             * </complexType>
        -             * 
        - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class Max12 { - - @XmlAttribute(name = "coord", required = true) - protected float coord; - - /** - * Gets the value of the coord property. - * - */ - public float getCoord() { - return coord; - } - - /** - * Sets the value of the coord property. - * - */ - public void setCoord(float value) { - this.coord = value; - } - - } - - - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -             * <complexType>
        -             *   <complexContent>
        -             *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -             *       <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        -             *     </restriction>
        -             *   </complexContent>
        -             * </complexType>
        -             * 
        - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class Max13 { - - @XmlAttribute(name = "coord", required = true) - protected float coord; - - /** - * Gets the value of the coord property. - * - */ - public float getCoord() { - return coord; - } - - /** - * Sets the value of the coord property. - * - */ - public void setCoord(float value) { - this.coord = value; - } - - } - - - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -             * <complexType>
        -             *   <complexContent>
        -             *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -             *       <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        -             *     </restriction>
        -             *   </complexContent>
        -             * </complexType>
        -             * 
        - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class Max21 { - - @XmlAttribute(name = "coord", required = true) - protected float coord; - - /** - * Gets the value of the coord property. - * - */ - public float getCoord() { - return coord; - } - - /** - * Sets the value of the coord property. - * - */ - public void setCoord(float value) { - this.coord = value; - } - - } - - - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -             * <complexType>
        -             *   <complexContent>
        -             *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -             *       <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        -             *     </restriction>
        -             *   </complexContent>
        -             * </complexType>
        -             * 
        - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class Max22 { - - @XmlAttribute(name = "coord", required = true) - protected float coord; - - /** - * Gets the value of the coord property. - * - */ - public float getCoord() { - return coord; - } - - /** - * Sets the value of the coord property. - * - */ - public void setCoord(float value) { - this.coord = value; - } - - } - - - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -             * <complexType>
        -             *   <complexContent>
        -             *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -             *       <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        -             *     </restriction>
        -             *   </complexContent>
        -             * </complexType>
        -             * 
        - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class Max23 { - - @XmlAttribute(name = "coord", required = true) - protected float coord; - - /** - * Gets the value of the coord property. - * - */ - public float getCoord() { - return coord; - } - - /** - * Sets the value of the coord property. - * - */ - public void setCoord(float value) { - this.coord = value; - } - - } - - - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -             * <complexType>
        -             *   <complexContent>
        -             *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -             *       <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        -             *     </restriction>
        -             *   </complexContent>
        -             * </complexType>
        -             * 
        - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class Max31 { - - @XmlAttribute(name = "coord", required = true) - protected float coord; - - /** - * Gets the value of the coord property. - * - */ - public float getCoord() { - return coord; - } - - /** - * Sets the value of the coord property. - * - */ - public void setCoord(float value) { - this.coord = value; - } - - } - - - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -             * <complexType>
        -             *   <complexContent>
        -             *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -             *       <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        -             *     </restriction>
        -             *   </complexContent>
        -             * </complexType>
        -             * 
        - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class Max32 { - - @XmlAttribute(name = "coord", required = true) - protected float coord; - - /** - * Gets the value of the coord property. - * - */ - public float getCoord() { - return coord; - } - - /** - * Sets the value of the coord property. - * - */ - public void setCoord(float value) { - this.coord = value; - } - - } - - - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -             * <complexType>
        -             *   <complexContent>
        -             *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -             *       <attribute name="coord" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        -             *     </restriction>
        -             *   </complexContent>
        -             * </complexType>
        -             * 
        - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class Max33 { - - @XmlAttribute(name = "coord", required = true) - protected float coord; - - /** - * Gets the value of the coord property. - * - */ - public float getCoord() { - return coord; - } - - /** - * Sets the value of the coord property. - * - */ - public void setCoord(float value) { - this.coord = value; - } - - } - - } - - - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -         * <complexType>
        -         *   <complexContent>
        -         *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *       <attribute name="x" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        -         *       <attribute name="y" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        -         *       <attribute name="z" use="required" type="{http://www.w3.org/2001/XMLSchema}float" />
        -         *     </restriction>
        -         *   </complexContent>
        -         * </complexType>
        -         * 
        - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class Vector { - - @XmlAttribute(name = "x", required = true) - protected float x; - @XmlAttribute(name = "y", required = true) - protected float y; - @XmlAttribute(name = "z", required = true) - protected float z; - - /** - * Gets the value of the x property. - * - */ - public float getX() { - return x; - } - - /** - * Sets the value of the x property. - * - */ - public void setX(float value) { - this.x = value; - } - - /** - * Gets the value of the y property. - * - */ - public float getY() { - return y; - } - - /** - * Sets the value of the y property. - * - */ - public void setY(float value) { - this.y = value; - } - - /** - * Gets the value of the z property. - * - */ - public float getZ() { - return z; - } - - /** - * Sets the value of the z property. - * - */ - public void setZ(float value) { - this.z = value; - } - - } - + public void setMethodName(String value) + { + this.methodName = value; } - /** - *

        Java class for anonymous complex type. + * Gets the value of the scoreValue property. * - *

        The following schema fragment specifies the expected content contained within this class. + * @return possible object is {@link String } * - *

        -     * <complexType>
        -     *   <complexContent>
        -     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *       <attribute name="methodName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *       <attribute name="scoreValue" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *     </restriction>
        -     *   </complexContent>
        -     * </complexType>
        -     * 
        + */ + public String getScoreValue() + { + return scoreValue; + } + + /** + * Sets the value of the scoreValue property. * + * @param value + * allowed object is {@link String } * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class Score { - - @XmlAttribute(name = "methodName", required = true) - protected String methodName; - @XmlAttribute(name = "scoreValue", required = true) - protected String scoreValue; - - /** - * Gets the value of the methodName property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getMethodName() { - return methodName; - } - - /** - * Sets the value of the methodName property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setMethodName(String value) { - this.methodName = value; - } - - /** - * Gets the value of the scoreValue property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getScoreValue() { - return scoreValue; - } - - /** - * Sets the value of the scoreValue property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setScoreValue(String value) { - this.scoreValue = value; - } - + public void setScoreValue(String value) + { + this.scoreValue = value; } + } + } diff --git a/src/jalview/xml/binding/sifts/EntityType.java b/src/jalview/xml/binding/sifts/EntityType.java index f74da5a..3f7a8c3 100644 --- a/src/jalview/xml/binding/sifts/EntityType.java +++ b/src/jalview/xml/binding/sifts/EntityType.java @@ -5,19 +5,21 @@ // Generated on: 2015.10.09 at 03:18:33 PM BST // - package jalview.xml.binding.sifts; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlType; - /** - *

        Java class for entityType. + *

        + * Java class for entityType. * - *

        The following schema fragment specifies the expected content contained within this class. *

        + * The following schema fragment specifies the expected content contained within + * this class. + *

        + * *

          * <simpleType name="entityType">
          *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
        @@ -30,33 +32,39 @@ import javax.xml.bind.annotation.XmlType;
          * 
        * */ -@XmlType(name = "entityType", namespace = "http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd") +@XmlType( + name = "entityType", + namespace = "http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd") @XmlEnum -public enum EntityType { - - @XmlEnumValue("protein") - PROTEIN("protein"), - RNA("RNA"), - DNA("DNA"), - @XmlEnumValue("domain") - DOMAIN("domain"); - private final String value; - - EntityType(String v) { - value = v; - } +public enum EntityType +{ - public String value() { - return value; - } + @XmlEnumValue("protein") + PROTEIN("protein"), RNA("RNA"), DNA("DNA"), @XmlEnumValue("domain") + DOMAIN("domain"); + + private final String value; + + EntityType(String v) + { + value = v; + } + + public String value() + { + return value; + } - public static EntityType fromValue(String v) { - for (EntityType c: EntityType.values()) { - if (c.value.equals(v)) { - return c; - } - } - throw new IllegalArgumentException(v); + public static EntityType fromValue(String v) + { + for (EntityType c : EntityType.values()) + { + if (c.value.equals(v)) + { + return c; + } } + throw new IllegalArgumentException(v); + } } diff --git a/src/jalview/xml/binding/sifts/Entry.java b/src/jalview/xml/binding/sifts/Entry.java index 7429059..49a8a2d 100644 --- a/src/jalview/xml/binding/sifts/Entry.java +++ b/src/jalview/xml/binding/sifts/Entry.java @@ -5,7 +5,6 @@ // Generated on: 2015.10.09 at 03:18:33 PM BST // - package jalview.xml.binding.sifts; import java.util.ArrayList; @@ -20,11 +19,13 @@ import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlValue; import javax.xml.datatype.XMLGregorianCalendar; - /** - *

        Java class for anonymous complex type. + *

        + * Java class for anonymous complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType>
        @@ -199,446 +200,805 @@ import javax.xml.datatype.XMLGregorianCalendar;
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "", propOrder = {
        -    "listDB",
        -    "entryDetail",
        -    "entity",
        -    "alignment"
        -})
        +@XmlType(
        +  name = "",
        +  propOrder =
        +  { "listDB", "entryDetail", "entity", "alignment" })
         @XmlRootElement(name = "entry")
        -public class Entry {
        +public class Entry
        +{
        +
        +  @XmlElement(required = true)
        +  protected Entry.ListDB listDB;
        +
        +  protected List entryDetail;
        +
        +  @XmlElement(required = true)
        +  protected List entity;
        +
        +  protected List alignment;
        +
        +  @XmlAttribute(name = "date", required = true)
        +  @XmlSchemaType(name = "date")
        +  protected XMLGregorianCalendar date;
        +
        +  @XmlAttribute(name = "dbEntryVersion", required = true)
        +  @XmlSchemaType(name = "date")
        +  protected XMLGregorianCalendar dbEntryVersion;
        +
        +  @XmlAttribute(name = "dbSource", required = true)
        +  protected String dbSource;
        +
        +  @XmlAttribute(name = "dbCoordSys", required = true)
        +  protected String dbCoordSys;
        +
        +  @XmlAttribute(name = "dbAccessionId", required = true)
        +  protected String dbAccessionId;
        +
        +  @XmlAttribute(name = "dbEvidence")
        +  protected String dbEvidence;
        +
        +  @XmlAttribute(name = "dbVersion")
        +  protected String dbVersion;
        +
        +  /**
        +   * Gets the value of the listDB property.
        +   * 
        +   * @return possible object is {@link Entry.ListDB }
        +   * 
        +   */
        +  public Entry.ListDB getListDB()
        +  {
        +    return listDB;
        +  }
        +
        +  /**
        +   * Sets the value of the listDB property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link Entry.ListDB }
        +   * 
        +   */
        +  public void setListDB(Entry.ListDB value)
        +  {
        +    this.listDB = value;
        +  }
        +
        +  /**
        +   * Gets the value of the entryDetail property.
        +   * 
        +   * 

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the entryDetail property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getEntryDetail().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link Entry.EntryDetail } + * + * + */ + public List getEntryDetail() + { + if (entryDetail == null) + { + entryDetail = new ArrayList(); + } + return this.entryDetail; + } + + /** + * Gets the value of the entity property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the entity property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getEntity().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link Entry.Entity } + * + * + */ + public List getEntity() + { + if (entity == null) + { + entity = new ArrayList(); + } + return this.entity; + } + + /** + * Gets the value of the alignment property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the alignment property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getAlignment().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link Alignment } + * + * + */ + public List getAlignment() + { + if (alignment == null) + { + alignment = new ArrayList(); + } + return this.alignment; + } + + /** + * Gets the value of the date property. + * + * @return possible object is {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getDate() + { + return date; + } + + /** + * Sets the value of the date property. + * + * @param value + * allowed object is {@link XMLGregorianCalendar } + * + */ + public void setDate(XMLGregorianCalendar value) + { + this.date = value; + } + + /** + * Gets the value of the dbEntryVersion property. + * + * @return possible object is {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getDbEntryVersion() + { + return dbEntryVersion; + } + + /** + * Sets the value of the dbEntryVersion property. + * + * @param value + * allowed object is {@link XMLGregorianCalendar } + * + */ + public void setDbEntryVersion(XMLGregorianCalendar value) + { + this.dbEntryVersion = value; + } + + /** + * Gets the value of the dbSource property. + * + * @return possible object is {@link String } + * + */ + public String getDbSource() + { + return dbSource; + } + + /** + * Sets the value of the dbSource property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDbSource(String value) + { + this.dbSource = value; + } + + /** + * Gets the value of the dbCoordSys property. + * + * @return possible object is {@link String } + * + */ + public String getDbCoordSys() + { + return dbCoordSys; + } + + /** + * Sets the value of the dbCoordSys property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDbCoordSys(String value) + { + this.dbCoordSys = value; + } + + /** + * Gets the value of the dbAccessionId property. + * + * @return possible object is {@link String } + * + */ + public String getDbAccessionId() + { + return dbAccessionId; + } + + /** + * Sets the value of the dbAccessionId property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDbAccessionId(String value) + { + this.dbAccessionId = value; + } + + /** + * Gets the value of the dbEvidence property. + * + * @return possible object is {@link String } + * + */ + public String getDbEvidence() + { + return dbEvidence; + } + + /** + * Sets the value of the dbEvidence property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDbEvidence(String value) + { + this.dbEvidence = value; + } + + /** + * Gets the value of the dbVersion property. + * + * @return possible object is {@link String } + * + */ + public String getDbVersion() + { + return dbVersion; + } + + /** + * Sets the value of the dbVersion property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDbVersion(String value) + { + this.dbVersion = value; + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <complexContent>
        +   *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *       <sequence>
        +   *         <element name="entityDetail" maxOccurs="unbounded" minOccurs="0">
        +   *           <complexType>
        +   *             <complexContent>
        +   *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
        +   *               </restriction>
        +   *             </complexContent>
        +   *           </complexType>
        +   *         </element>
        +   *         <element name="segment" maxOccurs="unbounded">
        +   *           <complexType>
        +   *             <complexContent>
        +   *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                 <sequence>
        +   *                   <element name="listResidue" minOccurs="0">
        +   *                     <complexType>
        +   *                       <complexContent>
        +   *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                           <sequence>
        +   *                             <element name="residue" maxOccurs="unbounded">
        +   *                               <complexType>
        +   *                                 <complexContent>
        +   *                                   <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                                     <sequence>
        +   *                                       <element name="crossRefDb" maxOccurs="unbounded" minOccurs="0">
        +   *                                         <complexType>
        +   *                                           <complexContent>
        +   *                                             <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                                               <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
        +   *                                               <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}resRef"/>
        +   *                                               <attribute name="dbChainId" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}chainId" />
        +   *                                             </restriction>
        +   *                                           </complexContent>
        +   *                                         </complexType>
        +   *                                       </element>
        +   *                                       <element name="residueDetail" maxOccurs="unbounded" minOccurs="0">
        +   *                                         <complexType>
        +   *                                           <complexContent>
        +   *                                             <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                                               <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
        +   *                                             </restriction>
        +   *                                           </complexContent>
        +   *                                         </complexType>
        +   *                                       </element>
        +   *                                     </sequence>
        +   *                                     <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}resRef"/>
        +   *                                     <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}listdbRef"/>
        +   *                                   </restriction>
        +   *                                 </complexContent>
        +   *                               </complexType>
        +   *                             </element>
        +   *                           </sequence>
        +   *                         </restriction>
        +   *                       </complexContent>
        +   *                     </complexType>
        +   *                   </element>
        +   *                   <element name="listMapRegion" minOccurs="0">
        +   *                     <complexType>
        +   *                       <complexContent>
        +   *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                           <sequence>
        +   *                             <element name="mapRegion" maxOccurs="unbounded">
        +   *                               <complexType>
        +   *                                 <complexContent>
        +   *                                   <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                                     <sequence>
        +   *                                       <element name="db">
        +   *                                         <complexType>
        +   *                                           <complexContent>
        +   *                                             <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                                               <sequence>
        +   *                                                 <element name="dbDetail" maxOccurs="unbounded" minOccurs="0">
        +   *                                                   <complexType>
        +   *                                                     <complexContent>
        +   *                                                       <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                                                         <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
        +   *                                                       </restriction>
        +   *                                                     </complexContent>
        +   *                                                   </complexType>
        +   *                                                 </element>
        +   *                                               </sequence>
        +   *                                               <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
        +   *                                               <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
        +   *                                               <attribute name="dbChainId" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbChainId" />
        +   *                                             </restriction>
        +   *                                           </complexContent>
        +   *                                         </complexType>
        +   *                                       </element>
        +   *                                     </sequence>
        +   *                                     <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
        +   *                                   </restriction>
        +   *                                 </complexContent>
        +   *                               </complexType>
        +   *                             </element>
        +   *                           </sequence>
        +   *                         </restriction>
        +   *                       </complexContent>
        +   *                     </complexType>
        +   *                   </element>
        +   *                   <element name="segmentDetail" maxOccurs="unbounded" minOccurs="0">
        +   *                     <complexType>
        +   *                       <complexContent>
        +   *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                           <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
        +   *                         </restriction>
        +   *                       </complexContent>
        +   *                     </complexType>
        +   *                   </element>
        +   *                 </sequence>
        +   *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
        +   *                 <attribute name="segId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *               </restriction>
        +   *             </complexContent>
        +   *           </complexType>
        +   *         </element>
        +   *       </sequence>
        +   *       <attribute name="type" use="required" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}entityType" />
        +   *       <attribute name="entityId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *     </restriction>
        +   *   </complexContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "entityDetail", "segment" }) + public static class Entity + { + + protected List entityDetail; @XmlElement(required = true) - protected Entry.ListDB listDB; - protected List entryDetail; - @XmlElement(required = true) - protected List entity; - protected List alignment; - @XmlAttribute(name = "date", required = true) - @XmlSchemaType(name = "date") - protected XMLGregorianCalendar date; - @XmlAttribute(name = "dbEntryVersion", required = true) - @XmlSchemaType(name = "date") - protected XMLGregorianCalendar dbEntryVersion; - @XmlAttribute(name = "dbSource", required = true) - protected String dbSource; - @XmlAttribute(name = "dbCoordSys", required = true) - protected String dbCoordSys; - @XmlAttribute(name = "dbAccessionId", required = true) - protected String dbAccessionId; - @XmlAttribute(name = "dbEvidence") - protected String dbEvidence; - @XmlAttribute(name = "dbVersion") - protected String dbVersion; + protected List segment; - /** - * Gets the value of the listDB property. - * - * @return - * possible object is - * {@link Entry.ListDB } - * - */ - public Entry.ListDB getListDB() { - return listDB; - } + @XmlAttribute(name = "type", required = true) + protected EntityType type; - /** - * Sets the value of the listDB property. - * - * @param value - * allowed object is - * {@link Entry.ListDB } - * - */ - public void setListDB(Entry.ListDB value) { - this.listDB = value; - } + @XmlAttribute(name = "entityId", required = true) + protected String entityId; /** - * Gets the value of the entryDetail property. + * Gets the value of the entityDetail property. * *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the entryDetail property. + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the entityDetail property. * *

        * For example, to add a new item, do as follows: - *

        -     *    getEntryDetail().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link Entry.EntryDetail } - * - * - */ - public List getEntryDetail() { - if (entryDetail == null) { - entryDetail = new ArrayList(); - } - return this.entryDetail; - } - - /** - * Gets the value of the entity property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the entity property. * - *

        - * For example, to add a new item, do as follows: *

        -     *    getEntity().add(newItem);
        +     * getEntityDetail().add(newItem);
              * 
        * * *

        * Objects of the following type(s) are allowed in the list - * {@link Entry.Entity } + * {@link Entry.Entity.EntityDetail } * * */ - public List getEntity() { - if (entity == null) { - entity = new ArrayList(); - } - return this.entity; + public List getEntityDetail() + { + if (entityDetail == null) + { + entityDetail = new ArrayList(); + } + return this.entityDetail; } /** - * Gets the value of the alignment property. + * Gets the value of the segment property. * *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the alignment property. + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the segment property. * *

        * For example, to add a new item, do as follows: + * *

        -     *    getAlignment().add(newItem);
        +     * getSegment().add(newItem);
              * 
        * * *

        * Objects of the following type(s) are allowed in the list - * {@link Alignment } - * + * {@link Entry.Entity.Segment } * - */ - public List getAlignment() { - if (alignment == null) { - alignment = new ArrayList(); - } - return this.alignment; - } - - /** - * Gets the value of the date property. * - * @return - * possible object is - * {@link XMLGregorianCalendar } - * */ - public XMLGregorianCalendar getDate() { - return date; + public List getSegment() + { + if (segment == null) + { + segment = new ArrayList(); + } + return this.segment; } /** - * Sets the value of the date property. + * Gets the value of the type property. * - * @param value - * allowed object is - * {@link XMLGregorianCalendar } - * - */ - public void setDate(XMLGregorianCalendar value) { - this.date = value; - } - - /** - * Gets the value of the dbEntryVersion property. + * @return possible object is {@link EntityType } * - * @return - * possible object is - * {@link XMLGregorianCalendar } - * */ - public XMLGregorianCalendar getDbEntryVersion() { - return dbEntryVersion; + public EntityType getType() + { + return type; } /** - * Sets the value of the dbEntryVersion property. + * Sets the value of the type property. * * @param value - * allowed object is - * {@link XMLGregorianCalendar } - * - */ - public void setDbEntryVersion(XMLGregorianCalendar value) { - this.dbEntryVersion = value; - } - - /** - * Gets the value of the dbSource property. + * allowed object is {@link EntityType } * - * @return - * possible object is - * {@link String } - * */ - public String getDbSource() { - return dbSource; + public void setType(EntityType value) + { + this.type = value; } /** - * Sets the value of the dbSource property. + * Gets the value of the entityId property. * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDbSource(String value) { - this.dbSource = value; - } - - /** - * Gets the value of the dbCoordSys property. + * @return possible object is {@link String } * - * @return - * possible object is - * {@link String } - * */ - public String getDbCoordSys() { - return dbCoordSys; + public String getEntityId() + { + return entityId; } /** - * Sets the value of the dbCoordSys property. + * Sets the value of the entityId property. * * @param value - * allowed object is - * {@link String } - * - */ - public void setDbCoordSys(String value) { - this.dbCoordSys = value; - } - - /** - * Gets the value of the dbAccessionId property. + * allowed object is {@link String } * - * @return - * possible object is - * {@link String } - * */ - public String getDbAccessionId() { - return dbAccessionId; + public void setEntityId(String value) + { + this.entityId = value; } /** - * Sets the value of the dbAccessionId property. + *

        + * Java class for anonymous complex type. * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDbAccessionId(String value) { - this.dbAccessionId = value; - } - - /** - * Gets the value of the dbEvidence property. + *

        + * The following schema fragment specifies the expected content contained + * within this class. * - * @return - * possible object is - * {@link String } - * - */ - public String getDbEvidence() { - return dbEvidence; - } - - /** - * Sets the value of the dbEvidence property. + *

        +     * <complexType>
        +     *   <complexContent>
        +     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +     *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
        +     *     </restriction>
        +     *   </complexContent>
        +     * </complexType>
        +     * 
        * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDbEvidence(String value) { - this.dbEvidence = value; - } - - /** - * Gets the value of the dbVersion property. * - * @return - * possible object is - * {@link String } - * */ - public String getDbVersion() { - return dbVersion; - } + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "content" }) + public static class EntityDetail + { + + @XmlValue + protected String content; + + @XmlAttribute(name = "dbSource") + protected String dbSource; + + @XmlAttribute(name = "property", required = true) + protected String property; + + /** + * Gets the value of the content property. + * + * @return possible object is {@link String } + * + */ + public String getContent() + { + return content; + } + + /** + * Sets the value of the content property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setContent(String value) + { + this.content = value; + } + + /** + * Gets the value of the dbSource property. + * + * @return possible object is {@link String } + * + */ + public String getDbSource() + { + return dbSource; + } + + /** + * Sets the value of the dbSource property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDbSource(String value) + { + this.dbSource = value; + } + + /** + * Gets the value of the property property. + * + * @return possible object is {@link String } + * + */ + public String getProperty() + { + return property; + } + + /** + * Sets the value of the property property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setProperty(String value) + { + this.property = value; + } - /** - * Sets the value of the dbVersion property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDbVersion(String value) { - this.dbVersion = value; } - /** - *

        Java class for anonymous complex type. + *

        + * Java class for anonymous complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained + * within this class. * *

              * <complexType>
              *   <complexContent>
              *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
              *       <sequence>
        -     *         <element name="entityDetail" maxOccurs="unbounded" minOccurs="0">
        -     *           <complexType>
        -     *             <complexContent>
        -     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
        -     *               </restriction>
        -     *             </complexContent>
        -     *           </complexType>
        -     *         </element>
        -     *         <element name="segment" maxOccurs="unbounded">
        +     *         <element name="listResidue" minOccurs="0">
              *           <complexType>
              *             <complexContent>
              *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
              *                 <sequence>
        -     *                   <element name="listResidue" minOccurs="0">
        +     *                   <element name="residue" maxOccurs="unbounded">
              *                     <complexType>
              *                       <complexContent>
              *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
              *                           <sequence>
        -     *                             <element name="residue" maxOccurs="unbounded">
        +     *                             <element name="crossRefDb" maxOccurs="unbounded" minOccurs="0">
              *                               <complexType>
              *                                 <complexContent>
              *                                   <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *                                     <sequence>
        -     *                                       <element name="crossRefDb" maxOccurs="unbounded" minOccurs="0">
        -     *                                         <complexType>
        -     *                                           <complexContent>
        -     *                                             <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *                                               <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
        -     *                                               <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}resRef"/>
        -     *                                               <attribute name="dbChainId" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}chainId" />
        -     *                                             </restriction>
        -     *                                           </complexContent>
        -     *                                         </complexType>
        -     *                                       </element>
        -     *                                       <element name="residueDetail" maxOccurs="unbounded" minOccurs="0">
        -     *                                         <complexType>
        -     *                                           <complexContent>
        -     *                                             <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *                                               <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
        -     *                                             </restriction>
        -     *                                           </complexContent>
        -     *                                         </complexType>
        -     *                                       </element>
        -     *                                     </sequence>
        +     *                                     <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
              *                                     <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}resRef"/>
        -     *                                     <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}listdbRef"/>
        +     *                                     <attribute name="dbChainId" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}chainId" />
        +     *                                   </restriction>
        +     *                                 </complexContent>
        +     *                               </complexType>
        +     *                             </element>
        +     *                             <element name="residueDetail" maxOccurs="unbounded" minOccurs="0">
        +     *                               <complexType>
        +     *                                 <complexContent>
        +     *                                   <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +     *                                     <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
              *                                   </restriction>
              *                                 </complexContent>
              *                               </complexType>
              *                             </element>
              *                           </sequence>
        +     *                           <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}resRef"/>
        +     *                           <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}listdbRef"/>
              *                         </restriction>
              *                       </complexContent>
              *                     </complexType>
              *                   </element>
        -     *                   <element name="listMapRegion" minOccurs="0">
        +     *                 </sequence>
        +     *               </restriction>
        +     *             </complexContent>
        +     *           </complexType>
        +     *         </element>
        +     *         <element name="listMapRegion" minOccurs="0">
        +     *           <complexType>
        +     *             <complexContent>
        +     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +     *                 <sequence>
        +     *                   <element name="mapRegion" maxOccurs="unbounded">
              *                     <complexType>
              *                       <complexContent>
              *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
              *                           <sequence>
        -     *                             <element name="mapRegion" maxOccurs="unbounded">
        +     *                             <element name="db">
              *                               <complexType>
              *                                 <complexContent>
              *                                   <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
              *                                     <sequence>
        -     *                                       <element name="db">
        +     *                                       <element name="dbDetail" maxOccurs="unbounded" minOccurs="0">
              *                                         <complexType>
              *                                           <complexContent>
              *                                             <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *                                               <sequence>
        -     *                                                 <element name="dbDetail" maxOccurs="unbounded" minOccurs="0">
        -     *                                                   <complexType>
        -     *                                                     <complexContent>
        -     *                                                       <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *                                                         <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
        -     *                                                       </restriction>
        -     *                                                     </complexContent>
        -     *                                                   </complexType>
        -     *                                                 </element>
        -     *                                               </sequence>
        -     *                                               <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
        -     *                                               <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
        -     *                                               <attribute name="dbChainId" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbChainId" />
        +     *                                               <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
              *                                             </restriction>
              *                                           </complexContent>
              *                                         </complexType>
              *                                       </element>
              *                                     </sequence>
        +     *                                     <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
              *                                     <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
        +     *                                     <attribute name="dbChainId" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbChainId" />
              *                                   </restriction>
              *                                 </complexContent>
              *                               </complexType>
              *                             </element>
              *                           </sequence>
        -     *                         </restriction>
        -     *                       </complexContent>
        -     *                     </complexType>
        -     *                   </element>
        -     *                   <element name="segmentDetail" maxOccurs="unbounded" minOccurs="0">
        -     *                     <complexType>
        -     *                       <complexContent>
        -     *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *                           <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
        +     *                           <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
              *                         </restriction>
              *                       </complexContent>
              *                     </complexType>
              *                   </element>
              *                 </sequence>
        -     *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
        -     *                 <attribute name="segId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        +     *               </restriction>
        +     *             </complexContent>
        +     *           </complexType>
        +     *         </element>
        +     *         <element name="segmentDetail" maxOccurs="unbounded" minOccurs="0">
        +     *           <complexType>
        +     *             <complexContent>
        +     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +     *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
              *               </restriction>
              *             </complexContent>
              *           </complexType>
              *         </element>
              *       </sequence>
        -     *       <attribute name="type" use="required" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}entityType" />
        -     *       <attribute name="entityId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        +     *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
        +     *       <attribute name="segId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
              *     </restriction>
              *   </complexContent>
              * </complexType>
        @@ -647,137 +1007,306 @@ public class Entry {
              * 
              */
             @XmlAccessorType(XmlAccessType.FIELD)
        -    @XmlType(name = "", propOrder = {
        -        "entityDetail",
        -        "segment"
        -    })
        -    public static class Entity {
        +    @XmlType(
        +      name = "",
        +      propOrder =
        +      { "listResidue", "listMapRegion", "segmentDetail" })
        +    public static class Segment
        +    {
        +
        +      protected Entry.Entity.Segment.ListResidue listResidue;
        +
        +      protected Entry.Entity.Segment.ListMapRegion listMapRegion;
        +
        +      protected List segmentDetail;
        +
        +      @XmlAttribute(name = "segId", required = true)
        +      protected String segId;
        +
        +      @XmlAttribute(name = "start")
        +      protected String start;
        +
        +      @XmlAttribute(name = "end")
        +      protected String end;
        +
        +      /**
        +       * Gets the value of the listResidue property.
        +       * 
        +       * @return possible object is {@link Entry.Entity.Segment.ListResidue }
        +       * 
        +       */
        +      public Entry.Entity.Segment.ListResidue getListResidue()
        +      {
        +        return listResidue;
        +      }
        +
        +      /**
        +       * Sets the value of the listResidue property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Entry.Entity.Segment.ListResidue }
        +       * 
        +       */
        +      public void setListResidue(Entry.Entity.Segment.ListResidue value)
        +      {
        +        this.listResidue = value;
        +      }
        +
        +      /**
        +       * Gets the value of the listMapRegion property.
        +       * 
        +       * @return possible object is {@link Entry.Entity.Segment.ListMapRegion }
        +       * 
        +       */
        +      public Entry.Entity.Segment.ListMapRegion getListMapRegion()
        +      {
        +        return listMapRegion;
        +      }
        +
        +      /**
        +       * Sets the value of the listMapRegion property.
        +       * 
        +       * @param value
        +       *          allowed object is {@link Entry.Entity.Segment.ListMapRegion }
        +       * 
        +       */
        +      public void setListMapRegion(Entry.Entity.Segment.ListMapRegion value)
        +      {
        +        this.listMapRegion = value;
        +      }
        +
        +      /**
        +       * Gets the value of the segmentDetail property.
        +       * 
        +       * 

        + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the segmentDetail property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +       * getSegmentDetail().add(newItem);
        +       * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link Entry.Entity.Segment.SegmentDetail } + * + * + */ + public List getSegmentDetail() + { + if (segmentDetail == null) + { + segmentDetail = new ArrayList(); + } + return this.segmentDetail; + } + + /** + * Gets the value of the segId property. + * + * @return possible object is {@link String } + * + */ + public String getSegId() + { + return segId; + } + + /** + * Sets the value of the segId property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setSegId(String value) + { + this.segId = value; + } + + /** + * Gets the value of the start property. + * + * @return possible object is {@link String } + * + */ + public String getStart() + { + return start; + } + + /** + * Sets the value of the start property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setStart(String value) + { + this.start = value; + } + + /** + * Gets the value of the end property. + * + * @return possible object is {@link String } + * + */ + public String getEnd() + { + return end; + } + + /** + * Sets the value of the end property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setEnd(String value) + { + this.end = value; + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +       * <complexType>
        +       *   <complexContent>
        +       *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +       *       <sequence>
        +       *         <element name="mapRegion" maxOccurs="unbounded">
        +       *           <complexType>
        +       *             <complexContent>
        +       *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +       *                 <sequence>
        +       *                   <element name="db">
        +       *                     <complexType>
        +       *                       <complexContent>
        +       *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +       *                           <sequence>
        +       *                             <element name="dbDetail" maxOccurs="unbounded" minOccurs="0">
        +       *                               <complexType>
        +       *                                 <complexContent>
        +       *                                   <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +       *                                     <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
        +       *                                   </restriction>
        +       *                                 </complexContent>
        +       *                               </complexType>
        +       *                             </element>
        +       *                           </sequence>
        +       *                           <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
        +       *                           <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
        +       *                           <attribute name="dbChainId" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbChainId" />
        +       *                         </restriction>
        +       *                       </complexContent>
        +       *                     </complexType>
        +       *                   </element>
        +       *                 </sequence>
        +       *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
        +       *               </restriction>
        +       *             </complexContent>
        +       *           </complexType>
        +       *         </element>
        +       *       </sequence>
        +       *     </restriction>
        +       *   </complexContent>
        +       * </complexType>
        +       * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "mapRegion" }) + public static class ListMapRegion + { - protected List entityDetail; @XmlElement(required = true) - protected List segment; - @XmlAttribute(name = "type", required = true) - protected EntityType type; - @XmlAttribute(name = "entityId", required = true) - protected String entityId; + protected List mapRegion; /** - * Gets the value of the entityDetail property. + * Gets the value of the mapRegion property. * *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the entityDetail property. + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list + * will be present inside the JAXB object. This is why there is not a + * set method for the mapRegion property. * *

        * For example, to add a new item, do as follows: + * *

        -         *    getEntityDetail().add(newItem);
        +         * getMapRegion().add(newItem);
                  * 
        * * *

        * Objects of the following type(s) are allowed in the list - * {@link Entry.Entity.EntityDetail } + * {@link Entry.Entity.Segment.ListMapRegion.MapRegion } * * */ - public List getEntityDetail() { - if (entityDetail == null) { - entityDetail = new ArrayList(); - } - return this.entityDetail; + public List getMapRegion() + { + if (mapRegion == null) + { + mapRegion = new ArrayList(); + } + return this.mapRegion; } /** - * Gets the value of the segment property. - * *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the segment property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getSegment().add(newItem);
        -         * 
        - * + * Java class for anonymous complex type. * *

        - * Objects of the following type(s) are allowed in the list - * {@link Entry.Entity.Segment } - * - * - */ - public List getSegment() { - if (segment == null) { - segment = new ArrayList(); - } - return this.segment; - } - - /** - * Gets the value of the type property. - * - * @return - * possible object is - * {@link EntityType } - * - */ - public EntityType getType() { - return type; - } - - /** - * Sets the value of the type property. - * - * @param value - * allowed object is - * {@link EntityType } - * - */ - public void setType(EntityType value) { - this.type = value; - } - - /** - * Gets the value of the entityId property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getEntityId() { - return entityId; - } - - /** - * Sets the value of the entityId property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setEntityId(String value) { - this.entityId = value; - } - - - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. + * The following schema fragment specifies the expected content + * contained within this class. * *

                  * <complexType>
                  *   <complexContent>
                  *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
        +         *       <sequence>
        +         *         <element name="db">
        +         *           <complexType>
        +         *             <complexContent>
        +         *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +         *                 <sequence>
        +         *                   <element name="dbDetail" maxOccurs="unbounded" minOccurs="0">
        +         *                     <complexType>
        +         *                       <complexContent>
        +         *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +         *                           <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
        +         *                         </restriction>
        +         *                       </complexContent>
        +         *                     </complexType>
        +         *                   </element>
        +         *                 </sequence>
        +         *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
        +         *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
        +         *                 <attribute name="dbChainId" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbChainId" />
        +         *               </restriction>
        +         *             </complexContent>
        +         *           </complexType>
        +         *         </element>
        +         *       </sequence>
        +         *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
                  *     </restriction>
                  *   </complexContent>
                  * </complexType>
        @@ -786,189 +1315,600 @@ public class Entry {
                  * 
                  */
                 @XmlAccessorType(XmlAccessType.FIELD)
        -        @XmlType(name = "", propOrder = {
        -            "content"
        -        })
        -        public static class EntityDetail {
        +        @XmlType(name = "", propOrder = { "db" })
        +        public static class MapRegion
        +        {
        +
        +          @XmlElement(required = true)
        +          protected Entry.Entity.Segment.ListMapRegion.MapRegion.Db db;
        +
        +          @XmlAttribute(name = "start")
        +          protected String start;
        +
        +          @XmlAttribute(name = "end")
        +          protected String end;
        +
        +          /**
        +           * Gets the value of the db property.
        +           * 
        +           * @return possible object is
        +           *         {@link Entry.Entity.Segment.ListMapRegion.MapRegion.Db }
        +           * 
        +           */
        +          public Entry.Entity.Segment.ListMapRegion.MapRegion.Db getDb()
        +          {
        +            return db;
        +          }
        +
        +          /**
        +           * Sets the value of the db property.
        +           * 
        +           * @param value
        +           *          allowed object is
        +           *          {@link Entry.Entity.Segment.ListMapRegion.MapRegion.Db }
        +           * 
        +           */
        +          public void setDb(
        +                  Entry.Entity.Segment.ListMapRegion.MapRegion.Db value)
        +          {
        +            this.db = value;
        +          }
        +
        +          /**
        +           * Gets the value of the start property.
        +           * 
        +           * @return possible object is {@link String }
        +           * 
        +           */
        +          public String getStart()
        +          {
        +            return start;
        +          }
        +
        +          /**
        +           * Sets the value of the start property.
        +           * 
        +           * @param value
        +           *          allowed object is {@link String }
        +           * 
        +           */
        +          public void setStart(String value)
        +          {
        +            this.start = value;
        +          }
        +
        +          /**
        +           * Gets the value of the end property.
        +           * 
        +           * @return possible object is {@link String }
        +           * 
        +           */
        +          public String getEnd()
        +          {
        +            return end;
        +          }
        +
        +          /**
        +           * Sets the value of the end property.
        +           * 
        +           * @param value
        +           *          allowed object is {@link String }
        +           * 
        +           */
        +          public void setEnd(String value)
        +          {
        +            this.end = value;
        +          }
        +
        +          /**
        +           * 

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content + * contained within this class. + * + *

        +           * <complexType>
        +           *   <complexContent>
        +           *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +           *       <sequence>
        +           *         <element name="dbDetail" maxOccurs="unbounded" minOccurs="0">
        +           *           <complexType>
        +           *             <complexContent>
        +           *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +           *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
        +           *               </restriction>
        +           *             </complexContent>
        +           *           </complexType>
        +           *         </element>
        +           *       </sequence>
        +           *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
        +           *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
        +           *       <attribute name="dbChainId" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbChainId" />
        +           *     </restriction>
        +           *   </complexContent>
        +           * </complexType>
        +           * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "dbDetail" }) + public static class Db + { + + protected List dbDetail; + + @XmlAttribute(name = "dbChainId") + protected String dbChainId; - @XmlValue - protected String content; - @XmlAttribute(name = "dbSource") + @XmlAttribute(name = "dbSource", required = true) protected String dbSource; - @XmlAttribute(name = "property", required = true) - protected String property; + + @XmlAttribute(name = "dbCoordSys", required = true) + protected String dbCoordSys; + + @XmlAttribute(name = "dbAccessionId", required = true) + protected String dbAccessionId; + + @XmlAttribute(name = "dbEvidence") + protected String dbEvidence; + + @XmlAttribute(name = "dbVersion") + protected String dbVersion; + + @XmlAttribute(name = "start") + protected String start; + + @XmlAttribute(name = "end") + protected String end; /** - * Gets the value of the content property. + * Gets the value of the dbDetail property. + * + *

        + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned + * list will be present inside the JAXB object. This is why there is + * not a set method for the dbDetail property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +             * getDbDetail().add(newItem);
        +             * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link Entry.Entity.Segment.ListMapRegion.MapRegion.Db.DbDetail } + * * - * @return - * possible object is - * {@link String } - * */ - public String getContent() { - return content; + public List getDbDetail() + { + if (dbDetail == null) + { + dbDetail = new ArrayList(); + } + return this.dbDetail; } /** - * Sets the value of the content property. + * Gets the value of the dbChainId property. + * + * @return possible object is {@link String } + * + */ + public String getDbChainId() + { + return dbChainId; + } + + /** + * Sets the value of the dbChainId property. * * @param value - * allowed object is - * {@link String } - * + * allowed object is {@link String } + * */ - public void setContent(String value) { - this.content = value; + public void setDbChainId(String value) + { + this.dbChainId = value; } /** * Gets the value of the dbSource property. * - * @return - * possible object is - * {@link String } - * + * @return possible object is {@link String } + * */ - public String getDbSource() { - return dbSource; + public String getDbSource() + { + return dbSource; } /** * Sets the value of the dbSource property. * * @param value - * allowed object is - * {@link String } - * + * allowed object is {@link String } + * */ - public void setDbSource(String value) { - this.dbSource = value; + public void setDbSource(String value) + { + this.dbSource = value; } /** - * Gets the value of the property property. + * Gets the value of the dbCoordSys property. + * + * @return possible object is {@link String } * - * @return - * possible object is - * {@link String } - * */ - public String getProperty() { - return property; + public String getDbCoordSys() + { + return dbCoordSys; } /** - * Sets the value of the property property. + * Sets the value of the dbCoordSys property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDbCoordSys(String value) + { + this.dbCoordSys = value; + } + + /** + * Gets the value of the dbAccessionId property. + * + * @return possible object is {@link String } + * + */ + public String getDbAccessionId() + { + return dbAccessionId; + } + + /** + * Sets the value of the dbAccessionId property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDbAccessionId(String value) + { + this.dbAccessionId = value; + } + + /** + * Gets the value of the dbEvidence property. + * + * @return possible object is {@link String } + * + */ + public String getDbEvidence() + { + return dbEvidence; + } + + /** + * Sets the value of the dbEvidence property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDbEvidence(String value) + { + this.dbEvidence = value; + } + + /** + * Gets the value of the dbVersion property. + * + * @return possible object is {@link String } + * + */ + public String getDbVersion() + { + return dbVersion; + } + + /** + * Sets the value of the dbVersion property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDbVersion(String value) + { + this.dbVersion = value; + } + + /** + * Gets the value of the start property. + * + * @return possible object is {@link String } + * + */ + public String getStart() + { + return start; + } + + /** + * Sets the value of the start property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setStart(String value) + { + this.start = value; + } + + /** + * Gets the value of the end property. + * + * @return possible object is {@link String } + * + */ + public String getEnd() + { + return end; + } + + /** + * Sets the value of the end property. * * @param value - * allowed object is - * {@link String } - * + * allowed object is {@link String } + * */ - public void setProperty(String value) { + public void setEnd(String value) + { + this.end = value; + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content + * contained within this class. + * + *

        +             * <complexType>
        +             *   <complexContent>
        +             *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +             *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
        +             *     </restriction>
        +             *   </complexContent>
        +             * </complexType>
        +             * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "content" }) + public static class DbDetail + { + + @XmlValue + protected String content; + + @XmlAttribute(name = "dbSource") + protected String dbSource; + + @XmlAttribute(name = "property", required = true) + protected String property; + + /** + * Gets the value of the content property. + * + * @return possible object is {@link String } + * + */ + public String getContent() + { + return content; + } + + /** + * Sets the value of the content property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setContent(String value) + { + this.content = value; + } + + /** + * Gets the value of the dbSource property. + * + * @return possible object is {@link String } + * + */ + public String getDbSource() + { + return dbSource; + } + + /** + * Sets the value of the dbSource property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDbSource(String value) + { + this.dbSource = value; + } + + /** + * Gets the value of the property property. + * + * @return possible object is {@link String } + * + */ + public String getProperty() + { + return property; + } + + /** + * Sets the value of the property property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setProperty(String value) + { this.property = value; + } + } + } + } + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +       * <complexType>
        +       *   <complexContent>
        +       *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +       *       <sequence>
        +       *         <element name="residue" maxOccurs="unbounded">
        +       *           <complexType>
        +       *             <complexContent>
        +       *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +       *                 <sequence>
        +       *                   <element name="crossRefDb" maxOccurs="unbounded" minOccurs="0">
        +       *                     <complexType>
        +       *                       <complexContent>
        +       *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +       *                           <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
        +       *                           <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}resRef"/>
        +       *                           <attribute name="dbChainId" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}chainId" />
        +       *                         </restriction>
        +       *                       </complexContent>
        +       *                     </complexType>
        +       *                   </element>
        +       *                   <element name="residueDetail" maxOccurs="unbounded" minOccurs="0">
        +       *                     <complexType>
        +       *                       <complexContent>
        +       *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +       *                           <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
        +       *                         </restriction>
        +       *                       </complexContent>
        +       *                     </complexType>
        +       *                   </element>
        +       *                 </sequence>
        +       *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}resRef"/>
        +       *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}listdbRef"/>
        +       *               </restriction>
        +       *             </complexContent>
        +       *           </complexType>
        +       *         </element>
        +       *       </sequence>
        +       *     </restriction>
        +       *   </complexContent>
        +       * </complexType>
        +       * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "residue" }) + public static class ListResidue + { + + @XmlElement(required = true) + protected List residue; + + /** + * Gets the value of the residue property. + * + *

        + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list + * will be present inside the JAXB object. This is why there is not a + * set method for the residue property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +         * getResidue().add(newItem);
        +         * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link Entry.Entity.Segment.ListResidue.Residue } + * + * + */ + public List getResidue() + { + if (residue == null) + { + residue = new ArrayList(); + } + return this.residue; + } /** - *

        Java class for anonymous complex type. + *

        + * Java class for anonymous complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content + * contained within this class. * *

                  * <complexType>
                  *   <complexContent>
                  *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
                  *       <sequence>
        -         *         <element name="listResidue" minOccurs="0">
        +         *         <element name="crossRefDb" maxOccurs="unbounded" minOccurs="0">
                  *           <complexType>
                  *             <complexContent>
                  *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *                 <sequence>
        -         *                   <element name="residue" maxOccurs="unbounded">
        -         *                     <complexType>
        -         *                       <complexContent>
        -         *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *                           <sequence>
        -         *                             <element name="crossRefDb" maxOccurs="unbounded" minOccurs="0">
        -         *                               <complexType>
        -         *                                 <complexContent>
        -         *                                   <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *                                     <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
        -         *                                     <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}resRef"/>
        -         *                                     <attribute name="dbChainId" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}chainId" />
        -         *                                   </restriction>
        -         *                                 </complexContent>
        -         *                               </complexType>
        -         *                             </element>
        -         *                             <element name="residueDetail" maxOccurs="unbounded" minOccurs="0">
        -         *                               <complexType>
        -         *                                 <complexContent>
        -         *                                   <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *                                     <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
        -         *                                   </restriction>
        -         *                                 </complexContent>
        -         *                               </complexType>
        -         *                             </element>
        -         *                           </sequence>
        -         *                           <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}resRef"/>
        -         *                           <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}listdbRef"/>
        -         *                         </restriction>
        -         *                       </complexContent>
        -         *                     </complexType>
        -         *                   </element>
        -         *                 </sequence>
        +         *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
        +         *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}resRef"/>
        +         *                 <attribute name="dbChainId" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}chainId" />
                  *               </restriction>
                  *             </complexContent>
                  *           </complexType>
                  *         </element>
        -         *         <element name="listMapRegion" minOccurs="0">
        -         *           <complexType>
        -         *             <complexContent>
        -         *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *                 <sequence>
        -         *                   <element name="mapRegion" maxOccurs="unbounded">
        -         *                     <complexType>
        -         *                       <complexContent>
        -         *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *                           <sequence>
        -         *                             <element name="db">
        -         *                               <complexType>
        -         *                                 <complexContent>
        -         *                                   <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *                                     <sequence>
        -         *                                       <element name="dbDetail" maxOccurs="unbounded" minOccurs="0">
        -         *                                         <complexType>
        -         *                                           <complexContent>
        -         *                                             <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *                                               <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
        -         *                                             </restriction>
        -         *                                           </complexContent>
        -         *                                         </complexType>
        -         *                                       </element>
        -         *                                     </sequence>
        -         *                                     <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
        -         *                                     <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
        -         *                                     <attribute name="dbChainId" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbChainId" />
        -         *                                   </restriction>
        -         *                                 </complexContent>
        -         *                               </complexType>
        -         *                             </element>
        -         *                           </sequence>
        -         *                           <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
        -         *                         </restriction>
        -         *                       </complexContent>
        -         *                     </complexType>
        -         *                   </element>
        -         *                 </sequence>
        -         *               </restriction>
        -         *             </complexContent>
        -         *           </complexType>
        -         *         </element>
        -         *         <element name="segmentDetail" maxOccurs="unbounded" minOccurs="0">
        +         *         <element name="residueDetail" maxOccurs="unbounded" minOccurs="0">
                  *           <complexType>
                  *             <complexContent>
                  *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        @@ -978,8 +1918,8 @@ public class Entry {
                  *           </complexType>
                  *         </element>
                  *       </sequence>
        -         *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
        -         *       <attribute name="segId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        +         *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}resRef"/>
        +         *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}listdbRef"/>
                  *     </restriction>
                  *   </complexContent>
                  * </complexType>
        @@ -988,1683 +1928,851 @@ public class Entry {
                  * 
                  */
                 @XmlAccessorType(XmlAccessType.FIELD)
        -        @XmlType(name = "", propOrder = {
        -            "listResidue",
        -            "listMapRegion",
        -            "segmentDetail"
        -        })
        -        public static class Segment {
        -
        -            protected Entry.Entity.Segment.ListResidue listResidue;
        -            protected Entry.Entity.Segment.ListMapRegion listMapRegion;
        -            protected List segmentDetail;
        -            @XmlAttribute(name = "segId", required = true)
        -            protected String segId;
        -            @XmlAttribute(name = "start")
        -            protected String start;
        -            @XmlAttribute(name = "end")
        -            protected String end;
        +        @XmlType(name = "", propOrder = { "crossRefDb", "residueDetail" })
        +        public static class Residue
        +        {
        +
        +          protected List crossRefDb;
        +
        +          protected List residueDetail;
        +
        +          @XmlAttribute(name = "dbResNum", required = true)
        +          protected String dbResNum;
        +
        +          @XmlAttribute(name = "dbResName", required = true)
        +          protected String dbResName;
        +
        +          @XmlAttribute(name = "dbVersion")
        +          protected String dbVersion;
        +
        +          @XmlAttribute(name = "dbSource", required = true)
        +          protected String dbSource;
        +
        +          @XmlAttribute(name = "dbCoordSys", required = true)
        +          protected String dbCoordSys;
        +
        +          /**
        +           * Gets the value of the crossRefDb property.
        +           * 
        +           * 

        + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list + * will be present inside the JAXB object. This is why there is not a + * set method for the crossRefDb property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +           * getCrossRefDb().add(newItem);
        +           * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link Entry.Entity.Segment.ListResidue.Residue.CrossRefDb } + * + * + */ + public List getCrossRefDb() + { + if (crossRefDb == null) + { + crossRefDb = new ArrayList(); + } + return this.crossRefDb; + } + + /** + * Gets the value of the residueDetail property. + * + *

        + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list + * will be present inside the JAXB object. This is why there is not a + * set method for the residueDetail property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +           * getResidueDetail().add(newItem);
        +           * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link Entry.Entity.Segment.ListResidue.Residue.ResidueDetail } + * + * + */ + public List getResidueDetail() + { + if (residueDetail == null) + { + residueDetail = new ArrayList(); + } + return this.residueDetail; + } + + /** + * Gets the value of the dbResNum property. + * + * @return possible object is {@link String } + * + */ + public String getDbResNum() + { + return dbResNum; + } + + /** + * Sets the value of the dbResNum property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDbResNum(String value) + { + this.dbResNum = value; + } + + /** + * Gets the value of the dbResName property. + * + * @return possible object is {@link String } + * + */ + public String getDbResName() + { + return dbResName; + } + + /** + * Sets the value of the dbResName property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDbResName(String value) + { + this.dbResName = value; + } + + /** + * Gets the value of the dbVersion property. + * + * @return possible object is {@link String } + * + */ + public String getDbVersion() + { + return dbVersion; + } + + /** + * Sets the value of the dbVersion property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDbVersion(String value) + { + this.dbVersion = value; + } + + /** + * Gets the value of the dbSource property. + * + * @return possible object is {@link String } + * + */ + public String getDbSource() + { + return dbSource; + } + + /** + * Sets the value of the dbSource property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDbSource(String value) + { + this.dbSource = value; + } + + /** + * Gets the value of the dbCoordSys property. + * + * @return possible object is {@link String } + * + */ + public String getDbCoordSys() + { + return dbCoordSys; + } + + /** + * Sets the value of the dbCoordSys property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDbCoordSys(String value) + { + this.dbCoordSys = value; + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content + * contained within this class. + * + *

        +           * <complexType>
        +           *   <complexContent>
        +           *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +           *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
        +           *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}resRef"/>
        +           *       <attribute name="dbChainId" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}chainId" />
        +           *     </restriction>
        +           *   </complexContent>
        +           * </complexType>
        +           * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class CrossRefDb + { + + @XmlAttribute(name = "dbChainId") + protected String dbChainId; + + @XmlAttribute(name = "dbSource", required = true) + protected String dbSource; + + @XmlAttribute(name = "dbCoordSys", required = true) + protected String dbCoordSys; + + @XmlAttribute(name = "dbAccessionId", required = true) + protected String dbAccessionId; + + @XmlAttribute(name = "dbEvidence") + protected String dbEvidence; + + @XmlAttribute(name = "dbVersion") + protected String dbVersion; + + @XmlAttribute(name = "dbResNum", required = true) + protected String dbResNum; + + @XmlAttribute(name = "dbResName", required = true) + protected String dbResName; /** - * Gets the value of the listResidue property. + * Gets the value of the dbChainId property. + * + * @return possible object is {@link String } * - * @return - * possible object is - * {@link Entry.Entity.Segment.ListResidue } - * */ - public Entry.Entity.Segment.ListResidue getListResidue() { - return listResidue; + public String getDbChainId() + { + return dbChainId; } /** - * Sets the value of the listResidue property. + * Sets the value of the dbChainId property. * * @param value - * allowed object is - * {@link Entry.Entity.Segment.ListResidue } - * + * allowed object is {@link String } + * */ - public void setListResidue(Entry.Entity.Segment.ListResidue value) { - this.listResidue = value; + public void setDbChainId(String value) + { + this.dbChainId = value; } /** - * Gets the value of the listMapRegion property. + * Gets the value of the dbSource property. + * + * @return possible object is {@link String } * - * @return - * possible object is - * {@link Entry.Entity.Segment.ListMapRegion } - * */ - public Entry.Entity.Segment.ListMapRegion getListMapRegion() { - return listMapRegion; + public String getDbSource() + { + return dbSource; } /** - * Sets the value of the listMapRegion property. + * Sets the value of the dbSource property. * * @param value - * allowed object is - * {@link Entry.Entity.Segment.ListMapRegion } - * + * allowed object is {@link String } + * */ - public void setListMapRegion(Entry.Entity.Segment.ListMapRegion value) { - this.listMapRegion = value; + public void setDbSource(String value) + { + this.dbSource = value; } /** - * Gets the value of the segmentDetail property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the segmentDetail property. - * - *

        - * For example, to add a new item, do as follows: - *

        -             *    getSegmentDetail().add(newItem);
        -             * 
        + * Gets the value of the dbCoordSys property. * + * @return possible object is {@link String } * - *

        - * Objects of the following type(s) are allowed in the list - * {@link Entry.Entity.Segment.SegmentDetail } + */ + public String getDbCoordSys() + { + return dbCoordSys; + } + + /** + * Sets the value of the dbCoordSys property. * + * @param value + * allowed object is {@link String } * */ - public List getSegmentDetail() { - if (segmentDetail == null) { - segmentDetail = new ArrayList(); - } - return this.segmentDetail; + public void setDbCoordSys(String value) + { + this.dbCoordSys = value; } /** - * Gets the value of the segId property. + * Gets the value of the dbAccessionId property. + * + * @return possible object is {@link String } * - * @return - * possible object is - * {@link String } - * */ - public String getSegId() { - return segId; + public String getDbAccessionId() + { + return dbAccessionId; } /** - * Sets the value of the segId property. + * Sets the value of the dbAccessionId property. * * @param value - * allowed object is - * {@link String } - * + * allowed object is {@link String } + * */ - public void setSegId(String value) { - this.segId = value; + public void setDbAccessionId(String value) + { + this.dbAccessionId = value; } /** - * Gets the value of the start property. + * Gets the value of the dbEvidence property. + * + * @return possible object is {@link String } * - * @return - * possible object is - * {@link String } - * */ - public String getStart() { - return start; + public String getDbEvidence() + { + return dbEvidence; } /** - * Sets the value of the start property. + * Sets the value of the dbEvidence property. * * @param value - * allowed object is - * {@link String } - * + * allowed object is {@link String } + * */ - public void setStart(String value) { - this.start = value; + public void setDbEvidence(String value) + { + this.dbEvidence = value; } /** - * Gets the value of the end property. + * Gets the value of the dbVersion property. + * + * @return possible object is {@link String } * - * @return - * possible object is - * {@link String } - * */ - public String getEnd() { - return end; + public String getDbVersion() + { + return dbVersion; } /** - * Sets the value of the end property. + * Sets the value of the dbVersion property. * * @param value - * allowed object is - * {@link String } - * + * allowed object is {@link String } + * */ - public void setEnd(String value) { - this.end = value; + public void setDbVersion(String value) + { + this.dbVersion = value; } + /** + * Gets the value of the dbResNum property. + * + * @return possible object is {@link String } + * + */ + public String getDbResNum() + { + return dbResNum; + } /** - *

        Java class for anonymous complex type. + * Sets the value of the dbResNum property. * - *

        The following schema fragment specifies the expected content contained within this class. + * @param value + * allowed object is {@link String } * - *

        -             * <complexType>
        -             *   <complexContent>
        -             *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -             *       <sequence>
        -             *         <element name="mapRegion" maxOccurs="unbounded">
        -             *           <complexType>
        -             *             <complexContent>
        -             *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -             *                 <sequence>
        -             *                   <element name="db">
        -             *                     <complexType>
        -             *                       <complexContent>
        -             *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -             *                           <sequence>
        -             *                             <element name="dbDetail" maxOccurs="unbounded" minOccurs="0">
        -             *                               <complexType>
        -             *                                 <complexContent>
        -             *                                   <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -             *                                     <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
        -             *                                   </restriction>
        -             *                                 </complexContent>
        -             *                               </complexType>
        -             *                             </element>
        -             *                           </sequence>
        -             *                           <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
        -             *                           <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
        -             *                           <attribute name="dbChainId" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbChainId" />
        -             *                         </restriction>
        -             *                       </complexContent>
        -             *                     </complexType>
        -             *                   </element>
        -             *                 </sequence>
        -             *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
        -             *               </restriction>
        -             *             </complexContent>
        -             *           </complexType>
        -             *         </element>
        -             *       </sequence>
        -             *     </restriction>
        -             *   </complexContent>
        -             * </complexType>
        -             * 
        + */ + public void setDbResNum(String value) + { + this.dbResNum = value; + } + + /** + * Gets the value of the dbResName property. * + * @return possible object is {@link String } * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "mapRegion" - }) - public static class ListMapRegion { - - @XmlElement(required = true) - protected List mapRegion; - - /** - * Gets the value of the mapRegion property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the mapRegion property. - * - *

        - * For example, to add a new item, do as follows: - *

        -                 *    getMapRegion().add(newItem);
        -                 * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link Entry.Entity.Segment.ListMapRegion.MapRegion } - * - * - */ - public List getMapRegion() { - if (mapRegion == null) { - mapRegion = new ArrayList(); - } - return this.mapRegion; - } - - - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -                 * <complexType>
        -                 *   <complexContent>
        -                 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -                 *       <sequence>
        -                 *         <element name="db">
        -                 *           <complexType>
        -                 *             <complexContent>
        -                 *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -                 *                 <sequence>
        -                 *                   <element name="dbDetail" maxOccurs="unbounded" minOccurs="0">
        -                 *                     <complexType>
        -                 *                       <complexContent>
        -                 *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -                 *                           <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
        -                 *                         </restriction>
        -                 *                       </complexContent>
        -                 *                     </complexType>
        -                 *                   </element>
        -                 *                 </sequence>
        -                 *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
        -                 *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
        -                 *                 <attribute name="dbChainId" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbChainId" />
        -                 *               </restriction>
        -                 *             </complexContent>
        -                 *           </complexType>
        -                 *         </element>
        -                 *       </sequence>
        -                 *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
        -                 *     </restriction>
        -                 *   </complexContent>
        -                 * </complexType>
        -                 * 
        - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "db" - }) - public static class MapRegion { - - @XmlElement(required = true) - protected Entry.Entity.Segment.ListMapRegion.MapRegion.Db db; - @XmlAttribute(name = "start") - protected String start; - @XmlAttribute(name = "end") - protected String end; - - /** - * Gets the value of the db property. - * - * @return - * possible object is - * {@link Entry.Entity.Segment.ListMapRegion.MapRegion.Db } - * - */ - public Entry.Entity.Segment.ListMapRegion.MapRegion.Db getDb() { - return db; - } - - /** - * Sets the value of the db property. - * - * @param value - * allowed object is - * {@link Entry.Entity.Segment.ListMapRegion.MapRegion.Db } - * - */ - public void setDb(Entry.Entity.Segment.ListMapRegion.MapRegion.Db value) { - this.db = value; - } - - /** - * Gets the value of the start property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getStart() { - return start; - } - - /** - * Sets the value of the start property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setStart(String value) { - this.start = value; - } - - /** - * Gets the value of the end property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getEnd() { - return end; - } - - /** - * Sets the value of the end property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setEnd(String value) { - this.end = value; - } - - - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -                     * <complexType>
        -                     *   <complexContent>
        -                     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -                     *       <sequence>
        -                     *         <element name="dbDetail" maxOccurs="unbounded" minOccurs="0">
        -                     *           <complexType>
        -                     *             <complexContent>
        -                     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -                     *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
        -                     *               </restriction>
        -                     *             </complexContent>
        -                     *           </complexType>
        -                     *         </element>
        -                     *       </sequence>
        -                     *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
        -                     *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}region"/>
        -                     *       <attribute name="dbChainId" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbChainId" />
        -                     *     </restriction>
        -                     *   </complexContent>
        -                     * </complexType>
        -                     * 
        - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "dbDetail" - }) - public static class Db { - - protected List dbDetail; - @XmlAttribute(name = "dbChainId") - protected String dbChainId; - @XmlAttribute(name = "dbSource", required = true) - protected String dbSource; - @XmlAttribute(name = "dbCoordSys", required = true) - protected String dbCoordSys; - @XmlAttribute(name = "dbAccessionId", required = true) - protected String dbAccessionId; - @XmlAttribute(name = "dbEvidence") - protected String dbEvidence; - @XmlAttribute(name = "dbVersion") - protected String dbVersion; - @XmlAttribute(name = "start") - protected String start; - @XmlAttribute(name = "end") - protected String end; - - /** - * Gets the value of the dbDetail property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the dbDetail property. - * - *

        - * For example, to add a new item, do as follows: - *

        -                         *    getDbDetail().add(newItem);
        -                         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link Entry.Entity.Segment.ListMapRegion.MapRegion.Db.DbDetail } - * - * - */ - public List getDbDetail() { - if (dbDetail == null) { - dbDetail = new ArrayList(); - } - return this.dbDetail; - } - - /** - * Gets the value of the dbChainId property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDbChainId() { - return dbChainId; - } - - /** - * Sets the value of the dbChainId property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDbChainId(String value) { - this.dbChainId = value; - } - - /** - * Gets the value of the dbSource property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDbSource() { - return dbSource; - } - - /** - * Sets the value of the dbSource property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDbSource(String value) { - this.dbSource = value; - } - - /** - * Gets the value of the dbCoordSys property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDbCoordSys() { - return dbCoordSys; - } - - /** - * Sets the value of the dbCoordSys property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDbCoordSys(String value) { - this.dbCoordSys = value; - } - - /** - * Gets the value of the dbAccessionId property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDbAccessionId() { - return dbAccessionId; - } - - /** - * Sets the value of the dbAccessionId property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDbAccessionId(String value) { - this.dbAccessionId = value; - } - - /** - * Gets the value of the dbEvidence property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDbEvidence() { - return dbEvidence; - } - - /** - * Sets the value of the dbEvidence property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDbEvidence(String value) { - this.dbEvidence = value; - } - - /** - * Gets the value of the dbVersion property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDbVersion() { - return dbVersion; - } - - /** - * Sets the value of the dbVersion property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDbVersion(String value) { - this.dbVersion = value; - } - - /** - * Gets the value of the start property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getStart() { - return start; - } - - /** - * Sets the value of the start property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setStart(String value) { - this.start = value; - } - - /** - * Gets the value of the end property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getEnd() { - return end; - } - - /** - * Sets the value of the end property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setEnd(String value) { - this.end = value; - } - - - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -                         * <complexType>
        -                         *   <complexContent>
        -                         *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -                         *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
        -                         *     </restriction>
        -                         *   </complexContent>
        -                         * </complexType>
        -                         * 
        - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "content" - }) - public static class DbDetail { - - @XmlValue - protected String content; - @XmlAttribute(name = "dbSource") - protected String dbSource; - @XmlAttribute(name = "property", required = true) - protected String property; - - /** - * Gets the value of the content property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getContent() { - return content; - } - - /** - * Sets the value of the content property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setContent(String value) { - this.content = value; - } - - /** - * Gets the value of the dbSource property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDbSource() { - return dbSource; - } - - /** - * Sets the value of the dbSource property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDbSource(String value) { - this.dbSource = value; - } - - /** - * Gets the value of the property property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getProperty() { - return property; - } - - /** - * Sets the value of the property property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setProperty(String value) { - this.property = value; - } - - } - - } - - } + public String getDbResName() + { + return dbResName; + } + /** + * Sets the value of the dbResName property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDbResName(String value) + { + this.dbResName = value; } + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content + * contained within this class. + * + *

        +           * <complexType>
        +           *   <complexContent>
        +           *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +           *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
        +           *     </restriction>
        +           *   </complexContent>
        +           * </complexType>
        +           * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "content" }) + public static class ResidueDetail + { + + @XmlValue + protected String content; + + @XmlAttribute(name = "dbSource") + protected String dbSource; + + @XmlAttribute(name = "property", required = true) + protected String property; /** - *

        Java class for anonymous complex type. + * Gets the value of the content property. * - *

        The following schema fragment specifies the expected content contained within this class. + * @return possible object is {@link String } * - *

        -             * <complexType>
        -             *   <complexContent>
        -             *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -             *       <sequence>
        -             *         <element name="residue" maxOccurs="unbounded">
        -             *           <complexType>
        -             *             <complexContent>
        -             *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -             *                 <sequence>
        -             *                   <element name="crossRefDb" maxOccurs="unbounded" minOccurs="0">
        -             *                     <complexType>
        -             *                       <complexContent>
        -             *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -             *                           <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
        -             *                           <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}resRef"/>
        -             *                           <attribute name="dbChainId" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}chainId" />
        -             *                         </restriction>
        -             *                       </complexContent>
        -             *                     </complexType>
        -             *                   </element>
        -             *                   <element name="residueDetail" maxOccurs="unbounded" minOccurs="0">
        -             *                     <complexType>
        -             *                       <complexContent>
        -             *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -             *                           <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
        -             *                         </restriction>
        -             *                       </complexContent>
        -             *                     </complexType>
        -             *                   </element>
        -             *                 </sequence>
        -             *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}resRef"/>
        -             *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}listdbRef"/>
        -             *               </restriction>
        -             *             </complexContent>
        -             *           </complexType>
        -             *         </element>
        -             *       </sequence>
        -             *     </restriction>
        -             *   </complexContent>
        -             * </complexType>
        -             * 
        + */ + public String getContent() + { + return content; + } + + /** + * Sets the value of the content property. * + * @param value + * allowed object is {@link String } * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "residue" - }) - public static class ListResidue { - - @XmlElement(required = true) - protected List residue; - - /** - * Gets the value of the residue property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the residue property. - * - *

        - * For example, to add a new item, do as follows: - *

        -                 *    getResidue().add(newItem);
        -                 * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link Entry.Entity.Segment.ListResidue.Residue } - * - * - */ - public List getResidue() { - if (residue == null) { - residue = new ArrayList(); - } - return this.residue; - } - - - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -                 * <complexType>
        -                 *   <complexContent>
        -                 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -                 *       <sequence>
        -                 *         <element name="crossRefDb" maxOccurs="unbounded" minOccurs="0">
        -                 *           <complexType>
        -                 *             <complexContent>
        -                 *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -                 *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
        -                 *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}resRef"/>
        -                 *                 <attribute name="dbChainId" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}chainId" />
        -                 *               </restriction>
        -                 *             </complexContent>
        -                 *           </complexType>
        -                 *         </element>
        -                 *         <element name="residueDetail" maxOccurs="unbounded" minOccurs="0">
        -                 *           <complexType>
        -                 *             <complexContent>
        -                 *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -                 *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
        -                 *               </restriction>
        -                 *             </complexContent>
        -                 *           </complexType>
        -                 *         </element>
        -                 *       </sequence>
        -                 *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}resRef"/>
        -                 *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}listdbRef"/>
        -                 *     </restriction>
        -                 *   </complexContent>
        -                 * </complexType>
        -                 * 
        - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "crossRefDb", - "residueDetail" - }) - public static class Residue { - - protected List crossRefDb; - protected List residueDetail; - @XmlAttribute(name = "dbResNum", required = true) - protected String dbResNum; - @XmlAttribute(name = "dbResName", required = true) - protected String dbResName; - @XmlAttribute(name = "dbVersion") - protected String dbVersion; - @XmlAttribute(name = "dbSource", required = true) - protected String dbSource; - @XmlAttribute(name = "dbCoordSys", required = true) - protected String dbCoordSys; - - /** - * Gets the value of the crossRefDb property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the crossRefDb property. - * - *

        - * For example, to add a new item, do as follows: - *

        -                     *    getCrossRefDb().add(newItem);
        -                     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link Entry.Entity.Segment.ListResidue.Residue.CrossRefDb } - * - * - */ - public List getCrossRefDb() { - if (crossRefDb == null) { - crossRefDb = new ArrayList(); - } - return this.crossRefDb; - } - - /** - * Gets the value of the residueDetail property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the residueDetail property. - * - *

        - * For example, to add a new item, do as follows: - *

        -                     *    getResidueDetail().add(newItem);
        -                     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link Entry.Entity.Segment.ListResidue.Residue.ResidueDetail } - * - * - */ - public List getResidueDetail() { - if (residueDetail == null) { - residueDetail = new ArrayList(); - } - return this.residueDetail; - } - - /** - * Gets the value of the dbResNum property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDbResNum() { - return dbResNum; - } - - /** - * Sets the value of the dbResNum property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDbResNum(String value) { - this.dbResNum = value; - } - - /** - * Gets the value of the dbResName property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDbResName() { - return dbResName; - } - - /** - * Sets the value of the dbResName property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDbResName(String value) { - this.dbResName = value; - } - - /** - * Gets the value of the dbVersion property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDbVersion() { - return dbVersion; - } - - /** - * Sets the value of the dbVersion property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDbVersion(String value) { - this.dbVersion = value; - } - - /** - * Gets the value of the dbSource property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDbSource() { - return dbSource; - } - - /** - * Sets the value of the dbSource property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDbSource(String value) { - this.dbSource = value; - } - - /** - * Gets the value of the dbCoordSys property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDbCoordSys() { - return dbCoordSys; - } - - /** - * Sets the value of the dbCoordSys property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDbCoordSys(String value) { - this.dbCoordSys = value; - } - - - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -                     * <complexType>
        -                     *   <complexContent>
        -                     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -                     *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}dbRef"/>
        -                     *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}resRef"/>
        -                     *       <attribute name="dbChainId" type="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}chainId" />
        -                     *     </restriction>
        -                     *   </complexContent>
        -                     * </complexType>
        -                     * 
        - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class CrossRefDb { - - @XmlAttribute(name = "dbChainId") - protected String dbChainId; - @XmlAttribute(name = "dbSource", required = true) - protected String dbSource; - @XmlAttribute(name = "dbCoordSys", required = true) - protected String dbCoordSys; - @XmlAttribute(name = "dbAccessionId", required = true) - protected String dbAccessionId; - @XmlAttribute(name = "dbEvidence") - protected String dbEvidence; - @XmlAttribute(name = "dbVersion") - protected String dbVersion; - @XmlAttribute(name = "dbResNum", required = true) - protected String dbResNum; - @XmlAttribute(name = "dbResName", required = true) - protected String dbResName; - - /** - * Gets the value of the dbChainId property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDbChainId() { - return dbChainId; - } - - /** - * Sets the value of the dbChainId property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDbChainId(String value) { - this.dbChainId = value; - } - - /** - * Gets the value of the dbSource property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDbSource() { - return dbSource; - } - - /** - * Sets the value of the dbSource property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDbSource(String value) { - this.dbSource = value; - } - - /** - * Gets the value of the dbCoordSys property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDbCoordSys() { - return dbCoordSys; - } - - /** - * Sets the value of the dbCoordSys property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDbCoordSys(String value) { - this.dbCoordSys = value; - } - - /** - * Gets the value of the dbAccessionId property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDbAccessionId() { - return dbAccessionId; - } - - /** - * Sets the value of the dbAccessionId property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDbAccessionId(String value) { - this.dbAccessionId = value; - } - - /** - * Gets the value of the dbEvidence property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDbEvidence() { - return dbEvidence; - } - - /** - * Sets the value of the dbEvidence property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDbEvidence(String value) { - this.dbEvidence = value; - } - - /** - * Gets the value of the dbVersion property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDbVersion() { - return dbVersion; - } - - /** - * Sets the value of the dbVersion property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDbVersion(String value) { - this.dbVersion = value; - } - - /** - * Gets the value of the dbResNum property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDbResNum() { - return dbResNum; - } - - /** - * Sets the value of the dbResNum property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDbResNum(String value) { - this.dbResNum = value; - } - - /** - * Gets the value of the dbResName property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDbResName() { - return dbResName; - } - - /** - * Sets the value of the dbResName property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDbResName(String value) { - this.dbResName = value; - } - - } - - - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -                     * <complexType>
        -                     *   <complexContent>
        -                     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -                     *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
        -                     *     </restriction>
        -                     *   </complexContent>
        -                     * </complexType>
        -                     * 
        - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "content" - }) - public static class ResidueDetail { - - @XmlValue - protected String content; - @XmlAttribute(name = "dbSource") - protected String dbSource; - @XmlAttribute(name = "property", required = true) - protected String property; - - /** - * Gets the value of the content property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getContent() { - return content; - } - - /** - * Sets the value of the content property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setContent(String value) { - this.content = value; - } - - /** - * Gets the value of the dbSource property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDbSource() { - return dbSource; - } - - /** - * Sets the value of the dbSource property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDbSource(String value) { - this.dbSource = value; - } - - /** - * Gets the value of the property property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getProperty() { - return property; - } - - /** - * Sets the value of the property property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setProperty(String value) { - this.property = value; - } - - } - - } - + public void setContent(String value) + { + this.content = value; } - /** - *

        Java class for anonymous complex type. + * Gets the value of the dbSource property. * - *

        The following schema fragment specifies the expected content contained within this class. + * @return possible object is {@link String } * - *

        -             * <complexType>
        -             *   <complexContent>
        -             *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -             *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
        -             *     </restriction>
        -             *   </complexContent>
        -             * </complexType>
        -             * 
        + */ + public String getDbSource() + { + return dbSource; + } + + /** + * Sets the value of the dbSource property. * + * @param value + * allowed object is {@link String } * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "content" - }) - public static class SegmentDetail { - - @XmlValue - protected String content; - @XmlAttribute(name = "dbSource") - protected String dbSource; - @XmlAttribute(name = "property", required = true) - protected String property; - - /** - * Gets the value of the content property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getContent() { - return content; - } - - /** - * Sets the value of the content property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setContent(String value) { - this.content = value; - } - - /** - * Gets the value of the dbSource property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDbSource() { - return dbSource; - } - - /** - * Sets the value of the dbSource property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDbSource(String value) { - this.dbSource = value; - } - - /** - * Gets the value of the property property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getProperty() { - return property; - } - - /** - * Sets the value of the property property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setProperty(String value) { - this.property = value; - } + public void setDbSource(String value) + { + this.dbSource = value; + } + /** + * Gets the value of the property property. + * + * @return possible object is {@link String } + * + */ + public String getProperty() + { + return property; } - } + /** + * Sets the value of the property property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setProperty(String value) + { + this.property = value; + } - } + } + } - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -     * <complexType>
        -     *   <complexContent>
        -     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
        -     *     </restriction>
        -     *   </complexContent>
        -     * </complexType>
        -     * 
        - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "content" - }) - public static class EntryDetail { + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +       * <complexType>
        +       *   <complexContent>
        +       *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +       *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
        +       *     </restriction>
        +       *   </complexContent>
        +       * </complexType>
        +       * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "content" }) + public static class SegmentDetail + { @XmlValue protected String content; + @XmlAttribute(name = "dbSource") protected String dbSource; + @XmlAttribute(name = "property", required = true) protected String property; /** * Gets the value of the content property. * - * @return - * possible object is - * {@link String } - * + * @return possible object is {@link String } + * */ - public String getContent() { - return content; + public String getContent() + { + return content; } /** * Sets the value of the content property. * * @param value - * allowed object is - * {@link String } - * + * allowed object is {@link String } + * */ - public void setContent(String value) { - this.content = value; + public void setContent(String value) + { + this.content = value; } /** * Gets the value of the dbSource property. * - * @return - * possible object is - * {@link String } - * + * @return possible object is {@link String } + * */ - public String getDbSource() { - return dbSource; + public String getDbSource() + { + return dbSource; } /** * Sets the value of the dbSource property. * * @param value - * allowed object is - * {@link String } - * + * allowed object is {@link String } + * */ - public void setDbSource(String value) { - this.dbSource = value; + public void setDbSource(String value) + { + this.dbSource = value; } /** * Gets the value of the property property. * - * @return - * possible object is - * {@link String } - * + * @return possible object is {@link String } + * */ - public String getProperty() { - return property; + public String getProperty() + { + return property; } /** * Sets the value of the property property. * * @param value - * allowed object is - * {@link String } - * + * allowed object is {@link String } + * */ - public void setProperty(String value) { - this.property = value; + public void setProperty(String value) + { + this.property = value; } + } + } + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <complexContent>
        +   *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}detail"/>
        +   *     </restriction>
        +   *   </complexContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "content" }) + public static class EntryDetail + { + + @XmlValue + protected String content; + + @XmlAttribute(name = "dbSource") + protected String dbSource; + + @XmlAttribute(name = "property", required = true) + protected String property; + + /** + * Gets the value of the content property. + * + * @return possible object is {@link String } + * + */ + public String getContent() + { + return content; + } /** - *

        Java class for anonymous complex type. + * Sets the value of the content property. * - *

        The following schema fragment specifies the expected content contained within this class. + * @param value + * allowed object is {@link String } + * + */ + public void setContent(String value) + { + this.content = value; + } + + /** + * Gets the value of the dbSource property. + * + * @return possible object is {@link String } + * + */ + public String getDbSource() + { + return dbSource; + } + + /** + * Sets the value of the dbSource property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDbSource(String value) + { + this.dbSource = value; + } + + /** + * Gets the value of the property property. + * + * @return possible object is {@link String } + * + */ + public String getProperty() + { + return property; + } + + /** + * Sets the value of the property property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setProperty(String value) + { + this.property = value; + } + + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <complexContent>
        +   *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *       <sequence maxOccurs="unbounded">
        +   *         <element name="db">
        +   *           <complexType>
        +   *             <complexContent>
        +   *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}listdbRef"/>
        +   *               </restriction>
        +   *             </complexContent>
        +   *           </complexType>
        +   *         </element>
        +   *       </sequence>
        +   *     </restriction>
        +   *   </complexContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "db" }) + public static class ListDB + { + + @XmlElement(required = true) + protected List db; + + /** + * Gets the value of the db property. + * + *

        + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the db property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +     * getDb().add(newItem);
        +     * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link Entry.ListDB.Db } + * + * + */ + public List getDb() + { + if (db == null) + { + db = new ArrayList(); + } + return this.db; + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. * *

              * <complexType>
              *   <complexContent>
              *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *       <sequence maxOccurs="unbounded">
        -     *         <element name="db">
        -     *           <complexType>
        -     *             <complexContent>
        -     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *                 <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}listdbRef"/>
        -     *               </restriction>
        -     *             </complexContent>
        -     *           </complexType>
        -     *         </element>
        -     *       </sequence>
        +     *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}listdbRef"/>
              *     </restriction>
              *   </complexContent>
              * </complexType>
        @@ -2673,146 +2781,90 @@ public class Entry {
              * 
              */
             @XmlAccessorType(XmlAccessType.FIELD)
        -    @XmlType(name = "", propOrder = {
        -        "db"
        -    })
        -    public static class ListDB {
        -
        -        @XmlElement(required = true)
        -        protected List db;
        -
        -        /**
        -         * Gets the value of the db property.
        -         * 
        -         * 

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the db property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getDb().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link Entry.ListDB.Db } - * - * - */ - public List getDb() { - if (db == null) { - db = new ArrayList(); - } - return this.db; - } - - - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -         * <complexType>
        -         *   <complexContent>
        -         *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *       <attGroup ref="{http://www.ebi.ac.uk/pdbe/docs/sifts/dataTypes.xsd}listdbRef"/>
        -         *     </restriction>
        -         *   </complexContent>
        -         * </complexType>
        -         * 
        - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class Db { - - @XmlAttribute(name = "dbVersion") - protected String dbVersion; - @XmlAttribute(name = "dbSource", required = true) - protected String dbSource; - @XmlAttribute(name = "dbCoordSys", required = true) - protected String dbCoordSys; - - /** - * Gets the value of the dbVersion property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDbVersion() { - return dbVersion; - } - - /** - * Sets the value of the dbVersion property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDbVersion(String value) { - this.dbVersion = value; - } - - /** - * Gets the value of the dbSource property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDbSource() { - return dbSource; - } - - /** - * Sets the value of the dbSource property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDbSource(String value) { - this.dbSource = value; - } - - /** - * Gets the value of the dbCoordSys property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDbCoordSys() { - return dbCoordSys; - } - - /** - * Sets the value of the dbCoordSys property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDbCoordSys(String value) { - this.dbCoordSys = value; - } - - } + @XmlType(name = "") + public static class Db + { + + @XmlAttribute(name = "dbVersion") + protected String dbVersion; + + @XmlAttribute(name = "dbSource", required = true) + protected String dbSource; + + @XmlAttribute(name = "dbCoordSys", required = true) + protected String dbCoordSys; + + /** + * Gets the value of the dbVersion property. + * + * @return possible object is {@link String } + * + */ + public String getDbVersion() + { + return dbVersion; + } + + /** + * Sets the value of the dbVersion property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDbVersion(String value) + { + this.dbVersion = value; + } + + /** + * Gets the value of the dbSource property. + * + * @return possible object is {@link String } + * + */ + public String getDbSource() + { + return dbSource; + } + + /** + * Sets the value of the dbSource property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDbSource(String value) + { + this.dbSource = value; + } + + /** + * Gets the value of the dbCoordSys property. + * + * @return possible object is {@link String } + * + */ + public String getDbCoordSys() + { + return dbCoordSys; + } + + /** + * Sets the value of the dbCoordSys property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDbCoordSys(String value) + { + this.dbCoordSys = value; + } } + } + } diff --git a/src/jalview/xml/binding/sifts/ObjectFactory.java b/src/jalview/xml/binding/sifts/ObjectFactory.java index 7b74e13..004b43d 100644 --- a/src/jalview/xml/binding/sifts/ObjectFactory.java +++ b/src/jalview/xml/binding/sifts/ObjectFactory.java @@ -5,315 +5,351 @@ // Generated on: 2015.10.09 at 03:18:33 PM BST // - package jalview.xml.binding.sifts; import javax.xml.bind.annotation.XmlRegistry; - /** - * This object contains factory methods for each - * Java content interface and Java element interface - * generated in the jalview.xml.binding.sifts package. - *

        An ObjectFactory allows you to programatically - * construct new instances of the Java representation - * for XML content. The Java representation of XML - * content can consist of schema derived interfaces - * and classes representing the binding of schema - * type definitions, element declarations and model - * groups. Factory methods for each of these are - * provided in this class. + * This object contains factory methods for each Java content interface and Java + * element interface generated in the jalview.xml.binding.sifts package. + *

        + * An ObjectFactory allows you to programatically construct new instances of the + * Java representation for XML content. The Java representation of XML content + * can consist of schema derived interfaces and classes representing the binding + * of schema type definitions, element declarations and model groups. Factory + * methods for each of these are provided in this class. * */ @XmlRegistry -public class ObjectFactory { - - - /** - * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: jalview.xml.binding.sifts - * - */ - public ObjectFactory() { - } - - /** - * Create an instance of {@link Entry } - * - */ - public Entry createEntry() { - return new Entry(); - } - - /** - * Create an instance of {@link Alignment } - * - */ - public Alignment createAlignment() { - return new Alignment(); - } - - /** - * Create an instance of {@link Alignment.Geo3D } - * - */ - public Alignment.Geo3D createAlignmentGeo3D() { - return new Alignment.Geo3D(); - } - - /** - * Create an instance of {@link Alignment.Geo3D.Matrix } - * - */ - public Alignment.Geo3D.Matrix createAlignmentGeo3DMatrix() { - return new Alignment.Geo3D.Matrix(); - } - - /** - * Create an instance of {@link Alignment.Block } - * - */ - public Alignment.Block createAlignmentBlock() { - return new Alignment.Block(); - } - - /** - * Create an instance of {@link Alignment.AlignObject } - * - */ - public Alignment.AlignObject createAlignmentAlignObject() { - return new Alignment.AlignObject(); - } - - /** - * Create an instance of {@link Entry.Entity } - * - */ - public Entry.Entity createEntryEntity() { - return new Entry.Entity(); - } - - /** - * Create an instance of {@link Entry.Entity.Segment } - * - */ - public Entry.Entity.Segment createEntryEntitySegment() { - return new Entry.Entity.Segment(); - } - - /** - * Create an instance of {@link Entry.Entity.Segment.ListMapRegion } - * - */ - public Entry.Entity.Segment.ListMapRegion createEntryEntitySegmentListMapRegion() { - return new Entry.Entity.Segment.ListMapRegion(); - } - - /** - * Create an instance of {@link Entry.Entity.Segment.ListMapRegion.MapRegion } - * - */ - public Entry.Entity.Segment.ListMapRegion.MapRegion createEntryEntitySegmentListMapRegionMapRegion() { - return new Entry.Entity.Segment.ListMapRegion.MapRegion(); - } - - /** - * Create an instance of {@link Entry.Entity.Segment.ListMapRegion.MapRegion.Db } - * - */ - public Entry.Entity.Segment.ListMapRegion.MapRegion.Db createEntryEntitySegmentListMapRegionMapRegionDb() { - return new Entry.Entity.Segment.ListMapRegion.MapRegion.Db(); - } - - /** - * Create an instance of {@link Entry.Entity.Segment.ListResidue } - * - */ - public Entry.Entity.Segment.ListResidue createEntryEntitySegmentListResidue() { - return new Entry.Entity.Segment.ListResidue(); - } - - /** - * Create an instance of {@link Entry.Entity.Segment.ListResidue.Residue } - * - */ - public Entry.Entity.Segment.ListResidue.Residue createEntryEntitySegmentListResidueResidue() { - return new Entry.Entity.Segment.ListResidue.Residue(); - } - - /** - * Create an instance of {@link Entry.ListDB } - * - */ - public Entry.ListDB createEntryListDB() { - return new Entry.ListDB(); - } - - /** - * Create an instance of {@link Entry.EntryDetail } - * - */ - public Entry.EntryDetail createEntryEntryDetail() { - return new Entry.EntryDetail(); - } - - /** - * Create an instance of {@link Alignment.Score } - * - */ - public Alignment.Score createAlignmentScore() { - return new Alignment.Score(); - } - - /** - * Create an instance of {@link Alignment.Geo3D.Vector } - * - */ - public Alignment.Geo3D.Vector createAlignmentGeo3DVector() { - return new Alignment.Geo3D.Vector(); - } - - /** - * Create an instance of {@link Alignment.Geo3D.Matrix.Max11 } - * - */ - public Alignment.Geo3D.Matrix.Max11 createAlignmentGeo3DMatrixMax11() { - return new Alignment.Geo3D.Matrix.Max11(); - } - - /** - * Create an instance of {@link Alignment.Geo3D.Matrix.Max12 } - * - */ - public Alignment.Geo3D.Matrix.Max12 createAlignmentGeo3DMatrixMax12() { - return new Alignment.Geo3D.Matrix.Max12(); - } - - /** - * Create an instance of {@link Alignment.Geo3D.Matrix.Max13 } - * - */ - public Alignment.Geo3D.Matrix.Max13 createAlignmentGeo3DMatrixMax13() { - return new Alignment.Geo3D.Matrix.Max13(); - } - - /** - * Create an instance of {@link Alignment.Geo3D.Matrix.Max21 } - * - */ - public Alignment.Geo3D.Matrix.Max21 createAlignmentGeo3DMatrixMax21() { - return new Alignment.Geo3D.Matrix.Max21(); - } - - /** - * Create an instance of {@link Alignment.Geo3D.Matrix.Max22 } - * - */ - public Alignment.Geo3D.Matrix.Max22 createAlignmentGeo3DMatrixMax22() { - return new Alignment.Geo3D.Matrix.Max22(); - } - - /** - * Create an instance of {@link Alignment.Geo3D.Matrix.Max23 } - * - */ - public Alignment.Geo3D.Matrix.Max23 createAlignmentGeo3DMatrixMax23() { - return new Alignment.Geo3D.Matrix.Max23(); - } - - /** - * Create an instance of {@link Alignment.Geo3D.Matrix.Max31 } - * - */ - public Alignment.Geo3D.Matrix.Max31 createAlignmentGeo3DMatrixMax31() { - return new Alignment.Geo3D.Matrix.Max31(); - } - - /** - * Create an instance of {@link Alignment.Geo3D.Matrix.Max32 } - * - */ - public Alignment.Geo3D.Matrix.Max32 createAlignmentGeo3DMatrixMax32() { - return new Alignment.Geo3D.Matrix.Max32(); - } - - /** - * Create an instance of {@link Alignment.Geo3D.Matrix.Max33 } - * - */ - public Alignment.Geo3D.Matrix.Max33 createAlignmentGeo3DMatrixMax33() { - return new Alignment.Geo3D.Matrix.Max33(); - } - - /** - * Create an instance of {@link Alignment.Block.Segment } - * - */ - public Alignment.Block.Segment createAlignmentBlockSegment() { - return new Alignment.Block.Segment(); - } - - /** - * Create an instance of {@link Alignment.AlignObject.AlignObjectDetail } - * - */ - public Alignment.AlignObject.AlignObjectDetail createAlignmentAlignObjectAlignObjectDetail() { - return new Alignment.AlignObject.AlignObjectDetail(); - } - - /** - * Create an instance of {@link Alignment.AlignObject.Sequence } - * - */ - public Alignment.AlignObject.Sequence createAlignmentAlignObjectSequence() { - return new Alignment.AlignObject.Sequence(); - } - - /** - * Create an instance of {@link Entry.Entity.EntityDetail } - * - */ - public Entry.Entity.EntityDetail createEntryEntityEntityDetail() { - return new Entry.Entity.EntityDetail(); - } - - /** - * Create an instance of {@link Entry.Entity.Segment.SegmentDetail } - * - */ - public Entry.Entity.Segment.SegmentDetail createEntryEntitySegmentSegmentDetail() { - return new Entry.Entity.Segment.SegmentDetail(); - } - - /** - * Create an instance of {@link Entry.Entity.Segment.ListMapRegion.MapRegion.Db.DbDetail } - * - */ - public Entry.Entity.Segment.ListMapRegion.MapRegion.Db.DbDetail createEntryEntitySegmentListMapRegionMapRegionDbDbDetail() { - return new Entry.Entity.Segment.ListMapRegion.MapRegion.Db.DbDetail(); - } - - /** - * Create an instance of {@link Entry.Entity.Segment.ListResidue.Residue.CrossRefDb } - * - */ - public Entry.Entity.Segment.ListResidue.Residue.CrossRefDb createEntryEntitySegmentListResidueResidueCrossRefDb() { - return new Entry.Entity.Segment.ListResidue.Residue.CrossRefDb(); - } - - /** - * Create an instance of {@link Entry.Entity.Segment.ListResidue.Residue.ResidueDetail } - * - */ - public Entry.Entity.Segment.ListResidue.Residue.ResidueDetail createEntryEntitySegmentListResidueResidueResidueDetail() { - return new Entry.Entity.Segment.ListResidue.Residue.ResidueDetail(); - } - - /** - * Create an instance of {@link Entry.ListDB.Db } - * - */ - public Entry.ListDB.Db createEntryListDBDb() { - return new Entry.ListDB.Db(); - } +public class ObjectFactory +{ + + /** + * Create a new ObjectFactory that can be used to create new instances of + * schema derived classes for package: jalview.xml.binding.sifts + * + */ + public ObjectFactory() + { + } + + /** + * Create an instance of {@link Entry } + * + */ + public Entry createEntry() + { + return new Entry(); + } + + /** + * Create an instance of {@link Alignment } + * + */ + public Alignment createAlignment() + { + return new Alignment(); + } + + /** + * Create an instance of {@link Alignment.Geo3D } + * + */ + public Alignment.Geo3D createAlignmentGeo3D() + { + return new Alignment.Geo3D(); + } + + /** + * Create an instance of {@link Alignment.Geo3D.Matrix } + * + */ + public Alignment.Geo3D.Matrix createAlignmentGeo3DMatrix() + { + return new Alignment.Geo3D.Matrix(); + } + + /** + * Create an instance of {@link Alignment.Block } + * + */ + public Alignment.Block createAlignmentBlock() + { + return new Alignment.Block(); + } + + /** + * Create an instance of {@link Alignment.AlignObject } + * + */ + public Alignment.AlignObject createAlignmentAlignObject() + { + return new Alignment.AlignObject(); + } + + /** + * Create an instance of {@link Entry.Entity } + * + */ + public Entry.Entity createEntryEntity() + { + return new Entry.Entity(); + } + + /** + * Create an instance of {@link Entry.Entity.Segment } + * + */ + public Entry.Entity.Segment createEntryEntitySegment() + { + return new Entry.Entity.Segment(); + } + + /** + * Create an instance of {@link Entry.Entity.Segment.ListMapRegion } + * + */ + public Entry.Entity.Segment.ListMapRegion createEntryEntitySegmentListMapRegion() + { + return new Entry.Entity.Segment.ListMapRegion(); + } + + /** + * Create an instance of {@link Entry.Entity.Segment.ListMapRegion.MapRegion } + * + */ + public Entry.Entity.Segment.ListMapRegion.MapRegion createEntryEntitySegmentListMapRegionMapRegion() + { + return new Entry.Entity.Segment.ListMapRegion.MapRegion(); + } + + /** + * Create an instance of + * {@link Entry.Entity.Segment.ListMapRegion.MapRegion.Db } + * + */ + public Entry.Entity.Segment.ListMapRegion.MapRegion.Db createEntryEntitySegmentListMapRegionMapRegionDb() + { + return new Entry.Entity.Segment.ListMapRegion.MapRegion.Db(); + } + + /** + * Create an instance of {@link Entry.Entity.Segment.ListResidue } + * + */ + public Entry.Entity.Segment.ListResidue createEntryEntitySegmentListResidue() + { + return new Entry.Entity.Segment.ListResidue(); + } + + /** + * Create an instance of {@link Entry.Entity.Segment.ListResidue.Residue } + * + */ + public Entry.Entity.Segment.ListResidue.Residue createEntryEntitySegmentListResidueResidue() + { + return new Entry.Entity.Segment.ListResidue.Residue(); + } + + /** + * Create an instance of {@link Entry.ListDB } + * + */ + public Entry.ListDB createEntryListDB() + { + return new Entry.ListDB(); + } + + /** + * Create an instance of {@link Entry.EntryDetail } + * + */ + public Entry.EntryDetail createEntryEntryDetail() + { + return new Entry.EntryDetail(); + } + + /** + * Create an instance of {@link Alignment.Score } + * + */ + public Alignment.Score createAlignmentScore() + { + return new Alignment.Score(); + } + + /** + * Create an instance of {@link Alignment.Geo3D.Vector } + * + */ + public Alignment.Geo3D.Vector createAlignmentGeo3DVector() + { + return new Alignment.Geo3D.Vector(); + } + + /** + * Create an instance of {@link Alignment.Geo3D.Matrix.Max11 } + * + */ + public Alignment.Geo3D.Matrix.Max11 createAlignmentGeo3DMatrixMax11() + { + return new Alignment.Geo3D.Matrix.Max11(); + } + + /** + * Create an instance of {@link Alignment.Geo3D.Matrix.Max12 } + * + */ + public Alignment.Geo3D.Matrix.Max12 createAlignmentGeo3DMatrixMax12() + { + return new Alignment.Geo3D.Matrix.Max12(); + } + + /** + * Create an instance of {@link Alignment.Geo3D.Matrix.Max13 } + * + */ + public Alignment.Geo3D.Matrix.Max13 createAlignmentGeo3DMatrixMax13() + { + return new Alignment.Geo3D.Matrix.Max13(); + } + + /** + * Create an instance of {@link Alignment.Geo3D.Matrix.Max21 } + * + */ + public Alignment.Geo3D.Matrix.Max21 createAlignmentGeo3DMatrixMax21() + { + return new Alignment.Geo3D.Matrix.Max21(); + } + + /** + * Create an instance of {@link Alignment.Geo3D.Matrix.Max22 } + * + */ + public Alignment.Geo3D.Matrix.Max22 createAlignmentGeo3DMatrixMax22() + { + return new Alignment.Geo3D.Matrix.Max22(); + } + + /** + * Create an instance of {@link Alignment.Geo3D.Matrix.Max23 } + * + */ + public Alignment.Geo3D.Matrix.Max23 createAlignmentGeo3DMatrixMax23() + { + return new Alignment.Geo3D.Matrix.Max23(); + } + + /** + * Create an instance of {@link Alignment.Geo3D.Matrix.Max31 } + * + */ + public Alignment.Geo3D.Matrix.Max31 createAlignmentGeo3DMatrixMax31() + { + return new Alignment.Geo3D.Matrix.Max31(); + } + + /** + * Create an instance of {@link Alignment.Geo3D.Matrix.Max32 } + * + */ + public Alignment.Geo3D.Matrix.Max32 createAlignmentGeo3DMatrixMax32() + { + return new Alignment.Geo3D.Matrix.Max32(); + } + + /** + * Create an instance of {@link Alignment.Geo3D.Matrix.Max33 } + * + */ + public Alignment.Geo3D.Matrix.Max33 createAlignmentGeo3DMatrixMax33() + { + return new Alignment.Geo3D.Matrix.Max33(); + } + + /** + * Create an instance of {@link Alignment.Block.Segment } + * + */ + public Alignment.Block.Segment createAlignmentBlockSegment() + { + return new Alignment.Block.Segment(); + } + + /** + * Create an instance of {@link Alignment.AlignObject.AlignObjectDetail } + * + */ + public Alignment.AlignObject.AlignObjectDetail createAlignmentAlignObjectAlignObjectDetail() + { + return new Alignment.AlignObject.AlignObjectDetail(); + } + + /** + * Create an instance of {@link Alignment.AlignObject.Sequence } + * + */ + public Alignment.AlignObject.Sequence createAlignmentAlignObjectSequence() + { + return new Alignment.AlignObject.Sequence(); + } + + /** + * Create an instance of {@link Entry.Entity.EntityDetail } + * + */ + public Entry.Entity.EntityDetail createEntryEntityEntityDetail() + { + return new Entry.Entity.EntityDetail(); + } + + /** + * Create an instance of {@link Entry.Entity.Segment.SegmentDetail } + * + */ + public Entry.Entity.Segment.SegmentDetail createEntryEntitySegmentSegmentDetail() + { + return new Entry.Entity.Segment.SegmentDetail(); + } + + /** + * Create an instance of + * {@link Entry.Entity.Segment.ListMapRegion.MapRegion.Db.DbDetail } + * + */ + public Entry.Entity.Segment.ListMapRegion.MapRegion.Db.DbDetail createEntryEntitySegmentListMapRegionMapRegionDbDbDetail() + { + return new Entry.Entity.Segment.ListMapRegion.MapRegion.Db.DbDetail(); + } + + /** + * Create an instance of + * {@link Entry.Entity.Segment.ListResidue.Residue.CrossRefDb } + * + */ + public Entry.Entity.Segment.ListResidue.Residue.CrossRefDb createEntryEntitySegmentListResidueResidueCrossRefDb() + { + return new Entry.Entity.Segment.ListResidue.Residue.CrossRefDb(); + } + + /** + * Create an instance of + * {@link Entry.Entity.Segment.ListResidue.Residue.ResidueDetail } + * + */ + public Entry.Entity.Segment.ListResidue.Residue.ResidueDetail createEntryEntitySegmentListResidueResidueResidueDetail() + { + return new Entry.Entity.Segment.ListResidue.Residue.ResidueDetail(); + } + + /** + * Create an instance of {@link Entry.ListDB.Db } + * + */ + public Entry.ListDB.Db createEntryListDBDb() + { + return new Entry.ListDB.Db(); + } } diff --git a/src/jalview/xml/binding/sifts/package-info.java b/src/jalview/xml/binding/sifts/package-info.java index aac24fe..913d898 100644 --- a/src/jalview/xml/binding/sifts/package-info.java +++ b/src/jalview/xml/binding/sifts/package-info.java @@ -5,5 +5,7 @@ // Generated on: 2015.10.09 at 03:18:33 PM BST // -@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.ebi.ac.uk/pdbe/docs/sifts/eFamily.xsd", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) +@javax.xml.bind.annotation.XmlSchema( + namespace = "http://www.ebi.ac.uk/pdbe/docs/sifts/eFamily.xsd", + elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) package jalview.xml.binding.sifts; diff --git a/src/jalview/xml/binding/uniprot/CitationType.java b/src/jalview/xml/binding/uniprot/CitationType.java index 07adace..b38df87 100644 --- a/src/jalview/xml/binding/uniprot/CitationType.java +++ b/src/jalview/xml/binding/uniprot/CitationType.java @@ -5,7 +5,6 @@ // Generated on: 2019.04.05 at 08:01:44 AM BST // - package jalview.xml.binding.uniprot; import java.util.ArrayList; @@ -15,14 +14,16 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlType; - /** - * Describes different types of citations. - * Equivalent to the flat file RX-, RG-, RA-, RT- and RL-lines. + * Describes different types of citations. Equivalent to the flat file RX-, RG-, + * RA-, RT- and RL-lines. * - *

        Java class for citationType complex type. + *

        + * Java class for citationType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="citationType">
        @@ -72,456 +73,457 @@ import javax.xml.bind.annotation.XmlType;
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "citationType", propOrder = {
        -    "title",
        -    "editorList",
        -    "authorList",
        -    "locator",
        -    "dbReference"
        -})
        -public class CitationType {
        -
        -    protected String title;
        -    protected NameListType editorList;
        -    protected NameListType authorList;
        -    protected String locator;
        -    protected List dbReference;
        -    @XmlAttribute(name = "type", required = true)
        -    protected String type;
        -    @XmlAttribute(name = "date")
        -    protected String date;
        -    @XmlAttribute(name = "name")
        -    protected String name;
        -    @XmlAttribute(name = "volume")
        -    protected String volume;
        -    @XmlAttribute(name = "first")
        -    protected String first;
        -    @XmlAttribute(name = "last")
        -    protected String last;
        -    @XmlAttribute(name = "publisher")
        -    protected String publisher;
        -    @XmlAttribute(name = "city")
        -    protected String city;
        -    @XmlAttribute(name = "db")
        -    protected String db;
        -    @XmlAttribute(name = "number")
        -    protected String number;
        -    @XmlAttribute(name = "institute")
        -    protected String institute;
        -    @XmlAttribute(name = "country")
        -    protected String country;
        -
        -    /**
        -     * Gets the value of the title property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getTitle() {
        -        return title;
        -    }
        -
        -    /**
        -     * Sets the value of the title property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setTitle(String value) {
        -        this.title = value;
        -    }
        -
        -    /**
        -     * Gets the value of the editorList property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link NameListType }
        -     *     
        -     */
        -    public NameListType getEditorList() {
        -        return editorList;
        -    }
        -
        -    /**
        -     * Sets the value of the editorList property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link NameListType }
        -     *     
        -     */
        -    public void setEditorList(NameListType value) {
        -        this.editorList = value;
        -    }
        -
        -    /**
        -     * Gets the value of the authorList property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link NameListType }
        -     *     
        -     */
        -    public NameListType getAuthorList() {
        -        return authorList;
        -    }
        -
        -    /**
        -     * Sets the value of the authorList property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link NameListType }
        -     *     
        -     */
        -    public void setAuthorList(NameListType value) {
        -        this.authorList = value;
        -    }
        -
        -    /**
        -     * Gets the value of the locator property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getLocator() {
        -        return locator;
        -    }
        -
        -    /**
        -     * Sets the value of the locator property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setLocator(String value) {
        -        this.locator = value;
        -    }
        -
        -    /**
        -     * Gets the value of the dbReference property.
        -     * 
        -     * 

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the dbReference property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getDbReference().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link DbReferenceType } - * - * - */ - public List getDbReference() { - if (dbReference == null) { - dbReference = new ArrayList(); - } - return this.dbReference; - } - - /** - * Gets the value of the type property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getType() { - return type; - } - - /** - * Sets the value of the type property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setType(String value) { - this.type = value; - } - - /** - * Gets the value of the date property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDate() { - return date; - } - - /** - * Sets the value of the date property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDate(String value) { - this.date = value; - } - - /** - * Gets the value of the name property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getName() { - return name; - } - - /** - * Sets the value of the name property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setName(String value) { - this.name = value; - } - - /** - * Gets the value of the volume property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getVolume() { - return volume; - } - - /** - * Sets the value of the volume property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setVolume(String value) { - this.volume = value; - } - - /** - * Gets the value of the first property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getFirst() { - return first; - } - - /** - * Sets the value of the first property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setFirst(String value) { - this.first = value; - } - - /** - * Gets the value of the last property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getLast() { - return last; - } - - /** - * Sets the value of the last property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setLast(String value) { - this.last = value; - } - - /** - * Gets the value of the publisher property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getPublisher() { - return publisher; - } - - /** - * Sets the value of the publisher property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setPublisher(String value) { - this.publisher = value; - } - - /** - * Gets the value of the city property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getCity() { - return city; - } - - /** - * Sets the value of the city property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setCity(String value) { - this.city = value; - } - - /** - * Gets the value of the db property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDb() { - return db; - } - - /** - * Sets the value of the db property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDb(String value) { - this.db = value; - } - - /** - * Gets the value of the number property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getNumber() { - return number; - } - - /** - * Sets the value of the number property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setNumber(String value) { - this.number = value; - } - - /** - * Gets the value of the institute property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getInstitute() { - return institute; - } - - /** - * Sets the value of the institute property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setInstitute(String value) { - this.institute = value; - } - - /** - * Gets the value of the country property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getCountry() { - return country; - } - - /** - * Sets the value of the country property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setCountry(String value) { - this.country = value; - } +@XmlType( + name = "citationType", + propOrder = + { "title", "editorList", "authorList", "locator", "dbReference" }) +public class CitationType +{ + + protected String title; + + protected NameListType editorList; + + protected NameListType authorList; + + protected String locator; + + protected List dbReference; + + @XmlAttribute(name = "type", required = true) + protected String type; + + @XmlAttribute(name = "date") + protected String date; + + @XmlAttribute(name = "name") + protected String name; + + @XmlAttribute(name = "volume") + protected String volume; + + @XmlAttribute(name = "first") + protected String first; + + @XmlAttribute(name = "last") + protected String last; + + @XmlAttribute(name = "publisher") + protected String publisher; + + @XmlAttribute(name = "city") + protected String city; + + @XmlAttribute(name = "db") + protected String db; + + @XmlAttribute(name = "number") + protected String number; + + @XmlAttribute(name = "institute") + protected String institute; + + @XmlAttribute(name = "country") + protected String country; + + /** + * Gets the value of the title property. + * + * @return possible object is {@link String } + * + */ + public String getTitle() + { + return title; + } + + /** + * Sets the value of the title property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setTitle(String value) + { + this.title = value; + } + + /** + * Gets the value of the editorList property. + * + * @return possible object is {@link NameListType } + * + */ + public NameListType getEditorList() + { + return editorList; + } + + /** + * Sets the value of the editorList property. + * + * @param value + * allowed object is {@link NameListType } + * + */ + public void setEditorList(NameListType value) + { + this.editorList = value; + } + + /** + * Gets the value of the authorList property. + * + * @return possible object is {@link NameListType } + * + */ + public NameListType getAuthorList() + { + return authorList; + } + + /** + * Sets the value of the authorList property. + * + * @param value + * allowed object is {@link NameListType } + * + */ + public void setAuthorList(NameListType value) + { + this.authorList = value; + } + + /** + * Gets the value of the locator property. + * + * @return possible object is {@link String } + * + */ + public String getLocator() + { + return locator; + } + + /** + * Sets the value of the locator property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setLocator(String value) + { + this.locator = value; + } + + /** + * Gets the value of the dbReference property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the dbReference property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getDbReference().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link DbReferenceType } + * + * + */ + public List getDbReference() + { + if (dbReference == null) + { + dbReference = new ArrayList(); + } + return this.dbReference; + } + + /** + * Gets the value of the type property. + * + * @return possible object is {@link String } + * + */ + public String getType() + { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setType(String value) + { + this.type = value; + } + + /** + * Gets the value of the date property. + * + * @return possible object is {@link String } + * + */ + public String getDate() + { + return date; + } + + /** + * Sets the value of the date property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDate(String value) + { + this.date = value; + } + + /** + * Gets the value of the name property. + * + * @return possible object is {@link String } + * + */ + public String getName() + { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setName(String value) + { + this.name = value; + } + + /** + * Gets the value of the volume property. + * + * @return possible object is {@link String } + * + */ + public String getVolume() + { + return volume; + } + + /** + * Sets the value of the volume property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setVolume(String value) + { + this.volume = value; + } + + /** + * Gets the value of the first property. + * + * @return possible object is {@link String } + * + */ + public String getFirst() + { + return first; + } + + /** + * Sets the value of the first property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setFirst(String value) + { + this.first = value; + } + + /** + * Gets the value of the last property. + * + * @return possible object is {@link String } + * + */ + public String getLast() + { + return last; + } + + /** + * Sets the value of the last property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setLast(String value) + { + this.last = value; + } + + /** + * Gets the value of the publisher property. + * + * @return possible object is {@link String } + * + */ + public String getPublisher() + { + return publisher; + } + + /** + * Sets the value of the publisher property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setPublisher(String value) + { + this.publisher = value; + } + + /** + * Gets the value of the city property. + * + * @return possible object is {@link String } + * + */ + public String getCity() + { + return city; + } + + /** + * Sets the value of the city property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setCity(String value) + { + this.city = value; + } + + /** + * Gets the value of the db property. + * + * @return possible object is {@link String } + * + */ + public String getDb() + { + return db; + } + + /** + * Sets the value of the db property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDb(String value) + { + this.db = value; + } + + /** + * Gets the value of the number property. + * + * @return possible object is {@link String } + * + */ + public String getNumber() + { + return number; + } + + /** + * Sets the value of the number property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setNumber(String value) + { + this.number = value; + } + + /** + * Gets the value of the institute property. + * + * @return possible object is {@link String } + * + */ + public String getInstitute() + { + return institute; + } + + /** + * Sets the value of the institute property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setInstitute(String value) + { + this.institute = value; + } + + /** + * Gets the value of the country property. + * + * @return possible object is {@link String } + * + */ + public String getCountry() + { + return country; + } + + /** + * Sets the value of the country property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setCountry(String value) + { + this.country = value; + } } diff --git a/src/jalview/xml/binding/uniprot/CofactorType.java b/src/jalview/xml/binding/uniprot/CofactorType.java index a0d1dfa..424bcff 100644 --- a/src/jalview/xml/binding/uniprot/CofactorType.java +++ b/src/jalview/xml/binding/uniprot/CofactorType.java @@ -5,7 +5,6 @@ // Generated on: 2019.04.05 at 08:01:44 AM BST // - package jalview.xml.binding.uniprot; import java.util.ArrayList; @@ -16,13 +15,15 @@ import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; - /** * Describes a cofactor. * - *

        Java class for cofactorType complex type. + *

        + * Java class for cofactorType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="cofactorType">
        @@ -41,94 +42,94 @@ import javax.xml.bind.annotation.XmlType;
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "cofactorType", propOrder = {
        -    "name",
        -    "dbReference"
        -})
        -public class CofactorType {
        +@XmlType(name = "cofactorType", propOrder = { "name", "dbReference" })
        +public class CofactorType
        +{
         
        -    @XmlElement(required = true)
        -    protected String name;
        -    @XmlElement(required = true)
        -    protected DbReferenceType dbReference;
        -    @XmlAttribute(name = "evidence")
        -    protected List evidence;
        +  @XmlElement(required = true)
        +  protected String name;
         
        -    /**
        -     * Gets the value of the name property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getName() {
        -        return name;
        -    }
        +  @XmlElement(required = true)
        +  protected DbReferenceType dbReference;
         
        -    /**
        -     * Sets the value of the name property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setName(String value) {
        -        this.name = value;
        -    }
        +  @XmlAttribute(name = "evidence")
        +  protected List evidence;
         
        -    /**
        -     * Gets the value of the dbReference property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link DbReferenceType }
        -     *     
        -     */
        -    public DbReferenceType getDbReference() {
        -        return dbReference;
        -    }
        +  /**
        +   * Gets the value of the name property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getName()
        +  {
        +    return name;
        +  }
         
        -    /**
        -     * Sets the value of the dbReference property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link DbReferenceType }
        -     *     
        -     */
        -    public void setDbReference(DbReferenceType value) {
        -        this.dbReference = value;
        -    }
        +  /**
        +   * Sets the value of the name property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setName(String value)
        +  {
        +    this.name = value;
        +  }
        +
        +  /**
        +   * Gets the value of the dbReference property.
        +   * 
        +   * @return possible object is {@link DbReferenceType }
        +   * 
        +   */
        +  public DbReferenceType getDbReference()
        +  {
        +    return dbReference;
        +  }
        +
        +  /**
        +   * Sets the value of the dbReference property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link DbReferenceType }
        +   * 
        +   */
        +  public void setDbReference(DbReferenceType value)
        +  {
        +    this.dbReference = value;
        +  }
         
        -    /**
        -     * Gets the value of the evidence property.
        -     * 
        -     * 

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the evidence property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getEvidence().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link Integer } - * - * - */ - public List getEvidence() { - if (evidence == null) { - evidence = new ArrayList(); - } - return this.evidence; + /** + * Gets the value of the evidence property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the evidence property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getEvidence().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link Integer } + * + * + */ + public List getEvidence() + { + if (evidence == null) + { + evidence = new ArrayList(); } + return this.evidence; + } } diff --git a/src/jalview/xml/binding/uniprot/CommentType.java b/src/jalview/xml/binding/uniprot/CommentType.java index 9cc5164..afd1da1 100644 --- a/src/jalview/xml/binding/uniprot/CommentType.java +++ b/src/jalview/xml/binding/uniprot/CommentType.java @@ -5,7 +5,6 @@ // Generated on: 2019.04.05 at 08:01:44 AM BST // - package jalview.xml.binding.uniprot; import java.util.ArrayList; @@ -17,14 +16,16 @@ import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; - /** - * Describes different types of general annotations. - * Equivalent to the flat file CC-line. + * Describes different types of general annotations. Equivalent to the flat file + * CC-line. * - *

        Java class for commentType complex type. + *

        + * Java class for commentType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="commentType">
        @@ -173,1619 +174,1673 @@ import javax.xml.bind.annotation.XmlType;
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "commentType", propOrder = {
        -    "molecule",
        -    "absorption",
        -    "kinetics",
        -    "phDependence",
        -    "redoxPotential",
        -    "temperatureDependence",
        -    "reaction",
        -    "physiologicalReaction",
        -    "cofactor",
        -    "subcellularLocation",
        -    "conflict",
        -    "link",
        -    "event",
        -    "isoform",
        -    "interactant",
        -    "organismsDiffer",
        -    "experiments",
        -    "disease",
        -    "location",
        -    "text"
        -})
        -public class CommentType {
        -
        -    protected MoleculeType molecule;
        -    protected CommentType.Absorption absorption;
        -    protected CommentType.Kinetics kinetics;
        -    protected CommentType.PhDependence phDependence;
        -    protected CommentType.RedoxPotential redoxPotential;
        -    protected CommentType.TemperatureDependence temperatureDependence;
        -    protected ReactionType reaction;
        -    protected List physiologicalReaction;
        -    protected List cofactor;
        -    protected List subcellularLocation;
        -    protected CommentType.Conflict conflict;
        -    protected List link;
        -    protected List event;
        -    protected List isoform;
        -    protected List interactant;
        -    @XmlElement(defaultValue = "false")
        -    protected Boolean organismsDiffer;
        -    protected Integer experiments;
        -    protected CommentType.Disease disease;
        -    protected List location;
        -    protected List text;
        -    @XmlAttribute(name = "type", required = true)
        -    protected String type;
        -    @XmlAttribute(name = "locationType")
        -    protected String locationType;
        -    @XmlAttribute(name = "name")
        -    protected String name;
        -    @XmlAttribute(name = "mass")
        -    protected Float mass;
        -    @XmlAttribute(name = "error")
        -    protected String error;
        -    @XmlAttribute(name = "method")
        -    protected String method;
        -    @XmlAttribute(name = "evidence")
        -    protected List evidence;
        +@XmlType(
        +  name = "commentType",
        +  propOrder =
        +  { "molecule", "absorption", "kinetics", "phDependence", "redoxPotential",
        +      "temperatureDependence", "reaction", "physiologicalReaction",
        +      "cofactor", "subcellularLocation", "conflict", "link", "event",
        +      "isoform", "interactant", "organismsDiffer", "experiments", "disease",
        +      "location", "text" })
        +public class CommentType
        +{
         
        -    /**
        -     * Gets the value of the molecule property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link MoleculeType }
        -     *     
        -     */
        -    public MoleculeType getMolecule() {
        -        return molecule;
        -    }
        +  protected MoleculeType molecule;
         
        -    /**
        -     * Sets the value of the molecule property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link MoleculeType }
        -     *     
        -     */
        -    public void setMolecule(MoleculeType value) {
        -        this.molecule = value;
        -    }
        +  protected CommentType.Absorption absorption;
         
        -    /**
        -     * Gets the value of the absorption property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link CommentType.Absorption }
        -     *     
        -     */
        -    public CommentType.Absorption getAbsorption() {
        -        return absorption;
        -    }
        +  protected CommentType.Kinetics kinetics;
         
        -    /**
        -     * Sets the value of the absorption property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link CommentType.Absorption }
        -     *     
        -     */
        -    public void setAbsorption(CommentType.Absorption value) {
        -        this.absorption = value;
        -    }
        +  protected CommentType.PhDependence phDependence;
         
        -    /**
        -     * Gets the value of the kinetics property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link CommentType.Kinetics }
        -     *     
        -     */
        -    public CommentType.Kinetics getKinetics() {
        -        return kinetics;
        -    }
        +  protected CommentType.RedoxPotential redoxPotential;
         
        -    /**
        -     * Sets the value of the kinetics property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link CommentType.Kinetics }
        -     *     
        -     */
        -    public void setKinetics(CommentType.Kinetics value) {
        -        this.kinetics = value;
        -    }
        +  protected CommentType.TemperatureDependence temperatureDependence;
         
        -    /**
        -     * Gets the value of the phDependence property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link CommentType.PhDependence }
        -     *     
        -     */
        -    public CommentType.PhDependence getPhDependence() {
        -        return phDependence;
        -    }
        +  protected ReactionType reaction;
         
        -    /**
        -     * Sets the value of the phDependence property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link CommentType.PhDependence }
        -     *     
        -     */
        -    public void setPhDependence(CommentType.PhDependence value) {
        -        this.phDependence = value;
        -    }
        +  protected List physiologicalReaction;
         
        -    /**
        -     * Gets the value of the redoxPotential property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link CommentType.RedoxPotential }
        -     *     
        -     */
        -    public CommentType.RedoxPotential getRedoxPotential() {
        -        return redoxPotential;
        -    }
        +  protected List cofactor;
         
        -    /**
        -     * Sets the value of the redoxPotential property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link CommentType.RedoxPotential }
        -     *     
        -     */
        -    public void setRedoxPotential(CommentType.RedoxPotential value) {
        -        this.redoxPotential = value;
        -    }
        +  protected List subcellularLocation;
         
        -    /**
        -     * Gets the value of the temperatureDependence property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link CommentType.TemperatureDependence }
        -     *     
        -     */
        -    public CommentType.TemperatureDependence getTemperatureDependence() {
        -        return temperatureDependence;
        -    }
        +  protected CommentType.Conflict conflict;
         
        -    /**
        -     * Sets the value of the temperatureDependence property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link CommentType.TemperatureDependence }
        -     *     
        -     */
        -    public void setTemperatureDependence(CommentType.TemperatureDependence value) {
        -        this.temperatureDependence = value;
        +  protected List link;
        +
        +  protected List event;
        +
        +  protected List isoform;
        +
        +  protected List interactant;
        +
        +  @XmlElement(defaultValue = "false")
        +  protected Boolean organismsDiffer;
        +
        +  protected Integer experiments;
        +
        +  protected CommentType.Disease disease;
        +
        +  protected List location;
        +
        +  protected List text;
        +
        +  @XmlAttribute(name = "type", required = true)
        +  protected String type;
        +
        +  @XmlAttribute(name = "locationType")
        +  protected String locationType;
        +
        +  @XmlAttribute(name = "name")
        +  protected String name;
        +
        +  @XmlAttribute(name = "mass")
        +  protected Float mass;
        +
        +  @XmlAttribute(name = "error")
        +  protected String error;
        +
        +  @XmlAttribute(name = "method")
        +  protected String method;
        +
        +  @XmlAttribute(name = "evidence")
        +  protected List evidence;
        +
        +  /**
        +   * Gets the value of the molecule property.
        +   * 
        +   * @return possible object is {@link MoleculeType }
        +   * 
        +   */
        +  public MoleculeType getMolecule()
        +  {
        +    return molecule;
        +  }
        +
        +  /**
        +   * Sets the value of the molecule property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link MoleculeType }
        +   * 
        +   */
        +  public void setMolecule(MoleculeType value)
        +  {
        +    this.molecule = value;
        +  }
        +
        +  /**
        +   * Gets the value of the absorption property.
        +   * 
        +   * @return possible object is {@link CommentType.Absorption }
        +   * 
        +   */
        +  public CommentType.Absorption getAbsorption()
        +  {
        +    return absorption;
        +  }
        +
        +  /**
        +   * Sets the value of the absorption property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link CommentType.Absorption }
        +   * 
        +   */
        +  public void setAbsorption(CommentType.Absorption value)
        +  {
        +    this.absorption = value;
        +  }
        +
        +  /**
        +   * Gets the value of the kinetics property.
        +   * 
        +   * @return possible object is {@link CommentType.Kinetics }
        +   * 
        +   */
        +  public CommentType.Kinetics getKinetics()
        +  {
        +    return kinetics;
        +  }
        +
        +  /**
        +   * Sets the value of the kinetics property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link CommentType.Kinetics }
        +   * 
        +   */
        +  public void setKinetics(CommentType.Kinetics value)
        +  {
        +    this.kinetics = value;
        +  }
        +
        +  /**
        +   * Gets the value of the phDependence property.
        +   * 
        +   * @return possible object is {@link CommentType.PhDependence }
        +   * 
        +   */
        +  public CommentType.PhDependence getPhDependence()
        +  {
        +    return phDependence;
        +  }
        +
        +  /**
        +   * Sets the value of the phDependence property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link CommentType.PhDependence }
        +   * 
        +   */
        +  public void setPhDependence(CommentType.PhDependence value)
        +  {
        +    this.phDependence = value;
        +  }
        +
        +  /**
        +   * Gets the value of the redoxPotential property.
        +   * 
        +   * @return possible object is {@link CommentType.RedoxPotential }
        +   * 
        +   */
        +  public CommentType.RedoxPotential getRedoxPotential()
        +  {
        +    return redoxPotential;
        +  }
        +
        +  /**
        +   * Sets the value of the redoxPotential property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link CommentType.RedoxPotential }
        +   * 
        +   */
        +  public void setRedoxPotential(CommentType.RedoxPotential value)
        +  {
        +    this.redoxPotential = value;
        +  }
        +
        +  /**
        +   * Gets the value of the temperatureDependence property.
        +   * 
        +   * @return possible object is {@link CommentType.TemperatureDependence }
        +   * 
        +   */
        +  public CommentType.TemperatureDependence getTemperatureDependence()
        +  {
        +    return temperatureDependence;
        +  }
        +
        +  /**
        +   * Sets the value of the temperatureDependence property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link CommentType.TemperatureDependence }
        +   * 
        +   */
        +  public void setTemperatureDependence(
        +          CommentType.TemperatureDependence value)
        +  {
        +    this.temperatureDependence = value;
        +  }
        +
        +  /**
        +   * Gets the value of the reaction property.
        +   * 
        +   * @return possible object is {@link ReactionType }
        +   * 
        +   */
        +  public ReactionType getReaction()
        +  {
        +    return reaction;
        +  }
        +
        +  /**
        +   * Sets the value of the reaction property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link ReactionType }
        +   * 
        +   */
        +  public void setReaction(ReactionType value)
        +  {
        +    this.reaction = value;
        +  }
        +
        +  /**
        +   * Gets the value of the physiologicalReaction property.
        +   * 
        +   * 

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the physiologicalReaction property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getPhysiologicalReaction().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link PhysiologicalReactionType } + * + * + */ + public List getPhysiologicalReaction() + { + if (physiologicalReaction == null) + { + physiologicalReaction = new ArrayList(); + } + return this.physiologicalReaction; + } + + /** + * Gets the value of the cofactor property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the cofactor property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getCofactor().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link CofactorType } + * + * + */ + public List getCofactor() + { + if (cofactor == null) + { + cofactor = new ArrayList(); + } + return this.cofactor; + } + + /** + * Gets the value of the subcellularLocation property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the subcellularLocation property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getSubcellularLocation().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link SubcellularLocationType } + * + * + */ + public List getSubcellularLocation() + { + if (subcellularLocation == null) + { + subcellularLocation = new ArrayList(); + } + return this.subcellularLocation; + } + + /** + * Gets the value of the conflict property. + * + * @return possible object is {@link CommentType.Conflict } + * + */ + public CommentType.Conflict getConflict() + { + return conflict; + } + + /** + * Sets the value of the conflict property. + * + * @param value + * allowed object is {@link CommentType.Conflict } + * + */ + public void setConflict(CommentType.Conflict value) + { + this.conflict = value; + } + + /** + * Gets the value of the link property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the link property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getLink().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link CommentType.Link } + * + * + */ + public List getLink() + { + if (link == null) + { + link = new ArrayList(); } + return this.link; + } + + /** + * Gets the value of the event property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the event property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getEvent().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link EventType } + * + * + */ + public List getEvent() + { + if (event == null) + { + event = new ArrayList(); + } + return this.event; + } + + /** + * Gets the value of the isoform property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the isoform property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getIsoform().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link IsoformType + * } + * + * + */ + public List getIsoform() + { + if (isoform == null) + { + isoform = new ArrayList(); + } + return this.isoform; + } + + /** + * Gets the value of the interactant property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the interactant property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getInteractant().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link InteractantType } + * + * + */ + public List getInteractant() + { + if (interactant == null) + { + interactant = new ArrayList(); + } + return this.interactant; + } + + /** + * Gets the value of the organismsDiffer property. + * + * @return possible object is {@link Boolean } + * + */ + public Boolean isOrganismsDiffer() + { + return organismsDiffer; + } + + /** + * Sets the value of the organismsDiffer property. + * + * @param value + * allowed object is {@link Boolean } + * + */ + public void setOrganismsDiffer(Boolean value) + { + this.organismsDiffer = value; + } + + /** + * Gets the value of the experiments property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getExperiments() + { + return experiments; + } + + /** + * Sets the value of the experiments property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setExperiments(Integer value) + { + this.experiments = value; + } + + /** + * Gets the value of the disease property. + * + * @return possible object is {@link CommentType.Disease } + * + */ + public CommentType.Disease getDisease() + { + return disease; + } + + /** + * Sets the value of the disease property. + * + * @param value + * allowed object is {@link CommentType.Disease } + * + */ + public void setDisease(CommentType.Disease value) + { + this.disease = value; + } + + /** + * Gets the value of the location property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the location property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getLocation().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link LocationType } + * + * + */ + public List getLocation() + { + if (location == null) + { + location = new ArrayList(); + } + return this.location; + } + + /** + * Gets the value of the text property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the text property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getText().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * + */ + public List getText() + { + if (text == null) + { + text = new ArrayList(); + } + return this.text; + } + + /** + * Gets the value of the type property. + * + * @return possible object is {@link String } + * + */ + public String getType() + { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setType(String value) + { + this.type = value; + } + + /** + * Gets the value of the locationType property. + * + * @return possible object is {@link String } + * + */ + public String getLocationType() + { + return locationType; + } + + /** + * Sets the value of the locationType property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setLocationType(String value) + { + this.locationType = value; + } + + /** + * Gets the value of the name property. + * + * @return possible object is {@link String } + * + */ + public String getName() + { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setName(String value) + { + this.name = value; + } + + /** + * Gets the value of the mass property. + * + * @return possible object is {@link Float } + * + */ + public Float getMass() + { + return mass; + } + + /** + * Sets the value of the mass property. + * + * @param value + * allowed object is {@link Float } + * + */ + public void setMass(Float value) + { + this.mass = value; + } + + /** + * Gets the value of the error property. + * + * @return possible object is {@link String } + * + */ + public String getError() + { + return error; + } + + /** + * Sets the value of the error property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setError(String value) + { + this.error = value; + } + + /** + * Gets the value of the method property. + * + * @return possible object is {@link String } + * + */ + public String getMethod() + { + return method; + } + + /** + * Sets the value of the method property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setMethod(String value) + { + this.method = value; + } + + /** + * Gets the value of the evidence property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the evidence property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getEvidence().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link Integer } + * + * + */ + public List getEvidence() + { + if (evidence == null) + { + evidence = new ArrayList(); + } + return this.evidence; + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <complexContent>
        +   *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *       <sequence>
        +   *         <element name="max" type="{http://uniprot.org/uniprot}evidencedStringType" minOccurs="0"/>
        +   *         <element name="text" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
        +   *       </sequence>
        +   *     </restriction>
        +   *   </complexContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "max", "text" }) + public static class Absorption + { + + protected EvidencedStringType max; + + protected List text; /** - * Gets the value of the reaction property. + * Gets the value of the max property. + * + * @return possible object is {@link EvidencedStringType } * - * @return - * possible object is - * {@link ReactionType } - * */ - public ReactionType getReaction() { - return reaction; + public EvidencedStringType getMax() + { + return max; } /** - * Sets the value of the reaction property. + * Sets the value of the max property. * * @param value - * allowed object is - * {@link ReactionType } - * + * allowed object is {@link EvidencedStringType } + * */ - public void setReaction(ReactionType value) { - this.reaction = value; + public void setMax(EvidencedStringType value) + { + this.max = value; } /** - * Gets the value of the physiologicalReaction property. + * Gets the value of the text property. * *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the physiologicalReaction property. + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the text property. * *

        * For example, to add a new item, do as follows: + * *

        -     *    getPhysiologicalReaction().add(newItem);
        +     * getText().add(newItem);
              * 
        * * *

        * Objects of the following type(s) are allowed in the list - * {@link PhysiologicalReactionType } + * {@link EvidencedStringType } * * */ - public List getPhysiologicalReaction() { - if (physiologicalReaction == null) { - physiologicalReaction = new ArrayList(); - } - return this.physiologicalReaction; + public List getText() + { + if (text == null) + { + text = new ArrayList(); + } + return this.text; } + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <complexContent>
        +   *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *       <sequence>
        +   *         <element name="sequence" minOccurs="0">
        +   *           <complexType>
        +   *             <complexContent>
        +   *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *                 <attribute name="resource" use="required">
        +   *                   <simpleType>
        +   *                     <restriction base="{http://www.w3.org/2001/XMLSchema}string">
        +   *                       <enumeration value="EMBL-CDS"/>
        +   *                       <enumeration value="EMBL"/>
        +   *                     </restriction>
        +   *                   </simpleType>
        +   *                 </attribute>
        +   *                 <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *                 <attribute name="version" type="{http://www.w3.org/2001/XMLSchema}int" />
        +   *               </restriction>
        +   *             </complexContent>
        +   *           </complexType>
        +   *         </element>
        +   *       </sequence>
        +   *       <attribute name="type" use="required">
        +   *         <simpleType>
        +   *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
        +   *             <enumeration value="frameshift"/>
        +   *             <enumeration value="erroneous initiation"/>
        +   *             <enumeration value="erroneous termination"/>
        +   *             <enumeration value="erroneous gene model prediction"/>
        +   *             <enumeration value="erroneous translation"/>
        +   *             <enumeration value="miscellaneous discrepancy"/>
        +   *           </restriction>
        +   *         </simpleType>
        +   *       </attribute>
        +   *       <attribute name="ref" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *     </restriction>
        +   *   </complexContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "sequence" }) + public static class Conflict + { + + protected CommentType.Conflict.Sequence sequence; + + @XmlAttribute(name = "type", required = true) + protected String type; + + @XmlAttribute(name = "ref") + protected String ref; + /** - * Gets the value of the cofactor property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the cofactor property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getCofactor().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link CofactorType } + * Gets the value of the sequence property. * + * @return possible object is {@link CommentType.Conflict.Sequence } * */ - public List getCofactor() { - if (cofactor == null) { - cofactor = new ArrayList(); - } - return this.cofactor; + public CommentType.Conflict.Sequence getSequence() + { + return sequence; } /** - * Gets the value of the subcellularLocation property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the subcellularLocation property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getSubcellularLocation().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link SubcellularLocationType } + * Sets the value of the sequence property. * + * @param value + * allowed object is {@link CommentType.Conflict.Sequence } * */ - public List getSubcellularLocation() { - if (subcellularLocation == null) { - subcellularLocation = new ArrayList(); - } - return this.subcellularLocation; + public void setSequence(CommentType.Conflict.Sequence value) + { + this.sequence = value; } /** - * Gets the value of the conflict property. + * Gets the value of the type property. * - * @return - * possible object is - * {@link CommentType.Conflict } - * - */ - public CommentType.Conflict getConflict() { - return conflict; - } - - /** - * Sets the value of the conflict property. + * @return possible object is {@link String } * - * @param value - * allowed object is - * {@link CommentType.Conflict } - * */ - public void setConflict(CommentType.Conflict value) { - this.conflict = value; + public String getType() + { + return type; } /** - * Gets the value of the link property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the link property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getLink().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link CommentType.Link } + * Sets the value of the type property. * + * @param value + * allowed object is {@link String } * */ - public List getLink() { - if (link == null) { - link = new ArrayList(); - } - return this.link; + public void setType(String value) + { + this.type = value; } /** - * Gets the value of the event property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the event property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getEvent().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link EventType } + * Gets the value of the ref property. * + * @return possible object is {@link String } * */ - public List getEvent() { - if (event == null) { - event = new ArrayList(); - } - return this.event; + public String getRef() + { + return ref; } /** - * Gets the value of the isoform property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the isoform property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getIsoform().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link IsoformType } + * Sets the value of the ref property. * + * @param value + * allowed object is {@link String } * */ - public List getIsoform() { - if (isoform == null) { - isoform = new ArrayList(); - } - return this.isoform; + public void setRef(String value) + { + this.ref = value; } /** - * Gets the value of the interactant property. - * *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the interactant property. + * Java class for anonymous complex type. * *

        - * For example, to add a new item, do as follows: + * The following schema fragment specifies the expected content contained + * within this class. + * *

        -     *    getInteractant().add(newItem);
        +     * <complexType>
        +     *   <complexContent>
        +     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +     *       <attribute name="resource" use="required">
        +     *         <simpleType>
        +     *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
        +     *             <enumeration value="EMBL-CDS"/>
        +     *             <enumeration value="EMBL"/>
        +     *           </restriction>
        +     *         </simpleType>
        +     *       </attribute>
        +     *       <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        +     *       <attribute name="version" type="{http://www.w3.org/2001/XMLSchema}int" />
        +     *     </restriction>
        +     *   </complexContent>
        +     * </complexType>
              * 
        * * - *

        - * Objects of the following type(s) are allowed in the list - * {@link InteractantType } - * - * */ - public List getInteractant() { - if (interactant == null) { - interactant = new ArrayList(); - } - return this.interactant; - } + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class Sequence + { + + @XmlAttribute(name = "resource", required = true) + protected String resource; + + @XmlAttribute(name = "id", required = true) + protected String id; + + @XmlAttribute(name = "version") + protected Integer version; + + /** + * Gets the value of the resource property. + * + * @return possible object is {@link String } + * + */ + public String getResource() + { + return resource; + } + + /** + * Sets the value of the resource property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setResource(String value) + { + this.resource = value; + } + + /** + * Gets the value of the id property. + * + * @return possible object is {@link String } + * + */ + public String getId() + { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setId(String value) + { + this.id = value; + } + + /** + * Gets the value of the version property. + * + * @return possible object is {@link Integer } + * + */ + public Integer getVersion() + { + return version; + } + + /** + * Sets the value of the version property. + * + * @param value + * allowed object is {@link Integer } + * + */ + public void setVersion(Integer value) + { + this.version = value; + } - /** - * Gets the value of the organismsDiffer property. - * - * @return - * possible object is - * {@link Boolean } - * - */ - public Boolean isOrganismsDiffer() { - return organismsDiffer; } - /** - * Sets the value of the organismsDiffer property. - * - * @param value - * allowed object is - * {@link Boolean } - * - */ - public void setOrganismsDiffer(Boolean value) { - this.organismsDiffer = value; - } + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <complexContent>
        +   *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *       <sequence>
        +   *         <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
        +   *         <element name="acronym" type="{http://www.w3.org/2001/XMLSchema}string"/>
        +   *         <element name="description" type="{http://www.w3.org/2001/XMLSchema}string"/>
        +   *         <element name="dbReference" type="{http://uniprot.org/uniprot}dbReferenceType"/>
        +   *       </sequence>
        +   *       <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *     </restriction>
        +   *   </complexContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType( + name = "", + propOrder = + { "name", "acronym", "description", "dbReference" }) + public static class Disease + { + + @XmlElement(required = true) + protected String name; - /** - * Gets the value of the experiments property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getExperiments() { - return experiments; - } + @XmlElement(required = true) + protected String acronym; - /** - * Sets the value of the experiments property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setExperiments(Integer value) { - this.experiments = value; - } + @XmlElement(required = true) + protected String description; - /** - * Gets the value of the disease property. - * - * @return - * possible object is - * {@link CommentType.Disease } - * - */ - public CommentType.Disease getDisease() { - return disease; - } + @XmlElement(required = true) + protected DbReferenceType dbReference; - /** - * Sets the value of the disease property. - * - * @param value - * allowed object is - * {@link CommentType.Disease } - * - */ - public void setDisease(CommentType.Disease value) { - this.disease = value; - } + @XmlAttribute(name = "id", required = true) + protected String id; /** - * Gets the value of the location property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the location property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getLocation().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link LocationType } + * Gets the value of the name property. * + * @return possible object is {@link String } * */ - public List getLocation() { - if (location == null) { - location = new ArrayList(); - } - return this.location; + public String getName() + { + return name; } /** - * Gets the value of the text property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the text property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getText().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link EvidencedStringType } + * Sets the value of the name property. * + * @param value + * allowed object is {@link String } * */ - public List getText() { - if (text == null) { - text = new ArrayList(); - } - return this.text; + public void setName(String value) + { + this.name = value; } /** - * Gets the value of the type property. + * Gets the value of the acronym property. + * + * @return possible object is {@link String } * - * @return - * possible object is - * {@link String } - * */ - public String getType() { - return type; + public String getAcronym() + { + return acronym; } /** - * Sets the value of the type property. + * Sets the value of the acronym property. * * @param value - * allowed object is - * {@link String } - * - */ - public void setType(String value) { - this.type = value; - } - - /** - * Gets the value of the locationType property. + * allowed object is {@link String } * - * @return - * possible object is - * {@link String } - * */ - public String getLocationType() { - return locationType; + public void setAcronym(String value) + { + this.acronym = value; } /** - * Sets the value of the locationType property. + * Gets the value of the description property. * - * @param value - * allowed object is - * {@link String } - * - */ - public void setLocationType(String value) { - this.locationType = value; - } - - /** - * Gets the value of the name property. + * @return possible object is {@link String } * - * @return - * possible object is - * {@link String } - * */ - public String getName() { - return name; + public String getDescription() + { + return description; } /** - * Sets the value of the name property. + * Sets the value of the description property. * * @param value - * allowed object is - * {@link String } - * - */ - public void setName(String value) { - this.name = value; - } - - /** - * Gets the value of the mass property. + * allowed object is {@link String } * - * @return - * possible object is - * {@link Float } - * */ - public Float getMass() { - return mass; + public void setDescription(String value) + { + this.description = value; } /** - * Sets the value of the mass property. + * Gets the value of the dbReference property. * - * @param value - * allowed object is - * {@link Float } - * - */ - public void setMass(Float value) { - this.mass = value; - } - - /** - * Gets the value of the error property. + * @return possible object is {@link DbReferenceType } * - * @return - * possible object is - * {@link String } - * */ - public String getError() { - return error; + public DbReferenceType getDbReference() + { + return dbReference; } /** - * Sets the value of the error property. + * Sets the value of the dbReference property. * * @param value - * allowed object is - * {@link String } - * + * allowed object is {@link DbReferenceType } + * */ - public void setError(String value) { - this.error = value; + public void setDbReference(DbReferenceType value) + { + this.dbReference = value; } /** - * Gets the value of the method property. + * Gets the value of the id property. + * + * @return possible object is {@link String } * - * @return - * possible object is - * {@link String } - * */ - public String getMethod() { - return method; + public String getId() + { + return id; } /** - * Sets the value of the method property. + * Sets the value of the id property. * * @param value - * allowed object is - * {@link String } - * + * allowed object is {@link String } + * */ - public void setMethod(String value) { - this.method = value; + public void setId(String value) + { + this.id = value; } + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <complexContent>
        +   *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *       <sequence>
        +   *         <element name="KM" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
        +   *         <element name="Vmax" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
        +   *         <element name="text" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
        +   *       </sequence>
        +   *     </restriction>
        +   *   </complexContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "km", "vmax", "text" }) + public static class Kinetics + { + + @XmlElement(name = "KM") + protected List km; + + @XmlElement(name = "Vmax") + protected List vmax; + + protected List text; + /** - * Gets the value of the evidence property. + * Gets the value of the km property. * *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the evidence property. + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the km property. * *

        * For example, to add a new item, do as follows: + * *

        -     *    getEvidence().add(newItem);
        +     * getKM().add(newItem);
              * 
        * * *

        * Objects of the following type(s) are allowed in the list - * {@link Integer } + * {@link EvidencedStringType } * * */ - public List getEvidence() { - if (evidence == null) { - evidence = new ArrayList(); - } - return this.evidence; + public List getKM() + { + if (km == null) + { + km = new ArrayList(); + } + return this.km; } - /** - *

        Java class for anonymous complex type. + * Gets the value of the vmax property. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the vmax property. + * + *

        + * For example, to add a new item, do as follows: * *

        -     * <complexType>
        -     *   <complexContent>
        -     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *       <sequence>
        -     *         <element name="max" type="{http://uniprot.org/uniprot}evidencedStringType" minOccurs="0"/>
        -     *         <element name="text" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
        -     *       </sequence>
        -     *     </restriction>
        -     *   </complexContent>
        -     * </complexType>
        +     * getVmax().add(newItem);
              * 
        * * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "max", - "text" - }) - public static class Absorption { - - protected EvidencedStringType max; - protected List text; - - /** - * Gets the value of the max property. - * - * @return - * possible object is - * {@link EvidencedStringType } - * - */ - public EvidencedStringType getMax() { - return max; - } - - /** - * Sets the value of the max property. - * - * @param value - * allowed object is - * {@link EvidencedStringType } - * - */ - public void setMax(EvidencedStringType value) { - this.max = value; - } - - /** - * Gets the value of the text property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the text property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getText().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link EvidencedStringType } - * - * - */ - public List getText() { - if (text == null) { - text = new ArrayList(); - } - return this.text; - } - - } - - - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -     * <complexType>
        -     *   <complexContent>
        -     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *       <sequence>
        -     *         <element name="sequence" minOccurs="0">
        -     *           <complexType>
        -     *             <complexContent>
        -     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *                 <attribute name="resource" use="required">
        -     *                   <simpleType>
        -     *                     <restriction base="{http://www.w3.org/2001/XMLSchema}string">
        -     *                       <enumeration value="EMBL-CDS"/>
        -     *                       <enumeration value="EMBL"/>
        -     *                     </restriction>
        -     *                   </simpleType>
        -     *                 </attribute>
        -     *                 <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *                 <attribute name="version" type="{http://www.w3.org/2001/XMLSchema}int" />
        -     *               </restriction>
        -     *             </complexContent>
        -     *           </complexType>
        -     *         </element>
        -     *       </sequence>
        -     *       <attribute name="type" use="required">
        -     *         <simpleType>
        -     *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
        -     *             <enumeration value="frameshift"/>
        -     *             <enumeration value="erroneous initiation"/>
        -     *             <enumeration value="erroneous termination"/>
        -     *             <enumeration value="erroneous gene model prediction"/>
        -     *             <enumeration value="erroneous translation"/>
        -     *             <enumeration value="miscellaneous discrepancy"/>
        -     *           </restriction>
        -     *         </simpleType>
        -     *       </attribute>
        -     *       <attribute name="ref" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *     </restriction>
        -     *   </complexContent>
        -     * </complexType>
        -     * 
        + *

        + * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } * * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "sequence" - }) - public static class Conflict { - - protected CommentType.Conflict.Sequence sequence; - @XmlAttribute(name = "type", required = true) - protected String type; - @XmlAttribute(name = "ref") - protected String ref; - - /** - * Gets the value of the sequence property. - * - * @return - * possible object is - * {@link CommentType.Conflict.Sequence } - * - */ - public CommentType.Conflict.Sequence getSequence() { - return sequence; - } - - /** - * Sets the value of the sequence property. - * - * @param value - * allowed object is - * {@link CommentType.Conflict.Sequence } - * - */ - public void setSequence(CommentType.Conflict.Sequence value) { - this.sequence = value; - } - - /** - * Gets the value of the type property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getType() { - return type; - } - - /** - * Sets the value of the type property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setType(String value) { - this.type = value; - } - - /** - * Gets the value of the ref property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getRef() { - return ref; - } - - /** - * Sets the value of the ref property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setRef(String value) { - this.ref = value; - } - - - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -         * <complexType>
        -         *   <complexContent>
        -         *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -         *       <attribute name="resource" use="required">
        -         *         <simpleType>
        -         *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
        -         *             <enumeration value="EMBL-CDS"/>
        -         *             <enumeration value="EMBL"/>
        -         *           </restriction>
        -         *         </simpleType>
        -         *       </attribute>
        -         *       <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        -         *       <attribute name="version" type="{http://www.w3.org/2001/XMLSchema}int" />
        -         *     </restriction>
        -         *   </complexContent>
        -         * </complexType>
        -         * 
        - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class Sequence { - - @XmlAttribute(name = "resource", required = true) - protected String resource; - @XmlAttribute(name = "id", required = true) - protected String id; - @XmlAttribute(name = "version") - protected Integer version; - - /** - * Gets the value of the resource property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getResource() { - return resource; - } - - /** - * Sets the value of the resource property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setResource(String value) { - this.resource = value; - } - - /** - * Gets the value of the id property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getId() { - return id; - } - - /** - * Sets the value of the id property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setId(String value) { - this.id = value; - } - - /** - * Gets the value of the version property. - * - * @return - * possible object is - * {@link Integer } - * - */ - public Integer getVersion() { - return version; - } - - /** - * Sets the value of the version property. - * - * @param value - * allowed object is - * {@link Integer } - * - */ - public void setVersion(Integer value) { - this.version = value; - } - - } - + public List getVmax() + { + if (vmax == null) + { + vmax = new ArrayList(); + } + return this.vmax; } - /** - *

        Java class for anonymous complex type. + * Gets the value of the text property. + * + *

        + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the text property. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * For example, to add a new item, do as follows: * *

        -     * <complexType>
        -     *   <complexContent>
        -     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *       <sequence>
        -     *         <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
        -     *         <element name="acronym" type="{http://www.w3.org/2001/XMLSchema}string"/>
        -     *         <element name="description" type="{http://www.w3.org/2001/XMLSchema}string"/>
        -     *         <element name="dbReference" type="{http://uniprot.org/uniprot}dbReferenceType"/>
        -     *       </sequence>
        -     *       <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *     </restriction>
        -     *   </complexContent>
        -     * </complexType>
        +     * getText().add(newItem);
              * 
        * * + *

        + * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "name", - "acronym", - "description", - "dbReference" - }) - public static class Disease { - - @XmlElement(required = true) - protected String name; - @XmlElement(required = true) - protected String acronym; - @XmlElement(required = true) - protected String description; - @XmlElement(required = true) - protected DbReferenceType dbReference; - @XmlAttribute(name = "id", required = true) - protected String id; - - /** - * Gets the value of the name property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getName() { - return name; - } - - /** - * Sets the value of the name property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setName(String value) { - this.name = value; - } - - /** - * Gets the value of the acronym property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getAcronym() { - return acronym; - } - - /** - * Sets the value of the acronym property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setAcronym(String value) { - this.acronym = value; - } - - /** - * Gets the value of the description property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDescription() { - return description; - } - - /** - * Sets the value of the description property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDescription(String value) { - this.description = value; - } - - /** - * Gets the value of the dbReference property. - * - * @return - * possible object is - * {@link DbReferenceType } - * - */ - public DbReferenceType getDbReference() { - return dbReference; - } - - /** - * Sets the value of the dbReference property. - * - * @param value - * allowed object is - * {@link DbReferenceType } - * - */ - public void setDbReference(DbReferenceType value) { - this.dbReference = value; - } - - /** - * Gets the value of the id property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getId() { - return id; - } - - /** - * Sets the value of the id property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setId(String value) { - this.id = value; - } - + public List getText() + { + if (text == null) + { + text = new ArrayList(); + } + return this.text; } + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <complexContent>
        +   *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *       <attribute name="uri" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
        +   *     </restriction>
        +   *   </complexContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class Link + { + + @XmlAttribute(name = "uri", required = true) + @XmlSchemaType(name = "anyURI") + protected String uri; /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -     * <complexType>
        -     *   <complexContent>
        -     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *       <sequence>
        -     *         <element name="KM" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
        -     *         <element name="Vmax" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
        -     *         <element name="text" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
        -     *       </sequence>
        -     *     </restriction>
        -     *   </complexContent>
        -     * </complexType>
        -     * 
        + * Gets the value of the uri property. * + * @return possible object is {@link String } * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "km", - "vmax", - "text" - }) - public static class Kinetics { - - @XmlElement(name = "KM") - protected List km; - @XmlElement(name = "Vmax") - protected List vmax; - protected List text; - - /** - * Gets the value of the km property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the km property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getKM().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link EvidencedStringType } - * - * - */ - public List getKM() { - if (km == null) { - km = new ArrayList(); - } - return this.km; - } - - /** - * Gets the value of the vmax property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the vmax property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getVmax().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link EvidencedStringType } - * - * - */ - public List getVmax() { - if (vmax == null) { - vmax = new ArrayList(); - } - return this.vmax; - } - - /** - * Gets the value of the text property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the text property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getText().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link EvidencedStringType } - * - * - */ - public List getText() { - if (text == null) { - text = new ArrayList(); - } - return this.text; - } - + public String getUri() + { + return uri; } - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -     * <complexType>
        -     *   <complexContent>
        -     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *       <attribute name="uri" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
        -     *     </restriction>
        -     *   </complexContent>
        -     * </complexType>
        -     * 
        + * Sets the value of the uri property. * + * @param value + * allowed object is {@link String } * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class Link { - - @XmlAttribute(name = "uri", required = true) - @XmlSchemaType(name = "anyURI") - protected String uri; - - /** - * Gets the value of the uri property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getUri() { - return uri; - } - - /** - * Sets the value of the uri property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setUri(String value) { - this.uri = value; - } - + public void setUri(String value) + { + this.uri = value; } + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <complexContent>
        +   *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *       <sequence>
        +   *         <element name="text" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded"/>
        +   *       </sequence>
        +   *     </restriction>
        +   *   </complexContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "text" }) + public static class PhDependence + { + + @XmlElement(required = true) + protected List text; /** - *

        Java class for anonymous complex type. + * Gets the value of the text property. + * + *

        + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the text property. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * For example, to add a new item, do as follows: * *

        -     * <complexType>
        -     *   <complexContent>
        -     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *       <sequence>
        -     *         <element name="text" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded"/>
        -     *       </sequence>
        -     *     </restriction>
        -     *   </complexContent>
        -     * </complexType>
        +     * getText().add(newItem);
              * 
        * * + *

        + * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "text" - }) - public static class PhDependence { - - @XmlElement(required = true) - protected List text; - - /** - * Gets the value of the text property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the text property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getText().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link EvidencedStringType } - * - * - */ - public List getText() { - if (text == null) { - text = new ArrayList(); - } - return this.text; - } - + public List getText() + { + if (text == null) + { + text = new ArrayList(); + } + return this.text; } + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <complexContent>
        +   *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *       <sequence>
        +   *         <element name="text" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded"/>
        +   *       </sequence>
        +   *     </restriction>
        +   *   </complexContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "text" }) + public static class RedoxPotential + { + + @XmlElement(required = true) + protected List text; /** - *

        Java class for anonymous complex type. + * Gets the value of the text property. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the text property. + * + *

        + * For example, to add a new item, do as follows: * *

        -     * <complexType>
        -     *   <complexContent>
        -     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *       <sequence>
        -     *         <element name="text" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded"/>
        -     *       </sequence>
        -     *     </restriction>
        -     *   </complexContent>
        -     * </complexType>
        +     * getText().add(newItem);
              * 
        * * + *

        + * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "text" - }) - public static class RedoxPotential { - - @XmlElement(required = true) - protected List text; - - /** - * Gets the value of the text property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the text property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getText().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link EvidencedStringType } - * - * - */ - public List getText() { - if (text == null) { - text = new ArrayList(); - } - return this.text; - } - + public List getText() + { + if (text == null) + { + text = new ArrayList(); + } + return this.text; } + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <complexContent>
        +   *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *       <sequence>
        +   *         <element name="text" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded"/>
        +   *       </sequence>
        +   *     </restriction>
        +   *   </complexContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "text" }) + public static class TemperatureDependence + { + + @XmlElement(required = true) + protected List text; /** - *

        Java class for anonymous complex type. + * Gets the value of the text property. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the text property. + * + *

        + * For example, to add a new item, do as follows: * *

        -     * <complexType>
        -     *   <complexContent>
        -     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *       <sequence>
        -     *         <element name="text" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded"/>
        -     *       </sequence>
        -     *     </restriction>
        -     *   </complexContent>
        -     * </complexType>
        +     * getText().add(newItem);
              * 
        * * + *

        + * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "text" - }) - public static class TemperatureDependence { - - @XmlElement(required = true) - protected List text; - - /** - * Gets the value of the text property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the text property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getText().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link EvidencedStringType } - * - * - */ - public List getText() { - if (text == null) { - text = new ArrayList(); - } - return this.text; - } - + public List getText() + { + if (text == null) + { + text = new ArrayList(); + } + return this.text; } + } + } diff --git a/src/jalview/xml/binding/uniprot/ConsortiumType.java b/src/jalview/xml/binding/uniprot/ConsortiumType.java index b2c4fdd..1b98b9b 100644 --- a/src/jalview/xml/binding/uniprot/ConsortiumType.java +++ b/src/jalview/xml/binding/uniprot/ConsortiumType.java @@ -5,7 +5,6 @@ // Generated on: 2019.04.05 at 08:01:44 AM BST // - package jalview.xml.binding.uniprot; import javax.xml.bind.annotation.XmlAccessType; @@ -13,14 +12,16 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlType; - /** - * Describes the authors of a citation when these are represented by a consortium. - * Equivalent to the flat file RG-line. + * Describes the authors of a citation when these are represented by a + * consortium. Equivalent to the flat file RG-line. * - *

        Java class for consortiumType complex type. + *

        + * Java class for consortiumType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="consortiumType">
        @@ -36,33 +37,33 @@ import javax.xml.bind.annotation.XmlType;
          */
         @XmlAccessorType(XmlAccessType.FIELD)
         @XmlType(name = "consortiumType")
        -public class ConsortiumType {
        +public class ConsortiumType
        +{
         
        -    @XmlAttribute(name = "name", required = true)
        -    protected String name;
        +  @XmlAttribute(name = "name", required = true)
        +  protected String name;
         
        -    /**
        -     * Gets the value of the name property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getName() {
        -        return name;
        -    }
        +  /**
        +   * Gets the value of the name property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getName()
        +  {
        +    return name;
        +  }
         
        -    /**
        -     * Sets the value of the name property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setName(String value) {
        -        this.name = value;
        -    }
        +  /**
        +   * Sets the value of the name property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setName(String value)
        +  {
        +    this.name = value;
        +  }
         
         }
        diff --git a/src/jalview/xml/binding/uniprot/DbReferenceType.java b/src/jalview/xml/binding/uniprot/DbReferenceType.java
        index ea6f728..84cbba7 100644
        --- a/src/jalview/xml/binding/uniprot/DbReferenceType.java
        +++ b/src/jalview/xml/binding/uniprot/DbReferenceType.java
        @@ -5,7 +5,6 @@
         // Generated on: 2019.04.05 at 08:01:44 AM BST 
         //
         
        -
         package jalview.xml.binding.uniprot;
         
         import java.util.ArrayList;
        @@ -15,15 +14,16 @@ import javax.xml.bind.annotation.XmlAccessorType;
         import javax.xml.bind.annotation.XmlAttribute;
         import javax.xml.bind.annotation.XmlType;
         
        -
         /**
        - * Describes a database cross-reference.
        - *             Equivalent to the flat file DR-line.
        - *             
        + * Describes a database cross-reference. Equivalent to the flat file DR-line.
          * 
        - * 

        Java class for dbReferenceType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * Java class for dbReferenceType complex type. + * + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="dbReferenceType">
        @@ -44,149 +44,153 @@ import javax.xml.bind.annotation.XmlType;
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "dbReferenceType", propOrder = {
        -    "molecule",
        -    "property"
        -})
        -public class DbReferenceType {
        -
        -    protected MoleculeType molecule;
        -    protected List property;
        -    @XmlAttribute(name = "type", required = true)
        -    protected String type;
        -    @XmlAttribute(name = "id", required = true)
        -    protected String id;
        -    @XmlAttribute(name = "evidence")
        -    protected List evidence;
        -
        -    /**
        -     * Gets the value of the molecule property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link MoleculeType }
        -     *     
        -     */
        -    public MoleculeType getMolecule() {
        -        return molecule;
        -    }
        +@XmlType(name = "dbReferenceType", propOrder = { "molecule", "property" })
        +public class DbReferenceType
        +{
         
        -    /**
        -     * Sets the value of the molecule property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link MoleculeType }
        -     *     
        -     */
        -    public void setMolecule(MoleculeType value) {
        -        this.molecule = value;
        -    }
        +  protected MoleculeType molecule;
         
        -    /**
        -     * Gets the value of the property property.
        -     * 
        -     * 

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the property property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getProperty().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link PropertyType } - * - * - */ - public List getProperty() { - if (property == null) { - property = new ArrayList(); - } - return this.property; - } + protected List property; - /** - * Gets the value of the type property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getType() { - return type; - } + @XmlAttribute(name = "type", required = true) + protected String type; - /** - * Sets the value of the type property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setType(String value) { - this.type = value; - } + @XmlAttribute(name = "id", required = true) + protected String id; - /** - * Gets the value of the id property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getId() { - return id; - } + @XmlAttribute(name = "evidence") + protected List evidence; + + /** + * Gets the value of the molecule property. + * + * @return possible object is {@link MoleculeType } + * + */ + public MoleculeType getMolecule() + { + return molecule; + } - /** - * Sets the value of the id property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setId(String value) { - this.id = value; + /** + * Sets the value of the molecule property. + * + * @param value + * allowed object is {@link MoleculeType } + * + */ + public void setMolecule(MoleculeType value) + { + this.molecule = value; + } + + /** + * Gets the value of the property property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the property property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getProperty().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link PropertyType } + * + * + */ + public List getProperty() + { + if (property == null) + { + property = new ArrayList(); } + return this.property; + } + + /** + * Gets the value of the type property. + * + * @return possible object is {@link String } + * + */ + public String getType() + { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setType(String value) + { + this.type = value; + } + + /** + * Gets the value of the id property. + * + * @return possible object is {@link String } + * + */ + public String getId() + { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setId(String value) + { + this.id = value; + } - /** - * Gets the value of the evidence property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the evidence property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getEvidence().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link Integer } - * - * - */ - public List getEvidence() { - if (evidence == null) { - evidence = new ArrayList(); - } - return this.evidence; + /** + * Gets the value of the evidence property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the evidence property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getEvidence().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link Integer } + * + * + */ + public List getEvidence() + { + if (evidence == null) + { + evidence = new ArrayList(); } + return this.evidence; + } } diff --git a/src/jalview/xml/binding/uniprot/Entry.java b/src/jalview/xml/binding/uniprot/Entry.java index dc211e8..65bbd88 100644 --- a/src/jalview/xml/binding/uniprot/Entry.java +++ b/src/jalview/xml/binding/uniprot/Entry.java @@ -5,7 +5,6 @@ // Generated on: 2019.04.05 at 08:01:44 AM BST // - package jalview.xml.binding.uniprot; import java.util.ArrayList; @@ -19,11 +18,13 @@ import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; import javax.xml.datatype.XMLGregorianCalendar; - /** - *

        Java class for anonymous complex type. + *

        + * Java class for anonymous complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType>
        @@ -65,561 +66,594 @@ import javax.xml.datatype.XMLGregorianCalendar;
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "", propOrder = {
        -    "accession",
        -    "name",
        -    "protein",
        -    "gene",
        -    "organism",
        -    "organismHost",
        -    "geneLocation",
        -    "reference",
        -    "comment",
        -    "dbReference",
        -    "proteinExistence",
        -    "keyword",
        -    "feature",
        -    "evidence",
        -    "sequence"
        -})
        +@XmlType(
        +  name = "",
        +  propOrder =
        +  { "accession", "name", "protein", "gene", "organism", "organismHost",
        +      "geneLocation", "reference", "comment", "dbReference",
        +      "proteinExistence", "keyword", "feature", "evidence", "sequence" })
         @XmlRootElement(name = "entry")
        -public class Entry {
        -
        -    @XmlElement(required = true)
        -    protected List accession;
        -    @XmlElement(required = true)
        -    protected List name;
        -    @XmlElement(required = true)
        -    protected ProteinType protein;
        -    protected List gene;
        -    @XmlElement(required = true)
        -    protected OrganismType organism;
        -    protected List organismHost;
        -    protected List geneLocation;
        -    @XmlElement(required = true)
        -    protected List reference;
        -    @XmlElement(nillable = true)
        -    protected List comment;
        -    protected List dbReference;
        -    @XmlElement(required = true)
        -    protected ProteinExistenceType proteinExistence;
        -    protected List keyword;
        -    protected List feature;
        -    protected List evidence;
        -    @XmlElement(required = true)
        -    protected SequenceType sequence;
        -    @XmlAttribute(name = "dataset", required = true)
        -    protected String dataset;
        -    @XmlAttribute(name = "created", required = true)
        -    @XmlSchemaType(name = "date")
        -    protected XMLGregorianCalendar created;
        -    @XmlAttribute(name = "modified", required = true)
        -    @XmlSchemaType(name = "date")
        -    protected XMLGregorianCalendar modified;
        -    @XmlAttribute(name = "version", required = true)
        -    protected int version;
        -
        -    /**
        -     * Gets the value of the accession property.
        -     * 
        -     * 

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the accession property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getAccession().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link String } - * - * - */ - public List getAccession() { - if (accession == null) { - accession = new ArrayList(); - } - return this.accession; - } +public class Entry +{ - /** - * Gets the value of the name property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the name property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getName().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link String } - * - * - */ - public List getName() { - if (name == null) { - name = new ArrayList(); - } - return this.name; - } + @XmlElement(required = true) + protected List accession; - /** - * Gets the value of the protein property. - * - * @return - * possible object is - * {@link ProteinType } - * - */ - public ProteinType getProtein() { - return protein; - } + @XmlElement(required = true) + protected List name; - /** - * Sets the value of the protein property. - * - * @param value - * allowed object is - * {@link ProteinType } - * - */ - public void setProtein(ProteinType value) { - this.protein = value; - } + @XmlElement(required = true) + protected ProteinType protein; - /** - * Gets the value of the gene property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the gene property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getGene().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link GeneType } - * - * - */ - public List getGene() { - if (gene == null) { - gene = new ArrayList(); - } - return this.gene; - } + protected List gene; - /** - * Gets the value of the organism property. - * - * @return - * possible object is - * {@link OrganismType } - * - */ - public OrganismType getOrganism() { - return organism; - } + @XmlElement(required = true) + protected OrganismType organism; - /** - * Sets the value of the organism property. - * - * @param value - * allowed object is - * {@link OrganismType } - * - */ - public void setOrganism(OrganismType value) { - this.organism = value; - } + protected List organismHost; - /** - * Gets the value of the organismHost property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the organismHost property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getOrganismHost().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link OrganismType } - * - * - */ - public List getOrganismHost() { - if (organismHost == null) { - organismHost = new ArrayList(); - } - return this.organismHost; - } + protected List geneLocation; - /** - * Gets the value of the geneLocation property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the geneLocation property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getGeneLocation().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link GeneLocationType } - * - * - */ - public List getGeneLocation() { - if (geneLocation == null) { - geneLocation = new ArrayList(); - } - return this.geneLocation; - } + @XmlElement(required = true) + protected List reference; - /** - * Gets the value of the reference property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the reference property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getReference().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link ReferenceType } - * - * - */ - public List getReference() { - if (reference == null) { - reference = new ArrayList(); - } - return this.reference; - } + @XmlElement(nillable = true) + protected List comment; - /** - * Gets the value of the comment property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the comment property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getComment().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link CommentType } - * - * - */ - public List getComment() { - if (comment == null) { - comment = new ArrayList(); - } - return this.comment; - } + protected List dbReference; - /** - * Gets the value of the dbReference property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the dbReference property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getDbReference().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link DbReferenceType } - * - * - */ - public List getDbReference() { - if (dbReference == null) { - dbReference = new ArrayList(); - } - return this.dbReference; - } + @XmlElement(required = true) + protected ProteinExistenceType proteinExistence; - /** - * Gets the value of the proteinExistence property. - * - * @return - * possible object is - * {@link ProteinExistenceType } - * - */ - public ProteinExistenceType getProteinExistence() { - return proteinExistence; - } + protected List keyword; - /** - * Sets the value of the proteinExistence property. - * - * @param value - * allowed object is - * {@link ProteinExistenceType } - * - */ - public void setProteinExistence(ProteinExistenceType value) { - this.proteinExistence = value; - } + protected List feature; - /** - * Gets the value of the keyword property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the keyword property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getKeyword().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link KeywordType } - * - * - */ - public List getKeyword() { - if (keyword == null) { - keyword = new ArrayList(); - } - return this.keyword; - } + protected List evidence; - /** - * Gets the value of the feature property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the feature property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getFeature().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link FeatureType } - * - * - */ - public List getFeature() { - if (feature == null) { - feature = new ArrayList(); - } - return this.feature; - } + @XmlElement(required = true) + protected SequenceType sequence; - /** - * Gets the value of the evidence property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the evidence property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getEvidence().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link EvidenceType } - * - * - */ - public List getEvidence() { - if (evidence == null) { - evidence = new ArrayList(); - } - return this.evidence; - } + @XmlAttribute(name = "dataset", required = true) + protected String dataset; - /** - * Gets the value of the sequence property. - * - * @return - * possible object is - * {@link SequenceType } - * - */ - public SequenceType getSequence() { - return sequence; - } + @XmlAttribute(name = "created", required = true) + @XmlSchemaType(name = "date") + protected XMLGregorianCalendar created; - /** - * Sets the value of the sequence property. - * - * @param value - * allowed object is - * {@link SequenceType } - * - */ - public void setSequence(SequenceType value) { - this.sequence = value; - } + @XmlAttribute(name = "modified", required = true) + @XmlSchemaType(name = "date") + protected XMLGregorianCalendar modified; - /** - * Gets the value of the dataset property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDataset() { - return dataset; - } + @XmlAttribute(name = "version", required = true) + protected int version; - /** - * Sets the value of the dataset property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDataset(String value) { - this.dataset = value; + /** + * Gets the value of the accession property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the accession property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getAccession().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link String } + * + * + */ + public List getAccession() + { + if (accession == null) + { + accession = new ArrayList(); } - - /** - * Gets the value of the created property. - * - * @return - * possible object is - * {@link XMLGregorianCalendar } - * - */ - public XMLGregorianCalendar getCreated() { - return created; + return this.accession; + } + + /** + * Gets the value of the name property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the name property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getName().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link String } + * + * + */ + public List getName() + { + if (name == null) + { + name = new ArrayList(); } - - /** - * Sets the value of the created property. - * - * @param value - * allowed object is - * {@link XMLGregorianCalendar } - * - */ - public void setCreated(XMLGregorianCalendar value) { - this.created = value; + return this.name; + } + + /** + * Gets the value of the protein property. + * + * @return possible object is {@link ProteinType } + * + */ + public ProteinType getProtein() + { + return protein; + } + + /** + * Sets the value of the protein property. + * + * @param value + * allowed object is {@link ProteinType } + * + */ + public void setProtein(ProteinType value) + { + this.protein = value; + } + + /** + * Gets the value of the gene property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the gene property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getGene().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link GeneType } + * + * + */ + public List getGene() + { + if (gene == null) + { + gene = new ArrayList(); } - - /** - * Gets the value of the modified property. - * - * @return - * possible object is - * {@link XMLGregorianCalendar } - * - */ - public XMLGregorianCalendar getModified() { - return modified; + return this.gene; + } + + /** + * Gets the value of the organism property. + * + * @return possible object is {@link OrganismType } + * + */ + public OrganismType getOrganism() + { + return organism; + } + + /** + * Sets the value of the organism property. + * + * @param value + * allowed object is {@link OrganismType } + * + */ + public void setOrganism(OrganismType value) + { + this.organism = value; + } + + /** + * Gets the value of the organismHost property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the organismHost property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getOrganismHost().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link OrganismType } + * + * + */ + public List getOrganismHost() + { + if (organismHost == null) + { + organismHost = new ArrayList(); } - - /** - * Sets the value of the modified property. - * - * @param value - * allowed object is - * {@link XMLGregorianCalendar } - * - */ - public void setModified(XMLGregorianCalendar value) { - this.modified = value; + return this.organismHost; + } + + /** + * Gets the value of the geneLocation property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the geneLocation property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getGeneLocation().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link GeneLocationType } + * + * + */ + public List getGeneLocation() + { + if (geneLocation == null) + { + geneLocation = new ArrayList(); } - - /** - * Gets the value of the version property. - * - */ - public int getVersion() { - return version; + return this.geneLocation; + } + + /** + * Gets the value of the reference property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the reference property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getReference().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link ReferenceType } + * + * + */ + public List getReference() + { + if (reference == null) + { + reference = new ArrayList(); } - - /** - * Sets the value of the version property. - * - */ - public void setVersion(int value) { - this.version = value; + return this.reference; + } + + /** + * Gets the value of the comment property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the comment property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getComment().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link CommentType + * } + * + * + */ + public List getComment() + { + if (comment == null) + { + comment = new ArrayList(); + } + return this.comment; + } + + /** + * Gets the value of the dbReference property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the dbReference property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getDbReference().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link DbReferenceType } + * + * + */ + public List getDbReference() + { + if (dbReference == null) + { + dbReference = new ArrayList(); + } + return this.dbReference; + } + + /** + * Gets the value of the proteinExistence property. + * + * @return possible object is {@link ProteinExistenceType } + * + */ + public ProteinExistenceType getProteinExistence() + { + return proteinExistence; + } + + /** + * Sets the value of the proteinExistence property. + * + * @param value + * allowed object is {@link ProteinExistenceType } + * + */ + public void setProteinExistence(ProteinExistenceType value) + { + this.proteinExistence = value; + } + + /** + * Gets the value of the keyword property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the keyword property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getKeyword().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link KeywordType + * } + * + * + */ + public List getKeyword() + { + if (keyword == null) + { + keyword = new ArrayList(); + } + return this.keyword; + } + + /** + * Gets the value of the feature property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the feature property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getFeature().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link FeatureType + * } + * + * + */ + public List getFeature() + { + if (feature == null) + { + feature = new ArrayList(); + } + return this.feature; + } + + /** + * Gets the value of the evidence property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the evidence property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getEvidence().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link EvidenceType } + * + * + */ + public List getEvidence() + { + if (evidence == null) + { + evidence = new ArrayList(); } + return this.evidence; + } + + /** + * Gets the value of the sequence property. + * + * @return possible object is {@link SequenceType } + * + */ + public SequenceType getSequence() + { + return sequence; + } + + /** + * Sets the value of the sequence property. + * + * @param value + * allowed object is {@link SequenceType } + * + */ + public void setSequence(SequenceType value) + { + this.sequence = value; + } + + /** + * Gets the value of the dataset property. + * + * @return possible object is {@link String } + * + */ + public String getDataset() + { + return dataset; + } + + /** + * Sets the value of the dataset property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDataset(String value) + { + this.dataset = value; + } + + /** + * Gets the value of the created property. + * + * @return possible object is {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getCreated() + { + return created; + } + + /** + * Sets the value of the created property. + * + * @param value + * allowed object is {@link XMLGregorianCalendar } + * + */ + public void setCreated(XMLGregorianCalendar value) + { + this.created = value; + } + + /** + * Gets the value of the modified property. + * + * @return possible object is {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getModified() + { + return modified; + } + + /** + * Sets the value of the modified property. + * + * @param value + * allowed object is {@link XMLGregorianCalendar } + * + */ + public void setModified(XMLGregorianCalendar value) + { + this.modified = value; + } + + /** + * Gets the value of the version property. + * + */ + public int getVersion() + { + return version; + } + + /** + * Sets the value of the version property. + * + */ + public void setVersion(int value) + { + this.version = value; + } } diff --git a/src/jalview/xml/binding/uniprot/EventType.java b/src/jalview/xml/binding/uniprot/EventType.java index 0c3de0e..d3fe7f9 100644 --- a/src/jalview/xml/binding/uniprot/EventType.java +++ b/src/jalview/xml/binding/uniprot/EventType.java @@ -5,7 +5,6 @@ // Generated on: 2019.04.05 at 08:01:44 AM BST // - package jalview.xml.binding.uniprot; import javax.xml.bind.annotation.XmlAccessType; @@ -13,13 +12,15 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlType; - /** * Describes the type of events that cause alternative products. * - *

        Java class for eventType complex type. + *

        + * Java class for eventType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="eventType">
        @@ -44,33 +45,33 @@ import javax.xml.bind.annotation.XmlType;
          */
         @XmlAccessorType(XmlAccessType.FIELD)
         @XmlType(name = "eventType")
        -public class EventType {
        +public class EventType
        +{
         
        -    @XmlAttribute(name = "type", required = true)
        -    protected String type;
        +  @XmlAttribute(name = "type", required = true)
        +  protected String type;
         
        -    /**
        -     * Gets the value of the type property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getType() {
        -        return type;
        -    }
        +  /**
        +   * Gets the value of the type property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getType()
        +  {
        +    return type;
        +  }
         
        -    /**
        -     * Sets the value of the type property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setType(String value) {
        -        this.type = value;
        -    }
        +  /**
        +   * Sets the value of the type property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setType(String value)
        +  {
        +    this.type = value;
        +  }
         
         }
        diff --git a/src/jalview/xml/binding/uniprot/EvidenceType.java b/src/jalview/xml/binding/uniprot/EvidenceType.java
        index 484d42d..6e0ff99 100644
        --- a/src/jalview/xml/binding/uniprot/EvidenceType.java
        +++ b/src/jalview/xml/binding/uniprot/EvidenceType.java
        @@ -5,7 +5,6 @@
         // Generated on: 2019.04.05 at 08:01:44 AM BST 
         //
         
        -
         package jalview.xml.binding.uniprot;
         
         import java.math.BigInteger;
        @@ -14,14 +13,15 @@ import javax.xml.bind.annotation.XmlAccessorType;
         import javax.xml.bind.annotation.XmlAttribute;
         import javax.xml.bind.annotation.XmlType;
         
        -
         /**
        - * Describes the evidence for an annotation.
        - *             No flat file equivalent.
        + * Describes the evidence for an annotation. No flat file equivalent.
          * 
        - * 

        Java class for evidenceType complex type. + *

        + * Java class for evidenceType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="evidenceType">
        @@ -41,113 +41,110 @@ import javax.xml.bind.annotation.XmlType;
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "evidenceType", propOrder = {
        -    "source",
        -    "importedFrom"
        -})
        -public class EvidenceType {
        -
        -    protected SourceType source;
        -    protected ImportedFromType importedFrom;
        -    @XmlAttribute(name = "type", required = true)
        -    protected String type;
        -    @XmlAttribute(name = "key", required = true)
        -    protected BigInteger key;
        -
        -    /**
        -     * Gets the value of the source property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link SourceType }
        -     *     
        -     */
        -    public SourceType getSource() {
        -        return source;
        -    }
        -
        -    /**
        -     * Sets the value of the source property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link SourceType }
        -     *     
        -     */
        -    public void setSource(SourceType value) {
        -        this.source = value;
        -    }
        -
        -    /**
        -     * Gets the value of the importedFrom property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link ImportedFromType }
        -     *     
        -     */
        -    public ImportedFromType getImportedFrom() {
        -        return importedFrom;
        -    }
        -
        -    /**
        -     * Sets the value of the importedFrom property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link ImportedFromType }
        -     *     
        -     */
        -    public void setImportedFrom(ImportedFromType value) {
        -        this.importedFrom = value;
        -    }
        -
        -    /**
        -     * Gets the value of the type property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getType() {
        -        return type;
        -    }
        -
        -    /**
        -     * Sets the value of the type property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setType(String value) {
        -        this.type = value;
        -    }
        -
        -    /**
        -     * Gets the value of the key property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link BigInteger }
        -     *     
        -     */
        -    public BigInteger getKey() {
        -        return key;
        -    }
        -
        -    /**
        -     * Sets the value of the key property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link BigInteger }
        -     *     
        -     */
        -    public void setKey(BigInteger value) {
        -        this.key = value;
        -    }
        +@XmlType(name = "evidenceType", propOrder = { "source", "importedFrom" })
        +public class EvidenceType
        +{
        +
        +  protected SourceType source;
        +
        +  protected ImportedFromType importedFrom;
        +
        +  @XmlAttribute(name = "type", required = true)
        +  protected String type;
        +
        +  @XmlAttribute(name = "key", required = true)
        +  protected BigInteger key;
        +
        +  /**
        +   * Gets the value of the source property.
        +   * 
        +   * @return possible object is {@link SourceType }
        +   * 
        +   */
        +  public SourceType getSource()
        +  {
        +    return source;
        +  }
        +
        +  /**
        +   * Sets the value of the source property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link SourceType }
        +   * 
        +   */
        +  public void setSource(SourceType value)
        +  {
        +    this.source = value;
        +  }
        +
        +  /**
        +   * Gets the value of the importedFrom property.
        +   * 
        +   * @return possible object is {@link ImportedFromType }
        +   * 
        +   */
        +  public ImportedFromType getImportedFrom()
        +  {
        +    return importedFrom;
        +  }
        +
        +  /**
        +   * Sets the value of the importedFrom property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link ImportedFromType }
        +   * 
        +   */
        +  public void setImportedFrom(ImportedFromType value)
        +  {
        +    this.importedFrom = value;
        +  }
        +
        +  /**
        +   * Gets the value of the type property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getType()
        +  {
        +    return type;
        +  }
        +
        +  /**
        +   * Sets the value of the type property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setType(String value)
        +  {
        +    this.type = value;
        +  }
        +
        +  /**
        +   * Gets the value of the key property.
        +   * 
        +   * @return possible object is {@link BigInteger }
        +   * 
        +   */
        +  public BigInteger getKey()
        +  {
        +    return key;
        +  }
        +
        +  /**
        +   * Sets the value of the key property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link BigInteger }
        +   * 
        +   */
        +  public void setKey(BigInteger value)
        +  {
        +    this.key = value;
        +  }
         
         }
        diff --git a/src/jalview/xml/binding/uniprot/EvidencedStringType.java b/src/jalview/xml/binding/uniprot/EvidencedStringType.java
        index ad22872..33e8c53 100644
        --- a/src/jalview/xml/binding/uniprot/EvidencedStringType.java
        +++ b/src/jalview/xml/binding/uniprot/EvidencedStringType.java
        @@ -5,7 +5,6 @@
         // Generated on: 2019.04.05 at 08:01:44 AM BST 
         //
         
        -
         package jalview.xml.binding.uniprot;
         
         import java.util.ArrayList;
        @@ -16,11 +15,13 @@ import javax.xml.bind.annotation.XmlAttribute;
         import javax.xml.bind.annotation.XmlType;
         import javax.xml.bind.annotation.XmlValue;
         
        -
         /**
        - * 

        Java class for evidencedStringType complex type. + *

        + * Java class for evidencedStringType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="evidencedStringType">
        @@ -44,93 +45,94 @@ import javax.xml.bind.annotation.XmlValue;
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "evidencedStringType", propOrder = {
        -    "value"
        -})
        -public class EvidencedStringType {
        +@XmlType(name = "evidencedStringType", propOrder = { "value" })
        +public class EvidencedStringType
        +{
         
        -    @XmlValue
        -    protected String value;
        -    @XmlAttribute(name = "evidence")
        -    protected List evidence;
        -    @XmlAttribute(name = "status")
        -    protected String status;
        +  @XmlValue
        +  protected String value;
         
        -    /**
        -     * Gets the value of the value property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getValue() {
        -        return value;
        -    }
        +  @XmlAttribute(name = "evidence")
        +  protected List evidence;
         
        -    /**
        -     * Sets the value of the value property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setValue(String value) {
        -        this.value = value;
        -    }
        +  @XmlAttribute(name = "status")
        +  protected String status;
         
        -    /**
        -     * Gets the value of the evidence property.
        -     * 
        -     * 

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the evidence property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getEvidence().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link Integer } - * - * - */ - public List getEvidence() { - if (evidence == null) { - evidence = new ArrayList(); - } - return this.evidence; - } + /** + * Gets the value of the value property. + * + * @return possible object is {@link String } + * + */ + public String getValue() + { + return value; + } - /** - * Gets the value of the status property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getStatus() { - return status; - } + /** + * Sets the value of the value property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setValue(String value) + { + this.value = value; + } - /** - * Sets the value of the status property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setStatus(String value) { - this.status = value; + /** + * Gets the value of the evidence property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the evidence property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getEvidence().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link Integer } + * + * + */ + public List getEvidence() + { + if (evidence == null) + { + evidence = new ArrayList(); } + return this.evidence; + } + + /** + * Gets the value of the status property. + * + * @return possible object is {@link String } + * + */ + public String getStatus() + { + return status; + } + + /** + * Sets the value of the status property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setStatus(String value) + { + this.status = value; + } } diff --git a/src/jalview/xml/binding/uniprot/FeatureType.java b/src/jalview/xml/binding/uniprot/FeatureType.java index e951659..fe9f4c4 100644 --- a/src/jalview/xml/binding/uniprot/FeatureType.java +++ b/src/jalview/xml/binding/uniprot/FeatureType.java @@ -5,7 +5,6 @@ // Generated on: 2019.04.05 at 08:01:44 AM BST // - package jalview.xml.binding.uniprot; import java.util.ArrayList; @@ -16,14 +15,16 @@ import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; - /** - * Describes different types of sequence annotations. - * Equivalent to the flat file FT-line. + * Describes different types of sequence annotations. Equivalent to the flat + * file FT-line. * - *

        Java class for featureType complex type. + *

        + * Java class for featureType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="featureType">
        @@ -100,254 +101,259 @@ import javax.xml.bind.annotation.XmlType;
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "featureType", propOrder = {
        -    "original",
        -    "variation",
        -    "location"
        -})
        -public class FeatureType {
        +@XmlType(
        +  name = "featureType",
        +  propOrder =
        +  { "original", "variation", "location" })
        +public class FeatureType
        +{
         
        -    protected String original;
        -    protected List variation;
        -    @XmlElement(required = true)
        -    protected LocationType location;
        -    @XmlAttribute(name = "type", required = true)
        -    protected String type;
        -    @XmlAttribute(name = "status")
        -    protected String status;
        -    @XmlAttribute(name = "id")
        -    protected String id;
        -    @XmlAttribute(name = "description")
        -    protected String description;
        -    @XmlAttribute(name = "evidence")
        -    protected List evidence;
        -    @XmlAttribute(name = "ref")
        -    protected String ref;
        +  protected String original;
         
        -    /**
        -     * Gets the value of the original property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getOriginal() {
        -        return original;
        -    }
        +  protected List variation;
         
        -    /**
        -     * Sets the value of the original property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setOriginal(String value) {
        -        this.original = value;
        -    }
        +  @XmlElement(required = true)
        +  protected LocationType location;
         
        -    /**
        -     * Gets the value of the variation property.
        -     * 
        -     * 

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the variation property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getVariation().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link String } - * - * - */ - public List getVariation() { - if (variation == null) { - variation = new ArrayList(); - } - return this.variation; - } + @XmlAttribute(name = "type", required = true) + protected String type; - /** - * Gets the value of the location property. - * - * @return - * possible object is - * {@link LocationType } - * - */ - public LocationType getLocation() { - return location; - } + @XmlAttribute(name = "status") + protected String status; - /** - * Sets the value of the location property. - * - * @param value - * allowed object is - * {@link LocationType } - * - */ - public void setLocation(LocationType value) { - this.location = value; - } + @XmlAttribute(name = "id") + protected String id; - /** - * Gets the value of the type property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getType() { - return type; - } + @XmlAttribute(name = "description") + protected String description; - /** - * Sets the value of the type property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setType(String value) { - this.type = value; - } + @XmlAttribute(name = "evidence") + protected List evidence; - /** - * Gets the value of the status property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getStatus() { - return status; - } + @XmlAttribute(name = "ref") + protected String ref; - /** - * Sets the value of the status property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setStatus(String value) { - this.status = value; - } + /** + * Gets the value of the original property. + * + * @return possible object is {@link String } + * + */ + public String getOriginal() + { + return original; + } - /** - * Gets the value of the id property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getId() { - return id; - } + /** + * Sets the value of the original property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setOriginal(String value) + { + this.original = value; + } - /** - * Sets the value of the id property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setId(String value) { - this.id = value; + /** + * Gets the value of the variation property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the variation property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getVariation().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link String } + * + * + */ + public List getVariation() + { + if (variation == null) + { + variation = new ArrayList(); } + return this.variation; + } - /** - * Gets the value of the description property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getDescription() { - return description; - } + /** + * Gets the value of the location property. + * + * @return possible object is {@link LocationType } + * + */ + public LocationType getLocation() + { + return location; + } - /** - * Sets the value of the description property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setDescription(String value) { - this.description = value; - } + /** + * Sets the value of the location property. + * + * @param value + * allowed object is {@link LocationType } + * + */ + public void setLocation(LocationType value) + { + this.location = value; + } - /** - * Gets the value of the evidence property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the evidence property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getEvidence().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link Integer } - * - * - */ - public List getEvidence() { - if (evidence == null) { - evidence = new ArrayList(); - } - return this.evidence; - } + /** + * Gets the value of the type property. + * + * @return possible object is {@link String } + * + */ + public String getType() + { + return type; + } - /** - * Gets the value of the ref property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getRef() { - return ref; - } + /** + * Sets the value of the type property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setType(String value) + { + this.type = value; + } + + /** + * Gets the value of the status property. + * + * @return possible object is {@link String } + * + */ + public String getStatus() + { + return status; + } + + /** + * Sets the value of the status property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setStatus(String value) + { + this.status = value; + } - /** - * Sets the value of the ref property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setRef(String value) { - this.ref = value; + /** + * Gets the value of the id property. + * + * @return possible object is {@link String } + * + */ + public String getId() + { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setId(String value) + { + this.id = value; + } + + /** + * Gets the value of the description property. + * + * @return possible object is {@link String } + * + */ + public String getDescription() + { + return description; + } + + /** + * Sets the value of the description property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setDescription(String value) + { + this.description = value; + } + + /** + * Gets the value of the evidence property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the evidence property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getEvidence().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link Integer } + * + * + */ + public List getEvidence() + { + if (evidence == null) + { + evidence = new ArrayList(); } + return this.evidence; + } + + /** + * Gets the value of the ref property. + * + * @return possible object is {@link String } + * + */ + public String getRef() + { + return ref; + } + + /** + * Sets the value of the ref property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setRef(String value) + { + this.ref = value; + } } diff --git a/src/jalview/xml/binding/uniprot/GeneLocationType.java b/src/jalview/xml/binding/uniprot/GeneLocationType.java index 3e3da7b..33f0bfd 100644 --- a/src/jalview/xml/binding/uniprot/GeneLocationType.java +++ b/src/jalview/xml/binding/uniprot/GeneLocationType.java @@ -5,7 +5,6 @@ // Generated on: 2019.04.05 at 08:01:44 AM BST // - package jalview.xml.binding.uniprot; import java.util.ArrayList; @@ -15,14 +14,16 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlType; - /** - * Describes non-nuclear gene locations (organelles and plasmids). - * Equivalent to the flat file OG-line. + * Describes non-nuclear gene locations (organelles and plasmids). Equivalent to + * the flat file OG-line. * - *

        Java class for geneLocationType complex type. + *

        + * Java class for geneLocationType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="geneLocationType">
        @@ -56,97 +57,102 @@ import javax.xml.bind.annotation.XmlType;
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "geneLocationType", propOrder = {
        -    "name"
        -})
        -public class GeneLocationType {
        +@XmlType(name = "geneLocationType", propOrder = { "name" })
        +public class GeneLocationType
        +{
         
        -    protected List name;
        -    @XmlAttribute(name = "type", required = true)
        -    protected String type;
        -    @XmlAttribute(name = "evidence")
        -    protected List evidence;
        +  protected List name;
         
        -    /**
        -     * Gets the value of the name property.
        -     * 
        -     * 

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the name property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getName().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link StatusType } - * - * - */ - public List getName() { - if (name == null) { - name = new ArrayList(); - } - return this.name; - } + @XmlAttribute(name = "type", required = true) + protected String type; - /** - * Gets the value of the type property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getType() { - return type; - } + @XmlAttribute(name = "evidence") + protected List evidence; - /** - * Sets the value of the type property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setType(String value) { - this.type = value; + /** + * Gets the value of the name property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the name property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getName().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link StatusType + * } + * + * + */ + public List getName() + { + if (name == null) + { + name = new ArrayList(); } + return this.name; + } + + /** + * Gets the value of the type property. + * + * @return possible object is {@link String } + * + */ + public String getType() + { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setType(String value) + { + this.type = value; + } - /** - * Gets the value of the evidence property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the evidence property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getEvidence().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link Integer } - * - * - */ - public List getEvidence() { - if (evidence == null) { - evidence = new ArrayList(); - } - return this.evidence; + /** + * Gets the value of the evidence property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the evidence property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getEvidence().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link Integer } + * + * + */ + public List getEvidence() + { + if (evidence == null) + { + evidence = new ArrayList(); } + return this.evidence; + } } diff --git a/src/jalview/xml/binding/uniprot/GeneNameType.java b/src/jalview/xml/binding/uniprot/GeneNameType.java index bd93a7c..84850d3 100644 --- a/src/jalview/xml/binding/uniprot/GeneNameType.java +++ b/src/jalview/xml/binding/uniprot/GeneNameType.java @@ -5,7 +5,6 @@ // Generated on: 2019.04.05 at 08:01:44 AM BST // - package jalview.xml.binding.uniprot; import java.util.ArrayList; @@ -16,14 +15,16 @@ import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlValue; - /** - * Describes different types of gene designations. - * Equivalent to the flat file GN-line. + * Describes different types of gene designations. Equivalent to the flat file + * GN-line. * - *

        Java class for geneNameType complex type. + *

        + * Java class for geneNameType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="geneNameType">
        @@ -48,93 +49,94 @@ import javax.xml.bind.annotation.XmlValue;
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "geneNameType", propOrder = {
        -    "value"
        -})
        -public class GeneNameType {
        +@XmlType(name = "geneNameType", propOrder = { "value" })
        +public class GeneNameType
        +{
         
        -    @XmlValue
        -    protected String value;
        -    @XmlAttribute(name = "evidence")
        -    protected List evidence;
        -    @XmlAttribute(name = "type", required = true)
        -    protected String type;
        +  @XmlValue
        +  protected String value;
         
        -    /**
        -     * Gets the value of the value property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getValue() {
        -        return value;
        -    }
        +  @XmlAttribute(name = "evidence")
        +  protected List evidence;
         
        -    /**
        -     * Sets the value of the value property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setValue(String value) {
        -        this.value = value;
        -    }
        +  @XmlAttribute(name = "type", required = true)
        +  protected String type;
         
        -    /**
        -     * Gets the value of the evidence property.
        -     * 
        -     * 

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the evidence property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getEvidence().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link Integer } - * - * - */ - public List getEvidence() { - if (evidence == null) { - evidence = new ArrayList(); - } - return this.evidence; - } + /** + * Gets the value of the value property. + * + * @return possible object is {@link String } + * + */ + public String getValue() + { + return value; + } - /** - * Gets the value of the type property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getType() { - return type; - } + /** + * Sets the value of the value property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setValue(String value) + { + this.value = value; + } - /** - * Sets the value of the type property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setType(String value) { - this.type = value; + /** + * Gets the value of the evidence property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the evidence property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getEvidence().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link Integer } + * + * + */ + public List getEvidence() + { + if (evidence == null) + { + evidence = new ArrayList(); } + return this.evidence; + } + + /** + * Gets the value of the type property. + * + * @return possible object is {@link String } + * + */ + public String getType() + { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setType(String value) + { + this.type = value; + } } diff --git a/src/jalview/xml/binding/uniprot/GeneType.java b/src/jalview/xml/binding/uniprot/GeneType.java index 7440d6b..0b0a19e 100644 --- a/src/jalview/xml/binding/uniprot/GeneType.java +++ b/src/jalview/xml/binding/uniprot/GeneType.java @@ -5,7 +5,6 @@ // Generated on: 2019.04.05 at 08:01:44 AM BST // - package jalview.xml.binding.uniprot; import java.util.ArrayList; @@ -15,14 +14,15 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; - /** - * Describes a gene. - * Equivalent to the flat file GN-line. + * Describes a gene. Equivalent to the flat file GN-line. * - *

        Java class for geneType complex type. + *

        + * Java class for geneType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="geneType">
        @@ -39,41 +39,43 @@ import javax.xml.bind.annotation.XmlType;
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "geneType", propOrder = {
        -    "name"
        -})
        -public class GeneType {
        +@XmlType(name = "geneType", propOrder = { "name" })
        +public class GeneType
        +{
         
        -    @XmlElement(required = true)
        -    protected List name;
        +  @XmlElement(required = true)
        +  protected List name;
         
        -    /**
        -     * Gets the value of the name property.
        -     * 
        -     * 

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the name property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getName().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link GeneNameType } - * - * - */ - public List getName() { - if (name == null) { - name = new ArrayList(); - } - return this.name; + /** + * Gets the value of the name property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the name property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getName().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link GeneNameType } + * + * + */ + public List getName() + { + if (name == null) + { + name = new ArrayList(); } + return this.name; + } } diff --git a/src/jalview/xml/binding/uniprot/ImportedFromType.java b/src/jalview/xml/binding/uniprot/ImportedFromType.java index 80cdfe5..f46afb5 100644 --- a/src/jalview/xml/binding/uniprot/ImportedFromType.java +++ b/src/jalview/xml/binding/uniprot/ImportedFromType.java @@ -5,7 +5,6 @@ // Generated on: 2019.04.05 at 08:01:44 AM BST // - package jalview.xml.binding.uniprot; import javax.xml.bind.annotation.XmlAccessType; @@ -13,13 +12,16 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; - /** - * Describes the source of the evidence, when it is not assigned by UniProt, but imported from an external database. + * Describes the source of the evidence, when it is not assigned by UniProt, but + * imported from an external database. * - *

        Java class for importedFromType complex type. + *

        + * Java class for importedFromType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="importedFromType">
        @@ -36,36 +38,34 @@ import javax.xml.bind.annotation.XmlType;
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "importedFromType", propOrder = {
        -    "dbReference"
        -})
        -public class ImportedFromType {
        +@XmlType(name = "importedFromType", propOrder = { "dbReference" })
        +public class ImportedFromType
        +{
         
        -    @XmlElement(required = true)
        -    protected DbReferenceType dbReference;
        +  @XmlElement(required = true)
        +  protected DbReferenceType dbReference;
         
        -    /**
        -     * Gets the value of the dbReference property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link DbReferenceType }
        -     *     
        -     */
        -    public DbReferenceType getDbReference() {
        -        return dbReference;
        -    }
        +  /**
        +   * Gets the value of the dbReference property.
        +   * 
        +   * @return possible object is {@link DbReferenceType }
        +   * 
        +   */
        +  public DbReferenceType getDbReference()
        +  {
        +    return dbReference;
        +  }
         
        -    /**
        -     * Sets the value of the dbReference property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link DbReferenceType }
        -     *     
        -     */
        -    public void setDbReference(DbReferenceType value) {
        -        this.dbReference = value;
        -    }
        +  /**
        +   * Sets the value of the dbReference property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link DbReferenceType }
        +   * 
        +   */
        +  public void setDbReference(DbReferenceType value)
        +  {
        +    this.dbReference = value;
        +  }
         
         }
        diff --git a/src/jalview/xml/binding/uniprot/InteractantType.java b/src/jalview/xml/binding/uniprot/InteractantType.java
        index 2ba310e..0e59c4b 100644
        --- a/src/jalview/xml/binding/uniprot/InteractantType.java
        +++ b/src/jalview/xml/binding/uniprot/InteractantType.java
        @@ -5,7 +5,6 @@
         // Generated on: 2019.04.05 at 08:01:44 AM BST 
         //
         
        -
         package jalview.xml.binding.uniprot;
         
         import javax.xml.bind.annotation.XmlAccessType;
        @@ -13,11 +12,13 @@ import javax.xml.bind.annotation.XmlAccessorType;
         import javax.xml.bind.annotation.XmlAttribute;
         import javax.xml.bind.annotation.XmlType;
         
        -
         /**
        - * 

        Java class for interactantType complex type. + *

        + * Java class for interactantType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="interactantType">
        @@ -33,87 +34,84 @@ import javax.xml.bind.annotation.XmlType;
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "interactantType", propOrder = {
        -    "id",
        -    "label"
        -})
        -public class InteractantType {
        +@XmlType(name = "interactantType", propOrder = { "id", "label" })
        +public class InteractantType
        +{
        +
        +  protected String id;
        +
        +  protected String label;
         
        -    protected String id;
        -    protected String label;
        -    @XmlAttribute(name = "intactId", required = true)
        -    protected String intactId;
        +  @XmlAttribute(name = "intactId", required = true)
        +  protected String intactId;
         
        -    /**
        -     * Gets the value of the id property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getId() {
        -        return id;
        -    }
        +  /**
        +   * Gets the value of the id property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getId()
        +  {
        +    return id;
        +  }
         
        -    /**
        -     * Sets the value of the id property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setId(String value) {
        -        this.id = value;
        -    }
        +  /**
        +   * Sets the value of the id property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setId(String value)
        +  {
        +    this.id = value;
        +  }
         
        -    /**
        -     * Gets the value of the label property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getLabel() {
        -        return label;
        -    }
        +  /**
        +   * Gets the value of the label property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getLabel()
        +  {
        +    return label;
        +  }
         
        -    /**
        -     * Sets the value of the label property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setLabel(String value) {
        -        this.label = value;
        -    }
        +  /**
        +   * Sets the value of the label property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setLabel(String value)
        +  {
        +    this.label = value;
        +  }
         
        -    /**
        -     * Gets the value of the intactId property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getIntactId() {
        -        return intactId;
        -    }
        +  /**
        +   * Gets the value of the intactId property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getIntactId()
        +  {
        +    return intactId;
        +  }
         
        -    /**
        -     * Sets the value of the intactId property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setIntactId(String value) {
        -        this.intactId = value;
        -    }
        +  /**
        +   * Sets the value of the intactId property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setIntactId(String value)
        +  {
        +    this.intactId = value;
        +  }
         
         }
        diff --git a/src/jalview/xml/binding/uniprot/IsoformType.java b/src/jalview/xml/binding/uniprot/IsoformType.java
        index 9d218cf..631ab01 100644
        --- a/src/jalview/xml/binding/uniprot/IsoformType.java
        +++ b/src/jalview/xml/binding/uniprot/IsoformType.java
        @@ -5,7 +5,6 @@
         // Generated on: 2019.04.05 at 08:01:44 AM BST 
         //
         
        -
         package jalview.xml.binding.uniprot;
         
         import java.util.ArrayList;
        @@ -17,13 +16,15 @@ import javax.xml.bind.annotation.XmlElement;
         import javax.xml.bind.annotation.XmlType;
         import javax.xml.bind.annotation.XmlValue;
         
        -
         /**
          * Describes isoforms in 'alternative products' annotations.
          * 
        - * 

        Java class for isoformType complex type. + *

        + * Java class for isoformType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="isoformType">
        @@ -69,302 +70,316 @@ import javax.xml.bind.annotation.XmlValue;
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "isoformType", propOrder = {
        -    "id",
        -    "name",
        -    "sequence",
        -    "text"
        -})
        -public class IsoformType {
        +@XmlType(
        +  name = "isoformType",
        +  propOrder =
        +  { "id", "name", "sequence", "text" })
        +public class IsoformType
        +{
         
        -    @XmlElement(required = true)
        -    protected List id;
        -    @XmlElement(required = true)
        -    protected List name;
        -    @XmlElement(required = true)
        -    protected IsoformType.Sequence sequence;
        -    protected List text;
        +  @XmlElement(required = true)
        +  protected List id;
         
        -    /**
        -     * Gets the value of the id property.
        -     * 
        -     * 

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the id property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getId().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link String } - * - * - */ - public List getId() { - if (id == null) { - id = new ArrayList(); - } - return this.id; + @XmlElement(required = true) + protected List name; + + @XmlElement(required = true) + protected IsoformType.Sequence sequence; + + protected List text; + + /** + * Gets the value of the id property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the id property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getId().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link String } + * + * + */ + public List getId() + { + if (id == null) + { + id = new ArrayList(); } + return this.id; + } - /** - * Gets the value of the name property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the name property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getName().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link IsoformType.Name } - * - * - */ - public List getName() { - if (name == null) { - name = new ArrayList(); - } - return this.name; + /** + * Gets the value of the name property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the name property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getName().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link IsoformType.Name } + * + * + */ + public List getName() + { + if (name == null) + { + name = new ArrayList(); + } + return this.name; + } + + /** + * Gets the value of the sequence property. + * + * @return possible object is {@link IsoformType.Sequence } + * + */ + public IsoformType.Sequence getSequence() + { + return sequence; + } + + /** + * Sets the value of the sequence property. + * + * @param value + * allowed object is {@link IsoformType.Sequence } + * + */ + public void setSequence(IsoformType.Sequence value) + { + this.sequence = value; + } + + /** + * Gets the value of the text property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the text property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getText().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * + */ + public List getText() + { + if (text == null) + { + text = new ArrayList(); } + return this.text; + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <simpleContent>
        +   *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
        +   *       <attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
        +   *     </extension>
        +   *   </simpleContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "value" }) + public static class Name + { + + @XmlValue + protected String value; + + @XmlAttribute(name = "evidence") + protected List evidence; /** - * Gets the value of the sequence property. + * Gets the value of the value property. + * + * @return possible object is {@link String } * - * @return - * possible object is - * {@link IsoformType.Sequence } - * */ - public IsoformType.Sequence getSequence() { - return sequence; + public String getValue() + { + return value; } /** - * Sets the value of the sequence property. + * Sets the value of the value property. * * @param value - * allowed object is - * {@link IsoformType.Sequence } - * + * allowed object is {@link String } + * */ - public void setSequence(IsoformType.Sequence value) { - this.sequence = value; + public void setValue(String value) + { + this.value = value; } /** - * Gets the value of the text property. + * Gets the value of the evidence property. * *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the text property. + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the evidence property. * *

        * For example, to add a new item, do as follows: + * *

        -     *    getText().add(newItem);
        +     * getEvidence().add(newItem);
              * 
        * * *

        - * Objects of the following type(s) are allowed in the list - * {@link EvidencedStringType } + * Objects of the following type(s) are allowed in the list {@link Integer } * * */ - public List getText() { - if (text == null) { - text = new ArrayList(); - } - return this.text; + public List getEvidence() + { + if (evidence == null) + { + evidence = new ArrayList(); + } + return this.evidence; } + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <complexContent>
        +   *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *       <attribute name="type" use="required">
        +   *         <simpleType>
        +   *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
        +   *             <enumeration value="not described"/>
        +   *             <enumeration value="described"/>
        +   *             <enumeration value="displayed"/>
        +   *             <enumeration value="external"/>
        +   *           </restriction>
        +   *         </simpleType>
        +   *       </attribute>
        +   *       <attribute name="ref" type="{http://www.w3.org/2001/XMLSchema}string" />
        +   *     </restriction>
        +   *   </complexContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "") + public static class Sequence + { + + @XmlAttribute(name = "type", required = true) + protected String type; + + @XmlAttribute(name = "ref") + protected String ref; /** - *

        Java class for anonymous complex type. + * Gets the value of the type property. * - *

        The following schema fragment specifies the expected content contained within this class. + * @return possible object is {@link String } * - *

        -     * <complexType>
        -     *   <simpleContent>
        -     *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
        -     *       <attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
        -     *     </extension>
        -     *   </simpleContent>
        -     * </complexType>
        -     * 
        + */ + public String getType() + { + return type; + } + + /** + * Sets the value of the type property. * + * @param value + * allowed object is {@link String } * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "value" - }) - public static class Name { - - @XmlValue - protected String value; - @XmlAttribute(name = "evidence") - protected List evidence; - - /** - * Gets the value of the value property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the evidence property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the evidence property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getEvidence().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link Integer } - * - * - */ - public List getEvidence() { - if (evidence == null) { - evidence = new ArrayList(); - } - return this.evidence; - } - + public void setType(String value) + { + this.type = value; } - /** - *

        Java class for anonymous complex type. + * Gets the value of the ref property. * - *

        The following schema fragment specifies the expected content contained within this class. + * @return possible object is {@link String } * - *

        -     * <complexType>
        -     *   <complexContent>
        -     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *       <attribute name="type" use="required">
        -     *         <simpleType>
        -     *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
        -     *             <enumeration value="not described"/>
        -     *             <enumeration value="described"/>
        -     *             <enumeration value="displayed"/>
        -     *             <enumeration value="external"/>
        -     *           </restriction>
        -     *         </simpleType>
        -     *       </attribute>
        -     *       <attribute name="ref" type="{http://www.w3.org/2001/XMLSchema}string" />
        -     *     </restriction>
        -     *   </complexContent>
        -     * </complexType>
        -     * 
        + */ + public String getRef() + { + return ref; + } + + /** + * Sets the value of the ref property. * + * @param value + * allowed object is {@link String } * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class Sequence { - - @XmlAttribute(name = "type", required = true) - protected String type; - @XmlAttribute(name = "ref") - protected String ref; - - /** - * Gets the value of the type property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getType() { - return type; - } - - /** - * Sets the value of the type property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setType(String value) { - this.type = value; - } - - /** - * Gets the value of the ref property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getRef() { - return ref; - } - - /** - * Sets the value of the ref property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setRef(String value) { - this.ref = value; - } - + public void setRef(String value) + { + this.ref = value; } + } + } diff --git a/src/jalview/xml/binding/uniprot/KeywordType.java b/src/jalview/xml/binding/uniprot/KeywordType.java index 21590e4..ac58dfd 100644 --- a/src/jalview/xml/binding/uniprot/KeywordType.java +++ b/src/jalview/xml/binding/uniprot/KeywordType.java @@ -5,7 +5,6 @@ // Generated on: 2019.04.05 at 08:01:44 AM BST // - package jalview.xml.binding.uniprot; import java.util.ArrayList; @@ -16,11 +15,13 @@ import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlValue; - /** - *

        Java class for keywordType complex type. + *

        + * Java class for keywordType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="keywordType">
        @@ -36,93 +37,94 @@ import javax.xml.bind.annotation.XmlValue;
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "keywordType", propOrder = {
        -    "value"
        -})
        -public class KeywordType {
        +@XmlType(name = "keywordType", propOrder = { "value" })
        +public class KeywordType
        +{
         
        -    @XmlValue
        -    protected String value;
        -    @XmlAttribute(name = "evidence")
        -    protected List evidence;
        -    @XmlAttribute(name = "id", required = true)
        -    protected String id;
        +  @XmlValue
        +  protected String value;
         
        -    /**
        -     * Gets the value of the value property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getValue() {
        -        return value;
        -    }
        +  @XmlAttribute(name = "evidence")
        +  protected List evidence;
         
        -    /**
        -     * Sets the value of the value property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setValue(String value) {
        -        this.value = value;
        -    }
        +  @XmlAttribute(name = "id", required = true)
        +  protected String id;
         
        -    /**
        -     * Gets the value of the evidence property.
        -     * 
        -     * 

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the evidence property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getEvidence().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link Integer } - * - * - */ - public List getEvidence() { - if (evidence == null) { - evidence = new ArrayList(); - } - return this.evidence; - } + /** + * Gets the value of the value property. + * + * @return possible object is {@link String } + * + */ + public String getValue() + { + return value; + } - /** - * Gets the value of the id property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getId() { - return id; - } + /** + * Sets the value of the value property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setValue(String value) + { + this.value = value; + } - /** - * Sets the value of the id property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setId(String value) { - this.id = value; + /** + * Gets the value of the evidence property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the evidence property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getEvidence().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link Integer } + * + * + */ + public List getEvidence() + { + if (evidence == null) + { + evidence = new ArrayList(); } + return this.evidence; + } + + /** + * Gets the value of the id property. + * + * @return possible object is {@link String } + * + */ + public String getId() + { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setId(String value) + { + this.id = value; + } } diff --git a/src/jalview/xml/binding/uniprot/LocationType.java b/src/jalview/xml/binding/uniprot/LocationType.java index 35d5f87..d1d1457 100644 --- a/src/jalview/xml/binding/uniprot/LocationType.java +++ b/src/jalview/xml/binding/uniprot/LocationType.java @@ -5,7 +5,6 @@ // Generated on: 2019.04.05 at 08:01:44 AM BST // - package jalview.xml.binding.uniprot; import javax.xml.bind.annotation.XmlAccessType; @@ -13,13 +12,17 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlType; - /** - * Describes a sequence location as either a range with a begin and end or as a position. The 'sequence' attribute is only used when the location is not on the canonical sequence displayed in the current entry. + * Describes a sequence location as either a range with a begin and end or as a + * position. The 'sequence' attribute is only used when the location is not on + * the canonical sequence displayed in the current entry. * - *

        Java class for locationType complex type. + *

        + * Java class for locationType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="locationType">
        @@ -41,113 +44,109 @@ import javax.xml.bind.annotation.XmlType;
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "locationType", propOrder = {
        -    "begin",
        -    "end",
        -    "position"
        -})
        -public class LocationType {
        -
        -    protected PositionType begin;
        -    protected PositionType end;
        -    protected PositionType position;
        -    @XmlAttribute(name = "sequence")
        -    protected String sequence;
        -
        -    /**
        -     * Gets the value of the begin property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link PositionType }
        -     *     
        -     */
        -    public PositionType getBegin() {
        -        return begin;
        -    }
        -
        -    /**
        -     * Sets the value of the begin property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link PositionType }
        -     *     
        -     */
        -    public void setBegin(PositionType value) {
        -        this.begin = value;
        -    }
        -
        -    /**
        -     * Gets the value of the end property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link PositionType }
        -     *     
        -     */
        -    public PositionType getEnd() {
        -        return end;
        -    }
        -
        -    /**
        -     * Sets the value of the end property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link PositionType }
        -     *     
        -     */
        -    public void setEnd(PositionType value) {
        -        this.end = value;
        -    }
        -
        -    /**
        -     * Gets the value of the position property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link PositionType }
        -     *     
        -     */
        -    public PositionType getPosition() {
        -        return position;
        -    }
        -
        -    /**
        -     * Sets the value of the position property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link PositionType }
        -     *     
        -     */
        -    public void setPosition(PositionType value) {
        -        this.position = value;
        -    }
        -
        -    /**
        -     * Gets the value of the sequence property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getSequence() {
        -        return sequence;
        -    }
        -
        -    /**
        -     * Sets the value of the sequence property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setSequence(String value) {
        -        this.sequence = value;
        -    }
        +@XmlType(name = "locationType", propOrder = { "begin", "end", "position" })
        +public class LocationType
        +{
        +
        +  protected PositionType begin;
        +
        +  protected PositionType end;
        +
        +  protected PositionType position;
        +
        +  @XmlAttribute(name = "sequence")
        +  protected String sequence;
        +
        +  /**
        +   * Gets the value of the begin property.
        +   * 
        +   * @return possible object is {@link PositionType }
        +   * 
        +   */
        +  public PositionType getBegin()
        +  {
        +    return begin;
        +  }
        +
        +  /**
        +   * Sets the value of the begin property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link PositionType }
        +   * 
        +   */
        +  public void setBegin(PositionType value)
        +  {
        +    this.begin = value;
        +  }
        +
        +  /**
        +   * Gets the value of the end property.
        +   * 
        +   * @return possible object is {@link PositionType }
        +   * 
        +   */
        +  public PositionType getEnd()
        +  {
        +    return end;
        +  }
        +
        +  /**
        +   * Sets the value of the end property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link PositionType }
        +   * 
        +   */
        +  public void setEnd(PositionType value)
        +  {
        +    this.end = value;
        +  }
        +
        +  /**
        +   * Gets the value of the position property.
        +   * 
        +   * @return possible object is {@link PositionType }
        +   * 
        +   */
        +  public PositionType getPosition()
        +  {
        +    return position;
        +  }
        +
        +  /**
        +   * Sets the value of the position property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link PositionType }
        +   * 
        +   */
        +  public void setPosition(PositionType value)
        +  {
        +    this.position = value;
        +  }
        +
        +  /**
        +   * Gets the value of the sequence property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getSequence()
        +  {
        +    return sequence;
        +  }
        +
        +  /**
        +   * Sets the value of the sequence property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setSequence(String value)
        +  {
        +    this.sequence = value;
        +  }
         
         }
        diff --git a/src/jalview/xml/binding/uniprot/MoleculeType.java b/src/jalview/xml/binding/uniprot/MoleculeType.java
        index 197e899..72f6c4f 100644
        --- a/src/jalview/xml/binding/uniprot/MoleculeType.java
        +++ b/src/jalview/xml/binding/uniprot/MoleculeType.java
        @@ -5,7 +5,6 @@
         // Generated on: 2019.04.05 at 08:01:44 AM BST 
         //
         
        -
         package jalview.xml.binding.uniprot;
         
         import javax.xml.bind.annotation.XmlAccessType;
        @@ -14,13 +13,15 @@ import javax.xml.bind.annotation.XmlAttribute;
         import javax.xml.bind.annotation.XmlType;
         import javax.xml.bind.annotation.XmlValue;
         
        -
         /**
          * Describes a molecule by name or unique identifier.
          * 
        - * 

        Java class for moleculeType complex type. + *

        + * Java class for moleculeType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="moleculeType">
        @@ -35,62 +36,60 @@ import javax.xml.bind.annotation.XmlValue;
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "moleculeType", propOrder = {
        -    "value"
        -})
        -public class MoleculeType {
        +@XmlType(name = "moleculeType", propOrder = { "value" })
        +public class MoleculeType
        +{
        +
        +  @XmlValue
        +  protected String value;
         
        -    @XmlValue
        -    protected String value;
        -    @XmlAttribute(name = "id")
        -    protected String id;
        +  @XmlAttribute(name = "id")
        +  protected String id;
         
        -    /**
        -     * Gets the value of the value property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getValue() {
        -        return value;
        -    }
        +  /**
        +   * Gets the value of the value property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getValue()
        +  {
        +    return value;
        +  }
         
        -    /**
        -     * Sets the value of the value property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setValue(String value) {
        -        this.value = value;
        -    }
        +  /**
        +   * Sets the value of the value property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setValue(String value)
        +  {
        +    this.value = value;
        +  }
         
        -    /**
        -     * Gets the value of the id property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getId() {
        -        return id;
        -    }
        +  /**
        +   * Gets the value of the id property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getId()
        +  {
        +    return id;
        +  }
         
        -    /**
        -     * Sets the value of the id property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setId(String value) {
        -        this.id = value;
        -    }
        +  /**
        +   * Sets the value of the id property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setId(String value)
        +  {
        +    this.id = value;
        +  }
         
         }
        diff --git a/src/jalview/xml/binding/uniprot/NameListType.java b/src/jalview/xml/binding/uniprot/NameListType.java
        index 3567be6..947f2f4 100644
        --- a/src/jalview/xml/binding/uniprot/NameListType.java
        +++ b/src/jalview/xml/binding/uniprot/NameListType.java
        @@ -5,7 +5,6 @@
         // Generated on: 2019.04.05 at 08:01:44 AM BST 
         //
         
        -
         package jalview.xml.binding.uniprot;
         
         import java.util.ArrayList;
        @@ -16,11 +15,13 @@ import javax.xml.bind.annotation.XmlElement;
         import javax.xml.bind.annotation.XmlElements;
         import javax.xml.bind.annotation.XmlType;
         
        -
         /**
        - * 

        Java class for nameListType complex type. + *

        + * Java class for nameListType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="nameListType">
        @@ -38,45 +39,45 @@ import javax.xml.bind.annotation.XmlType;
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "nameListType", propOrder = {
        -    "consortiumOrPerson"
        -})
        -public class NameListType {
        +@XmlType(name = "nameListType", propOrder = { "consortiumOrPerson" })
        +public class NameListType
        +{
         
        -    @XmlElements({
        -        @XmlElement(name = "consortium", type = ConsortiumType.class),
        -        @XmlElement(name = "person", type = PersonType.class)
        -    })
        -    protected List consortiumOrPerson;
        +  @XmlElements({
        +      @XmlElement(name = "consortium", type = ConsortiumType.class),
        +      @XmlElement(name = "person", type = PersonType.class) })
        +  protected List consortiumOrPerson;
         
        -    /**
        -     * Gets the value of the consortiumOrPerson property.
        -     * 
        -     * 

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the consortiumOrPerson property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getConsortiumOrPerson().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link ConsortiumType } - * {@link PersonType } - * - * - */ - public List getConsortiumOrPerson() { - if (consortiumOrPerson == null) { - consortiumOrPerson = new ArrayList(); - } - return this.consortiumOrPerson; + /** + * Gets the value of the consortiumOrPerson property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the consortiumOrPerson property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getConsortiumOrPerson().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link ConsortiumType } {@link PersonType } + * + * + */ + public List getConsortiumOrPerson() + { + if (consortiumOrPerson == null) + { + consortiumOrPerson = new ArrayList(); } + return this.consortiumOrPerson; + } } diff --git a/src/jalview/xml/binding/uniprot/ObjectFactory.java b/src/jalview/xml/binding/uniprot/ObjectFactory.java index 67c3d83..a647bd0 100644 --- a/src/jalview/xml/binding/uniprot/ObjectFactory.java +++ b/src/jalview/xml/binding/uniprot/ObjectFactory.java @@ -5,7 +5,6 @@ // Generated on: 2019.04.05 at 08:01:44 AM BST // - package jalview.xml.binding.uniprot; import javax.xml.bind.JAXBElement; @@ -13,496 +12,558 @@ import javax.xml.bind.annotation.XmlElementDecl; import javax.xml.bind.annotation.XmlRegistry; import javax.xml.namespace.QName; - /** - * This object contains factory methods for each - * Java content interface and Java element interface - * generated in the jalview.xml.binding.uniprot package. - *

        An ObjectFactory allows you to programatically - * construct new instances of the Java representation - * for XML content. The Java representation of XML - * content can consist of schema derived interfaces - * and classes representing the binding of schema - * type definitions, element declarations and model - * groups. Factory methods for each of these are - * provided in this class. + * This object contains factory methods for each Java content interface and Java + * element interface generated in the jalview.xml.binding.uniprot package. + *

        + * An ObjectFactory allows you to programatically construct new instances of the + * Java representation for XML content. The Java representation of XML content + * can consist of schema derived interfaces and classes representing the binding + * of schema type definitions, element declarations and model groups. Factory + * methods for each of these are provided in this class. * */ @XmlRegistry -public class ObjectFactory { - - private final static QName _Copyright_QNAME = new QName("http://uniprot.org/uniprot", "copyright"); - - /** - * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: jalview.xml.binding.uniprot - * - */ - public ObjectFactory() { - } - - /** - * Create an instance of {@link SourceDataType } - * - */ - public SourceDataType createSourceDataType() { - return new SourceDataType(); - } - - /** - * Create an instance of {@link IsoformType } - * - */ - public IsoformType createIsoformType() { - return new IsoformType(); - } - - /** - * Create an instance of {@link CommentType } - * - */ - public CommentType createCommentType() { - return new CommentType(); - } - - /** - * Create an instance of {@link CommentType.Conflict } - * - */ - public CommentType.Conflict createCommentTypeConflict() { - return new CommentType.Conflict(); - } - - /** - * Create an instance of {@link OrganismType } - * - */ - public OrganismType createOrganismType() { - return new OrganismType(); - } - - /** - * Create an instance of {@link ProteinType } - * - */ - public ProteinType createProteinType() { - return new ProteinType(); - } - - /** - * Create an instance of {@link Entry } - * - */ - public Entry createEntry() { - return new Entry(); - } - - /** - * Create an instance of {@link GeneType } - * - */ - public GeneType createGeneType() { - return new GeneType(); - } - - /** - * Create an instance of {@link GeneLocationType } - * - */ - public GeneLocationType createGeneLocationType() { - return new GeneLocationType(); - } - - /** - * Create an instance of {@link ReferenceType } - * - */ - public ReferenceType createReferenceType() { - return new ReferenceType(); - } - - /** - * Create an instance of {@link DbReferenceType } - * - */ - public DbReferenceType createDbReferenceType() { - return new DbReferenceType(); - } - - /** - * Create an instance of {@link ProteinExistenceType } - * - */ - public ProteinExistenceType createProteinExistenceType() { - return new ProteinExistenceType(); - } - - /** - * Create an instance of {@link KeywordType } - * - */ - public KeywordType createKeywordType() { - return new KeywordType(); - } - - /** - * Create an instance of {@link FeatureType } - * - */ - public FeatureType createFeatureType() { - return new FeatureType(); - } - - /** - * Create an instance of {@link EvidenceType } - * - */ - public EvidenceType createEvidenceType() { - return new EvidenceType(); - } - - /** - * Create an instance of {@link SequenceType } - * - */ - public SequenceType createSequenceType() { - return new SequenceType(); - } - - /** - * Create an instance of {@link Uniprot } - * - */ - public Uniprot createUniprot() { - return new Uniprot(); - } - - /** - * Create an instance of {@link StatusType } - * - */ - public StatusType createStatusType() { - return new StatusType(); - } - - /** - * Create an instance of {@link PositionType } - * - */ - public PositionType createPositionType() { - return new PositionType(); - } - - /** - * Create an instance of {@link ConsortiumType } - * - */ - public ConsortiumType createConsortiumType() { - return new ConsortiumType(); - } - - /** - * Create an instance of {@link GeneNameType } - * - */ - public GeneNameType createGeneNameType() { - return new GeneNameType(); - } - - /** - * Create an instance of {@link LocationType } - * - */ - public LocationType createLocationType() { - return new LocationType(); - } - - /** - * Create an instance of {@link CitationType } - * - */ - public CitationType createCitationType() { - return new CitationType(); - } - - /** - * Create an instance of {@link PropertyType } - * - */ - public PropertyType createPropertyType() { - return new PropertyType(); - } - - /** - * Create an instance of {@link PhysiologicalReactionType } - * - */ - public PhysiologicalReactionType createPhysiologicalReactionType() { - return new PhysiologicalReactionType(); - } - - /** - * Create an instance of {@link CofactorType } - * - */ - public CofactorType createCofactorType() { - return new CofactorType(); - } - - /** - * Create an instance of {@link EvidencedStringType } - * - */ - public EvidencedStringType createEvidencedStringType() { - return new EvidencedStringType(); - } - - /** - * Create an instance of {@link PersonType } - * - */ - public PersonType createPersonType() { - return new PersonType(); - } - - /** - * Create an instance of {@link ImportedFromType } - * - */ - public ImportedFromType createImportedFromType() { - return new ImportedFromType(); - } - - /** - * Create an instance of {@link EventType } - * - */ - public EventType createEventType() { - return new EventType(); - } - - /** - * Create an instance of {@link InteractantType } - * - */ - public InteractantType createInteractantType() { - return new InteractantType(); - } - - /** - * Create an instance of {@link NameListType } - * - */ - public NameListType createNameListType() { - return new NameListType(); - } - - /** - * Create an instance of {@link ReactionType } - * - */ - public ReactionType createReactionType() { - return new ReactionType(); - } - - /** - * Create an instance of {@link SourceType } - * - */ - public SourceType createSourceType() { - return new SourceType(); - } - - /** - * Create an instance of {@link MoleculeType } - * - */ - public MoleculeType createMoleculeType() { - return new MoleculeType(); - } - - /** - * Create an instance of {@link OrganismNameType } - * - */ - public OrganismNameType createOrganismNameType() { - return new OrganismNameType(); - } - - /** - * Create an instance of {@link SubcellularLocationType } - * - */ - public SubcellularLocationType createSubcellularLocationType() { - return new SubcellularLocationType(); - } - - /** - * Create an instance of {@link SourceDataType.Strain } - * - */ - public SourceDataType.Strain createSourceDataTypeStrain() { - return new SourceDataType.Strain(); - } - - /** - * Create an instance of {@link SourceDataType.Plasmid } - * - */ - public SourceDataType.Plasmid createSourceDataTypePlasmid() { - return new SourceDataType.Plasmid(); - } - - /** - * Create an instance of {@link SourceDataType.Transposon } - * - */ - public SourceDataType.Transposon createSourceDataTypeTransposon() { - return new SourceDataType.Transposon(); - } - - /** - * Create an instance of {@link SourceDataType.Tissue } - * - */ - public SourceDataType.Tissue createSourceDataTypeTissue() { - return new SourceDataType.Tissue(); - } - - /** - * Create an instance of {@link IsoformType.Name } - * - */ - public IsoformType.Name createIsoformTypeName() { - return new IsoformType.Name(); - } - - /** - * Create an instance of {@link IsoformType.Sequence } - * - */ - public IsoformType.Sequence createIsoformTypeSequence() { - return new IsoformType.Sequence(); - } - - /** - * Create an instance of {@link CommentType.Absorption } - * - */ - public CommentType.Absorption createCommentTypeAbsorption() { - return new CommentType.Absorption(); - } - - /** - * Create an instance of {@link CommentType.Kinetics } - * - */ - public CommentType.Kinetics createCommentTypeKinetics() { - return new CommentType.Kinetics(); - } - - /** - * Create an instance of {@link CommentType.PhDependence } - * - */ - public CommentType.PhDependence createCommentTypePhDependence() { - return new CommentType.PhDependence(); - } - - /** - * Create an instance of {@link CommentType.RedoxPotential } - * - */ - public CommentType.RedoxPotential createCommentTypeRedoxPotential() { - return new CommentType.RedoxPotential(); - } - - /** - * Create an instance of {@link CommentType.TemperatureDependence } - * - */ - public CommentType.TemperatureDependence createCommentTypeTemperatureDependence() { - return new CommentType.TemperatureDependence(); - } - - /** - * Create an instance of {@link CommentType.Link } - * - */ - public CommentType.Link createCommentTypeLink() { - return new CommentType.Link(); - } - - /** - * Create an instance of {@link CommentType.Disease } - * - */ - public CommentType.Disease createCommentTypeDisease() { - return new CommentType.Disease(); - } - - /** - * Create an instance of {@link CommentType.Conflict.Sequence } - * - */ - public CommentType.Conflict.Sequence createCommentTypeConflictSequence() { - return new CommentType.Conflict.Sequence(); - } - - /** - * Create an instance of {@link OrganismType.Lineage } - * - */ - public OrganismType.Lineage createOrganismTypeLineage() { - return new OrganismType.Lineage(); - } - - /** - * Create an instance of {@link ProteinType.RecommendedName } - * - */ - public ProteinType.RecommendedName createProteinTypeRecommendedName() { - return new ProteinType.RecommendedName(); - } - - /** - * Create an instance of {@link ProteinType.AlternativeName } - * - */ - public ProteinType.AlternativeName createProteinTypeAlternativeName() { - return new ProteinType.AlternativeName(); - } - - /** - * Create an instance of {@link ProteinType.SubmittedName } - * - */ - public ProteinType.SubmittedName createProteinTypeSubmittedName() { - return new ProteinType.SubmittedName(); - } - - /** - * Create an instance of {@link ProteinType.Domain } - * - */ - public ProteinType.Domain createProteinTypeDomain() { - return new ProteinType.Domain(); - } - - /** - * Create an instance of {@link ProteinType.Component } - * - */ - public ProteinType.Component createProteinTypeComponent() { - return new ProteinType.Component(); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://uniprot.org/uniprot", name = "copyright") - public JAXBElement createCopyright(String value) { - return new JAXBElement(_Copyright_QNAME, String.class, null, value); - } +public class ObjectFactory +{ + + private final static QName _Copyright_QNAME = new QName( + "http://uniprot.org/uniprot", "copyright"); + + /** + * Create a new ObjectFactory that can be used to create new instances of + * schema derived classes for package: jalview.xml.binding.uniprot + * + */ + public ObjectFactory() + { + } + + /** + * Create an instance of {@link SourceDataType } + * + */ + public SourceDataType createSourceDataType() + { + return new SourceDataType(); + } + + /** + * Create an instance of {@link IsoformType } + * + */ + public IsoformType createIsoformType() + { + return new IsoformType(); + } + + /** + * Create an instance of {@link CommentType } + * + */ + public CommentType createCommentType() + { + return new CommentType(); + } + + /** + * Create an instance of {@link CommentType.Conflict } + * + */ + public CommentType.Conflict createCommentTypeConflict() + { + return new CommentType.Conflict(); + } + + /** + * Create an instance of {@link OrganismType } + * + */ + public OrganismType createOrganismType() + { + return new OrganismType(); + } + + /** + * Create an instance of {@link ProteinType } + * + */ + public ProteinType createProteinType() + { + return new ProteinType(); + } + + /** + * Create an instance of {@link Entry } + * + */ + public Entry createEntry() + { + return new Entry(); + } + + /** + * Create an instance of {@link GeneType } + * + */ + public GeneType createGeneType() + { + return new GeneType(); + } + + /** + * Create an instance of {@link GeneLocationType } + * + */ + public GeneLocationType createGeneLocationType() + { + return new GeneLocationType(); + } + + /** + * Create an instance of {@link ReferenceType } + * + */ + public ReferenceType createReferenceType() + { + return new ReferenceType(); + } + + /** + * Create an instance of {@link DbReferenceType } + * + */ + public DbReferenceType createDbReferenceType() + { + return new DbReferenceType(); + } + + /** + * Create an instance of {@link ProteinExistenceType } + * + */ + public ProteinExistenceType createProteinExistenceType() + { + return new ProteinExistenceType(); + } + + /** + * Create an instance of {@link KeywordType } + * + */ + public KeywordType createKeywordType() + { + return new KeywordType(); + } + + /** + * Create an instance of {@link FeatureType } + * + */ + public FeatureType createFeatureType() + { + return new FeatureType(); + } + + /** + * Create an instance of {@link EvidenceType } + * + */ + public EvidenceType createEvidenceType() + { + return new EvidenceType(); + } + + /** + * Create an instance of {@link SequenceType } + * + */ + public SequenceType createSequenceType() + { + return new SequenceType(); + } + + /** + * Create an instance of {@link Uniprot } + * + */ + public Uniprot createUniprot() + { + return new Uniprot(); + } + + /** + * Create an instance of {@link StatusType } + * + */ + public StatusType createStatusType() + { + return new StatusType(); + } + + /** + * Create an instance of {@link PositionType } + * + */ + public PositionType createPositionType() + { + return new PositionType(); + } + + /** + * Create an instance of {@link ConsortiumType } + * + */ + public ConsortiumType createConsortiumType() + { + return new ConsortiumType(); + } + + /** + * Create an instance of {@link GeneNameType } + * + */ + public GeneNameType createGeneNameType() + { + return new GeneNameType(); + } + + /** + * Create an instance of {@link LocationType } + * + */ + public LocationType createLocationType() + { + return new LocationType(); + } + + /** + * Create an instance of {@link CitationType } + * + */ + public CitationType createCitationType() + { + return new CitationType(); + } + + /** + * Create an instance of {@link PropertyType } + * + */ + public PropertyType createPropertyType() + { + return new PropertyType(); + } + + /** + * Create an instance of {@link PhysiologicalReactionType } + * + */ + public PhysiologicalReactionType createPhysiologicalReactionType() + { + return new PhysiologicalReactionType(); + } + + /** + * Create an instance of {@link CofactorType } + * + */ + public CofactorType createCofactorType() + { + return new CofactorType(); + } + + /** + * Create an instance of {@link EvidencedStringType } + * + */ + public EvidencedStringType createEvidencedStringType() + { + return new EvidencedStringType(); + } + + /** + * Create an instance of {@link PersonType } + * + */ + public PersonType createPersonType() + { + return new PersonType(); + } + + /** + * Create an instance of {@link ImportedFromType } + * + */ + public ImportedFromType createImportedFromType() + { + return new ImportedFromType(); + } + + /** + * Create an instance of {@link EventType } + * + */ + public EventType createEventType() + { + return new EventType(); + } + + /** + * Create an instance of {@link InteractantType } + * + */ + public InteractantType createInteractantType() + { + return new InteractantType(); + } + + /** + * Create an instance of {@link NameListType } + * + */ + public NameListType createNameListType() + { + return new NameListType(); + } + + /** + * Create an instance of {@link ReactionType } + * + */ + public ReactionType createReactionType() + { + return new ReactionType(); + } + + /** + * Create an instance of {@link SourceType } + * + */ + public SourceType createSourceType() + { + return new SourceType(); + } + + /** + * Create an instance of {@link MoleculeType } + * + */ + public MoleculeType createMoleculeType() + { + return new MoleculeType(); + } + + /** + * Create an instance of {@link OrganismNameType } + * + */ + public OrganismNameType createOrganismNameType() + { + return new OrganismNameType(); + } + + /** + * Create an instance of {@link SubcellularLocationType } + * + */ + public SubcellularLocationType createSubcellularLocationType() + { + return new SubcellularLocationType(); + } + + /** + * Create an instance of {@link SourceDataType.Strain } + * + */ + public SourceDataType.Strain createSourceDataTypeStrain() + { + return new SourceDataType.Strain(); + } + + /** + * Create an instance of {@link SourceDataType.Plasmid } + * + */ + public SourceDataType.Plasmid createSourceDataTypePlasmid() + { + return new SourceDataType.Plasmid(); + } + + /** + * Create an instance of {@link SourceDataType.Transposon } + * + */ + public SourceDataType.Transposon createSourceDataTypeTransposon() + { + return new SourceDataType.Transposon(); + } + + /** + * Create an instance of {@link SourceDataType.Tissue } + * + */ + public SourceDataType.Tissue createSourceDataTypeTissue() + { + return new SourceDataType.Tissue(); + } + + /** + * Create an instance of {@link IsoformType.Name } + * + */ + public IsoformType.Name createIsoformTypeName() + { + return new IsoformType.Name(); + } + + /** + * Create an instance of {@link IsoformType.Sequence } + * + */ + public IsoformType.Sequence createIsoformTypeSequence() + { + return new IsoformType.Sequence(); + } + + /** + * Create an instance of {@link CommentType.Absorption } + * + */ + public CommentType.Absorption createCommentTypeAbsorption() + { + return new CommentType.Absorption(); + } + + /** + * Create an instance of {@link CommentType.Kinetics } + * + */ + public CommentType.Kinetics createCommentTypeKinetics() + { + return new CommentType.Kinetics(); + } + + /** + * Create an instance of {@link CommentType.PhDependence } + * + */ + public CommentType.PhDependence createCommentTypePhDependence() + { + return new CommentType.PhDependence(); + } + + /** + * Create an instance of {@link CommentType.RedoxPotential } + * + */ + public CommentType.RedoxPotential createCommentTypeRedoxPotential() + { + return new CommentType.RedoxPotential(); + } + + /** + * Create an instance of {@link CommentType.TemperatureDependence } + * + */ + public CommentType.TemperatureDependence createCommentTypeTemperatureDependence() + { + return new CommentType.TemperatureDependence(); + } + + /** + * Create an instance of {@link CommentType.Link } + * + */ + public CommentType.Link createCommentTypeLink() + { + return new CommentType.Link(); + } + + /** + * Create an instance of {@link CommentType.Disease } + * + */ + public CommentType.Disease createCommentTypeDisease() + { + return new CommentType.Disease(); + } + + /** + * Create an instance of {@link CommentType.Conflict.Sequence } + * + */ + public CommentType.Conflict.Sequence createCommentTypeConflictSequence() + { + return new CommentType.Conflict.Sequence(); + } + + /** + * Create an instance of {@link OrganismType.Lineage } + * + */ + public OrganismType.Lineage createOrganismTypeLineage() + { + return new OrganismType.Lineage(); + } + + /** + * Create an instance of {@link ProteinType.RecommendedName } + * + */ + public ProteinType.RecommendedName createProteinTypeRecommendedName() + { + return new ProteinType.RecommendedName(); + } + + /** + * Create an instance of {@link ProteinType.AlternativeName } + * + */ + public ProteinType.AlternativeName createProteinTypeAlternativeName() + { + return new ProteinType.AlternativeName(); + } + + /** + * Create an instance of {@link ProteinType.SubmittedName } + * + */ + public ProteinType.SubmittedName createProteinTypeSubmittedName() + { + return new ProteinType.SubmittedName(); + } + + /** + * Create an instance of {@link ProteinType.Domain } + * + */ + public ProteinType.Domain createProteinTypeDomain() + { + return new ProteinType.Domain(); + } + + /** + * Create an instance of {@link ProteinType.Component } + * + */ + public ProteinType.Component createProteinTypeComponent() + { + return new ProteinType.Component(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link String + * }{@code >}} + * + */ + @XmlElementDecl( + namespace = "http://uniprot.org/uniprot", + name = "copyright") + public JAXBElement createCopyright(String value) + { + return new JAXBElement(_Copyright_QNAME, String.class, null, + value); + } } diff --git a/src/jalview/xml/binding/uniprot/OrganismNameType.java b/src/jalview/xml/binding/uniprot/OrganismNameType.java index fc0ba68..5668759 100644 --- a/src/jalview/xml/binding/uniprot/OrganismNameType.java +++ b/src/jalview/xml/binding/uniprot/OrganismNameType.java @@ -5,7 +5,6 @@ // Generated on: 2019.04.05 at 08:01:44 AM BST // - package jalview.xml.binding.uniprot; import javax.xml.bind.annotation.XmlAccessType; @@ -14,13 +13,15 @@ import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlValue; - /** * Describes different types of source organism names. * - *

        Java class for organismNameType complex type. + *

        + * Java class for organismNameType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="organismNameType">
        @@ -45,62 +46,60 @@ import javax.xml.bind.annotation.XmlValue;
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "organismNameType", propOrder = {
        -    "value"
        -})
        -public class OrganismNameType {
        +@XmlType(name = "organismNameType", propOrder = { "value" })
        +public class OrganismNameType
        +{
        +
        +  @XmlValue
        +  protected String value;
         
        -    @XmlValue
        -    protected String value;
        -    @XmlAttribute(name = "type", required = true)
        -    protected String type;
        +  @XmlAttribute(name = "type", required = true)
        +  protected String type;
         
        -    /**
        -     * Gets the value of the value property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getValue() {
        -        return value;
        -    }
        +  /**
        +   * Gets the value of the value property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getValue()
        +  {
        +    return value;
        +  }
         
        -    /**
        -     * Sets the value of the value property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setValue(String value) {
        -        this.value = value;
        -    }
        +  /**
        +   * Sets the value of the value property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setValue(String value)
        +  {
        +    this.value = value;
        +  }
         
        -    /**
        -     * Gets the value of the type property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getType() {
        -        return type;
        -    }
        +  /**
        +   * Gets the value of the type property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getType()
        +  {
        +    return type;
        +  }
         
        -    /**
        -     * Sets the value of the type property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setType(String value) {
        -        this.type = value;
        -    }
        +  /**
        +   * Sets the value of the type property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setType(String value)
        +  {
        +    this.type = value;
        +  }
         
         }
        diff --git a/src/jalview/xml/binding/uniprot/OrganismType.java b/src/jalview/xml/binding/uniprot/OrganismType.java
        index d75b9b1..e53de4c 100644
        --- a/src/jalview/xml/binding/uniprot/OrganismType.java
        +++ b/src/jalview/xml/binding/uniprot/OrganismType.java
        @@ -5,7 +5,6 @@
         // Generated on: 2019.04.05 at 08:01:44 AM BST 
         //
         
        -
         package jalview.xml.binding.uniprot;
         
         import java.util.ArrayList;
        @@ -16,13 +15,15 @@ import javax.xml.bind.annotation.XmlAttribute;
         import javax.xml.bind.annotation.XmlElement;
         import javax.xml.bind.annotation.XmlType;
         
        -
         /**
          * Describes the source organism.
          * 
        - * 

        Java class for organismType complex type. + *

        + * Java class for organismType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="organismType">
        @@ -52,190 +53,203 @@ import javax.xml.bind.annotation.XmlType;
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "organismType", propOrder = {
        -    "name",
        -    "dbReference",
        -    "lineage"
        -})
        -public class OrganismType {
        -
        -    @XmlElement(required = true)
        -    protected List name;
        -    @XmlElement(required = true)
        -    protected List dbReference;
        -    protected OrganismType.Lineage lineage;
        -    @XmlAttribute(name = "evidence")
        -    protected List evidence;
        -
        -    /**
        -     * Gets the value of the name property.
        -     * 
        -     * 

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the name property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getName().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link OrganismNameType } - * - * - */ - public List getName() { - if (name == null) { - name = new ArrayList(); - } - return this.name; +@XmlType( + name = "organismType", + propOrder = + { "name", "dbReference", "lineage" }) +public class OrganismType +{ + + @XmlElement(required = true) + protected List name; + + @XmlElement(required = true) + protected List dbReference; + + protected OrganismType.Lineage lineage; + + @XmlAttribute(name = "evidence") + protected List evidence; + + /** + * Gets the value of the name property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the name property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getName().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link OrganismNameType } + * + * + */ + public List getName() + { + if (name == null) + { + name = new ArrayList(); } - - /** - * Gets the value of the dbReference property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the dbReference property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getDbReference().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link DbReferenceType } - * - * - */ - public List getDbReference() { - if (dbReference == null) { - dbReference = new ArrayList(); - } - return this.dbReference; + return this.name; + } + + /** + * Gets the value of the dbReference property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the dbReference property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getDbReference().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link DbReferenceType } + * + * + */ + public List getDbReference() + { + if (dbReference == null) + { + dbReference = new ArrayList(); } - - /** - * Gets the value of the lineage property. - * - * @return - * possible object is - * {@link OrganismType.Lineage } - * - */ - public OrganismType.Lineage getLineage() { - return lineage; + return this.dbReference; + } + + /** + * Gets the value of the lineage property. + * + * @return possible object is {@link OrganismType.Lineage } + * + */ + public OrganismType.Lineage getLineage() + { + return lineage; + } + + /** + * Sets the value of the lineage property. + * + * @param value + * allowed object is {@link OrganismType.Lineage } + * + */ + public void setLineage(OrganismType.Lineage value) + { + this.lineage = value; + } + + /** + * Gets the value of the evidence property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the evidence property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getEvidence().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link Integer } + * + * + */ + public List getEvidence() + { + if (evidence == null) + { + evidence = new ArrayList(); } + return this.evidence; + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <complexContent>
        +   *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *       <sequence>
        +   *         <element name="taxon" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
        +   *       </sequence>
        +   *     </restriction>
        +   *   </complexContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "taxon" }) + public static class Lineage + { - /** - * Sets the value of the lineage property. - * - * @param value - * allowed object is - * {@link OrganismType.Lineage } - * - */ - public void setLineage(OrganismType.Lineage value) { - this.lineage = value; - } + @XmlElement(required = true) + protected List taxon; /** - * Gets the value of the evidence property. + * Gets the value of the taxon property. * *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the evidence property. + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the taxon property. * *

        * For example, to add a new item, do as follows: + * *

        -     *    getEvidence().add(newItem);
        +     * getTaxon().add(newItem);
              * 
        * * *

        - * Objects of the following type(s) are allowed in the list - * {@link Integer } + * Objects of the following type(s) are allowed in the list {@link String } * * */ - public List getEvidence() { - if (evidence == null) { - evidence = new ArrayList(); - } - return this.evidence; + public List getTaxon() + { + if (taxon == null) + { + taxon = new ArrayList(); + } + return this.taxon; } - - /** - *

        Java class for anonymous complex type. - * - *

        The following schema fragment specifies the expected content contained within this class. - * - *

        -     * <complexType>
        -     *   <complexContent>
        -     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *       <sequence>
        -     *         <element name="taxon" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
        -     *       </sequence>
        -     *     </restriction>
        -     *   </complexContent>
        -     * </complexType>
        -     * 
        - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "taxon" - }) - public static class Lineage { - - @XmlElement(required = true) - protected List taxon; - - /** - * Gets the value of the taxon property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the taxon property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getTaxon().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link String } - * - * - */ - public List getTaxon() { - if (taxon == null) { - taxon = new ArrayList(); - } - return this.taxon; - } - - } + } } diff --git a/src/jalview/xml/binding/uniprot/PersonType.java b/src/jalview/xml/binding/uniprot/PersonType.java index 6328682..ebbb691 100644 --- a/src/jalview/xml/binding/uniprot/PersonType.java +++ b/src/jalview/xml/binding/uniprot/PersonType.java @@ -5,7 +5,6 @@ // Generated on: 2019.04.05 at 08:01:44 AM BST // - package jalview.xml.binding.uniprot; import javax.xml.bind.annotation.XmlAccessType; @@ -13,11 +12,13 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlType; - /** - *

        Java class for personType complex type. + *

        + * Java class for personType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="personType">
        @@ -33,33 +34,33 @@ import javax.xml.bind.annotation.XmlType;
          */
         @XmlAccessorType(XmlAccessType.FIELD)
         @XmlType(name = "personType")
        -public class PersonType {
        +public class PersonType
        +{
         
        -    @XmlAttribute(name = "name", required = true)
        -    protected String name;
        +  @XmlAttribute(name = "name", required = true)
        +  protected String name;
         
        -    /**
        -     * Gets the value of the name property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getName() {
        -        return name;
        -    }
        +  /**
        +   * Gets the value of the name property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getName()
        +  {
        +    return name;
        +  }
         
        -    /**
        -     * Sets the value of the name property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setName(String value) {
        -        this.name = value;
        -    }
        +  /**
        +   * Sets the value of the name property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setName(String value)
        +  {
        +    this.name = value;
        +  }
         
         }
        diff --git a/src/jalview/xml/binding/uniprot/PhysiologicalReactionType.java b/src/jalview/xml/binding/uniprot/PhysiologicalReactionType.java
        index 8dbf704..95298e4 100644
        --- a/src/jalview/xml/binding/uniprot/PhysiologicalReactionType.java
        +++ b/src/jalview/xml/binding/uniprot/PhysiologicalReactionType.java
        @@ -5,7 +5,6 @@
         // Generated on: 2019.04.05 at 08:01:44 AM BST 
         //
         
        -
         package jalview.xml.binding.uniprot;
         
         import java.util.ArrayList;
        @@ -16,13 +15,15 @@ import javax.xml.bind.annotation.XmlAttribute;
         import javax.xml.bind.annotation.XmlElement;
         import javax.xml.bind.annotation.XmlType;
         
        -
         /**
          * Describes a physiological reaction.
          * 
        - * 

        Java class for physiologicalReactionType complex type. + *

        + * Java class for physiologicalReactionType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="physiologicalReactionType">
        @@ -48,93 +49,94 @@ import javax.xml.bind.annotation.XmlType;
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "physiologicalReactionType", propOrder = {
        -    "dbReference"
        -})
        -public class PhysiologicalReactionType {
        +@XmlType(name = "physiologicalReactionType", propOrder = { "dbReference" })
        +public class PhysiologicalReactionType
        +{
         
        -    @XmlElement(required = true)
        -    protected DbReferenceType dbReference;
        -    @XmlAttribute(name = "direction", required = true)
        -    protected String direction;
        -    @XmlAttribute(name = "evidence")
        -    protected List evidence;
        +  @XmlElement(required = true)
        +  protected DbReferenceType dbReference;
         
        -    /**
        -     * Gets the value of the dbReference property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link DbReferenceType }
        -     *     
        -     */
        -    public DbReferenceType getDbReference() {
        -        return dbReference;
        -    }
        +  @XmlAttribute(name = "direction", required = true)
        +  protected String direction;
         
        -    /**
        -     * Sets the value of the dbReference property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link DbReferenceType }
        -     *     
        -     */
        -    public void setDbReference(DbReferenceType value) {
        -        this.dbReference = value;
        -    }
        +  @XmlAttribute(name = "evidence")
        +  protected List evidence;
         
        -    /**
        -     * Gets the value of the direction property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getDirection() {
        -        return direction;
        -    }
        +  /**
        +   * Gets the value of the dbReference property.
        +   * 
        +   * @return possible object is {@link DbReferenceType }
        +   * 
        +   */
        +  public DbReferenceType getDbReference()
        +  {
        +    return dbReference;
        +  }
         
        -    /**
        -     * Sets the value of the direction property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setDirection(String value) {
        -        this.direction = value;
        -    }
        +  /**
        +   * Sets the value of the dbReference property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link DbReferenceType }
        +   * 
        +   */
        +  public void setDbReference(DbReferenceType value)
        +  {
        +    this.dbReference = value;
        +  }
        +
        +  /**
        +   * Gets the value of the direction property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getDirection()
        +  {
        +    return direction;
        +  }
        +
        +  /**
        +   * Sets the value of the direction property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setDirection(String value)
        +  {
        +    this.direction = value;
        +  }
         
        -    /**
        -     * Gets the value of the evidence property.
        -     * 
        -     * 

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the evidence property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getEvidence().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link Integer } - * - * - */ - public List getEvidence() { - if (evidence == null) { - evidence = new ArrayList(); - } - return this.evidence; + /** + * Gets the value of the evidence property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the evidence property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getEvidence().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link Integer } + * + * + */ + public List getEvidence() + { + if (evidence == null) + { + evidence = new ArrayList(); } + return this.evidence; + } } diff --git a/src/jalview/xml/binding/uniprot/PositionType.java b/src/jalview/xml/binding/uniprot/PositionType.java index a850dbb..c3713fa 100644 --- a/src/jalview/xml/binding/uniprot/PositionType.java +++ b/src/jalview/xml/binding/uniprot/PositionType.java @@ -5,7 +5,6 @@ // Generated on: 2019.04.05 at 08:01:44 AM BST // - package jalview.xml.binding.uniprot; import java.math.BigInteger; @@ -17,11 +16,13 @@ import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; - /** - *

        Java class for positionType complex type. + *

        + * Java class for positionType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="positionType">
        @@ -49,95 +50,101 @@ import javax.xml.bind.annotation.XmlType;
          */
         @XmlAccessorType(XmlAccessType.FIELD)
         @XmlType(name = "positionType")
        -public class PositionType {
        +public class PositionType
        +{
         
        -    @XmlAttribute(name = "position")
        -    @XmlSchemaType(name = "unsignedLong")
        -    protected BigInteger position;
        -    @XmlAttribute(name = "status")
        -    protected String status;
        -    @XmlAttribute(name = "evidence")
        -    protected List evidence;
        +  @XmlAttribute(name = "position")
        +  @XmlSchemaType(name = "unsignedLong")
        +  protected BigInteger position;
         
        -    /**
        -     * Gets the value of the position property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link BigInteger }
        -     *     
        -     */
        -    public BigInteger getPosition() {
        -        return position;
        -    }
        +  @XmlAttribute(name = "status")
        +  protected String status;
         
        -    /**
        -     * Sets the value of the position property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link BigInteger }
        -     *     
        -     */
        -    public void setPosition(BigInteger value) {
        -        this.position = value;
        -    }
        +  @XmlAttribute(name = "evidence")
        +  protected List evidence;
         
        -    /**
        -     * Gets the value of the status property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getStatus() {
        -        if (status == null) {
        -            return "certain";
        -        } else {
        -            return status;
        -        }
        -    }
        +  /**
        +   * Gets the value of the position property.
        +   * 
        +   * @return possible object is {@link BigInteger }
        +   * 
        +   */
        +  public BigInteger getPosition()
        +  {
        +    return position;
        +  }
        +
        +  /**
        +   * Sets the value of the position property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link BigInteger }
        +   * 
        +   */
        +  public void setPosition(BigInteger value)
        +  {
        +    this.position = value;
        +  }
         
        -    /**
        -     * Sets the value of the status property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setStatus(String value) {
        -        this.status = value;
        +  /**
        +   * Gets the value of the status property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getStatus()
        +  {
        +    if (status == null)
        +    {
        +      return "certain";
             }
        +    else
        +    {
        +      return status;
        +    }
        +  }
        +
        +  /**
        +   * Sets the value of the status property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setStatus(String value)
        +  {
        +    this.status = value;
        +  }
         
        -    /**
        -     * Gets the value of the evidence property.
        -     * 
        -     * 

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the evidence property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getEvidence().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link Integer } - * - * - */ - public List getEvidence() { - if (evidence == null) { - evidence = new ArrayList(); - } - return this.evidence; + /** + * Gets the value of the evidence property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the evidence property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getEvidence().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link Integer } + * + * + */ + public List getEvidence() + { + if (evidence == null) + { + evidence = new ArrayList(); } + return this.evidence; + } } diff --git a/src/jalview/xml/binding/uniprot/PropertyType.java b/src/jalview/xml/binding/uniprot/PropertyType.java index 977e428..6b43149 100644 --- a/src/jalview/xml/binding/uniprot/PropertyType.java +++ b/src/jalview/xml/binding/uniprot/PropertyType.java @@ -5,7 +5,6 @@ // Generated on: 2019.04.05 at 08:01:44 AM BST // - package jalview.xml.binding.uniprot; import javax.xml.bind.annotation.XmlAccessType; @@ -13,11 +12,13 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlType; - /** - *

        Java class for propertyType complex type. + *

        + * Java class for propertyType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="propertyType">
        @@ -34,59 +35,59 @@ import javax.xml.bind.annotation.XmlType;
          */
         @XmlAccessorType(XmlAccessType.FIELD)
         @XmlType(name = "propertyType")
        -public class PropertyType {
        +public class PropertyType
        +{
        +
        +  @XmlAttribute(name = "type", required = true)
        +  protected String type;
         
        -    @XmlAttribute(name = "type", required = true)
        -    protected String type;
        -    @XmlAttribute(name = "value", required = true)
        -    protected String value;
        +  @XmlAttribute(name = "value", required = true)
        +  protected String value;
         
        -    /**
        -     * Gets the value of the type property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getType() {
        -        return type;
        -    }
        +  /**
        +   * Gets the value of the type property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getType()
        +  {
        +    return type;
        +  }
         
        -    /**
        -     * Sets the value of the type property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setType(String value) {
        -        this.type = value;
        -    }
        +  /**
        +   * Sets the value of the type property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setType(String value)
        +  {
        +    this.type = value;
        +  }
         
        -    /**
        -     * Gets the value of the value property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getValue() {
        -        return value;
        -    }
        +  /**
        +   * Gets the value of the value property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getValue()
        +  {
        +    return value;
        +  }
         
        -    /**
        -     * Sets the value of the value property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setValue(String value) {
        -        this.value = value;
        -    }
        +  /**
        +   * Sets the value of the value property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setValue(String value)
        +  {
        +    this.value = value;
        +  }
         
         }
        diff --git a/src/jalview/xml/binding/uniprot/ProteinExistenceType.java b/src/jalview/xml/binding/uniprot/ProteinExistenceType.java
        index fb12cd6..3d07edb 100644
        --- a/src/jalview/xml/binding/uniprot/ProteinExistenceType.java
        +++ b/src/jalview/xml/binding/uniprot/ProteinExistenceType.java
        @@ -5,7 +5,6 @@
         // Generated on: 2019.04.05 at 08:01:44 AM BST 
         //
         
        -
         package jalview.xml.binding.uniprot;
         
         import javax.xml.bind.annotation.XmlAccessType;
        @@ -13,14 +12,16 @@ import javax.xml.bind.annotation.XmlAccessorType;
         import javax.xml.bind.annotation.XmlAttribute;
         import javax.xml.bind.annotation.XmlType;
         
        -
         /**
        - * Describes the evidence for the protein's existence.
        - *             Equivalent to the flat file PE-line.
        + * Describes the evidence for the protein's existence. Equivalent to the flat
        + * file PE-line.
          * 
        - * 

        Java class for proteinExistenceType complex type. + *

        + * Java class for proteinExistenceType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="proteinExistenceType">
        @@ -46,33 +47,33 @@ import javax.xml.bind.annotation.XmlType;
          */
         @XmlAccessorType(XmlAccessType.FIELD)
         @XmlType(name = "proteinExistenceType")
        -public class ProteinExistenceType {
        +public class ProteinExistenceType
        +{
         
        -    @XmlAttribute(name = "type", required = true)
        -    protected String type;
        +  @XmlAttribute(name = "type", required = true)
        +  protected String type;
         
        -    /**
        -     * Gets the value of the type property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getType() {
        -        return type;
        -    }
        +  /**
        +   * Gets the value of the type property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getType()
        +  {
        +    return type;
        +  }
         
        -    /**
        -     * Sets the value of the type property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setType(String value) {
        -        this.type = value;
        -    }
        +  /**
        +   * Sets the value of the type property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setType(String value)
        +  {
        +    this.type = value;
        +  }
         
         }
        diff --git a/src/jalview/xml/binding/uniprot/ProteinType.java b/src/jalview/xml/binding/uniprot/ProteinType.java
        index defaff2..5a7d731 100644
        --- a/src/jalview/xml/binding/uniprot/ProteinType.java
        +++ b/src/jalview/xml/binding/uniprot/ProteinType.java
        @@ -5,7 +5,6 @@
         // Generated on: 2019.04.05 at 08:01:44 AM BST 
         //
         
        -
         package jalview.xml.binding.uniprot;
         
         import java.util.ArrayList;
        @@ -15,14 +14,16 @@ import javax.xml.bind.annotation.XmlAccessorType;
         import javax.xml.bind.annotation.XmlElement;
         import javax.xml.bind.annotation.XmlType;
         
        -
         /**
        - * Describes the names for the protein and parts thereof.
        - *             Equivalent to the flat file DE-line.
        + * Describes the names for the protein and parts thereof. Equivalent to the flat
        + * file DE-line.
          * 
        - * 

        Java class for proteinType complex type. + *

        + * Java class for proteinType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="proteinType">
        @@ -57,66 +58,497 @@ import javax.xml.bind.annotation.XmlType;
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "proteinType", propOrder = {
        -    "recommendedName",
        -    "alternativeName",
        -    "submittedName",
        -    "allergenName",
        -    "biotechName",
        -    "cdAntigenName",
        -    "innName",
        -    "domain",
        -    "component"
        -})
        -public class ProteinType {
        +@XmlType(
        +  name = "proteinType",
        +  propOrder =
        +  { "recommendedName", "alternativeName", "submittedName", "allergenName",
        +      "biotechName", "cdAntigenName", "innName", "domain", "component" })
        +public class ProteinType
        +{
        +
        +  protected ProteinType.RecommendedName recommendedName;
        +
        +  protected List alternativeName;
        +
        +  protected List submittedName;
        +
        +  protected EvidencedStringType allergenName;
        +
        +  protected EvidencedStringType biotechName;
        +
        +  protected List cdAntigenName;
        +
        +  protected List innName;
        +
        +  protected List domain;
        +
        +  protected List component;
        +
        +  /**
        +   * Gets the value of the recommendedName property.
        +   * 
        +   * @return possible object is {@link ProteinType.RecommendedName }
        +   * 
        +   */
        +  public ProteinType.RecommendedName getRecommendedName()
        +  {
        +    return recommendedName;
        +  }
        +
        +  /**
        +   * Sets the value of the recommendedName property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link ProteinType.RecommendedName }
        +   * 
        +   */
        +  public void setRecommendedName(ProteinType.RecommendedName value)
        +  {
        +    this.recommendedName = value;
        +  }
        +
        +  /**
        +   * Gets the value of the alternativeName property.
        +   * 
        +   * 

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the alternativeName property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getAlternativeName().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link ProteinType.AlternativeName } + * + * + */ + public List getAlternativeName() + { + if (alternativeName == null) + { + alternativeName = new ArrayList(); + } + return this.alternativeName; + } + + /** + * Gets the value of the submittedName property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the submittedName property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getSubmittedName().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link ProteinType.SubmittedName } + * + * + */ + public List getSubmittedName() + { + if (submittedName == null) + { + submittedName = new ArrayList(); + } + return this.submittedName; + } + + /** + * Gets the value of the allergenName property. + * + * @return possible object is {@link EvidencedStringType } + * + */ + public EvidencedStringType getAllergenName() + { + return allergenName; + } + + /** + * Sets the value of the allergenName property. + * + * @param value + * allowed object is {@link EvidencedStringType } + * + */ + public void setAllergenName(EvidencedStringType value) + { + this.allergenName = value; + } + + /** + * Gets the value of the biotechName property. + * + * @return possible object is {@link EvidencedStringType } + * + */ + public EvidencedStringType getBiotechName() + { + return biotechName; + } + + /** + * Sets the value of the biotechName property. + * + * @param value + * allowed object is {@link EvidencedStringType } + * + */ + public void setBiotechName(EvidencedStringType value) + { + this.biotechName = value; + } + + /** + * Gets the value of the cdAntigenName property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the cdAntigenName property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getCdAntigenName().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * + */ + public List getCdAntigenName() + { + if (cdAntigenName == null) + { + cdAntigenName = new ArrayList(); + } + return this.cdAntigenName; + } + + /** + * Gets the value of the innName property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the innName property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getInnName().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * + */ + public List getInnName() + { + if (innName == null) + { + innName = new ArrayList(); + } + return this.innName; + } + + /** + * Gets the value of the domain property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the domain property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getDomain().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link ProteinType.Domain } + * + * + */ + public List getDomain() + { + if (domain == null) + { + domain = new ArrayList(); + } + return this.domain; + } + + /** + * Gets the value of the component property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the component property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getComponent().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link ProteinType.Component } + * + * + */ + public List getComponent() + { + if (component == null) + { + component = new ArrayList(); + } + return this.component; + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <complexContent>
        +   *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *       <sequence>
        +   *         <element name="fullName" type="{http://uniprot.org/uniprot}evidencedStringType" minOccurs="0"/>
        +   *         <element name="shortName" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
        +   *         <element name="ecNumber" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
        +   *       </sequence>
        +   *     </restriction>
        +   *   </complexContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "fullName", "shortName", "ecNumber" }) + public static class AlternativeName + { + + protected EvidencedStringType fullName; + + protected List shortName; + + protected List ecNumber; + + /** + * Gets the value of the fullName property. + * + * @return possible object is {@link EvidencedStringType } + * + */ + public EvidencedStringType getFullName() + { + return fullName; + } + + /** + * Sets the value of the fullName property. + * + * @param value + * allowed object is {@link EvidencedStringType } + * + */ + public void setFullName(EvidencedStringType value) + { + this.fullName = value; + } + + /** + * Gets the value of the shortName property. + * + *

        + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the shortName property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +     * getShortName().add(newItem);
        +     * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * + */ + public List getShortName() + { + if (shortName == null) + { + shortName = new ArrayList(); + } + return this.shortName; + } + + /** + * Gets the value of the ecNumber property. + * + *

        + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the ecNumber property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +     * getEcNumber().add(newItem);
        +     * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * + */ + public List getEcNumber() + { + if (ecNumber == null) + { + ecNumber = new ArrayList(); + } + return this.ecNumber; + } + + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <complexContent>
        +   *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *       <group ref="{http://uniprot.org/uniprot}proteinNameGroup"/>
        +   *     </restriction>
        +   *   </complexContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType( + name = "", + propOrder = + { "recommendedName", "alternativeName", "submittedName", "allergenName", + "biotechName", "cdAntigenName", "innName" }) + public static class Component + { protected ProteinType.RecommendedName recommendedName; + protected List alternativeName; + protected List submittedName; + protected EvidencedStringType allergenName; + protected EvidencedStringType biotechName; + protected List cdAntigenName; + protected List innName; - protected List domain; - protected List component; /** * Gets the value of the recommendedName property. * - * @return - * possible object is - * {@link ProteinType.RecommendedName } - * + * @return possible object is {@link ProteinType.RecommendedName } + * */ - public ProteinType.RecommendedName getRecommendedName() { - return recommendedName; + public ProteinType.RecommendedName getRecommendedName() + { + return recommendedName; } /** * Sets the value of the recommendedName property. * * @param value - * allowed object is - * {@link ProteinType.RecommendedName } - * + * allowed object is {@link ProteinType.RecommendedName } + * */ - public void setRecommendedName(ProteinType.RecommendedName value) { - this.recommendedName = value; + public void setRecommendedName(ProteinType.RecommendedName value) + { + this.recommendedName = value; } /** * Gets the value of the alternativeName property. * *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the alternativeName property. + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the alternativeName property. * *

        * For example, to add a new item, do as follows: + * *

        -     *    getAlternativeName().add(newItem);
        +     * getAlternativeName().add(newItem);
              * 
        * * @@ -126,26 +558,29 @@ public class ProteinType { * * */ - public List getAlternativeName() { - if (alternativeName == null) { - alternativeName = new ArrayList(); - } - return this.alternativeName; + public List getAlternativeName() + { + if (alternativeName == null) + { + alternativeName = new ArrayList(); + } + return this.alternativeName; } /** * Gets the value of the submittedName property. * *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the submittedName property. + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the submittedName property. * *

        * For example, to add a new item, do as follows: + * *

        -     *    getSubmittedName().add(newItem);
        +     * getSubmittedName().add(newItem);
              * 
        * * @@ -155,74 +590,75 @@ public class ProteinType { * * */ - public List getSubmittedName() { - if (submittedName == null) { - submittedName = new ArrayList(); - } - return this.submittedName; + public List getSubmittedName() + { + if (submittedName == null) + { + submittedName = new ArrayList(); + } + return this.submittedName; } /** * Gets the value of the allergenName property. * - * @return - * possible object is - * {@link EvidencedStringType } - * + * @return possible object is {@link EvidencedStringType } + * */ - public EvidencedStringType getAllergenName() { - return allergenName; + public EvidencedStringType getAllergenName() + { + return allergenName; } /** * Sets the value of the allergenName property. * * @param value - * allowed object is - * {@link EvidencedStringType } - * + * allowed object is {@link EvidencedStringType } + * */ - public void setAllergenName(EvidencedStringType value) { - this.allergenName = value; + public void setAllergenName(EvidencedStringType value) + { + this.allergenName = value; } /** * Gets the value of the biotechName property. * - * @return - * possible object is - * {@link EvidencedStringType } - * + * @return possible object is {@link EvidencedStringType } + * */ - public EvidencedStringType getBiotechName() { - return biotechName; + public EvidencedStringType getBiotechName() + { + return biotechName; } /** * Sets the value of the biotechName property. * * @param value - * allowed object is - * {@link EvidencedStringType } - * + * allowed object is {@link EvidencedStringType } + * */ - public void setBiotechName(EvidencedStringType value) { - this.biotechName = value; + public void setBiotechName(EvidencedStringType value) + { + this.biotechName = value; } /** * Gets the value of the cdAntigenName property. * *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the cdAntigenName property. + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the cdAntigenName property. * *

        * For example, to add a new item, do as follows: + * *

        -     *    getCdAntigenName().add(newItem);
        +     * getCdAntigenName().add(newItem);
              * 
        * * @@ -232,26 +668,29 @@ public class ProteinType { * * */ - public List getCdAntigenName() { - if (cdAntigenName == null) { - cdAntigenName = new ArrayList(); - } - return this.cdAntigenName; + public List getCdAntigenName() + { + if (cdAntigenName == null) + { + cdAntigenName = new ArrayList(); + } + return this.cdAntigenName; } /** * Gets the value of the innName property. * *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the innName property. + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the innName property. * *

        * For example, to add a new item, do as follows: + * *

        -     *    getInnName().add(newItem);
        +     * getInnName().add(newItem);
              * 
        * * @@ -261,849 +700,472 @@ public class ProteinType { * * */ - public List getInnName() { - if (innName == null) { - innName = new ArrayList(); - } - return this.innName; + public List getInnName() + { + if (innName == null) + { + innName = new ArrayList(); + } + return this.innName; + } + + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <complexContent>
        +   *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *       <group ref="{http://uniprot.org/uniprot}proteinNameGroup"/>
        +   *     </restriction>
        +   *   </complexContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType( + name = "", + propOrder = + { "recommendedName", "alternativeName", "submittedName", "allergenName", + "biotechName", "cdAntigenName", "innName" }) + public static class Domain + { + + protected ProteinType.RecommendedName recommendedName; + + protected List alternativeName; + + protected List submittedName; + + protected EvidencedStringType allergenName; + + protected EvidencedStringType biotechName; + + protected List cdAntigenName; + + protected List innName; + + /** + * Gets the value of the recommendedName property. + * + * @return possible object is {@link ProteinType.RecommendedName } + * + */ + public ProteinType.RecommendedName getRecommendedName() + { + return recommendedName; } /** - * Gets the value of the domain property. + * Sets the value of the recommendedName property. + * + * @param value + * allowed object is {@link ProteinType.RecommendedName } + * + */ + public void setRecommendedName(ProteinType.RecommendedName value) + { + this.recommendedName = value; + } + + /** + * Gets the value of the alternativeName property. * *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the domain property. + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the alternativeName property. * *

        * For example, to add a new item, do as follows: + * *

        -     *    getDomain().add(newItem);
        +     * getAlternativeName().add(newItem);
              * 
        * * *

        * Objects of the following type(s) are allowed in the list - * {@link ProteinType.Domain } + * {@link ProteinType.AlternativeName } * * */ - public List getDomain() { - if (domain == null) { - domain = new ArrayList(); - } - return this.domain; + public List getAlternativeName() + { + if (alternativeName == null) + { + alternativeName = new ArrayList(); + } + return this.alternativeName; } /** - * Gets the value of the component property. + * Gets the value of the submittedName property. * *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the component property. + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the submittedName property. * *

        * For example, to add a new item, do as follows: + * *

        -     *    getComponent().add(newItem);
        +     * getSubmittedName().add(newItem);
              * 
        * * *

        * Objects of the following type(s) are allowed in the list - * {@link ProteinType.Component } + * {@link ProteinType.SubmittedName } * * */ - public List getComponent() { - if (component == null) { - component = new ArrayList(); - } - return this.component; + public List getSubmittedName() + { + if (submittedName == null) + { + submittedName = new ArrayList(); + } + return this.submittedName; } + /** + * Gets the value of the allergenName property. + * + * @return possible object is {@link EvidencedStringType } + * + */ + public EvidencedStringType getAllergenName() + { + return allergenName; + } /** - *

        Java class for anonymous complex type. + * Sets the value of the allergenName property. * - *

        The following schema fragment specifies the expected content contained within this class. + * @param value + * allowed object is {@link EvidencedStringType } * - *

        -     * <complexType>
        -     *   <complexContent>
        -     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *       <sequence>
        -     *         <element name="fullName" type="{http://uniprot.org/uniprot}evidencedStringType" minOccurs="0"/>
        -     *         <element name="shortName" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
        -     *         <element name="ecNumber" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
        -     *       </sequence>
        -     *     </restriction>
        -     *   </complexContent>
        -     * </complexType>
        -     * 
        + */ + public void setAllergenName(EvidencedStringType value) + { + this.allergenName = value; + } + + /** + * Gets the value of the biotechName property. * + * @return possible object is {@link EvidencedStringType } * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "fullName", - "shortName", - "ecNumber" - }) - public static class AlternativeName { - - protected EvidencedStringType fullName; - protected List shortName; - protected List ecNumber; - - /** - * Gets the value of the fullName property. - * - * @return - * possible object is - * {@link EvidencedStringType } - * - */ - public EvidencedStringType getFullName() { - return fullName; - } - - /** - * Sets the value of the fullName property. - * - * @param value - * allowed object is - * {@link EvidencedStringType } - * - */ - public void setFullName(EvidencedStringType value) { - this.fullName = value; - } - - /** - * Gets the value of the shortName property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the shortName property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getShortName().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link EvidencedStringType } - * - * - */ - public List getShortName() { - if (shortName == null) { - shortName = new ArrayList(); - } - return this.shortName; - } - - /** - * Gets the value of the ecNumber property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the ecNumber property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getEcNumber().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link EvidencedStringType } - * - * - */ - public List getEcNumber() { - if (ecNumber == null) { - ecNumber = new ArrayList(); - } - return this.ecNumber; - } + public EvidencedStringType getBiotechName() + { + return biotechName; + } + /** + * Sets the value of the biotechName property. + * + * @param value + * allowed object is {@link EvidencedStringType } + * + */ + public void setBiotechName(EvidencedStringType value) + { + this.biotechName = value; } + /** + * Gets the value of the cdAntigenName property. + * + *

        + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the cdAntigenName property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +     * getCdAntigenName().add(newItem);
        +     * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * + */ + public List getCdAntigenName() + { + if (cdAntigenName == null) + { + cdAntigenName = new ArrayList(); + } + return this.cdAntigenName; + } /** - *

        Java class for anonymous complex type. + * Gets the value of the innName property. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the innName property. + * + *

        + * For example, to add a new item, do as follows: * *

        -     * <complexType>
        -     *   <complexContent>
        -     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *       <group ref="{http://uniprot.org/uniprot}proteinNameGroup"/>
        -     *     </restriction>
        -     *   </complexContent>
        -     * </complexType>
        +     * getInnName().add(newItem);
              * 
        * * + *

        + * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "recommendedName", - "alternativeName", - "submittedName", - "allergenName", - "biotechName", - "cdAntigenName", - "innName" - }) - public static class Component { - - protected ProteinType.RecommendedName recommendedName; - protected List alternativeName; - protected List submittedName; - protected EvidencedStringType allergenName; - protected EvidencedStringType biotechName; - protected List cdAntigenName; - protected List innName; - - /** - * Gets the value of the recommendedName property. - * - * @return - * possible object is - * {@link ProteinType.RecommendedName } - * - */ - public ProteinType.RecommendedName getRecommendedName() { - return recommendedName; - } - - /** - * Sets the value of the recommendedName property. - * - * @param value - * allowed object is - * {@link ProteinType.RecommendedName } - * - */ - public void setRecommendedName(ProteinType.RecommendedName value) { - this.recommendedName = value; - } - - /** - * Gets the value of the alternativeName property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the alternativeName property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getAlternativeName().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link ProteinType.AlternativeName } - * - * - */ - public List getAlternativeName() { - if (alternativeName == null) { - alternativeName = new ArrayList(); - } - return this.alternativeName; - } - - /** - * Gets the value of the submittedName property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the submittedName property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getSubmittedName().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link ProteinType.SubmittedName } - * - * - */ - public List getSubmittedName() { - if (submittedName == null) { - submittedName = new ArrayList(); - } - return this.submittedName; - } - - /** - * Gets the value of the allergenName property. - * - * @return - * possible object is - * {@link EvidencedStringType } - * - */ - public EvidencedStringType getAllergenName() { - return allergenName; - } - - /** - * Sets the value of the allergenName property. - * - * @param value - * allowed object is - * {@link EvidencedStringType } - * - */ - public void setAllergenName(EvidencedStringType value) { - this.allergenName = value; - } - - /** - * Gets the value of the biotechName property. - * - * @return - * possible object is - * {@link EvidencedStringType } - * - */ - public EvidencedStringType getBiotechName() { - return biotechName; - } - - /** - * Sets the value of the biotechName property. - * - * @param value - * allowed object is - * {@link EvidencedStringType } - * - */ - public void setBiotechName(EvidencedStringType value) { - this.biotechName = value; - } - - /** - * Gets the value of the cdAntigenName property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the cdAntigenName property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getCdAntigenName().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link EvidencedStringType } - * - * - */ - public List getCdAntigenName() { - if (cdAntigenName == null) { - cdAntigenName = new ArrayList(); - } - return this.cdAntigenName; - } - - /** - * Gets the value of the innName property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the innName property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getInnName().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link EvidencedStringType } - * - * - */ - public List getInnName() { - if (innName == null) { - innName = new ArrayList(); - } - return this.innName; - } + public List getInnName() + { + if (innName == null) + { + innName = new ArrayList(); + } + return this.innName; + } + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <complexContent>
        +   *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *       <sequence>
        +   *         <element name="fullName" type="{http://uniprot.org/uniprot}evidencedStringType"/>
        +   *         <element name="shortName" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
        +   *         <element name="ecNumber" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
        +   *       </sequence>
        +   *     </restriction>
        +   *   </complexContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "fullName", "shortName", "ecNumber" }) + public static class RecommendedName + { + + @XmlElement(required = true) + protected EvidencedStringType fullName; + + protected List shortName; + + protected List ecNumber; + + /** + * Gets the value of the fullName property. + * + * @return possible object is {@link EvidencedStringType } + * + */ + public EvidencedStringType getFullName() + { + return fullName; } + /** + * Sets the value of the fullName property. + * + * @param value + * allowed object is {@link EvidencedStringType } + * + */ + public void setFullName(EvidencedStringType value) + { + this.fullName = value; + } /** - *

        Java class for anonymous complex type. + * Gets the value of the shortName property. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the shortName property. + * + *

        + * For example, to add a new item, do as follows: * *

        -     * <complexType>
        -     *   <complexContent>
        -     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *       <group ref="{http://uniprot.org/uniprot}proteinNameGroup"/>
        -     *     </restriction>
        -     *   </complexContent>
        -     * </complexType>
        +     * getShortName().add(newItem);
              * 
        * * + *

        + * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "recommendedName", - "alternativeName", - "submittedName", - "allergenName", - "biotechName", - "cdAntigenName", - "innName" - }) - public static class Domain { - - protected ProteinType.RecommendedName recommendedName; - protected List alternativeName; - protected List submittedName; - protected EvidencedStringType allergenName; - protected EvidencedStringType biotechName; - protected List cdAntigenName; - protected List innName; - - /** - * Gets the value of the recommendedName property. - * - * @return - * possible object is - * {@link ProteinType.RecommendedName } - * - */ - public ProteinType.RecommendedName getRecommendedName() { - return recommendedName; - } - - /** - * Sets the value of the recommendedName property. - * - * @param value - * allowed object is - * {@link ProteinType.RecommendedName } - * - */ - public void setRecommendedName(ProteinType.RecommendedName value) { - this.recommendedName = value; - } - - /** - * Gets the value of the alternativeName property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the alternativeName property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getAlternativeName().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link ProteinType.AlternativeName } - * - * - */ - public List getAlternativeName() { - if (alternativeName == null) { - alternativeName = new ArrayList(); - } - return this.alternativeName; - } - - /** - * Gets the value of the submittedName property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the submittedName property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getSubmittedName().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link ProteinType.SubmittedName } - * - * - */ - public List getSubmittedName() { - if (submittedName == null) { - submittedName = new ArrayList(); - } - return this.submittedName; - } - - /** - * Gets the value of the allergenName property. - * - * @return - * possible object is - * {@link EvidencedStringType } - * - */ - public EvidencedStringType getAllergenName() { - return allergenName; - } - - /** - * Sets the value of the allergenName property. - * - * @param value - * allowed object is - * {@link EvidencedStringType } - * - */ - public void setAllergenName(EvidencedStringType value) { - this.allergenName = value; - } - - /** - * Gets the value of the biotechName property. - * - * @return - * possible object is - * {@link EvidencedStringType } - * - */ - public EvidencedStringType getBiotechName() { - return biotechName; - } - - /** - * Sets the value of the biotechName property. - * - * @param value - * allowed object is - * {@link EvidencedStringType } - * - */ - public void setBiotechName(EvidencedStringType value) { - this.biotechName = value; - } - - /** - * Gets the value of the cdAntigenName property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the cdAntigenName property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getCdAntigenName().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link EvidencedStringType } - * - * - */ - public List getCdAntigenName() { - if (cdAntigenName == null) { - cdAntigenName = new ArrayList(); - } - return this.cdAntigenName; - } - - /** - * Gets the value of the innName property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the innName property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getInnName().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link EvidencedStringType } - * - * - */ - public List getInnName() { - if (innName == null) { - innName = new ArrayList(); - } - return this.innName; - } - + public List getShortName() + { + if (shortName == null) + { + shortName = new ArrayList(); + } + return this.shortName; } - /** - *

        Java class for anonymous complex type. + * Gets the value of the ecNumber property. + * + *

        + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the ecNumber property. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * For example, to add a new item, do as follows: * *

        -     * <complexType>
        -     *   <complexContent>
        -     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *       <sequence>
        -     *         <element name="fullName" type="{http://uniprot.org/uniprot}evidencedStringType"/>
        -     *         <element name="shortName" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
        -     *         <element name="ecNumber" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
        -     *       </sequence>
        -     *     </restriction>
        -     *   </complexContent>
        -     * </complexType>
        +     * getEcNumber().add(newItem);
              * 
        * * + *

        + * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "fullName", - "shortName", - "ecNumber" - }) - public static class RecommendedName { - - @XmlElement(required = true) - protected EvidencedStringType fullName; - protected List shortName; - protected List ecNumber; - - /** - * Gets the value of the fullName property. - * - * @return - * possible object is - * {@link EvidencedStringType } - * - */ - public EvidencedStringType getFullName() { - return fullName; - } - - /** - * Sets the value of the fullName property. - * - * @param value - * allowed object is - * {@link EvidencedStringType } - * - */ - public void setFullName(EvidencedStringType value) { - this.fullName = value; - } - - /** - * Gets the value of the shortName property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the shortName property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getShortName().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link EvidencedStringType } - * - * - */ - public List getShortName() { - if (shortName == null) { - shortName = new ArrayList(); - } - return this.shortName; - } - - /** - * Gets the value of the ecNumber property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the ecNumber property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getEcNumber().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link EvidencedStringType } - * - * - */ - public List getEcNumber() { - if (ecNumber == null) { - ecNumber = new ArrayList(); - } - return this.ecNumber; - } + public List getEcNumber() + { + if (ecNumber == null) + { + ecNumber = new ArrayList(); + } + return this.ecNumber; + } + + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <complexContent>
        +   *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        +   *       <sequence>
        +   *         <element name="fullName" type="{http://uniprot.org/uniprot}evidencedStringType"/>
        +   *         <element name="ecNumber" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
        +   *       </sequence>
        +   *     </restriction>
        +   *   </complexContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "fullName", "ecNumber" }) + public static class SubmittedName + { + + @XmlElement(required = true) + protected EvidencedStringType fullName; + + protected List ecNumber; + /** + * Gets the value of the fullName property. + * + * @return possible object is {@link EvidencedStringType } + * + */ + public EvidencedStringType getFullName() + { + return fullName; } + /** + * Sets the value of the fullName property. + * + * @param value + * allowed object is {@link EvidencedStringType } + * + */ + public void setFullName(EvidencedStringType value) + { + this.fullName = value; + } /** - *

        Java class for anonymous complex type. + * Gets the value of the ecNumber property. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the ecNumber property. + * + *

        + * For example, to add a new item, do as follows: * *

        -     * <complexType>
        -     *   <complexContent>
        -     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        -     *       <sequence>
        -     *         <element name="fullName" type="{http://uniprot.org/uniprot}evidencedStringType"/>
        -     *         <element name="ecNumber" type="{http://uniprot.org/uniprot}evidencedStringType" maxOccurs="unbounded" minOccurs="0"/>
        -     *       </sequence>
        -     *     </restriction>
        -     *   </complexContent>
        -     * </complexType>
        +     * getEcNumber().add(newItem);
              * 
        * * + *

        + * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "fullName", - "ecNumber" - }) - public static class SubmittedName { - - @XmlElement(required = true) - protected EvidencedStringType fullName; - protected List ecNumber; - - /** - * Gets the value of the fullName property. - * - * @return - * possible object is - * {@link EvidencedStringType } - * - */ - public EvidencedStringType getFullName() { - return fullName; - } - - /** - * Sets the value of the fullName property. - * - * @param value - * allowed object is - * {@link EvidencedStringType } - * - */ - public void setFullName(EvidencedStringType value) { - this.fullName = value; - } - - /** - * Gets the value of the ecNumber property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the ecNumber property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getEcNumber().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link EvidencedStringType } - * - * - */ - public List getEcNumber() { - if (ecNumber == null) { - ecNumber = new ArrayList(); - } - return this.ecNumber; - } - + public List getEcNumber() + { + if (ecNumber == null) + { + ecNumber = new ArrayList(); + } + return this.ecNumber; } + } + } diff --git a/src/jalview/xml/binding/uniprot/ReactionType.java b/src/jalview/xml/binding/uniprot/ReactionType.java index 800f518..bc660fe 100644 --- a/src/jalview/xml/binding/uniprot/ReactionType.java +++ b/src/jalview/xml/binding/uniprot/ReactionType.java @@ -5,7 +5,6 @@ // Generated on: 2019.04.05 at 08:01:44 AM BST // - package jalview.xml.binding.uniprot; import java.util.ArrayList; @@ -16,13 +15,15 @@ import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; - /** * Describes a chemical reaction. * - *

        Java class for reactionType complex type. + *

        + * Java class for reactionType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="reactionType">
        @@ -41,99 +42,103 @@ import javax.xml.bind.annotation.XmlType;
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "reactionType", propOrder = {
        -    "text",
        -    "dbReference"
        -})
        -public class ReactionType {
        +@XmlType(name = "reactionType", propOrder = { "text", "dbReference" })
        +public class ReactionType
        +{
         
        -    @XmlElement(required = true)
        -    protected String text;
        -    @XmlElement(required = true)
        -    protected List dbReference;
        -    @XmlAttribute(name = "evidence")
        -    protected List evidence;
        +  @XmlElement(required = true)
        +  protected String text;
         
        -    /**
        -     * Gets the value of the text property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getText() {
        -        return text;
        -    }
        +  @XmlElement(required = true)
        +  protected List dbReference;
         
        -    /**
        -     * Sets the value of the text property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setText(String value) {
        -        this.text = value;
        -    }
        +  @XmlAttribute(name = "evidence")
        +  protected List evidence;
        +
        +  /**
        +   * Gets the value of the text property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getText()
        +  {
        +    return text;
        +  }
        +
        +  /**
        +   * Sets the value of the text property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setText(String value)
        +  {
        +    this.text = value;
        +  }
         
        -    /**
        -     * Gets the value of the dbReference property.
        -     * 
        -     * 

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the dbReference property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getDbReference().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link DbReferenceType } - * - * - */ - public List getDbReference() { - if (dbReference == null) { - dbReference = new ArrayList(); - } - return this.dbReference; + /** + * Gets the value of the dbReference property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the dbReference property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getDbReference().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link DbReferenceType } + * + * + */ + public List getDbReference() + { + if (dbReference == null) + { + dbReference = new ArrayList(); } + return this.dbReference; + } - /** - * Gets the value of the evidence property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the evidence property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getEvidence().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link Integer } - * - * - */ - public List getEvidence() { - if (evidence == null) { - evidence = new ArrayList(); - } - return this.evidence; + /** + * Gets the value of the evidence property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the evidence property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getEvidence().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link Integer } + * + * + */ + public List getEvidence() + { + if (evidence == null) + { + evidence = new ArrayList(); } + return this.evidence; + } } diff --git a/src/jalview/xml/binding/uniprot/ReferenceType.java b/src/jalview/xml/binding/uniprot/ReferenceType.java index 75fb044..729acae 100644 --- a/src/jalview/xml/binding/uniprot/ReferenceType.java +++ b/src/jalview/xml/binding/uniprot/ReferenceType.java @@ -5,7 +5,6 @@ // Generated on: 2019.04.05 at 08:01:44 AM BST // - package jalview.xml.binding.uniprot; import java.util.ArrayList; @@ -16,14 +15,16 @@ import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; - /** - * Describes a citation and a summary of its content. - * Equivalent to the flat file RN-, RP-, RC-, RX-, RG-, RA-, RT- and RL-lines. + * Describes a citation and a summary of its content. Equivalent to the flat + * file RN-, RP-, RC-, RX-, RG-, RA-, RT- and RL-lines. * - *

        Java class for referenceType complex type. + *

        + * Java class for referenceType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="referenceType">
        @@ -43,151 +44,156 @@ import javax.xml.bind.annotation.XmlType;
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "referenceType", propOrder = {
        -    "citation",
        -    "scope",
        -    "source"
        -})
        -public class ReferenceType {
        -
        -    @XmlElement(required = true)
        -    protected CitationType citation;
        -    @XmlElement(required = true)
        -    protected List scope;
        -    protected SourceDataType source;
        -    @XmlAttribute(name = "evidence")
        -    protected List evidence;
        -    @XmlAttribute(name = "key", required = true)
        -    protected String key;
        -
        -    /**
        -     * Gets the value of the citation property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link CitationType }
        -     *     
        -     */
        -    public CitationType getCitation() {
        -        return citation;
        -    }
        +@XmlType(
        +  name = "referenceType",
        +  propOrder =
        +  { "citation", "scope", "source" })
        +public class ReferenceType
        +{
         
        -    /**
        -     * Sets the value of the citation property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link CitationType }
        -     *     
        -     */
        -    public void setCitation(CitationType value) {
        -        this.citation = value;
        -    }
        +  @XmlElement(required = true)
        +  protected CitationType citation;
         
        -    /**
        -     * Gets the value of the scope property.
        -     * 
        -     * 

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the scope property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getScope().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link String } - * - * - */ - public List getScope() { - if (scope == null) { - scope = new ArrayList(); - } - return this.scope; - } + @XmlElement(required = true) + protected List scope; - /** - * Gets the value of the source property. - * - * @return - * possible object is - * {@link SourceDataType } - * - */ - public SourceDataType getSource() { - return source; - } + protected SourceDataType source; - /** - * Sets the value of the source property. - * - * @param value - * allowed object is - * {@link SourceDataType } - * - */ - public void setSource(SourceDataType value) { - this.source = value; - } + @XmlAttribute(name = "evidence") + protected List evidence; - /** - * Gets the value of the evidence property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the evidence property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getEvidence().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link Integer } - * - * - */ - public List getEvidence() { - if (evidence == null) { - evidence = new ArrayList(); - } - return this.evidence; - } + @XmlAttribute(name = "key", required = true) + protected String key; + + /** + * Gets the value of the citation property. + * + * @return possible object is {@link CitationType } + * + */ + public CitationType getCitation() + { + return citation; + } - /** - * Gets the value of the key property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getKey() { - return key; + /** + * Sets the value of the citation property. + * + * @param value + * allowed object is {@link CitationType } + * + */ + public void setCitation(CitationType value) + { + this.citation = value; + } + + /** + * Gets the value of the scope property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the scope property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getScope().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link String } + * + * + */ + public List getScope() + { + if (scope == null) + { + scope = new ArrayList(); } + return this.scope; + } + + /** + * Gets the value of the source property. + * + * @return possible object is {@link SourceDataType } + * + */ + public SourceDataType getSource() + { + return source; + } - /** - * Sets the value of the key property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setKey(String value) { - this.key = value; + /** + * Sets the value of the source property. + * + * @param value + * allowed object is {@link SourceDataType } + * + */ + public void setSource(SourceDataType value) + { + this.source = value; + } + + /** + * Gets the value of the evidence property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the evidence property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getEvidence().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link Integer } + * + * + */ + public List getEvidence() + { + if (evidence == null) + { + evidence = new ArrayList(); } + return this.evidence; + } + + /** + * Gets the value of the key property. + * + * @return possible object is {@link String } + * + */ + public String getKey() + { + return key; + } + + /** + * Sets the value of the key property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setKey(String value) + { + this.key = value; + } } diff --git a/src/jalview/xml/binding/uniprot/SequenceType.java b/src/jalview/xml/binding/uniprot/SequenceType.java index 8c10faf..78ddd89 100644 --- a/src/jalview/xml/binding/uniprot/SequenceType.java +++ b/src/jalview/xml/binding/uniprot/SequenceType.java @@ -5,7 +5,6 @@ // Generated on: 2019.04.05 at 08:01:44 AM BST // - package jalview.xml.binding.uniprot; import javax.xml.bind.annotation.XmlAccessType; @@ -16,11 +15,13 @@ import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlValue; import javax.xml.datatype.XMLGregorianCalendar; - /** - *

        Java class for sequenceType complex type. + *

        + * Java class for sequenceType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="sequenceType">
        @@ -48,195 +49,202 @@ import javax.xml.datatype.XMLGregorianCalendar;
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "sequenceType", propOrder = {
        -    "value"
        -})
        -public class SequenceType {
        -
        -    @XmlValue
        -    protected String value;
        -    @XmlAttribute(name = "length", required = true)
        -    protected int length;
        -    @XmlAttribute(name = "mass", required = true)
        -    protected int mass;
        -    @XmlAttribute(name = "checksum", required = true)
        -    protected String checksum;
        -    @XmlAttribute(name = "modified", required = true)
        -    @XmlSchemaType(name = "date")
        -    protected XMLGregorianCalendar modified;
        -    @XmlAttribute(name = "version", required = true)
        -    protected int version;
        -    @XmlAttribute(name = "precursor")
        -    protected Boolean precursor;
        -    @XmlAttribute(name = "fragment")
        -    protected String fragment;
        -
        -    /**
        -     * Gets the value of the value property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getValue() {
        -        return value;
        -    }
        -
        -    /**
        -     * Sets the value of the value property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setValue(String value) {
        -        this.value = value;
        -    }
        -
        -    /**
        -     * Gets the value of the length property.
        -     * 
        -     */
        -    public int getLength() {
        -        return length;
        -    }
        -
        -    /**
        -     * Sets the value of the length property.
        -     * 
        -     */
        -    public void setLength(int value) {
        -        this.length = value;
        -    }
        -
        -    /**
        -     * Gets the value of the mass property.
        -     * 
        -     */
        -    public int getMass() {
        -        return mass;
        -    }
        -
        -    /**
        -     * Sets the value of the mass property.
        -     * 
        -     */
        -    public void setMass(int value) {
        -        this.mass = value;
        -    }
        -
        -    /**
        -     * Gets the value of the checksum property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getChecksum() {
        -        return checksum;
        -    }
        -
        -    /**
        -     * Sets the value of the checksum property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setChecksum(String value) {
        -        this.checksum = value;
        -    }
        -
        -    /**
        -     * Gets the value of the modified property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link XMLGregorianCalendar }
        -     *     
        -     */
        -    public XMLGregorianCalendar getModified() {
        -        return modified;
        -    }
        -
        -    /**
        -     * Sets the value of the modified property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link XMLGregorianCalendar }
        -     *     
        -     */
        -    public void setModified(XMLGregorianCalendar value) {
        -        this.modified = value;
        -    }
        -
        -    /**
        -     * Gets the value of the version property.
        -     * 
        -     */
        -    public int getVersion() {
        -        return version;
        -    }
        -
        -    /**
        -     * Sets the value of the version property.
        -     * 
        -     */
        -    public void setVersion(int value) {
        -        this.version = value;
        -    }
        -
        -    /**
        -     * Gets the value of the precursor property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link Boolean }
        -     *     
        -     */
        -    public Boolean isPrecursor() {
        -        return precursor;
        -    }
        -
        -    /**
        -     * Sets the value of the precursor property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link Boolean }
        -     *     
        -     */
        -    public void setPrecursor(Boolean value) {
        -        this.precursor = value;
        -    }
        -
        -    /**
        -     * Gets the value of the fragment property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getFragment() {
        -        return fragment;
        -    }
        -
        -    /**
        -     * Sets the value of the fragment property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setFragment(String value) {
        -        this.fragment = value;
        -    }
        +@XmlType(name = "sequenceType", propOrder = { "value" })
        +public class SequenceType
        +{
        +
        +  @XmlValue
        +  protected String value;
        +
        +  @XmlAttribute(name = "length", required = true)
        +  protected int length;
        +
        +  @XmlAttribute(name = "mass", required = true)
        +  protected int mass;
        +
        +  @XmlAttribute(name = "checksum", required = true)
        +  protected String checksum;
        +
        +  @XmlAttribute(name = "modified", required = true)
        +  @XmlSchemaType(name = "date")
        +  protected XMLGregorianCalendar modified;
        +
        +  @XmlAttribute(name = "version", required = true)
        +  protected int version;
        +
        +  @XmlAttribute(name = "precursor")
        +  protected Boolean precursor;
        +
        +  @XmlAttribute(name = "fragment")
        +  protected String fragment;
        +
        +  /**
        +   * Gets the value of the value property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getValue()
        +  {
        +    return value;
        +  }
        +
        +  /**
        +   * Sets the value of the value property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setValue(String value)
        +  {
        +    this.value = value;
        +  }
        +
        +  /**
        +   * Gets the value of the length property.
        +   * 
        +   */
        +  public int getLength()
        +  {
        +    return length;
        +  }
        +
        +  /**
        +   * Sets the value of the length property.
        +   * 
        +   */
        +  public void setLength(int value)
        +  {
        +    this.length = value;
        +  }
        +
        +  /**
        +   * Gets the value of the mass property.
        +   * 
        +   */
        +  public int getMass()
        +  {
        +    return mass;
        +  }
        +
        +  /**
        +   * Sets the value of the mass property.
        +   * 
        +   */
        +  public void setMass(int value)
        +  {
        +    this.mass = value;
        +  }
        +
        +  /**
        +   * Gets the value of the checksum property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getChecksum()
        +  {
        +    return checksum;
        +  }
        +
        +  /**
        +   * Sets the value of the checksum property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setChecksum(String value)
        +  {
        +    this.checksum = value;
        +  }
        +
        +  /**
        +   * Gets the value of the modified property.
        +   * 
        +   * @return possible object is {@link XMLGregorianCalendar }
        +   * 
        +   */
        +  public XMLGregorianCalendar getModified()
        +  {
        +    return modified;
        +  }
        +
        +  /**
        +   * Sets the value of the modified property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link XMLGregorianCalendar }
        +   * 
        +   */
        +  public void setModified(XMLGregorianCalendar value)
        +  {
        +    this.modified = value;
        +  }
        +
        +  /**
        +   * Gets the value of the version property.
        +   * 
        +   */
        +  public int getVersion()
        +  {
        +    return version;
        +  }
        +
        +  /**
        +   * Sets the value of the version property.
        +   * 
        +   */
        +  public void setVersion(int value)
        +  {
        +    this.version = value;
        +  }
        +
        +  /**
        +   * Gets the value of the precursor property.
        +   * 
        +   * @return possible object is {@link Boolean }
        +   * 
        +   */
        +  public Boolean isPrecursor()
        +  {
        +    return precursor;
        +  }
        +
        +  /**
        +   * Sets the value of the precursor property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link Boolean }
        +   * 
        +   */
        +  public void setPrecursor(Boolean value)
        +  {
        +    this.precursor = value;
        +  }
        +
        +  /**
        +   * Gets the value of the fragment property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getFragment()
        +  {
        +    return fragment;
        +  }
        +
        +  /**
        +   * Sets the value of the fragment property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setFragment(String value)
        +  {
        +    this.fragment = value;
        +  }
         
         }
        diff --git a/src/jalview/xml/binding/uniprot/SourceDataType.java b/src/jalview/xml/binding/uniprot/SourceDataType.java
        index c3838ec..3b71bae 100644
        --- a/src/jalview/xml/binding/uniprot/SourceDataType.java
        +++ b/src/jalview/xml/binding/uniprot/SourceDataType.java
        @@ -5,7 +5,6 @@
         // Generated on: 2019.04.05 at 08:01:44 AM BST 
         //
         
        -
         package jalview.xml.binding.uniprot;
         
         import java.util.ArrayList;
        @@ -18,14 +17,16 @@ import javax.xml.bind.annotation.XmlElements;
         import javax.xml.bind.annotation.XmlType;
         import javax.xml.bind.annotation.XmlValue;
         
        -
         /**
        - * Describes the source of the sequence according to the citation.
        - *             Equivalent to the flat file RC-line.
        + * Describes the source of the sequence according to the citation. Equivalent to
        + * the flat file RC-line.
          * 
        - * 

        Java class for sourceDataType complex type. + *

        + * Java class for sourceDataType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="sourceDataType">
        @@ -77,385 +78,401 @@ import javax.xml.bind.annotation.XmlValue;
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "sourceDataType", propOrder = {
        -    "strainOrPlasmidOrTransposon"
        -})
        -public class SourceDataType {
        -
        -    @XmlElements({
        -        @XmlElement(name = "strain", type = SourceDataType.Strain.class),
        -        @XmlElement(name = "plasmid", type = SourceDataType.Plasmid.class),
        -        @XmlElement(name = "transposon", type = SourceDataType.Transposon.class),
        -        @XmlElement(name = "tissue", type = SourceDataType.Tissue.class)
        -    })
        -    protected List strainOrPlasmidOrTransposon;
        +@XmlType(
        +  name = "sourceDataType",
        +  propOrder =
        +  { "strainOrPlasmidOrTransposon" })
        +public class SourceDataType
        +{
        +
        +  @XmlElements({
        +      @XmlElement(name = "strain", type = SourceDataType.Strain.class),
        +      @XmlElement(name = "plasmid", type = SourceDataType.Plasmid.class),
        +      @XmlElement(
        +        name = "transposon",
        +        type = SourceDataType.Transposon.class),
        +      @XmlElement(name = "tissue", type = SourceDataType.Tissue.class) })
        +  protected List strainOrPlasmidOrTransposon;
        +
        +  /**
        +   * Gets the value of the strainOrPlasmidOrTransposon property.
        +   * 
        +   * 

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the strainOrPlasmidOrTransposon property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getStrainOrPlasmidOrTransposon().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link SourceDataType.Strain } {@link SourceDataType.Plasmid } + * {@link SourceDataType.Transposon } {@link SourceDataType.Tissue } + * + * + */ + public List getStrainOrPlasmidOrTransposon() + { + if (strainOrPlasmidOrTransposon == null) + { + strainOrPlasmidOrTransposon = new ArrayList(); + } + return this.strainOrPlasmidOrTransposon; + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <simpleContent>
        +   *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
        +   *       <attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
        +   *     </extension>
        +   *   </simpleContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "value" }) + public static class Plasmid + { + + @XmlValue + protected String value; + + @XmlAttribute(name = "evidence") + protected List evidence; + + /** + * Gets the value of the value property. + * + * @return possible object is {@link String } + * + */ + public String getValue() + { + return value; + } /** - * Gets the value of the strainOrPlasmidOrTransposon property. + * Sets the value of the value property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setValue(String value) + { + this.value = value; + } + + /** + * Gets the value of the evidence property. * *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the strainOrPlasmidOrTransposon property. + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the evidence property. * *

        * For example, to add a new item, do as follows: + * *

        -     *    getStrainOrPlasmidOrTransposon().add(newItem);
        +     * getEvidence().add(newItem);
              * 
        * * *

        - * Objects of the following type(s) are allowed in the list - * {@link SourceDataType.Strain } - * {@link SourceDataType.Plasmid } - * {@link SourceDataType.Transposon } - * {@link SourceDataType.Tissue } + * Objects of the following type(s) are allowed in the list {@link Integer } * * */ - public List getStrainOrPlasmidOrTransposon() { - if (strainOrPlasmidOrTransposon == null) { - strainOrPlasmidOrTransposon = new ArrayList(); - } - return this.strainOrPlasmidOrTransposon; + public List getEvidence() + { + if (evidence == null) + { + evidence = new ArrayList(); + } + return this.evidence; } + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <simpleContent>
        +   *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
        +   *       <attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
        +   *     </extension>
        +   *   </simpleContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "value" }) + public static class Strain + { + + @XmlValue + protected String value; + + @XmlAttribute(name = "evidence") + protected List evidence; /** - *

        Java class for anonymous complex type. + * Gets the value of the value property. * - *

        The following schema fragment specifies the expected content contained within this class. + * @return possible object is {@link String } * - *

        -     * <complexType>
        -     *   <simpleContent>
        -     *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
        -     *       <attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
        -     *     </extension>
        -     *   </simpleContent>
        -     * </complexType>
        -     * 
        + */ + public String getValue() + { + return value; + } + + /** + * Sets the value of the value property. * + * @param value + * allowed object is {@link String } * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "value" - }) - public static class Plasmid { - - @XmlValue - protected String value; - @XmlAttribute(name = "evidence") - protected List evidence; - - /** - * Gets the value of the value property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the evidence property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the evidence property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getEvidence().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link Integer } - * - * - */ - public List getEvidence() { - if (evidence == null) { - evidence = new ArrayList(); - } - return this.evidence; - } - + public void setValue(String value) + { + this.value = value; } - /** - *

        Java class for anonymous complex type. + * Gets the value of the evidence property. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the evidence property. + * + *

        + * For example, to add a new item, do as follows: * *

        -     * <complexType>
        -     *   <simpleContent>
        -     *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
        -     *       <attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
        -     *     </extension>
        -     *   </simpleContent>
        -     * </complexType>
        +     * getEvidence().add(newItem);
              * 
        * * + *

        + * Objects of the following type(s) are allowed in the list {@link Integer } + * + * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "value" - }) - public static class Strain { - - @XmlValue - protected String value; - @XmlAttribute(name = "evidence") - protected List evidence; - - /** - * Gets the value of the value property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the evidence property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the evidence property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getEvidence().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link Integer } - * - * - */ - public List getEvidence() { - if (evidence == null) { - evidence = new ArrayList(); - } - return this.evidence; - } + public List getEvidence() + { + if (evidence == null) + { + evidence = new ArrayList(); + } + return this.evidence; + } + + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <simpleContent>
        +   *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
        +   *       <attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
        +   *     </extension>
        +   *   </simpleContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "value" }) + public static class Tissue + { + + @XmlValue + protected String value; + + @XmlAttribute(name = "evidence") + protected List evidence; + /** + * Gets the value of the value property. + * + * @return possible object is {@link String } + * + */ + public String getValue() + { + return value; } + /** + * Sets the value of the value property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setValue(String value) + { + this.value = value; + } /** - *

        Java class for anonymous complex type. + * Gets the value of the evidence property. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the evidence property. + * + *

        + * For example, to add a new item, do as follows: * *

        -     * <complexType>
        -     *   <simpleContent>
        -     *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
        -     *       <attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
        -     *     </extension>
        -     *   </simpleContent>
        -     * </complexType>
        +     * getEvidence().add(newItem);
              * 
        * * + *

        + * Objects of the following type(s) are allowed in the list {@link Integer } + * + * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "value" - }) - public static class Tissue { - - @XmlValue - protected String value; - @XmlAttribute(name = "evidence") - protected List evidence; - - /** - * Gets the value of the value property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the evidence property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the evidence property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getEvidence().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link Integer } - * - * - */ - public List getEvidence() { - if (evidence == null) { - evidence = new ArrayList(); - } - return this.evidence; - } + public List getEvidence() + { + if (evidence == null) + { + evidence = new ArrayList(); + } + return this.evidence; + } + } + + /** + *

        + * Java class for anonymous complex type. + * + *

        + * The following schema fragment specifies the expected content contained + * within this class. + * + *

        +   * <complexType>
        +   *   <simpleContent>
        +   *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
        +   *       <attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
        +   *     </extension>
        +   *   </simpleContent>
        +   * </complexType>
        +   * 
        + * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { "value" }) + public static class Transposon + { + + @XmlValue + protected String value; + + @XmlAttribute(name = "evidence") + protected List evidence; + + /** + * Gets the value of the value property. + * + * @return possible object is {@link String } + * + */ + public String getValue() + { + return value; } + /** + * Sets the value of the value property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setValue(String value) + { + this.value = value; + } /** - *

        Java class for anonymous complex type. + * Gets the value of the evidence property. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * This accessor method returns a reference to the live list, not a + * snapshot. Therefore any modification you make to the returned list will + * be present inside the JAXB object. This is why there is not a + * set method for the evidence property. + * + *

        + * For example, to add a new item, do as follows: * *

        -     * <complexType>
        -     *   <simpleContent>
        -     *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
        -     *       <attribute name="evidence" type="{http://uniprot.org/uniprot}intListType" />
        -     *     </extension>
        -     *   </simpleContent>
        -     * </complexType>
        +     * getEvidence().add(newItem);
              * 
        * * + *

        + * Objects of the following type(s) are allowed in the list {@link Integer } + * + * */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "value" - }) - public static class Transposon { - - @XmlValue - protected String value; - @XmlAttribute(name = "evidence") - protected List evidence; - - /** - * Gets the value of the value property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the evidence property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the evidence property. - * - *

        - * For example, to add a new item, do as follows: - *

        -         *    getEvidence().add(newItem);
        -         * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link Integer } - * - * - */ - public List getEvidence() { - if (evidence == null) { - evidence = new ArrayList(); - } - return this.evidence; - } - + public List getEvidence() + { + if (evidence == null) + { + evidence = new ArrayList(); + } + return this.evidence; } + } + } diff --git a/src/jalview/xml/binding/uniprot/SourceType.java b/src/jalview/xml/binding/uniprot/SourceType.java index 2814911..5d71178 100644 --- a/src/jalview/xml/binding/uniprot/SourceType.java +++ b/src/jalview/xml/binding/uniprot/SourceType.java @@ -5,7 +5,6 @@ // Generated on: 2019.04.05 at 08:01:44 AM BST // - package jalview.xml.binding.uniprot; import java.math.BigInteger; @@ -14,13 +13,17 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlType; - /** - * Describes the source of the data using a database cross-reference (or a 'ref' attribute when the source cannot be found in a public data source, such as PubMed, and is cited only within the UniProtKB entry). + * Describes the source of the data using a database cross-reference (or a 'ref' + * attribute when the source cannot be found in a public data source, such as + * PubMed, and is cited only within the UniProtKB entry). * - *

        Java class for sourceType complex type. + *

        + * Java class for sourceType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="sourceType">
        @@ -38,61 +41,59 @@ import javax.xml.bind.annotation.XmlType;
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "sourceType", propOrder = {
        -    "dbReference"
        -})
        -public class SourceType {
        +@XmlType(name = "sourceType", propOrder = { "dbReference" })
        +public class SourceType
        +{
        +
        +  protected DbReferenceType dbReference;
         
        -    protected DbReferenceType dbReference;
        -    @XmlAttribute(name = "ref")
        -    protected BigInteger ref;
        +  @XmlAttribute(name = "ref")
        +  protected BigInteger ref;
         
        -    /**
        -     * Gets the value of the dbReference property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link DbReferenceType }
        -     *     
        -     */
        -    public DbReferenceType getDbReference() {
        -        return dbReference;
        -    }
        +  /**
        +   * Gets the value of the dbReference property.
        +   * 
        +   * @return possible object is {@link DbReferenceType }
        +   * 
        +   */
        +  public DbReferenceType getDbReference()
        +  {
        +    return dbReference;
        +  }
         
        -    /**
        -     * Sets the value of the dbReference property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link DbReferenceType }
        -     *     
        -     */
        -    public void setDbReference(DbReferenceType value) {
        -        this.dbReference = value;
        -    }
        +  /**
        +   * Sets the value of the dbReference property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link DbReferenceType }
        +   * 
        +   */
        +  public void setDbReference(DbReferenceType value)
        +  {
        +    this.dbReference = value;
        +  }
         
        -    /**
        -     * Gets the value of the ref property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link BigInteger }
        -     *     
        -     */
        -    public BigInteger getRef() {
        -        return ref;
        -    }
        +  /**
        +   * Gets the value of the ref property.
        +   * 
        +   * @return possible object is {@link BigInteger }
        +   * 
        +   */
        +  public BigInteger getRef()
        +  {
        +    return ref;
        +  }
         
        -    /**
        -     * Sets the value of the ref property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link BigInteger }
        -     *     
        -     */
        -    public void setRef(BigInteger value) {
        -        this.ref = value;
        -    }
        +  /**
        +   * Sets the value of the ref property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link BigInteger }
        +   * 
        +   */
        +  public void setRef(BigInteger value)
        +  {
        +    this.ref = value;
        +  }
         
         }
        diff --git a/src/jalview/xml/binding/uniprot/StatusType.java b/src/jalview/xml/binding/uniprot/StatusType.java
        index 3f956c3..5f22a99 100644
        --- a/src/jalview/xml/binding/uniprot/StatusType.java
        +++ b/src/jalview/xml/binding/uniprot/StatusType.java
        @@ -5,7 +5,6 @@
         // Generated on: 2019.04.05 at 08:01:44 AM BST 
         //
         
        -
         package jalview.xml.binding.uniprot;
         
         import javax.xml.bind.annotation.XmlAccessType;
        @@ -14,13 +13,15 @@ import javax.xml.bind.annotation.XmlAttribute;
         import javax.xml.bind.annotation.XmlType;
         import javax.xml.bind.annotation.XmlValue;
         
        -
         /**
          * Indicates whether the name of a plasmid is known or unknown.
          * 
        - * 

        Java class for statusType complex type. + *

        + * Java class for statusType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="statusType">
        @@ -42,66 +43,67 @@ import javax.xml.bind.annotation.XmlValue;
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "statusType", propOrder = {
        -    "value"
        -})
        -public class StatusType {
        +@XmlType(name = "statusType", propOrder = { "value" })
        +public class StatusType
        +{
         
        -    @XmlValue
        -    protected String value;
        -    @XmlAttribute(name = "status")
        -    protected String status;
        +  @XmlValue
        +  protected String value;
         
        -    /**
        -     * Gets the value of the value property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getValue() {
        -        return value;
        -    }
        +  @XmlAttribute(name = "status")
        +  protected String status;
         
        -    /**
        -     * Sets the value of the value property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setValue(String value) {
        -        this.value = value;
        -    }
        +  /**
        +   * Gets the value of the value property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getValue()
        +  {
        +    return value;
        +  }
         
        -    /**
        -     * Gets the value of the status property.
        -     * 
        -     * @return
        -     *     possible object is
        -     *     {@link String }
        -     *     
        -     */
        -    public String getStatus() {
        -        if (status == null) {
        -            return "known";
        -        } else {
        -            return status;
        -        }
        -    }
        +  /**
        +   * Sets the value of the value property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setValue(String value)
        +  {
        +    this.value = value;
        +  }
         
        -    /**
        -     * Sets the value of the status property.
        -     * 
        -     * @param value
        -     *     allowed object is
        -     *     {@link String }
        -     *     
        -     */
        -    public void setStatus(String value) {
        -        this.status = value;
        +  /**
        +   * Gets the value of the status property.
        +   * 
        +   * @return possible object is {@link String }
        +   * 
        +   */
        +  public String getStatus()
        +  {
        +    if (status == null)
        +    {
        +      return "known";
        +    }
        +    else
        +    {
        +      return status;
             }
        +  }
        +
        +  /**
        +   * Sets the value of the status property.
        +   * 
        +   * @param value
        +   *          allowed object is {@link String }
        +   * 
        +   */
        +  public void setStatus(String value)
        +  {
        +    this.status = value;
        +  }
         
         }
        diff --git a/src/jalview/xml/binding/uniprot/SubcellularLocationType.java b/src/jalview/xml/binding/uniprot/SubcellularLocationType.java
        index b9ff7d3..f1a06ef 100644
        --- a/src/jalview/xml/binding/uniprot/SubcellularLocationType.java
        +++ b/src/jalview/xml/binding/uniprot/SubcellularLocationType.java
        @@ -5,7 +5,6 @@
         // Generated on: 2019.04.05 at 08:01:44 AM BST 
         //
         
        -
         package jalview.xml.binding.uniprot;
         
         import java.util.ArrayList;
        @@ -15,13 +14,16 @@ import javax.xml.bind.annotation.XmlAccessorType;
         import javax.xml.bind.annotation.XmlElement;
         import javax.xml.bind.annotation.XmlType;
         
        -
         /**
        - * Describes the subcellular location and optionally the topology and orientation of a molecule.
        + * Describes the subcellular location and optionally the topology and
        + * orientation of a molecule.
          * 
        - * 

        Java class for subcellularLocationType complex type. + *

        + * Java class for subcellularLocationType complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType name="subcellularLocationType">
        @@ -40,103 +42,114 @@ import javax.xml.bind.annotation.XmlType;
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "subcellularLocationType", propOrder = {
        -    "location",
        -    "topology",
        -    "orientation"
        -})
        -public class SubcellularLocationType {
        +@XmlType(
        +  name = "subcellularLocationType",
        +  propOrder =
        +  { "location", "topology", "orientation" })
        +public class SubcellularLocationType
        +{
        +
        +  @XmlElement(required = true)
        +  protected List location;
        +
        +  protected List topology;
         
        -    @XmlElement(required = true)
        -    protected List location;
        -    protected List topology;
        -    protected List orientation;
        +  protected List orientation;
         
        -    /**
        -     * Gets the value of the location property.
        -     * 
        -     * 

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the location property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getLocation().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link EvidencedStringType } - * - * - */ - public List getLocation() { - if (location == null) { - location = new ArrayList(); - } - return this.location; + /** + * Gets the value of the location property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the location property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getLocation().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * + */ + public List getLocation() + { + if (location == null) + { + location = new ArrayList(); } + return this.location; + } - /** - * Gets the value of the topology property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the topology property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getTopology().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link EvidencedStringType } - * - * - */ - public List getTopology() { - if (topology == null) { - topology = new ArrayList(); - } - return this.topology; + /** + * Gets the value of the topology property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the topology property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getTopology().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * + */ + public List getTopology() + { + if (topology == null) + { + topology = new ArrayList(); } + return this.topology; + } - /** - * Gets the value of the orientation property. - * - *

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the orientation property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getOrientation().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link EvidencedStringType } - * - * - */ - public List getOrientation() { - if (orientation == null) { - orientation = new ArrayList(); - } - return this.orientation; + /** + * Gets the value of the orientation property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the orientation property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getOrientation().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list + * {@link EvidencedStringType } + * + * + */ + public List getOrientation() + { + if (orientation == null) + { + orientation = new ArrayList(); } + return this.orientation; + } } diff --git a/src/jalview/xml/binding/uniprot/Uniprot.java b/src/jalview/xml/binding/uniprot/Uniprot.java index 5751e61..3383e5d 100644 --- a/src/jalview/xml/binding/uniprot/Uniprot.java +++ b/src/jalview/xml/binding/uniprot/Uniprot.java @@ -5,7 +5,6 @@ // Generated on: 2019.04.05 at 08:01:44 AM BST // - package jalview.xml.binding.uniprot; import java.util.ArrayList; @@ -16,11 +15,13 @@ import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; - /** - *

        Java class for anonymous complex type. + *

        + * Java class for anonymous complex type. * - *

        The following schema fragment specifies the expected content contained within this class. + *

        + * The following schema fragment specifies the expected content contained within + * this class. * *

          * <complexType>
        @@ -38,68 +39,68 @@ import javax.xml.bind.annotation.XmlType;
          * 
          */
         @XmlAccessorType(XmlAccessType.FIELD)
        -@XmlType(name = "", propOrder = {
        -    "entry",
        -    "copyright"
        -})
        +@XmlType(name = "", propOrder = { "entry", "copyright" })
         @XmlRootElement(name = "uniprot")
        -public class Uniprot {
        +public class Uniprot
        +{
         
        -    @XmlElement(required = true)
        -    protected List entry;
        -    protected String copyright;
        +  @XmlElement(required = true)
        +  protected List entry;
         
        -    /**
        -     * Gets the value of the entry property.
        -     * 
        -     * 

        - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the entry property. - * - *

        - * For example, to add a new item, do as follows: - *

        -     *    getEntry().add(newItem);
        -     * 
        - * - * - *

        - * Objects of the following type(s) are allowed in the list - * {@link Entry } - * - * - */ - public List getEntry() { - if (entry == null) { - entry = new ArrayList(); - } - return this.entry; - } + protected String copyright; - /** - * Gets the value of the copyright property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getCopyright() { - return copyright; + /** + * Gets the value of the entry property. + * + *

        + * This accessor method returns a reference to the live list, not a snapshot. + * Therefore any modification you make to the returned list will be present + * inside the JAXB object. This is why there is not a set method + * for the entry property. + * + *

        + * For example, to add a new item, do as follows: + * + *

        +   * getEntry().add(newItem);
        +   * 
        + * + * + *

        + * Objects of the following type(s) are allowed in the list {@link Entry } + * + * + */ + public List getEntry() + { + if (entry == null) + { + entry = new ArrayList(); } + return this.entry; + } - /** - * Sets the value of the copyright property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setCopyright(String value) { - this.copyright = value; - } + /** + * Gets the value of the copyright property. + * + * @return possible object is {@link String } + * + */ + public String getCopyright() + { + return copyright; + } + + /** + * Sets the value of the copyright property. + * + * @param value + * allowed object is {@link String } + * + */ + public void setCopyright(String value) + { + this.copyright = value; + } } diff --git a/src/jalview/xml/binding/uniprot/package-info.java b/src/jalview/xml/binding/uniprot/package-info.java index 71f7eaa..8a7c699 100644 --- a/src/jalview/xml/binding/uniprot/package-info.java +++ b/src/jalview/xml/binding/uniprot/package-info.java @@ -5,5 +5,7 @@ // Generated on: 2019.04.05 at 08:01:44 AM BST // -@javax.xml.bind.annotation.XmlSchema(namespace = "http://uniprot.org/uniprot", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) +@javax.xml.bind.annotation.XmlSchema( + namespace = "http://uniprot.org/uniprot", + elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) package jalview.xml.binding.uniprot; diff --git a/src/mc_view/AppletPDBViewer.java b/src/mc_view/AppletPDBViewer.java index 3ae81d2..a6c4272 100644 --- a/src/mc_view/AppletPDBViewer.java +++ b/src/mc_view/AppletPDBViewer.java @@ -200,8 +200,8 @@ public class AppletPDBViewer extends EmbmenuFrame zappo.addActionListener(this); taylor.setLabel(MessageManager.getString("label.colourScheme_taylor")); taylor.addActionListener(this); - helix.setLabel(MessageManager - .getString("label.colourScheme_helixpropensity")); + helix.setLabel( + MessageManager.getString("label.colourScheme_helixpropensity")); helix.addActionListener(this); strand.setLabel(MessageManager .getString("label.colourScheme_strandpropensity")); diff --git a/src/mc_view/PDBChain.java b/src/mc_view/PDBChain.java index 97514e9..72d276e 100755 --- a/src/mc_view/PDBChain.java +++ b/src/mc_view/PDBChain.java @@ -81,25 +81,28 @@ public class PDBChain String tfacName = "Temperature Factor"; - - public PDBChain(String thePdbid, String theId, String tempFactorColumnName) + public PDBChain(String thePdbid, String theId, + String tempFactorColumnName) { - this.pdbid = thePdbid == null ? thePdbid : thePdbid.toLowerCase(Locale.ROOT); + this.pdbid = thePdbid == null ? thePdbid + : thePdbid.toLowerCase(Locale.ROOT); this.id = theId; - if (tempFactorColumnName!=null && tempFactorColumnName.length()>0) + if (tempFactorColumnName != null && tempFactorColumnName.length() > 0) { tfacName = tempFactorColumnName; } } /** - * import chain data assuming Temperature Factor is in the Temperature Factor column + * import chain data assuming Temperature Factor is in the Temperature Factor + * column + * * @param thePdbid * @param theId */ public PDBChain(String thePdbid, String theId) { - this(thePdbid,theId, null); + this(thePdbid, theId, null); } /** @@ -211,8 +214,8 @@ public class PDBChain } char seqchar = ds.getCharAt(seqpos - ds.getStart()); - boolean sameResidue = Comparison.isSameResidue( - seqchar, strchar, false); + boolean sameResidue = Comparison.isSameResidue(seqchar, strchar, + false); if (sameResidue) { for (Atom atom : res.atoms) @@ -231,12 +234,14 @@ public class PDBChain * @param status * The Status of the transferred annotation * - * @param altPDBID the group id for the features on the destination sequence (e.g. the official accession ID) + * @param altPDBID + * the group id for the features on the destination sequence (e.g. + * the official accession ID) */ - public void transferRESNUMFeatures(SequenceI seq, - String status, String altPDBID) + public void transferRESNUMFeatures(SequenceI seq, String status, + String altPDBID) { - if (altPDBID==null) + if (altPDBID == null) { altPDBID = pdbid; } @@ -267,8 +272,9 @@ public class PDBChain if (feature.getFeatureGroup() != null && feature.getFeatureGroup().equals(pdbid)) { - int newBegin = 1 + residues.elementAt(feature.getBegin() - offset).atoms - .elementAt(0).alignmentMapping; + int newBegin = 1 + + residues.elementAt(feature.getBegin() - offset).atoms + .elementAt(0).alignmentMapping; int newEnd = 1 + residues.elementAt(feature.getEnd() - offset).atoms .elementAt(0).alignmentMapping; SequenceFeature tx = new SequenceFeature(feature, newBegin, newEnd, @@ -417,8 +423,8 @@ public class PDBChain { String desc = currAtom.resName + ":" + currAtom.resNumIns + " " + pdbid + id; - SequenceFeature sf = new SequenceFeature("INSERTION", desc, offset - + count - 1, offset + count - 1, "PDB_INS"); + SequenceFeature sf = new SequenceFeature("INSERTION", desc, + offset + count - 1, offset + count - 1, "PDB_INS"); resFeatures.addElement(sf); residues.lastElement().atoms.addAll(resAtoms); } @@ -430,8 +436,8 @@ public class PDBChain Residue tmpres = residues.lastElement(); Atom tmpat = tmpres.atoms.get(0); // Make A new SequenceFeature for the current residue numbering - String desc = tmpat.resName - + ":" + tmpat.resNumIns + " " + pdbid + id; + String desc = tmpat.resName + ":" + tmpat.resNumIns + " " + pdbid + + id; SequenceFeature sf = new SequenceFeature(RESNUM_FEATURE, desc, offset + count, offset + count, pdbid); resFeatures.addElement(sf); @@ -514,10 +520,10 @@ public class PDBChain min = Math.min(min, annots[i].value); resAnnotation.setElementAt(null, i); } - AlignmentAnnotation tfactorann = new AlignmentAnnotation( - tfacName, tfacName + " for " + pdbid + id, - annots, min, max, AlignmentAnnotation.LINE_GRAPH); - + AlignmentAnnotation tfactorann = new AlignmentAnnotation(tfacName, + tfacName + " for " + pdbid + id, annots, min, max, + AlignmentAnnotation.LINE_GRAPH); + tfactorann.setCalcId(getClass().getName()); tfactorann.setSequenceRef(sequence); @@ -525,7 +531,6 @@ public class PDBChain } } - /** * Colour start/end of bonds by charge *

          diff --git a/src/mc_view/PDBfile.java b/src/mc_view/PDBfile.java index 0eb14cd..54bdca9 100755 --- a/src/mc_view/PDBfile.java +++ b/src/mc_view/PDBfile.java @@ -152,7 +152,8 @@ public class PDBfile extends StructureFile if (tmpchain != null) { tmpchain.atoms.addElement(tmpatom); - } else + } + else { // PDBfile never handles alphafold models tmpchain = new PDBChain(getId(), tmpatom.chain); diff --git a/src/org/jibble/epsgraphics/EpsDocument.java b/src/org/jibble/epsgraphics/EpsDocument.java index 4a58098..4ec529a 100644 --- a/src/org/jibble/epsgraphics/EpsDocument.java +++ b/src/org/jibble/epsgraphics/EpsDocument.java @@ -32,8 +32,8 @@ import java.util.Date; * This represents an EPS document. Several EpsGraphics2D objects may point to * the same EpsDocument. *

          - * Copyright Paul Mutton, http://www.jibble.org/ + * Copyright Paul Mutton, + * http://www.jibble.org/ * */ public class EpsDocument @@ -65,8 +65,8 @@ public class EpsDocument this.minY = minY; this.maxX = maxX; this.maxY = maxY; - _bufferedWriter = new BufferedWriter(new OutputStreamWriter( - outputStream)); + _bufferedWriter = new BufferedWriter( + new OutputStreamWriter(outputStream)); write(_bufferedWriter); } @@ -207,8 +207,8 @@ public class EpsDocument } else { - writer.write(offsetX + " " + ((maxY - minY) - offsetY) - + " translate\n"); + writer.write( + offsetX + " " + ((maxY - minY) - offsetY) + " translate\n"); } writer.flush(); diff --git a/src/org/jibble/epsgraphics/EpsGraphics2D.java b/src/org/jibble/epsgraphics/EpsGraphics2D.java index fe6d962..b8ac5bd 100644 --- a/src/org/jibble/epsgraphics/EpsGraphics2D.java +++ b/src/org/jibble/epsgraphics/EpsGraphics2D.java @@ -114,8 +114,8 @@ import java.util.Map; *

          * Not all methods are implemented yet. Those that are not are clearly labelled. *

          - * Copyright Paul Mutton, http://www.jibble.org/ + * Copyright Paul Mutton, + * http://www.jibble.org/ * */ public class EpsGraphics2D extends java.awt.Graphics2D @@ -176,7 +176,8 @@ public class EpsGraphics2D extends java.awt.Graphics2D int minY, int maxX, int maxY) throws IOException { this(title); - _document = new EpsDocument(title, outputStream, minX, minY, maxX, maxY); + _document = new EpsDocument(title, outputStream, minX, minY, maxX, + maxY); } /** @@ -205,7 +206,8 @@ public class EpsGraphics2D extends java.awt.Graphics2D private void methodNotSupported() { EpsException e = new EpsException(MessageManager.formatMessage( - "exception.eps_method_not_supported", new String[] { VERSION })); + "exception.eps_method_not_supported", new String[] + { VERSION })); e.printStackTrace(System.err); } @@ -405,7 +407,8 @@ public class EpsGraphics2D extends java.awt.Graphics2D * the top left. */ @Override - public void draw3DRect(int x, int y, int width, int height, boolean raised) + public void draw3DRect(int x, int y, int width, int height, + boolean raised) { Color originalColor = getColor(); Stroke originalStroke = getStroke(); @@ -445,7 +448,8 @@ public class EpsGraphics2D extends java.awt.Graphics2D * come from the top left. */ @Override - public void fill3DRect(int x, int y, int width, int height, boolean raised) + public void fill3DRect(int x, int y, int width, int height, + boolean raised) { Color originalColor = getColor(); @@ -512,8 +516,8 @@ public class EpsGraphics2D extends java.awt.Graphics2D WritableRaster wr = img.copyData(null); BufferedImage img1 = new BufferedImage(cm, wr, cm.isAlphaPremultiplied(), properties); - AffineTransform at = AffineTransform.getTranslateInstance( - img.getMinX(), img.getMinY()); + AffineTransform at = AffineTransform.getTranslateInstance(img.getMinX(), + img.getMinY()); at.preConcatenate(xform); drawImage(img1, at, null); } @@ -522,7 +526,8 @@ public class EpsGraphics2D extends java.awt.Graphics2D * Draws a RenderableImage by invoking its createDefaultRendering method. */ @Override - public void drawRenderableImage(RenderableImage img, AffineTransform xform) + public void drawRenderableImage(RenderableImage img, + AffineTransform xform) { drawRenderedImage(img.createDefaultRendering(), xform); } @@ -571,8 +576,8 @@ public class EpsGraphics2D extends java.awt.Graphics2D if (getAccurateTextMode()) { TextLayout layout = new TextLayout(iterator, getFontRenderContext()); - Shape shape = layout.getOutline(AffineTransform.getTranslateInstance( - x, y)); + Shape shape = layout + .getOutline(AffineTransform.getTranslateInstance(x, y)); draw(shape, "fill"); } else @@ -581,8 +586,8 @@ public class EpsGraphics2D extends java.awt.Graphics2D Point2D location = transform(x, y); append(location.getX() + " " + location.getY() + " moveto"); StringBuffer buffer = new StringBuffer(); - for (char ch = iterator.first(); ch != CharacterIterator.DONE; ch = iterator - .next()) + for (char ch = iterator + .first(); ch != CharacterIterator.DONE; ch = iterator.next()) { if (ch == '(' || ch == ')') { @@ -1092,8 +1097,8 @@ public class EpsGraphics2D extends java.awt.Graphics2D } catch (Exception e) { throw new EpsException(MessageManager.formatMessage( - "exception.eps_unable_to_get_inverse_matrix", - new String[] { _transform.toString() })); + "exception.eps_unable_to_get_inverse_matrix", new String[] + { _transform.toString() })); } } } @@ -1238,8 +1243,8 @@ public class EpsGraphics2D extends java.awt.Graphics2D public void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle) { - Shape shape = new Arc2D.Float(x, y, width, height, startAngle, - arcAngle, Arc2D.OPEN); + Shape shape = new Arc2D.Float(x, y, width, height, startAngle, arcAngle, + Arc2D.OPEN); draw(shape); } @@ -1250,8 +1255,8 @@ public class EpsGraphics2D extends java.awt.Graphics2D public void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle) { - Shape shape = new Arc2D.Float(x, y, width, height, startAngle, - arcAngle, Arc2D.PIE); + Shape shape = new Arc2D.Float(x, y, width, height, startAngle, arcAngle, + Arc2D.PIE); draw(shape, "fill"); } @@ -1437,8 +1442,8 @@ public class EpsGraphics2D extends java.awt.Graphics2D } catch (Exception e) { throw new EpsException(MessageManager.formatMessage( - "exception.eps_unable_to_get_inverse_matrix", - new String[] { matrix.toString() })); + "exception.eps_unable_to_get_inverse_matrix", new String[] + { matrix.toString() })); } matrix.scale(1, -1); matrix.getMatrix(m); @@ -1458,9 +1463,9 @@ public class EpsGraphics2D extends java.awt.Graphics2D for (int x = 0; x < width; x++) { Color color = new Color(pixels[x + width * y]); - line.append(toHexString(color.getRed()) - + toHexString(color.getGreen()) - + toHexString(color.getBlue())); + line.append( + toHexString(color.getRed()) + toHexString(color.getGreen()) + + toHexString(color.getBlue())); if (line.length() > 64) { append(line.toString()); diff --git a/src/org/json/CDL.java b/src/org/json/CDL.java index 1c7df32..cc06a80 100644 --- a/src/org/json/CDL.java +++ b/src/org/json/CDL.java @@ -30,258 +30,320 @@ SOFTWARE. * delimited text is a very popular format for data interchange. It is * understood by most database, spreadsheet, and organizer programs. *

          - * Each row of text represents a row in a table or a data record. Each row - * ends with a NEWLINE character. Each row contains one or more values. - * Values are separated by commas. A value can contain any character except - * for comma, unless is is wrapped in single quotes or double quotes. + * Each row of text represents a row in a table or a data record. Each row ends + * with a NEWLINE character. Each row contains one or more values. Values are + * separated by commas. A value can contain any character except for comma, + * unless is is wrapped in single quotes or double quotes. *

          * The first row usually contains the names of the columns. *

          - * A comma delimited list can be converted into a JSONArray of JSONObjects. - * The names for the elements in the JSONObjects can be taken from the names - * in the first row. + * A comma delimited list can be converted into a JSONArray of JSONObjects. The + * names for the elements in the JSONObjects can be taken from the names in the + * first row. + * * @author JSON.org * @version 2016-05-01 */ -public class CDL { +public class CDL +{ - /** - * Get the next value. The value can be wrapped in quotes. The value can - * be empty. - * @param x A JSONTokener of the source text. - * @return The value string, or null if empty. - * @throws JSONException if the quoted string is badly formed. - */ - private static String getValue(JSONTokener x) throws JSONException { - char c; - char q; - StringBuffer sb; - do { - c = x.next(); - } while (c == ' ' || c == '\t'); - switch (c) { - case 0: - return null; - case '"': - case '\'': - q = c; - sb = new StringBuffer(); - for (;;) { - c = x.next(); - if (c == q) { - //Handle escaped double-quote - char nextC = x.next(); - if(nextC != '\"') { - // if our quote was the end of the file, don't step - if(nextC > 0) { - x.back(); - } - break; - } - } - if (c == 0 || c == '\n' || c == '\r') { - throw x.syntaxError("Missing close quote '" + q + "'."); - } - sb.append(c); + /** + * Get the next value. The value can be wrapped in quotes. The value can be + * empty. + * + * @param x + * A JSONTokener of the source text. + * @return The value string, or null if empty. + * @throws JSONException + * if the quoted string is badly formed. + */ + private static String getValue(JSONTokener x) throws JSONException + { + char c; + char q; + StringBuffer sb; + do + { + c = x.next(); + } while (c == ' ' || c == '\t'); + switch (c) + { + case 0: + return null; + case '"': + case '\'': + q = c; + sb = new StringBuffer(); + for (;;) + { + c = x.next(); + if (c == q) + { + // Handle escaped double-quote + char nextC = x.next(); + if (nextC != '\"') + { + // if our quote was the end of the file, don't step + if (nextC > 0) + { + x.back(); } - return sb.toString(); - case ',': - x.back(); - return ""; - default: - x.back(); - return x.nextTo(','); + break; + } } + if (c == 0 || c == '\n' || c == '\r') + { + throw x.syntaxError("Missing close quote '" + q + "'."); + } + sb.append(c); + } + return sb.toString(); + case ',': + x.back(); + return ""; + default: + x.back(); + return x.nextTo(','); } + } - /** - * Produce a JSONArray of strings from a row of comma delimited values. - * @param x A JSONTokener of the source text. - * @return A JSONArray of strings. - * @throws JSONException - */ - public static JSONArray rowToJSONArray(JSONTokener x) throws JSONException { - JSONArray ja = new JSONArray(); - for (;;) { - String value = getValue(x); - char c = x.next(); - if (value == null || - (ja.length() == 0 && value.length() == 0 && c != ',')) { - return null; - } - ja.put(value); - for (;;) { - if (c == ',') { - break; - } - if (c != ' ') { - if (c == '\n' || c == '\r' || c == 0) { - return ja; - } - throw x.syntaxError("Bad character '" + c + "' (" + - (int)c + ")."); - } - c = x.next(); - } + /** + * Produce a JSONArray of strings from a row of comma delimited values. + * + * @param x + * A JSONTokener of the source text. + * @return A JSONArray of strings. + * @throws JSONException + */ + public static JSONArray rowToJSONArray(JSONTokener x) throws JSONException + { + JSONArray ja = new JSONArray(); + for (;;) + { + String value = getValue(x); + char c = x.next(); + if (value == null + || (ja.length() == 0 && value.length() == 0 && c != ',')) + { + return null; + } + ja.put(value); + for (;;) + { + if (c == ',') + { + break; } + if (c != ' ') + { + if (c == '\n' || c == '\r' || c == 0) + { + return ja; + } + throw x.syntaxError( + "Bad character '" + c + "' (" + (int) c + ")."); + } + c = x.next(); + } } + } - /** - * Produce a JSONObject from a row of comma delimited text, using a - * parallel JSONArray of strings to provides the names of the elements. - * @param names A JSONArray of names. This is commonly obtained from the - * first row of a comma delimited text file using the rowToJSONArray - * method. - * @param x A JSONTokener of the source text. - * @return A JSONObject combining the names and values. - * @throws JSONException - */ - public static JSONObject rowToJSONObject(JSONArray names, JSONTokener x) - throws JSONException { - JSONArray ja = rowToJSONArray(x); - return ja != null ? ja.toJSONObject(names) : null; - } + /** + * Produce a JSONObject from a row of comma delimited text, using a parallel + * JSONArray of strings to provides the names of the elements. + * + * @param names + * A JSONArray of names. This is commonly obtained from the first row + * of a comma delimited text file using the rowToJSONArray method. + * @param x + * A JSONTokener of the source text. + * @return A JSONObject combining the names and values. + * @throws JSONException + */ + public static JSONObject rowToJSONObject(JSONArray names, JSONTokener x) + throws JSONException + { + JSONArray ja = rowToJSONArray(x); + return ja != null ? ja.toJSONObject(names) : null; + } - /** - * Produce a comma delimited text row from a JSONArray. Values containing - * the comma character will be quoted. Troublesome characters may be - * removed. - * @param ja A JSONArray of strings. - * @return A string ending in NEWLINE. - */ - public static String rowToString(JSONArray ja) { - StringBuilder sb = new StringBuilder(); - for (int i = 0; i < ja.length(); i += 1) { - if (i > 0) { - sb.append(','); - } - Object object = ja.opt(i); - if (object != null) { - String string = object.toString(); - if (string.length() > 0 && (string.indexOf(',') >= 0 || - string.indexOf('\n') >= 0 || string.indexOf('\r') >= 0 || - string.indexOf(0) >= 0 || string.charAt(0) == '"')) { - sb.append('"'); - int length = string.length(); - for (int j = 0; j < length; j += 1) { - char c = string.charAt(j); - if (c >= ' ' && c != '"') { - sb.append(c); - } - } - sb.append('"'); - } else { - sb.append(string); - } + /** + * Produce a comma delimited text row from a JSONArray. Values containing the + * comma character will be quoted. Troublesome characters may be removed. + * + * @param ja + * A JSONArray of strings. + * @return A string ending in NEWLINE. + */ + public static String rowToString(JSONArray ja) + { + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < ja.length(); i += 1) + { + if (i > 0) + { + sb.append(','); + } + Object object = ja.opt(i); + if (object != null) + { + String string = object.toString(); + if (string.length() > 0 && (string.indexOf(',') >= 0 + || string.indexOf('\n') >= 0 || string.indexOf('\r') >= 0 + || string.indexOf(0) >= 0 || string.charAt(0) == '"')) + { + sb.append('"'); + int length = string.length(); + for (int j = 0; j < length; j += 1) + { + char c = string.charAt(j); + if (c >= ' ' && c != '"') + { + sb.append(c); } + } + sb.append('"'); } - sb.append('\n'); - return sb.toString(); + else + { + sb.append(string); + } + } } + sb.append('\n'); + return sb.toString(); + } - /** - * Produce a JSONArray of JSONObjects from a comma delimited text string, - * using the first row as a source of names. - * @param string The comma delimited text. - * @return A JSONArray of JSONObjects. - * @throws JSONException - */ - public static JSONArray toJSONArray(String string) throws JSONException { - return toJSONArray(new JSONTokener(string)); - } + /** + * Produce a JSONArray of JSONObjects from a comma delimited text string, + * using the first row as a source of names. + * + * @param string + * The comma delimited text. + * @return A JSONArray of JSONObjects. + * @throws JSONException + */ + public static JSONArray toJSONArray(String string) throws JSONException + { + return toJSONArray(new JSONTokener(string)); + } - /** - * Produce a JSONArray of JSONObjects from a comma delimited text string, - * using the first row as a source of names. - * @param x The JSONTokener containing the comma delimited text. - * @return A JSONArray of JSONObjects. - * @throws JSONException - */ - public static JSONArray toJSONArray(JSONTokener x) throws JSONException { - return toJSONArray(rowToJSONArray(x), x); - } + /** + * Produce a JSONArray of JSONObjects from a comma delimited text string, + * using the first row as a source of names. + * + * @param x + * The JSONTokener containing the comma delimited text. + * @return A JSONArray of JSONObjects. + * @throws JSONException + */ + public static JSONArray toJSONArray(JSONTokener x) throws JSONException + { + return toJSONArray(rowToJSONArray(x), x); + } - /** - * Produce a JSONArray of JSONObjects from a comma delimited text string - * using a supplied JSONArray as the source of element names. - * @param names A JSONArray of strings. - * @param string The comma delimited text. - * @return A JSONArray of JSONObjects. - * @throws JSONException - */ - public static JSONArray toJSONArray(JSONArray names, String string) - throws JSONException { - return toJSONArray(names, new JSONTokener(string)); - } + /** + * Produce a JSONArray of JSONObjects from a comma delimited text string using + * a supplied JSONArray as the source of element names. + * + * @param names + * A JSONArray of strings. + * @param string + * The comma delimited text. + * @return A JSONArray of JSONObjects. + * @throws JSONException + */ + public static JSONArray toJSONArray(JSONArray names, String string) + throws JSONException + { + return toJSONArray(names, new JSONTokener(string)); + } - /** - * Produce a JSONArray of JSONObjects from a comma delimited text string - * using a supplied JSONArray as the source of element names. - * @param names A JSONArray of strings. - * @param x A JSONTokener of the source text. - * @return A JSONArray of JSONObjects. - * @throws JSONException - */ - public static JSONArray toJSONArray(JSONArray names, JSONTokener x) - throws JSONException { - if (names == null || names.length() == 0) { - return null; - } - JSONArray ja = new JSONArray(); - for (;;) { - JSONObject jo = rowToJSONObject(names, x); - if (jo == null) { - break; - } - ja.put(jo); - } - if (ja.length() == 0) { - return null; - } - return ja; + /** + * Produce a JSONArray of JSONObjects from a comma delimited text string using + * a supplied JSONArray as the source of element names. + * + * @param names + * A JSONArray of strings. + * @param x + * A JSONTokener of the source text. + * @return A JSONArray of JSONObjects. + * @throws JSONException + */ + public static JSONArray toJSONArray(JSONArray names, JSONTokener x) + throws JSONException + { + if (names == null || names.length() == 0) + { + return null; } + JSONArray ja = new JSONArray(); + for (;;) + { + JSONObject jo = rowToJSONObject(names, x); + if (jo == null) + { + break; + } + ja.put(jo); + } + if (ja.length() == 0) + { + return null; + } + return ja; + } - - /** - * Produce a comma delimited text from a JSONArray of JSONObjects. The - * first row will be a list of names obtained by inspecting the first - * JSONObject. - * @param ja A JSONArray of JSONObjects. - * @return A comma delimited text. - * @throws JSONException - */ - public static String toString(JSONArray ja) throws JSONException { - JSONObject jo = ja.optJSONObject(0); - if (jo != null) { - JSONArray names = jo.names(); - if (names != null) { - return rowToString(names) + toString(names, ja); - } - } - return null; + /** + * Produce a comma delimited text from a JSONArray of JSONObjects. The first + * row will be a list of names obtained by inspecting the first JSONObject. + * + * @param ja + * A JSONArray of JSONObjects. + * @return A comma delimited text. + * @throws JSONException + */ + public static String toString(JSONArray ja) throws JSONException + { + JSONObject jo = ja.optJSONObject(0); + if (jo != null) + { + JSONArray names = jo.names(); + if (names != null) + { + return rowToString(names) + toString(names, ja); + } } + return null; + } - /** - * Produce a comma delimited text from a JSONArray of JSONObjects using - * a provided list of names. The list of names is not included in the - * output. - * @param names A JSONArray of strings. - * @param ja A JSONArray of JSONObjects. - * @return A comma delimited text. - * @throws JSONException - */ - public static String toString(JSONArray names, JSONArray ja) - throws JSONException { - if (names == null || names.length() == 0) { - return null; - } - StringBuffer sb = new StringBuffer(); - for (int i = 0; i < ja.length(); i += 1) { - JSONObject jo = ja.optJSONObject(i); - if (jo != null) { - sb.append(rowToString(jo.toJSONArray(names))); - } - } - return sb.toString(); + /** + * Produce a comma delimited text from a JSONArray of JSONObjects using a + * provided list of names. The list of names is not included in the output. + * + * @param names + * A JSONArray of strings. + * @param ja + * A JSONArray of JSONObjects. + * @return A comma delimited text. + * @throws JSONException + */ + public static String toString(JSONArray names, JSONArray ja) + throws JSONException + { + if (names == null || names.length() == 0) + { + return null; + } + StringBuffer sb = new StringBuffer(); + for (int i = 0; i < ja.length(); i += 1) + { + JSONObject jo = ja.optJSONObject(i); + if (jo != null) + { + sb.append(rowToString(jo.toJSONArray(names))); + } } + return sb.toString(); + } } diff --git a/src/org/json/Cookie.java b/src/org/json/Cookie.java index 348dc68..f410735 100644 --- a/src/org/json/Cookie.java +++ b/src/org/json/Cookie.java @@ -25,145 +25,175 @@ SOFTWARE. */ /** - * Convert a web browser cookie specification to a JSONObject and back. - * JSON and Cookies are both notations for name/value pairs. + * Convert a web browser cookie specification to a JSONObject and back. JSON and + * Cookies are both notations for name/value pairs. + * * @author JSON.org * @version 2015-12-09 */ -public class Cookie { +public class Cookie +{ - /** - * Produce a copy of a string in which the characters '+', '%', '=', ';' - * and control characters are replaced with "%hh". This is a gentle form - * of URL encoding, attempting to cause as little distortion to the - * string as possible. The characters '=' and ';' are meta characters in - * cookies. By convention, they are escaped using the URL-encoding. This is - * only a convention, not a standard. Often, cookies are expected to have - * encoded values. We encode '=' and ';' because we must. We encode '%' and - * '+' because they are meta characters in URL encoding. - * @param string The source string. - * @return The escaped result. - */ - public static String escape(String string) { - char c; - String s = string.trim(); - int length = s.length(); - StringBuilder sb = new StringBuilder(length); - for (int i = 0; i < length; i += 1) { - c = s.charAt(i); - if (c < ' ' || c == '+' || c == '%' || c == '=' || c == ';') { - sb.append('%'); - sb.append(Character.forDigit((char)((c >>> 4) & 0x0f), 16)); - sb.append(Character.forDigit((char)(c & 0x0f), 16)); - } else { - sb.append(c); - } - } - return sb.toString(); + /** + * Produce a copy of a string in which the characters '+', '%', '=', ';' and + * control characters are replaced with "%hh". This is a gentle form of URL + * encoding, attempting to cause as little distortion to the string as + * possible. The characters '=' and ';' are meta characters in cookies. By + * convention, they are escaped using the URL-encoding. This is only a + * convention, not a standard. Often, cookies are expected to have encoded + * values. We encode '=' and ';' because we must. We encode '%' and '+' + * because they are meta characters in URL encoding. + * + * @param string + * The source string. + * @return The escaped result. + */ + public static String escape(String string) + { + char c; + String s = string.trim(); + int length = s.length(); + StringBuilder sb = new StringBuilder(length); + for (int i = 0; i < length; i += 1) + { + c = s.charAt(i); + if (c < ' ' || c == '+' || c == '%' || c == '=' || c == ';') + { + sb.append('%'); + sb.append(Character.forDigit((char) ((c >>> 4) & 0x0f), 16)); + sb.append(Character.forDigit((char) (c & 0x0f), 16)); + } + else + { + sb.append(c); + } } + return sb.toString(); + } - - /** - * Convert a cookie specification string into a JSONObject. The string - * will contain a name value pair separated by '='. The name and the value - * will be unescaped, possibly converting '+' and '%' sequences. The - * cookie properties may follow, separated by ';', also represented as - * name=value (except the secure property, which does not have a value). - * The name will be stored under the key "name", and the value will be - * stored under the key "value". This method does not do checking or - * validation of the parameters. It only converts the cookie string into - * a JSONObject. - * @param string The cookie specification string. - * @return A JSONObject containing "name", "value", and possibly other - * members. - * @throws JSONException - */ - public static JSONObject toJSONObject(String string) throws JSONException { - String name; - JSONObject jo = new JSONObject(); - Object value; - JSONTokener x = new JSONTokener(string); - jo.put("name", x.nextTo('=')); - x.next('='); - jo.put("value", x.nextTo(';')); - x.next(); - while (x.more()) { - name = unescape(x.nextTo("=;")); - if (x.next() != '=') { - if (name.equals("secure")) { - value = Boolean.TRUE; - } else { - throw x.syntaxError("Missing '=' in cookie parameter."); - } - } else { - value = unescape(x.nextTo(';')); - x.next(); - } - jo.put(name, value); + /** + * Convert a cookie specification string into a JSONObject. The string will + * contain a name value pair separated by '='. The name and the value will be + * unescaped, possibly converting '+' and '%' sequences. The cookie properties + * may follow, separated by ';', also represented as name=value (except the + * secure property, which does not have a value). The name will be stored + * under the key "name", and the value will be stored under the key "value". + * This method does not do checking or validation of the parameters. It only + * converts the cookie string into a JSONObject. + * + * @param string + * The cookie specification string. + * @return A JSONObject containing "name", "value", and possibly other + * members. + * @throws JSONException + */ + public static JSONObject toJSONObject(String string) throws JSONException + { + String name; + JSONObject jo = new JSONObject(); + Object value; + JSONTokener x = new JSONTokener(string); + jo.put("name", x.nextTo('=')); + x.next('='); + jo.put("value", x.nextTo(';')); + x.next(); + while (x.more()) + { + name = unescape(x.nextTo("=;")); + if (x.next() != '=') + { + if (name.equals("secure")) + { + value = Boolean.TRUE; + } + else + { + throw x.syntaxError("Missing '=' in cookie parameter."); } - return jo; + } + else + { + value = unescape(x.nextTo(';')); + x.next(); + } + jo.put(name, value); } + return jo; + } + /** + * Convert a JSONObject into a cookie specification string. The JSONObject + * must contain "name" and "value" members. If the JSONObject contains + * "expires", "domain", "path", or "secure" members, they will be appended to + * the cookie specification string. All other members are ignored. + * + * @param jo + * A JSONObject + * @return A cookie specification string + * @throws JSONException + */ + public static String toString(JSONObject jo) throws JSONException + { + StringBuilder sb = new StringBuilder(); - /** - * Convert a JSONObject into a cookie specification string. The JSONObject - * must contain "name" and "value" members. - * If the JSONObject contains "expires", "domain", "path", or "secure" - * members, they will be appended to the cookie specification string. - * All other members are ignored. - * @param jo A JSONObject - * @return A cookie specification string - * @throws JSONException - */ - public static String toString(JSONObject jo) throws JSONException { - StringBuilder sb = new StringBuilder(); - - sb.append(escape(jo.getString("name"))); - sb.append("="); - sb.append(escape(jo.getString("value"))); - if (jo.has("expires")) { - sb.append(";expires="); - sb.append(jo.getString("expires")); - } - if (jo.has("domain")) { - sb.append(";domain="); - sb.append(escape(jo.getString("domain"))); - } - if (jo.has("path")) { - sb.append(";path="); - sb.append(escape(jo.getString("path"))); - } - if (jo.optBoolean("secure")) { - sb.append(";secure"); - } - return sb.toString(); + sb.append(escape(jo.getString("name"))); + sb.append("="); + sb.append(escape(jo.getString("value"))); + if (jo.has("expires")) + { + sb.append(";expires="); + sb.append(jo.getString("expires")); + } + if (jo.has("domain")) + { + sb.append(";domain="); + sb.append(escape(jo.getString("domain"))); + } + if (jo.has("path")) + { + sb.append(";path="); + sb.append(escape(jo.getString("path"))); + } + if (jo.optBoolean("secure")) + { + sb.append(";secure"); } + return sb.toString(); + } - /** - * Convert %hh sequences to single characters, and - * convert plus to space. - * @param string A string that may contain - * + (plus) and - * %hh sequences. - * @return The unescaped string. - */ - public static String unescape(String string) { - int length = string.length(); - StringBuilder sb = new StringBuilder(length); - for (int i = 0; i < length; ++i) { - char c = string.charAt(i); - if (c == '+') { - c = ' '; - } else if (c == '%' && i + 2 < length) { - int d = JSONTokener.dehexchar(string.charAt(i + 1)); - int e = JSONTokener.dehexchar(string.charAt(i + 2)); - if (d >= 0 && e >= 0) { - c = (char)(d * 16 + e); - i += 2; - } - } - sb.append(c); + /** + * Convert %hh sequences to single characters, and convert + * plus to space. + * + * @param string + * A string that may contain + * + (plus) and + * %hh sequences. + * @return The unescaped string. + */ + public static String unescape(String string) + { + int length = string.length(); + StringBuilder sb = new StringBuilder(length); + for (int i = 0; i < length; ++i) + { + char c = string.charAt(i); + if (c == '+') + { + c = ' '; + } + else if (c == '%' && i + 2 < length) + { + int d = JSONTokener.dehexchar(string.charAt(i + 1)); + int e = JSONTokener.dehexchar(string.charAt(i + 2)); + if (d >= 0 && e >= 0) + { + c = (char) (d * 16 + e); + i += 2; } - return sb.toString(); + } + sb.append(c); } + return sb.toString(); + } } diff --git a/src/org/json/CookieList.java b/src/org/json/CookieList.java index c67ee3a..1ae9eea 100644 --- a/src/org/json/CookieList.java +++ b/src/org/json/CookieList.java @@ -26,61 +26,73 @@ SOFTWARE. /** * Convert a web browser cookie list string to a JSONObject and back. + * * @author JSON.org * @version 2015-12-09 */ -public class CookieList { +public class CookieList +{ - /** - * Convert a cookie list into a JSONObject. A cookie list is a sequence - * of name/value pairs. The names are separated from the values by '='. - * The pairs are separated by ';'. The names and the values - * will be unescaped, possibly converting '+' and '%' sequences. - * - * To add a cookie to a cookie list, - * cookielistJSONObject.put(cookieJSONObject.getString("name"), - * cookieJSONObject.getString("value")); - * @param string A cookie list string - * @return A JSONObject - * @throws JSONException - */ - public static JSONObject toJSONObject(String string) throws JSONException { - JSONObject jo = new JSONObject(); - JSONTokener x = new JSONTokener(string); - while (x.more()) { - String name = Cookie.unescape(x.nextTo('=')); - x.next('='); - jo.put(name, Cookie.unescape(x.nextTo(';'))); - x.next(); - } - return jo; + /** + * Convert a cookie list into a JSONObject. A cookie list is a sequence of + * name/value pairs. The names are separated from the values by '='. The pairs + * are separated by ';'. The names and the values will be unescaped, possibly + * converting '+' and '%' sequences. + * + * To add a cookie to a cookie list, + * cookielistJSONObject.put(cookieJSONObject.getString("name"), + * cookieJSONObject.getString("value")); + * + * @param string + * A cookie list string + * @return A JSONObject + * @throws JSONException + */ + public static JSONObject toJSONObject(String string) throws JSONException + { + JSONObject jo = new JSONObject(); + JSONTokener x = new JSONTokener(string); + while (x.more()) + { + String name = Cookie.unescape(x.nextTo('=')); + x.next('='); + jo.put(name, Cookie.unescape(x.nextTo(';'))); + x.next(); } + return jo; + } - /** - * Convert a JSONObject into a cookie list. A cookie list is a sequence - * of name/value pairs. The names are separated from the values by '='. - * The pairs are separated by ';'. The characters '%', '+', '=', and ';' - * in the names and values are replaced by "%hh". - * @param jo A JSONObject - * @return A cookie list string - * @throws JSONException - */ - public static String toString(JSONObject jo) throws JSONException { - boolean b = false; - final StringBuilder sb = new StringBuilder(); - // Don't use the new entrySet API to maintain Android support - for (final String key : jo.keySet()) { - final Object value = jo.opt(key); - if (!JSONObject.NULL.equals(value)) { - if (b) { - sb.append(';'); - } - sb.append(Cookie.escape(key)); - sb.append("="); - sb.append(Cookie.escape(value.toString())); - b = true; - } + /** + * Convert a JSONObject into a cookie list. A cookie list is a sequence of + * name/value pairs. The names are separated from the values by '='. The pairs + * are separated by ';'. The characters '%', '+', '=', and ';' in the names + * and values are replaced by "%hh". + * + * @param jo + * A JSONObject + * @return A cookie list string + * @throws JSONException + */ + public static String toString(JSONObject jo) throws JSONException + { + boolean b = false; + final StringBuilder sb = new StringBuilder(); + // Don't use the new entrySet API to maintain Android support + for (final String key : jo.keySet()) + { + final Object value = jo.opt(key); + if (!JSONObject.NULL.equals(value)) + { + if (b) + { + sb.append(';'); } - return sb.toString(); + sb.append(Cookie.escape(key)); + sb.append("="); + sb.append(Cookie.escape(value.toString())); + b = true; + } } + return sb.toString(); + } } diff --git a/src/org/json/HTTP.java b/src/org/json/HTTP.java index 84ed53b..c74edd7 100644 --- a/src/org/json/HTTP.java +++ b/src/org/json/HTTP.java @@ -28,135 +28,178 @@ import java.util.Locale; /** * Convert an HTTP header to a JSONObject and back. + * * @author JSON.org * @version 2015-12-09 */ -public class HTTP { - - /** Carriage return/line feed. */ - public static final String CRLF = "\r\n"; - - /** - * Convert an HTTP header string into a JSONObject. It can be a request - * header or a response header. A request header will contain - *

          {
          -     *    Method: "POST" (for example),
          -     *    "Request-URI": "/" (for example),
          -     *    "HTTP-Version": "HTTP/1.1" (for example)
          -     * }
          - * A response header will contain - *
          {
          -     *    "HTTP-Version": "HTTP/1.1" (for example),
          -     *    "Status-Code": "200" (for example),
          -     *    "Reason-Phrase": "OK" (for example)
          -     * }
          - * In addition, the other parameters in the header will be captured, using - * the HTTP field names as JSON names, so that
          -     *    Date: Sun, 26 May 2002 18:06:04 GMT
          -     *    Cookie: Q=q2=PPEAsg--; B=677gi6ouf29bn&b=2&f=s
          -     *    Cache-Control: no-cache
          - * become - *
          {...
          -     *    Date: "Sun, 26 May 2002 18:06:04 GMT",
          -     *    Cookie: "Q=q2=PPEAsg--; B=677gi6ouf29bn&b=2&f=s",
          -     *    "Cache-Control": "no-cache",
          -     * ...}
          - * It does no further checking or conversion. It does not parse dates. - * It does not do '%' transforms on URLs. - * @param string An HTTP header string. - * @return A JSONObject containing the elements and attributes - * of the XML string. - * @throws JSONException - */ - public static JSONObject toJSONObject(String string) throws JSONException { - JSONObject jo = new JSONObject(); - HTTPTokener x = new HTTPTokener(string); - String token; - - token = x.nextToken(); - if (token.toUpperCase(Locale.ROOT).startsWith("HTTP")) { - -// Response - - jo.put("HTTP-Version", token); - jo.put("Status-Code", x.nextToken()); - jo.put("Reason-Phrase", x.nextTo('\0')); - x.next(); - - } else { - -// Request - - jo.put("Method", token); - jo.put("Request-URI", x.nextToken()); - jo.put("HTTP-Version", x.nextToken()); - } - -// Fields - - while (x.more()) { - String name = x.nextTo(':'); - x.next(':'); - jo.put(name, x.nextTo('\0')); - x.next(); - } - return jo; +public class HTTP +{ + + /** Carriage return/line feed. */ + public static final String CRLF = "\r\n"; + + /** + * Convert an HTTP header string into a JSONObject. It can be a request header + * or a response header. A request header will contain + * + *
          +   * {
          +   *    Method: "POST" (for example),
          +   *    "Request-URI": "/" (for example),
          +   *    "HTTP-Version": "HTTP/1.1" (for example)
          +   * }
          +   * 
          + * + * A response header will contain + * + *
          +   * {
          +   *    "HTTP-Version": "HTTP/1.1" (for example),
          +   *    "Status-Code": "200" (for example),
          +   *    "Reason-Phrase": "OK" (for example)
          +   * }
          +   * 
          + * + * In addition, the other parameters in the header will be captured, using the + * HTTP field names as JSON names, so that + * + *
          +   *    Date: Sun, 26 May 2002 18:06:04 GMT
          +   *    Cookie: Q=q2=PPEAsg--; B=677gi6ouf29bn&b=2&f=s
          +   *    Cache-Control: no-cache
          +   * 
          + * + * become + * + *
          +   * {...
          +   *    Date: "Sun, 26 May 2002 18:06:04 GMT",
          +   *    Cookie: "Q=q2=PPEAsg--; B=677gi6ouf29bn&b=2&f=s",
          +   *    "Cache-Control": "no-cache",
          +   * ...}
          +   * 
          + * + * It does no further checking or conversion. It does not parse dates. It does + * not do '%' transforms on URLs. + * + * @param string + * An HTTP header string. + * @return A JSONObject containing the elements and attributes of the XML + * string. + * @throws JSONException + */ + public static JSONObject toJSONObject(String string) throws JSONException + { + JSONObject jo = new JSONObject(); + HTTPTokener x = new HTTPTokener(string); + String token; + + token = x.nextToken(); + if (token.toUpperCase(Locale.ROOT).startsWith("HTTP")) + { + + // Response + + jo.put("HTTP-Version", token); + jo.put("Status-Code", x.nextToken()); + jo.put("Reason-Phrase", x.nextTo('\0')); + x.next(); + } + else + { + // Request - /** - * Convert a JSONObject into an HTTP header. A request header must contain - *
          {
          -     *    Method: "POST" (for example),
          -     *    "Request-URI": "/" (for example),
          -     *    "HTTP-Version": "HTTP/1.1" (for example)
          -     * }
          - * A response header must contain - *
          {
          -     *    "HTTP-Version": "HTTP/1.1" (for example),
          -     *    "Status-Code": "200" (for example),
          -     *    "Reason-Phrase": "OK" (for example)
          -     * }
          - * Any other members of the JSONObject will be output as HTTP fields. - * The result will end with two CRLF pairs. - * @param jo A JSONObject - * @return An HTTP header string. - * @throws JSONException if the object does not contain enough - * information. - */ - public static String toString(JSONObject jo) throws JSONException { - StringBuilder sb = new StringBuilder(); - if (jo.has("Status-Code") && jo.has("Reason-Phrase")) { - sb.append(jo.getString("HTTP-Version")); - sb.append(' '); - sb.append(jo.getString("Status-Code")); - sb.append(' '); - sb.append(jo.getString("Reason-Phrase")); - } else if (jo.has("Method") && jo.has("Request-URI")) { - sb.append(jo.getString("Method")); - sb.append(' '); - sb.append('"'); - sb.append(jo.getString("Request-URI")); - sb.append('"'); - sb.append(' '); - sb.append(jo.getString("HTTP-Version")); - } else { - throw new JSONException("Not enough material for an HTTP header."); - } - sb.append(CRLF); - // Don't use the new entrySet API to maintain Android support - for (final String key : jo.keySet()) { - String value = jo.optString(key); - if (!"HTTP-Version".equals(key) && !"Status-Code".equals(key) && - !"Reason-Phrase".equals(key) && !"Method".equals(key) && - !"Request-URI".equals(key) && !JSONObject.NULL.equals(value)) { - sb.append(key); - sb.append(": "); - sb.append(jo.optString(key)); - sb.append(CRLF); - } - } + jo.put("Method", token); + jo.put("Request-URI", x.nextToken()); + jo.put("HTTP-Version", x.nextToken()); + } + + // Fields + + while (x.more()) + { + String name = x.nextTo(':'); + x.next(':'); + jo.put(name, x.nextTo('\0')); + x.next(); + } + return jo; + } + + /** + * Convert a JSONObject into an HTTP header. A request header must contain + * + *
          +   * {
          +   *    Method: "POST" (for example),
          +   *    "Request-URI": "/" (for example),
          +   *    "HTTP-Version": "HTTP/1.1" (for example)
          +   * }
          +   * 
          + * + * A response header must contain + * + *
          +   * {
          +   *    "HTTP-Version": "HTTP/1.1" (for example),
          +   *    "Status-Code": "200" (for example),
          +   *    "Reason-Phrase": "OK" (for example)
          +   * }
          +   * 
          + * + * Any other members of the JSONObject will be output as HTTP fields. The + * result will end with two CRLF pairs. + * + * @param jo + * A JSONObject + * @return An HTTP header string. + * @throws JSONException + * if the object does not contain enough information. + */ + public static String toString(JSONObject jo) throws JSONException + { + StringBuilder sb = new StringBuilder(); + if (jo.has("Status-Code") && jo.has("Reason-Phrase")) + { + sb.append(jo.getString("HTTP-Version")); + sb.append(' '); + sb.append(jo.getString("Status-Code")); + sb.append(' '); + sb.append(jo.getString("Reason-Phrase")); + } + else if (jo.has("Method") && jo.has("Request-URI")) + { + sb.append(jo.getString("Method")); + sb.append(' '); + sb.append('"'); + sb.append(jo.getString("Request-URI")); + sb.append('"'); + sb.append(' '); + sb.append(jo.getString("HTTP-Version")); + } + else + { + throw new JSONException("Not enough material for an HTTP header."); + } + sb.append(CRLF); + // Don't use the new entrySet API to maintain Android support + for (final String key : jo.keySet()) + { + String value = jo.optString(key); + if (!"HTTP-Version".equals(key) && !"Status-Code".equals(key) + && !"Reason-Phrase".equals(key) && !"Method".equals(key) + && !"Request-URI".equals(key) + && !JSONObject.NULL.equals(value)) + { + sb.append(key); + sb.append(": "); + sb.append(jo.optString(key)); sb.append(CRLF); - return sb.toString(); + } } + sb.append(CRLF); + return sb.toString(); + } } diff --git a/src/org/json/HTTPTokener.java b/src/org/json/HTTPTokener.java index 55f48ff..0db5eed 100644 --- a/src/org/json/HTTPTokener.java +++ b/src/org/json/HTTPTokener.java @@ -25,53 +25,66 @@ SOFTWARE. */ /** - * The HTTPTokener extends the JSONTokener to provide additional methods - * for the parsing of HTTP headers. + * The HTTPTokener extends the JSONTokener to provide additional methods for the + * parsing of HTTP headers. + * * @author JSON.org * @version 2015-12-09 */ -public class HTTPTokener extends JSONTokener { - - /** - * Construct an HTTPTokener from a string. - * @param string A source string. - */ - public HTTPTokener(String string) { - super(string); - } +public class HTTPTokener extends JSONTokener +{ + /** + * Construct an HTTPTokener from a string. + * + * @param string + * A source string. + */ + public HTTPTokener(String string) + { + super(string); + } - /** - * Get the next token or string. This is used in parsing HTTP headers. - * @throws JSONException - * @return A String. - */ - public String nextToken() throws JSONException { - char c; - char q; - StringBuilder sb = new StringBuilder(); - do { - c = next(); - } while (Character.isWhitespace(c)); - if (c == '"' || c == '\'') { - q = c; - for (;;) { - c = next(); - if (c < ' ') { - throw syntaxError("Unterminated string."); - } - if (c == q) { - return sb.toString(); - } - sb.append(c); - } + /** + * Get the next token or string. This is used in parsing HTTP headers. + * + * @throws JSONException + * @return A String. + */ + public String nextToken() throws JSONException + { + char c; + char q; + StringBuilder sb = new StringBuilder(); + do + { + c = next(); + } while (Character.isWhitespace(c)); + if (c == '"' || c == '\'') + { + q = c; + for (;;) + { + c = next(); + if (c < ' ') + { + throw syntaxError("Unterminated string."); } - for (;;) { - if (c == 0 || Character.isWhitespace(c)) { - return sb.toString(); - } - sb.append(c); - c = next(); + if (c == q) + { + return sb.toString(); } + sb.append(c); + } + } + for (;;) + { + if (c == 0 || Character.isWhitespace(c)) + { + return sb.toString(); + } + sb.append(c); + c = next(); } + } } diff --git a/src/org/json/JSONArray.java b/src/org/json/JSONArray.java index fbc1a0f..3f6c88e 100644 --- a/src/org/json/JSONArray.java +++ b/src/org/json/JSONArray.java @@ -36,7 +36,6 @@ import java.util.Iterator; import java.util.List; import java.util.Map; - /** * A JSONArray is an ordered sequence of values. Its external text form is a * string wrapped in square brackets with commas separating the values. The @@ -73,1469 +72,1715 @@ import java.util.Map; *
        • Strings do not need to be quoted at all if they do not begin with a quote * or single quote, and if they do not contain leading or trailing spaces, and * if they do not contain any of these characters: - * { } [ ] / \ : , # and if they do not look like numbers and - * if they are not the reserved words true, false, or + * { } [ ] / \ : , # and if they do not look like numbers and if + * they are not the reserved words true, false, or * null.
        • *
        * * @author JSON.org * @version 2016-08/15 */ -public class JSONArray implements Iterable { - - /** - * The arrayList where the JSONArray's properties are kept. - */ - private final ArrayList myArrayList; - - /** - * Construct an empty JSONArray. - */ - public JSONArray() { - this.myArrayList = new ArrayList(); - } - - /** - * Construct a JSONArray from a JSONTokener. - * - * @param x - * A JSONTokener - * @throws JSONException - * If there is a syntax error. - */ - public JSONArray(JSONTokener x) throws JSONException { - this(); - if (x.nextClean() != '[') { - throw x.syntaxError("A JSONArray text must start with '['"); +public class JSONArray implements Iterable +{ + + /** + * The arrayList where the JSONArray's properties are kept. + */ + private final ArrayList myArrayList; + + /** + * Construct an empty JSONArray. + */ + public JSONArray() + { + this.myArrayList = new ArrayList(); + } + + /** + * Construct a JSONArray from a JSONTokener. + * + * @param x + * A JSONTokener + * @throws JSONException + * If there is a syntax error. + */ + public JSONArray(JSONTokener x) throws JSONException + { + this(); + if (x.nextClean() != '[') + { + throw x.syntaxError("A JSONArray text must start with '['"); + } + + char nextChar = x.nextClean(); + if (nextChar == 0) + { + // array is unclosed. No ']' found, instead EOF + throw x.syntaxError("Expected a ',' or ']'"); + } + if (nextChar != ']') + { + x.back(); + for (;;) + { + if (x.nextClean() == ',') + { + x.back(); + this.myArrayList.add(JSONObject.NULL); + } + else + { + x.back(); + this.myArrayList.add(x.nextValue()); } - - char nextChar = x.nextClean(); - if (nextChar == 0) { + switch (x.nextClean()) + { + case 0: + // array is unclosed. No ']' found, instead EOF + throw x.syntaxError("Expected a ',' or ']'"); + case ',': + nextChar = x.nextClean(); + if (nextChar == 0) + { // array is unclosed. No ']' found, instead EOF throw x.syntaxError("Expected a ',' or ']'"); + } + if (nextChar == ']') + { + return; + } + x.back(); + break; + case ']': + return; + default: + throw x.syntaxError("Expected a ',' or ']'"); } - if (nextChar != ']') { - x.back(); - for (;;) { - if (x.nextClean() == ',') { - x.back(); - this.myArrayList.add(JSONObject.NULL); - } else { - x.back(); - this.myArrayList.add(x.nextValue()); - } - switch (x.nextClean()) { - case 0: - // array is unclosed. No ']' found, instead EOF - throw x.syntaxError("Expected a ',' or ']'"); - case ',': - nextChar = x.nextClean(); - if (nextChar == 0) { - // array is unclosed. No ']' found, instead EOF - throw x.syntaxError("Expected a ',' or ']'"); - } - if (nextChar == ']') { - return; - } - x.back(); - break; - case ']': - return; - default: - throw x.syntaxError("Expected a ',' or ']'"); - } - } - } - } - - /** - * Construct a JSONArray from a source JSON text. - * - * @param source - * A string that begins with [ (left - * bracket) and ends with ] - *  (right bracket). - * @throws JSONException - * If there is a syntax error. - */ - public JSONArray(String source) throws JSONException { - this(new JSONTokener(source)); - } - - /** - * Construct a JSONArray from a Collection. - * - * @param collection - * A Collection. - */ - public JSONArray(Collection collection) { - if (collection == null) { - this.myArrayList = new ArrayList(); - } else { - this.myArrayList = new ArrayList(collection.size()); - for (Object o: collection){ - this.myArrayList.add(JSONObject.wrap(o)); - } - } - } - - /** - * Construct a JSONArray from an array - * - * @throws JSONException - * If not an array or if an array value is non-finite number. - */ - public JSONArray(Object array) throws JSONException { - this(); - if (array.getClass().isArray()) { - int length = Array.getLength(array); - this.myArrayList.ensureCapacity(length); - for (int i = 0; i < length; i += 1) { - this.put(JSONObject.wrap(Array.get(array, i))); - } - } else { - throw new JSONException( - "JSONArray initial value should be a string or collection or array."); - } - } - - @Override - public Iterator iterator() { - return this.myArrayList.iterator(); - } - - /** - * Get the object value associated with an index. - * - * @param index - * The index must be between 0 and length() - 1. - * @return An object value. - * @throws JSONException - * If there is no value for the index. - */ - public Object get(int index) throws JSONException { - Object object = this.opt(index); - if (object == null) { - throw new JSONException("JSONArray[" + index + "] not found."); - } - return object; - } - - /** - * Get the boolean value associated with an index. The string values "true" - * and "false" are converted to boolean. - * - * @param index - * The index must be between 0 and length() - 1. - * @return The truth. - * @throws JSONException - * If there is no value for the index or if the value is not - * convertible to boolean. - */ - public boolean getBoolean(int index) throws JSONException { - Object object = this.get(index); - if (object.equals(Boolean.FALSE) - || (object instanceof String && ((String) object) - .equalsIgnoreCase("false"))) { - return false; - } else if (object.equals(Boolean.TRUE) - || (object instanceof String && ((String) object) - .equalsIgnoreCase("true"))) { - return true; - } - throw new JSONException("JSONArray[" + index + "] is not a boolean."); - } - - /** - * Get the double value associated with an index. - * - * @param index - * The index must be between 0 and length() - 1. - * @return The value. - * @throws JSONException - * If the key is not found or if the value cannot be converted - * to a number. - */ - public double getDouble(int index) throws JSONException { - Object object = this.get(index); - try { - return object instanceof Number ? ((Number) object).doubleValue() - : Double.parseDouble((String) object); - } catch (Exception e) { - throw new JSONException("JSONArray[" + index + "] is not a number.", e); - } - } - - /** - * Get the float value associated with a key. - * - * @param index - * The index must be between 0 and length() - 1. - * @return The numeric value. - * @throws JSONException - * if the key is not found or if the value is not a Number - * object and cannot be converted to a number. - */ - public float getFloat(int index) throws JSONException { - Object object = this.get(index); - try { - return object instanceof Number ? ((Number) object).floatValue() - : Float.parseFloat(object.toString()); - } catch (Exception e) { - throw new JSONException("JSONArray[" + index - + "] is not a number.", e); - } - } - - /** - * Get the Number value associated with a key. - * - * @param index - * The index must be between 0 and length() - 1. - * @return The numeric value. - * @throws JSONException - * if the key is not found or if the value is not a Number - * object and cannot be converted to a number. - */ - public Number getNumber(int index) throws JSONException { - Object object = this.get(index); - try { - if (object instanceof Number) { - return (Number)object; - } - return JSONObject.stringToNumber(object.toString()); - } catch (Exception e) { - throw new JSONException("JSONArray[" + index + "] is not a number.", e); - } - } - - /** - * Get the enum value associated with an index. - * - * @param clazz - * The type of enum to retrieve. - * @param index - * The index must be between 0 and length() - 1. - * @return The enum value at the index location - * @throws JSONException - * if the key is not found or if the value cannot be converted - * to an enum. - */ - public > E getEnum(Class clazz, int index) throws JSONException { - E val = optEnum(clazz, index); - if(val==null) { - // JSONException should really take a throwable argument. - // If it did, I would re-implement this with the Enum.valueOf - // method and place any thrown exception in the JSONException - throw new JSONException("JSONArray[" + index + "] is not an enum of type " - + JSONObject.quote(clazz.getSimpleName()) + "."); - } - return val; - } - - /** - * Get the BigDecimal value associated with an index. - * - * @param index - * The index must be between 0 and length() - 1. - * @return The value. - * @throws JSONException - * If the key is not found or if the value cannot be converted - * to a BigDecimal. - */ - public BigDecimal getBigDecimal (int index) throws JSONException { - Object object = this.get(index); - try { - return new BigDecimal(object.toString()); - } catch (Exception e) { - throw new JSONException("JSONArray[" + index + - "] could not convert to BigDecimal.", e); - } - } - - /** - * Get the BigInteger value associated with an index. - * - * @param index - * The index must be between 0 and length() - 1. - * @return The value. - * @throws JSONException - * If the key is not found or if the value cannot be converted - * to a BigInteger. - */ - public BigInteger getBigInteger (int index) throws JSONException { - Object object = this.get(index); - try { - return new BigInteger(object.toString()); - } catch (Exception e) { - throw new JSONException("JSONArray[" + index + - "] could not convert to BigInteger.", e); - } - } - - /** - * Get the int value associated with an index. - * - * @param index - * The index must be between 0 and length() - 1. - * @return The value. - * @throws JSONException - * If the key is not found or if the value is not a number. - */ - public int getInt(int index) throws JSONException { - Object object = this.get(index); - try { - return object instanceof Number ? ((Number) object).intValue() - : Integer.parseInt((String) object); - } catch (Exception e) { - throw new JSONException("JSONArray[" + index + "] is not a number.", e); - } - } - - /** - * Get the JSONArray associated with an index. - * - * @param index - * The index must be between 0 and length() - 1. - * @return A JSONArray value. - * @throws JSONException - * If there is no value for the index. or if the value is not a - * JSONArray - */ - public JSONArray getJSONArray(int index) throws JSONException { - Object object = this.get(index); - if (object instanceof JSONArray) { - return (JSONArray) object; - } - throw new JSONException("JSONArray[" + index + "] is not a JSONArray."); - } - - /** - * Get the JSONObject associated with an index. - * - * @param index - * subscript - * @return A JSONObject value. - * @throws JSONException - * If there is no value for the index or if the value is not a - * JSONObject - */ - public JSONObject getJSONObject(int index) throws JSONException { - Object object = this.get(index); - if (object instanceof JSONObject) { - return (JSONObject) object; - } - throw new JSONException("JSONArray[" + index + "] is not a JSONObject."); - } - - /** - * Get the long value associated with an index. - * - * @param index - * The index must be between 0 and length() - 1. - * @return The value. - * @throws JSONException - * If the key is not found or if the value cannot be converted - * to a number. - */ - public long getLong(int index) throws JSONException { - Object object = this.get(index); - try { - return object instanceof Number ? ((Number) object).longValue() - : Long.parseLong((String) object); - } catch (Exception e) { - throw new JSONException("JSONArray[" + index + "] is not a number.", e); - } - } - - /** - * Get the string associated with an index. - * - * @param index - * The index must be between 0 and length() - 1. - * @return A string value. - * @throws JSONException - * If there is no string value for the index. - */ - public String getString(int index) throws JSONException { - Object object = this.get(index); - if (object instanceof String) { - return (String) object; - } - throw new JSONException("JSONArray[" + index + "] not a string."); - } - - /** - * Determine if the value is null. - * - * @param index - * The index must be between 0 and length() - 1. - * @return true if the value at the index is null, or if there is no value. - */ - public boolean isNull(int index) { - return JSONObject.NULL.equals(this.opt(index)); - } - - /** - * Make a string from the contents of this JSONArray. The - * separator string is inserted between each element. Warning: - * This method assumes that the data structure is acyclical. - * - * @param separator - * A string that will be inserted between the elements. - * @return a string. - * @throws JSONException - * If the array contains an invalid number. - */ - public String join(String separator) throws JSONException { - int len = this.length(); - StringBuilder sb = new StringBuilder(); - - for (int i = 0; i < len; i += 1) { - if (i > 0) { - sb.append(separator); - } - sb.append(JSONObject.valueToString(this.myArrayList.get(i))); - } - return sb.toString(); - } - - /** - * Get the number of elements in the JSONArray, included nulls. - * - * @return The length (or size). - */ - public int length() { - return this.myArrayList.size(); - } - - /** - * Get the optional object value associated with an index. - * - * @param index - * The index must be between 0 and length() - 1. If not, null is returned. - * @return An object value, or null if there is no object at that index. - */ - public Object opt(int index) { - return (index < 0 || index >= this.length()) ? null : this.myArrayList - .get(index); - } - - /** - * Get the optional boolean value associated with an index. It returns false - * if there is no value at that index, or if the value is not Boolean.TRUE - * or the String "true". - * - * @param index - * The index must be between 0 and length() - 1. - * @return The truth. - */ - public boolean optBoolean(int index) { - return this.optBoolean(index, false); - } - - /** - * Get the optional boolean value associated with an index. It returns the - * defaultValue if there is no value at that index or if it is not a Boolean - * or the String "true" or "false" (case insensitive). - * - * @param index - * The index must be between 0 and length() - 1. - * @param defaultValue - * A boolean default. - * @return The truth. - */ - public boolean optBoolean(int index, boolean defaultValue) { - try { - return this.getBoolean(index); - } catch (Exception e) { - return defaultValue; - } - } - - /** - * Get the optional double value associated with an index. NaN is returned - * if there is no value for the index, or if the value is not a number and - * cannot be converted to a number. - * - * @param index - * The index must be between 0 and length() - 1. - * @return The value. - */ - public double optDouble(int index) { - return this.optDouble(index, Double.NaN); - } - - /** - * Get the optional double value associated with an index. The defaultValue - * is returned if there is no value for the index, or if the value is not a - * number and cannot be converted to a number. - * - * @param index - * subscript - * @param defaultValue - * The default value. - * @return The value. - */ - public double optDouble(int index, double defaultValue) { - Object val = this.opt(index); - if (JSONObject.NULL.equals(val)) { - return defaultValue; - } - if (val instanceof Number){ - return ((Number) val).doubleValue(); - } - if (val instanceof String) { - try { - return Double.parseDouble((String) val); - } catch (Exception e) { - return defaultValue; - } - } + } + } + } + + /** + * Construct a JSONArray from a source JSON text. + * + * @param source + * A string that begins with [ (left + * bracket) and ends with ]  (right + * bracket). + * @throws JSONException + * If there is a syntax error. + */ + public JSONArray(String source) throws JSONException + { + this(new JSONTokener(source)); + } + + /** + * Construct a JSONArray from a Collection. + * + * @param collection + * A Collection. + */ + public JSONArray(Collection collection) + { + if (collection == null) + { + this.myArrayList = new ArrayList(); + } + else + { + this.myArrayList = new ArrayList(collection.size()); + for (Object o : collection) + { + this.myArrayList.add(JSONObject.wrap(o)); + } + } + } + + /** + * Construct a JSONArray from an array + * + * @throws JSONException + * If not an array or if an array value is non-finite number. + */ + public JSONArray(Object array) throws JSONException + { + this(); + if (array.getClass().isArray()) + { + int length = Array.getLength(array); + this.myArrayList.ensureCapacity(length); + for (int i = 0; i < length; i += 1) + { + this.put(JSONObject.wrap(Array.get(array, i))); + } + } + else + { + throw new JSONException( + "JSONArray initial value should be a string or collection or array."); + } + } + + @Override + public Iterator iterator() + { + return this.myArrayList.iterator(); + } + + /** + * Get the object value associated with an index. + * + * @param index + * The index must be between 0 and length() - 1. + * @return An object value. + * @throws JSONException + * If there is no value for the index. + */ + public Object get(int index) throws JSONException + { + Object object = this.opt(index); + if (object == null) + { + throw new JSONException("JSONArray[" + index + "] not found."); + } + return object; + } + + /** + * Get the boolean value associated with an index. The string values "true" + * and "false" are converted to boolean. + * + * @param index + * The index must be between 0 and length() - 1. + * @return The truth. + * @throws JSONException + * If there is no value for the index or if the value is not + * convertible to boolean. + */ + public boolean getBoolean(int index) throws JSONException + { + Object object = this.get(index); + if (object.equals(Boolean.FALSE) || (object instanceof String + && ((String) object).equalsIgnoreCase("false"))) + { + return false; + } + else if (object.equals(Boolean.TRUE) || (object instanceof String + && ((String) object).equalsIgnoreCase("true"))) + { + return true; + } + throw new JSONException("JSONArray[" + index + "] is not a boolean."); + } + + /** + * Get the double value associated with an index. + * + * @param index + * The index must be between 0 and length() - 1. + * @return The value. + * @throws JSONException + * If the key is not found or if the value cannot be converted to a + * number. + */ + public double getDouble(int index) throws JSONException + { + Object object = this.get(index); + try + { + return object instanceof Number ? ((Number) object).doubleValue() + : Double.parseDouble((String) object); + } catch (Exception e) + { + throw new JSONException("JSONArray[" + index + "] is not a number.", + e); + } + } + + /** + * Get the float value associated with a key. + * + * @param index + * The index must be between 0 and length() - 1. + * @return The numeric value. + * @throws JSONException + * if the key is not found or if the value is not a Number object + * and cannot be converted to a number. + */ + public float getFloat(int index) throws JSONException + { + Object object = this.get(index); + try + { + return object instanceof Number ? ((Number) object).floatValue() + : Float.parseFloat(object.toString()); + } catch (Exception e) + { + throw new JSONException("JSONArray[" + index + "] is not a number.", + e); + } + } + + /** + * Get the Number value associated with a key. + * + * @param index + * The index must be between 0 and length() - 1. + * @return The numeric value. + * @throws JSONException + * if the key is not found or if the value is not a Number object + * and cannot be converted to a number. + */ + public Number getNumber(int index) throws JSONException + { + Object object = this.get(index); + try + { + if (object instanceof Number) + { + return (Number) object; + } + return JSONObject.stringToNumber(object.toString()); + } catch (Exception e) + { + throw new JSONException("JSONArray[" + index + "] is not a number.", + e); + } + } + + /** + * Get the enum value associated with an index. + * + * @param clazz + * The type of enum to retrieve. + * @param index + * The index must be between 0 and length() - 1. + * @return The enum value at the index location + * @throws JSONException + * if the key is not found or if the value cannot be converted to an + * enum. + */ + public > E getEnum(Class clazz, int index) + throws JSONException + { + E val = optEnum(clazz, index); + if (val == null) + { + // JSONException should really take a throwable argument. + // If it did, I would re-implement this with the Enum.valueOf + // method and place any thrown exception in the JSONException + throw new JSONException( + "JSONArray[" + index + "] is not an enum of type " + + JSONObject.quote(clazz.getSimpleName()) + "."); + } + return val; + } + + /** + * Get the BigDecimal value associated with an index. + * + * @param index + * The index must be between 0 and length() - 1. + * @return The value. + * @throws JSONException + * If the key is not found or if the value cannot be converted to a + * BigDecimal. + */ + public BigDecimal getBigDecimal(int index) throws JSONException + { + Object object = this.get(index); + try + { + return new BigDecimal(object.toString()); + } catch (Exception e) + { + throw new JSONException( + "JSONArray[" + index + "] could not convert to BigDecimal.", + e); + } + } + + /** + * Get the BigInteger value associated with an index. + * + * @param index + * The index must be between 0 and length() - 1. + * @return The value. + * @throws JSONException + * If the key is not found or if the value cannot be converted to a + * BigInteger. + */ + public BigInteger getBigInteger(int index) throws JSONException + { + Object object = this.get(index); + try + { + return new BigInteger(object.toString()); + } catch (Exception e) + { + throw new JSONException( + "JSONArray[" + index + "] could not convert to BigInteger.", + e); + } + } + + /** + * Get the int value associated with an index. + * + * @param index + * The index must be between 0 and length() - 1. + * @return The value. + * @throws JSONException + * If the key is not found or if the value is not a number. + */ + public int getInt(int index) throws JSONException + { + Object object = this.get(index); + try + { + return object instanceof Number ? ((Number) object).intValue() + : Integer.parseInt((String) object); + } catch (Exception e) + { + throw new JSONException("JSONArray[" + index + "] is not a number.", + e); + } + } + + /** + * Get the JSONArray associated with an index. + * + * @param index + * The index must be between 0 and length() - 1. + * @return A JSONArray value. + * @throws JSONException + * If there is no value for the index. or if the value is not a + * JSONArray + */ + public JSONArray getJSONArray(int index) throws JSONException + { + Object object = this.get(index); + if (object instanceof JSONArray) + { + return (JSONArray) object; + } + throw new JSONException("JSONArray[" + index + "] is not a JSONArray."); + } + + /** + * Get the JSONObject associated with an index. + * + * @param index + * subscript + * @return A JSONObject value. + * @throws JSONException + * If there is no value for the index or if the value is not a + * JSONObject + */ + public JSONObject getJSONObject(int index) throws JSONException + { + Object object = this.get(index); + if (object instanceof JSONObject) + { + return (JSONObject) object; + } + throw new JSONException( + "JSONArray[" + index + "] is not a JSONObject."); + } + + /** + * Get the long value associated with an index. + * + * @param index + * The index must be between 0 and length() - 1. + * @return The value. + * @throws JSONException + * If the key is not found or if the value cannot be converted to a + * number. + */ + public long getLong(int index) throws JSONException + { + Object object = this.get(index); + try + { + return object instanceof Number ? ((Number) object).longValue() + : Long.parseLong((String) object); + } catch (Exception e) + { + throw new JSONException("JSONArray[" + index + "] is not a number.", + e); + } + } + + /** + * Get the string associated with an index. + * + * @param index + * The index must be between 0 and length() - 1. + * @return A string value. + * @throws JSONException + * If there is no string value for the index. + */ + public String getString(int index) throws JSONException + { + Object object = this.get(index); + if (object instanceof String) + { + return (String) object; + } + throw new JSONException("JSONArray[" + index + "] not a string."); + } + + /** + * Determine if the value is null. + * + * @param index + * The index must be between 0 and length() - 1. + * @return true if the value at the index is null, or if there is + * no value. + */ + public boolean isNull(int index) + { + return JSONObject.NULL.equals(this.opt(index)); + } + + /** + * Make a string from the contents of this JSONArray. The + * separator string is inserted between each element. Warning: + * This method assumes that the data structure is acyclical. + * + * @param separator + * A string that will be inserted between the elements. + * @return a string. + * @throws JSONException + * If the array contains an invalid number. + */ + public String join(String separator) throws JSONException + { + int len = this.length(); + StringBuilder sb = new StringBuilder(); + + for (int i = 0; i < len; i += 1) + { + if (i > 0) + { + sb.append(separator); + } + sb.append(JSONObject.valueToString(this.myArrayList.get(i))); + } + return sb.toString(); + } + + /** + * Get the number of elements in the JSONArray, included nulls. + * + * @return The length (or size). + */ + public int length() + { + return this.myArrayList.size(); + } + + /** + * Get the optional object value associated with an index. + * + * @param index + * The index must be between 0 and length() - 1. If not, null is + * returned. + * @return An object value, or null if there is no object at that index. + */ + public Object opt(int index) + { + return (index < 0 || index >= this.length()) ? null + : this.myArrayList.get(index); + } + + /** + * Get the optional boolean value associated with an index. It returns false + * if there is no value at that index, or if the value is not Boolean.TRUE or + * the String "true". + * + * @param index + * The index must be between 0 and length() - 1. + * @return The truth. + */ + public boolean optBoolean(int index) + { + return this.optBoolean(index, false); + } + + /** + * Get the optional boolean value associated with an index. It returns the + * defaultValue if there is no value at that index or if it is not a Boolean + * or the String "true" or "false" (case insensitive). + * + * @param index + * The index must be between 0 and length() - 1. + * @param defaultValue + * A boolean default. + * @return The truth. + */ + public boolean optBoolean(int index, boolean defaultValue) + { + try + { + return this.getBoolean(index); + } catch (Exception e) + { + return defaultValue; + } + } + + /** + * Get the optional double value associated with an index. NaN is returned if + * there is no value for the index, or if the value is not a number and cannot + * be converted to a number. + * + * @param index + * The index must be between 0 and length() - 1. + * @return The value. + */ + public double optDouble(int index) + { + return this.optDouble(index, Double.NaN); + } + + /** + * Get the optional double value associated with an index. The defaultValue is + * returned if there is no value for the index, or if the value is not a + * number and cannot be converted to a number. + * + * @param index + * subscript + * @param defaultValue + * The default value. + * @return The value. + */ + public double optDouble(int index, double defaultValue) + { + Object val = this.opt(index); + if (JSONObject.NULL.equals(val)) + { + return defaultValue; + } + if (val instanceof Number) + { + return ((Number) val).doubleValue(); + } + if (val instanceof String) + { + try + { + return Double.parseDouble((String) val); + } catch (Exception e) + { return defaultValue; - } - - /** - * Get the optional float value associated with an index. NaN is returned - * if there is no value for the index, or if the value is not a number and - * cannot be converted to a number. - * - * @param index - * The index must be between 0 and length() - 1. - * @return The value. - */ - public float optFloat(int index) { - return this.optFloat(index, Float.NaN); - } - - /** - * Get the optional float value associated with an index. The defaultValue - * is returned if there is no value for the index, or if the value is not a - * number and cannot be converted to a number. - * - * @param index - * subscript - * @param defaultValue - * The default value. - * @return The value. - */ - public float optFloat(int index, float defaultValue) { - Object val = this.opt(index); - if (JSONObject.NULL.equals(val)) { - return defaultValue; - } - if (val instanceof Number){ - return ((Number) val).floatValue(); - } - if (val instanceof String) { - try { - return Float.parseFloat((String) val); - } catch (Exception e) { - return defaultValue; - } - } + } + } + return defaultValue; + } + + /** + * Get the optional float value associated with an index. NaN is returned if + * there is no value for the index, or if the value is not a number and cannot + * be converted to a number. + * + * @param index + * The index must be between 0 and length() - 1. + * @return The value. + */ + public float optFloat(int index) + { + return this.optFloat(index, Float.NaN); + } + + /** + * Get the optional float value associated with an index. The defaultValue is + * returned if there is no value for the index, or if the value is not a + * number and cannot be converted to a number. + * + * @param index + * subscript + * @param defaultValue + * The default value. + * @return The value. + */ + public float optFloat(int index, float defaultValue) + { + Object val = this.opt(index); + if (JSONObject.NULL.equals(val)) + { + return defaultValue; + } + if (val instanceof Number) + { + return ((Number) val).floatValue(); + } + if (val instanceof String) + { + try + { + return Float.parseFloat((String) val); + } catch (Exception e) + { return defaultValue; - } - - /** - * Get the optional int value associated with an index. Zero is returned if - * there is no value for the index, or if the value is not a number and - * cannot be converted to a number. - * - * @param index - * The index must be between 0 and length() - 1. - * @return The value. - */ - public int optInt(int index) { - return this.optInt(index, 0); - } - - /** - * Get the optional int value associated with an index. The defaultValue is - * returned if there is no value for the index, or if the value is not a - * number and cannot be converted to a number. - * - * @param index - * The index must be between 0 and length() - 1. - * @param defaultValue - * The default value. - * @return The value. - */ - public int optInt(int index, int defaultValue) { - Object val = this.opt(index); - if (JSONObject.NULL.equals(val)) { - return defaultValue; - } - if (val instanceof Number){ - return ((Number) val).intValue(); - } - - if (val instanceof String) { - try { - return new BigDecimal(val.toString()).intValue(); - } catch (Exception e) { - return defaultValue; - } - } + } + } + return defaultValue; + } + + /** + * Get the optional int value associated with an index. Zero is returned if + * there is no value for the index, or if the value is not a number and cannot + * be converted to a number. + * + * @param index + * The index must be between 0 and length() - 1. + * @return The value. + */ + public int optInt(int index) + { + return this.optInt(index, 0); + } + + /** + * Get the optional int value associated with an index. The defaultValue is + * returned if there is no value for the index, or if the value is not a + * number and cannot be converted to a number. + * + * @param index + * The index must be between 0 and length() - 1. + * @param defaultValue + * The default value. + * @return The value. + */ + public int optInt(int index, int defaultValue) + { + Object val = this.opt(index); + if (JSONObject.NULL.equals(val)) + { + return defaultValue; + } + if (val instanceof Number) + { + return ((Number) val).intValue(); + } + + if (val instanceof String) + { + try + { + return new BigDecimal(val.toString()).intValue(); + } catch (Exception e) + { return defaultValue; - } - - /** - * Get the enum value associated with a key. - * - * @param clazz - * The type of enum to retrieve. - * @param index - * The index must be between 0 and length() - 1. - * @return The enum value at the index location or null if not found - */ - public > E optEnum(Class clazz, int index) { - return this.optEnum(clazz, index, null); - } - - /** - * Get the enum value associated with a key. - * - * @param clazz - * The type of enum to retrieve. - * @param index - * The index must be between 0 and length() - 1. - * @param defaultValue - * The default in case the value is not found - * @return The enum value at the index location or defaultValue if - * the value is not found or cannot be assigned to clazz - */ - public > E optEnum(Class clazz, int index, E defaultValue) { - try { - Object val = this.opt(index); - if (JSONObject.NULL.equals(val)) { - return defaultValue; - } - if (clazz.isAssignableFrom(val.getClass())) { - // we just checked it! - @SuppressWarnings("unchecked") - E myE = (E) val; - return myE; - } - return Enum.valueOf(clazz, val.toString()); - } catch (IllegalArgumentException e) { - return defaultValue; - } catch (NullPointerException e) { - return defaultValue; - } - } - - - /** - * Get the optional BigInteger value associated with an index. The - * defaultValue is returned if there is no value for the index, or if the - * value is not a number and cannot be converted to a number. - * - * @param index - * The index must be between 0 and length() - 1. - * @param defaultValue - * The default value. - * @return The value. - */ - public BigInteger optBigInteger(int index, BigInteger defaultValue) { - Object val = this.opt(index); - if (JSONObject.NULL.equals(val)) { - return defaultValue; - } - if (val instanceof BigInteger){ - return (BigInteger) val; - } - if (val instanceof BigDecimal){ - return ((BigDecimal) val).toBigInteger(); - } - if (val instanceof Double || val instanceof Float){ - return new BigDecimal(((Number) val).doubleValue()).toBigInteger(); - } - if (val instanceof Long || val instanceof Integer - || val instanceof Short || val instanceof Byte){ - return BigInteger.valueOf(((Number) val).longValue()); - } - try { - final String valStr = val.toString(); - if(JSONObject.isDecimalNotation(valStr)) { - return new BigDecimal(valStr).toBigInteger(); - } - return new BigInteger(valStr); - } catch (Exception e) { - return defaultValue; - } - } - - /** - * Get the optional BigDecimal value associated with an index. The - * defaultValue is returned if there is no value for the index, or if the - * value is not a number and cannot be converted to a number. - * - * @param index - * The index must be between 0 and length() - 1. - * @param defaultValue - * The default value. - * @return The value. - */ - public BigDecimal optBigDecimal(int index, BigDecimal defaultValue) { - Object val = this.opt(index); - if (JSONObject.NULL.equals(val)) { - return defaultValue; - } - if (val instanceof BigDecimal){ - return (BigDecimal) val; - } - if (val instanceof BigInteger){ - return new BigDecimal((BigInteger) val); - } - if (val instanceof Double || val instanceof Float){ - return new BigDecimal(((Number) val).doubleValue()); - } - if (val instanceof Long || val instanceof Integer - || val instanceof Short || val instanceof Byte){ - return new BigDecimal(((Number) val).longValue()); - } - try { - return new BigDecimal(val.toString()); - } catch (Exception e) { - return defaultValue; - } - } - - /** - * Get the optional JSONArray associated with an index. - * - * @param index - * subscript - * @return A JSONArray value, or null if the index has no value, or if the - * value is not a JSONArray. - */ - public JSONArray optJSONArray(int index) { - Object o = this.opt(index); - return o instanceof JSONArray ? (JSONArray) o : null; - } - - /** - * Get the optional JSONObject associated with an index. Null is returned if - * the key is not found, or null if the index has no value, or if the value - * is not a JSONObject. - * - * @param index - * The index must be between 0 and length() - 1. - * @return A JSONObject value. - */ - public JSONObject optJSONObject(int index) { - Object o = this.opt(index); - return o instanceof JSONObject ? (JSONObject) o : null; - } - - /** - * Get the optional long value associated with an index. Zero is returned if - * there is no value for the index, or if the value is not a number and - * cannot be converted to a number. - * - * @param index - * The index must be between 0 and length() - 1. - * @return The value. - */ - public long optLong(int index) { - return this.optLong(index, 0); - } - - /** - * Get the optional long value associated with an index. The defaultValue is - * returned if there is no value for the index, or if the value is not a - * number and cannot be converted to a number. - * - * @param index - * The index must be between 0 and length() - 1. - * @param defaultValue - * The default value. - * @return The value. - */ - public long optLong(int index, long defaultValue) { - Object val = this.opt(index); - if (JSONObject.NULL.equals(val)) { - return defaultValue; - } - if (val instanceof Number){ - return ((Number) val).longValue(); - } - - if (val instanceof String) { - try { - return new BigDecimal(val.toString()).longValue(); - } catch (Exception e) { - return defaultValue; - } - } + } + } + return defaultValue; + } + + /** + * Get the enum value associated with a key. + * + * @param clazz + * The type of enum to retrieve. + * @param index + * The index must be between 0 and length() - 1. + * @return The enum value at the index location or null if not found + */ + public > E optEnum(Class clazz, int index) + { + return this.optEnum(clazz, index, null); + } + + /** + * Get the enum value associated with a key. + * + * @param clazz + * The type of enum to retrieve. + * @param index + * The index must be between 0 and length() - 1. + * @param defaultValue + * The default in case the value is not found + * @return The enum value at the index location or defaultValue if the value + * is not found or cannot be assigned to clazz + */ + public > E optEnum(Class clazz, int index, + E defaultValue) + { + try + { + Object val = this.opt(index); + if (JSONObject.NULL.equals(val)) + { return defaultValue; - } - - /** - * Get an optional {@link Number} value associated with a key, or null - * if there is no such key or if the value is not a number. If the value is a string, - * an attempt will be made to evaluate it as a number ({@link BigDecimal}). This method - * would be used in cases where type coercion of the number value is unwanted. - * - * @param index - * The index must be between 0 and length() - 1. - * @return An object which is the value. - */ - public Number optNumber(int index) { - return this.optNumber(index, null); - } - - /** - * Get an optional {@link Number} value associated with a key, or the default if there - * is no such key or if the value is not a number. If the value is a string, - * an attempt will be made to evaluate it as a number ({@link BigDecimal}). This method - * would be used in cases where type coercion of the number value is unwanted. - * - * @param index - * The index must be between 0 and length() - 1. - * @param defaultValue - * The default. - * @return An object which is the value. - */ - public Number optNumber(int index, Number defaultValue) { - Object val = this.opt(index); - if (JSONObject.NULL.equals(val)) { - return defaultValue; - } - if (val instanceof Number){ - return (Number) val; - } - - if (val instanceof String) { - try { - return JSONObject.stringToNumber((String) val); - } catch (Exception e) { - return defaultValue; - } - } + } + if (clazz.isAssignableFrom(val.getClass())) + { + // we just checked it! + @SuppressWarnings("unchecked") + E myE = (E) val; + return myE; + } + return Enum.valueOf(clazz, val.toString()); + } catch (IllegalArgumentException e) + { + return defaultValue; + } catch (NullPointerException e) + { + return defaultValue; + } + } + + /** + * Get the optional BigInteger value associated with an index. The + * defaultValue is returned if there is no value for the index, or if the + * value is not a number and cannot be converted to a number. + * + * @param index + * The index must be between 0 and length() - 1. + * @param defaultValue + * The default value. + * @return The value. + */ + public BigInteger optBigInteger(int index, BigInteger defaultValue) + { + Object val = this.opt(index); + if (JSONObject.NULL.equals(val)) + { + return defaultValue; + } + if (val instanceof BigInteger) + { + return (BigInteger) val; + } + if (val instanceof BigDecimal) + { + return ((BigDecimal) val).toBigInteger(); + } + if (val instanceof Double || val instanceof Float) + { + return new BigDecimal(((Number) val).doubleValue()).toBigInteger(); + } + if (val instanceof Long || val instanceof Integer + || val instanceof Short || val instanceof Byte) + { + return BigInteger.valueOf(((Number) val).longValue()); + } + try + { + final String valStr = val.toString(); + if (JSONObject.isDecimalNotation(valStr)) + { + return new BigDecimal(valStr).toBigInteger(); + } + return new BigInteger(valStr); + } catch (Exception e) + { + return defaultValue; + } + } + + /** + * Get the optional BigDecimal value associated with an index. The + * defaultValue is returned if there is no value for the index, or if the + * value is not a number and cannot be converted to a number. + * + * @param index + * The index must be between 0 and length() - 1. + * @param defaultValue + * The default value. + * @return The value. + */ + public BigDecimal optBigDecimal(int index, BigDecimal defaultValue) + { + Object val = this.opt(index); + if (JSONObject.NULL.equals(val)) + { + return defaultValue; + } + if (val instanceof BigDecimal) + { + return (BigDecimal) val; + } + if (val instanceof BigInteger) + { + return new BigDecimal((BigInteger) val); + } + if (val instanceof Double || val instanceof Float) + { + return new BigDecimal(((Number) val).doubleValue()); + } + if (val instanceof Long || val instanceof Integer + || val instanceof Short || val instanceof Byte) + { + return new BigDecimal(((Number) val).longValue()); + } + try + { + return new BigDecimal(val.toString()); + } catch (Exception e) + { + return defaultValue; + } + } + + /** + * Get the optional JSONArray associated with an index. + * + * @param index + * subscript + * @return A JSONArray value, or null if the index has no value, or if the + * value is not a JSONArray. + */ + public JSONArray optJSONArray(int index) + { + Object o = this.opt(index); + return o instanceof JSONArray ? (JSONArray) o : null; + } + + /** + * Get the optional JSONObject associated with an index. Null is returned if + * the key is not found, or null if the index has no value, or if the value is + * not a JSONObject. + * + * @param index + * The index must be between 0 and length() - 1. + * @return A JSONObject value. + */ + public JSONObject optJSONObject(int index) + { + Object o = this.opt(index); + return o instanceof JSONObject ? (JSONObject) o : null; + } + + /** + * Get the optional long value associated with an index. Zero is returned if + * there is no value for the index, or if the value is not a number and cannot + * be converted to a number. + * + * @param index + * The index must be between 0 and length() - 1. + * @return The value. + */ + public long optLong(int index) + { + return this.optLong(index, 0); + } + + /** + * Get the optional long value associated with an index. The defaultValue is + * returned if there is no value for the index, or if the value is not a + * number and cannot be converted to a number. + * + * @param index + * The index must be between 0 and length() - 1. + * @param defaultValue + * The default value. + * @return The value. + */ + public long optLong(int index, long defaultValue) + { + Object val = this.opt(index); + if (JSONObject.NULL.equals(val)) + { + return defaultValue; + } + if (val instanceof Number) + { + return ((Number) val).longValue(); + } + + if (val instanceof String) + { + try + { + return new BigDecimal(val.toString()).longValue(); + } catch (Exception e) + { return defaultValue; - } - - /** - * Get the optional string value associated with an index. It returns an - * empty string if there is no value at that index. If the value is not a - * string and is not null, then it is converted to a string. - * - * @param index - * The index must be between 0 and length() - 1. - * @return A String value. - */ - public String optString(int index) { - return this.optString(index, ""); - } - - /** - * Get the optional string associated with an index. The defaultValue is - * returned if the key is not found. - * - * @param index - * The index must be between 0 and length() - 1. - * @param defaultValue - * The default value. - * @return A String value. - */ - public String optString(int index, String defaultValue) { - Object object = this.opt(index); - return JSONObject.NULL.equals(object) ? defaultValue : object - .toString(); - } - - /** - * Append a boolean value. This increases the array's length by one. - * - * @param value - * A boolean value. - * @return this. - */ - public JSONArray put(boolean value) { - return this.put(value ? Boolean.TRUE : Boolean.FALSE); - } - - /** - * Put a value in the JSONArray, where the value will be a JSONArray which - * is produced from a Collection. - * - * @param value - * A Collection value. - * @return this. - * @throws JSONException - * If the value is non-finite number. - */ - public JSONArray put(Collection value) { - return this.put(new JSONArray(value)); - } - - /** - * Append a double value. This increases the array's length by one. - * - * @param value - * A double value. - * @return this. - * @throws JSONException - * if the value is not finite. - */ - public JSONArray put(double value) throws JSONException { - return this.put(Double.valueOf(value)); - } - - /** - * Append a float value. This increases the array's length by one. - * - * @param value - * A float value. - * @return this. - * @throws JSONException - * if the value is not finite. - */ - public JSONArray put(float value) throws JSONException { - return this.put(Float.valueOf(value)); - } - - /** - * Append an int value. This increases the array's length by one. - * - * @param value - * An int value. - * @return this. - */ - public JSONArray put(int value) { - return this.put(Integer.valueOf(value)); - } - - /** - * Append an long value. This increases the array's length by one. - * - * @param value - * A long value. - * @return this. - */ - public JSONArray put(long value) { - return this.put(Long.valueOf(value)); - } - - /** - * Put a value in the JSONArray, where the value will be a JSONObject which - * is produced from a Map. - * - * @param value - * A Map value. - * @return this. - * @throws JSONException - * If a value in the map is non-finite number. - * @throws NullPointerException - * If a key in the map is null - */ - public JSONArray put(Map value) { - return this.put(new JSONObject(value)); - } - - /** - * Append an object value. This increases the array's length by one. - * - * @param value - * An object value. The value should be a Boolean, Double, - * Integer, JSONArray, JSONObject, Long, or String, or the - * JSONObject.NULL object. - * @return this. - * @throws JSONException - * If the value is non-finite number. - */ - public JSONArray put(Object value) { - JSONObject.testValidity(value); - this.myArrayList.add(value); - return this; - } - - /** - * Put or replace a boolean value in the JSONArray. If the index is greater - * than the length of the JSONArray, then null elements will be added as - * necessary to pad it out. - * - * @param index - * The subscript. - * @param value - * A boolean value. - * @return this. - * @throws JSONException - * If the index is negative. - */ - public JSONArray put(int index, boolean value) throws JSONException { - return this.put(index, value ? Boolean.TRUE : Boolean.FALSE); - } - - /** - * Put a value in the JSONArray, where the value will be a JSONArray which - * is produced from a Collection. - * - * @param index - * The subscript. - * @param value - * A Collection value. - * @return this. - * @throws JSONException - * If the index is negative or if the value is non-finite. - */ - public JSONArray put(int index, Collection value) throws JSONException { - return this.put(index, new JSONArray(value)); - } - - /** - * Put or replace a double value. If the index is greater than the length of - * the JSONArray, then null elements will be added as necessary to pad it - * out. - * - * @param index - * The subscript. - * @param value - * A double value. - * @return this. - * @throws JSONException - * If the index is negative or if the value is non-finite. - */ - public JSONArray put(int index, double value) throws JSONException { - return this.put(index, Double.valueOf(value)); - } - - /** - * Put or replace a float value. If the index is greater than the length of - * the JSONArray, then null elements will be added as necessary to pad it - * out. - * - * @param index - * The subscript. - * @param value - * A float value. - * @return this. - * @throws JSONException - * If the index is negative or if the value is non-finite. - */ - public JSONArray put(int index, float value) throws JSONException { - return this.put(index, Float.valueOf(value)); - } - - /** - * Put or replace an int value. If the index is greater than the length of - * the JSONArray, then null elements will be added as necessary to pad it - * out. - * - * @param index - * The subscript. - * @param value - * An int value. - * @return this. - * @throws JSONException - * If the index is negative. - */ - public JSONArray put(int index, int value) throws JSONException { - return this.put(index, Integer.valueOf(value)); - } - - /** - * Put or replace a long value. If the index is greater than the length of - * the JSONArray, then null elements will be added as necessary to pad it - * out. - * - * @param index - * The subscript. - * @param value - * A long value. - * @return this. - * @throws JSONException - * If the index is negative. - */ - public JSONArray put(int index, long value) throws JSONException { - return this.put(index, Long.valueOf(value)); - } - - /** - * Put a value in the JSONArray, where the value will be a JSONObject that - * is produced from a Map. - * - * @param index - * The subscript. - * @param value - * The Map value. - * @return this. - * @throws JSONException - * If the index is negative or if the the value is an invalid - * number. - * @throws NullPointerException - * If a key in the map is null - */ - public JSONArray put(int index, Map value) throws JSONException { - this.put(index, new JSONObject(value)); - return this; - } - - /** - * Put or replace an object value in the JSONArray. If the index is greater - * than the length of the JSONArray, then null elements will be added as - * necessary to pad it out. - * - * @param index - * The subscript. - * @param value - * The value to put into the array. The value should be a - * Boolean, Double, Integer, JSONArray, JSONObject, Long, or - * String, or the JSONObject.NULL object. - * @return this. - * @throws JSONException - * If the index is negative or if the the value is an invalid - * number. - */ - public JSONArray put(int index, Object value) throws JSONException { - if (index < 0) { - throw new JSONException("JSONArray[" + index + "] not found."); - } - if (index < this.length()) { - JSONObject.testValidity(value); - this.myArrayList.set(index, value); - return this; - } - if(index == this.length()){ - // simple append - return this.put(value); - } - // if we are inserting past the length, we want to grow the array all at once - // instead of incrementally. - this.myArrayList.ensureCapacity(index + 1); - while (index != this.length()) { - // we don't need to test validity of NULL objects - this.myArrayList.add(JSONObject.NULL); - } - return this.put(value); - } - - /** - * Creates a JSONPointer using an initialization string and tries to - * match it to an item within this JSONArray. For example, given a - * JSONArray initialized with this document: - *
        -     * [
        -     *     {"b":"c"}
        -     * ]
        -     * 
        - * and this JSONPointer string: - *
        -     * "/0/b"
        -     * 
        - * Then this method will return the String "c" - * A JSONPointerException may be thrown from code called by this method. - * - * @param jsonPointer string that can be used to create a JSONPointer - * @return the item matched by the JSONPointer, otherwise null - */ - public Object query(String jsonPointer) { - return query(new JSONPointer(jsonPointer)); - } - - /** - * Uses a uaer initialized JSONPointer and tries to - * match it to an item whithin this JSONArray. For example, given a - * JSONArray initialized with this document: - *
        -     * [
        -     *     {"b":"c"}
        -     * ]
        -     * 
        - * and this JSONPointer: - *
        -     * "/0/b"
        -     * 
        - * Then this method will return the String "c" - * A JSONPointerException may be thrown from code called by this method. - * - * @param jsonPointer string that can be used to create a JSONPointer - * @return the item matched by the JSONPointer, otherwise null - */ - public Object query(JSONPointer jsonPointer) { - return jsonPointer.queryFrom(this); - } - - /** - * Queries and returns a value from this object using {@code jsonPointer}, or - * returns null if the query fails due to a missing key. - * - * @param jsonPointer the string representation of the JSON pointer - * @return the queried value or {@code null} - * @throws IllegalArgumentException if {@code jsonPointer} has invalid syntax - */ - public Object optQuery(String jsonPointer) { - return optQuery(new JSONPointer(jsonPointer)); - } - - /** - * Queries and returns a value from this object using {@code jsonPointer}, or - * returns null if the query fails due to a missing key. - * - * @param jsonPointer The JSON pointer - * @return the queried value or {@code null} - * @throws IllegalArgumentException if {@code jsonPointer} has invalid syntax - */ - public Object optQuery(JSONPointer jsonPointer) { - try { - return jsonPointer.queryFrom(this); - } catch (JSONPointerException e) { - return null; - } - } - - /** - * Remove an index and close the hole. - * - * @param index - * The index of the element to be removed. - * @return The value that was associated with the index, or null if there - * was no value. - */ - public Object remove(int index) { - return index >= 0 && index < this.length() + } + } + return defaultValue; + } + + /** + * Get an optional {@link Number} value associated with a key, or + * null if there is no such key or if the value is not a number. + * If the value is a string, an attempt will be made to evaluate it as a + * number ({@link BigDecimal}). This method would be used in cases where type + * coercion of the number value is unwanted. + * + * @param index + * The index must be between 0 and length() - 1. + * @return An object which is the value. + */ + public Number optNumber(int index) + { + return this.optNumber(index, null); + } + + /** + * Get an optional {@link Number} value associated with a key, or the default + * if there is no such key or if the value is not a number. If the value is a + * string, an attempt will be made to evaluate it as a number + * ({@link BigDecimal}). This method would be used in cases where type + * coercion of the number value is unwanted. + * + * @param index + * The index must be between 0 and length() - 1. + * @param defaultValue + * The default. + * @return An object which is the value. + */ + public Number optNumber(int index, Number defaultValue) + { + Object val = this.opt(index); + if (JSONObject.NULL.equals(val)) + { + return defaultValue; + } + if (val instanceof Number) + { + return (Number) val; + } + + if (val instanceof String) + { + try + { + return JSONObject.stringToNumber((String) val); + } catch (Exception e) + { + return defaultValue; + } + } + return defaultValue; + } + + /** + * Get the optional string value associated with an index. It returns an empty + * string if there is no value at that index. If the value is not a string and + * is not null, then it is converted to a string. + * + * @param index + * The index must be between 0 and length() - 1. + * @return A String value. + */ + public String optString(int index) + { + return this.optString(index, ""); + } + + /** + * Get the optional string associated with an index. The defaultValue is + * returned if the key is not found. + * + * @param index + * The index must be between 0 and length() - 1. + * @param defaultValue + * The default value. + * @return A String value. + */ + public String optString(int index, String defaultValue) + { + Object object = this.opt(index); + return JSONObject.NULL.equals(object) ? defaultValue + : object.toString(); + } + + /** + * Append a boolean value. This increases the array's length by one. + * + * @param value + * A boolean value. + * @return this. + */ + public JSONArray put(boolean value) + { + return this.put(value ? Boolean.TRUE : Boolean.FALSE); + } + + /** + * Put a value in the JSONArray, where the value will be a JSONArray which is + * produced from a Collection. + * + * @param value + * A Collection value. + * @return this. + * @throws JSONException + * If the value is non-finite number. + */ + public JSONArray put(Collection value) + { + return this.put(new JSONArray(value)); + } + + /** + * Append a double value. This increases the array's length by one. + * + * @param value + * A double value. + * @return this. + * @throws JSONException + * if the value is not finite. + */ + public JSONArray put(double value) throws JSONException + { + return this.put(Double.valueOf(value)); + } + + /** + * Append a float value. This increases the array's length by one. + * + * @param value + * A float value. + * @return this. + * @throws JSONException + * if the value is not finite. + */ + public JSONArray put(float value) throws JSONException + { + return this.put(Float.valueOf(value)); + } + + /** + * Append an int value. This increases the array's length by one. + * + * @param value + * An int value. + * @return this. + */ + public JSONArray put(int value) + { + return this.put(Integer.valueOf(value)); + } + + /** + * Append an long value. This increases the array's length by one. + * + * @param value + * A long value. + * @return this. + */ + public JSONArray put(long value) + { + return this.put(Long.valueOf(value)); + } + + /** + * Put a value in the JSONArray, where the value will be a JSONObject which is + * produced from a Map. + * + * @param value + * A Map value. + * @return this. + * @throws JSONException + * If a value in the map is non-finite number. + * @throws NullPointerException + * If a key in the map is null + */ + public JSONArray put(Map value) + { + return this.put(new JSONObject(value)); + } + + /** + * Append an object value. This increases the array's length by one. + * + * @param value + * An object value. The value should be a Boolean, Double, Integer, + * JSONArray, JSONObject, Long, or String, or the JSONObject.NULL + * object. + * @return this. + * @throws JSONException + * If the value is non-finite number. + */ + public JSONArray put(Object value) + { + JSONObject.testValidity(value); + this.myArrayList.add(value); + return this; + } + + /** + * Put or replace a boolean value in the JSONArray. If the index is greater + * than the length of the JSONArray, then null elements will be added as + * necessary to pad it out. + * + * @param index + * The subscript. + * @param value + * A boolean value. + * @return this. + * @throws JSONException + * If the index is negative. + */ + public JSONArray put(int index, boolean value) throws JSONException + { + return this.put(index, value ? Boolean.TRUE : Boolean.FALSE); + } + + /** + * Put a value in the JSONArray, where the value will be a JSONArray which is + * produced from a Collection. + * + * @param index + * The subscript. + * @param value + * A Collection value. + * @return this. + * @throws JSONException + * If the index is negative or if the value is non-finite. + */ + public JSONArray put(int index, Collection value) throws JSONException + { + return this.put(index, new JSONArray(value)); + } + + /** + * Put or replace a double value. If the index is greater than the length of + * the JSONArray, then null elements will be added as necessary to pad it out. + * + * @param index + * The subscript. + * @param value + * A double value. + * @return this. + * @throws JSONException + * If the index is negative or if the value is non-finite. + */ + public JSONArray put(int index, double value) throws JSONException + { + return this.put(index, Double.valueOf(value)); + } + + /** + * Put or replace a float value. If the index is greater than the length of + * the JSONArray, then null elements will be added as necessary to pad it out. + * + * @param index + * The subscript. + * @param value + * A float value. + * @return this. + * @throws JSONException + * If the index is negative or if the value is non-finite. + */ + public JSONArray put(int index, float value) throws JSONException + { + return this.put(index, Float.valueOf(value)); + } + + /** + * Put or replace an int value. If the index is greater than the length of the + * JSONArray, then null elements will be added as necessary to pad it out. + * + * @param index + * The subscript. + * @param value + * An int value. + * @return this. + * @throws JSONException + * If the index is negative. + */ + public JSONArray put(int index, int value) throws JSONException + { + return this.put(index, Integer.valueOf(value)); + } + + /** + * Put or replace a long value. If the index is greater than the length of the + * JSONArray, then null elements will be added as necessary to pad it out. + * + * @param index + * The subscript. + * @param value + * A long value. + * @return this. + * @throws JSONException + * If the index is negative. + */ + public JSONArray put(int index, long value) throws JSONException + { + return this.put(index, Long.valueOf(value)); + } + + /** + * Put a value in the JSONArray, where the value will be a JSONObject that is + * produced from a Map. + * + * @param index + * The subscript. + * @param value + * The Map value. + * @return this. + * @throws JSONException + * If the index is negative or if the the value is an invalid + * number. + * @throws NullPointerException + * If a key in the map is null + */ + public JSONArray put(int index, Map value) throws JSONException + { + this.put(index, new JSONObject(value)); + return this; + } + + /** + * Put or replace an object value in the JSONArray. If the index is greater + * than the length of the JSONArray, then null elements will be added as + * necessary to pad it out. + * + * @param index + * The subscript. + * @param value + * The value to put into the array. The value should be a Boolean, + * Double, Integer, JSONArray, JSONObject, Long, or String, or the + * JSONObject.NULL object. + * @return this. + * @throws JSONException + * If the index is negative or if the the value is an invalid + * number. + */ + public JSONArray put(int index, Object value) throws JSONException + { + if (index < 0) + { + throw new JSONException("JSONArray[" + index + "] not found."); + } + if (index < this.length()) + { + JSONObject.testValidity(value); + this.myArrayList.set(index, value); + return this; + } + if (index == this.length()) + { + // simple append + return this.put(value); + } + // if we are inserting past the length, we want to grow the array all at + // once + // instead of incrementally. + this.myArrayList.ensureCapacity(index + 1); + while (index != this.length()) + { + // we don't need to test validity of NULL objects + this.myArrayList.add(JSONObject.NULL); + } + return this.put(value); + } + + /** + * Creates a JSONPointer using an initialization string and tries to match it + * to an item within this JSONArray. For example, given a JSONArray + * initialized with this document: + * + *
        +   * [
        +   *     {"b":"c"}
        +   * ]
        +   * 
        + * + * and this JSONPointer string: + * + *
        +   * "/0/b"
        +   * 
        + * + * Then this method will return the String "c" A JSONPointerException may be + * thrown from code called by this method. + * + * @param jsonPointer + * string that can be used to create a JSONPointer + * @return the item matched by the JSONPointer, otherwise null + */ + public Object query(String jsonPointer) + { + return query(new JSONPointer(jsonPointer)); + } + + /** + * Uses a uaer initialized JSONPointer and tries to match it to an item + * whithin this JSONArray. For example, given a JSONArray initialized with + * this document: + * + *
        +   * [
        +   *     {"b":"c"}
        +   * ]
        +   * 
        + * + * and this JSONPointer: + * + *
        +   * "/0/b"
        +   * 
        + * + * Then this method will return the String "c" A JSONPointerException may be + * thrown from code called by this method. + * + * @param jsonPointer + * string that can be used to create a JSONPointer + * @return the item matched by the JSONPointer, otherwise null + */ + public Object query(JSONPointer jsonPointer) + { + return jsonPointer.queryFrom(this); + } + + /** + * Queries and returns a value from this object using {@code jsonPointer}, or + * returns null if the query fails due to a missing key. + * + * @param jsonPointer + * the string representation of the JSON pointer + * @return the queried value or {@code null} + * @throws IllegalArgumentException + * if {@code jsonPointer} has invalid syntax + */ + public Object optQuery(String jsonPointer) + { + return optQuery(new JSONPointer(jsonPointer)); + } + + /** + * Queries and returns a value from this object using {@code jsonPointer}, or + * returns null if the query fails due to a missing key. + * + * @param jsonPointer + * The JSON pointer + * @return the queried value or {@code null} + * @throws IllegalArgumentException + * if {@code jsonPointer} has invalid syntax + */ + public Object optQuery(JSONPointer jsonPointer) + { + try + { + return jsonPointer.queryFrom(this); + } catch (JSONPointerException e) + { + return null; + } + } + + /** + * Remove an index and close the hole. + * + * @param index + * The index of the element to be removed. + * @return The value that was associated with the index, or null if there was + * no value. + */ + public Object remove(int index) + { + return index >= 0 && index < this.length() ? this.myArrayList.remove(index) : null; - } - - /** - * Determine if two JSONArrays are similar. - * They must contain similar sequences. - * - * @param other The other JSONArray - * @return true if they are equal - */ - public boolean similar(Object other) { - if (!(other instanceof JSONArray)) { - return false; + } + + /** + * Determine if two JSONArrays are similar. They must contain similar + * sequences. + * + * @param other + * The other JSONArray + * @return true if they are equal + */ + public boolean similar(Object other) + { + if (!(other instanceof JSONArray)) + { + return false; + } + int len = this.length(); + if (len != ((JSONArray) other).length()) + { + return false; + } + for (int i = 0; i < len; i += 1) + { + Object valueThis = this.myArrayList.get(i); + Object valueOther = ((JSONArray) other).myArrayList.get(i); + if (valueThis == valueOther) + { + continue; + } + if (valueThis == null) + { + return false; + } + if (valueThis instanceof JSONObject) + { + if (!((JSONObject) valueThis).similar(valueOther)) + { + return false; } - int len = this.length(); - if (len != ((JSONArray)other).length()) { - return false; + } + else if (valueThis instanceof JSONArray) + { + if (!((JSONArray) valueThis).similar(valueOther)) + { + return false; } - for (int i = 0; i < len; i += 1) { - Object valueThis = this.myArrayList.get(i); - Object valueOther = ((JSONArray)other).myArrayList.get(i); - if(valueThis == valueOther) { - continue; - } - if(valueThis == null) { - return false; - } - if (valueThis instanceof JSONObject) { - if (!((JSONObject)valueThis).similar(valueOther)) { - return false; - } - } else if (valueThis instanceof JSONArray) { - if (!((JSONArray)valueThis).similar(valueOther)) { - return false; - } - } else if (!valueThis.equals(valueOther)) { - return false; - } + } + else if (!valueThis.equals(valueOther)) + { + return false; + } + } + return true; + } + + /** + * Produce a JSONObject by combining a JSONArray of names with the values of + * this JSONArray. + * + * @param names + * A JSONArray containing a list of key strings. These will be paired + * with the values. + * @return A JSONObject, or null if there are no names or if this JSONArray + * has no values. + * @throws JSONException + * If any of the names are null. + */ + public JSONObject toJSONObject(JSONArray names) throws JSONException + { + if (names == null || names.isEmpty() || this.isEmpty()) + { + return null; + } + JSONObject jo = new JSONObject(names.length()); + for (int i = 0; i < names.length(); i += 1) + { + jo.put(names.getString(i), this.opt(i)); + } + return jo; + } + + /** + * Make a JSON text of this JSONArray. For compactness, no unnecessary + * whitespace is added. If it is not possible to produce a syntactically + * correct JSON text then null will be returned instead. This could occur if + * the array contains an invalid number. + *

        + * Warning: This method assumes that the data structure is acyclical. + * + * @return a printable, displayable, transmittable representation of the + * array. + */ + @Override + public String toString() + { + try + { + return this.toString(0); + } catch (Exception e) + { + return null; + } + } + + /** + * Make a pretty-printed JSON text of this JSONArray. + * + *

        + * If indentFactor > 0 and the {@link JSONArray} has only one + * element, then the array will be output on a single line: + * + *

        +   * {@code [1]}
        +   * 
        + * + *

        + * If an array has 2 or more elements, then it will be output across multiple + * lines: + * + *

        +   * {@code
        +   * [
        +   * 1,
        +   * "value 2",
        +   * 3
        +   * ]
        +   * }
        +   * 
        + *

        + * Warning: This method assumes that the data structure is acyclical. + * + * @param indentFactor + * The number of spaces to add to each level of indentation. + * @return a printable, displayable, transmittable representation of the + * object, beginning with [ (left + * bracket) and ending with ]  (right + * bracket). + * @throws JSONException + */ + public String toString(int indentFactor) throws JSONException + { + StringWriter sw = new StringWriter(); + synchronized (sw.getBuffer()) + { + return this.write(sw, indentFactor, 0).toString(); + } + } + + /** + * Write the contents of the JSONArray as JSON text to a writer. For + * compactness, no whitespace is added. + *

        + * Warning: This method assumes that the data structure is acyclical. + * + * @return The writer. + * @throws JSONException + */ + public Writer write(Writer writer) throws JSONException + { + return this.write(writer, 0, 0); + } + + /** + * Write the contents of the JSONArray as JSON text to a writer. + * + *

        + * If indentFactor > 0 and the {@link JSONArray} has only one + * element, then the array will be output on a single line: + * + *

        +   * {@code [1]}
        +   * 
        + * + *

        + * If an array has 2 or more elements, then it will be output across multiple + * lines: + * + *

        +   * {@code
        +   * [
        +   * 1,
        +   * "value 2",
        +   * 3
        +   * ]
        +   * }
        +   * 
        + *

        + * Warning: This method assumes that the data structure is acyclical. + * + * @param writer + * Writes the serialized JSON + * @param indentFactor + * The number of spaces to add to each level of indentation. + * @param indent + * The indentation of the top level. + * @return The writer. + * @throws JSONException + */ + public Writer write(Writer writer, int indentFactor, int indent) + throws JSONException + { + try + { + boolean commanate = false; + int length = this.length(); + writer.write('['); + + if (length == 1) + { + try + { + JSONObject.writeValue(writer, this.myArrayList.get(0), + indentFactor, indent); + } catch (Exception e) + { + throw new JSONException( + "Unable to write JSONArray value at index: 0", e); } - return true; - } - - /** - * Produce a JSONObject by combining a JSONArray of names with the values of - * this JSONArray. - * - * @param names - * A JSONArray containing a list of key strings. These will be - * paired with the values. - * @return A JSONObject, or null if there are no names or if this JSONArray - * has no values. - * @throws JSONException - * If any of the names are null. - */ - public JSONObject toJSONObject(JSONArray names) throws JSONException { - if (names == null || names.isEmpty() || this.isEmpty()) { - return null; - } - JSONObject jo = new JSONObject(names.length()); - for (int i = 0; i < names.length(); i += 1) { - jo.put(names.getString(i), this.opt(i)); - } - return jo; - } - - /** - * Make a JSON text of this JSONArray. For compactness, no unnecessary - * whitespace is added. If it is not possible to produce a syntactically - * correct JSON text then null will be returned instead. This could occur if - * the array contains an invalid number. - *

        - * Warning: This method assumes that the data structure is acyclical. - * - * - * @return a printable, displayable, transmittable representation of the - * array. - */ - @Override - public String toString() { - try { - return this.toString(0); - } catch (Exception e) { - return null; - } - } - - /** - * Make a pretty-printed JSON text of this JSONArray. - * - *

        If indentFactor > 0 and the {@link JSONArray} has only - * one element, then the array will be output on a single line: - *

        {@code [1]}
        - * - *

        If an array has 2 or more elements, then it will be output across - * multiple lines:

        {@code
        -     * [
        -     * 1,
        -     * "value 2",
        -     * 3
        -     * ]
        -     * }
        - *

        - * Warning: This method assumes that the data structure is acyclical. - * - * - * @param indentFactor - * The number of spaces to add to each level of indentation. - * @return a printable, displayable, transmittable representation of the - * object, beginning with [ (left - * bracket) and ending with ] - *  (right bracket). - * @throws JSONException - */ - public String toString(int indentFactor) throws JSONException { - StringWriter sw = new StringWriter(); - synchronized (sw.getBuffer()) { - return this.write(sw, indentFactor, 0).toString(); - } - } - - /** - * Write the contents of the JSONArray as JSON text to a writer. For - * compactness, no whitespace is added. - *

        - * Warning: This method assumes that the data structure is acyclical. - * - * - * @return The writer. - * @throws JSONException - */ - public Writer write(Writer writer) throws JSONException { - return this.write(writer, 0, 0); - } - - /** - * Write the contents of the JSONArray as JSON text to a writer. - * - *

        If indentFactor > 0 and the {@link JSONArray} has only - * one element, then the array will be output on a single line: - *

        {@code [1]}
        - * - *

        If an array has 2 or more elements, then it will be output across - * multiple lines:

        {@code
        -     * [
        -     * 1,
        -     * "value 2",
        -     * 3
        -     * ]
        -     * }
        - *

        - * Warning: This method assumes that the data structure is acyclical. - * - * - * @param writer - * Writes the serialized JSON - * @param indentFactor - * The number of spaces to add to each level of indentation. - * @param indent - * The indentation of the top level. - * @return The writer. - * @throws JSONException - */ - public Writer write(Writer writer, int indentFactor, int indent) - throws JSONException { - try { - boolean commanate = false; - int length = this.length(); - writer.write('['); - - if (length == 1) { - try { - JSONObject.writeValue(writer, this.myArrayList.get(0), - indentFactor, indent); - } catch (Exception e) { - throw new JSONException("Unable to write JSONArray value at index: 0", e); - } - } else if (length != 0) { - final int newindent = indent + indentFactor; - - for (int i = 0; i < length; i += 1) { - if (commanate) { - writer.write(','); - } - if (indentFactor > 0) { - writer.write('\n'); - } - JSONObject.indent(writer, newindent); - try { - JSONObject.writeValue(writer, this.myArrayList.get(i), - indentFactor, newindent); - } catch (Exception e) { - throw new JSONException("Unable to write JSONArray value at index: " + i, e); - } - commanate = true; - } - if (indentFactor > 0) { - writer.write('\n'); - } - JSONObject.indent(writer, indent); - } - writer.write(']'); - return writer; - } catch (IOException e) { - throw new JSONException(e); + } + else if (length != 0) + { + final int newindent = indent + indentFactor; + + for (int i = 0; i < length; i += 1) + { + if (commanate) + { + writer.write(','); + } + if (indentFactor > 0) + { + writer.write('\n'); + } + JSONObject.indent(writer, newindent); + try + { + JSONObject.writeValue(writer, this.myArrayList.get(i), + indentFactor, newindent); + } catch (Exception e) + { + throw new JSONException( + "Unable to write JSONArray value at index: " + i, e); + } + commanate = true; } - } - - /** - * Returns a java.util.List containing all of the elements in this array. - * If an element in the array is a JSONArray or JSONObject it will also - * be converted. - *

        - * Warning: This method assumes that the data structure is acyclical. - * - * @return a java.util.List containing the elements of this array - */ - public List toList() { - List results = new ArrayList(this.myArrayList.size()); - for (Object element : this.myArrayList) { - if (element == null || JSONObject.NULL.equals(element)) { - results.add(null); - } else if (element instanceof JSONArray) { - results.add(((JSONArray) element).toList()); - } else if (element instanceof JSONObject) { - results.add(((JSONObject) element).toMap()); - } else { - results.add(element); - } + if (indentFactor > 0) + { + writer.write('\n'); } - return results; - } - - /** - * Check if JSONArray is empty. - * - * @return true if JSONArray is empty, otherwise false. - */ - public boolean isEmpty() { - return myArrayList.isEmpty(); - } + JSONObject.indent(writer, indent); + } + writer.write(']'); + return writer; + } catch (IOException e) + { + throw new JSONException(e); + } + } + + /** + * Returns a java.util.List containing all of the elements in this array. If + * an element in the array is a JSONArray or JSONObject it will also be + * converted. + *

        + * Warning: This method assumes that the data structure is acyclical. + * + * @return a java.util.List containing the elements of this array + */ + public List toList() + { + List results = new ArrayList(this.myArrayList.size()); + for (Object element : this.myArrayList) + { + if (element == null || JSONObject.NULL.equals(element)) + { + results.add(null); + } + else if (element instanceof JSONArray) + { + results.add(((JSONArray) element).toList()); + } + else if (element instanceof JSONObject) + { + results.add(((JSONObject) element).toMap()); + } + else + { + results.add(element); + } + } + return results; + } + + /** + * Check if JSONArray is empty. + * + * @return true if JSONArray is empty, otherwise false. + */ + public boolean isEmpty() + { + return myArrayList.isEmpty(); + } } diff --git a/src/org/json/JSONException.java b/src/org/json/JSONException.java index 72542df..99e62c9 100644 --- a/src/org/json/JSONException.java +++ b/src/org/json/JSONException.java @@ -6,40 +6,44 @@ package org.json; * @author JSON.org * @version 2015-12-09 */ -public class JSONException extends RuntimeException { - /** Serialization ID */ - private static final long serialVersionUID = 0; +public class JSONException extends RuntimeException +{ + /** Serialization ID */ + private static final long serialVersionUID = 0; - /** - * Constructs a JSONException with an explanatory message. - * - * @param message - * Detail about the reason for the exception. - */ - public JSONException(final String message) { - super(message); - } + /** + * Constructs a JSONException with an explanatory message. + * + * @param message + * Detail about the reason for the exception. + */ + public JSONException(final String message) + { + super(message); + } - /** - * Constructs a JSONException with an explanatory message and cause. - * - * @param message - * Detail about the reason for the exception. - * @param cause - * The cause. - */ - public JSONException(final String message, final Throwable cause) { - super(message, cause); - } + /** + * Constructs a JSONException with an explanatory message and cause. + * + * @param message + * Detail about the reason for the exception. + * @param cause + * The cause. + */ + public JSONException(final String message, final Throwable cause) + { + super(message, cause); + } - /** - * Constructs a new JSONException with the specified cause. - * - * @param cause - * The cause. - */ - public JSONException(final Throwable cause) { - super(cause.getMessage(), cause); - } + /** + * Constructs a new JSONException with the specified cause. + * + * @param cause + * The cause. + */ + public JSONException(final Throwable cause) + { + super(cause.getMessage(), cause); + } } diff --git a/src/org/json/JSONML.java b/src/org/json/JSONML.java index acec7b8..1a434fe 100644 --- a/src/org/json/JSONML.java +++ b/src/org/json/JSONML.java @@ -32,511 +32,652 @@ SOFTWARE. * @author JSON.org * @version 2016-01-30 */ -public class JSONML { - /** - * Parse XML values and store them in a JSONArray. - * @param x The XMLTokener containing the source string. - * @param arrayForm true if array form, false if object form. - * @param ja The JSONArray that is containing the current tag or null - * if we are at the outermost level. - * @param keepStrings Don't type-convert text nodes and attribute values - * @return A JSONArray if the value is the outermost tag, otherwise null. - * @throws JSONException - */ - private static Object parse( - XMLTokener x, - boolean arrayForm, - JSONArray ja, - boolean keepStrings - ) throws JSONException { - String attribute; - char c; - String closeTag = null; - int i; - JSONArray newja = null; - JSONObject newjo = null; - Object token; - String tagName = null; - -// Test for and skip past these forms: -// -// -// -// - - while (true) { - if (!x.more()) { - throw x.syntaxError("Bad XML"); +public class JSONML +{ + /** + * Parse XML values and store them in a JSONArray. + * + * @param x + * The XMLTokener containing the source string. + * @param arrayForm + * true if array form, false if object form. + * @param ja + * The JSONArray that is containing the current tag or null if we are + * at the outermost level. + * @param keepStrings + * Don't type-convert text nodes and attribute values + * @return A JSONArray if the value is the outermost tag, otherwise null. + * @throws JSONException + */ + private static Object parse(XMLTokener x, boolean arrayForm, JSONArray ja, + boolean keepStrings) throws JSONException + { + String attribute; + char c; + String closeTag = null; + int i; + JSONArray newja = null; + JSONObject newjo = null; + Object token; + String tagName = null; + + // Test for and skip past these forms: + // + // + // + // + + while (true) + { + if (!x.more()) + { + throw x.syntaxError("Bad XML"); + } + token = x.nextContent(); + if (token == XML.LT) + { + token = x.nextToken(); + if (token instanceof Character) + { + if (token == XML.SLASH) + { + + // Close tag "); - } else { - x.back(); - } - } else if (c == '[') { - token = x.nextToken(); - if (token.equals("CDATA") && x.next() == '[') { - if (ja != null) { - ja.put(x.nextCDATA()); - } - } else { - throw x.syntaxError("Expected 'CDATA['"); - } - } else { - i = 1; - do { - token = x.nextMeta(); - if (token == null) { - throw x.syntaxError("Missing '>' after ' 0); - } - } else if (token == XML.QUEST) { - -// "); - } else { - throw x.syntaxError("Misshaped tag"); - } - -// Open tag < - - } else { - if (!(token instanceof String)) { - throw x.syntaxError("Bad tagName '" + token + "'."); - } - tagName = (String)token; - newja = new JSONArray(); - newjo = new JSONObject(); - if (arrayForm) { - newja.put(tagName); - if (ja != null) { - ja.put(newja); - } - } else { - newjo.put("tagName", tagName); - if (ja != null) { - ja.put(newjo); - } - } - token = null; - for (;;) { - if (token == null) { - token = x.nextToken(); - } - if (token == null) { - throw x.syntaxError("Misshaped tag"); - } - if (!(token instanceof String)) { - break; - } - -// attribute = value - - attribute = (String)token; - if (!arrayForm && ("tagName".equals(attribute) || "childNode".equals(attribute))) { - throw x.syntaxError("Reserved attribute."); - } - token = x.nextToken(); - if (token == XML.EQ) { - token = x.nextToken(); - if (!(token instanceof String)) { - throw x.syntaxError("Missing value"); - } - newjo.accumulate(attribute, keepStrings ? ((String)token) :XML.stringToValue((String)token)); - token = null; - } else { - newjo.accumulate(attribute, ""); - } - } - if (arrayForm && newjo.length() > 0) { - newja.put(newjo); - } - -// Empty tag <.../> - - if (token == XML.SLASH) { - if (x.nextToken() != XML.GT) { - throw x.syntaxError("Misshaped tag"); - } - if (ja == null) { - if (arrayForm) { - return newja; - } - return newjo; - } - -// Content, between <...> and - - } else { - if (token != XML.GT) { - throw x.syntaxError("Misshaped tag"); - } - closeTag = (String)parse(x, arrayForm, newja, keepStrings); - if (closeTag != null) { - if (!closeTag.equals(tagName)) { - throw x.syntaxError("Mismatched '" + tagName + - "' and '" + closeTag + "'"); - } - tagName = null; - if (!arrayForm && newja.length() > 0) { - newjo.put("childNodes", newja); - } - if (ja == null) { - if (arrayForm) { - return newja; - } - return newjo; - } - } - } + if (x.nextToken() != XML.GT) + { + throw x.syntaxError("Misshaped close tag"); + } + return token; + } + else if (token == XML.BANG) + { + + // "); + } + else + { + x.back(); + } + } + else if (c == '[') + { + token = x.nextToken(); + if (token.equals("CDATA") && x.next() == '[') + { + if (ja != null) + { + ja.put(x.nextCDATA()); + } + } + else + { + throw x.syntaxError("Expected 'CDATA['"); + } + } + else + { + i = 1; + do + { + token = x.nextMeta(); + if (token == null) + { + throw x.syntaxError("Missing '>' after ' 0); } - } - } - - - /** - * Convert a well-formed (but not necessarily valid) XML string into a - * JSONArray using the JsonML transform. Each XML tag is represented as - * a JSONArray in which the first element is the tag name. If the tag has - * attributes, then the second element will be JSONObject containing the - * name/value pairs. If the tag contains children, then strings and - * JSONArrays will represent the child tags. - * Comments, prologs, DTDs, and <[ [ ]]> are ignored. - * @param string The source string. - * @return A JSONArray containing the structured data from the XML string. - * @throws JSONException Thrown on error converting to a JSONArray - */ - public static JSONArray toJSONArray(String string) throws JSONException { - return (JSONArray)parse(new XMLTokener(string), true, null, false); - } + } + else if (token == XML.QUEST) + { + // <[ [ ]]> are ignored. - * @param string The source string. - * @param keepStrings If true, then values will not be coerced into boolean - * or numeric values and will instead be left as strings - * @return A JSONArray containing the structured data from the XML string. - * @throws JSONException Thrown on error converting to a JSONArray - */ - public static JSONArray toJSONArray(String string, boolean keepStrings) throws JSONException { - return (JSONArray)parse(new XMLTokener(string), true, null, keepStrings); - } + x.skipPast("?>"); + } + else + { + throw x.syntaxError("Misshaped tag"); + } + // Open tag < - /** - * Convert a well-formed (but not necessarily valid) XML string into a - * JSONArray using the JsonML transform. Each XML tag is represented as - * a JSONArray in which the first element is the tag name. If the tag has - * attributes, then the second element will be JSONObject containing the - * name/value pairs. If the tag contains children, then strings and - * JSONArrays will represent the child content and tags. - * As opposed to toJSONArray this method does not attempt to convert - * any text node or attribute value to any type - * but just leaves it as a string. - * Comments, prologs, DTDs, and <[ [ ]]> are ignored. - * @param x An XMLTokener. - * @param keepStrings If true, then values will not be coerced into boolean - * or numeric values and will instead be left as strings - * @return A JSONArray containing the structured data from the XML string. - * @throws JSONException Thrown on error converting to a JSONArray - */ - public static JSONArray toJSONArray(XMLTokener x, boolean keepStrings) throws JSONException { - return (JSONArray)parse(x, true, null, keepStrings); - } + } + else + { + if (!(token instanceof String)) + { + throw x.syntaxError("Bad tagName '" + token + "'."); + } + tagName = (String) token; + newja = new JSONArray(); + newjo = new JSONObject(); + if (arrayForm) + { + newja.put(tagName); + if (ja != null) + { + ja.put(newja); + } + } + else + { + newjo.put("tagName", tagName); + if (ja != null) + { + ja.put(newjo); + } + } + token = null; + for (;;) + { + if (token == null) + { + token = x.nextToken(); + } + if (token == null) + { + throw x.syntaxError("Misshaped tag"); + } + if (!(token instanceof String)) + { + break; + } + // attribute = value - /** - * Convert a well-formed (but not necessarily valid) XML string into a - * JSONArray using the JsonML transform. Each XML tag is represented as - * a JSONArray in which the first element is the tag name. If the tag has - * attributes, then the second element will be JSONObject containing the - * name/value pairs. If the tag contains children, then strings and - * JSONArrays will represent the child content and tags. - * Comments, prologs, DTDs, and <[ [ ]]> are ignored. - * @param x An XMLTokener. - * @return A JSONArray containing the structured data from the XML string. - * @throws JSONException Thrown on error converting to a JSONArray - */ - public static JSONArray toJSONArray(XMLTokener x) throws JSONException { - return (JSONArray)parse(x, true, null, false); - } + attribute = (String) token; + if (!arrayForm && ("tagName".equals(attribute) + || "childNode".equals(attribute))) + { + throw x.syntaxError("Reserved attribute."); + } + token = x.nextToken(); + if (token == XML.EQ) + { + token = x.nextToken(); + if (!(token instanceof String)) + { + throw x.syntaxError("Missing value"); + } + newjo.accumulate(attribute, keepStrings ? ((String) token) + : XML.stringToValue((String) token)); + token = null; + } + else + { + newjo.accumulate(attribute, ""); + } + } + if (arrayForm && newjo.length() > 0) + { + newja.put(newjo); + } + + // Empty tag <.../> + + if (token == XML.SLASH) + { + if (x.nextToken() != XML.GT) + { + throw x.syntaxError("Misshaped tag"); + } + if (ja == null) + { + if (arrayForm) + { + return newja; + } + return newjo; + } + // Content, between <...> and - /** - * Convert a well-formed (but not necessarily valid) XML string into a - * JSONObject using the JsonML transform. Each XML tag is represented as - * a JSONObject with a "tagName" property. If the tag has attributes, then - * the attributes will be in the JSONObject as properties. If the tag - * contains children, the object will have a "childNodes" property which - * will be an array of strings and JsonML JSONObjects. - - * Comments, prologs, DTDs, and <[ [ ]]> are ignored. - * @param string The XML source text. - * @return A JSONObject containing the structured data from the XML string. - * @throws JSONException Thrown on error converting to a JSONObject - */ - public static JSONObject toJSONObject(String string) throws JSONException { - return (JSONObject)parse(new XMLTokener(string), false, null, false); + } + else + { + if (token != XML.GT) + { + throw x.syntaxError("Misshaped tag"); + } + closeTag = (String) parse(x, arrayForm, newja, keepStrings); + if (closeTag != null) + { + if (!closeTag.equals(tagName)) + { + throw x.syntaxError("Mismatched '" + tagName + "' and '" + + closeTag + "'"); + } + tagName = null; + if (!arrayForm && newja.length() > 0) + { + newjo.put("childNodes", newja); + } + if (ja == null) + { + if (arrayForm) + { + return newja; + } + return newjo; + } + } + } + } + } + else + { + if (ja != null) + { + ja.put(token instanceof String + ? keepStrings ? XML.unescape((String) token) + : XML.stringToValue((String) token) + : token); + } + } } - - - /** - * Convert a well-formed (but not necessarily valid) XML string into a - * JSONObject using the JsonML transform. Each XML tag is represented as - * a JSONObject with a "tagName" property. If the tag has attributes, then - * the attributes will be in the JSONObject as properties. If the tag - * contains children, the object will have a "childNodes" property which - * will be an array of strings and JsonML JSONObjects. - - * Comments, prologs, DTDs, and <[ [ ]]> are ignored. - * @param string The XML source text. - * @param keepStrings If true, then values will not be coerced into boolean - * or numeric values and will instead be left as strings - * @return A JSONObject containing the structured data from the XML string. - * @throws JSONException Thrown on error converting to a JSONObject - */ - public static JSONObject toJSONObject(String string, boolean keepStrings) throws JSONException { - return (JSONObject)parse(new XMLTokener(string), false, null, keepStrings); + } + + /** + * Convert a well-formed (but not necessarily valid) XML string into a + * JSONArray using the JsonML transform. Each XML tag is represented as a + * JSONArray in which the first element is the tag name. If the tag has + * attributes, then the second element will be JSONObject containing the + * name/value pairs. If the tag contains children, then strings and JSONArrays + * will represent the child tags. Comments, prologs, DTDs, and + * <[ [ ]]> are ignored. + * + * @param string + * The source string. + * @return A JSONArray containing the structured data from the XML string. + * @throws JSONException + * Thrown on error converting to a JSONArray + */ + public static JSONArray toJSONArray(String string) throws JSONException + { + return (JSONArray) parse(new XMLTokener(string), true, null, false); + } + + /** + * Convert a well-formed (but not necessarily valid) XML string into a + * JSONArray using the JsonML transform. Each XML tag is represented as a + * JSONArray in which the first element is the tag name. If the tag has + * attributes, then the second element will be JSONObject containing the + * name/value pairs. If the tag contains children, then strings and JSONArrays + * will represent the child tags. As opposed to toJSONArray this method does + * not attempt to convert any text node or attribute value to any type but + * just leaves it as a string. Comments, prologs, DTDs, and + * <[ [ ]]> are ignored. + * + * @param string + * The source string. + * @param keepStrings + * If true, then values will not be coerced into boolean or numeric + * values and will instead be left as strings + * @return A JSONArray containing the structured data from the XML string. + * @throws JSONException + * Thrown on error converting to a JSONArray + */ + public static JSONArray toJSONArray(String string, boolean keepStrings) + throws JSONException + { + return (JSONArray) parse(new XMLTokener(string), true, null, + keepStrings); + } + + /** + * Convert a well-formed (but not necessarily valid) XML string into a + * JSONArray using the JsonML transform. Each XML tag is represented as a + * JSONArray in which the first element is the tag name. If the tag has + * attributes, then the second element will be JSONObject containing the + * name/value pairs. If the tag contains children, then strings and JSONArrays + * will represent the child content and tags. As opposed to toJSONArray this + * method does not attempt to convert any text node or attribute value to any + * type but just leaves it as a string. Comments, prologs, DTDs, and + * <[ [ ]]> are ignored. + * + * @param x + * An XMLTokener. + * @param keepStrings + * If true, then values will not be coerced into boolean or numeric + * values and will instead be left as strings + * @return A JSONArray containing the structured data from the XML string. + * @throws JSONException + * Thrown on error converting to a JSONArray + */ + public static JSONArray toJSONArray(XMLTokener x, boolean keepStrings) + throws JSONException + { + return (JSONArray) parse(x, true, null, keepStrings); + } + + /** + * Convert a well-formed (but not necessarily valid) XML string into a + * JSONArray using the JsonML transform. Each XML tag is represented as a + * JSONArray in which the first element is the tag name. If the tag has + * attributes, then the second element will be JSONObject containing the + * name/value pairs. If the tag contains children, then strings and JSONArrays + * will represent the child content and tags. Comments, prologs, DTDs, and + * <[ [ ]]> are ignored. + * + * @param x + * An XMLTokener. + * @return A JSONArray containing the structured data from the XML string. + * @throws JSONException + * Thrown on error converting to a JSONArray + */ + public static JSONArray toJSONArray(XMLTokener x) throws JSONException + { + return (JSONArray) parse(x, true, null, false); + } + + /** + * Convert a well-formed (but not necessarily valid) XML string into a + * JSONObject using the JsonML transform. Each XML tag is represented as a + * JSONObject with a "tagName" property. If the tag has attributes, then the + * attributes will be in the JSONObject as properties. If the tag contains + * children, the object will have a "childNodes" property which will be an + * array of strings and JsonML JSONObjects. + * + * Comments, prologs, DTDs, and <[ [ ]]> are ignored. + * + * @param string + * The XML source text. + * @return A JSONObject containing the structured data from the XML string. + * @throws JSONException + * Thrown on error converting to a JSONObject + */ + public static JSONObject toJSONObject(String string) throws JSONException + { + return (JSONObject) parse(new XMLTokener(string), false, null, false); + } + + /** + * Convert a well-formed (but not necessarily valid) XML string into a + * JSONObject using the JsonML transform. Each XML tag is represented as a + * JSONObject with a "tagName" property. If the tag has attributes, then the + * attributes will be in the JSONObject as properties. If the tag contains + * children, the object will have a "childNodes" property which will be an + * array of strings and JsonML JSONObjects. + * + * Comments, prologs, DTDs, and <[ [ ]]> are ignored. + * + * @param string + * The XML source text. + * @param keepStrings + * If true, then values will not be coerced into boolean or numeric + * values and will instead be left as strings + * @return A JSONObject containing the structured data from the XML string. + * @throws JSONException + * Thrown on error converting to a JSONObject + */ + public static JSONObject toJSONObject(String string, boolean keepStrings) + throws JSONException + { + return (JSONObject) parse(new XMLTokener(string), false, null, + keepStrings); + } + + /** + * Convert a well-formed (but not necessarily valid) XML string into a + * JSONObject using the JsonML transform. Each XML tag is represented as a + * JSONObject with a "tagName" property. If the tag has attributes, then the + * attributes will be in the JSONObject as properties. If the tag contains + * children, the object will have a "childNodes" property which will be an + * array of strings and JsonML JSONObjects. + * + * Comments, prologs, DTDs, and <[ [ ]]> are ignored. + * + * @param x + * An XMLTokener of the XML source text. + * @return A JSONObject containing the structured data from the XML string. + * @throws JSONException + * Thrown on error converting to a JSONObject + */ + public static JSONObject toJSONObject(XMLTokener x) throws JSONException + { + return (JSONObject) parse(x, false, null, false); + } + + /** + * Convert a well-formed (but not necessarily valid) XML string into a + * JSONObject using the JsonML transform. Each XML tag is represented as a + * JSONObject with a "tagName" property. If the tag has attributes, then the + * attributes will be in the JSONObject as properties. If the tag contains + * children, the object will have a "childNodes" property which will be an + * array of strings and JsonML JSONObjects. + * + * Comments, prologs, DTDs, and <[ [ ]]> are ignored. + * + * @param x + * An XMLTokener of the XML source text. + * @param keepStrings + * If true, then values will not be coerced into boolean or numeric + * values and will instead be left as strings + * @return A JSONObject containing the structured data from the XML string. + * @throws JSONException + * Thrown on error converting to a JSONObject + */ + public static JSONObject toJSONObject(XMLTokener x, boolean keepStrings) + throws JSONException + { + return (JSONObject) parse(x, false, null, keepStrings); + } + + /** + * Reverse the JSONML transformation, making an XML text from a JSONArray. + * + * @param ja + * A JSONArray. + * @return An XML string. + * @throws JSONException + * Thrown on error converting to a string + */ + public static String toString(JSONArray ja) throws JSONException + { + int i; + JSONObject jo; + int length; + Object object; + StringBuilder sb = new StringBuilder(); + String tagName; + + // Emit <[ [ ]]> are ignored. - * @param x An XMLTokener of the XML source text. - * @return A JSONObject containing the structured data from the XML string. - * @throws JSONException Thrown on error converting to a JSONObject - */ - public static JSONObject toJSONObject(XMLTokener x) throws JSONException { - return (JSONObject)parse(x, false, null, false); + else + { + i = 1; } + // Emit content in body - /** - * Convert a well-formed (but not necessarily valid) XML string into a - * JSONObject using the JsonML transform. Each XML tag is represented as - * a JSONObject with a "tagName" property. If the tag has attributes, then - * the attributes will be in the JSONObject as properties. If the tag - * contains children, the object will have a "childNodes" property which - * will be an array of strings and JsonML JSONObjects. - - * Comments, prologs, DTDs, and <[ [ ]]> are ignored. - * @param x An XMLTokener of the XML source text. - * @param keepStrings If true, then values will not be coerced into boolean - * or numeric values and will instead be left as strings - * @return A JSONObject containing the structured data from the XML string. - * @throws JSONException Thrown on error converting to a JSONObject - */ - public static JSONObject toJSONObject(XMLTokener x, boolean keepStrings) throws JSONException { - return (JSONObject)parse(x, false, null, keepStrings); + length = ja.length(); + if (i >= length) + { + sb.append('/'); + sb.append('>'); } - - - /** - * Reverse the JSONML transformation, making an XML text from a JSONArray. - * @param ja A JSONArray. - * @return An XML string. - * @throws JSONException Thrown on error converting to a string - */ - public static String toString(JSONArray ja) throws JSONException { - int i; - JSONObject jo; - int length; - Object object; - StringBuilder sb = new StringBuilder(); - String tagName; - -// Emit '); + do + { + object = ja.get(i); + i += 1; + if (object != null) + { + if (object instanceof String) + { + sb.append(XML.escape(object.toString())); + } + else if (object instanceof JSONObject) + { + sb.append(toString((JSONObject) object)); + } + else if (object instanceof JSONArray) + { + sb.append(toString((JSONArray) object)); + } + else + { + sb.append(object.toString()); + } } - -// Emit content in body - - length = ja.length(); - if (i >= length) { - sb.append('/'); - sb.append('>'); - } else { - sb.append('>'); - do { - object = ja.get(i); - i += 1; - if (object != null) { - if (object instanceof String) { - sb.append(XML.escape(object.toString())); - } else if (object instanceof JSONObject) { - sb.append(toString((JSONObject)object)); - } else if (object instanceof JSONArray) { - sb.append(toString((JSONArray)object)); - } else { - sb.append(object.toString()); - } - } - } while (i < length); - sb.append('<'); - sb.append('/'); - sb.append(tagName); - sb.append('>'); + } while (i < length); + sb.append('<'); + sb.append('/'); + sb.append(tagName); + sb.append('>'); + } + return sb.toString(); + } + + /** + * Reverse the JSONML transformation, making an XML text from a JSONObject. + * The JSONObject must contain a "tagName" property. If it has children, then + * it must have a "childNodes" property containing an array of objects. The + * other properties are attributes with string values. + * + * @param jo + * A JSONObject. + * @return An XML string. + * @throws JSONException + * Thrown on error converting to a string + */ + public static String toString(JSONObject jo) throws JSONException + { + StringBuilder sb = new StringBuilder(); + int i; + JSONArray ja; + int length; + Object object; + String tagName; + Object value; + + // Emit '); - } else { - sb.append('>'); - length = ja.length(); - for (i = 0; i < length; i += 1) { - object = ja.get(i); - if (object != null) { - if (object instanceof String) { - sb.append(XML.escape(object.toString())); - } else if (object instanceof JSONObject) { - sb.append(toString((JSONObject)object)); - } else if (object instanceof JSONArray) { - sb.append(toString((JSONArray)object)); - } else { - sb.append(object.toString()); - } - } - } - sb.append('<'); - sb.append('/'); - sb.append(tagName); - sb.append('>'); + ja = jo.optJSONArray("childNodes"); + if (ja == null) + { + sb.append('/'); + sb.append('>'); + } + else + { + sb.append('>'); + length = ja.length(); + for (i = 0; i < length; i += 1) + { + object = ja.get(i); + if (object != null) + { + if (object instanceof String) + { + sb.append(XML.escape(object.toString())); + } + else if (object instanceof JSONObject) + { + sb.append(toString((JSONObject) object)); + } + else if (object instanceof JSONArray) + { + sb.append(toString((JSONArray) object)); + } + else + { + sb.append(object.toString()); + } } - return sb.toString(); + } + sb.append('<'); + sb.append('/'); + sb.append(tagName); + sb.append('>'); } + return sb.toString(); + } } diff --git a/src/org/json/JSONObject.java b/src/org/json/JSONObject.java index 42d34de..4b5c5ea 100644 --- a/src/org/json/JSONObject.java +++ b/src/org/json/JSONObject.java @@ -99,2313 +99,2910 @@ import java.util.Set; * @author JSON.org * @version 2016-08-15 */ -public class JSONObject { - /** - * JSONObject.NULL is equivalent to the value that JavaScript calls null, whilst - * Java's null is equivalent to the value that JavaScript calls undefined. - */ - private static final class Null { - - /** - * There is only intended to be a single instance of the NULL object, so the - * clone method returns itself. - * - * @return NULL. - */ - @Override - protected final Object clone() { - return this; - } - - /** - * A Null object is equal to the null value and to itself. - * - * @param object An object to test for nullness. - * @return true if the object parameter is the JSONObject.NULL object or null. - */ - @Override - public boolean equals(Object object) { - return object == null || object == this; - } - - /** - * A Null object is equal to the null value and to itself. - * - * @return always returns 0. - */ - @Override - public int hashCode() { - return 0; - } - - /** - * Get the "null" string value. - * - * @return The string "null". - */ - @Override - public String toString() { - return "null"; - } - } - - /** - * The map where the JSONObject's properties are kept. - */ - private final Map map; - - /** - * It is sometimes more convenient and less ambiguous to have a - * NULL object than to use Java's null value. - * JSONObject.NULL.equals(null) returns true. - * JSONObject.NULL.toString() returns "null". - */ - public static final Object NULL = new Null(); - - /** - * Construct an empty JSONObject. - */ - public JSONObject() { - // HashMap is used on purpose to ensure that elements are unordered by - // the specification. - // JSON tends to be a portable transfer format to allows the container - // implementations to rearrange their items for a faster element - // retrieval based on associative access. - // Therefore, an implementation mustn't rely on the order of the item. - this.map = new HashMap(); - } - - /** - * Construct a JSONObject from a subset of another JSONObject. An array of - * strings is used to identify the keys that should be copied. Missing keys are - * ignored. - * - * @param jo A JSONObject. - * @param names An array of strings. - */ - public JSONObject(JSONObject jo, String[] names) { - this(names.length); - for (int i = 0; i < names.length; i += 1) { - try { - this.putOnce(names[i], jo.opt(names[i])); - } catch (Exception ignore) { - } - } - } - - /** - * Construct a JSONObject from a JSONTokener. - * - * @param x A JSONTokener object containing the source string. - * @throws JSONException If there is a syntax error in the source string or a - * duplicated key. - */ - public JSONObject(JSONTokener x) throws JSONException { - this(); - char c; - String key; - - if (x.nextClean() != '{') { - throw x.syntaxError("A JSONObject text must begin with '{'"); - } - for (;;) { - c = x.nextClean(); - switch (c) { - case 0: - throw x.syntaxError("A JSONObject text must end with '}'"); - case '}': - return; - default: - x.back(); - key = x.nextValue().toString(); - } - - // The key is followed by ':'. - - c = x.nextClean(); - if (c != ':') { - throw x.syntaxError("Expected a ':' after a key"); - } - - // Use syntaxError(..) to include error location - - if (key != null) { - // Check if key exists - if (this.opt(key) != null) { - // key already exists - throw x.syntaxError("Duplicate key \"" + key + "\""); - } - // Only add value if non-null - Object value = x.nextValue(); - if (value != null) { - this.put(key, value); - } - } - - // Pairs are separated by ','. - - switch (x.nextClean()) { - case ';': - case ',': - if (x.nextClean() == '}') { - return; - } - x.back(); - break; - case '}': - return; - default: - throw x.syntaxError("Expected a ',' or '}'"); - } - } - } - - /** - * Construct a JSONObject from a Map. - * - * @param m A map object that can be used to initialize the contents of the - * JSONObject. - * @throws JSONException If a value in the map is non-finite number. - * @throws NullPointerException If a key in the map is null - */ - public JSONObject(Map m) { - if (m == null) { - this.map = new HashMap(); - } else { - this.map = new HashMap(m.size()); - for (final Entry e : m.entrySet()) { - if (e.getKey() == null) { - throw new NullPointerException("Null key."); - } - final Object value = e.getValue(); - if (value != null) { - this.map.put(String.valueOf(e.getKey()), wrap(value)); - } - } - } - } - - /** - * Construct a JSONObject from an Object using bean getters. It reflects on all - * of the public methods of the object. For each of the methods with no - * parameters and a name starting with "get" or "is" - * followed by an uppercase letter, the method is invoked, and a key and the - * value returned from the getter method are put into the new JSONObject. - *

        - * The key is formed by removing the "get" or "is" - * prefix. If the second remaining character is not upper case, then the first - * character is converted to lower case. - *

        - * Methods that are static, return void, have - * parameters, or are "bridge" methods, are ignored. - *

        - * For example, if an object has a method named "getName", and if - * the result of calling object.getName() is - * "Larry Fine", then the JSONObject will contain - * "name": "Larry Fine". - *

        - * The {@link JSONPropertyName} annotation can be used on a bean getter to - * override key name used in the JSONObject. For example, using the object above - * with the getName method, if we annotated it with: - * - *

        -	 * @JSONPropertyName("FullName")
        -	 * public String getName() {
        -	 * 	return this.name;
        -	 * }
        -	 * 
        - * - * The resulting JSON object would contain "FullName": "Larry Fine" - *

        - * Similarly, the {@link JSONPropertyName} annotation can be used on non- - * get and is methods. We can also override key name - * used in the JSONObject as seen below even though the field would normally be - * ignored: - * - *

        -	 * @JSONPropertyName("FullName")
        -	 * public String fullName() {
        -	 * 	return this.name;
        -	 * }
        -	 * 
        - * - * The resulting JSON object would contain "FullName": "Larry Fine" - *

        - * The {@link JSONPropertyIgnore} annotation can be used to force the bean - * property to not be serialized into JSON. If both {@link JSONPropertyIgnore} - * and {@link JSONPropertyName} are defined on the same method, a depth - * comparison is performed and the one closest to the concrete class being - * serialized is used. If both annotations are at the same level, then the - * {@link JSONPropertyIgnore} annotation takes precedent and the field is not - * serialized. For example, the following declaration would prevent the - * getName method from being serialized: - * - *

        -	 * @JSONPropertyName("FullName")
        -	 * @JSONPropertyIgnore
        -	 * public String getName() {
        -	 * 	return this.name;
        -	 * }
        -	 * 
        - *

        - * - * @param bean An object that has getter methods that should be used to make a - * JSONObject. - */ - public JSONObject(Object bean) { - this(); - this.populateMap(bean); - } - - /** - * Construct a JSONObject from an Object, using reflection to find the public - * members. The resulting JSONObject's keys will be the strings from the names - * array, and the values will be the field values associated with those keys in - * the object. If a key is not found or not visible, then it will not be copied - * into the new JSONObject. - * - * @param object An object that has fields that should be used to make a - * JSONObject. - * @param names An array of strings, the names of the fields to be obtained - * from the object. - */ - public JSONObject(Object object, String names[]) { - this(names.length); - Class c = object.getClass(); - for (int i = 0; i < names.length; i += 1) { - String name = names[i]; - try { - this.putOpt(name, c.getField(name).get(object)); - } catch (Exception ignore) { - } - } - } - - /** - * Construct a JSONObject from a source JSON text string. This is the most - * commonly used JSONObject constructor. - * - * @param source A string beginning with { (left - * brace) and ending with } - *  (right brace). - * @exception JSONException If there is a syntax error in the source string or a - * duplicated key. - */ - public JSONObject(String source) throws JSONException { - this(new JSONTokener(source)); - } - - /** - * Construct a JSONObject from a ResourceBundle. - * - * @param baseName The ResourceBundle base name. - * @param locale The Locale to load the ResourceBundle for. - * @throws JSONException If any JSONExceptions are detected. - */ - public JSONObject(String baseName, Locale locale) throws JSONException { - this(); - ResourceBundle bundle = ResourceBundle.getBundle(baseName, locale, - Thread.currentThread().getContextClassLoader()); - -// Iterate through the keys in the bundle. - - Enumeration keys = bundle.getKeys(); - while (keys.hasMoreElements()) { - Object key = keys.nextElement(); - if (key != null) { - -// Go through the path, ensuring that there is a nested JSONObject for each -// segment except the last. Add the value using the last segment's name into -// the deepest nested JSONObject. - - String[] path = ((String) key).split("\\."); - int last = path.length - 1; - JSONObject target = this; - for (int i = 0; i < last; i += 1) { - String segment = path[i]; - JSONObject nextTarget = target.optJSONObject(segment); - if (nextTarget == null) { - nextTarget = new JSONObject(); - target.put(segment, nextTarget); - } - target = nextTarget; - } - target.put(path[last], bundle.getString((String) key)); - } - } - } - - /** - * Constructor to specify an initial capacity of the internal map. Useful for - * library internal calls where we know, or at least can best guess, how big - * this JSONObject will be. - * - * @param initialCapacity initial capacity of the internal map. - */ - protected JSONObject(int initialCapacity) { - this.map = new HashMap(initialCapacity); - } - - /** - * Accumulate values under a key. It is similar to the put method except that if - * there is already an object stored under the key then a JSONArray is stored - * under the key to hold all of the accumulated values. If there is already a - * JSONArray, then the new value is appended to it. In contrast, the put method - * replaces the previous value. - * - * If only one value is accumulated that is not a JSONArray, then the result - * will be the same as using put. But if multiple values are accumulated, then - * the result will be like append. - * - * @param key A key string. - * @param value An object to be accumulated under the key. - * @return this. - * @throws JSONException If the value is non-finite number. - * @throws NullPointerException If the key is null. - */ - public JSONObject accumulate(String key, Object value) throws JSONException { - testValidity(value); - Object object = this.opt(key); - if (object == null) { - this.put(key, value instanceof JSONArray ? new JSONArray().put(value) : value); - } else if (object instanceof JSONArray) { - ((JSONArray) object).put(value); - } else { - this.put(key, new JSONArray().put(object).put(value)); - } - return this; - } - - /** - * Append values to the array under a key. If the key does not exist in the - * JSONObject, then the key is put in the JSONObject with its value being a - * JSONArray containing the value parameter. If the key was already associated - * with a JSONArray, then the value parameter is appended to it. - * - * @param key A key string. - * @param value An object to be accumulated under the key. - * @return this. - * @throws JSONException If the value is non-finite number or if the - * current value associated with the key is not a - * JSONArray. - * @throws NullPointerException If the key is null. - */ - public JSONObject append(String key, Object value) throws JSONException { - testValidity(value); - Object object = this.opt(key); - if (object == null) { - this.put(key, new JSONArray().put(value)); - } else if (object instanceof JSONArray) { - this.put(key, ((JSONArray) object).put(value)); - } else { - throw new JSONException("JSONObject[" + key + "] is not a JSONArray."); - } - return this; - } - - /** - * Produce a string from a double. The string "null" will be returned if the - * number is not finite. - * - * @param d A double. - * @return A String. - */ - public static String doubleToString(double d) { - if (Double.isInfinite(d) || Double.isNaN(d)) { - return "null"; - } - -// Shave off trailing zeros and decimal point, if possible. - - String string = Double.toString(d); - if (string.indexOf('.') > 0 && string.indexOf('e') < 0 && string.indexOf('E') < 0) { - while (string.endsWith("0")) { - string = string.substring(0, string.length() - 1); - } - if (string.endsWith(".")) { - string = string.substring(0, string.length() - 1); - } - } - return string; - } - - /** - * Get the value object associated with a key. - * - * @param key A key string. - * @return The object associated with the key. - * @throws JSONException if the key is not found. - */ - public Object get(String key) throws JSONException { - if (key == null) { - throw new JSONException("Null key."); - } - Object object = this.opt(key); - if (object == null) { - throw new JSONException("JSONObject[" + quote(key) + "] not found."); - } - return object; - } - - /** - * Get the enum value associated with a key. - * - * @param clazz The type of enum to retrieve. - * @param key A key string. - * @return The enum value associated with the key - * @throws JSONException if the key is not found or if the value cannot be - * converted to an enum. - */ - public > E getEnum(Class clazz, String key) throws JSONException { - E val = optEnum(clazz, key); - if (val == null) { - // JSONException should really take a throwable argument. - // If it did, I would re-implement this with the Enum.valueOf - // method and place any thrown exception in the JSONException - throw new JSONException( - "JSONObject[" + quote(key) + "] is not an enum of type " + quote(clazz.getSimpleName()) + "."); - } - return val; - } - - /** - * Get the boolean value associated with a key. - * - * @param key A key string. - * @return The truth. - * @throws JSONException if the value is not a Boolean or the String "true" or - * "false". - */ - public boolean getBoolean(String key) throws JSONException { - Object object = this.get(key); - if (object.equals(Boolean.FALSE) || (object instanceof String && ((String) object).equalsIgnoreCase("false"))) { - return false; - } else if (object.equals(Boolean.TRUE) - || (object instanceof String && ((String) object).equalsIgnoreCase("true"))) { - return true; - } - throw new JSONException("JSONObject[" + quote(key) + "] is not a Boolean."); - } - - /** - * Get the BigInteger value associated with a key. - * - * @param key A key string. - * @return The numeric value. - * @throws JSONException if the key is not found or if the value cannot be - * converted to BigInteger. - */ - public BigInteger getBigInteger(String key) throws JSONException { - Object object = this.get(key); - try { - return new BigInteger(object.toString()); - } catch (Exception e) { - throw new JSONException("JSONObject[" + quote(key) + "] could not be converted to BigInteger.", e); - } - } - - /** - * Get the BigDecimal value associated with a key. - * - * @param key A key string. - * @return The numeric value. - * @throws JSONException if the key is not found or if the value cannot be - * converted to BigDecimal. - */ - public BigDecimal getBigDecimal(String key) throws JSONException { - Object object = this.get(key); - if (object instanceof BigDecimal) { - return (BigDecimal) object; - } - try { - return new BigDecimal(object.toString()); - } catch (Exception e) { - throw new JSONException("JSONObject[" + quote(key) + "] could not be converted to BigDecimal.", e); - } - } - - /** - * Get the double value associated with a key. - * - * @param key A key string. - * @return The numeric value. - * @throws JSONException if the key is not found or if the value is not a Number - * object and cannot be converted to a number. - */ - public double getDouble(String key) throws JSONException { - Object object = this.get(key); - try { - return object instanceof Number ? ((Number) object).doubleValue() : Double.parseDouble(object.toString()); - } catch (Exception e) { - throw new JSONException("JSONObject[" + quote(key) + "] is not a number.", e); - } - } - - /** - * Get the float value associated with a key. - * - * @param key A key string. - * @return The numeric value. - * @throws JSONException if the key is not found or if the value is not a Number - * object and cannot be converted to a number. - */ - public float getFloat(String key) throws JSONException { - Object object = this.get(key); - try { - return object instanceof Number ? ((Number) object).floatValue() : Float.parseFloat(object.toString()); - } catch (Exception e) { - throw new JSONException("JSONObject[" + quote(key) + "] is not a number.", e); - } - } - - /** - * Get the Number value associated with a key. - * - * @param key A key string. - * @return The numeric value. - * @throws JSONException if the key is not found or if the value is not a Number - * object and cannot be converted to a number. - */ - public Number getNumber(String key) throws JSONException { - Object object = this.get(key); - try { - if (object instanceof Number) { - return (Number) object; - } - return stringToNumber(object.toString()); - } catch (Exception e) { - throw new JSONException("JSONObject[" + quote(key) + "] is not a number.", e); - } - } - - /** - * Get the int value associated with a key. - * - * @param key A key string. - * @return The integer value. - * @throws JSONException if the key is not found or if the value cannot be - * converted to an integer. - */ - public int getInt(String key) throws JSONException { - Object object = this.get(key); - try { - return object instanceof Number ? ((Number) object).intValue() : Integer.parseInt((String) object); - } catch (Exception e) { - throw new JSONException("JSONObject[" + quote(key) + "] is not an int.", e); - } - } - - /** - * Get the JSONArray value associated with a key. - * - * @param key A key string. - * @return A JSONArray which is the value. - * @throws JSONException if the key is not found or if the value is not a - * JSONArray. - */ - public JSONArray getJSONArray(String key) throws JSONException { - Object object = this.get(key); - if (object instanceof JSONArray) { - return (JSONArray) object; - } - throw new JSONException("JSONObject[" + quote(key) + "] is not a JSONArray."); - } - - /** - * Get the JSONObject value associated with a key. - * - * @param key A key string. - * @return A JSONObject which is the value. - * @throws JSONException if the key is not found or if the value is not a - * JSONObject. - */ - public JSONObject getJSONObject(String key) throws JSONException { - Object object = this.get(key); - if (object instanceof JSONObject) { - return (JSONObject) object; - } - throw new JSONException("JSONObject[" + quote(key) + "] is not a JSONObject."); - } - - /** - * Get the long value associated with a key. - * - * @param key A key string. - * @return The long value. - * @throws JSONException if the key is not found or if the value cannot be - * converted to a long. - */ - public long getLong(String key) throws JSONException { - Object object = this.get(key); - try { - return object instanceof Number ? ((Number) object).longValue() : Long.parseLong((String) object); - } catch (Exception e) { - throw new JSONException("JSONObject[" + quote(key) + "] is not a long.", e); - } - } - - /** - * Get an array of field names from a JSONObject. - * - * @return An array of field names, or null if there are no names. - */ - public static String[] getNames(JSONObject jo) { - if (jo.isEmpty()) { - return null; - } - return jo.keySet().toArray(new String[jo.length()]); - } - - /** - * Get an array of field names from an Object. - * - * @return An array of field names, or null if there are no names. - */ - public static String[] getNames(Object object) { - if (object == null) { - return null; - } - Class klass = object.getClass(); - Field[] fields = klass.getFields(); - int length = fields.length; - if (length == 0) { - return null; - } - String[] names = new String[length]; - for (int i = 0; i < length; i += 1) { - names[i] = fields[i].getName(); - } - return names; - } - - /** - * Get the string associated with a key. - * - * @param key A key string. - * @return A string which is the value. - * @throws JSONException if there is no string value for the key. - */ - public String getString(String key) throws JSONException { - Object object = this.get(key); - if (object instanceof String) { - return (String) object; - } - throw new JSONException("JSONObject[" + quote(key) + "] not a string."); - } - - /** - * Determine if the JSONObject contains a specific key. - * - * @param key A key string. - * @return true if the key exists in the JSONObject. - */ - public boolean has(String key) { - return this.map.containsKey(key); - } - - /** - * Increment a property of a JSONObject. If there is no such property, create - * one with a value of 1. If there is such a property, and if it is an Integer, - * Long, Double, or Float, then add one to it. - * - * @param key A key string. - * @return this. - * @throws JSONException If there is already a property with this name that is - * not an Integer, Long, Double, or Float. - */ - public JSONObject increment(String key) throws JSONException { - Object value = this.opt(key); - if (value == null) { - this.put(key, 1); - } else if (value instanceof BigInteger) { - this.put(key, ((BigInteger) value).add(BigInteger.ONE)); - } else if (value instanceof BigDecimal) { - this.put(key, ((BigDecimal) value).add(BigDecimal.ONE)); - } else if (value instanceof Integer) { - this.put(key, ((Integer) value).intValue() + 1); - } else if (value instanceof Long) { - this.put(key, ((Long) value).longValue() + 1L); - } else if (value instanceof Double) { - this.put(key, ((Double) value).doubleValue() + 1.0d); - } else if (value instanceof Float) { - this.put(key, ((Float) value).floatValue() + 1.0f); - } else { - throw new JSONException("Unable to increment [" + quote(key) + "]."); - } - return this; - } - - /** - * Determine if the value associated with the key is null or if - * there is no value. - * - * @param key A key string. - * @return true if there is no value associated with the key or if the value is - * the JSONObject.NULL object. - */ - public boolean isNull(String key) { - return JSONObject.NULL.equals(this.opt(key)); - } - - /** - * Get an enumeration of the keys of the JSONObject. Modifying this key Set will - * also modify the JSONObject. Use with caution. - * - * @see Set#iterator() - * - * @return An iterator of the keys. - */ - public Iterator keys() { - return this.keySet().iterator(); - } - - /** - * Get a set of keys of the JSONObject. Modifying this key Set will also modify - * the JSONObject. Use with caution. - * - * @see Map#keySet() - * - * @return A keySet. - */ - public Set keySet() { - return this.map.keySet(); - } - - /** - * Get a set of entries of the JSONObject. These are raw values and may not - * match what is returned by the JSONObject get* and opt* functions. Modifying - * the returned EntrySet or the Entry objects contained therein will modify the - * backing JSONObject. This does not return a clone or a read-only view. - * - * Use with caution. - * - * @see Map#entrySet() - * - * @return An Entry Set - */ - protected Set> entrySet() { - return this.map.entrySet(); - } - - /** - * Get the number of keys stored in the JSONObject. - * - * @return The number of keys in the JSONObject. - */ - public int length() { - return this.map.size(); - } - - /** - * Check if JSONObject is empty. - * - * @return true if JSONObject is empty, otherwise false. - */ - public boolean isEmpty() { - return map.isEmpty(); - } - - /** - * Produce a JSONArray containing the names of the elements of this JSONObject. - * - * @return A JSONArray containing the key strings, or null if the JSONObject is - * empty. - */ - public JSONArray names() { - if (this.map.isEmpty()) { - return null; - } - return new JSONArray(this.map.keySet()); - } - - /** - * Produce a string from a Number. - * - * @param number A Number - * @return A String. - * @throws JSONException If n is a non-finite number. - */ - public static String numberToString(Number number) throws JSONException { - if (number == null) { - throw new JSONException("Null pointer"); - } - testValidity(number); - - // Shave off trailing zeros and decimal point, if possible. - - String string = number.toString(); - if (string.indexOf('.') > 0 && string.indexOf('e') < 0 && string.indexOf('E') < 0) { - while (string.endsWith("0")) { - string = string.substring(0, string.length() - 1); - } - if (string.endsWith(".")) { - string = string.substring(0, string.length() - 1); - } - } - return string; - } - - /** - * Get an optional value associated with a key. - * - * @param key A key string. - * @return An object which is the value, or null if there is no value. - */ - public Object opt(String key) { - return key == null ? null : this.map.get(key); - } - - /** - * Get the enum value associated with a key. - * - * @param clazz The type of enum to retrieve. - * @param key A key string. - * @return The enum value associated with the key or null if not found - */ - public > E optEnum(Class clazz, String key) { - return this.optEnum(clazz, key, null); - } - - /** - * Get the enum value associated with a key. - * - * @param clazz The type of enum to retrieve. - * @param key A key string. - * @param defaultValue The default in case the value is not found - * @return The enum value associated with the key or defaultValue if the value - * is not found or cannot be assigned to clazz - */ - public > E optEnum(Class clazz, String key, E defaultValue) { - try { - Object val = this.opt(key); - if (NULL.equals(val)) { - return defaultValue; - } - if (clazz.isAssignableFrom(val.getClass())) { - // we just checked it! - @SuppressWarnings("unchecked") - E myE = (E) val; - return myE; - } - return Enum.valueOf(clazz, val.toString()); - } catch (IllegalArgumentException e) { - return defaultValue; - } catch (NullPointerException e) { - return defaultValue; - } - } - - /** - * Get an optional boolean associated with a key. It returns false if there is - * no such key, or if the value is not Boolean.TRUE or the String "true". - * - * @param key A key string. - * @return The truth. - */ - public boolean optBoolean(String key) { - return this.optBoolean(key, false); - } - - /** - * Get an optional boolean associated with a key. It returns the defaultValue if - * there is no such key, or if it is not a Boolean or the String "true" or - * "false" (case insensitive). - * - * @param key A key string. - * @param defaultValue The default. - * @return The truth. - */ - public boolean optBoolean(String key, boolean defaultValue) { - Object val = this.opt(key); - if (NULL.equals(val)) { - return defaultValue; - } - if (val instanceof Boolean) { - return ((Boolean) val).booleanValue(); - } - try { - // we'll use the get anyway because it does string conversion. - return this.getBoolean(key); - } catch (Exception e) { - return defaultValue; - } - } - - /** - * Get an optional BigDecimal associated with a key, or the defaultValue if - * there is no such key or if its value is not a number. If the value is a - * string, an attempt will be made to evaluate it as a number. - * - * @param key A key string. - * @param defaultValue The default. - * @return An object which is the value. - */ - public BigDecimal optBigDecimal(String key, BigDecimal defaultValue) { - Object val = this.opt(key); - if (NULL.equals(val)) { - return defaultValue; - } - if (val instanceof BigDecimal) { - return (BigDecimal) val; - } - if (val instanceof BigInteger) { - return new BigDecimal((BigInteger) val); - } - if (val instanceof Double || val instanceof Float) { - return new BigDecimal(((Number) val).doubleValue()); - } - if (val instanceof Long || val instanceof Integer || val instanceof Short || val instanceof Byte) { - return new BigDecimal(((Number) val).longValue()); - } - // don't check if it's a string in case of unchecked Number subclasses - try { - return new BigDecimal(val.toString()); - } catch (Exception e) { - return defaultValue; - } - } - - /** - * Get an optional BigInteger associated with a key, or the defaultValue if - * there is no such key or if its value is not a number. If the value is a - * string, an attempt will be made to evaluate it as a number. - * - * @param key A key string. - * @param defaultValue The default. - * @return An object which is the value. - */ - public BigInteger optBigInteger(String key, BigInteger defaultValue) { - Object val = this.opt(key); - if (NULL.equals(val)) { - return defaultValue; - } - if (val instanceof BigInteger) { - return (BigInteger) val; - } - if (val instanceof BigDecimal) { - return ((BigDecimal) val).toBigInteger(); - } - if (val instanceof Double || val instanceof Float) { - return new BigDecimal(((Number) val).doubleValue()).toBigInteger(); - } - if (val instanceof Long || val instanceof Integer || val instanceof Short || val instanceof Byte) { - return BigInteger.valueOf(((Number) val).longValue()); - } - // don't check if it's a string in case of unchecked Number subclasses - try { - // the other opt functions handle implicit conversions, i.e. - // jo.put("double",1.1d); - // jo.optInt("double"); -- will return 1, not an error - // this conversion to BigDecimal then to BigInteger is to maintain - // that type cast support that may truncate the decimal. - final String valStr = val.toString(); - if (isDecimalNotation(valStr)) { - return new BigDecimal(valStr).toBigInteger(); - } - return new BigInteger(valStr); - } catch (Exception e) { - return defaultValue; - } - } - - /** - * Get an optional double associated with a key, or NaN if there is no such key - * or if its value is not a number. If the value is a string, an attempt will be - * made to evaluate it as a number. - * - * @param key A string which is the key. - * @return An object which is the value. - */ - public double optDouble(String key) { - return this.optDouble(key, Double.NaN); - } - - /** - * Get an optional double associated with a key, or the defaultValue if there is - * no such key or if its value is not a number. If the value is a string, an - * attempt will be made to evaluate it as a number. - * - * @param key A key string. - * @param defaultValue The default. - * @return An object which is the value. - */ - public double optDouble(String key, double defaultValue) { - Object val = this.opt(key); - if (NULL.equals(val)) { - return defaultValue; - } - if (val instanceof Number) { - return ((Number) val).doubleValue(); - } - if (val instanceof String) { - try { - return Double.parseDouble((String) val); - } catch (Exception e) { - return defaultValue; - } - } - return defaultValue; - } - - /** - * Get the optional double value associated with an index. NaN is returned if - * there is no value for the index, or if the value is not a number and cannot - * be converted to a number. - * - * @param key A key string. - * @return The value. - */ - public float optFloat(String key) { - return this.optFloat(key, Float.NaN); - } - - /** - * Get the optional double value associated with an index. The defaultValue is - * returned if there is no value for the index, or if the value is not a number - * and cannot be converted to a number. - * - * @param key A key string. - * @param defaultValue The default value. - * @return The value. - */ - public float optFloat(String key, float defaultValue) { - Object val = this.opt(key); - if (JSONObject.NULL.equals(val)) { - return defaultValue; - } - if (val instanceof Number) { - return ((Number) val).floatValue(); - } - if (val instanceof String) { - try { - return Float.parseFloat((String) val); - } catch (Exception e) { - return defaultValue; - } - } - return defaultValue; - } - - /** - * Get an optional int value associated with a key, or zero if there is no such - * key or if the value is not a number. If the value is a string, an attempt - * will be made to evaluate it as a number. - * - * @param key A key string. - * @return An object which is the value. - */ - public int optInt(String key) { - return this.optInt(key, 0); - } - - /** - * Get an optional int value associated with a key, or the default if there is - * no such key or if the value is not a number. If the value is a string, an - * attempt will be made to evaluate it as a number. - * - * @param key A key string. - * @param defaultValue The default. - * @return An object which is the value. - */ - public int optInt(String key, int defaultValue) { - Object val = this.opt(key); - if (NULL.equals(val)) { - return defaultValue; - } - if (val instanceof Number) { - return ((Number) val).intValue(); - } - - if (val instanceof String) { - try { - return new BigDecimal((String) val).intValue(); - } catch (Exception e) { - return defaultValue; - } - } - return defaultValue; - } - - /** - * Get an optional JSONArray associated with a key. It returns null if there is - * no such key, or if its value is not a JSONArray. - * - * @param key A key string. - * @return A JSONArray which is the value. - */ - public JSONArray optJSONArray(String key) { - Object o = this.opt(key); - return o instanceof JSONArray ? (JSONArray) o : null; - } - - /** - * Get an optional JSONObject associated with a key. It returns null if there is - * no such key, or if its value is not a JSONObject. - * - * @param key A key string. - * @return A JSONObject which is the value. - */ - public JSONObject optJSONObject(String key) { - Object object = this.opt(key); - return object instanceof JSONObject ? (JSONObject) object : null; - } - - /** - * Get an optional long value associated with a key, or zero if there is no such - * key or if the value is not a number. If the value is a string, an attempt - * will be made to evaluate it as a number. - * - * @param key A key string. - * @return An object which is the value. - */ - public long optLong(String key) { - return this.optLong(key, 0); - } - - /** - * Get an optional long value associated with a key, or the default if there is - * no such key or if the value is not a number. If the value is a string, an - * attempt will be made to evaluate it as a number. - * - * @param key A key string. - * @param defaultValue The default. - * @return An object which is the value. - */ - public long optLong(String key, long defaultValue) { - Object val = this.opt(key); - if (NULL.equals(val)) { - return defaultValue; - } - if (val instanceof Number) { - return ((Number) val).longValue(); - } - - if (val instanceof String) { - try { - return new BigDecimal((String) val).longValue(); - } catch (Exception e) { - return defaultValue; - } - } - return defaultValue; - } - - /** - * Get an optional {@link Number} value associated with a key, or - * null if there is no such key or if the value is not a number. If - * the value is a string, an attempt will be made to evaluate it as a number - * ({@link BigDecimal}). This method would be used in cases where type coercion - * of the number value is unwanted. - * - * @param key A key string. - * @return An object which is the value. - */ - public Number optNumber(String key) { - return this.optNumber(key, null); - } - - /** - * Get an optional {@link Number} value associated with a key, or the default if - * there is no such key or if the value is not a number. If the value is a - * string, an attempt will be made to evaluate it as a number. This method would - * be used in cases where type coercion of the number value is unwanted. - * - * @param key A key string. - * @param defaultValue The default. - * @return An object which is the value. - */ - public Number optNumber(String key, Number defaultValue) { - Object val = this.opt(key); - if (NULL.equals(val)) { - return defaultValue; - } - if (val instanceof Number) { - return (Number) val; - } - - if (val instanceof String) { - try { - return stringToNumber((String) val); - } catch (Exception e) { - return defaultValue; - } - } - return defaultValue; - } - - /** - * Get an optional string associated with a key. It returns an empty string if - * there is no such key. If the value is not a string and is not null, then it - * is converted to a string. - * - * @param key A key string. - * @return A string which is the value. - */ - public String optString(String key) { - return this.optString(key, ""); - } - - /** - * Get an optional string associated with a key. It returns the defaultValue if - * there is no such key. - * - * @param key A key string. - * @param defaultValue The default. - * @return A string which is the value. - */ - public String optString(String key, String defaultValue) { - Object object = this.opt(key); - return NULL.equals(object) ? defaultValue : object.toString(); - } - - /** - * Populates the internal map of the JSONObject with the bean properties. The - * bean can not be recursive. - * - * @see JSONObject#JSONObject(Object) - * - * @param bean the bean - */ - private void populateMap(Object bean) { - Class klass = bean.getClass(); - - // If klass is a System class then set includeSuperClass to false. - - boolean includeSuperClass = klass.getClassLoader() != null; - - Method[] methods = includeSuperClass ? klass.getMethods() : klass.getDeclaredMethods(); - for (final Method method : methods) { - final int modifiers = method.getModifiers(); - if (Modifier.isPublic(modifiers) && !Modifier.isStatic(modifiers) && method.getParameterTypes().length == 0 - && !method.isBridge() && method.getReturnType() != Void.TYPE - && isValidMethodName(method.getName())) { - final String key = getKeyNameFromMethod(method); - if (key != null && !key.isEmpty()) { - try { - final Object result = method.invoke(bean); - if (result != null) { - this.map.put(key, wrap(result)); - // we don't use the result anywhere outside of wrap - // if it's a resource we should be sure to close it - // after calling toString - if (result instanceof Closeable) { - try { - ((Closeable) result).close(); - } catch (IOException ignore) { - } - } - } - } catch (IllegalAccessException ignore) { - } catch (IllegalArgumentException ignore) { - } catch (InvocationTargetException ignore) { - } - } - } - } - } - - private boolean isValidMethodName(String name) { - return !"getClass".equals(name) && !"getDeclaringClass".equals(name); - } - - private String getKeyNameFromMethod(Method method) { - final int ignoreDepth = -1;// getAnnotationDepth(method, JSONPropertyIgnore.class); -// if (ignoreDepth > 0) { -// final int forcedNameDepth = getAnnotationDepth(method, JSONPropertyName.class); -// if (forcedNameDepth < 0 || ignoreDepth <= forcedNameDepth) { -// // the hierarchy asked to ignore, and the nearest name override -// // was higher or non-existent -// return null; -// } -// } -// JSONPropertyName annotation = getAnnotation(method, JSONPropertyName.class); -// if (annotation != null && annotation.value() != null && !annotation.value().isEmpty()) { -// return annotation.value(); -// } - String key; - final String name = method.getName(); - if (name.startsWith("get") && name.length() > 3) { - key = name.substring(3); - } else if (name.startsWith("is") && name.length() > 2) { - key = name.substring(2); - } else { - return null; - } - // if the first letter in the key is not uppercase, then skip. - // This is to maintain backwards compatibility before PR406 - // (https://github.com/stleary/JSON-java/pull/406/) - if (Character.isLowerCase(key.charAt(0))) { - return null; - } - if (key.length() == 1) { - key = key.toLowerCase(Locale.ROOT); - } else if (!Character.isUpperCase(key.charAt(1))) { - key = key.substring(0, 1).toLowerCase(Locale.ROOT) + key.substring(1); - } - return (/** @j2sNative 1 ? key.split("$")[0] : */ - key); - } - -// /** -// * Searches the class hierarchy to see if the method or it's super -// * implementations and interfaces has the annotation. -// * -// * @param -// * type of the annotation -// * -// * @param m -// * method to check -// * @param annotationClass -// * annotation to look for -// * @return the {@link Annotation} if the annotation exists on the current method -// * or one of it's super class definitions -// */ -// private static A getAnnotation(final Method m, final Class annotationClass) { -// return null; -// // if we have invalid data the result is null -// if (true || m == null || annotationClass == null) { -// return null; -// } -// -// if (m.isAnnotationPresent(annotationClass)) { -// return m.getAnnotation(annotationClass); -// } -// -// // if we've already reached the Object class, return null; -// Class c = m.getDeclaringClass(); -// if (c.getSuperclass() == null) { -// return null; -// } -// -// // check directly implemented interfaces for the method being checked -// for (Class i : c.getInterfaces()) { -// try { -// Method im = i.getMethod(m.getName(), m.getParameterTypes()); -// return getAnnotation(im, annotationClass); -// } catch (final SecurityException ex) { -// continue; -// } catch (final NoSuchMethodException ex) { -// continue; -// } -// } -// -// try { -// return getAnnotation( -// c.getSuperclass().getMethod(m.getName(), m.getParameterTypes()), -// annotationClass); -// } catch (final SecurityException ex) { -// return null; -// } catch (final NoSuchMethodException ex) { -// return null; -// } -// } -// -// /** -// * Searches the class hierarchy to see if the method or it's super -// * implementations and interfaces has the annotation. Returns the depth of the -// * annotation in the hierarchy. -// * -// * @param -// * type of the annotation -// * -// * @param m -// * method to check -// * @param annotationClass -// * annotation to look for -// * @return Depth of the annotation or -1 if the annotation is not on the method. -// */ -// private static int getAnnotationDepth(final Method m, final Class annotationClass) { -// // if we have invalid data the result is -1 -// if (m == null || annotationClass == null) { -// return -1; -// } -// if (m.isAnnotationPresent(annotationClass)) { -// return 1; -// } -// -// // if we've already reached the Object class, return -1; -// Class c = m.getDeclaringClass(); -// if (c.getSuperclass() == null) { -// return -1; -// } -// -// // check directly implemented interfaces for the method being checked -// for (Class i : c.getInterfaces()) { -// try { -// Method im = i.getMethod(m.getName(), m.getParameterTypes()); -// int d = getAnnotationDepth(im, annotationClass); -// if (d > 0) { -// // since the annotation was on the interface, add 1 -// return d + 1; -// } -// } catch (final SecurityException ex) { -// continue; -// } catch (final NoSuchMethodException ex) { -// continue; -// } -// } -// -// try { -// int d = getAnnotationDepth( -// c.getSuperclass().getMethod(m.getName(), m.getParameterTypes()), -// annotationClass); -// if (d > 0) { -// // since the annotation was on the superclass, add 1 -// return d + 1; -// } -// return -1; -// } catch (final SecurityException ex) { -// return -1; -// } catch (final NoSuchMethodException ex) { -// return -1; -// } -// } - - /** - * Put a key/boolean pair in the JSONObject. - * - * @param key A key string. - * @param value A boolean which is the value. - * @return this. - * @throws JSONException If the value is non-finite number. - * @throws NullPointerException If the key is null. - */ - public JSONObject put(String key, boolean value) throws JSONException { - return this.put(key, value ? Boolean.TRUE : Boolean.FALSE); - } - - /** - * Put a key/value pair in the JSONObject, where the value will be a JSONArray - * which is produced from a Collection. - * - * @param key A key string. - * @param value A Collection value. - * @return this. - * @throws JSONException If the value is non-finite number. - * @throws NullPointerException If the key is null. - */ - public JSONObject put(String key, Collection value) throws JSONException { - return this.put(key, new JSONArray(value)); - } - - /** - * Put a key/double pair in the JSONObject. - * - * @param key A key string. - * @param value A double which is the value. - * @return this. - * @throws JSONException If the value is non-finite number. - * @throws NullPointerException If the key is null. - */ - public JSONObject put(String key, double value) throws JSONException { - return this.put(key, Double.valueOf(value)); - } - - /** - * Put a key/float pair in the JSONObject. - * - * @param key A key string. - * @param value A float which is the value. - * @return this. - * @throws JSONException If the value is non-finite number. - * @throws NullPointerException If the key is null. - */ - public JSONObject put(String key, float value) throws JSONException { - return this.put(key, Float.valueOf(value)); - } - - /** - * Put a key/int pair in the JSONObject. - * - * @param key A key string. - * @param value An int which is the value. - * @return this. - * @throws JSONException If the value is non-finite number. - * @throws NullPointerException If the key is null. - */ - public JSONObject put(String key, int value) throws JSONException { - return this.put(key, Integer.valueOf(value)); - } - - /** - * Put a key/long pair in the JSONObject. - * - * @param key A key string. - * @param value A long which is the value. - * @return this. - * @throws JSONException If the value is non-finite number. - * @throws NullPointerException If the key is null. - */ - public JSONObject put(String key, long value) throws JSONException { - return this.put(key, Long.valueOf(value)); - } - - /** - * Put a key/value pair in the JSONObject, where the value will be a JSONObject - * which is produced from a Map. - * - * @param key A key string. - * @param value A Map value. - * @return this. - * @throws JSONException If the value is non-finite number. - * @throws NullPointerException If the key is null. - */ - public JSONObject put(String key, Map value) throws JSONException { - return this.put(key, new JSONObject(value)); - } - - /** - * Put a key/value pair in the JSONObject. If the value is null, - * then the key will be removed from the JSONObject if it is present. - * - * @param key A key string. - * @param value An object which is the value. It should be of one of these - * types: Boolean, Double, Integer, JSONArray, JSONObject, Long, - * String, or the JSONObject.NULL object. - * @return this. - * @throws JSONException If the value is non-finite number. - * @throws NullPointerException If the key is null. - */ - public JSONObject put(String key, Object value) throws JSONException { - if (key == null) { - throw new NullPointerException("Null key."); - } - if (value != null) { - testValidity(value); - this.map.put(key, value); - } else { - this.remove(key); - } - return this; - } - - /** - * Put a key/value pair in the JSONObject, but only if the key and the value are - * both non-null, and only if there is not already a member with that name. - * - * @param key string - * @param value object - * @return this. - * @throws JSONException if the key is a duplicate - */ - public JSONObject putOnce(String key, Object value) throws JSONException { - if (key != null && value != null) { - if (this.opt(key) != null) { - throw new JSONException("Duplicate key \"" + key + "\""); - } - return this.put(key, value); - } - return this; - } - - /** - * Put a key/value pair in the JSONObject, but only if the key and the value are - * both non-null. - * - * @param key A key string. - * @param value An object which is the value. It should be of one of these - * types: Boolean, Double, Integer, JSONArray, JSONObject, Long, - * String, or the JSONObject.NULL object. - * @return this. - * @throws JSONException If the value is a non-finite number. - */ - public JSONObject putOpt(String key, Object value) throws JSONException { - if (key != null && value != null) { - return this.put(key, value); - } - return this; - } - - /** - * Creates a JSONPointer using an initialization string and tries to match it to - * an item within this JSONObject. For example, given a JSONObject initialized - * with this document: - * - *

        -	 * {
        -	 *     "a":{"b":"c"}
        -	 * }
        -	 * 
        - * - * and this JSONPointer string: - * - *
        -	 * "/a/b"
        -	 * 
        - * - * Then this method will return the String "c". A JSONPointerException may be - * thrown from code called by this method. - * - * @param jsonPointer string that can be used to create a JSONPointer - * @return the item matched by the JSONPointer, otherwise null - */ - public Object query(String jsonPointer) { - return query(new JSONPointer(jsonPointer)); - } - - /** - * Uses a user initialized JSONPointer and tries to match it to an item within - * this JSONObject. For example, given a JSONObject initialized with this - * document: - * - *
        -	 * {
        -	 *     "a":{"b":"c"}
        -	 * }
        -	 * 
        - * - * and this JSONPointer: - * - *
        -	 * "/a/b"
        -	 * 
        - * - * Then this method will return the String "c". A JSONPointerException may be - * thrown from code called by this method. - * - * @param jsonPointer string that can be used to create a JSONPointer - * @return the item matched by the JSONPointer, otherwise null - */ - public Object query(JSONPointer jsonPointer) { - return jsonPointer.queryFrom(this); - } - - /** - * Queries and returns a value from this object using {@code jsonPointer}, or - * returns null if the query fails due to a missing key. - * - * @param jsonPointer the string representation of the JSON pointer - * @return the queried value or {@code null} - * @throws IllegalArgumentException if {@code jsonPointer} has invalid syntax - */ - public Object optQuery(String jsonPointer) { - return optQuery(new JSONPointer(jsonPointer)); - } - - /** - * Queries and returns a value from this object using {@code jsonPointer}, or - * returns null if the query fails due to a missing key. - * - * @param jsonPointer The JSON pointer - * @return the queried value or {@code null} - * @throws IllegalArgumentException if {@code jsonPointer} has invalid syntax - */ - public Object optQuery(JSONPointer jsonPointer) { - try { - return jsonPointer.queryFrom(this); - } catch (JSONPointerException e) { - return null; - } - } - - /** - * Produce a string in double quotes with backslash sequences in all the right - * places. A backslash will be inserted within = '\u0080' && c < '\u00a0') || (c >= '\u2000' && c < '\u2100')) { - w.write("\\u"); - hhhh = Integer.toHexString(c); - w.write("0000", 0, 4 - hhhh.length()); - w.write(hhhh); - } else { - w.write(c); - } - } - } - w.write('"'); - return w; - } - - /** - * Remove a name and its value, if present. - * - * @param key The name to be removed. - * @return The value that was associated with the name, or null if there was no - * value. - */ - public Object remove(String key) { - return this.map.remove(key); - } - - /** - * Determine if two JSONObjects are similar. They must contain the same set of - * names which must be associated with similar values. - * - * @param other The other JSONObject - * @return true if they are equal - */ - public boolean similar(Object other) { - try { - if (!(other instanceof JSONObject)) { - return false; - } - if (!this.keySet().equals(((JSONObject) other).keySet())) { - return false; - } - for (final Entry entry : this.entrySet()) { - String name = entry.getKey(); - Object valueThis = entry.getValue(); - Object valueOther = ((JSONObject) other).get(name); - if (valueThis == valueOther) { - continue; - } - if (valueThis == null) { - return false; - } - if (valueThis instanceof JSONObject) { - if (!((JSONObject) valueThis).similar(valueOther)) { - return false; - } - } else if (valueThis instanceof JSONArray) { - if (!((JSONArray) valueThis).similar(valueOther)) { - return false; - } - } else if (!valueThis.equals(valueOther)) { - return false; - } - } - return true; - } catch (Throwable exception) { - return false; - } - } - - /** - * Tests if the value should be tried as a decimal. It makes no test if there - * are actual digits. - * - * @param val value to test - * @return true if the string is "-0" or if it contains '.', 'e', or 'E', false - * otherwise. - */ - protected static boolean isDecimalNotation(final String val) { - return val.indexOf('.') > -1 || val.indexOf('e') > -1 || val.indexOf('E') > -1 || "-0".equals(val); - } - - /** - * Converts a string to a number using the narrowest possible type. Possible - * returns for this function are BigDecimal, Double, BigInteger, Long, and - * Integer. When a Double is returned, it should always be a valid Double and - * not NaN or +-infinity. - * - * @param val value to convert - * @return Number representation of the value. - * @throws NumberFormatException thrown if the value is not a valid number. A - * public caller should catch this and wrap it in - * a {@link JSONException} if applicable. - */ - protected static Number stringToNumber(final String val) throws NumberFormatException { - char initial = val.charAt(0); - if ((initial >= '0' && initial <= '9') || initial == '-') { - // decimal representation - if (isDecimalNotation(val)) { - // quick dirty way to see if we need a BigDecimal instead of a Double - // this only handles some cases of overflow or underflow - if (val.length() > 14) { - return new BigDecimal(val); - } - final Double d = Double.valueOf(val); - if (d.isInfinite() || d.isNaN()) { - // if we can't parse it as a double, go up to BigDecimal - // this is probably due to underflow like 4.32e-678 - // or overflow like 4.65e5324. The size of the string is small - // but can't be held in a Double. - return new BigDecimal(val); - } - return d; - } - // integer representation. - // This will narrow any values to the smallest reasonable Object representation - // (Integer, Long, or BigInteger) - - // string version - // The compare string length method reduces GC, - // but leads to smaller integers being placed in larger wrappers even though not - // needed. i.e. 1,000,000,000 -> Long even though it's an Integer - // 1,000,000,000,000,000,000 -> BigInteger even though it's a Long - // if(val.length()<=9){ - // return Integer.valueOf(val); - // } - // if(val.length()<=18){ - // return Long.valueOf(val); - // } - // return new BigInteger(val); - - // BigInteger version: We use a similar bitLenth compare as - // BigInteger#intValueExact uses. Increases GC, but objects hold - // only what they need. i.e. Less runtime overhead if the value is - // long lived. Which is the better tradeoff? This is closer to what's - // in stringToValue. - BigInteger bi = new BigInteger(val); - if (bi.bitLength() <= 31) { - return Integer.valueOf(bi.intValue()); - } - if (bi.bitLength() <= 63) { - return Long.valueOf(bi.longValue()); - } - return bi; - } - throw new NumberFormatException("val [" + val + "] is not a valid number."); - } - - /** - * Try to convert a string into a number, boolean, or null. If the string can't - * be converted, return the string. - * - * @param string A String. - * @return A simple JSON value. - */ - // Changes to this method must be copied to the corresponding method in - // the XML class to keep full support for Android - public static Object stringToValue(String string) { - if (string.equals("")) { - return string; - } - if (string.equalsIgnoreCase("true")) { - return Boolean.TRUE; - } - if (string.equalsIgnoreCase("false")) { - return Boolean.FALSE; - } - if (string.equalsIgnoreCase("null")) { - return JSONObject.NULL; - } - - /* - * If it might be a number, try converting it. If a number cannot be produced, - * then the value will just be a string. - */ - - char initial = string.charAt(0); - if ((initial >= '0' && initial <= '9') || initial == '-') { - try { - // if we want full Big Number support this block can be replaced with: - // return stringToNumber(string); - if (isDecimalNotation(string)) { - Double d = Double.valueOf(string); - if (!d.isInfinite() && !d.isNaN()) { - return d; - } - } else { - Long myLong = Long.valueOf(string); - if (string.equals(myLong.toString())) { - if (myLong.longValue() == myLong.intValue()) { - return Integer.valueOf(myLong.intValue()); - } - return myLong; - } - } - } catch (Exception ignore) { - } - } - return string; - } - - /** - * Throw an exception if the object is a NaN or infinite number. - * - * @param o The object to test. - * @throws JSONException If o is a non-finite number. - */ - public static void testValidity(Object o) throws JSONException { - if (o != null) { - if (o instanceof Double) { - if (((Double) o).isInfinite() || ((Double) o).isNaN()) { - throw new JSONException("JSON does not allow non-finite numbers."); - } - } else if (o instanceof Float) { - if (((Float) o).isInfinite() || ((Float) o).isNaN()) { - throw new JSONException("JSON does not allow non-finite numbers."); - } - } - } - } - - /** - * Produce a JSONArray containing the values of the members of this JSONObject. - * - * @param names A JSONArray containing a list of key strings. This determines - * the sequence of the values in the result. - * @return A JSONArray of values. - * @throws JSONException If any of the values are non-finite numbers. - */ - public JSONArray toJSONArray(JSONArray names) throws JSONException { - if (names == null || names.isEmpty()) { - return null; - } - JSONArray ja = new JSONArray(); - for (int i = 0; i < names.length(); i += 1) { - ja.put(this.opt(names.getString(i))); - } - return ja; - } - - /** - * Make a JSON text of this JSONObject. For compactness, no whitespace is added. - * If this would not result in a syntactically correct JSON text, then null will - * be returned instead. - *

        - * Warning: This method assumes that the data structure is acyclical. - * - * @return a printable, displayable, portable, transmittable representation of - * the object, beginning with { (left - * brace) and ending with } (right - * brace). - */ - @Override - public String toString() { - try { - return this.toString(0); - } catch (Exception e) { - return null; - } - } - - /** - * Make a pretty-printed JSON text of this JSONObject. - * - *

        - * If indentFactor > 0 and the {@link JSONObject} has only one key, - * then the object will be output on a single line: - * - *

        -	 * {@code {"key": 1}}
        -	 * 
        - * - *

        - * If an object has 2 or more keys, then it will be output across multiple - * lines:

        {
        -	 *  "key1": 1,
        -	 *  "key2": "value 2",
        -	 *  "key3": 3
        -	 * }
        - *

        - * Warning: This method assumes that the data structure is acyclical. - * - * @param indentFactor The number of spaces to add to each level of indentation. - * @return a printable, displayable, portable, transmittable representation of - * the object, beginning with { (left - * brace) and ending with } (right - * brace). - * @throws JSONException If the object contains an invalid number. - */ - public String toString(int indentFactor) throws JSONException { - StringWriter w = new StringWriter(); - synchronized (w.getBuffer()) { - return this.write(w, indentFactor, 0).toString(); - } - } - - /** - * Make a JSON text of an Object value. If the object has an - * value.toJSONString() method, then that method will be used to produce the - * JSON text. The method is required to produce a strictly conforming text. If - * the object does not contain a toJSONString method (which is the most common - * case), then a text will be produced by other means. If the value is an array - * or Collection, then a JSONArray will be made from it and its toJSONString - * method will be called. If the value is a MAP, then a JSONObject will be made - * from it and its toJSONString method will be called. Otherwise, the value's - * toString method will be called, and the result will be quoted. - * - *

        - * Warning: This method assumes that the data structure is acyclical. - * - * @param value The value to be serialized. - * @return a printable, displayable, transmittable representation of the object, - * beginning with { (left brace) and - * ending with } (right brace). - * @throws JSONException If the value is or contains an invalid number. - */ - public static String valueToString(Object value) throws JSONException { - // moves the implementation to JSONWriter as: - // 1. It makes more sense to be part of the writer class - // 2. For Android support this method is not available. By implementing it in - // the Writer - // Android users can use the writer with the built in Android JSONObject - // implementation. - return JSONWriter.valueToString(value); - } - - /** - * Wrap an object, if necessary. If the object is null, return the - * NULL object. If it is an array or collection, wrap it in a JSONArray. If it - * is a map, wrap it in a JSONObject. If it is a standard property (Double, - * String, et al) then it is already wrapped. Otherwise, if it comes from one of - * the java packages, turn it into a string. And if it doesn't, try to wrap it - * in a JSONObject. If the wrapping fails, then null is returned. - * - * @param object The object to wrap - * @return The wrapped value - */ - public static Object wrap(Object object) { - try { - if (object == null) { - return NULL; - } - if (object instanceof JSONObject || object instanceof JSONArray || NULL.equals(object) - || object instanceof JSONString || object instanceof Byte || object instanceof Character - || object instanceof Short || object instanceof Integer || object instanceof Long - || object instanceof Boolean || object instanceof Float || object instanceof Double - || object instanceof String || object instanceof BigInteger || object instanceof BigDecimal - || object instanceof Enum) { - return object; - } - - if (object instanceof Collection) { - Collection coll = (Collection) object; - return new JSONArray(coll); - } - if (object.getClass().isArray()) { - return new JSONArray(object); - } - if (object instanceof Map) { - Map map = (Map) object; - return new JSONObject(map); - } - Package objectPackage = object.getClass().getPackage(); - String objectPackageName = objectPackage != null ? objectPackage.getName() : ""; - if (objectPackageName.startsWith("java.") || objectPackageName.startsWith("javax.") - || object.getClass().getClassLoader() == null) { - return object.toString(); - } - return new JSONObject(object); - } catch (Exception exception) { - return null; - } - } - - /** - * Write the contents of the JSONObject as JSON text to a writer. For - * compactness, no whitespace is added. - *

        - * Warning: This method assumes that the data structure is acyclical. - * - * @return The writer. - * @throws JSONException - */ - public Writer write(Writer writer) throws JSONException { - return this.write(writer, 0, 0); - } - - static final Writer writeValue(Writer writer, Object value, int indentFactor, int indent) - throws JSONException, IOException { - if (value == null || value.equals(null)) { - writer.write("null"); - } else if (value instanceof JSONString) { - Object o; - try { - o = ((JSONString) value).toJSONString(); - } catch (Exception e) { - throw new JSONException(e); - } - writer.write(o != null ? o.toString() : quote(value.toString())); - } else if (value instanceof Number) { - // not all Numbers may match actual JSON Numbers. i.e. fractions or Imaginary - final String numberAsString = numberToString((Number) value); - try { - // Use the BigDecimal constructor for its parser to validate the format. - @SuppressWarnings("unused") - BigDecimal testNum = new BigDecimal(numberAsString); - // Close enough to a JSON number that we will use it unquoted - writer.write(numberAsString); - } catch (NumberFormatException ex) { - // The Number value is not a valid JSON number. - // Instead we will quote it as a string - quote(numberAsString, writer); - } - } else if (value instanceof Boolean) { - writer.write(value.toString()); - } else if (value instanceof Enum) { - writer.write(quote(((Enum) value).name())); - } else if (value instanceof JSONObject) { - ((JSONObject) value).write(writer, indentFactor, indent); - } else if (value instanceof JSONArray) { - ((JSONArray) value).write(writer, indentFactor, indent); - } else if (value instanceof Map) { - Map map = (Map) value; - new JSONObject(map).write(writer, indentFactor, indent); - } else if (value instanceof Collection) { - Collection coll = (Collection) value; - new JSONArray(coll).write(writer, indentFactor, indent); - } else if (value.getClass().isArray()) { - new JSONArray(value).write(writer, indentFactor, indent); - } else { - quote(value.toString(), writer); - } - return writer; - } - - static final void indent(Writer writer, int indent) throws IOException { - for (int i = 0; i < indent; i += 1) { - writer.write(' '); - } - } - - /** - * Write the contents of the JSONObject as JSON text to a writer. - * - *

        - * If indentFactor > 0 and the {@link JSONObject} has only one key, - * then the object will be output on a single line: - * - *

        -	 * {@code {"key": 1}}
        -	 * 
        - * - *

        - * If an object has 2 or more keys, then it will be output across multiple - * lines:

        {
        -	 *  "key1": 1,
        -	 *  "key2": "value 2",
        -	 *  "key3": 3
        -	 * }
        - *

        - * Warning: This method assumes that the data structure is acyclical. - * - * @param writer Writes the serialized JSON - * @param indentFactor The number of spaces to add to each level of indentation. - * @param indent The indentation of the top level. - * @return The writer. - * @throws JSONException - */ - public Writer write(Writer writer, int indentFactor, int indent) throws JSONException { - try { - boolean commanate = false; - final int length = this.length(); - writer.write('{'); - - if (length == 1) { - final Entry entry = this.entrySet().iterator().next(); - final String key = entry.getKey(); - writer.write(quote(key)); - writer.write(':'); - if (indentFactor > 0) { - writer.write(' '); - } - try { - writeValue(writer, entry.getValue(), indentFactor, indent); - } catch (Exception e) { - throw new JSONException("Unable to write JSONObject value for key: " + key, e); - } - } else if (length != 0) { - final int newindent = indent + indentFactor; - for (final Entry entry : this.entrySet()) { - if (commanate) { - writer.write(','); - } - if (indentFactor > 0) { - writer.write('\n'); - } - indent(writer, newindent); - final String key = entry.getKey(); - writer.write(quote(key)); - writer.write(':'); - if (indentFactor > 0) { - writer.write(' '); - } - try { - writeValue(writer, entry.getValue(), indentFactor, newindent); - } catch (Exception e) { - throw new JSONException("Unable to write JSONObject value for key: " + key, e); - } - commanate = true; - } - if (indentFactor > 0) { - writer.write('\n'); - } - indent(writer, indent); - } - writer.write('}'); - return writer; - } catch (IOException exception) { - throw new JSONException(exception); - } - } - - /** - * Returns a java.util.Map containing all of the entries in this object. If an - * entry in the object is a JSONArray or JSONObject it will also be converted. - *

        - * Warning: This method assumes that the data structure is acyclical. - * - * @return a java.util.Map containing the entries of this object - */ - public Map toMap() { - Map results = new HashMap(); - for (Entry entry : this.entrySet()) { - Object value; - if (entry.getValue() == null || NULL.equals(entry.getValue())) { - value = null; - } else if (entry.getValue() instanceof JSONObject) { - value = ((JSONObject) entry.getValue()).toMap(); - } else if (entry.getValue() instanceof JSONArray) { - value = ((JSONArray) entry.getValue()).toList(); - } else { - value = entry.getValue(); - } - results.put(entry.getKey(), value); - } - return results; - } +public class JSONObject +{ + /** + * JSONObject.NULL is equivalent to the value that JavaScript calls null, + * whilst Java's null is equivalent to the value that JavaScript calls + * undefined. + */ + private static final class Null + { + + /** + * There is only intended to be a single instance of the NULL object, so the + * clone method returns itself. + * + * @return NULL. + */ + @Override + protected final Object clone() + { + return this; + } + + /** + * A Null object is equal to the null value and to itself. + * + * @param object + * An object to test for nullness. + * @return true if the object parameter is the JSONObject.NULL object or + * null. + */ + @Override + public boolean equals(Object object) + { + return object == null || object == this; + } + + /** + * A Null object is equal to the null value and to itself. + * + * @return always returns 0. + */ + @Override + public int hashCode() + { + return 0; + } + + /** + * Get the "null" string value. + * + * @return The string "null". + */ + @Override + public String toString() + { + return "null"; + } + } + + /** + * The map where the JSONObject's properties are kept. + */ + private final Map map; + + /** + * It is sometimes more convenient and less ambiguous to have a + * NULL object than to use Java's null value. + * JSONObject.NULL.equals(null) returns true. + * JSONObject.NULL.toString() returns "null". + */ + public static final Object NULL = new Null(); + + /** + * Construct an empty JSONObject. + */ + public JSONObject() + { + // HashMap is used on purpose to ensure that elements are unordered by + // the specification. + // JSON tends to be a portable transfer format to allows the container + // implementations to rearrange their items for a faster element + // retrieval based on associative access. + // Therefore, an implementation mustn't rely on the order of the item. + this.map = new HashMap(); + } + + /** + * Construct a JSONObject from a subset of another JSONObject. An array of + * strings is used to identify the keys that should be copied. Missing keys + * are ignored. + * + * @param jo + * A JSONObject. + * @param names + * An array of strings. + */ + public JSONObject(JSONObject jo, String[] names) + { + this(names.length); + for (int i = 0; i < names.length; i += 1) + { + try + { + this.putOnce(names[i], jo.opt(names[i])); + } catch (Exception ignore) + { + } + } + } + + /** + * Construct a JSONObject from a JSONTokener. + * + * @param x + * A JSONTokener object containing the source string. + * @throws JSONException + * If there is a syntax error in the source string or a duplicated + * key. + */ + public JSONObject(JSONTokener x) throws JSONException + { + this(); + char c; + String key; + + if (x.nextClean() != '{') + { + throw x.syntaxError("A JSONObject text must begin with '{'"); + } + for (;;) + { + c = x.nextClean(); + switch (c) + { + case 0: + throw x.syntaxError("A JSONObject text must end with '}'"); + case '}': + return; + default: + x.back(); + key = x.nextValue().toString(); + } + + // The key is followed by ':'. + + c = x.nextClean(); + if (c != ':') + { + throw x.syntaxError("Expected a ':' after a key"); + } + + // Use syntaxError(..) to include error location + + if (key != null) + { + // Check if key exists + if (this.opt(key) != null) + { + // key already exists + throw x.syntaxError("Duplicate key \"" + key + "\""); + } + // Only add value if non-null + Object value = x.nextValue(); + if (value != null) + { + this.put(key, value); + } + } + + // Pairs are separated by ','. + + switch (x.nextClean()) + { + case ';': + case ',': + if (x.nextClean() == '}') + { + return; + } + x.back(); + break; + case '}': + return; + default: + throw x.syntaxError("Expected a ',' or '}'"); + } + } + } + + /** + * Construct a JSONObject from a Map. + * + * @param m + * A map object that can be used to initialize the contents of the + * JSONObject. + * @throws JSONException + * If a value in the map is non-finite number. + * @throws NullPointerException + * If a key in the map is null + */ + public JSONObject(Map m) + { + if (m == null) + { + this.map = new HashMap(); + } + else + { + this.map = new HashMap(m.size()); + for (final Entry e : m.entrySet()) + { + if (e.getKey() == null) + { + throw new NullPointerException("Null key."); + } + final Object value = e.getValue(); + if (value != null) + { + this.map.put(String.valueOf(e.getKey()), wrap(value)); + } + } + } + } + + /** + * Construct a JSONObject from an Object using bean getters. It reflects on + * all of the public methods of the object. For each of the methods with no + * parameters and a name starting with "get" or "is" + * followed by an uppercase letter, the method is invoked, and a key and the + * value returned from the getter method are put into the new JSONObject. + *

        + * The key is formed by removing the "get" or "is" + * prefix. If the second remaining character is not upper case, then the first + * character is converted to lower case. + *

        + * Methods that are static, return void, have + * parameters, or are "bridge" methods, are ignored. + *

        + * For example, if an object has a method named "getName", and if + * the result of calling object.getName() is + * "Larry Fine", then the JSONObject will contain + * "name": "Larry Fine". + *

        + * The {@link JSONPropertyName} annotation can be used on a bean getter to + * override key name used in the JSONObject. For example, using the object + * above with the getName method, if we annotated it with: + * + *

        +   * @JSONPropertyName("FullName")
        +   * public String getName()
        +   * {
        +   *   return this.name;
        +   * }
        +   * 
        + * + * The resulting JSON object would contain + * "FullName": "Larry Fine" + *

        + * Similarly, the {@link JSONPropertyName} annotation can be used on non- + * get and is methods. We can also override key name + * used in the JSONObject as seen below even though the field would normally + * be ignored: + * + *

        +   * @JSONPropertyName("FullName")
        +   * public String fullName()
        +   * {
        +   *   return this.name;
        +   * }
        +   * 
        + * + * The resulting JSON object would contain + * "FullName": "Larry Fine" + *

        + * The {@link JSONPropertyIgnore} annotation can be used to force the bean + * property to not be serialized into JSON. If both {@link JSONPropertyIgnore} + * and {@link JSONPropertyName} are defined on the same method, a depth + * comparison is performed and the one closest to the concrete class being + * serialized is used. If both annotations are at the same level, then the + * {@link JSONPropertyIgnore} annotation takes precedent and the field is not + * serialized. For example, the following declaration would prevent the + * getName method from being serialized: + * + *

        +   * @JSONPropertyName("FullName")
        +   * @JSONPropertyIgnore
        +   * public String getName()
        +   * {
        +   *   return this.name;
        +   * }
        +   * 
        + *

        + * + * @param bean + * An object that has getter methods that should be used to make a + * JSONObject. + */ + public JSONObject(Object bean) + { + this(); + this.populateMap(bean); + } + + /** + * Construct a JSONObject from an Object, using reflection to find the public + * members. The resulting JSONObject's keys will be the strings from the names + * array, and the values will be the field values associated with those keys + * in the object. If a key is not found or not visible, then it will not be + * copied into the new JSONObject. + * + * @param object + * An object that has fields that should be used to make a + * JSONObject. + * @param names + * An array of strings, the names of the fields to be obtained from + * the object. + */ + public JSONObject(Object object, String names[]) + { + this(names.length); + Class c = object.getClass(); + for (int i = 0; i < names.length; i += 1) + { + String name = names[i]; + try + { + this.putOpt(name, c.getField(name).get(object)); + } catch (Exception ignore) + { + } + } + } + + /** + * Construct a JSONObject from a source JSON text string. This is the most + * commonly used JSONObject constructor. + * + * @param source + * A string beginning with { (left + * brace) and ending with }  (right + * brace). + * @exception JSONException + * If there is a syntax error in the source string or a + * duplicated key. + */ + public JSONObject(String source) throws JSONException + { + this(new JSONTokener(source)); + } + + /** + * Construct a JSONObject from a ResourceBundle. + * + * @param baseName + * The ResourceBundle base name. + * @param locale + * The Locale to load the ResourceBundle for. + * @throws JSONException + * If any JSONExceptions are detected. + */ + public JSONObject(String baseName, Locale locale) throws JSONException + { + this(); + ResourceBundle bundle = ResourceBundle.getBundle(baseName, locale, + Thread.currentThread().getContextClassLoader()); + + // Iterate through the keys in the bundle. + + Enumeration keys = bundle.getKeys(); + while (keys.hasMoreElements()) + { + Object key = keys.nextElement(); + if (key != null) + { + + // Go through the path, ensuring that there is a nested JSONObject for + // each + // segment except the last. Add the value using the last segment's name + // into + // the deepest nested JSONObject. + + String[] path = ((String) key).split("\\."); + int last = path.length - 1; + JSONObject target = this; + for (int i = 0; i < last; i += 1) + { + String segment = path[i]; + JSONObject nextTarget = target.optJSONObject(segment); + if (nextTarget == null) + { + nextTarget = new JSONObject(); + target.put(segment, nextTarget); + } + target = nextTarget; + } + target.put(path[last], bundle.getString((String) key)); + } + } + } + + /** + * Constructor to specify an initial capacity of the internal map. Useful for + * library internal calls where we know, or at least can best guess, how big + * this JSONObject will be. + * + * @param initialCapacity + * initial capacity of the internal map. + */ + protected JSONObject(int initialCapacity) + { + this.map = new HashMap(initialCapacity); + } + + /** + * Accumulate values under a key. It is similar to the put method except that + * if there is already an object stored under the key then a JSONArray is + * stored under the key to hold all of the accumulated values. If there is + * already a JSONArray, then the new value is appended to it. In contrast, the + * put method replaces the previous value. + * + * If only one value is accumulated that is not a JSONArray, then the result + * will be the same as using put. But if multiple values are accumulated, then + * the result will be like append. + * + * @param key + * A key string. + * @param value + * An object to be accumulated under the key. + * @return this. + * @throws JSONException + * If the value is non-finite number. + * @throws NullPointerException + * If the key is null. + */ + public JSONObject accumulate(String key, Object value) + throws JSONException + { + testValidity(value); + Object object = this.opt(key); + if (object == null) + { + this.put(key, value instanceof JSONArray ? new JSONArray().put(value) + : value); + } + else if (object instanceof JSONArray) + { + ((JSONArray) object).put(value); + } + else + { + this.put(key, new JSONArray().put(object).put(value)); + } + return this; + } + + /** + * Append values to the array under a key. If the key does not exist in the + * JSONObject, then the key is put in the JSONObject with its value being a + * JSONArray containing the value parameter. If the key was already associated + * with a JSONArray, then the value parameter is appended to it. + * + * @param key + * A key string. + * @param value + * An object to be accumulated under the key. + * @return this. + * @throws JSONException + * If the value is non-finite number or if the current value + * associated with the key is not a JSONArray. + * @throws NullPointerException + * If the key is null. + */ + public JSONObject append(String key, Object value) throws JSONException + { + testValidity(value); + Object object = this.opt(key); + if (object == null) + { + this.put(key, new JSONArray().put(value)); + } + else if (object instanceof JSONArray) + { + this.put(key, ((JSONArray) object).put(value)); + } + else + { + throw new JSONException( + "JSONObject[" + key + "] is not a JSONArray."); + } + return this; + } + + /** + * Produce a string from a double. The string "null" will be returned if the + * number is not finite. + * + * @param d + * A double. + * @return A String. + */ + public static String doubleToString(double d) + { + if (Double.isInfinite(d) || Double.isNaN(d)) + { + return "null"; + } + + // Shave off trailing zeros and decimal point, if possible. + + String string = Double.toString(d); + if (string.indexOf('.') > 0 && string.indexOf('e') < 0 + && string.indexOf('E') < 0) + { + while (string.endsWith("0")) + { + string = string.substring(0, string.length() - 1); + } + if (string.endsWith(".")) + { + string = string.substring(0, string.length() - 1); + } + } + return string; + } + + /** + * Get the value object associated with a key. + * + * @param key + * A key string. + * @return The object associated with the key. + * @throws JSONException + * if the key is not found. + */ + public Object get(String key) throws JSONException + { + if (key == null) + { + throw new JSONException("Null key."); + } + Object object = this.opt(key); + if (object == null) + { + throw new JSONException("JSONObject[" + quote(key) + "] not found."); + } + return object; + } + + /** + * Get the enum value associated with a key. + * + * @param clazz + * The type of enum to retrieve. + * @param key + * A key string. + * @return The enum value associated with the key + * @throws JSONException + * if the key is not found or if the value cannot be converted to an + * enum. + */ + public > E getEnum(Class clazz, String key) + throws JSONException + { + E val = optEnum(clazz, key); + if (val == null) + { + // JSONException should really take a throwable argument. + // If it did, I would re-implement this with the Enum.valueOf + // method and place any thrown exception in the JSONException + throw new JSONException( + "JSONObject[" + quote(key) + "] is not an enum of type " + + quote(clazz.getSimpleName()) + "."); + } + return val; + } + + /** + * Get the boolean value associated with a key. + * + * @param key + * A key string. + * @return The truth. + * @throws JSONException + * if the value is not a Boolean or the String "true" or "false". + */ + public boolean getBoolean(String key) throws JSONException + { + Object object = this.get(key); + if (object.equals(Boolean.FALSE) || (object instanceof String + && ((String) object).equalsIgnoreCase("false"))) + { + return false; + } + else if (object.equals(Boolean.TRUE) || (object instanceof String + && ((String) object).equalsIgnoreCase("true"))) + { + return true; + } + throw new JSONException( + "JSONObject[" + quote(key) + "] is not a Boolean."); + } + + /** + * Get the BigInteger value associated with a key. + * + * @param key + * A key string. + * @return The numeric value. + * @throws JSONException + * if the key is not found or if the value cannot be converted to + * BigInteger. + */ + public BigInteger getBigInteger(String key) throws JSONException + { + Object object = this.get(key); + try + { + return new BigInteger(object.toString()); + } catch (Exception e) + { + throw new JSONException("JSONObject[" + quote(key) + + "] could not be converted to BigInteger.", e); + } + } + + /** + * Get the BigDecimal value associated with a key. + * + * @param key + * A key string. + * @return The numeric value. + * @throws JSONException + * if the key is not found or if the value cannot be converted to + * BigDecimal. + */ + public BigDecimal getBigDecimal(String key) throws JSONException + { + Object object = this.get(key); + if (object instanceof BigDecimal) + { + return (BigDecimal) object; + } + try + { + return new BigDecimal(object.toString()); + } catch (Exception e) + { + throw new JSONException("JSONObject[" + quote(key) + + "] could not be converted to BigDecimal.", e); + } + } + + /** + * Get the double value associated with a key. + * + * @param key + * A key string. + * @return The numeric value. + * @throws JSONException + * if the key is not found or if the value is not a Number object + * and cannot be converted to a number. + */ + public double getDouble(String key) throws JSONException + { + Object object = this.get(key); + try + { + return object instanceof Number ? ((Number) object).doubleValue() + : Double.parseDouble(object.toString()); + } catch (Exception e) + { + throw new JSONException( + "JSONObject[" + quote(key) + "] is not a number.", e); + } + } + + /** + * Get the float value associated with a key. + * + * @param key + * A key string. + * @return The numeric value. + * @throws JSONException + * if the key is not found or if the value is not a Number object + * and cannot be converted to a number. + */ + public float getFloat(String key) throws JSONException + { + Object object = this.get(key); + try + { + return object instanceof Number ? ((Number) object).floatValue() + : Float.parseFloat(object.toString()); + } catch (Exception e) + { + throw new JSONException( + "JSONObject[" + quote(key) + "] is not a number.", e); + } + } + + /** + * Get the Number value associated with a key. + * + * @param key + * A key string. + * @return The numeric value. + * @throws JSONException + * if the key is not found or if the value is not a Number object + * and cannot be converted to a number. + */ + public Number getNumber(String key) throws JSONException + { + Object object = this.get(key); + try + { + if (object instanceof Number) + { + return (Number) object; + } + return stringToNumber(object.toString()); + } catch (Exception e) + { + throw new JSONException( + "JSONObject[" + quote(key) + "] is not a number.", e); + } + } + + /** + * Get the int value associated with a key. + * + * @param key + * A key string. + * @return The integer value. + * @throws JSONException + * if the key is not found or if the value cannot be converted to an + * integer. + */ + public int getInt(String key) throws JSONException + { + Object object = this.get(key); + try + { + return object instanceof Number ? ((Number) object).intValue() + : Integer.parseInt((String) object); + } catch (Exception e) + { + throw new JSONException( + "JSONObject[" + quote(key) + "] is not an int.", e); + } + } + + /** + * Get the JSONArray value associated with a key. + * + * @param key + * A key string. + * @return A JSONArray which is the value. + * @throws JSONException + * if the key is not found or if the value is not a JSONArray. + */ + public JSONArray getJSONArray(String key) throws JSONException + { + Object object = this.get(key); + if (object instanceof JSONArray) + { + return (JSONArray) object; + } + throw new JSONException( + "JSONObject[" + quote(key) + "] is not a JSONArray."); + } + + /** + * Get the JSONObject value associated with a key. + * + * @param key + * A key string. + * @return A JSONObject which is the value. + * @throws JSONException + * if the key is not found or if the value is not a JSONObject. + */ + public JSONObject getJSONObject(String key) throws JSONException + { + Object object = this.get(key); + if (object instanceof JSONObject) + { + return (JSONObject) object; + } + throw new JSONException( + "JSONObject[" + quote(key) + "] is not a JSONObject."); + } + + /** + * Get the long value associated with a key. + * + * @param key + * A key string. + * @return The long value. + * @throws JSONException + * if the key is not found or if the value cannot be converted to a + * long. + */ + public long getLong(String key) throws JSONException + { + Object object = this.get(key); + try + { + return object instanceof Number ? ((Number) object).longValue() + : Long.parseLong((String) object); + } catch (Exception e) + { + throw new JSONException( + "JSONObject[" + quote(key) + "] is not a long.", e); + } + } + + /** + * Get an array of field names from a JSONObject. + * + * @return An array of field names, or null if there are no names. + */ + public static String[] getNames(JSONObject jo) + { + if (jo.isEmpty()) + { + return null; + } + return jo.keySet().toArray(new String[jo.length()]); + } + + /** + * Get an array of field names from an Object. + * + * @return An array of field names, or null if there are no names. + */ + public static String[] getNames(Object object) + { + if (object == null) + { + return null; + } + Class klass = object.getClass(); + Field[] fields = klass.getFields(); + int length = fields.length; + if (length == 0) + { + return null; + } + String[] names = new String[length]; + for (int i = 0; i < length; i += 1) + { + names[i] = fields[i].getName(); + } + return names; + } + + /** + * Get the string associated with a key. + * + * @param key + * A key string. + * @return A string which is the value. + * @throws JSONException + * if there is no string value for the key. + */ + public String getString(String key) throws JSONException + { + Object object = this.get(key); + if (object instanceof String) + { + return (String) object; + } + throw new JSONException("JSONObject[" + quote(key) + "] not a string."); + } + + /** + * Determine if the JSONObject contains a specific key. + * + * @param key + * A key string. + * @return true if the key exists in the JSONObject. + */ + public boolean has(String key) + { + return this.map.containsKey(key); + } + + /** + * Increment a property of a JSONObject. If there is no such property, create + * one with a value of 1. If there is such a property, and if it is an + * Integer, Long, Double, or Float, then add one to it. + * + * @param key + * A key string. + * @return this. + * @throws JSONException + * If there is already a property with this name that is not an + * Integer, Long, Double, or Float. + */ + public JSONObject increment(String key) throws JSONException + { + Object value = this.opt(key); + if (value == null) + { + this.put(key, 1); + } + else if (value instanceof BigInteger) + { + this.put(key, ((BigInteger) value).add(BigInteger.ONE)); + } + else if (value instanceof BigDecimal) + { + this.put(key, ((BigDecimal) value).add(BigDecimal.ONE)); + } + else if (value instanceof Integer) + { + this.put(key, ((Integer) value).intValue() + 1); + } + else if (value instanceof Long) + { + this.put(key, ((Long) value).longValue() + 1L); + } + else if (value instanceof Double) + { + this.put(key, ((Double) value).doubleValue() + 1.0d); + } + else if (value instanceof Float) + { + this.put(key, ((Float) value).floatValue() + 1.0f); + } + else + { + throw new JSONException("Unable to increment [" + quote(key) + "]."); + } + return this; + } + + /** + * Determine if the value associated with the key is null or if + * there is no value. + * + * @param key + * A key string. + * @return true if there is no value associated with the key or if the value + * is the JSONObject.NULL object. + */ + public boolean isNull(String key) + { + return JSONObject.NULL.equals(this.opt(key)); + } + + /** + * Get an enumeration of the keys of the JSONObject. Modifying this key Set + * will also modify the JSONObject. Use with caution. + * + * @see Set#iterator() + * + * @return An iterator of the keys. + */ + public Iterator keys() + { + return this.keySet().iterator(); + } + + /** + * Get a set of keys of the JSONObject. Modifying this key Set will also + * modify the JSONObject. Use with caution. + * + * @see Map#keySet() + * + * @return A keySet. + */ + public Set keySet() + { + return this.map.keySet(); + } + + /** + * Get a set of entries of the JSONObject. These are raw values and may not + * match what is returned by the JSONObject get* and opt* functions. Modifying + * the returned EntrySet or the Entry objects contained therein will modify + * the backing JSONObject. This does not return a clone or a read-only view. + * + * Use with caution. + * + * @see Map#entrySet() + * + * @return An Entry Set + */ + protected Set> entrySet() + { + return this.map.entrySet(); + } + + /** + * Get the number of keys stored in the JSONObject. + * + * @return The number of keys in the JSONObject. + */ + public int length() + { + return this.map.size(); + } + + /** + * Check if JSONObject is empty. + * + * @return true if JSONObject is empty, otherwise false. + */ + public boolean isEmpty() + { + return map.isEmpty(); + } + + /** + * Produce a JSONArray containing the names of the elements of this + * JSONObject. + * + * @return A JSONArray containing the key strings, or null if the JSONObject + * is empty. + */ + public JSONArray names() + { + if (this.map.isEmpty()) + { + return null; + } + return new JSONArray(this.map.keySet()); + } + + /** + * Produce a string from a Number. + * + * @param number + * A Number + * @return A String. + * @throws JSONException + * If n is a non-finite number. + */ + public static String numberToString(Number number) throws JSONException + { + if (number == null) + { + throw new JSONException("Null pointer"); + } + testValidity(number); + + // Shave off trailing zeros and decimal point, if possible. + + String string = number.toString(); + if (string.indexOf('.') > 0 && string.indexOf('e') < 0 + && string.indexOf('E') < 0) + { + while (string.endsWith("0")) + { + string = string.substring(0, string.length() - 1); + } + if (string.endsWith(".")) + { + string = string.substring(0, string.length() - 1); + } + } + return string; + } + + /** + * Get an optional value associated with a key. + * + * @param key + * A key string. + * @return An object which is the value, or null if there is no value. + */ + public Object opt(String key) + { + return key == null ? null : this.map.get(key); + } + + /** + * Get the enum value associated with a key. + * + * @param clazz + * The type of enum to retrieve. + * @param key + * A key string. + * @return The enum value associated with the key or null if not found + */ + public > E optEnum(Class clazz, String key) + { + return this.optEnum(clazz, key, null); + } + + /** + * Get the enum value associated with a key. + * + * @param clazz + * The type of enum to retrieve. + * @param key + * A key string. + * @param defaultValue + * The default in case the value is not found + * @return The enum value associated with the key or defaultValue if the value + * is not found or cannot be assigned to clazz + */ + public > E optEnum(Class clazz, String key, + E defaultValue) + { + try + { + Object val = this.opt(key); + if (NULL.equals(val)) + { + return defaultValue; + } + if (clazz.isAssignableFrom(val.getClass())) + { + // we just checked it! + @SuppressWarnings("unchecked") + E myE = (E) val; + return myE; + } + return Enum.valueOf(clazz, val.toString()); + } catch (IllegalArgumentException e) + { + return defaultValue; + } catch (NullPointerException e) + { + return defaultValue; + } + } + + /** + * Get an optional boolean associated with a key. It returns false if there is + * no such key, or if the value is not Boolean.TRUE or the String "true". + * + * @param key + * A key string. + * @return The truth. + */ + public boolean optBoolean(String key) + { + return this.optBoolean(key, false); + } + + /** + * Get an optional boolean associated with a key. It returns the defaultValue + * if there is no such key, or if it is not a Boolean or the String "true" or + * "false" (case insensitive). + * + * @param key + * A key string. + * @param defaultValue + * The default. + * @return The truth. + */ + public boolean optBoolean(String key, boolean defaultValue) + { + Object val = this.opt(key); + if (NULL.equals(val)) + { + return defaultValue; + } + if (val instanceof Boolean) + { + return ((Boolean) val).booleanValue(); + } + try + { + // we'll use the get anyway because it does string conversion. + return this.getBoolean(key); + } catch (Exception e) + { + return defaultValue; + } + } + + /** + * Get an optional BigDecimal associated with a key, or the defaultValue if + * there is no such key or if its value is not a number. If the value is a + * string, an attempt will be made to evaluate it as a number. + * + * @param key + * A key string. + * @param defaultValue + * The default. + * @return An object which is the value. + */ + public BigDecimal optBigDecimal(String key, BigDecimal defaultValue) + { + Object val = this.opt(key); + if (NULL.equals(val)) + { + return defaultValue; + } + if (val instanceof BigDecimal) + { + return (BigDecimal) val; + } + if (val instanceof BigInteger) + { + return new BigDecimal((BigInteger) val); + } + if (val instanceof Double || val instanceof Float) + { + return new BigDecimal(((Number) val).doubleValue()); + } + if (val instanceof Long || val instanceof Integer + || val instanceof Short || val instanceof Byte) + { + return new BigDecimal(((Number) val).longValue()); + } + // don't check if it's a string in case of unchecked Number subclasses + try + { + return new BigDecimal(val.toString()); + } catch (Exception e) + { + return defaultValue; + } + } + + /** + * Get an optional BigInteger associated with a key, or the defaultValue if + * there is no such key or if its value is not a number. If the value is a + * string, an attempt will be made to evaluate it as a number. + * + * @param key + * A key string. + * @param defaultValue + * The default. + * @return An object which is the value. + */ + public BigInteger optBigInteger(String key, BigInteger defaultValue) + { + Object val = this.opt(key); + if (NULL.equals(val)) + { + return defaultValue; + } + if (val instanceof BigInteger) + { + return (BigInteger) val; + } + if (val instanceof BigDecimal) + { + return ((BigDecimal) val).toBigInteger(); + } + if (val instanceof Double || val instanceof Float) + { + return new BigDecimal(((Number) val).doubleValue()).toBigInteger(); + } + if (val instanceof Long || val instanceof Integer + || val instanceof Short || val instanceof Byte) + { + return BigInteger.valueOf(((Number) val).longValue()); + } + // don't check if it's a string in case of unchecked Number subclasses + try + { + // the other opt functions handle implicit conversions, i.e. + // jo.put("double",1.1d); + // jo.optInt("double"); -- will return 1, not an error + // this conversion to BigDecimal then to BigInteger is to maintain + // that type cast support that may truncate the decimal. + final String valStr = val.toString(); + if (isDecimalNotation(valStr)) + { + return new BigDecimal(valStr).toBigInteger(); + } + return new BigInteger(valStr); + } catch (Exception e) + { + return defaultValue; + } + } + + /** + * Get an optional double associated with a key, or NaN if there is no such + * key or if its value is not a number. If the value is a string, an attempt + * will be made to evaluate it as a number. + * + * @param key + * A string which is the key. + * @return An object which is the value. + */ + public double optDouble(String key) + { + return this.optDouble(key, Double.NaN); + } + + /** + * Get an optional double associated with a key, or the defaultValue if there + * is no such key or if its value is not a number. If the value is a string, + * an attempt will be made to evaluate it as a number. + * + * @param key + * A key string. + * @param defaultValue + * The default. + * @return An object which is the value. + */ + public double optDouble(String key, double defaultValue) + { + Object val = this.opt(key); + if (NULL.equals(val)) + { + return defaultValue; + } + if (val instanceof Number) + { + return ((Number) val).doubleValue(); + } + if (val instanceof String) + { + try + { + return Double.parseDouble((String) val); + } catch (Exception e) + { + return defaultValue; + } + } + return defaultValue; + } + + /** + * Get the optional double value associated with an index. NaN is returned if + * there is no value for the index, or if the value is not a number and cannot + * be converted to a number. + * + * @param key + * A key string. + * @return The value. + */ + public float optFloat(String key) + { + return this.optFloat(key, Float.NaN); + } + + /** + * Get the optional double value associated with an index. The defaultValue is + * returned if there is no value for the index, or if the value is not a + * number and cannot be converted to a number. + * + * @param key + * A key string. + * @param defaultValue + * The default value. + * @return The value. + */ + public float optFloat(String key, float defaultValue) + { + Object val = this.opt(key); + if (JSONObject.NULL.equals(val)) + { + return defaultValue; + } + if (val instanceof Number) + { + return ((Number) val).floatValue(); + } + if (val instanceof String) + { + try + { + return Float.parseFloat((String) val); + } catch (Exception e) + { + return defaultValue; + } + } + return defaultValue; + } + + /** + * Get an optional int value associated with a key, or zero if there is no + * such key or if the value is not a number. If the value is a string, an + * attempt will be made to evaluate it as a number. + * + * @param key + * A key string. + * @return An object which is the value. + */ + public int optInt(String key) + { + return this.optInt(key, 0); + } + + /** + * Get an optional int value associated with a key, or the default if there is + * no such key or if the value is not a number. If the value is a string, an + * attempt will be made to evaluate it as a number. + * + * @param key + * A key string. + * @param defaultValue + * The default. + * @return An object which is the value. + */ + public int optInt(String key, int defaultValue) + { + Object val = this.opt(key); + if (NULL.equals(val)) + { + return defaultValue; + } + if (val instanceof Number) + { + return ((Number) val).intValue(); + } + + if (val instanceof String) + { + try + { + return new BigDecimal((String) val).intValue(); + } catch (Exception e) + { + return defaultValue; + } + } + return defaultValue; + } + + /** + * Get an optional JSONArray associated with a key. It returns null if there + * is no such key, or if its value is not a JSONArray. + * + * @param key + * A key string. + * @return A JSONArray which is the value. + */ + public JSONArray optJSONArray(String key) + { + Object o = this.opt(key); + return o instanceof JSONArray ? (JSONArray) o : null; + } + + /** + * Get an optional JSONObject associated with a key. It returns null if there + * is no such key, or if its value is not a JSONObject. + * + * @param key + * A key string. + * @return A JSONObject which is the value. + */ + public JSONObject optJSONObject(String key) + { + Object object = this.opt(key); + return object instanceof JSONObject ? (JSONObject) object : null; + } + + /** + * Get an optional long value associated with a key, or zero if there is no + * such key or if the value is not a number. If the value is a string, an + * attempt will be made to evaluate it as a number. + * + * @param key + * A key string. + * @return An object which is the value. + */ + public long optLong(String key) + { + return this.optLong(key, 0); + } + + /** + * Get an optional long value associated with a key, or the default if there + * is no such key or if the value is not a number. If the value is a string, + * an attempt will be made to evaluate it as a number. + * + * @param key + * A key string. + * @param defaultValue + * The default. + * @return An object which is the value. + */ + public long optLong(String key, long defaultValue) + { + Object val = this.opt(key); + if (NULL.equals(val)) + { + return defaultValue; + } + if (val instanceof Number) + { + return ((Number) val).longValue(); + } + + if (val instanceof String) + { + try + { + return new BigDecimal((String) val).longValue(); + } catch (Exception e) + { + return defaultValue; + } + } + return defaultValue; + } + + /** + * Get an optional {@link Number} value associated with a key, or + * null if there is no such key or if the value is not a number. + * If the value is a string, an attempt will be made to evaluate it as a + * number ({@link BigDecimal}). This method would be used in cases where type + * coercion of the number value is unwanted. + * + * @param key + * A key string. + * @return An object which is the value. + */ + public Number optNumber(String key) + { + return this.optNumber(key, null); + } + + /** + * Get an optional {@link Number} value associated with a key, or the default + * if there is no such key or if the value is not a number. If the value is a + * string, an attempt will be made to evaluate it as a number. This method + * would be used in cases where type coercion of the number value is unwanted. + * + * @param key + * A key string. + * @param defaultValue + * The default. + * @return An object which is the value. + */ + public Number optNumber(String key, Number defaultValue) + { + Object val = this.opt(key); + if (NULL.equals(val)) + { + return defaultValue; + } + if (val instanceof Number) + { + return (Number) val; + } + + if (val instanceof String) + { + try + { + return stringToNumber((String) val); + } catch (Exception e) + { + return defaultValue; + } + } + return defaultValue; + } + + /** + * Get an optional string associated with a key. It returns an empty string if + * there is no such key. If the value is not a string and is not null, then it + * is converted to a string. + * + * @param key + * A key string. + * @return A string which is the value. + */ + public String optString(String key) + { + return this.optString(key, ""); + } + + /** + * Get an optional string associated with a key. It returns the defaultValue + * if there is no such key. + * + * @param key + * A key string. + * @param defaultValue + * The default. + * @return A string which is the value. + */ + public String optString(String key, String defaultValue) + { + Object object = this.opt(key); + return NULL.equals(object) ? defaultValue : object.toString(); + } + + /** + * Populates the internal map of the JSONObject with the bean properties. The + * bean can not be recursive. + * + * @see JSONObject#JSONObject(Object) + * + * @param bean + * the bean + */ + private void populateMap(Object bean) + { + Class klass = bean.getClass(); + + // If klass is a System class then set includeSuperClass to false. + + boolean includeSuperClass = klass.getClassLoader() != null; + + Method[] methods = includeSuperClass ? klass.getMethods() + : klass.getDeclaredMethods(); + for (final Method method : methods) + { + final int modifiers = method.getModifiers(); + if (Modifier.isPublic(modifiers) && !Modifier.isStatic(modifiers) + && method.getParameterTypes().length == 0 + && !method.isBridge() && method.getReturnType() != Void.TYPE + && isValidMethodName(method.getName())) + { + final String key = getKeyNameFromMethod(method); + if (key != null && !key.isEmpty()) + { + try + { + final Object result = method.invoke(bean); + if (result != null) + { + this.map.put(key, wrap(result)); + // we don't use the result anywhere outside of wrap + // if it's a resource we should be sure to close it + // after calling toString + if (result instanceof Closeable) + { + try + { + ((Closeable) result).close(); + } catch (IOException ignore) + { + } + } + } + } catch (IllegalAccessException ignore) + { + } catch (IllegalArgumentException ignore) + { + } catch (InvocationTargetException ignore) + { + } + } + } + } + } + + private boolean isValidMethodName(String name) + { + return !"getClass".equals(name) && !"getDeclaringClass".equals(name); + } + + private String getKeyNameFromMethod(Method method) + { + final int ignoreDepth = -1;// getAnnotationDepth(method, + // JSONPropertyIgnore.class); + // if (ignoreDepth > 0) { + // final int forcedNameDepth = getAnnotationDepth(method, + // JSONPropertyName.class); + // if (forcedNameDepth < 0 || ignoreDepth <= forcedNameDepth) { + // // the hierarchy asked to ignore, and the nearest name override + // // was higher or non-existent + // return null; + // } + // } + // JSONPropertyName annotation = getAnnotation(method, + // JSONPropertyName.class); + // if (annotation != null && annotation.value() != null && + // !annotation.value().isEmpty()) { + // return annotation.value(); + // } + String key; + final String name = method.getName(); + if (name.startsWith("get") && name.length() > 3) + { + key = name.substring(3); + } + else if (name.startsWith("is") && name.length() > 2) + { + key = name.substring(2); + } + else + { + return null; + } + // if the first letter in the key is not uppercase, then skip. + // This is to maintain backwards compatibility before PR406 + // (https://github.com/stleary/JSON-java/pull/406/) + if (Character.isLowerCase(key.charAt(0))) + { + return null; + } + if (key.length() == 1) + { + key = key.toLowerCase(Locale.ROOT); + } + else if (!Character.isUpperCase(key.charAt(1))) + { + key = key.substring(0, 1).toLowerCase(Locale.ROOT) + key.substring(1); + } + return (/** @j2sNative 1 ? key.split("$")[0] : */ + key); + } + + // /** + // * Searches the class hierarchy to see if the method or it's super + // * implementations and interfaces has the annotation. + // * + // * @param + // * type of the annotation + // * + // * @param m + // * method to check + // * @param annotationClass + // * annotation to look for + // * @return the {@link Annotation} if the annotation exists on the current + // method + // * or one of it's super class definitions + // */ + // private static A getAnnotation(final Method m, final + // Class annotationClass) { + // return null; + // // if we have invalid data the result is null + // if (true || m == null || annotationClass == null) { + // return null; + // } + // + // if (m.isAnnotationPresent(annotationClass)) { + // return m.getAnnotation(annotationClass); + // } + // + // // if we've already reached the Object class, return null; + // Class c = m.getDeclaringClass(); + // if (c.getSuperclass() == null) { + // return null; + // } + // + // // check directly implemented interfaces for the method being checked + // for (Class i : c.getInterfaces()) { + // try { + // Method im = i.getMethod(m.getName(), m.getParameterTypes()); + // return getAnnotation(im, annotationClass); + // } catch (final SecurityException ex) { + // continue; + // } catch (final NoSuchMethodException ex) { + // continue; + // } + // } + // + // try { + // return getAnnotation( + // c.getSuperclass().getMethod(m.getName(), m.getParameterTypes()), + // annotationClass); + // } catch (final SecurityException ex) { + // return null; + // } catch (final NoSuchMethodException ex) { + // return null; + // } + // } + // + // /** + // * Searches the class hierarchy to see if the method or it's super + // * implementations and interfaces has the annotation. Returns the depth of + // the + // * annotation in the hierarchy. + // * + // * @param + // * type of the annotation + // * + // * @param m + // * method to check + // * @param annotationClass + // * annotation to look for + // * @return Depth of the annotation or -1 if the annotation is not on the + // method. + // */ + // private static int getAnnotationDepth(final Method m, final Class annotationClass) { + // // if we have invalid data the result is -1 + // if (m == null || annotationClass == null) { + // return -1; + // } + // if (m.isAnnotationPresent(annotationClass)) { + // return 1; + // } + // + // // if we've already reached the Object class, return -1; + // Class c = m.getDeclaringClass(); + // if (c.getSuperclass() == null) { + // return -1; + // } + // + // // check directly implemented interfaces for the method being checked + // for (Class i : c.getInterfaces()) { + // try { + // Method im = i.getMethod(m.getName(), m.getParameterTypes()); + // int d = getAnnotationDepth(im, annotationClass); + // if (d > 0) { + // // since the annotation was on the interface, add 1 + // return d + 1; + // } + // } catch (final SecurityException ex) { + // continue; + // } catch (final NoSuchMethodException ex) { + // continue; + // } + // } + // + // try { + // int d = getAnnotationDepth( + // c.getSuperclass().getMethod(m.getName(), m.getParameterTypes()), + // annotationClass); + // if (d > 0) { + // // since the annotation was on the superclass, add 1 + // return d + 1; + // } + // return -1; + // } catch (final SecurityException ex) { + // return -1; + // } catch (final NoSuchMethodException ex) { + // return -1; + // } + // } + + /** + * Put a key/boolean pair in the JSONObject. + * + * @param key + * A key string. + * @param value + * A boolean which is the value. + * @return this. + * @throws JSONException + * If the value is non-finite number. + * @throws NullPointerException + * If the key is null. + */ + public JSONObject put(String key, boolean value) throws JSONException + { + return this.put(key, value ? Boolean.TRUE : Boolean.FALSE); + } + + /** + * Put a key/value pair in the JSONObject, where the value will be a JSONArray + * which is produced from a Collection. + * + * @param key + * A key string. + * @param value + * A Collection value. + * @return this. + * @throws JSONException + * If the value is non-finite number. + * @throws NullPointerException + * If the key is null. + */ + public JSONObject put(String key, Collection value) + throws JSONException + { + return this.put(key, new JSONArray(value)); + } + + /** + * Put a key/double pair in the JSONObject. + * + * @param key + * A key string. + * @param value + * A double which is the value. + * @return this. + * @throws JSONException + * If the value is non-finite number. + * @throws NullPointerException + * If the key is null. + */ + public JSONObject put(String key, double value) throws JSONException + { + return this.put(key, Double.valueOf(value)); + } + + /** + * Put a key/float pair in the JSONObject. + * + * @param key + * A key string. + * @param value + * A float which is the value. + * @return this. + * @throws JSONException + * If the value is non-finite number. + * @throws NullPointerException + * If the key is null. + */ + public JSONObject put(String key, float value) throws JSONException + { + return this.put(key, Float.valueOf(value)); + } + + /** + * Put a key/int pair in the JSONObject. + * + * @param key + * A key string. + * @param value + * An int which is the value. + * @return this. + * @throws JSONException + * If the value is non-finite number. + * @throws NullPointerException + * If the key is null. + */ + public JSONObject put(String key, int value) throws JSONException + { + return this.put(key, Integer.valueOf(value)); + } + + /** + * Put a key/long pair in the JSONObject. + * + * @param key + * A key string. + * @param value + * A long which is the value. + * @return this. + * @throws JSONException + * If the value is non-finite number. + * @throws NullPointerException + * If the key is null. + */ + public JSONObject put(String key, long value) throws JSONException + { + return this.put(key, Long.valueOf(value)); + } + + /** + * Put a key/value pair in the JSONObject, where the value will be a + * JSONObject which is produced from a Map. + * + * @param key + * A key string. + * @param value + * A Map value. + * @return this. + * @throws JSONException + * If the value is non-finite number. + * @throws NullPointerException + * If the key is null. + */ + public JSONObject put(String key, Map value) throws JSONException + { + return this.put(key, new JSONObject(value)); + } + + /** + * Put a key/value pair in the JSONObject. If the value is null, + * then the key will be removed from the JSONObject if it is present. + * + * @param key + * A key string. + * @param value + * An object which is the value. It should be of one of these types: + * Boolean, Double, Integer, JSONArray, JSONObject, Long, String, or + * the JSONObject.NULL object. + * @return this. + * @throws JSONException + * If the value is non-finite number. + * @throws NullPointerException + * If the key is null. + */ + public JSONObject put(String key, Object value) throws JSONException + { + if (key == null) + { + throw new NullPointerException("Null key."); + } + if (value != null) + { + testValidity(value); + this.map.put(key, value); + } + else + { + this.remove(key); + } + return this; + } + + /** + * Put a key/value pair in the JSONObject, but only if the key and the value + * are both non-null, and only if there is not already a member with that + * name. + * + * @param key + * string + * @param value + * object + * @return this. + * @throws JSONException + * if the key is a duplicate + */ + public JSONObject putOnce(String key, Object value) throws JSONException + { + if (key != null && value != null) + { + if (this.opt(key) != null) + { + throw new JSONException("Duplicate key \"" + key + "\""); + } + return this.put(key, value); + } + return this; + } + + /** + * Put a key/value pair in the JSONObject, but only if the key and the value + * are both non-null. + * + * @param key + * A key string. + * @param value + * An object which is the value. It should be of one of these types: + * Boolean, Double, Integer, JSONArray, JSONObject, Long, String, or + * the JSONObject.NULL object. + * @return this. + * @throws JSONException + * If the value is a non-finite number. + */ + public JSONObject putOpt(String key, Object value) throws JSONException + { + if (key != null && value != null) + { + return this.put(key, value); + } + return this; + } + + /** + * Creates a JSONPointer using an initialization string and tries to match it + * to an item within this JSONObject. For example, given a JSONObject + * initialized with this document: + * + *

        +   * {
        +   *     "a":{"b":"c"}
        +   * }
        +   * 
        + * + * and this JSONPointer string: + * + *
        +   * "/a/b"
        +   * 
        + * + * Then this method will return the String "c". A JSONPointerException may be + * thrown from code called by this method. + * + * @param jsonPointer + * string that can be used to create a JSONPointer + * @return the item matched by the JSONPointer, otherwise null + */ + public Object query(String jsonPointer) + { + return query(new JSONPointer(jsonPointer)); + } + + /** + * Uses a user initialized JSONPointer and tries to match it to an item within + * this JSONObject. For example, given a JSONObject initialized with this + * document: + * + *
        +   * {
        +   *     "a":{"b":"c"}
        +   * }
        +   * 
        + * + * and this JSONPointer: + * + *
        +   * "/a/b"
        +   * 
        + * + * Then this method will return the String "c". A JSONPointerException may be + * thrown from code called by this method. + * + * @param jsonPointer + * string that can be used to create a JSONPointer + * @return the item matched by the JSONPointer, otherwise null + */ + public Object query(JSONPointer jsonPointer) + { + return jsonPointer.queryFrom(this); + } + + /** + * Queries and returns a value from this object using {@code jsonPointer}, or + * returns null if the query fails due to a missing key. + * + * @param jsonPointer + * the string representation of the JSON pointer + * @return the queried value or {@code null} + * @throws IllegalArgumentException + * if {@code jsonPointer} has invalid syntax + */ + public Object optQuery(String jsonPointer) + { + return optQuery(new JSONPointer(jsonPointer)); + } + + /** + * Queries and returns a value from this object using {@code jsonPointer}, or + * returns null if the query fails due to a missing key. + * + * @param jsonPointer + * The JSON pointer + * @return the queried value or {@code null} + * @throws IllegalArgumentException + * if {@code jsonPointer} has invalid syntax + */ + public Object optQuery(JSONPointer jsonPointer) + { + try + { + return jsonPointer.queryFrom(this); + } catch (JSONPointerException e) + { + return null; + } + } + + /** + * Produce a string in double quotes with backslash sequences in all the right + * places. A backslash will be inserted within = '\u0080' && c < '\u00a0') + || (c >= '\u2000' && c < '\u2100')) + { + w.write("\\u"); + hhhh = Integer.toHexString(c); + w.write("0000", 0, 4 - hhhh.length()); + w.write(hhhh); + } + else + { + w.write(c); + } + } + } + w.write('"'); + return w; + } + + /** + * Remove a name and its value, if present. + * + * @param key + * The name to be removed. + * @return The value that was associated with the name, or null if there was + * no value. + */ + public Object remove(String key) + { + return this.map.remove(key); + } + + /** + * Determine if two JSONObjects are similar. They must contain the same set of + * names which must be associated with similar values. + * + * @param other + * The other JSONObject + * @return true if they are equal + */ + public boolean similar(Object other) + { + try + { + if (!(other instanceof JSONObject)) + { + return false; + } + if (!this.keySet().equals(((JSONObject) other).keySet())) + { + return false; + } + for (final Entry entry : this.entrySet()) + { + String name = entry.getKey(); + Object valueThis = entry.getValue(); + Object valueOther = ((JSONObject) other).get(name); + if (valueThis == valueOther) + { + continue; + } + if (valueThis == null) + { + return false; + } + if (valueThis instanceof JSONObject) + { + if (!((JSONObject) valueThis).similar(valueOther)) + { + return false; + } + } + else if (valueThis instanceof JSONArray) + { + if (!((JSONArray) valueThis).similar(valueOther)) + { + return false; + } + } + else if (!valueThis.equals(valueOther)) + { + return false; + } + } + return true; + } catch (Throwable exception) + { + return false; + } + } + + /** + * Tests if the value should be tried as a decimal. It makes no test if there + * are actual digits. + * + * @param val + * value to test + * @return true if the string is "-0" or if it contains '.', 'e', or 'E', + * false otherwise. + */ + protected static boolean isDecimalNotation(final String val) + { + return val.indexOf('.') > -1 || val.indexOf('e') > -1 + || val.indexOf('E') > -1 || "-0".equals(val); + } + + /** + * Converts a string to a number using the narrowest possible type. Possible + * returns for this function are BigDecimal, Double, BigInteger, Long, and + * Integer. When a Double is returned, it should always be a valid Double and + * not NaN or +-infinity. + * + * @param val + * value to convert + * @return Number representation of the value. + * @throws NumberFormatException + * thrown if the value is not a valid number. A public caller should + * catch this and wrap it in a {@link JSONException} if applicable. + */ + protected static Number stringToNumber(final String val) + throws NumberFormatException + { + char initial = val.charAt(0); + if ((initial >= '0' && initial <= '9') || initial == '-') + { + // decimal representation + if (isDecimalNotation(val)) + { + // quick dirty way to see if we need a BigDecimal instead of a Double + // this only handles some cases of overflow or underflow + if (val.length() > 14) + { + return new BigDecimal(val); + } + final Double d = Double.valueOf(val); + if (d.isInfinite() || d.isNaN()) + { + // if we can't parse it as a double, go up to BigDecimal + // this is probably due to underflow like 4.32e-678 + // or overflow like 4.65e5324. The size of the string is small + // but can't be held in a Double. + return new BigDecimal(val); + } + return d; + } + // integer representation. + // This will narrow any values to the smallest reasonable Object + // representation + // (Integer, Long, or BigInteger) + + // string version + // The compare string length method reduces GC, + // but leads to smaller integers being placed in larger wrappers even + // though not + // needed. i.e. 1,000,000,000 -> Long even though it's an Integer + // 1,000,000,000,000,000,000 -> BigInteger even though it's a Long + // if(val.length()<=9){ + // return Integer.valueOf(val); + // } + // if(val.length()<=18){ + // return Long.valueOf(val); + // } + // return new BigInteger(val); + + // BigInteger version: We use a similar bitLenth compare as + // BigInteger#intValueExact uses. Increases GC, but objects hold + // only what they need. i.e. Less runtime overhead if the value is + // long lived. Which is the better tradeoff? This is closer to what's + // in stringToValue. + BigInteger bi = new BigInteger(val); + if (bi.bitLength() <= 31) + { + return Integer.valueOf(bi.intValue()); + } + if (bi.bitLength() <= 63) + { + return Long.valueOf(bi.longValue()); + } + return bi; + } + throw new NumberFormatException( + "val [" + val + "] is not a valid number."); + } + + /** + * Try to convert a string into a number, boolean, or null. If the string + * can't be converted, return the string. + * + * @param string + * A String. + * @return A simple JSON value. + */ + // Changes to this method must be copied to the corresponding method in + // the XML class to keep full support for Android + public static Object stringToValue(String string) + { + if (string.equals("")) + { + return string; + } + if (string.equalsIgnoreCase("true")) + { + return Boolean.TRUE; + } + if (string.equalsIgnoreCase("false")) + { + return Boolean.FALSE; + } + if (string.equalsIgnoreCase("null")) + { + return JSONObject.NULL; + } + + /* + * If it might be a number, try converting it. If a number cannot be produced, + * then the value will just be a string. + */ + + char initial = string.charAt(0); + if ((initial >= '0' && initial <= '9') || initial == '-') + { + try + { + // if we want full Big Number support this block can be replaced with: + // return stringToNumber(string); + if (isDecimalNotation(string)) + { + Double d = Double.valueOf(string); + if (!d.isInfinite() && !d.isNaN()) + { + return d; + } + } + else + { + Long myLong = Long.valueOf(string); + if (string.equals(myLong.toString())) + { + if (myLong.longValue() == myLong.intValue()) + { + return Integer.valueOf(myLong.intValue()); + } + return myLong; + } + } + } catch (Exception ignore) + { + } + } + return string; + } + + /** + * Throw an exception if the object is a NaN or infinite number. + * + * @param o + * The object to test. + * @throws JSONException + * If o is a non-finite number. + */ + public static void testValidity(Object o) throws JSONException + { + if (o != null) + { + if (o instanceof Double) + { + if (((Double) o).isInfinite() || ((Double) o).isNaN()) + { + throw new JSONException( + "JSON does not allow non-finite numbers."); + } + } + else if (o instanceof Float) + { + if (((Float) o).isInfinite() || ((Float) o).isNaN()) + { + throw new JSONException( + "JSON does not allow non-finite numbers."); + } + } + } + } + + /** + * Produce a JSONArray containing the values of the members of this + * JSONObject. + * + * @param names + * A JSONArray containing a list of key strings. This determines the + * sequence of the values in the result. + * @return A JSONArray of values. + * @throws JSONException + * If any of the values are non-finite numbers. + */ + public JSONArray toJSONArray(JSONArray names) throws JSONException + { + if (names == null || names.isEmpty()) + { + return null; + } + JSONArray ja = new JSONArray(); + for (int i = 0; i < names.length(); i += 1) + { + ja.put(this.opt(names.getString(i))); + } + return ja; + } + + /** + * Make a JSON text of this JSONObject. For compactness, no whitespace is + * added. If this would not result in a syntactically correct JSON text, then + * null will be returned instead. + *

        + * Warning: This method assumes that the data structure is acyclical. + * + * @return a printable, displayable, portable, transmittable representation of + * the object, beginning with { (left + * brace) and ending with } (right + * brace). + */ + @Override + public String toString() + { + try + { + return this.toString(0); + } catch (Exception e) + { + return null; + } + } + + /** + * Make a pretty-printed JSON text of this JSONObject. + * + *

        + * If indentFactor > 0 and the {@link JSONObject} has only one + * key, then the object will be output on a single line: + * + *

        +   * {@code {"key": 1}}
        +   * 
        + * + *

        + * If an object has 2 or more keys, then it will be output across multiple + * lines:

        {
        +   *  "key1": 1,
        +   *  "key2": "value 2",
        +   *  "key3": 3
        +   * }
        + *

        + * Warning: This method assumes that the data structure is acyclical. + * + * @param indentFactor + * The number of spaces to add to each level of indentation. + * @return a printable, displayable, portable, transmittable representation of + * the object, beginning with { (left + * brace) and ending with } (right + * brace). + * @throws JSONException + * If the object contains an invalid number. + */ + public String toString(int indentFactor) throws JSONException + { + StringWriter w = new StringWriter(); + synchronized (w.getBuffer()) + { + return this.write(w, indentFactor, 0).toString(); + } + } + + /** + * Make a JSON text of an Object value. If the object has an + * value.toJSONString() method, then that method will be used to produce the + * JSON text. The method is required to produce a strictly conforming text. If + * the object does not contain a toJSONString method (which is the most common + * case), then a text will be produced by other means. If the value is an + * array or Collection, then a JSONArray will be made from it and its + * toJSONString method will be called. If the value is a MAP, then a + * JSONObject will be made from it and its toJSONString method will be called. + * Otherwise, the value's toString method will be called, and the result will + * be quoted. + * + *

        + * Warning: This method assumes that the data structure is acyclical. + * + * @param value + * The value to be serialized. + * @return a printable, displayable, transmittable representation of the + * object, beginning with { (left + * brace) and ending with } (right + * brace). + * @throws JSONException + * If the value is or contains an invalid number. + */ + public static String valueToString(Object value) throws JSONException + { + // moves the implementation to JSONWriter as: + // 1. It makes more sense to be part of the writer class + // 2. For Android support this method is not available. By implementing it + // in + // the Writer + // Android users can use the writer with the built in Android JSONObject + // implementation. + return JSONWriter.valueToString(value); + } + + /** + * Wrap an object, if necessary. If the object is null, return + * the NULL object. If it is an array or collection, wrap it in a JSONArray. + * If it is a map, wrap it in a JSONObject. If it is a standard property + * (Double, String, et al) then it is already wrapped. Otherwise, if it comes + * from one of the java packages, turn it into a string. And if it doesn't, + * try to wrap it in a JSONObject. If the wrapping fails, then null is + * returned. + * + * @param object + * The object to wrap + * @return The wrapped value + */ + public static Object wrap(Object object) + { + try + { + if (object == null) + { + return NULL; + } + if (object instanceof JSONObject || object instanceof JSONArray + || NULL.equals(object) || object instanceof JSONString + || object instanceof Byte || object instanceof Character + || object instanceof Short || object instanceof Integer + || object instanceof Long || object instanceof Boolean + || object instanceof Float || object instanceof Double + || object instanceof String || object instanceof BigInteger + || object instanceof BigDecimal || object instanceof Enum) + { + return object; + } + + if (object instanceof Collection) + { + Collection coll = (Collection) object; + return new JSONArray(coll); + } + if (object.getClass().isArray()) + { + return new JSONArray(object); + } + if (object instanceof Map) + { + Map map = (Map) object; + return new JSONObject(map); + } + Package objectPackage = object.getClass().getPackage(); + String objectPackageName = objectPackage != null + ? objectPackage.getName() + : ""; + if (objectPackageName.startsWith("java.") + || objectPackageName.startsWith("javax.") + || object.getClass().getClassLoader() == null) + { + return object.toString(); + } + return new JSONObject(object); + } catch (Exception exception) + { + return null; + } + } + + /** + * Write the contents of the JSONObject as JSON text to a writer. For + * compactness, no whitespace is added. + *

        + * Warning: This method assumes that the data structure is acyclical. + * + * @return The writer. + * @throws JSONException + */ + public Writer write(Writer writer) throws JSONException + { + return this.write(writer, 0, 0); + } + + static final Writer writeValue(Writer writer, Object value, + int indentFactor, int indent) throws JSONException, IOException + { + if (value == null || value.equals(null)) + { + writer.write("null"); + } + else if (value instanceof JSONString) + { + Object o; + try + { + o = ((JSONString) value).toJSONString(); + } catch (Exception e) + { + throw new JSONException(e); + } + writer.write(o != null ? o.toString() : quote(value.toString())); + } + else if (value instanceof Number) + { + // not all Numbers may match actual JSON Numbers. i.e. fractions or + // Imaginary + final String numberAsString = numberToString((Number) value); + try + { + // Use the BigDecimal constructor for its parser to validate the format. + @SuppressWarnings("unused") + BigDecimal testNum = new BigDecimal(numberAsString); + // Close enough to a JSON number that we will use it unquoted + writer.write(numberAsString); + } catch (NumberFormatException ex) + { + // The Number value is not a valid JSON number. + // Instead we will quote it as a string + quote(numberAsString, writer); + } + } + else if (value instanceof Boolean) + { + writer.write(value.toString()); + } + else if (value instanceof Enum) + { + writer.write(quote(((Enum) value).name())); + } + else if (value instanceof JSONObject) + { + ((JSONObject) value).write(writer, indentFactor, indent); + } + else if (value instanceof JSONArray) + { + ((JSONArray) value).write(writer, indentFactor, indent); + } + else if (value instanceof Map) + { + Map map = (Map) value; + new JSONObject(map).write(writer, indentFactor, indent); + } + else if (value instanceof Collection) + { + Collection coll = (Collection) value; + new JSONArray(coll).write(writer, indentFactor, indent); + } + else if (value.getClass().isArray()) + { + new JSONArray(value).write(writer, indentFactor, indent); + } + else + { + quote(value.toString(), writer); + } + return writer; + } + + static final void indent(Writer writer, int indent) throws IOException + { + for (int i = 0; i < indent; i += 1) + { + writer.write(' '); + } + } + + /** + * Write the contents of the JSONObject as JSON text to a writer. + * + *

        + * If indentFactor > 0 and the {@link JSONObject} has only one + * key, then the object will be output on a single line: + * + *

        +   * {@code {"key": 1}}
        +   * 
        + * + *

        + * If an object has 2 or more keys, then it will be output across multiple + * lines:

        {
        +   *  "key1": 1,
        +   *  "key2": "value 2",
        +   *  "key3": 3
        +   * }
        + *

        + * Warning: This method assumes that the data structure is acyclical. + * + * @param writer + * Writes the serialized JSON + * @param indentFactor + * The number of spaces to add to each level of indentation. + * @param indent + * The indentation of the top level. + * @return The writer. + * @throws JSONException + */ + public Writer write(Writer writer, int indentFactor, int indent) + throws JSONException + { + try + { + boolean commanate = false; + final int length = this.length(); + writer.write('{'); + + if (length == 1) + { + final Entry entry = this.entrySet().iterator().next(); + final String key = entry.getKey(); + writer.write(quote(key)); + writer.write(':'); + if (indentFactor > 0) + { + writer.write(' '); + } + try + { + writeValue(writer, entry.getValue(), indentFactor, indent); + } catch (Exception e) + { + throw new JSONException( + "Unable to write JSONObject value for key: " + key, e); + } + } + else if (length != 0) + { + final int newindent = indent + indentFactor; + for (final Entry entry : this.entrySet()) + { + if (commanate) + { + writer.write(','); + } + if (indentFactor > 0) + { + writer.write('\n'); + } + indent(writer, newindent); + final String key = entry.getKey(); + writer.write(quote(key)); + writer.write(':'); + if (indentFactor > 0) + { + writer.write(' '); + } + try + { + writeValue(writer, entry.getValue(), indentFactor, newindent); + } catch (Exception e) + { + throw new JSONException( + "Unable to write JSONObject value for key: " + key, e); + } + commanate = true; + } + if (indentFactor > 0) + { + writer.write('\n'); + } + indent(writer, indent); + } + writer.write('}'); + return writer; + } catch (IOException exception) + { + throw new JSONException(exception); + } + } + + /** + * Returns a java.util.Map containing all of the entries in this object. If an + * entry in the object is a JSONArray or JSONObject it will also be converted. + *

        + * Warning: This method assumes that the data structure is acyclical. + * + * @return a java.util.Map containing the entries of this object + */ + public Map toMap() + { + Map results = new HashMap(); + for (Entry entry : this.entrySet()) + { + Object value; + if (entry.getValue() == null || NULL.equals(entry.getValue())) + { + value = null; + } + else if (entry.getValue() instanceof JSONObject) + { + value = ((JSONObject) entry.getValue()).toMap(); + } + else if (entry.getValue() instanceof JSONArray) + { + value = ((JSONArray) entry.getValue()).toList(); + } + else + { + value = entry.getValue(); + } + results.put(entry.getKey(), value); + } + return results; + } } diff --git a/src/org/json/JSONPointer.java b/src/org/json/JSONPointer.java index fc0b04b..4060411 100644 --- a/src/org/json/JSONPointer.java +++ b/src/org/json/JSONPointer.java @@ -39,255 +39,324 @@ SOFTWARE. * * In a nutshell, JSONPointer allows the user to navigate into a JSON document * using strings, and retrieve targeted objects, like a simple form of XPATH. - * Path segments are separated by the '/' char, which signifies the root of - * the document when it appears as the first char of the string. Array - * elements are navigated using ordinals, counting from 0. JSONPointer strings - * may be extended to any arbitrary number of segments. If the navigation - * is successful, the matched item is returned. A matched item may be a - * JSONObject, a JSONArray, or a JSON value. If the JSONPointer string building - * fails, an appropriate exception is thrown. If the navigation fails to find - * a match, a JSONPointerException is thrown. + * Path segments are separated by the '/' char, which signifies the root of the + * document when it appears as the first char of the string. Array elements are + * navigated using ordinals, counting from 0. JSONPointer strings may be + * extended to any arbitrary number of segments. If the navigation is + * successful, the matched item is returned. A matched item may be a JSONObject, + * a JSONArray, or a JSON value. If the JSONPointer string building fails, an + * appropriate exception is thrown. If the navigation fails to find a match, a + * JSONPointerException is thrown. * * @author JSON.org * @version 2016-05-14 */ -public class JSONPointer { +public class JSONPointer +{ - // used for URL encoding and decoding - private static final String ENCODING = "utf-8"; + // used for URL encoding and decoding + private static final String ENCODING = "utf-8"; - /** - * This class allows the user to build a JSONPointer in steps, using - * exactly one segment in each step. - */ - public static class Builder { - - // Segments for the eventual JSONPointer string - private final List refTokens = new ArrayList(); - - /** - * Creates a {@code JSONPointer} instance using the tokens previously set using the - * {@link #append(String)} method calls. - */ - public JSONPointer build() { - return new JSONPointer(this.refTokens); - } + /** + * This class allows the user to build a JSONPointer in steps, using exactly + * one segment in each step. + */ + public static class Builder + { - /** - * Adds an arbitrary token to the list of reference tokens. It can be any non-null value. - * - * Unlike in the case of JSON string or URI fragment representation of JSON pointers, the - * argument of this method MUST NOT be escaped. If you want to query the property called - * {@code "a~b"} then you should simply pass the {@code "a~b"} string as-is, there is no - * need to escape it as {@code "a~0b"}. - * - * @param token the new token to be appended to the list - * @return {@code this} - * @throws NullPointerException if {@code token} is null - */ - public Builder append(String token) { - if (token == null) { - throw new NullPointerException("token cannot be null"); - } - this.refTokens.add(token); - return this; - } + // Segments for the eventual JSONPointer string + private final List refTokens = new ArrayList(); - /** - * Adds an integer to the reference token list. Although not necessarily, mostly this token will - * denote an array index. - * - * @param arrayIndex the array index to be added to the token list - * @return {@code this} - */ - public Builder append(int arrayIndex) { - this.refTokens.add(String.valueOf(arrayIndex)); - return this; - } + /** + * Creates a {@code JSONPointer} instance using the tokens previously set + * using the {@link #append(String)} method calls. + */ + public JSONPointer build() + { + return new JSONPointer(this.refTokens); } /** - * Static factory method for {@link Builder}. Example usage: + * Adds an arbitrary token to the list of reference tokens. It can be any + * non-null value. * - *

        
        -     * JSONPointer pointer = JSONPointer.builder()
        -     *       .append("obj")
        -     *       .append("other~key").append("another/key")
        -     *       .append("\"")
        -     *       .append(0)
        -     *       .build();
        -     * 
        + * Unlike in the case of JSON string or URI fragment representation of JSON + * pointers, the argument of this method MUST NOT be escaped. If you want to + * query the property called {@code "a~b"} then you should simply pass the + * {@code "a~b"} string as-is, there is no need to escape it as + * {@code "a~0b"}. * - * @return a builder instance which can be used to construct a {@code JSONPointer} instance by chained - * {@link Builder#append(String)} calls. + * @param token + * the new token to be appended to the list + * @return {@code this} + * @throws NullPointerException + * if {@code token} is null */ - public static Builder builder() { - return new Builder(); + public Builder append(String token) + { + if (token == null) + { + throw new NullPointerException("token cannot be null"); + } + this.refTokens.add(token); + return this; } - // Segments for the JSONPointer string - private final List refTokens; - /** - * Pre-parses and initializes a new {@code JSONPointer} instance. If you want to - * evaluate the same JSON Pointer on different JSON documents then it is recommended - * to keep the {@code JSONPointer} instances due to performance considerations. + * Adds an integer to the reference token list. Although not necessarily, + * mostly this token will denote an array index. * - * @param pointer the JSON String or URI Fragment representation of the JSON pointer. - * @throws IllegalArgumentException if {@code pointer} is not a valid JSON pointer + * @param arrayIndex + * the array index to be added to the token list + * @return {@code this} */ - public JSONPointer(final String pointer) { - if (pointer == null) { - throw new NullPointerException("pointer cannot be null"); - } - if (pointer.isEmpty() || pointer.equals("#")) { - this.refTokens = Collections.emptyList(); - return; - } - String refs; - if (pointer.startsWith("#/")) { - refs = pointer.substring(2); - try { - refs = URLDecoder.decode(refs, ENCODING); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(e); - } - } else if (pointer.startsWith("/")) { - refs = pointer.substring(1); - } else { - throw new IllegalArgumentException("a JSON pointer should start with '/' or '#/'"); - } - this.refTokens = new ArrayList(); - int slashIdx = -1; - int prevSlashIdx = 0; - do { - prevSlashIdx = slashIdx + 1; - slashIdx = refs.indexOf('/', prevSlashIdx); - if(prevSlashIdx == slashIdx || prevSlashIdx == refs.length()) { - // found 2 slashes in a row ( obj//next ) - // or single slash at the end of a string ( obj/test/ ) - this.refTokens.add(""); - } else if (slashIdx >= 0) { - final String token = refs.substring(prevSlashIdx, slashIdx); - this.refTokens.add(unescape(token)); - } else { - // last item after separator, or no separator at all. - final String token = refs.substring(prevSlashIdx); - this.refTokens.add(unescape(token)); - } - } while (slashIdx >= 0); - // using split does not take into account consecutive separators or "ending nulls" - //for (String token : refs.split("/")) { - // this.refTokens.add(unescape(token)); - //} + public Builder append(int arrayIndex) + { + this.refTokens.add(String.valueOf(arrayIndex)); + return this; } + } - public JSONPointer(List refTokens) { - this.refTokens = new ArrayList(refTokens); - } + /** + * Static factory method for {@link Builder}. Example usage: + * + *
        +   * 
        +   * JSONPointer pointer = JSONPointer.builder()
        +   *       .append("obj")
        +   *       .append("other~key").append("another/key")
        +   *       .append("\"")
        +   *       .append(0)
        +   *       .build();
        +   * 
        +   * 
        + * + * @return a builder instance which can be used to construct a + * {@code JSONPointer} instance by chained + * {@link Builder#append(String)} calls. + */ + public static Builder builder() + { + return new Builder(); + } - private String unescape(String token) { - return token.replace("~1", "/").replace("~0", "~") - .replace("\\\"", "\"") - .replace("\\\\", "\\"); - } + // Segments for the JSONPointer string + private final List refTokens; - /** - * Evaluates this JSON Pointer on the given {@code document}. The {@code document} - * is usually a {@link JSONObject} or a {@link JSONArray} instance, but the empty - * JSON Pointer ({@code ""}) can be evaluated on any JSON values and in such case the - * returned value will be {@code document} itself. - * - * @param document the JSON document which should be the subject of querying. - * @return the result of the evaluation - * @throws JSONPointerException if an error occurs during evaluation - */ - public Object queryFrom(Object document) throws JSONPointerException { - if (this.refTokens.isEmpty()) { - return document; - } - Object current = document; - for (String token : this.refTokens) { - if (current instanceof JSONObject) { - current = ((JSONObject) current).opt(unescape(token)); - } else if (current instanceof JSONArray) { - current = readByIndexToken(current, token); - } else { - throw new JSONPointerException(format( - "value [%s] is not an array or object therefore its key %s cannot be resolved", current, - token)); - } - } - return current; + /** + * Pre-parses and initializes a new {@code JSONPointer} instance. If you want + * to evaluate the same JSON Pointer on different JSON documents then it is + * recommended to keep the {@code JSONPointer} instances due to performance + * considerations. + * + * @param pointer + * the JSON String or URI Fragment representation of the JSON + * pointer. + * @throws IllegalArgumentException + * if {@code pointer} is not a valid JSON pointer + */ + public JSONPointer(final String pointer) + { + if (pointer == null) + { + throw new NullPointerException("pointer cannot be null"); + } + if (pointer.isEmpty() || pointer.equals("#")) + { + this.refTokens = Collections.emptyList(); + return; + } + String refs; + if (pointer.startsWith("#/")) + { + refs = pointer.substring(2); + try + { + refs = URLDecoder.decode(refs, ENCODING); + } catch (UnsupportedEncodingException e) + { + throw new RuntimeException(e); + } + } + else if (pointer.startsWith("/")) + { + refs = pointer.substring(1); } + else + { + throw new IllegalArgumentException( + "a JSON pointer should start with '/' or '#/'"); + } + this.refTokens = new ArrayList(); + int slashIdx = -1; + int prevSlashIdx = 0; + do + { + prevSlashIdx = slashIdx + 1; + slashIdx = refs.indexOf('/', prevSlashIdx); + if (prevSlashIdx == slashIdx || prevSlashIdx == refs.length()) + { + // found 2 slashes in a row ( obj//next ) + // or single slash at the end of a string ( obj/test/ ) + this.refTokens.add(""); + } + else if (slashIdx >= 0) + { + final String token = refs.substring(prevSlashIdx, slashIdx); + this.refTokens.add(unescape(token)); + } + else + { + // last item after separator, or no separator at all. + final String token = refs.substring(prevSlashIdx); + this.refTokens.add(unescape(token)); + } + } while (slashIdx >= 0); + // using split does not take into account consecutive separators or "ending + // nulls" + // for (String token : refs.split("/")) { + // this.refTokens.add(unescape(token)); + // } + } - /** - * Matches a JSONArray element by ordinal position - * @param current the JSONArray to be evaluated - * @param indexToken the array index in string form - * @return the matched object. If no matching item is found a - * @throws JSONPointerException is thrown if the index is out of bounds - */ - private Object readByIndexToken(Object current, String indexToken) throws JSONPointerException { - try { - int index = Integer.parseInt(indexToken); - JSONArray currentArr = (JSONArray) current; - if (index >= currentArr.length()) { - throw new JSONPointerException(format("index %d is out of bounds - the array has %d elements", index, - currentArr.length())); - } - try { - return currentArr.get(index); - } catch (JSONException e) { - throw new JSONPointerException("Error reading value at index position " + index, e); - } - } catch (NumberFormatException e) { - throw new JSONPointerException(format("%s is not an array index", indexToken), e); - } + public JSONPointer(List refTokens) + { + this.refTokens = new ArrayList(refTokens); + } + + private String unescape(String token) + { + return token.replace("~1", "/").replace("~0", "~").replace("\\\"", "\"") + .replace("\\\\", "\\"); + } + + /** + * Evaluates this JSON Pointer on the given {@code document}. The + * {@code document} is usually a {@link JSONObject} or a {@link JSONArray} + * instance, but the empty JSON Pointer ({@code ""}) can be evaluated on any + * JSON values and in such case the returned value will be {@code document} + * itself. + * + * @param document + * the JSON document which should be the subject of querying. + * @return the result of the evaluation + * @throws JSONPointerException + * if an error occurs during evaluation + */ + public Object queryFrom(Object document) throws JSONPointerException + { + if (this.refTokens.isEmpty()) + { + return document; + } + Object current = document; + for (String token : this.refTokens) + { + if (current instanceof JSONObject) + { + current = ((JSONObject) current).opt(unescape(token)); + } + else if (current instanceof JSONArray) + { + current = readByIndexToken(current, token); + } + else + { + throw new JSONPointerException(format( + "value [%s] is not an array or object therefore its key %s cannot be resolved", + current, token)); + } } + return current; + } - /** - * Returns a string representing the JSONPointer path value using string - * representation - */ - @Override - public String toString() { - StringBuilder rval = new StringBuilder(""); - for (String token: this.refTokens) { - rval.append('/').append(escape(token)); - } - return rval.toString(); + /** + * Matches a JSONArray element by ordinal position + * + * @param current + * the JSONArray to be evaluated + * @param indexToken + * the array index in string form + * @return the matched object. If no matching item is found a + * @throws JSONPointerException + * is thrown if the index is out of bounds + */ + private Object readByIndexToken(Object current, String indexToken) + throws JSONPointerException + { + try + { + int index = Integer.parseInt(indexToken); + JSONArray currentArr = (JSONArray) current; + if (index >= currentArr.length()) + { + throw new JSONPointerException(format( + "index %d is out of bounds - the array has %d elements", + index, currentArr.length())); + } + try + { + return currentArr.get(index); + } catch (JSONException e) + { + throw new JSONPointerException( + "Error reading value at index position " + index, e); + } + } catch (NumberFormatException e) + { + throw new JSONPointerException( + format("%s is not an array index", indexToken), e); } + } - /** - * Escapes path segment values to an unambiguous form. - * The escape char to be inserted is '~'. The chars to be escaped - * are ~, which maps to ~0, and /, which maps to ~1. Backslashes - * and double quote chars are also escaped. - * @param token the JSONPointer segment value to be escaped - * @return the escaped value for the token - */ - private String escape(String token) { - return token.replace("~", "~0") - .replace("/", "~1") - .replace("\\", "\\\\") - .replace("\"", "\\\""); + /** + * Returns a string representing the JSONPointer path value using string + * representation + */ + @Override + public String toString() + { + StringBuilder rval = new StringBuilder(""); + for (String token : this.refTokens) + { + rval.append('/').append(escape(token)); } + return rval.toString(); + } - /** - * Returns a string representing the JSONPointer path value using URI - * fragment identifier representation - */ - public String toURIFragment() { - try { - StringBuilder rval = new StringBuilder("#"); - for (String token : this.refTokens) { - rval.append('/').append(URLEncoder.encode(token, ENCODING)); - } - return rval.toString(); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(e); - } + /** + * Escapes path segment values to an unambiguous form. The escape char to be + * inserted is '~'. The chars to be escaped are ~, which maps to ~0, and /, + * which maps to ~1. Backslashes and double quote chars are also escaped. + * + * @param token + * the JSONPointer segment value to be escaped + * @return the escaped value for the token + */ + private String escape(String token) + { + return token.replace("~", "~0").replace("/", "~1").replace("\\", "\\\\") + .replace("\"", "\\\""); + } + + /** + * Returns a string representing the JSONPointer path value using URI fragment + * identifier representation + */ + public String toURIFragment() + { + try + { + StringBuilder rval = new StringBuilder("#"); + for (String token : this.refTokens) + { + rval.append('/').append(URLEncoder.encode(token, ENCODING)); + } + return rval.toString(); + } catch (UnsupportedEncodingException e) + { + throw new RuntimeException(e); } - + } + } diff --git a/src/org/json/JSONPointerException.java b/src/org/json/JSONPointerException.java index 0ce1aeb..63a5935 100644 --- a/src/org/json/JSONPointerException.java +++ b/src/org/json/JSONPointerException.java @@ -31,15 +31,18 @@ SOFTWARE. * @author JSON.org * @version 2016-05-13 */ -public class JSONPointerException extends JSONException { - private static final long serialVersionUID = 8872944667561856751L; - - public JSONPointerException(String message) { - super(message); - } - - public JSONPointerException(String message, Throwable cause) { - super(message, cause); - } +public class JSONPointerException extends JSONException +{ + private static final long serialVersionUID = 8872944667561856751L; + + public JSONPointerException(String message) + { + super(message); + } + + public JSONPointerException(String message, Throwable cause) + { + super(message, cause); + } } diff --git a/src/org/json/JSONPropertyIgnore.java b/src/org/json/JSONPropertyIgnore.java index 682de74..7caf519 100644 --- a/src/org/json/JSONPropertyIgnore.java +++ b/src/org/json/JSONPropertyIgnore.java @@ -33,11 +33,13 @@ import java.lang.annotation.Target; @Documented @Retention(RUNTIME) -@Target({METHOD}) +@Target({ METHOD }) /** - * Use this annotation on a getter method to override the Bean name - * parser for Bean -> JSONObject mapping. If this annotation is - * present at any level in the class hierarchy, then the method will - * not be serialized from the bean into the JSONObject. + * Use this annotation on a getter method to override the Bean name parser for + * Bean -> JSONObject mapping. If this annotation is present at any level in + * the class hierarchy, then the method will not be serialized from the bean + * into the JSONObject. */ -public @interface JSONPropertyIgnore { } +public @interface JSONPropertyIgnore +{ +} diff --git a/src/org/json/JSONPropertyName.java b/src/org/json/JSONPropertyName.java index a1bcd58..7b558f9 100644 --- a/src/org/json/JSONPropertyName.java +++ b/src/org/json/JSONPropertyName.java @@ -33,15 +33,16 @@ import java.lang.annotation.Target; @Documented @Retention(RUNTIME) -@Target({METHOD}) +@Target({ METHOD }) /** - * Use this annotation on a getter method to override the Bean name - * parser for Bean -> JSONObject mapping. A value set to empty string "" + * Use this annotation on a getter method to override the Bean name parser for + * Bean -> JSONObject mapping. A value set to empty string "" * will have the Bean parser fall back to the default field name processing. */ -public @interface JSONPropertyName { - /** - * @return The name of the property as to be used in the JSON Object. - */ - String value(); +public @interface JSONPropertyName +{ + /** + * @return The name of the property as to be used in the JSON Object. + */ + String value(); } diff --git a/src/org/json/JSONString.java b/src/org/json/JSONString.java index 1f2d77d..2e11712 100644 --- a/src/org/json/JSONString.java +++ b/src/org/json/JSONString.java @@ -1,18 +1,20 @@ package org.json; + /** * The JSONString interface allows a toJSONString() * method so that a class can change the behavior of - * JSONObject.toString(), JSONArray.toString(), - * and JSONWriter.value(Object). The + * JSONObject.toString(), JSONArray.toString(), and + * JSONWriter.value(Object). The * toJSONString method will be used instead of the default behavior * of using the Object's toString() method and quoting the result. */ -public interface JSONString { - /** - * The toJSONString method allows a class to produce its own JSON - * serialization. - * - * @return A strictly syntactically correct JSON text. - */ - public String toJSONString(); +public interface JSONString +{ + /** + * The toJSONString method allows a class to produce its own JSON + * serialization. + * + * @return A strictly syntactically correct JSON text. + */ + public String toJSONString(); } diff --git a/src/org/json/JSONStringer.java b/src/org/json/JSONStringer.java index bb9e7a4..cfed9e7 100644 --- a/src/org/json/JSONStringer.java +++ b/src/org/json/JSONStringer.java @@ -27,53 +27,61 @@ SOFTWARE. import java.io.StringWriter; /** - * JSONStringer provides a quick and convenient way of producing JSON text. - * The texts produced strictly conform to JSON syntax rules. No whitespace is - * added, so the results are ready for transmission or storage. Each instance of + * JSONStringer provides a quick and convenient way of producing JSON text. The + * texts produced strictly conform to JSON syntax rules. No whitespace is added, + * so the results are ready for transmission or storage. Each instance of * JSONStringer can produce one JSON text. *

        * A JSONStringer instance provides a value method for appending - * values to the - * text, and a key - * method for adding keys before values in objects. There are array - * and endArray methods that make and bound array values, and - * object and endObject methods which make and bound - * object values. All of these methods return the JSONWriter instance, - * permitting cascade style. For example,

        - * myString = new JSONStringer()
        - *     .object()
        - *         .key("JSON")
        - *         .value("Hello, World!")
        - *     .endObject()
        - *     .toString();
        which produces the string
        - * {"JSON":"Hello, World!"}
        + * values to the text, and a key method for adding keys before + * values in objects. There are array and endArray + * methods that make and bound array values, and object and + * endObject methods which make and bound object values. All of + * these methods return the JSONWriter instance, permitting cascade style. For + * example, + * + *
        + * myString = new JSONStringer().object().key("JSON").value("Hello, World!")
        + *         .endObject().toString();
        + * 
        + * + * which produces the string + * + *
        + * {"JSON":"Hello, World!"}
        + * 
        *

        * The first method called must be array or object. * There are no methods for adding commas or colons. JSONStringer adds them for * you. Objects and arrays can be nested up to 20 levels deep. *

        * This can sometimes be easier than using a JSONObject to build a string. + * * @author JSON.org * @version 2015-12-09 */ -public class JSONStringer extends JSONWriter { - /** - * Make a fresh JSONStringer. It can be used to build one JSON text. - */ - public JSONStringer() { - super(new StringWriter()); - } +public class JSONStringer extends JSONWriter +{ + /** + * Make a fresh JSONStringer. It can be used to build one JSON text. + */ + public JSONStringer() + { + super(new StringWriter()); + } - /** - * Return the JSON text. This method is used to obtain the product of the - * JSONStringer instance. It will return null if there was a - * problem in the construction of the JSON text (such as the calls to - * array were not properly balanced with calls to - * endArray). - * @return The JSON text. - */ - @Override - public String toString() { - return this.mode == 'd' ? this.writer.toString() : null; - } + /** + * Return the JSON text. This method is used to obtain the product of the + * JSONStringer instance. It will return null if there was a + * problem in the construction of the JSON text (such as the calls to + * array were not properly balanced with calls to + * endArray). + * + * @return The JSON text. + */ + @Override + public String toString() + { + return this.mode == 'd' ? this.writer.toString() : null; + } } diff --git a/src/org/json/JSONTokener.java b/src/org/json/JSONTokener.java index 36bce45..231fbe0 100644 --- a/src/org/json/JSONTokener.java +++ b/src/org/json/JSONTokener.java @@ -33,497 +33,599 @@ SOFTWARE. /** * A JSONTokener takes a source string and extracts characters and tokens from - * it. It is used by the JSONObject and JSONArray constructors to parse - * JSON source strings. + * it. It is used by the JSONObject and JSONArray constructors to parse JSON + * source strings. + * * @author JSON.org * @version 2014-05-03 */ -public class JSONTokener { - /** current read character position on the current line. */ - private long character; - /** flag to indicate if the end of the input has been found. */ - private boolean eof; - /** current read index of the input. */ - private long index; - /** current line of the input. */ - private long line; - /** previous character read from the input. */ - private char previous; - /** Reader for the input. */ - private final Reader reader; - /** flag to indicate that a previous character was requested. */ - private boolean usePrevious; - /** the number of characters read in the previous line. */ - private long characterPreviousLine; - - - /** - * Construct a JSONTokener from a Reader. The caller must close the Reader. - * - * @param reader A reader. - */ - public JSONTokener(Reader reader) { - this.reader = reader.markSupported() - ? reader - : new BufferedReader(reader); - this.eof = false; - this.usePrevious = false; - this.previous = 0; - this.index = 0; - this.character = 1; - this.characterPreviousLine = 0; - this.line = 1; +public class JSONTokener +{ + /** current read character position on the current line. */ + private long character; + + /** flag to indicate if the end of the input has been found. */ + private boolean eof; + + /** current read index of the input. */ + private long index; + + /** current line of the input. */ + private long line; + + /** previous character read from the input. */ + private char previous; + + /** Reader for the input. */ + private final Reader reader; + + /** flag to indicate that a previous character was requested. */ + private boolean usePrevious; + + /** the number of characters read in the previous line. */ + private long characterPreviousLine; + + /** + * Construct a JSONTokener from a Reader. The caller must close the Reader. + * + * @param reader + * A reader. + */ + public JSONTokener(Reader reader) + { + this.reader = reader.markSupported() ? reader + : new BufferedReader(reader); + this.eof = false; + this.usePrevious = false; + this.previous = 0; + this.index = 0; + this.character = 1; + this.characterPreviousLine = 0; + this.line = 1; + } + + /** + * Construct a JSONTokener from an InputStream. The caller must close the + * input stream. + * + * @param inputStream + * The source. + */ + public JSONTokener(InputStream inputStream) + { + this(new InputStreamReader(inputStream)); + } + + /** + * Construct a JSONTokener from a string. + * + * @param s + * A source string. + */ + public JSONTokener(String s) + { + this(new StringReader(s)); + } + + /** + * Back up one character. This provides a sort of lookahead capability, so + * that you can test for a digit or letter before attempting to parse the next + * number or identifier. + * + * @throws JSONException + * Thrown if trying to step back more than 1 step or if already at + * the start of the string + */ + public void back() throws JSONException + { + if (this.usePrevious || this.index <= 0) + { + throw new JSONException("Stepping back two steps is not supported"); } - - - /** - * Construct a JSONTokener from an InputStream. The caller must close the input stream. - * @param inputStream The source. - */ - public JSONTokener(InputStream inputStream) { - this(new InputStreamReader(inputStream)); + this.decrementIndexes(); + this.usePrevious = true; + this.eof = false; + } + + /** + * Decrements the indexes for the {@link #back()} method based on the previous + * character read. + */ + private void decrementIndexes() + { + this.index--; + if (this.previous == '\r' || this.previous == '\n') + { + this.line--; + this.character = this.characterPreviousLine; } - - - /** - * Construct a JSONTokener from a string. - * - * @param s A source string. - */ - public JSONTokener(String s) { - this(new StringReader(s)); + else if (this.character > 0) + { + this.character--; } - - - /** - * Back up one character. This provides a sort of lookahead capability, - * so that you can test for a digit or letter before attempting to parse - * the next number or identifier. - * @throws JSONException Thrown if trying to step back more than 1 step - * or if already at the start of the string - */ - public void back() throws JSONException { - if (this.usePrevious || this.index <= 0) { - throw new JSONException("Stepping back two steps is not supported"); - } - this.decrementIndexes(); - this.usePrevious = true; - this.eof = false; + } + + /** + * Get the hex value of a character (base16). + * + * @param c + * A character between '0' and '9' or between 'A' and 'F' or between + * 'a' and 'f'. + * @return An int between 0 and 15, or -1 if c was not a hex digit. + */ + public static int dehexchar(char c) + { + if (c >= '0' && c <= '9') + { + return c - '0'; } - - /** - * Decrements the indexes for the {@link #back()} method based on the previous character read. - */ - private void decrementIndexes() { - this.index--; - if(this.previous=='\r' || this.previous == '\n') { - this.line--; - this.character=this.characterPreviousLine ; - } else if(this.character > 0){ - this.character--; - } + if (c >= 'A' && c <= 'F') + { + return c - ('A' - 10); } - - /** - * Get the hex value of a character (base16). - * @param c A character between '0' and '9' or between 'A' and 'F' or - * between 'a' and 'f'. - * @return An int between 0 and 15, or -1 if c was not a hex digit. - */ - public static int dehexchar(char c) { - if (c >= '0' && c <= '9') { - return c - '0'; - } - if (c >= 'A' && c <= 'F') { - return c - ('A' - 10); - } - if (c >= 'a' && c <= 'f') { - return c - ('a' - 10); - } - return -1; + if (c >= 'a' && c <= 'f') + { + return c - ('a' - 10); } - - /** - * Checks if the end of the input has been reached. - * - * @return true if at the end of the file and we didn't step back - */ - public boolean end() { - return this.eof && !this.usePrevious; + return -1; + } + + /** + * Checks if the end of the input has been reached. + * + * @return true if at the end of the file and we didn't step back + */ + public boolean end() + { + return this.eof && !this.usePrevious; + } + + /** + * Determine if the source string still contains characters that next() can + * consume. + * + * @return true if not yet at the end of the source. + * @throws JSONException + * thrown if there is an error stepping forward or backward while + * checking for more data. + */ + public boolean more() throws JSONException + { + if (this.usePrevious) + { + return true; } - - - /** - * Determine if the source string still contains characters that next() - * can consume. - * @return true if not yet at the end of the source. - * @throws JSONException thrown if there is an error stepping forward - * or backward while checking for more data. - */ - public boolean more() throws JSONException { - if(this.usePrevious) { - return true; - } - try { - this.reader.mark(1); - } catch (IOException e) { - throw new JSONException("Unable to preserve stream position", e); - } - try { - // -1 is EOF, but next() can not consume the null character '\0' - if(this.reader.read() <= 0) { - this.eof = true; - return false; - } - this.reader.reset(); - } catch (IOException e) { - throw new JSONException("Unable to read the next character from the stream", e); - } - return true; + try + { + this.reader.mark(1); + } catch (IOException e) + { + throw new JSONException("Unable to preserve stream position", e); } - - - /** - * Get the next character in the source string. - * - * @return The next character, or 0 if past the end of the source string. - * @throws JSONException Thrown if there is an error reading the source string. - */ - public char next() throws JSONException { - int c; - if (this.usePrevious) { - this.usePrevious = false; - c = this.previous; - } else { - try { - c = this.reader.read(); - } catch (IOException exception) { - throw new JSONException(exception); - } - } - if (c <= 0) { // End of stream - this.eof = true; - return 0; - } - this.incrementIndexes(c); - this.previous = (char) c; - return this.previous; + try + { + // -1 is EOF, but next() can not consume the null character '\0' + if (this.reader.read() <= 0) + { + this.eof = true; + return false; + } + this.reader.reset(); + } catch (IOException e) + { + throw new JSONException( + "Unable to read the next character from the stream", e); } - - /** - * Increments the internal indexes according to the previous character - * read and the character passed as the current character. - * @param c the current character read. - */ - private void incrementIndexes(int c) { - if(c > 0) { - this.index++; - if(c=='\r') { - this.line++; - this.characterPreviousLine = this.character; - this.character=0; - }else if (c=='\n') { - if(this.previous != '\r') { - this.line++; - this.characterPreviousLine = this.character; - } - this.character=0; - } else { - this.character++; - } - } + return true; + } + + /** + * Get the next character in the source string. + * + * @return The next character, or 0 if past the end of the source string. + * @throws JSONException + * Thrown if there is an error reading the source string. + */ + public char next() throws JSONException + { + int c; + if (this.usePrevious) + { + this.usePrevious = false; + c = this.previous; } - - /** - * Consume the next character, and check that it matches a specified - * character. - * @param c The character to match. - * @return The character. - * @throws JSONException if the character does not match. - */ - public char next(char c) throws JSONException { - char n = this.next(); - if (n != c) { - if(n > 0) { - throw this.syntaxError("Expected '" + c + "' and instead saw '" + - n + "'"); - } - throw this.syntaxError("Expected '" + c + "' and instead saw ''"); - } - return n; + else + { + try + { + c = this.reader.read(); + } catch (IOException exception) + { + throw new JSONException(exception); + } } - - - /** - * Get the next n characters. - * - * @param n The number of characters to take. - * @return A string of n characters. - * @throws JSONException - * Substring bounds error if there are not - * n characters remaining in the source string. - */ - public String next(int n) throws JSONException { - if (n == 0) { - return ""; - } - - char[] chars = new char[n]; - int pos = 0; - - while (pos < n) { - chars[pos] = this.next(); - if (this.end()) { - throw this.syntaxError("Substring bounds error"); - } - pos += 1; - } - return new String(chars); + if (c <= 0) + { // End of stream + this.eof = true; + return 0; } - - - /** - * Get the next char in the string, skipping whitespace. - * @throws JSONException Thrown if there is an error reading the source string. - * @return A character, or 0 if there are no more characters. - */ - public char nextClean() throws JSONException { - for (;;) { - char c = this.next(); - if (c == 0 || c > ' ') { - return c; - } + this.incrementIndexes(c); + this.previous = (char) c; + return this.previous; + } + + /** + * Increments the internal indexes according to the previous character read + * and the character passed as the current character. + * + * @param c + * the current character read. + */ + private void incrementIndexes(int c) + { + if (c > 0) + { + this.index++; + if (c == '\r') + { + this.line++; + this.characterPreviousLine = this.character; + this.character = 0; + } + else if (c == '\n') + { + if (this.previous != '\r') + { + this.line++; + this.characterPreviousLine = this.character; } + this.character = 0; + } + else + { + this.character++; + } } - - - /** - * Return the characters up to the next close quote character. - * Backslash processing is done. The formal JSON format does not - * allow strings in single quotes, but an implementation is allowed to - * accept them. - * @param quote The quoting character, either - * " (double quote) or - * ' (single quote). - * @return A String. - * @throws JSONException Unterminated string. - */ - public String nextString(char quote) throws JSONException { - char c; - StringBuilder sb = new StringBuilder(); - for (;;) { - c = this.next(); - switch (c) { - case 0: - case '\n': - case '\r': - throw this.syntaxError("Unterminated string"); - case '\\': - c = this.next(); - switch (c) { - case 'b': - sb.append('\b'); - break; - case 't': - sb.append('\t'); - break; - case 'n': - sb.append('\n'); - break; - case 'f': - sb.append('\f'); - break; - case 'r': - sb.append('\r'); - break; - case 'u': - try { - sb.append((char)Integer.parseInt(this.next(4), 16)); - } catch (NumberFormatException e) { - throw this.syntaxError("Illegal escape.", e); - } - break; - case '"': - case '\'': - case '\\': - case '/': - sb.append(c); - break; - default: - throw this.syntaxError("Illegal escape."); - } - break; - default: - if (c == quote) { - return sb.toString(); - } - sb.append(c); - } - } + } + + /** + * Consume the next character, and check that it matches a specified + * character. + * + * @param c + * The character to match. + * @return The character. + * @throws JSONException + * if the character does not match. + */ + public char next(char c) throws JSONException + { + char n = this.next(); + if (n != c) + { + if (n > 0) + { + throw this.syntaxError( + "Expected '" + c + "' and instead saw '" + n + "'"); + } + throw this.syntaxError("Expected '" + c + "' and instead saw ''"); } - - - /** - * Get the text up but not including the specified character or the - * end of line, whichever comes first. - * @param delimiter A delimiter character. - * @return A string. - * @throws JSONException Thrown if there is an error while searching - * for the delimiter - */ - public String nextTo(char delimiter) throws JSONException { - StringBuilder sb = new StringBuilder(); - for (;;) { - char c = this.next(); - if (c == delimiter || c == 0 || c == '\n' || c == '\r') { - if (c != 0) { - this.back(); - } - return sb.toString().trim(); - } - sb.append(c); - } + return n; + } + + /** + * Get the next n characters. + * + * @param n + * The number of characters to take. + * @return A string of n characters. + * @throws JSONException + * Substring bounds error if there are not n characters remaining in + * the source string. + */ + public String next(int n) throws JSONException + { + if (n == 0) + { + return ""; } - - /** - * Get the text up but not including one of the specified delimiter - * characters or the end of line, whichever comes first. - * @param delimiters A set of delimiter characters. - * @return A string, trimmed. - * @throws JSONException Thrown if there is an error while searching - * for the delimiter - */ - public String nextTo(String delimiters) throws JSONException { - char c; - StringBuilder sb = new StringBuilder(); - for (;;) { - c = this.next(); - if (delimiters.indexOf(c) >= 0 || c == 0 || - c == '\n' || c == '\r') { - if (c != 0) { - this.back(); - } - return sb.toString().trim(); - } - sb.append(c); - } + char[] chars = new char[n]; + int pos = 0; + + while (pos < n) + { + chars[pos] = this.next(); + if (this.end()) + { + throw this.syntaxError("Substring bounds error"); + } + pos += 1; } - - - /** - * Get the next value. The value can be a Boolean, Double, Integer, - * JSONArray, JSONObject, Long, or String, or the JSONObject.NULL object. - * @throws JSONException If syntax error. - * - * @return An object. - */ - public Object nextValue() throws JSONException { - char c = this.nextClean(); - String string; - - switch (c) { + return new String(chars); + } + + /** + * Get the next char in the string, skipping whitespace. + * + * @throws JSONException + * Thrown if there is an error reading the source string. + * @return A character, or 0 if there are no more characters. + */ + public char nextClean() throws JSONException + { + for (;;) + { + char c = this.next(); + if (c == 0 || c > ' ') + { + return c; + } + } + } + + /** + * Return the characters up to the next close quote character. Backslash + * processing is done. The formal JSON format does not allow strings in single + * quotes, but an implementation is allowed to accept them. + * + * @param quote + * The quoting character, either " (double + * quote) or ' (single + * quote). + * @return A String. + * @throws JSONException + * Unterminated string. + */ + public String nextString(char quote) throws JSONException + { + char c; + StringBuilder sb = new StringBuilder(); + for (;;) + { + c = this.next(); + switch (c) + { + case 0: + case '\n': + case '\r': + throw this.syntaxError("Unterminated string"); + case '\\': + c = this.next(); + switch (c) + { + case 'b': + sb.append('\b'); + break; + case 't': + sb.append('\t'); + break; + case 'n': + sb.append('\n'); + break; + case 'f': + sb.append('\f'); + break; + case 'r': + sb.append('\r'); + break; + case 'u': + try + { + sb.append((char) Integer.parseInt(this.next(4), 16)); + } catch (NumberFormatException e) + { + throw this.syntaxError("Illegal escape.", e); + } + break; case '"': case '\'': - return this.nextString(c); - case '{': - this.back(); - return new JSONObject(this); - case '[': - this.back(); - return new JSONArray(this); + case '\\': + case '/': + sb.append(c); + break; + default: + throw this.syntaxError("Illegal escape."); } - - /* - * Handle unquoted text. This could be the values true, false, or - * null, or it can be a number. An implementation (such as this one) - * is allowed to also accept non-standard forms. - * - * Accumulate characters until we reach the end of the text or a - * formatting character. - */ - - StringBuilder sb = new StringBuilder(); - while (c >= ' ' && ",:]}/\\\"[{;=#".indexOf(c) < 0) { - sb.append(c); - c = this.next(); + break; + default: + if (c == quote) + { + return sb.toString(); } - this.back(); - - string = sb.toString().trim(); - if ("".equals(string)) { - throw this.syntaxError("Missing value"); + sb.append(c); + } + } + } + + /** + * Get the text up but not including the specified character or the end of + * line, whichever comes first. + * + * @param delimiter + * A delimiter character. + * @return A string. + * @throws JSONException + * Thrown if there is an error while searching for the delimiter + */ + public String nextTo(char delimiter) throws JSONException + { + StringBuilder sb = new StringBuilder(); + for (;;) + { + char c = this.next(); + if (c == delimiter || c == 0 || c == '\n' || c == '\r') + { + if (c != 0) + { + this.back(); } - return JSONObject.stringToValue(string); + return sb.toString().trim(); + } + sb.append(c); } - - - /** - * Skip characters until the next character is the requested character. - * If the requested character is not found, no characters are skipped. - * @param to A character to skip to. - * @return The requested character, or zero if the requested character - * is not found. - * @throws JSONException Thrown if there is an error while searching - * for the to character - */ - public char skipTo(char to) throws JSONException { - char c; - try { - long startIndex = this.index; - long startCharacter = this.character; - long startLine = this.line; - this.reader.mark(1000000); - do { - c = this.next(); - if (c == 0) { - // in some readers, reset() may throw an exception if - // the remaining portion of the input is greater than - // the mark size (1,000,000 above). - this.reader.reset(); - this.index = startIndex; - this.character = startCharacter; - this.line = startLine; - return 0; - } - } while (c != to); - this.reader.mark(1); - } catch (IOException exception) { - throw new JSONException(exception); + } + + /** + * Get the text up but not including one of the specified delimiter characters + * or the end of line, whichever comes first. + * + * @param delimiters + * A set of delimiter characters. + * @return A string, trimmed. + * @throws JSONException + * Thrown if there is an error while searching for the delimiter + */ + public String nextTo(String delimiters) throws JSONException + { + char c; + StringBuilder sb = new StringBuilder(); + for (;;) + { + c = this.next(); + if (delimiters.indexOf(c) >= 0 || c == 0 || c == '\n' || c == '\r') + { + if (c != 0) + { + this.back(); } - this.back(); - return c; + return sb.toString().trim(); + } + sb.append(c); } - - /** - * Make a JSONException to signal a syntax error. - * - * @param message The error message. - * @return A JSONException object, suitable for throwing - */ - public JSONException syntaxError(String message) { - return new JSONException(message + this.toString()); + } + + /** + * Get the next value. The value can be a Boolean, Double, Integer, JSONArray, + * JSONObject, Long, or String, or the JSONObject.NULL object. + * + * @throws JSONException + * If syntax error. + * + * @return An object. + */ + public Object nextValue() throws JSONException + { + char c = this.nextClean(); + String string; + + switch (c) + { + case '"': + case '\'': + return this.nextString(c); + case '{': + this.back(); + return new JSONObject(this); + case '[': + this.back(); + return new JSONArray(this); } - /** - * Make a JSONException to signal a syntax error. + /* + * Handle unquoted text. This could be the values true, false, or + * null, or it can be a number. An implementation (such as this one) + * is allowed to also accept non-standard forms. * - * @param message The error message. - * @param causedBy The throwable that caused the error. - * @return A JSONException object, suitable for throwing + * Accumulate characters until we reach the end of the text or a + * formatting character. */ - public JSONException syntaxError(String message, Throwable causedBy) { - return new JSONException(message + this.toString(), causedBy); + + StringBuilder sb = new StringBuilder(); + while (c >= ' ' && ",:]}/\\\"[{;=#".indexOf(c) < 0) + { + sb.append(c); + c = this.next(); } + this.back(); - /** - * Make a printable string of this JSONTokener. - * - * @return " at {index} [character {character} line {line}]" - */ - @Override - public String toString() { - return " at " + this.index + " [character " + this.character + " line " + - this.line + "]"; + string = sb.toString().trim(); + if ("".equals(string)) + { + throw this.syntaxError("Missing value"); + } + return JSONObject.stringToValue(string); + } + + /** + * Skip characters until the next character is the requested character. If the + * requested character is not found, no characters are skipped. + * + * @param to + * A character to skip to. + * @return The requested character, or zero if the requested character is not + * found. + * @throws JSONException + * Thrown if there is an error while searching for the to character + */ + public char skipTo(char to) throws JSONException + { + char c; + try + { + long startIndex = this.index; + long startCharacter = this.character; + long startLine = this.line; + this.reader.mark(1000000); + do + { + c = this.next(); + if (c == 0) + { + // in some readers, reset() may throw an exception if + // the remaining portion of the input is greater than + // the mark size (1,000,000 above). + this.reader.reset(); + this.index = startIndex; + this.character = startCharacter; + this.line = startLine; + return 0; + } + } while (c != to); + this.reader.mark(1); + } catch (IOException exception) + { + throw new JSONException(exception); } + this.back(); + return c; + } + + /** + * Make a JSONException to signal a syntax error. + * + * @param message + * The error message. + * @return A JSONException object, suitable for throwing + */ + public JSONException syntaxError(String message) + { + return new JSONException(message + this.toString()); + } + + /** + * Make a JSONException to signal a syntax error. + * + * @param message + * The error message. + * @param causedBy + * The throwable that caused the error. + * @return A JSONException object, suitable for throwing + */ + public JSONException syntaxError(String message, Throwable causedBy) + { + return new JSONException(message + this.toString(), causedBy); + } + + /** + * Make a printable string of this JSONTokener. + * + * @return " at {index} [character {character} line {line}]" + */ + @Override + public String toString() + { + return " at " + this.index + " [character " + this.character + " line " + + this.line + "]"; + } } diff --git a/src/org/json/JSONWriter.java b/src/org/json/JSONWriter.java index f520c0c..0a62370 100644 --- a/src/org/json/JSONWriter.java +++ b/src/org/json/JSONWriter.java @@ -30,389 +30,470 @@ SOFTWARE. */ /** - * JSONWriter provides a quick and convenient way of producing JSON text. - * The texts produced strictly conform to JSON syntax rules. No whitespace is - * added, so the results are ready for transmission or storage. Each instance of + * JSONWriter provides a quick and convenient way of producing JSON text. The + * texts produced strictly conform to JSON syntax rules. No whitespace is added, + * so the results are ready for transmission or storage. Each instance of * JSONWriter can produce one JSON text. *

        * A JSONWriter instance provides a value method for appending - * values to the - * text, and a key - * method for adding keys before values in objects. There are array - * and endArray methods that make and bound array values, and - * object and endObject methods which make and bound - * object values. All of these methods return the JSONWriter instance, - * permitting a cascade style. For example,

        - * new JSONWriter(myWriter)
        - *     .object()
        - *         .key("JSON")
        - *         .value("Hello, World!")
        - *     .endObject();
        which writes
        - * {"JSON":"Hello, World!"}
        + * values to the text, and a key method for adding keys before + * values in objects. There are array and endArray + * methods that make and bound array values, and object and + * endObject methods which make and bound object values. All of + * these methods return the JSONWriter instance, permitting a cascade style. For + * example, + * + *
        + * new JSONWriter(myWriter).object().key("JSON").value("Hello, World!")
        + *         .endObject();
        + * 
        + * + * which writes + * + *
        + * {"JSON":"Hello, World!"}
        + * 
        *

        * The first method called must be array or object. * There are no methods for adding commas or colons. JSONWriter adds them for * you. Objects and arrays can be nested up to 200 levels deep. *

        * This can sometimes be easier than using a JSONObject to build a string. + * * @author JSON.org * @version 2016-08-08 */ -public class JSONWriter { - private static final int maxdepth = 200; +public class JSONWriter +{ + private static final int maxdepth = 200; - /** - * The comma flag determines if a comma should be output before the next - * value. - */ - private boolean comma; + /** + * The comma flag determines if a comma should be output before the next + * value. + */ + private boolean comma; - /** - * The current mode. Values: - * 'a' (array), - * 'd' (done), - * 'i' (initial), - * 'k' (key), - * 'o' (object). - */ - protected char mode; + /** + * The current mode. Values: 'a' (array), 'd' (done), 'i' (initial), 'k' + * (key), 'o' (object). + */ + protected char mode; - /** - * The object/array stack. - */ - private final JSONObject stack[]; + /** + * The object/array stack. + */ + private final JSONObject stack[]; - /** - * The stack top index. A value of 0 indicates that the stack is empty. - */ - private int top; + /** + * The stack top index. A value of 0 indicates that the stack is empty. + */ + private int top; - /** - * The writer that will receive the output. - */ - protected Appendable writer; + /** + * The writer that will receive the output. + */ + protected Appendable writer; - /** - * Make a fresh JSONWriter. It can be used to build one JSON text. - */ - public JSONWriter(Appendable w) { - this.comma = false; - this.mode = 'i'; - this.stack = new JSONObject[maxdepth]; - this.top = 0; - this.writer = w; - } + /** + * Make a fresh JSONWriter. It can be used to build one JSON text. + */ + public JSONWriter(Appendable w) + { + this.comma = false; + this.mode = 'i'; + this.stack = new JSONObject[maxdepth]; + this.top = 0; + this.writer = w; + } - /** - * Append a value. - * @param string A string value. - * @return this - * @throws JSONException If the value is out of sequence. - */ - private JSONWriter append(String string) throws JSONException { - if (string == null) { - throw new JSONException("Null pointer"); - } - if (this.mode == 'o' || this.mode == 'a') { - try { - if (this.comma && this.mode == 'a') { - this.writer.append(','); - } - this.writer.append(string); - } catch (IOException e) { - // Android as of API 25 does not support this exception constructor - // however we won't worry about it. If an exception is happening here - // it will just throw a "Method not found" exception instead. - throw new JSONException(e); - } - if (this.mode == 'o') { - this.mode = 'k'; - } - this.comma = true; - return this; - } - throw new JSONException("Value out of sequence."); + /** + * Append a value. + * + * @param string + * A string value. + * @return this + * @throws JSONException + * If the value is out of sequence. + */ + private JSONWriter append(String string) throws JSONException + { + if (string == null) + { + throw new JSONException("Null pointer"); } - - /** - * Begin appending a new array. All values until the balancing - * endArray will be appended to this array. The - * endArray method must be called to mark the array's end. - * @return this - * @throws JSONException If the nesting is too deep, or if the object is - * started in the wrong place (for example as a key or after the end of the - * outermost array or object). - */ - public JSONWriter array() throws JSONException { - if (this.mode == 'i' || this.mode == 'o' || this.mode == 'a') { - this.push(null); - this.append("["); - this.comma = false; - return this; + if (this.mode == 'o' || this.mode == 'a') + { + try + { + if (this.comma && this.mode == 'a') + { + this.writer.append(','); } - throw new JSONException("Misplaced array."); + this.writer.append(string); + } catch (IOException e) + { + // Android as of API 25 does not support this exception constructor + // however we won't worry about it. If an exception is happening here + // it will just throw a "Method not found" exception instead. + throw new JSONException(e); + } + if (this.mode == 'o') + { + this.mode = 'k'; + } + this.comma = true; + return this; } + throw new JSONException("Value out of sequence."); + } - /** - * End something. - * @param m Mode - * @param c Closing character - * @return this - * @throws JSONException If unbalanced. - */ - private JSONWriter end(char m, char c) throws JSONException { - if (this.mode != m) { - throw new JSONException(m == 'a' - ? "Misplaced endArray." - : "Misplaced endObject."); - } - this.pop(m); - try { - this.writer.append(c); - } catch (IOException e) { - // Android as of API 25 does not support this exception constructor - // however we won't worry about it. If an exception is happening here - // it will just throw a "Method not found" exception instead. - throw new JSONException(e); - } - this.comma = true; - return this; + /** + * Begin appending a new array. All values until the balancing + * endArray will be appended to this array. The + * endArray method must be called to mark the array's end. + * + * @return this + * @throws JSONException + * If the nesting is too deep, or if the object is started in the + * wrong place (for example as a key or after the end of the + * outermost array or object). + */ + public JSONWriter array() throws JSONException + { + if (this.mode == 'i' || this.mode == 'o' || this.mode == 'a') + { + this.push(null); + this.append("["); + this.comma = false; + return this; } + throw new JSONException("Misplaced array."); + } - /** - * End an array. This method most be called to balance calls to - * array. - * @return this - * @throws JSONException If incorrectly nested. - */ - public JSONWriter endArray() throws JSONException { - return this.end('a', ']'); + /** + * End something. + * + * @param m + * Mode + * @param c + * Closing character + * @return this + * @throws JSONException + * If unbalanced. + */ + private JSONWriter end(char m, char c) throws JSONException + { + if (this.mode != m) + { + throw new JSONException( + m == 'a' ? "Misplaced endArray." : "Misplaced endObject."); } - - /** - * End an object. This method most be called to balance calls to - * object. - * @return this - * @throws JSONException If incorrectly nested. - */ - public JSONWriter endObject() throws JSONException { - return this.end('k', '}'); + this.pop(m); + try + { + this.writer.append(c); + } catch (IOException e) + { + // Android as of API 25 does not support this exception constructor + // however we won't worry about it. If an exception is happening here + // it will just throw a "Method not found" exception instead. + throw new JSONException(e); } + this.comma = true; + return this; + } - /** - * Append a key. The key will be associated with the next value. In an - * object, every value must be preceded by a key. - * @param string A key string. - * @return this - * @throws JSONException If the key is out of place. For example, keys - * do not belong in arrays or if the key is null. - */ - public JSONWriter key(String string) throws JSONException { - if (string == null) { - throw new JSONException("Null key."); - } - if (this.mode == 'k') { - try { - JSONObject topObject = this.stack[this.top - 1]; - // don't use the built in putOnce method to maintain Android support - if(topObject.has(string)) { - throw new JSONException("Duplicate key \"" + string + "\""); - } - topObject.put(string, true); - if (this.comma) { - this.writer.append(','); - } - this.writer.append(JSONObject.quote(string)); - this.writer.append(':'); - this.comma = false; - this.mode = 'o'; - return this; - } catch (IOException e) { - // Android as of API 25 does not support this exception constructor - // however we won't worry about it. If an exception is happening here - // it will just throw a "Method not found" exception instead. - throw new JSONException(e); - } - } - throw new JSONException("Misplaced key."); - } + /** + * End an array. This method most be called to balance calls to + * array. + * + * @return this + * @throws JSONException + * If incorrectly nested. + */ + public JSONWriter endArray() throws JSONException + { + return this.end('a', ']'); + } + /** + * End an object. This method most be called to balance calls to + * object. + * + * @return this + * @throws JSONException + * If incorrectly nested. + */ + public JSONWriter endObject() throws JSONException + { + return this.end('k', '}'); + } - /** - * Begin appending a new object. All keys and values until the balancing - * endObject will be appended to this object. The - * endObject method must be called to mark the object's end. - * @return this - * @throws JSONException If the nesting is too deep, or if the object is - * started in the wrong place (for example as a key or after the end of the - * outermost array or object). - */ - public JSONWriter object() throws JSONException { - if (this.mode == 'i') { - this.mode = 'o'; + /** + * Append a key. The key will be associated with the next value. In an object, + * every value must be preceded by a key. + * + * @param string + * A key string. + * @return this + * @throws JSONException + * If the key is out of place. For example, keys do not belong in + * arrays or if the key is null. + */ + public JSONWriter key(String string) throws JSONException + { + if (string == null) + { + throw new JSONException("Null key."); + } + if (this.mode == 'k') + { + try + { + JSONObject topObject = this.stack[this.top - 1]; + // don't use the built in putOnce method to maintain Android support + if (topObject.has(string)) + { + throw new JSONException("Duplicate key \"" + string + "\""); } - if (this.mode == 'o' || this.mode == 'a') { - this.append("{"); - this.push(new JSONObject()); - this.comma = false; - return this; + topObject.put(string, true); + if (this.comma) + { + this.writer.append(','); } - throw new JSONException("Misplaced object."); + this.writer.append(JSONObject.quote(string)); + this.writer.append(':'); + this.comma = false; + this.mode = 'o'; + return this; + } catch (IOException e) + { + // Android as of API 25 does not support this exception constructor + // however we won't worry about it. If an exception is happening here + // it will just throw a "Method not found" exception instead. + throw new JSONException(e); + } + } + throw new JSONException("Misplaced key."); + } + /** + * Begin appending a new object. All keys and values until the balancing + * endObject will be appended to this object. The + * endObject method must be called to mark the object's end. + * + * @return this + * @throws JSONException + * If the nesting is too deep, or if the object is started in the + * wrong place (for example as a key or after the end of the + * outermost array or object). + */ + public JSONWriter object() throws JSONException + { + if (this.mode == 'i') + { + this.mode = 'o'; + } + if (this.mode == 'o' || this.mode == 'a') + { + this.append("{"); + this.push(new JSONObject()); + this.comma = false; + return this; } + throw new JSONException("Misplaced object."); + } - /** - * Pop an array or object scope. - * @param c The scope to close. - * @throws JSONException If nesting is wrong. - */ - private void pop(char c) throws JSONException { - if (this.top <= 0) { - throw new JSONException("Nesting error."); - } - char m = this.stack[this.top - 1] == null ? 'a' : 'k'; - if (m != c) { - throw new JSONException("Nesting error."); - } - this.top -= 1; - this.mode = this.top == 0 - ? 'd' - : this.stack[this.top - 1] == null - ? 'a' - : 'k'; + /** + * Pop an array or object scope. + * + * @param c + * The scope to close. + * @throws JSONException + * If nesting is wrong. + */ + private void pop(char c) throws JSONException + { + if (this.top <= 0) + { + throw new JSONException("Nesting error."); } - - /** - * Push an array or object scope. - * @param jo The scope to open. - * @throws JSONException If nesting is too deep. - */ - private void push(JSONObject jo) throws JSONException { - if (this.top >= maxdepth) { - throw new JSONException("Nesting too deep."); - } - this.stack[this.top] = jo; - this.mode = jo == null ? 'a' : 'k'; - this.top += 1; + char m = this.stack[this.top - 1] == null ? 'a' : 'k'; + if (m != c) + { + throw new JSONException("Nesting error."); } + this.top -= 1; + this.mode = this.top == 0 ? 'd' + : this.stack[this.top - 1] == null ? 'a' : 'k'; + } - /** - * Make a JSON text of an Object value. If the object has an - * value.toJSONString() method, then that method will be used to produce the - * JSON text. The method is required to produce a strictly conforming text. - * If the object does not contain a toJSONString method (which is the most - * common case), then a text will be produced by other means. If the value - * is an array or Collection, then a JSONArray will be made from it and its - * toJSONString method will be called. If the value is a MAP, then a - * JSONObject will be made from it and its toJSONString method will be - * called. Otherwise, the value's toString method will be called, and the - * result will be quoted. - * - *

        - * Warning: This method assumes that the data structure is acyclical. - * - * @param value - * The value to be serialized. - * @return a printable, displayable, transmittable representation of the - * object, beginning with { (left - * brace) and ending with } (right - * brace). - * @throws JSONException - * If the value is or contains an invalid number. - */ - public static String valueToString(Object value) throws JSONException { - if (value == null || value.equals(null)) { - return "null"; - } - if (value instanceof JSONString) { - Object object; - try { - object = ((JSONString) value).toJSONString(); - } catch (Exception e) { - throw new JSONException(e); - } - if (object instanceof String) { - return (String) object; - } - throw new JSONException("Bad value from toJSONString: " + object); - } - if (value instanceof Number) { - // not all Numbers may match actual JSON Numbers. i.e. Fractions or Complex - final String numberAsString = JSONObject.numberToString((Number) value); - try { - // Use the BigDecimal constructor for it's parser to validate the format. - @SuppressWarnings("unused") - BigDecimal unused = new BigDecimal(numberAsString); - // Close enough to a JSON number that we will return it unquoted - return numberAsString; - } catch (NumberFormatException ex){ - // The Number value is not a valid JSON number. - // Instead we will quote it as a string - return JSONObject.quote(numberAsString); - } - } - if (value instanceof Boolean || value instanceof JSONObject - || value instanceof JSONArray) { - return value.toString(); - } - if (value instanceof Map) { - Map map = (Map) value; - return new JSONObject(map).toString(); - } - if (value instanceof Collection) { - Collection coll = (Collection) value; - return new JSONArray(coll).toString(); - } - if (value.getClass().isArray()) { - return new JSONArray(value).toString(); - } - if(value instanceof Enum){ - return JSONObject.quote(((Enum)value).name()); - } - return JSONObject.quote(value.toString()); + /** + * Push an array or object scope. + * + * @param jo + * The scope to open. + * @throws JSONException + * If nesting is too deep. + */ + private void push(JSONObject jo) throws JSONException + { + if (this.top >= maxdepth) + { + throw new JSONException("Nesting too deep."); } + this.stack[this.top] = jo; + this.mode = jo == null ? 'a' : 'k'; + this.top += 1; + } - /** - * Append either the value true or the value - * false. - * @param b A boolean. - * @return this - * @throws JSONException - */ - public JSONWriter value(boolean b) throws JSONException { - return this.append(b ? "true" : "false"); + /** + * Make a JSON text of an Object value. If the object has an + * value.toJSONString() method, then that method will be used to produce the + * JSON text. The method is required to produce a strictly conforming text. If + * the object does not contain a toJSONString method (which is the most common + * case), then a text will be produced by other means. If the value is an + * array or Collection, then a JSONArray will be made from it and its + * toJSONString method will be called. If the value is a MAP, then a + * JSONObject will be made from it and its toJSONString method will be called. + * Otherwise, the value's toString method will be called, and the result will + * be quoted. + * + *

        + * Warning: This method assumes that the data structure is acyclical. + * + * @param value + * The value to be serialized. + * @return a printable, displayable, transmittable representation of the + * object, beginning with { (left + * brace) and ending with } (right + * brace). + * @throws JSONException + * If the value is or contains an invalid number. + */ + public static String valueToString(Object value) throws JSONException + { + if (value == null || value.equals(null)) + { + return "null"; } - - /** - * Append a double value. - * @param d A double. - * @return this - * @throws JSONException If the number is not finite. - */ - public JSONWriter value(double d) throws JSONException { - return this.value(Double.valueOf(d)); + if (value instanceof JSONString) + { + Object object; + try + { + object = ((JSONString) value).toJSONString(); + } catch (Exception e) + { + throw new JSONException(e); + } + if (object instanceof String) + { + return (String) object; + } + throw new JSONException("Bad value from toJSONString: " + object); } - - /** - * Append a long value. - * @param l A long. - * @return this - * @throws JSONException - */ - public JSONWriter value(long l) throws JSONException { - return this.append(Long.toString(l)); + if (value instanceof Number) + { + // not all Numbers may match actual JSON Numbers. i.e. Fractions or + // Complex + final String numberAsString = JSONObject + .numberToString((Number) value); + try + { + // Use the BigDecimal constructor for it's parser to validate the + // format. + @SuppressWarnings("unused") + BigDecimal unused = new BigDecimal(numberAsString); + // Close enough to a JSON number that we will return it unquoted + return numberAsString; + } catch (NumberFormatException ex) + { + // The Number value is not a valid JSON number. + // Instead we will quote it as a string + return JSONObject.quote(numberAsString); + } + } + if (value instanceof Boolean || value instanceof JSONObject + || value instanceof JSONArray) + { + return value.toString(); + } + if (value instanceof Map) + { + Map map = (Map) value; + return new JSONObject(map).toString(); + } + if (value instanceof Collection) + { + Collection coll = (Collection) value; + return new JSONArray(coll).toString(); + } + if (value.getClass().isArray()) + { + return new JSONArray(value).toString(); } + if (value instanceof Enum) + { + return JSONObject.quote(((Enum) value).name()); + } + return JSONObject.quote(value.toString()); + } + /** + * Append either the value true or the value false. + * + * @param b + * A boolean. + * @return this + * @throws JSONException + */ + public JSONWriter value(boolean b) throws JSONException + { + return this.append(b ? "true" : "false"); + } - /** - * Append an object value. - * @param object The object to append. It can be null, or a Boolean, Number, - * String, JSONObject, or JSONArray, or an object that implements JSONString. - * @return this - * @throws JSONException If the value is out of sequence. - */ - public JSONWriter value(Object object) throws JSONException { - return this.append(valueToString(object)); - } + /** + * Append a double value. + * + * @param d + * A double. + * @return this + * @throws JSONException + * If the number is not finite. + */ + public JSONWriter value(double d) throws JSONException + { + return this.value(Double.valueOf(d)); + } + + /** + * Append a long value. + * + * @param l + * A long. + * @return this + * @throws JSONException + */ + public JSONWriter value(long l) throws JSONException + { + return this.append(Long.toString(l)); + } + + /** + * Append an object value. + * + * @param object + * The object to append. It can be null, or a Boolean, Number, + * String, JSONObject, or JSONArray, or an object that implements + * JSONString. + * @return this + * @throws JSONException + * If the value is out of sequence. + */ + public JSONWriter value(Object object) throws JSONException + { + return this.append(valueToString(object)); + } } diff --git a/src/org/json/Property.java b/src/org/json/Property.java index ff33a04..b21fb1f 100644 --- a/src/org/json/Property.java +++ b/src/org/json/Property.java @@ -29,47 +29,63 @@ import java.util.Properties; /** * Converts a Property file data into JSONObject and back. + * * @author JSON.org * @version 2015-05-05 */ -public class Property { - /** - * Converts a property file object into a JSONObject. The property file object is a table of name value pairs. - * @param properties java.util.Properties - * @return JSONObject - * @throws JSONException - */ - public static JSONObject toJSONObject(java.util.Properties properties) throws JSONException { - // can't use the new constructor for Android support - // JSONObject jo = new JSONObject(properties == null ? 0 : properties.size()); - JSONObject jo = new JSONObject(); - if (properties != null && !properties.isEmpty()) { - Enumeration enumProperties = properties.propertyNames(); - while(enumProperties.hasMoreElements()) { - String name = (String)enumProperties.nextElement(); - jo.put(name, properties.getProperty(name)); - } - } - return jo; +public class Property +{ + /** + * Converts a property file object into a JSONObject. The property file object + * is a table of name value pairs. + * + * @param properties + * java.util.Properties + * @return JSONObject + * @throws JSONException + */ + public static JSONObject toJSONObject(java.util.Properties properties) + throws JSONException + { + // can't use the new constructor for Android support + // JSONObject jo = new JSONObject(properties == null ? 0 : + // properties.size()); + JSONObject jo = new JSONObject(); + if (properties != null && !properties.isEmpty()) + { + Enumeration enumProperties = properties.propertyNames(); + while (enumProperties.hasMoreElements()) + { + String name = (String) enumProperties.nextElement(); + jo.put(name, properties.getProperty(name)); + } } + return jo; + } - /** - * Converts the JSONObject into a property file object. - * @param jo JSONObject - * @return java.util.Properties - * @throws JSONException - */ - public static Properties toProperties(JSONObject jo) throws JSONException { - Properties properties = new Properties(); - if (jo != null) { - // Don't use the new entrySet API to maintain Android support - for (final String key : jo.keySet()) { - Object value = jo.opt(key); - if (!JSONObject.NULL.equals(value)) { - properties.put(key, value.toString()); - } - } + /** + * Converts the JSONObject into a property file object. + * + * @param jo + * JSONObject + * @return java.util.Properties + * @throws JSONException + */ + public static Properties toProperties(JSONObject jo) throws JSONException + { + Properties properties = new Properties(); + if (jo != null) + { + // Don't use the new entrySet API to maintain Android support + for (final String key : jo.keySet()) + { + Object value = jo.opt(key); + if (!JSONObject.NULL.equals(value)) + { + properties.put(key, value.toString()); } - return properties; + } } + return properties; + } } diff --git a/src/org/json/XML.java b/src/org/json/XML.java index 55362b2..9e5b917 100644 --- a/src/org/json/XML.java +++ b/src/org/json/XML.java @@ -36,648 +36,787 @@ import java.util.Iterator; * @version 2016-08-10 */ @SuppressWarnings("boxing") -public class XML { - /** The Character '&'. */ - public static final Character AMP = '&'; - - /** The Character '''. */ - public static final Character APOS = '\''; - - /** The Character '!'. */ - public static final Character BANG = '!'; - - /** The Character '='. */ - public static final Character EQ = '='; - - /** The Character '>'. */ - public static final Character GT = '>'; - - /** The Character '<'. */ - public static final Character LT = '<'; - - /** The Character '?'. */ - public static final Character QUEST = '?'; - - /** The Character '"'. */ - public static final Character QUOT = '"'; - - /** The Character '/'. */ - public static final Character SLASH = '/'; - - /** - * Creates an iterator for navigating Code Points in a string instead of - * characters. Once Java7 support is dropped, this can be replaced with - * - * string.codePoints() - * - * which is available in Java8 and above. - * - * @see http://stackoverflow.com/a/21791059/6030888 - */ - private static Iterable codePointIterator(final String string) { - return new Iterable() { - @Override - public Iterator iterator() { - return new Iterator() { - private int nextIndex = 0; - private int length = string.length(); - - @Override - public boolean hasNext() { - return this.nextIndex < this.length; - } - - @Override - public Integer next() { - int result = string.codePointAt(this.nextIndex); - this.nextIndex += Character.charCount(result); - return result; - } - - @Override - public void remove() { - throw new UnsupportedOperationException(); - } - }; - } +public class XML +{ + /** The Character '&'. */ + public static final Character AMP = '&'; + + /** The Character '''. */ + public static final Character APOS = '\''; + + /** The Character '!'. */ + public static final Character BANG = '!'; + + /** The Character '='. */ + public static final Character EQ = '='; + + /** The Character '>'. */ + public static final Character GT = '>'; + + /** The Character '<'. */ + public static final Character LT = '<'; + + /** The Character '?'. */ + public static final Character QUEST = '?'; + + /** The Character '"'. */ + public static final Character QUOT = '"'; + + /** The Character '/'. */ + public static final Character SLASH = '/'; + + /** + * Creates an iterator for navigating Code Points in a string instead of + * characters. Once Java7 support is dropped, this can be replaced with + * string.codePoints() + * which is available in Java8 and above. + * + * @see http://stackoverflow.com/a/21791059/6030888 + */ + private static Iterable codePointIterator(final String string) + { + return new Iterable() + { + @Override + public Iterator iterator() + { + return new Iterator() + { + private int nextIndex = 0; + + private int length = string.length(); + + @Override + public boolean hasNext() + { + return this.nextIndex < this.length; + } + + @Override + public Integer next() + { + int result = string.codePointAt(this.nextIndex); + this.nextIndex += Character.charCount(result); + return result; + } + + @Override + public void remove() + { + throw new UnsupportedOperationException(); + } }; + } + }; + } + + /** + * Replace special characters with XML escapes: + * + *

        +   * & (ampersand) is replaced by &amp;
        +   * < (less than) is replaced by &lt;
        +   * > (greater than) is replaced by &gt;
        +   * " (double quote) is replaced by &quot;
        +   * ' (single quote / apostrophe) is replaced by &apos;
        +   * 
        + * + * @param string + * The string to be escaped. + * @return The escaped string. + */ + public static String escape(String string) + { + StringBuilder sb = new StringBuilder(string.length()); + for (final int cp : codePointIterator(string)) + { + switch (cp) + { + case '&': + sb.append("&"); + break; + case '<': + sb.append("<"); + break; + case '>': + sb.append(">"); + break; + case '"': + sb.append("""); + break; + case '\'': + sb.append("'"); + break; + default: + if (mustEscape(cp)) + { + sb.append("&#x"); + sb.append(Integer.toHexString(cp)); + sb.append(';'); + } + else + { + sb.appendCodePoint(cp); + } + } } - - /** - * Replace special characters with XML escapes: + return sb.toString(); + } + + /** + * @param cp + * code point to test + * @return true if the code point is not valid for an XML + */ + private static boolean mustEscape(int cp) + { + /* Valid range from https://www.w3.org/TR/REC-xml/#charsets * - *
        -     * & (ampersand) is replaced by &amp;
        -     * < (less than) is replaced by &lt;
        -     * > (greater than) is replaced by &gt;
        -     * " (double quote) is replaced by &quot;
        -     * ' (single quote / apostrophe) is replaced by &apos;
        -     * 
        + * #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] * - * @param string - * The string to be escaped. - * @return The escaped string. + * any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. */ - public static String escape(String string) { - StringBuilder sb = new StringBuilder(string.length()); - for (final int cp : codePointIterator(string)) { - switch (cp) { - case '&': - sb.append("&"); - break; - case '<': - sb.append("<"); - break; - case '>': - sb.append(">"); - break; - case '"': - sb.append("""); - break; - case '\'': - sb.append("'"); - break; - default: - if (mustEscape(cp)) { - sb.append("&#x"); - sb.append(Integer.toHexString(cp)); - sb.append(';'); - } else { - sb.appendCodePoint(cp); - } - } + // isISOControl is true when (cp >= 0 && cp <= 0x1F) || (cp >= 0x7F && cp <= + // 0x9F) + // all ISO control characters are out of range except tabs and new lines + return (Character.isISOControl(cp) && cp != 0x9 && cp != 0xA + && cp != 0xD) || !( + // valid the range of acceptable characters that aren't control + (cp >= 0x20 && cp <= 0xD7FF) || (cp >= 0xE000 && cp <= 0xFFFD) + || (cp >= 0x10000 && cp <= 0x10FFFF)); + } + + /** + * Removes XML escapes from the string. + * + * @param string + * string to remove escapes from + * @return string with converted entities + */ + public static String unescape(String string) + { + StringBuilder sb = new StringBuilder(string.length()); + for (int i = 0, length = string.length(); i < length; i++) + { + char c = string.charAt(i); + if (c == '&') + { + final int semic = string.indexOf(';', i); + if (semic > i) + { + final String entity = string.substring(i + 1, semic); + sb.append(XMLTokener.unescapeEntity(entity)); + // skip past the entity we just parsed. + i += entity.length() + 1; } - return sb.toString(); + else + { + // this shouldn't happen in most cases since the parser + // errors on unclosed entries. + sb.append(c); + } + } + else + { + // not part of an entity + sb.append(c); + } } - - /** - * @param cp code point to test - * @return true if the code point is not valid for an XML - */ - private static boolean mustEscape(int cp) { - /* Valid range from https://www.w3.org/TR/REC-xml/#charsets - * - * #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] - * - * any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. - */ - // isISOControl is true when (cp >= 0 && cp <= 0x1F) || (cp >= 0x7F && cp <= 0x9F) - // all ISO control characters are out of range except tabs and new lines - return (Character.isISOControl(cp) - && cp != 0x9 - && cp != 0xA - && cp != 0xD - ) || !( - // valid the range of acceptable characters that aren't control - (cp >= 0x20 && cp <= 0xD7FF) - || (cp >= 0xE000 && cp <= 0xFFFD) - || (cp >= 0x10000 && cp <= 0x10FFFF) - ) - ; + return sb.toString(); + } + + /** + * Throw an exception if the string contains whitespace. Whitespace is not + * allowed in tagNames and attributes. + * + * @param string + * A string. + * @throws JSONException + * Thrown if the string contains whitespace or is empty. + */ + public static void noSpace(String string) throws JSONException + { + int i, length = string.length(); + if (length == 0) + { + throw new JSONException("Empty string."); } - - /** - * Removes XML escapes from the string. - * - * @param string - * string to remove escapes from - * @return string with converted entities - */ - public static String unescape(String string) { - StringBuilder sb = new StringBuilder(string.length()); - for (int i = 0, length = string.length(); i < length; i++) { - char c = string.charAt(i); - if (c == '&') { - final int semic = string.indexOf(';', i); - if (semic > i) { - final String entity = string.substring(i + 1, semic); - sb.append(XMLTokener.unescapeEntity(entity)); - // skip past the entity we just parsed. - i += entity.length() + 1; - } else { - // this shouldn't happen in most cases since the parser - // errors on unclosed entries. - sb.append(c); - } - } else { - // not part of an entity - sb.append(c); - } - } - return sb.toString(); + for (i = 0; i < length; i += 1) + { + if (Character.isWhitespace(string.charAt(i))) + { + throw new JSONException( + "'" + string + "' contains a space character."); + } } - - /** - * Throw an exception if the string contains whitespace. Whitespace is not - * allowed in tagNames and attributes. - * - * @param string - * A string. - * @throws JSONException Thrown if the string contains whitespace or is empty. - */ - public static void noSpace(String string) throws JSONException { - int i, length = string.length(); - if (length == 0) { - throw new JSONException("Empty string."); + } + + /** + * Scan the content following the named tag, attaching it to the context. + * + * @param x + * The XMLTokener containing the source string. + * @param context + * The JSONObject that will include the new material. + * @param name + * The tag name. + * @return true if the close tag is processed. + * @throws JSONException + */ + private static boolean parse(XMLTokener x, JSONObject context, + String name, boolean keepStrings) throws JSONException + { + char c; + int i; + JSONObject jsonobject = null; + String string; + String tagName; + Object token; + + // Test for and skip past these forms: + // + // + // + // + // Report errors for these forms: + // <> + // <= + // << + + token = x.nextToken(); + + // "); + return false; } - for (i = 0; i < length; i += 1) { - if (Character.isWhitespace(string.charAt(i))) { - throw new JSONException("'" + string - + "' contains a space character."); + x.back(); + } + else if (c == '[') + { + token = x.nextToken(); + if ("CDATA".equals(token)) + { + if (x.next() == '[') + { + string = x.nextCDATA(); + if (string.length() > 0) + { + context.accumulate("content", string); } + return false; + } + } + throw x.syntaxError("Expected 'CDATA['"); + } + i = 1; + do + { + token = x.nextMeta(); + if (token == null) + { + throw x.syntaxError("Missing '>' after ' 0); + return false; } + else if (token == QUEST) + { - /** - * Scan the content following the named tag, attaching it to the context. - * - * @param x - * The XMLTokener containing the source string. - * @param context - * The JSONObject that will include the new material. - * @param name - * The tag name. - * @return true if the close tag is processed. - * @throws JSONException - */ - private static boolean parse(XMLTokener x, JSONObject context, String name, boolean keepStrings) - throws JSONException { - char c; - int i; - JSONObject jsonobject = null; - String string; - String tagName; - Object token; - - // Test for and skip past these forms: - // - // - // - // - // Report errors for these forms: - // <> - // <= - // << - - token = x.nextToken(); - - // "); - return false; - } - x.back(); - } else if (c == '[') { - token = x.nextToken(); - if ("CDATA".equals(token)) { - if (x.next() == '[') { - string = x.nextCDATA(); - if (string.length() > 0) { - context.accumulate("content", string); - } - return false; - } - } - throw x.syntaxError("Expected 'CDATA['"); - } - i = 1; - do { - token = x.nextMeta(); - if (token == null) { - throw x.syntaxError("Missing '>' after ' 0); - return false; - } else if (token == QUEST) { + // "); + return false; + } + else if (token == SLASH) + { + + // Close tag "); - return false; - } else if (token == SLASH) { + } + else if (token instanceof Character) + { + throw x.syntaxError("Misshaped tag"); - // Close tag + if (x.nextToken() != GT) + { throw x.syntaxError("Misshaped tag"); + } + if (jsonobject.length() > 0) + { + context.accumulate(tagName, jsonobject); + } + else + { + context.accumulate(tagName, ""); + } + return false; - // Open tag < + } + else if (token == GT) + { + // Content, between <...> and + for (;;) + { + token = x.nextContent(); + if (token == null) + { + if (tagName != null) + { + throw x.syntaxError("Unclosed tag " + tagName); + } + return false; + } + else if (token instanceof String) + { + string = (String) token; + if (string.length() > 0) + { + jsonobject.accumulate("content", + keepStrings ? string : stringToValue(string)); + } - } else { - tagName = (String) token; - token = null; - jsonobject = new JSONObject(); - for (;;) { - if (token == null) { - token = x.nextToken(); + } + else if (token == LT) + { + // Nested element + if (parse(x, jsonobject, tagName, keepStrings)) + { + if (jsonobject.length() == 0) + { + context.accumulate(tagName, ""); } - // attribute = value - if (token instanceof String) { - string = (String) token; - token = x.nextToken(); - if (token == EQ) { - token = x.nextToken(); - if (!(token instanceof String)) { - throw x.syntaxError("Missing value"); - } - jsonobject.accumulate(string, - keepStrings ? ((String)token) : stringToValue((String) token)); - token = null; - } else { - jsonobject.accumulate(string, ""); - } - - - } else if (token == SLASH) { - // Empty tag <.../> - if (x.nextToken() != GT) { - throw x.syntaxError("Misshaped tag"); - } - if (jsonobject.length() > 0) { - context.accumulate(tagName, jsonobject); - } else { - context.accumulate(tagName, ""); - } - return false; - - } else if (token == GT) { - // Content, between <...> and - for (;;) { - token = x.nextContent(); - if (token == null) { - if (tagName != null) { - throw x.syntaxError("Unclosed tag " + tagName); - } - return false; - } else if (token instanceof String) { - string = (String) token; - if (string.length() > 0) { - jsonobject.accumulate("content", - keepStrings ? string : stringToValue(string)); - } - - } else if (token == LT) { - // Nested element - if (parse(x, jsonobject, tagName,keepStrings)) { - if (jsonobject.length() == 0) { - context.accumulate(tagName, ""); - } else if (jsonobject.length() == 1 - && jsonobject.opt("content") != null) { - context.accumulate(tagName, - jsonobject.opt("content")); - } else { - context.accumulate(tagName, jsonobject); - } - return false; - } - } - } - } else { - throw x.syntaxError("Misshaped tag"); + else if (jsonobject.length() == 1 + && jsonobject.opt("content") != null) + { + context.accumulate(tagName, jsonobject.opt("content")); } - } - } - } - - /** - * This method is the same as {@link JSONObject#stringToValue(String)}. - * - * @param string String to convert - * @return JSON value of this string or the string - */ - // To maintain compatibility with the Android API, this method is a direct copy of - // the one in JSONObject. Changes made here should be reflected there. - public static Object stringToValue(String string) { - if (string.equals("")) { - return string; - } - if (string.equalsIgnoreCase("true")) { - return Boolean.TRUE; - } - if (string.equalsIgnoreCase("false")) { - return Boolean.FALSE; - } - if (string.equalsIgnoreCase("null")) { - return JSONObject.NULL; - } - - /* - * If it might be a number, try converting it. If a number cannot be - * produced, then the value will just be a string. - */ - - char initial = string.charAt(0); - if ((initial >= '0' && initial <= '9') || initial == '-') { - try { - // if we want full Big Number support this block can be replaced with: - // return stringToNumber(string); - if (string.indexOf('.') > -1 || string.indexOf('e') > -1 - || string.indexOf('E') > -1 || "-0".equals(string)) { - Double d = Double.valueOf(string); - if (!d.isInfinite() && !d.isNaN()) { - return d; - } - } else { - Long myLong = Long.valueOf(string); - if (string.equals(myLong.toString())) { - if (myLong.longValue() == myLong.intValue()) { - return Integer.valueOf(myLong.intValue()); - } - return myLong; - } + else + { + context.accumulate(tagName, jsonobject); } - } catch (Exception ignore) { + return false; + } } + } } - return string; + else + { + throw x.syntaxError("Misshaped tag"); + } + } } - - /** - * Convert a well-formed (but not necessarily valid) XML string into a - * JSONObject. Some information may be lost in this transformation because - * JSON is a data format and XML is a document format. XML uses elements, - * attributes, and content text, while JSON uses unordered collections of - * name/value pairs and arrays of values. JSON does not does not like to - * distinguish between elements and attributes. Sequences of similar - * elements are represented as JSONArrays. Content text may be placed in a - * "content" member. Comments, prologs, DTDs, and <[ [ ]]> - * are ignored. - * - * @param string - * The source string. - * @return A JSONObject containing the structured data from the XML string. - * @throws JSONException Thrown if there is an errors while parsing the string - */ - public static JSONObject toJSONObject(String string) throws JSONException { - return toJSONObject(string, false); + } + + /** + * This method is the same as {@link JSONObject#stringToValue(String)}. + * + * @param string + * String to convert + * @return JSON value of this string or the string + */ + // To maintain compatibility with the Android API, this method is a direct + // copy of + // the one in JSONObject. Changes made here should be reflected there. + public static Object stringToValue(String string) + { + if (string.equals("")) + { + return string; } - - /** - * Convert a well-formed (but not necessarily valid) XML into a - * JSONObject. Some information may be lost in this transformation because - * JSON is a data format and XML is a document format. XML uses elements, - * attributes, and content text, while JSON uses unordered collections of - * name/value pairs and arrays of values. JSON does not does not like to - * distinguish between elements and attributes. Sequences of similar - * elements are represented as JSONArrays. Content text may be placed in a - * "content" member. Comments, prologs, DTDs, and <[ [ ]]> - * are ignored. - * - * @param reader The XML source reader. - * @return A JSONObject containing the structured data from the XML string. - * @throws JSONException Thrown if there is an errors while parsing the string - */ - public static JSONObject toJSONObject(Reader reader) throws JSONException { - return toJSONObject(reader, false); + if (string.equalsIgnoreCase("true")) + { + return Boolean.TRUE; + } + if (string.equalsIgnoreCase("false")) + { + return Boolean.FALSE; + } + if (string.equalsIgnoreCase("null")) + { + return JSONObject.NULL; } - /** - * Convert a well-formed (but not necessarily valid) XML into a - * JSONObject. Some information may be lost in this transformation because - * JSON is a data format and XML is a document format. XML uses elements, - * attributes, and content text, while JSON uses unordered collections of - * name/value pairs and arrays of values. JSON does not does not like to - * distinguish between elements and attributes. Sequences of similar - * elements are represented as JSONArrays. Content text may be placed in a - * "content" member. Comments, prologs, DTDs, and <[ [ ]]> - * are ignored. - * - * All values are converted as strings, for 1, 01, 29.0 will not be coerced to - * numbers but will instead be the exact value as seen in the XML document. - * - * @param reader The XML source reader. - * @param keepStrings If true, then values will not be coerced into boolean - * or numeric values and will instead be left as strings - * @return A JSONObject containing the structured data from the XML string. - * @throws JSONException Thrown if there is an errors while parsing the string + /* + * If it might be a number, try converting it. If a number cannot be + * produced, then the value will just be a string. */ - public static JSONObject toJSONObject(Reader reader, boolean keepStrings) throws JSONException { - JSONObject jo = new JSONObject(); - XMLTokener x = new XMLTokener(reader); - while (x.more()) { - x.skipPast("<"); - if(x.more()) { - parse(x, jo, null, keepStrings); + + char initial = string.charAt(0); + if ((initial >= '0' && initial <= '9') || initial == '-') + { + try + { + // if we want full Big Number support this block can be replaced with: + // return stringToNumber(string); + if (string.indexOf('.') > -1 || string.indexOf('e') > -1 + || string.indexOf('E') > -1 || "-0".equals(string)) + { + Double d = Double.valueOf(string); + if (!d.isInfinite() && !d.isNaN()) + { + return d; + } + } + else + { + Long myLong = Long.valueOf(string); + if (string.equals(myLong.toString())) + { + if (myLong.longValue() == myLong.intValue()) + { + return Integer.valueOf(myLong.intValue()); } + return myLong; + } } - return jo; - } - - /** - * Convert a well-formed (but not necessarily valid) XML string into a - * JSONObject. Some information may be lost in this transformation because - * JSON is a data format and XML is a document format. XML uses elements, - * attributes, and content text, while JSON uses unordered collections of - * name/value pairs and arrays of values. JSON does not does not like to - * distinguish between elements and attributes. Sequences of similar - * elements are represented as JSONArrays. Content text may be placed in a - * "content" member. Comments, prologs, DTDs, and <[ [ ]]> - * are ignored. - * - * All values are converted as strings, for 1, 01, 29.0 will not be coerced to - * numbers but will instead be the exact value as seen in the XML document. - * - * @param string - * The source string. - * @param keepStrings If true, then values will not be coerced into boolean - * or numeric values and will instead be left as strings - * @return A JSONObject containing the structured data from the XML string. - * @throws JSONException Thrown if there is an errors while parsing the string - */ - public static JSONObject toJSONObject(String string, boolean keepStrings) throws JSONException { - return toJSONObject(new StringReader(string), keepStrings); + } catch (Exception ignore) + { + } } - - /** - * Convert a JSONObject into a well-formed, element-normal XML string. - * - * @param object - * A JSONObject. - * @return A string. - * @throws JSONException Thrown if there is an error parsing the string - */ - public static String toString(Object object) throws JSONException { - return toString(object, null); + return string; + } + + /** + * Convert a well-formed (but not necessarily valid) XML string into a + * JSONObject. Some information may be lost in this transformation because + * JSON is a data format and XML is a document format. XML uses elements, + * attributes, and content text, while JSON uses unordered collections of + * name/value pairs and arrays of values. JSON does not does not like to + * distinguish between elements and attributes. Sequences of similar elements + * are represented as JSONArrays. Content text may be placed in a "content" + * member. Comments, prologs, DTDs, and <[ [ ]]> are ignored. + * + * @param string + * The source string. + * @return A JSONObject containing the structured data from the XML string. + * @throws JSONException + * Thrown if there is an errors while parsing the string + */ + public static JSONObject toJSONObject(String string) throws JSONException + { + return toJSONObject(string, false); + } + + /** + * Convert a well-formed (but not necessarily valid) XML into a JSONObject. + * Some information may be lost in this transformation because JSON is a data + * format and XML is a document format. XML uses elements, attributes, and + * content text, while JSON uses unordered collections of name/value pairs and + * arrays of values. JSON does not does not like to distinguish between + * elements and attributes. Sequences of similar elements are represented as + * JSONArrays. Content text may be placed in a "content" member. Comments, + * prologs, DTDs, and <[ [ ]]> are ignored. + * + * @param reader + * The XML source reader. + * @return A JSONObject containing the structured data from the XML string. + * @throws JSONException + * Thrown if there is an errors while parsing the string + */ + public static JSONObject toJSONObject(Reader reader) throws JSONException + { + return toJSONObject(reader, false); + } + + /** + * Convert a well-formed (but not necessarily valid) XML into a JSONObject. + * Some information may be lost in this transformation because JSON is a data + * format and XML is a document format. XML uses elements, attributes, and + * content text, while JSON uses unordered collections of name/value pairs and + * arrays of values. JSON does not does not like to distinguish between + * elements and attributes. Sequences of similar elements are represented as + * JSONArrays. Content text may be placed in a "content" member. Comments, + * prologs, DTDs, and <[ [ ]]> are ignored. + * + * All values are converted as strings, for 1, 01, 29.0 will not be coerced to + * numbers but will instead be the exact value as seen in the XML document. + * + * @param reader + * The XML source reader. + * @param keepStrings + * If true, then values will not be coerced into boolean or numeric + * values and will instead be left as strings + * @return A JSONObject containing the structured data from the XML string. + * @throws JSONException + * Thrown if there is an errors while parsing the string + */ + public static JSONObject toJSONObject(Reader reader, boolean keepStrings) + throws JSONException + { + JSONObject jo = new JSONObject(); + XMLTokener x = new XMLTokener(reader); + while (x.more()) + { + x.skipPast("<"); + if (x.more()) + { + parse(x, jo, null, keepStrings); + } } + return jo; + } + + /** + * Convert a well-formed (but not necessarily valid) XML string into a + * JSONObject. Some information may be lost in this transformation because + * JSON is a data format and XML is a document format. XML uses elements, + * attributes, and content text, while JSON uses unordered collections of + * name/value pairs and arrays of values. JSON does not does not like to + * distinguish between elements and attributes. Sequences of similar elements + * are represented as JSONArrays. Content text may be placed in a "content" + * member. Comments, prologs, DTDs, and <[ [ ]]> are ignored. + * + * All values are converted as strings, for 1, 01, 29.0 will not be coerced to + * numbers but will instead be the exact value as seen in the XML document. + * + * @param string + * The source string. + * @param keepStrings + * If true, then values will not be coerced into boolean or numeric + * values and will instead be left as strings + * @return A JSONObject containing the structured data from the XML string. + * @throws JSONException + * Thrown if there is an errors while parsing the string + */ + public static JSONObject toJSONObject(String string, boolean keepStrings) + throws JSONException + { + return toJSONObject(new StringReader(string), keepStrings); + } + + /** + * Convert a JSONObject into a well-formed, element-normal XML string. + * + * @param object + * A JSONObject. + * @return A string. + * @throws JSONException + * Thrown if there is an error parsing the string + */ + public static String toString(Object object) throws JSONException + { + return toString(object, null); + } + + /** + * Convert a JSONObject into a well-formed, element-normal XML string. + * + * @param object + * A JSONObject. + * @param tagName + * The optional name of the enclosing tag. + * @return A string. + * @throws JSONException + * Thrown if there is an error parsing the string + */ + public static String toString(final Object object, final String tagName) + throws JSONException + { + StringBuilder sb = new StringBuilder(); + JSONArray ja; + JSONObject jo; + String string; + + if (object instanceof JSONObject) + { + + // Emit + if (tagName != null) + { + sb.append('<'); + sb.append(tagName); + sb.append('>'); + } + + // Loop thru the keys. + // don't use the new entrySet accessor to maintain Android Support + jo = (JSONObject) object; + for (final String key : jo.keySet()) + { + Object value = jo.opt(key); + if (value == null) + { + value = ""; + } + else if (value.getClass().isArray()) + { + value = new JSONArray(value); + } - /** - * Convert a JSONObject into a well-formed, element-normal XML string. - * - * @param object - * A JSONObject. - * @param tagName - * The optional name of the enclosing tag. - * @return A string. - * @throws JSONException Thrown if there is an error parsing the string - */ - public static String toString(final Object object, final String tagName) - throws JSONException { - StringBuilder sb = new StringBuilder(); - JSONArray ja; - JSONObject jo; - String string; - - if (object instanceof JSONObject) { - - // Emit - if (tagName != null) { - sb.append('<'); - sb.append(tagName); - sb.append('>'); + // Emit content in body + if ("content".equals(key)) + { + if (value instanceof JSONArray) + { + ja = (JSONArray) value; + int jaLength = ja.length(); + // don't use the new iterator API to maintain support for Android + for (int i = 0; i < jaLength; i++) + { + if (i > 0) + { + sb.append('\n'); + } + Object val = ja.opt(i); + sb.append(escape(val.toString())); } + } + else + { + sb.append(escape(value.toString())); + } - // Loop thru the keys. - // don't use the new entrySet accessor to maintain Android Support - jo = (JSONObject) object; - for (final String key : jo.keySet()) { - Object value = jo.opt(key); - if (value == null) { - value = ""; - } else if (value.getClass().isArray()) { - value = new JSONArray(value); - } + // Emit an array of similar keys - // Emit content in body - if ("content".equals(key)) { - if (value instanceof JSONArray) { - ja = (JSONArray) value; - int jaLength = ja.length(); - // don't use the new iterator API to maintain support for Android - for (int i = 0; i < jaLength; i++) { - if (i > 0) { - sb.append('\n'); - } - Object val = ja.opt(i); - sb.append(escape(val.toString())); - } - } else { - sb.append(escape(value.toString())); - } - - // Emit an array of similar keys - - } else if (value instanceof JSONArray) { - ja = (JSONArray) value; - int jaLength = ja.length(); - // don't use the new iterator API to maintain support for Android - for (int i = 0; i < jaLength; i++) { - Object val = ja.opt(i); - if (val instanceof JSONArray) { - sb.append('<'); - sb.append(key); - sb.append('>'); - sb.append(toString(val)); - sb.append("'); - } else { - sb.append(toString(val, key)); - } - } - } else if ("".equals(value)) { - sb.append('<'); - sb.append(key); - sb.append("/>"); - - // Emit a new tag - - } else { - sb.append(toString(value, key)); - } + } + else if (value instanceof JSONArray) + { + ja = (JSONArray) value; + int jaLength = ja.length(); + // don't use the new iterator API to maintain support for Android + for (int i = 0; i < jaLength; i++) + { + Object val = ja.opt(i); + if (val instanceof JSONArray) + { + sb.append('<'); + sb.append(key); + sb.append('>'); + sb.append(toString(val)); + sb.append("'); } - if (tagName != null) { - - // Emit the close tag - sb.append("'); + else + { + sb.append(toString(val, key)); } - return sb.toString(); - + } } + else if ("".equals(value)) + { + sb.append('<'); + sb.append(key); + sb.append("/>"); - if (object != null && (object instanceof JSONArray || object.getClass().isArray())) { - if(object.getClass().isArray()) { - ja = new JSONArray(object); - } else { - ja = (JSONArray) object; - } - int jaLength = ja.length(); - // don't use the new iterator API to maintain support for Android - for (int i = 0; i < jaLength; i++) { - Object val = ja.opt(i); - // XML does not have good support for arrays. If an array - // appears in a place where XML is lacking, synthesize an - // element. - sb.append(toString(val, tagName == null ? "array" : tagName)); - } - return sb.toString(); + // Emit a new tag + + } + else + { + sb.append(toString(value, key)); } + } + if (tagName != null) + { + + // Emit the close tag + sb.append("'); + } + return sb.toString(); - string = (object == null) ? "null" : escape(object.toString()); - return (tagName == null) ? "\"" + string + "\"" - : (string.length() == 0) ? "<" + tagName + "/>" : "<" + tagName - + ">" + string + ""; + } + if (object != null + && (object instanceof JSONArray || object.getClass().isArray())) + { + if (object.getClass().isArray()) + { + ja = new JSONArray(object); + } + else + { + ja = (JSONArray) object; + } + int jaLength = ja.length(); + // don't use the new iterator API to maintain support for Android + for (int i = 0; i < jaLength; i++) + { + Object val = ja.opt(i); + // XML does not have good support for arrays. If an array + // appears in a place where XML is lacking, synthesize an + // element. + sb.append(toString(val, tagName == null ? "array" : tagName)); + } + return sb.toString(); } + + string = (object == null) ? "null" : escape(object.toString()); + return (tagName == null) ? "\"" + string + "\"" + : (string.length() == 0) ? "<" + tagName + "/>" + : "<" + tagName + ">" + string + ""; + + } } diff --git a/src/org/json/XMLTokener.java b/src/org/json/XMLTokener.java index 50e3acc..68c3808 100644 --- a/src/org/json/XMLTokener.java +++ b/src/org/json/XMLTokener.java @@ -27,381 +27,458 @@ SOFTWARE. import java.io.Reader; /** - * The XMLTokener extends the JSONTokener to provide additional methods - * for the parsing of XML texts. + * The XMLTokener extends the JSONTokener to provide additional methods for the + * parsing of XML texts. + * * @author JSON.org * @version 2015-12-09 */ -public class XMLTokener extends JSONTokener { - - - /** The table of entity values. It initially contains Character values for - * amp, apos, gt, lt, quot. - */ - public static final java.util.HashMap entity; - - static { - entity = new java.util.HashMap(8); - entity.put("amp", XML.AMP); - entity.put("apos", XML.APOS); - entity.put("gt", XML.GT); - entity.put("lt", XML.LT); - entity.put("quot", XML.QUOT); - } - - /** - * Construct an XMLTokener from a Reader. - * @param r A source reader. - */ - public XMLTokener(Reader r) { - super(r); +public class XMLTokener extends JSONTokener +{ + + /** + * The table of entity values. It initially contains Character values for amp, + * apos, gt, lt, quot. + */ + public static final java.util.HashMap entity; + + static + { + entity = new java.util.HashMap(8); + entity.put("amp", XML.AMP); + entity.put("apos", XML.APOS); + entity.put("gt", XML.GT); + entity.put("lt", XML.LT); + entity.put("quot", XML.QUOT); + } + + /** + * Construct an XMLTokener from a Reader. + * + * @param r + * A source reader. + */ + public XMLTokener(Reader r) + { + super(r); + } + + /** + * Construct an XMLTokener from a string. + * + * @param s + * A source string. + */ + public XMLTokener(String s) + { + super(s); + } + + /** + * Get the text in the CDATA block. + * + * @return The string up to the ]]>. + * @throws JSONException + * If the ]]> is not found. + */ + public String nextCDATA() throws JSONException + { + char c; + int i; + StringBuilder sb = new StringBuilder(); + while (more()) + { + c = next(); + sb.append(c); + i = sb.length() - 3; + if (i >= 0 && sb.charAt(i) == ']' && sb.charAt(i + 1) == ']' + && sb.charAt(i + 2) == '>') + { + sb.setLength(i); + return sb.toString(); + } } - - /** - * Construct an XMLTokener from a string. - * @param s A source string. - */ - public XMLTokener(String s) { - super(s); + throw syntaxError("Unclosed CDATA"); + } + + /** + * Get the next XML outer token, trimming whitespace. There are two kinds of + * tokens: the '<' character which begins a markup tag, and the content text + * between markup tags. + * + * @return A string, or a '<' Character, or null if there is no more source + * text. + * @throws JSONException + */ + public Object nextContent() throws JSONException + { + char c; + StringBuilder sb; + do + { + c = next(); + } while (Character.isWhitespace(c)); + if (c == 0) + { + return null; } - - /** - * Get the text in the CDATA block. - * @return The string up to the ]]>. - * @throws JSONException If the ]]> is not found. - */ - public String nextCDATA() throws JSONException { - char c; - int i; - StringBuilder sb = new StringBuilder(); - while (more()) { - c = next(); - sb.append(c); - i = sb.length() - 3; - if (i >= 0 && sb.charAt(i) == ']' && - sb.charAt(i + 1) == ']' && sb.charAt(i + 2) == '>') { - sb.setLength(i); - return sb.toString(); - } - } - throw syntaxError("Unclosed CDATA"); + if (c == '<') + { + return XML.LT; } - - - /** - * Get the next XML outer token, trimming whitespace. There are two kinds - * of tokens: the '<' character which begins a markup tag, and the content - * text between markup tags. - * - * @return A string, or a '<' Character, or null if there is no more - * source text. - * @throws JSONException - */ - public Object nextContent() throws JSONException { - char c; - StringBuilder sb; - do { - c = next(); - } while (Character.isWhitespace(c)); - if (c == 0) { - return null; - } - if (c == '<') { - return XML.LT; - } - sb = new StringBuilder(); - for (;;) { - if (c == 0) { - return sb.toString().trim(); - } - if (c == '<') { - back(); - return sb.toString().trim(); - } - if (c == '&') { - sb.append(nextEntity(c)); - } else { - sb.append(c); - } - c = next(); - } + sb = new StringBuilder(); + for (;;) + { + if (c == 0) + { + return sb.toString().trim(); + } + if (c == '<') + { + back(); + return sb.toString().trim(); + } + if (c == '&') + { + sb.append(nextEntity(c)); + } + else + { + sb.append(c); + } + c = next(); } - - - /** - * Return the next entity. These entities are translated to Characters: - * & ' > < ". - * @param ampersand An ampersand character. - * @return A Character or an entity String if the entity is not recognized. - * @throws JSONException If missing ';' in XML entity. - */ - public Object nextEntity(char ampersand) throws JSONException { - StringBuilder sb = new StringBuilder(); - for (;;) { - char c = next(); - if (Character.isLetterOrDigit(c) || c == '#') { - sb.append(Character.toLowerCase(c)); - } else if (c == ';') { - break; - } else { - throw syntaxError("Missing ';' in XML entity: &" + sb); - } - } - String string = sb.toString(); - return unescapeEntity(string); + } + + /** + * Return the next entity. These entities are translated to Characters: + * & ' > < ". + * + * @param ampersand + * An ampersand character. + * @return A Character or an entity String if the entity is not recognized. + * @throws JSONException + * If missing ';' in XML entity. + */ + public Object nextEntity(char ampersand) throws JSONException + { + StringBuilder sb = new StringBuilder(); + for (;;) + { + char c = next(); + if (Character.isLetterOrDigit(c) || c == '#') + { + sb.append(Character.toLowerCase(c)); + } + else if (c == ';') + { + break; + } + else + { + throw syntaxError("Missing ';' in XML entity: &" + sb); + } } - - /** - * Unescapes an XML entity encoding; - * @param e entity (only the actual entity value, not the preceding & or ending ; - * @return - */ - static String unescapeEntity(String e) { - // validate - if (e == null || e.isEmpty()) { - return ""; + String string = sb.toString(); + return unescapeEntity(string); + } + + /** + * Unescapes an XML entity encoding; + * + * @param e + * entity (only the actual entity value, not the preceding & or + * ending ; + * @return + */ + static String unescapeEntity(String e) + { + // validate + if (e == null || e.isEmpty()) + { + return ""; + } + // if our entity is an encoded unicode point, parse it. + if (e.charAt(0) == '#') + { + int cp; + if (e.charAt(1) == 'x') + { + // hex encoded unicode + cp = Integer.parseInt(e.substring(2), 16); + } + else + { + // decimal encoded unicode + cp = Integer.parseInt(e.substring(1)); + } + return new String(new int[] { cp }, 0, 1); + } + Character knownEntity = entity.get(e); + if (knownEntity == null) + { + // we don't know the entity so keep it encoded + return '&' + e + ';'; + } + return knownEntity.toString(); + } + + /** + * Returns the next XML meta token. This is used for skipping over and + * structures. + * + * @return Syntax characters (< > / = ! ?) are returned as + * Character, and strings and names are returned as Boolean. We don't + * care what the values actually are. + * @throws JSONException + * If a string is not properly closed or if the XML is badly + * structured. + */ + public Object nextMeta() throws JSONException + { + char c; + char q; + do + { + c = next(); + } while (Character.isWhitespace(c)); + switch (c) + { + case 0: + throw syntaxError("Misshaped meta tag"); + case '<': + return XML.LT; + case '>': + return XML.GT; + case '/': + return XML.SLASH; + case '=': + return XML.EQ; + case '!': + return XML.BANG; + case '?': + return XML.QUEST; + case '"': + case '\'': + q = c; + for (;;) + { + c = next(); + if (c == 0) + { + throw syntaxError("Unterminated string"); } - // if our entity is an encoded unicode point, parse it. - if (e.charAt(0) == '#') { - int cp; - if (e.charAt(1) == 'x') { - // hex encoded unicode - cp = Integer.parseInt(e.substring(2), 16); - } else { - // decimal encoded unicode - cp = Integer.parseInt(e.substring(1)); - } - return new String(new int[] {cp},0,1); - } - Character knownEntity = entity.get(e); - if(knownEntity==null) { - // we don't know the entity so keep it encoded - return '&' + e + ';'; + if (c == q) + { + return Boolean.TRUE; } - return knownEntity.toString(); - } - - - /** - * Returns the next XML meta token. This is used for skipping over - * and structures. - * @return Syntax characters (< > / = ! ?) are returned as - * Character, and strings and names are returned as Boolean. We don't care - * what the values actually are. - * @throws JSONException If a string is not properly closed or if the XML - * is badly structured. - */ - public Object nextMeta() throws JSONException { - char c; - char q; - do { - c = next(); - } while (Character.isWhitespace(c)); - switch (c) { + } + default: + for (;;) + { + c = next(); + if (Character.isWhitespace(c)) + { + return Boolean.TRUE; + } + switch (c) + { case 0: - throw syntaxError("Misshaped meta tag"); case '<': - return XML.LT; case '>': - return XML.GT; case '/': - return XML.SLASH; case '=': - return XML.EQ; case '!': - return XML.BANG; case '?': - return XML.QUEST; case '"': case '\'': - q = c; - for (;;) { - c = next(); - if (c == 0) { - throw syntaxError("Unterminated string"); - } - if (c == q) { - return Boolean.TRUE; - } - } - default: - for (;;) { - c = next(); - if (Character.isWhitespace(c)) { - return Boolean.TRUE; - } - switch (c) { - case 0: - case '<': - case '>': - case '/': - case '=': - case '!': - case '?': - case '"': - case '\'': - back(); - return Boolean.TRUE; - } - } + back(); + return Boolean.TRUE; } + } } - - - /** - * Get the next XML Token. These tokens are found inside of angle - * brackets. It may be one of these characters: / > = ! ? or it - * may be a string wrapped in single quotes or double quotes, or it may be a - * name. - * @return a String or a Character. - * @throws JSONException If the XML is not well formed. - */ - public Object nextToken() throws JSONException { - char c; - char q; - StringBuilder sb; - do { - c = next(); - } while (Character.isWhitespace(c)); - switch (c) { + } + + /** + * Get the next XML Token. These tokens are found inside of angle brackets. It + * may be one of these characters: / > = ! ? or it may be a + * string wrapped in single quotes or double quotes, or it may be a name. + * + * @return a String or a Character. + * @throws JSONException + * If the XML is not well formed. + */ + public Object nextToken() throws JSONException + { + char c; + char q; + StringBuilder sb; + do + { + c = next(); + } while (Character.isWhitespace(c)); + switch (c) + { + case 0: + throw syntaxError("Misshaped element"); + case '<': + throw syntaxError("Misplaced '<'"); + case '>': + return XML.GT; + case '/': + return XML.SLASH; + case '=': + return XML.EQ; + case '!': + return XML.BANG; + case '?': + return XML.QUEST; + + // Quoted string + + case '"': + case '\'': + q = c; + sb = new StringBuilder(); + for (;;) + { + c = next(); + if (c == 0) + { + throw syntaxError("Unterminated string"); + } + if (c == q) + { + return sb.toString(); + } + if (c == '&') + { + sb.append(nextEntity(c)); + } + else + { + sb.append(c); + } + } + default: + + // Name + + sb = new StringBuilder(); + for (;;) + { + sb.append(c); + c = next(); + if (Character.isWhitespace(c)) + { + return sb.toString(); + } + switch (c) + { case 0: - throw syntaxError("Misshaped element"); - case '<': - throw syntaxError("Misplaced '<'"); + return sb.toString(); case '>': - return XML.GT; case '/': - return XML.SLASH; case '=': - return XML.EQ; case '!': - return XML.BANG; case '?': - return XML.QUEST; - -// Quoted string - + case '[': + case ']': + back(); + return sb.toString(); + case '<': case '"': case '\'': - q = c; - sb = new StringBuilder(); - for (;;) { - c = next(); - if (c == 0) { - throw syntaxError("Unterminated string"); - } - if (c == q) { - return sb.toString(); - } - if (c == '&') { - sb.append(nextEntity(c)); - } else { - sb.append(c); - } - } - default: - -// Name - - sb = new StringBuilder(); - for (;;) { - sb.append(c); - c = next(); - if (Character.isWhitespace(c)) { - return sb.toString(); - } - switch (c) { - case 0: - return sb.toString(); - case '>': - case '/': - case '=': - case '!': - case '?': - case '[': - case ']': - back(); - return sb.toString(); - case '<': - case '"': - case '\'': - throw syntaxError("Bad character in a name"); - } - } + throw syntaxError("Bad character in a name"); } + } } + } + + /** + * Skip characters until past the requested string. If it is not found, we are + * left at the end of the source with a result of false. + * + * @param to + * A string to skip past. + */ + // The Android implementation of JSONTokener has a public method of public + // void skipPast(String to) + // even though ours does not have that method, to have API compatibility, our + // method in the subclass + // should match. + public void skipPast(String to) + { + boolean b; + char c; + int i; + int j; + int offset = 0; + int length = to.length(); + char[] circle = new char[length]; + + /* + * First fill the circle buffer with as many characters as are in the + * to string. If we reach an early end, bail. + */ + for (i = 0; i < length; i += 1) + { + c = next(); + if (c == 0) + { + return; + } + circle[i] = c; + } - /** - * Skip characters until past the requested string. - * If it is not found, we are left at the end of the source with a result of false. - * @param to A string to skip past. - */ - // The Android implementation of JSONTokener has a public method of public void skipPast(String to) - // even though ours does not have that method, to have API compatibility, our method in the subclass - // should match. - public void skipPast(String to) { - boolean b; - char c; - int i; - int j; - int offset = 0; - int length = to.length(); - char[] circle = new char[length]; - - /* - * First fill the circle buffer with as many characters as are in the - * to string. If we reach an early end, bail. - */ - - for (i = 0; i < length; i += 1) { - c = next(); - if (c == 0) { - return; - } - circle[i] = c; - } + /* We will loop, possibly for all of the remaining characters. */ + + for (;;) + { + j = offset; + b = true; - /* We will loop, possibly for all of the remaining characters. */ - - for (;;) { - j = offset; - b = true; - - /* Compare the circle buffer with the to string. */ - - for (i = 0; i < length; i += 1) { - if (circle[j] != to.charAt(i)) { - b = false; - break; - } - j += 1; - if (j >= length) { - j -= length; - } - } - - /* If we exit the loop with b intact, then victory is ours. */ - - if (b) { - return; - } - - /* Get the next character. If there isn't one, then defeat is ours. */ - - c = next(); - if (c == 0) { - return; - } - /* - * Shove the character in the circle buffer and advance the - * circle offset. The offset is mod n. - */ - circle[offset] = c; - offset += 1; - if (offset >= length) { - offset -= length; - } + /* Compare the circle buffer with the to string. */ + + for (i = 0; i < length; i += 1) + { + if (circle[j] != to.charAt(i)) + { + b = false; + break; + } + j += 1; + if (j >= length) + { + j -= length; } + } + + /* If we exit the loop with b intact, then victory is ours. */ + + if (b) + { + return; + } + + /* Get the next character. If there isn't one, then defeat is ours. */ + + c = next(); + if (c == 0) + { + return; + } + /* + * Shove the character in the circle buffer and advance the + * circle offset. The offset is mod n. + */ + circle[offset] = c; + offset += 1; + if (offset >= length) + { + offset -= length; + } } + } } diff --git a/src/org/json/simple/ItemList.java b/src/org/json/simple/ItemList.java index 830961b..57435db 100644 --- a/src/org/json/simple/ItemList.java +++ b/src/org/json/simple/ItemList.java @@ -9,139 +9,167 @@ import java.util.List; import java.util.StringTokenizer; /** - * |a:b:c| => |a|,|b|,|c| - * |:| => ||,|| - * |a:| => |a|,|| + * |a:b:c| => |a|,|b|,|c| |:| => ||,|| |a:| => |a|,|| + * * @author FangYidong */ -public class ItemList { - private String sp=","; - List items=new ArrayList(); - - - public ItemList(){} - - - public ItemList(String s){ - this.split(s,sp,items); - } - - public ItemList(String s,String sp){ - this.sp=s; - this.split(s,sp,items); - } - - public ItemList(String s,String sp,boolean isMultiToken){ - split(s,sp,items,isMultiToken); - } - - public List getItems(){ - return this.items; - } - - public String[] getArray(){ - return (String[])this.items.toArray(); - } - - public void split(String s,String sp,List append,boolean isMultiToken){ - if(s==null || sp==null) - return; - if(isMultiToken){ - StringTokenizer tokens=new StringTokenizer(s,sp); - while(tokens.hasMoreTokens()){ - append.add(tokens.nextToken().trim()); - } - } - else{ - this.split(s,sp,append); - } - } - - public void split(String s,String sp,List append){ - if(s==null || sp==null) - return; - int pos=0; - int prevPos=0; - do{ - prevPos=pos; - pos=s.indexOf(sp,pos); - if(pos==-1) - break; - append.add(s.substring(prevPos,pos).trim()); - pos+=sp.length(); - }while(pos!=-1); - append.add(s.substring(prevPos).trim()); - } - - public void setSP(String sp){ - this.sp=sp; - } - - public void add(int i,String item){ - if(item==null) - return; - items.add(i,item.trim()); - } - - public void add(String item){ - if(item==null) - return; - items.add(item.trim()); - } - - public void addAll(ItemList list){ - items.addAll(list.items); - } - - public void addAll(String s){ - this.split(s,sp,items); - } - - public void addAll(String s,String sp){ - this.split(s,sp,items); - } - - public void addAll(String s,String sp,boolean isMultiToken){ - this.split(s,sp,items,isMultiToken); - } - - /** - * @param i 0-based - * @return - */ - public String get(int i){ - return (String)items.get(i); - } - - public int size(){ - return items.size(); - } - - public String toString(){ - return toString(sp); - } - - public String toString(String sp){ - StringBuffer sb=new StringBuffer(); - - for(int i=0;i */ -public class JSONArray extends ArrayList implements JSONAware, JSONStreamAware { - private static final long serialVersionUID = 3957988303675231981L; - - /** - * Constructs an empty JSONArray. - */ - public JSONArray(){ - super(); - } - - /** - * Constructs a JSONArray containing the elements of the specified - * collection, in the order they are returned by the collection's iterator. - * - * @param c the collection whose elements are to be placed into this JSONArray - */ - public JSONArray(Collection c){ - super(c); - } - - /** - * Encode a list into JSON text and write it to out. - * If this list is also a JSONStreamAware or a JSONAware, JSONStreamAware and JSONAware specific behaviours will be ignored at this top level. - * - * @see org.json.simple.JSONValue#writeJSONString(Object, Writer) - * - * @param collection - * @param out - */ - public static void writeJSONString(Collection collection, Writer out) throws IOException{ - if(collection == null){ - out.write("null"); - return; - } - - boolean first = true; - Iterator iter=collection.iterator(); - - out.write('['); - while(iter.hasNext()){ - if(first) - first = false; - else - out.write(','); - - Object value=iter.next(); - if(value == null){ - out.write("null"); - continue; - } - - JSONValue.writeJSONString(value, out); - } - out.write(']'); - } - - public void writeJSONString(Writer out) throws IOException{ - writeJSONString(this, out); - } - - /** - * Convert a list to JSON text. The result is a JSON array. - * If this list is also a JSONAware, JSONAware specific behaviours will be omitted at this top level. - * - * @see org.json.simple.JSONValue#toJSONString(Object) - * - * @param collection - * @return JSON text, or "null" if list is null. - */ - public static String toJSONString(Collection collection){ - final StringWriter writer = new StringWriter(); - - try { - writeJSONString(collection, writer); - return writer.toString(); - } catch(IOException e){ - // This should never happen for a StringWriter - throw new RuntimeException(e); - } - } - - public static void writeJSONString(byte[] array, Writer out) throws IOException{ - if(array == null){ - out.write("null"); - } else if(array.length == 0) { - out.write("[]"); - } else { - out.write("["); - out.write(String.valueOf(array[0])); - - for(int i = 1; i < array.length; i++){ - out.write(","); - out.write(String.valueOf(array[i])); - } - - out.write("]"); - } - } - - public static String toJSONString(byte[] array){ - final StringWriter writer = new StringWriter(); - - try { - writeJSONString(array, writer); - return writer.toString(); - } catch(IOException e){ - // This should never happen for a StringWriter - throw new RuntimeException(e); - } - } - - public static void writeJSONString(short[] array, Writer out) throws IOException{ - if(array == null){ - out.write("null"); - } else if(array.length == 0) { - out.write("[]"); - } else { - out.write("["); - out.write(String.valueOf(array[0])); - - for(int i = 1; i < array.length; i++){ - out.write(","); - out.write(String.valueOf(array[i])); - } - - out.write("]"); - } - } - - public static String toJSONString(short[] array){ - final StringWriter writer = new StringWriter(); - - try { - writeJSONString(array, writer); - return writer.toString(); - } catch(IOException e){ - // This should never happen for a StringWriter - throw new RuntimeException(e); - } - } - - public static void writeJSONString(int[] array, Writer out) throws IOException{ - if(array == null){ - out.write("null"); - } else if(array.length == 0) { - out.write("[]"); - } else { - out.write("["); - out.write(String.valueOf(array[0])); - - for(int i = 1; i < array.length; i++){ - out.write(","); - out.write(String.valueOf(array[i])); - } - - out.write("]"); - } - } - - public static String toJSONString(int[] array){ - final StringWriter writer = new StringWriter(); - - try { - writeJSONString(array, writer); - return writer.toString(); - } catch(IOException e){ - // This should never happen for a StringWriter - throw new RuntimeException(e); - } - } - - public static void writeJSONString(long[] array, Writer out) throws IOException{ - if(array == null){ - out.write("null"); - } else if(array.length == 0) { - out.write("[]"); - } else { - out.write("["); - out.write(String.valueOf(array[0])); - - for(int i = 1; i < array.length; i++){ - out.write(","); - out.write(String.valueOf(array[i])); - } - - out.write("]"); - } - } - - public static String toJSONString(long[] array){ - final StringWriter writer = new StringWriter(); - - try { - writeJSONString(array, writer); - return writer.toString(); - } catch(IOException e){ - // This should never happen for a StringWriter - throw new RuntimeException(e); - } - } - - public static void writeJSONString(float[] array, Writer out) throws IOException{ - if(array == null){ - out.write("null"); - } else if(array.length == 0) { - out.write("[]"); - } else { - out.write("["); - out.write(String.valueOf(array[0])); - - for(int i = 1; i < array.length; i++){ - out.write(","); - out.write(String.valueOf(array[i])); - } - - out.write("]"); - } - } - - public static String toJSONString(float[] array){ - final StringWriter writer = new StringWriter(); - - try { - writeJSONString(array, writer); - return writer.toString(); - } catch(IOException e){ - // This should never happen for a StringWriter - throw new RuntimeException(e); - } - } - - public static void writeJSONString(double[] array, Writer out) throws IOException{ - if(array == null){ - out.write("null"); - } else if(array.length == 0) { - out.write("[]"); - } else { - out.write("["); - out.write(String.valueOf(array[0])); - - for(int i = 1; i < array.length; i++){ - out.write(","); - out.write(String.valueOf(array[i])); - } - - out.write("]"); - } - } - - public static String toJSONString(double[] array){ - final StringWriter writer = new StringWriter(); - - try { - writeJSONString(array, writer); - return writer.toString(); - } catch(IOException e){ - // This should never happen for a StringWriter - throw new RuntimeException(e); - } - } - - public static void writeJSONString(boolean[] array, Writer out) throws IOException{ - if(array == null){ - out.write("null"); - } else if(array.length == 0) { - out.write("[]"); - } else { - out.write("["); - out.write(String.valueOf(array[0])); - - for(int i = 1; i < array.length; i++){ - out.write(","); - out.write(String.valueOf(array[i])); - } - - out.write("]"); - } - } - - public static String toJSONString(boolean[] array){ - final StringWriter writer = new StringWriter(); - - try { - writeJSONString(array, writer); - return writer.toString(); - } catch(IOException e){ - // This should never happen for a StringWriter - throw new RuntimeException(e); - } - } - - public static void writeJSONString(char[] array, Writer out) throws IOException{ - if(array == null){ - out.write("null"); - } else if(array.length == 0) { - out.write("[]"); - } else { - out.write("[\""); - out.write(String.valueOf(array[0])); - - for(int i = 1; i < array.length; i++){ - out.write("\",\""); - out.write(String.valueOf(array[i])); - } - - out.write("\"]"); - } - } - - public static String toJSONString(char[] array){ - final StringWriter writer = new StringWriter(); - - try { - writeJSONString(array, writer); - return writer.toString(); - } catch(IOException e){ - // This should never happen for a StringWriter - throw new RuntimeException(e); - } - } - - public static void writeJSONString(Object[] array, Writer out) throws IOException{ - if(array == null){ - out.write("null"); - } else if(array.length == 0) { - out.write("[]"); - } else { - out.write("["); - JSONValue.writeJSONString(array[0], out); - - for(int i = 1; i < array.length; i++){ - out.write(","); - JSONValue.writeJSONString(array[i], out); - } - - out.write("]"); - } - } - - public static String toJSONString(Object[] array){ - final StringWriter writer = new StringWriter(); - - try { - writeJSONString(array, writer); - return writer.toString(); - } catch(IOException e){ - // This should never happen for a StringWriter - throw new RuntimeException(e); - } - } - - public String toJSONString(){ - return toJSONString(this); - } - - /** - * Returns a string representation of this array. This is equivalent to - * calling {@link JSONArray#toJSONString()}. - */ - public String toString() { - return toJSONString(); - } +public class JSONArray extends ArrayList + implements JSONAware, JSONStreamAware +{ + private static final long serialVersionUID = 3957988303675231981L; + + /** + * Constructs an empty JSONArray. + */ + public JSONArray() + { + super(); + } + + /** + * Constructs a JSONArray containing the elements of the specified collection, + * in the order they are returned by the collection's iterator. + * + * @param c + * the collection whose elements are to be placed into this JSONArray + */ + public JSONArray(Collection c) + { + super(c); + } + + /** + * Encode a list into JSON text and write it to out. If this list is also a + * JSONStreamAware or a JSONAware, JSONStreamAware and JSONAware specific + * behaviours will be ignored at this top level. + * + * @see org.json.simple.JSONValue#writeJSONString(Object, Writer) + * + * @param collection + * @param out + */ + public static void writeJSONString(Collection collection, Writer out) + throws IOException + { + if (collection == null) + { + out.write("null"); + return; + } + + boolean first = true; + Iterator iter = collection.iterator(); + + out.write('['); + while (iter.hasNext()) + { + if (first) + first = false; + else + out.write(','); + + Object value = iter.next(); + if (value == null) + { + out.write("null"); + continue; + } + + JSONValue.writeJSONString(value, out); + } + out.write(']'); + } + + public void writeJSONString(Writer out) throws IOException + { + writeJSONString(this, out); + } + + /** + * Convert a list to JSON text. The result is a JSON array. If this list is + * also a JSONAware, JSONAware specific behaviours will be omitted at this top + * level. + * + * @see org.json.simple.JSONValue#toJSONString(Object) + * + * @param collection + * @return JSON text, or "null" if list is null. + */ + public static String toJSONString(Collection collection) + { + final StringWriter writer = new StringWriter(); + + try + { + writeJSONString(collection, writer); + return writer.toString(); + } catch (IOException e) + { + // This should never happen for a StringWriter + throw new RuntimeException(e); + } + } + + public static void writeJSONString(byte[] array, Writer out) + throws IOException + { + if (array == null) + { + out.write("null"); + } + else if (array.length == 0) + { + out.write("[]"); + } + else + { + out.write("["); + out.write(String.valueOf(array[0])); + + for (int i = 1; i < array.length; i++) + { + out.write(","); + out.write(String.valueOf(array[i])); + } + + out.write("]"); + } + } + + public static String toJSONString(byte[] array) + { + final StringWriter writer = new StringWriter(); + + try + { + writeJSONString(array, writer); + return writer.toString(); + } catch (IOException e) + { + // This should never happen for a StringWriter + throw new RuntimeException(e); + } + } + + public static void writeJSONString(short[] array, Writer out) + throws IOException + { + if (array == null) + { + out.write("null"); + } + else if (array.length == 0) + { + out.write("[]"); + } + else + { + out.write("["); + out.write(String.valueOf(array[0])); + + for (int i = 1; i < array.length; i++) + { + out.write(","); + out.write(String.valueOf(array[i])); + } + + out.write("]"); + } + } + + public static String toJSONString(short[] array) + { + final StringWriter writer = new StringWriter(); + + try + { + writeJSONString(array, writer); + return writer.toString(); + } catch (IOException e) + { + // This should never happen for a StringWriter + throw new RuntimeException(e); + } + } + + public static void writeJSONString(int[] array, Writer out) + throws IOException + { + if (array == null) + { + out.write("null"); + } + else if (array.length == 0) + { + out.write("[]"); + } + else + { + out.write("["); + out.write(String.valueOf(array[0])); + + for (int i = 1; i < array.length; i++) + { + out.write(","); + out.write(String.valueOf(array[i])); + } + + out.write("]"); + } + } + + public static String toJSONString(int[] array) + { + final StringWriter writer = new StringWriter(); + + try + { + writeJSONString(array, writer); + return writer.toString(); + } catch (IOException e) + { + // This should never happen for a StringWriter + throw new RuntimeException(e); + } + } + + public static void writeJSONString(long[] array, Writer out) + throws IOException + { + if (array == null) + { + out.write("null"); + } + else if (array.length == 0) + { + out.write("[]"); + } + else + { + out.write("["); + out.write(String.valueOf(array[0])); + + for (int i = 1; i < array.length; i++) + { + out.write(","); + out.write(String.valueOf(array[i])); + } + + out.write("]"); + } + } + + public static String toJSONString(long[] array) + { + final StringWriter writer = new StringWriter(); + + try + { + writeJSONString(array, writer); + return writer.toString(); + } catch (IOException e) + { + // This should never happen for a StringWriter + throw new RuntimeException(e); + } + } + + public static void writeJSONString(float[] array, Writer out) + throws IOException + { + if (array == null) + { + out.write("null"); + } + else if (array.length == 0) + { + out.write("[]"); + } + else + { + out.write("["); + out.write(String.valueOf(array[0])); + + for (int i = 1; i < array.length; i++) + { + out.write(","); + out.write(String.valueOf(array[i])); + } + + out.write("]"); + } + } + + public static String toJSONString(float[] array) + { + final StringWriter writer = new StringWriter(); + + try + { + writeJSONString(array, writer); + return writer.toString(); + } catch (IOException e) + { + // This should never happen for a StringWriter + throw new RuntimeException(e); + } + } + + public static void writeJSONString(double[] array, Writer out) + throws IOException + { + if (array == null) + { + out.write("null"); + } + else if (array.length == 0) + { + out.write("[]"); + } + else + { + out.write("["); + out.write(String.valueOf(array[0])); + + for (int i = 1; i < array.length; i++) + { + out.write(","); + out.write(String.valueOf(array[i])); + } + + out.write("]"); + } + } + + public static String toJSONString(double[] array) + { + final StringWriter writer = new StringWriter(); + + try + { + writeJSONString(array, writer); + return writer.toString(); + } catch (IOException e) + { + // This should never happen for a StringWriter + throw new RuntimeException(e); + } + } + + public static void writeJSONString(boolean[] array, Writer out) + throws IOException + { + if (array == null) + { + out.write("null"); + } + else if (array.length == 0) + { + out.write("[]"); + } + else + { + out.write("["); + out.write(String.valueOf(array[0])); + + for (int i = 1; i < array.length; i++) + { + out.write(","); + out.write(String.valueOf(array[i])); + } + + out.write("]"); + } + } + + public static String toJSONString(boolean[] array) + { + final StringWriter writer = new StringWriter(); + + try + { + writeJSONString(array, writer); + return writer.toString(); + } catch (IOException e) + { + // This should never happen for a StringWriter + throw new RuntimeException(e); + } + } + + public static void writeJSONString(char[] array, Writer out) + throws IOException + { + if (array == null) + { + out.write("null"); + } + else if (array.length == 0) + { + out.write("[]"); + } + else + { + out.write("[\""); + out.write(String.valueOf(array[0])); + + for (int i = 1; i < array.length; i++) + { + out.write("\",\""); + out.write(String.valueOf(array[i])); + } + + out.write("\"]"); + } + } + + public static String toJSONString(char[] array) + { + final StringWriter writer = new StringWriter(); + + try + { + writeJSONString(array, writer); + return writer.toString(); + } catch (IOException e) + { + // This should never happen for a StringWriter + throw new RuntimeException(e); + } + } + + public static void writeJSONString(Object[] array, Writer out) + throws IOException + { + if (array == null) + { + out.write("null"); + } + else if (array.length == 0) + { + out.write("[]"); + } + else + { + out.write("["); + JSONValue.writeJSONString(array[0], out); + + for (int i = 1; i < array.length; i++) + { + out.write(","); + JSONValue.writeJSONString(array[i], out); + } + + out.write("]"); + } + } + + public static String toJSONString(Object[] array) + { + final StringWriter writer = new StringWriter(); + + try + { + writeJSONString(array, writer); + return writer.toString(); + } catch (IOException e) + { + // This should never happen for a StringWriter + throw new RuntimeException(e); + } + } + + public String toJSONString() + { + return toJSONString(this); + } + + /** + * Returns a string representation of this array. This is equivalent to + * calling {@link JSONArray#toJSONString()}. + */ + public String toString() + { + return toJSONString(); + } } diff --git a/src/org/json/simple/JSONAware.java b/src/org/json/simple/JSONAware.java index 5e7452f..e1c50e1 100644 --- a/src/org/json/simple/JSONAware.java +++ b/src/org/json/simple/JSONAware.java @@ -1,12 +1,15 @@ package org.json.simple; /** - * Beans that support customized output of JSON text shall implement this interface. + * Beans that support customized output of JSON text shall implement this + * interface. + * * @author FangYidong */ -public interface JSONAware { - /** - * @return JSON text - */ - String toJSONString(); +public interface JSONAware +{ + /** + * @return JSON text + */ + String toJSONString(); } diff --git a/src/org/json/simple/JSONObject.java b/src/org/json/simple/JSONObject.java index fafa36b..e56091a 100644 --- a/src/org/json/simple/JSONObject.java +++ b/src/org/json/simple/JSONObject.java @@ -12,121 +12,138 @@ import java.util.Iterator; import java.util.Map; /** - * A JSON object. Key value pairs are unordered. JSONObject supports java.util.Map interface. + * A JSON object. Key value pairs are unordered. JSONObject supports + * java.util.Map interface. * * @author FangYidong */ -public class JSONObject extends HashMap implements Map, JSONAware, JSONStreamAware{ - - private static final long serialVersionUID = -503443796854799292L; - - - public JSONObject() { - super(); - } - - /** - * Allows creation of a JSONObject from a Map. After that, both the - * generated JSONObject and the Map can be modified independently. - * - * @param map - */ - public JSONObject(Map map) { - super(map); - } - - - /** - * Encode a map into JSON text and write it to out. - * If this map is also a JSONAware or JSONStreamAware, JSONAware or JSONStreamAware specific behaviours will be ignored at this top level. - * - * @see org.json.simple.JSONValue#writeJSONString(Object, Writer) - * - * @param map - * @param out - */ - public static void writeJSONString(Map map, Writer out) throws IOException { - if(map == null){ - out.write("null"); - return; - } - - boolean first = true; - Iterator iter=map.entrySet().iterator(); - - out.write('{'); - while(iter.hasNext()){ - if(first) - first = false; - else - out.write(','); - Map.Entry entry=(Map.Entry)iter.next(); - out.write('\"'); - out.write(escape(String.valueOf(entry.getKey()))); - out.write('\"'); - out.write(':'); - JSONValue.writeJSONString(entry.getValue(), out); - } - out.write('}'); - } - - public void writeJSONString(Writer out) throws IOException{ - writeJSONString(this, out); - } - - /** - * Convert a map to JSON text. The result is a JSON object. - * If this map is also a JSONAware, JSONAware specific behaviours will be omitted at this top level. - * - * @see org.json.simple.JSONValue#toJSONString(Object) - * - * @param map - * @return JSON text, or "null" if map is null. - */ - public static String toJSONString(Map map){ - final StringWriter writer = new StringWriter(); - - try { - writeJSONString(map, writer); - return writer.toString(); - } catch (IOException e) { - // This should never happen with a StringWriter - throw new RuntimeException(e); - } - } - - public String toJSONString(){ - return toJSONString(this); - } - - public String toString(){ - return toJSONString(); - } - - public static String toString(String key,Object value){ - StringBuffer sb = new StringBuffer(); - sb.append('\"'); - if(key == null) - sb.append("null"); - else - JSONValue.escape(key, sb); - sb.append('\"').append(':'); - - sb.append(JSONValue.toJSONString(value)); - - return sb.toString(); - } - - /** - * Escape quotes, \, /, \r, \n, \b, \f, \t and other control characters (U+0000 through U+001F). - * It's the same as JSONValue.escape() only for compatibility here. - * - * @see org.json.simple.JSONValue#escape(String) - * - * @param s - * @return - */ - public static String escape(String s){ - return JSONValue.escape(s); - } +public class JSONObject extends HashMap + implements Map, JSONAware, JSONStreamAware +{ + + private static final long serialVersionUID = -503443796854799292L; + + public JSONObject() + { + super(); + } + + /** + * Allows creation of a JSONObject from a Map. After that, both the generated + * JSONObject and the Map can be modified independently. + * + * @param map + */ + public JSONObject(Map map) + { + super(map); + } + + /** + * Encode a map into JSON text and write it to out. If this map is also a + * JSONAware or JSONStreamAware, JSONAware or JSONStreamAware specific + * behaviours will be ignored at this top level. + * + * @see org.json.simple.JSONValue#writeJSONString(Object, Writer) + * + * @param map + * @param out + */ + public static void writeJSONString(Map map, Writer out) throws IOException + { + if (map == null) + { + out.write("null"); + return; + } + + boolean first = true; + Iterator iter = map.entrySet().iterator(); + + out.write('{'); + while (iter.hasNext()) + { + if (first) + first = false; + else + out.write(','); + Map.Entry entry = (Map.Entry) iter.next(); + out.write('\"'); + out.write(escape(String.valueOf(entry.getKey()))); + out.write('\"'); + out.write(':'); + JSONValue.writeJSONString(entry.getValue(), out); + } + out.write('}'); + } + + public void writeJSONString(Writer out) throws IOException + { + writeJSONString(this, out); + } + + /** + * Convert a map to JSON text. The result is a JSON object. If this map is + * also a JSONAware, JSONAware specific behaviours will be omitted at this top + * level. + * + * @see org.json.simple.JSONValue#toJSONString(Object) + * + * @param map + * @return JSON text, or "null" if map is null. + */ + public static String toJSONString(Map map) + { + final StringWriter writer = new StringWriter(); + + try + { + writeJSONString(map, writer); + return writer.toString(); + } catch (IOException e) + { + // This should never happen with a StringWriter + throw new RuntimeException(e); + } + } + + public String toJSONString() + { + return toJSONString(this); + } + + public String toString() + { + return toJSONString(); + } + + public static String toString(String key, Object value) + { + StringBuffer sb = new StringBuffer(); + sb.append('\"'); + if (key == null) + sb.append("null"); + else + JSONValue.escape(key, sb); + sb.append('\"').append(':'); + + sb.append(JSONValue.toJSONString(value)); + + return sb.toString(); + } + + /** + * Escape quotes, \, /, \r, \n, \b, \f, \t and other control characters + * (U+0000 through U+001F). It's the same as JSONValue.escape() only for + * compatibility here. + * + * @see org.json.simple.JSONValue#escape(String) + * + * @param s + * @return + */ + public static String escape(String s) + { + return JSONValue.escape(s); + } } diff --git a/src/org/json/simple/JSONStreamAware.java b/src/org/json/simple/JSONStreamAware.java index ab63b3e..514cd61 100644 --- a/src/org/json/simple/JSONStreamAware.java +++ b/src/org/json/simple/JSONStreamAware.java @@ -4,12 +4,15 @@ import java.io.IOException; import java.io.Writer; /** - * Beans that support customized output of JSON text to a writer shall implement this interface. + * Beans that support customized output of JSON text to a writer shall implement + * this interface. + * * @author FangYidong */ -public interface JSONStreamAware { - /** - * write JSON string to out. - */ - void writeJSONString(Writer out) throws IOException; +public interface JSONStreamAware +{ + /** + * write JSON string to out. + */ + void writeJSONString(Writer out) throws IOException; } diff --git a/src/org/json/simple/JSONValue.java b/src/org/json/simple/JSONValue.java index eb11cb2..30f0663 100644 --- a/src/org/json/simple/JSONValue.java +++ b/src/org/json/simple/JSONValue.java @@ -17,303 +17,339 @@ import java.util.Map; import org.json.simple.parser.JSONParser; import org.json.simple.parser.ParseException; - /** * @author FangYidong */ -public class JSONValue { - /** - * Parse JSON text into java object from the input source. - * Please use parseWithException() if you don't want to ignore the exception. - * - * @see org.json.simple.parser.JSONParser#parse(Reader) - * @see #parseWithException(Reader) - * - * @param in - * @return Instance of the following: - * org.json.simple.JSONObject, - * org.json.simple.JSONArray, - * java.lang.String, - * java.lang.Number, - * java.lang.Boolean, - * null - * - * @deprecated this method may throw an {@code Error} instead of returning - * {@code null}; please use {@link JSONValue#parseWithException(Reader)} - * instead - */ +public class JSONValue +{ + /** + * Parse JSON text into java object from the input source. Please use + * parseWithException() if you don't want to ignore the exception. + * + * @see org.json.simple.parser.JSONParser#parse(Reader) + * @see #parseWithException(Reader) + * + * @param in + * @return Instance of the following: org.json.simple.JSONObject, + * org.json.simple.JSONArray, java.lang.String, java.lang.Number, + * java.lang.Boolean, null + * + * @deprecated this method may throw an {@code Error} instead of returning + * {@code null}; please use + * {@link JSONValue#parseWithException(Reader)} instead + */ @Deprecated - public static Object parse(Reader in){ - try{ - JSONParser parser=new JSONParser(); - return parser.parse(in); - } - catch(Exception e){ - return null; - } - } - - /** - * Parse JSON text into java object from the given string. - * Please use parseWithException() if you don't want to ignore the exception. - * - * @see org.json.simple.parser.JSONParser#parse(Reader) - * @see #parseWithException(Reader) - * - * @param s - * @return Instance of the following: - * org.json.simple.JSONObject, - * org.json.simple.JSONArray, - * java.lang.String, - * java.lang.Number, - * java.lang.Boolean, - * null - * - * @deprecated this method may throw an {@code Error} instead of returning - * {@code null}; please use {@link JSONValue#parseWithException(String)} - * instead - */ + public static Object parse(Reader in) + { + try + { + JSONParser parser = new JSONParser(); + return parser.parse(in); + } catch (Exception e) + { + return null; + } + } + + /** + * Parse JSON text into java object from the given string. Please use + * parseWithException() if you don't want to ignore the exception. + * + * @see org.json.simple.parser.JSONParser#parse(Reader) + * @see #parseWithException(Reader) + * + * @param s + * @return Instance of the following: org.json.simple.JSONObject, + * org.json.simple.JSONArray, java.lang.String, java.lang.Number, + * java.lang.Boolean, null + * + * @deprecated this method may throw an {@code Error} instead of returning + * {@code null}; please use + * {@link JSONValue#parseWithException(String)} instead + */ @Deprecated - public static Object parse(String s){ - StringReader in=new StringReader(s); - return parse(in); - } - - /** - * Parse JSON text into java object from the input source. - * - * @see org.json.simple.parser.JSONParser - * - * @param in - * @return Instance of the following: - * org.json.simple.JSONObject, - * org.json.simple.JSONArray, - * java.lang.String, - * java.lang.Number, - * java.lang.Boolean, - * null - * - * @throws IOException - * @throws ParseException - */ - public static Object parseWithException(Reader in) throws IOException, ParseException{ - JSONParser parser=new JSONParser(); - return parser.parse(in); - } - - public static Object parseWithException(String s) throws ParseException{ - JSONParser parser=new JSONParser(); - return parser.parse(s); - } - - /** - * Encode an object into JSON text and write it to out. - *

        - * If this object is a Map or a List, and it's also a JSONStreamAware or a JSONAware, JSONStreamAware or JSONAware will be considered firstly. - *

        - * DO NOT call this method from writeJSONString(Writer) of a class that implements both JSONStreamAware and (Map or List) with - * "this" as the first parameter, use JSONObject.writeJSONString(Map, Writer) or JSONArray.writeJSONString(List, Writer) instead. - * - * @see org.json.simple.JSONObject#writeJSONString(Map, Writer) - * @see org.json.simple.JSONArray#writeJSONString(List, Writer) - * - * @param value - * @param writer - */ - public static void writeJSONString(Object value, Writer out) throws IOException { - if(value == null){ - out.write("null"); - return; - } - - if(value instanceof String){ - out.write('\"'); - out.write(escape((String)value)); - out.write('\"'); - return; - } - - if(value instanceof Double){ - if(((Double)value).isInfinite() || ((Double)value).isNaN()) - out.write("null"); - else - out.write(value.toString()); - return; - } - - if(value instanceof Float){ - if(((Float)value).isInfinite() || ((Float)value).isNaN()) - out.write("null"); - else - out.write(value.toString()); - return; - } - - if(value instanceof Number){ - out.write(value.toString()); - return; - } - - if(value instanceof Boolean){ - out.write(value.toString()); - return; - } - - if((value instanceof JSONStreamAware)){ - ((JSONStreamAware)value).writeJSONString(out); - return; - } - - if((value instanceof JSONAware)){ - out.write(((JSONAware)value).toJSONString()); - return; - } - - if(value instanceof Map){ - JSONObject.writeJSONString((Map)value, out); - return; - } - - if(value instanceof Collection){ - JSONArray.writeJSONString((Collection)value, out); - return; - } - - if(value instanceof byte[]){ - JSONArray.writeJSONString((byte[])value, out); - return; - } - - if(value instanceof short[]){ - JSONArray.writeJSONString((short[])value, out); - return; - } - - if(value instanceof int[]){ - JSONArray.writeJSONString((int[])value, out); - return; - } - - if(value instanceof long[]){ - JSONArray.writeJSONString((long[])value, out); - return; - } - - if(value instanceof float[]){ - JSONArray.writeJSONString((float[])value, out); - return; - } - - if(value instanceof double[]){ - JSONArray.writeJSONString((double[])value, out); - return; - } - - if(value instanceof boolean[]){ - JSONArray.writeJSONString((boolean[])value, out); - return; - } - - if(value instanceof char[]){ - JSONArray.writeJSONString((char[])value, out); - return; - } - - if(value instanceof Object[]){ - JSONArray.writeJSONString((Object[])value, out); - return; - } - - out.write(value.toString()); - } + public static Object parse(String s) + { + StringReader in = new StringReader(s); + return parse(in); + } + + /** + * Parse JSON text into java object from the input source. + * + * @see org.json.simple.parser.JSONParser + * + * @param in + * @return Instance of the following: org.json.simple.JSONObject, + * org.json.simple.JSONArray, java.lang.String, java.lang.Number, + * java.lang.Boolean, null + * + * @throws IOException + * @throws ParseException + */ + public static Object parseWithException(Reader in) + throws IOException, ParseException + { + JSONParser parser = new JSONParser(); + return parser.parse(in); + } + + public static Object parseWithException(String s) throws ParseException + { + JSONParser parser = new JSONParser(); + return parser.parse(s); + } + + /** + * Encode an object into JSON text and write it to out. + *

        + * If this object is a Map or a List, and it's also a JSONStreamAware or a + * JSONAware, JSONStreamAware or JSONAware will be considered firstly. + *

        + * DO NOT call this method from writeJSONString(Writer) of a class that + * implements both JSONStreamAware and (Map or List) with "this" as the first + * parameter, use JSONObject.writeJSONString(Map, Writer) or + * JSONArray.writeJSONString(List, Writer) instead. + * + * @see org.json.simple.JSONObject#writeJSONString(Map, Writer) + * @see org.json.simple.JSONArray#writeJSONString(List, Writer) + * + * @param value + * @param writer + */ + public static void writeJSONString(Object value, Writer out) + throws IOException + { + if (value == null) + { + out.write("null"); + return; + } + + if (value instanceof String) + { + out.write('\"'); + out.write(escape((String) value)); + out.write('\"'); + return; + } - /** - * Convert an object to JSON text. - *

        - * If this object is a Map or a List, and it's also a JSONAware, JSONAware will be considered firstly. - *

        - * DO NOT call this method from toJSONString() of a class that implements both JSONAware and Map or List with - * "this" as the parameter, use JSONObject.toJSONString(Map) or JSONArray.toJSONString(List) instead. - * - * @see org.json.simple.JSONObject#toJSONString(Map) - * @see org.json.simple.JSONArray#toJSONString(List) - * - * @param value - * @return JSON text, or "null" if value is null or it's an NaN or an INF number. - */ - public static String toJSONString(Object value){ - final StringWriter writer = new StringWriter(); - - try{ - writeJSONString(value, writer); - return writer.toString(); - } catch(IOException e){ - // This should never happen for a StringWriter - throw new RuntimeException(e); - } - } + if (value instanceof Double) + { + if (((Double) value).isInfinite() || ((Double) value).isNaN()) + out.write("null"); + else + out.write(value.toString()); + return; + } + + if (value instanceof Float) + { + if (((Float) value).isInfinite() || ((Float) value).isNaN()) + out.write("null"); + else + out.write(value.toString()); + return; + } - /** - * Escape quotes, \, /, \r, \n, \b, \f, \t and other control characters (U+0000 through U+001F). - * @param s - * @return - */ - public static String escape(String s){ - if(s==null) - return null; - StringBuffer sb = new StringBuffer(); - escape(s, sb); - return sb.toString(); + if (value instanceof Number) + { + out.write(value.toString()); + return; } - /** - * @param s - Must not be null. - * @param sb - */ - static void escape(String s, StringBuffer sb) { - final int len = s.length(); - for(int i=0;i='\u0000' && ch<='\u001F') || (ch>='\u007F' && ch<='\u009F') || (ch>='\u2000' && ch<='\u20FF')){ - String ss=Integer.toHexString(ch); - sb.append("\\u"); - for(int k=0;k<4-ss.length();k++){ - sb.append('0'); - } - sb.append(ss.toUpperCase(Locale.ROOT)); - } - else{ - sb.append(ch); - } - } - }//for - } + if (value instanceof Boolean) + { + out.write(value.toString()); + return; + } + + if ((value instanceof JSONStreamAware)) + { + ((JSONStreamAware) value).writeJSONString(out); + return; + } + + if ((value instanceof JSONAware)) + { + out.write(((JSONAware) value).toJSONString()); + return; + } + + if (value instanceof Map) + { + JSONObject.writeJSONString((Map) value, out); + return; + } + + if (value instanceof Collection) + { + JSONArray.writeJSONString((Collection) value, out); + return; + } + + if (value instanceof byte[]) + { + JSONArray.writeJSONString((byte[]) value, out); + return; + } + + if (value instanceof short[]) + { + JSONArray.writeJSONString((short[]) value, out); + return; + } + + if (value instanceof int[]) + { + JSONArray.writeJSONString((int[]) value, out); + return; + } + + if (value instanceof long[]) + { + JSONArray.writeJSONString((long[]) value, out); + return; + } + + if (value instanceof float[]) + { + JSONArray.writeJSONString((float[]) value, out); + return; + } + + if (value instanceof double[]) + { + JSONArray.writeJSONString((double[]) value, out); + return; + } + + if (value instanceof boolean[]) + { + JSONArray.writeJSONString((boolean[]) value, out); + return; + } + + if (value instanceof char[]) + { + JSONArray.writeJSONString((char[]) value, out); + return; + } + + if (value instanceof Object[]) + { + JSONArray.writeJSONString((Object[]) value, out); + return; + } + + out.write(value.toString()); + } + + /** + * Convert an object to JSON text. + *

        + * If this object is a Map or a List, and it's also a JSONAware, JSONAware + * will be considered firstly. + *

        + * DO NOT call this method from toJSONString() of a class that implements both + * JSONAware and Map or List with "this" as the parameter, use + * JSONObject.toJSONString(Map) or JSONArray.toJSONString(List) instead. + * + * @see org.json.simple.JSONObject#toJSONString(Map) + * @see org.json.simple.JSONArray#toJSONString(List) + * + * @param value + * @return JSON text, or "null" if value is null or it's an NaN or an INF + * number. + */ + public static String toJSONString(Object value) + { + final StringWriter writer = new StringWriter(); + + try + { + writeJSONString(value, writer); + return writer.toString(); + } catch (IOException e) + { + // This should never happen for a StringWriter + throw new RuntimeException(e); + } + } + + /** + * Escape quotes, \, /, \r, \n, \b, \f, \t and other control characters + * (U+0000 through U+001F). + * + * @param s + * @return + */ + public static String escape(String s) + { + if (s == null) + return null; + StringBuffer sb = new StringBuffer(); + escape(s, sb); + return sb.toString(); + } + + /** + * @param s + * - Must not be null. + * @param sb + */ + static void escape(String s, StringBuffer sb) + { + final int len = s.length(); + for (int i = 0; i < len; i++) + { + char ch = s.charAt(i); + switch (ch) + { + case '"': + sb.append("\\\""); + break; + case '\\': + sb.append("\\\\"); + break; + case '\b': + sb.append("\\b"); + break; + case '\f': + sb.append("\\f"); + break; + case '\n': + sb.append("\\n"); + break; + case '\r': + sb.append("\\r"); + break; + case '\t': + sb.append("\\t"); + break; + case '/': + sb.append("\\/"); + break; + default: + // Reference: http://www.unicode.org/versions/Unicode5.1.0/ + if ((ch >= '\u0000' && ch <= '\u001F') + || (ch >= '\u007F' && ch <= '\u009F') + || (ch >= '\u2000' && ch <= '\u20FF')) + { + String ss = Integer.toHexString(ch); + sb.append("\\u"); + for (int k = 0; k < 4 - ss.length(); k++) + { + sb.append('0'); + } + sb.append(ss.toUpperCase(Locale.ROOT)); + } + else + { + sb.append(ch); + } + } + } // for + } } diff --git a/src/org/json/simple/parser/ContainerFactory.java b/src/org/json/simple/parser/ContainerFactory.java index 0bb7baf..33f91cf 100644 --- a/src/org/json/simple/parser/ContainerFactory.java +++ b/src/org/json/simple/parser/ContainerFactory.java @@ -6,18 +6,22 @@ import java.util.Map; /** * Container factory for creating containers for JSON object and JSON array. * - * @see org.json.simple.parser.JSONParser#parse(java.io.Reader, ContainerFactory) + * @see org.json.simple.parser.JSONParser#parse(java.io.Reader, + * ContainerFactory) * * @author FangYidong */ -public interface ContainerFactory { - /** - * @return A Map instance to store JSON object, or null if you want to use org.json.simple.JSONObject. - */ - Map createObjectContainer(); - - /** - * @return A List instance to store JSON array, or null if you want to use org.json.simple.JSONArray. - */ - List creatArrayContainer(); +public interface ContainerFactory +{ + /** + * @return A Map instance to store JSON object, or null if you want to use + * org.json.simple.JSONObject. + */ + Map createObjectContainer(); + + /** + * @return A List instance to store JSON array, or null if you want to use + * org.json.simple.JSONArray. + */ + List creatArrayContainer(); } diff --git a/src/org/json/simple/parser/ContentHandler.java b/src/org/json/simple/parser/ContentHandler.java index 056a85c..f5f3c16 100644 --- a/src/org/json/simple/parser/ContentHandler.java +++ b/src/org/json/simple/parser/ContentHandler.java @@ -3,108 +3,109 @@ package org.json.simple.parser; import java.io.IOException; /** - * A simplified and stoppable SAX-like content handler for stream processing of JSON text. + * A simplified and stoppable SAX-like content handler for stream processing of + * JSON text. * * @see org.xml.sax.ContentHandler - * @see org.json.simple.parser.JSONParser#parse(java.io.Reader, ContentHandler, boolean) + * @see org.json.simple.parser.JSONParser#parse(java.io.Reader, ContentHandler, + * boolean) * * @author FangYidong */ -public interface ContentHandler { - /** - * Receive notification of the beginning of JSON processing. - * The parser will invoke this method only once. - * - * @throws ParseException - * - JSONParser will stop and throw the same exception to the caller when receiving this exception. - */ - void startJSON() throws ParseException, IOException; - - /** - * Receive notification of the end of JSON processing. - * - * @throws ParseException - */ - void endJSON() throws ParseException, IOException; - - /** - * Receive notification of the beginning of a JSON object. - * - * @return false if the handler wants to stop parsing after return. - * @throws ParseException - * - JSONParser will stop and throw the same exception to the caller when receiving this exception. - * @see #endJSON - */ - boolean startObject() throws ParseException, IOException; - - /** - * Receive notification of the end of a JSON object. - * - * @return false if the handler wants to stop parsing after return. - * @throws ParseException - * - * @see #startObject - */ - boolean endObject() throws ParseException, IOException; - - /** - * Receive notification of the beginning of a JSON object entry. - * - * @param key - Key of a JSON object entry. - * - * @return false if the handler wants to stop parsing after return. - * @throws ParseException - * - * @see #endObjectEntry - */ - boolean startObjectEntry(String key) throws ParseException, IOException; - - /** - * Receive notification of the end of the value of previous object entry. - * - * @return false if the handler wants to stop parsing after return. - * @throws ParseException - * - * @see #startObjectEntry - */ - boolean endObjectEntry() throws ParseException, IOException; - - /** - * Receive notification of the beginning of a JSON array. - * - * @return false if the handler wants to stop parsing after return. - * @throws ParseException - * - * @see #endArray - */ - boolean startArray() throws ParseException, IOException; - - /** - * Receive notification of the end of a JSON array. - * - * @return false if the handler wants to stop parsing after return. - * @throws ParseException - * - * @see #startArray - */ - boolean endArray() throws ParseException, IOException; - - /** - * Receive notification of the JSON primitive values: - * java.lang.String, - * java.lang.Number, - * java.lang.Boolean - * null - * - * @param value - Instance of the following: - * java.lang.String, - * java.lang.Number, - * java.lang.Boolean - * null - * - * @return false if the handler wants to stop parsing after return. - * @throws ParseException - */ - boolean primitive(Object value) throws ParseException, IOException; - +public interface ContentHandler +{ + /** + * Receive notification of the beginning of JSON processing. The parser will + * invoke this method only once. + * + * @throws ParseException + * - JSONParser will stop and throw the same exception to the caller + * when receiving this exception. + */ + void startJSON() throws ParseException, IOException; + + /** + * Receive notification of the end of JSON processing. + * + * @throws ParseException + */ + void endJSON() throws ParseException, IOException; + + /** + * Receive notification of the beginning of a JSON object. + * + * @return false if the handler wants to stop parsing after return. + * @throws ParseException + * - JSONParser will stop and throw the same exception to the caller + * when receiving this exception. + * @see #endJSON + */ + boolean startObject() throws ParseException, IOException; + + /** + * Receive notification of the end of a JSON object. + * + * @return false if the handler wants to stop parsing after return. + * @throws ParseException + * + * @see #startObject + */ + boolean endObject() throws ParseException, IOException; + + /** + * Receive notification of the beginning of a JSON object entry. + * + * @param key + * - Key of a JSON object entry. + * + * @return false if the handler wants to stop parsing after return. + * @throws ParseException + * + * @see #endObjectEntry + */ + boolean startObjectEntry(String key) throws ParseException, IOException; + + /** + * Receive notification of the end of the value of previous object entry. + * + * @return false if the handler wants to stop parsing after return. + * @throws ParseException + * + * @see #startObjectEntry + */ + boolean endObjectEntry() throws ParseException, IOException; + + /** + * Receive notification of the beginning of a JSON array. + * + * @return false if the handler wants to stop parsing after return. + * @throws ParseException + * + * @see #endArray + */ + boolean startArray() throws ParseException, IOException; + + /** + * Receive notification of the end of a JSON array. + * + * @return false if the handler wants to stop parsing after return. + * @throws ParseException + * + * @see #startArray + */ + boolean endArray() throws ParseException, IOException; + + /** + * Receive notification of the JSON primitive values: java.lang.String, + * java.lang.Number, java.lang.Boolean null + * + * @param value + * - Instance of the following: java.lang.String, java.lang.Number, + * java.lang.Boolean null + * + * @return false if the handler wants to stop parsing after return. + * @throws ParseException + */ + boolean primitive(Object value) throws ParseException, IOException; + } diff --git a/src/org/json/simple/parser/ParseException.java b/src/org/json/simple/parser/ParseException.java index 09b1fd4..f5f087f 100644 --- a/src/org/json/simple/parser/ParseException.java +++ b/src/org/json/simple/parser/ParseException.java @@ -6,85 +6,106 @@ package org.json.simple.parser; * @author FangYidong * */ -public class ParseException extends Exception { - private static final long serialVersionUID = -7880698968187728547L; - - public static final int ERROR_UNEXPECTED_CHAR = 0; - public static final int ERROR_UNEXPECTED_TOKEN = 1; - public static final int ERROR_UNEXPECTED_EXCEPTION = 2; - - private int errorType; - private Object unexpectedObject; - private int position; - - public ParseException(int errorType){ - this(-1, errorType, null); - } - - public ParseException(int errorType, Object unexpectedObject){ - this(-1, errorType, unexpectedObject); - } - - public ParseException(int position, int errorType, Object unexpectedObject){ - this.position = position; - this.errorType = errorType; - this.unexpectedObject = unexpectedObject; - } - - public int getErrorType() { - return errorType; - } - - public void setErrorType(int errorType) { - this.errorType = errorType; - } - - /** - * @see org.json.simple.parser.JSONParser#getPosition() - * - * @return The character position (starting with 0) of the input where the error occurs. - */ - public int getPosition() { - return position; - } - - public void setPosition(int position) { - this.position = position; - } - - /** - * @see org.json.simple.parser.Yytoken - * - * @return One of the following base on the value of errorType: - * ERROR_UNEXPECTED_CHAR java.lang.Character - * ERROR_UNEXPECTED_TOKEN org.json.simple.parser.Yytoken - * ERROR_UNEXPECTED_EXCEPTION java.lang.Exception - */ - public Object getUnexpectedObject() { - return unexpectedObject; - } - - public void setUnexpectedObject(Object unexpectedObject) { - this.unexpectedObject = unexpectedObject; - } - - public String getMessage() { - StringBuffer sb = new StringBuffer(); - - switch(errorType){ - case ERROR_UNEXPECTED_CHAR: - sb.append("Unexpected character (").append(unexpectedObject).append(") at position ").append(position).append("."); - break; - case ERROR_UNEXPECTED_TOKEN: - sb.append("Unexpected token ").append(unexpectedObject).append(" at position ").append(position).append("."); - break; - case ERROR_UNEXPECTED_EXCEPTION: - sb.append("Unexpected exception at position ").append(position).append(": ").append(unexpectedObject); - break; - default: - sb.append("Unkown error at position ").append(position).append("."); - break; - } - return sb.toString(); - } +public class ParseException extends Exception +{ + private static final long serialVersionUID = -7880698968187728547L; + + public static final int ERROR_UNEXPECTED_CHAR = 0; + + public static final int ERROR_UNEXPECTED_TOKEN = 1; + + public static final int ERROR_UNEXPECTED_EXCEPTION = 2; + + private int errorType; + + private Object unexpectedObject; + + private int position; + + public ParseException(int errorType) + { + this(-1, errorType, null); + } + + public ParseException(int errorType, Object unexpectedObject) + { + this(-1, errorType, unexpectedObject); + } + + public ParseException(int position, int errorType, + Object unexpectedObject) + { + this.position = position; + this.errorType = errorType; + this.unexpectedObject = unexpectedObject; + } + + public int getErrorType() + { + return errorType; + } + + public void setErrorType(int errorType) + { + this.errorType = errorType; + } + + /** + * @see org.json.simple.parser.JSONParser#getPosition() + * + * @return The character position (starting with 0) of the input where the + * error occurs. + */ + public int getPosition() + { + return position; + } + + public void setPosition(int position) + { + this.position = position; + } + + /** + * @see org.json.simple.parser.Yytoken + * + * @return One of the following base on the value of errorType: + * ERROR_UNEXPECTED_CHAR java.lang.Character ERROR_UNEXPECTED_TOKEN + * org.json.simple.parser.Yytoken ERROR_UNEXPECTED_EXCEPTION + * java.lang.Exception + */ + public Object getUnexpectedObject() + { + return unexpectedObject; + } + + public void setUnexpectedObject(Object unexpectedObject) + { + this.unexpectedObject = unexpectedObject; + } + + public String getMessage() + { + StringBuffer sb = new StringBuffer(); + + switch (errorType) + { + case ERROR_UNEXPECTED_CHAR: + sb.append("Unexpected character (").append(unexpectedObject) + .append(") at position ").append(position).append("."); + break; + case ERROR_UNEXPECTED_TOKEN: + sb.append("Unexpected token ").append(unexpectedObject) + .append(" at position ").append(position).append("."); + break; + case ERROR_UNEXPECTED_EXCEPTION: + sb.append("Unexpected exception at position ").append(position) + .append(": ").append(unexpectedObject); + break; + default: + sb.append("Unkown error at position ").append(position).append("."); + break; + } + return sb.toString(); + } } diff --git a/src/org/json/simple/parser/Yylex.java b/src/org/json/simple/parser/Yylex.java index 41569d6..7998faf 100644 --- a/src/org/json/simple/parser/Yylex.java +++ b/src/org/json/simple/parser/Yylex.java @@ -2,7 +2,8 @@ package org.json.simple.parser; -class Yylex { +class Yylex +{ /** This character denotes the end of file */ public static final int YYEOF = -1; @@ -12,207 +13,182 @@ class Yylex { /** lexical states */ public static final int YYINITIAL = 0; + public static final int STRING_BEGIN = 2; /** * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l - * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l - * at the beginning of a line - * l is of the form l = 2*k, k a non negative integer + * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l at the + * beginning of a line l is of the form l = 2*k, k a non negative integer */ - private static final int ZZ_LEXSTATE[] = { - 0, 0, 1, 1 - }; + private static final int ZZ_LEXSTATE[] = { 0, 0, 1, 1 }; - /** + /** * Translates characters to character classes */ - private static final String ZZ_CMAP_PACKED = - "\11\0\1\7\1\7\2\0\1\7\22\0\1\7\1\0\1\11\10\0"+ - "\1\6\1\31\1\2\1\4\1\12\12\3\1\32\6\0\4\1\1\5"+ - "\1\1\24\0\1\27\1\10\1\30\3\0\1\22\1\13\2\1\1\21"+ - "\1\14\5\0\1\23\1\0\1\15\3\0\1\16\1\24\1\17\1\20"+ - "\5\0\1\25\1\0\1\26\uff82\0"; - - /** + private static final String ZZ_CMAP_PACKED = "\11\0\1\7\1\7\2\0\1\7\22\0\1\7\1\0\1\11\10\0" + + "\1\6\1\31\1\2\1\4\1\12\12\3\1\32\6\0\4\1\1\5" + + "\1\1\24\0\1\27\1\10\1\30\3\0\1\22\1\13\2\1\1\21" + + "\1\14\5\0\1\23\1\0\1\15\3\0\1\16\1\24\1\17\1\20" + + "\5\0\1\25\1\0\1\26\uff82\0"; + + /** * Translates characters to character classes */ - private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED); + private static final char[] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED); - /** + /** * Translates DFA states to action switch labels. */ - private static final int [] ZZ_ACTION = zzUnpackAction(); + private static final int[] ZZ_ACTION = zzUnpackAction(); - private static final String ZZ_ACTION_PACKED_0 = - "\2\0\2\1\1\2\1\3\1\4\3\1\1\5\1\6"+ - "\1\7\1\10\1\11\1\12\1\13\1\14\1\15\5\0"+ - "\1\14\1\16\1\17\1\20\1\21\1\22\1\23\1\24"+ - "\1\0\1\25\1\0\1\25\4\0\1\26\1\27\2\0"+ - "\1\30"; + private static final String ZZ_ACTION_PACKED_0 = "\2\0\2\1\1\2\1\3\1\4\3\1\1\5\1\6" + + "\1\7\1\10\1\11\1\12\1\13\1\14\1\15\5\0" + + "\1\14\1\16\1\17\1\20\1\21\1\22\1\23\1\24" + + "\1\0\1\25\1\0\1\25\4\0\1\26\1\27\2\0" + "\1\30"; - private static int [] zzUnpackAction() { - int [] result = new int[45]; + private static int[] zzUnpackAction() + { + int[] result = new int[45]; int offset = 0; offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); return result; } - private static int zzUnpackAction(String packed, int offset, int [] result) { - int i = 0; /* index in packed string */ - int j = offset; /* index in unpacked array */ + private static int zzUnpackAction(String packed, int offset, int[] result) + { + int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ int l = packed.length(); - while (i < l) { + while (i < l) + { int count = packed.charAt(i++); int value = packed.charAt(i++); - do result[j++] = value; while (--count > 0); + do + result[j++] = value; + while (--count > 0); } return j; } - - /** + /** * Translates a state to a row index in the transition table */ - private static final int [] ZZ_ROWMAP = zzUnpackRowMap(); - - private static final String ZZ_ROWMAP_PACKED_0 = - "\0\0\0\33\0\66\0\121\0\154\0\207\0\66\0\242"+ - "\0\275\0\330\0\66\0\66\0\66\0\66\0\66\0\66"+ - "\0\363\0\u010e\0\66\0\u0129\0\u0144\0\u015f\0\u017a\0\u0195"+ - "\0\66\0\66\0\66\0\66\0\66\0\66\0\66\0\66"+ - "\0\u01b0\0\u01cb\0\u01e6\0\u01e6\0\u0201\0\u021c\0\u0237\0\u0252"+ - "\0\66\0\66\0\u026d\0\u0288\0\66"; - - private static int [] zzUnpackRowMap() { - int [] result = new int[45]; + private static final int[] ZZ_ROWMAP = zzUnpackRowMap(); + + private static final String ZZ_ROWMAP_PACKED_0 = "\0\0\0\33\0\66\0\121\0\154\0\207\0\66\0\242" + + "\0\275\0\330\0\66\0\66\0\66\0\66\0\66\0\66" + + "\0\363\0\u010e\0\66\0\u0129\0\u0144\0\u015f\0\u017a\0\u0195" + + "\0\66\0\66\0\66\0\66\0\66\0\66\0\66\0\66" + + "\0\u01b0\0\u01cb\0\u01e6\0\u01e6\0\u0201\0\u021c\0\u0237\0\u0252" + + "\0\66\0\66\0\u026d\0\u0288\0\66"; + + private static int[] zzUnpackRowMap() + { + int[] result = new int[45]; int offset = 0; offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); return result; } - private static int zzUnpackRowMap(String packed, int offset, int [] result) { - int i = 0; /* index in packed string */ - int j = offset; /* index in unpacked array */ + private static int zzUnpackRowMap(String packed, int offset, int[] result) + { + int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ int l = packed.length(); - while (i < l) { + while (i < l) + { int high = packed.codePointAt(i++) << 16; result[j++] = high | packed.codePointAt(i++); } return j; } - /** + /** * The transition table of the DFA */ - private static final int ZZ_TRANS [] = { - 2, 2, 3, 4, 2, 2, 2, 5, 2, 6, - 2, 2, 7, 8, 2, 9, 2, 2, 2, 2, - 2, 10, 11, 12, 13, 14, 15, 16, 16, 16, - 16, 16, 16, 16, 16, 17, 18, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 4, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 4, 19, 20, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 20, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 5, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 21, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 22, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 23, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 16, 16, 16, 16, 16, 16, 16, - 16, -1, -1, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - -1, -1, -1, -1, -1, -1, -1, -1, 24, 25, - 26, 27, 28, 29, 30, 31, 32, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 34, 35, -1, -1, - 34, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 36, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 37, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 38, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 39, -1, 39, -1, 39, -1, -1, - -1, -1, -1, 39, 39, -1, -1, -1, -1, 39, - 39, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 33, -1, 20, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 20, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 35, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 38, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 40, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 41, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 42, -1, 42, -1, 42, - -1, -1, -1, -1, -1, 42, 42, -1, -1, -1, - -1, 42, 42, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 43, -1, 43, -1, 43, -1, -1, -1, - -1, -1, 43, 43, -1, -1, -1, -1, 43, 43, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 44, - -1, 44, -1, 44, -1, -1, -1, -1, -1, 44, - 44, -1, -1, -1, -1, 44, 44, -1, -1, -1, - -1, -1, -1, -1, -1, - }; + private static final int ZZ_TRANS[] = { 2, 2, 3, 4, 2, 2, 2, 5, 2, 6, 2, + 2, 7, 8, 2, 9, 2, 2, 2, 2, 2, 10, 11, 12, 13, 14, 15, 16, 16, 16, 16, + 16, 16, 16, 16, 17, 18, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4, 19, 20, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 20, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 21, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 22, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 23, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 16, 16, 16, 16, 16, 16, 16, 16, -1, -1, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, -1, -1, + -1, -1, -1, -1, -1, -1, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 34, 35, -1, -1, 34, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 36, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 37, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 38, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 39, -1, 39, -1, 39, -1, -1, -1, -1, + -1, 39, 39, -1, -1, -1, -1, 39, 39, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 33, -1, 20, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 20, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 35, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 38, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 40, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 41, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 42, -1, 42, -1, 42, -1, -1, -1, -1, -1, 42, 42, -1, -1, -1, -1, 42, + 42, -1, -1, -1, -1, -1, -1, -1, -1, -1, 43, -1, 43, -1, 43, -1, -1, + -1, -1, -1, 43, 43, -1, -1, -1, -1, 43, 43, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 44, -1, 44, -1, 44, -1, -1, -1, -1, -1, 44, 44, -1, -1, + -1, -1, 44, 44, -1, -1, -1, -1, -1, -1, -1, -1, }; /* error codes */ private static final int ZZ_UNKNOWN_ERROR = 0; + private static final int ZZ_NO_MATCH = 1; + private static final int ZZ_PUSHBACK_2BIG = 2; /* error messages for the codes above */ private static final String ZZ_ERROR_MSG[] = { - "Unkown internal scanner error", - "Error: could not match input", - "Error: pushback value was too large" - }; + "Unkown internal scanner error", "Error: could not match input", + "Error: pushback value was too large" }; /** * ZZ_ATTRIBUTE[aState] contains the attributes of state aState */ - private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute(); + private static final int[] ZZ_ATTRIBUTE = zzUnpackAttribute(); - private static final String ZZ_ATTRIBUTE_PACKED_0 = - "\2\0\1\11\3\1\1\11\3\1\6\11\2\1\1\11"+ - "\5\0\10\11\1\0\1\1\1\0\1\1\4\0\2\11"+ - "\2\0\1\11"; + private static final String ZZ_ATTRIBUTE_PACKED_0 = "\2\0\1\11\3\1\1\11\3\1\6\11\2\1\1\11" + + "\5\0\10\11\1\0\1\1\1\0\1\1\4\0\2\11" + "\2\0\1\11"; - private static int [] zzUnpackAttribute() { - int [] result = new int[45]; + private static int[] zzUnpackAttribute() + { + int[] result = new int[45]; int offset = 0; offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); return result; } - private static int zzUnpackAttribute(String packed, int offset, int [] result) { - int i = 0; /* index in packed string */ - int j = offset; /* index in unpacked array */ + private static int zzUnpackAttribute(String packed, int offset, + int[] result) + { + int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ int l = packed.length(); - while (i < l) { + while (i < l) + { int count = packed.charAt(i++); int value = packed.charAt(i++); - do result[j++] = value; while (--count > 0); + do + result[j++] = value; + while (--count > 0); } return j; } @@ -226,8 +202,10 @@ class Yylex { /** the current lexical state */ private int zzLexicalState = YYINITIAL; - /** this buffer contains the current text to be matched and is - the source of the yytext() string */ + /** + * this buffer contains the current text to be matched and is the source of + * the yytext() string + */ private char zzBuffer[] = new char[ZZ_BUFFERSIZE]; /** the textposition at the last accepting state */ @@ -239,8 +217,10 @@ class Yylex { /** startRead marks the beginning of the yytext() string in the buffer */ private int zzStartRead; - /** endRead marks the last character in the buffer, that has been read - from input */ + /** + * endRead marks the last character in the buffer, that has been read from + * input + */ private int zzEndRead; /** number of newlines encountered up to the start of the matched text */ @@ -250,12 +230,12 @@ class Yylex { private int yychar; /** - * the number of characters from the last newline up to the start of the + * the number of characters from the last newline up to the start of the * matched text */ private int yycolumn; - /** + /** * zzAtBOL == true <=> the scanner is currently at the beginning of a line */ private boolean zzAtBOL = true; @@ -264,233 +244,251 @@ class Yylex { private boolean zzAtEOF; /* user code: */ -private StringBuffer sb=new StringBuffer(); - -int getPosition(){ - return yychar; -} - + private StringBuffer sb = new StringBuffer(); + int getPosition() + { + return yychar; + } /** - * Creates a new scanner - * There is also a java.io.InputStream version of this constructor. + * Creates a new scanner There is also a java.io.InputStream version of this + * constructor. * - * @param in the java.io.Reader to read input from. + * @param in + * the java.io.Reader to read input from. */ - Yylex(java.io.Reader in) { + Yylex(java.io.Reader in) + { this.zzReader = in; } /** - * Creates a new scanner. - * There is also java.io.Reader version of this constructor. + * Creates a new scanner. There is also java.io.Reader version of this + * constructor. * - * @param in the java.io.Inputstream to read input from. + * @param in + * the java.io.Inputstream to read input from. */ - Yylex(java.io.InputStream in) { + Yylex(java.io.InputStream in) + { this(new java.io.InputStreamReader(in)); } - /** + /** * Unpacks the compressed character translation table. * - * @param packed the packed character translation table - * @return the unpacked character translation table + * @param packed + * the packed character translation table + * @return the unpacked character translation table */ - private static char [] zzUnpackCMap(String packed) { - char [] map = new char[0x10000]; - int i = 0; /* index in packed string */ - int j = 0; /* index in unpacked array */ - while (i < 90) { - int count = packed.charAt(i++); + private static char[] zzUnpackCMap(String packed) + { + char[] map = new char[0x10000]; + int i = 0; /* index in packed string */ + int j = 0; /* index in unpacked array */ + while (i < 90) + { + int count = packed.charAt(i++); char value = packed.charAt(i++); - do map[j++] = value; while (--count > 0); + do + map[j++] = value; + while (--count > 0); } return map; } - /** * Refills the input buffer. * - * @return false, iff there was new input. + * @return false, iff there was new input. * - * @exception java.io.IOException if any I/O-Error occurs + * @exception java.io.IOException + * if any I/O-Error occurs */ - private boolean zzRefill() throws java.io.IOException { + private boolean zzRefill() throws java.io.IOException + { /* first: make room (if you can) */ - if (zzStartRead > 0) { - System.arraycopy(zzBuffer, zzStartRead, - zzBuffer, 0, - zzEndRead-zzStartRead); + if (zzStartRead > 0) + { + System.arraycopy(zzBuffer, zzStartRead, zzBuffer, 0, + zzEndRead - zzStartRead); /* translate stored positions */ - zzEndRead-= zzStartRead; - zzCurrentPos-= zzStartRead; - zzMarkedPos-= zzStartRead; + zzEndRead -= zzStartRead; + zzCurrentPos -= zzStartRead; + zzMarkedPos -= zzStartRead; zzStartRead = 0; } /* is the buffer big enough? */ - if (zzCurrentPos >= zzBuffer.length) { + if (zzCurrentPos >= zzBuffer.length) + { /* if not: blow it up */ - char newBuffer[] = new char[zzCurrentPos*2]; + char newBuffer[] = new char[zzCurrentPos * 2]; System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length); zzBuffer = newBuffer; } /* finally: fill the buffer with new input */ int numRead = zzReader.read(zzBuffer, zzEndRead, - zzBuffer.length-zzEndRead); + zzBuffer.length - zzEndRead); - if (numRead > 0) { - zzEndRead+= numRead; + if (numRead > 0) + { + zzEndRead += numRead; return false; } - // unlikely but not impossible: read 0 characters, but not at end of stream - if (numRead == 0) { + // unlikely but not impossible: read 0 characters, but not at end of stream + if (numRead == 0) + { int c = zzReader.read(); - if (c == -1) { + if (c == -1) + { return true; - } else { + } + else + { zzBuffer[zzEndRead++] = (char) c; return false; - } + } } - // numRead < 0 + // numRead < 0 return true; } - /** * Closes the input stream. */ - public final void yyclose() throws java.io.IOException { - zzAtEOF = true; /* indicate end of file */ - zzEndRead = zzStartRead; /* invalidate buffer */ + public final void yyclose() throws java.io.IOException + { + zzAtEOF = true; /* indicate end of file */ + zzEndRead = zzStartRead; /* invalidate buffer */ if (zzReader != null) zzReader.close(); } - /** - * Resets the scanner to read from a new input stream. - * Does not close the old reader. + * Resets the scanner to read from a new input stream. Does not close the old + * reader. * - * All internal variables are reset, the old input stream - * cannot be reused (internal buffer is discarded and lost). - * Lexical state is set to ZZ_INITIAL. + * All internal variables are reset, the old input stream cannot be + * reused (internal buffer is discarded and lost). Lexical state is set to + * ZZ_INITIAL. * - * @param reader the new input stream + * @param reader + * the new input stream */ - public final void yyreset(java.io.Reader reader) { + public final void yyreset(java.io.Reader reader) + { zzReader = reader; - zzAtBOL = true; - zzAtEOF = false; + zzAtBOL = true; + zzAtEOF = false; zzEndRead = zzStartRead = 0; zzCurrentPos = zzMarkedPos = 0; yyline = yychar = yycolumn = 0; zzLexicalState = YYINITIAL; } - /** * Returns the current lexical state. */ - public final int yystate() { + public final int yystate() + { return zzLexicalState; } - /** * Enters a new lexical state * - * @param newState the new lexical state + * @param newState + * the new lexical state */ - public final void yybegin(int newState) { + public final void yybegin(int newState) + { zzLexicalState = newState; } - /** * Returns the text matched by the current regular expression. */ - public final String yytext() { - return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead ); + public final String yytext() + { + return new String(zzBuffer, zzStartRead, zzMarkedPos - zzStartRead); } - /** - * Returns the character at position pos from the - * matched text. + * Returns the character at position pos from the matched text. * * It is equivalent to yytext().charAt(pos), but faster * - * @param pos the position of the character to fetch. - * A value from 0 to yylength()-1. + * @param pos + * the position of the character to fetch. A value from 0 to + * yylength()-1. * * @return the character at position pos */ - public final char yycharat(int pos) { - return zzBuffer[zzStartRead+pos]; + public final char yycharat(int pos) + { + return zzBuffer[zzStartRead + pos]; } - /** * Returns the length of the matched text region. */ - public final int yylength() { - return zzMarkedPos-zzStartRead; + public final int yylength() + { + return zzMarkedPos - zzStartRead; } - /** * Reports an error that occured while scanning. * - * In a wellformed scanner (no or only correct usage of - * yypushback(int) and a match-all fallback rule) this method - * will only be called with things that "Can't Possibly Happen". - * If this method is called, something is seriously wrong - * (e.g. a JFlex bug producing a faulty scanner etc.). + * In a wellformed scanner (no or only correct usage of yypushback(int) and a + * match-all fallback rule) this method will only be called with things that + * "Can't Possibly Happen". If this method is called, something is seriously + * wrong (e.g. a JFlex bug producing a faulty scanner etc.). * - * Usual syntax/scanner level error handling should be done - * in error fallback rules. + * Usual syntax/scanner level error handling should be done in error fallback + * rules. * - * @param errorCode the code of the errormessage to display + * @param errorCode + * the code of the errormessage to display */ - private void zzScanError(int errorCode) { + private void zzScanError(int errorCode) + { String message; - try { + try + { message = ZZ_ERROR_MSG[errorCode]; - } - catch (ArrayIndexOutOfBoundsException e) { + } catch (ArrayIndexOutOfBoundsException e) + { message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; } throw new Error(message); - } - + } /** * Pushes the specified amount of characters back into the input stream. * * They will be read again by then next call of the scanning method * - * @param number the number of characters to be read again. - * This number must not be greater than yylength()! + * @param number + * the number of characters to be read again. This number must not be + * greater than yylength()! */ - public void yypushback(int number) { - if ( number > yylength() ) + public void yypushback(int number) + { + if (number > yylength()) zzScanError(ZZ_PUSHBACK_2BIG); zzMarkedPos -= number; } - /** * Resumes scanning until the next regular expression is matched, the end of * input is encountered or an I/O-Error occurs. @@ -754,5 +752,4 @@ int getPosition(){ } } - } diff --git a/src/org/json/simple/parser/Yytoken.java b/src/org/json/simple/parser/Yytoken.java index 9d7e7e7..5f2c077 100644 --- a/src/org/json/simple/parser/Yytoken.java +++ b/src/org/json/simple/parser/Yytoken.java @@ -7,52 +7,65 @@ package org.json.simple.parser; /** * @author FangYidong */ -public class Yytoken { - public static final int TYPE_VALUE=0;//JSON primitive value: string,number,boolean,null - public static final int TYPE_LEFT_BRACE=1; - public static final int TYPE_RIGHT_BRACE=2; - public static final int TYPE_LEFT_SQUARE=3; - public static final int TYPE_RIGHT_SQUARE=4; - public static final int TYPE_COMMA=5; - public static final int TYPE_COLON=6; - public static final int TYPE_EOF=-1;//end of file - - public int type=0; - public Object value=null; - - public Yytoken(int type,Object value){ - this.type=type; - this.value=value; - } - - public String toString(){ - StringBuffer sb = new StringBuffer(); - switch(type){ - case TYPE_VALUE: - sb.append("VALUE(").append(value).append(")"); - break; - case TYPE_LEFT_BRACE: - sb.append("LEFT BRACE({)"); - break; - case TYPE_RIGHT_BRACE: - sb.append("RIGHT BRACE(})"); - break; - case TYPE_LEFT_SQUARE: - sb.append("LEFT SQUARE([)"); - break; - case TYPE_RIGHT_SQUARE: - sb.append("RIGHT SQUARE(])"); - break; - case TYPE_COMMA: - sb.append("COMMA(,)"); - break; - case TYPE_COLON: - sb.append("COLON(:)"); - break; - case TYPE_EOF: - sb.append("END OF FILE"); - break; - } - return sb.toString(); - } +public class Yytoken +{ + public static final int TYPE_VALUE = 0;// JSON primitive value: + // string,number,boolean,null + + public static final int TYPE_LEFT_BRACE = 1; + + public static final int TYPE_RIGHT_BRACE = 2; + + public static final int TYPE_LEFT_SQUARE = 3; + + public static final int TYPE_RIGHT_SQUARE = 4; + + public static final int TYPE_COMMA = 5; + + public static final int TYPE_COLON = 6; + + public static final int TYPE_EOF = -1;// end of file + + public int type = 0; + + public Object value = null; + + public Yytoken(int type, Object value) + { + this.type = type; + this.value = value; + } + + public String toString() + { + StringBuffer sb = new StringBuffer(); + switch (type) + { + case TYPE_VALUE: + sb.append("VALUE(").append(value).append(")"); + break; + case TYPE_LEFT_BRACE: + sb.append("LEFT BRACE({)"); + break; + case TYPE_RIGHT_BRACE: + sb.append("RIGHT BRACE(})"); + break; + case TYPE_LEFT_SQUARE: + sb.append("LEFT SQUARE([)"); + break; + case TYPE_RIGHT_SQUARE: + sb.append("RIGHT SQUARE(])"); + break; + case TYPE_COMMA: + sb.append("COMMA(,)"); + break; + case TYPE_COLON: + sb.append("COLON(:)"); + break; + case TYPE_EOF: + sb.append("END OF FILE"); + break; + } + return sb.toString(); + } } diff --git a/src/org/stackoverflowusers/file/WindowsShortcut.java b/src/org/stackoverflowusers/file/WindowsShortcut.java index 60c814b..c2f1964 100644 --- a/src/org/stackoverflowusers/file/WindowsShortcut.java +++ b/src/org/stackoverflowusers/file/WindowsShortcut.java @@ -9,208 +9,264 @@ import java.text.ParseException; import java.util.Locale; /** - * Represents a Windows shortcut (typically visible to Java only as a '.lnk' file). + * Represents a Windows shortcut (typically visible to Java only as a '.lnk' + * file). * - * Retrieved 2011-09-23 from http://stackoverflow.com/questions/309495/windows-shortcut-lnk-parser-in-java/672775#672775 + * Retrieved 2011-09-23 from + * http://stackoverflow.com/questions/309495/windows-shortcut-lnk-parser-in-java/672775#672775 * Originally called LnkParser * - * Written by: (the stack overflow users, obviously!) - * Apache Commons VFS dependency removed by crysxd (why were we using that!?) https://github.com/crysxd - * Headerified, refactored and commented by Code Bling http://stackoverflow.com/users/675721/code-bling - * Network file support added by Stefan Cordes http://stackoverflow.com/users/81330/stefan-cordes - * Adapted by Sam Brightman http://stackoverflow.com/users/2492/sam-brightman - * Based on information in 'The Windows Shortcut File Format' by Jesse Hager <jessehager@iname.com> - * And somewhat based on code from the book 'Swing Hacks: Tips and Tools for Killer GUIs' - * by Joshua Marinacci and Chris Adamson - * ISBN: 0-596-00907-0 - * http://www.oreilly.com/catalog/swinghks/ + * Written by: (the stack overflow users, obviously!) Apache Commons VFS + * dependency removed by crysxd (why were we using that!?) + * https://github.com/crysxd Headerified, refactored and commented by Code Bling + * http://stackoverflow.com/users/675721/code-bling Network file support added + * by Stefan Cordes http://stackoverflow.com/users/81330/stefan-cordes Adapted + * by Sam Brightman http://stackoverflow.com/users/2492/sam-brightman Based on + * information in 'The Windows Shortcut File Format' by Jesse Hager + * <jessehager@iname.com> And somewhat based on code from the book 'Swing + * Hacks: Tips and Tools for Killer GUIs' by Joshua Marinacci and Chris Adamson + * ISBN: 0-596-00907-0 http://www.oreilly.com/catalog/swinghks/ */ public class WindowsShortcut { - private boolean isDirectory; - private boolean isLocal; - private String real_file; - - /** - * Provides a quick test to see if this could be a valid link ! - * If you try to instantiate a new WindowShortcut and the link is not valid, - * Exceptions may be thrown and Exceptions are extremely slow to generate, - * therefore any code needing to loop through several files should first check this. - * - * @param file the potential link - * @return true if may be a link, false otherwise - * @throws IOException if an IOException is thrown while reading from the file - */ - public static boolean isPotentialValidLink(File file) throws IOException { - final int minimum_length = 0x64; - InputStream fis = new FileInputStream(file); - boolean isPotentiallyValid = false; - try { - isPotentiallyValid = file.isFile() - && file.getName().toLowerCase(Locale.ROOT).endsWith(".lnk") - && fis.available() >= minimum_length - && isMagicPresent(getBytes(fis, 32)); - } finally { - fis.close(); - } - return isPotentiallyValid; - } + private boolean isDirectory; - public WindowsShortcut(File file) throws IOException, ParseException { - InputStream in = new FileInputStream(file); - try { - parseLink(getBytes(in)); - } finally { - in.close(); - } - } + private boolean isLocal; - /** - * @return the name of the filesystem object pointed to by this shortcut - */ - public String getRealFilename() { - return real_file; - } + private String real_file; - /** - * Tests if the shortcut points to a local resource. - * @return true if the 'local' bit is set in this shortcut, false otherwise - */ - public boolean isLocal() { - return isLocal; + /** + * Provides a quick test to see if this could be a valid link ! If you try to + * instantiate a new WindowShortcut and the link is not valid, Exceptions may + * be thrown and Exceptions are extremely slow to generate, therefore any code + * needing to loop through several files should first check this. + * + * @param file + * the potential link + * @return true if may be a link, false otherwise + * @throws IOException + * if an IOException is thrown while reading from the file + */ + public static boolean isPotentialValidLink(File file) throws IOException + { + final int minimum_length = 0x64; + InputStream fis = new FileInputStream(file); + boolean isPotentiallyValid = false; + try + { + isPotentiallyValid = file.isFile() + && file.getName().toLowerCase(Locale.ROOT).endsWith(".lnk") + && fis.available() >= minimum_length + && isMagicPresent(getBytes(fis, 32)); + } finally + { + fis.close(); } + return isPotentiallyValid; + } - /** - * Tests if the shortcut points to a directory. - * @return true if the 'directory' bit is set in this shortcut, false otherwise - */ - public boolean isDirectory() { - return isDirectory; + public WindowsShortcut(File file) throws IOException, ParseException + { + InputStream in = new FileInputStream(file); + try + { + parseLink(getBytes(in)); + } finally + { + in.close(); } + } - /** - * Gets all the bytes from an InputStream - * @param in the InputStream from which to read bytes - * @return array of all the bytes contained in 'in' - * @throws IOException if an IOException is encountered while reading the data from the InputStream - */ - private static byte[] getBytes(InputStream in) throws IOException { - return getBytes(in, null); - } - - /** - * Gets up to max bytes from an InputStream - * @param in the InputStream from which to read bytes - * @param max maximum number of bytes to read - * @return array of all the bytes contained in 'in' - * @throws IOException if an IOException is encountered while reading the data from the InputStream - */ - private static byte[] getBytes(InputStream in, Integer max) throws IOException { - // read the entire file into a byte buffer - ByteArrayOutputStream bout = new ByteArrayOutputStream(); - byte[] buff = new byte[256]; - while (max == null || max > 0) { - int n = in.read(buff); - if (n == -1) { - break; - } - bout.write(buff, 0, n); - if (max != null) - max -= n; - } - in.close(); - return bout.toByteArray(); - } + /** + * @return the name of the filesystem object pointed to by this shortcut + */ + public String getRealFilename() + { + return real_file; + } - private static boolean isMagicPresent(byte[] link) { - final int magic = 0x0000004C; - final int magic_offset = 0x00; - return link.length >= 32 && bytesToDword(link, magic_offset) == magic; - } + /** + * Tests if the shortcut points to a local resource. + * + * @return true if the 'local' bit is set in this shortcut, false otherwise + */ + public boolean isLocal() + { + return isLocal; + } - /** - * Gobbles up link data by parsing it and storing info in member fields - * @param link all the bytes from the .lnk file - */ - private void parseLink(byte[] link) throws ParseException { - try { - if (!isMagicPresent(link)) - throw new ParseException("Invalid shortcut; magic is missing", 0); - - // get the flags byte - byte flags = link[0x14]; - - // get the file attributes byte - final int file_atts_offset = 0x18; - byte file_atts = link[file_atts_offset]; - byte is_dir_mask = (byte)0x10; - if ((file_atts & is_dir_mask) > 0) { - isDirectory = true; - } else { - isDirectory = false; - } - - // if the shell settings are present, skip them - final int shell_offset = 0x4c; - final byte has_shell_mask = (byte)0x01; - int shell_len = 0; - if ((flags & has_shell_mask) > 0) { - // the plus 2 accounts for the length marker itself - shell_len = bytesToWord(link, shell_offset) + 2; - } - - // get to the file settings - int file_start = 0x4c + shell_len; - - final int file_location_info_flag_offset_offset = 0x08; - int file_location_info_flag = link[file_start + file_location_info_flag_offset_offset]; - isLocal = (file_location_info_flag & 2) == 0; - // get the local volume and local system values - //final int localVolumeTable_offset_offset = 0x0C; - final int basename_offset_offset = 0x10; - final int networkVolumeTable_offset_offset = 0x14; - final int finalname_offset_offset = 0x18; - int finalname_offset = link[file_start + finalname_offset_offset] + file_start; - String finalname = getNullDelimitedString(link, finalname_offset); - if (isLocal) { - int basename_offset = link[file_start + basename_offset_offset] + file_start; - String basename = getNullDelimitedString(link, basename_offset); - real_file = basename + finalname; - } else { - int networkVolumeTable_offset = link[file_start + networkVolumeTable_offset_offset] + file_start; - int shareName_offset_offset = 0x08; - int shareName_offset = link[networkVolumeTable_offset + shareName_offset_offset] - + networkVolumeTable_offset; - String shareName = getNullDelimitedString(link, shareName_offset); - real_file = shareName + "\\" + finalname; - } - } catch (ArrayIndexOutOfBoundsException e) { - throw new ParseException("Could not be parsed, probably not a valid WindowsShortcut", 0); - } - } + /** + * Tests if the shortcut points to a directory. + * + * @return true if the 'directory' bit is set in this shortcut, false + * otherwise + */ + public boolean isDirectory() + { + return isDirectory; + } + + /** + * Gets all the bytes from an InputStream + * + * @param in + * the InputStream from which to read bytes + * @return array of all the bytes contained in 'in' + * @throws IOException + * if an IOException is encountered while reading the data from the + * InputStream + */ + private static byte[] getBytes(InputStream in) throws IOException + { + return getBytes(in, null); + } - private static String getNullDelimitedString(byte[] bytes, int off) { - int len = 0; - // count bytes until the null character (0) - while (true) { - if (bytes[off + len] == 0) { - break; - } - len++; - } - return new String(bytes, off, len); + /** + * Gets up to max bytes from an InputStream + * + * @param in + * the InputStream from which to read bytes + * @param max + * maximum number of bytes to read + * @return array of all the bytes contained in 'in' + * @throws IOException + * if an IOException is encountered while reading the data from the + * InputStream + */ + private static byte[] getBytes(InputStream in, Integer max) + throws IOException + { + // read the entire file into a byte buffer + ByteArrayOutputStream bout = new ByteArrayOutputStream(); + byte[] buff = new byte[256]; + while (max == null || max > 0) + { + int n = in.read(buff); + if (n == -1) + { + break; + } + bout.write(buff, 0, n); + if (max != null) + max -= n; } + in.close(); + return bout.toByteArray(); + } - /* - * convert two bytes into a short note, this is little endian because it's - * for an Intel only OS. - */ - private static int bytesToWord(byte[] bytes, int off) { - return ((bytes[off + 1] & 0xff) << 8) | (bytes[off] & 0xff); + private static boolean isMagicPresent(byte[] link) + { + final int magic = 0x0000004C; + final int magic_offset = 0x00; + return link.length >= 32 && bytesToDword(link, magic_offset) == magic; + } + + /** + * Gobbles up link data by parsing it and storing info in member fields + * + * @param link + * all the bytes from the .lnk file + */ + private void parseLink(byte[] link) throws ParseException + { + try + { + if (!isMagicPresent(link)) + throw new ParseException("Invalid shortcut; magic is missing", 0); + + // get the flags byte + byte flags = link[0x14]; + + // get the file attributes byte + final int file_atts_offset = 0x18; + byte file_atts = link[file_atts_offset]; + byte is_dir_mask = (byte) 0x10; + if ((file_atts & is_dir_mask) > 0) + { + isDirectory = true; + } + else + { + isDirectory = false; + } + + // if the shell settings are present, skip them + final int shell_offset = 0x4c; + final byte has_shell_mask = (byte) 0x01; + int shell_len = 0; + if ((flags & has_shell_mask) > 0) + { + // the plus 2 accounts for the length marker itself + shell_len = bytesToWord(link, shell_offset) + 2; + } + + // get to the file settings + int file_start = 0x4c + shell_len; + + final int file_location_info_flag_offset_offset = 0x08; + int file_location_info_flag = link[file_start + + file_location_info_flag_offset_offset]; + isLocal = (file_location_info_flag & 2) == 0; + // get the local volume and local system values + // final int localVolumeTable_offset_offset = 0x0C; + final int basename_offset_offset = 0x10; + final int networkVolumeTable_offset_offset = 0x14; + final int finalname_offset_offset = 0x18; + int finalname_offset = link[file_start + finalname_offset_offset] + + file_start; + String finalname = getNullDelimitedString(link, finalname_offset); + if (isLocal) + { + int basename_offset = link[file_start + basename_offset_offset] + + file_start; + String basename = getNullDelimitedString(link, basename_offset); + real_file = basename + finalname; + } + else + { + int networkVolumeTable_offset = link[file_start + + networkVolumeTable_offset_offset] + file_start; + int shareName_offset_offset = 0x08; + int shareName_offset = link[networkVolumeTable_offset + + shareName_offset_offset] + networkVolumeTable_offset; + String shareName = getNullDelimitedString(link, shareName_offset); + real_file = shareName + "\\" + finalname; + } + } catch (ArrayIndexOutOfBoundsException e) + { + throw new ParseException( + "Could not be parsed, probably not a valid WindowsShortcut", + 0); } + } - private static int bytesToDword(byte[] bytes, int off) { - return (bytesToWord(bytes, off + 2) << 16) | bytesToWord(bytes, off); + private static String getNullDelimitedString(byte[] bytes, int off) + { + int len = 0; + // count bytes until the null character (0) + while (true) + { + if (bytes[off + len] == 0) + { + break; + } + len++; } + return new String(bytes, off, len); + } + + /* + * convert two bytes into a short note, this is little endian because it's + * for an Intel only OS. + */ + private static int bytesToWord(byte[] bytes, int off) + { + return ((bytes[off + 1] & 0xff) << 8) | (bytes[off] & 0xff); + } + + private static int bytesToDword(byte[] bytes, int off) + { + return (bytesToWord(bytes, off + 2) << 16) | bytesToWord(bytes, off); + } } diff --git a/src/swingjs/api/JSUtilI.java b/src/swingjs/api/JSUtilI.java index 5625f79..a20ab55 100644 --- a/src/swingjs/api/JSUtilI.java +++ b/src/swingjs/api/JSUtilI.java @@ -9,7 +9,8 @@ import java.util.Properties; import swingjs.api.js.HTML5Applet; -public interface JSUtilI { +public interface JSUtilI +{ /** * Indicate to SwingJS that the given file type is binary. diff --git a/src/swingjs/api/js/HTML5Applet.java b/src/swingjs/api/js/HTML5Applet.java index b844476..d734c31 100644 --- a/src/swingjs/api/js/HTML5Applet.java +++ b/src/swingjs/api/js/HTML5Applet.java @@ -1,35 +1,35 @@ package swingjs.api.js; -public interface HTML5Applet { +public interface HTML5Applet +{ - /** - * The canvas that is being used by the HTML5 applet - * - * @return - */ - Object _getHtml5Canvas(); + /** + * The canvas that is being used by the HTML5 applet + * + * @return + */ + Object _getHtml5Canvas(); - int _getHeight(); + int _getHeight(); - int _getWidth(); + int _getWidth(); - /** - * The div associated with the HTML5 applet - * - * @return - */ - Object _getContentLayer(); + /** + * The div associated with the HTML5 applet + * + * @return + */ + Object _getContentLayer(); - /** - * Simple resizing for an inline applet - * - * @param widthHeight - */ - void _resizeApplet(int[] widthHeight); + /** + * Simple resizing for an inline applet + * + * @param widthHeight + */ + void _resizeApplet(int[] widthHeight); - void _show(boolean b); - - String _getID(); + void _show(boolean b); + String _getID(); } diff --git a/src/uk/ac/ebi/picr/model/CrossReference.java b/src/uk/ac/ebi/picr/model/CrossReference.java index 498a47b..fbb654a 100644 --- a/src/uk/ac/ebi/picr/model/CrossReference.java +++ b/src/uk/ac/ebi/picr/model/CrossReference.java @@ -267,25 +267,35 @@ public class CrossReference implements java.io.Serializable __equalsCalc = obj; boolean _equals; _equals = true - && ((this.accession == null && other.getAccession() == null) || (this.accession != null && this.accession - .equals(other.getAccession()))) - && ((this.accessionVersion == null && other - .getAccessionVersion() == null) || (this.accessionVersion != null && this.accessionVersion - .equals(other.getAccessionVersion()))) - && ((this.databaseDescription == null && other - .getDatabaseDescription() == null) || (this.databaseDescription != null && this.databaseDescription - .equals(other.getDatabaseDescription()))) - && ((this.databaseName == null && other.getDatabaseName() == null) || (this.databaseName != null && this.databaseName - .equals(other.getDatabaseName()))) - && ((this.dateAdded == null && other.getDateAdded() == null) || (this.dateAdded != null && this.dateAdded - .equals(other.getDateAdded()))) - && ((this.dateDeleted == null && other.getDateDeleted() == null) || (this.dateDeleted != null && this.dateDeleted - .equals(other.getDateDeleted()))) + && ((this.accession == null && other.getAccession() == null) + || (this.accession != null + && this.accession.equals(other.getAccession()))) + && ((this.accessionVersion == null + && other.getAccessionVersion() == null) + || (this.accessionVersion != null + && this.accessionVersion + .equals(other.getAccessionVersion()))) + && ((this.databaseDescription == null + && other.getDatabaseDescription() == null) + || (this.databaseDescription != null + && this.databaseDescription.equals( + other.getDatabaseDescription()))) + && ((this.databaseName == null + && other.getDatabaseName() == null) + || (this.databaseName != null && this.databaseName + .equals(other.getDatabaseName()))) + && ((this.dateAdded == null && other.getDateAdded() == null) + || (this.dateAdded != null + && this.dateAdded.equals(other.getDateAdded()))) + && ((this.dateDeleted == null && other.getDateDeleted() == null) + || (this.dateDeleted != null && this.dateDeleted + .equals(other.getDateDeleted()))) && this.deleted == other.isDeleted() - && ((this.gi == null && other.getGi() == null) || (this.gi != null && this.gi - .equals(other.getGi()))) - && ((this.taxonId == null && other.getTaxonId() == null) || (this.taxonId != null && this.taxonId - .equals(other.getTaxonId()))); + && ((this.gi == null && other.getGi() == null) + || (this.gi != null && this.gi.equals(other.getGi()))) + && ((this.taxonId == null && other.getTaxonId() == null) + || (this.taxonId != null + && this.taxonId.equals(other.getTaxonId()))); __equalsCalc = null; return _equals; } diff --git a/src/uk/ac/ebi/picr/model/UPEntry.java b/src/uk/ac/ebi/picr/model/UPEntry.java index c94bf15..9fe2f2f 100644 --- a/src/uk/ac/ebi/picr/model/UPEntry.java +++ b/src/uk/ac/ebi/picr/model/UPEntry.java @@ -145,7 +145,8 @@ public class UPEntry implements java.io.Serializable this.logicalCrossReferences = logicalCrossReferences; } - public uk.ac.ebi.picr.model.CrossReference getLogicalCrossReferences(int i) + public uk.ac.ebi.picr.model.CrossReference getLogicalCrossReferences( + int i) { return this.logicalCrossReferences[i]; } @@ -220,23 +221,29 @@ public class UPEntry implements java.io.Serializable } __equalsCalc = obj; boolean _equals; - _equals = true - && ((this.CRC64 == null && other.getCRC64() == null) || (this.CRC64 != null && this.CRC64 - .equals(other.getCRC64()))) - && ((this.UPI == null && other.getUPI() == null) || (this.UPI != null && this.UPI - .equals(other.getUPI()))) - && ((this.identicalCrossReferences == null && other - .getIdenticalCrossReferences() == null) || (this.identicalCrossReferences != null && java.util.Arrays - .equals(this.identicalCrossReferences, - other.getIdenticalCrossReferences()))) - && ((this.logicalCrossReferences == null && other - .getLogicalCrossReferences() == null) || (this.logicalCrossReferences != null && java.util.Arrays - .equals(this.logicalCrossReferences, - other.getLogicalCrossReferences()))) - && ((this.sequence == null && other.getSequence() == null) || (this.sequence != null && this.sequence - .equals(other.getSequence()))) - && ((this.timestamp == null && other.getTimestamp() == null) || (this.timestamp != null && this.timestamp - .equals(other.getTimestamp()))); + _equals = true && ((this.CRC64 == null && other.getCRC64() == null) + || (this.CRC64 != null && this.CRC64.equals(other.getCRC64()))) + && ((this.UPI == null && other.getUPI() == null) + || (this.UPI != null + && this.UPI.equals(other.getUPI()))) + && ((this.identicalCrossReferences == null + && other.getIdenticalCrossReferences() == null) + || (this.identicalCrossReferences != null + && java.util.Arrays.equals( + this.identicalCrossReferences, + other.getIdenticalCrossReferences()))) + && ((this.logicalCrossReferences == null + && other.getLogicalCrossReferences() == null) + || (this.logicalCrossReferences != null + && java.util.Arrays.equals( + this.logicalCrossReferences, + other.getLogicalCrossReferences()))) + && ((this.sequence == null && other.getSequence() == null) + || (this.sequence != null + && this.sequence.equals(other.getSequence()))) + && ((this.timestamp == null && other.getTimestamp() == null) + || (this.timestamp != null && this.timestamp + .equals(other.getTimestamp()))); __equalsCalc = null; return _equals; } @@ -265,8 +272,8 @@ public class UPEntry implements java.io.Serializable for (int i = 0; i < java.lang.reflect.Array .getLength(getIdenticalCrossReferences()); i++) { - java.lang.Object obj = java.lang.reflect.Array.get( - getIdenticalCrossReferences(), i); + java.lang.Object obj = java.lang.reflect.Array + .get(getIdenticalCrossReferences(), i); if (obj != null && !obj.getClass().isArray()) { _hashCode += obj.hashCode(); @@ -278,8 +285,8 @@ public class UPEntry implements java.io.Serializable for (int i = 0; i < java.lang.reflect.Array .getLength(getLogicalCrossReferences()); i++) { - java.lang.Object obj = java.lang.reflect.Array.get( - getLogicalCrossReferences(), i); + java.lang.Object obj = java.lang.reflect.Array + .get(getLogicalCrossReferences(), i); if (obj != null && !obj.getClass().isArray()) { _hashCode += obj.hashCode(); diff --git a/src/uk/ac/ebi/www/Data.java b/src/uk/ac/ebi/www/Data.java index 2020fc9..5d83043 100755 --- a/src/uk/ac/ebi/www/Data.java +++ b/src/uk/ac/ebi/www/Data.java @@ -75,10 +75,11 @@ public class Data implements java.io.Serializable __equalsCalc = obj; boolean _equals; _equals = true - && ((type == null && other.getType() == null) || (type != null && type - .equals(other.getType()))) - && ((content == null && other.getContent() == null) || (content != null && content - .equals(other.getContent()))); + && ((type == null && other.getType() == null) + || (type != null && type.equals(other.getType()))) + && ((content == null && other.getContent() == null) + || (content != null + && content.equals(other.getContent()))); __equalsCalc = null; return _equals; } diff --git a/src/uk/ac/ebi/www/InputParams.java b/src/uk/ac/ebi/www/InputParams.java index ba8f8b0..514d886 100755 --- a/src/uk/ac/ebi/www/InputParams.java +++ b/src/uk/ac/ebi/www/InputParams.java @@ -242,33 +242,32 @@ public class InputParams implements java.io.Serializable } __equalsCalc = obj; boolean _equals; - _equals = true - && ((program == null && other.getProgram() == null) || (program != null && program - .equals(other.getProgram()))) - && ((database == null && other.getDatabase() == null) || (database != null && database - .equals(other.getDatabase()))) - && ((matrix == null && other.getMatrix() == null) || (matrix != null && matrix - .equals(other.getMatrix()))) - && exp == other.getExp() - && echofilter == other.isEchofilter() - && ((filter == null && other.getFilter() == null) || (filter != null && filter - .equals(other.getFilter()))) - && numal == other.getNumal() - && scores == other.getScores() - && ((sensitivity == null && other.getSensitivity() == null) || (sensitivity != null && sensitivity - .equals(other.getSensitivity()))) - && ((sort == null && other.getSort() == null) || (sort != null && sort - .equals(other.getSort()))) - && ((stats == null && other.getStats() == null) || (stats != null && stats - .equals(other.getStats()))) - && ((strand == null && other.getStrand() == null) || (strand != null && strand - .equals(other.getStrand()))) - && ((outformat == null && other.getOutformat() == null) || (outformat != null && outformat - .equals(other.getOutformat()))) - && topcombon == other.getTopcombon() - && async == other.isAsync() - && ((email == null && other.getEmail() == null) || (email != null && email - .equals(other.getEmail()))); + _equals = true && ((program == null && other.getProgram() == null) + || (program != null && program.equals(other.getProgram()))) + && ((database == null && other.getDatabase() == null) + || (database != null + && database.equals(other.getDatabase()))) + && ((matrix == null && other.getMatrix() == null) + || (matrix != null && matrix.equals(other.getMatrix()))) + && exp == other.getExp() && echofilter == other.isEchofilter() + && ((filter == null && other.getFilter() == null) + || (filter != null && filter.equals(other.getFilter()))) + && numal == other.getNumal() && scores == other.getScores() + && ((sensitivity == null && other.getSensitivity() == null) + || (sensitivity != null + && sensitivity.equals(other.getSensitivity()))) + && ((sort == null && other.getSort() == null) + || (sort != null && sort.equals(other.getSort()))) + && ((stats == null && other.getStats() == null) + || (stats != null && stats.equals(other.getStats()))) + && ((strand == null && other.getStrand() == null) + || (strand != null && strand.equals(other.getStrand()))) + && ((outformat == null && other.getOutformat() == null) + || (outformat != null + && outformat.equals(other.getOutformat()))) + && topcombon == other.getTopcombon() && async == other.isAsync() + && ((email == null && other.getEmail() == null) + || (email != null && email.equals(other.getEmail()))); __equalsCalc = null; return _equals; } diff --git a/src/uk/ac/ebi/www/WSFile.java b/src/uk/ac/ebi/www/WSFile.java index 210de76..7b2cc9c 100755 --- a/src/uk/ac/ebi/www/WSFile.java +++ b/src/uk/ac/ebi/www/WSFile.java @@ -75,10 +75,10 @@ public class WSFile implements java.io.Serializable __equalsCalc = obj; boolean _equals; _equals = true - && ((type == null && other.getType() == null) || (type != null && type - .equals(other.getType()))) - && ((ext == null && other.getExt() == null) || (ext != null && ext - .equals(other.getExt()))); + && ((type == null && other.getType() == null) + || (type != null && type.equals(other.getType()))) + && ((ext == null && other.getExt() == null) + || (ext != null && ext.equals(other.getExt()))); __equalsCalc = null; return _equals; } diff --git a/src/uk/ac/ebi/www/WSWUBlastServiceLocator.java b/src/uk/ac/ebi/www/WSWUBlastServiceLocator.java index 9273f6e..d7ded11 100755 --- a/src/uk/ac/ebi/www/WSWUBlastServiceLocator.java +++ b/src/uk/ac/ebi/www/WSWUBlastServiceLocator.java @@ -98,8 +98,8 @@ public class WSWUBlastServiceLocator extends org.apache.axis.client.Service throw new javax.xml.rpc.ServiceException(t); } throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage( - "exception.no_stub_implementation_for_interface", - new String[] { (serviceEndpointInterface == null ? "null" + "exception.no_stub_implementation_for_interface", new String[] + { (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()) })); } diff --git a/src/uk/ac/ebi/www/WSWUBlastSoapBindingStub.java b/src/uk/ac/ebi/www/WSWUBlastSoapBindingStub.java index c1f2288..55f15df 100755 --- a/src/uk/ac/ebi/www/WSWUBlastSoapBindingStub.java +++ b/src/uk/ac/ebi/www/WSWUBlastSoapBindingStub.java @@ -196,8 +196,9 @@ public class WSWUBlastSoapBindingStub extends org.apache.axis.client.Stub new javax.xml.namespace.QName( "http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, javax.xml.rpc.ParameterMode.IN); - _call.setReturnType(new javax.xml.namespace.QName( - "http://www.w3.org/2001/XMLSchema", "base64Binary"), + _call.setReturnType( + new javax.xml.namespace.QName( + "http://www.w3.org/2001/XMLSchema", "base64Binary"), byte[].class); _call.setUseSOAPAction(true); _call.setSOAPActionURI("http://www.ebi.ac.uk/WSWUBlast#poll"); @@ -205,8 +206,9 @@ public class WSWUBlastSoapBindingStub extends org.apache.axis.client.Stub _call.setOperationName(new javax.xml.namespace.QName( "http://www.ebi.ac.uk/WSWUBlast", "poll")); - java.lang.Object _resp = _call.invoke(new java.lang.Object[] { jobid, - type }); + java.lang.Object _resp = _call + .invoke(new java.lang.Object[] + { jobid, type }); if (_resp instanceof java.rmi.RemoteException) { @@ -235,14 +237,16 @@ public class WSWUBlastSoapBindingStub extends org.apache.axis.client.Stub org.apache.axis.client.Call _call = createCall(); _call.addParameter(new javax.xml.namespace.QName("", "params"), new javax.xml.namespace.QName("http://www.ebi.ac.uk/WSWUBlast", - "inputParams"), uk.ac.ebi.www.InputParams.class, + "inputParams"), + uk.ac.ebi.www.InputParams.class, javax.xml.rpc.ParameterMode.IN); _call.addParameter(new javax.xml.namespace.QName("", "content"), new javax.xml.namespace.QName("http://www.ebi.ac.uk/WSWUBlast", - "WSArrayofData"), uk.ac.ebi.www.Data[].class, - javax.xml.rpc.ParameterMode.IN); - _call.setReturnType(new javax.xml.namespace.QName( - "http://www.w3.org/2001/XMLSchema", "string"), + "WSArrayofData"), + uk.ac.ebi.www.Data[].class, javax.xml.rpc.ParameterMode.IN); + _call.setReturnType( + new javax.xml.namespace.QName( + "http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class); _call.setUseSOAPAction(true); _call.setSOAPActionURI("http://www.ebi.ac.uk/WSWUBlast#runWUBlast"); @@ -250,8 +254,9 @@ public class WSWUBlastSoapBindingStub extends org.apache.axis.client.Stub _call.setOperationName(new javax.xml.namespace.QName( "http://www.ebi.ac.uk/WSWUBlast", "runWUBlast")); - java.lang.Object _resp = _call.invoke(new java.lang.Object[] { params, - content }); + java.lang.Object _resp = _call + .invoke(new java.lang.Object[] + { params, content }); if (_resp instanceof java.rmi.RemoteException) { @@ -264,8 +269,8 @@ public class WSWUBlastSoapBindingStub extends org.apache.axis.client.Stub return (java.lang.String) _resp; } catch (java.lang.Exception _exception) { - return (java.lang.String) org.apache.axis.utils.JavaUtils.convert( - _resp, java.lang.String.class); + return (java.lang.String) org.apache.axis.utils.JavaUtils + .convert(_resp, java.lang.String.class); } } } @@ -286,8 +291,9 @@ public class WSWUBlastSoapBindingStub extends org.apache.axis.client.Stub new javax.xml.namespace.QName( "http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, javax.xml.rpc.ParameterMode.IN); - _call.setReturnType(new javax.xml.namespace.QName( - "http://www.w3.org/2001/XMLSchema", "base64Binary"), + _call.setReturnType( + new javax.xml.namespace.QName( + "http://www.w3.org/2001/XMLSchema", "base64Binary"), byte[].class); _call.setUseSOAPAction(true); _call.setSOAPActionURI("http://www.ebi.ac.uk/WSWUBlast#test"); @@ -295,8 +301,9 @@ public class WSWUBlastSoapBindingStub extends org.apache.axis.client.Stub _call.setOperationName(new javax.xml.namespace.QName( "http://www.ebi.ac.uk/WSWUBlast", "test")); - java.lang.Object _resp = _call.invoke(new java.lang.Object[] { jobid, - type }); + java.lang.Object _resp = _call + .invoke(new java.lang.Object[] + { jobid, type }); if (_resp instanceof java.rmi.RemoteException) { @@ -327,8 +334,9 @@ public class WSWUBlastSoapBindingStub extends org.apache.axis.client.Stub new javax.xml.namespace.QName( "http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, javax.xml.rpc.ParameterMode.IN); - _call.setReturnType(new javax.xml.namespace.QName( - "http://www.w3.org/2001/XMLSchema", "string"), + _call.setReturnType( + new javax.xml.namespace.QName( + "http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class); _call.setUseSOAPAction(true); _call.setSOAPActionURI("http://www.ebi.ac.uk/WSWUBlast#checkStatus"); @@ -349,8 +357,8 @@ public class WSWUBlastSoapBindingStub extends org.apache.axis.client.Stub return (java.lang.String) _resp; } catch (java.lang.Exception _exception) { - return (java.lang.String) org.apache.axis.utils.JavaUtils.convert( - _resp, java.lang.String.class); + return (java.lang.String) org.apache.axis.utils.JavaUtils + .convert(_resp, java.lang.String.class); } } } @@ -367,8 +375,9 @@ public class WSWUBlastSoapBindingStub extends org.apache.axis.client.Stub new javax.xml.namespace.QName( "http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, javax.xml.rpc.ParameterMode.IN); - _call.setReturnType(new javax.xml.namespace.QName( - "http://www.ebi.ac.uk/WSWUBlast", "WSArrayofFile"), + _call.setReturnType( + new javax.xml.namespace.QName("http://www.ebi.ac.uk/WSWUBlast", + "WSArrayofFile"), uk.ac.ebi.www.WSFile[].class); _call.setUseSOAPAction(true); _call.setSOAPActionURI("http://www.ebi.ac.uk/WSWUBlast#getResults"); @@ -411,8 +420,9 @@ public class WSWUBlastSoapBindingStub extends org.apache.axis.client.Stub new javax.xml.namespace.QName( "http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, javax.xml.rpc.ParameterMode.IN); - _call.setReturnType(new javax.xml.namespace.QName( - "http://www.w3.org/2001/XMLSchema", "base64Binary"), + _call.setReturnType( + new javax.xml.namespace.QName( + "http://www.w3.org/2001/XMLSchema", "base64Binary"), byte[].class); _call.setUseSOAPAction(true); _call.setSOAPActionURI("http://www.ebi.ac.uk/WSWUBlast#polljob"); @@ -420,8 +430,9 @@ public class WSWUBlastSoapBindingStub extends org.apache.axis.client.Stub _call.setOperationName(new javax.xml.namespace.QName( "http://www.ebi.ac.uk/WSWUBlast", "polljob")); - java.lang.Object _resp = _call.invoke(new java.lang.Object[] { jobid, - outformat }); + java.lang.Object _resp = _call + .invoke(new java.lang.Object[] + { jobid, outformat }); if (_resp instanceof java.rmi.RemoteException) { @@ -450,14 +461,16 @@ public class WSWUBlastSoapBindingStub extends org.apache.axis.client.Stub org.apache.axis.client.Call _call = createCall(); _call.addParameter(new javax.xml.namespace.QName("", "params"), new javax.xml.namespace.QName("http://www.ebi.ac.uk/WSWUBlast", - "inputParams"), uk.ac.ebi.www.InputParams.class, + "inputParams"), + uk.ac.ebi.www.InputParams.class, javax.xml.rpc.ParameterMode.IN); _call.addParameter(new javax.xml.namespace.QName("", "content"), new javax.xml.namespace.QName( "http://www.w3.org/2001/XMLSchema", "base64Binary"), byte[].class, javax.xml.rpc.ParameterMode.IN); - _call.setReturnType(new javax.xml.namespace.QName( - "http://www.w3.org/2001/XMLSchema", "base64Binary"), + _call.setReturnType( + new javax.xml.namespace.QName( + "http://www.w3.org/2001/XMLSchema", "base64Binary"), byte[].class); _call.setUseSOAPAction(true); _call.setSOAPActionURI("http://www.ebi.ac.uk/WSWUBlast#doWUBlast"); @@ -465,8 +478,9 @@ public class WSWUBlastSoapBindingStub extends org.apache.axis.client.Stub _call.setOperationName(new javax.xml.namespace.QName( "http://www.ebi.ac.uk/WSWUBlast", "doWUBlast")); - java.lang.Object _resp = _call.invoke(new java.lang.Object[] { params, - content }); + java.lang.Object _resp = _call + .invoke(new java.lang.Object[] + { params, content }); if (_resp instanceof java.rmi.RemoteException) { diff --git a/src/uk/ac/ebi/www/picr/AccessionMappingService/AccessionMapperBindingStub.java b/src/uk/ac/ebi/www/picr/AccessionMappingService/AccessionMapperBindingStub.java index f06a80a..fa3fb80 100644 --- a/src/uk/ac/ebi/www/picr/AccessionMappingService/AccessionMapperBindingStub.java +++ b/src/uk/ac/ebi/www/picr/AccessionMappingService/AccessionMapperBindingStub.java @@ -48,28 +48,33 @@ public class AccessionMapperBindingStub extends org.apache.axis.client.Stub oper.addParameter( new javax.xml.namespace.QName( "http://www.ebi.ac.uk/picr/AccessionMappingService", - "sequence"), new javax.xml.namespace.QName( + "sequence"), + new javax.xml.namespace.QName( "http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, org.apache.axis.description.ParameterDesc.IN, false, false); - oper.addParameter(new javax.xml.namespace.QName( - "http://www.ebi.ac.uk/picr/AccessionMappingService", - "searchDatabases"), new javax.xml.namespace.QName( - "http://www.w3.org/2001/XMLSchema", "string"), - java.lang.String[].class, - org.apache.axis.description.ParameterDesc.IN, false, false); oper.addParameter( new javax.xml.namespace.QName( "http://www.ebi.ac.uk/picr/AccessionMappingService", - "taxonId"), new javax.xml.namespace.QName( + "searchDatabases"), + new javax.xml.namespace.QName( "http://www.w3.org/2001/XMLSchema", "string"), - java.lang.String.class, + java.lang.String[].class, org.apache.axis.description.ParameterDesc.IN, false, false); oper.addParameter(new javax.xml.namespace.QName( - "http://www.ebi.ac.uk/picr/AccessionMappingService", - "onlyActive"), new javax.xml.namespace.QName( - "http://www.w3.org/2001/XMLSchema", "boolean"), boolean.class, + "http://www.ebi.ac.uk/picr/AccessionMappingService", "taxonId"), + new javax.xml.namespace.QName( + "http://www.w3.org/2001/XMLSchema", "string"), + java.lang.String.class, org.apache.axis.description.ParameterDesc.IN, false, false); + oper.addParameter( + new javax.xml.namespace.QName( + "http://www.ebi.ac.uk/picr/AccessionMappingService", + "onlyActive"), + new javax.xml.namespace.QName( + "http://www.w3.org/2001/XMLSchema", "boolean"), + boolean.class, org.apache.axis.description.ParameterDesc.IN, + false, false); oper.setReturnType(new javax.xml.namespace.QName( "http://model.picr.ebi.ac.uk", "UPEntry")); oper.setReturnClass(uk.ac.ebi.picr.model.UPEntry.class); @@ -82,36 +87,44 @@ public class AccessionMapperBindingStub extends org.apache.axis.client.Stub oper = new org.apache.axis.description.OperationDesc(); oper.setName("getUPIForAccession"); - oper.addParameter(new javax.xml.namespace.QName( - "http://www.ebi.ac.uk/picr/AccessionMappingService", - "accession"), new javax.xml.namespace.QName( - "http://www.w3.org/2001/XMLSchema", "string"), + oper.addParameter( + new javax.xml.namespace.QName( + "http://www.ebi.ac.uk/picr/AccessionMappingService", + "accession"), + new javax.xml.namespace.QName( + "http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, org.apache.axis.description.ParameterDesc.IN, false, false); - oper.addParameter(new javax.xml.namespace.QName( - "http://www.ebi.ac.uk/picr/AccessionMappingService", - "ac_version"), new javax.xml.namespace.QName( - "http://www.w3.org/2001/XMLSchema", "string"), + oper.addParameter( + new javax.xml.namespace.QName( + "http://www.ebi.ac.uk/picr/AccessionMappingService", + "ac_version"), + new javax.xml.namespace.QName( + "http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, org.apache.axis.description.ParameterDesc.IN, false, false); - oper.addParameter(new javax.xml.namespace.QName( - "http://www.ebi.ac.uk/picr/AccessionMappingService", - "searchDatabases"), new javax.xml.namespace.QName( - "http://www.w3.org/2001/XMLSchema", "string"), - java.lang.String[].class, - org.apache.axis.description.ParameterDesc.IN, false, false); oper.addParameter( new javax.xml.namespace.QName( "http://www.ebi.ac.uk/picr/AccessionMappingService", - "taxonId"), new javax.xml.namespace.QName( + "searchDatabases"), + new javax.xml.namespace.QName( "http://www.w3.org/2001/XMLSchema", "string"), - java.lang.String.class, + java.lang.String[].class, org.apache.axis.description.ParameterDesc.IN, false, false); oper.addParameter(new javax.xml.namespace.QName( - "http://www.ebi.ac.uk/picr/AccessionMappingService", - "onlyActive"), new javax.xml.namespace.QName( - "http://www.w3.org/2001/XMLSchema", "boolean"), boolean.class, + "http://www.ebi.ac.uk/picr/AccessionMappingService", "taxonId"), + new javax.xml.namespace.QName( + "http://www.w3.org/2001/XMLSchema", "string"), + java.lang.String.class, org.apache.axis.description.ParameterDesc.IN, false, false); + oper.addParameter( + new javax.xml.namespace.QName( + "http://www.ebi.ac.uk/picr/AccessionMappingService", + "onlyActive"), + new javax.xml.namespace.QName( + "http://www.w3.org/2001/XMLSchema", "boolean"), + boolean.class, org.apache.axis.description.ParameterDesc.IN, + false, false); oper.setReturnType(new javax.xml.namespace.QName( "http://model.picr.ebi.ac.uk", "UPEntry")); oper.setReturnClass(uk.ac.ebi.picr.model.UPEntry[].class); @@ -276,16 +289,18 @@ public class AccessionMapperBindingStub extends org.apache.axis.client.Stub Boolean.FALSE); _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE); - _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setSOAPVersion( + org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); _call.setOperationName(new javax.xml.namespace.QName( "http://www.ebi.ac.uk/picr/AccessionMappingService", "getUPIForSequence")); setRequestHeaders(_call); setAttachments(_call); - java.lang.Object _resp = _call.invoke(new java.lang.Object[] { - sequence, searchDatabases, taxonId, - java.lang.Boolean.valueOf(onlyActive) }); + java.lang.Object _resp = _call + .invoke(new java.lang.Object[] + { sequence, searchDatabases, taxonId, + java.lang.Boolean.valueOf(onlyActive) }); if (_resp instanceof java.rmi.RemoteException) { @@ -323,16 +338,18 @@ public class AccessionMapperBindingStub extends org.apache.axis.client.Stub Boolean.FALSE); _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE); - _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setSOAPVersion( + org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); _call.setOperationName(new javax.xml.namespace.QName( "http://www.ebi.ac.uk/picr/AccessionMappingService", "getUPIForAccession")); setRequestHeaders(_call); setAttachments(_call); - java.lang.Object _resp = _call.invoke(new java.lang.Object[] { - accession, ac_version, searchDatabases, taxonId, - java.lang.Boolean.valueOf(onlyActive) }); + java.lang.Object _resp = _call + .invoke(new java.lang.Object[] + { accession, ac_version, searchDatabases, taxonId, + java.lang.Boolean.valueOf(onlyActive) }); if (_resp instanceof java.rmi.RemoteException) { @@ -368,7 +385,8 @@ public class AccessionMapperBindingStub extends org.apache.axis.client.Stub Boolean.FALSE); _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE); - _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setSOAPVersion( + org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); _call.setOperationName(new javax.xml.namespace.QName( "http://www.ebi.ac.uk/picr/AccessionMappingService", "getMappedDatabaseNames")); diff --git a/src/uk/ac/ebi/www/picr/AccessionMappingService/AccessionMapperServiceLocator.java b/src/uk/ac/ebi/www/picr/AccessionMappingService/AccessionMapperServiceLocator.java index dfb6d1b..c9e1dd9 100644 --- a/src/uk/ac/ebi/www/picr/AccessionMappingService/AccessionMapperServiceLocator.java +++ b/src/uk/ac/ebi/www/picr/AccessionMappingService/AccessionMapperServiceLocator.java @@ -22,8 +22,8 @@ package uk.ac.ebi.www.picr.AccessionMappingService; import jalview.util.MessageManager; -public class AccessionMapperServiceLocator extends - org.apache.axis.client.Service implements +public class AccessionMapperServiceLocator + extends org.apache.axis.client.Service implements uk.ac.ebi.www.picr.AccessionMappingService.AccessionMapperService { @@ -87,7 +87,8 @@ public class AccessionMapperServiceLocator extends } } - public void setAccessionMapperPortEndpointAddress(java.lang.String address) + public void setAccessionMapperPortEndpointAddress( + java.lang.String address) { AccessionMapperPort_address = address; } @@ -114,8 +115,8 @@ public class AccessionMapperServiceLocator extends throw new javax.xml.rpc.ServiceException(t); } throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage( - "exception.no_stub_implementation_for_interface", - new String[] { (serviceEndpointInterface == null ? "null" + "exception.no_stub_implementation_for_interface", new String[] + { (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()) })); } @@ -177,10 +178,10 @@ public class AccessionMapperServiceLocator extends } else { // Unknown Port Name - throw new javax.xml.rpc.ServiceException( - MessageManager.formatMessage( - "exception.cannot_set_endpoint_address_unknown_port", - new String[] { portName })); + throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage( + "exception.cannot_set_endpoint_address_unknown_port", + new String[] + { portName })); } } diff --git a/src/vamsas/objects/simple/Alignment.java b/src/vamsas/objects/simple/Alignment.java index 9d47b6a..82df8bd 100755 --- a/src/vamsas/objects/simple/Alignment.java +++ b/src/vamsas/objects/simple/Alignment.java @@ -20,8 +20,8 @@ */ package vamsas.objects.simple; -public class Alignment extends vamsas.objects.simple.Object implements - java.io.Serializable +public class Alignment extends vamsas.objects.simple.Object + implements java.io.Serializable { private java.lang.String gapchar; @@ -126,12 +126,15 @@ public class Alignment extends vamsas.objects.simple.Object implements __equalsCalc = obj; boolean _equals; _equals = super.equals(obj) - && ((this.gapchar == null && other.getGapchar() == null) || (this.gapchar != null && this.gapchar - .equals(other.getGapchar()))) - && ((this.method == null && other.getMethod() == null) || (this.method != null && java.util.Arrays - .equals(this.method, other.getMethod()))) - && ((this.seqs == null && other.getSeqs() == null) || (this.seqs != null && this.seqs - .equals(other.getSeqs()))); + && ((this.gapchar == null && other.getGapchar() == null) + || (this.gapchar != null + && this.gapchar.equals(other.getGapchar()))) + && ((this.method == null && other.getMethod() == null) + || (this.method != null && java.util.Arrays + .equals(this.method, other.getMethod()))) + && ((this.seqs == null && other.getSeqs() == null) + || (this.seqs != null + && this.seqs.equals(other.getSeqs()))); __equalsCalc = null; return _equals; } @@ -153,7 +156,8 @@ public class Alignment extends vamsas.objects.simple.Object implements } if (getMethod() != null) { - for (int i = 0; i < java.lang.reflect.Array.getLength(getMethod()); i++) + for (int i = 0; i < java.lang.reflect.Array + .getLength(getMethod()); i++) { java.lang.Object obj = java.lang.reflect.Array.get(getMethod(), i); if (obj != null && !obj.getClass().isArray()) diff --git a/src/vamsas/objects/simple/JpredResult.java b/src/vamsas/objects/simple/JpredResult.java index cc7cc67..a4f34ff 100755 --- a/src/vamsas/objects/simple/JpredResult.java +++ b/src/vamsas/objects/simple/JpredResult.java @@ -20,8 +20,8 @@ */ package vamsas.objects.simple; -public class JpredResult extends vamsas.objects.simple.Result implements - java.io.Serializable +public class JpredResult extends vamsas.objects.simple.Result + implements java.io.Serializable { private java.lang.String aligfile; @@ -102,10 +102,12 @@ public class JpredResult extends vamsas.objects.simple.Result implements __equalsCalc = obj; boolean _equals; _equals = super.equals(obj) - && ((this.aligfile == null && other.getAligfile() == null) || (this.aligfile != null && this.aligfile - .equals(other.getAligfile()))) - && ((this.predfile == null && other.getPredfile() == null) || (this.predfile != null && this.predfile - .equals(other.getPredfile()))); + && ((this.aligfile == null && other.getAligfile() == null) + || (this.aligfile != null + && this.aligfile.equals(other.getAligfile()))) + && ((this.predfile == null && other.getPredfile() == null) + || (this.predfile != null + && this.predfile.equals(other.getPredfile()))); __equalsCalc = null; return _equals; } diff --git a/src/vamsas/objects/simple/MsaResult.java b/src/vamsas/objects/simple/MsaResult.java index 49fa4a7..31ab02f 100755 --- a/src/vamsas/objects/simple/MsaResult.java +++ b/src/vamsas/objects/simple/MsaResult.java @@ -20,8 +20,8 @@ */ package vamsas.objects.simple; -public class MsaResult extends vamsas.objects.simple.Result implements - java.io.Serializable +public class MsaResult extends vamsas.objects.simple.Result + implements java.io.Serializable { private vamsas.objects.simple.Alignment msa; @@ -85,9 +85,9 @@ public class MsaResult extends vamsas.objects.simple.Result implements __equalsCalc = obj; boolean _equals; - _equals = super.equals(obj) - && (((this.msa == null) && (other.getMsa() == null)) || ((this.msa != null) && this.msa - .equals(other.getMsa()))); + _equals = super.equals(obj) && (((this.msa == null) + && (other.getMsa() == null)) + || ((this.msa != null) && this.msa.equals(other.getMsa()))); __equalsCalc = null; return _equals; diff --git a/src/vamsas/objects/simple/Msfalignment.java b/src/vamsas/objects/simple/Msfalignment.java index 90370f0..e4b760b 100755 --- a/src/vamsas/objects/simple/Msfalignment.java +++ b/src/vamsas/objects/simple/Msfalignment.java @@ -100,11 +100,11 @@ public class Msfalignment implements java.io.Serializable } __equalsCalc = obj; boolean _equals; - _equals = true - && ((this.msf == null && other.getMsf() == null) || (this.msf != null && this.msf - .equals(other.getMsf()))) - && ((this.notes == null && other.getNotes() == null) || (this.notes != null && this.notes - .equals(other.getNotes()))); + _equals = true && ((this.msf == null && other.getMsf() == null) + || (this.msf != null && this.msf.equals(other.getMsf()))) + && ((this.notes == null && other.getNotes() == null) + || (this.notes != null + && this.notes.equals(other.getNotes()))); __equalsCalc = null; return _equals; } diff --git a/src/vamsas/objects/simple/Result.java b/src/vamsas/objects/simple/Result.java index 87f0a48..170a1b5 100755 --- a/src/vamsas/objects/simple/Result.java +++ b/src/vamsas/objects/simple/Result.java @@ -310,8 +310,7 @@ public class Result implements java.io.Serializable } __equalsCalc = obj; boolean _equals; - _equals = true - && this.broken == other.isBroken() + _equals = true && this.broken == other.isBroken() && this.failed == other.isFailed() && this.finished == other.isFinished() && this.invalid == other.isInvalid() @@ -320,8 +319,9 @@ public class Result implements java.io.Serializable && this.running == other.isRunning() && this.serverError == other.isServerError() && this.state == other.getState() - && ((this.status == null && other.getStatus() == null) || (this.status != null && this.status - .equals(other.getStatus()))) + && ((this.status == null && other.getStatus() == null) + || (this.status != null + && this.status.equals(other.getStatus()))) && this.suspended == other.isSuspended(); __equalsCalc = null; return _equals; diff --git a/src/vamsas/objects/simple/Secstructpred.java b/src/vamsas/objects/simple/Secstructpred.java index 349c21e..170de07 100755 --- a/src/vamsas/objects/simple/Secstructpred.java +++ b/src/vamsas/objects/simple/Secstructpred.java @@ -76,8 +76,9 @@ public class Secstructpred implements java.io.Serializable } __equalsCalc = obj; boolean _equals; - _equals = true && ((this.output == null && other.getOutput() == null) || (this.output != null && this.output - .equals(other.getOutput()))); + _equals = true && ((this.output == null && other.getOutput() == null) + || (this.output != null + && this.output.equals(other.getOutput()))); __equalsCalc = null; return _equals; } diff --git a/src/vamsas/objects/simple/SeqSearchResult.java b/src/vamsas/objects/simple/SeqSearchResult.java index 8ef8f7c..04b6f70 100644 --- a/src/vamsas/objects/simple/SeqSearchResult.java +++ b/src/vamsas/objects/simple/SeqSearchResult.java @@ -20,8 +20,8 @@ */ package vamsas.objects.simple; -public class SeqSearchResult extends vamsas.objects.simple.Result implements - java.io.Serializable +public class SeqSearchResult extends vamsas.objects.simple.Result + implements java.io.Serializable { private vamsas.objects.simple.Alignment alignment; @@ -150,14 +150,18 @@ public class SeqSearchResult extends vamsas.objects.simple.Result implements __equalsCalc = obj; boolean _equals; _equals = super.equals(obj) - && ((this.alignment == null && other.getAlignment() == null) || (this.alignment != null && this.alignment - .equals(other.getAlignment()))) - && ((this.annotation == null && other.getAnnotation() == null) || (this.annotation != null && this.annotation - .equals(other.getAnnotation()))) - && ((this.features == null && other.getFeatures() == null) || (this.features != null && this.features - .equals(other.getFeatures()))) - && ((this.newickTree == null && other.getNewickTree() == null) || (this.newickTree != null && this.newickTree - .equals(other.getNewickTree()))); + && ((this.alignment == null && other.getAlignment() == null) + || (this.alignment != null + && this.alignment.equals(other.getAlignment()))) + && ((this.annotation == null && other.getAnnotation() == null) + || (this.annotation != null && this.annotation + .equals(other.getAnnotation()))) + && ((this.features == null && other.getFeatures() == null) + || (this.features != null + && this.features.equals(other.getFeatures()))) + && ((this.newickTree == null && other.getNewickTree() == null) + || (this.newickTree != null && this.newickTree + .equals(other.getNewickTree()))); __equalsCalc = null; return _equals; } diff --git a/src/vamsas/objects/simple/Sequence.java b/src/vamsas/objects/simple/Sequence.java index 8eb7208..0615c39 100755 --- a/src/vamsas/objects/simple/Sequence.java +++ b/src/vamsas/objects/simple/Sequence.java @@ -101,10 +101,11 @@ public class Sequence implements java.io.Serializable __equalsCalc = obj; boolean _equals; _equals = true - && ((this.id == null && other.getId() == null) || (this.id != null && this.id - .equals(other.getId()))) - && ((this.seq == null && other.getSeq() == null) || (this.seq != null && this.seq - .equals(other.getSeq()))); + && ((this.id == null && other.getId() == null) + || (this.id != null && this.id.equals(other.getId()))) + && ((this.seq == null && other.getSeq() == null) + || (this.seq != null + && this.seq.equals(other.getSeq()))); __equalsCalc = null; return _equals; } diff --git a/src/vamsas/objects/simple/SequenceSet.java b/src/vamsas/objects/simple/SequenceSet.java index d5a269b..03b4f7e 100755 --- a/src/vamsas/objects/simple/SequenceSet.java +++ b/src/vamsas/objects/simple/SequenceSet.java @@ -77,8 +77,9 @@ public class SequenceSet implements java.io.Serializable } __equalsCalc = obj; boolean _equals; - _equals = true && ((this.seqs == null && other.getSeqs() == null) || (this.seqs != null && java.util.Arrays - .equals(this.seqs, other.getSeqs()))); + _equals = true && ((this.seqs == null && other.getSeqs() == null) + || (this.seqs != null && java.util.Arrays.equals(this.seqs, + other.getSeqs()))); __equalsCalc = null; return _equals; } diff --git a/src/vamsas/objects/simple/WsJobId.java b/src/vamsas/objects/simple/WsJobId.java index eb04dcf..83c1c2f 100755 --- a/src/vamsas/objects/simple/WsJobId.java +++ b/src/vamsas/objects/simple/WsJobId.java @@ -100,9 +100,8 @@ public class WsJobId implements java.io.Serializable } __equalsCalc = obj; boolean _equals; - _equals = true - && ((this.jobId == null && other.getJobId() == null) || (this.jobId != null && this.jobId - .equals(other.getJobId()))) + _equals = true && ((this.jobId == null && other.getJobId() == null) + || (this.jobId != null && this.jobId.equals(other.getJobId()))) && this.status == other.getStatus(); __equalsCalc = null; return _equals; diff --git a/test/jalview/analysis/AAFrequencyTest.java b/test/jalview/analysis/AAFrequencyTest.java index 93c95ce..d714970 100644 --- a/test/jalview/analysis/AAFrequencyTest.java +++ b/test/jalview/analysis/AAFrequencyTest.java @@ -57,8 +57,7 @@ public class AAFrequencyTest SequenceI seq4 = new Sequence("Seq4", "CA--t"); SequenceI[] seqs = new SequenceI[] { seq1, seq2, seq3, seq4 }; int width = seq1.getLength(); - ProfilesI result = AAFrequency.calculate(seqs, width, 0, width, - false); + ProfilesI result = AAFrequency.calculate(seqs, width, 0, width, false); // col 0 is 100% C ProfileI col = result.get(0); @@ -106,8 +105,7 @@ public class AAFrequencyTest SequenceI seq4 = new Sequence("Seq4", "CA-t"); SequenceI[] seqs = new SequenceI[] { seq1, seq2, seq3, seq4 }; int width = seq1.getLength(); - ProfilesI result = AAFrequency.calculate(seqs, width, 0, width, - true); + ProfilesI result = AAFrequency.calculate(seqs, width, 0, width, true); ProfileI profile = result.get(0); assertEquals(4, profile.getCounts().getCount('C')); @@ -176,8 +174,8 @@ public class AAFrequencyTest AlignmentAnnotation consensus = new AlignmentAnnotation("Consensus", "PID", new Annotation[width]); - AAFrequency - .completeConsensus(consensus, profiles, 0, 5, false, true, 4); + AAFrequency.completeConsensus(consensus, profiles, 0, 5, false, true, + 4); Annotation ann = consensus.annotations[0]; assertEquals("C 100%", ann.description); @@ -214,12 +212,12 @@ public class AAFrequencyTest SequenceI[] seqs = new SequenceI[] { seq1, seq2, seq3, seq4 }; int width = seq1.getLength(); ProfilesI profiles = AAFrequency.calculate(seqs, width, 0, width, true); - + AlignmentAnnotation consensus = new AlignmentAnnotation("Consensus", "PID", new Annotation[width]); - AAFrequency - .completeConsensus(consensus, profiles, 0, 5, true, false, 4); - + AAFrequency.completeConsensus(consensus, profiles, 0, 5, true, false, + 4); + Annotation ann = consensus.annotations[0]; assertEquals("C 100%", ann.description); assertEquals("C", ann.displayCharacter); @@ -298,7 +296,7 @@ public class AAFrequencyTest counts.put('L', 38); counts.put('H', 2); profile.setCounts(counts); - + /* * [0, noOfValues, totalPercent, char1, count1, ...] * G: 70/200 = 35% @@ -309,10 +307,9 @@ public class AAFrequencyTest */ int[] extracted = AAFrequency.extractProfile(profile, false); int[] expected = new int[] { AlignmentAnnotation.SEQUENCE_PROFILE, 4, - 85, 'G', 35, 'R', 30, 'L', 19, 'H', - 1 }; + 85, 'G', 35, 'R', 30, 'L', 19, 'H', 1 }; org.testng.Assert.assertEquals(extracted, expected); - + /* * add some counts of 1; these round down to 0% and should be discarded */ @@ -323,7 +320,7 @@ public class AAFrequencyTest expected = new int[] { AlignmentAnnotation.SEQUENCE_PROFILE, 4, 84, 'G', 34, 'R', 30, 'L', 19, 'H', 1 }; org.testng.Assert.assertEquals(extracted, expected); - + } @Test(groups = { "Functional" }) @@ -356,7 +353,7 @@ public class AAFrequencyTest codonCounts[0] = 120; codonCounts[1] = 110; profile.put(AAFrequency.PROFILE, codonCounts); - + /* * [0, noOfValues, totalPercent, char1, count1, ...] * codon1: 30/110 = 27.2 = 27% @@ -379,7 +376,7 @@ public class AAFrequencyTest * max count 70 for modal residue 'G' */ Hashtable profile = new Hashtable(); - + /* * cdna profile is {seqCount, ungappedCount, codonCount1, ...codonCount64} * where 1..64 positions correspond to encoded codons @@ -401,7 +398,7 @@ public class AAFrequencyTest codonCounts[0] = 120; codonCounts[1] = 110; profile.put(AAFrequency.PROFILE, codonCounts); - + /* * [0, noOfValues, totalPercent, char1, count1, ...] * codon1: 30/120 = 25% diff --git a/test/jalview/analysis/AlignSeqTest.java b/test/jalview/analysis/AlignSeqTest.java index bd827f9..a9a9730 100644 --- a/test/jalview/analysis/AlignSeqTest.java +++ b/test/jalview/analysis/AlignSeqTest.java @@ -58,8 +58,8 @@ public class AlignSeqTest @Test(groups = { "Functional" }) public void testIndexEncode_nucleotide() { - AlignSeq as = new AlignSeq(new Sequence("s1", "TTAG"), new Sequence( - "s2", "ACGT"), AlignSeq.DNA); + AlignSeq as = new AlignSeq(new Sequence("s1", "TTAG"), + new Sequence("s2", "ACGT"), AlignSeq.DNA); int[] expected = new int[] { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, -1, -1, 10, -1 }; String s = "aAcCgGtTuUiIxXrRyYnN .-?"; @@ -69,8 +69,8 @@ public class AlignSeqTest @Test(groups = { "Functional" }) public void testIndexEncode_peptide() { - AlignSeq as = new AlignSeq(new Sequence("s1", "PFY"), new Sequence( - "s2", "RQW"), AlignSeq.PEP); + AlignSeq as = new AlignSeq(new Sequence("s1", "PFY"), + new Sequence("s2", "RQW"), AlignSeq.PEP); int[] expected = new int[] { 0, 0, 1, 1, 2, 2, 21, 21, 22, 22, -1, 23, -1, -1, -1 }; String s = "aArRnNzZxX *.-?"; diff --git a/test/jalview/analysis/AlignmentAnnotationUtilsTest.java b/test/jalview/analysis/AlignmentAnnotationUtilsTest.java index f41262c..cdb950e 100644 --- a/test/jalview/analysis/AlignmentAnnotationUtilsTest.java +++ b/test/jalview/analysis/AlignmentAnnotationUtilsTest.java @@ -409,9 +409,8 @@ public class AlignmentAnnotationUtilsTest anns[4].graphGroup = -1; anns[4].visible = true; - BitSet result = AlignmentAnnotationUtils - .getVisibleLineGraphGroups(AlignmentAnnotationUtils - .asList(anns)); + BitSet result = AlignmentAnnotationUtils.getVisibleLineGraphGroups( + AlignmentAnnotationUtils.asList(anns)); assertTrue(result.get(5)); assertFalse(result.get(0)); assertFalse(result.get(1)); diff --git a/test/jalview/analysis/AlignmentGenerator.java b/test/jalview/analysis/AlignmentGenerator.java index d01b23e..e6bdbd4 100644 --- a/test/jalview/analysis/AlignmentGenerator.java +++ b/test/jalview/analysis/AlignmentGenerator.java @@ -38,11 +38,12 @@ import java.util.Random; import org.testng.annotations.BeforeClass; /** - * Generates, and outputs in Fasta format, a random peptide or nucleotide alignment for given - * sequence length and count. Will regenerate the same alignment each time if - * the same random seed is used (so may be used for reproducible unit tests). - * Not guaranteed to reproduce the same results between versions, as the rules - * may get tweaked to produce more 'realistic' results. + * Generates, and outputs in Fasta format, a random peptide or nucleotide + * alignment for given sequence length and count. Will regenerate the same + * alignment each time if the same random seed is used (so may be used for + * reproducible unit tests). Not guaranteed to reproduce the same results + * between versions, as the rules may get tweaked to produce more 'realistic' + * results. * * @author gmcarstairs */ @@ -100,10 +101,9 @@ public class AlignmentGenerator int gapPercentage = Integer.valueOf(args[4]); int changePercentage = Integer.valueOf(args[5]); - ps.println("; " + height + " sequences of " + width - + " bases with " + gapPercentage + "% gaps and " - + changePercentage + "% mutations (random seed = " + randomSeed - + ")"); + ps.println("; " + height + " sequences of " + width + " bases with " + + gapPercentage + "% gaps and " + changePercentage + + "% mutations (random seed = " + randomSeed + ")"); new AlignmentGenerator(nucleotide, ps).generate(width, height, randomSeed, gapPercentage, changePercentage); @@ -123,16 +123,16 @@ public class AlignmentGenerator System.out.println("arg0: n (for nucleotide) or p (for peptide)"); System.out.println("arg1: number of (non-gap) bases per sequence"); System.out.println("arg2: number of sequences"); - System.out - .println("arg3: an integer as random seed (same seed = same results)"); + System.out.println( + "arg3: an integer as random seed (same seed = same results)"); System.out.println("arg4: percentage of gaps to (randomly) generate"); - System.out - .println("arg5: percentage of 'mutations' to (randomly) generate"); - System.out - .println("arg6: (optional) path to output file (default is sysout)"); + System.out.println( + "arg5: percentage of 'mutations' to (randomly) generate"); + System.out.println( + "arg6: (optional) path to output file (default is sysout)"); System.out.println("Example: AlignmentGenerator n 12 15 387 10 5"); - System.out - .println("- 15 nucleotide sequences of 12 bases each, approx 10% gaps and 5% mutations, random seed = 387"); + System.out.println( + "- 15 nucleotide sequences of 12 bases each, approx 10% gaps and 5% mutations, random seed = 387"); } @@ -205,8 +205,8 @@ public class AlignmentGenerator for (int count = 0; count < length;) { boolean addGap = random.nextInt(100) < gapPercentage; - char c = addGap ? GAP : BASES[random.nextInt(Integer.MAX_VALUE) - % BASES.length]; + char c = addGap ? GAP + : BASES[random.nextInt(Integer.MAX_VALUE) % BASES.length]; seq.append(c); if (!addGap) { @@ -230,8 +230,8 @@ public class AlignmentGenerator * @param changePercentage * @return */ - private SequenceI generateAnotherSequence(char[] ds, int seqno, - int width, int changePercentage) + private SequenceI generateAnotherSequence(char[] ds, int seqno, int width, + int changePercentage) { int length = ds.length; char[] seq = new char[length]; diff --git a/test/jalview/analysis/AlignmentSorterTest.java b/test/jalview/analysis/AlignmentSorterTest.java index 3b9be23..66aa016 100644 --- a/test/jalview/analysis/AlignmentSorterTest.java +++ b/test/jalview/analysis/AlignmentSorterTest.java @@ -47,18 +47,19 @@ public class AlignmentSorterTest * seq3 KD(-4), KD(3.0) average -0.5 * seq4 Helix(NaN) - should sort as if largest score */ - seq1.addSequenceFeature(new SequenceFeature("Cath", "", 2, 3, 2.0f, - "g1")); - seq1.addSequenceFeature(new SequenceFeature("Pfam", "", 4, 5, 4.0f, - "g2")); - seq2.addSequenceFeature(new SequenceFeature("Cath", "", 2, 3, 2.5f, - "g3")); - seq2.addSequenceFeature(new SequenceFeature("Metal", "", 2, 3, - Float.NaN, "g4")); + seq1.addSequenceFeature( + new SequenceFeature("Cath", "", 2, 3, 2.0f, "g1")); + seq1.addSequenceFeature( + new SequenceFeature("Pfam", "", 4, 5, 4.0f, "g2")); + seq2.addSequenceFeature( + new SequenceFeature("Cath", "", 2, 3, 2.5f, "g3")); + seq2.addSequenceFeature( + new SequenceFeature("Metal", "", 2, 3, Float.NaN, "g4")); seq3.addSequenceFeature(new SequenceFeature("kD", "", 2, 3, -4f, "g5")); - seq3.addSequenceFeature(new SequenceFeature("kD", "", 5, 6, 3.0f, "g6")); - seq4.addSequenceFeature(new SequenceFeature("Helix", "", 2, 3, - Float.NaN, "g7")); + seq3.addSequenceFeature( + new SequenceFeature("kD", "", 5, 6, 3.0f, "g6")); + seq4.addSequenceFeature( + new SequenceFeature("Helix", "", 2, 3, Float.NaN, "g7")); /* * sort by ascending score, no filter on feature type or group @@ -100,8 +101,9 @@ public class AlignmentSorterTest * seq3 average is now 3.0 * next sort is ascending (not toggled) as for a different group spec */ - List groups = Arrays.asList(new String[] { "g1", "g2", "g3", - "g6" }); + List groups = Arrays + .asList(new String[] + { "g1", "g2", "g3", "g6" }); AlignmentSorter.sortByFeature(types, groups, 0, al.getWidth(), al, AlignmentSorter.FEATURE_SCORE); assertSame(al.getSequenceAt(0), seq1); // 2.0 diff --git a/test/jalview/analysis/AlignmentUtilsTests.java b/test/jalview/analysis/AlignmentUtilsTests.java index 9eec241..e231e7f 100644 --- a/test/jalview/analysis/AlignmentUtilsTests.java +++ b/test/jalview/analysis/AlignmentUtilsTests.java @@ -85,15 +85,14 @@ public class AlignmentUtilsTests SequenceI s1 = ts.deriveSequence().getSubSequence(i, i + 7); al.addSequence(s1); } - System.out.println(new AppletFormatAdapter().formatSequences( - FileFormat.Clustal, - al, true)); + System.out.println(new AppletFormatAdapter() + .formatSequences(FileFormat.Clustal, al, true)); for (int flnk = -1; flnk < 25; flnk++) { AlignmentI exp = AlignmentUtils.expandContext(al, flnk); System.out.println("\nFlank size: " + flnk); - System.out.println(new AppletFormatAdapter().formatSequences( - FileFormat.Clustal, exp, true)); + System.out.println(new AppletFormatAdapter() + .formatSequences(FileFormat.Clustal, exp, true)); if (flnk == -1) { /* @@ -103,11 +102,10 @@ public class AlignmentUtilsTests { String ung = sq.getSequenceAsString().replaceAll("-+", ""); final String errorMsg = "Flanking sequence not the same as original dataset sequence.\n" - + ung - + "\n" + + ung + "\n" + sq.getDatasetSequence().getSequenceAsString(); - assertTrue(errorMsg, ung.equalsIgnoreCase(sq.getDatasetSequence() - .getSequenceAsString())); + assertTrue(errorMsg, ung.equalsIgnoreCase( + sq.getDatasetSequence().getSequenceAsString())); } } else if (flnk == 24) @@ -177,8 +175,8 @@ public class AlignmentUtilsTests * Expand the subsequence to the full sequence abcDEFghi */ AlignmentI expanded = AlignmentUtils.expandContext(al, -1); - assertEquals("abcDEFghi", expanded.getSequenceAt(0) - .getSequenceAsString()); + assertEquals("abcDEFghi", + expanded.getSequenceAt(0).getSequenceAsString()); /* * Confirm the alignment and sequence have the same SS annotation, @@ -249,8 +247,8 @@ public class AlignmentUtilsTests protected AlignmentI loadAlignment(final String data, FileFormatI format) throws IOException { - AlignmentI a = new FormatAdapter().readFile(data, - DataSourceType.PASTE, format); + AlignmentI a = new FormatAdapter().readFile(data, DataSourceType.PASTE, + format); a.setDataset(null); return a; } @@ -299,11 +297,13 @@ public class AlignmentUtilsTests MapList mapList = protMappings[0].getMap(); assertEquals(3, mapList.getFromRatio()); assertEquals(1, mapList.getToRatio()); - assertTrue(Arrays.equals(new int[] { 1, 9 }, mapList.getFromRanges() - .get(0))); + assertTrue( + Arrays.equals(new int[] + { 1, 9 }, mapList.getFromRanges().get(0))); assertEquals(1, mapList.getFromRanges().size()); - assertTrue(Arrays.equals(new int[] { 1, 3 }, - mapList.getToRanges().get(0))); + assertTrue( + Arrays.equals(new int[] + { 1, 3 }, mapList.getToRanges().get(0))); assertEquals(1, mapList.getToRanges().size()); // V12346 mapped to A33333 @@ -376,7 +376,8 @@ public class AlignmentUtilsTests * Exons at codon 2 (AAA) and 4 (TTT) */ MapList map = new MapList(new int[] { 4, 6, 10, 12 }, - new int[] { 1, 2 }, 3, 1); + new int[] + { 1, 2 }, 3, 1); /* * Simple case: no gaps in dna @@ -387,14 +388,14 @@ public class AlignmentUtilsTests /* * Add gaps to dna - but ignore when realigning. */ - checkAlignSequenceAs("-G-G-G--A--A---AC-CC-T-TT-GG-G-", "--A-L-", - false, false, map, "GGG---AAACCCTTTGGG"); + checkAlignSequenceAs("-G-G-G--A--A---AC-CC-T-TT-GG-G-", "--A-L-", false, + false, map, "GGG---AAACCCTTTGGG"); /* * Add gaps to dna - include within exons only when realigning. */ - checkAlignSequenceAs("-G-G-G--A--A---A-C-CC-T-TT-GG-G-", "--A-L-", - true, false, map, "GGG---A--A---ACCCT-TTGGG"); + checkAlignSequenceAs("-G-G-G--A--A---A-C-CC-T-TT-GG-G-", "--A-L-", true, + false, map, "GGG---A--A---ACCCT-TTGGG"); /* * Include gaps outside exons only when realigning. @@ -405,14 +406,14 @@ public class AlignmentUtilsTests /* * Include gaps following first intron if we are 'preserving mapped gaps' */ - checkAlignSequenceAs("-G-G-G--A--A---A-C-CC-T-TT-GG-G-", "--A-L-", - true, true, map, "-G-G-G--A--A---A-C-CC-T-TT-GG-G-"); + checkAlignSequenceAs("-G-G-G--A--A---A-C-CC-T-TT-GG-G-", "--A-L-", true, + true, map, "-G-G-G--A--A---A-C-CC-T-TT-GG-G-"); /* * Include all gaps in dna when realigning. */ - checkAlignSequenceAs("-G-G-G--A--A---A-C-CC-T-TT-GG-G-", "--A-L-", - true, true, map, "-G-G-G--A--A---A-C-CC-T-TT-GG-G-"); + checkAlignSequenceAs("-G-G-G--A--A---A-C-CC-T-TT-GG-G-", "--A-L-", true, + true, map, "-G-G-G--A--A---A-C-CC-T-TT-GG-G-"); } /** @@ -424,8 +425,9 @@ public class AlignmentUtilsTests /* * Exons at codon 2 (AAA) and 4 (TTT) mapped to A and P */ - final MapList map = new MapList(new int[] { 4, 6, 10, 12 }, new int[] { - 1, 1, 3, 3 }, 3, 1); + final MapList map = new MapList(new int[] { 4, 6, 10, 12 }, + new int[] + { 1, 1, 3, 3 }, 3, 1); /* * -L- 'aligns' ccc------ @@ -456,8 +458,8 @@ public class AlignmentUtilsTests SequenceI alignFrom = new Sequence("Seq2", alignModel); alignFrom.createDatasetSequence(); AlignedCodonFrame acf = new AlignedCodonFrame(); - acf.addMap(alignMe.getDatasetSequence(), - alignFrom.getDatasetSequence(), map); + acf.addMap(alignMe.getDatasetSequence(), alignFrom.getDatasetSequence(), + map); AlignmentUtils.alignSequenceAs(alignMe, alignFrom, acf, "---", '-', preserveMappedGaps, preserveUnmappedGaps); @@ -474,7 +476,8 @@ public class AlignmentUtilsTests /* * Intron GGGAAA followed by exon CCCTTT */ - MapList map = new MapList(new int[] { 7, 12 }, new int[] { 1, 2 }, 3, 1); + MapList map = new MapList(new int[] { 7, 12 }, new int[] { 1, 2 }, 3, + 1); checkAlignSequenceAs("GG-G-AA-A-C-CC-T-TT", "AL", false, true, map, "GG-G-AA-ACCCTTT"); @@ -500,11 +503,13 @@ public class AlignmentUtilsTests SequenceI prot2 = new Sequence("Seq2", "CHYQ"); SequenceI prot3 = new Sequence("Seq3", "CHYQ"); SequenceI prot4 = new Sequence("Seq4", "R-QSV"); // unmapped, unchanged - AlignmentI protein = new Alignment(new SequenceI[] { prot1, prot2, - prot3, prot4 }); + AlignmentI protein = new Alignment( + new SequenceI[] + { prot1, prot2, prot3, prot4 }); protein.setDataset(null); - MapList map = new MapList(new int[] { 1, 12 }, new int[] { 1, 4 }, 3, 1); + MapList map = new MapList(new int[] { 1, 12 }, new int[] { 1, 4 }, 3, + 1); AlignedCodonFrame acf = new AlignedCodonFrame(); acf.addMap(dna1.getDatasetSequence(), prot1.getDatasetSequence(), map); acf.addMap(dna2.getDatasetSequence(), prot2.getDatasetSequence(), map); @@ -573,28 +578,28 @@ public class AlignmentUtilsTests "F*PK*G".toCharArray())); // wrong protein - assertFalse(AlignmentUtils.translatesAs("tttcccaaaggg".toCharArray(), - 0, "FPMG".toCharArray())); + assertFalse(AlignmentUtils.translatesAs("tttcccaaaggg".toCharArray(), 0, + "FPMG".toCharArray())); // truncated dna assertFalse(AlignmentUtils.translatesAs("tttcccaaagg".toCharArray(), 0, "FPKG".toCharArray())); // truncated protein - assertFalse(AlignmentUtils.translatesAs("tttcccaaaggg".toCharArray(), - 0, "FPK".toCharArray())); + assertFalse(AlignmentUtils.translatesAs("tttcccaaaggg".toCharArray(), 0, + "FPK".toCharArray())); // overlong dna (doesn't end in stop codon) - assertFalse(AlignmentUtils.translatesAs( - "tttcccaaagggttt".toCharArray(), 0, "FPKG".toCharArray())); + assertFalse(AlignmentUtils.translatesAs("tttcccaaagggttt".toCharArray(), + 0, "FPKG".toCharArray())); // dna + stop codon + more assertFalse(AlignmentUtils.translatesAs( "tttcccaaagggttaga".toCharArray(), 0, "FPKG".toCharArray())); // overlong protein - assertFalse(AlignmentUtils.translatesAs("tttcccaaaggg".toCharArray(), - 0, "FPKGQ".toCharArray())); + assertFalse(AlignmentUtils.translatesAs("tttcccaaaggg".toCharArray(), 0, + "FPKGQ".toCharArray())); } /** @@ -644,11 +649,13 @@ public class AlignmentUtilsTests MapList mapList = protMappings[0].getMap(); assertEquals(3, mapList.getFromRatio()); assertEquals(1, mapList.getToRatio()); - assertTrue(Arrays.equals(new int[] { 1, 9 }, mapList.getFromRanges() - .get(0))); + assertTrue( + Arrays.equals(new int[] + { 1, 9 }, mapList.getFromRanges().get(0))); assertEquals(1, mapList.getFromRanges().size()); - assertTrue(Arrays.equals(new int[] { 1, 3 }, - mapList.getToRanges().get(0))); + assertTrue( + Arrays.equals(new int[] + { 1, 3 }, mapList.getToRanges().get(0))); assertEquals(1, mapList.getToRanges().size()); // V12346 mapped from A33333 starting position 4 @@ -661,11 +668,13 @@ public class AlignmentUtilsTests mapList = protMappings[0].getMap(); assertEquals(3, mapList.getFromRatio()); assertEquals(1, mapList.getToRatio()); - assertTrue(Arrays.equals(new int[] { 4, 12 }, mapList.getFromRanges() - .get(0))); + assertTrue( + Arrays.equals(new int[] + { 4, 12 }, mapList.getFromRanges().get(0))); assertEquals(1, mapList.getFromRanges().size()); - assertTrue(Arrays.equals(new int[] { 1, 3 }, - mapList.getToRanges().get(0))); + assertTrue( + Arrays.equals(new int[] + { 1, 3 }, mapList.getToRanges().get(0))); assertEquals(1, mapList.getToRanges().size()); // V12347 mapped to A11111 starting position 4 @@ -678,11 +687,13 @@ public class AlignmentUtilsTests mapList = protMappings[0].getMap(); assertEquals(3, mapList.getFromRatio()); assertEquals(1, mapList.getToRatio()); - assertTrue(Arrays.equals(new int[] { 4, 12 }, mapList.getFromRanges() - .get(0))); + assertTrue( + Arrays.equals(new int[] + { 4, 12 }, mapList.getFromRanges().get(0))); assertEquals(1, mapList.getFromRanges().size()); - assertTrue(Arrays.equals(new int[] { 1, 3 }, - mapList.getToRanges().get(0))); + assertTrue( + Arrays.equals(new int[] + { 1, 3 }, mapList.getToRanges().get(0))); assertEquals(1, mapList.getToRanges().size()); // no mapping involving the 'extra' A44444 @@ -786,8 +797,8 @@ public class AlignmentUtilsTests List dnaseqs = new ArrayList<>(); dnaseqs.add(new Sequence("EMBL|A11111", "GAAATCCAG")); // = EIQ dnaseqs.add(new Sequence("EMBL|A22222", "GAAATTCAG")); // = EIQ - AlignmentI cdna = new Alignment(dnaseqs.toArray(new SequenceI[dnaseqs - .size()])); + AlignmentI cdna = new Alignment( + dnaseqs.toArray(new SequenceI[dnaseqs.size()])); cdna.setDataset(null); // Xref A22222 to V12345 (should get mapped) @@ -838,11 +849,14 @@ public class AlignmentUtilsTests ann2.setSequenceRef(seq2); AlignmentAnnotation ann3 = new AlignmentAnnotation("Structure", "ann3", anns); - AlignmentAnnotation ann4 = new AlignmentAnnotation("Temp", "ann4", anns); + AlignmentAnnotation ann4 = new AlignmentAnnotation("Temp", "ann4", + anns); ann4.setSequenceRef(seq1); - AlignmentAnnotation ann5 = new AlignmentAnnotation("Temp", "ann5", anns); + AlignmentAnnotation ann5 = new AlignmentAnnotation("Temp", "ann5", + anns); ann5.setSequenceRef(seq2); - AlignmentAnnotation ann6 = new AlignmentAnnotation("Temp", "ann6", anns); + AlignmentAnnotation ann6 = new AlignmentAnnotation("Temp", "ann6", + anns); AlignmentI al = new Alignment(new SequenceI[] { seq1, seq2, seq3 }); al.addAnnotation(ann1); // Structure for Seq1 al.addAnnotation(ann2); // Structure for Seq2 @@ -975,7 +989,7 @@ public class AlignmentUtilsTests assertTrue(AlignmentUtils.haveCrossRef(seq2, seq1)); // now the other way round - seq1.setDBRefs(null); + seq1.setDBRefs(null); seq2.addDBRef(new DBRefEntry("EMBL", "1", "A12345")); assertTrue(AlignmentUtils.haveCrossRef(seq1, seq2)); assertTrue(AlignmentUtils.haveCrossRef(seq2, seq1)); @@ -1014,8 +1028,8 @@ public class AlignmentUtilsTests * put a variant feature on dna2 base 8 * - should transfer to cds2 base 5 */ - dna2.addSequenceFeature(new SequenceFeature("variant", "hgmd", 8, 8, - 0f, null)); + dna2.addSequenceFeature( + new SequenceFeature("variant", "hgmd", 8, 8, 0f, null)); /* * need a sourceDbRef if we are to construct dbrefs to the CDS @@ -1032,14 +1046,16 @@ public class AlignmentUtilsTests * CDS sequences are 'discovered' from dna-to-protein mappings on the alignment * dataset (e.g. added from dbrefs by CrossRef.findXrefSequences) */ - MapList mapfordna1 = new MapList(new int[] { 4, 6, 10, 12 }, new int[] { - 1, 2 }, 3, 1); + MapList mapfordna1 = new MapList(new int[] { 4, 6, 10, 12 }, + new int[] + { 1, 2 }, 3, 1); AlignedCodonFrame acf = new AlignedCodonFrame(); acf.addMap(dna1.getDatasetSequence(), pep1.getDatasetSequence(), mapfordna1); dna.addCodonFrame(acf); MapList mapfordna2 = new MapList(new int[] { 1, 3, 7, 9, 13, 15 }, - new int[] { 1, 3 }, 3, 1); + new int[] + { 1, 3 }, 3, 1); acf = new AlignedCodonFrame(); acf.addMap(dna2.getDatasetSequence(), pep2.getDatasetSequence(), mapfordna2); @@ -1062,8 +1078,9 @@ public class AlignmentUtilsTests /* * execute method under test: */ - AlignmentI cds = AlignmentUtils.makeCdsAlignment(new SequenceI[] { - dna1, dna2 }, dna.getDataset(), null); + AlignmentI cds = AlignmentUtils + .makeCdsAlignment(new SequenceI[] + { dna1, dna2 }, dna.getDataset(), null); /* * verify cds sequences @@ -1093,8 +1110,8 @@ public class AlignmentUtilsTests assertEquals(dna1xref.getAccessionId(), dbref.getAccessionId()); assertNotNull(dbref.getMap()); assertSame(pep1.getDatasetSequence(), dbref.getMap().getTo()); - MapList cdsMapping = new MapList(new int[] { 1, 6 }, - new int[] { 1, 2 }, 3, 1); + MapList cdsMapping = new MapList(new int[] { 1, 6 }, new int[] { 1, 2 }, + 3, 1); assertEquals(cdsMapping, dbref.getMap().getMap()); /* @@ -1118,13 +1135,15 @@ public class AlignmentUtilsTests DBRefEntry dbRefEntry = dna1.getDBRefs().get(2); assertSame(cds1Dss, dbRefEntry.getMap().getTo()); MapList dnaToCdsMapping = new MapList(new int[] { 4, 6, 10, 12 }, - new int[] { 1, 6 }, 1, 1); + new int[] + { 1, 6 }, 1, 1); assertEquals(dnaToCdsMapping, dbRefEntry.getMap().getMap()); assertEquals(3, dna2.getDBRefs().size()); dbRefEntry = dna2.getDBRefs().get(2); assertSame(cds2Dss, dbRefEntry.getMap().getTo()); dnaToCdsMapping = new MapList(new int[] { 1, 3, 7, 9, 13, 15 }, - new int[] { 1, 9 }, 1, 1); + new int[] + { 1, 9 }, 1, 1); assertEquals(dnaToCdsMapping, dbRefEntry.getMap().getMap()); /* @@ -1133,14 +1152,16 @@ public class AlignmentUtilsTests assertEquals(2, cds1Dss.getDBRefs().size()); dbRefEntry = cds1Dss.getDBRefs().get(1); assertSame(dna1.getDatasetSequence(), dbRefEntry.getMap().getTo()); - MapList cdsToDnaMapping = new MapList(new int[] { 1, 6 }, new int[] { - 4, 6, 10, 12 }, 1, 1); + MapList cdsToDnaMapping = new MapList(new int[] { 1, 6 }, + new int[] + { 4, 6, 10, 12 }, 1, 1); assertEquals(cdsToDnaMapping, dbRefEntry.getMap().getMap()); assertEquals(2, cds2Dss.getDBRefs().size()); dbRefEntry = cds2Dss.getDBRefs().get(1); assertSame(dna2.getDatasetSequence(), dbRefEntry.getMap().getTo()); - cdsToDnaMapping = new MapList(new int[] { 1, 9 }, new int[] { 1, 3, 7, - 9, 13, 15 }, 1, 1); + cdsToDnaMapping = new MapList(new int[] { 1, 9 }, + new int[] + { 1, 3, 7, 9, 13, 15 }, 1, 1); assertEquals(cdsToDnaMapping, dbRefEntry.getMap().getMap()); /* @@ -1242,12 +1263,12 @@ public class AlignmentUtilsTests pep1.createDatasetSequence(); pep2.createDatasetSequence(); pep3.createDatasetSequence(); - pep1.getDatasetSequence().addDBRef( - new DBRefEntry("EMBLCDS", "2", "A12345")); - pep2.getDatasetSequence().addDBRef( - new DBRefEntry("EMBLCDS", "3", "A12346")); - pep3.getDatasetSequence().addDBRef( - new DBRefEntry("EMBLCDS", "4", "A12347")); + pep1.getDatasetSequence() + .addDBRef(new DBRefEntry("EMBLCDS", "2", "A12345")); + pep2.getDatasetSequence() + .addDBRef(new DBRefEntry("EMBLCDS", "3", "A12346")); + pep3.getDatasetSequence() + .addDBRef(new DBRefEntry("EMBLCDS", "4", "A12347")); /* * Create the CDS alignment @@ -1260,7 +1281,8 @@ public class AlignmentUtilsTests */ // map ...GGG...TTT to GF MapList map = new MapList(new int[] { 4, 6, 10, 12 }, - new int[] { 1, 2 }, 3, 1); + new int[] + { 1, 2 }, 3, 1); AlignedCodonFrame acf = new AlignedCodonFrame(); acf.addMap(dna1.getDatasetSequence(), pep1.getDatasetSequence(), map); dna.addCodonFrame(acf); @@ -1280,8 +1302,9 @@ public class AlignmentUtilsTests /* * execute method under test */ - AlignmentI cdsal = AlignmentUtils.makeCdsAlignment( - new SequenceI[] { dna1 }, dna.getDataset(), null); + AlignmentI cdsal = AlignmentUtils + .makeCdsAlignment(new SequenceI[] + { dna1 }, dna.getDataset(), null); /* * Verify we have 3 cds sequences, mapped to pep1/2/3 respectively @@ -1353,8 +1376,8 @@ public class AlignmentUtilsTests .findMappingsForSequence(pep1, dnaMappings); assertEquals(1, mappings.size()); assertEquals(1, mappings.get(0).getMappings().size()); - assertSame(pep1.getDatasetSequence(), mappings.get(0).getMappings() - .get(0).getMapping().getTo()); + assertSame(pep1.getDatasetSequence(), + mappings.get(0).getMappings().get(0).getMapping().getTo()); /* * dna1 to cds1 @@ -1364,8 +1387,8 @@ public class AlignmentUtilsTests Mapping mapping = dnaToCds1Mappings.get(0).getMappings().get(0) .getMapping(); assertSame(cds.get(0).getDatasetSequence(), mapping.getTo()); - assertEquals("G(1) in CDS should map to G(4) in DNA", 4, mapping - .getMap().getToPosition(1)); + assertEquals("G(1) in CDS should map to G(4) in DNA", 4, + mapping.getMap().getToPosition(1)); /* * dna1 to pep2 @@ -1373,8 +1396,8 @@ public class AlignmentUtilsTests mappings = MappingUtils.findMappingsForSequence(pep2, dnaMappings); assertEquals(1, mappings.size()); assertEquals(1, mappings.get(0).getMappings().size()); - assertSame(pep2.getDatasetSequence(), mappings.get(0).getMappings() - .get(0).getMapping().getTo()); + assertSame(pep2.getDatasetSequence(), + mappings.get(0).getMappings().get(0).getMapping().getTo()); /* * dna1 to cds2 @@ -1383,8 +1406,8 @@ public class AlignmentUtilsTests .findMappingsForSequence(cds.get(1), dnaMappings); mapping = dnaToCds2Mappings.get(0).getMappings().get(0).getMapping(); assertSame(cds.get(1).getDatasetSequence(), mapping.getTo()); - assertEquals("c(4) in CDS should map to c(7) in DNA", 7, mapping - .getMap().getToPosition(4)); + assertEquals("c(4) in CDS should map to c(7) in DNA", 7, + mapping.getMap().getToPosition(4)); /* * dna1 to pep3 @@ -1392,8 +1415,8 @@ public class AlignmentUtilsTests mappings = MappingUtils.findMappingsForSequence(pep3, dnaMappings); assertEquals(1, mappings.size()); assertEquals(1, mappings.get(0).getMappings().size()); - assertSame(pep3.getDatasetSequence(), mappings.get(0).getMappings() - .get(0).getMapping().getTo()); + assertSame(pep3.getDatasetSequence(), + mappings.get(0).getMappings().get(0).getMapping().getTo()); /* * dna1 to cds3 @@ -1402,8 +1425,8 @@ public class AlignmentUtilsTests .findMappingsForSequence(cds.get(2), dnaMappings); mapping = dnaToCds3Mappings.get(0).getMappings().get(0).getMapping(); assertSame(cds.get(2).getDatasetSequence(), mapping.getTo()); - assertEquals("T(4) in CDS should map to T(10) in DNA", 10, mapping - .getMap().getToPosition(4)); + assertEquals("T(4) in CDS should map to T(10) in DNA", 10, + mapping.getMap().getToPosition(4)); } @Test(groups = { "Functional" }) @@ -1460,9 +1483,10 @@ public class AlignmentUtilsTests AlignedCodonFrame acf = new AlignedCodonFrame(); // this is like a domain or motif match of part of a peptide sequence - MapList map = new MapList(new int[] { 6, 12 }, new int[] { 1, 7 }, 1, 1); - acf.addMap(alignFrom.getDatasetSequence(), - alignMe.getDatasetSequence(), map); + MapList map = new MapList(new int[] { 6, 12 }, new int[] { 1, 7 }, 1, + 1); + acf.addMap(alignFrom.getDatasetSequence(), alignMe.getDatasetSequence(), + map); AlignmentUtils.alignSequenceAs(alignMe, alignFrom, acf, "-", '-', true, true); @@ -1493,35 +1517,36 @@ public class AlignmentUtilsTests SequenceI cds = new Sequence("cds/10-15", "TAGGCC"); // no overlap - dna.addSequenceFeature(new SequenceFeature("type1", "desc1", 1, 2, 1f, - null)); + dna.addSequenceFeature( + new SequenceFeature("type1", "desc1", 1, 2, 1f, null)); // partial overlap - to [1, 1] - dna.addSequenceFeature(new SequenceFeature("type2", "desc2", 3, 4, 2f, - null)); + dna.addSequenceFeature( + new SequenceFeature("type2", "desc2", 3, 4, 2f, null)); // exact overlap - to [1, 3] - dna.addSequenceFeature(new SequenceFeature("type3", "desc3", 4, 6, 3f, - null)); + dna.addSequenceFeature( + new SequenceFeature("type3", "desc3", 4, 6, 3f, null)); // spanning overlap - to [2, 5] - dna.addSequenceFeature(new SequenceFeature("type4", "desc4", 5, 11, 4f, - null)); + dna.addSequenceFeature( + new SequenceFeature("type4", "desc4", 5, 11, 4f, null)); // exactly overlaps whole mapped range [1, 6] - dna.addSequenceFeature(new SequenceFeature("type5", "desc5", 4, 12, 5f, - null)); + dna.addSequenceFeature( + new SequenceFeature("type5", "desc5", 4, 12, 5f, null)); // no overlap (internal) - dna.addSequenceFeature(new SequenceFeature("type6", "desc6", 7, 9, 6f, - null)); + dna.addSequenceFeature( + new SequenceFeature("type6", "desc6", 7, 9, 6f, null)); // no overlap (3' end) - dna.addSequenceFeature(new SequenceFeature("type7", "desc7", 13, 15, - 7f, null)); + dna.addSequenceFeature( + new SequenceFeature("type7", "desc7", 13, 15, 7f, null)); // overlap (3' end) - to [6, 6] - dna.addSequenceFeature(new SequenceFeature("type8", "desc8", 12, 12, - 8f, null)); + dna.addSequenceFeature( + new SequenceFeature("type8", "desc8", 12, 12, 8f, null)); // extended overlap - to [6, +] - dna.addSequenceFeature(new SequenceFeature("type9", "desc9", 12, 13, - 9f, null)); + dna.addSequenceFeature( + new SequenceFeature("type9", "desc9", 12, 13, 9f, null)); MapList map = new MapList(new int[] { 4, 6, 10, 12 }, - new int[] { 1, 6 }, 1, 1); + new int[] + { 1, 6 }, 1, 1); /* * transferFeatures() will build 'partial overlap' for regions @@ -1576,17 +1601,18 @@ public class AlignmentUtilsTests SequenceI cds = new Sequence("cds/10-15", "TAGGCC"); MapList map = new MapList(new int[] { 4, 6, 10, 12 }, - new int[] { 1, 6 }, 1, 1); + new int[] + { 1, 6 }, 1, 1); // [5, 11] maps to [2, 5] - dna.addSequenceFeature(new SequenceFeature("type4", "desc4", 5, 11, 4f, - null)); + dna.addSequenceFeature( + new SequenceFeature("type4", "desc4", 5, 11, 4f, null)); // [4, 12] maps to [1, 6] - dna.addSequenceFeature(new SequenceFeature("type5", "desc5", 4, 12, 5f, - null)); + dna.addSequenceFeature( + new SequenceFeature("type5", "desc5", 4, 12, 5f, null)); // [12, 12] maps to [6, 6] - dna.addSequenceFeature(new SequenceFeature("type8", "desc8", 12, 12, - 8f, null)); + dna.addSequenceFeature( + new SequenceFeature("type8", "desc8", 12, 12, 8f, null)); // desc4 and desc8 are the 'omit these' varargs AlignmentUtils.transferFeatures(dna, cds, map, null, "type4", "type8"); @@ -1609,17 +1635,18 @@ public class AlignmentUtilsTests SequenceI cds = new Sequence("cds/10-15", "TAGGCC"); MapList map = new MapList(new int[] { 4, 6, 10, 12 }, - new int[] { 1, 6 }, 1, 1); + new int[] + { 1, 6 }, 1, 1); // [5, 11] maps to [2, 5] - dna.addSequenceFeature(new SequenceFeature("type4", "desc4", 5, 11, 4f, - null)); + dna.addSequenceFeature( + new SequenceFeature("type4", "desc4", 5, 11, 4f, null)); // [4, 12] maps to [1, 6] - dna.addSequenceFeature(new SequenceFeature("type5", "desc5", 4, 12, 5f, - null)); + dna.addSequenceFeature( + new SequenceFeature("type5", "desc5", 4, 12, 5f, null)); // [12, 12] maps to [6, 6] - dna.addSequenceFeature(new SequenceFeature("type8", "desc8", 12, 12, - 8f, null)); + dna.addSequenceFeature( + new SequenceFeature("type8", "desc8", 12, 12, 8f, null)); // "type5" is the 'select this type' argument AlignmentUtils.transferFeatures(dna, cds, map, "type5"); @@ -1656,18 +1683,21 @@ public class AlignmentUtilsTests dna.setDataset(null); MapList map = new MapList(new int[] { 4, 12, 16, 18 }, - new int[] { 1, 4 }, 3, 1); + new int[] + { 1, 4 }, 3, 1); AlignedCodonFrame acf = new AlignedCodonFrame(); acf.addMap(dna1.getDatasetSequence(), pep1.getDatasetSequence(), map); dna.addCodonFrame(acf); map = new MapList(new int[] { 4, 8, 12, 12, 16, 18 }, - new int[] { 1, 3 }, 3, 1); + new int[] + { 1, 3 }, 3, 1); acf = new AlignedCodonFrame(); acf.addMap(dna2.getDatasetSequence(), pep2.getDatasetSequence(), map); dna.addCodonFrame(acf); - AlignmentI cds = AlignmentUtils.makeCdsAlignment(new SequenceI[] { - dna1, dna2, dna3 }, dna.getDataset(), null); + AlignmentI cds = AlignmentUtils + .makeCdsAlignment(new SequenceI[] + { dna1, dna2, dna3 }, dna.getDataset(), null); List cdsSeqs = cds.getSequences(); assertEquals(2, cdsSeqs.size()); assertEquals("GGGCCCTTTGGG", cdsSeqs.get(0).getSequenceAsString()); @@ -1707,7 +1737,8 @@ public class AlignmentUtilsTests pep1CdsMappings); assertEquals(1, sr.getResults().size()); SearchResultMatchI m = sr.getResults().get(0); - assertEquals(cds.getSequenceAt(0).getDatasetSequence(), m.getSequence()); + assertEquals(cds.getSequenceAt(0).getDatasetSequence(), + m.getSequence()); assertEquals(1, m.getStart()); assertEquals(3, m.getEnd()); sr = MappingUtils.buildSearchResults(pep1, 2, pep1CdsMappings); @@ -1736,7 +1767,8 @@ public class AlignmentUtilsTests sr = MappingUtils.buildSearchResults(pep2, 1, pep2CdsMappings); assertEquals(1, sr.getResults().size()); m = sr.getResults().get(0); - assertEquals(cds.getSequenceAt(1).getDatasetSequence(), m.getSequence()); + assertEquals(cds.getSequenceAt(1).getDatasetSequence(), + m.getSequence()); assertEquals(1, m.getStart()); assertEquals(3, m.getEnd()); sr = MappingUtils.buildSearchResults(pep2, 2, pep2CdsMappings); @@ -1768,12 +1800,14 @@ public class AlignmentUtilsTests SequenceI prot1 = new Sequence("Seq1", "XKFG"); // X for incomplete start SequenceI prot2 = new Sequence("Seq2", "NG"); SequenceI prot3 = new Sequence("Seq3", "XG"); // X for incomplete start - AlignmentI protein = new Alignment(new SequenceI[] { prot1, prot2, - prot3 }); + AlignmentI protein = new Alignment( + new SequenceI[] + { prot1, prot2, prot3 }); protein.setDataset(null); // map dna1 [3, 11] to prot1 [2, 4] KFG - MapList map = new MapList(new int[] { 3, 11 }, new int[] { 2, 4 }, 3, 1); + MapList map = new MapList(new int[] { 3, 11 }, new int[] { 2, 4 }, 3, + 1); AlignedCodonFrame acf = new AlignedCodonFrame(); acf.addMap(dna1.getDatasetSequence(), prot1.getDatasetSequence(), map); @@ -1974,7 +2008,8 @@ public class AlignmentUtilsTests dna.addCodonFrame(acf); AlignmentUtils.alignAs(cds, dna); assertEquals("---GGGTTT", cds.getSequenceAt(0).getSequenceAsString()); - assertEquals("CCC------AAA", cds.getSequenceAt(1).getSequenceAsString()); + assertEquals("CCC------AAA", + cds.getSequenceAt(1).getSequenceAsString()); } @Test(groups = { "Functional" }) @@ -1984,8 +2019,9 @@ public class AlignmentUtilsTests SequenceI seq1 = new Sequence("cds", "AAATTT"); from.createDatasetSequence(); seq1.createDatasetSequence(); - Mapping mapping = new Mapping(seq1, new MapList( - new int[] { 3, 6, 9, 10 }, new int[] { 1, 6 }, 1, 1)); + Mapping mapping = new Mapping(seq1, + new MapList(new int[] + { 3, 6, 9, 10 }, new int[] { 1, 6 }, 1, 1)); Map> map = new TreeMap<>(); AlignmentUtils.addMappedPositions(seq1, from, mapping, map); @@ -2016,8 +2052,9 @@ public class AlignmentUtilsTests SequenceI seq1 = new Sequence("cds", "AAATTT"); from.createDatasetSequence(); seq1.createDatasetSequence(); - Mapping mapping = new Mapping(seq1, new MapList( - new int[] { 3, 6, 9, 10 }, new int[] { 1, 6 }, 1, 1)); + Mapping mapping = new Mapping(seq1, + new MapList(new int[] + { 3, 6, 9, 10 }, new int[] { 1, 6 }, 1, 1)); Map> map = new TreeMap<>(); AlignmentUtils.addMappedPositions(seq1, from, mapping, map); @@ -2061,7 +2098,8 @@ public class AlignmentUtilsTests AlignedCodonFrame acf = new AlignedCodonFrame(); MapList map = new MapList(new int[] { 4, 6, 10, 12 }, - new int[] { 1, 2 }, 3, 1); + new int[] + { 1, 2 }, 3, 1); acf.addMap(dna1.getDatasetSequence(), pep1.getDatasetSequence(), map); acf.addMap(dna1.getDatasetSequence(), pep3.getDatasetSequence(), map); dna.addCodonFrame(acf); @@ -2076,8 +2114,10 @@ public class AlignmentUtilsTests /* * execute method under test to find CDS for EMBL peptides only */ - AlignmentI cds = AlignmentUtils.makeCdsAlignment(new SequenceI[] { - dna1, dna2 }, dna.getDataset(), emblPeptides.getSequencesArray()); + AlignmentI cds = AlignmentUtils + .makeCdsAlignment(new SequenceI[] + { dna1, dna2 }, dna.getDataset(), + emblPeptides.getSequencesArray()); assertEquals(2, cds.getSequences().size()); assertEquals("GGGTTT", cds.getSequenceAt(0).getSequenceAsString()); @@ -2195,11 +2235,9 @@ public class AlignmentUtilsTests */ assertTrue(AlignmentUtils.alignAsSameSequences(al1, al2)); String aligned1 = "-cc-GG-GTTT-aaa"; - assertEquals(aligned1, - al1.getSequenceAt(0).getSequenceAsString()); + assertEquals(aligned1, al1.getSequenceAt(0).getSequenceAsString()); String aligned2 = "C--C-Cgg-gtttAAA"; - assertEquals(aligned2, - al1.getSequenceAt(1).getSequenceAsString()); + assertEquals(aligned2, al1.getSequenceAt(1).getSequenceAsString()); /* * add another sequence to 'aligned' - should still succeed, since @@ -2244,8 +2282,9 @@ public class AlignmentUtilsTests SequenceI uas1 = dna1.deriveSequence(); SequenceI uas2 = dna1.deriveSequence().getSubSequence(3, 7); SequenceI uas3 = dna2.deriveSequence(); - AlignmentI tobealigned = new Alignment(new SequenceI[] { uas1, uas2, - uas3 }); + AlignmentI tobealigned = new Alignment( + new SequenceI[] + { uas1, uas2, uas3 }); ((Alignment) tobealigned).createDatasetAlignment(); /* @@ -2436,11 +2475,11 @@ public class AlignmentUtilsTests SequenceI pep1 = new Sequence("pep1", "MLS"); pep1.createDatasetSequence(); List seqMappings = new ArrayList<>(); - MapList mapList = new MapList( + MapList mapList = new MapList(new int[] { 5, 6, 9, 15 }, new int[] - { 5, 6, 9, 15 }, new int[] { 1, 3 }, 3, 1); + { 1, 3 }, 3, 1); Mapping dnaToPeptide = new Mapping(pep1.getDatasetSequence(), mapList); - + // add dna to peptide mapping seqMappings.add(acf1); acf1.addMap(dna1.getDatasetSequence(), pep1.getDatasetSequence(), @@ -2461,8 +2500,9 @@ public class AlignmentUtilsTests // need to tidy up use of lists of mappings in AlignedCodonFrame AlignedCodonFrame acf2 = new AlignedCodonFrame(); mappings.add(acf2); - MapList cdsToPeptideMapping = new MapList(new int[] - { 1, 9 }, new int[] { 1, 3 }, 3, 1); + MapList cdsToPeptideMapping = new MapList(new int[] { 1, 9 }, + new int[] + { 1, 3 }, 3, 1); acf2.addMap(cds1.getDatasetSequence(), pep1.getDatasetSequence(), cdsToPeptideMapping); assertNull(AlignmentUtils.findCdsForProtein(mappings, dna1, seqMappings, @@ -2493,28 +2533,27 @@ public class AlignmentUtilsTests List mappings = new ArrayList<>(); AlignedCodonFrame acf1 = new AlignedCodonFrame(); mappings.add(acf1); - + SequenceI dna1 = new Sequence("dna1", "ATGCTATCTTAA"); dna1.createDatasetSequence(); - + // NB we currently exclude STOP codon from CDS sequences // the test would need to change if this changes in future SequenceI cds1 = new Sequence("cds1", "ATGCTATCT"); cds1.createDatasetSequence(); - + SequenceI pep1 = new Sequence("pep1", "MLS"); pep1.createDatasetSequence(); List seqMappings = new ArrayList<>(); - MapList mapList = new MapList( - new int[] - { 1, 9 }, new int[] { 1, 3 }, 3, 1); + MapList mapList = new MapList(new int[] { 1, 9 }, new int[] { 1, 3 }, 3, + 1); Mapping dnaToPeptide = new Mapping(pep1.getDatasetSequence(), mapList); - + // add dna to peptide mapping seqMappings.add(acf1); acf1.addMap(dna1.getDatasetSequence(), pep1.getDatasetSequence(), mapList); - + /* * first case - transcript lacks CDS features - it appears to be * the CDS sequence and is returned @@ -2522,7 +2561,7 @@ public class AlignmentUtilsTests SequenceI seq = AlignmentUtils.findCdsForProtein(mappings, dna1, seqMappings, dnaToPeptide); assertSame(seq, dna1.getDatasetSequence()); - + /* * second case - transcript has CDS feature - this means it is * not returned as a match for CDS (CDS sequences don't have CDS features) @@ -2541,13 +2580,14 @@ public class AlignmentUtilsTests // need to tidy up use of lists of mappings in AlignedCodonFrame AlignedCodonFrame acf2 = new AlignedCodonFrame(); mappings.add(acf2); - MapList cdsToPeptideMapping = new MapList(new int[] - { 1, 9 }, new int[] { 1, 3 }, 3, 1); + MapList cdsToPeptideMapping = new MapList(new int[] { 1, 9 }, + new int[] + { 1, 3 }, 3, 1); acf2.addMap(cds1.getDatasetSequence(), pep1.getDatasetSequence(), cdsToPeptideMapping); assertNull(AlignmentUtils.findCdsForProtein(mappings, dna1, seqMappings, dnaToPeptide)); - + /* * fourth case - add dna-to-CDS mapping - CDS is now found! */ diff --git a/test/jalview/analysis/AnnotationSorterTest.java b/test/jalview/analysis/AnnotationSorterTest.java index 1c5a7f9..11c42ed 100644 --- a/test/jalview/analysis/AnnotationSorterTest.java +++ b/test/jalview/analysis/AnnotationSorterTest.java @@ -291,9 +291,9 @@ public class AnnotationSorterTest testee.sort(annotations, SequenceAnnotationOrder.LABEL_AND_SEQUENCE); long endTime = System.currentTimeMillis(); final long elapsed = endTime - startTime; - System.out.println("Timing test for presorted " + numSeqs - + " sequences and " + numAnns + " annotations took " + elapsed - + "ms"); + System.out.println( + "Timing test for presorted " + numSeqs + " sequences and " + + numAnns + " annotations took " + elapsed + "ms"); } /** @@ -335,9 +335,9 @@ public class AnnotationSorterTest testee.sort(annotations, SequenceAnnotationOrder.SEQUENCE_AND_LABEL); long endTime = System.currentTimeMillis(); final long elapsed = endTime - startTime; - System.out.println("Timing test for unsorted " + numSeqs - + " sequences and " + numAnns + " annotations took " + elapsed - + "ms"); + System.out.println( + "Timing test for unsorted " + numSeqs + " sequences and " + + numAnns + " annotations took " + elapsed + "ms"); } /** @@ -369,8 +369,8 @@ public class AnnotationSorterTest Alignment alignment = buildAlignment(numSeqs); AlignmentAnnotation[] annotations = buildAnnotations(numAnns); - String[] labels = new String[] { "label1", "label2", "label3", - "label4", "label5", "label6" }; + String[] labels = new String[] { "label1", "label2", "label3", "label4", + "label5", "label6" }; /* * Set the annotations in sequence order with randomly assigned labels. @@ -388,9 +388,9 @@ public class AnnotationSorterTest testee.sort(annotations, SequenceAnnotationOrder.LABEL_AND_SEQUENCE); long endTime = System.currentTimeMillis(); long elapsed = endTime - startTime; - System.out.println("Sort by label for semisorted " + numSeqs - + " sequences and " + numAnns + " annotations took " + elapsed - + "ms"); + System.out.println( + "Sort by label for semisorted " + numSeqs + " sequences and " + + numAnns + " annotations took " + elapsed + "ms"); // now resort by sequence startTime = System.currentTimeMillis(); @@ -406,8 +406,8 @@ public class AnnotationSorterTest testee.sort(annotations, SequenceAnnotationOrder.LABEL_AND_SEQUENCE); endTime = System.currentTimeMillis(); elapsed = endTime - startTime; - System.out.println("Resort by label for semisorted " + numSeqs - + " sequences and " + numAnns + " annotations took " + elapsed - + "ms"); + System.out.println( + "Resort by label for semisorted " + numSeqs + " sequences and " + + numAnns + " annotations took " + elapsed + "ms"); } } diff --git a/test/jalview/analysis/CodingUtilsTest.java b/test/jalview/analysis/CodingUtilsTest.java index b66c499..b324cd9 100644 --- a/test/jalview/analysis/CodingUtilsTest.java +++ b/test/jalview/analysis/CodingUtilsTest.java @@ -43,22 +43,30 @@ public class CodingUtilsTest @Test(groups = { "Functional" }) public void testDecodeCodon() { - assertTrue(Arrays.equals(new char[] { 'A', 'A', 'A' }, - CodingUtils.decodeCodon(0))); - assertTrue(Arrays.equals(new char[] { 'A', 'A', 'C' }, - CodingUtils.decodeCodon(1))); - assertTrue(Arrays.equals(new char[] { 'A', 'A', 'G' }, - CodingUtils.decodeCodon(2))); - assertTrue(Arrays.equals(new char[] { 'A', 'A', 'T' }, - CodingUtils.decodeCodon(3))); - assertTrue(Arrays.equals(new char[] { 'A', 'C', 'A' }, - CodingUtils.decodeCodon(4))); - assertTrue(Arrays.equals(new char[] { 'C', 'A', 'A' }, - CodingUtils.decodeCodon(16))); - assertTrue(Arrays.equals(new char[] { 'G', 'G', 'G' }, - CodingUtils.decodeCodon(42))); - assertTrue(Arrays.equals(new char[] { 'T', 'T', 'T' }, - CodingUtils.decodeCodon(63))); + assertTrue( + Arrays.equals(new char[] + { 'A', 'A', 'A' }, CodingUtils.decodeCodon(0))); + assertTrue( + Arrays.equals(new char[] + { 'A', 'A', 'C' }, CodingUtils.decodeCodon(1))); + assertTrue( + Arrays.equals(new char[] + { 'A', 'A', 'G' }, CodingUtils.decodeCodon(2))); + assertTrue( + Arrays.equals(new char[] + { 'A', 'A', 'T' }, CodingUtils.decodeCodon(3))); + assertTrue( + Arrays.equals(new char[] + { 'A', 'C', 'A' }, CodingUtils.decodeCodon(4))); + assertTrue( + Arrays.equals(new char[] + { 'C', 'A', 'A' }, CodingUtils.decodeCodon(16))); + assertTrue( + Arrays.equals(new char[] + { 'G', 'G', 'G' }, CodingUtils.decodeCodon(42))); + assertTrue( + Arrays.equals(new char[] + { 'T', 'T', 'T' }, CodingUtils.decodeCodon(63))); } @Test(groups = { "Functional" }) diff --git a/test/jalview/analysis/ConservationTest.java b/test/jalview/analysis/ConservationTest.java index fb58655..e1fdf51 100644 --- a/test/jalview/analysis/ConservationTest.java +++ b/test/jalview/analysis/ConservationTest.java @@ -211,7 +211,7 @@ public class ConservationTest seqs.add(new Sequence("seq3", "V-IW-")); seqs.add(new Sequence("seq4", "VGLH-")); seqs.add(new Sequence("seq5", "VGLH-")); - + /* * threshold 50% means a residue has to occur 3 or more times * in a column to be counted for conservation @@ -221,7 +221,7 @@ public class ConservationTest // but it is treated as percentage threshold in calculate() ? Conservation cons = new Conservation("", 50, seqs, 0, 4); cons.calculate(); - + /* * column 0: all V (hydrophobic/aliphatic/small) */ @@ -236,7 +236,7 @@ public class ConservationTest assertEquals(colCons.get("polar").intValue(), 0); assertEquals(colCons.get("positive").intValue(), 0); assertEquals(colCons.get("aromatic").intValue(), 0); - + /* * column 1: all G (hydrophobic/small/tiny) * gaps are ignored as not above threshold @@ -252,7 +252,7 @@ public class ConservationTest assertEquals(colCons.get("polar").intValue(), 0); assertEquals(colCons.get("positive").intValue(), 0); assertEquals(colCons.get("aromatic").intValue(), 0); - + /* * column 2: I/L (aliphatic/hydrophobic), all others negatively conserved */ @@ -267,13 +267,13 @@ public class ConservationTest assertEquals(colCons.get("polar").intValue(), 0); assertEquals(colCons.get("positive").intValue(), 0); assertEquals(colCons.get("aromatic").intValue(), 0); - + /* * column 3: nothing above threshold */ colCons = cons.total[3]; assertTrue(colCons.isEmpty()); - + /* * column 4: all gaps - counted as having all properties */ @@ -329,16 +329,14 @@ public class ConservationTest * verify tooltips; conserved properties are sorted alphabetically within * positive followed by negative */ - assertEquals( - cons.getTooltip(0), + assertEquals(cons.getTooltip(0), "aliphatic hydrophobic small !aromatic !charged !negative !polar !positive !proline !tiny"); - assertEquals( - cons.getTooltip(1), + assertEquals(cons.getTooltip(1), "hydrophobic small tiny !aliphatic !aromatic !charged !negative !polar !positive !proline"); - assertEquals( - cons.getTooltip(2), + assertEquals(cons.getTooltip(2), "aliphatic hydrophobic !aromatic !charged !negative !polar !positive !proline !small !tiny"); - assertEquals(cons.getTooltip(3), "hydrophobic !negative !proline !tiny"); + assertEquals(cons.getTooltip(3), + "hydrophobic !negative !proline !tiny"); assertEquals(cons.getTooltip(4), "hydrophobic"); assertEquals(cons.getTooltip(5), ""); assertEquals(cons.getTooltip(6), ""); diff --git a/test/jalview/analysis/CrossRefTest.java b/test/jalview/analysis/CrossRefTest.java index 4bd38d2..2970e3d 100644 --- a/test/jalview/analysis/CrossRefTest.java +++ b/test/jalview/analysis/CrossRefTest.java @@ -75,8 +75,9 @@ public class CrossRefTest DBRefEntry ref8 = new DBRefEntry("PFAM", "1", "A123"); // ENSEMBL is a source of either dna or protein sequence data DBRefEntry ref9 = new DBRefEntry("ENSEMBL", "1", "A123"); - List refs = Arrays.asList(new DBRefEntry[] { ref1, ref2, ref3, ref4, ref5, - ref6, ref7, ref8, ref9 }); + List refs = Arrays + .asList(new DBRefEntry[] + { ref1, ref2, ref3, ref4, ref5, ref6, ref7, ref8, ref9 }); /* * Just the DNA refs: @@ -143,7 +144,7 @@ public class CrossRefTest * and others to dna coding databases */ sources.clear(); - seq.setDBRefs(null); + seq.setDBRefs(null); seq.addDBRef(new DBRefEntry("UNIPROT", "0", "A1234")); seq.addDBRef(new DBRefEntry("EMBLCDS", "0", "E2347")); SequenceI seq2 = new Sequence("Seq2", "MGKYQARLSS"); @@ -263,8 +264,9 @@ public class CrossRefTest * peptide sequence with UNIPROT dbref */ SequenceI dna1 = new Sequence("AF039662", "GGGGCAGCACAAGAAC"); - Mapping map = new Mapping(new Sequence("pep2", "MLAVSRG"), new MapList( - new int[] { 1, 21 }, new int[] { 1, 7 }, 3, 1)); + Mapping map = new Mapping(new Sequence("pep2", "MLAVSRG"), + new MapList(new int[] + { 1, 21 }, new int[] { 1, 7 }, 3, 1)); DBRefEntry dbref = new DBRefEntry("UNIPROT", "0", "Q9ZTS2", map); dna1.addDBRef(dbref); dna1.addDBRef(new DBRefEntry("EMBL", "0", "AF039662")); @@ -293,8 +295,9 @@ public class CrossRefTest acf = new AlignedCodonFrame(); dbref = new DBRefEntry("UNIPROT", "0", "Q9ZTS2"); found = testee.searchDataset(!dna1.isProtein(), dna1, dbref, result, - acf, false, DBRefUtils.SEARCH_MODE_FULL); // search dataset with a protein xref from a dna - // sequence to locate the protein product + acf, false, DBRefUtils.SEARCH_MODE_FULL); // search dataset with a + // protein xref from a dna + // sequence to locate the protein product assertTrue(found); assertEquals(1, result.size()); assertSame(pep1, result.get(0)); @@ -307,8 +310,10 @@ public class CrossRefTest acf = new AlignedCodonFrame(); dbref = new DBRefEntry("UNIPROT", "0", "Q9ZTS2"); found = testee.searchDataset(!pep1.isProtein(), pep1, dbref, result, - acf, false, DBRefUtils.SEARCH_MODE_FULL); // search dataset with a protein's direct dbref to - // locate dna sequences with matching xref + acf, false, DBRefUtils.SEARCH_MODE_FULL); // search dataset with a + // protein's direct dbref + // to + // locate dna sequences with matching xref assertTrue(found); assertEquals(1, result.size()); assertSame(dna1, result.get(0)); @@ -355,13 +360,13 @@ public class CrossRefTest pep1.createDatasetSequence(); pep2.createDatasetSequence(); - pep1.getDatasetSequence().addDBRef( - new DBRefEntry("Pfam", "0", "PF00111")); - pep1.addSequenceFeature(new SequenceFeature("type", "desc", 12, 14, 1f, - "group")); + pep1.getDatasetSequence() + .addDBRef(new DBRefEntry("Pfam", "0", "PF00111")); + pep1.addSequenceFeature( + new SequenceFeature("type", "desc", 12, 14, 1f, "group")); pep2.getDatasetSequence().addDBRef(new DBRefEntry("PDB", "0", "3JTK")); - pep2.addSequenceFeature(new SequenceFeature("type2", "desc2", 13, 15, - 12f, "group2")); + pep2.addSequenceFeature( + new SequenceFeature("type2", "desc2", 13, 15, 12f, "group2")); MapList mapList = new MapList(new int[] { 1, 24 }, new int[] { 1, 3 }, 3, 1); @@ -405,7 +410,8 @@ public class CrossRefTest assertEquals(copy.getName(), original.getName()); assertEquals(copy.getStart(), original.getStart()); assertEquals(copy.getEnd(), original.getEnd()); - assertEquals(copy.getSequenceAsString(), original.getSequenceAsString()); + assertEquals(copy.getSequenceAsString(), + original.getSequenceAsString()); } /** @@ -415,19 +421,21 @@ public class CrossRefTest @Test(groups = { "Functional_Failing" }) public void testFindXrefSequences_withFetch() { - // JBPNote: this fails because pep1 and pep2 do not have DbRefEntrys with mappings - // Fix#1 would be to revise the test data so it fits with 2.11.2+ Jalview assumptions + // JBPNote: this fails because pep1 and pep2 do not have DbRefEntrys with + // mappings + // Fix#1 would be to revise the test data so it fits with 2.11.2+ Jalview + // assumptions // that ENA retrievals yield dbrefs with Mappings - + SequenceI dna1 = new Sequence("AF039662", "GGGGCAGCACAAGAAC"); dna1.addDBRef(new DBRefEntry("UNIPROT", "ENA:0", "Q9ZTS2")); dna1.addDBRef(new DBRefEntry("UNIPROT", "ENA:0", "P30419")); dna1.addDBRef(new DBRefEntry("UNIPROT", "ENA:0", "P00314")); final SequenceI pep1 = new Sequence("Q9ZTS2", "MYQLIRSSW"); - pep1.addDBRef(new DBRefEntry("UNIPROT", "0", "Q9ZTS2",null,true)); + pep1.addDBRef(new DBRefEntry("UNIPROT", "0", "Q9ZTS2", null, true)); final SequenceI pep2 = new Sequence("P00314", "MRKLLAASG"); - pep2.addDBRef(new DBRefEntry("UNIPROT", "0", "P00314",null,true)); + pep2.addDBRef(new DBRefEntry("UNIPROT", "0", "P00314", null, true)); /* * argument false suppresses adding DAS sources @@ -483,20 +491,22 @@ public class CrossRefTest /* * 'transcript' with CDS feature (supports mapping to protein) */ - SequenceI braf001 = new Sequence("ENST00000288602", "taagATGGCGGCGCTGa"); + SequenceI braf001 = new Sequence("ENST00000288602", + "taagATGGCGGCGCTGa"); braf001.addDBRef(new DBRefEntry("UNIPROT", "0", "P15056")); - braf001.addSequenceFeature(new SequenceFeature("CDS", "", 5, 16, 0f, - null)); + braf001.addSequenceFeature( + new SequenceFeature("CDS", "", 5, 16, 0f, null)); /* * 'spliced transcript' with CDS ranges */ - SequenceI braf002 = new Sequence("ENST00000497784", "gCAGGCtaTCTGTTCaa"); + SequenceI braf002 = new Sequence("ENST00000497784", + "gCAGGCtaTCTGTTCaa"); braf002.addDBRef(new DBRefEntry("UNIPROT", "ENSEMBL|0", "H7C5K3")); - braf002.addSequenceFeature(new SequenceFeature("CDS", "", 2, 6, 0f, - null)); - braf002.addSequenceFeature(new SequenceFeature("CDS", "", 9, 15, 0f, - null)); + braf002.addSequenceFeature( + new SequenceFeature("CDS", "", 2, 6, 0f, null)); + braf002.addSequenceFeature( + new SequenceFeature("CDS", "", 9, 15, 0f, null)); /* * TODO code is fragile - use of SequenceIdMatcher depends on fetched @@ -593,7 +603,8 @@ public class CrossRefTest /* * J03321 with mappings to P0CE19 and P0CE20 */ - final SequenceI j03321 = new Sequence("EMBL|J03321", "AAACCCTTTGGGAAAA"); + final SequenceI j03321 = new Sequence("EMBL|J03321", + "AAACCCTTTGGGAAAA"); DBRefEntry dbref1 = new DBRefEntry("UNIPROT", "0", "P0CE19"); MapList mapList = new MapList(new int[] { 1, 12 }, new int[] { 1, 4 }, 3, 1); @@ -616,12 +627,14 @@ public class CrossRefTest DBRefEntry dbref3 = new DBRefEntry("UNIPROT", "0", "P0CE19"); MapList map2 = new MapList(new int[] { 4, 15 }, new int[] { 1, 4 }, 3, 1); - dbref3.setMap(new Mapping(new Sequence("UNIPROT|P0CE19", "KPFG"), map2)); + dbref3.setMap( + new Mapping(new Sequence("UNIPROT|P0CE19", "KPFG"), map2)); x06707.addDBRef(dbref3); DBRefEntry dbref4 = new DBRefEntry("UNIPROT", "0", "P0CE20"); MapList map3 = new MapList(new int[] { 4, 15 }, new int[] { 1, 4 }, 3, 1); - dbref4.setMap(new Mapping(new Sequence("UNIPROT|P0CE20", "PFGK"), map3)); + dbref4.setMap( + new Mapping(new Sequence("UNIPROT|P0CE20", "PFGK"), map3)); x06707.addDBRef(dbref4); /* @@ -725,7 +738,7 @@ public class CrossRefTest /* * verify dbrefs on EMBL are mapped to alignment seqs */ - + assertSame(p0ce19, j03321.getDBRefs().get(0).getMap().getTo()); assertSame(p0ce20, j03321.getDBRefs().get(1).getMap().getTo()); assertSame(p0ce19, x06707.getDBRefs().get(0).getMap().getTo()); @@ -749,8 +762,8 @@ public class CrossRefTest assertFalse(CrossRef.sameSequence(null, seq1)); assertTrue(CrossRef.sameSequence(seq1, new Sequence("seq2", "ABCDEF"))); assertTrue(CrossRef.sameSequence(seq1, new Sequence("seq2", "abcdef"))); - assertFalse(CrossRef - .sameSequence(seq1, new Sequence("seq2", "ABCDE-F"))); + assertFalse( + CrossRef.sameSequence(seq1, new Sequence("seq2", "ABCDE-F"))); assertFalse(CrossRef.sameSequence(seq1, new Sequence("seq2", "BCDEF"))); } } diff --git a/test/jalview/analysis/DnaTest.java b/test/jalview/analysis/DnaTest.java index 27ae8cd..262de12 100644 --- a/test/jalview/analysis/DnaTest.java +++ b/test/jalview/analysis/DnaTest.java @@ -139,8 +139,8 @@ public class DnaTest Iterator contigs = cs.getVisContigsIterator(0, alf.getWidth(), false); Dna dna = new Dna(av, contigs); - AlignmentI translated = dna.translateCdna(GeneticCodes.getInstance() - .getStandardCodeTable()); + AlignmentI translated = dna.translateCdna( + GeneticCodes.getInstance().getStandardCodeTable()); assertNotNull("Couldn't do a full width translation of test data.", translated); } @@ -167,20 +167,23 @@ public class DnaTest cs.hideColumns(0, ipos - 1); } cs.hideColumns(ipos + vwidth, alf.getWidth()); - Iterator vcontigs = cs.getVisContigsIterator(0, - alf.getWidth(), false); + Iterator vcontigs = cs.getVisContigsIterator(0, alf.getWidth(), + false); AlignViewportI av = new AlignViewport(alf, cs); Dna dna = new Dna(av, vcontigs); - AlignmentI transAlf = dna.translateCdna(GeneticCodes.getInstance() - .getStandardCodeTable()); + AlignmentI transAlf = dna.translateCdna( + GeneticCodes.getInstance().getStandardCodeTable()); - assertTrue("Translation failed (ipos=" + ipos - + ") No alignment data.", transAlf != null); + assertTrue( + "Translation failed (ipos=" + ipos + ") No alignment data.", + transAlf != null); assertTrue("Translation failed (ipos=" + ipos + ") Empty alignment.", transAlf.getHeight() > 0); - assertTrue("Translation failed (ipos=" + ipos + ") Translated " - + transAlf.getHeight() + " sequences from " + alf.getHeight() - + " sequences", alf.getHeight() == transAlf.getHeight()); + assertTrue( + "Translation failed (ipos=" + ipos + ") Translated " + + transAlf.getHeight() + " sequences from " + + alf.getHeight() + " sequences", + alf.getHeight() == transAlf.getHeight()); } } @@ -199,8 +202,8 @@ public class DnaTest Iterator contigs = cs.getVisContigsIterator(0, alf.getWidth(), false); Dna dna = new Dna(av, contigs); - AlignmentI translated = dna.translateCdna(GeneticCodes.getInstance() - .getStandardCodeTable()); + AlignmentI translated = dna.translateCdna( + GeneticCodes.getInstance().getStandardCodeTable()); String aa = translated.getSequenceAt(0).getSequenceAsString(); assertEquals( "AAAACCDDEEFFGGGGHHIIIKKLLLLLLMNNPPPPQQRRRRRRSSSSSSTTTTVVVVWYY***", @@ -225,10 +228,11 @@ public class DnaTest Iterator contigs = cs.getVisContigsIterator(0, alf.getWidth(), false); Dna dna = new Dna(av, contigs); - AlignmentI translated = dna.translateCdna(GeneticCodes.getInstance() - .getStandardCodeTable()); + AlignmentI translated = dna.translateCdna( + GeneticCodes.getInstance().getStandardCodeTable()); String aa = translated.getSequenceAt(0).getSequenceAsString(); - assertEquals("AACDDGGGGHHIIIKKLLLLLLMNNPPPPQQRRRRRRSSSSSSTTTTVVVVW", aa); + assertEquals("AACDDGGGGHHIIIKKLLLLLLMNNPPPPQQRRRRRRSSSSSSTTTTVVVVW", + aa); } /** @@ -306,15 +310,15 @@ public class DnaTest /* * Generate cDNA - 8 sequences of 12 bases each. */ - AlignmentI cdna = new AlignmentGenerator(true) - .generate(12, 8, 97, 5, 5); + AlignmentI cdna = new AlignmentGenerator(true).generate(12, 8, 97, 5, + 5); HiddenColumns cs = new HiddenColumns(); AlignViewportI av = new AlignViewport(cdna, cs); Iterator contigs = cs.getVisContigsIterator(0, cdna.getWidth(), false); Dna dna = new Dna(av, contigs); - AlignmentI translated = dna.translateCdna(GeneticCodes.getInstance() - .getStandardCodeTable()); + AlignmentI translated = dna.translateCdna( + GeneticCodes.getInstance().getStandardCodeTable()); /* * Jumble the cDNA sequences and translate. @@ -330,8 +334,8 @@ public class DnaTest av = new AlignViewport(cdnaReordered, cs); contigs = cs.getVisContigsIterator(0, cdna.getWidth(), false); dna = new Dna(av, contigs); - AlignmentI translated2 = dna.translateCdna(GeneticCodes.getInstance() - .getStandardCodeTable()); + AlignmentI translated2 = dna.translateCdna( + GeneticCodes.getInstance().getStandardCodeTable()); /* * Check translated sequences are the same in both alignments. @@ -344,10 +348,10 @@ public class DnaTest int sortedSequenceIndex = 0; for (int originalSequenceIndex : jumbler) { - final String translation1 = translated.getSequenceAt( - originalSequenceIndex).getSequenceAsString(); - final String translation2 = translated2.getSequenceAt( - sortedSequenceIndex).getSequenceAsString(); + final String translation1 = translated + .getSequenceAt(originalSequenceIndex).getSequenceAsString(); + final String translation2 = translated2 + .getSequenceAt(sortedSequenceIndex).getSequenceAsString(); assertEquals(translation2, translation1); sortedSequenceIndex++; } @@ -391,8 +395,10 @@ public class DnaTest private void assertSymmetric(String codon1, String codon2) { - assertEquals("Comparison of '" + codon1 + "' and '" + codon2 - + " not symmetric", Integer.signum(compare(codon1, codon2)), + assertEquals( + "Comparison of '" + codon1 + "' and '" + codon2 + + " not symmetric", + Integer.signum(compare(codon1, codon2)), -Integer.signum(compare(codon2, codon1))); } @@ -421,8 +427,8 @@ public class DnaTest */ private void assertPrecedes(String codon1, String codon2) { - assertEquals("Expected '" + codon1 + "' precedes '" + codon2 + "'", - -1, compare(codon1, codon2)); + assertEquals("Expected '" + codon1 + "' precedes '" + codon2 + "'", -1, + compare(codon1, codon2)); } /** @@ -556,8 +562,8 @@ public class DnaTest SequenceI dna = new Sequence("Seq1", seq); Alignment al = new Alignment(new SequenceI[] { dna }); al.createDatasetAlignment(); - assertEquals(seqDs, al.getSequenceAt(0).getDatasetSequence() - .getSequenceAsString()); + assertEquals(seqDs, + al.getSequenceAt(0).getDatasetSequence().getSequenceAsString()); HiddenColumns cs = new HiddenColumns(); AlignViewportI av = new AlignViewport(al, cs); diff --git a/test/jalview/analysis/FinderTest.java b/test/jalview/analysis/FinderTest.java index 1f45f70..7e3bd86 100644 --- a/test/jalview/analysis/FinderTest.java +++ b/test/jalview/analysis/FinderTest.java @@ -131,11 +131,12 @@ public class FinderTest * single symbol should find *all* matching symbols */ Finder f = new Finder(av); - f.findAll("M", false,false,false); + f.findAll("M", false, false, false); SearchResultsI sr = f.getSearchResults(); - assertEquals(sr.getCount(),5); - + assertEquals(sr.getCount(), 5); + } + /** * Test for (undocumented) find residue by position */ @@ -575,7 +576,7 @@ public class FinderTest sg.addSequence(al.getSequenceAt(1), false); sg.addSequence(al.getSequenceAt(2), false); av.setSelectionGroup(sg); - + /* * search for 'e' should match two sequence ids and one residue */ @@ -641,8 +642,8 @@ public class FinderTest } /** - * Test that find does not report hidden positions, but does report matches that - * span hidden gaps + * Test that find does not report hidden positions, but does report matches + * that span hidden gaps */ @Test(groups = "Functional") public void testFind_withHiddenColumns() @@ -770,7 +771,7 @@ public class FinderTest * --bcdEFH * aa---aMMMMMaaa */ - + /* * hide columns 2-4 and 6-7 */ @@ -778,7 +779,7 @@ public class FinderTest hc.hideColumns(2, 4); hc.hideColumns(6, 7); al.setHiddenColumns(hc); - + /* * select rows 2-3 */ diff --git a/test/jalview/analysis/GroupingTest.java b/test/jalview/analysis/GroupingTest.java index 184f9fb..d547631 100644 --- a/test/jalview/analysis/GroupingTest.java +++ b/test/jalview/analysis/GroupingTest.java @@ -53,14 +53,17 @@ public class GroupingTest Sequence s5 = new Sequence("s5", "AAAADDEDTTEE"); - SequenceGroup sg_12 = new SequenceGroup(Arrays.asList(new SequenceI[] { - s1, s2 }), "Group1", null, false, false, false, 0, 5); + SequenceGroup sg_12 = new SequenceGroup( + Arrays.asList(new SequenceI[] + { s1, s2 }), "Group1", null, false, false, false, 0, 5); - SequenceGroup sg_345 = new SequenceGroup(Arrays.asList(new SequenceI[] { - s3, s4, s5 }), "Group2", null, false, false, false, 0, 5); + SequenceGroup sg_345 = new SequenceGroup( + Arrays.asList(new SequenceI[] + { s3, s4, s5 }), "Group2", null, false, false, false, 0, 5); AlignmentI alignment = new Alignment( - new SequenceI[] { s1, s2, s3, s4, s5 }); + new SequenceI[] + { s1, s2, s3, s4, s5 }); /* * test for the case where column selections are not added in @@ -84,7 +87,8 @@ public class GroupingTest } SequenceGroup[] seqgroupsString = Grouping.makeGroupsFrom( alignment.getSequencesArray(), str, - Arrays.asList(new SequenceGroup[] { sg_12, sg_345 })); + Arrays.asList(new SequenceGroup[] + { sg_12, sg_345 })); ColumnSelection cs = new ColumnSelection(); for (int p : positions) @@ -93,9 +97,10 @@ public class GroupingTest } SequenceGroup[] seqgroupsColSel = Grouping.makeGroupsFromCols( alignment.getSequencesArray(), cs, - Arrays.asList(new SequenceGroup[] { sg_12, sg_345 })); - AssertJUnit - .assertEquals(seqgroupsString.length, seqgroupsColSel.length); + Arrays.asList(new SequenceGroup[] + { sg_12, sg_345 })); + AssertJUnit.assertEquals(seqgroupsString.length, + seqgroupsColSel.length); for (int p = 0; p < seqgroupsString.length; p++) { AssertJUnit.assertEquals(seqgroupsString[p].getName(), diff --git a/test/jalview/analysis/RnaTest.java b/test/jalview/analysis/RnaTest.java index cc35976..a8e03af 100644 --- a/test/jalview/analysis/RnaTest.java +++ b/test/jalview/analysis/RnaTest.java @@ -155,8 +155,8 @@ public class RnaTest for (int i = 0; i <= 255; i++) { boolean isClosingChar = Rna.isClosingParenthesis((char) i); - boolean isClosingString = Rna.isClosingParenthesis(String - .valueOf((char) i)); + boolean isClosingString = Rna + .isClosingParenthesis(String.valueOf((char) i)); if ((i >= 'a' && i <= 'z') || i == ')' || i == '}' || i == ']' || i == '>') { @@ -166,7 +166,8 @@ public class RnaTest else { assertFalse(String.format("close base pair %c", i), isClosingChar); - assertFalse(String.format("close base pair %c", i), isClosingString); + assertFalse(String.format("close base pair %c", i), + isClosingString); } assertFalse(Rna.isClosingParenthesis(String.valueOf((char) i) + " ")); } @@ -240,8 +241,8 @@ public class RnaTest for (int i = 0; i <= 255; i++) { boolean isOpeningChar = Rna.isOpeningParenthesis((char) i); - boolean isOpeningString = Rna.isOpeningParenthesis(String - .valueOf((char) i)); + boolean isOpeningString = Rna + .isOpeningParenthesis(String.valueOf((char) i)); if ((i >= 'A' && i <= 'Z') || i == '(' || i == '{' || i == '[' || i == '<') { @@ -298,8 +299,8 @@ public class RnaTest for (int i = 0; i <= 255; i++) { boolean isValidChar = Rna.isRnaSecondaryStructureSymbol((char) i); - boolean isValidString = Rna.isRnaSecondaryStructureSymbol(String - .valueOf((char) i)); + boolean isValidString = Rna + .isRnaSecondaryStructureSymbol(String.valueOf((char) i)); if ((i >= 'A' && i <= 'Z') || (i >= 'a' && i <= 'z') || i == '(' || i == ')' || i == '{' || i == '}' || i == '[' || i == ']' || i == '<' || i == '>') @@ -312,8 +313,8 @@ public class RnaTest assertFalse(String.format("close base pair %c", i), isValidChar); assertFalse(String.format("close base pair %c", i), isValidString); } - assertFalse(Rna.isRnaSecondaryStructureSymbol(String - .valueOf((char) i) + " ")); + assertFalse(Rna.isRnaSecondaryStructureSymbol( + String.valueOf((char) i) + " ")); } } @@ -348,7 +349,7 @@ public class RnaTest String rna = ".([.)]..{.<}.>"; SequenceFeature[] sfs = Rna.getHelixMap(rna); assertEquals(4, sfs.length); - + /* * pairs are added in the order in which the closing bracket is found * (see testGetSimpleBPs) diff --git a/test/jalview/analysis/SeqsetUtilsTest.java b/test/jalview/analysis/SeqsetUtilsTest.java index 9839ba0..0587432 100644 --- a/test/jalview/analysis/SeqsetUtilsTest.java +++ b/test/jalview/analysis/SeqsetUtilsTest.java @@ -47,7 +47,6 @@ public class SeqsetUtilsTest JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION); } - /** * test for JAL-2046 bug - duplication of sequence features on reconstructed * alignment @@ -55,8 +54,7 @@ public class SeqsetUtilsTest @Test(groups = { "Functional" }) public void testSeqFeatureAddition() { - SequenceI[] sqset = new SequenceI[] { - new Sequence("Aseq1", "AREALSEQ"), + SequenceI[] sqset = new SequenceI[] { new Sequence("Aseq1", "AREALSEQ"), new Sequence("Aseq2", "AREALSEQ") }; AlignmentI al = new Alignment(sqset); @@ -78,9 +76,9 @@ public class SeqsetUtilsTest // are on the shared dataset sequence Assert.assertEquals(sqset[0].getSequenceFeatures().size(), 2); Assert.assertEquals(sqset2[0].getSequenceFeatures().size(), 2); - Assert.assertSame(sqset[0].getSequenceFeatures().get(0), sqset2[0] - .getSequenceFeatures().get(0)); - Assert.assertSame(sqset[0].getSequenceFeatures().get(1), sqset2[0] - .getSequenceFeatures().get(1)); + Assert.assertSame(sqset[0].getSequenceFeatures().get(0), + sqset2[0].getSequenceFeatures().get(0)); + Assert.assertSame(sqset[0].getSequenceFeatures().get(1), + sqset2[0].getSequenceFeatures().get(1)); } } diff --git a/test/jalview/analysis/SequenceIdMatcherTest.java b/test/jalview/analysis/SequenceIdMatcherTest.java index bbed9d3..b2dfde0 100644 --- a/test/jalview/analysis/SequenceIdMatcherTest.java +++ b/test/jalview/analysis/SequenceIdMatcherTest.java @@ -40,7 +40,6 @@ public class SequenceIdMatcherTest JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION); } - /** * Test the method that checks for one sequence id starting with the other, * followed by an 'allowed' separator character diff --git a/test/jalview/analysis/TestAlignSeq.java b/test/jalview/analysis/TestAlignSeq.java index e2e5594..5134511 100644 --- a/test/jalview/analysis/TestAlignSeq.java +++ b/test/jalview/analysis/TestAlignSeq.java @@ -126,8 +126,7 @@ public class TestAlignSeq as.printAlignment(ps); String expected = "Score = 320.0\nLength of alignment = 10\nSequence Seq1/4-13 (Sequence length = 14)\nSequence Seq3/1-10 (Sequence length = 10)\n\n" - + "Seq1/4-13 SDFAQQQRRR\n" - + " ||||||| \n" + + "Seq1/4-13 SDFAQQQRRR\n" + " ||||||| \n" + "Seq3/1-10 SDFAQQQSSS\n\n" + "Percentage ID = 70.00\n\n"; assertEquals(expected, baos.toString()); } diff --git a/test/jalview/analysis/scoremodels/FeatureDistanceModelTest.java b/test/jalview/analysis/scoremodels/FeatureDistanceModelTest.java index 16ca70d..92f1542 100644 --- a/test/jalview/analysis/scoremodels/FeatureDistanceModelTest.java +++ b/test/jalview/analysis/scoremodels/FeatureDistanceModelTest.java @@ -75,8 +75,8 @@ public class FeatureDistanceModelTest */ public AlignFrame getTestAlignmentFrame() { - AlignFrame alf = new FileLoader(false).LoadFileWaitTillLoaded( - alntestFile, DataSourceType.PASTE); + AlignFrame alf = new FileLoader(false) + .LoadFileWaitTillLoaded(alntestFile, DataSourceType.PASTE); AlignmentI al = alf.getViewport().getAlignment(); Assert.assertEquals(al.getHeight(), 4); Assert.assertEquals(al.getWidth(), 5); @@ -104,8 +104,9 @@ public class FeatureDistanceModelTest alf.getFeatureRenderer().setVisible("sf2"); alf.getFeatureRenderer().setVisible("sf3"); alf.getFeatureRenderer().findAllFeatures(true); - Assert.assertEquals(alf.getFeatureRenderer().getDisplayedFeatureTypes() - .size(), 3, "Number of feature types"); + Assert.assertEquals( + alf.getFeatureRenderer().getDisplayedFeatureTypes().size(), 3, + "Number of feature types"); assertTrue(alf.getCurrentView().areFeaturesDisplayed()); return alf; } @@ -119,8 +120,7 @@ public class FeatureDistanceModelTest alf.getCurrentView().getAlignPanel()); alf.selectAllSequenceMenuItem_actionPerformed(null); - MatrixI dm = sm.findDistances( - alf.getViewport().getAlignmentView(true), + MatrixI dm = sm.findDistances(alf.getViewport().getAlignmentView(true), SimilarityParams.Jalview); assertEquals(dm.getValue(0, 2), 0d, "FER1_MESCR (0) should be identical with RAPSA (2)"); @@ -138,8 +138,7 @@ public class FeatureDistanceModelTest sm = ScoreModels.getInstance().getScoreModel(sm.getName(), alf.getCurrentView().getAlignPanel()); alf.selectAllSequenceMenuItem_actionPerformed(null); - MatrixI dm = sm.findDistances( - alf.getViewport().getAlignmentView(true), + MatrixI dm = sm.findDistances(alf.getViewport().getAlignmentView(true), SimilarityParams.Jalview); assertEquals(dm.getValue(0, 2), 0d, "FER1_MESCR (0) should be identical with RAPSA (2)"); @@ -159,22 +158,20 @@ public class FeatureDistanceModelTest sm = ScoreModels.getInstance().getScoreModel(sm.getName(), alf.getCurrentView().getAlignPanel()); alf.selectAllSequenceMenuItem_actionPerformed(null); - MatrixI dm = sm.findDistances( - alf.getViewport().getAlignmentView(true), + MatrixI dm = sm.findDistances(alf.getViewport().getAlignmentView(true), SimilarityParams.Jalview); - assertEquals( - dm.getValue(0, 2), - 0d, + assertEquals(dm.getValue(0, 2), 0d, "After hiding last two columns FER1_MESCR (0) should still be identical with RAPSA (2)"); - assertEquals( - dm.getValue(0, 1), - 0d, + assertEquals(dm.getValue(0, 1), 0d, "After hiding last two columns FER1_MESCR (0) should now also be identical with SPIOL (1)"); for (int s = 0; s < 3; s++) { - assertTrue(dm.getValue(s, 3) > 0d, "After hiding last two columns " - + alf.getViewport().getAlignment().getSequenceAt(s).getName() - + "(" + s + ") should still be distinct from FER1_MAIZE (3)"); + assertTrue(dm.getValue(s, 3) > 0d, + "After hiding last two columns " + + alf.getViewport().getAlignment().getSequenceAt(s) + .getName() + + "(" + s + + ") should still be distinct from FER1_MAIZE (3)"); } } @@ -196,26 +193,33 @@ public class FeatureDistanceModelTest assertTrue(sf.isContactFeature()); af.refreshFeatureUI(true); af.getFeatureRenderer().setAllVisible(Arrays.asList("disulphide bond")); - Assert.assertEquals(af.getFeatureRenderer().getDisplayedFeatureTypes() - .size(), 1, "Should be just one feature type displayed"); + Assert.assertEquals( + af.getFeatureRenderer().getDisplayedFeatureTypes().size(), 1, + "Should be just one feature type displayed"); // step through and check for pointwise feature presence/absence - Assert.assertEquals(af.getFeatureRenderer().findFeaturesAtColumn(aseq, 1) - .size(), 0); + Assert.assertEquals( + af.getFeatureRenderer().findFeaturesAtColumn(aseq, 1).size(), + 0); // step through and check for pointwise feature presence/absence - Assert.assertEquals(af.getFeatureRenderer().findFeaturesAtColumn(aseq, 2) - .size(), 1); + Assert.assertEquals( + af.getFeatureRenderer().findFeaturesAtColumn(aseq, 2).size(), + 1); // step through and check for pointwise feature presence/absence - Assert.assertEquals(af.getFeatureRenderer().findFeaturesAtColumn(aseq, 3) - .size(), 0); + Assert.assertEquals( + af.getFeatureRenderer().findFeaturesAtColumn(aseq, 3).size(), + 0); // step through and check for pointwise feature presence/absence - Assert.assertEquals(af.getFeatureRenderer().findFeaturesAtColumn(aseq, 4) - .size(), 0); + Assert.assertEquals( + af.getFeatureRenderer().findFeaturesAtColumn(aseq, 4).size(), + 0); // step through and check for pointwise feature presence/absence - Assert.assertEquals(af.getFeatureRenderer().findFeaturesAtColumn(aseq, 5) - .size(), 1); + Assert.assertEquals( + af.getFeatureRenderer().findFeaturesAtColumn(aseq, 5).size(), + 1); // step through and check for pointwise feature presence/absence - Assert.assertEquals(af.getFeatureRenderer().findFeaturesAtColumn(aseq, 6) - .size(), 0); + Assert.assertEquals( + af.getFeatureRenderer().findFeaturesAtColumn(aseq, 6).size(), + 0); } @Test(groups = { "Functional" }) @@ -239,18 +243,18 @@ public class FeatureDistanceModelTest * 20120 (two features of the same type doesn't affect score) * giving an average (pairwise distance) of 5/5 or 1.0 */ - s1.addSequenceFeature(new SequenceFeature("domain", null, 1, 3, 0f, - null)); - s1.addSequenceFeature(new SequenceFeature("variant", null, 2, 4, 0f, - null)); - s1.addSequenceFeature(new SequenceFeature("variant", null, 3, 5, 0f, - null)); - s2.addSequenceFeature(new SequenceFeature("domain", null, 2, 4, 0f, - null)); - s2.addSequenceFeature(new SequenceFeature("variant", null, 1, 2, 0f, - null)); - s2.addSequenceFeature(new SequenceFeature("variant", null, 5, 5, 0f, - null)); + s1.addSequenceFeature( + new SequenceFeature("domain", null, 1, 3, 0f, null)); + s1.addSequenceFeature( + new SequenceFeature("variant", null, 2, 4, 0f, null)); + s1.addSequenceFeature( + new SequenceFeature("variant", null, 3, 5, 0f, null)); + s2.addSequenceFeature( + new SequenceFeature("domain", null, 2, 4, 0f, null)); + s2.addSequenceFeature( + new SequenceFeature("variant", null, 1, 2, 0f, null)); + s2.addSequenceFeature( + new SequenceFeature("variant", null, 5, 5, 0f, null)); alf.setShowSeqFeatures(true); alf.getFeatureRenderer().findAllFeatures(true); @@ -259,8 +263,7 @@ public class FeatureDistanceModelTest alf.getCurrentView().getAlignPanel()); alf.selectAllSequenceMenuItem_actionPerformed(null); - AlignmentView alignmentView = alf.getViewport() - .getAlignmentView(true); + AlignmentView alignmentView = alf.getViewport().getAlignmentView(true); MatrixI distances = sm.findDistances(alignmentView, SimilarityParams.Jalview); assertEquals(distances.width(), 2); @@ -303,7 +306,7 @@ public class FeatureDistanceModelTest assertEquals(distances.getValue(1, 1), 0d); assertEquals(distances.getValue(0, 1), 13d / 6); // should be 13d/6 assertEquals(distances.getValue(1, 0), 13d / 6); - + /* * exclude gaps * score = 3 + 3 + 0 + 0 + 0 + 0 = 6/6 @@ -339,12 +342,16 @@ public class FeatureDistanceModelTest SequenceI s1 = new Sequence("s1", "FR K S"); SequenceI s2 = new Sequence("s2", "FS L"); - s1.addSequenceFeature(new SequenceFeature("chain", null, 1, 4, 0f, null)); - s1.addSequenceFeature(new SequenceFeature("domain", null, 1, 4, 0f, - null)); - s2.addSequenceFeature(new SequenceFeature("chain", null, 1, 3, 0f, null)); - s2.addSequenceFeature(new SequenceFeature("metal", null, 1, 3, 0f, null)); - s2.addSequenceFeature(new SequenceFeature("Pfam", null, 1, 3, 0f, null)); + s1.addSequenceFeature( + new SequenceFeature("chain", null, 1, 4, 0f, null)); + s1.addSequenceFeature( + new SequenceFeature("domain", null, 1, 4, 0f, null)); + s2.addSequenceFeature( + new SequenceFeature("chain", null, 1, 3, 0f, null)); + s2.addSequenceFeature( + new SequenceFeature("metal", null, 1, 3, 0f, null)); + s2.addSequenceFeature( + new SequenceFeature("Pfam", null, 1, 3, 0f, null)); AlignmentI al = new Alignment(new SequenceI[] { s1, s2 }); AlignFrame af = new AlignFrame(al, 300, 300); af.setShowSeqFeatures(true); diff --git a/test/jalview/analysis/scoremodels/PIDModelTest.java b/test/jalview/analysis/scoremodels/PIDModelTest.java index e8ffd2f..6f03f1d 100644 --- a/test/jalview/analysis/scoremodels/PIDModelTest.java +++ b/test/jalview/analysis/scoremodels/PIDModelTest.java @@ -146,16 +146,17 @@ public class PIDModelTest { String s1 = "FR-K-S"; String s2 = "FS--L"; - + /* * match gap-gap and gap-char * shorter sequence treated as if with trailing gaps * PID = 5/6 = 83.333...% */ - SimilarityParamsI params = new SimilarityParams(true, true, true, false); + SimilarityParamsI params = new SimilarityParams(true, true, true, + false); assertEquals(PIDModel.computePID(s1, s2, params), 500d / 6); assertEquals(PIDModel.computePID(s2, s1, params), 500d / 6); - + /* * match gap-char but not gap-gap * PID = 4/5 = 80% @@ -163,7 +164,7 @@ public class PIDModelTest params = new SimilarityParams(false, true, true, false); assertEquals(PIDModel.computePID(s1, s2, params), 80d); assertEquals(PIDModel.computePID(s2, s1, params), 80d); - + /* * include gaps but don't match them * include gap-gap, counted as identity @@ -172,7 +173,7 @@ public class PIDModelTest params = new SimilarityParams(true, false, true, false); assertEquals(PIDModel.computePID(s1, s2, params), 100d / 3); assertEquals(PIDModel.computePID(s2, s1, params), 100d / 3); - + /* * include gaps but don't match them * exclude gap-gap diff --git a/test/jalview/analysis/scoremodels/ScoreMatrixTest.java b/test/jalview/analysis/scoremodels/ScoreMatrixTest.java index 15bdce1..ec3fab3 100644 --- a/test/jalview/analysis/scoremodels/ScoreMatrixTest.java +++ b/test/jalview/analysis/scoremodels/ScoreMatrixTest.java @@ -670,7 +670,8 @@ public class ScoreMatrixTest String[] seqs2 = new String[] { seq2, seq1 }; MatrixI res2 = sm.findSimilarities(seqs2, params); assertFalse(res1.equals(res2)); - assertTrue(res2.equals(new Matrix(new double[][] + assertTrue( + res2.equals(new Matrix(new double[][] { { 16d, 3d }, { 3d, 14d } }), delta)); /* @@ -684,7 +685,8 @@ public class ScoreMatrixTest sm = new ScoreMatrix("Test", "AB".toCharArray(), scores); assertFalse(sm.isSymmetric()); // [0, 1] != [1, 0] res1 = sm.findSimilarities(seqs1, params); - assertTrue(res1.equals(new Matrix(new double[][] + assertTrue( + res1.equals(new Matrix(new double[][] { { 14d, 7d }, { 11d, 16d } }), delta)); /* diff --git a/test/jalview/analysis/scoremodels/ScoreModelsTest.java b/test/jalview/analysis/scoremodels/ScoreModelsTest.java index 5e44d3d..4e8575d 100644 --- a/test/jalview/analysis/scoremodels/ScoreModelsTest.java +++ b/test/jalview/analysis/scoremodels/ScoreModelsTest.java @@ -32,14 +32,16 @@ public class ScoreModelsTest assertTrue(sm instanceof PairwiseScoreModelI); assertFalse(sm instanceof DistanceScoreModel); assertEquals(sm.getName(), "BLOSUM62"); - assertEquals(((PairwiseScoreModelI) sm).getPairwiseScore('I', 'R'), -3f); + assertEquals(((PairwiseScoreModelI) sm).getPairwiseScore('I', 'R'), + -3f); sm = models.next(); assertTrue(sm instanceof SimilarityScoreModel); assertTrue(sm instanceof PairwiseScoreModelI); assertFalse(sm instanceof DistanceScoreModel); assertEquals(sm.getName(), "PAM250"); - assertEquals(((PairwiseScoreModelI) sm).getPairwiseScore('R', 'C'), -4f); + assertEquals(((PairwiseScoreModelI) sm).getPairwiseScore('R', 'C'), + -4f); sm = models.next(); assertTrue(sm instanceof SimilarityScoreModel); diff --git a/test/jalview/bin/ArgsParserTest.java b/test/jalview/bin/ArgsParserTest.java index 0485db7..23db36f 100644 --- a/test/jalview/bin/ArgsParserTest.java +++ b/test/jalview/bin/ArgsParserTest.java @@ -43,8 +43,9 @@ public class ArgsParserTest @Test(groups = "Functional") public void testGetValue() { - ArgsParser ap = new ArgsParser(new String[] { "-name", "Henry", "-job", - "Tester" }); + ArgsParser ap = new ArgsParser( + new String[] + { "-name", "Henry", "-job", "Tester" }); assertEquals(4, ap.getSize()); assertNull(ap.getValue("rubbish")); assertEquals("Tester", ap.getValue("job")); @@ -62,8 +63,9 @@ public class ArgsParserTest @Test(groups = "Functional") public void testGetValue_decoded() { - ArgsParser ap = new ArgsParser(new String[] { "-name%241", "Henry", - "-job", "Test%203%2a" }); + ArgsParser ap = new ArgsParser( + new String[] + { "-name%241", "Henry", "-job", "Test%203%2a" }); // parameter value is decoded assertEquals("Test 3*", ap.getValue("job", true)); // parameter name is not decoded @@ -74,8 +76,9 @@ public class ArgsParserTest @Test(groups = "Functional") public void testNextValue() { - ArgsParser ap = new ArgsParser(new String[] { "-name", "Henry", "-job", - "Tester" }); + ArgsParser ap = new ArgsParser( + new String[] + { "-name", "Henry", "-job", "Tester" }); assertEquals("name", ap.nextValue()); assertEquals("Henry", ap.nextValue()); assertEquals("job", ap.nextValue()); @@ -85,8 +88,9 @@ public class ArgsParserTest @Test(groups = "Functional") public void testContains() { - ArgsParser ap = new ArgsParser(new String[] { "-name", "Henry", "-job", - "Tester" }); + ArgsParser ap = new ArgsParser( + new String[] + { "-name", "Henry", "-job", "Tester" }); assertFalse(ap.contains("Susan")); assertFalse(ap.contains("-name")); assertTrue(ap.contains("name")); diff --git a/test/jalview/bin/CommandLineOperations.java b/test/jalview/bin/CommandLineOperations.java index ee03e77..2d8ebce 100644 --- a/test/jalview/bin/CommandLineOperations.java +++ b/test/jalview/bin/CommandLineOperations.java @@ -55,9 +55,9 @@ public class CommandLineOperations } private static final int TEST_TIMEOUT = 12500; // Note longer timeout needed - // on - // full test run than on - // individual tests + // on + // full test run than on + // individual tests private static final int SETUP_TIMEOUT = 9000; @@ -167,8 +167,8 @@ public class CommandLineOperations // not expanded by the shell String classpath = getClassPath(); String _cmd = java_exe + " " - + (withAwt ? "-Djava.awt.headless=true" : "") - + " -classpath " + classpath + + (withAwt ? "-Djava.awt.headless=true" : "") + " -classpath " + + classpath + (modules.length() > 2 ? "--add-modules=\"" + modules + "\"" : "") + " jalview.bin.Jalview "; @@ -248,12 +248,11 @@ public class CommandLineOperations String cmds = "-open examples/uniref50.fa -noquestionnaire -nousagestats"; final Worker worker = getJalviewDesktopRunner(false, cmds, SETUP_TIMEOUT); - - + // number of lines expected on STDERR when Jalview starts up normally // may need to adjust this if Jalview is excessively noisy ? - final int STDERR_SETUPLINES=30; - + final int STDERR_SETUPLINES = 30; + // thread monitors stderr - bails after SETUP_TIMEOUT or when // STDERR_SETUPLINES have been read Thread runner = new Thread(new Runnable() @@ -380,26 +379,26 @@ public class CommandLineOperations " -eps", workingDir + "test_uniref50_out.eps", true, MINFILESIZE_BIG, TEST_TIMEOUT }, { "nodisplay -open examples/uniref50.fa", " -eps", - workingDir + "test_uniref50_out.eps", false, - MINFILESIZE_BIG, TEST_TIMEOUT }, + workingDir + "test_uniref50_out.eps", false, MINFILESIZE_BIG, + TEST_TIMEOUT }, { "nogui -open examples/uniref50.fa", " -eps", workingDir + "test_uniref50_out.eps", true, MINFILESIZE_BIG, TEST_TIMEOUT }, { "nogui -open examples/uniref50.fa", " -eps", - workingDir + "test_uniref50_out.eps", false, - MINFILESIZE_BIG, TEST_TIMEOUT }, + workingDir + "test_uniref50_out.eps", false, MINFILESIZE_BIG, + TEST_TIMEOUT }, { "headless -open examples/uniref50.fa", " -eps", workingDir + "test_uniref50_out.eps", true, MINFILESIZE_BIG, TEST_TIMEOUT }, { "headless -open examples/uniref50.fa", " -svg", - workingDir + "test_uniref50_out.svg", false, - MINFILESIZE_BIG, TEST_TIMEOUT }, + workingDir + "test_uniref50_out.svg", false, MINFILESIZE_BIG, + TEST_TIMEOUT }, { "headless -open examples/uniref50.fa", " -png", workingDir + "test_uniref50_out.png", true, MINFILESIZE_BIG, TEST_TIMEOUT }, { "headless -open examples/uniref50.fa", " -html", - workingDir + "test_uniref50_out.html", true, - MINFILESIZE_BIG, TEST_TIMEOUT }, + workingDir + "test_uniref50_out.html", true, MINFILESIZE_BIG, + TEST_TIMEOUT }, { "headless -open examples/uniref50.fa", " -fasta", workingDir + "test_uniref50_out.mfa", true, MINFILESIZE_SMALL, TEST_TIMEOUT }, diff --git a/test/jalview/bin/JalviewLiteTest.java b/test/jalview/bin/JalviewLiteTest.java index 07e1b25..e70cd89 100644 --- a/test/jalview/bin/JalviewLiteTest.java +++ b/test/jalview/bin/JalviewLiteTest.java @@ -56,8 +56,8 @@ public class JalviewLiteTest assertEquals("[abc]", Arrays.toString(JalviewLite.separatorListToArray("abc|", "|"))); - assertEquals("[abc]", Arrays.toString(JalviewLite.separatorListToArray( - "abcxy", "xy"))); + assertEquals("[abc]", Arrays + .toString(JalviewLite.separatorListToArray("abcxy", "xy"))); // these fail: // assertEquals("[abc]", diff --git a/test/jalview/commands/EditCommandTest.java b/test/jalview/commands/EditCommandTest.java index 91f844e..8e04cdd 100644 --- a/test/jalview/commands/EditCommandTest.java +++ b/test/jalview/commands/EditCommandTest.java @@ -313,8 +313,7 @@ public class EditCommandTest */ EditCommand edit = new EditCommand("", Action.REPLACE, "xyZ", new SequenceI[] - { seq }, 2, - 4, al); + { seq }, 2, 4, al); assertEquals("ABxyZ-DEF", seq.getSequenceAsString()); assertEquals(1, seq.getStart()); assertEquals(8, seq.getEnd()); @@ -326,8 +325,9 @@ public class EditCommandTest /* * undo the edit */ - AlignmentI[] views = new AlignmentI[] - { new Alignment(new SequenceI[] { seq }) }; + AlignmentI[] views = new AlignmentI[] { + new Alignment(new SequenceI[] + { seq }) }; edit.undoCommand(views); assertEquals("ABC--DEF", seq.getSequenceAsString()); @@ -369,7 +369,8 @@ public class EditCommandTest // and ds is preserved assertTrue(dsseq == seqs[1].getDatasetSequence()); // and it is unchanged and UPPERCASE ! - assertEquals("fghjklmnopq".toUpperCase(Locale.ROOT), dsseq.getSequenceAsString()); + assertEquals("fghjklmnopq".toUpperCase(Locale.ROOT), + dsseq.getSequenceAsString()); // and that alignment sequence start has been adjusted assertEquals(5, seqs[1].getStart()); assertEquals(11, seqs[1].getEnd()); @@ -396,7 +397,8 @@ public class EditCommandTest // and ds is preserved assertTrue(dsseq == seqs[1].getDatasetSequence()); // and it is unchanged AND UPPERCASE ! - assertEquals("fghjklmnopq".toUpperCase(Locale.ROOT), dsseq.getSequenceAsString()); + assertEquals("fghjklmnopq".toUpperCase(Locale.ROOT), + dsseq.getSequenceAsString()); // and that alignment sequence start has been adjusted assertEquals(5, seqs[1].getStart()); assertEquals(11, seqs[1].getEnd()); @@ -414,17 +416,20 @@ public class EditCommandTest * 3 insert gap in a row (aka mouse drag right): */ Edit e = new EditCommand().new Edit(Action.INSERT_GAP, - new SequenceI[] { seqs[0] }, 1, 1, al); + new SequenceI[] + { seqs[0] }, 1, 1, al); testee.addEdit(e); SequenceI edited = new Sequence("seq0", "a?bcdefghjk"); edited.setDatasetSequence(seqs[0].getDatasetSequence()); e = new EditCommand().new Edit(Action.INSERT_GAP, - new SequenceI[] { edited }, 2, 1, al); + new SequenceI[] + { edited }, 2, 1, al); testee.addEdit(e); edited = new Sequence("seq0", "a??bcdefghjk"); edited.setDatasetSequence(seqs[0].getDatasetSequence()); e = new EditCommand().new Edit(Action.INSERT_GAP, - new SequenceI[] { edited }, 3, 1, al); + new SequenceI[] + { edited }, 3, 1, al); testee.addEdit(e); assertEquals(1, testee.getSize()); assertEquals(Action.INSERT_GAP, testee.getEdit(0).getAction()); @@ -435,7 +440,8 @@ public class EditCommandTest * Add a non-contiguous edit - should not be merged. */ e = new EditCommand().new Edit(Action.INSERT_GAP, - new SequenceI[] { edited }, 5, 2, al); + new SequenceI[] + { edited }, 5, 2, al); testee.addEdit(e); assertEquals(2, testee.getSize()); assertEquals(5, testee.getEdit(1).getPosition()); @@ -445,7 +451,8 @@ public class EditCommandTest * Add a Delete after the Insert - should not be merged. */ e = new EditCommand().new Edit(Action.DELETE_GAP, - new SequenceI[] { edited }, 6, 2, al); + new SequenceI[] + { edited }, 6, 2, al); testee.addEdit(e); assertEquals(3, testee.getSize()); assertEquals(Action.DELETE_GAP, testee.getEdit(2).getAction()); @@ -465,21 +472,24 @@ public class EditCommandTest */ seqs[0].setSequence("a???bcdefghjk"); Edit e = new EditCommand().new Edit(Action.DELETE_GAP, - new SequenceI[] { seqs[0] }, 4, 1, al); + new SequenceI[] + { seqs[0] }, 4, 1, al); testee.addEdit(e); assertEquals(1, testee.getSize()); SequenceI edited = new Sequence("seq0", "a??bcdefghjk"); edited.setDatasetSequence(seqs[0].getDatasetSequence()); e = new EditCommand().new Edit(Action.DELETE_GAP, - new SequenceI[] { edited }, 3, 1, al); + new SequenceI[] + { edited }, 3, 1, al); testee.addEdit(e); assertEquals(1, testee.getSize()); edited = new Sequence("seq0", "a?bcdefghjk"); edited.setDatasetSequence(seqs[0].getDatasetSequence()); e = new EditCommand().new Edit(Action.DELETE_GAP, - new SequenceI[] { edited }, 2, 1, al); + new SequenceI[] + { edited }, 2, 1, al); testee.addEdit(e); assertEquals(1, testee.getSize()); assertEquals(Action.DELETE_GAP, testee.getEdit(0).getAction()); @@ -490,7 +500,8 @@ public class EditCommandTest * Add a non-contiguous edit - should not be merged. */ e = new EditCommand().new Edit(Action.DELETE_GAP, - new SequenceI[] { edited }, 2, 1, al); + new SequenceI[] + { edited }, 2, 1, al); testee.addEdit(e); assertEquals(2, testee.getSize()); assertEquals(Action.DELETE_GAP, testee.getEdit(0).getAction()); @@ -501,7 +512,8 @@ public class EditCommandTest * Add an Insert after the Delete - should not be merged. */ e = new EditCommand().new Edit(Action.INSERT_GAP, - new SequenceI[] { edited }, 1, 1, al); + new SequenceI[] + { edited }, 1, 1, al); testee.addEdit(e); assertEquals(3, testee.getSize()); assertEquals(Action.INSERT_GAP, testee.getEdit(2).getAction()); @@ -519,12 +531,14 @@ public class EditCommandTest { seqs[0].setSequence("a???bcdefghjk"); Edit e = new EditCommand().new Edit(Action.DELETE_GAP, - new SequenceI[] { seqs[0] }, 4, 1, al); + new SequenceI[] + { seqs[0] }, 4, 1, al); testee.addEdit(e); seqs[1].setSequence("f??ghjklmnopq"); - Edit e2 = new EditCommand().new Edit(Action.DELETE_GAP, new SequenceI[] - { seqs[1] }, 3, 1, al); + Edit e2 = new EditCommand().new Edit(Action.DELETE_GAP, + new SequenceI[] + { seqs[1] }, 3, 1, al); testee.addEdit(e2); assertEquals(2, testee.getSize()); assertSame(e, testee.getEdit(0)); @@ -541,25 +555,27 @@ public class EditCommandTest /* * 2 insert gap in a row (aka mouse drag right), on two sequences: */ - Edit e = new EditCommand().new Edit(Action.INSERT_GAP, new SequenceI[] { - seqs[0], seqs[1] }, 1, 1, al); + Edit e = new EditCommand().new Edit(Action.INSERT_GAP, + new SequenceI[] + { seqs[0], seqs[1] }, 1, 1, al); testee.addEdit(e); SequenceI seq1edited = new Sequence("seq0", "a?bcdefghjk"); seq1edited.setDatasetSequence(seqs[0].getDatasetSequence()); SequenceI seq2edited = new Sequence("seq1", "f?ghjklmnopq"); seq2edited.setDatasetSequence(seqs[1].getDatasetSequence()); - e = new EditCommand().new Edit(Action.INSERT_GAP, new SequenceI[] { - seq1edited, seq2edited }, 2, 1, al); + e = new EditCommand().new Edit(Action.INSERT_GAP, + new SequenceI[] + { seq1edited, seq2edited }, 2, 1, al); testee.addEdit(e); assertEquals(1, testee.getSize()); assertEquals(Action.INSERT_GAP, testee.getEdit(0).getAction()); assertEquals(1, testee.getEdit(0).getPosition()); assertEquals(2, testee.getEdit(0).getNumber()); - assertEquals(seqs[0].getDatasetSequence(), testee.getEdit(0) - .getSequences()[0].getDatasetSequence()); - assertEquals(seqs[1].getDatasetSequence(), testee.getEdit(0) - .getSequences()[1].getDatasetSequence()); + assertEquals(seqs[0].getDatasetSequence(), + testee.getEdit(0).getSequences()[0].getDatasetSequence()); + assertEquals(seqs[1].getDatasetSequence(), + testee.getEdit(0).getSequences()[1].getDatasetSequence()); } /** @@ -797,22 +813,22 @@ public class EditCommandTest * a cut of columns/residues 4-7 */ SequenceI seq0 = seqs[0]; // abcdefghjk/1-10 - seq0.addSequenceFeature(new SequenceFeature("before", "", 1, 3, 0f, - null)); - seq0.addSequenceFeature(new SequenceFeature("overlap left", "", 2, 6, - 0f, null)); - seq0.addSequenceFeature(new SequenceFeature("internal", "", 5, 6, 0f, - null)); - seq0.addSequenceFeature(new SequenceFeature("overlap right", "", 7, 8, - 0f, null)); - seq0.addSequenceFeature(new SequenceFeature("after", "", 8, 10, 0f, - null)); + seq0.addSequenceFeature( + new SequenceFeature("before", "", 1, 3, 0f, null)); + seq0.addSequenceFeature( + new SequenceFeature("overlap left", "", 2, 6, 0f, null)); + seq0.addSequenceFeature( + new SequenceFeature("internal", "", 5, 6, 0f, null)); + seq0.addSequenceFeature( + new SequenceFeature("overlap right", "", 7, 8, 0f, null)); + seq0.addSequenceFeature( + new SequenceFeature("after", "", 8, 10, 0f, null)); /* * add some contact features */ - SequenceFeature internalContact = new SequenceFeature("disulphide bond", "", 5, - 6, 0f, null); + SequenceFeature internalContact = new SequenceFeature("disulphide bond", + "", 5, 6, 0f, null); seq0.addSequenceFeature(internalContact); // should get deleted SequenceFeature overlapLeftContact = new SequenceFeature( "disulphide bond", "", 2, 6, 0f, null); @@ -820,8 +836,8 @@ public class EditCommandTest SequenceFeature overlapRightContact = new SequenceFeature( "disulphide bond", "", 5, 8, 0f, null); seq0.addSequenceFeature(overlapRightContact); // should get deleted - SequenceFeature spanningContact = new SequenceFeature( - "disulphide bond", "", 2, 9, 0f, null); + SequenceFeature spanningContact = new SequenceFeature("disulphide bond", + "", 2, 9, 0f, null); seq0.addSequenceFeature(spanningContact); // should get shortened 3' /* @@ -887,8 +903,8 @@ public class EditCommandTest for (int to = from; to <= end; to++) { String desc = String.format("%d-%d", from, to); - SequenceFeature sf = new SequenceFeature("test", desc, from, to, - 0f, null); + SequenceFeature sf = new SequenceFeature("test", desc, from, to, 0f, + null); sf.setValue("from", Integer.valueOf(from)); sf.setValue("to", Integer.valueOf(to)); seq0.addSequenceFeature(sf); @@ -910,8 +926,8 @@ public class EditCommandTest { for (int to = from; to < seq0.getLength(); to++) { - EditCommand ec = new EditCommand("Cut", Action.CUT, sqs, from, (to - - from + 1), alignment); + EditCommand ec = new EditCommand("Cut", Action.CUT, sqs, from, + (to - from + 1), alignment); final String msg = String.format("Cut %d-%d ", from + 1, to + 1); boolean newDatasetSequence = copySeq0.getDatasetSequence() != seq0 .getDatasetSequence(); @@ -1027,8 +1043,8 @@ public class EditCommandTest else { // failure in checkFeatureRelocation is more informative! - assertEquals(msg + "wrong number of features left", func(5) - - func(to - from + 1), sfs.size()); + assertEquals(msg + "wrong number of features left", + func(5) - func(to - from + 1), sfs.size()); } /* @@ -1055,9 +1071,8 @@ public class EditCommandTest { final int oldFrom = ((Integer) sf.getValue("from")).intValue(); final int oldTo = ((Integer) sf.getValue("to")).intValue(); - String msg = String.format( - "Undo cut of [%d-%d], feature at [%d-%d] ", from + 1, to + 1, - oldFrom, oldTo); + String msg = String.format("Undo cut of [%d-%d], feature at [%d-%d] ", + from + 1, to + 1, oldFrom, oldTo); assertEquals(msg + "start", oldFrom, sf.getBegin()); assertEquals(msg + "end", oldTo, sf.getEnd()); } @@ -1075,7 +1090,7 @@ public class EditCommandTest * @param seqStart */ private void verifyFeatureRelocation(SequenceFeature sf, int from, int to, - boolean newDataset, int seqStart) + boolean newDataset, int seqStart) { // TODO handle the gapped sequence case as well int cutSize = to - from + 1; @@ -1142,8 +1157,7 @@ public class EditCommandTest SequenceI seq0 = new Sequence("seq/8-11", "A-BCC"); seq0.createDatasetSequence(); assertEquals(8, seq0.getStart()); - seq0.addSequenceFeature(new SequenceFeature("", "", 10, 11, 0f, - null)); + seq0.addSequenceFeature(new SequenceFeature("", "", 10, 11, 0f, null)); SequenceI[] seqsArray = new SequenceI[] { seq0 }; AlignmentI alignment = new Alignment(seqsArray); @@ -1153,7 +1167,7 @@ public class EditCommandTest */ Edit ec = testee.new Edit(Action.CUT, seqsArray, 0, 3, alignment); EditCommand.cut(ec, new AlignmentI[] { alignment }); - + /* * feature on CC(10-11) should still be on CC(10-11) */ diff --git a/test/jalview/controller/AlignViewControllerTest.java b/test/jalview/controller/AlignViewControllerTest.java index fde4da1..ca3b55c 100644 --- a/test/jalview/controller/AlignViewControllerTest.java +++ b/test/jalview/controller/AlignViewControllerTest.java @@ -68,18 +68,17 @@ public class AlignViewControllerTest /* * features start/end are base 1 */ - seq1.addSequenceFeature(new SequenceFeature("Metal", "desc", 2, 4, 0f, - null)); - seq1.addSequenceFeature(new SequenceFeature("Helix", "desc", 1, 15, 0f, - null)); - seq2.addSequenceFeature(new SequenceFeature("Metal", "desc", 4, 10, - 10f, - null)); - seq3.addSequenceFeature(new SequenceFeature("Metal", "desc", 11, 15, - 10f, null)); + seq1.addSequenceFeature( + new SequenceFeature("Metal", "desc", 2, 4, 0f, null)); + seq1.addSequenceFeature( + new SequenceFeature("Helix", "desc", 1, 15, 0f, null)); + seq2.addSequenceFeature( + new SequenceFeature("Metal", "desc", 4, 10, 10f, null)); + seq3.addSequenceFeature( + new SequenceFeature("Metal", "desc", 11, 15, 10f, null)); // disulfide bond is a 'contact feature' - only select its 'start' and 'end' - seq3.addSequenceFeature(new SequenceFeature("disulfide bond", "desc", - 8, 12, 0f, null)); + seq3.addSequenceFeature( + new SequenceFeature("disulfide bond", "desc", 8, 12, 0f, null)); /* * select the first five columns --> Metal in seq1 cols 4-5 @@ -95,8 +94,9 @@ public class AlignViewControllerTest /* * set features visible on a viewport as only visible features are selected */ - AlignFrame af = new AlignFrame(new Alignment(new SequenceI[] { seq1, - seq2, seq3, seq4 }), 100, 100); + AlignFrame af = new AlignFrame( + new Alignment(new SequenceI[] + { seq1, seq2, seq3, seq4 }), 100, 100); af.getFeatureRenderer().findAllFeatures(true); AlignViewController avc = new AlignViewController(af, af.getViewport(), @@ -205,7 +205,8 @@ public class AlignViewControllerTest AlignFrame af = new FileLoader().LoadFileWaitTillLoaded( "seq1 aMMMaaaaaaaaaaaaaaaa\n" + "seq2 aaaMMMMMMMaaaaaaaaaa\n" + "seq3 aaaaaaaaaaMMMMMaaaaa\n" - + "seq4 aaaaaaaaaaaaaaaaaaaa\n", DataSourceType.PASTE); + + "seq4 aaaaaaaaaaaaaaaaaaaa\n", + DataSourceType.PASTE); SearchResultsI sr = new SearchResults(); SequenceI[] sqs = af.getViewport().getAlignment().getSequencesArray(); @@ -237,8 +238,9 @@ public class AlignViewControllerTest AlignViewControllerI avc = af.avc; avc.markHighlightedColumns(false, false, false); - assertTrue("Didn't select highlighted columns", Arrays.deepEquals(af - .getViewport().getColumnSelection().getSelectedRanges() - .toArray(), new int[][] { { 1, 14 } })); + assertTrue("Didn't select highlighted columns", + Arrays.deepEquals(af.getViewport().getColumnSelection() + .getSelectedRanges().toArray(), new int[][] + { { 1, 14 } })); } } diff --git a/test/jalview/datamodel/AlignedCodonFrameTest.java b/test/jalview/datamodel/AlignedCodonFrameTest.java index 337ac1a..3474880 100644 --- a/test/jalview/datamodel/AlignedCodonFrameTest.java +++ b/test/jalview/datamodel/AlignedCodonFrameTest.java @@ -83,14 +83,14 @@ public class AlignedCodonFrameTest /* * DNA seq1 maps to AA seq2 */ - assertEquals(aa.getSequenceAt(1), acf.findAlignedSequence(cdna - .getSequenceAt(0).getDatasetSequence(), aa)); + assertEquals(aa.getSequenceAt(1), acf.findAlignedSequence( + cdna.getSequenceAt(0).getDatasetSequence(), aa)); // can also find this from the dna aligned sequence assertEquals(aa.getSequenceAt(1), acf.findAlignedSequence(cdna.getSequenceAt(0), aa)); - assertEquals(cdna.getSequenceAt(0), acf.findAlignedSequence(aa - .getSequenceAt(1).getDatasetSequence(), cdna)); + assertEquals(cdna.getSequenceAt(0), acf.findAlignedSequence( + aa.getSequenceAt(1).getDatasetSequence(), cdna)); } /** @@ -121,11 +121,13 @@ public class AlignedCodonFrameTest * Set up the mappings for the exons (upper-case bases) * Note residue Q is unmapped */ - MapList map1 = new MapList(new int[] { 11, 13, 15, 15, 17, 18 }, new int[] { - 3, 4 }, 3, 1); + MapList map1 = new MapList(new int[] { 11, 13, 15, 15, 17, 18 }, + new int[] + { 3, 4 }, 3, 1); acf.addMap(dna1.getDatasetSequence(), pep1.getDatasetSequence(), map1); - MapList map2 = new MapList(new int[] { 20, 21, 23, 24, 26, 27 }, new int[] { 7, 9 }, - 3, 1); + MapList map2 = new MapList(new int[] { 20, 21, 23, 24, 26, 27 }, + new int[] + { 7, 9 }, 3, 1); acf.addMap(dna2.getDatasetSequence(), pep2.getDatasetSequence(), map2); /* @@ -149,7 +151,7 @@ public class AlignedCodonFrameTest * No mapping from dna1 to pep2 */ assertNull(acf.getMappedRegion(dna1, pep2, 7)); - + /* * get peptide position for codon position */ @@ -181,20 +183,17 @@ public class AlignedCodonFrameTest /* * Set up the mappings for the exons (upper-case bases) */ - MapList map = new MapList(new int[] { 2, 4, 6, 6, 8, 9 }, new int[] { - 1, 2 }, 3, 1); + MapList map = new MapList(new int[] { 2, 4, 6, 6, 8, 9 }, + new int[] + { 1, 2 }, 3, 1); acf.addMap(seq1.getDatasetSequence(), aseq1.getDatasetSequence(), map); - assertEquals(1, acf.getMappedCodons(aseq1.getDatasetSequence(), 1) - .size()); - assertEquals( - "[G, T, A]", - Arrays.toString(acf.getMappedCodons(aseq1.getDatasetSequence(), - 1).get(0))); - assertEquals( - "[C, T, T]", - Arrays.toString(acf.getMappedCodons(aseq1.getDatasetSequence(), - 2).get(0))); + assertEquals(1, + acf.getMappedCodons(aseq1.getDatasetSequence(), 1).size()); + assertEquals("[G, T, A]", Arrays.toString( + acf.getMappedCodons(aseq1.getDatasetSequence(), 1).get(0))); + assertEquals("[C, T, T]", Arrays.toString( + acf.getMappedCodons(aseq1.getDatasetSequence(), 2).get(0))); } /** @@ -216,19 +215,20 @@ public class AlignedCodonFrameTest /* * Set up the mappings for the exons (upper-case bases) */ - MapList map = new MapList(new int[] { 2, 4, 6, 6, 8, 9 }, new int[] { - 1, 2 }, 3, 1); + MapList map = new MapList(new int[] { 2, 4, 6, 6, 8, 9 }, + new int[] + { 1, 2 }, 3, 1); acf.addMap(seq1.getDatasetSequence(), aseq1.getDatasetSequence(), map); acf.addMap(seq2.getDatasetSequence(), aseq1.getDatasetSequence(), map); - assertEquals(2, acf.getMappedCodons(aseq1.getDatasetSequence(), 1) - .size()); - List codonsForV = acf.getMappedCodons( - aseq1.getDatasetSequence(), 1); + assertEquals(2, + acf.getMappedCodons(aseq1.getDatasetSequence(), 1).size()); + List codonsForV = acf + .getMappedCodons(aseq1.getDatasetSequence(), 1); assertEquals("[G, T, A]", Arrays.toString(codonsForV.get(0))); assertEquals("[G, T, T]", Arrays.toString(codonsForV.get(1))); - List codonsForL = acf.getMappedCodons( - aseq1.getDatasetSequence(), 2); + List codonsForL = acf + .getMappedCodons(aseq1.getDatasetSequence(), 2); assertEquals("[C, T, T]", Arrays.toString(codonsForL.get(0))); assertEquals("[T, T, A]", Arrays.toString(codonsForL.get(1))); } @@ -250,17 +250,14 @@ public class AlignedCodonFrameTest */ AlignedCodonFrame acf = new AlignedCodonFrame(); MapList map = new MapList(new int[] { 28, 30, 32, 32, 34, 35 }, - new int[] { 12, 13 }, 3, 1); + new int[] + { 12, 13 }, 3, 1); acf.addMap(seq1.getDatasetSequence(), aseq1.getDatasetSequence(), map); - assertEquals( - "[G, T, A]", - Arrays.toString(acf.getMappedCodons(aseq1.getDatasetSequence(), - 12).get(0))); - assertEquals( - "[C, T, T]", - Arrays.toString(acf.getMappedCodons(aseq1.getDatasetSequence(), - 13).get(0))); + assertEquals("[G, T, A]", Arrays.toString( + acf.getMappedCodons(aseq1.getDatasetSequence(), 12).get(0))); + assertEquals("[C, T, T]", Arrays.toString( + acf.getMappedCodons(aseq1.getDatasetSequence(), 13).get(0))); } @Test(groups = { "Functional" }) @@ -273,13 +270,13 @@ public class AlignedCodonFrameTest assertTrue(AlignedCodonFrame.couldRealiseSequence(seq1proxy, seq1, 12, 17)); // map to region overlapping sequence is ok - assertTrue(AlignedCodonFrame.couldRealiseSequence(seq1proxy, seq1, 5, - 10)); + assertTrue( + AlignedCodonFrame.couldRealiseSequence(seq1proxy, seq1, 5, 10)); assertTrue(AlignedCodonFrame.couldRealiseSequence(seq1proxy, seq1, 21, 26)); // map to region before sequence is not ok - assertFalse(AlignedCodonFrame.couldRealiseSequence(seq1proxy, seq1, 4, - 9)); + assertFalse( + AlignedCodonFrame.couldRealiseSequence(seq1proxy, seq1, 4, 9)); // map to region after sequence is not ok assertFalse(AlignedCodonFrame.couldRealiseSequence(seq1proxy, seq1, 22, 27)); @@ -312,7 +309,8 @@ public class AlignedCodonFrameTest * a real sequence can't replace a real one */ SequenceI seq1a = new Sequence("Seq1/10-21", "aaacccgggttt"); - assertFalse(AlignedCodonFrame.couldRealiseSequence(seq1, seq1a, 12, 17)); + assertFalse( + AlignedCodonFrame.couldRealiseSequence(seq1, seq1a, 12, 17)); } /** @@ -434,7 +432,8 @@ public class AlignedCodonFrameTest * map Seq1 to all of Seq2 and part of Seq3 */ AlignedCodonFrame acf = new AlignedCodonFrame(); - MapList map = new MapList(new int[] { 1, 12 }, new int[] { 1, 4 }, 3, 1); + MapList map = new MapList(new int[] { 1, 12 }, new int[] { 1, 4 }, 3, + 1); acf.addMap(seq1.getDatasetSequence(), seq2.getDatasetSequence(), map); map = new MapList(new int[] { 1, 12 }, new int[] { 3, 6 }, 3, 1); acf.addMap(seq1.getDatasetSequence(), seq3.getDatasetSequence(), map); @@ -490,8 +489,9 @@ public class AlignedCodonFrameTest aseq1.createDatasetSequence(); AlignedCodonFrame acf = new AlignedCodonFrame(); - MapList map = new MapList(new int[] { 2, 4, 6, 6, 8, 9 }, new int[] { - 1, 2 }, 3, 1); + MapList map = new MapList(new int[] { 2, 4, 6, 6, 8, 9 }, + new int[] + { 1, 2 }, 3, 1); acf.addMap(seq1.getDatasetSequence(), aseq1.getDatasetSequence(), map); assertEquals(1, acf.getMappingsFromSequence(seq1).size()); Mapping before = acf.getMappingsFromSequence(seq1).get(0); @@ -503,7 +503,7 @@ public class AlignedCodonFrameTest assertEquals(1, acf.getMappingsFromSequence(seq1).size()); assertSame(before, acf.getMappingsFromSequence(seq1).get(0)); } - + @Test(groups = { "Functional" }) public void testGetCoveringMapping() { @@ -511,53 +511,52 @@ public class AlignedCodonFrameTest SequenceI cds = new Sequence("cds/7-15", "ATGGCGGAC"); cds.setDatasetSequence(dna); SequenceI pep = new Sequence("pep", "MAD"); - + /* * with null argument or no mappings */ AlignedCodonFrame acf = new AlignedCodonFrame(); - assertNull(acf.getCoveringMapping(null, null)); - assertNull(acf.getCoveringMapping(dna, null)); - assertNull(acf.getCoveringMapping(null, pep)); - assertNull(acf.getCoveringMapping(dna, pep)); + assertNull(acf.getCoveringMapping(null, null)); + assertNull(acf.getCoveringMapping(dna, null)); + assertNull(acf.getCoveringMapping(null, pep)); + assertNull(acf.getCoveringMapping(dna, pep)); /* * with a non-covering mapping e.g. overlapping exon */ - MapList map = new MapList(new int[] { 7, 9 }, new int[] { - 1, 1 }, 3, 1); + MapList map = new MapList(new int[] { 7, 9 }, new int[] { 1, 1 }, 3, 1); acf.addMap(dna, pep, map); - assertNull(acf.getCoveringMapping(dna, pep)); - + assertNull(acf.getCoveringMapping(dna, pep)); + acf = new AlignedCodonFrame(); - MapList map2 = new MapList(new int[] { 13, 18 }, new int[] { - 2, 2 }, 3, 1); + MapList map2 = new MapList(new int[] { 13, 18 }, new int[] { 2, 2 }, 3, + 1); acf.addMap(dna, pep, map2); - assertNull(acf.getCoveringMapping(dna, pep)); - + assertNull(acf.getCoveringMapping(dna, pep)); + /* * with a covering mapping from CDS (dataset) to protein */ acf = new AlignedCodonFrame(); - MapList map3 = new MapList(new int[] { 7, 15 }, new int[] { - 1, 3 }, 3, 1); + MapList map3 = new MapList(new int[] { 7, 15 }, new int[] { 1, 3 }, 3, + 1); acf.addMap(dna, pep, map3); - assertNull(acf.getCoveringMapping(dna, pep)); - SequenceToSequenceMapping mapping = acf.getCoveringMapping(cds, pep); + assertNull(acf.getCoveringMapping(dna, pep)); + SequenceToSequenceMapping mapping = acf.getCoveringMapping(cds, pep); assertNotNull(mapping); - + /* * with a mapping that extends to stop codon */ acf = new AlignedCodonFrame(); - MapList map4 = new MapList(new int[] { 7, 18 }, new int[] { - 1, 3 }, 3, 1); + MapList map4 = new MapList(new int[] { 7, 18 }, new int[] { 1, 3 }, 3, + 1); acf.addMap(dna, pep, map4); - assertNull(acf.getCoveringMapping(dna, pep)); - assertNull(acf.getCoveringMapping(cds, pep)); + assertNull(acf.getCoveringMapping(dna, pep)); + assertNull(acf.getCoveringMapping(cds, pep)); SequenceI cds2 = new Sequence("cds/7-18", "ATGGCGGACtaa"); cds2.setDatasetSequence(dna); - mapping = acf.getCoveringMapping(cds2, pep); + mapping = acf.getCoveringMapping(cds2, pep); assertNotNull(mapping); } @@ -572,12 +571,12 @@ public class AlignedCodonFrameTest dna1.createDatasetSequence(); final Sequence dna2 = new Sequence("Seq2/20-28", "-TA-gG-Gg-CG-a"); dna2.createDatasetSequence(); - + final Sequence pep1 = new Sequence("Seq1/3-4", "-P-R"); pep1.createDatasetSequence(); final Sequence pep2 = new Sequence("Seq2/7-9", "-LY-Q"); pep2.createDatasetSequence(); - + /* * First with no mappings */ @@ -585,24 +584,26 @@ public class AlignedCodonFrameTest SearchResults sr = new SearchResults(); acf.markMappedRegion(dna1, 12, sr); assertTrue(sr.isEmpty()); - + /* * Set up the mappings for the exons (upper-case bases) * Note residue Q is unmapped */ - MapList map1 = new MapList(new int[] { 11, 13, 15, 15, 17, 18 }, new int[] { - 3, 4 }, 3, 1); + MapList map1 = new MapList(new int[] { 11, 13, 15, 15, 17, 18 }, + new int[] + { 3, 4 }, 3, 1); acf.addMap(dna1.getDatasetSequence(), pep1.getDatasetSequence(), map1); - MapList map2 = new MapList(new int[] { 20, 21, 23, 24, 26, 27 }, new int[] { 7, 8 }, - 3, 1); + MapList map2 = new MapList(new int[] { 20, 21, 23, 24, 26, 27 }, + new int[] + { 7, 8 }, 3, 1); acf.addMap(dna2.getDatasetSequence(), pep2.getDatasetSequence(), map2); - + /* * intron bases are not mapped */ acf.markMappedRegion(dna1, 10, sr); assertTrue(sr.isEmpty()); - + /* * Q is not mapped */ @@ -614,7 +615,7 @@ public class AlignedCodonFrameTest */ acf.markMappedRegion(dna1, 11, sr); SearchResults expected = new SearchResults(); - expected.addResult(pep1.getDatasetSequence(), 3, 3); + expected.addResult(pep1.getDatasetSequence(), 3, 3); assertEquals(sr, expected); /* @@ -623,29 +624,30 @@ public class AlignedCodonFrameTest sr = new SearchResults(); acf.markMappedRegion(dna1.getDatasetSequence(), 11, sr); assertEquals(sr, expected); - + /* * marking the same position a second time should not create a duplicate match */ acf.markMappedRegion(dna1.getDatasetSequence(), 12, sr); assertEquals(sr, expected); - + /* * mark exon positions for peptide position (of aligned sequence) */ sr = new SearchResults(); acf.markMappedRegion(pep2, 7, sr); // codon positions 20, 21, 23 expected = new SearchResults(); - expected.addResult(dna2.getDatasetSequence(), 20, 21); - expected.addResult(dna2.getDatasetSequence(), 23, 23); + expected.addResult(dna2.getDatasetSequence(), 20, 21); + expected.addResult(dna2.getDatasetSequence(), 23, 23); assertEquals(sr, expected); - + /* * add another codon to the same SearchResults */ - acf.markMappedRegion(pep1.getDatasetSequence(), 4, sr); // codon positions 15, 17, 18 - expected.addResult(dna1.getDatasetSequence(), 15, 15); - expected.addResult(dna1.getDatasetSequence(), 17, 18); + acf.markMappedRegion(pep1.getDatasetSequence(), 4, sr); // codon positions + // 15, 17, 18 + expected.addResult(dna1.getDatasetSequence(), 15, 15); + expected.addResult(dna1.getDatasetSequence(), 17, 18); assertEquals(sr, expected); } @@ -657,7 +659,7 @@ public class AlignedCodonFrameTest SequenceI cds = new Sequence("cds/1-9", "-A--TGGC-GGAC"); cds.createDatasetSequence(); SequenceI pep = new Sequence("pep/1-3", "MAD"); - + /* * with null argument or no mappings */ @@ -665,36 +667,37 @@ public class AlignedCodonFrameTest assertNull(acf.getCoveringCodonMapping(null)); assertNull(acf.getCoveringCodonMapping(dna)); assertNull(acf.getCoveringCodonMapping(pep)); - + /* * with a non-covering mapping e.g. overlapping exon */ - MapList map = new MapList(new int[] { 16, 18 }, new int[] { - 1, 1 }, 3, 1); + MapList map = new MapList(new int[] { 16, 18 }, new int[] { 1, 1 }, 3, + 1); acf.addMap(dna, pep, map); assertNull(acf.getCoveringCodonMapping(dna)); assertNull(acf.getCoveringCodonMapping(pep)); - + acf = new AlignedCodonFrame(); - MapList map2 = new MapList(new int[] { 13, 18 }, new int[] { - 2, 2 }, 3, 1); + MapList map2 = new MapList(new int[] { 13, 18 }, new int[] { 2, 2 }, 3, + 1); acf.addMap(dna, pep, map2); assertNull(acf.getCoveringCodonMapping(dna)); assertNull(acf.getCoveringCodonMapping(pep)); - + /* * with a covering mapping from CDS (dataset) to protein */ acf = new AlignedCodonFrame(); - MapList map3 = new MapList(new int[] { 1, 9 }, new int[] { - 1, 3 }, 3, 1); + MapList map3 = new MapList(new int[] { 1, 9 }, new int[] { 1, 3 }, 3, + 1); acf.addMap(cds.getDatasetSequence(), pep, map3); assertNull(acf.getCoveringCodonMapping(dna)); SequenceToSequenceMapping mapping = acf.getCoveringCodonMapping(pep); assertNotNull(mapping); - SequenceToSequenceMapping mapping2 = acf.getCoveringCodonMapping(cds.getDatasetSequence()); + SequenceToSequenceMapping mapping2 = acf + .getCoveringCodonMapping(cds.getDatasetSequence()); assertSame(mapping, mapping2); - + /* * with a mapping that extends to stop codon * (EMBL CDS location often includes the stop codon) @@ -703,8 +706,8 @@ public class AlignedCodonFrameTest SequenceI cds2 = new Sequence("cds/1-12", "-A--TGGC-GGACTAA"); cds2.createDatasetSequence(); acf = new AlignedCodonFrame(); - MapList map4 = new MapList(new int[] { 1, 12 }, new int[] { - 1, 3 }, 3, 1); + MapList map4 = new MapList(new int[] { 1, 12 }, new int[] { 1, 3 }, 3, + 1); acf.addMap(cds2, pep, map4); mapping = acf.getCoveringCodonMapping(cds2.getDatasetSequence()); assertNotNull(mapping); diff --git a/test/jalview/datamodel/AlignedCodonIteratorTest.java b/test/jalview/datamodel/AlignedCodonIteratorTest.java index dd3ec7c..af9bbb7 100644 --- a/test/jalview/datamodel/AlignedCodonIteratorTest.java +++ b/test/jalview/datamodel/AlignedCodonIteratorTest.java @@ -58,9 +58,9 @@ public class AlignedCodonIteratorTest from.createDatasetSequence(); SequenceI to = new Sequence("Seq1", "-PQ-R-"); to.createDatasetSequence(); - MapList map = new MapList( - new int[] { 1, 1, 3, 4, 6, 6, 8, 10, 12, 13 }, - new int[] { 1, 3 }, 3, 1); + MapList map = new MapList(new int[] { 1, 1, 3, 4, 6, 6, 8, 10, 12, 13 }, + new int[] + { 1, 3 }, 3, 1); Mapping m = new Mapping(to.getDatasetSequence(), map); Iterator codons = m.getCodonIterator(from, '-'); @@ -86,9 +86,9 @@ public class AlignedCodonIteratorTest from.createDatasetSequence(); SequenceI to = new Sequence("Seq1", "-PQ-TR-"); to.createDatasetSequence(); - MapList map = new MapList( - new int[] { 1, 1, 3, 4, 6, 6, 8, 10, 12, 13 }, new int[] { 1, - 2, 4, 4 }, 3, 1); + MapList map = new MapList(new int[] { 1, 1, 3, 4, 6, 6, 8, 10, 12, 13 }, + new int[] + { 1, 2, 4, 4 }, 3, 1); Mapping m = new Mapping(to.getDatasetSequence(), map); Iterator codons = m.getCodonIterator(from, '-'); @@ -115,7 +115,8 @@ public class AlignedCodonIteratorTest SequenceI to = new Sequence("Seq1", "-PQ-R-"); to.createDatasetSequence(); MapList map = new MapList(new int[] { 1, 1, 3, 4, 6, 6, 8, 8 }, - new int[] { 1, 3 }, 3, 1); + new int[] + { 1, 3 }, 3, 1); Mapping m = new Mapping(to.getDatasetSequence(), map); Iterator codons = m.getCodonIterator(from, '-'); @@ -142,7 +143,8 @@ public class AlignedCodonIteratorTest from.createDatasetSequence(); SequenceI to = new Sequence("Seq1", "CHYQ"); to.createDatasetSequence(); - MapList map = new MapList(new int[] { 1, 12 }, new int[] { 1, 4 }, 3, 1); + MapList map = new MapList(new int[] { 1, 12 }, new int[] { 1, 4 }, 3, + 1); Mapping m = new Mapping(to.getDatasetSequence(), map); Iterator codons = m.getCodonIterator(from, '-'); @@ -171,8 +173,10 @@ public class AlignedCodonIteratorTest from.createDatasetSequence(); SequenceI to = new Sequence("Seq1/10-12", "-PQ-R-"); to.createDatasetSequence(); - MapList map = new MapList(new int[] { 7, 7, 9, 10, 12, 12, 14, 16, 18, - 19 }, new int[] { 10, 12 }, 3, 1); + MapList map = new MapList( + new int[] + { 7, 7, 9, 10, 12, 12, 14, 16, 18, 19 }, new int[] { 10, 12 }, + 3, 1); Mapping m = new Mapping(to.getDatasetSequence(), map); Iterator codons = m.getCodonIterator(from, '-'); diff --git a/test/jalview/datamodel/AlignmentAnnotationTests.java b/test/jalview/datamodel/AlignmentAnnotationTests.java index 19a725e..2f46eca 100644 --- a/test/jalview/datamodel/AlignmentAnnotationTests.java +++ b/test/jalview/datamodel/AlignmentAnnotationTests.java @@ -69,8 +69,8 @@ public class AlignmentAnnotationTests al[i] = new Annotation(new Annotation("" + sq.getCharAt(i), "", (char) 0, sq.findPosition(i))); } - AlignmentAnnotation alan = new AlignmentAnnotation("For " - + sq.getName(), "Fake alignment annot", al); + AlignmentAnnotation alan = new AlignmentAnnotation( + "For " + sq.getName(), "Fake alignment annot", al); // create a sequence mapping for the annotation vector in its current state alan.createSequenceMapping(sq, sq.getStart(), false); alan.setProperty("CreatedBy", "createAnnotation"); @@ -93,9 +93,11 @@ public class AlignmentAnnotationTests { if (ala.annotations[p] != null) { - assertEquals("Mismatch at position " + p - + " between annotation position value and sequence" - + ala.annotations[p], (int) ala.annotations[p].value, + assertEquals( + "Mismatch at position " + p + + " between annotation position value and sequence" + + ala.annotations[p], + (int) ala.annotations[p].value, ala.sequenceRef.findPosition(p)); } } @@ -130,10 +132,9 @@ public class AlignmentAnnotationTests alSeq2.setStart(sqTo.getStart() + align.getSeq2Start() - 1); alSeq2.setEnd(sqTo.getStart() + align.getSeq2End() - 1); alSeq2.setDatasetSequence(sqTo); - System.out.println(new AppletFormatAdapter() -.formatSequences( - FileFormat.Stockholm, new Alignment(new SequenceI[] { sqFrom, - alSeq1, sqTo, alSeq2 }), true)); + System.out.println(new AppletFormatAdapter().formatSequences( + FileFormat.Stockholm, new Alignment(new SequenceI[] + { sqFrom, alSeq1, sqTo, alSeq2 }), true)); Mapping mp = align.getMappingFromS1(false); @@ -156,9 +157,8 @@ public class AlignmentAnnotationTests AlignmentI all = new Alignment(new SequenceI[] { alSeq1, alSeq2 }); all.addAnnotation(almap1); all.addAnnotation(almap2); - System.out.println(new AppletFormatAdapter().formatSequences( - FileFormat.Stockholm, - all, true)); + System.out.println(new AppletFormatAdapter() + .formatSequences(FileFormat.Stockholm, all, true)); for (int p = 0; p < alSeq1.getLength(); p++) { @@ -181,12 +181,12 @@ public class AlignmentAnnotationTests "Mismatch on Original To and transferred annotation on 1", (orig1 != null) ? orig1.toString() : null, (trans1 != null) ? trans1.toString() : null); - String alm1 = "" - + (almap1.annotations.length > p ? almap1.annotations[p].displayCharacter - : "Out of range"); - String alm2 = "" - + (almap2.annotations.length > p ? almap2.annotations[p].displayCharacter - : "Out of range"); + String alm1 = "" + (almap1.annotations.length > p + ? almap1.annotations[p].displayCharacter + : "Out of range"); + String alm2 = "" + (almap2.annotations.length > p + ? almap2.annotations[p].displayCharacter + : "Out of range"); assertEquals("Position " + p + " " + alm1 + " " + alm2, alm1, alm2); } } @@ -317,21 +317,24 @@ public class AlignmentAnnotationTests Assert.assertFalse(ann.isQuantitative(), "Empty annotation set should not be quantitative."); - ann = new AlignmentAnnotation("an", "some an", new Annotation[] { - newAnnotation("4"), newAnnotation("1"), newAnnotation("1"), - newAnnotation("0.1"), newAnnotation("0.3") }); + ann = new AlignmentAnnotation("an", "some an", + new Annotation[] + { newAnnotation("4"), newAnnotation("1"), newAnnotation("1"), + newAnnotation("0.1"), newAnnotation("0.3") }); Assert.assertTrue(ann.isQuantitative(), "All numbers annotation set should be quantitative."); - ann = new AlignmentAnnotation("an", "some an", new Annotation[] { - newAnnotation("E"), newAnnotation("E"), newAnnotation("E"), - newAnnotation("E"), newAnnotation("E") }); + ann = new AlignmentAnnotation("an", "some an", + new Annotation[] + { newAnnotation("E"), newAnnotation("E"), newAnnotation("E"), + newAnnotation("E"), newAnnotation("E") }); Assert.assertFalse(ann.isQuantitative(), "All 'E' annotation set should not be quantitative."); - ann = new AlignmentAnnotation("an", "some an", new Annotation[] { - newAnnotation("E"), newAnnotation("1"), newAnnotation("2"), - newAnnotation("3"), newAnnotation("E") }); + ann = new AlignmentAnnotation("an", "some an", + new Annotation[] + { newAnnotation("E"), newAnnotation("1"), newAnnotation("2"), + newAnnotation("3"), newAnnotation("E") }); Assert.assertTrue(ann.isQuantitative(), "Mixed 'E' annotation set should be quantitative."); } diff --git a/test/jalview/datamodel/AlignmentTest.java b/test/jalview/datamodel/AlignmentTest.java index 14e74e4..d00abb1 100644 --- a/test/jalview/datamodel/AlignmentTest.java +++ b/test/jalview/datamodel/AlignmentTest.java @@ -193,8 +193,8 @@ public class AlignmentTest return false; } } - return verifyAlignmentDatasetRefs(alignment.getDataset(), - raiseAssert, message); + return verifyAlignmentDatasetRefs(alignment.getDataset(), raiseAssert, + message); } else { @@ -247,9 +247,8 @@ public class AlignmentTest { if (raiseAssert) { - Assert.fail(message - + " DBRefEntry " + dbr + " for sequence " - + seqds + Assert.fail(message + " DBRefEntry " + dbr + + " for sequence " + seqds + " in alignment has map to sequence not in dataset"); } return false; @@ -335,7 +334,8 @@ public class AlignmentTest ae.printStackTrace(); Assert.fail( "Valid test alignment raised assertion errors when raiseAsserts enabled: " - + msg, ae); + + msg, + ae); } // also check validation passes with asserts disabled Assert.assertTrue(verifyAlignmentDatasetRefs(al, false, null), @@ -355,8 +355,9 @@ public class AlignmentTest } if (!assertRaised) { - Assert.fail("Invalid test alignment passed when raiseAsserts enabled:" - + msg); + Assert.fail( + "Invalid test alignment passed when raiseAsserts enabled:" + + msg); } // also check validation passes with asserts disabled Assert.assertFalse(verifyAlignmentDatasetRefs(al, false, null), @@ -368,8 +369,8 @@ public class AlignmentTest @Test(groups = { "Functional" }) public void testVerifyAlignmentDatasetRefs() { - SequenceI sq1 = new Sequence("sq1", "ASFDD"), sq2 = new Sequence("sq2", - "TTTTTT"); + SequenceI sq1 = new Sequence("sq1", "ASFDD"), + sq2 = new Sequence("sq2", "TTTTTT"); // construct simple valid alignment dataset Alignment al = new Alignment(new SequenceI[] { sq1, sq2 }); @@ -382,9 +383,7 @@ public class AlignmentTest "didn't detect dataset sequence with a dataset sequence reference."); sq1.setDatasetSequence(null); - assertVerifyAlignment( - al, - true, + assertVerifyAlignment(al, true, "didn't reinstate validity after nulling dataset sequence dataset reference"); // now create dataset and check again @@ -396,27 +395,27 @@ public class AlignmentTest // create a dbref on sq1 with a sequence ref to sq2 DBRefEntry dbrs1tos2 = new DBRefEntry("UNIPROT", "1", "Q111111"); - dbrs1tos2.setMap(new Mapping(sq2.getDatasetSequence(), - new int[] { 1, 5 }, new int[] { 2, 6 }, 1, 1)); + dbrs1tos2 + .setMap(new Mapping(sq2.getDatasetSequence(), new int[] + { 1, 5 }, new int[] { 2, 6 }, 1, 1)); sq1.getDatasetSequence().addDBRef(dbrs1tos2); assertVerifyAlignment(al, true, "verify failed after addition of valid DBRefEntry/map"); // now create a dbref on a new sequence which maps to another sequence // outside of the dataset - SequenceI sqout = new Sequence("sqout", "ututututucagcagcag"), sqnew = new Sequence( - "sqnew", "EEERRR"); + SequenceI sqout = new Sequence("sqout", "ututututucagcagcag"), + sqnew = new Sequence("sqnew", "EEERRR"); DBRefEntry sqnewsqout = new DBRefEntry("ENAFOO", "1", "R000001"); - sqnewsqout.setMap(new Mapping(sqout, new int[] { 1, 6 }, new int[] { 1, - 18 }, 1, 3)); + sqnewsqout + .setMap(new Mapping(sqout, new int[] + { 1, 6 }, new int[] { 1, 18 }, 1, 3)); al.getDataset().addSequence(sqnew); assertVerifyAlignment(al, true, "verify failed after addition of new sequence to dataset"); // now start checking exception conditions sqnew.addDBRef(sqnewsqout); - assertVerifyAlignment( - al, - false, + assertVerifyAlignment(al, false, "verify passed when a dbref with map to sequence outside of dataset was added"); // make the verify pass by adding the outsider back in al.getDataset().addSequence(sqout); @@ -427,21 +426,18 @@ public class AlignmentTest "aggtutaggcagcagcag"); AlignedCodonFrame alc = new AlignedCodonFrame(); - alc.addMap(sqanotherout, sqnew, new MapList(new int[] { 1, 6 }, - new int[] { 1, 18 }, 3, 1)); + alc.addMap(sqanotherout, sqnew, + new MapList(new int[] + { 1, 6 }, new int[] { 1, 18 }, 3, 1)); al.addCodonFrame(alc); Assert.assertEquals(al.getDataset().getCodonFrames().size(), 1); - assertVerifyAlignment( - al, - false, + assertVerifyAlignment(al, false, "verify passed when alCodonFrame mapping to sequence outside of dataset was added"); // make the verify pass by adding the outsider back in al.getDataset().addSequence(sqanotherout); - assertVerifyAlignment( - al, - true, + assertVerifyAlignment(al, true, "verify should have passed once all sequences involved in alCodonFrame were added to dataset"); al.getDataset().addSequence(sqanotherout); assertVerifyAlignment(al, false, @@ -470,7 +466,8 @@ public class AlignmentTest * @param message * - null or message prepended to exception message. */ - public static void assertDatasetIsNormalised(AlignmentI al, String message) + public static void assertDatasetIsNormalised(AlignmentI al, + String message) { if (al.getDataset() != null) { @@ -535,7 +532,8 @@ public class AlignmentTest assertDatasetIsNormalised(al); } catch (AssertionError ae) { - Assert.fail("Two different sequences should be valid normalised dataset."); + Assert.fail( + "Two different sequences should be valid normalised dataset."); } /* * now change sq2's name in the alignment. should still be valid @@ -546,7 +544,8 @@ public class AlignmentTest assertDatasetIsNormalised(al); } catch (AssertionError ae) { - Assert.fail("Two different sequences in dataset, but same name in alignment, should be valid normalised dataset."); + Assert.fail( + "Two different sequences in dataset, but same name in alignment, should be valid normalised dataset."); } al.addSequence(sq1seqd); @@ -555,7 +554,8 @@ public class AlignmentTest assertDatasetIsNormalised(al); } catch (AssertionError ae) { - Assert.fail("sq1 and sq1 with different sequence should be distinct."); + Assert.fail( + "sq1 and sq1 with different sequence should be distinct."); } al.addSequence(sq1shift); @@ -564,7 +564,8 @@ public class AlignmentTest assertDatasetIsNormalised(al); } catch (AssertionError ae) { - Assert.fail("sq1 and sq1 with different start/end should be distinct."); + Assert.fail( + "sq1 and sq1 with different start/end should be distinct."); } /* * finally, the failure case @@ -747,10 +748,10 @@ public class AlignmentTest makeMappings(al1, al2); ((Alignment) al2).alignAs(al1, false, true); - assertEquals("GC-TC--GUC-GTACT", al2.getSequenceAt(0) - .getSequenceAsString()); - assertEquals("-GG-GTC--AGG--CAGT", al2.getSequenceAt(1) - .getSequenceAsString()); + assertEquals("GC-TC--GUC-GTACT", + al2.getSequenceAt(0).getSequenceAsString()); + assertEquals("-GG-GTC--AGG--CAGT", + al2.getSequenceAt(1).getSequenceAsString()); } /** @@ -794,10 +795,10 @@ public class AlignmentTest * Realign DNA; currently keeping existing gaps in introns only */ ((Alignment) al1).alignAs(al2, false, true); - assertEquals("ACG---GCUCCA------ACT---", al1.getSequenceAt(0) - .getSequenceAsString()); - assertEquals("---CGT---TAACGA---AGT---", al1.getSequenceAt(1) - .getSequenceAsString()); + assertEquals("ACG---GCUCCA------ACT---", + al1.getSequenceAt(0).getSequenceAsString()); + assertEquals("---CGT---TAACGA---AGT---", + al1.getSequenceAt(1).getSequenceAsString()); } /** @@ -871,9 +872,11 @@ public class AlignmentTest { SequenceI seqFrom = alFrom.getSequenceAt(i); SequenceI seqTo = alTo.getSequenceAt(i); - MapList ml = new MapList(new int[] { seqFrom.getStart(), - seqFrom.getEnd() }, - new int[] { seqTo.getStart(), seqTo.getEnd() }, ratio, 1); + MapList ml = new MapList( + new int[] + { seqFrom.getStart(), seqFrom.getEnd() }, + new int[] + { seqTo.getStart(), seqTo.getEnd() }, ratio, 1); acf.addMap(seqFrom, seqTo, ml); } @@ -900,18 +903,21 @@ public class AlignmentTest */ String dna1 = "A-Aa-gG-GCC-cT-TT"; String dna2 = "c--CCGgg-TT--T-AA-A"; - AlignmentI al1 = loadAlignment(">Dna1/6-17\n" + dna1 - + "\n>Dna2/20-31\n" + dna2 + "\n", FileFormat.Fasta); + AlignmentI al1 = loadAlignment( + ">Dna1/6-17\n" + dna1 + "\n>Dna2/20-31\n" + dna2 + "\n", + FileFormat.Fasta); AlignmentI al2 = loadAlignment( ">Pep1/7-9\n-P--YK\n>Pep2/11-13\nG-T--F\n", FileFormat.Fasta); AlignedCodonFrame acf = new AlignedCodonFrame(); // Seq1 has intron at dna positions 3,4,9 so splice is AAG GCC TTT // Seq2 has intron at dna positions 1,5,6 so splice is CCG TTT AAA - MapList ml1 = new MapList(new int[] { 6, 7, 10, 13, 15, 17 }, new int[] - { 7, 9 }, 3, 1); + MapList ml1 = new MapList(new int[] { 6, 7, 10, 13, 15, 17 }, + new int[] + { 7, 9 }, 3, 1); acf.addMap(al1.getSequenceAt(0), al2.getSequenceAt(0), ml1); - MapList ml2 = new MapList(new int[] { 21, 23, 26, 31 }, new int[] { 11, - 13 }, 3, 1); + MapList ml2 = new MapList(new int[] { 21, 23, 26, 31 }, + new int[] + { 11, 13 }, 3, 1); acf.addMap(al1.getSequenceAt(1), al2.getSequenceAt(1), ml2); al2.addCodonFrame(acf); @@ -919,11 +925,11 @@ public class AlignmentTest * Align ignoring gaps in dna introns and exons */ ((Alignment) al1).alignAs(al2, false, false); - assertEquals("---AAagG------GCCcTTT", al1.getSequenceAt(0) - .getSequenceAsString()); + assertEquals("---AAagG------GCCcTTT", + al1.getSequenceAt(0).getSequenceAsString()); // note 1 gap in protein corresponds to 'gg-' in DNA (3 positions) - assertEquals("cCCGgg-TTT------AAA", al1.getSequenceAt(1) - .getSequenceAsString()); + assertEquals("cCCGgg-TTT------AAA", + al1.getSequenceAt(1).getSequenceAsString()); /* * Reset and realign, preserving gaps in dna introns and exons @@ -934,10 +940,10 @@ public class AlignmentTest // String dna1 = "A-Aa-gG-GCC-cT-TT"; // String dna2 = "c--CCGgg-TT--T-AA-A"; // assumption: we include 'the greater of' protein/dna gap lengths, not both - assertEquals("---A-Aa-gG------GCC-cT-TT", al1.getSequenceAt(0) - .getSequenceAsString()); - assertEquals("c--CCGgg-TT--T------AA-A", al1.getSequenceAt(1) - .getSequenceAsString()); + assertEquals("---A-Aa-gG------GCC-cT-TT", + al1.getSequenceAt(0).getSequenceAsString()); + assertEquals("c--CCGgg-TT--T------AA-A", + al1.getSequenceAt(1).getSequenceAsString()); } @Test(groups = "Functional") @@ -947,8 +953,9 @@ public class AlignmentTest // create sequence and alignment datasets protein.setDataset(null); AlignedCodonFrame acf = new AlignedCodonFrame(); - List acfList = Arrays.asList(new AlignedCodonFrame[] - { acf }); + List acfList = Arrays + .asList(new AlignedCodonFrame[] + { acf }); protein.getDataset().setCodonFrames(acfList); AlignmentI copy = new Alignment(protein); @@ -957,10 +964,10 @@ public class AlignmentTest */ assertFalse(copy.getSequenceAt(0) == protein.getSequenceAt(0)); assertFalse(copy.getSequenceAt(1) == protein.getSequenceAt(1)); - assertSame(copy.getSequenceAt(0).getDatasetSequence(), protein - .getSequenceAt(0).getDatasetSequence()); - assertSame(copy.getSequenceAt(1).getDatasetSequence(), protein - .getSequenceAt(1).getDatasetSequence()); + assertSame(copy.getSequenceAt(0).getDatasetSequence(), + protein.getSequenceAt(0).getDatasetSequence()); + assertSame(copy.getSequenceAt(1).getDatasetSequence(), + protein.getSequenceAt(1).getDatasetSequence()); // TODO should the copy constructor copy the dataset? // or make a new one referring to the same dataset sequences?? @@ -1010,10 +1017,10 @@ public class AlignmentTest // side-effect: dataset created on second sequence assertNotNull(protein.getSequenceAt(1).getDatasetSequence()); // dataset alignment has references to dataset sequences - assertEquals(ds.getSequenceAt(0), protein.getSequenceAt(0) - .getDatasetSequence()); - assertEquals(ds.getSequenceAt(1), protein.getSequenceAt(1) - .getDatasetSequence()); + assertEquals(ds.getSequenceAt(0), + protein.getSequenceAt(0).getDatasetSequence()); + assertEquals(ds.getSequenceAt(1), + protein.getSequenceAt(1).getDatasetSequence()); // codon frames should have been moved to the dataset // getCodonFrames() should delegate to the dataset: @@ -1036,19 +1043,22 @@ public class AlignmentTest // cross-references to two more sequences. DBRefEntry dbr = new DBRefEntry("SQ1", "", "sq3"); SequenceI sq3 = new Sequence("sq3", "VWANG"); - dbr.setMap(new Mapping(sq3, new MapList(new int[] { 1, 4 }, new int[] { - 2, 5 }, 1, 1))); + dbr.setMap( + new Mapping(sq3, new MapList(new int[] + { 1, 4 }, new int[] { 2, 5 }, 1, 1))); sq1.addDBRef(dbr); SequenceI sq4 = new Sequence("sq4", "ERKWI"); DBRefEntry dbr2 = new DBRefEntry("SQ2", "", "sq4"); - dbr2.setMap(new Mapping(sq4, new MapList(new int[] { 1, 4 }, new int[] { - 2, 5 }, 1, 1))); + dbr2.setMap( + new Mapping(sq4, new MapList(new int[] + { 1, 4 }, new int[] { 2, 5 }, 1, 1))); sq2.addDBRef(dbr2); // and a 1:1 codonframe mapping between them. AlignedCodonFrame alc = new AlignedCodonFrame(); - alc.addMap(sq1, sq2, new MapList(new int[] { 1, 4 }, - new int[] { 1, 4 }, 1, 1)); + alc.addMap(sq1, sq2, + new MapList(new int[] + { 1, 4 }, new int[] { 1, 4 }, 1, 1)); AlignmentI protein = new Alignment(new SequenceI[] { sq1, sq2 }); @@ -1111,7 +1121,8 @@ public class AlignmentTest Assert.assertEquals(align.getDataset().getHeight(), 1, "Dataset shouldn't have more than one sequence."); - Sequence seq2 = new Sequence("newtestSeq", "ABCDEFGHIJKLMNOPQRSTUVWXYZ"); + Sequence seq2 = new Sequence("newtestSeq", + "ABCDEFGHIJKLMNOPQRSTUVWXYZ"); align.addSequence(seq2); Assert.assertEquals(align.getDataset().getHeight(), 2, "Dataset should now have two sequences."); @@ -1133,26 +1144,30 @@ public class AlignmentTest // add dbref from dna to peptide DBRefEntry dbr = new DBRefEntry("UNIPROT", "", "pep"); - dbr.setMap(new Mapping(pep, new MapList(new int[] { 4, 15 }, new int[] { - 1, 4 }, 3, 1))); + dbr.setMap( + new Mapping(pep, new MapList(new int[] + { 4, 15 }, new int[] { 1, 4 }, 3, 1))); dna.addDBRef(dbr); // add dbref from dna to peptide DBRefEntry dbr2 = new DBRefEntry("UNIPROT", "", "pep"); - dbr2.setMap(new Mapping(pep, new MapList(new int[] { 1, 12 }, new int[] - { 1, 4 }, 3, 1))); + dbr2.setMap( + new Mapping(pep, new MapList(new int[] + { 1, 12 }, new int[] { 1, 4 }, 3, 1))); cds.addDBRef(dbr2); // add dbref from peptide to dna DBRefEntry dbr3 = new DBRefEntry("EMBL", "", "dna"); - dbr3.setMap(new Mapping(dna, new MapList(new int[] { 1, 4 }, new int[] { - 4, 15 }, 1, 3))); + dbr3.setMap( + new Mapping(dna, new MapList(new int[] + { 1, 4 }, new int[] { 4, 15 }, 1, 3))); pep.addDBRef(dbr3); // add dbref from peptide to cds DBRefEntry dbr4 = new DBRefEntry("EMBLCDS", "", "cds"); - dbr4.setMap(new Mapping(cds, new MapList(new int[] { 1, 4 }, new int[] { - 1, 12 }, 1, 3))); + dbr4.setMap( + new Mapping(cds, new MapList(new int[] + { 1, 4 }, new int[] { 1, 12 }, 1, 3))); pep.addDBRef(dbr4); AlignmentI protein = new Alignment(new SequenceI[] { pep }); @@ -1307,7 +1322,8 @@ public class AlignmentTest @Test( groups = "Functional", - expectedExceptions = { IllegalArgumentException.class }) + expectedExceptions = + { IllegalArgumentException.class }) public void testSetDataset_selfReference() { SequenceI seq = new Sequence("a", "a"); @@ -1329,8 +1345,8 @@ public class AlignmentTest assertEquals('-', alignment.getGapCharacter()); assertSame(seq, alignment.getSequenceAt(0)); - assertEquals("KP--L-FQII-", alignment.getSequenceAt(1) - .getSequenceAsString()); + assertEquals("KP--L-FQII-", + alignment.getSequenceAt(1).getSequenceAsString()); // todo test coverage for annotations, mappings, groups, // hidden sequences, properties diff --git a/test/jalview/datamodel/AllColsIteratorTest.java b/test/jalview/datamodel/AllColsIteratorTest.java index 0dfcc21..3394794 100644 --- a/test/jalview/datamodel/AllColsIteratorTest.java +++ b/test/jalview/datamodel/AllColsIteratorTest.java @@ -30,14 +30,13 @@ import org.testng.annotations.Test; public class AllColsIteratorTest { HiddenColumns hiddenCols; - + @BeforeClass(alwaysRun = true) public void setup() { hiddenCols = new HiddenColumns(); hiddenCols.hideColumns(2, 4); } - /* * Test iterator iterates through collection correctly @@ -59,8 +58,10 @@ public class AllColsIteratorTest * Test iterator throws NoSuchElementException at end of iteration */ @Test( - groups = { "Functional" }, - expectedExceptions = { NoSuchElementException.class }) + groups = + { "Functional" }, + expectedExceptions = + { NoSuchElementException.class }) public void testLastNext() throws NoSuchElementException { AllColsIterator it = new AllColsIterator(0, 3, hiddenCols); @@ -75,8 +76,10 @@ public class AllColsIteratorTest * Test iterator throws UnsupportedOperationException on call to remove */ @Test( - groups = { "Functional" }, - expectedExceptions = { UnsupportedOperationException.class }) + groups = + { "Functional" }, + expectedExceptions = + { UnsupportedOperationException.class }) public void testRemove() throws UnsupportedOperationException { AllColsIterator it = new AllColsIterator(0, 3, hiddenCols); diff --git a/test/jalview/datamodel/AllRowsIteratorTest.java b/test/jalview/datamodel/AllRowsIteratorTest.java index 90ed891..9f4c65b 100644 --- a/test/jalview/datamodel/AllRowsIteratorTest.java +++ b/test/jalview/datamodel/AllRowsIteratorTest.java @@ -69,8 +69,10 @@ public class AllRowsIteratorTest * Test iterator throws NoSuchElementException at end of iteration */ @Test( - groups = { "Functional" }, - expectedExceptions = { NoSuchElementException.class }) + groups = + { "Functional" }, + expectedExceptions = + { NoSuchElementException.class }) public void testLastNext() throws NoSuchElementException { AllRowsIterator it = new AllRowsIterator(0, 3, al); @@ -85,15 +87,16 @@ public class AllRowsIteratorTest * Test iterator throws UnsupportedOperationException on call to remove */ @Test( - groups = { "Functional" }, - expectedExceptions = { UnsupportedOperationException.class }) + groups = + { "Functional" }, + expectedExceptions = + { UnsupportedOperationException.class }) public void testRemove() throws UnsupportedOperationException { AllRowsIterator it = new AllRowsIterator(0, 3, al); it.remove(); } - /* * Hide sequences between start and end */ diff --git a/test/jalview/datamodel/ColumnSelectionTest.java b/test/jalview/datamodel/ColumnSelectionTest.java index aefcbc0..d581345 100644 --- a/test/jalview/datamodel/ColumnSelectionTest.java +++ b/test/jalview/datamodel/ColumnSelectionTest.java @@ -411,7 +411,8 @@ public class ColumnSelectionTest */ @Test( groups = "Functional", - expectedExceptions = { ConcurrentModificationException.class }) + expectedExceptions = + { ConcurrentModificationException.class }) public void testGetSelected_concurrentModification() { ColumnSelection cs = new ColumnSelection(); @@ -538,7 +539,6 @@ public class ColumnSelectionTest assertEquals("[3, 1]", cs2.getSelected().toString()); } - @Test(groups = { "Functional" }) public void testStretchGroup_expand() { @@ -652,8 +652,7 @@ public class ColumnSelectionTest Annotation ann4 = new Annotation("x", "desc", 'Y', 3f); added = cs .filterAnnotations(new Annotation[] - { null, helix, sheet, turn, ann4 }, - filter); + { null, helix, sheet, turn, ann4 }, filter); assertEquals(1, added); assertTrue(cs.contains(1)); diff --git a/test/jalview/datamodel/DBRefEntryTest.java b/test/jalview/datamodel/DBRefEntryTest.java index e95a8b5..476e0bb 100644 --- a/test/jalview/datamodel/DBRefEntryTest.java +++ b/test/jalview/datamodel/DBRefEntryTest.java @@ -62,12 +62,14 @@ public class DBRefEntryTest assertFalse(ref1.equalRef(new DBRefEntry("UNIPROT", "1", "V71632"))); // presence of or differences in mappings are ignored - ref1.setMap(new Mapping(new MapList(new int[] { 1, 3 }, new int[] { 1, - 1 }, 3, 1))); + ref1.setMap( + new Mapping(new MapList(new int[] + { 1, 3 }, new int[] { 1, 1 }, 3, 1))); assertTrue(ref1.equalRef(ref2)); assertTrue(ref2.equalRef(ref1)); - ref1.setMap(new Mapping(new MapList(new int[] { 1, 6 }, new int[] { 1, - 2 }, 3, 1))); + ref1.setMap( + new Mapping(new MapList(new int[] + { 1, 6 }, new int[] { 1, 2 }, 3, 1))); assertTrue(ref1.equalRef(ref2)); assertTrue(ref2.equalRef(ref1)); } @@ -94,8 +96,9 @@ public class DBRefEntryTest /* * ref1 has no mapping, acquires mapping from ref2 */ - Mapping map = new Mapping(new MapList(new int[] { 1, 3 }, new int[] { - 1, 1 }, 3, 1)); + Mapping map = new Mapping( + new MapList(new int[] + { 1, 3 }, new int[] { 1, 1 }, 3, 1)); ref2.setMap(map); assertTrue(ref1.updateFrom(ref2)); assertSame(map, ref1.getMap()); // null mapping updated @@ -172,29 +175,33 @@ public class DBRefEntryTest /* * 1:1 mapping - ok */ - dbr.setMap(new Mapping(null, new int[] { 1, 3 }, new int[] { 1, 3 }, 1, - 1)); + dbr.setMap( + new Mapping(null, new int[] + { 1, 3 }, new int[] { 1, 3 }, 1, 1)); assertTrue(dbr.isPrimaryCandidate()); /* * 1:1 mapping of identical split ranges - not ok */ - dbr.setMap(new Mapping(null, new int[] { 1, 3, 6, 9 }, new int[] { 1, - 3, 6, 9 }, 1, 1)); + dbr.setMap( + new Mapping(null, new int[] + { 1, 3, 6, 9 }, new int[] { 1, 3, 6, 9 }, 1, 1)); assertFalse(dbr.isPrimaryCandidate()); /* * 1:1 mapping of different ranges - not ok */ - dbr.setMap(new Mapping(null, new int[] { 1, 4 }, new int[] { 2, 5 }, 1, - 1)); + dbr.setMap( + new Mapping(null, new int[] + { 1, 4 }, new int[] { 2, 5 }, 1, 1)); assertFalse(dbr.isPrimaryCandidate()); /* * 1:1 mapping of 'isoform' ranges - not ok */ - dbr.setMap(new Mapping(null, new int[] { 1, 2, 6, 9 }, new int[] { 1, - 3, 7, 9 }, 1, 1)); + dbr.setMap( + new Mapping(null, new int[] + { 1, 2, 6, 9 }, new int[] { 1, 3, 7, 9 }, 1, 1)); assertFalse(dbr.isPrimaryCandidate()); dbr.setMap(null); assertTrue(dbr.isPrimaryCandidate()); @@ -222,22 +229,25 @@ public class DBRefEntryTest /* * 1:1 mapping and sequenceRef (fail) */ - dbr.setMap(new Mapping(new Sequence("foo", "ASDF"), new int[] { 1, 3 }, - new int[] { 1, 3 }, 1, 1)); + dbr.setMap( + new Mapping(new Sequence("foo", "ASDF"), new int[] + { 1, 3 }, new int[] { 1, 3 }, 1, 1)); assertFalse(dbr.isPrimaryCandidate()); /* * 1:3 mapping (fail) */ - dbr.setMap(new Mapping(null, new int[] { 1, 3 }, new int[] { 1, 3 }, 1, - 3)); + dbr.setMap( + new Mapping(null, new int[] + { 1, 3 }, new int[] { 1, 3 }, 1, 3)); assertFalse(dbr.isPrimaryCandidate()); /* * 2:2 mapping with shift (expected fail, but maybe use case for a pass) */ - dbr.setMap(new Mapping(null, new int[] { 1, 4 }, new int[] { 1, 4 }, 2, - 2)); + dbr.setMap( + new Mapping(null, new int[] + { 1, 4 }, new int[] { 1, 4 }, 2, 2)); assertFalse(dbr.isPrimaryCandidate()); } } diff --git a/test/jalview/datamodel/HiddenColumnsCursorTest.java b/test/jalview/datamodel/HiddenColumnsCursorTest.java index 97402b8..cfd2814 100644 --- a/test/jalview/datamodel/HiddenColumnsCursorTest.java +++ b/test/jalview/datamodel/HiddenColumnsCursorTest.java @@ -62,17 +62,18 @@ public class HiddenColumnsCursorTest public void testFindRegionForColumn() { HiddenColumnsCursor cursor = new HiddenColumnsCursor(); - + HiddenCursorPosition pos = cursor.findRegionForColumn(20, false); assertNull(pos); - + List hidden = new ArrayList<>(); hidden.add(new int[] { 53, 76 }); hidden.add(new int[] { 104, 125 }); cursor = new HiddenColumnsCursor(hidden); - int regionIndex = cursor.findRegionForColumn(126, false).getRegionIndex(); + int regionIndex = cursor.findRegionForColumn(126, false) + .getRegionIndex(); assertEquals(2, regionIndex); regionIndex = cursor.findRegionForColumn(125, false).getRegionIndex(); diff --git a/test/jalview/datamodel/HiddenColumnsTest.java b/test/jalview/datamodel/HiddenColumnsTest.java index 2916199..abde7c6 100644 --- a/test/jalview/datamodel/HiddenColumnsTest.java +++ b/test/jalview/datamodel/HiddenColumnsTest.java @@ -216,18 +216,15 @@ public class HiddenColumnsTest cs.hideColumns(10, 11); cs.hideColumns(5, 7); Iterator regions = cs.iterator(); - assertEquals("[5, 7]", - Arrays.toString(regions.next())); + assertEquals("[5, 7]", Arrays.toString(regions.next())); HiddenColumns cs2 = new HiddenColumns(cs); regions = cs2.iterator(); assertTrue(cs2.hasHiddenColumns()); assertEquals(2, cs2.getNumberOfRegions()); // hidden columns are held in column order - assertEquals("[5, 7]", - Arrays.toString(regions.next())); - assertEquals("[10, 11]", - Arrays.toString(regions.next())); + assertEquals("[5, 7]", Arrays.toString(regions.next())); + assertEquals("[10, 11]", Arrays.toString(regions.next())); } @Test(groups = "Functional") @@ -242,8 +239,7 @@ public class HiddenColumnsTest Iterator regions = cs2.iterator(); // only [5,7] returned, offset by 1 - assertEquals("[4, 6]", - Arrays.toString(regions.next())); + assertEquals("[4, 6]", Arrays.toString(regions.next())); assertEquals(3, cs2.getSize()); cs2 = new HiddenColumns(cs, 8, 15, 4); @@ -251,15 +247,13 @@ public class HiddenColumnsTest assertTrue(cs2.hasHiddenColumns()); // only [10,11] returned, offset by 4 - assertEquals("[6, 7]", - Arrays.toString(regions.next())); + assertEquals("[6, 7]", Arrays.toString(regions.next())); assertEquals(2, cs2.getSize()); cs2 = new HiddenColumns(cs, 6, 10, 4); assertFalse(cs2.hasHiddenColumns()); } - @Test(groups = { "Functional" }) public void testHideColumns() { @@ -307,26 +301,22 @@ public class HiddenColumnsTest cs.hideColumns(4, 5); regions = cs.iterator(); assertEquals(1, cs.getNumberOfRegions()); - assertEquals("[3, 6]", - Arrays.toString(regions.next())); + assertEquals("[3, 6]", Arrays.toString(regions.next())); assertEquals(cs.getSize(), 4); cs.hideColumns(3, 5); regions = cs.iterator(); assertEquals(1, cs.getNumberOfRegions()); - assertEquals("[3, 6]", - Arrays.toString(regions.next())); + assertEquals("[3, 6]", Arrays.toString(regions.next())); assertEquals(cs.getSize(), 4); cs.hideColumns(4, 6); regions = cs.iterator(); assertEquals(1, cs.getNumberOfRegions()); - assertEquals("[3, 6]", - Arrays.toString(regions.next())); + assertEquals("[3, 6]", Arrays.toString(regions.next())); assertEquals(cs.getSize(), 4); cs.hideColumns(3, 6); regions = cs.iterator(); assertEquals(1, cs.getNumberOfRegions()); - assertEquals("[3, 6]", - Arrays.toString(regions.next())); + assertEquals("[3, 6]", Arrays.toString(regions.next())); assertEquals(cs.getSize(), 4); cs.revealAllHiddenColumns(colsel); diff --git a/test/jalview/datamodel/MappedFeaturesTest.java b/test/jalview/datamodel/MappedFeaturesTest.java index de4ce6c..d4a49c6 100644 --- a/test/jalview/datamodel/MappedFeaturesTest.java +++ b/test/jalview/datamodel/MappedFeaturesTest.java @@ -34,8 +34,8 @@ public class MappedFeaturesTest * T>C at dna13, consequence CGT>CGC synonymous */ List features = new ArrayList<>(); - SequenceFeature sf1 = new SequenceFeature("sequence_variant", "C,T", - 11, 11, null); + SequenceFeature sf1 = new SequenceFeature("sequence_variant", "C,T", 11, + 11, null); sf1.setValue("alleles", "C,T"); features.add(sf1); SequenceFeature sf2 = new SequenceFeature("sequence_variant", "T,C", 13, @@ -46,8 +46,7 @@ public class MappedFeaturesTest /* * missense variant in first codon */ - MappedFeatures mf = new MappedFeatures(mapping, from, 1, 'R', - features); + MappedFeatures mf = new MappedFeatures(mapping, from, 1, 'R', features); String variant = mf.findProteinVariants(sf1); assertEquals(variant, "p.Arg1Cys"); diff --git a/test/jalview/datamodel/MappingTest.java b/test/jalview/datamodel/MappingTest.java index d739369..0bf753d 100644 --- a/test/jalview/datamodel/MappingTest.java +++ b/test/jalview/datamodel/MappingTest.java @@ -51,11 +51,13 @@ public class MappingTest @Test(groups = { "Functional" }) public void testIntersectVisContigs() { - MapList fk = new MapList(new int[] { 1, 6, 8, 13, 15, 23 }, new int[] { - 1, 7 }, 3, 1); + MapList fk = new MapList(new int[] { 1, 6, 8, 13, 15, 23 }, + new int[] + { 1, 7 }, 3, 1); Mapping m = new Mapping(fk); - Mapping m_1 = m.intersectVisContigs(new int[] { fk.getFromLowest(), - fk.getFromHighest() }); + Mapping m_1 = m + .intersectVisContigs(new int[] + { fk.getFromLowest(), fk.getFromHighest() }); Mapping m_2 = m.intersectVisContigs(new int[] { 1, 7, 11, 20 }); // assertions from output values 'as is', not checked for correctness diff --git a/test/jalview/datamodel/PDBEntryTest.java b/test/jalview/datamodel/PDBEntryTest.java index 80b7376..a006833 100644 --- a/test/jalview/datamodel/PDBEntryTest.java +++ b/test/jalview/datamodel/PDBEntryTest.java @@ -90,7 +90,7 @@ public class PDBEntryTest PDBEntry case9 = new PDBEntry("1xyz", "A", null, "x/y/z/File"); // different file only PDBEntry case10 = new PDBEntry("1xyz", "A", null, "a/b/c/File"); - + /* * assertEquals will invoke PDBEntry.equals() */ @@ -208,7 +208,7 @@ public class PDBEntryTest assertTrue(pdb1.updateFrom(pdb2)); assertEquals(pdb1.getFile(), "filePath"); assertEquals(pdb1.getType(), Type.FILE.toString()); - assertEquals(pdb1.getChainCode(),"B"); + assertEquals(pdb1.getChainCode(), "B"); /* * change of file is not allowed */ @@ -269,7 +269,7 @@ public class PDBEntryTest pdb2.setProperty("hello", "moon"); assertTrue(pdb1.updateFrom(pdb2)); assertEquals(pdb1.getProperty("hello"), "moon"); - + /* * different id but authoritative */ @@ -282,8 +282,8 @@ public class PDBEntryTest // can update pdb1 (authoritative) from pdb2 (non-authoritative) assertTrue(pdb1.updateFrom(pdb2)); // but the ID must remain the same - assertEquals(pdb1.getId(),"af:1xyz"); - + assertEquals(pdb1.getId(), "af:1xyz"); + } @Test(groups = { "Functional" }) diff --git a/test/jalview/datamodel/RangeElementsIteratorTest.java b/test/jalview/datamodel/RangeElementsIteratorTest.java index 9d14822..37d79ff 100644 --- a/test/jalview/datamodel/RangeElementsIteratorTest.java +++ b/test/jalview/datamodel/RangeElementsIteratorTest.java @@ -120,8 +120,10 @@ public class RangeElementsIteratorTest * when alignment has hidden cols */ @Test( - groups = { "Functional" }, - expectedExceptions = { NoSuchElementException.class }) + groups = + { "Functional" }, + expectedExceptions = + { NoSuchElementException.class }) public void testLastNextWithHidden() throws NoSuchElementException { Iterator it = hiddenCols.getVisibleColsIterator(0, 3); @@ -137,8 +139,10 @@ public class RangeElementsIteratorTest * when alignment has no hidden cols */ @Test( - groups = { "Functional" }, - expectedExceptions = { NoSuchElementException.class }) + groups = + { "Functional" }, + expectedExceptions = + { NoSuchElementException.class }) public void testLastNextNoHidden() throws NoSuchElementException { HiddenColumns test = new HiddenColumns(); @@ -155,8 +159,10 @@ public class RangeElementsIteratorTest * when alignment has hidden cols at start */ @Test( - groups = { "Functional" }, - expectedExceptions = { NoSuchElementException.class }) + groups = + { "Functional" }, + expectedExceptions = + { NoSuchElementException.class }) public void testLastNextStartHidden() throws NoSuchElementException { Iterator it3 = hiddenColsAtStart.getVisibleColsIterator(0, 6); @@ -172,8 +178,10 @@ public class RangeElementsIteratorTest * when alignment has hidden cols at end */ @Test( - groups = { "Functional" }, - expectedExceptions = { NoSuchElementException.class }) + groups = + { "Functional" }, + expectedExceptions = + { NoSuchElementException.class }) public void testLastNextEndHidden() throws NoSuchElementException { Iterator it4 = hiddenCols.getVisibleColsIterator(0, 4); @@ -188,8 +196,10 @@ public class RangeElementsIteratorTest * Test calls to remove throw UnsupportedOperationException */ @Test( - groups = { "Functional" }, - expectedExceptions = { UnsupportedOperationException.class }) + groups = + { "Functional" }, + expectedExceptions = + { UnsupportedOperationException.class }) public void testRemove() throws UnsupportedOperationException { Iterator it = hiddenCols.getVisibleColsIterator(0, 3); diff --git a/test/jalview/datamodel/ResidueCountTest.java b/test/jalview/datamodel/ResidueCountTest.java index a6e7429..696ed76 100644 --- a/test/jalview/datamodel/ResidueCountTest.java +++ b/test/jalview/datamodel/ResidueCountTest.java @@ -87,25 +87,25 @@ public class ResidueCountTest rc.add('-'); rc.add('.'); rc.add(' '); - + assertEquals(rc.getGapCount(), 4); assertEquals(rc.getCount(' '), 4); assertEquals(rc.getCount('-'), 4); assertEquals(rc.getCount('.'), 4); assertFalse(rc.isUsingOtherData()); assertFalse(rc.isCountingInts()); - - rc.set(ResidueCount.GAP_COUNT, Short.MAX_VALUE-2); - assertEquals(rc.getGapCount(), Short.MAX_VALUE-2); + + rc.set(ResidueCount.GAP_COUNT, Short.MAX_VALUE - 2); + assertEquals(rc.getGapCount(), Short.MAX_VALUE - 2); assertFalse(rc.isCountingInts()); rc.addGap(); - assertEquals(rc.getGapCount(), Short.MAX_VALUE-1); + assertEquals(rc.getGapCount(), Short.MAX_VALUE - 1); assertFalse(rc.isCountingInts()); rc.addGap(); assertEquals(rc.getGapCount(), Short.MAX_VALUE); rc.addGap(); assertTrue(rc.isCountingInts()); - assertEquals(rc.getGapCount(), Short.MAX_VALUE+1); + assertEquals(rc.getGapCount(), Short.MAX_VALUE + 1); } @Test(groups = "Functional") @@ -286,7 +286,7 @@ public class ResidueCountTest rc.add('P'); assertEquals(rc.getResiduesForCount(Short.MAX_VALUE + 1), "P"); assertEquals(rc.getResiduesForCount(1), "C"); - + // modal count is in the 'other data' counts rc = new ResidueCount(); rc.add('Q'); @@ -417,7 +417,7 @@ public class ResidueCountTest rc.add('K'); } rc.add('F'); - + /* * percentages are rounded (0.5 rounded up) * 10/40 9/40 7/40 6/40 1/40 diff --git a/test/jalview/datamodel/SearchResultsTest.java b/test/jalview/datamodel/SearchResultsTest.java index 838b259..5d2b8a4 100644 --- a/test/jalview/datamodel/SearchResultsTest.java +++ b/test/jalview/datamodel/SearchResultsTest.java @@ -214,15 +214,16 @@ public class SearchResultsTest int marked = 0; SequenceI seq1 = new Sequence("", "abcdefghijklm"); SequenceI seq2 = new Sequence("", "abcdefghijklm"); - SequenceGroup s1g=new SequenceGroup(), s2g=new SequenceGroup(), sallg=new SequenceGroup(); + SequenceGroup s1g = new SequenceGroup(), s2g = new SequenceGroup(), + sallg = new SequenceGroup(); s1g.addSequence(seq1, false); s2g.addSequence(seq2, false); sallg.addSequence(seq1, false); sallg.addSequence(seq2, false); - + SearchResultsI sr = new SearchResults(); BitSet bs = new BitSet(); - + SearchResultMatchI srm = null; srm = sr.addResult(seq1, 1, 1); Assert.assertNotNull("addResult didn't return Match", srm); @@ -230,7 +231,7 @@ public class SearchResultsTest assertEquals("Sequence reference not set", seq2, srm.getSequence()); assertEquals("match start incorrect", 1, srm.getStart()); assertEquals("match end incorrect", 2, srm.getEnd()); - + // set start/end range for groups to cover matches s1g.setStartRes(0); @@ -250,11 +251,10 @@ public class SearchResultsTest assertTrue("Didn't mark expected position", bs.get(0)); // now check return value for marking the same again assertEquals( - "Didn't count number of bits marked for existing marked set", - 0, + "Didn't count number of bits marked for existing marked set", 0, sr.markColumns(s1g, bs)); bs.clear(); - + /* * just seq2 */ @@ -263,7 +263,7 @@ public class SearchResultsTest assertEquals("Didn't return count of number of bits marked", 2, marked); assertTrue("Didn't mark expected position (1)", bs.get(0)); assertTrue("Didn't mark expected position (2)", bs.get(1)); - + /* * both seq1 and seq2 * should be same as seq2 @@ -281,8 +281,10 @@ public class SearchResultsTest s2g.setEndRes(1); sallg.setEndRes(0); BitSet tbs = new BitSet(); - assertEquals("Group start/end didn't select columns to mark",1, sr.markColumns(s2g, tbs)); - assertEquals("Group start/end didn't select columns to mark", 1, sr.markColumns(sallg, tbs)); + assertEquals("Group start/end didn't select columns to mark", 1, + sr.markColumns(s2g, tbs)); + assertEquals("Group start/end didn't select columns to mark", 1, + sr.markColumns(sallg, tbs)); assertEquals( "Didn't set expected number of columns in total for two successive marks", 2, tbs.cardinality()); diff --git a/test/jalview/datamodel/SeqCigarTest.java b/test/jalview/datamodel/SeqCigarTest.java index 89169d6..2eec987 100644 --- a/test/jalview/datamodel/SeqCigarTest.java +++ b/test/jalview/datamodel/SeqCigarTest.java @@ -193,8 +193,8 @@ public class SeqCigarTest SequenceI gen_sgapped_s = gen_sgapped.getSeq('-'); // assertEquals("Couldn't reconstruct sequence", s_gapped.getSequence(), // gen_sgapped_s); - if (!gen_sgapped_s.getSequenceAsString().equals( - s_gapped.getSequenceAsString())) + if (!gen_sgapped_s.getSequenceAsString() + .equals(s_gapped.getSequenceAsString())) { // TODO: investigate errors reported here, to allow full conversion to // passing JUnit assertion form diff --git a/test/jalview/datamodel/SequenceFeatureTest.java b/test/jalview/datamodel/SequenceFeatureTest.java index bd5e9ac..390f24d 100644 --- a/test/jalview/datamodel/SequenceFeatureTest.java +++ b/test/jalview/datamodel/SequenceFeatureTest.java @@ -354,17 +354,16 @@ public class SequenceFeatureTest + "Typevariant" + "DescriptionG,C" + "ConsequenceTranslated by Jalviewp.Leu9Phe" - + "allelesG,C" - + ""; + + "allelesG,C" + ""; assertEquals(expected, sf.getDetailsReport(seq.getName(), mf)); - /* * exon feature extending beyond mapped range; mapped location should be * restricted to peptide mapped range limit i.e. 10-13 */ - SequenceFeature sf2 = new SequenceFeature("exon", "exon 1", 109, 230, null); + SequenceFeature sf2 = new SequenceFeature("exon", "exon 1", 109, 230, + null); features.add(sf2); expected = "
        " + "" diff --git a/test/jalview/datamodel/SequenceGroupTest.java b/test/jalview/datamodel/SequenceGroupTest.java index 8419d4c..2c53b4e 100644 --- a/test/jalview/datamodel/SequenceGroupTest.java +++ b/test/jalview/datamodel/SequenceGroupTest.java @@ -24,7 +24,7 @@ import junit.extensions.PA; public class SequenceGroupTest { - @Test(groups={"Functional"}) + @Test(groups = { "Functional" }) public void testAddSequence() { SequenceGroup sg = new SequenceGroup(); @@ -52,16 +52,16 @@ public class SequenceGroupTest assertTrue(sg.getSequences().contains(seq3)); } - @Test(groups={"Functional"}) + @Test(groups = { "Functional" }) public void testAddOrRemove() { SequenceGroup sg = new SequenceGroup(); assertTrue(sg.getSequences().isEmpty()); - + SequenceI seq1 = new Sequence("seq1", "abc"); SequenceI seq2 = new Sequence("seq2", "abc"); SequenceI seq3 = new Sequence(seq1); - + sg.addOrRemove(seq1, false); assertEquals(sg.getSequences().size(), 1); sg.addOrRemove(seq2, false); @@ -76,7 +76,7 @@ public class SequenceGroupTest assertFalse(sg.getSequences().contains(seq1)); } - @Test(groups={"Functional"}) + @Test(groups = { "Functional" }) public void testGetColourScheme() { SequenceGroup sg = new SequenceGroup(); @@ -91,7 +91,7 @@ public class SequenceGroupTest assertSame(scheme, sg.getColourScheme()); } - @Test(groups={"Functional"}) + @Test(groups = { "Functional" }) public void testSetContext() { SequenceGroup sg1 = new SequenceGroup(); diff --git a/test/jalview/datamodel/SequenceTest.java b/test/jalview/datamodel/SequenceTest.java index 2b44261..6e18324 100644 --- a/test/jalview/datamodel/SequenceTest.java +++ b/test/jalview/datamodel/SequenceTest.java @@ -94,7 +94,8 @@ public class SequenceTest assertEquals("getInsertionsAsBits didn't mark expected number of gaps", 6, gapfield.cardinality()); - assertEquals("getInsertionsAsBits not correct.", expectedgaps, gapfield); + assertEquals("getInsertionsAsBits not correct.", expectedgaps, + gapfield); } @Test(groups = ("Functional")) @@ -115,7 +116,7 @@ public class SequenceTest @Test(groups = ("Functional")) public void testIsProteinWithXorNAmbiguityCodes() { - // test Protein with N - poly asparagine + // test Protein with N - poly asparagine assertTrue(new Sequence("prot", "ASDFASDFASDFNNNNNNNNN").isProtein()); assertTrue(new Sequence("prot", "NNNNNNNNNNNNNNNNNNNNN").isProtein()); // test Protein with X @@ -194,7 +195,6 @@ public class SequenceTest assertTrue(seq.getAlignmentAnnotations(null, null).isEmpty()); } - @Test(groups = { "Functional" }) public void testGetAlignmentAnnotations_forCalcIdLabelAndDescription() { @@ -214,13 +214,17 @@ public class SequenceTest /** * null matching should fail */ - assertTrue(seq.getAlignmentAnnotations("calcId3", "label2",null).isEmpty()); - - assertTrue(seq.getAlignmentAnnotations("calcId2", "label3",null).isEmpty()); - assertTrue(seq.getAlignmentAnnotations("calcId3", "label5",null).isEmpty()); - assertTrue(seq.getAlignmentAnnotations("calcId2", null,null).isEmpty()); - assertTrue(seq.getAlignmentAnnotations(null, "label3",null).isEmpty()); - assertTrue(seq.getAlignmentAnnotations(null, null,null).isEmpty()); + assertTrue(seq.getAlignmentAnnotations("calcId3", "label2", null) + .isEmpty()); + + assertTrue(seq.getAlignmentAnnotations("calcId2", "label3", null) + .isEmpty()); + assertTrue(seq.getAlignmentAnnotations("calcId3", "label5", null) + .isEmpty()); + assertTrue( + seq.getAlignmentAnnotations("calcId2", null, null).isEmpty()); + assertTrue(seq.getAlignmentAnnotations(null, "label3", null).isEmpty()); + assertTrue(seq.getAlignmentAnnotations(null, null, null).isEmpty()); } /** @@ -232,8 +236,8 @@ public class SequenceTest public void testAddAlignmentAnnotation() { assertNull(seq.getAnnotation()); - final AlignmentAnnotation annotation = new AlignmentAnnotation("a", - "b", 2d); + final AlignmentAnnotation annotation = new AlignmentAnnotation("a", "b", + 2d); assertNull(annotation.sequenceRef); seq.addAlignmentAnnotation(annotation); assertSame(seq, annotation.sequenceRef); @@ -771,7 +775,8 @@ public class SequenceTest /* * SequenceFeature on sequence */ - SequenceFeature sf = new SequenceFeature("Cath", "desc", 2, 4, 2f, null); + SequenceFeature sf = new SequenceFeature("Cath", "desc", 2, 4, 2f, + null); sq.addSequenceFeature(sf); List sfs = sq.getSequenceFeatures(); assertEquals(1, sfs.size()); @@ -810,7 +815,8 @@ public class SequenceTest try { sq.getDatasetSequence().setDatasetSequence(sq); // loop! - Assert.fail("Expected Error to be raised when calling setDatasetSequence with self reference"); + Assert.fail( + "Expected Error to be raised when calling setDatasetSequence with self reference"); } catch (IllegalArgumentException e) { // TODO Jalview error/exception class for raising implementation errors @@ -867,8 +873,8 @@ public class SequenceTest public void testCreateDatasetSequence() { SequenceI sq = new Sequence("my", "ASDASD"); - sq.addSequenceFeature(new SequenceFeature("type", "desc", 1, 10, 1f, - "group")); + sq.addSequenceFeature( + new SequenceFeature("type", "desc", 1, 10, 1f, "group")); sq.addDBRef(new DBRefEntry("source", "version", "accession")); assertNull(sq.getDatasetSequence()); assertNotNull(PA.getValue(sq, "sequenceFeatureStore")); @@ -917,15 +923,18 @@ public class SequenceTest DBRefEntry pdb1pdb = new DBRefEntry("PDB", "version1", "1PDB"); DBRefEntry pdb2pdb = new DBRefEntry("PDB", "version2", "2PDB"); - List primRefs = Arrays.asList(new DBRefEntry[] { pdb1pdb, - pdb2pdb }); + List primRefs = Arrays + .asList(new DBRefEntry[] + { pdb1pdb, pdb2pdb }); sq.getDatasetSequence().addDBRef(pdb1pdb); // should do nothing sq.getDatasetSequence().addDBRef(pdb2pdb); // should do nothing - sq.getDatasetSequence().addDBRef( - new DBRefEntry("PDB", "version3", "3PDB")); // should do nothing - sq.getDatasetSequence().addDBRef( - new DBRefEntry("PDB", "version4", "4PDB")); // should do nothing + sq.getDatasetSequence() + .addDBRef(new DBRefEntry("PDB", "version3", "3PDB")); // should do + // nothing + sq.getDatasetSequence() + .addDBRef(new DBRefEntry("PDB", "version4", "4PDB")); // should do + // nothing PDBEntry pdbe1a = new PDBEntry("1PDB", "A", Type.PDB, "filePath/test1"); PDBEntry pdbe1b = new PDBEntry("1PDB", "B", Type.PDB, "filePath/test1"); @@ -941,15 +950,15 @@ public class SequenceTest /* * test we added pdb entries to the dataset sequence */ - Assert.assertEquals(sq.getDatasetSequence().getAllPDBEntries(), Arrays - .asList(new PDBEntry[] { pdbe1a, pdbe1b, pdbe2a, pdbe2b }), + Assert.assertEquals(sq.getDatasetSequence().getAllPDBEntries(), + Arrays.asList(new PDBEntry[] + { pdbe1a, pdbe1b, pdbe2a, pdbe2b }), "PDB Entries were not found on dataset sequence."); /* * we should recover a pdb entry that is on the dataset sequence via PDBEntry */ - Assert.assertEquals(pdbe1a, - sq.getDatasetSequence().getPDBEntry("1PDB"), + Assert.assertEquals(pdbe1a, sq.getDatasetSequence().getPDBEntry("1PDB"), "PDB Entry '1PDB' not found on dataset sequence via getPDBEntry."); ArrayList annotsList = new ArrayList<>(); System.out.println(">>>>>> " + sq.getSequenceAsString().length()); @@ -958,9 +967,8 @@ public class SequenceTest Annotation[] annots = annotsList.toArray(new Annotation[0]); sq.addAlignmentAnnotation(new AlignmentAnnotation("Test annot", "Test annot description", annots)); - sq.getDatasetSequence().addAlignmentAnnotation( - new AlignmentAnnotation("Test annot", "Test annot description", - annots)); + sq.getDatasetSequence().addAlignmentAnnotation(new AlignmentAnnotation( + "Test annot", "Test annot description", annots)); Assert.assertEquals(sq.getDescription(), "Test sequence description.."); Assert.assertEquals(sq.getDBRefs().size(), 5); // DBRefs are on dataset // sequence @@ -983,8 +991,8 @@ public class SequenceTest Assert.assertNotNull(derived.getAnnotation()); Assert.assertEquals(derived.getAnnotation()[0].annotations.length, 2); Assert.assertEquals(derived.getDatasetSequence().getDBRefs().size(), 5); - Assert.assertEquals(derived.getDatasetSequence().getAllPDBEntries() - .size(), 4); + Assert.assertEquals( + derived.getDatasetSequence().getAllPDBEntries().size(), 4); Assert.assertNotNull(derived.getDatasetSequence().getAnnotation()); assertEquals("CD", derived.getSequenceAsString()); @@ -1017,8 +1025,8 @@ public class SequenceTest assertEquals(6, sq.getEnd()); SequenceI derived = sq.deriveSequence(); assertEquals("ABCDEF", derived.getSequenceAsString()); - assertEquals("ABCDEF", derived.getDatasetSequence() - .getSequenceAsString()); + assertEquals("ABCDEF", + derived.getDatasetSequence().getSequenceAsString()); } /** @@ -1033,8 +1041,8 @@ public class SequenceTest assertNull(sq.getDatasetSequence()); SequenceI derived = sq.deriveSequence(); assertEquals("AB-C.D EF", derived.getSequenceAsString()); - assertEquals("ABCDEF", derived.getDatasetSequence() - .getSequenceAsString()); + assertEquals("ABCDEF", + derived.getDatasetSequence().getSequenceAsString()); } @Test(groups = { "Functional" }) @@ -1042,10 +1050,10 @@ public class SequenceTest { SequenceI seq1 = new Sequence("Seq1", "AB-C.D EF"); seq1.setDescription("description"); - seq1.addAlignmentAnnotation(new AlignmentAnnotation("label", "desc", - 1.3d)); - seq1.addSequenceFeature(new SequenceFeature("type", "desc", 22, 33, - 12.4f, "group")); + seq1.addAlignmentAnnotation( + new AlignmentAnnotation("label", "desc", 1.3d)); + seq1.addSequenceFeature( + new SequenceFeature("type", "desc", 22, 33, 12.4f, "group")); seq1.addPDBId(new PDBEntry("1A70", "B", Type.PDB, "File")); seq1.addDBRef(new DBRefEntry("EMBL", "1.2", "AZ12345")); @@ -1073,16 +1081,16 @@ public class SequenceTest SequenceI seq1 = new Sequence("Seq1", "AB-C.D EF"); seq1.createDatasetSequence(); seq1.setDescription("description"); - seq1.addAlignmentAnnotation(new AlignmentAnnotation("label", "desc", - 1.3d)); + seq1.addAlignmentAnnotation( + new AlignmentAnnotation("label", "desc", 1.3d)); // JAL-2046 - what is the contract for using a derived sequence's // addSequenceFeature ? - seq1.addSequenceFeature(new SequenceFeature("type", "desc", 22, 33, - 12.4f, "group")); + seq1.addSequenceFeature( + new SequenceFeature("type", "desc", 22, 33, 12.4f, "group")); seq1.addPDBId(new PDBEntry("1A70", "B", Type.PDB, "File")); // here we add DBRef to the dataset sequence: - seq1.getDatasetSequence().addDBRef( - new DBRefEntry("EMBL", "1.2", "AZ12345")); + seq1.getDatasetSequence() + .addDBRef(new DBRefEntry("EMBL", "1.2", "AZ12345")); SequenceI copy = new Sequence(seq1); @@ -1157,28 +1165,37 @@ public class SequenceTest { SequenceI sq = new Sequence("", "abcde"); // type may not be null - assertFalse(sq.addSequenceFeature(new SequenceFeature(null, "desc", 4, - 8, 0f, null))); - assertTrue(sq.addSequenceFeature(new SequenceFeature("Cath", "desc", 4, - 8, 0f, null))); + assertFalse(sq.addSequenceFeature( + new SequenceFeature(null, "desc", 4, 8, 0f, null))); + assertTrue(sq.addSequenceFeature( + new SequenceFeature("Cath", "desc", 4, 8, 0f, null))); // can't add a duplicate feature - assertFalse(sq.addSequenceFeature(new SequenceFeature("Cath", "desc", - 4, 8, 0f, null))); + assertFalse(sq.addSequenceFeature( + new SequenceFeature("Cath", "desc", 4, 8, 0f, null))); // can add a different feature - assertTrue(sq.addSequenceFeature(new SequenceFeature("Scop", "desc", 4, - 8, 0f, null))); // different type - assertTrue(sq.addSequenceFeature(new SequenceFeature("Cath", - "description", 4, 8, 0f, null)));// different description - assertTrue(sq.addSequenceFeature(new SequenceFeature("Cath", "desc", 3, - 8, 0f, null))); // different start position - assertTrue(sq.addSequenceFeature(new SequenceFeature("Cath", "desc", 4, - 9, 0f, null))); // different end position - assertTrue(sq.addSequenceFeature(new SequenceFeature("Cath", "desc", 4, - 8, 1f, null))); // different score - assertTrue(sq.addSequenceFeature(new SequenceFeature("Cath", "desc", 4, - 8, Float.NaN, null))); // score NaN - assertTrue(sq.addSequenceFeature(new SequenceFeature("Cath", "desc", 4, - 8, 0f, "Metal"))); // different group + assertTrue(sq.addSequenceFeature( + new SequenceFeature("Scop", "desc", 4, 8, 0f, null))); // different + // type + assertTrue(sq.addSequenceFeature( + new SequenceFeature("Cath", "description", 4, 8, 0f, null)));// different + // description + assertTrue(sq.addSequenceFeature( + new SequenceFeature("Cath", "desc", 3, 8, 0f, null))); // different + // start + // position + assertTrue(sq.addSequenceFeature( + new SequenceFeature("Cath", "desc", 4, 9, 0f, null))); // different + // end + // position + assertTrue(sq.addSequenceFeature( + new SequenceFeature("Cath", "desc", 4, 8, 1f, null))); // different + // score + assertTrue(sq.addSequenceFeature( + new SequenceFeature("Cath", "desc", 4, 8, Float.NaN, null))); // score + // NaN + assertTrue(sq.addSequenceFeature( + new SequenceFeature("Cath", "desc", 4, 8, 0f, "Metal"))); // different + // group assertEquals(8, sq.getFeatures().getAllFeatures().size()); } @@ -1232,8 +1249,9 @@ public class SequenceTest * matching ref with a mapping - map updated */ DBRefEntry dbref5 = new DBRefEntry("UniRef", "1", "p00341"); - Mapping map = new Mapping(new MapList(new int[] { 1, 3 }, new int[] { - 1, 1 }, 3, 1)); + Mapping map = new Mapping( + new MapList(new int[] + { 1, 3 }, new int[] { 1, 1 }, 3, 1)); dbref5.setMap(map); sq.addDBRef(dbref5); assertEquals(4, sq.getDBRefs().size()); @@ -1273,7 +1291,7 @@ public class SequenceTest assertTrue(primaryDBRefs.isEmpty()); // empty dbrefs - sq.setDBRefs(null); + sq.setDBRefs(null); primaryDBRefs = sq.getPrimaryDBRefs(); assertTrue(primaryDBRefs.isEmpty()); @@ -1283,32 +1301,37 @@ public class SequenceTest // primary - uniprot with congruent map DBRefEntry upentry2 = new DBRefEntry("UNIPROT", "0", "Q04762"); - upentry2.setMap(new Mapping(null, new MapList(new int[] { 10, 22 }, - new int[] { 10, 22 }, 1, 1))); + upentry2.setMap( + new Mapping(null, new MapList(new int[] + { 10, 22 }, new int[] { 10, 22 }, 1, 1))); sq.addDBRef(upentry2); // primary - uniprot with map of enclosing sequence DBRefEntry upentry3 = new DBRefEntry("UNIPROT", "0", "Q04763"); - upentry3.setMap(new Mapping(null, new MapList(new int[] { 8, 24 }, - new int[] { 8, 24 }, 1, 1))); + upentry3.setMap( + new Mapping(null, new MapList(new int[] + { 8, 24 }, new int[] { 8, 24 }, 1, 1))); sq.addDBRef(upentry3); // not primary - uniprot with map of sub-sequence (5') DBRefEntry upentry4 = new DBRefEntry("UNIPROT", "0", "Q04764"); - upentry4.setMap(new Mapping(null, new MapList(new int[] { 10, 18 }, - new int[] { 10, 18 }, 1, 1))); + upentry4.setMap( + new Mapping(null, new MapList(new int[] + { 10, 18 }, new int[] { 10, 18 }, 1, 1))); sq.addDBRef(upentry4); // not primary - uniprot with map that overlaps 3' DBRefEntry upentry5 = new DBRefEntry("UNIPROT", "0", "Q04765"); - upentry5.setMap(new Mapping(null, new MapList(new int[] { 12, 22 }, - new int[] { 12, 22 }, 1, 1))); + upentry5.setMap( + new Mapping(null, new MapList(new int[] + { 12, 22 }, new int[] { 12, 22 }, 1, 1))); sq.addDBRef(upentry5); // not primary - uniprot with map to different coordinates frame DBRefEntry upentry6 = new DBRefEntry("UNIPROT", "0", "Q04766"); - upentry6.setMap(new Mapping(null, new MapList(new int[] { 12, 18 }, - new int[] { 112, 118 }, 1, 1))); + upentry6.setMap( + new Mapping(null, new MapList(new int[] + { 12, 18 }, new int[] { 112, 118 }, 1, 1))); sq.addDBRef(upentry6); // not primary - dbref to 'non-core' database @@ -1328,8 +1351,8 @@ public class SequenceTest // add corroborating PDB entry for primary DBref - // needs to have a file as well as matching ID // note PDB ID is not treated as case sensitive - sq.addPDBId(new PDBEntry("1QIP", null, Type.PDB, new File("/blah") - .toString())); + sq.addPDBId(new PDBEntry("1QIP", null, Type.PDB, + new File("/blah").toString())); // not valid DBRef - no file.. sq.addPDBId(new PDBEntry("1AAA", null, null, null)); @@ -1349,7 +1372,8 @@ public class SequenceTest @Test(groups = { "Functional" }) public void testGetPrimaryDBRefs_nucleotide() { - SequenceI sq = new Sequence("aseq", "TGATCACTCGACTAGCATCAGCATA", 10, 34); + SequenceI sq = new Sequence("aseq", "TGATCACTCGACTAGCATCAGCATA", 10, + 34); // primary - Ensembl DBRefEntry dbr1 = new DBRefEntry("ENSEMBL", "0", "ENSG1234"); @@ -1357,14 +1381,16 @@ public class SequenceTest // not primary - Ensembl 'transcript' mapping of sub-sequence DBRefEntry dbr2 = new DBRefEntry("ENSEMBL", "0", "ENST1234"); - dbr2.setMap(new Mapping(null, new MapList(new int[] { 15, 25 }, - new int[] { 1, 11 }, 1, 1))); + dbr2.setMap( + new Mapping(null, new MapList(new int[] + { 15, 25 }, new int[] { 1, 11 }, 1, 1))); sq.addDBRef(dbr2); // primary - EMBL with congruent map DBRefEntry dbr3 = new DBRefEntry("EMBL", "0", "J1234"); - dbr3.setMap(new Mapping(null, new MapList(new int[] { 10, 34 }, - new int[] { 10, 34 }, 1, 1))); + dbr3.setMap( + new Mapping(null, new MapList(new int[] + { 10, 34 }, new int[] { 10, 34 }, 1, 1))); sq.addDBRef(dbr3); // not primary - to non-core database @@ -1462,34 +1488,39 @@ public class SequenceTest seq.addPDBId(pdbe5); assertEquals(4, seq.getAllPDBEntries().size()); assertSame(pdbe5, seq.getAllPDBEntries().get(3)); - - // add with a fake pdbid + + // add with a fake pdbid // (models don't have an embedded ID) String realId = "RealIDQ"; - PDBEntry pdbe6 = new PDBEntry(realId,null,Type.PDB,"real/localpath"); - PDBEntry pdbe7 = new PDBEntry("RealID/real/localpath","C",Type.MMCIF,"real/localpath"); + PDBEntry pdbe6 = new PDBEntry(realId, null, Type.PDB, "real/localpath"); + PDBEntry pdbe7 = new PDBEntry("RealID/real/localpath", "C", Type.MMCIF, + "real/localpath"); pdbe7.setFakedPDBId(true); seq.addPDBId(pdbe6); - assertEquals(5,seq.getAllPDBEntries().size()); + assertEquals(5, seq.getAllPDBEntries().size()); seq.addPDBId(pdbe7); - assertEquals(5,seq.getAllPDBEntries().size()); + assertEquals(5, seq.getAllPDBEntries().size()); assertFalse(pdbe6.fakedPDBId()); - assertSame(pdbe6,seq.getAllPDBEntries().get(4)); - assertEquals("C",pdbe6.getChainCode()); + assertSame(pdbe6, seq.getAllPDBEntries().get(4)); + assertEquals("C", pdbe6.getChainCode()); assertEquals(realId, pdbe6.getId()); } @Test( - groups = { "Functional" }, - expectedExceptions = { IllegalArgumentException.class }) + groups = + { "Functional" }, + expectedExceptions = + { IllegalArgumentException.class }) public void testSetDatasetSequence_toSelf() { seq.setDatasetSequence(seq); } @Test( - groups = { "Functional" }, - expectedExceptions = { IllegalArgumentException.class }) + groups = + { "Functional" }, + expectedExceptions = + { IllegalArgumentException.class }) public void testSetDatasetSequence_cascading() { SequenceI seq2 = new Sequence("Seq2", "xyz"); @@ -1526,8 +1557,8 @@ public class SequenceTest "desc", 13, 14, 2f, null); sq.addSequenceFeature(sfContactFG); // add single position feature at [I] - SequenceFeature sfI = new SequenceFeature("Disulfide Bond", - "desc", 16, 16, null); + SequenceFeature sfI = new SequenceFeature("Disulfide Bond", "desc", 16, + 16, null); sq.addSequenceFeature(sfI); // no features in columns 1-2 (-A) @@ -1632,7 +1663,7 @@ public class SequenceTest Sequence sq = new Sequence("test/8-13", "-A--BCD-EF--"); final int tok = (int) PA.getValue(sq, "changeCount"); assertEquals(1, tok); - + // find F pos given A - lastCol gets set in cursor assertEquals(13, sq.findPosition(10, new SequenceCursor(sq, 8, 2, tok))); @@ -1644,7 +1675,7 @@ public class SequenceTest sq.findPosition(2, new SequenceCursor(sq, 13, 10, tok))); assertEquals("test:Pos8:Col2:startCol2:endCol10:tok1", PA.getValue(sq, "cursor").toString()); - + // find C pos given C (neither startCol nor endCol is set) assertEquals(10, sq.findPosition(6, new SequenceCursor(sq, 10, 6, tok))); @@ -1748,7 +1779,7 @@ public class SequenceTest public void testFindPosition_withCursorAndEdits() { Sequence sq = new Sequence("test/8-13", "-A--BCD-EF--"); - + // find F pos given A assertEquals(13, sq.findPosition(10, new SequenceCursor(sq, 8, 2, 0))); int token = (int) PA.getValue(sq, "changeCount"); // 0 @@ -1880,20 +1911,20 @@ public class SequenceTest */ SequenceI sq = new Sequence("test", "-ABC--DEF--", 1, 20); sq.createDatasetSequence(); - + assertTrue(sq.findFeatures(1, 9).isEmpty()); // should be no array bounds exception - JAL-2772 assertTrue(sq.findFeatures(1, 15).isEmpty()); - + // add feature on BCD SequenceFeature sfBCD = new SequenceFeature("Cath", "desc", 2, 4, 2f, null); sq.addSequenceFeature(sfBCD); - + // no features in columns 1-2 (-A) List found = sq.findFeatures(1, 2); assertTrue(found.isEmpty()); - + // columns 1-6 (-ABC--) includes BCD found = sq.findFeatures(1, 6); assertEquals(1, found.size()); @@ -2238,25 +2269,27 @@ public class SequenceTest assertEquals(0, seq.firstResidueOutsideIterator(cs.iterator())); } - @Test(groups= {"Functional"}) - public void testTransferAnnotation() { - Sequence origSeq = new Sequence("MYSEQ","THISISASEQ"); - Sequence toSeq = new Sequence("MYSEQ","THISISASEQ"); + + @Test(groups = { "Functional" }) + public void testTransferAnnotation() + { + Sequence origSeq = new Sequence("MYSEQ", "THISISASEQ"); + Sequence toSeq = new Sequence("MYSEQ", "THISISASEQ"); origSeq.addDBRef(new DBRefEntry("UNIPROT", "0", "Q12345", null, true)); toSeq.transferAnnotation(origSeq, null); - assertTrue(toSeq.getDBRefs().size()==1); - + assertTrue(toSeq.getDBRefs().size() == 1); + assertTrue(toSeq.getDBRefs().get(0).isCanonical()); - - // check for promotion of non-canonical + + // check for promotion of non-canonical // to canonical (e.g. fetch-db-refs on a jalview project pre 2.11.2) toSeq.setDBRefs(null); toSeq.addDBRef(new DBRefEntry("UNIPROT", "0", "Q12345", null, false)); toSeq.transferAnnotation(origSeq, null); - assertTrue(toSeq.getDBRefs().size()==1); - - assertTrue("Promotion of non-canonical DBRefEntry failed",toSeq.getDBRefs().get(0).isCanonical()); - - + assertTrue(toSeq.getDBRefs().size() == 1); + + assertTrue("Promotion of non-canonical DBRefEntry failed", + toSeq.getDBRefs().get(0).isCanonical()); + } } diff --git a/test/jalview/datamodel/StartRegionIteratorTest.java b/test/jalview/datamodel/StartRegionIteratorTest.java index 23d0b00..4e06e43 100644 --- a/test/jalview/datamodel/StartRegionIteratorTest.java +++ b/test/jalview/datamodel/StartRegionIteratorTest.java @@ -41,8 +41,7 @@ public class StartRegionIteratorTest List hiddenColumns = null; // null hidden columns - Iterator it = new StartRegionIterator(3, 10, - hiddenColumns); + Iterator it = new StartRegionIterator(3, 10, hiddenColumns); assertFalse(it.hasNext()); hiddenColumns = new ArrayList<>(); diff --git a/test/jalview/datamodel/VisibleContigsIteratorTest.java b/test/jalview/datamodel/VisibleContigsIteratorTest.java index 8f31dae..de2d3b7 100644 --- a/test/jalview/datamodel/VisibleContigsIteratorTest.java +++ b/test/jalview/datamodel/VisibleContigsIteratorTest.java @@ -53,8 +53,7 @@ public class VisibleContigsIteratorTest hiddenColumns = new ArrayList<>(); // no hidden columns - it = new VisibleContigsIterator(3, 10, - hiddenColumns); + it = new VisibleContigsIterator(3, 10, hiddenColumns); assertTrue(it.hasNext()); assertFalse(it.endsAtHidden()); result = it.next(); diff --git a/test/jalview/datamodel/VisibleRowsIteratorTest.java b/test/jalview/datamodel/VisibleRowsIteratorTest.java index 4a021c5..32c6b2d 100644 --- a/test/jalview/datamodel/VisibleRowsIteratorTest.java +++ b/test/jalview/datamodel/VisibleRowsIteratorTest.java @@ -137,8 +137,10 @@ public class VisibleRowsIteratorTest * when alignment has hidden rows */ @Test( - groups = { "Functional" }, - expectedExceptions = { NoSuchElementException.class }) + groups = + { "Functional" }, + expectedExceptions = + { NoSuchElementException.class }) public void testLastNextWithHidden() throws NoSuchElementException { VisibleRowsIterator it = new VisibleRowsIterator(0, 3, al); @@ -154,8 +156,10 @@ public class VisibleRowsIteratorTest * when alignment has no hidden rows */ @Test( - groups = { "Functional" }, - expectedExceptions = { NoSuchElementException.class }) + groups = + { "Functional" }, + expectedExceptions = + { NoSuchElementException.class }) public void testLastNextNoHidden() throws NoSuchElementException { VisibleRowsIterator it = new VisibleRowsIterator(0, 3, al3); @@ -171,8 +175,10 @@ public class VisibleRowsIteratorTest * when alignment has hidden rows at start */ @Test( - groups = { "Functional" }, - expectedExceptions = { NoSuchElementException.class }) + groups = + { "Functional" }, + expectedExceptions = + { NoSuchElementException.class }) public void testLastNextStartHidden() throws NoSuchElementException { VisibleRowsIterator it = new VisibleRowsIterator(0, 3, al2); @@ -188,8 +194,10 @@ public class VisibleRowsIteratorTest * when alignment has hidden rows at end */ @Test( - groups = { "Functional" }, - expectedExceptions = { NoSuchElementException.class }) + groups = + { "Functional" }, + expectedExceptions = + { NoSuchElementException.class }) public void testLastNextEndHidden() throws NoSuchElementException { VisibleRowsIterator it = new VisibleRowsIterator(0, 4, al); @@ -204,8 +212,10 @@ public class VisibleRowsIteratorTest * Test calls to remove throw UnsupportedOperationException */ @Test( - groups = { "Functional" }, - expectedExceptions = { UnsupportedOperationException.class }) + groups = + { "Functional" }, + expectedExceptions = + { UnsupportedOperationException.class }) public void testRemove() throws UnsupportedOperationException { VisibleRowsIterator it = new VisibleRowsIterator(0, 3, al); diff --git a/test/jalview/datamodel/features/FeatureAttributesTest.java b/test/jalview/datamodel/features/FeatureAttributesTest.java index 0846ec2..efa004c 100644 --- a/test/jalview/datamodel/features/FeatureAttributesTest.java +++ b/test/jalview/datamodel/features/FeatureAttributesTest.java @@ -44,7 +44,7 @@ public class FeatureAttributesTest * Test the method that keeps attribute names in non-case-sensitive order, * including handling of 'compound' names */ - @Test(groups="Functional") + @Test(groups = "Functional") public void testAttributeNameComparator() { FeatureAttributes fa = FeatureAttributes.getInstance(); @@ -52,19 +52,24 @@ public class FeatureAttributesTest "comparator"); assertEquals( - comp.compare(new String[] { "CSQ" }, new String[] { "csq" }), 0); + comp.compare(new String[] + { "CSQ" }, new String[] { "csq" }), 0); - assertTrue(comp.compare(new String[] { "CSQ", "a" }, - new String[] { "csq" }) > 0); + assertTrue( + comp.compare(new String[] + { "CSQ", "a" }, new String[] { "csq" }) > 0); - assertTrue(comp.compare(new String[] { "CSQ" }, new String[] { "csq", - "b" }) < 0); + assertTrue( + comp.compare(new String[] + { "CSQ" }, new String[] { "csq", "b" }) < 0); - assertTrue(comp.compare(new String[] { "CSQ", "AF" }, new String[] { - "csq", "ac" }) > 0); + assertTrue( + comp.compare(new String[] + { "CSQ", "AF" }, new String[] { "csq", "ac" }) > 0); - assertTrue(comp.compare(new String[] { "CSQ", "ac" }, new String[] { - "csq", "AF" }) < 0); + assertTrue( + comp.compare(new String[] + { "CSQ", "ac" }, new String[] { "csq", "AF" }) < 0); } @Test(groups = "Functional") diff --git a/test/jalview/datamodel/features/FeatureMatcherSetTest.java b/test/jalview/datamodel/features/FeatureMatcherSetTest.java index a2d2c9a..47c47a9 100644 --- a/test/jalview/datamodel/features/FeatureMatcherSetTest.java +++ b/test/jalview/datamodel/features/FeatureMatcherSetTest.java @@ -240,8 +240,8 @@ public class FeatureMatcherSetTest } /** - * Tests for the 'compound attribute' key i.e. where first key's value is a map - * from which we take the value for the second key, e.g. CSQ : Consequence + * Tests for the 'compound attribute' key i.e. where first key's value is a + * map from which we take the value for the second key, e.g. CSQ : Consequence */ @Test(groups = "Functional") public void testMatches_compoundKey() @@ -297,11 +297,11 @@ public class FeatureMatcherSetTest FeatureMatcherI fm1 = FeatureMatcher.byAttribute(Condition.LT, "1.2", "AF"); assertEquals(fm1.toStableString(), "AF LT 1.2"); - + FeatureMatcher fm2 = FeatureMatcher.byAttribute(Condition.NotContains, "path", "CLIN_SIG"); assertEquals(fm2.toStableString(), "CLIN_SIG NotContains path"); - + /* * AND them */ @@ -314,7 +314,7 @@ public class FeatureMatcherSetTest fms.and(fm2); assertEquals(fms.toStableString(), "(AF LT 1.2) AND (CLIN_SIG NotContains path)"); - + /* * OR them */ @@ -325,7 +325,7 @@ public class FeatureMatcherSetTest fms.or(fm2); assertEquals(fms.toStableString(), "(AF LT 1.2) OR (CLIN_SIG NotContains path)"); - + /* * attribute or value including space is quoted */ @@ -376,7 +376,7 @@ public class FeatureMatcherSetTest fms = FeatureMatcherSet .fromString("(AF LT 1.2) and (CLIN_SIG NotContains path)"); assertEquals(fms.toStableString(), descriptor); - + descriptor = "(AF LT 1.2) OR (CLIN_SIG NotContains path)"; fms = FeatureMatcherSet.fromString(descriptor); assertEquals(fms.toStableString(), descriptor); @@ -390,7 +390,7 @@ public class FeatureMatcherSetTest fms = FeatureMatcherSet .fromString("(AF LT 1.2) or CLIN_SIG NotContains path"); assertEquals(fms.toStableString(), descriptor); - + descriptor = "(AF LT 1.2) OR (CLIN_SIG NotContains path) OR ('CSQ:Poly Phen' NotMatches 'foo bar')"; fms = FeatureMatcherSet.fromString(descriptor); assertEquals(fms.toStableString(), descriptor); diff --git a/test/jalview/datamodel/features/FeatureMatcherTest.java b/test/jalview/datamodel/features/FeatureMatcherTest.java index f403a57..8339576 100644 --- a/test/jalview/datamodel/features/FeatureMatcherTest.java +++ b/test/jalview/datamodel/features/FeatureMatcherTest.java @@ -98,8 +98,8 @@ public class FeatureMatcherTest /* * a numeric matcher - MatcherTest covers more conditions */ - FeatureMatcherI fm = FeatureMatcher - .byAttribute(Condition.GE, "-2", "AF"); + FeatureMatcherI fm = FeatureMatcher.byAttribute(Condition.GE, "-2", + "AF"); SequenceFeature sf = new SequenceFeature("Cath", "desc", 11, 12, "grp"); assertFalse(fm.matches(sf)); sf.setValue("AF", "foobar"); diff --git a/test/jalview/datamodel/features/FeatureStoreTest.java b/test/jalview/datamodel/features/FeatureStoreTest.java index c38cb1e..128a86e 100644 --- a/test/jalview/datamodel/features/FeatureStoreTest.java +++ b/test/jalview/datamodel/features/FeatureStoreTest.java @@ -20,8 +20,7 @@ public class FeatureStoreTest public void testFindFeatures_nonNested() { FeatureStore fs = new FeatureStore(); - fs.addFeature(new SequenceFeature("", "", 10, 20, Float.NaN, - null)); + fs.addFeature(new SequenceFeature("", "", 10, 20, Float.NaN, null)); // same range different description fs.addFeature(new SequenceFeature("", "desc", 10, 20, Float.NaN, null)); fs.addFeature(new SequenceFeature("", "", 15, 25, Float.NaN, null)); @@ -213,8 +212,8 @@ public class FeatureStoreTest Float.NaN, null); store.addFeature(sf6); // contact feature - SequenceFeature sf7 = new SequenceFeature("Disulphide bond", "desc", - 18, 45, Float.NaN, null); + SequenceFeature sf7 = new SequenceFeature("Disulphide bond", "desc", 18, + 45, Float.NaN, null); store.addFeature(sf7); List features = store.getPositionalFeatures(); @@ -257,8 +256,8 @@ public class FeatureStoreTest /* * contact feature deletion */ - SequenceFeature sf3 = new SequenceFeature("", "Disulphide Bond", 11, - 23, Float.NaN, null); + SequenceFeature sf3 = new SequenceFeature("", "Disulphide Bond", 11, 23, + Float.NaN, null); store.addFeature(sf3); assertEquals(store.getPositionalFeatures().size(), 1); assertTrue(store.getPositionalFeatures().contains(sf3)); @@ -309,10 +308,10 @@ public class FeatureStoreTest { FeatureStore fs = new FeatureStore(); - SequenceFeature sf1 = new SequenceFeature("Cath", "", 10, 20, - Float.NaN, null); - SequenceFeature sf2 = new SequenceFeature("Cath", "", 10, 20, - Float.NaN, null); + SequenceFeature sf1 = new SequenceFeature("Cath", "", 10, 20, Float.NaN, + null); + SequenceFeature sf2 = new SequenceFeature("Cath", "", 10, 20, Float.NaN, + null); assertTrue(fs.addFeature(sf1)); assertEquals(fs.getFeatureCount(true), 1); // positional @@ -365,8 +364,8 @@ public class FeatureStoreTest /* * non-nested feature */ - SequenceFeature sf1 = new SequenceFeature("Cath", "", 10, 20, - Float.NaN, null); + SequenceFeature sf1 = new SequenceFeature("Cath", "", 10, 20, Float.NaN, + null); fs.addFeature(sf1); assertFalse(fs.isEmpty()); assertEquals(fs.getFeatureCount(true), 1); @@ -389,7 +388,8 @@ public class FeatureStoreTest /* * contact feature */ - sf1 = new SequenceFeature("Disulfide bond", "", 19, 49, Float.NaN, null); + sf1 = new SequenceFeature("Disulfide bond", "", 19, 49, Float.NaN, + null); fs.addFeature(sf1); assertFalse(fs.isEmpty()); assertEquals(fs.getFeatureCount(true), 1); @@ -401,10 +401,10 @@ public class FeatureStoreTest * sf2, sf3 added as nested features */ sf1 = new SequenceFeature("Cath", "", 19, 49, Float.NaN, null); - SequenceFeature sf2 = new SequenceFeature("Cath", "", 20, 40, - Float.NaN, null); - SequenceFeature sf3 = new SequenceFeature("Cath", "", 25, 35, - Float.NaN, null); + SequenceFeature sf2 = new SequenceFeature("Cath", "", 20, 40, Float.NaN, + null); + SequenceFeature sf3 = new SequenceFeature("Cath", "", 25, 35, Float.NaN, + null); fs.addFeature(sf1); fs.addFeature(sf2); fs.addFeature(sf3); @@ -428,7 +428,8 @@ public class FeatureStoreTest assertTrue(fs.getFeatureGroups(true).isEmpty()); assertTrue(fs.getFeatureGroups(false).isEmpty()); - SequenceFeature sf1 = new SequenceFeature("Cath", "desc", 10, 20, 1f, "group1"); + SequenceFeature sf1 = new SequenceFeature("Cath", "desc", 10, 20, 1f, + "group1"); fs.addFeature(sf1); Set groups = fs.getFeatureGroups(true); assertEquals(groups.size(), 1); @@ -437,7 +438,8 @@ public class FeatureStoreTest /* * add another feature of the same group, delete one, delete both */ - SequenceFeature sf2 = new SequenceFeature("Cath", "desc", 20, 30, 1f, "group1"); + SequenceFeature sf2 = new SequenceFeature("Cath", "desc", 20, 30, 1f, + "group1"); fs.addFeature(sf2); groups = fs.getFeatureGroups(true); assertEquals(groups.size(), 1); @@ -450,11 +452,14 @@ public class FeatureStoreTest groups = fs.getFeatureGroups(true); assertTrue(fs.getFeatureGroups(true).isEmpty()); - SequenceFeature sf3 = new SequenceFeature("Cath", "desc", 20, 30, 1f, "group2"); + SequenceFeature sf3 = new SequenceFeature("Cath", "desc", 20, 30, 1f, + "group2"); fs.addFeature(sf3); - SequenceFeature sf4 = new SequenceFeature("Cath", "desc", 20, 30, 1f, "Group2"); + SequenceFeature sf4 = new SequenceFeature("Cath", "desc", 20, 30, 1f, + "Group2"); fs.addFeature(sf4); - SequenceFeature sf5 = new SequenceFeature("Cath", "desc", 20, 30, 1f, null); + SequenceFeature sf5 = new SequenceFeature("Cath", "desc", 20, 30, 1f, + null); fs.addFeature(sf5); groups = fs.getFeatureGroups(true); assertEquals(groups.size(), 3); @@ -507,8 +512,8 @@ public class FeatureStoreTest assertEquals(fs.getTotalFeatureLength(), 93); // contact features count 1 - SequenceFeature sf3 = new SequenceFeature("disulphide bond", "desc", - 15, 35, 1f, "group1"); + SequenceFeature sf3 = new SequenceFeature("disulphide bond", "desc", 15, + 35, 1f, "group1"); fs.addFeature(sf3); assertEquals(fs.getTotalFeatureLength(), 94); @@ -528,9 +533,10 @@ public class FeatureStoreTest /* * positional feature */ - SequenceFeature sf1 = new SequenceFeature("Cath", "desc", 10, 20, 1f, "group1"); + SequenceFeature sf1 = new SequenceFeature("Cath", "desc", 10, 20, 1f, + "group1"); assertEquals(FeatureStore.getFeatureLength(sf1), 11); - + /* * non-positional feature */ @@ -541,8 +547,8 @@ public class FeatureStoreTest /* * contact feature counts 1 */ - SequenceFeature sf3 = new SequenceFeature("Disulphide Bond", "desc", - 14, 28, 1f, "AGroup"); + SequenceFeature sf3 = new SequenceFeature("Disulphide Bond", "desc", 14, + 28, 1f, "AGroup"); assertEquals(FeatureStore.getFeatureLength(sf3), 1); } @@ -817,7 +823,7 @@ public class FeatureStoreTest assertTrue(features.contains(sf2)); assertTrue(store.features.contains(sf1)); assertTrue(store.features.contains(sf2)); - + /* * delete the first feature */ @@ -839,10 +845,10 @@ public class FeatureStoreTest public void testContains() { FeatureStore fs = new FeatureStore(); - SequenceFeature sf1 = new SequenceFeature("Cath", "", 10, 20, - Float.NaN, "group1"); - SequenceFeature sf2 = new SequenceFeature("Cath", "", 10, 20, - Float.NaN, "group2"); + SequenceFeature sf1 = new SequenceFeature("Cath", "", 10, 20, Float.NaN, + "group1"); + SequenceFeature sf2 = new SequenceFeature("Cath", "", 10, 20, Float.NaN, + "group2"); SequenceFeature sf3 = new SequenceFeature("Cath", "", 0, 0, Float.NaN, "group1"); SequenceFeature sf4 = new SequenceFeature("Cath", "", 0, 0, 0f, @@ -868,8 +874,8 @@ public class FeatureStoreTest /* * add a nested feature */ - SequenceFeature sf7 = new SequenceFeature("Cath", "", 12, 16, - Float.NaN, "group1"); + SequenceFeature sf7 = new SequenceFeature("Cath", "", 12, 16, Float.NaN, + "group1"); fs.addFeature(sf7); assertTrue(fs.contains(sf7)); assertTrue(fs.contains(new SequenceFeature(sf7))); diff --git a/test/jalview/datamodel/features/SequenceFeaturesTest.java b/test/jalview/datamodel/features/SequenceFeaturesTest.java index 56512cd..b51075e 100644 --- a/test/jalview/datamodel/features/SequenceFeaturesTest.java +++ b/test/jalview/datamodel/features/SequenceFeaturesTest.java @@ -77,8 +77,8 @@ public class SequenceFeaturesTest Float.NaN, null); store.add(sf6); // contact feature - SequenceFeature sf7 = new SequenceFeature("Disulphide bond", "desc", - 18, 45, Float.NaN, null); + SequenceFeature sf7 = new SequenceFeature("Disulphide bond", "desc", 18, + 45, Float.NaN, null); store.add(sf7); // different feature type SequenceFeature sf8 = new SequenceFeature("Pfam", "desc", 30, 40, @@ -142,8 +142,8 @@ public class SequenceFeaturesTest Float.NaN, null); store.add(sf2); // contact feature - SequenceFeature sf3 = new SequenceFeature("Disulphide bond", "desc", - 18, 45, Float.NaN, null); + SequenceFeature sf3 = new SequenceFeature("Disulphide bond", "desc", 18, + 45, Float.NaN, null); store.add(sf3); // repeat for different feature type SequenceFeature sf4 = new SequenceFeature("Pfam", "desc", 10, 20, @@ -155,7 +155,7 @@ public class SequenceFeaturesTest SequenceFeature sf6 = new SequenceFeature("Disulfide bond", "desc", 18, 45, Float.NaN, null); store.add(sf6); - + /* * get all contact features */ @@ -163,7 +163,7 @@ public class SequenceFeaturesTest assertEquals(features.size(), 2); assertTrue(features.contains(sf3)); assertTrue(features.contains(sf6)); - + /* * get contact features by type */ @@ -171,11 +171,11 @@ public class SequenceFeaturesTest assertTrue(store.getContactFeatures("Cath").isEmpty()); assertTrue(store.getContactFeatures("Pfam").isEmpty()); assertTrue(store.getContactFeatures("DISULPHIDE BOND").isEmpty()); - + features = store.getContactFeatures("Disulphide bond"); assertEquals(features.size(), 1); assertTrue(features.contains(sf3)); - + features = store.getContactFeatures("Disulfide bond"); assertEquals(features.size(), 1); assertTrue(features.contains(sf6)); @@ -194,8 +194,8 @@ public class SequenceFeaturesTest Float.NaN, null); store.add(sf2); // contact feature - SequenceFeature sf3 = new SequenceFeature("Disulphide bond", "desc", - 18, 45, Float.NaN, null); + SequenceFeature sf3 = new SequenceFeature("Disulphide bond", "desc", 18, + 45, Float.NaN, null); store.add(sf3); // repeat for different feature type SequenceFeature sf4 = new SequenceFeature("Pfam", "desc", 10, 20, @@ -211,7 +211,7 @@ public class SequenceFeaturesTest SequenceFeature sf7 = new SequenceFeature("Pfam", "desc2", 0, 0, Float.NaN, null); store.add(sf7); - + /* * get all non-positional features */ @@ -220,18 +220,18 @@ public class SequenceFeaturesTest assertTrue(features.contains(sf2)); assertTrue(features.contains(sf5)); assertTrue(features.contains(sf7)); - + /* * get non-positional features by type */ assertTrue(store.getNonPositionalFeatures((String) null).isEmpty()); assertTrue(store.getNonPositionalFeatures("Cath").isEmpty()); assertTrue(store.getNonPositionalFeatures("PFAM").isEmpty()); - + features = store.getNonPositionalFeatures("Metal"); assertEquals(features.size(), 1); assertTrue(features.contains(sf2)); - + features = store.getNonPositionalFeatures("Pfam"); assertEquals(features.size(), 2); assertTrue(features.contains(sf5)); @@ -250,8 +250,7 @@ public class SequenceFeaturesTest SequenceFeature addFeature(SequenceFeaturesI sf, String type, int from, int to) { - SequenceFeature sf1 = new SequenceFeature(type, "", from, to, - Float.NaN, + SequenceFeature sf1 = new SequenceFeature(type, "", from, to, Float.NaN, null); sf.add(sf1); return sf1; @@ -273,31 +272,31 @@ public class SequenceFeaturesTest SequenceFeature sf10 = addFeature(sf, "Cath", 40, 100); SequenceFeature sf11 = addFeature(sf, "Cath", 60, 100); SequenceFeature sf12 = addFeature(sf, "Cath", 70, 70); - + List overlaps = sf.findFeatures(200, 200, "Pfam"); assertTrue(overlaps.isEmpty()); - - overlaps = sf.findFeatures( 1, 9, "Pfam"); + + overlaps = sf.findFeatures(1, 9, "Pfam"); assertEquals(overlaps.size(), 1); assertTrue(overlaps.contains(sf2)); - - overlaps = sf.findFeatures( 5, 18, "Pfam"); + + overlaps = sf.findFeatures(5, 18, "Pfam"); assertEquals(overlaps.size(), 2); assertTrue(overlaps.contains(sf1)); assertTrue(overlaps.contains(sf2)); - + overlaps = sf.findFeatures(30, 40, "Pfam"); assertEquals(overlaps.size(), 3); assertTrue(overlaps.contains(sf1)); assertTrue(overlaps.contains(sf3)); assertTrue(overlaps.contains(sf4)); - - overlaps = sf.findFeatures( 80, 90, "Pfam"); + + overlaps = sf.findFeatures(80, 90, "Pfam"); assertEquals(overlaps.size(), 2); assertTrue(overlaps.contains(sf4)); assertTrue(overlaps.contains(sf5)); - - overlaps = sf.findFeatures( 68, 70, "Pfam"); + + overlaps = sf.findFeatures(68, 70, "Pfam"); assertEquals(overlaps.size(), 3); assertTrue(overlaps.contains(sf4)); assertTrue(overlaps.contains(sf5)); @@ -377,12 +376,10 @@ public class SequenceFeaturesTest * add, then delete, more non-positional features of different types */ SequenceFeature sfy = new SequenceFeature("AnotherType", "Desc", 0, 0, - 0f, - "AnotherGroup"); + 0f, "AnotherGroup"); sf.add(sfy); SequenceFeature sfz = new SequenceFeature("AThirdType", "Desc", 0, 0, - 0f, - null); + 0f, null); sf.add(sfz); groups = sf.getFeatureGroups(false); assertEquals(groups.size(), 3); @@ -452,7 +449,7 @@ public class SequenceFeaturesTest { SequenceFeaturesI sf = new SequenceFeatures(); assertTrue(sf.getFeatureTypesForGroups(true, (String) null).isEmpty()); - + /* * add feature with group = "Uniprot", type = "helix" */ @@ -464,7 +461,7 @@ public class SequenceFeaturesTest assertEquals(groups.size(), 1); assertTrue(groups.contains("helix")); assertTrue(sf.getFeatureTypesForGroups(true, (String) null).isEmpty()); - + /* * add feature with group = "Uniprot", type = "strand" */ @@ -525,8 +522,9 @@ public class SequenceFeaturesTest assertTrue(groups.contains("turn")); assertTrue(groups.contains("strand")); // alternative vararg syntax - groups = sf.getFeatureTypesForGroups(true, new String[] { "Cath", - "Scop" }); + groups = sf.getFeatureTypesForGroups(true, + new String[] + { "Cath", "Scop" }); assertEquals(groups.size(), 2); assertTrue(groups.contains("turn")); assertTrue(groups.contains("strand")); @@ -568,8 +566,8 @@ public class SequenceFeaturesTest /* * add contact feature */ - SequenceFeature sf4 = new SequenceFeature("Disulphide Bond", "desc", - 10, 20, Float.NaN, null); + SequenceFeature sf4 = new SequenceFeature("Disulphide Bond", "desc", 10, + 20, Float.NaN, null); store.add(sf4); types = store.getFeatureTypes(); assertEquals(types.size(), 3); @@ -607,7 +605,7 @@ public class SequenceFeaturesTest SequenceFeaturesI store = new SequenceFeatures(); assertEquals(store.getFeatureCount(true), 0); assertEquals(store.getFeatureCount(false), 0); - + /* * add positional */ @@ -625,7 +623,7 @@ public class SequenceFeaturesTest assertFalse(store.add(sf2)); assertEquals(store.getFeatureCount(true), 1); assertEquals(store.getFeatureCount(false), 0); - + /* * add non-positional feature */ @@ -634,16 +632,16 @@ public class SequenceFeaturesTest store.add(sf3); assertEquals(store.getFeatureCount(true), 1); assertEquals(store.getFeatureCount(false), 1); - + /* * add contact feature (counts as 1) */ - SequenceFeature sf4 = new SequenceFeature("Disulphide Bond", "desc", - 10, 20, Float.NaN, null); + SequenceFeature sf4 = new SequenceFeature("Disulphide Bond", "desc", 10, + 20, Float.NaN, null); store.add(sf4); assertEquals(store.getFeatureCount(true), 2); assertEquals(store.getFeatureCount(false), 1); - + /* * add another Pfam but this time as a positional feature */ @@ -668,7 +666,7 @@ public class SequenceFeaturesTest assertTrue(store.delete(sf3)); assertEquals(store.getFeatureCount(true), 3); assertEquals(store.getFeatureCount(false), 0); - + /* * delete second Pfam (positional) */ @@ -683,21 +681,21 @@ public class SequenceFeaturesTest SequenceFeaturesI store = new SequenceFeatures(); List features = store.getAllFeatures(); assertTrue(features.isEmpty()); - + SequenceFeature sf1 = new SequenceFeature("Metal", "desc", 10, 20, Float.NaN, null); store.add(sf1); features = store.getAllFeatures(); assertEquals(features.size(), 1); assertTrue(features.contains(sf1)); - + SequenceFeature sf2 = new SequenceFeature("Metallic", "desc", 10, 20, Float.NaN, null); store.add(sf2); features = store.getAllFeatures(); assertEquals(features.size(), 2); assertTrue(features.contains(sf2)); - + /* * add non-positional feature */ @@ -707,17 +705,17 @@ public class SequenceFeaturesTest features = store.getAllFeatures(); assertEquals(features.size(), 3); assertTrue(features.contains(sf3)); - + /* * add contact feature */ - SequenceFeature sf4 = new SequenceFeature("Disulphide Bond", "desc", - 10, 20, Float.NaN, null); + SequenceFeature sf4 = new SequenceFeature("Disulphide Bond", "desc", 10, + 20, Float.NaN, null); store.add(sf4); features = store.getAllFeatures(); assertEquals(features.size(), 4); assertTrue(features.contains(sf4)); - + /* * add another Pfam */ @@ -740,7 +738,7 @@ public class SequenceFeaturesTest assertTrue(features.contains(sf1)); assertTrue(features.contains(sf3)); assertTrue(features.contains(sf5)); - + /* * delete first Pfam */ @@ -748,7 +746,7 @@ public class SequenceFeaturesTest features = store.getAllFeatures(); assertEquals(features.size(), 4); assertFalse(features.contains(sf3)); - + /* * delete second Pfam */ @@ -786,8 +784,8 @@ public class SequenceFeaturesTest /* * add contact feature - counts 1 to feature length */ - SequenceFeature sf4 = new SequenceFeature("Disulphide Bond", "desc", - 10, 20, Float.NaN, null); + SequenceFeature sf4 = new SequenceFeature("Disulphide Bond", "desc", 10, + 20, Float.NaN, null); store.add(sf4); assertEquals(store.getTotalFeatureLength(), 12); @@ -963,7 +961,7 @@ public class SequenceFeaturesTest public void testGetFeatureTypes_byOntology() { SequenceFeaturesI store = new SequenceFeatures(); - + SequenceFeature sf1 = new SequenceFeature("transcript", "desc", 10, 20, Float.NaN, null); store.add(sf1); @@ -1003,9 +1001,9 @@ public class SequenceFeaturesTest assertTrue(features.isEmpty()); assertTrue(store.getFeaturesByOntology(new String[] {}).isEmpty()); assertTrue(store.getFeaturesByOntology((String[]) null).isEmpty()); - - SequenceFeature transcriptFeature = new SequenceFeature("transcript", "desc", 10, 20, - Float.NaN, null); + + SequenceFeature transcriptFeature = new SequenceFeature("transcript", + "desc", 10, 20, Float.NaN, null); store.add(transcriptFeature); /* @@ -1016,8 +1014,8 @@ public class SequenceFeaturesTest Float.NaN, null); store.add(mrnaFeature); - SequenceFeature pfamFeature = new SequenceFeature("Pfam", "desc", 30, 40, - Float.NaN, null); + SequenceFeature pfamFeature = new SequenceFeature("Pfam", "desc", 30, + 40, Float.NaN, null); store.add(pfamFeature); /* @@ -1051,8 +1049,7 @@ public class SequenceFeaturesTest public void testSortFeatures() { List sfs = new ArrayList<>(); - SequenceFeature sf1 = new SequenceFeature("Pfam", "desc", 30, - 60, + SequenceFeature sf1 = new SequenceFeature("Pfam", "desc", 30, 60, Float.NaN, null); sfs.add(sf1); SequenceFeature sf2 = new SequenceFeature("Rfam", "desc", 40, 50, @@ -1061,12 +1058,10 @@ public class SequenceFeaturesTest SequenceFeature sf3 = new SequenceFeature("Rfam", "desc", 50, 60, Float.NaN, null); sfs.add(sf3); - SequenceFeature sf4 = new SequenceFeature("Xfam", "desc", 30, - 80, + SequenceFeature sf4 = new SequenceFeature("Xfam", "desc", 30, 80, Float.NaN, null); sfs.add(sf4); - SequenceFeature sf5 = new SequenceFeature("Xfam", "desc", 30, - 90, + SequenceFeature sf5 = new SequenceFeature("Xfam", "desc", 30, 90, Float.NaN, null); sfs.add(sf5); @@ -1125,12 +1120,14 @@ public class SequenceFeaturesTest assertTrue(features.contains(sf5)); // positional features for null group, specified type - features = store.getFeaturesForGroup(true, null, new String[] { "Pfam", - "Xfam" }); + features = store.getFeaturesForGroup(true, null, + new String[] + { "Pfam", "Xfam" }); assertEquals(features.size(), 1); assertTrue(features.contains(sf1)); - features = store.getFeaturesForGroup(true, null, new String[] { "Pfam", - "Xfam", "Cath" }); + features = store.getFeaturesForGroup(true, null, + new String[] + { "Pfam", "Xfam", "Cath" }); assertEquals(features.size(), 2); assertTrue(features.contains(sf1)); assertTrue(features.contains(sf5)); @@ -1146,7 +1143,8 @@ public class SequenceFeaturesTest "Rfam"); assertEquals(features.size(), 1); assertTrue(features.contains(sf3)); - assertTrue(store.getFeaturesForGroup(true, "Uniprot", "Cath").isEmpty()); + assertTrue( + store.getFeaturesForGroup(true, "Uniprot", "Cath").isEmpty()); // non-positional features for null group, any type features = store.getFeaturesForGroup(false, null); @@ -1191,17 +1189,17 @@ public class SequenceFeaturesTest // non-positional feature: SequenceFeature sf4 = new SequenceFeature("Pfam", "", 0, 0, 0f, null); store.add(sf4); - + /* * shift features right by 5 */ assertTrue(store.shiftFeatures(0, 5)); - + // non-positional features untouched: List nonPos = store.getNonPositionalFeatures(); assertEquals(nonPos.size(), 1); assertTrue(nonPos.contains(sf4)); - + // positional features are replaced List pos = store.getPositionalFeatures(); assertEquals(pos.size(), 3); @@ -1218,7 +1216,7 @@ public class SequenceFeaturesTest assertEquals(pos.get(2).getBegin(), 28); assertEquals(pos.get(2).getEnd(), 37); assertEquals(pos.get(2).getType(), "Disulfide bond"); - + /* * now shift left by 15 * feature at [7-10] should be removed diff --git a/test/jalview/ext/android/SparseIntArrayTest.java b/test/jalview/ext/android/SparseIntArrayTest.java index d9ed73d..9dc7dfb 100644 --- a/test/jalview/ext/android/SparseIntArrayTest.java +++ b/test/jalview/ext/android/SparseIntArrayTest.java @@ -60,7 +60,7 @@ public class SparseIntArrayTest public void testAdd() { SparseIntArray counter = new SparseIntArray(); - + assertEquals(counter.add('P', 2), 2); assertEquals(counter.add('P', 3), 5); counter.put('Q', 7); @@ -75,7 +75,7 @@ public class SparseIntArrayTest { // expected } - + counter.put('y', Integer.MIN_VALUE); try { diff --git a/test/jalview/ext/android/SparseShortArrayTest.java b/test/jalview/ext/android/SparseShortArrayTest.java index 034368f..0b11eb5 100644 --- a/test/jalview/ext/android/SparseShortArrayTest.java +++ b/test/jalview/ext/android/SparseShortArrayTest.java @@ -94,7 +94,7 @@ public class SparseShortArrayTest public void testAdd() { SparseShortArray counter = new SparseShortArray(); - + assertEquals(counter.add('P', 2), 2); assertEquals(counter.add('P', 3), 5); counter.put('Q', 7); @@ -110,7 +110,7 @@ public class SparseShortArrayTest { // expected; } - + // decrement giving underflow counter.put('y', Short.MIN_VALUE); try diff --git a/test/jalview/ext/ensembl/EnsemblCdnaTest.java b/test/jalview/ext/ensembl/EnsemblCdnaTest.java index c927f04..d2559ae 100644 --- a/test/jalview/ext/ensembl/EnsemblCdnaTest.java +++ b/test/jalview/ext/ensembl/EnsemblCdnaTest.java @@ -211,20 +211,21 @@ public class EnsemblCdnaTest String accId = "ABC123"; EnsemblCdna testee = new EnsemblCdna(); - SequenceFeature sf = new SequenceFeature("transcript", "", 20000, - 20500, 0f, null); + SequenceFeature sf = new SequenceFeature("transcript", "", 20000, 20500, + 0f, null); assertFalse(testee.retainFeature(sf, accId)); sf = new SequenceFeature("aberrant_processed_transcript", "", 20000, 20500, 0f, null); assertFalse(testee.retainFeature(sf, accId)); - sf = new SequenceFeature("NMD_transcript_variant", "", 20000, 20500, - 0f, null); + sf = new SequenceFeature("NMD_transcript_variant", "", 20000, 20500, 0f, + null); assertFalse(testee.retainFeature(sf, accId)); // other feature with no parent is retained - sf = new SequenceFeature("sequence_variant", "", 20000, 20500, 0f, null); + sf = new SequenceFeature("sequence_variant", "", 20000, 20500, 0f, + null); assertTrue(testee.retainFeature(sf, accId)); // other feature with desired parent is retained diff --git a/test/jalview/ext/ensembl/EnsemblCdsTest.java b/test/jalview/ext/ensembl/EnsemblCdsTest.java index e7574eb..b0a6a2d 100644 --- a/test/jalview/ext/ensembl/EnsemblCdsTest.java +++ b/test/jalview/ext/ensembl/EnsemblCdsTest.java @@ -135,8 +135,7 @@ public class EnsemblCdsTest assertFalse(testee.retainFeature(sf, accId)); // other feature with no parent is retained - sf = new SequenceFeature("anotherType", "", 20000, - 20500, 0f, null); + sf = new SequenceFeature("anotherType", "", 20000, 20500, 0f, null); assertTrue(testee.retainFeature(sf, accId)); // other feature with desired parent is retained diff --git a/test/jalview/ext/ensembl/EnsemblGeneTest.java b/test/jalview/ext/ensembl/EnsemblGeneTest.java index 2de08f5..4a6036f 100644 --- a/test/jalview/ext/ensembl/EnsemblGeneTest.java +++ b/test/jalview/ext/ensembl/EnsemblGeneTest.java @@ -153,8 +153,8 @@ public class EnsemblGeneTest genomic.addSequenceFeature(sf1); // transcript sub-type feature - SequenceFeature sf2 = new SequenceFeature("snRNA", "", 21000, 21500, - 0f, null); + SequenceFeature sf2 = new SequenceFeature("snRNA", "", 21000, 21500, 0f, + null); sf2.setValue("Parent", geneId); sf2.setValue("id", "transcript2"); genomic.addSequenceFeature(sf2); @@ -168,8 +168,8 @@ public class EnsemblGeneTest genomic.addSequenceFeature(sf3); // transcript for a different gene - ignored - SequenceFeature sf4 = new SequenceFeature("snRNA", "", 23000, 23500, - 0f, null); + SequenceFeature sf4 = new SequenceFeature("snRNA", "", 23000, 23500, 0f, + null); sf4.setValue("Parent", "XYZ"); sf4.setValue("id", "transcript4"); genomic.addSequenceFeature(sf4); @@ -210,8 +210,8 @@ public class EnsemblGeneTest sf.setValue("Parent", geneId); assertTrue(testee.retainFeature(sf, geneId)); - sf = new SequenceFeature("NMD_transcript_variant", "", 20000, 20500, - 0f, null); + sf = new SequenceFeature("NMD_transcript_variant", "", 20000, 20500, 0f, + null); sf.setValue("Parent", geneId); assertTrue(testee.retainFeature(sf, geneId)); @@ -247,12 +247,14 @@ public class EnsemblGeneTest seq.addSequenceFeature(sf3); // gene sub-type with right ID is valid - SequenceFeature sf4 = new SequenceFeature("snRNA_gene", "", 1, 2, 0f, null); + SequenceFeature sf4 = new SequenceFeature("snRNA_gene", "", 1, 2, 0f, + null); sf4.setValue("id", accId); seq.addSequenceFeature(sf4); // transcript not valid: - SequenceFeature sf5 = new SequenceFeature("transcript", "", 1, 2, 0f, null); + SequenceFeature sf5 = new SequenceFeature("transcript", "", 1, 2, 0f, + null); sf5.setValue("id", accId); seq.addSequenceFeature(sf5); @@ -260,7 +262,7 @@ public class EnsemblGeneTest SequenceFeature sf6 = new SequenceFeature("exon", "", 1, 2, 0f, null); sf6.setValue("id", accId); seq.addSequenceFeature(sf6); - + List sfs = new EnsemblGene() .getIdentifyingFeatures(seq, accId); assertFalse(sfs.contains(sf1)); @@ -291,10 +293,10 @@ public class EnsemblGeneTest assertTrue(fc.isFeatureHidden("transcript")); assertTrue(fc.isFeatureHidden("CDS")); - assertEquals(Color.RED, fc.getFeatureColour("sequence_variant") - .getColour()); - assertEquals(Color.RED, fc.getFeatureColour("feature_variant") - .getColour()); + assertEquals(Color.RED, + fc.getFeatureColour("sequence_variant").getColour()); + assertEquals(Color.RED, + fc.getFeatureColour("feature_variant").getColour()); assertTrue(fc.getFeatureColour("exon").isColourByLabel()); assertTrue(fc.getFeatureColour("coding_exon").isColourByLabel()); assertEquals(1, fc.compare("sequence_variant", "exon")); @@ -326,6 +328,6 @@ public class EnsemblGeneTest assertTrue(geneIds.contains("ENSDARG00000017661")); // zebrafish assertTrue(geneIds.contains("ENSGALG00000012865")); // chicken assertEquals(8, geneIds.size()); - + } } diff --git a/test/jalview/ext/ensembl/EnsemblGenomeTest.java b/test/jalview/ext/ensembl/EnsemblGenomeTest.java index 11140f9..0652dd6 100644 --- a/test/jalview/ext/ensembl/EnsemblGenomeTest.java +++ b/test/jalview/ext/ensembl/EnsemblGenomeTest.java @@ -75,8 +75,8 @@ public class EnsemblGenomeTest String transcriptId = "ABC123"; // transcript at (start+10000) length 501 - SequenceFeature sf = new SequenceFeature("transcript", "", 20000, - 20500, 0f, null); + SequenceFeature sf = new SequenceFeature("transcript", "", 20000, 20500, + 0f, null); sf.setValue("id", transcriptId); sf.setStrand("+"); genomic.addSequenceFeature(sf); @@ -89,8 +89,8 @@ public class EnsemblGenomeTest // Ensembl treats NMD_transcript_variant as if transcript // although strictly it is a sequence_variant in SO - sf = new SequenceFeature("NMD_transcript_variant", "", 11000, 12000, - 0f, null); + sf = new SequenceFeature("NMD_transcript_variant", "", 11000, 12000, 0f, + null); sf.setValue("id", transcriptId); sf.setStrand("+"); genomic.addSequenceFeature(sf); @@ -133,16 +133,16 @@ public class EnsemblGenomeTest String accId = "ABC123"; EnsemblGenome testee = new EnsemblGenome(); - SequenceFeature sf = new SequenceFeature("transcript", "", 20000, - 20500, 0f, null); + SequenceFeature sf = new SequenceFeature("transcript", "", 20000, 20500, + 0f, null); assertFalse(testee.retainFeature(sf, accId)); sf = new SequenceFeature("mature_transcript", "", 20000, 20500, 0f, null); assertFalse(testee.retainFeature(sf, accId)); - sf = new SequenceFeature("NMD_transcript_variant", "", 20000, 20500, - 0f, null); + sf = new SequenceFeature("NMD_transcript_variant", "", 20000, 20500, 0f, + null); assertFalse(testee.retainFeature(sf, accId)); // other feature with no parent is kept diff --git a/test/jalview/ext/ensembl/EnsemblRestClientTest.java b/test/jalview/ext/ensembl/EnsemblRestClientTest.java index 460d16c..09d86f8 100644 --- a/test/jalview/ext/ensembl/EnsemblRestClientTest.java +++ b/test/jalview/ext/ensembl/EnsemblRestClientTest.java @@ -45,8 +45,8 @@ public class EnsemblRestClientTest } else { - System.err - .println("Ensembl is DOWN or unreachable ******************* BAD!"); + System.err.println( + "Ensembl is DOWN or unreachable ******************* BAD!"); } } diff --git a/test/jalview/ext/ensembl/EnsemblSeqProxyTest.java b/test/jalview/ext/ensembl/EnsemblSeqProxyTest.java index e17b4a6..61d44d0 100644 --- a/test/jalview/ext/ensembl/EnsemblSeqProxyTest.java +++ b/test/jalview/ext/ensembl/EnsemblSeqProxyTest.java @@ -49,88 +49,80 @@ public class EnsemblSeqProxyTest JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION); } - private static final Object[][] allSeqs = new Object[][] { - { - new EnsemblProtein(), - "CCDS5863.1", - ">CCDS5863.1\n" - + "MAALSGGGGGGAEPGQALFNGDMEPEAGAGAGAAASSAADPAIPEEVWNIKQMIKLTQEH\n" - + "IEALLDKFGGEHNPPSIYLEAYEEYTSKLDALQQREQQLLESLGNGTDFSVSSSASMDTV\n" - + "TSSSSSSLSVLPSSLSVFQNPTDVARSNPKSPQKPIVRVFLPNKQRTVVPARCGVTVRDS\n" - + "LKKALMMRGLIPECCAVYRIQDGEKKPIGWDTDISWLTGEELHVEVLENVPLTTHNFVRK\n" - + "TFFTLAFCDFCRKLLFQGFRCQTCGYKFHQRCSTEVPLMCVNYDQLDLLFVSKFFEHHPI\n" - + "PQEEASLAETALTSGSSPSAPASDSIGPQILTSPSPSKSIPIPQPFRPADEDHRNQFGQR\n" - + "DRSSSAPNVHINTIEPVNIDDLIRDQGFRGDGGSTTGLSATPPASLPGSLTNVKALQKSP\n" - + "GPQRERKSSSSSEDRNRMKTLGRRDSSDDWEIPDGQITVGQRIGSGSFGTVYKGKWHGDV\n" - + "AVKMLNVTAPTPQQLQAFKNEVGVLRKTRHVNILLFMGYSTKPQLAIVTQWCEGSSLYHH\n" - + "LHIIETKFEMIKLIDIARQTAQGMDYLHAKSIIHRDLKSNNIFLHEDLTVKIGDFGLATV\n" - + "KSRWSGSHQFEQLSGSILWMAPEVIRMQDKNPYSFQSDVYAFGIVLYELMTGQLPYSNIN\n" - + "NRDQIIFMVGRGYLSPDLSKVRSNCPKAMKRLMAECLKKKRDERPLFPQILASIELLARS\n" - + "LPKIHRSASEPSLNRAGFQTEDFSLYACASPKTPIQAGGYGAFPVH\n" }, - { - new EnsemblCdna(), - "CCDS5863.1", - ">CCDS5863.1\n" - + "ATGGCGGCGCTGAGCGGTGGCGGTGGTGGCGGCGCGGAGCCGGGCCAGGCTCTGTTCAAC\n" - + "GGGGACATGGAGCCCGAGGCCGGCGCCGGCGCCGGCGCCGCGGCCTCTTCGGCTGCGGAC\n" - + "CCTGCCATTCCGGAGGAGGTGTGGAATATCAAACAAATGATTAAGTTGACACAGGAACAT\n" - + "ATAGAGGCCCTATTGGACAAATTTGGTGGGGAGCATAATCCACCATCAATATATCTGGAG\n" - + "GCCTATGAAGAATACACCAGCAAGCTAGATGCACTCCAACAAAGAGAACAACAGTTATTG\n" - + "GAATCTCTGGGGAACGGAACTGATTTTTCTGTTTCTAGCTCTGCATCAATGGATACCGTT\n" - + "ACATCTTCTTCCTCTTCTAGCCTTTCAGTGCTACCTTCATCTCTTTCAGTTTTTCAAAAT\n" - + "CCCACAGATGTGGCACGGAGCAACCCCAAGTCACCACAAAAACCTATCGTTAGAGTCTTC\n" - + "CTGCCCAACAAACAGAGGACAGTGGTACCTGCAAGGTGTGGAGTTACAGTCCGAGACAGT\n" - + "CTAAAGAAAGCACTGATGATGAGAGGTCTAATCCCAGAGTGCTGTGCTGTTTACAGAATT\n" - + "CAGGATGGAGAGAAGAAACCAATTGGTTGGGACACTGATATTTCCTGGCTTACTGGAGAA\n" - + "GAATTGCATGTGGAAGTGTTGGAGAATGTTCCACTTACAACACACAACTTTGTACGAAAA\n" - + "ACGTTTTTCACCTTAGCATTTTGTGACTTTTGTCGAAAGCTGCTTTTCCAGGGTTTCCGC\n" - + "TGTCAAACATGTGGTTATAAATTTCACCAGCGTTGTAGTACAGAAGTTCCACTGATGTGT\n" - + "GTTAATTATGACCAACTTGATTTGCTGTTTGTCTCCAAGTTCTTTGAACACCACCCAATA\n" - + "CCACAGGAAGAGGCGTCCTTAGCAGAGACTGCCCTAACATCTGGATCATCCCCTTCCGCA\n" - + "CCCGCCTCGGACTCTATTGGGCCCCAAATTCTCACCAGTCCGTCTCCTTCAAAATCCATT\n" - + "CCAATTCCACAGCCCTTCCGACCAGCAGATGAAGATCATCGAAATCAATTTGGGCAACGA\n" - + "GACCGATCCTCATCAGCTCCCAATGTGCATATAAACACAATAGAACCTGTCAATATTGAT\n" - + "GACTTGATTAGAGACCAAGGATTTCGTGGTGATGGAGGATCAACCACAGGTTTGTCTGCT\n" - + "ACCCCCCCTGCCTCATTACCTGGCTCACTAACTAACGTGAAAGCCTTACAGAAATCTCCA\n" - + "GGACCTCAGCGAGAAAGGAAGTCATCTTCATCCTCAGAAGACAGGAATCGAATGAAAACA\n" - + "CTTGGTAGACGGGACTCGAGTGATGATTGGGAGATTCCTGATGGGCAGATTACAGTGGGA\n" - + "CAAAGAATTGGATCTGGATCATTTGGAACAGTCTACAAGGGAAAGTGGCATGGTGATGTG\n" - + "GCAGTGAAAATGTTGAATGTGACAGCACCTACACCTCAGCAGTTACAAGCCTTCAAAAAT\n" - + "GAAGTAGGAGTACTCAGGAAAACACGACATGTGAATATCCTACTCTTCATGGGCTATTCC\n" - + "ACAAAGCCACAACTGGCTATTGTTACCCAGTGGTGTGAGGGCTCCAGCTTGTATCACCAT\n" - + "CTCCATATCATTGAGACCAAATTTGAGATGATCAAACTTATAGATATTGCACGACAGACT\n" - + "GCACAGGGCATGGATTACTTACACGCCAAGTCAATCATCCACAGAGACCTCAAGAGTAAT\n" - + "AATATATTTCTTCATGAAGACCTCACAGTAAAAATAGGTGATTTTGGTCTAGCTACAGTG\n" - + "AAATCTCGATGGAGTGGGTCCCATCAGTTTGAACAGTTGTCTGGATCCATTTTGTGGATG\n" - + "GCACCAGAAGTCATCAGAATGCAAGATAAAAATCCATACAGCTTTCAGTCAGATGTATAT\n" - + "GCATTTGGAATTGTTCTGTATGAATTGATGACTGGACAGTTACCTTATTCAAACATCAAC\n" - + "AACAGGGACCAGATAATTTTTATGGTGGGACGAGGATACCTGTCTCCAGATCTCAGTAAG\n" - + "GTACGGAGTAACTGTCCAAAAGCCATGAAGAGATTAATGGCAGAGTGCCTCAAAAAGAAA\n" - + "AGAGATGAGAGACCACTCTTTCCCCAAATTCTCGCCTCTATTGAGCTGCTGGCCCGCTCA\n" - + "TTGCCAAAAATTCACCGCAGTGCATCAGAACCCTCCTTGAATCGGGCTGGTTTCCAAACA\n" - + "GAGGATTTTAGTCTATATGCTTGTGCTTCTCCAAAAACACCCATCCAGGCAGGGGGATAT\n" - + "GGTGCGTTTCCTGTCCACTGA\n" }, - { - new EnsemblProtein(), - "ENSP00000288602", - ">ENSP00000288602\n" - + "MAALSGGGGGGAEPGQALFNGDMEPEAGAGAGAAASSAADPAIPEEVWNIKQMIKLTQEH\n" - + "IEALLDKFGGEHNPPSIYLEAYEEYTSKLDALQQREQQLLESLGNGTDFSVSSSASMDTV\n" - + "TSSSSSSLSVLPSSLSVFQNPTDVARSNPKSPQKPIVRVFLPNKQRTVVPARCGVTVRDS\n" - + "LKKALMMRGLIPECCAVYRIQDGEKKPIGWDTDISWLTGEELHVEVLENVPLTTHNFVRK\n" - + "TFFTLAFCDFCRKLLFQGFRCQTCGYKFHQRCSTEVPLMCVNYDQLDLLFVSKFFEHHPI\n" - + "PQEEASLAETALTSGSSPSAPASDSIGPQILTSPSPSKSIPIPQPFRPADEDHRNQFGQR\n" - + "DRSSSAPNVHINTIEPVNIDDLIRDQGFRGDG\n" - // ? insertion added in ENSP00000288602.11, not in P15056 - + "APLNQLMRCLRKYQSRTPSPLLHSVPSEIVFDFEPGPVFR\n" - // end insertion - + "GSTTGLSATPPASLPGSLTNVKALQKSP\n" - + "GPQRERKSSSSSEDRNRMKTLGRRDSSDDWEIPDGQITVGQRIGSGSFGTVYKGKWHGDV\n" - + "AVKMLNVTAPTPQQLQAFKNEVGVLRKTRHVNILLFMGYSTKPQLAIVTQWCEGSSLYHH\n" - + "LHIIETKFEMIKLIDIARQTAQGMDYLHAKSIIHRDLKSNNIFLHEDLTVKIGDFGLATV\n" - + "KSRWSGSHQFEQLSGSILWMAPEVIRMQDKNPYSFQSDVYAFGIVLYELMTGQLPYSNIN\n" - + "NRDQIIFMVGRGYLSPDLSKVRSNCPKAMKRLMAECLKKKRDERPLFPQILASIELLARS\n" - + "LPKIHRSASEPSLNRAGFQTEDFSLYACASPKTPIQAGGYGAFPVH" } }; + private static final Object[][] allSeqs = new Object[][] { { + new EnsemblProtein(), "CCDS5863.1", + ">CCDS5863.1\n" + + "MAALSGGGGGGAEPGQALFNGDMEPEAGAGAGAAASSAADPAIPEEVWNIKQMIKLTQEH\n" + + "IEALLDKFGGEHNPPSIYLEAYEEYTSKLDALQQREQQLLESLGNGTDFSVSSSASMDTV\n" + + "TSSSSSSLSVLPSSLSVFQNPTDVARSNPKSPQKPIVRVFLPNKQRTVVPARCGVTVRDS\n" + + "LKKALMMRGLIPECCAVYRIQDGEKKPIGWDTDISWLTGEELHVEVLENVPLTTHNFVRK\n" + + "TFFTLAFCDFCRKLLFQGFRCQTCGYKFHQRCSTEVPLMCVNYDQLDLLFVSKFFEHHPI\n" + + "PQEEASLAETALTSGSSPSAPASDSIGPQILTSPSPSKSIPIPQPFRPADEDHRNQFGQR\n" + + "DRSSSAPNVHINTIEPVNIDDLIRDQGFRGDGGSTTGLSATPPASLPGSLTNVKALQKSP\n" + + "GPQRERKSSSSSEDRNRMKTLGRRDSSDDWEIPDGQITVGQRIGSGSFGTVYKGKWHGDV\n" + + "AVKMLNVTAPTPQQLQAFKNEVGVLRKTRHVNILLFMGYSTKPQLAIVTQWCEGSSLYHH\n" + + "LHIIETKFEMIKLIDIARQTAQGMDYLHAKSIIHRDLKSNNIFLHEDLTVKIGDFGLATV\n" + + "KSRWSGSHQFEQLSGSILWMAPEVIRMQDKNPYSFQSDVYAFGIVLYELMTGQLPYSNIN\n" + + "NRDQIIFMVGRGYLSPDLSKVRSNCPKAMKRLMAECLKKKRDERPLFPQILASIELLARS\n" + + "LPKIHRSASEPSLNRAGFQTEDFSLYACASPKTPIQAGGYGAFPVH\n" }, + { new EnsemblCdna(), "CCDS5863.1", ">CCDS5863.1\n" + + "ATGGCGGCGCTGAGCGGTGGCGGTGGTGGCGGCGCGGAGCCGGGCCAGGCTCTGTTCAAC\n" + + "GGGGACATGGAGCCCGAGGCCGGCGCCGGCGCCGGCGCCGCGGCCTCTTCGGCTGCGGAC\n" + + "CCTGCCATTCCGGAGGAGGTGTGGAATATCAAACAAATGATTAAGTTGACACAGGAACAT\n" + + "ATAGAGGCCCTATTGGACAAATTTGGTGGGGAGCATAATCCACCATCAATATATCTGGAG\n" + + "GCCTATGAAGAATACACCAGCAAGCTAGATGCACTCCAACAAAGAGAACAACAGTTATTG\n" + + "GAATCTCTGGGGAACGGAACTGATTTTTCTGTTTCTAGCTCTGCATCAATGGATACCGTT\n" + + "ACATCTTCTTCCTCTTCTAGCCTTTCAGTGCTACCTTCATCTCTTTCAGTTTTTCAAAAT\n" + + "CCCACAGATGTGGCACGGAGCAACCCCAAGTCACCACAAAAACCTATCGTTAGAGTCTTC\n" + + "CTGCCCAACAAACAGAGGACAGTGGTACCTGCAAGGTGTGGAGTTACAGTCCGAGACAGT\n" + + "CTAAAGAAAGCACTGATGATGAGAGGTCTAATCCCAGAGTGCTGTGCTGTTTACAGAATT\n" + + "CAGGATGGAGAGAAGAAACCAATTGGTTGGGACACTGATATTTCCTGGCTTACTGGAGAA\n" + + "GAATTGCATGTGGAAGTGTTGGAGAATGTTCCACTTACAACACACAACTTTGTACGAAAA\n" + + "ACGTTTTTCACCTTAGCATTTTGTGACTTTTGTCGAAAGCTGCTTTTCCAGGGTTTCCGC\n" + + "TGTCAAACATGTGGTTATAAATTTCACCAGCGTTGTAGTACAGAAGTTCCACTGATGTGT\n" + + "GTTAATTATGACCAACTTGATTTGCTGTTTGTCTCCAAGTTCTTTGAACACCACCCAATA\n" + + "CCACAGGAAGAGGCGTCCTTAGCAGAGACTGCCCTAACATCTGGATCATCCCCTTCCGCA\n" + + "CCCGCCTCGGACTCTATTGGGCCCCAAATTCTCACCAGTCCGTCTCCTTCAAAATCCATT\n" + + "CCAATTCCACAGCCCTTCCGACCAGCAGATGAAGATCATCGAAATCAATTTGGGCAACGA\n" + + "GACCGATCCTCATCAGCTCCCAATGTGCATATAAACACAATAGAACCTGTCAATATTGAT\n" + + "GACTTGATTAGAGACCAAGGATTTCGTGGTGATGGAGGATCAACCACAGGTTTGTCTGCT\n" + + "ACCCCCCCTGCCTCATTACCTGGCTCACTAACTAACGTGAAAGCCTTACAGAAATCTCCA\n" + + "GGACCTCAGCGAGAAAGGAAGTCATCTTCATCCTCAGAAGACAGGAATCGAATGAAAACA\n" + + "CTTGGTAGACGGGACTCGAGTGATGATTGGGAGATTCCTGATGGGCAGATTACAGTGGGA\n" + + "CAAAGAATTGGATCTGGATCATTTGGAACAGTCTACAAGGGAAAGTGGCATGGTGATGTG\n" + + "GCAGTGAAAATGTTGAATGTGACAGCACCTACACCTCAGCAGTTACAAGCCTTCAAAAAT\n" + + "GAAGTAGGAGTACTCAGGAAAACACGACATGTGAATATCCTACTCTTCATGGGCTATTCC\n" + + "ACAAAGCCACAACTGGCTATTGTTACCCAGTGGTGTGAGGGCTCCAGCTTGTATCACCAT\n" + + "CTCCATATCATTGAGACCAAATTTGAGATGATCAAACTTATAGATATTGCACGACAGACT\n" + + "GCACAGGGCATGGATTACTTACACGCCAAGTCAATCATCCACAGAGACCTCAAGAGTAAT\n" + + "AATATATTTCTTCATGAAGACCTCACAGTAAAAATAGGTGATTTTGGTCTAGCTACAGTG\n" + + "AAATCTCGATGGAGTGGGTCCCATCAGTTTGAACAGTTGTCTGGATCCATTTTGTGGATG\n" + + "GCACCAGAAGTCATCAGAATGCAAGATAAAAATCCATACAGCTTTCAGTCAGATGTATAT\n" + + "GCATTTGGAATTGTTCTGTATGAATTGATGACTGGACAGTTACCTTATTCAAACATCAAC\n" + + "AACAGGGACCAGATAATTTTTATGGTGGGACGAGGATACCTGTCTCCAGATCTCAGTAAG\n" + + "GTACGGAGTAACTGTCCAAAAGCCATGAAGAGATTAATGGCAGAGTGCCTCAAAAAGAAA\n" + + "AGAGATGAGAGACCACTCTTTCCCCAAATTCTCGCCTCTATTGAGCTGCTGGCCCGCTCA\n" + + "TTGCCAAAAATTCACCGCAGTGCATCAGAACCCTCCTTGAATCGGGCTGGTTTCCAAACA\n" + + "GAGGATTTTAGTCTATATGCTTGTGCTTCTCCAAAAACACCCATCCAGGCAGGGGGATAT\n" + + "GGTGCGTTTCCTGTCCACTGA\n" }, + { new EnsemblProtein(), "ENSP00000288602", ">ENSP00000288602\n" + + "MAALSGGGGGGAEPGQALFNGDMEPEAGAGAGAAASSAADPAIPEEVWNIKQMIKLTQEH\n" + + "IEALLDKFGGEHNPPSIYLEAYEEYTSKLDALQQREQQLLESLGNGTDFSVSSSASMDTV\n" + + "TSSSSSSLSVLPSSLSVFQNPTDVARSNPKSPQKPIVRVFLPNKQRTVVPARCGVTVRDS\n" + + "LKKALMMRGLIPECCAVYRIQDGEKKPIGWDTDISWLTGEELHVEVLENVPLTTHNFVRK\n" + + "TFFTLAFCDFCRKLLFQGFRCQTCGYKFHQRCSTEVPLMCVNYDQLDLLFVSKFFEHHPI\n" + + "PQEEASLAETALTSGSSPSAPASDSIGPQILTSPSPSKSIPIPQPFRPADEDHRNQFGQR\n" + + "DRSSSAPNVHINTIEPVNIDDLIRDQGFRGDG\n" + // ? insertion added in ENSP00000288602.11, not in P15056 + + "APLNQLMRCLRKYQSRTPSPLLHSVPSEIVFDFEPGPVFR\n" + // end insertion + + "GSTTGLSATPPASLPGSLTNVKALQKSP\n" + + "GPQRERKSSSSSEDRNRMKTLGRRDSSDDWEIPDGQITVGQRIGSGSFGTVYKGKWHGDV\n" + + "AVKMLNVTAPTPQQLQAFKNEVGVLRKTRHVNILLFMGYSTKPQLAIVTQWCEGSSLYHH\n" + + "LHIIETKFEMIKLIDIARQTAQGMDYLHAKSIIHRDLKSNNIFLHEDLTVKIGDFGLATV\n" + + "KSRWSGSHQFEQLSGSILWMAPEVIRMQDKNPYSFQSDVYAFGIVLYELMTGQLPYSNIN\n" + + "NRDQIIFMVGRGYLSPDLSKVRSNCPKAMKRLMAECLKKKRDERPLFPQILASIELLARS\n" + + "LPKIHRSASEPSLNRAGFQTEDFSLYACASPKTPIQAGGYGAFPVH" } }; @BeforeClass(alwaysRun = true) public void setUp() @@ -165,14 +157,12 @@ public class EnsemblSeqProxyTest for (SequenceI tr : expected) { SequenceI[] rseq; - Assert.assertNotNull( - rseq = retrieved.findSequenceMatch(tr.getName()), + Assert.assertNotNull(rseq = retrieved.findSequenceMatch(tr.getName()), "Couldn't find sequences matching expected sequence " + tr.getName()); Assert.assertEquals(rseq.length, 1, "Expected only one sequence for sequence ID " + tr.getName()); - Assert.assertEquals( - rseq[0].getSequenceAsString(), + Assert.assertEquals(rseq[0].getSequenceAsString(), tr.getSequenceAsString(), "Sequences differ for " + tr.getName() + "\n" + "Exp:" + tr.getSequenceAsString() + "\n" + "Got:" @@ -216,8 +206,8 @@ public class EnsemblSeqProxyTest public void testReverseComplementAlleles() { String alleles = "C,G,-TAC,HGMD_MUTATION,gac"; - SequenceFeature sf = new SequenceFeature("sequence_variant", alleles, - 1, 2, 0f, null); + SequenceFeature sf = new SequenceFeature("sequence_variant", alleles, 1, + 2, 0f, null); sf.setValue("alleles", alleles); EnsemblSeqProxy.reverseComplementAlleles(sf); diff --git a/test/jalview/ext/ensembl/EnsemblXrefTest.java b/test/jalview/ext/ensembl/EnsemblXrefTest.java index 07f8892..9247316 100644 --- a/test/jalview/ext/ensembl/EnsemblXrefTest.java +++ b/test/jalview/ext/ensembl/EnsemblXrefTest.java @@ -62,11 +62,12 @@ public class EnsemblXrefTest dbVers) { @SuppressWarnings("unchecked") - @Override - protected Object getJSON(URL url, List ids, int msDelay, int mode, String mapKey) throws IOException, ParseException - { - return ((List)JSONUtils.parse(JSON)).iterator(); - } + @Override + protected Object getJSON(URL url, List ids, int msDelay, + int mode, String mapKey) throws IOException, ParseException + { + return ((List) JSONUtils.parse(JSON)).iterator(); + } }; diff --git a/test/jalview/ext/htsjdk/VCFReaderTest.java b/test/jalview/ext/htsjdk/VCFReaderTest.java index bf617ae..e3bef41 100644 --- a/test/jalview/ext/htsjdk/VCFReaderTest.java +++ b/test/jalview/ext/htsjdk/VCFReaderTest.java @@ -16,8 +16,7 @@ import org.testng.annotations.Test; public class VCFReaderTest { - private static final String[] VCF = new String[] { - "##fileformat=VCFv4.2", + private static final String[] VCF = new String[] { "##fileformat=VCFv4.2", "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO", "20\t3\t.\tC\tG\t.\tPASS\tDP=100", // SNP C/G "20\t7\t.\tG\tGA\t.\tPASS\tDP=100", // insertion G/GA @@ -102,13 +101,14 @@ public class VCFReaderTest File f = File.createTempFile("Test", "vcf"); f.deleteOnExit(); PrintWriter pw = new PrintWriter(f); - for (String vcfLine : VCF) { + for (String vcfLine : VCF) + { pw.println(vcfLine); } pw.close(); return f; } - + /** * A 'test' that demonstrates querying an indexed VCF file for features in a * specified interval @@ -122,7 +122,7 @@ public class VCFReaderTest * if not specified, assumes index file is filename.tbi */ VCFReader reader = new VCFReader(VCF_PATH); - + /* * gene NMT1 (human) is on chromosome 17 * GCHR38 (Ensembl): 45051610-45109016 @@ -159,7 +159,7 @@ public class VCFReaderTest } // "https://storage.cloud.google.com/gnomad-public/release/2.0.1/vcf/exomes/gnomad.exomes.r2.0.1.sites.vcf.gz"; - + /** * Test the query method that wraps a non-indexed VCF file * @@ -175,7 +175,7 @@ public class VCFReaderTest * query for overlap of 5-8 - should find variant at 7 */ CloseableIterator variants = reader.query("20", 5, 8); - + /* * INDEL G/GA variant */ diff --git a/test/jalview/ext/jmol/JmolCommandsTest.java b/test/jalview/ext/jmol/JmolCommandsTest.java index 6265c05..9684603 100644 --- a/test/jalview/ext/jmol/JmolCommandsTest.java +++ b/test/jalview/ext/jmol/JmolCommandsTest.java @@ -94,9 +94,8 @@ public class JmolCommandsTest "B", map, null); ssm.addStructureMapping(sm2); - String[] commands = testee.colourBySequence(ssm, - files, - seqs, sr, af.alignPanel); + String[] commands = testee.colourBySequence(ssm, files, seqs, sr, + af.alignPanel); assertEquals(commands.length, 2); String chainACommand = commands[0]; @@ -133,9 +132,11 @@ public class JmolCommandsTest AtomSpecModel model = new AtomSpecModel(); assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), ""); model.addRange("1", 2, 4, "A"); - assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), "2-4:A/1.1"); + assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), + "2-4:A/1.1"); model.addRange("1", 8, 8, "A"); - assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), "2-4:A/1.1|8:A/1.1"); + assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), + "2-4:A/1.1|8:A/1.1"); model.addRange("1", 5, 7, "B"); assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), "2-4:A/1.1|8:A/1.1|5-7:B/1.1"); @@ -200,7 +201,8 @@ public class JmolCommandsTest toAlign.addRange("2", 20, 21, "B"); toAlign.addRange("2", 22, 22, "C"); List command = testee.superposeStructures(ref, - toAlign, AtomSpecType.ALPHA); // doesn't matter for Jmol whether nuc or protein + toAlign, AtomSpecType.ALPHA); // doesn't matter for Jmol whether nuc + // or protein assertEquals(command.size(), 1); String refSpec = "12-14:A/1.1|18:B/1.1|22-23:B/1.1"; String toAlignSpec = "15-17:B/2.1|20-21:B/2.1|22:C/2.1"; diff --git a/test/jalview/ext/jmol/JmolParserTest.java b/test/jalview/ext/jmol/JmolParserTest.java index 10882d3..73f7907 100644 --- a/test/jalview/ext/jmol/JmolParserTest.java +++ b/test/jalview/ext/jmol/JmolParserTest.java @@ -279,7 +279,8 @@ public class JmolParserTest /* * local structures have a fake ID */ - assertTrue(structureData.getSeqs().get(0).getAllPDBEntries().get(0).fakedPDBId()); + assertTrue(structureData.getSeqs().get(0).getAllPDBEntries().get(0) + .fakedPDBId()); /* * the ID is also the group for features derived from structure data */ diff --git a/test/jalview/ext/jmol/JmolVsJalviewPDBParserEndToEndTest.java b/test/jalview/ext/jmol/JmolVsJalviewPDBParserEndToEndTest.java index 382e208..0bc41a3 100644 --- a/test/jalview/ext/jmol/JmolVsJalviewPDBParserEndToEndTest.java +++ b/test/jalview/ext/jmol/JmolVsJalviewPDBParserEndToEndTest.java @@ -62,8 +62,8 @@ public class JmolVsJalviewPDBParserEndToEndTest { if (args == null || args[0] == null) { - System.err - .println("You must provide a PDB directory in the launch argument"); + System.err.println( + "You must provide a PDB directory in the launch argument"); return; } @@ -86,7 +86,8 @@ public class JmolVsJalviewPDBParserEndToEndTest JmolParser jtest = null; try { - mctest = new PDBfile(false, false, false, testFile, DataSourceType.FILE); + mctest = new PDBfile(false, false, false, testFile, + DataSourceType.FILE); jtest = new JmolParser(testFile, DataSourceType.FILE); } catch (IOException e) { @@ -118,13 +119,12 @@ public class JmolVsJalviewPDBParserEndToEndTest int count = 0; System.out.println("\n\nTotal sequence Scanned : " + totalSeqScanned); - System.out.println("Total sequence passed : " - + (totalSeqScanned - totalFail)); + System.out.println( + "Total sequence passed : " + (totalSeqScanned - totalFail)); System.out.println("Total sequence failed : " + totalFail); - System.out - .println("Success rate: " - + ((totalSeqScanned - totalFail) * 100) - / totalSeqScanned + "%"); + System.out.println("Success rate: " + + ((totalSeqScanned - totalFail) * 100) / totalSeqScanned + + "%"); System.out.println("\nList of " + failedFiles.size() + " file(s) with sequence diffs:"); for (String problemFile : failedFiles) diff --git a/test/jalview/ext/paradise/TestAnnotate3D.java b/test/jalview/ext/paradise/TestAnnotate3D.java index 80fffff..6d54f15 100644 --- a/test/jalview/ext/paradise/TestAnnotate3D.java +++ b/test/jalview/ext/paradise/TestAnnotate3D.java @@ -70,14 +70,14 @@ public class TestAnnotate3D { Iterator ids = Annotate3D.getRNAMLForPDBId("2GIS"); assertTrue("Didn't retrieve 2GIS by id.", ids != null); - Iterator files = Annotate3D.getRNAMLForPDBFileAsString(FileUtil - .readFileToString(new File("examples/2GIS.pdb"))); + Iterator files = Annotate3D.getRNAMLForPDBFileAsString( + FileUtil.readFileToString(new File("examples/2GIS.pdb"))); assertTrue("Didn't retrieve using examples/2GIS.pdb.", files != null); int i = 0; while (ids.hasNext() && files.hasNext()) { - BufferedReader file = new BufferedReader(files.next()), id = new BufferedReader( - ids.next()); + BufferedReader file = new BufferedReader(files.next()), + id = new BufferedReader(ids.next()); String iline, fline; do { @@ -117,9 +117,8 @@ public class TestAnnotate3D Assert.assertTrue(pdbf.isValid()); // Comment - should add new FileParse constructor like new FileParse(Reader // ..). for direct reading - Iterator readers = Annotate3D - .getRNAMLForPDBFileAsString(FileUtil.readFileToString(new File( - "examples/2GIS.pdb"))); + Iterator readers = Annotate3D.getRNAMLForPDBFileAsString( + FileUtil.readFileToString(new File("examples/2GIS.pdb"))); testRNAMLcontent(readers, pdbf); } @@ -166,13 +165,13 @@ public class TestAnnotate3D } if (struseq == null) { - AssertJUnit - .fail("Couldn't find this sequence in original input:\n" - + new FastaFile().print( - new SequenceI[] { sq }, true) - + "\n\nOriginal input:\n" - + new FastaFile().print( - pdbf.getSeqsAsArray(), true) + "\n"); + AssertJUnit.fail( + "Couldn't find this sequence in original input:\n" + + new FastaFile().print(new SequenceI[] + { sq }, true) + "\n\nOriginal input:\n" + + new FastaFile().print(pdbf.getSeqsAsArray(), + true) + + "\n"); } } } diff --git a/test/jalview/ext/pymol/PymolCommandsTest.java b/test/jalview/ext/pymol/PymolCommandsTest.java index d5dbc86..168e707 100644 --- a/test/jalview/ext/pymol/PymolCommandsTest.java +++ b/test/jalview/ext/pymol/PymolCommandsTest.java @@ -69,11 +69,9 @@ public class PymolCommandsTest assertEquals(commands.size(), 3); assertEquals(commands.get(0), new StructureCommand("color", "0x0000ff", "0//A/2-5+9-23/ 0//B/7/ 1//A/1/ 1//B/4-7/")); - assertEquals(commands.get( - 1), + assertEquals(commands.get(1), new StructureCommand("color", "0xffff00", "1//A/3-5+8/")); - assertEquals(commands.get( - 2), + assertEquals(commands.get(2), new StructureCommand("color", "0xff0000", "0//A/3-9/")); } @@ -83,13 +81,17 @@ public class PymolCommandsTest AtomSpecModel model = new AtomSpecModel(); assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), ""); model.addRange("1", 2, 4, "A"); - assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), "1//A/2-4/"); + assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), + "1//A/2-4/"); model.addRange("1", 8, 8, "A"); - assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), "1//A/2-4+8/"); + assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), + "1//A/2-4+8/"); model.addRange("1", 5, 7, "B"); - assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), "1//A/2-4+8/ 1//B/5-7/"); + assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), + "1//A/2-4+8/ 1//B/5-7/"); model.addRange("1", 3, 5, "A"); - assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), "1//A/2-5+8/ 1//B/5-7/"); + assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), + "1//A/2-5+8/ 1//B/5-7/"); model.addRange("0", 1, 4, "B"); assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), "0//B/1-4/ 1//A/2-5+8/ 1//B/5-7/"); @@ -129,10 +131,10 @@ public class PymolCommandsTest String toAlignSpecCA = "(2//B/15-17+20-21/CA 2//C/22/CA"; String refSpec = "1//A/12-14/ 1//B/18+22-23/"; String toAlignSpec = "2//B/15-17+20-21/ 2//C/22/"; - String altLoc = " and (altloc '' or altloc 'a'))"; + String altLoc = " and (altloc '' or altloc 'a'))"; // super command: separate arguments for regions to align - assertEquals(commands.get(1), - new StructureCommand("pair_fit", toAlignSpecCA+altLoc, refSpecCA+altLoc)); + assertEquals(commands.get(1), new StructureCommand("pair_fit", + toAlignSpecCA + altLoc, refSpecCA + altLoc)); // show aligned regions: one argument for combined atom specs assertEquals(commands.get(3), new StructureCommand("show", "cartoon", refSpec + " " + toAlignSpec)); @@ -144,9 +146,11 @@ public class PymolCommandsTest AtomSpecModel model = new AtomSpecModel(); assertEquals(testee.getAtomSpec(model, AtomSpecType.ALPHA), ""); model.addRange("1", 2, 4, "A"); - assertEquals(testee.getAtomSpec(model, AtomSpecType.ALPHA), "1//A/2-4/CA"); + assertEquals(testee.getAtomSpec(model, AtomSpecType.ALPHA), + "1//A/2-4/CA"); model.addRange("1", 8, 8, "A"); - assertEquals(testee.getAtomSpec(model, AtomSpecType.ALPHA), "1//A/2-4+8/CA"); + assertEquals(testee.getAtomSpec(model, AtomSpecType.ALPHA), + "1//A/2-4+8/CA"); model.addRange("1", 5, 7, "B"); assertEquals(testee.getAtomSpec(model, AtomSpecType.ALPHA), "1//A/2-4+8/CA 1//B/5-7/CA"); @@ -239,8 +243,7 @@ public class PymolCommandsTest @Test(groups = "Functional") public void testColourResidues() { - assertEquals(testee.colourResidues("something", - Color.MAGENTA), + assertEquals(testee.colourResidues("something", Color.MAGENTA), new StructureCommand("color", "0xff00ff", "something")); } @@ -254,8 +257,7 @@ public class PymolCommandsTest @Test(groups = "Functional") public void testSetBackgroundColour() { - assertEquals(testee.setBackgroundColour( - Color.PINK), + assertEquals(testee.setBackgroundColour(Color.PINK), new StructureCommand("bg_color", "0xffafaf")); } diff --git a/test/jalview/ext/pymol/PymolManagerTest.java b/test/jalview/ext/pymol/PymolManagerTest.java index c415ace..e246b7c 100644 --- a/test/jalview/ext/pymol/PymolManagerTest.java +++ b/test/jalview/ext/pymol/PymolManagerTest.java @@ -21,10 +21,11 @@ public class PymolManagerTest req = PymolManager .getPostRequest(new StructureCommand("foobar", "blue", "all")); - assertEquals(req, "foobar" - + "blue" - + "all" - + ""); + assertEquals(req, + "foobar" + + "blue" + + "all" + + ""); } @Test(groups = "Functional") diff --git a/test/jalview/ext/rbvi/chimera/ChimeraCommandsTest.java b/test/jalview/ext/rbvi/chimera/ChimeraCommandsTest.java index 23e42ca..d71b5fd 100644 --- a/test/jalview/ext/rbvi/chimera/ChimeraCommandsTest.java +++ b/test/jalview/ext/rbvi/chimera/ChimeraCommandsTest.java @@ -148,11 +148,9 @@ public class ChimeraCommandsTest assertEquals(testee.makeAttributeName(null), "jv_"); assertEquals(testee.makeAttributeName(""), "jv_"); assertEquals(testee.makeAttributeName("helix"), "jv_helix"); - assertEquals(testee.makeAttributeName( - "Hello World 24"), + assertEquals(testee.makeAttributeName("Hello World 24"), "jv_Hello_World_24"); - assertEquals(testee.makeAttributeName( - "!this is-a_very*{odd(name"), + assertEquals(testee.makeAttributeName("!this is-a_very*{odd(name"), "jv__this_is_a_very__odd_name"); // name ending in color gets underscore appended assertEquals(testee.makeAttributeName("helixColor"), "jv_helixColor_"); @@ -164,13 +162,17 @@ public class ChimeraCommandsTest AtomSpecModel model = new AtomSpecModel(); assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), ""); model.addRange("1", 2, 4, "A"); - assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), "#1:2-4.A"); + assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), + "#1:2-4.A"); model.addRange("1", 8, 8, "A"); - assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), "#1:2-4.A,8.A"); + assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), + "#1:2-4.A,8.A"); model.addRange("1", 5, 7, "B"); - assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), "#1:2-4.A,8.A,5-7.B"); + assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), + "#1:2-4.A,8.A,5-7.B"); model.addRange("1", 3, 5, "A"); - assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), "#1:2-5.A,8.A,5-7.B"); + assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), + "#1:2-5.A,8.A,5-7.B"); model.addRange("0", 1, 4, "B"); assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), "#0:1-4.B|#1:2-5.A,8.A,5-7.B"); @@ -320,16 +322,15 @@ public class ChimeraCommandsTest { List cmds = testee.colourByCharge(); assertEquals(cmds.size(), 1); - assertEquals(cmds.get(0) - .getCommand(), + assertEquals(cmds.get(0).getCommand(), "color white;color red ::ASP,GLU;color blue ::LYS,ARG;color yellow ::CYS"); } @Test(groups = "Functional") public void testGetColourCommand() { - assertEquals(testee.colourResidues("something", Color.MAGENTA) - .getCommand(), + assertEquals( + testee.colourResidues("something", Color.MAGENTA).getCommand(), "color #ff00ff something"); } @@ -382,8 +383,10 @@ public class ChimeraCommandsTest { List cmds = testee.startNotifications("to here"); assertEquals(cmds.size(), 2); - assertEquals(cmds.get(0), new StructureCommand("listen start models url to here")); - assertEquals(cmds.get(1), new StructureCommand("listen start select prefix SelectionChanged url to here")); + assertEquals(cmds.get(0), + new StructureCommand("listen start models url to here")); + assertEquals(cmds.get(1), new StructureCommand( + "listen start select prefix SelectionChanged url to here")); } @Test(groups = "Functional") @@ -392,6 +395,7 @@ public class ChimeraCommandsTest List cmds = testee.stopNotifications(); assertEquals(cmds.size(), 2); assertEquals(cmds.get(0), new StructureCommand("listen stop models")); - assertEquals(cmds.get(1), new StructureCommand("listen stop selection")); + assertEquals(cmds.get(1), + new StructureCommand("listen stop selection")); } } diff --git a/test/jalview/ext/rbvi/chimera/ChimeraXCommandsTest.java b/test/jalview/ext/rbvi/chimera/ChimeraXCommandsTest.java index 143a5d8..03bfbcd 100644 --- a/test/jalview/ext/rbvi/chimera/ChimeraXCommandsTest.java +++ b/test/jalview/ext/rbvi/chimera/ChimeraXCommandsTest.java @@ -188,7 +188,7 @@ public class ChimeraXCommandsTest toAlign.addRange("2", 20, 21, "B"); toAlign.addRange("2", 22, 22, "C"); List command = testee.superposeStructures(ref, - toAlign,AtomSpecType.ALPHA); + toAlign, AtomSpecType.ALPHA); assertEquals(command.size(), 1); String cmd = command.get(0).getCommand(); String refSpec = "#1/A:12-14/B:18,22-23"; @@ -208,16 +208,19 @@ public class ChimeraXCommandsTest public void testGetAtomSpec() { AtomSpecModel model = new AtomSpecModel(); - assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY - ), ""); + assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), ""); model.addRange("1", 2, 4, "A"); - assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), "#1/A:2-4"); + assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), + "#1/A:2-4"); model.addRange("1", 8, 8, "A"); - assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), "#1/A:2-4,8"); + assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), + "#1/A:2-4,8"); model.addRange("1", 5, 7, "B"); - assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), "#1/A:2-4,8/B:5-7"); + assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), + "#1/A:2-4,8/B:5-7"); model.addRange("1", 3, 5, "A"); - assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), "#1/A:2-5,8/B:5-7"); + assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), + "#1/A:2-5,8/B:5-7"); model.addRange("0", 1, 4, "B"); assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), "#0/B:1-4|#1/A:2-5,8/B:5-7"); @@ -244,13 +247,17 @@ public class ChimeraXCommandsTest AtomSpecModel model = new AtomSpecModel(); assertEquals(testee.getAtomSpec(model, AtomSpecType.ALPHA), ""); model.addRange("1", 2, 4, "A"); - assertEquals(testee.getAtomSpec(model, AtomSpecType.ALPHA), "#1/A:2-4@CA"); + assertEquals(testee.getAtomSpec(model, AtomSpecType.ALPHA), + "#1/A:2-4@CA"); model.addRange("1", 8, 8, "A"); - assertEquals(testee.getAtomSpec(model, AtomSpecType.ALPHA), "#1/A:2-4,8@CA"); + assertEquals(testee.getAtomSpec(model, AtomSpecType.ALPHA), + "#1/A:2-4,8@CA"); model.addRange("1", 5, 7, "B"); - assertEquals(testee.getAtomSpec(model, AtomSpecType.ALPHA), "#1/A:2-4,8/B:5-7@CA"); + assertEquals(testee.getAtomSpec(model, AtomSpecType.ALPHA), + "#1/A:2-4,8/B:5-7@CA"); model.addRange("1", 3, 5, "A"); - assertEquals(testee.getAtomSpec(model, AtomSpecType.ALPHA), "#1/A:2-5,8/B:5-7@CA"); + assertEquals(testee.getAtomSpec(model, AtomSpecType.ALPHA), + "#1/A:2-5,8/B:5-7@CA"); model.addRange("0", 1, 4, "B"); assertEquals(testee.getAtomSpec(model, AtomSpecType.ALPHA), "#0/B:1-4@CA|#1/A:2-5,8/B:5-7@CA"); @@ -309,8 +316,8 @@ public class ChimeraXCommandsTest @Test(groups = "Functional") public void testGetColourCommand() { - assertEquals(testee.colourResidues("something", Color.MAGENTA) - .getCommand(), + assertEquals( + testee.colourResidues("something", Color.MAGENTA).getCommand(), "color something #ff00ff"); } @@ -321,8 +328,7 @@ public class ChimeraXCommandsTest model.addRange("1", 89, 92, "A"); model.addRange("2", 12, 20, "B"); model.addRange("2", 8, 9, "B"); - assertEquals(testee.setAttribute("jv_kd", "27.3", model) - .getCommand(), + assertEquals(testee.setAttribute("jv_kd", "27.3", model).getCommand(), "setattr #1/A:89-92|#2/B:8-9,12-20 res jv_kd '27.3' create true"); } @@ -344,8 +350,10 @@ public class ChimeraXCommandsTest { List cmds = testee.startNotifications("to here"); assertEquals(cmds.size(), 2); - assertEquals(cmds.get(0), new StructureCommand("info notify start models jalview prefix ModelChanged url to here")); - assertEquals(cmds.get(1), new StructureCommand("info notify start selection jalview prefix SelectionChanged url to here")); + assertEquals(cmds.get(0), new StructureCommand( + "info notify start models jalview prefix ModelChanged url to here")); + assertEquals(cmds.get(1), new StructureCommand( + "info notify start selection jalview prefix SelectionChanged url to here")); } @Test(groups = "Functional") @@ -353,8 +361,10 @@ public class ChimeraXCommandsTest { List cmds = testee.stopNotifications(); assertEquals(cmds.size(), 2); - assertEquals(cmds.get(0), new StructureCommand("info notify stop models jalview")); - assertEquals(cmds.get(1), new StructureCommand("info notify stop selection jalview")); + assertEquals(cmds.get(0), + new StructureCommand("info notify stop models jalview")); + assertEquals(cmds.get(1), + new StructureCommand("info notify stop selection jalview")); } @Test(groups = "Functional") diff --git a/test/jalview/ext/rbvi/chimera/JalviewChimeraView.java b/test/jalview/ext/rbvi/chimera/JalviewChimeraView.java index e8b5bea..7f9aa9b 100644 --- a/test/jalview/ext/rbvi/chimera/JalviewChimeraView.java +++ b/test/jalview/ext/rbvi/chimera/JalviewChimeraView.java @@ -79,8 +79,10 @@ public class JalviewChimeraView @BeforeClass(alwaysRun = true) public static void setUpBeforeClass() throws Exception { - Jalview.main(new String[] { "-noquestionnaire", "-nonews", "-props", - "test/jalview/ext/rbvi/chimera/testProps.jvprops" }); + Jalview.main( + new String[] + { "-noquestionnaire", "-nonews", "-props", + "test/jalview/ext/rbvi/chimera/testProps.jvprops" }); Cache.setProperty(Preferences.STRUCTURE_DISPLAY, ViewerType.CHIMERA.name()); Cache.setProperty("SHOW_ANNOTATIONS", "false"); @@ -132,10 +134,11 @@ public class JalviewChimeraView assertEquals(pdbIds.size(), 1); PDBEntry pdbEntry = pdbIds.get(0); assertEquals(pdbEntry.getId(), "1GAQ"); - StructureViewer structureViewer = new StructureViewer(af.getViewport() - .getStructureSelectionManager()); + StructureViewer structureViewer = new StructureViewer( + af.getViewport().getStructureSelectionManager()); chimeraViewer = structureViewer.viewStructures(pdbEntry, - new SequenceI[] { sq }, af.getCurrentView().getAlignPanel()); + new SequenceI[] + { sq }, af.getCurrentView().getAlignPanel()); JalviewChimeraBinding binding = (JalviewChimeraBinding) chimeraViewer .getBinding(); @@ -150,7 +153,7 @@ public class JalviewChimeraView } catch (InterruptedException e) { } - } while (!binding.isFinishedInit() || !chimeraViewer.isVisible()); + } while (!binding.isFinishedInit() || !chimeraViewer.isVisible()); assertTrue(binding.isViewerRunning(), "Failed to start Chimera"); @@ -158,23 +161,30 @@ public class JalviewChimeraView assertTrue(chimeraViewer.hasViewerActionsMenu()); // now add another sequence and bind to view - // + // AlignmentI al = af.getViewport().getAlignment(); PDBEntry xpdb = al.getSequenceAt(0).getPDBEntry("1GAQ"); - sq = new Sequence("1GAQ", al.getSequenceAt(0).getSequence(25, 95).toString()); + sq = new Sequence("1GAQ", + al.getSequenceAt(0).getSequence(25, 95).toString()); al.addSequence(sq); - structureViewer.viewStructures(new PDBEntry[] { xpdb }, new SequenceI[] { sq }, af.getCurrentView().getAlignPanel()); + structureViewer.viewStructures(new PDBEntry[] { xpdb }, + new SequenceI[] + { sq }, af.getCurrentView().getAlignPanel()); /* * Wait for viewer load thread to complete */ - do + do { - try { + try + { Thread.sleep(1500); - } catch (InterruptedException q) {}; + } catch (InterruptedException q) + { + } + ; } while (!binding.isLoadingFinished()); - + // still just one PDB structure shown assertEquals(chimeraViewer.getBinding().getPdbCount(), 1); // and the viewer action menu should still be visible @@ -212,18 +222,18 @@ public class JalviewChimeraView /* * use local test PDB and SIFTS files */ - String pdbFilePath = new File( - "test/jalview/ext/rbvi/chimera/4zho.pdb").getPath(); + String pdbFilePath = new File("test/jalview/ext/rbvi/chimera/4zho.pdb") + .getPath(); PDBEntry pdbEntry = new PDBEntry("4ZHO", null, null, pdbFilePath); String siftsFilePath = new File( - "test/jalview/ext/rbvi/chimera/4zho.xml.gz") - .getPath(); + "test/jalview/ext/rbvi/chimera/4zho.xml.gz").getPath(); SiftsClient.setMockSiftsFile(new File(siftsFilePath)); - StructureViewer structureViewer = new StructureViewer(af.getViewport() - .getStructureSelectionManager()); + StructureViewer structureViewer = new StructureViewer( + af.getViewport().getStructureSelectionManager()); chimeraViewer = structureViewer.viewStructures(pdbEntry, - new SequenceI[] { sq }, af.getCurrentView().getAlignPanel()); + new SequenceI[] + { sq }, af.getCurrentView().getAlignPanel()); JalviewChimeraBinding binding = (JalviewChimeraBinding) chimeraViewer .getBinding(); @@ -273,11 +283,11 @@ public class JalviewChimeraView sq.addSequenceFeature(new SequenceFeature("metal ion-binding site", "Iron-Sulfur (2Fe-2S)", 96, 96, Float.NaN, null)); // on a sequence region that is partially mapped to structure: - sq.addSequenceFeature(new SequenceFeature("helix", null, 50, 60, - Float.NaN, null)); + sq.addSequenceFeature( + new SequenceFeature("helix", null, 50, 60, Float.NaN, null)); // and again: - sq.addSequenceFeature(new SequenceFeature("chain", null, 50, 70, - Float.NaN, null)); + sq.addSequenceFeature( + new SequenceFeature("chain", null, 50, 70, Float.NaN, null)); // add numeric valued features - score is set as attribute value sq.addSequenceFeature(new SequenceFeature("kd", "hydrophobicity", 62, 62, -2.1f, null)); @@ -340,14 +350,14 @@ public class JalviewChimeraView new StructureCommand("list resi att jv_metal_ion_binding_site"), true); assertEquals(reply.size(), 4); - assertTrue(reply - .contains("residue id #0:40.A jv_metal_ion_binding_site \"Iron-Sulfur (2Fe-2S)\" index 40")); - assertTrue(reply - .contains("residue id #0:45.A jv_metal_ion_binding_site \"Iron-Sulfur (2Fe-2S)\" index 45")); - assertTrue(reply - .contains("residue id #0:40.B jv_metal_ion_binding_site \"Iron-Sulfur (2Fe-2S)\" index 40")); - assertTrue(reply - .contains("residue id #0:45.B jv_metal_ion_binding_site \"Iron-Sulfur (2Fe-2S)\" index 45")); + assertTrue(reply.contains( + "residue id #0:40.A jv_metal_ion_binding_site \"Iron-Sulfur (2Fe-2S)\" index 40")); + assertTrue(reply.contains( + "residue id #0:45.A jv_metal_ion_binding_site \"Iron-Sulfur (2Fe-2S)\" index 45")); + assertTrue(reply.contains( + "residue id #0:40.B jv_metal_ion_binding_site \"Iron-Sulfur (2Fe-2S)\" index 40")); + assertTrue(reply.contains( + "residue id #0:45.B jv_metal_ion_binding_site \"Iron-Sulfur (2Fe-2S)\" index 45")); /* * check attributes with score values @@ -395,29 +405,28 @@ public class JalviewChimeraView SequenceI fer2Arath = af.getViewport().getAlignment() .findName("FER2_ARATH"); assertNotNull(fer2Arath, "Didn't find FER2_ARATH"); - + /* * need a Uniprot dbref for SIFTS mapping to work!! */ fer2Arath.addDBRef(new DBRefEntry("UNIPROT", "0", "P16972", null)); - + /* * use local test PDB and SIFTS files */ - String pdbFilePath = new File( - "test/jalview/ext/rbvi/chimera/4zho.pdb").getPath(); + String pdbFilePath = new File("test/jalview/ext/rbvi/chimera/4zho.pdb") + .getPath(); PDBEntry pdbEntry = new PDBEntry("4ZHO", null, null, pdbFilePath); String siftsFilePath = new File( - "test/jalview/ext/rbvi/chimera/4zho.xml.gz") - .getPath(); + "test/jalview/ext/rbvi/chimera/4zho.xml.gz").getPath(); SiftsClient.setMockSiftsFile(new File(siftsFilePath)); - - StructureViewer structureViewer = new StructureViewer(af.getViewport() - .getStructureSelectionManager()); + + StructureViewer structureViewer = new StructureViewer( + af.getViewport().getStructureSelectionManager()); chimeraViewer = structureViewer.viewStructures(pdbEntry, - new SequenceI[] { fer2Arath }, af.getCurrentView() - .getAlignPanel()); - + new SequenceI[] + { fer2Arath }, af.getCurrentView().getAlignPanel()); + JalviewChimeraBinding binding = (JalviewChimeraBinding) chimeraViewer .getBinding(); do @@ -429,19 +438,19 @@ public class JalviewChimeraView { } } while (!binding.isFinishedInit()); - + assertTrue(binding.isViewerRunning(), "Failed to launch Chimera"); - + assertEquals(binding.getPdbCount(), 1); - + /* * 'perform' menu action to copy Chimera attributes * to features in Jalview */ // TODO rename and pull up method to binding interface // once functionality is added for Jmol as well - binding.copyStructureAttributesToFeatures("isHelix", af.getViewport() - .getAlignPanel()); + binding.copyStructureAttributesToFeatures("isHelix", + af.getViewport().getAlignPanel()); /* * verify 22 residues have isHelix feature @@ -470,8 +479,8 @@ public class JalviewChimeraView /* * fetch a numeric valued attribute */ - binding.copyStructureAttributesToFeatures("phi", af.getViewport() - .getAlignPanel()); + binding.copyStructureAttributesToFeatures("phi", + af.getViewport().getAlignPanel()); fr.setVisible("phi"); List fs = fer2Arath.getFeatures().findFeatures(54, 54, "phi"); diff --git a/test/jalview/ext/so/SequenceOntologyTest.java b/test/jalview/ext/so/SequenceOntologyTest.java index 31e1887..cbe18b0 100644 --- a/test/jalview/ext/so/SequenceOntologyTest.java +++ b/test/jalview/ext/so/SequenceOntologyTest.java @@ -54,8 +54,8 @@ public class SequenceOntologyTest t.printStackTrace(System.err); } long elapsed = System.currentTimeMillis() - now; - System.out.println("Load and cache of Sequence Ontology took " - + elapsed + "ms"); + System.out.println( + "Load and cache of Sequence Ontology took " + elapsed + "ms"); } @Test(groups = "Functional") diff --git a/test/jalview/fts/core/FTSRestClientTest.java b/test/jalview/fts/core/FTSRestClientTest.java index 44fe8d0..2e9a5f4 100644 --- a/test/jalview/fts/core/FTSRestClientTest.java +++ b/test/jalview/fts/core/FTSRestClientTest.java @@ -78,8 +78,8 @@ public class FTSRestClientTest foundIndex = ftsRestClient.getPrimaryKeyColumIndex(wantedFields, false); Assert.assertEquals(foundIndex, 0); - foundIndex = ftsRestClient - .getPrimaryKeyColumIndex(wantedFields, true); + foundIndex = ftsRestClient.getPrimaryKeyColumIndex(wantedFields, + true); Assert.assertEquals(foundIndex, 1); } catch (Exception e) { @@ -91,12 +91,12 @@ public class FTSRestClientTest @Test(groups = { "Functional" }) public void getAllDefaulDisplayedDataColumns() { - Assert.assertNotNull(ftsRestClient - .getAllDefaultDisplayedFTSDataColumns()); + Assert.assertNotNull( + ftsRestClient.getAllDefaultDisplayedFTSDataColumns()); Assert.assertTrue(!ftsRestClient.getAllDefaultDisplayedFTSDataColumns() .isEmpty()); - Assert.assertEquals(ftsRestClient - .getAllDefaultDisplayedFTSDataColumns().size(), 7); + Assert.assertEquals( + ftsRestClient.getAllDefaultDisplayedFTSDataColumns().size(), 7); } @Test(groups = { "Functional" }) @@ -287,8 +287,8 @@ public class FTSRestClientTest actualGroupStr = ftsRestClient.getDataColumnGroupById("g4") .toString(); Assert.assertEquals(actualGroupStr, "Procedures & Softwares"); - actualGroupStr = ftsRestClient.getDataColumnGroupById( - "unavailable group").toString(); + actualGroupStr = ftsRestClient + .getDataColumnGroupById("unavailable group").toString(); } catch (Exception e) { Assert.assertTrue(true); diff --git a/test/jalview/fts/service/pdb/PDBFTSPanelTest.java b/test/jalview/fts/service/pdb/PDBFTSPanelTest.java index 0b4dd92..f02b00a 100644 --- a/test/jalview/fts/service/pdb/PDBFTSPanelTest.java +++ b/test/jalview/fts/service/pdb/PDBFTSPanelTest.java @@ -105,13 +105,14 @@ public class PDBFTSPanelTest { PDBFTSPanel searchPanel = new PDBFTSPanel(null); JInternalFrame mainFrame = searchPanel.getMainFrame(); -// JComboBox txt_search = PA.gsearchPanel.getTxtSearch(); + // JComboBox txt_search = PA.gsearchPanel.getTxtSearch(); assertTrue(mainFrame.getTitle().length() == 20); - assertTrue(mainFrame.getTitle() - .equalsIgnoreCase("PDB Sequence Fetcher")); - PA.invokeMethod(PA.getValue(searchPanel, "txt_search"), "setSelectedItem(java.lang.String)", "ABC"); - // txt_search.setSelectedItem("ABC"); + assertTrue( + mainFrame.getTitle().equalsIgnoreCase("PDB Sequence Fetcher")); + PA.invokeMethod(PA.getValue(searchPanel, "txt_search"), + "setSelectedItem(java.lang.String)", "ABC"); + // txt_search.setSelectedItem("ABC"); try { // wait for web-service to handle response @@ -121,15 +122,16 @@ public class PDBFTSPanelTest e.printStackTrace(); } assertTrue(mainFrame.getTitle().length() > 20); - assertTrue(!mainFrame.getTitle().equalsIgnoreCase( - "PDB Sequence Fetcher")); + assertTrue( + !mainFrame.getTitle().equalsIgnoreCase("PDB Sequence Fetcher")); } - + @Test - public void getFTSframeTitleTest() { + public void getFTSframeTitleTest() + { PDBFTSPanel searchPanel = new PDBFTSPanel(null); String outcome = searchPanel.getFTSFrameTitle(); - //System.out.println("FTS Frame title :" + outcome); + // System.out.println("FTS Frame title :" + outcome); assertEquals(outcome, "PDB Sequence Fetcher"); } diff --git a/test/jalview/fts/service/pdb/PDBFTSRestClientTest.java b/test/jalview/fts/service/pdb/PDBFTSRestClientTest.java index 73956e3..fed72fa 100644 --- a/test/jalview/fts/service/pdb/PDBFTSRestClientTest.java +++ b/test/jalview/fts/service/pdb/PDBFTSRestClientTest.java @@ -96,7 +96,6 @@ public class PDBFTSRestClientTest } System.out.println("wantedFields >>" + wantedFields); - FTSRestRequest request = new FTSRestRequest(); request.setAllowEmptySeq(false); request.setResponseSize(100); @@ -178,7 +177,8 @@ public class PDBFTSRestClientTest String jsonErrorResponse = ""; try { - jsonErrorResponse = readJsonStringFromFile("test/jalview/io/pdb_request_json_error.txt"); + jsonErrorResponse = readJsonStringFromFile( + "test/jalview/io/pdb_request_json_error.txt"); } catch (IOException e) { e.printStackTrace(); @@ -196,10 +196,15 @@ public class PDBFTSRestClientTest assertEquals(expectedErrorMsg, parsedErrorResponse); } - @Test(groups = { "External" }, enabled = false, expectedExceptions = Exception.class) + @Test( + groups = + { "External" }, + enabled = false, + expectedExceptions = Exception.class) public void testForExpectedRuntimeException() throws Exception { - // FIXME JBPNote: looks like this test fails for no good reason - what exception was supposed to be raised ? + // FIXME JBPNote: looks like this test fails for no good reason - what + // exception was supposed to be raised ? List wantedFields = new ArrayList(); wantedFields.add(PDBFTSRestClient.getInstance() .getDataColumnByNameOrCode("pdb_id")); @@ -241,13 +246,14 @@ public class PDBFTSRestClientTest String jsonString = ""; try { - jsonString = readJsonStringFromFile("test/jalview/io/pdb_response_json.txt"); + jsonString = readJsonStringFromFile( + "test/jalview/io/pdb_response_json.txt"); } catch (IOException e) { e.printStackTrace(); } - FTSRestResponse response = PDBFTSRestClient.parsePDBJsonResponse( - jsonString, request); + FTSRestResponse response = PDBFTSRestClient + .parsePDBJsonResponse(jsonString, request); assertTrue(response.getSearchSummary() != null); assertTrue(response.getNumberOfItemsFound() == 931); assertTrue(response.getSearchSummary().size() == 14); @@ -300,8 +306,8 @@ public class PDBFTSRestClientTest .queryParam("q", "text:abc AND molecule_sequence:['' TO *]"); // Execute the REST request - ClientResponse clientResponse = webResource.accept( - MediaType.APPLICATION_JSON).get(ClientResponse.class); + ClientResponse clientResponse = webResource + .accept(MediaType.APPLICATION_JSON).get(ClientResponse.class); // Get the JSON string from the response object String pdbJsonResponseString = clientResponse.getEntity(String.class); @@ -329,8 +335,8 @@ public class PDBFTSRestClientTest pdbResponse != null); assertTrue("Couldn't Retrieve 'QTime' value", queryTime != null); assertTrue("Couldn't Retrieve 'numFound' value", numFound != null); - assertTrue("Couldn't Retrieve 'docs' object", docs != null - || !docIter.hasNext()); + assertTrue("Couldn't Retrieve 'docs' object", + docs != null || !docIter.hasNext()); JSONObject pdbJsonDoc = docIter.next(); @@ -344,14 +350,16 @@ public class PDBFTSRestClientTest if (pdbJsonDoc.get(field.getCode()) == null) { // System.out.println(">>>\t" + field.getCode()); - assertTrue(field.getCode() - + " has been removed from PDB doc Entity", + assertTrue( + field.getCode() + + " has been removed from PDB doc Entity", !pdbJsonResponseString.contains(field.getCode())); } } } catch (ParseException e) { - Assert.fail(">>> Test failed due to exception while parsing pdb response json !!!"); + Assert.fail( + ">>> Test failed due to exception while parsing pdb response json !!!"); e.printStackTrace(); } } @@ -359,11 +367,13 @@ public class PDBFTSRestClientTest /** * reads any string from filePath + * * @param filePath * @return * @throws IOException */ - public static String readJsonStringFromFile(String filePath) throws IOException + public static String readJsonStringFromFile(String filePath) + throws IOException { String fileContent; BufferedReader br = new BufferedReader(new FileReader(filePath)); @@ -389,347 +399,349 @@ public class PDBFTSRestClientTest public static void setMock() { String[][] mocks = new String[2][]; - mocks[0] = new String[] {"https://www.ebi.ac.uk/pdbe/search/pdb/select?wt=json&fl=pdb_id,title,experimental_method,resolution&rows=500&start=0&q=(4igk+OR+7lyb+OR+3k0h+OR+3k0k+OR+1t15+OR+3pxc+OR+3pxd+OR+3pxe+OR+1jm7+OR+7jzv+OR+3pxa+OR+3pxb+OR+1y98+OR+1n5o+OR+4ifi+OR+4y2g+OR+3k15+OR+3k16+OR+4jlu+OR+2ing+OR+4ofb+OR+6g2i+OR+3coj+OR+1jnx+OR+4y18+OR+4u4a+OR+1oqa+OR+1t29+OR+1t2u+OR+1t2v)+AND+molecule_sequence:%5B''+TO+*%5D+AND+status:REL&sort=", - "{\n" - + " \"responseHeader\":{\n" - + " \"status\":0,\n" - + " \"QTime\":0,\n" - + " \"params\":{\n" - + " \"q\":\"(4igk OR 7lyb OR 3k0h OR 3k0k OR 1t15 OR 3pxc OR 3pxd OR 3pxe OR 1jm7 OR 7jzv OR 3pxa OR 3pxb OR 1y98 OR 1n5o OR 4ifi OR 4y2g OR 3k15 OR 3k16 OR 4jlu OR 2ing OR 4ofb OR 6g2i OR 3coj OR 1jnx OR 4y18 OR 4u4a OR 1oqa OR 1t29 OR 1t2u OR 1t2v) AND molecule_sequence:['' TO *] AND status:REL\",\n" - + " \"fl\":\"pdb_id,title,experimental_method,resolution\",\n" - + " \"start\":\"0\",\n" - + " \"sort\":\"\",\n" - + " \"rows\":\"500\",\n" - + " \"wt\":\"json\"}},\n" - + " \"response\":{\"numFound\":64,\"start\":0,\"docs\":[\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"4ofb\",\n" - + " \"resolution\":3.05,\n" - + " \"title\":\"Crystal structure of human BRCA1 BRCT in complex with nonphosphopeptide inhibitor\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"3pxe\",\n" - + " \"resolution\":2.85,\n" - + " \"title\":\"Impact of BRCA1 BRCT domain missense substitutions on phospho-peptide recognition: E1836K\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"4jlu\",\n" - + " \"resolution\":3.5,\n" - + " \"title\":\"Crystal structure of BRCA1 BRCT with doubly phosphorylated Abraxas\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"4y2g\",\n" - + " \"resolution\":2.5,\n" - + " \"title\":\"Structure of BRCA1 BRCT domains in complex with Abraxas single phosphorylated peptide\"},\n" - + " {\n" - + " \"experimental_method\":[\"Solution NMR\"],\n" - + " \"pdb_id\":\"1oqa\",\n" - + " \"title\":\"Solution structure of the BRCT-c domain from human BRCA1\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"4u4a\",\n" - + " \"resolution\":3.51,\n" - + " \"title\":\"Complex Structure of BRCA1 BRCT with singly phospho Abraxas\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"3k16\",\n" - + " \"resolution\":3.0,\n" - + " \"title\":\"Crystal Structure of BRCA1 BRCT D1840T in complex with a minimal recognition tetrapeptide with a free carboxy C-terminus\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"1t15\",\n" - + " \"resolution\":1.85,\n" - + " \"title\":\"Crystal Structure of the Brca1 BRCT Domains in Complex with the Phosphorylated Interacting Region from Bach1 Helicase\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"3k15\",\n" - + " \"resolution\":2.8,\n" - + " \"title\":\"Crystal Structure of BRCA1 BRCT D1840T in complex with a minimal recognition tetrapeptide with an amidated C-terminus\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"1t2v\",\n" - + " \"resolution\":3.3,\n" - + " \"title\":\"Structural basis of phospho-peptide recognition by the BRCT domain of BRCA1, structure with phosphopeptide\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"1y98\",\n" - + " \"resolution\":2.5,\n" - + " \"title\":\"Structure of the BRCT repeats of BRCA1 bound to a CtIP phosphopeptide.\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"1t29\",\n" - + " \"resolution\":2.3,\n" - + " \"title\":\"Crystal structure of the BRCA1 BRCT repeats bound to a phosphorylated BACH1 peptide\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"3k0k\",\n" - + " \"resolution\":2.7,\n" - + " \"title\":\"Crystal Structure of BRCA1 BRCT in complex with a minimal recognition tetrapeptide with a free carboxy C-terminus.\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"3k0h\",\n" - + " \"resolution\":2.7,\n" - + " \"title\":\"The crystal structure of BRCA1 BRCT in complex with a minimal recognition tetrapeptide with an amidated C-terminus\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"4ifi\",\n" - + " \"resolution\":2.2,\n" - + " \"title\":\"Structure of human BRCA1 BRCT in complex with BAAT peptide\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"3pxd\",\n" - + " \"resolution\":2.8,\n" - + " \"title\":\"Impact of BRCA1 BRCT domain missense substitutions on phospho-peptide recognition: R1835P\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"3pxc\",\n" - + " \"resolution\":2.8,\n" - + " \"title\":\"Impact of BRCA1 BRCT domain missense substitutions on phospho-peptide recognition: R1699Q\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"1jnx\",\n" - + " \"resolution\":2.5,\n" - + " \"title\":\"Crystal structure of the BRCT repeat region from the breast cancer associated protein, BRCA1\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"3pxa\",\n" - + " \"resolution\":2.55,\n" - + " \"title\":\"Impact of BRCA1 BRCT domain missense substitutions on phospho-peptide recognition: G1656D\"},\n" - + " {\n" - + " \"experimental_method\":[\"Solution NMR\"],\n" - + " \"pdb_id\":\"1jm7\",\n" - + " \"title\":\"Solution structure of the BRCA1/BARD1 RING-domain heterodimer\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"4igk\",\n" - + " \"resolution\":1.75,\n" - + " \"title\":\"Structure of human BRCA1 BRCT in complex with ATRIP peptide\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"1t2u\",\n" - + " \"resolution\":2.8,\n" - + " \"title\":\"Structural basis of phosphopeptide recognition by the BRCT domain of BRCA1: structure of BRCA1 missense variant V1809F\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"3pxb\",\n" - + " \"resolution\":2.5,\n" - + " \"title\":\"Impact of BRCA1 BRCT domain missense substitutions on phospho-peptide recognition: T1700A\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"1n5o\",\n" - + " \"resolution\":2.8,\n" - + " \"title\":\"Structural consequences of a cancer-causing BRCA1-BRCT missense mutation\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"3coj\",\n" - + " \"resolution\":3.21,\n" - + " \"title\":\"Crystal Structure of the BRCT Domains of Human BRCA1 in Complex with a Phosphorylated Peptide from Human Acetyl-CoA Carboxylase 1\"},\n" - + " {\n" - + " \"experimental_method\":[\"Electron Microscopy\"],\n" - + " \"pdb_id\":\"6g2i\",\n" - + " \"resolution\":5.9,\n" - + " \"title\":\"Filament of acetyl-CoA carboxylase and BRCT domains of BRCA1 (ACC-BRCT) at 5.9 A resolution\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"4jlu\",\n" - + " \"resolution\":3.5,\n" - + " \"title\":\"Crystal structure of BRCA1 BRCT with doubly phosphorylated Abraxas\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"4ofb\",\n" - + " \"resolution\":3.05,\n" - + " \"title\":\"Crystal structure of human BRCA1 BRCT in complex with nonphosphopeptide inhibitor\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"3pxe\",\n" - + " \"resolution\":2.85,\n" - + " \"title\":\"Impact of BRCA1 BRCT domain missense substitutions on phospho-peptide recognition: E1836K\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"4u4a\",\n" - + " \"resolution\":3.51,\n" - + " \"title\":\"Complex Structure of BRCA1 BRCT with singly phospho Abraxas\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"4y2g\",\n" - + " \"resolution\":2.5,\n" - + " \"title\":\"Structure of BRCA1 BRCT domains in complex with Abraxas single phosphorylated peptide\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"4y18\",\n" - + " \"resolution\":3.5,\n" - + " \"title\":\"Structure of BRCA1 BRCT domains in complex with Abraxas double phosphorylated peptide\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"2ing\",\n" - + " \"resolution\":3.6,\n" - + " \"title\":\"X-ray Structure of the BRCA1 BRCT mutant M1775K\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"1t15\",\n" - + " \"resolution\":1.85,\n" - + " \"title\":\"Crystal Structure of the Brca1 BRCT Domains in Complex with the Phosphorylated Interacting Region from Bach1 Helicase\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"1t29\",\n" - + " \"resolution\":2.3,\n" - + " \"title\":\"Crystal structure of the BRCA1 BRCT repeats bound to a phosphorylated BACH1 peptide\"},\n" - + " {\n" - + " \"experimental_method\":[\"Solution NMR\"],\n" - + " \"pdb_id\":\"1jm7\",\n" - + " \"title\":\"Solution structure of the BRCA1/BARD1 RING-domain heterodimer\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"1t2v\",\n" - + " \"resolution\":3.3,\n" - + " \"title\":\"Structural basis of phospho-peptide recognition by the BRCT domain of BRCA1, structure with phosphopeptide\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"4ifi\",\n" - + " \"resolution\":2.2,\n" - + " \"title\":\"Structure of human BRCA1 BRCT in complex with BAAT peptide\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"4igk\",\n" - + " \"resolution\":1.75,\n" - + " \"title\":\"Structure of human BRCA1 BRCT in complex with ATRIP peptide\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"3k0k\",\n" - + " \"resolution\":2.7,\n" - + " \"title\":\"Crystal Structure of BRCA1 BRCT in complex with a minimal recognition tetrapeptide with a free carboxy C-terminus.\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"3k16\",\n" - + " \"resolution\":3.0,\n" - + " \"title\":\"Crystal Structure of BRCA1 BRCT D1840T in complex with a minimal recognition tetrapeptide with a free carboxy C-terminus\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"3k15\",\n" - + " \"resolution\":2.8,\n" - + " \"title\":\"Crystal Structure of BRCA1 BRCT D1840T in complex with a minimal recognition tetrapeptide with an amidated C-terminus\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"3k0h\",\n" - + " \"resolution\":2.7,\n" - + " \"title\":\"The crystal structure of BRCA1 BRCT in complex with a minimal recognition tetrapeptide with an amidated C-terminus\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"1y98\",\n" - + " \"resolution\":2.5,\n" - + " \"title\":\"Structure of the BRCT repeats of BRCA1 bound to a CtIP phosphopeptide.\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"3coj\",\n" - + " \"resolution\":3.21,\n" - + " \"title\":\"Crystal Structure of the BRCT Domains of Human BRCA1 in Complex with a Phosphorylated Peptide from Human Acetyl-CoA Carboxylase 1\"},\n" - + " {\n" - + " \"experimental_method\":[\"X-ray diffraction\"],\n" - + " \"pdb_id\":\"4y18\",\n" - + " \"resolution\":3.5,\n" - + " \"title\":\"Structure of BRCA1 BRCT domains in complex with Abraxas double phosphorylated peptide\"},\n" - + " {\n" - + " \"experimental_method\":[\"Electron Microscopy\"],\n" - + " \"pdb_id\":\"7jzv\",\n" - + " \"resolution\":3.9,\n" - + " \"title\":\"Cryo-EM structure of the BRCA1-UbcH5c/BARD1 E3-E2 module bound to a nucleosome\"},\n" - + " {\n" - + " \"experimental_method\":[\"Electron Microscopy\"],\n" - + " \"pdb_id\":\"7jzv\",\n" - + " \"resolution\":3.9,\n" - + " \"title\":\"Cryo-EM structure of the BRCA1-UbcH5c/BARD1 E3-E2 module bound to a nucleosome\"},\n" - + " {\n" - + " \"experimental_method\":[\"Electron Microscopy\"],\n" - + " \"pdb_id\":\"7lyb\",\n" - + " \"resolution\":3.28,\n" - + " \"title\":\"Cryo-EM structure of the human nucleosome core particle in complex with BRCA1-BARD1-UbcH5c\"},\n" - + " {\n" - + " \"experimental_method\":[\"Electron Microscopy\"],\n" - + " \"pdb_id\":\"7lyb\",\n" - + " \"resolution\":3.28,\n" - + " \"title\":\"Cryo-EM structure of the human nucleosome core particle in complex with BRCA1-BARD1-UbcH5c\"},\n" - + " {\n" - + " \"experimental_method\":[\"Electron Microscopy\"],\n" - + " \"pdb_id\":\"7lyb\",\n" - + " \"resolution\":3.28,\n" - + " \"title\":\"Cryo-EM structure of the human nucleosome core particle in complex with BRCA1-BARD1-UbcH5c\"},\n" - + " {\n" - + " \"experimental_method\":[\"Electron Microscopy\"],\n" - + " \"pdb_id\":\"7jzv\",\n" - + " \"resolution\":3.9,\n" - + " \"title\":\"Cryo-EM structure of the BRCA1-UbcH5c/BARD1 E3-E2 module bound to a nucleosome\"},\n" - + " {\n" - + " \"experimental_method\":[\"Electron Microscopy\"],\n" - + " \"pdb_id\":\"7lyb\",\n" - + " \"resolution\":3.28,\n" - + " \"title\":\"Cryo-EM structure of the human nucleosome core particle in complex with BRCA1-BARD1-UbcH5c\"},\n" - + " {\n" - + " \"experimental_method\":[\"Electron Microscopy\"],\n" - + " \"pdb_id\":\"7jzv\",\n" - + " \"resolution\":3.9,\n" - + " \"title\":\"Cryo-EM structure of the BRCA1-UbcH5c/BARD1 E3-E2 module bound to a nucleosome\"},\n" - + " {\n" - + " \"experimental_method\":[\"Electron Microscopy\"],\n" - + " \"pdb_id\":\"7lyb\",\n" - + " \"resolution\":3.28,\n" - + " \"title\":\"Cryo-EM structure of the human nucleosome core particle in complex with BRCA1-BARD1-UbcH5c\"},\n" - + " {\n" - + " \"experimental_method\":[\"Electron Microscopy\"],\n" - + " \"pdb_id\":\"7jzv\",\n" - + " \"resolution\":3.9,\n" - + " \"title\":\"Cryo-EM structure of the BRCA1-UbcH5c/BARD1 E3-E2 module bound to a nucleosome\"},\n" - + " {\n" - + " \"experimental_method\":[\"Electron Microscopy\"],\n" - + " \"pdb_id\":\"7lyb\",\n" - + " \"resolution\":3.28,\n" - + " \"title\":\"Cryo-EM structure of the human nucleosome core particle in complex with BRCA1-BARD1-UbcH5c\"},\n" - + " {\n" - + " \"experimental_method\":[\"Electron Microscopy\"],\n" - + " \"pdb_id\":\"7lyb\",\n" - + " \"resolution\":3.28,\n" - + " \"title\":\"Cryo-EM structure of the human nucleosome core particle in complex with BRCA1-BARD1-UbcH5c\"},\n" - + " {\n" - + " \"experimental_method\":[\"Electron Microscopy\"],\n" - + " \"pdb_id\":\"7lyb\",\n" - + " \"resolution\":3.28,\n" - + " \"title\":\"Cryo-EM structure of the human nucleosome core particle in complex with BRCA1-BARD1-UbcH5c\"},\n" - + " {\n" - + " \"experimental_method\":[\"Electron Microscopy\"],\n" - + " \"pdb_id\":\"7jzv\",\n" - + " \"resolution\":3.9,\n" - + " \"title\":\"Cryo-EM structure of the BRCA1-UbcH5c/BARD1 E3-E2 module bound to a nucleosome\"},\n" - + " {\n" - + " \"experimental_method\":[\"Electron Microscopy\"],\n" - + " \"pdb_id\":\"6g2i\",\n" - + " \"resolution\":5.9,\n" - + " \"title\":\"Filament of acetyl-CoA carboxylase and BRCT domains of BRCA1 (ACC-BRCT) at 5.9 A resolution\"},\n" - + " {\n" - + " \"experimental_method\":[\"Electron Microscopy\"],\n" - + " \"pdb_id\":\"7jzv\",\n" - + " \"resolution\":3.9,\n" - + " \"title\":\"Cryo-EM structure of the BRCA1-UbcH5c/BARD1 E3-E2 module bound to a nucleosome\"},\n" - + " {\n" - + " \"experimental_method\":[\"Electron Microscopy\"],\n" - + " \"pdb_id\":\"7lyb\",\n" - + " \"resolution\":3.28,\n" - + " \"title\":\"Cryo-EM structure of the human nucleosome core particle in complex with BRCA1-BARD1-UbcH5c\"},\n" - + " {\n" - + " \"experimental_method\":[\"Electron Microscopy\"],\n" - + " \"pdb_id\":\"7jzv\",\n" - + " \"resolution\":3.9,\n" - + " \"title\":\"Cryo-EM structure of the BRCA1-UbcH5c/BARD1 E3-E2 module bound to a nucleosome\"}]\n" - + " }}" }; - + mocks[0] = new String[] { + "https://www.ebi.ac.uk/pdbe/search/pdb/select?wt=json&fl=pdb_id,title,experimental_method,resolution&rows=500&start=0&q=(4igk+OR+7lyb+OR+3k0h+OR+3k0k+OR+1t15+OR+3pxc+OR+3pxd+OR+3pxe+OR+1jm7+OR+7jzv+OR+3pxa+OR+3pxb+OR+1y98+OR+1n5o+OR+4ifi+OR+4y2g+OR+3k15+OR+3k16+OR+4jlu+OR+2ing+OR+4ofb+OR+6g2i+OR+3coj+OR+1jnx+OR+4y18+OR+4u4a+OR+1oqa+OR+1t29+OR+1t2u+OR+1t2v)+AND+molecule_sequence:%5B''+TO+*%5D+AND+status:REL&sort=", + "{\n" + " \"responseHeader\":{\n" + " \"status\":0,\n" + + " \"QTime\":0,\n" + " \"params\":{\n" + + " \"q\":\"(4igk OR 7lyb OR 3k0h OR 3k0k OR 1t15 OR 3pxc OR 3pxd OR 3pxe OR 1jm7 OR 7jzv OR 3pxa OR 3pxb OR 1y98 OR 1n5o OR 4ifi OR 4y2g OR 3k15 OR 3k16 OR 4jlu OR 2ing OR 4ofb OR 6g2i OR 3coj OR 1jnx OR 4y18 OR 4u4a OR 1oqa OR 1t29 OR 1t2u OR 1t2v) AND molecule_sequence:['' TO *] AND status:REL\",\n" + + " \"fl\":\"pdb_id,title,experimental_method,resolution\",\n" + + " \"start\":\"0\",\n" + " \"sort\":\"\",\n" + + " \"rows\":\"500\",\n" + " \"wt\":\"json\"}},\n" + + " \"response\":{\"numFound\":64,\"start\":0,\"docs\":[\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"4ofb\",\n" + + " \"resolution\":3.05,\n" + + " \"title\":\"Crystal structure of human BRCA1 BRCT in complex with nonphosphopeptide inhibitor\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"3pxe\",\n" + + " \"resolution\":2.85,\n" + + " \"title\":\"Impact of BRCA1 BRCT domain missense substitutions on phospho-peptide recognition: E1836K\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"4jlu\",\n" + + " \"resolution\":3.5,\n" + + " \"title\":\"Crystal structure of BRCA1 BRCT with doubly phosphorylated Abraxas\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"4y2g\",\n" + + " \"resolution\":2.5,\n" + + " \"title\":\"Structure of BRCA1 BRCT domains in complex with Abraxas single phosphorylated peptide\"},\n" + + " {\n" + + " \"experimental_method\":[\"Solution NMR\"],\n" + + " \"pdb_id\":\"1oqa\",\n" + + " \"title\":\"Solution structure of the BRCT-c domain from human BRCA1\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"4u4a\",\n" + + " \"resolution\":3.51,\n" + + " \"title\":\"Complex Structure of BRCA1 BRCT with singly phospho Abraxas\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"3k16\",\n" + + " \"resolution\":3.0,\n" + + " \"title\":\"Crystal Structure of BRCA1 BRCT D1840T in complex with a minimal recognition tetrapeptide with a free carboxy C-terminus\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"1t15\",\n" + + " \"resolution\":1.85,\n" + + " \"title\":\"Crystal Structure of the Brca1 BRCT Domains in Complex with the Phosphorylated Interacting Region from Bach1 Helicase\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"3k15\",\n" + + " \"resolution\":2.8,\n" + + " \"title\":\"Crystal Structure of BRCA1 BRCT D1840T in complex with a minimal recognition tetrapeptide with an amidated C-terminus\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"1t2v\",\n" + + " \"resolution\":3.3,\n" + + " \"title\":\"Structural basis of phospho-peptide recognition by the BRCT domain of BRCA1, structure with phosphopeptide\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"1y98\",\n" + + " \"resolution\":2.5,\n" + + " \"title\":\"Structure of the BRCT repeats of BRCA1 bound to a CtIP phosphopeptide.\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"1t29\",\n" + + " \"resolution\":2.3,\n" + + " \"title\":\"Crystal structure of the BRCA1 BRCT repeats bound to a phosphorylated BACH1 peptide\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"3k0k\",\n" + + " \"resolution\":2.7,\n" + + " \"title\":\"Crystal Structure of BRCA1 BRCT in complex with a minimal recognition tetrapeptide with a free carboxy C-terminus.\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"3k0h\",\n" + + " \"resolution\":2.7,\n" + + " \"title\":\"The crystal structure of BRCA1 BRCT in complex with a minimal recognition tetrapeptide with an amidated C-terminus\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"4ifi\",\n" + + " \"resolution\":2.2,\n" + + " \"title\":\"Structure of human BRCA1 BRCT in complex with BAAT peptide\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"3pxd\",\n" + + " \"resolution\":2.8,\n" + + " \"title\":\"Impact of BRCA1 BRCT domain missense substitutions on phospho-peptide recognition: R1835P\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"3pxc\",\n" + + " \"resolution\":2.8,\n" + + " \"title\":\"Impact of BRCA1 BRCT domain missense substitutions on phospho-peptide recognition: R1699Q\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"1jnx\",\n" + + " \"resolution\":2.5,\n" + + " \"title\":\"Crystal structure of the BRCT repeat region from the breast cancer associated protein, BRCA1\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"3pxa\",\n" + + " \"resolution\":2.55,\n" + + " \"title\":\"Impact of BRCA1 BRCT domain missense substitutions on phospho-peptide recognition: G1656D\"},\n" + + " {\n" + + " \"experimental_method\":[\"Solution NMR\"],\n" + + " \"pdb_id\":\"1jm7\",\n" + + " \"title\":\"Solution structure of the BRCA1/BARD1 RING-domain heterodimer\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"4igk\",\n" + + " \"resolution\":1.75,\n" + + " \"title\":\"Structure of human BRCA1 BRCT in complex with ATRIP peptide\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"1t2u\",\n" + + " \"resolution\":2.8,\n" + + " \"title\":\"Structural basis of phosphopeptide recognition by the BRCT domain of BRCA1: structure of BRCA1 missense variant V1809F\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"3pxb\",\n" + + " \"resolution\":2.5,\n" + + " \"title\":\"Impact of BRCA1 BRCT domain missense substitutions on phospho-peptide recognition: T1700A\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"1n5o\",\n" + + " \"resolution\":2.8,\n" + + " \"title\":\"Structural consequences of a cancer-causing BRCA1-BRCT missense mutation\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"3coj\",\n" + + " \"resolution\":3.21,\n" + + " \"title\":\"Crystal Structure of the BRCT Domains of Human BRCA1 in Complex with a Phosphorylated Peptide from Human Acetyl-CoA Carboxylase 1\"},\n" + + " {\n" + + " \"experimental_method\":[\"Electron Microscopy\"],\n" + + " \"pdb_id\":\"6g2i\",\n" + + " \"resolution\":5.9,\n" + + " \"title\":\"Filament of acetyl-CoA carboxylase and BRCT domains of BRCA1 (ACC-BRCT) at 5.9 A resolution\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"4jlu\",\n" + + " \"resolution\":3.5,\n" + + " \"title\":\"Crystal structure of BRCA1 BRCT with doubly phosphorylated Abraxas\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"4ofb\",\n" + + " \"resolution\":3.05,\n" + + " \"title\":\"Crystal structure of human BRCA1 BRCT in complex with nonphosphopeptide inhibitor\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"3pxe\",\n" + + " \"resolution\":2.85,\n" + + " \"title\":\"Impact of BRCA1 BRCT domain missense substitutions on phospho-peptide recognition: E1836K\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"4u4a\",\n" + + " \"resolution\":3.51,\n" + + " \"title\":\"Complex Structure of BRCA1 BRCT with singly phospho Abraxas\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"4y2g\",\n" + + " \"resolution\":2.5,\n" + + " \"title\":\"Structure of BRCA1 BRCT domains in complex with Abraxas single phosphorylated peptide\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"4y18\",\n" + + " \"resolution\":3.5,\n" + + " \"title\":\"Structure of BRCA1 BRCT domains in complex with Abraxas double phosphorylated peptide\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"2ing\",\n" + + " \"resolution\":3.6,\n" + + " \"title\":\"X-ray Structure of the BRCA1 BRCT mutant M1775K\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"1t15\",\n" + + " \"resolution\":1.85,\n" + + " \"title\":\"Crystal Structure of the Brca1 BRCT Domains in Complex with the Phosphorylated Interacting Region from Bach1 Helicase\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"1t29\",\n" + + " \"resolution\":2.3,\n" + + " \"title\":\"Crystal structure of the BRCA1 BRCT repeats bound to a phosphorylated BACH1 peptide\"},\n" + + " {\n" + + " \"experimental_method\":[\"Solution NMR\"],\n" + + " \"pdb_id\":\"1jm7\",\n" + + " \"title\":\"Solution structure of the BRCA1/BARD1 RING-domain heterodimer\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"1t2v\",\n" + + " \"resolution\":3.3,\n" + + " \"title\":\"Structural basis of phospho-peptide recognition by the BRCT domain of BRCA1, structure with phosphopeptide\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"4ifi\",\n" + + " \"resolution\":2.2,\n" + + " \"title\":\"Structure of human BRCA1 BRCT in complex with BAAT peptide\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"4igk\",\n" + + " \"resolution\":1.75,\n" + + " \"title\":\"Structure of human BRCA1 BRCT in complex with ATRIP peptide\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"3k0k\",\n" + + " \"resolution\":2.7,\n" + + " \"title\":\"Crystal Structure of BRCA1 BRCT in complex with a minimal recognition tetrapeptide with a free carboxy C-terminus.\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"3k16\",\n" + + " \"resolution\":3.0,\n" + + " \"title\":\"Crystal Structure of BRCA1 BRCT D1840T in complex with a minimal recognition tetrapeptide with a free carboxy C-terminus\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"3k15\",\n" + + " \"resolution\":2.8,\n" + + " \"title\":\"Crystal Structure of BRCA1 BRCT D1840T in complex with a minimal recognition tetrapeptide with an amidated C-terminus\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"3k0h\",\n" + + " \"resolution\":2.7,\n" + + " \"title\":\"The crystal structure of BRCA1 BRCT in complex with a minimal recognition tetrapeptide with an amidated C-terminus\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"1y98\",\n" + + " \"resolution\":2.5,\n" + + " \"title\":\"Structure of the BRCT repeats of BRCA1 bound to a CtIP phosphopeptide.\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"3coj\",\n" + + " \"resolution\":3.21,\n" + + " \"title\":\"Crystal Structure of the BRCT Domains of Human BRCA1 in Complex with a Phosphorylated Peptide from Human Acetyl-CoA Carboxylase 1\"},\n" + + " {\n" + + " \"experimental_method\":[\"X-ray diffraction\"],\n" + + " \"pdb_id\":\"4y18\",\n" + + " \"resolution\":3.5,\n" + + " \"title\":\"Structure of BRCA1 BRCT domains in complex with Abraxas double phosphorylated peptide\"},\n" + + " {\n" + + " \"experimental_method\":[\"Electron Microscopy\"],\n" + + " \"pdb_id\":\"7jzv\",\n" + + " \"resolution\":3.9,\n" + + " \"title\":\"Cryo-EM structure of the BRCA1-UbcH5c/BARD1 E3-E2 module bound to a nucleosome\"},\n" + + " {\n" + + " \"experimental_method\":[\"Electron Microscopy\"],\n" + + " \"pdb_id\":\"7jzv\",\n" + + " \"resolution\":3.9,\n" + + " \"title\":\"Cryo-EM structure of the BRCA1-UbcH5c/BARD1 E3-E2 module bound to a nucleosome\"},\n" + + " {\n" + + " \"experimental_method\":[\"Electron Microscopy\"],\n" + + " \"pdb_id\":\"7lyb\",\n" + + " \"resolution\":3.28,\n" + + " \"title\":\"Cryo-EM structure of the human nucleosome core particle in complex with BRCA1-BARD1-UbcH5c\"},\n" + + " {\n" + + " \"experimental_method\":[\"Electron Microscopy\"],\n" + + " \"pdb_id\":\"7lyb\",\n" + + " \"resolution\":3.28,\n" + + " \"title\":\"Cryo-EM structure of the human nucleosome core particle in complex with BRCA1-BARD1-UbcH5c\"},\n" + + " {\n" + + " \"experimental_method\":[\"Electron Microscopy\"],\n" + + " \"pdb_id\":\"7lyb\",\n" + + " \"resolution\":3.28,\n" + + " \"title\":\"Cryo-EM structure of the human nucleosome core particle in complex with BRCA1-BARD1-UbcH5c\"},\n" + + " {\n" + + " \"experimental_method\":[\"Electron Microscopy\"],\n" + + " \"pdb_id\":\"7jzv\",\n" + + " \"resolution\":3.9,\n" + + " \"title\":\"Cryo-EM structure of the BRCA1-UbcH5c/BARD1 E3-E2 module bound to a nucleosome\"},\n" + + " {\n" + + " \"experimental_method\":[\"Electron Microscopy\"],\n" + + " \"pdb_id\":\"7lyb\",\n" + + " \"resolution\":3.28,\n" + + " \"title\":\"Cryo-EM structure of the human nucleosome core particle in complex with BRCA1-BARD1-UbcH5c\"},\n" + + " {\n" + + " \"experimental_method\":[\"Electron Microscopy\"],\n" + + " \"pdb_id\":\"7jzv\",\n" + + " \"resolution\":3.9,\n" + + " \"title\":\"Cryo-EM structure of the BRCA1-UbcH5c/BARD1 E3-E2 module bound to a nucleosome\"},\n" + + " {\n" + + " \"experimental_method\":[\"Electron Microscopy\"],\n" + + " \"pdb_id\":\"7lyb\",\n" + + " \"resolution\":3.28,\n" + + " \"title\":\"Cryo-EM structure of the human nucleosome core particle in complex with BRCA1-BARD1-UbcH5c\"},\n" + + " {\n" + + " \"experimental_method\":[\"Electron Microscopy\"],\n" + + " \"pdb_id\":\"7jzv\",\n" + + " \"resolution\":3.9,\n" + + " \"title\":\"Cryo-EM structure of the BRCA1-UbcH5c/BARD1 E3-E2 module bound to a nucleosome\"},\n" + + " {\n" + + " \"experimental_method\":[\"Electron Microscopy\"],\n" + + " \"pdb_id\":\"7lyb\",\n" + + " \"resolution\":3.28,\n" + + " \"title\":\"Cryo-EM structure of the human nucleosome core particle in complex with BRCA1-BARD1-UbcH5c\"},\n" + + " {\n" + + " \"experimental_method\":[\"Electron Microscopy\"],\n" + + " \"pdb_id\":\"7lyb\",\n" + + " \"resolution\":3.28,\n" + + " \"title\":\"Cryo-EM structure of the human nucleosome core particle in complex with BRCA1-BARD1-UbcH5c\"},\n" + + " {\n" + + " \"experimental_method\":[\"Electron Microscopy\"],\n" + + " \"pdb_id\":\"7lyb\",\n" + + " \"resolution\":3.28,\n" + + " \"title\":\"Cryo-EM structure of the human nucleosome core particle in complex with BRCA1-BARD1-UbcH5c\"},\n" + + " {\n" + + " \"experimental_method\":[\"Electron Microscopy\"],\n" + + " \"pdb_id\":\"7jzv\",\n" + + " \"resolution\":3.9,\n" + + " \"title\":\"Cryo-EM structure of the BRCA1-UbcH5c/BARD1 E3-E2 module bound to a nucleosome\"},\n" + + " {\n" + + " \"experimental_method\":[\"Electron Microscopy\"],\n" + + " \"pdb_id\":\"6g2i\",\n" + + " \"resolution\":5.9,\n" + + " \"title\":\"Filament of acetyl-CoA carboxylase and BRCT domains of BRCA1 (ACC-BRCT) at 5.9 A resolution\"},\n" + + " {\n" + + " \"experimental_method\":[\"Electron Microscopy\"],\n" + + " \"pdb_id\":\"7jzv\",\n" + + " \"resolution\":3.9,\n" + + " \"title\":\"Cryo-EM structure of the BRCA1-UbcH5c/BARD1 E3-E2 module bound to a nucleosome\"},\n" + + " {\n" + + " \"experimental_method\":[\"Electron Microscopy\"],\n" + + " \"pdb_id\":\"7lyb\",\n" + + " \"resolution\":3.28,\n" + + " \"title\":\"Cryo-EM structure of the human nucleosome core particle in complex with BRCA1-BARD1-UbcH5c\"},\n" + + " {\n" + + " \"experimental_method\":[\"Electron Microscopy\"],\n" + + " \"pdb_id\":\"7jzv\",\n" + + " \"resolution\":3.9,\n" + + " \"title\":\"Cryo-EM structure of the BRCA1-UbcH5c/BARD1 E3-E2 module bound to a nucleosome\"}]\n" + + " }}" }; + mocks[1] = new String[2]; - try { - mocks[1][0] = readJsonStringFromFile("test/jalview/fts/threedbeacons/p01308_pdbfts_query.txt").trim(); - mocks[1][1] = readJsonStringFromFile("test/jalview/fts/threedbeacons/p01308_pdbfts_resp.txt").trim(); + try + { + mocks[1][0] = readJsonStringFromFile( + "test/jalview/fts/threedbeacons/p01308_pdbfts_query.txt") + .trim(); + mocks[1][1] = readJsonStringFromFile( + "test/jalview/fts/threedbeacons/p01308_pdbfts_resp.txt") + .trim(); } catch (Throwable e) { - Assert.fail("Couldn't read mock data.",e); + Assert.fail("Couldn't read mock data.", e); } - - FTSRestClient.createMockFTSRestClient((FTSRestClient) PDBFTSRestClient.getInstance(), mocks); + + FTSRestClient.createMockFTSRestClient( + (FTSRestClient) PDBFTSRestClient.getInstance(), mocks); } } diff --git a/test/jalview/fts/threedbeacons/TDBeaconsFTSRestClientTest.java b/test/jalview/fts/threedbeacons/TDBeaconsFTSRestClientTest.java index f72ad89..bd2dbb0 100644 --- a/test/jalview/fts/threedbeacons/TDBeaconsFTSRestClientTest.java +++ b/test/jalview/fts/threedbeacons/TDBeaconsFTSRestClientTest.java @@ -280,35 +280,37 @@ public class TDBeaconsFTSRestClientTest private static String[][] mocks = { { "P38398.json", "{\"uniprot_entry\":{\"sequence_length\":1863,\"ac\":\"P38398\",\"id\":\"BRCA1_HUMAN\"},\"structures\":[{\"model_identifier\":\"4igk\",\"model_category\":\"EXPERIMENTALLY DETERMINED\",\"provider\":\"PDBe\",\"created\":\"2012-12-17\",\"sequence_identity\":100.0,\"uniprot_start\":1646,\"uniprot_end\":1859,\"resolution\":1.75,\"coverage\":11.49,\"model_url\":\"https://www.ebi.ac.uk/pdbe/static/entry/4igk_updated.cif\",\"model_format\":\"MMCIF\",\"experimental_method\":\"X-RAY DIFFRACTION\",\"model_page_url\":\"https://www.ebi.ac.uk/pdbe/entry/pdb/4igk\"},{\"model_identifier\":\"1t15\",\"model_category\":\"EXPERIMENTALLY DETERMINED\",\"provider\":\"PDBe\",\"created\":\"2004-04-15\",\"sequence_identity\":100.0,\"uniprot_start\":1646,\"uniprot_end\":1859,\"resolution\":1.85,\"coverage\":11.49,\"model_url\":\"https://www.ebi.ac.uk/pdbe/static/entry/1t15_updated.cif\",\"model_format\":\"MMCIF\",\"experimental_method\":\"X-RAY DIFFRACTION\",\"model_page_url\":\"https://www.ebi.ac.uk/pdbe/entry/pdb/1t15\"},{\"model_identifier\":\"4ifi\",\"model_category\":\"EXPERIMENTALLY DETERMINED\",\"provider\":\"PDBe\",\"created\":\"2012-12-14\",\"sequence_identity\":100.0,\"uniprot_start\":1646,\"uniprot_end\":1859,\"resolution\":2.2,\"coverage\":11.49,\"model_url\":\"https://www.ebi.ac.uk/pdbe/static/entry/4ifi_updated.cif\",\"model_format\":\"MMCIF\",\"experimental_method\":\"X-RAY DIFFRACTION\",\"model_page_url\":\"https://www.ebi.ac.uk/pdbe/entry/pdb/4ifi\"},{\"model_identifier\":\"1t29\",\"model_category\":\"EXPERIMENTALLY DETERMINED\",\"provider\":\"PDBe\",\"created\":\"2004-04-20\",\"sequence_identity\":100.0,\"uniprot_start\":1646,\"uniprot_end\":1859,\"resolution\":2.3,\"coverage\":11.49,\"model_url\":\"https://www.ebi.ac.uk/pdbe/static/entry/1t29_updated.cif\",\"model_format\":\"MMCIF\",\"experimental_method\":\"X-RAY DIFFRACTION\",\"model_page_url\":\"https://www.ebi.ac.uk/pdbe/entry/pdb/1t29\"},{\"model_identifier\":\"3pxb\",\"model_category\":\"EXPERIMENTALLY DETERMINED\",\"provider\":\"PDBe\",\"created\":\"2010-12-09\",\"sequence_identity\":100.0,\"uniprot_start\":1646,\"uniprot_end\":1859,\"resolution\":2.5,\"coverage\":11.49,\"model_url\":\"https://www.ebi.ac.uk/pdbe/static/entry/3pxb_updated.cif\",\"model_format\":\"MMCIF\",\"experimental_method\":\"X-RAY DIFFRACTION\",\"model_page_url\":\"https://www.ebi.ac.uk/pdbe/entry/pdb/3pxb\"},{\"model_identifier\":\"4y2g\",\"model_category\":\"EXPERIMENTALLY DETERMINED\",\"provider\":\"PDBe\",\"created\":\"2015-02-09\",\"sequence_identity\":100.0,\"uniprot_start\":1646,\"uniprot_end\":1859,\"resolution\":2.5,\"coverage\":11.49,\"model_url\":\"https://www.ebi.ac.uk/pdbe/static/entry/4y2g_updated.cif\",\"model_format\":\"MMCIF\",\"experimental_method\":\"X-RAY DIFFRACTION\",\"model_page_url\":\"https://www.ebi.ac.uk/pdbe/entry/pdb/4y2g\"},{\"model_identifier\":\"1y98\",\"model_category\":\"EXPERIMENTALLY DETERMINED\",\"provider\":\"PDBe\",\"created\":\"2004-12-14\",\"sequence_identity\":100.0,\"uniprot_start\":1646,\"uniprot_end\":1859,\"resolution\":2.5,\"coverage\":11.49,\"model_url\":\"https://www.ebi.ac.uk/pdbe/static/entry/1y98_updated.cif\",\"model_format\":\"MMCIF\",\"experimental_method\":\"X-RAY DIFFRACTION\",\"model_page_url\":\"https://www.ebi.ac.uk/pdbe/entry/pdb/1y98\"},{\"model_identifier\":\"1jnx\",\"model_category\":\"EXPERIMENTALLY DETERMINED\",\"provider\":\"PDBe\",\"created\":\"2001-07-26\",\"sequence_identity\":100.0,\"uniprot_start\":1646,\"uniprot_end\":1859,\"resolution\":2.5,\"coverage\":11.49,\"model_url\":\"https://www.ebi.ac.uk/pdbe/static/entry/1jnx_updated.cif\",\"model_format\":\"MMCIF\",\"experimental_method\":\"X-RAY DIFFRACTION\",\"model_page_url\":\"https://www.ebi.ac.uk/pdbe/entry/pdb/1jnx\"},{\"model_identifier\":\"3pxa\",\"model_category\":\"EXPERIMENTALLY DETERMINED\",\"provider\":\"PDBe\",\"created\":\"2010-12-09\",\"sequence_identity\":100.0,\"uniprot_start\":1646,\"uniprot_end\":1859,\"resolution\":2.55,\"coverage\":11.49,\"model_url\":\"https://www.ebi.ac.uk/pdbe/static/entry/3pxa_updated.cif\",\"model_format\":\"MMCIF\",\"experimental_method\":\"X-RAY DIFFRACTION\",\"model_page_url\":\"https://www.ebi.ac.uk/pdbe/entry/pdb/3pxa\"},{\"model_identifier\":\"3k0h\",\"model_category\":\"EXPERIMENTALLY DETERMINED\",\"provider\":\"PDBe\",\"created\":\"2009-09-24\",\"sequence_identity\":100.0,\"uniprot_start\":1646,\"uniprot_end\":1859,\"resolution\":2.7,\"coverage\":11.49,\"model_url\":\"https://www.ebi.ac.uk/pdbe/static/entry/3k0h_updated.cif\",\"model_format\":\"MMCIF\",\"experimental_method\":\"X-RAY DIFFRACTION\",\"model_page_url\":\"https://www.ebi.ac.uk/pdbe/entry/pdb/3k0h\"},{\"model_identifier\":\"3k0k\",\"model_category\":\"EXPERIMENTALLY DETERMINED\",\"provider\":\"PDBe\",\"created\":\"2009-09-24\",\"sequence_identity\":100.0,\"uniprot_start\":1646,\"uniprot_end\":1859,\"resolution\":2.7,\"coverage\":11.49,\"model_url\":\"https://www.ebi.ac.uk/pdbe/static/entry/3k0k_updated.cif\",\"model_format\":\"MMCIF\",\"experimental_method\":\"X-RAY DIFFRACTION\",\"model_page_url\":\"https://www.ebi.ac.uk/pdbe/entry/pdb/3k0k\"},{\"model_identifier\":\"1n5o\",\"model_category\":\"EXPERIMENTALLY DETERMINED\",\"provider\":\"PDBe\",\"created\":\"2002-11-06\",\"sequence_identity\":100.0,\"uniprot_start\":1646,\"uniprot_end\":1859,\"resolution\":2.8,\"coverage\":11.49,\"model_url\":\"https://www.ebi.ac.uk/pdbe/static/entry/1n5o_updated.cif\",\"model_format\":\"MMCIF\",\"experimental_method\":\"X-RAY DIFFRACTION\",\"model_page_url\":\"https://www.ebi.ac.uk/pdbe/entry/pdb/1n5o\"},{\"model_identifier\":\"3pxc\",\"model_category\":\"EXPERIMENTALLY DETERMINED\",\"provider\":\"PDBe\",\"created\":\"2010-12-09\",\"sequence_identity\":100.0,\"uniprot_start\":1646,\"uniprot_end\":1859,\"resolution\":2.8,\"coverage\":11.49,\"model_url\":\"https://www.ebi.ac.uk/pdbe/static/entry/3pxc_updated.cif\",\"model_format\":\"MMCIF\",\"experimental_method\":\"X-RAY DIFFRACTION\",\"model_page_url\":\"https://www.ebi.ac.uk/pdbe/entry/pdb/3pxc\"},{\"model_identifier\":\"3pxd\",\"model_category\":\"EXPERIMENTALLY DETERMINED\",\"provider\":\"PDBe\",\"created\":\"2010-12-09\",\"sequence_identity\":100.0,\"uniprot_start\":1646,\"uniprot_end\":1859,\"resolution\":2.8,\"coverage\":11.49,\"model_url\":\"https://www.ebi.ac.uk/pdbe/static/entry/3pxd_updated.cif\",\"model_format\":\"MMCIF\",\"experimental_method\":\"X-RAY DIFFRACTION\",\"model_page_url\":\"https://www.ebi.ac.uk/pdbe/entry/pdb/3pxd\"},{\"model_identifier\":\"1t2u\",\"model_category\":\"EXPERIMENTALLY DETERMINED\",\"provider\":\"PDBe\",\"created\":\"2004-04-22\",\"sequence_identity\":100.0,\"uniprot_start\":1646,\"uniprot_end\":1859,\"resolution\":2.8,\"coverage\":11.49,\"model_url\":\"https://www.ebi.ac.uk/pdbe/static/entry/1t2u_updated.cif\",\"model_format\":\"MMCIF\",\"experimental_method\":\"X-RAY DIFFRACTION\",\"model_page_url\":\"https://www.ebi.ac.uk/pdbe/entry/pdb/1t2u\"},{\"model_identifier\":\"3k15\",\"model_category\":\"EXPERIMENTALLY DETERMINED\",\"provider\":\"PDBe\",\"created\":\"2009-09-25\",\"sequence_identity\":100.0,\"uniprot_start\":1646,\"uniprot_end\":1859,\"resolution\":2.8,\"coverage\":11.49,\"model_url\":\"https://www.ebi.ac.uk/pdbe/static/entry/3k15_updated.cif\",\"model_format\":\"MMCIF\",\"experimental_method\":\"X-RAY DIFFRACTION\",\"model_page_url\":\"https://www.ebi.ac.uk/pdbe/entry/pdb/3k15\"},{\"model_identifier\":\"3pxe\",\"model_category\":\"EXPERIMENTALLY DETERMINED\",\"provider\":\"PDBe\",\"created\":\"2010-12-09\",\"sequence_identity\":100.0,\"uniprot_start\":1646,\"uniprot_end\":1859,\"resolution\":2.85,\"coverage\":11.49,\"model_url\":\"https://www.ebi.ac.uk/pdbe/static/entry/3pxe_updated.cif\",\"model_format\":\"MMCIF\",\"experimental_method\":\"X-RAY DIFFRACTION\",\"model_page_url\":\"https://www.ebi.ac.uk/pdbe/entry/pdb/3pxe\"},{\"model_identifier\":\"3k16\",\"model_category\":\"EXPERIMENTALLY DETERMINED\",\"provider\":\"PDBe\",\"created\":\"2009-09-25\",\"sequence_identity\":100.0,\"uniprot_start\":1646,\"uniprot_end\":1859,\"resolution\":3.0,\"coverage\":11.49,\"model_url\":\"https://www.ebi.ac.uk/pdbe/static/entry/3k16_updated.cif\",\"model_format\":\"MMCIF\",\"experimental_method\":\"X-RAY DIFFRACTION\",\"model_page_url\":\"https://www.ebi.ac.uk/pdbe/entry/pdb/3k16\"},{\"model_identifier\":\"4ofb\",\"model_category\":\"EXPERIMENTALLY DETERMINED\",\"provider\":\"PDBe\",\"created\":\"2014-01-14\",\"sequence_identity\":100.0,\"uniprot_start\":1646,\"uniprot_end\":1859,\"resolution\":3.05,\"coverage\":11.49,\"model_url\":\"https://www.ebi.ac.uk/pdbe/static/entry/4ofb_updated.cif\",\"model_format\":\"MMCIF\",\"experimental_method\":\"X-RAY DIFFRACTION\",\"model_page_url\":\"https://www.ebi.ac.uk/pdbe/entry/pdb/4ofb\"},{\"model_identifier\":\"3coj\",\"model_category\":\"EXPERIMENTALLY DETERMINED\",\"provider\":\"PDBe\",\"created\":\"2008-03-28\",\"sequence_identity\":100.0,\"uniprot_start\":1646,\"uniprot_end\":1859,\"resolution\":3.21,\"coverage\":11.49,\"model_url\":\"https://www.ebi.ac.uk/pdbe/static/entry/3coj_updated.cif\",\"model_format\":\"MMCIF\",\"experimental_method\":\"X-RAY DIFFRACTION\",\"model_page_url\":\"https://www.ebi.ac.uk/pdbe/entry/pdb/3coj\"},{\"model_identifier\":\"7lyb\",\"model_category\":\"EXPERIMENTALLY DETERMINED\",\"provider\":\"PDBe\",\"created\":\"2021-03-06\",\"sequence_identity\":100.0,\"uniprot_start\":1,\"uniprot_end\":100,\"resolution\":3.28,\"coverage\":5.37,\"model_url\":\"https://www.ebi.ac.uk/pdbe/static/entry/7lyb_updated.cif\",\"model_format\":\"MMCIF\",\"experimental_method\":\"ELECTRON MICROSCOPY\",\"model_page_url\":\"https://www.ebi.ac.uk/pdbe/entry/pdb/7lyb\"},{\"model_identifier\":\"1t2v\",\"model_category\":\"EXPERIMENTALLY DETERMINED\",\"provider\":\"PDBe\",\"created\":\"2004-04-22\",\"sequence_identity\":100.0,\"uniprot_start\":1646,\"uniprot_end\":1859,\"resolution\":3.3,\"coverage\":11.49,\"model_url\":\"https://www.ebi.ac.uk/pdbe/static/entry/1t2v_updated.cif\",\"model_format\":\"MMCIF\",\"experimental_method\":\"X-RAY DIFFRACTION\",\"model_page_url\":\"https://www.ebi.ac.uk/pdbe/entry/pdb/1t2v\"},{\"model_identifier\":\"4y18\",\"model_category\":\"EXPERIMENTALLY DETERMINED\",\"provider\":\"PDBe\",\"created\":\"2015-02-06\",\"sequence_identity\":100.0,\"uniprot_start\":1646,\"uniprot_end\":1859,\"resolution\":3.5,\"coverage\":11.49,\"model_url\":\"https://www.ebi.ac.uk/pdbe/static/entry/4y18_updated.cif\",\"model_format\":\"MMCIF\",\"experimental_method\":\"X-RAY DIFFRACTION\",\"model_page_url\":\"https://www.ebi.ac.uk/pdbe/entry/pdb/4y18\"},{\"model_identifier\":\"4jlu\",\"model_category\":\"EXPERIMENTALLY DETERMINED\",\"provider\":\"PDBe\",\"created\":\"2013-03-13\",\"sequence_identity\":100.0,\"uniprot_start\":1649,\"uniprot_end\":1859,\"resolution\":3.5,\"coverage\":11.33,\"model_url\":\"https://www.ebi.ac.uk/pdbe/static/entry/4jlu_updated.cif\",\"model_format\":\"MMCIF\",\"experimental_method\":\"X-RAY DIFFRACTION\",\"model_page_url\":\"https://www.ebi.ac.uk/pdbe/entry/pdb/4jlu\"},{\"model_identifier\":\"4u4a\",\"model_category\":\"EXPERIMENTALLY DETERMINED\",\"provider\":\"PDBe\",\"created\":\"2014-07-23\",\"sequence_identity\":100.0,\"uniprot_start\":1646,\"uniprot_end\":1859,\"resolution\":3.51,\"coverage\":11.49,\"model_url\":\"https://www.ebi.ac.uk/pdbe/static/entry/4u4a_updated.cif\",\"model_format\":\"MMCIF\",\"experimental_method\":\"X-RAY DIFFRACTION\",\"model_page_url\":\"https://www.ebi.ac.uk/pdbe/entry/pdb/4u4a\"},{\"model_identifier\":\"2ing\",\"model_category\":\"EXPERIMENTALLY DETERMINED\",\"provider\":\"PDBe\",\"created\":\"2006-10-07\",\"sequence_identity\":100.0,\"uniprot_start\":1649,\"uniprot_end\":1859,\"resolution\":3.6,\"coverage\":11.33,\"model_url\":\"https://www.ebi.ac.uk/pdbe/static/entry/2ing_updated.cif\",\"model_format\":\"MMCIF\",\"experimental_method\":\"X-RAY DIFFRACTION\",\"model_page_url\":\"https://www.ebi.ac.uk/pdbe/entry/pdb/2ing\"},{\"model_identifier\":\"7jzv\",\"model_category\":\"EXPERIMENTALLY DETERMINED\",\"provider\":\"PDBe\",\"created\":\"2020-09-02\",\"sequence_identity\":99.0,\"uniprot_start\":2,\"uniprot_end\":104,\"resolution\":3.9,\"coverage\":5.53,\"model_url\":\"https://www.ebi.ac.uk/pdbe/static/entry/7jzv_updated.cif\",\"model_format\":\"MMCIF\",\"experimental_method\":\"ELECTRON MICROSCOPY\",\"model_page_url\":\"https://www.ebi.ac.uk/pdbe/entry/pdb/7jzv\"},{\"model_identifier\":\"6g2i\",\"model_category\":\"EXPERIMENTALLY DETERMINED\",\"provider\":\"PDBe\",\"created\":\"2018-03-23\",\"sequence_identity\":100.0,\"uniprot_start\":1646,\"uniprot_end\":1859,\"resolution\":5.9,\"coverage\":11.49,\"model_url\":\"https://www.ebi.ac.uk/pdbe/static/entry/6g2i_updated.cif\",\"model_format\":\"MMCIF\",\"experimental_method\":\"ELECTRON MICROSCOPY\",\"model_page_url\":\"https://www.ebi.ac.uk/pdbe/entry/pdb/6g2i\"},{\"model_identifier\":\"1jm7\",\"model_category\":\"EXPERIMENTALLY DETERMINED\",\"provider\":\"PDBe\",\"created\":\"2001-07-17\",\"sequence_identity\":100.0,\"uniprot_start\":1,\"uniprot_end\":110,\"resolution\":null,\"coverage\":5.9,\"model_url\":\"https://www.ebi.ac.uk/pdbe/static/entry/1jm7_updated.cif\",\"model_format\":\"MMCIF\",\"experimental_method\":\"SOLUTION NMR\",\"model_page_url\":\"https://www.ebi.ac.uk/pdbe/entry/pdb/1jm7\"},{\"model_identifier\":\"1oqa\",\"model_category\":\"EXPERIMENTALLY DETERMINED\",\"provider\":\"PDBe\",\"created\":\"2003-03-07\",\"sequence_identity\":100.0,\"uniprot_start\":1755,\"uniprot_end\":1863,\"resolution\":null,\"coverage\":5.85,\"model_url\":\"https://www.ebi.ac.uk/pdbe/static/entry/1oqa_updated.cif\",\"model_format\":\"MMCIF\",\"experimental_method\":\"SOLUTION NMR\",\"model_page_url\":\"https://www.ebi.ac.uk/pdbe/entry/pdb/1oqa\"},{\"model_identifier\":\"P38398_1646-1859:6g2i.1.K\",\"model_category\":\"TEMPLATE-BASED\",\"provider\":\"SWISS-MODEL\",\"created\":\"2021-11-05\",\"sequence_identity\":1.0,\"uniprot_start\":1646,\"uniprot_end\":1859,\"coverage\":0.115,\"confidence_version\":\"4.2.0\",\"confidence_avg_local_score\":0.776,\"model_url\":\"https://swissmodel.expasy.org/3d-beacons/uniprot/P38398.pdb?range=1646-1859&template=6g2i.1.K&provider=swissmodel\",\"model_format\":\"PDB\",\"model_page_url\":\"https://swissmodel.expasy.org/repository/uniprot/P38398?range=1646-1859&template=6g2i.1.K\",\"confidence_type\":\"QMEANDisCo\"},{\"model_identifier\":\"P38398_1-103:1jm7.1.A\",\"model_category\":\"TEMPLATE-BASED\",\"provider\":\"SWISS-MODEL\",\"created\":\"2021-11-05\",\"sequence_identity\":1.0,\"uniprot_start\":1,\"uniprot_end\":103,\"coverage\":0.055,\"confidence_version\":\"4.2.0\",\"confidence_avg_local_score\":0.655,\"model_url\":\"https://swissmodel.expasy.org/3d-beacons/uniprot/P38398.pdb?range=1-103&template=1jm7.1.A&provider=swissmodel\",\"model_format\":\"PDB\",\"model_page_url\":\"https://swissmodel.expasy.org/repository/uniprot/P38398?range=1-103&template=1jm7.1.A\",\"confidence_type\":\"QMEANDisCo\"},{\"model_identifier\":\"AF-P38398-F1\",\"model_category\":\"DEEP-LEARNING\",\"provider\":\"AlphaFold DB\",\"created\":\"2021-07-01\",\"sequence_identity\":1.0,\"uniprot_start\":1,\"uniprot_end\":1863,\"coverage\":100.0,\"model_url\":\"https://alphafold.ebi.ac.uk/files/AF-P38398-F1-model_v1.cif\",\"model_format\":\"MMCIF\",\"model_page_url\":\"https://alphafold.ebi.ac.uk/entry/P38398\"}]}" }, - { "P01308.json",null}}; + { "P01308.json", null } }; private static void setMockData() { try { - mocks[1][1]= PDBFTSRestClientTest.readJsonStringFromFile("test/jalview/fts/threedbeacons/p01308_tdb_resp.txt"); + mocks[1][1] = PDBFTSRestClientTest.readJsonStringFromFile( + "test/jalview/fts/threedbeacons/p01308_tdb_resp.txt"); } catch (IOException e) { - Assert.fail("Couldn't read mock response data",e); + Assert.fail("Couldn't read mock response data", e); } } - + public static void setMock() { setMockData(); FTSRestClient.createMockFTSRestClient( - (FTSRestClient) TDBeaconsFTSRestClient.getInstance(), - mocks); + (FTSRestClient) TDBeaconsFTSRestClient.getInstance(), mocks); } private static String dev_url = "https://wwwdev.ebi.ac.uk/pdbe/pdbe-kb/3dbeacons/api/uniprot/summary/"; + private static String prod_url = "https://www.ebi.ac.uk/pdbe/pdbe-kb/3dbeacons/api/uniprot/summary/"; /** * check that the mock request and response are the same as the response from * a live 3D-beacons endpoint * - * Note - servers often have rapidly changing ids / URIs so this might fail, but the overall structure will remain. + * Note - servers often have rapidly changing ids / URIs so this might fail, + * but the overall structure will remain. * * @throws Exception */ @@ -316,12 +318,14 @@ public class TDBeaconsFTSRestClientTest public void verifyMockTDBRequest() throws Exception { setMockData(); - for (String[] otherMock:mocks) + for (String[] otherMock : mocks) { - verifyMockTDBRequest(otherMock[0],otherMock[1]); + verifyMockTDBRequest(otherMock[0], otherMock[1]); } } - private void verifyMockTDBRequest(String mockRequest, String _mockResponse) throws Exception + + private void verifyMockTDBRequest(String mockRequest, + String _mockResponse) throws Exception { URL tdb_req = new URL(prod_url + mockRequest); byte[] resp = tdb_req.openStream().readAllBytes(); diff --git a/test/jalview/fts/threedbeacons/TDBeaconsPanelTest.java b/test/jalview/fts/threedbeacons/TDBeaconsPanelTest.java index dec33e3..0001b7a 100644 --- a/test/jalview/fts/threedbeacons/TDBeaconsPanelTest.java +++ b/test/jalview/fts/threedbeacons/TDBeaconsPanelTest.java @@ -1,6 +1,5 @@ package jalview.fts.threedbeacons; - import static org.testng.AssertJUnit.assertEquals; import static org.testng.AssertJUnit.assertTrue; @@ -18,7 +17,6 @@ import org.testng.annotations.Test; import junit.extensions.PA; - public class TDBeaconsPanelTest { @BeforeClass(alwaysRun = true) @@ -45,24 +43,26 @@ public class TDBeaconsPanelTest assertTrue(searchPanel.getCmbSearchTarget().getItemCount() > 0); searchPanel.populateCmbSearchTargetOptions(); } - + @Test - public void getFTSframeTitleTest() { + public void getFTSframeTitleTest() + { TDBeaconsFTSPanel searchPanel = new TDBeaconsFTSPanel(null); System.out.println(searchPanel.getFTSFrameTitle()); } - + @Test - public void testgetUNIPROTid() { + public void testgetUNIPROTid() + { String outcome = TDBeaconsFTSPanel.decodeSearchTerm("P01308"); System.out.println(outcome); } -// -// @Test -// public void queryTest() { -// int outcome = TDBeaconsFTSPanel.executeParse("P01308"); -// //System.out.println("query outcome :" + outcome); -// int expected_length = 110; -// assertEquals(outcome, expected_length); -// } + // + // @Test + // public void queryTest() { + // int outcome = TDBeaconsFTSPanel.executeParse("P01308"); + // //System.out.println("query outcome :" + outcome); + // int expected_length = 110; + // assertEquals(outcome, expected_length); + // } } diff --git a/test/jalview/gui/AlignFrameTest.java b/test/jalview/gui/AlignFrameTest.java index d362d35..2a768ff 100644 --- a/test/jalview/gui/AlignFrameTest.java +++ b/test/jalview/gui/AlignFrameTest.java @@ -79,8 +79,8 @@ public class AlignFrameTest } /** - * configure (read-only) properties for test to ensure Consensus is computed for - * colour Above PID testing + * configure (read-only) properties for test to ensure Consensus is computed + * for colour Above PID testing */ @BeforeMethod(alwaysRun = true) public void setUp() @@ -116,13 +116,14 @@ public class AlignFrameTest { SequenceI seq1 = new Sequence("Seq1", "ABCDEFGHIJ"); SequenceI seq2 = new Sequence("Seq2", "ABCDEFGHIJ"); - seq1.addSequenceFeature(new SequenceFeature("Metal", "", 1, 5, 0f, null)); - seq2.addSequenceFeature(new SequenceFeature("Metal", "", 6, 10, 10f, - null)); - seq1.addSequenceFeature(new SequenceFeature("Turn", "", 2, 4, - Float.NaN, null)); - seq2.addSequenceFeature(new SequenceFeature("Turn", "", 7, 9, - Float.NaN, null)); + seq1.addSequenceFeature( + new SequenceFeature("Metal", "", 1, 5, 0f, null)); + seq2.addSequenceFeature( + new SequenceFeature("Metal", "", 6, 10, 10f, null)); + seq1.addSequenceFeature( + new SequenceFeature("Turn", "", 2, 4, Float.NaN, null)); + seq2.addSequenceFeature( + new SequenceFeature("Turn", "", 7, 9, Float.NaN, null)); AlignmentI al = new Alignment(new SequenceI[] { seq1, seq2 }); AlignFrame alignFrame = new AlignFrame(al, al.getWidth(), al.getHeight()); @@ -156,7 +157,6 @@ public class AlignFrameTest assertEquals(alignFrame.getViewport().getAlignment().getHiddenColumns() .getNumberOfRegions(), 0); - /* * threshold Metal to hide features where score < 5 * seq1 feature in columns 1-5 is hidden @@ -168,7 +168,8 @@ public class AlignFrameTest fc.setThreshold(5f); alignFrame.getFeatureRenderer().setColour("Metal", fc); assertTrue(alignFrame.hideFeatureColumns("Metal", true)); - HiddenColumns hidden = alignFrame.getViewport().getAlignment().getHiddenColumns(); + HiddenColumns hidden = alignFrame.getViewport().getAlignment() + .getHiddenColumns(); assertEquals(hidden.getNumberOfRegions(), 1); Iterator regions = hidden.iterator(); int[] next = regions.next(); @@ -182,8 +183,8 @@ public class AlignFrameTest */ alignFrame.getViewport().showAllHiddenColumns(); assertTrue(alignFrame.hideFeatureColumns("Turn", true)); - regions = alignFrame.getViewport().getAlignment() - .getHiddenColumns().iterator(); + regions = alignFrame.getViewport().getAlignment().getHiddenColumns() + .iterator(); assertEquals(alignFrame.getViewport().getAlignment().getHiddenColumns() .getNumberOfRegions(), 2); next = regions.next(); @@ -199,7 +200,8 @@ public class AlignFrameTest *
          *
        • with Apply Colour to All Groups not selected, does not change group * colours
        • - *
        • with Apply Colour to All Groups selected, does change group colours
        • + *
        • with Apply Colour to All Groups selected, does change group + * colours
        • *
        • in neither case, changes alignment or group colour thresholds (PID or * Conservation)
        • *
        @@ -225,8 +227,8 @@ public class AlignFrameTest af.conservationMenuItem_actionPerformed(true); SliderPanel sp = SliderPanel.getSliderPanel(); assertEquals(sp.getTitle(), MessageManager.formatMessage( - "label.conservation_colour_increment", - new String[] { "Background" })); + "label.conservation_colour_increment", new String[] + { "Background" })); assertTrue(sp.isForConservation()); sp.valueChanged(20); assertTrue(av.getResidueShading().conservationApplied()); @@ -239,8 +241,8 @@ public class AlignFrameTest sp = SliderPanel.getSliderPanel(); assertFalse(sp.isForConservation()); assertEquals(sp.getTitle(), MessageManager.formatMessage( - "label.percentage_identity_threshold", - new String[] { "Background" })); + "label.percentage_identity_threshold", new String[] + { "Background" })); sp.valueChanged(10); assertEquals(av.getResidueShading().getThreshold(), 10); assertTrue(av.getResidueShading().conservationApplied()); @@ -263,8 +265,8 @@ public class AlignFrameTest */ PopupMenu popupMenu = new PopupMenu(af.alignPanel, al.getSequenceAt(2), null); - popupMenu.changeColour_actionPerformed(JalviewColourScheme.Strand - .toString()); + popupMenu.changeColour_actionPerformed( + JalviewColourScheme.Strand.toString()); assertTrue(sg.getColourScheme() instanceof StrandColourScheme); assertEquals(al.getGroups().size(), 1); assertSame(al.getGroups().get(0), sg); @@ -272,8 +274,8 @@ public class AlignFrameTest sp = SliderPanel.getSliderPanel(); assertTrue(sp.isForConservation()); assertEquals(sp.getTitle(), MessageManager.formatMessage( - "label.conservation_colour_increment", - new String[] { sg.getName() })); + "label.conservation_colour_increment", new String[] + { sg.getName() })); sp.valueChanged(30); assertTrue(sg.getGroupColourScheme().conservationApplied()); assertEquals(sg.getGroupColourScheme().getConservationInc(), 30); @@ -285,8 +287,8 @@ public class AlignFrameTest sp = SliderPanel.getSliderPanel(); assertFalse(sp.isForConservation()); assertEquals(sp.getTitle(), MessageManager.formatMessage( - "label.percentage_identity_threshold", - new String[] { sg.getName() })); + "label.percentage_identity_threshold", new String[] + { sg.getName() })); sp.valueChanged(40); assertEquals(sg.getGroupColourScheme().getThreshold(), 40); // conservation threshold is unchanged: @@ -546,8 +548,8 @@ public class AlignFrameTest av.setSelectionGroup(sg); PopupMenu popupMenu = new PopupMenu(af.alignPanel, al.getSequenceAt(0), null); - popupMenu.changeColour_actionPerformed(JalviewColourScheme.Strand - .toString()); + popupMenu.changeColour_actionPerformed( + JalviewColourScheme.Strand.toString()); assertTrue(sg.getColourScheme() instanceof StrandColourScheme); assertEquals(al.getGroups().size(), 1); assertSame(al.getGroups().get(0), sg); @@ -571,8 +573,8 @@ public class AlignFrameTest sp = SliderPanel.getSliderPanel(); assertTrue(sp.isForConservation()); assertEquals(sp.getTitle(), MessageManager.formatMessage( - "label.conservation_colour_increment", - new String[] { "Background" })); + "label.conservation_colour_increment", new String[] + { "Background" })); /* * make a new View, verify alignment and group colour schemes @@ -601,8 +603,8 @@ public class AlignFrameTest sp = SliderPanel.getSliderPanel(); assertTrue(sp.isForConservation()); assertEquals(sp.getTitle(), MessageManager.formatMessage( - "label.conservation_colour_increment", - new String[] { "View 1" })); + "label.conservation_colour_increment", new String[] + { "View 1" })); sp.valueChanged(22); assertEquals(av2.getResidueShading().getConservationInc(), 22); } diff --git a/test/jalview/gui/AlignViewportTest.java b/test/jalview/gui/AlignViewportTest.java index 00267b3..e0a18d6 100644 --- a/test/jalview/gui/AlignViewportTest.java +++ b/test/jalview/gui/AlignViewportTest.java @@ -73,8 +73,9 @@ public class AlignViewportTest @BeforeClass(alwaysRun = true) public static void setUpBeforeClass() throws Exception { - Jalview.main(new String[] { "-nonews", "-props", - "test/jalview/testProps.jvprops" }); + Jalview.main( + new String[] + { "-nonews", "-props", "test/jalview/testProps.jvprops" }); /* * remove any sequence mappings left lying around by other tests @@ -106,16 +107,18 @@ public class AlignViewportTest /* * alignment with reference to mappings */ - AlignFrame af1 = new FileLoader().LoadFileWaitTillLoaded( - ">Seq1\nCAGT\n", DataSourceType.PASTE); + AlignFrame af1 = new FileLoader() + .LoadFileWaitTillLoaded(">Seq1\nCAGT\n", DataSourceType.PASTE); SequenceI s1 = af1.getViewport().getAlignment().getSequenceAt(0); AlignedCodonFrame acf1 = new AlignedCodonFrame(); - acf1.addMap(s1, s1, new MapList(new int[] { 1, 4 }, new int[] { 1, 4 }, - 1, 1)); + acf1.addMap(s1, s1, + new MapList(new int[] + { 1, 4 }, new int[] { 1, 4 }, 1, 1)); AlignedCodonFrame acf2 = new AlignedCodonFrame(); - acf2.addMap(s1, s1, new MapList(new int[] { 1, 4 }, new int[] { 4, 1 }, - 1, 1)); + acf2.addMap(s1, s1, + new MapList(new int[] + { 1, 4 }, new int[] { 4, 1 }, 1, 1)); List mappings = new ArrayList<>(); mappings.add(acf1); @@ -156,24 +159,27 @@ public class AlignViewportTest .getStructureSelectionManager(Desktop.instance); ssm.resetAll(); - AlignFrame af1 = new FileLoader().LoadFileWaitTillLoaded( - ">Seq1\nRSVQ\n", DataSourceType.PASTE); - AlignFrame af2 = new FileLoader().LoadFileWaitTillLoaded( - ">Seq2\nDGEL\n", DataSourceType.PASTE); + AlignFrame af1 = new FileLoader() + .LoadFileWaitTillLoaded(">Seq1\nRSVQ\n", DataSourceType.PASTE); + AlignFrame af2 = new FileLoader() + .LoadFileWaitTillLoaded(">Seq2\nDGEL\n", DataSourceType.PASTE); SequenceI cs1 = new Sequence("cseq1", "CCCGGGTTTAAA"); SequenceI cs2 = new Sequence("cseq2", "CTTGAGTCTAGA"); SequenceI s1 = af1.getViewport().getAlignment().getSequenceAt(0); SequenceI s2 = af2.getViewport().getAlignment().getSequenceAt(0); // need to be distinct AlignedCodonFrame acf1 = new AlignedCodonFrame(); - acf1.addMap(cs1, s1, new MapList(new int[] { 1, 4 }, - new int[] { 1, 12 }, 1, 3)); + acf1.addMap(cs1, s1, + new MapList(new int[] + { 1, 4 }, new int[] { 1, 12 }, 1, 3)); AlignedCodonFrame acf2 = new AlignedCodonFrame(); - acf2.addMap(cs2, s2, new MapList(new int[] { 1, 4 }, - new int[] { 1, 12 }, 1, 3)); + acf2.addMap(cs2, s2, + new MapList(new int[] + { 1, 4 }, new int[] { 1, 12 }, 1, 3)); AlignedCodonFrame acf3 = new AlignedCodonFrame(); - acf3.addMap(cs2, cs2, new MapList(new int[] { 1, 12 }, new int[] { 1, - 12 }, 1, 1)); + acf3.addMap(cs2, cs2, + new MapList(new int[] + { 1, 12 }, new int[] { 1, 12 }, 1, 1)); List mappings1 = new ArrayList<>(); mappings1.add(acf1); @@ -219,24 +225,27 @@ public class AlignViewportTest .getStructureSelectionManager(Desktop.instance); ssm.resetAll(); - AlignFrame af1 = new FileLoader().LoadFileWaitTillLoaded( - ">Seq1\nRSVQ\n", DataSourceType.PASTE); - AlignFrame af2 = new FileLoader().LoadFileWaitTillLoaded( - ">Seq2\nDGEL\n", DataSourceType.PASTE); + AlignFrame af1 = new FileLoader() + .LoadFileWaitTillLoaded(">Seq1\nRSVQ\n", DataSourceType.PASTE); + AlignFrame af2 = new FileLoader() + .LoadFileWaitTillLoaded(">Seq2\nDGEL\n", DataSourceType.PASTE); SequenceI cs1 = new Sequence("cseq1", "CCCGGGTTTAAA"); SequenceI cs2 = new Sequence("cseq2", "CTTGAGTCTAGA"); SequenceI s1 = af1.getViewport().getAlignment().getSequenceAt(0); SequenceI s2 = af2.getViewport().getAlignment().getSequenceAt(0); // need to be distinct AlignedCodonFrame acf1 = new AlignedCodonFrame(); - acf1.addMap(cs1, s1, new MapList(new int[] { 1, 4 }, - new int[] { 1, 12 }, 1, 3)); + acf1.addMap(cs1, s1, + new MapList(new int[] + { 1, 4 }, new int[] { 1, 12 }, 1, 3)); AlignedCodonFrame acf2 = new AlignedCodonFrame(); - acf2.addMap(cs2, s2, new MapList(new int[] { 1, 4 }, - new int[] { 1, 12 }, 1, 3)); + acf2.addMap(cs2, s2, + new MapList(new int[] + { 1, 4 }, new int[] { 1, 12 }, 1, 3)); AlignedCodonFrame acf3 = new AlignedCodonFrame(); - acf3.addMap(cs2, cs2, new MapList(new int[] { 1, 12 }, new int[] { 1, - 12 }, 1, 1)); + acf3.addMap(cs2, cs2, + new MapList(new int[] + { 1, 12 }, new int[] { 1, 12 }, 1, 1)); List mappings1 = new ArrayList<>(); mappings1.add(acf1); @@ -277,7 +286,7 @@ public class AlignViewportTest * Test for JAL-1306 - conservation thread should run even when only Quality * (and not Conservation) is enabled in Preferences */ - @Test(groups = { "Functional" }, timeOut=2000) + @Test(groups = { "Functional" }, timeOut = 2000) public void testUpdateConservation_qualityOnly() { Cache.applicationProperties.setProperty("SHOW_ANNOTATIONS", @@ -345,8 +354,7 @@ public class AlignViewportTest ColourSchemeI cs = new PIDColourScheme(); AlignViewport viewport = af.getViewport(); viewport.setGlobalColourScheme(cs); - assertFalse(viewport.getResidueShading() - .conservationApplied()); + assertFalse(viewport.getResidueShading().conservationApplied()); /* * JAL-3201 groups have their own ColourSchemeI instances @@ -426,18 +434,22 @@ public class AlignViewportTest av.setSelectionGroup(sg3); assertTrue(sg3.isDefined()); // unchanged } + /** - * Verify that setting/clearing SHOW_OCCUPANCY preference adds or omits occupancy row from viewport + * Verify that setting/clearing SHOW_OCCUPANCY preference adds or omits + * occupancy row from viewport */ @Test(groups = { "Functional" }) public void testShowOrDontShowOccupancy() { // disable occupancy - jalview.bin.Cache.setProperty("SHOW_OCCUPANCY", Boolean.FALSE.toString()); + jalview.bin.Cache.setProperty("SHOW_OCCUPANCY", + Boolean.FALSE.toString()); AlignFrame af = new FileLoader().LoadFileWaitTillLoaded( "examples/uniref50.fa", DataSourceType.FILE); AlignViewport av = af.getViewport(); - Assert.assertNull(av.getAlignmentGapAnnotation(), "Preference did not disable occupancy row."); + Assert.assertNull(av.getAlignmentGapAnnotation(), + "Preference did not disable occupancy row."); int c = 0; for (AlignmentAnnotation aa : av.getAlignment().findAnnotations(null, null, "Occupancy")) @@ -445,13 +457,15 @@ public class AlignViewportTest c++; } Assert.assertEquals(c, 0, "Expected zero occupancy rows."); - + // enable occupancy - jalview.bin.Cache.setProperty("SHOW_OCCUPANCY", Boolean.TRUE.toString()); - af = new FileLoader().LoadFileWaitTillLoaded( - "examples/uniref50.fa", DataSourceType.FILE); + jalview.bin.Cache.setProperty("SHOW_OCCUPANCY", + Boolean.TRUE.toString()); + af = new FileLoader().LoadFileWaitTillLoaded("examples/uniref50.fa", + DataSourceType.FILE); av = af.getViewport(); - Assert.assertNotNull(av.getAlignmentGapAnnotation(), "Preference did not enable occupancy row."); + Assert.assertNotNull(av.getAlignmentGapAnnotation(), + "Preference did not enable occupancy row."); c = 0; for (AlignmentAnnotation aa : av.getAlignment().findAnnotations(null, null, av.getAlignmentGapAnnotation().label)) @@ -508,8 +522,9 @@ public class AlignViewportTest /* * hide first and third sequences */ - testee.hideSequence(new SequenceI[] { al.getSequenceAt(0), - al.getSequenceAt(2) }); + testee.hideSequence( + new SequenceI[] + { al.getSequenceAt(0), al.getSequenceAt(2) }); assertEquals(1, al.getHeight()); assertEquals(0, ranges.getStartSeq()); assertEquals(0, ranges.getEndSeq()); diff --git a/test/jalview/gui/AlignmentPanelTest.java b/test/jalview/gui/AlignmentPanelTest.java index 8871249..a137ff6 100644 --- a/test/jalview/gui/AlignmentPanelTest.java +++ b/test/jalview/gui/AlignmentPanelTest.java @@ -49,22 +49,26 @@ public class AlignmentPanelTest @BeforeMethod(alwaysRun = true) public void setUp() throws InvocationTargetException, InterruptedException { - Jalview.main(new String[] { "-nonews", "-props", - "test/jalview/testProps.jvprops" }); + Jalview.main( + new String[] + { "-nonews", "-props", "test/jalview/testProps.jvprops" }); Cache.applicationProperties.setProperty("SHOW_IDENTITY", Boolean.TRUE.toString()); af = new FileLoader().LoadFileWaitTillLoaded("examples/uniref50.fa", DataSourceType.FILE); - + /* * ensure the panel has been repainted and so ViewportRanges set */ - SwingUtilities.invokeAndWait(new Runnable() { - @Override - public void run() { - af.repaint(); - }}); + SwingUtilities.invokeAndWait(new Runnable() + { + @Override + public void run() + { + af.repaint(); + } + }); /* * wait for Consensus thread to complete @@ -127,8 +131,8 @@ public class AlignmentPanelTest scrollpos = 130; af.getViewport().showAllHiddenColumns(); af.alignPanel.setScrollValues(scrollpos, 5); - assertEquals(ranges.getEndRes(), af.getViewport() - .getAlignment().getWidth() - 1); + assertEquals(ranges.getEndRes(), + af.getViewport().getAlignment().getWidth() - 1); // now hide some columns, and scroll to position within // distance of the end of the alignment @@ -136,9 +140,11 @@ public class AlignmentPanelTest // columns af.getViewport().hideColumns(30, 50); af.alignPanel.setScrollValues(scrollpos, 5); - assertEquals(ranges.getEndRes(), af.getViewport() - .getAlignment().getWidth() - 1 - 21); // 21 is the number of hidden - // columns + assertEquals(ranges.getEndRes(), + af.getViewport().getAlignment().getWidth() - 1 - 21); // 21 is the + // number of + // hidden + // columns } /** @@ -168,8 +174,8 @@ public class AlignmentPanelTest } /** - * Test the variant of calculateIdWidth that only recomputes the width if it is - * not already saved in the viewport (initial value is -1) + * Test the variant of calculateIdWidth that only recomputes the width if it + * is not already saved in the viewport (initial value is -1) */ @Test(groups = "Functional") public void testCalculateIdWidth_noArgs() @@ -241,7 +247,8 @@ public class AlignmentPanelTest // Assumption ID_WIDTH_PADDING == 4 int expwidth = 4 + fmfor.stringWidth(aa.label); d = af.alignPanel.calculateIdWidth(2000); - assertEquals(d.width, expwidth); // 228 == ID_WIDTH_PADDING + pixel width of "THIS IS A VERY LONG LABEL INDEED" + assertEquals(d.width, expwidth); // 228 == ID_WIDTH_PADDING + pixel width of + // "THIS IS A VERY LONG LABEL INDEED" assertEquals(d.height, 12); /* diff --git a/test/jalview/gui/AnnotationChooserTest.java b/test/jalview/gui/AnnotationChooserTest.java index fbdda09..f3c0dee 100644 --- a/test/jalview/gui/AnnotationChooserTest.java +++ b/test/jalview/gui/AnnotationChooserTest.java @@ -91,8 +91,8 @@ public class AnnotationChooserTest Cache.applicationProperties.setProperty(Preferences.SORT_ANNOTATIONS, SequenceAnnotationOrder.NONE.name()); final String TRUE = Boolean.TRUE.toString(); - Cache.applicationProperties.setProperty( - Preferences.SHOW_AUTOCALC_ABOVE, TRUE); + Cache.applicationProperties.setProperty(Preferences.SHOW_AUTOCALC_ABOVE, + TRUE); Cache.applicationProperties.setProperty("SHOW_QUALITY", TRUE); Cache.applicationProperties.setProperty("SHOW_CONSERVATION", TRUE); Cache.applicationProperties.setProperty("SHOW_IDENTITY", TRUE); @@ -108,11 +108,9 @@ public class AnnotationChooserTest * Add 4 annotations, 3 of them sequence-specific. * *
        -   * ann1 - for sequence 0 - label 'IUPRED' 
        -   * ann2 - not sequence related - label 'Beauty' 
        -   * ann3 - for sequence 3 - label 'JMol'
        -   * ann4 - for sequence 2 - label 'IUPRED'
        -   * ann5 - for sequence 1 - label 'JMol'
        +   * ann1 - for sequence 0 - label 'IUPRED' ann2 - not sequence related - label
        +   * 'Beauty' ann3 - for sequence 3 - label 'JMol' ann4 - for sequence 2 - label
        +   * 'IUPRED' ann5 - for sequence 1 - label 'JMol'
            */
           private void addAnnotations()
           {
        @@ -184,8 +182,8 @@ public class AnnotationChooserTest
             assertTrue("Not enabled", cb1.isEnabled());
             assertTrue("Not enabled", cb2.isEnabled());
             assertTrue("Not enabled", cb3.isEnabled());
        -    assertEquals("Option not selected", cb2, cb2.getCheckboxGroup()
        -            .getSelectedCheckbox());
        +    assertEquals("Option not selected", cb2,
        +            cb2.getCheckboxGroup().getSelectedCheckbox());
         
             // check state variables match checkbox selection
             assertTrue(testee.isApplyToSelectedSequences());
        @@ -235,15 +233,16 @@ public class AnnotationChooserTest
             assertTrue("Not enabled", cb1.isEnabled());
             assertFalse("Enabled", cb2.isEnabled());
             assertFalse("Enabled", cb3.isEnabled());
        -    assertEquals("Not selected", cb1, cb1.getCheckboxGroup()
        -            .getSelectedCheckbox());
        +    assertEquals("Not selected", cb1,
        +            cb1.getCheckboxGroup().getSelectedCheckbox());
         
             // check state variables match checkbox selection
             assertTrue(testee.isApplyToSelectedSequences());
             assertTrue(testee.isApplyToUnselectedSequences());
         
             assertEquals("Wrong text",
        -            MessageManager.getString("label.all_sequences"), cb1.getLabel());
        +            MessageManager.getString("label.all_sequences"),
        +            cb1.getLabel());
             assertEquals("Wrong text",
                     MessageManager.getString("label.selected_sequences"),
                     cb2.getLabel());
        @@ -277,8 +276,8 @@ public class AnnotationChooserTest
             assertTrue("Hide not enabled", cb2.isEnabled());
         
             // Hide (button 2) selected; note this may change to none (null)
        -    assertEquals("Not selected", cb2, cb2.getCheckboxGroup()
        -            .getSelectedCheckbox());
        +    assertEquals("Not selected", cb2,
        +            cb2.getCheckboxGroup().getSelectedCheckbox());
         
             assertTrue("Show is flagged", !testee.isShowSelected());
         
        @@ -318,14 +317,14 @@ public class AnnotationChooserTest
             // selection group should make no difference to the result
             // as all annotation types for the alignment are considered
         
        -    List types = AnnotationChooser.getAnnotationTypes(
        -            parentPanel.getAlignment(), true);
        +    List types = AnnotationChooser
        +            .getAnnotationTypes(parentPanel.getAlignment(), true);
             assertEquals("Not two annotation types", 2, types.size());
             assertTrue("IUPRED missing", types.contains("IUPRED"));
             assertTrue("JMol missing", types.contains("JMol"));
         
        -    types = AnnotationChooser.getAnnotationTypes(
        -            parentPanel.getAlignment(), false);
        +    types = AnnotationChooser.getAnnotationTypes(parentPanel.getAlignment(),
        +            false);
             assertEquals("Not six annotation types", 7, types.size());
             assertTrue("IUPRED missing", types.contains("IUPRED"));
             assertTrue("JMol missing", types.contains("JMol"));
        @@ -351,8 +350,8 @@ public class AnnotationChooserTest
             final Checkbox hideCheckbox = (Checkbox) getComponent(testee, 1, 0, 1);
             setSelected(hideCheckbox, true);
         
        -    final Checkbox allSequencesCheckbox = (Checkbox) getComponent(testee,
        -            1, 1, 0);
        +    final Checkbox allSequencesCheckbox = (Checkbox) getComponent(testee, 1,
        +            1, 0);
             setSelected(allSequencesCheckbox, true);
         
             AlignmentAnnotation[] anns = parentPanel.getAlignment()
        @@ -429,8 +428,8 @@ public class AnnotationChooserTest
             final Checkbox hideCheckbox = (Checkbox) getComponent(testee, 1, 0, 1);
             setSelected(hideCheckbox, true);
         
        -    final Checkbox allSequencesCheckbox = (Checkbox) getComponent(testee,
        -            1, 1, 0);
        +    final Checkbox allSequencesCheckbox = (Checkbox) getComponent(testee, 1,
        +            1, 0);
             setSelected(allSequencesCheckbox, true);
         
             AlignmentAnnotation[] anns = parentPanel.getAlignment()
        @@ -521,8 +520,8 @@ public class AnnotationChooserTest
             final Checkbox showCheckbox = (Checkbox) getComponent(testee, 1, 0, 0);
             final Checkbox hideCheckbox = (Checkbox) getComponent(testee, 1, 0, 1);
         
        -    final Checkbox allSequencesCheckbox = (Checkbox) getComponent(testee,
        -            1, 1, 0);
        +    final Checkbox allSequencesCheckbox = (Checkbox) getComponent(testee, 1,
        +            1, 0);
         
             AlignmentAnnotation[] anns = parentPanel.getAlignment()
                     .getAlignmentAnnotation();
        @@ -597,8 +596,8 @@ public class AnnotationChooserTest
             final Checkbox showCheckbox = (Checkbox) getComponent(testee, 1, 0, 0);
             setSelected(showCheckbox, true);
         
        -    final Checkbox allSequencesCheckbox = (Checkbox) getComponent(testee,
        -            1, 1, 0);
        +    final Checkbox allSequencesCheckbox = (Checkbox) getComponent(testee, 1,
        +            1, 0);
             setSelected(allSequencesCheckbox, true);
         
             AlignmentAnnotation[] anns = parentPanel.getAlignment()
        @@ -697,9 +696,9 @@ public class AnnotationChooserTest
             // TODO refactor to a test utility class
             cb.setState(select);
             // have to manually fire the action listener
        -    cb.getItemListeners()[0].itemStateChanged(new ItemEvent(cb,
        -            ItemEvent.ITEM_STATE_CHANGED, cb, select ? ItemEvent.SELECTED
        -                    : ItemEvent.DESELECTED));
        +    cb.getItemListeners()[0].itemStateChanged(
        +            new ItemEvent(cb, ItemEvent.ITEM_STATE_CHANGED, cb,
        +                    select ? ItemEvent.SELECTED : ItemEvent.DESELECTED));
           }
         
           /**
        @@ -796,8 +795,8 @@ public class AnnotationChooserTest
             final Checkbox hideCheckbox = (Checkbox) getComponent(testee, 1, 0, 1);
             setSelected(hideCheckbox, true);
         
        -    final Checkbox allSequencesCheckbox = (Checkbox) getComponent(testee,
        -            1, 1, 0);
        +    final Checkbox allSequencesCheckbox = (Checkbox) getComponent(testee, 1,
        +            1, 0);
             setSelected(allSequencesCheckbox, true);
         
             setSelected(getTypeCheckbox("JMol"), true);
        diff --git a/test/jalview/gui/AnnotationLabelsTest.java b/test/jalview/gui/AnnotationLabelsTest.java
        index 616a1a6..a4fc1a1 100644
        --- a/test/jalview/gui/AnnotationLabelsTest.java
        +++ b/test/jalview/gui/AnnotationLabelsTest.java
        @@ -62,7 +62,7 @@ public class AnnotationLabelsTest
             ann.description = null;
             assertEquals(AnnotationLabels.getTooltip(ann),
                     " Score: 2.34");
        -    
        +
             /*
              * sequenceref, simple description
              */
        diff --git a/test/jalview/gui/AnnotationRowFilterTest.java b/test/jalview/gui/AnnotationRowFilterTest.java
        index 69a41c5..b575478 100644
        --- a/test/jalview/gui/AnnotationRowFilterTest.java
        +++ b/test/jalview/gui/AnnotationRowFilterTest.java
        @@ -29,8 +29,8 @@ public class AnnotationRowFilterTest
             Cache.loadProperties("test/jalview/io/testProps.jvprops");
             Cache.applicationProperties.setProperty("SHOW_ANNOTATIONS",
                     Boolean.TRUE.toString());
        -    Cache.applicationProperties.setProperty(
        -            Preferences.SHOW_AUTOCALC_ABOVE, Boolean.TRUE.toString());
        +    Cache.applicationProperties.setProperty(Preferences.SHOW_AUTOCALC_ABOVE,
        +            Boolean.TRUE.toString());
             af = new FileLoader().LoadFileWaitTillLoaded("examples/uniref50.fa",
                     DataSourceType.FILE);
             testee = new AnnotationRowFilter(af.viewport, af.alignPanel)
        @@ -84,13 +84,15 @@ public class AnnotationRowFilterTest
                     null);
             ann4.setSequenceRef(seq2);
             al.addAnnotation(ann4);
        -    AlignmentAnnotation ann5 = new AlignmentAnnotation("Jnet", "Jnet", null);
        +    AlignmentAnnotation ann5 = new AlignmentAnnotation("Jnet", "Jnet",
        +            null);
             ann5.setSequenceRef(seq2);
             al.addAnnotation(ann5);
             /*
              * a second Jnet annotation for FER_BRANA
              */
        -    AlignmentAnnotation ann6 = new AlignmentAnnotation("Jnet", "Jnet", null);
        +    AlignmentAnnotation ann6 = new AlignmentAnnotation("Jnet", "Jnet",
        +            null);
             ann6.setSequenceRef(seq2);
             al.addAnnotation(ann6);
         
        @@ -98,8 +100,7 @@ public class AnnotationRowFilterTest
              * drop-down items with 'Per-sequence only' not checked
              */
             Vector items = testee.getAnnotationItems(false);
        -    assertEquals(
        -            items.toString(),
        +    assertEquals(items.toString(),
                     "[Conservation, Quality, Consensus, Occupancy, ann1Label, Significance, Significance_1, Jronn_FER_CAPAA, Jronn_FER_BRANA, Jnet_FER_BRANA, Jnet_FER_BRANA_2]");
             assertEquals(testee.getAnnotationMenuLabel(ann1), "ann1Label");
             assertEquals(testee.getAnnotationMenuLabel(ann2), "Significance");
        diff --git a/test/jalview/gui/ColourMenuHelperTest.java b/test/jalview/gui/ColourMenuHelperTest.java
        index 5128fe5..ccbd0ec 100644
        --- a/test/jalview/gui/ColourMenuHelperTest.java
        +++ b/test/jalview/gui/ColourMenuHelperTest.java
        @@ -119,7 +119,7 @@ public class ColourMenuHelperTest
             PopupMenu popup = new PopupMenu(af.alignPanel, s1, null);
             ButtonGroup bg = ColourMenuHelper.addMenuItems(menu, popup, al, false);
             Enumeration bgElements = bg.getElements();
        -  
        +
             /*
              * first entry is 'No Colour' option
              */
        @@ -128,7 +128,7 @@ public class ColourMenuHelperTest
             assertEquals(item.getText(), MessageManager.getString("label.none"));
             AbstractButton bgItem = bgElements.nextElement();
             assertSame(bgItem, item);
        -  
        +
             /*
              * check that each registered colour scheme is in the menu,
              * and in the button group;
        @@ -159,7 +159,7 @@ public class ColourMenuHelperTest
               {
                 assertTrue(enabled);
               }
        -  
        +
               /*
                * check i18n for display name
                */
        @@ -167,7 +167,7 @@ public class ColourMenuHelperTest
                       name);
               assertEquals(item.getText(), label);
             }
        -  
        +
             /*
              * check nothing left over
              */
        @@ -188,10 +188,10 @@ public class ColourMenuHelperTest
             SequenceI s1 = new Sequence("s1", "KFRQSILM");
             AlignmentI al = new Alignment(new SequenceI[] { s1 });
             JMenu menu = new JMenu();
        -  
        +
             ButtonGroup bg = ColourMenuHelper.addMenuItems(menu, null, al, true);
             Enumeration bgElements = bg.getElements();
        -  
        +
             /*
              * check that only 'simple' colour schemes are included
              */
        @@ -209,7 +209,7 @@ public class ColourMenuHelperTest
               AbstractButton bgItem = bgElements.nextElement();
               assertSame(bgItem, item);
             }
        -  
        +
             /*
              * check nothing left over
              */
        @@ -227,10 +227,10 @@ public class ColourMenuHelperTest
             AlignmentI al = new Alignment(new SequenceI[] { s1 });
             AlignFrame af = new AlignFrame(al, 500, 500);
             JMenu menu = new JMenu();
        -  
        +
             ButtonGroup bg = ColourMenuHelper.addMenuItems(menu, af, al, false);
             Enumeration bgElements = bg.getElements();
        -  
        +
             /*
              * check that each registered colour scheme is in the menu,
              * (skipping over No Colour which is the first menu item),
        @@ -248,7 +248,7 @@ public class ColourMenuHelperTest
               ColourSchemeI cs = colourSchemes.next();
               assertEquals(item.getName(), cs.getSchemeName());
             }
        -  
        +
             /*
              * check menu also has User Defined Colour
              */
        diff --git a/test/jalview/gui/FeatureSettingsTest.java b/test/jalview/gui/FeatureSettingsTest.java
        index f09c7c7..55f2111 100644
        --- a/test/jalview/gui/FeatureSettingsTest.java
        +++ b/test/jalview/gui/FeatureSettingsTest.java
        @@ -156,7 +156,8 @@ public class FeatureSettingsTest
             assertTrue(fc.isBelowThreshold());
             assertEquals(fc.getThreshold(), 3f);
         
        -    assertEquals(fr.getFeatureFilter("type1").toStableString(), "Label Contains x");
        +    assertEquals(fr.getFeatureFilter("type1").toStableString(),
        +            "Label Contains x");
             assertEquals(fr.getFeatureFilter("type2").toStableString(),
                     "(Score LE 2.4) AND (Score GT 1.1)");
             assertEquals(fr.getFeatureFilter("type3").toStableString(),
        diff --git a/test/jalview/gui/JAL1353bugdemo.java b/test/jalview/gui/JAL1353bugdemo.java
        index 25dcac1..e916779 100644
        --- a/test/jalview/gui/JAL1353bugdemo.java
        +++ b/test/jalview/gui/JAL1353bugdemo.java
        @@ -99,7 +99,8 @@ public class JAL1353bugdemo
                 // oo.setVisible(true);
                 // parent.setVisible(true);
                 EditNameDialog end = new EditNameDialog("Sequence Name",
        -        		"Try and drag between the two text fields", "label 1", "Label 2");// );cont.getRootPane());
        +                "Try and drag between the two text fields", "label 1",
        +                "Label 2");// );cont.getRootPane());
                 assert (end != null);
                 finish = true;
               }
        diff --git a/test/jalview/gui/JvOptionPaneTest.java b/test/jalview/gui/JvOptionPaneTest.java
        index 02e3b65..17d7153 100644
        --- a/test/jalview/gui/JvOptionPaneTest.java
        +++ b/test/jalview/gui/JvOptionPaneTest.java
        @@ -59,7 +59,6 @@ public class JvOptionPaneTest
         
           Object[] selectionValues = null;
         
        -
           @Test(groups = { "Functional" })
           public void showConfirmDialogFamilyTest()
           {
        diff --git a/test/jalview/gui/JvSwingUtilsTest.java b/test/jalview/gui/JvSwingUtilsTest.java
        index 61c5c9b..e6f4041 100644
        --- a/test/jalview/gui/JvSwingUtilsTest.java
        +++ b/test/jalview/gui/JvSwingUtilsTest.java
        @@ -87,8 +87,8 @@ public class JvSwingUtilsTest
         
             tip = "0123456789012345678901234567890123456789012345678901234567890"; // 61
             assertFalse(tip.equals(JvSwingUtils.wrapTooltip(false, tip)));
        -    assertFalse(("" + tip + "").equals(JvSwingUtils
        -            .wrapTooltip(true, tip)));
        +    assertFalse(("" + tip + "")
        +            .equals(JvSwingUtils.wrapTooltip(true, tip)));
           }
         
           /**
        diff --git a/test/jalview/gui/MouseEventDemo.java b/test/jalview/gui/MouseEventDemo.java
        index 62320c7..f02527a 100644
        --- a/test/jalview/gui/MouseEventDemo.java
        +++ b/test/jalview/gui/MouseEventDemo.java
        @@ -161,8 +161,8 @@ public class MouseEventDemo extends JPanel implements MouseListener
             textArea = new JTextArea();
             textArea.setEditable(false);
             JScrollPane scrollPane = new JScrollPane(textArea);
        -    scrollPane
        -            .setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        +    scrollPane.setVerticalScrollBarPolicy(
        +            JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
             scrollPane.setPreferredSize(new Dimension(400, 75));
         
             blankArea = new BlankArea(Color.YELLOW);
        diff --git a/test/jalview/gui/PaintRefresherTest.java b/test/jalview/gui/PaintRefresherTest.java
        index 5167eb3..92cc026 100644
        --- a/test/jalview/gui/PaintRefresherTest.java
        +++ b/test/jalview/gui/PaintRefresherTest.java
        @@ -135,8 +135,8 @@ public class PaintRefresherTest
             AlignmentViewport av = new AlignViewport(al);
             AlignFrame af = new AlignFrame(al, 4, 1);
             AlignmentPanel ap1 = af.alignPanel;
        -    AlignmentPanel[] panels = PaintRefresher.getAssociatedPanels(av
        -            .getSequenceSetId());
        +    AlignmentPanel[] panels = PaintRefresher
        +            .getAssociatedPanels(av.getSequenceSetId());
             assertEquals(1, panels.length);
             assertSame(ap1, panels[0]);
         
        diff --git a/test/jalview/gui/PopupMenuTest.java b/test/jalview/gui/PopupMenuTest.java
        index b2d5b0a..7636bda 100644
        --- a/test/jalview/gui/PopupMenuTest.java
        +++ b/test/jalview/gui/PopupMenuTest.java
        @@ -98,15 +98,12 @@ public class PopupMenuTest
             Console.initLogger();
         
             String inMenuString = ("EMBL-EBI Search | http://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&query=$"
        -            + SEQUENCE_ID
        -            + "$"
        -            + "|"
        -            + "UNIPROT | http://www.uniprot.org/uniprot/$" + DB_ACCESSION + "$")
        -            + "|"
        +            + SEQUENCE_ID + "$" + "|"
        +            + "UNIPROT | http://www.uniprot.org/uniprot/$" + DB_ACCESSION
        +            + "$") + "|"
                     + ("INTERPRO | http://www.ebi.ac.uk/interpro/entry/$"
                             + DB_ACCESSION + "$")
        -            + "|"
        -            +
        +            + "|" +
                     // Gene3D entry tests for case (in)sensitivity
                     ("Gene3D | http://gene3d.biochem.ucl.ac.uk/Gene3D/search?sterm=$"
                             + DB_ACCESSION + "$&mode=protein");
        @@ -515,14 +512,14 @@ public class PopupMenuTest
             seq0.addDBRef(new DBRefEntry("INTERPRO", "1", "IPR006058"));
             seq1.addDBRef(new DBRefEntry(DBRefSource.UNIPROT, "1", "Q9ZTS2"));
             seq1.addDBRef(new DBRefEntry("GENE3D", "1", "3.10.20.30"));
        -    
        +
             /*
              * check the Link Menu for the first sequence
              */
             JMenu linkMenu = PopupMenu.buildLinkMenu(seq0, noFeatures);
             assertEquals(linkText, linkMenu.getText());
             Component[] linkItems = linkMenu.getMenuComponents();
        -    
        +
             /*
              * menu items are ordered: SEQUENCE_ID search first, then dbrefs in order
              * of database name (and within that by order of dbref addition)
        @@ -592,7 +589,7 @@ public class PopupMenuTest
           {
             // get sequences from the alignment
             List seqs = parentPanel.getAlignment().getSequences();
        -    
        +
             // add our own seqs to avoid problems with changes to existing sequences
             // (gap at end of sequences varies depending on how tests are run!)
             Sequence seqGap1 = new Sequence("GappySeq",
        @@ -619,7 +616,7 @@ public class PopupMenuTest
             // get the Popup Menu for 7th sequence - no insertions
             testee = new PopupMenu(parentPanel, seqs.get(7), null);
             testee.hideInsertions_actionPerformed(null);
        -    
        +
             HiddenColumns hidden = parentPanel.av.getAlignment().getHiddenColumns();
             Iterator it = hidden.iterator();
             assertFalse(it.hasNext());
        @@ -731,8 +728,7 @@ public class PopupMenuTest
             /*
              * long feature descriptions are truncated to 40 characters
              */
        -    sf1.setDescription(
        -            "this is a quite extraordinarily long description");
        +    sf1.setDescription("this is a quite extraordinarily long description");
             testee.remove(menu); // don't create the sub-menu twice
             testee.addFeatureDetails(features, seq, 10);
             menu = findMenu(testee, menuText);
        diff --git a/test/jalview/gui/ProgressBarTest.java b/test/jalview/gui/ProgressBarTest.java
        index 72a288b..a77942c 100644
        --- a/test/jalview/gui/ProgressBarTest.java
        +++ b/test/jalview/gui/ProgressBarTest.java
        @@ -124,24 +124,24 @@ public class ProgressBarTest
           {
             try
             {
        -    SwingUtilities.invokeAndWait(new Runnable()
        -    {
        -      @Override
        -      public void run()
        +      SwingUtilities.invokeAndWait(new Runnable()
               {
        -    int msgCount = msgs.length;
        -    assertEquals(1 + msgCount, layout.getRows());
        -    assertEquals(msgCount, statusPanel.getComponentCount());
        -    int i = 0;
        -    for (Component c : statusPanel.getComponents())
        -    {
        -      assertTrue(c instanceof JPanel);
        -      assertTrue(((JPanel) c).getComponent(0) instanceof JLabel);
        -      assertEquals(msgs[i++],
        -              ((JLabel) ((JPanel) c).getComponent(0)).getText());
        -    }
        -      }
        -    });
        +        @Override
        +        public void run()
        +        {
        +          int msgCount = msgs.length;
        +          assertEquals(1 + msgCount, layout.getRows());
        +          assertEquals(msgCount, statusPanel.getComponentCount());
        +          int i = 0;
        +          for (Component c : statusPanel.getComponents())
        +          {
        +            assertTrue(c instanceof JPanel);
        +            assertTrue(((JPanel) c).getComponent(0) instanceof JLabel);
        +            assertEquals(msgs[i++],
        +                    ((JLabel) ((JPanel) c).getComponent(0)).getText());
        +          }
        +        }
        +      });
             } catch (Exception e)
             {
               throw new AssertionError(
        diff --git a/test/jalview/gui/ScalePanelTest.java b/test/jalview/gui/ScalePanelTest.java
        index 7d39ea9..a097c7a 100644
        --- a/test/jalview/gui/ScalePanelTest.java
        +++ b/test/jalview/gui/ScalePanelTest.java
        @@ -83,7 +83,7 @@ public class ScalePanelTest
             alignFrame.alignPanel.updateLayout();
             assertEquals(ranges.getStartRes(), 0);
             assertEquals(ranges.getEndRes(), 22);
        -    
        +
             int cw = viewport.getCharWidth();
             int xPos = 9 * cw + 2;
             MouseEvent mouse = new MouseEvent(scalePanel, 0, 1, 0, xPos, 0, 1,
        diff --git a/test/jalview/gui/SeqCanvasTest.java b/test/jalview/gui/SeqCanvasTest.java
        index 84d2b79..aa50301 100644
        --- a/test/jalview/gui/SeqCanvasTest.java
        +++ b/test/jalview/gui/SeqCanvasTest.java
        @@ -31,7 +31,6 @@ import static org.testng.Assert.assertNotNull;
         import static org.testng.Assert.assertNull;
         import static org.testng.Assert.assertTrue;
         
        -
         import jalview.bin.Cache;
         import jalview.datamodel.AlignmentI;
         import jalview.datamodel.SearchResults;
        @@ -86,13 +85,15 @@ public class SeqCanvasTest
             int canvasWidth = 400;
             int canvasHeight = 300;
             int residueColumns = (canvasWidth - 2 * labelWidth) / charWidth;
        -    int wrappedWidth = testee.calculateWrappedGeometry(canvasWidth, canvasHeight);
        +    int wrappedWidth = testee.calculateWrappedGeometry(canvasWidth,
        +            canvasHeight);
             assertEquals(wrappedWidth, residueColumns);
             assertEquals(PA.getValue(testee, "labelWidthWest"), labelWidth);
             assertEquals(PA.getValue(testee, "labelWidthEast"), labelWidth);
             assertEquals(PA.getValue(testee, "wrappedSpaceAboveAlignment"),
                     2 * charHeight);
        -    int repeatingHeight = (int) PA.getValue(testee, "wrappedRepeatHeightPx");
        +    int repeatingHeight = (int) PA.getValue(testee,
        +            "wrappedRepeatHeightPx");
             assertEquals(repeatingHeight, charHeight * (2 + al.getHeight()));
             assertEquals(PA.getValue(testee, "wrappedVisibleWidths"), 1);
         
        @@ -225,7 +226,7 @@ public class SeqCanvasTest
             AlignmentI al = av.getAlignment();
             assertEquals(al.getWidth(), 157);
             assertEquals(al.getHeight(), 15);
        -  
        +
             av.setWrapAlignment(true);
             av.getRanges().setStartEndSeq(0, 14);
             av.setFont(new Font("SansSerif", Font.PLAIN, 14), true);
        @@ -233,9 +234,9 @@ public class SeqCanvasTest
             int charWidth = av.getCharWidth();
             assertEquals(charHeight, 17);
             assertEquals(charWidth, 12);
        -  
        +
             SeqCanvas testee = af.alignPanel.getSeqPanel().seqCanvas;
        -  
        +
             /*
              * first with scales above, left, right
              */
        @@ -255,17 +256,19 @@ public class SeqCanvasTest
             int canvasWidth = 400;
             int canvasHeight = 300;
             int residueColumns = (canvasWidth - 2 * labelWidth) / charWidth;
        -    int wrappedWidth = testee.calculateWrappedGeometry(canvasWidth, canvasHeight);
        +    int wrappedWidth = testee.calculateWrappedGeometry(canvasWidth,
        +            canvasHeight);
             assertEquals(wrappedWidth, residueColumns);
             assertEquals(PA.getValue(testee, "labelWidthWest"), labelWidth);
             assertEquals(PA.getValue(testee, "labelWidthEast"), labelWidth);
             assertEquals(PA.getValue(testee, "wrappedSpaceAboveAlignment"),
                     2 * charHeight);
        -    int repeatingHeight = (int) PA.getValue(testee, "wrappedRepeatHeightPx");
        +    int repeatingHeight = (int) PA.getValue(testee,
        +            "wrappedRepeatHeightPx");
             assertEquals(repeatingHeight, charHeight * (2 + al.getHeight())
                     + SeqCanvas.SEQS_ANNOTATION_GAP + annotationHeight);
             assertEquals(PA.getValue(testee, "wrappedVisibleWidths"), 1);
        -  
        +
             /*
              * repeat height is 17 * (2 + 15) = 289 + 3 + annotationHeight = 510
              * make canvas height 2 of these plus 3 charHeights 
        @@ -275,7 +278,7 @@ public class SeqCanvasTest
                     + 2 * (annotationHeight + SeqCanvas.SEQS_ANNOTATION_GAP);
             testee.calculateWrappedGeometry(canvasWidth, canvasHeight);
             assertEquals(PA.getValue(testee, "wrappedVisibleWidths"), 3);
        -  
        +
             /*
              * reduce canvas height by 1 pixel - should not be enough height
              * to draw 3 widths
        @@ -283,14 +286,14 @@ public class SeqCanvasTest
             canvasHeight -= 1;
             testee.calculateWrappedGeometry(canvasWidth, canvasHeight);
             assertEquals(PA.getValue(testee, "wrappedVisibleWidths"), 2);
        -  
        +
             /*
              * turn off scale above - can now fit in 2 and a bit widths
              */
             av.setScaleAboveWrapped(false);
             testee.calculateWrappedGeometry(canvasWidth, canvasHeight);
             assertEquals(PA.getValue(testee, "wrappedVisibleWidths"), 3);
        -  
        +
             /*
              * reduce height to enough for 2 widths and not quite a third
              * i.e. two repeating heights + spacer + sequence - 1 pixel
        @@ -352,7 +355,7 @@ public class SeqCanvasTest
                     Boolean.TRUE.toString());
             af = new FileLoader().LoadFileWaitTillLoaded("examples/uniref50.fa",
                     DataSourceType.FILE);
        -  
        +
             /*
              * wait for Consensus thread to complete
              */
        @@ -366,6 +369,7 @@ public class SeqCanvasTest
               }
             } while (af.getViewport().getCalcManager().isWorking());
           }
        +
           @Test(groups = "Functional")
           public void testClear_HighlightAndSelection()
           {
        diff --git a/test/jalview/gui/SeqPanelTest.java b/test/jalview/gui/SeqPanelTest.java
        index b0fc116..8cec90c 100644
        --- a/test/jalview/gui/SeqPanelTest.java
        +++ b/test/jalview/gui/SeqPanelTest.java
        @@ -65,6 +65,7 @@ public class SeqPanelTest
             JvOptionPane.setInteractiveMode(false);
             JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
           }
        +
           @Test(groups = "Functional")
           public void testSetStatusReturnsNearestResiduePosition()
           {
        @@ -76,25 +77,21 @@ public class SeqPanelTest
             AlignmentI visAl = alignFrame.getViewport().getAlignment();
         
             // Test either side of gap
        -    assertEquals(
        -            alignFrame.alignPanel.getSeqPanel().setStatusMessage(
        -                    visAl.getSequenceAt(1), 1, 1), 2);
        +    assertEquals(alignFrame.alignPanel.getSeqPanel()
        +            .setStatusMessage(visAl.getSequenceAt(1), 1, 1), 2);
             assertEquals(((JLabel) PA.getValue(alignFrame, "statusBar")).getText(),
                     "Sequence 2 ID: Seq2 Residue: ALA (2)");
        -    assertEquals(
        -            alignFrame.alignPanel.getSeqPanel().setStatusMessage(
        -                    visAl.getSequenceAt(1), 4, 1), 3);
        +    assertEquals(alignFrame.alignPanel.getSeqPanel()
        +            .setStatusMessage(visAl.getSequenceAt(1), 4, 1), 3);
             assertEquals(((JLabel) PA.getValue(alignFrame, "statusBar")).getText(),
                     "Sequence 2 ID: Seq2 Residue: GLU (3)");
             // no status message at a gap, returns next residue position to the right
        -    assertEquals(
        -            alignFrame.alignPanel.getSeqPanel().setStatusMessage(
        -                    visAl.getSequenceAt(1), 2, 1), 3);
        +    assertEquals(alignFrame.alignPanel.getSeqPanel()
        +            .setStatusMessage(visAl.getSequenceAt(1), 2, 1), 3);
             assertEquals(((JLabel) PA.getValue(alignFrame, "statusBar")).getText(),
                     "Sequence 2 ID: Seq2");
        -    assertEquals(
        -            alignFrame.alignPanel.getSeqPanel().setStatusMessage(
        -                    visAl.getSequenceAt(1), 3, 1), 3);
        +    assertEquals(alignFrame.alignPanel.getSeqPanel()
        +            .setStatusMessage(visAl.getSequenceAt(1), 3, 1), 3);
             assertEquals(((JLabel) PA.getValue(alignFrame, "statusBar")).getText(),
                     "Sequence 2 ID: Seq2");
           }
        @@ -109,9 +106,8 @@ public class SeqPanelTest
                     al.getHeight());
             AlignmentI visAl = alignFrame.getViewport().getAlignment();
         
        -    assertEquals(
        -            alignFrame.alignPanel.getSeqPanel().setStatusMessage(
        -                    visAl.getSequenceAt(1), 1, 1), 2);
        +    assertEquals(alignFrame.alignPanel.getSeqPanel()
        +            .setStatusMessage(visAl.getSequenceAt(1), 1, 1), 2);
             assertEquals(((JLabel) PA.getValue(alignFrame, "statusBar")).getText(),
                     "Sequence 2 ID: Seq2 Residue: B (2)");
           }
        @@ -125,7 +121,7 @@ public class SeqPanelTest
             assertNull(SeqPanel.getEditStatusMessage(edit));
         
             SequenceI[] seqs = new SequenceI[] { new Sequence("a", "b") };
        -    
        +
             // 1 gap
             edit.addEdit(edit.new Edit(Action.INSERT_GAP, seqs, 1, 1, '-'));
             String expected = MessageManager.formatMessage("label.insert_gap", "1");
        @@ -165,7 +161,7 @@ public class SeqPanelTest
           {
             EditCommand edit = new EditCommand(); // empty
             SequenceI[] seqs = new SequenceI[] { new Sequence("a", "b") };
        -    
        +
             // 1 gap inserted, balanced by 1 delete
             Edit e1 = edit.new Edit(Action.INSERT_GAP, seqs, 1, 1, '-');
             edit.addEdit(e1);
        @@ -174,7 +170,7 @@ public class SeqPanelTest
             edit.addEdit(e2);
             String expected = MessageManager.formatMessage("label.insert_gap", "1");
             assertEquals(SeqPanel.getEditStatusMessage(edit), expected);
        -  
        +
             // 2 more gaps makes +3
             Edit e3 = edit.new Edit(Action.INSERT_GAP, seqs, 1, 2, '-');
             edit.addEdit(e3);
        @@ -183,7 +179,7 @@ public class SeqPanelTest
             edit.addEdit(e4);
             expected = MessageManager.formatMessage("label.insert_gaps", "3");
             assertEquals(SeqPanel.getEditStatusMessage(edit), expected);
        -  
        +
             // 2 deletes makes + 1
             Edit e5 = edit.new Edit(Action.DELETE_GAP, seqs, 1, 2, '-');
             edit.addEdit(e5);
        @@ -192,7 +188,7 @@ public class SeqPanelTest
             edit.addEdit(e6);
             expected = MessageManager.formatMessage("label.insert_gap", "1");
             assertEquals(SeqPanel.getEditStatusMessage(edit), expected);
        -  
        +
             // 1 more delete makes 0 - no text
             Edit e7 = edit.new Edit(Action.DELETE_GAP, seqs, 1, 1, '-');
             edit.addEdit(e7);
        @@ -201,7 +197,7 @@ public class SeqPanelTest
             edit.addEdit(e8);
             expected = MessageManager.formatMessage("label.insert_gaps", "2");
             assertNull(SeqPanel.getEditStatusMessage(edit));
        -  
        +
             // 1 more delete makes 1 delete
             Edit e9 = edit.new Edit(Action.DELETE_GAP, seqs, 1, 1, '-');
             edit.addEdit(e9);
        @@ -210,7 +206,7 @@ public class SeqPanelTest
             edit.addEdit(e10);
             expected = MessageManager.formatMessage("label.delete_gap", "1");
             assertEquals(SeqPanel.getEditStatusMessage(edit), expected);
        -  
        +
             // 2 more deletes makes 3 deletes
             Edit e11 = edit.new Edit(Action.DELETE_GAP, seqs, 1, 2, '-');
             edit.addEdit(e11);
        @@ -243,8 +239,8 @@ public class SeqPanelTest
             /*
              * mouse at top left of unwrapped panel
              */
        -    MouseEvent evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y,
        -            0, 0, 0, false, 0);
        +    MouseEvent evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0,
        +            x, y, 0, 0, 0, false, 0);
             MousePos pos = testee.findMousePosition(evt);
             assertEquals(pos.column, 0);
             assertEquals(pos.seqIndex, 0);
        @@ -274,22 +270,22 @@ public class SeqPanelTest
             final int charHeight = av.getCharHeight();
             final int charWidth = av.getCharWidth();
             final int alignmentHeight = av.getAlignment().getHeight();
        -    
        +
             // sanity checks:
             assertTrue(charHeight > 0);
             assertTrue(charWidth > 0);
             assertTrue(alignFrame.alignPanel.getSeqPanel().getWidth() > 0);
        -  
        +
             SeqPanel testee = alignFrame.alignPanel.getSeqPanel();
             int x = 0;
             int y = 0;
        -  
        +
             /*
              * mouse at top left of wrapped panel; there is a gap of charHeight
              * above the alignment
              */
        -    MouseEvent evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y,
        -            0, 0, 0, false, 0);
        +    MouseEvent evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0,
        +            x, y, 0, 0, 0, false, 0);
             MousePos pos = testee.findMousePosition(evt);
             assertEquals(pos.column, 0);
             assertEquals(pos.seqIndex, -1); // above sequences
        @@ -299,8 +295,8 @@ public class SeqPanelTest
              * cursor at bottom of gap above
              */
             y = charHeight - 1;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, -1);
             assertEquals(pos.annotationIndex, -1);
        @@ -309,8 +305,8 @@ public class SeqPanelTest
              * cursor over top of first sequence
              */
             y = charHeight;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, 0);
             assertEquals(pos.annotationIndex, -1);
        @@ -319,8 +315,8 @@ public class SeqPanelTest
              * cursor at bottom of first sequence
              */
             y = 2 * charHeight - 1;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, 0);
             assertEquals(pos.annotationIndex, -1);
        @@ -329,8 +325,8 @@ public class SeqPanelTest
              * cursor at top of second sequence
              */
             y = 2 * charHeight;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, 1);
             assertEquals(pos.annotationIndex, -1);
        @@ -339,8 +335,8 @@ public class SeqPanelTest
              * cursor at bottom of second sequence
              */
             y = 3 * charHeight - 1;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, 1);
             assertEquals(pos.annotationIndex, -1);
        @@ -349,8 +345,8 @@ public class SeqPanelTest
              * cursor at bottom of last sequence
              */
             y = charHeight * (1 + alignmentHeight) - 1;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, alignmentHeight - 1);
             assertEquals(pos.annotationIndex, -1);
        @@ -360,8 +356,8 @@ public class SeqPanelTest
              * method reports index of nearest sequence above
              */
             y += 1;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, alignmentHeight - 1);
             assertEquals(pos.annotationIndex, -1);
        @@ -370,8 +366,8 @@ public class SeqPanelTest
              * cursor still in the gap above annotations, now at the bottom of it
              */
             y += SeqCanvas.SEQS_ANNOTATION_GAP - 1; // 3-1 = 2
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, alignmentHeight - 1);
             assertEquals(pos.annotationIndex, -1);
        @@ -384,8 +380,8 @@ public class SeqPanelTest
                * cursor at the top of the n'th annotation  
                */
               y += 1;
        -      evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -              false, 0);
        +      evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0,
        +              0, 0, false, 0);
               pos = testee.findMousePosition(evt);
               assertEquals(pos.seqIndex, alignmentHeight - 1);
               assertEquals(pos.annotationIndex, n); // over n'th annotation
        @@ -394,8 +390,8 @@ public class SeqPanelTest
                * cursor at the bottom of the n'th annotation  
                */
               y += annotationRows[n].height - 1;
        -      evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -              false, 0);
        +      evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0,
        +              0, 0, false, 0);
               pos = testee.findMousePosition(evt);
               assertEquals(pos.seqIndex, alignmentHeight - 1);
               assertEquals(pos.annotationIndex, n);
        @@ -405,8 +401,8 @@ public class SeqPanelTest
              * cursor in gap between wrapped widths  
              */
             y += 1;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, -1);
             assertEquals(pos.annotationIndex, -1);
        @@ -415,8 +411,8 @@ public class SeqPanelTest
              * cursor at bottom of gap between wrapped widths  
              */
             y += charHeight - 1;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, -1);
             assertEquals(pos.annotationIndex, -1);
        @@ -425,8 +421,8 @@ public class SeqPanelTest
              * cursor at top of first sequence, second wrapped width  
              */
             y += 1;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, 0);
             assertEquals(pos.annotationIndex, -1);
        @@ -448,119 +444,120 @@ public class SeqPanelTest
             final int charHeight = av.getCharHeight();
             final int charWidth = av.getCharWidth();
             final int alignmentHeight = av.getAlignment().getHeight();
        -    
        +
             // sanity checks:
             assertTrue(charHeight > 0);
             assertTrue(charWidth > 0);
             assertTrue(alignFrame.alignPanel.getSeqPanel().getWidth() > 0);
        -  
        +
             SeqPanel testee = alignFrame.alignPanel.getSeqPanel();
             int x = 0;
             int y = 0;
        -  
        +
             /*
              * mouse at top left of wrapped panel; there is a gap of charHeight
              * above the alignment
              */
        -    MouseEvent evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y,
        -            0, 0, 0, false, 0);
        +    MouseEvent evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0,
        +            x, y, 0, 0, 0, false, 0);
             MousePos pos = testee.findMousePosition(evt);
             assertEquals(pos.column, 0);
             assertEquals(pos.seqIndex, -1); // above sequences
             assertEquals(pos.annotationIndex, -1);
        -  
        +
             /*
              * cursor at bottom of gap above
              * two charHeights including scale panel
              */
             y = 2 * charHeight - 1;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, -1);
             assertEquals(pos.annotationIndex, -1);
        -  
        +
             /*
              * cursor over top of first sequence
              */
             y += 1;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, 0);
             assertEquals(pos.annotationIndex, -1);
        -  
        +
             /*
              * cursor at bottom of first sequence
              */
             y += charHeight - 1;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, 0);
             assertEquals(pos.annotationIndex, -1);
        -  
        +
             /*
              * cursor at top of second sequence
              */
             y += 1;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, 1);
             assertEquals(pos.annotationIndex, -1);
        -  
        +
             /*
              * cursor at bottom of second sequence
              */
             y += charHeight - 1;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, 1);
             assertEquals(pos.annotationIndex, -1);
        -  
        +
             /*
              * cursor at bottom of last sequence
              * (scale + gap + sequences)
              */
             y = charHeight * (2 + alignmentHeight) - 1;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, alignmentHeight - 1);
             assertEquals(pos.annotationIndex, -1);
        -  
        +
             /*
              * cursor below sequences, in 3-pixel gap above annotations
              */
             y += 1;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, alignmentHeight - 1);
             assertEquals(pos.annotationIndex, -1);
        -  
        +
             /*
              * cursor still in the gap above annotations, now at the bottom of it
              * method reports index of nearest sequence above  
              */
             y += SeqCanvas.SEQS_ANNOTATION_GAP - 1; // 3-1 = 2
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, alignmentHeight - 1);
             assertEquals(pos.annotationIndex, -1);
        -  
        -    AlignmentAnnotation[] annotationRows = av.getAlignment().getAlignmentAnnotation();
        +
        +    AlignmentAnnotation[] annotationRows = av.getAlignment()
        +            .getAlignmentAnnotation();
             for (int n = 0; n < annotationRows.length; n++)
             {
               /*
                * cursor at the top of the n'th annotation  
                */
               y += 1;
        -      evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -              false, 0);
        +      evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0,
        +              0, 0, false, 0);
               pos = testee.findMousePosition(evt);
               assertEquals(pos.seqIndex, alignmentHeight - 1);
               assertEquals(pos.annotationIndex, n); // over n'th annotation
        @@ -569,8 +566,8 @@ public class SeqPanelTest
                * cursor at the bottom of the n'th annotation  
                */
               y += annotationRows[n].height - 1;
        -      evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -              false, 0);
        +      evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0,
        +              0, 0, false, 0);
               pos = testee.findMousePosition(evt);
               SeqCanvas sc = testee.seqCanvas;
               assertEquals(pos.seqIndex, alignmentHeight - 1,
        @@ -580,33 +577,33 @@ public class SeqPanelTest
                               sc.wrappedSpaceAboveAlignment));
               assertEquals(pos.annotationIndex, n);
             }
        -  
        +
             /*
              * cursor in gap between wrapped widths  
              */
             y += 1;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, -1);
             assertEquals(pos.annotationIndex, -1);
        -  
        +
             /*
              * cursor at bottom of gap between wrapped widths  
              */
             y += charHeight - 1;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, -1);
             assertEquals(pos.annotationIndex, -1);
        -  
        +
             /*
              * cursor at top of scale, second wrapped width  
              */
             y += 1;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, -1);
             assertEquals(pos.annotationIndex, -1);
        @@ -615,8 +612,8 @@ public class SeqPanelTest
              * cursor at bottom of scale, second wrapped width  
              */
             y += charHeight - 1;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, -1);
             assertEquals(pos.annotationIndex, -1);
        @@ -625,8 +622,8 @@ public class SeqPanelTest
              * cursor at top of first sequence, second wrapped width  
              */
             y += 1;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, 0);
             assertEquals(pos.annotationIndex, -1);
        @@ -649,33 +646,33 @@ public class SeqPanelTest
             final int charHeight = av.getCharHeight();
             final int charWidth = av.getCharWidth();
             final int alignmentHeight = av.getAlignment().getHeight();
        -    
        +
             // sanity checks:
             assertTrue(charHeight > 0);
             assertTrue(charWidth > 0);
             assertTrue(alignFrame.alignPanel.getSeqPanel().getWidth() > 0);
        -  
        +
             SeqPanel testee = alignFrame.alignPanel.getSeqPanel();
             int x = 0;
             int y = 0;
        -  
        +
             /*
              * mouse at top left of wrapped panel; there is a gap of charHeight
              * above the alignment
              */
        -    MouseEvent evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y,
        -            0, 0, 0, false, 0);
        +    MouseEvent evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0,
        +            x, y, 0, 0, 0, false, 0);
             MousePos pos = testee.findMousePosition(evt);
             assertEquals(pos.column, 0);
             assertEquals(pos.seqIndex, -1); // above sequences
             assertEquals(pos.annotationIndex, -1);
        -  
        +
             /*
              * cursor over top of first sequence
              */
             y = charHeight;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, 0);
             assertEquals(pos.annotationIndex, -1);
        @@ -684,38 +681,38 @@ public class SeqPanelTest
              * cursor at bottom of last sequence
              */
             y = charHeight * (1 + alignmentHeight) - 1;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, alignmentHeight - 1);
             assertEquals(pos.annotationIndex, -1);
        -  
        +
             /*
              * cursor below sequences, at top of charHeight gap between widths
              */
             y += 1;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, -1);
             assertEquals(pos.annotationIndex, -1);
        -  
        +
             /*
              * cursor below sequences, at top of charHeight gap between widths
              */
             y += charHeight - 1;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, -1);
             assertEquals(pos.annotationIndex, -1);
        -  
        +
             /*
              * cursor at the top of the first sequence, second width  
              */
             y += 1;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, 0);
             assertEquals(pos.annotationIndex, -1);
        @@ -737,40 +734,40 @@ public class SeqPanelTest
             /*
              * mouse at top left of unwrapped panel
              */
        -    MouseEvent evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0,
        -            0, 0, 0, false, 0);
        +    MouseEvent evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0,
        +            x, 0, 0, 0, 0, false, 0);
             assertEquals(testee.findColumn(evt), 0);
        -    
        +
             /*
              * not quite one charWidth across
              */
        -    x = charWidth-1;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0,
        -            0, 0, 0, false, 0);
        +    x = charWidth - 1;
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0, 0, 0,
        +            0, false, 0);
             assertEquals(testee.findColumn(evt), 0);
         
             /*
              * one charWidth across
              */
             x = charWidth;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0, 0, 0,
        +            0, false, 0);
             assertEquals(testee.findColumn(evt), 1);
         
             /*
              * two charWidths across
              */
             x = 2 * charWidth;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0, 0, 0,
        +            0, false, 0);
             assertEquals(testee.findColumn(evt), 2);
         
             /*
              * limited to last column of seqcanvas
              */
             x = 20000;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0, 0, 0,
        +            0, false, 0);
             SeqCanvas seqCanvas = alignFrame.alignPanel.getSeqPanel().seqCanvas;
             int w = seqCanvas.getWidth();
             // limited to number of whole columns, base 0,
        @@ -785,8 +782,8 @@ public class SeqPanelTest
             alignFrame.getViewport().hideColumns(4, 9);
             x = 5 * charWidth + 2;
             // x is in 6th visible column, absolute column 12, or 11 base 0
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0, 0, 0,
        +            0, false, 0);
             assertEquals(testee.findColumn(evt), 11);
           }
         
        @@ -806,28 +803,28 @@ public class SeqPanelTest
             final int charWidth = av.getCharWidth();
             assertTrue(charWidth > 0); // sanity check
             assertEquals(av.getRanges().getStartRes(), 0);
        -  
        +
             /*
              * mouse at top left of wrapped panel, no West (left) scale
              */
        -    MouseEvent evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0,
        -            0, 0, 0, false, 0);
        +    MouseEvent evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0,
        +            x, 0, 0, 0, 0, false, 0);
             assertEquals(testee.findColumn(evt), 0);
        -    
        +
             /*
              * not quite one charWidth across
              */
        -    x = charWidth-1;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0,
        -            0, 0, 0, false, 0);
        +    x = charWidth - 1;
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0, 0, 0,
        +            0, false, 0);
             assertEquals(testee.findColumn(evt), 0);
        -  
        +
             /*
              * one charWidth across
              */
             x = charWidth;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0, 0, 0,
        +            0, false, 0);
             assertEquals(testee.findColumn(evt), 1);
         
             /*
        @@ -839,13 +836,13 @@ public class SeqPanelTest
             int labelWidth = (int) PA.getValue(seqCanvas, "labelWidthWest");
             assertTrue(labelWidth > 0);
             x = labelWidth - 1;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0, 0, 0,
        +            0, false, 0);
             assertEquals(testee.findColumn(evt), -1);
         
             x = labelWidth;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0, 0, 0,
        +            0, false, 0);
             assertEquals(testee.findColumn(evt), 0);
         
             /*
        @@ -854,8 +851,8 @@ public class SeqPanelTest
             int residuesWide = av.getRanges().getViewportWidth();
             assertTrue(residuesWide > 0);
             x = labelWidth + charWidth * residuesWide - 1;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0, 0, 0,
        +            0, false, 0);
             assertEquals(testee.findColumn(evt), residuesWide - 1);
         
             /*
        @@ -869,13 +866,14 @@ public class SeqPanelTest
             assertTrue(residuesWide2 > 0);
             assertTrue(residuesWide2 < residuesWide); // available width reduced
             x += 1; // just over left edge of scale right
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0, 0, 0,
        +            0, false, 0);
             assertEquals(testee.findColumn(evt), -1);
        -    
        +
             // todo add startRes offset, hidden columns
         
           }
        +
           @BeforeClass(alwaysRun = true)
           public static void setUpBeforeClass() throws Exception
           {
        @@ -905,6 +903,7 @@ public class SeqPanelTest
               e.printStackTrace();
             }
           }
        +
           @Test(groups = "Functional")
           public void testFindMousePosition_wrapped_scales_longSequence()
           {
        @@ -915,13 +914,13 @@ public class SeqPanelTest
             Cache.applicationProperties.setProperty("FONT_STYLE", "0");
             // sequence of 50 bases, doubled 10 times, = 51200 bases
             String dna = "ATGGCCATTGGGCCCAAATTTCCCAAAGGGTTTCCCTGAGGTCAGTCAGA";
        -    for (int i = 0 ; i < 10 ; i++)
        +    for (int i = 0; i < 10; i++)
             {
               dna += dna;
             }
             assertEquals(dna.length(), 51200);
        -    AlignFrame alignFrame = new FileLoader()
        -            .LoadFileWaitTillLoaded(dna, DataSourceType.PASTE);
        +    AlignFrame alignFrame = new FileLoader().LoadFileWaitTillLoaded(dna,
        +            DataSourceType.PASTE);
             SeqPanel testee = alignFrame.alignPanel.getSeqPanel();
             AlignViewport av = alignFrame.getViewport();
             av.setScaleAboveWrapped(true);
        @@ -935,12 +934,12 @@ public class SeqPanelTest
             } catch (InterruptedException e)
             {
             }
        -  
        +
             final int charHeight = av.getCharHeight();
             final int charWidth = av.getCharWidth();
             assertEquals(charHeight, 17);
             assertEquals(charWidth, 12);
        -    
        +
             FontMetrics fm = testee.getFontMetrics(av.getFont());
             int labelWidth = fm.stringWidth("00000") + charWidth;
             assertEquals(labelWidth, 57); // 5 x 9 + charWidth
        @@ -948,13 +947,13 @@ public class SeqPanelTest
         
             int x = 0;
             int y = 0;
        -  
        +
             /*
              * mouse at top left of wrapped panel; there is a gap of 2 * charHeight
              * above the alignment
              */
        -    MouseEvent evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y,
        -            0, 0, 0, false, 0);
        +    MouseEvent evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0,
        +            x, y, 0, 0, 0, false, 0);
             MousePos pos = testee.findMousePosition(evt);
             assertEquals(pos.column, -1); // over scale left, not an alignment column
             assertEquals(pos.seqIndex, -1); // above sequences
        @@ -965,94 +964,94 @@ public class SeqPanelTest
              */
             y += charHeight;
             x = labelWidth;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, -1);
             assertEquals(pos.column, 0);
             assertEquals(pos.annotationIndex, -1);
        -    
        +
             /*
              * cursor over scale left of first sequence
              */
             y += charHeight;
             x = 0;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, 0);
             assertEquals(pos.column, -1);
             assertEquals(pos.annotationIndex, -1);
        -  
        +
             /*
              * cursor over start of first sequence
              */
             x = labelWidth;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, 0);
             assertEquals(pos.column, 0);
             assertEquals(pos.annotationIndex, -1);
        -  
        +
             /*
              * move one character right, to bottom pixel of same row
              */
             x += charWidth;
             y += charHeight - 1;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, 0);
             assertEquals(pos.column, 1);
        -    
        +
             /*
              * move down one pixel - now in the no man's land between rows
              */
             y += 1;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, -1);
             assertEquals(pos.column, 1);
        -    
        +
             /*
              * move down two char heights less one pixel - still in the no man's land
              * (scale above + spacer line)
              */
             y += (2 * charHeight - 1);
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, -1);
             assertEquals(pos.column, 1);
        -    
        +
             /*
              * move down one more pixel - now on the next row of the sequence
              */
             y += 1;
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, 0);
             assertEquals(pos.column, 1 + av.getWrappedWidth());
        -    
        +
             /*
              * scroll to near the end of the sequence
              */
             SearchResultsI sr = new SearchResults();
             int scrollTo = dna.length() - 1000;
        -    sr.addResult(av.getAlignment().getSequenceAt(0), scrollTo, scrollTo); 
        +    sr.addResult(av.getAlignment().getSequenceAt(0), scrollTo, scrollTo);
             alignFrame.alignPanel.scrollToPosition(sr);
        -    
        +
             /*
              * place the mouse on the first column of the 6th sequence, and
              * verify that (computed) findMousePosition matches (actual) ViewportRanges
              */
             x = labelWidth;
             y = 17 * charHeight; // 17 = 6 times two header rows and 5 sequence rows
        -    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
        -            false, 0);
        +    evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0,
        +            0, false, 0);
             pos = testee.findMousePosition(evt);
             assertEquals(pos.seqIndex, 0);
             int expected = av.getRanges().getStartRes() + 5 * av.getWrappedWidth();
        diff --git a/test/jalview/gui/SequenceRendererTest.java b/test/jalview/gui/SequenceRendererTest.java
        index 359377a..9b49232 100644
        --- a/test/jalview/gui/SequenceRendererTest.java
        +++ b/test/jalview/gui/SequenceRendererTest.java
        @@ -41,6 +41,7 @@ import org.testng.annotations.Test;
         public class SequenceRendererTest
         {
           AlignmentI al;
        +
           AlignViewport av;
         
           SequenceI seq1;
        @@ -50,7 +51,7 @@ public class SequenceRendererTest
           {
             Jalview.main(
                     new String[]
        -    { "-nonews", "-props", "test/jalview/testProps.jvprops" });
        +            { "-nonews", "-props", "test/jalview/testProps.jvprops" });
           }
         
           @BeforeMethod(alwaysRun = true)
        diff --git a/test/jalview/gui/StructureChooserTest.java b/test/jalview/gui/StructureChooserTest.java
        index f183e5c..b74baf1 100644
        --- a/test/jalview/gui/StructureChooserTest.java
        +++ b/test/jalview/gui/StructureChooserTest.java
        @@ -58,7 +58,7 @@ public class StructureChooserTest
             JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
           }
         
        -  Sequence seq,upSeq,upSeq_nocanonical;
        +  Sequence seq, upSeq, upSeq_nocanonical;
         
           @BeforeMethod(alwaysRun = true)
           public void setUp() throws Exception
        @@ -80,45 +80,46 @@ public class StructureChooserTest
             pdbIds.add(dbRef);
         
             seq.setPDBId(pdbIds);
        -    
        +
             // Uniprot sequence for 3D-Beacons mocks
        -    upSeq = new Sequence("P38398", 
        +    upSeq = new Sequence("P38398",
                     "MDLSALRVEEVQNVINAMQKILECPICLELIKEPVSTKCDHIFCKFCMLKLLNQKKGPSQCPLCKNDITKRS\n"
        -            + "LQESTRFSQLVEELLKIICAFQLDTGLEYANSYNFAKKENNSPEHLKDEVSIIQSMGYRNRAKRLLQSEPEN\n"
        -            + "PSLQETSLSVQLSNLGTVRTLRTKQRIQPQKTSVYIELGSDSSEDTVNKATYCSVGDQELLQITPQGTRDEI\n"
        -            + "SLDSAKKAACEFSETDVTNTEHHQPSNNDLNTTEKRAAERHPEKYQGSSVSNLHVEPCGTNTHASSLQHENS\n"
        -            + "SLLLTKDRMNVEKAEFCNKSKQPGLARSQHNRWAGSKETCNDRRTPSTEKKVDLNADPLCERKEWNKQKLPC\n"
        -            + "SENPRDTEDVPWITLNSSIQKVNEWFSRSDELLGSDDSHDGESESNAKVADVLDVLNEVDEYSGSSEKIDLL\n"
        -            + "ASDPHEALICKSERVHSKSVESNIEDKIFGKTYRKKASLPNLSHVTENLIIGAFVTEPQIIQERPLTNKLKR\n"
        -            + "KRRPTSGLHPEDFIKKADLAVQKTPEMINQGTNQTEQNGQVMNITNSGHENKTKGDSIQNEKNPNPIESLEK\n"
        -            + "ESAFKTKAEPISSSISNMELELNIHNSKAPKKNRLRRKSSTRHIHALELVVSRNLSPPNCTELQIDSCSSSE\n"
        -            + "EIKKKKYNQMPVRHSRNLQLMEGKEPATGAKKSNKPNEQTSKRHDSDTFPELKLTNAPGSFTKCSNTSELKE\n"
        -            + "FVNPSLPREEKEEKLETVKVSNNAEDPKDLMLSGERVLQTERSVESSSISLVPGTDYGTQESISLLEVSTLG\n"
        -            + "KAKTEPNKCVSQCAAFENPKGLIHGCSKDNRNDTEGFKYPLGHEVNHSRETSIEMEESELDAQYLQNTFKVS\n"
        -            + "KRQSFAPFSNPGNAEEECATFSAHSGSLKKQSPKVTFECEQKEENQGKNESNIKPVQTVNITAGFPVVGQKD\n"
        -            + "KPVDNAKCSIKGGSRFCLSSQFRGNETGLITPNKHGLLQNPYRIPPLFPIKSFVKTKCKKNLLEENFEEHSM\n"
        -            + "SPEREMGNENIPSTVSTISRNNIRENVFKEASSSNINEVGSSTNEVGSSINEIGSSDENIQAELGRNRGPKL\n"
        -            + "NAMLRLGVLQPEVYKQSLPGSNCKHPEIKKQEYEEVVQTVNTDFSPYLISDNLEQPMGSSHASQVCSETPDD\n"
        -            + "LLDDGEIKEDTSFAENDIKESSAVFSKSVQKGELSRSPSPFTHTHLAQGYRRGAKKLESSEENLSSEDEELP\n"
        -            + "CFQHLLFGKVNNIPSQSTRHSTVATECLSKNTEENLLSLKNSLNDCSNQVILAKASQEHHLSEETKCSASLF\n"
        -            + "SSQCSELEDLTANTNTQDPFLIGSSKQMRHQSESQGVGLSDKELVSDDEERGTGLEENNQEEQSMDSNLGEA\n"
        -            + "ASGCESETSVSEDCSGLSSQSDILTTQQRDTMQHNLIKLQQEMAELEAVLEQHGSQPSNSYPSIISDSSALE\n"
        -            + "DLRNPEQSTSEKAVLTSQKSSEYPISQNPEGLSADKFEVSADSSTSKNKEPGVERSSPSKCPSLDDRWYMHS\n"
        -            + "CSGSLQNRNYPSQEELIKVVDVEEQQLEESGPHDLTETSYLPRQDLEGTPYLESGISLFSDDPESDPSEDRA\n"
        -            + "PESARVGNIPSSTSALKVPQLKVAESAQSPAAAHTTDTAGYNAMEESVSREKPELTASTERVNKRMSMVVSG\n"
        -            + "LTPEEFMLVYKFARKHHITLTNLITEETTHVVMKTDAEFVCERTLKYFLGIAGGKWVVSYFWVTQSIKERKM\n"
        -            + "LNEHDFEVRGDVVNGRNHQGPKRARESQDRKIFRGLEICCYGPFTNMPTDQLEWMVQLCGASVVKELSSFTL\n"
        -            + "GTGVHPIVVVQPDAWTEDNGFHAIGQMCEAPVVTREWVLDSVALYQCQELDTYLIPQIPHSHY\n"
        -            + "", 1,
        -1863);
        +                    + "LQESTRFSQLVEELLKIICAFQLDTGLEYANSYNFAKKENNSPEHLKDEVSIIQSMGYRNRAKRLLQSEPEN\n"
        +                    + "PSLQETSLSVQLSNLGTVRTLRTKQRIQPQKTSVYIELGSDSSEDTVNKATYCSVGDQELLQITPQGTRDEI\n"
        +                    + "SLDSAKKAACEFSETDVTNTEHHQPSNNDLNTTEKRAAERHPEKYQGSSVSNLHVEPCGTNTHASSLQHENS\n"
        +                    + "SLLLTKDRMNVEKAEFCNKSKQPGLARSQHNRWAGSKETCNDRRTPSTEKKVDLNADPLCERKEWNKQKLPC\n"
        +                    + "SENPRDTEDVPWITLNSSIQKVNEWFSRSDELLGSDDSHDGESESNAKVADVLDVLNEVDEYSGSSEKIDLL\n"
        +                    + "ASDPHEALICKSERVHSKSVESNIEDKIFGKTYRKKASLPNLSHVTENLIIGAFVTEPQIIQERPLTNKLKR\n"
        +                    + "KRRPTSGLHPEDFIKKADLAVQKTPEMINQGTNQTEQNGQVMNITNSGHENKTKGDSIQNEKNPNPIESLEK\n"
        +                    + "ESAFKTKAEPISSSISNMELELNIHNSKAPKKNRLRRKSSTRHIHALELVVSRNLSPPNCTELQIDSCSSSE\n"
        +                    + "EIKKKKYNQMPVRHSRNLQLMEGKEPATGAKKSNKPNEQTSKRHDSDTFPELKLTNAPGSFTKCSNTSELKE\n"
        +                    + "FVNPSLPREEKEEKLETVKVSNNAEDPKDLMLSGERVLQTERSVESSSISLVPGTDYGTQESISLLEVSTLG\n"
        +                    + "KAKTEPNKCVSQCAAFENPKGLIHGCSKDNRNDTEGFKYPLGHEVNHSRETSIEMEESELDAQYLQNTFKVS\n"
        +                    + "KRQSFAPFSNPGNAEEECATFSAHSGSLKKQSPKVTFECEQKEENQGKNESNIKPVQTVNITAGFPVVGQKD\n"
        +                    + "KPVDNAKCSIKGGSRFCLSSQFRGNETGLITPNKHGLLQNPYRIPPLFPIKSFVKTKCKKNLLEENFEEHSM\n"
        +                    + "SPEREMGNENIPSTVSTISRNNIRENVFKEASSSNINEVGSSTNEVGSSINEIGSSDENIQAELGRNRGPKL\n"
        +                    + "NAMLRLGVLQPEVYKQSLPGSNCKHPEIKKQEYEEVVQTVNTDFSPYLISDNLEQPMGSSHASQVCSETPDD\n"
        +                    + "LLDDGEIKEDTSFAENDIKESSAVFSKSVQKGELSRSPSPFTHTHLAQGYRRGAKKLESSEENLSSEDEELP\n"
        +                    + "CFQHLLFGKVNNIPSQSTRHSTVATECLSKNTEENLLSLKNSLNDCSNQVILAKASQEHHLSEETKCSASLF\n"
        +                    + "SSQCSELEDLTANTNTQDPFLIGSSKQMRHQSESQGVGLSDKELVSDDEERGTGLEENNQEEQSMDSNLGEA\n"
        +                    + "ASGCESETSVSEDCSGLSSQSDILTTQQRDTMQHNLIKLQQEMAELEAVLEQHGSQPSNSYPSIISDSSALE\n"
        +                    + "DLRNPEQSTSEKAVLTSQKSSEYPISQNPEGLSADKFEVSADSSTSKNKEPGVERSSPSKCPSLDDRWYMHS\n"
        +                    + "CSGSLQNRNYPSQEELIKVVDVEEQQLEESGPHDLTETSYLPRQDLEGTPYLESGISLFSDDPESDPSEDRA\n"
        +                    + "PESARVGNIPSSTSALKVPQLKVAESAQSPAAAHTTDTAGYNAMEESVSREKPELTASTERVNKRMSMVVSG\n"
        +                    + "LTPEEFMLVYKFARKHHITLTNLITEETTHVVMKTDAEFVCERTLKYFLGIAGGKWVVSYFWVTQSIKERKM\n"
        +                    + "LNEHDFEVRGDVVNGRNHQGPKRARESQDRKIFRGLEICCYGPFTNMPTDQLEWMVQLCGASVVKELSSFTL\n"
        +                    + "GTGVHPIVVVQPDAWTEDNGFHAIGQMCEAPVVTREWVLDSVALYQCQELDTYLIPQIPHSHY\n"
        +                    + "",
        +            1, 1863);
             upSeq.setDescription("Breast cancer type 1 susceptibility protein");
             upSeq_nocanonical = new Sequence(upSeq);
             upSeq.createDatasetSequence();
        -    upSeq.addDBRef(new DBRefEntry("UNIPROT","0","P38398",null,true));
        -    
        +    upSeq.addDBRef(new DBRefEntry("UNIPROT", "0", "P38398", null, true));
        +
             upSeq_nocanonical.createDatasetSequence();
             // not a canonical reference
        -    upSeq_nocanonical.addDBRef(new DBRefEntry("UNIPROT","0","P38398",null,false));
        +    upSeq_nocanonical.addDBRef(
        +            new DBRefEntry("UNIPROT", "0", "P38398", null, false));
         
           }
         
        @@ -126,8 +127,8 @@ public class StructureChooserTest
           public void tearDown() throws Exception
           {
             seq = null;
        -    upSeq=null;
        -    upSeq_nocanonical=null;
        +    upSeq = null;
        +    upSeq_nocanonical = null;
           }
         
           @Test(groups = { "Functional" })
        @@ -139,21 +140,22 @@ public class StructureChooserTest
             SequenceI[] selectedSeqs = new SequenceI[] { seq };
             StructureChooser sc = new StructureChooser(selectedSeqs, seq, null);
             ThreadwaitFor(200, sc);
        -    
        +
             // if structures are not discovered then don't
             // populate filter options
             sc.populateFilterComboBox(false, false);
             int optionsSize = sc.getCmbFilterOption().getItemCount();
             System.out.println("Items (no data, no cache): ");
             StringBuilder items = new StringBuilder();
        -    for (int p=0;p ss = (Collection) PA.getValue(sc,
                     "discoveredStructuresSet");
        @@ -209,7 +214,7 @@ public class StructureChooserTest
             SequenceI[] selectedSeqs = new SequenceI[] { upSeq };
             StructureChooser sc = new StructureChooser(selectedSeqs, seq, null);
             ThreadwaitFor(500, sc);
        -    
        +
             sc.fetchStructuresMetaData();
             Collection ss = (Collection) PA.getValue(sc,
                     "discoveredStructuresSet");
        @@ -219,35 +224,39 @@ public class StructureChooserTest
         
           private void ThreadwaitFor(int i, StructureChooser sc)
           {
        -    long timeout = i+System.currentTimeMillis();
        +    long timeout = i + System.currentTimeMillis();
             while (!sc.isDialogVisible() && timeout > System.currentTimeMillis())
             {
        -      try {
        +      try
        +      {
                 Thread.sleep(50);
               } catch (InterruptedException x)
               {
        -        
        +
               }
             }
        -    
        -  }
         
        +  }
         
           @Test(groups = { "Functional" })
           public void sanitizeSeqNameTest()
           {
             String name = "ab_cdEF|fwxyz012349";
        -    assertEquals(name, PDBStructureChooserQuerySource.sanitizeSeqName(name));
        +    assertEquals(name,
        +            PDBStructureChooserQuerySource.sanitizeSeqName(name));
         
             // remove a [nn] substring
             name = "abcde12[345]fg";
        -    assertEquals("abcde12fg", PDBStructureChooserQuerySource.sanitizeSeqName(name));
        +    assertEquals("abcde12fg",
        +            PDBStructureChooserQuerySource.sanitizeSeqName(name));
         
             // remove characters other than a-zA-Z0-9 | or _
             name = "ab[cd],.\t£$*!- \\\"@:e";
        -    assertEquals("abcde", PDBStructureChooserQuerySource.sanitizeSeqName(name));
        +    assertEquals("abcde",
        +            PDBStructureChooserQuerySource.sanitizeSeqName(name));
         
             name = "abcde12[345a]fg";
        -    assertEquals("abcde12345afg", PDBStructureChooserQuerySource.sanitizeSeqName(name));
        +    assertEquals("abcde12345afg",
        +            PDBStructureChooserQuerySource.sanitizeSeqName(name));
           }
         }
        diff --git a/test/jalview/gui/structurechooser/StructureChooserQuerySourceTest.java b/test/jalview/gui/structurechooser/StructureChooserQuerySourceTest.java
        index 1912f14..6e85886 100644
        --- a/test/jalview/gui/structurechooser/StructureChooserQuerySourceTest.java
        +++ b/test/jalview/gui/structurechooser/StructureChooserQuerySourceTest.java
        @@ -20,7 +20,6 @@
          */
         package jalview.gui.structurechooser;
         
        -
         import static org.testng.Assert.assertEquals;
         import static org.testng.Assert.assertTrue;
         
        @@ -61,11 +60,11 @@ public class StructureChooserQuerySourceTest
             JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
           }
         
        -  Sequence seq,upSeq,upSeq_insulin;
        +  Sequence seq, upSeq, upSeq_insulin;
         
           // same set up as for structurechooser test
        -  
        -@BeforeMethod(alwaysRun = true)
        +
        +  @BeforeMethod(alwaysRun = true)
           public void setUp() throws Exception
           {
             seq = new Sequence("PDB|4kqy|4KQY|A", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", 1,
        @@ -85,54 +84,55 @@ public class StructureChooserQuerySourceTest
             pdbIds.add(dbRef);
         
             seq.setPDBId(pdbIds);
        -    
        +
             // Uniprot sequence for 3D-Beacons mocks
        -    upSeq = new Sequence("P38398", 
        +    upSeq = new Sequence("P38398",
                     "MDLSALRVEEVQNVINAMQKILECPICLELIKEPVSTKCDHIFCKFCMLKLLNQKKGPSQCPLCKNDITKRS\n"
        -            + "LQESTRFSQLVEELLKIICAFQLDTGLEYANSYNFAKKENNSPEHLKDEVSIIQSMGYRNRAKRLLQSEPEN\n"
        -            + "PSLQETSLSVQLSNLGTVRTLRTKQRIQPQKTSVYIELGSDSSEDTVNKATYCSVGDQELLQITPQGTRDEI\n"
        -            + "SLDSAKKAACEFSETDVTNTEHHQPSNNDLNTTEKRAAERHPEKYQGSSVSNLHVEPCGTNTHASSLQHENS\n"
        -            + "SLLLTKDRMNVEKAEFCNKSKQPGLARSQHNRWAGSKETCNDRRTPSTEKKVDLNADPLCERKEWNKQKLPC\n"
        -            + "SENPRDTEDVPWITLNSSIQKVNEWFSRSDELLGSDDSHDGESESNAKVADVLDVLNEVDEYSGSSEKIDLL\n"
        -            + "ASDPHEALICKSERVHSKSVESNIEDKIFGKTYRKKASLPNLSHVTENLIIGAFVTEPQIIQERPLTNKLKR\n"
        -            + "KRRPTSGLHPEDFIKKADLAVQKTPEMINQGTNQTEQNGQVMNITNSGHENKTKGDSIQNEKNPNPIESLEK\n"
        -            + "ESAFKTKAEPISSSISNMELELNIHNSKAPKKNRLRRKSSTRHIHALELVVSRNLSPPNCTELQIDSCSSSE\n"
        -            + "EIKKKKYNQMPVRHSRNLQLMEGKEPATGAKKSNKPNEQTSKRHDSDTFPELKLTNAPGSFTKCSNTSELKE\n"
        -            + "FVNPSLPREEKEEKLETVKVSNNAEDPKDLMLSGERVLQTERSVESSSISLVPGTDYGTQESISLLEVSTLG\n"
        -            + "KAKTEPNKCVSQCAAFENPKGLIHGCSKDNRNDTEGFKYPLGHEVNHSRETSIEMEESELDAQYLQNTFKVS\n"
        -            + "KRQSFAPFSNPGNAEEECATFSAHSGSLKKQSPKVTFECEQKEENQGKNESNIKPVQTVNITAGFPVVGQKD\n"
        -            + "KPVDNAKCSIKGGSRFCLSSQFRGNETGLITPNKHGLLQNPYRIPPLFPIKSFVKTKCKKNLLEENFEEHSM\n"
        -            + "SPEREMGNENIPSTVSTISRNNIRENVFKEASSSNINEVGSSTNEVGSSINEIGSSDENIQAELGRNRGPKL\n"
        -            + "NAMLRLGVLQPEVYKQSLPGSNCKHPEIKKQEYEEVVQTVNTDFSPYLISDNLEQPMGSSHASQVCSETPDD\n"
        -            + "LLDDGEIKEDTSFAENDIKESSAVFSKSVQKGELSRSPSPFTHTHLAQGYRRGAKKLESSEENLSSEDEELP\n"
        -            + "CFQHLLFGKVNNIPSQSTRHSTVATECLSKNTEENLLSLKNSLNDCSNQVILAKASQEHHLSEETKCSASLF\n"
        -            + "SSQCSELEDLTANTNTQDPFLIGSSKQMRHQSESQGVGLSDKELVSDDEERGTGLEENNQEEQSMDSNLGEA\n"
        -            + "ASGCESETSVSEDCSGLSSQSDILTTQQRDTMQHNLIKLQQEMAELEAVLEQHGSQPSNSYPSIISDSSALE\n"
        -            + "DLRNPEQSTSEKAVLTSQKSSEYPISQNPEGLSADKFEVSADSSTSKNKEPGVERSSPSKCPSLDDRWYMHS\n"
        -            + "CSGSLQNRNYPSQEELIKVVDVEEQQLEESGPHDLTETSYLPRQDLEGTPYLESGISLFSDDPESDPSEDRA\n"
        -            + "PESARVGNIPSSTSALKVPQLKVAESAQSPAAAHTTDTAGYNAMEESVSREKPELTASTERVNKRMSMVVSG\n"
        -            + "LTPEEFMLVYKFARKHHITLTNLITEETTHVVMKTDAEFVCERTLKYFLGIAGGKWVVSYFWVTQSIKERKM\n"
        -            + "LNEHDFEVRGDVVNGRNHQGPKRARESQDRKIFRGLEICCYGPFTNMPTDQLEWMVQLCGASVVKELSSFTL\n"
        -            + "GTGVHPIVVVQPDAWTEDNGFHAIGQMCEAPVVTREWVLDSVALYQCQELDTYLIPQIPHSHY\n"
        -            + "", 1,
        -1863);
        +                    + "LQESTRFSQLVEELLKIICAFQLDTGLEYANSYNFAKKENNSPEHLKDEVSIIQSMGYRNRAKRLLQSEPEN\n"
        +                    + "PSLQETSLSVQLSNLGTVRTLRTKQRIQPQKTSVYIELGSDSSEDTVNKATYCSVGDQELLQITPQGTRDEI\n"
        +                    + "SLDSAKKAACEFSETDVTNTEHHQPSNNDLNTTEKRAAERHPEKYQGSSVSNLHVEPCGTNTHASSLQHENS\n"
        +                    + "SLLLTKDRMNVEKAEFCNKSKQPGLARSQHNRWAGSKETCNDRRTPSTEKKVDLNADPLCERKEWNKQKLPC\n"
        +                    + "SENPRDTEDVPWITLNSSIQKVNEWFSRSDELLGSDDSHDGESESNAKVADVLDVLNEVDEYSGSSEKIDLL\n"
        +                    + "ASDPHEALICKSERVHSKSVESNIEDKIFGKTYRKKASLPNLSHVTENLIIGAFVTEPQIIQERPLTNKLKR\n"
        +                    + "KRRPTSGLHPEDFIKKADLAVQKTPEMINQGTNQTEQNGQVMNITNSGHENKTKGDSIQNEKNPNPIESLEK\n"
        +                    + "ESAFKTKAEPISSSISNMELELNIHNSKAPKKNRLRRKSSTRHIHALELVVSRNLSPPNCTELQIDSCSSSE\n"
        +                    + "EIKKKKYNQMPVRHSRNLQLMEGKEPATGAKKSNKPNEQTSKRHDSDTFPELKLTNAPGSFTKCSNTSELKE\n"
        +                    + "FVNPSLPREEKEEKLETVKVSNNAEDPKDLMLSGERVLQTERSVESSSISLVPGTDYGTQESISLLEVSTLG\n"
        +                    + "KAKTEPNKCVSQCAAFENPKGLIHGCSKDNRNDTEGFKYPLGHEVNHSRETSIEMEESELDAQYLQNTFKVS\n"
        +                    + "KRQSFAPFSNPGNAEEECATFSAHSGSLKKQSPKVTFECEQKEENQGKNESNIKPVQTVNITAGFPVVGQKD\n"
        +                    + "KPVDNAKCSIKGGSRFCLSSQFRGNETGLITPNKHGLLQNPYRIPPLFPIKSFVKTKCKKNLLEENFEEHSM\n"
        +                    + "SPEREMGNENIPSTVSTISRNNIRENVFKEASSSNINEVGSSTNEVGSSINEIGSSDENIQAELGRNRGPKL\n"
        +                    + "NAMLRLGVLQPEVYKQSLPGSNCKHPEIKKQEYEEVVQTVNTDFSPYLISDNLEQPMGSSHASQVCSETPDD\n"
        +                    + "LLDDGEIKEDTSFAENDIKESSAVFSKSVQKGELSRSPSPFTHTHLAQGYRRGAKKLESSEENLSSEDEELP\n"
        +                    + "CFQHLLFGKVNNIPSQSTRHSTVATECLSKNTEENLLSLKNSLNDCSNQVILAKASQEHHLSEETKCSASLF\n"
        +                    + "SSQCSELEDLTANTNTQDPFLIGSSKQMRHQSESQGVGLSDKELVSDDEERGTGLEENNQEEQSMDSNLGEA\n"
        +                    + "ASGCESETSVSEDCSGLSSQSDILTTQQRDTMQHNLIKLQQEMAELEAVLEQHGSQPSNSYPSIISDSSALE\n"
        +                    + "DLRNPEQSTSEKAVLTSQKSSEYPISQNPEGLSADKFEVSADSSTSKNKEPGVERSSPSKCPSLDDRWYMHS\n"
        +                    + "CSGSLQNRNYPSQEELIKVVDVEEQQLEESGPHDLTETSYLPRQDLEGTPYLESGISLFSDDPESDPSEDRA\n"
        +                    + "PESARVGNIPSSTSALKVPQLKVAESAQSPAAAHTTDTAGYNAMEESVSREKPELTASTERVNKRMSMVVSG\n"
        +                    + "LTPEEFMLVYKFARKHHITLTNLITEETTHVVMKTDAEFVCERTLKYFLGIAGGKWVVSYFWVTQSIKERKM\n"
        +                    + "LNEHDFEVRGDVVNGRNHQGPKRARESQDRKIFRGLEICCYGPFTNMPTDQLEWMVQLCGASVVKELSSFTL\n"
        +                    + "GTGVHPIVVVQPDAWTEDNGFHAIGQMCEAPVVTREWVLDSVALYQCQELDTYLIPQIPHSHY\n"
        +                    + "",
        +            1, 1863);
             upSeq.createDatasetSequence();
             upSeq.setDescription("Breast cancer type 1 susceptibility protein");
        -    upSeq.addDBRef(new DBRefEntry("UNIPROT","0","P38398",null,true));
        -    
        -    upSeq_insulin=new Sequence("INS_HUMAN",
        +    upSeq.addDBRef(new DBRefEntry("UNIPROT", "0", "P38398", null, true));
        +
        +    upSeq_insulin = new Sequence("INS_HUMAN",
                     "MALWMRLLPLLALLALWGPDPAAAFVNQHLCGSHLVEALYLVCGERGFFYTPKTRREAEDLQVGQVELGGGP"
        -            + "GAGSLQPLALEGSLQKRGIVEQCCTSICSLYQLENYCN");
        +                    + "GAGSLQPLALEGSLQKRGIVEQCCTSICSLYQLENYCN");
             upSeq_insulin.createDatasetSequence();
             upSeq_insulin.setDescription("Insulin");
        -    upSeq_insulin.addDBRef(new DBRefEntry("UNIPROT","0","P01308",null,true));
        +    upSeq_insulin
        +            .addDBRef(new DBRefEntry("UNIPROT", "0", "P01308", null, true));
           }
         
        -@AfterMethod(alwaysRun = true)
        +  @AfterMethod(alwaysRun = true)
           public void tearDown() throws Exception
           {
             seq = null;
        -    upSeq=null;
        +    upSeq = null;
           }
         
           @SuppressWarnings("deprecation")
        @@ -140,9 +140,12 @@ public class StructureChooserQuerySourceTest
           public void buildPDBQueryTest()
           {
             System.out.println("seq >>>> " + seq);
        -    
        -    StructureChooserQuerySource scquery = StructureChooserQuerySource.getQuerySourceFor(new SequenceI[] { seq});
        -    AssertJUnit.assertTrue(scquery instanceof PDBStructureChooserQuerySource);
        +
        +    StructureChooserQuerySource scquery = StructureChooserQuerySource
        +            .getQuerySourceFor(new SequenceI[]
        +            { seq });
        +    AssertJUnit
        +            .assertTrue(scquery instanceof PDBStructureChooserQuerySource);
             String query = scquery.buildQuery(seq);
             AssertJUnit.assertEquals("pdb_id:1tim", query);
             seq.getAllPDBEntries().clear();
        @@ -187,12 +190,16 @@ public class StructureChooserQuerySourceTest
             System.out.println("seq >>>> " + upSeq);
             TDBeaconsFTSRestClientTest.setMock();
             PDBFTSRestClientTest.setMock();
        -    StructureChooserQuerySource scquery = StructureChooserQuerySource.getQuerySourceFor(new SequenceI[] { upSeq});
        -    // gets the lightweight proxy rather than the ThreeDBStructureChooserQuerySource
        -    AssertJUnit.assertTrue(scquery instanceof ThreeDBStructureChooserQuerySource);
        +    StructureChooserQuerySource scquery = StructureChooserQuerySource
        +            .getQuerySourceFor(new SequenceI[]
        +            { upSeq });
        +    // gets the lightweight proxy rather than the
        +    // ThreeDBStructureChooserQuerySource
        +    AssertJUnit.assertTrue(
        +            scquery instanceof ThreeDBStructureChooserQuerySource);
             String query = scquery.buildQuery(upSeq);
             AssertJUnit.assertEquals("P38398", query);
        -    
        +
             // query shouldn't change regardless of additional entries
             // because 3DBeacons requires canonical entries.
             upSeq.getAllPDBEntries().clear();
        @@ -209,67 +216,57 @@ public class StructureChooserQuerySourceTest
              *  ---> better to do a direct retrieval from uniprot to work out which is the canonical identifier..
              *  ----> need a test to check that accessions can be promoted to canonical!
              */
        -    //FIXME - need to be able to use ID to query here ?
        +    // FIXME - need to be able to use ID to query here ?
             AssertJUnit.assertEquals(null, query);
         
        -    
        -    
        -    // TODO: 
        +    // TODO:
             /**
        -     * set of sequences:
        -     * - no protein -> TDB not applicable, query PDBe only (consider RNA or DNA - specific query adapter ?)
        -     * - protein but no uniprot -> first consider trying to get uniprot refs (need a mark to say none are available)
        -     * - protein and uniprot - no canonicals -> resolve to uniprot automatically to get canonicals
        -     * - query uniprot against 3DBeacons
        -     * --> decorate experimental structures with additional data from PDBe
        -     * - query remaining against PDBe
        -     * Ranking
        -     * - 3D Beacons
        -     *  --> in memory ranking - no need to query twice
        -     *  Rank by
        -     *  - experimental > AlphaFold -> Model
        -     *  - start > end
        -     *  -> filters for 
        -     *  -> experimental only
        -     *  -> experimental plus best models for other regions
        -     *  -> "best cover" 
        -     *  -> need to be able to select correct reference (the longest one that covers all) for superposition
        +     * set of sequences: - no protein -> TDB not applicable, query PDBe only
        +     * (consider RNA or DNA - specific query adapter ?) - protein but no uniprot
        +     * -> first consider trying to get uniprot refs (need a mark to say none are
        +     * available) - protein and uniprot - no canonicals -> resolve to uniprot
        +     * automatically to get canonicals - query uniprot against 3DBeacons -->
        +     * decorate experimental structures with additional data from PDBe - query
        +     * remaining against PDBe Ranking - 3D Beacons --> in memory ranking - no
        +     * need to query twice Rank by - experimental > AlphaFold -> Model - start >
        +     * end -> filters for -> experimental only -> experimental plus best models
        +     * for other regions -> "best cover" -> need to be able to select correct
        +     * reference (the longest one that covers all) for superposition
              */
        -//    
        -//    DBRefEntry uniprotDBRef = new DBRefEntry();
        -//    uniprotDBRef.setAccessionId("P12345");
        -//    uniprotDBRef.setSource(DBRefSource.UNIPROT);
        -//    upSeq.addDBRef(uniprotDBRef);
        -//
        -//    DBRefEntry pdbDBRef = new DBRefEntry();
        -//    pdbDBRef.setAccessionId("1XYZ");
        -//    pdbDBRef.setSource(DBRefSource.PDB);
        -//    upSeq.addDBRef(pdbDBRef);
        -//
        -//    for (int x = 1; x < 5; x++)
        -//    {
        -//      DBRefEntry dbRef = new DBRefEntry();
        -//      dbRef.setAccessionId("XYZ_" + x);
        -//      seq.addDBRef(dbRef);
        -//    }
        -//    System.out.println("");
        -//    System.out.println(seq.getDBRefs());
        -//    System.out.println(query);
        -//    query = scquery.buildQuery(seq);
        -//    assertEquals(
        -//            "uniprot_accession:P12345 OR uniprot_id:P12345 OR pdb_id:1xyz",
        -//            query);
        +    //
        +    // DBRefEntry uniprotDBRef = new DBRefEntry();
        +    // uniprotDBRef.setAccessionId("P12345");
        +    // uniprotDBRef.setSource(DBRefSource.UNIPROT);
        +    // upSeq.addDBRef(uniprotDBRef);
        +    //
        +    // DBRefEntry pdbDBRef = new DBRefEntry();
        +    // pdbDBRef.setAccessionId("1XYZ");
        +    // pdbDBRef.setSource(DBRefSource.PDB);
        +    // upSeq.addDBRef(pdbDBRef);
        +    //
        +    // for (int x = 1; x < 5; x++)
        +    // {
        +    // DBRefEntry dbRef = new DBRefEntry();
        +    // dbRef.setAccessionId("XYZ_" + x);
        +    // seq.addDBRef(dbRef);
        +    // }
        +    // System.out.println("");
        +    // System.out.println(seq.getDBRefs());
        +    // System.out.println(query);
        +    // query = scquery.buildQuery(seq);
        +    // assertEquals(
        +    // "uniprot_accession:P12345 OR uniprot_id:P12345 OR pdb_id:1xyz",
        +    // query);
           }
        -  @Test(groups= {"Functional"},dataProvider = "testUpSeqs")
        +
        +  @Test(groups = { "Functional" }, dataProvider = "testUpSeqs")
           public void cascadingThreeDBandPDBQuerys(SequenceI testUpSeq)
           {
             TDBeaconsFTSRestClientTest.setMock();
             PDBFTSRestClientTest.setMock();
             ThreeDBStructureChooserQuerySource tdbquery = new ThreeDBStructureChooserQuerySource();
        -    PDBStructureChooserQuerySource pdbquery  = new PDBStructureChooserQuerySource();
        -            
        +    PDBStructureChooserQuerySource pdbquery = new PDBStructureChooserQuerySource();
         
        -    
             FTSRestResponse upResponse = null;
             FTSRestResponse pdbResponse = null;
             // TODO test available options
        @@ -277,61 +274,82 @@ public class StructureChooserQuerySourceTest
             // Best Alphafold Model
             // Best model (by confidence score)
             // Will also need to develop a more sophisticated filtering system
        -    List opts = tdbquery.getAvailableFilterOptions(StructureChooser.VIEWS_FILTER);
        +    List opts = tdbquery
        +            .getAvailableFilterOptions(StructureChooser.VIEWS_FILTER);
             FilterOption opt_singlebest = opts.get(0);
             FilterOption opt_manybest = opts.get(1);
        -    assertEquals(opt_singlebest.getValue(), ThreeDBStructureChooserQuerySource.FILTER_FIRST_BEST_COVERAGE);
        -    assertEquals(opt_manybest.getValue(), ThreeDBStructureChooserQuerySource.FILTER_TDBEACONS_COVERAGE);
        -    
        -    try {
        -      upResponse = tdbquery.fetchStructuresMetaData(testUpSeq, tdbquery.getDocFieldPrefs().getStructureSummaryFields(),  opt_singlebest, false);
        -      tdbquery.updateAvailableFilterOptions(StructureChooser.VIEWS_FILTER,opts,upResponse.getSearchSummary());
        +    assertEquals(opt_singlebest.getValue(),
        +            ThreeDBStructureChooserQuerySource.FILTER_FIRST_BEST_COVERAGE);
        +    assertEquals(opt_manybest.getValue(),
        +            ThreeDBStructureChooserQuerySource.FILTER_TDBEACONS_COVERAGE);
        +
        +    try
        +    {
        +      upResponse = tdbquery.fetchStructuresMetaData(testUpSeq,
        +              tdbquery.getDocFieldPrefs().getStructureSummaryFields(),
        +              opt_singlebest, false);
        +      tdbquery.updateAvailableFilterOptions(StructureChooser.VIEWS_FILTER,
        +              opts, upResponse.getSearchSummary());
               // test ranking without additional PDBe data
        -      FTSRestResponse firstRanked = tdbquery.selectFirstRankedQuery(testUpSeq, upResponse.getSearchSummary(), tdbquery.getDocFieldPrefs().getStructureSummaryFields(), opt_singlebest.getValue(), false);
        -      assertEquals(firstRanked.getNumberOfItemsFound(),1);
        +      FTSRestResponse firstRanked = tdbquery.selectFirstRankedQuery(
        +              testUpSeq, upResponse.getSearchSummary(),
        +              tdbquery.getDocFieldPrefs().getStructureSummaryFields(),
        +              opt_singlebest.getValue(), false);
        +      assertEquals(firstRanked.getNumberOfItemsFound(), 1);
               // many best response
        -      upResponse = tdbquery.fetchStructuresMetaData(testUpSeq, tdbquery.getDocFieldPrefs().getStructureSummaryFields(),  opt_manybest, false);
        -      assertTrue(firstRanked.getSearchSummary().size()0);
        -      pdbResponse = tdbquery.fetchStructuresMetaDataFor(pdbquery, upResponse);
        -      assertTrue(pdbResponse.getNumberOfItemsFound()>0);
        -      FTSRestResponse joinedResp = tdbquery.joinResponses(upResponse, pdbResponse);
        -      assertEquals(upResponse.getNumberOfItemsFound(),joinedResp.getNumberOfItemsFound());
        -      
        -      
        +      assertTrue(pdb_Query.trim().length() > 0);
        +      pdbResponse = tdbquery.fetchStructuresMetaDataFor(pdbquery,
        +              upResponse);
        +      assertTrue(pdbResponse.getNumberOfItemsFound() > 0);
        +      FTSRestResponse joinedResp = tdbquery.joinResponses(upResponse,
        +              pdbResponse);
        +      assertEquals(upResponse.getNumberOfItemsFound(),
        +              joinedResp.getNumberOfItemsFound());
        +
             } catch (Exception x)
             {
               x.printStackTrace();
               Assert.fail("Unexpected Exception");
             }
        -    StructureChooserQuerySource scquery = StructureChooserQuerySource.getQuerySourceFor(new SequenceI[] { testUpSeq});
        +    StructureChooserQuerySource scquery = StructureChooserQuerySource
        +            .getQuerySourceFor(new SequenceI[]
        +            { testUpSeq });
         
           }
        -  
        +
           @DataProvider(name = "testUpSeqs")
           public Object[][] testUpSeqs() throws Exception
           {
             setUp();
        -    return new Object[][] { {upSeq},{upSeq_insulin}};
        +    return new Object[][] { { upSeq }, { upSeq_insulin } };
           }
        -  
        +
           @Test(groups = { "Functional" })
           public void sanitizeSeqNameTest()
           {
             String name = "ab_cdEF|fwxyz012349";
        -    AssertJUnit.assertEquals(name, PDBStructureChooserQuerySource.sanitizeSeqName(name));
        +    AssertJUnit.assertEquals(name,
        +            PDBStructureChooserQuerySource.sanitizeSeqName(name));
         
             // remove a [nn] substring
             name = "abcde12[345]fg";
        -    AssertJUnit.assertEquals("abcde12fg", PDBStructureChooserQuerySource.sanitizeSeqName(name));
        +    AssertJUnit.assertEquals("abcde12fg",
        +            PDBStructureChooserQuerySource.sanitizeSeqName(name));
         
             // remove characters other than a-zA-Z0-9 | or _
             name = "ab[cd],.\t£$*!- \\\"@:e";
        -    AssertJUnit.assertEquals("abcde", PDBStructureChooserQuerySource.sanitizeSeqName(name));
        +    AssertJUnit.assertEquals("abcde",
        +            PDBStructureChooserQuerySource.sanitizeSeqName(name));
         
             name = "abcde12[345a]fg";
        -    AssertJUnit.assertEquals("abcde12345afg", PDBStructureChooserQuerySource.sanitizeSeqName(name));
        +    AssertJUnit.assertEquals("abcde12345afg",
        +            PDBStructureChooserQuerySource.sanitizeSeqName(name));
           }
         }
        diff --git a/test/jalview/io/AnnotatedPDBFileInputTest.java b/test/jalview/io/AnnotatedPDBFileInputTest.java
        index 8eb3796..689bd59 100644
        --- a/test/jalview/io/AnnotatedPDBFileInputTest.java
        +++ b/test/jalview/io/AnnotatedPDBFileInputTest.java
        @@ -182,10 +182,9 @@ public class AnnotatedPDBFileInputTest
                     break;
                   }
                 }
        -        assertTrue(
        -                "Couldn't find sequence associated annotation "
        -                        + aa.label
        -                        + " on the sequence it is associated with.\nSequence associated editing will fail.",
        +        assertTrue("Couldn't find sequence associated annotation "
        +                + aa.label
        +                + " on the sequence it is associated with.\nSequence associated editing will fail.",
                         found);
               }
             }
        @@ -197,8 +196,9 @@ public class AnnotatedPDBFileInputTest
           @BeforeClass(alwaysRun = true)
           public static void setUpBeforeClass() throws Exception
           {
        -    jalview.bin.Jalview.main(new String[] { "-props",
        -        "test/jalview/io/testProps.jvprops" });
        +    jalview.bin.Jalview
        +            .main(new String[]
        +            { "-props", "test/jalview/io/testProps.jvprops" });
           }
         
           /**
        @@ -218,8 +218,8 @@ public class AnnotatedPDBFileInputTest
             String inFile = "examples/1gaq.txt";
             String tfile = File.createTempFile("JalviewTest", ".jvp")
                     .getAbsolutePath();
        -    AlignFrame af = new jalview.io.FileLoader().LoadFileWaitTillLoaded(
        -            inFile, DataSourceType.FILE);
        +    AlignFrame af = new jalview.io.FileLoader()
        +            .LoadFileWaitTillLoaded(inFile, DataSourceType.FILE);
             assertTrue("Didn't read input file " + inFile, af != null);
             af.saveAlignment(tfile, FileFormat.Jalview);
             assertTrue("Failed to store as a project.",
        @@ -237,12 +237,12 @@ public class AnnotatedPDBFileInputTest
                 sq = sq.getDatasetSequence();
               }
               assertNotNull(sq.getAllPDBEntries());
        -      assertEquals("Expected only one PDB ID", 1, sq.getAllPDBEntries()
        -              .size());
        +      assertEquals("Expected only one PDB ID", 1,
        +              sq.getAllPDBEntries().size());
               for (PDBEntry pdbentry : sq.getAllPDBEntries())
               {
        -        System.err.println("PDB Entry " + pdbentry.getId() + " "
        -                + pdbentry.getFile());
        +        System.err.println(
        +                "PDB Entry " + pdbentry.getId() + " " + pdbentry.getFile());
                 boolean exists = false, found = false;
                 for (AlignmentAnnotation ana : sq.getAnnotation())
                 {
        @@ -259,8 +259,10 @@ public class AnnotatedPDBFileInputTest
                 }
                 if (exists)
                 {
        -          assertTrue("Couldn't find any annotation for " + pdbentry.getId()
        -                  + " (file handle " + pdbentry.getFile() + ")", found);
        +          assertTrue(
        +                  "Couldn't find any annotation for " + pdbentry.getId()
        +                          + " (file handle " + pdbentry.getFile() + ")",
        +                  found);
                 }
               }
             }
        diff --git a/test/jalview/io/AnnotationFileIOTest.java b/test/jalview/io/AnnotationFileIOTest.java
        index 9c4be2d..de78aa1 100644
        --- a/test/jalview/io/AnnotationFileIOTest.java
        +++ b/test/jalview/io/AnnotationFileIOTest.java
        @@ -50,28 +50,26 @@ public class AnnotationFileIOTest
             JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
           }
         
        -  static String TestFiles[][] = {
        -      { "Test example annotation import/export", "examples/uniref50.fa",
        -          "examples/testdata/example_annot_file.jva" },
        +  static String TestFiles[][] = { { "Test example annotation import/export",
        +      "examples/uniref50.fa", "examples/testdata/example_annot_file.jva" },
               { "Test multiple combine annotation statements import/export",
                   "examples/uniref50.fa",
                   "examples/testdata/test_combine_annot.jva" },
        -      {
        -          "Test multiple combine annotation statements with sequence_ref import/export",
        +      { "Test multiple combine annotation statements with sequence_ref import/export",
                   "examples/uniref50.fa", "examples/testdata/uniref50_iupred.jva" },
        -      {
        -          "Test group only annotation file parsing results in parser indicating annotation was parsed",
        +      { "Test group only annotation file parsing results in parser indicating annotation was parsed",
                   "examples/uniref50.fa", "examples/testdata/test_grpannot.jva" },
               { "Test hiding/showing of insertions on sequence_ref",
        -          "examples/uniref50.fa", "examples/testdata/uniref50_seqref.jva" } };
        +          "examples/uniref50.fa",
        +          "examples/testdata/uniref50_seqref.jva" } };
         
           @Test(groups = { "Functional" })
           public void exampleAnnotationFileIO() throws Exception
           {
             for (String[] testPair : TestFiles)
             {
        -      testAnnotationFileIO(testPair[0], new File(testPair[1]), new File(
        -              testPair[2]));
        +      testAnnotationFileIO(testPair[0], new File(testPair[1]),
        +              new File(testPair[2]));
             }
           }
         
        @@ -97,7 +95,8 @@ public class AnnotationFileIOTest
             {
               e.printStackTrace();
             }
        -    Assert.fail("Couln't read the alignment in file '" + f.toString() + "'");
        +    Assert.fail(
        +            "Couln't read the alignment in file '" + f.toString() + "'");
             return null;
           }
         
        @@ -111,8 +110,7 @@ public class AnnotationFileIOTest
            *          - label for IO class used to write and read back in the data from
            *          f
            */
        -  void testAnnotationFileIO(String testname, File f,
        -          File annotFile)
        +  void testAnnotationFileIO(String testname, File f, File annotFile)
           {
             System.out.println("Test: " + testname + "\nReading annotation file '"
                     + annotFile + "' onto : " + f);
        @@ -121,10 +119,8 @@ public class AnnotationFileIOTest
             {
               AlignmentI al = readAlignmentFile(f);
               HiddenColumns cs = new HiddenColumns();
        -      assertTrue(
        -              "Test "
        -                      + testname
        -                      + "\nAlignment was not annotated - annotation file not imported.",
        +      assertTrue("Test " + testname
        +              + "\nAlignment was not annotated - annotation file not imported.",
                       new AnnotationFile().readAnnotationFile(al, cs, af,
                               DataSourceType.FILE));
         
        @@ -135,25 +131,19 @@ public class AnnotationFileIOTest
               String anfileout = new AnnotationFile().printAnnotations(
                       al.getAlignmentAnnotation(), al.getGroups(),
                       al.getProperties(), null, al, v);
        -      assertTrue(
        -              "Test "
        -                      + testname
        -                      + "\nAlignment annotation file was not regenerated. Null string",
        +      assertTrue("Test " + testname
        +              + "\nAlignment annotation file was not regenerated. Null string",
                       anfileout != null);
        -      assertTrue(
        -              "Test "
        -                      + testname
        -                      + "\nAlignment annotation file was not regenerated. Empty string",
        +      assertTrue("Test " + testname
        +              + "\nAlignment annotation file was not regenerated. Empty string",
                       anfileout.length() > "JALVIEW_ANNOTATION".length());
         
        -      System.out.println("Output annotation file:\n" + anfileout
        -              + "\n< groups = al.getGroups();
             assertEquals(3, groups.size());
        @@ -201,7 +191,7 @@ public class AnnotationFileIOTest
             sg = groups.get(1);
             assertEquals("Group2", sg.getName());
             assertTrue(sg.contains(al.getSequenceAt(1)));
        -    
        +
             /*
              * the bug fix: a second group of the same name is also given properties
              */
        diff --git a/test/jalview/io/BioJsHTMLOutputTest.java b/test/jalview/io/BioJsHTMLOutputTest.java
        index 24e6cf7..63485a6 100644
        --- a/test/jalview/io/BioJsHTMLOutputTest.java
        +++ b/test/jalview/io/BioJsHTMLOutputTest.java
        @@ -63,8 +63,8 @@ public class BioJsHTMLOutputTest
               {
                 e.printStackTrace();
               }
        -      bjsTemplate = HTMLOutput.readFileAsString(BioJsHTMLOutput
        -              .getCurrentBJSTemplateFile());
        +      bjsTemplate = HTMLOutput.readFileAsString(
        +              BioJsHTMLOutput.getCurrentBJSTemplateFile());
               // System.out.println(bjsTemplate);
             } catch (IOException e)
             {
        @@ -74,7 +74,8 @@ public class BioJsHTMLOutputTest
           }
         
           @Test(
        -    groups = { "Functional" },
        +    groups =
        +    { "Functional" },
             expectedExceptions = NullPointerException.class)
           public void expectedNullPointerException()
           {
        @@ -94,8 +95,8 @@ public class BioJsHTMLOutputTest
             TreeMap versions = null;
             try
             {
        -      BioJsHTMLOutput
        -              .refreshVersionInfo(BioJsHTMLOutput.BJS_TEMPLATES_LOCAL_DIRECTORY);
        +      BioJsHTMLOutput.refreshVersionInfo(
        +              BioJsHTMLOutput.BJS_TEMPLATES_LOCAL_DIRECTORY);
               versions = BioJsHTMLOutput.getBioJsMSAVersions();
             } catch (URISyntaxException e)
             {
        @@ -124,16 +125,16 @@ public class BioJsHTMLOutputTest
           public void testBioJsUpdate()
           {
             String url = BioJsHTMLOutput.BJS_TEMPLATE_GIT_REPO;
        -    AssertJUnit
        -            .assertTrue("URL not reacable : " + url, urlIsReachable(url));
        +    AssertJUnit.assertTrue("URL not reacable : " + url,
        +            urlIsReachable(url));
             String response = BioJsHTMLOutput.getURLContentAsString(url);
             AssertJUnit.assertNotNull("Null response read from url!", response);
             BioJSRepositoryPojo repository = new BioJSRepositoryPojo(response);
             System.out.println(">>> description : " + repository.getDescription());
        -    System.out.println(">>> latest version : "
        -            + repository.getLatestReleaseVersion());
        -    System.out.println(">>> repo count : "
        -            + repository.getReleases().size());
        +    System.out.println(
        +            ">>> latest version : " + repository.getLatestReleaseVersion());
        +    System.out
        +            .println(">>> repo count : " + repository.getReleases().size());
             for (BioJSReleasePojo release : repository.getReleases())
             {
               System.out.println("repo type : " + release.getType());
        diff --git a/test/jalview/io/ClustalFileTest.java b/test/jalview/io/ClustalFileTest.java
        index 1da2c75..e7a80f4 100644
        --- a/test/jalview/io/ClustalFileTest.java
        +++ b/test/jalview/io/ClustalFileTest.java
        @@ -11,7 +11,7 @@ import org.testng.annotations.Test;
         
         public class ClustalFileTest
         {
        -  @Test(groups="Functional")
        +  @Test(groups = "Functional")
           public void testParse_withNumbering() throws IOException
           {
             //@formatter:off
        @@ -39,7 +39,7 @@ public class ClustalFileTest
             assertTrue(seqs[0].getSequenceAsString().endsWith("ASYKVKLI"));
           }
         
        -  @Test(groups="Functional")
        +  @Test(groups = "Functional")
           public void testParse_noNumbering() throws IOException
           {
             //@formatter:off
        diff --git a/test/jalview/io/EmblFlatFileTest.java b/test/jalview/io/EmblFlatFileTest.java
        index f36e935..e05b03b 100644
        --- a/test/jalview/io/EmblFlatFileTest.java
        +++ b/test/jalview/io/EmblFlatFileTest.java
        @@ -172,7 +172,7 @@ public class EmblFlatFileTest
                 {
                   assertEquals((ranges = map.getFromRanges()).size(), 1);
                   assertEquals(ranges.get(0)[0], 1579);
        -          assertEquals(ranges.get(0)[1], 2931);  // excludes stop 2934 
        +          assertEquals(ranges.get(0)[1], 2931); // excludes stop 2934
                   assertEquals((ranges = map.getToRanges()).size(), 1);
                   assertEquals(ranges.get(0)[0], 1);
                   assertEquals(ranges.get(0)[1], 451);
        @@ -184,7 +184,7 @@ public class EmblFlatFileTest
                 {
                   assertEquals((ranges = map.getFromRanges()).size(), 1);
                   assertEquals(ranges.get(0)[0], 2928);
        -          assertEquals(ranges.get(0)[1], 3989);  // excludes stop 3992
        +          assertEquals(ranges.get(0)[1], 3989); // excludes stop 3992
                   assertEquals((ranges = map.getToRanges()).size(), 1);
                   assertEquals(ranges.get(0)[0], 1);
                   assertEquals(ranges.get(0)[1], 354);
        @@ -230,6 +230,7 @@ public class EmblFlatFileTest
             }
             assertEquals(uniprotCount, 8);
           }
        +
           /**
            * A fairly tough test, using J03321 (circular DNA), which has 8 CDS features,
            * one of them reverse strand
        @@ -244,7 +245,7 @@ public class EmblFlatFileTest
             FileParse fp = new FileParse(dataFile, DataSourceType.FILE);
             EmblFlatFile parser = new EmblFlatFile(fp, "EmblTest");
             List seqs = parser.getSeqs();
        -    assertTrue(seqs.get(0).getSequenceAsString().indexOf("u")>-1);
        +    assertTrue(seqs.get(0).getSequenceAsString().indexOf("u") > -1);
           }
         
           @Test(groups = "Functional")
        @@ -287,7 +288,7 @@ public class EmblFlatFileTest
              * dna should have dbref to itself, and to inferred EMBLCDSPROTEIN:QHD43415.1
              */
             assertEquals(dbrefs.size(), 2);
        -    
        +
             // dbref to self
             DBRefEntry dbref = dbrefs.get(0);
             assertEquals(dbref.getSource(), "EMBLTEST");
        @@ -301,7 +302,7 @@ public class EmblFlatFileTest
             assertEquals(map.getToHighest(), 40);
             assertEquals(map.getFromRatio(), 1);
             assertEquals(map.getToRatio(), 1);
        -    
        +
             // dbref to inferred EMBLCDSPROTEIN:
             dbref = dbrefs.get(1);
             assertEquals(dbref.getSource(), "EMBLCDSPROTEIN");
        @@ -330,17 +331,17 @@ public class EmblFlatFileTest
             assertSame(exons, EmblFlatFile.adjustForProteinLength(6, exons));
         
             // patch from JAL-3725 in EmblXmlSource propagated to Flatfile
        -    // match if we assume exons include stop codon not in protein: 
        +    // match if we assume exons include stop codon not in protein:
             int[] truncated = EmblFlatFile.adjustForProteinLength(5, exons);
             assertEquals(Arrays.toString(truncated), "[11, 15, 21, 25, 31, 35]");
        -    
        +
             // truncate last exon by 6bp
             truncated = EmblFlatFile.adjustForProteinLength(4, exons);
        -    assertEquals(Arrays.toString(truncated),"[11, 15, 21, 25, 31, 32]");
        +    assertEquals(Arrays.toString(truncated), "[11, 15, 21, 25, 31, 32]");
         
             // remove last exon and truncate preceding by 1bp (so 3bp in total)
             truncated = EmblFlatFile.adjustForProteinLength(3, exons);
        -    assertEquals(Arrays.toString(truncated),"[11, 15, 21, 24]");
        +    assertEquals(Arrays.toString(truncated), "[11, 15, 21, 24]");
         
             // exact removal of exon case:
             exons = new int[] { 11, 15, 21, 27, 33, 38 }; // 18 bp
        @@ -356,8 +357,12 @@ public class EmblFlatFileTest
           public void testRemoveQuotes()
           {
             assertNull(EmblFlatFile.removeQuotes(null));
        -    assertEquals(EmblFlatFile.removeQuotes("No quotes here"), "No quotes here");
        -    assertEquals(EmblFlatFile.removeQuotes("\"Enclosing quotes\""), "Enclosing quotes");
        -    assertEquals(EmblFlatFile.removeQuotes("\"Escaped \"\"quotes\"\" example\""), "Escaped \"quotes\" example");
        +    assertEquals(EmblFlatFile.removeQuotes("No quotes here"),
        +            "No quotes here");
        +    assertEquals(EmblFlatFile.removeQuotes("\"Enclosing quotes\""),
        +            "Enclosing quotes");
        +    assertEquals(
        +            EmblFlatFile.removeQuotes("\"Escaped \"\"quotes\"\" example\""),
        +            "Escaped \"quotes\" example");
           }
         }
        diff --git a/test/jalview/io/FeaturesFileTest.java b/test/jalview/io/FeaturesFileTest.java
        index b753e94..95ac679 100644
        --- a/test/jalview/io/FeaturesFileTest.java
        +++ b/test/jalview/io/FeaturesFileTest.java
        @@ -93,8 +93,9 @@ public class FeaturesFileTest
                     .getFeatureColours();
             FeaturesFile featuresFile = new FeaturesFile(
                     "examples/exampleFeatures.txt", DataSourceType.FILE);
        -    assertTrue("Test " + "Features file test"
        -            + "\nFailed to parse features file.",
        +    assertTrue(
        +            "Test " + "Features file test"
        +                    + "\nFailed to parse features file.",
                     featuresFile.parse(al.getDataset(), colours, true));
         
             /*
        @@ -204,8 +205,7 @@ public class FeaturesFileTest
             Map colours = af.getFeatureRenderer()
                     .getFeatureColours();
             // GFF2 uses space as name/value separator in column 9
        -    String gffData = "METAL\tcc9900\n"
        -            + "GFF\n"
        +    String gffData = "METAL\tcc9900\n" + "GFF\n"
                     + "FER_CAPAA\tuniprot\tMETAL\t44\t45\t4.0\t.\t.\tNote Iron-sulfur; Note 2Fe-2S\n"
                     + "FER1_SOLLC\tuniprot\tPfam\t55\t130\t2.0\t.\t.";
             FeaturesFile featuresFile = new FeaturesFile(gffData,
        @@ -270,7 +270,8 @@ public class FeaturesFileTest
             Map colours = af.getFeatureRenderer()
                     .getFeatureColours();
             // GFF3 uses '=' separator for name/value pairs in column 9
        -    // comma (%2C) equals (%3D) or semi-colon (%3B) should be url-escaped in values
        +    // comma (%2C) equals (%3D) or semi-colon (%3B) should be url-escaped in
        +    // values
             String gffData = "##gff-version 3\n"
                     + "FER_CAPAA\tuniprot\tMETAL\t39\t39\t0.0\t.\t.\t"
                     + "Note=Iron-sulfur (2Fe-2S);Note=another note,and another;evidence=ECO%3B0000255%2CPROSITE%3DProRule:PRU00465;"
        @@ -301,7 +302,8 @@ public class FeaturesFileTest
             assertEquals("21", sf.getValueAsString("CSQ", "AF"));
             assertEquals("benign,possibly_damaging",
                     sf.getValueAsString("CSQ", "POLYPHEN"));
        -    assertEquals("Benign=good", sf.getValueAsString("CSQ", "clin_sig")); // url decoded
        +    assertEquals("Benign=good", sf.getValueAsString("CSQ", "clin_sig")); // url
        +                                                                         // decoded
             // todo change STRAND and !Phase into fields of SequenceFeature instead
             assertEquals(".", sf.otherDetails.get("STRAND"));
             assertEquals(0, sf.getStrand());
        @@ -374,12 +376,10 @@ public class FeaturesFileTest
             SequenceI seq2 = dataset.findName("seq2");
             assertNotNull(seq1);
             assertNotNull(seq2);
        -    assertFalse(
        -            "Failed to replace dummy seq1 with real sequence",
        +    assertFalse("Failed to replace dummy seq1 with real sequence",
                     seq1 instanceof SequenceDummy
                             && ((SequenceDummy) seq1).isDummy());
        -    assertFalse(
        -            "Failed to replace dummy seq2 with real sequence",
        +    assertFalse("Failed to replace dummy seq2 with real sequence",
                     seq2 instanceof SequenceDummy
                             && ((SequenceDummy) seq2).isDummy());
             String placeholderseq = new SequenceDummy("foo").getSequenceAsString();
        @@ -388,16 +388,13 @@ public class FeaturesFileTest
             assertFalse("dummy replacement buggy for seq2",
                     placeholderseq.equals(seq2.getSequenceAsString()));
             assertNotNull("No features added to seq1", seq1.getSequenceFeatures());
        -    assertEquals("Wrong number of features", 3, seq1.getSequenceFeatures()
        -            .size());
        +    assertEquals("Wrong number of features", 3,
        +            seq1.getSequenceFeatures().size());
             assertTrue(seq2.getSequenceFeatures().isEmpty());
        -    assertEquals(
        -            "Wrong number of features",
        -            0,
        -            seq2.getSequenceFeatures() == null ? 0 : seq2
        -                    .getSequenceFeatures().size());
        -    assertTrue(
        -            "Expected at least one CDNA/Protein mapping for seq1",
        +    assertEquals("Wrong number of features", 0,
        +            seq2.getSequenceFeatures() == null ? 0
        +                    : seq2.getSequenceFeatures().size());
        +    assertTrue("Expected at least one CDNA/Protein mapping for seq1",
                     dataset.getCodonFrame(seq1) != null
                             && dataset.getCodonFrame(seq1).size() > 0);
         
        @@ -419,7 +416,7 @@ public class FeaturesFileTest
             AlignmentI dataset = new Alignment(new SequenceI[] {});
             FeaturesFile ffile = new FeaturesFile(simpleGffFile,
                     DataSourceType.FILE);
        -  
        +
             boolean parseResult = ffile.parse(dataset, null, false, false);
             assertTrue("return result should be true", parseResult);
             checkDatasetfromSimpleGff3(dataset);
        @@ -428,8 +425,8 @@ public class FeaturesFileTest
           @Test(groups = { "Functional" })
           public void simpleGff3FileLoader() throws IOException
           {
        -    AlignFrame af = new FileLoader(false).LoadFileWaitTillLoaded(
        -            simpleGffFile, DataSourceType.FILE);
        +    AlignFrame af = new FileLoader(false)
        +            .LoadFileWaitTillLoaded(simpleGffFile, DataSourceType.FILE);
             assertTrue(
                     "Didn't read the alignment into an alignframe from Gff3 File",
                     af != null);
        @@ -442,7 +439,7 @@ public class FeaturesFileTest
             AlignmentI dataset = new Alignment(new SequenceI[] {});
             FeaturesFile ffile = new FeaturesFile(simpleGffFile,
                     DataSourceType.FILE);
        -  
        +
             boolean parseResult = ffile.parse(dataset, null, false, true);
             assertTrue("return result (relaxedID matching) should be true",
                     parseResult);
        @@ -459,8 +456,7 @@ public class FeaturesFileTest
                     .getFeatureColours();
             String features = "METAL\tcc9900\n"
                     + "GAMMA-TURN\tred|0,255,255|20.0|95.0|below|66.0\n"
        -            + "Pfam\tred\n"
        -            + "STARTGROUP\tuniprot\n"
        +            + "Pfam\tred\n" + "STARTGROUP\tuniprot\n"
                     + "Cath\tFER_CAPAA\t-1\t0\t0\tDomain\n" // non-positional feature
                     + "Iron\tFER_CAPAA\t-1\t39\t39\tMETAL\n"
                     + "Turn\tFER_CAPAA\t-1\t36\t38\tGAMMA-TURN\n"
        @@ -475,15 +471,15 @@ public class FeaturesFileTest
              * empty feature group to check handled correctly
              */
             SequenceI seq = al.getSequenceAt(1); // FER_CAPAN
        -    seq.addSequenceFeature(new SequenceFeature("Pfam", "desc1", 0, 0, 1.3f,
        -            null));
        -    seq.addSequenceFeature(new SequenceFeature("Pfam", "desc2", 4, 9,
        -            Float.NaN, null));
        +    seq.addSequenceFeature(
        +            new SequenceFeature("Pfam", "desc1", 0, 0, 1.3f, null));
        +    seq.addSequenceFeature(
        +            new SequenceFeature("Pfam", "desc2", 4, 9, Float.NaN, null));
             seq = al.getSequenceAt(2); // FER1_SOLLC
        -    seq.addSequenceFeature(new SequenceFeature("Pfam", "desc3", 0, 0,
        -            Float.NaN, ""));
        -    seq.addSequenceFeature(new SequenceFeature("Pfam", "desc4", 5, 8,
        -            -2.6f, ""));
        +    seq.addSequenceFeature(
        +            new SequenceFeature("Pfam", "desc3", 0, 0, Float.NaN, ""));
        +    seq.addSequenceFeature(
        +            new SequenceFeature("Pfam", "desc4", 5, 8, -2.6f, ""));
         
             /*
              * first with no features displayed, exclude non-positional features
        @@ -531,8 +527,7 @@ public class FeaturesFileTest
             /*
              * features are output within group, ordered by sequence and type
              */
        -    expected = "METAL\tcc9900\n"
        -            + "Pfam\tff0000\n"
        +    expected = "METAL\tcc9900\n" + "Pfam\tff0000\n"
                     + "GAMMA-TURN\tscore|ff0000|00ffff|noValueMin|20.0|95.0|below|66.0\n"
                     + "\nSTARTGROUP\tuniprot\n"
                     + "Iron\tFER_CAPAA\t-1\t39\t39\tMETAL\t0.0\n"
        @@ -590,8 +585,8 @@ public class FeaturesFileTest
                     fr, false, false);
             String gffHeader = "##gff-version 2\n";
             assertEquals(gffHeader, exported);
        -    exported = featuresFile.printGffFormat(al.getSequencesArray(), fr,
        -            true, false);
        +    exported = featuresFile.printGffFormat(al.getSequencesArray(), fr, true,
        +            false);
             assertEquals(gffHeader, exported);
         
             /*
        @@ -601,10 +596,8 @@ public class FeaturesFileTest
                     new SequenceFeature("Domain", "Cath", 0, 0, 0f, "Uniprot"));
             al.getSequenceAt(0).addSequenceFeature(
                     new SequenceFeature("METAL", "Cath", 39, 39, 1.2f, null));
        -    al.getSequenceAt(1)
        -            .addSequenceFeature(
        -                    new SequenceFeature("GAMMA-TURN", "Turn", 36, 38, 2.1f,
        -                            "s3dm"));
        +    al.getSequenceAt(1).addSequenceFeature(new SequenceFeature("GAMMA-TURN",
        +            "Turn", 36, 38, 2.1f, "s3dm"));
             SequenceFeature sf = new SequenceFeature("Pfam", "", 20, 20, 0f,
                     "Uniprot");
             sf.setStrand("+");
        @@ -641,8 +634,8 @@ public class FeaturesFileTest
              */
             fr.setGroupVisibility("Uniprot", true);
             fr.setGroupVisibility("s3dm", false);
        -    exported = featuresFile.printGffFormat(al.getSequencesArray(), fr,
        -            true, false);
        +    exported = featuresFile.printGffFormat(al.getSequencesArray(), fr, true,
        +            false);
             String expected = gffHeader
                     + "FER_CAPAA\tUniprot\tDomain\t0\t0\t0.0\t.\t.\n";
             assertEquals(expected, exported);
        @@ -677,11 +670,10 @@ public class FeaturesFileTest
             exported = featuresFile.printGffFormat(al.getSequencesArray(), fr,
                     false, false);
             // Pfam feature columns include strand(+), phase(2), attributes
        -    expected = gffHeader
        -            + "FER_CAPAA\tCath\tMETAL\t39\t39\t1.2\t.\t.\n"
        -            // CSQ output as CSQ=att1=value1,att2=value2
        -            // note all commas are encoded here which is wrong - it should be
        -            // SIFT=benign,mostly benign,cloudy%2C with meatballs
        +    expected = gffHeader + "FER_CAPAA\tCath\tMETAL\t39\t39\t1.2\t.\t.\n"
        +    // CSQ output as CSQ=att1=value1,att2=value2
        +    // note all commas are encoded here which is wrong - it should be
        +    // SIFT=benign,mostly benign,cloudy%2C with meatballs
                     + "FER_CAPAN\tUniprot\tPfam\t20\t20\t0.0\t+\t2\tx=y;black=white;"
                     + "CSQ=SIFT=benign%2Cmostly benign%2Ccloudy%2C with meatballs,consequence=missense_variant\n"
                     + "FER_CAPAN\ts3dm\tGAMMA-TURN\t36\t38\t2.1\t.\t.\n";
        @@ -785,7 +777,7 @@ public class FeaturesFileTest
             sf2.setValue("clin_sig", "Benign");
             sf2.setValue("AF", "46");
             al.getSequenceAt(0).addSequenceFeature(sf2);
        -  
        +
             FeaturesFile featuresFile = new FeaturesFile();
             FeatureRenderer fr = af.alignPanel.getFeatureRenderer();
             final String gffHeader = "##gff-version 2\n";
        @@ -860,23 +852,22 @@ public class FeaturesFileTest
             sf2.setValue("clin_sig", "Benign");
             sf2.setValue("AF", "46");
             al.getSequenceAt(0).addSequenceFeature(sf2);
        -  
        +
             FeaturesFile featuresFile = new FeaturesFile();
             FeatureRenderer fr = af.alignPanel.getFeatureRenderer();
             fr.findAllFeatures(true);
        -  
        +
             fr.setVisible("METAL");
             fr.setColour("METAL", new FeatureColour(Color.PINK));
        -    String exported = featuresFile.printJalviewFormat(
        -            al.getSequencesArray(),
        -            fr, false, false);
        +    String exported = featuresFile
        +            .printJalviewFormat(al.getSequencesArray(), fr, false, false);
             String expected = "METAL\tffafaf\n\nSTARTGROUP\tgrp1\n"
                     + "Cath\tFER_CAPAA\t-1\t39\t39\tMETAL\t1.2\n"
                     + "ENDGROUP\tgrp1\n\nSTARTGROUP\tgrp2\n"
                     + "Cath\tFER_CAPAA\t-1\t41\t41\tMETAL\t0.6\n"
                     + "ENDGROUP\tgrp2\n";
             assertEquals(expected, exported);
        -  
        +
             /*
              * now threshold to Score > 1.1 - should exclude sf2
              * (and there should be no empty STARTGROUP/ENDGROUP output)
        @@ -893,7 +884,7 @@ public class FeaturesFileTest
                     + "Cath\tFER_CAPAA\t-1\t39\t39\tMETAL\t1.2\n"
                     + "ENDGROUP\tgrp1\n";
             assertEquals(expected, exported);
        -  
        +
             /*
              * remove threshold and check sf2 is exported
              */
        @@ -907,7 +898,7 @@ public class FeaturesFileTest
                     + "Cath\tFER_CAPAA\t-1\t41\t41\tMETAL\t0.6\n"
                     + "ENDGROUP\tgrp2\n";
             assertEquals(expected, exported);
        -  
        +
             /*
              * filter on (clin_sig contains Benign) - should include sf2 and exclude sf1
              */
        diff --git a/test/jalview/io/FileFormatsTest.java b/test/jalview/io/FileFormatsTest.java
        index 3d25bf1..3ab3653 100644
        --- a/test/jalview/io/FileFormatsTest.java
        +++ b/test/jalview/io/FileFormatsTest.java
        @@ -105,8 +105,10 @@ public class FileFormatsTest
             for (FileFormatI ff : FileFormat.values())
             {
               assertSame(ff, formats.forName(ff.getName()));
        -      assertSame(ff, formats.forName(ff.getName().toUpperCase(Locale.ROOT)));
        -      assertSame(ff, formats.forName(ff.getName().toLowerCase(Locale.ROOT)));
        +      assertSame(ff,
        +              formats.forName(ff.getName().toUpperCase(Locale.ROOT)));
        +      assertSame(ff,
        +              formats.forName(ff.getName().toLowerCase(Locale.ROOT)));
             }
             assertNull(formats.forName(null));
             assertNull(formats.forName("rubbish"));
        diff --git a/test/jalview/io/FileIOTester.java b/test/jalview/io/FileIOTester.java
        index b693d51..48aae6b 100644
        --- a/test/jalview/io/FileIOTester.java
        +++ b/test/jalview/io/FileIOTester.java
        @@ -138,23 +138,23 @@ public class FileIOTester
           public void testIsGzipInputStream() throws IOException
           {
             InputStream is = new FileInputStream(ALIGN_FILE);
        -    
        +
             /*
              * first try fails - FileInputStream does not support mark/reset
              */
             assertFalse(FileParse.isGzipStream(is));
        -    
        +
             /*
              * wrap in a BufferedInputStream and try again
              */
             is = new BufferedInputStream(is, 16);
             assertTrue(FileParse.isGzipStream(is));
        -    
        +
             /*
              * check recognition of non-gzipped input
              */
             assertFalse(FileParse.isGzipStream(new BufferedInputStream(
        -            new ByteArrayInputStream("NOT A GZIP".getBytes()))));    
        +            new ByteArrayInputStream("NOT A GZIP".getBytes()))));
           }
         
           @Test(groups = { "Functional" })
        diff --git a/test/jalview/io/FormatAdapterTest.java b/test/jalview/io/FormatAdapterTest.java
        index b500266..8f3ad2f 100644
        --- a/test/jalview/io/FormatAdapterTest.java
        +++ b/test/jalview/io/FormatAdapterTest.java
        @@ -85,15 +85,14 @@ public class FormatAdapterTest
                  * special case: MSF always uses '.' as gap character
                  */
                 sequenceString = adjustForGapTreatment(sequenceString, gap, format);
        -        assertEquals(
        -                String.format("Sequence %d: %s", i, seqs[i].getName()),
        +        assertEquals(String.format("Sequence %d: %s", i, seqs[i].getName()),
                         seqs[i].getSequenceAsString(), sequenceString);
                 i++;
               }
             } catch (IOException e)
             {
        -      fail(String
        -              .format("Format %s failed with %s", format, e.getMessage()));
        +      fail(String.format("Format %s failed with %s", format,
        +              e.getMessage()));
             }
           }
         
        diff --git a/test/jalview/io/JSONFileTest.java b/test/jalview/io/JSONFileTest.java
        index 2d5f7a2..0fe721a 100644
        --- a/test/jalview/io/JSONFileTest.java
        +++ b/test/jalview/io/JSONFileTest.java
        @@ -148,11 +148,10 @@ public class JSONFileTest
             grpSeqs.add(seqs[2]);
             grpSeqs.add(seqs[3]);
             grpSeqs.add(seqs[4]);
        -    SequenceGroup seqGrp = new SequenceGroup(grpSeqs,
        -            "JGroup:1883305585",
        +    SequenceGroup seqGrp = new SequenceGroup(grpSeqs, "JGroup:1883305585",
                     null, true, true, false, 21, 29);
        -    ColourSchemeI scheme = ColourSchemeMapper.getJalviewColourScheme(
        -            "zappo", seqGrp);
        +    ColourSchemeI scheme = ColourSchemeMapper
        +            .getJalviewColourScheme("zappo", seqGrp);
             seqGrp.cs.setColourScheme(scheme);
             seqGrp.setShowNonconserved(false);
             seqGrp.setDescription(null);
        @@ -223,12 +222,13 @@ public class JSONFileTest
                       AlignFrame.DEFAULT_HEIGHT);
               af.getViewport().setShowSequenceFeatures(jf.isShowSeqFeatures());
               String colourSchemeName = jf.getGlobalColourScheme();
        -      ColourSchemeI cs = ColourSchemeMapper.getJalviewColourScheme(
        -              colourSchemeName, alignment);
        +      ColourSchemeI cs = ColourSchemeMapper
        +              .getJalviewColourScheme(colourSchemeName, alignment);
               af.changeColour(cs);
               af.getViewport().setFeaturesDisplayed(jf.getDisplayedFeatures());
         
        -      formatAdapter = new AppletFormatAdapter(af.alignPanel, exportSettings);
        +      formatAdapter = new AppletFormatAdapter(af.alignPanel,
        +              exportSettings);
               String jsonOutput = formatAdapter.formatSequences(FileFormat.Json,
                       af.alignPanel.getAlignment(), false);
         
        @@ -345,11 +345,11 @@ public class JSONFileTest
               SequenceGroup sg = new SequenceGroup();
               sg.addSequence(_alignment.getSequenceAt(0), false);
               sg.setColourScheme(null);
        -      ColourSchemeI cs = ColourSchemeMapper.getJalviewColourScheme(
        -              ResidueColourScheme.NONE, _alignment);
        +      ColourSchemeI cs = ColourSchemeMapper
        +              .getJalviewColourScheme(ResidueColourScheme.NONE, _alignment);
               alignFrame.changeColour(cs);
        -      alignFrame.getViewport().setFeaturesDisplayed(
        -              bioJsonFile.getDisplayedFeatures());
        +      alignFrame.getViewport()
        +              .setFeaturesDisplayed(bioJsonFile.getDisplayedFeatures());
               formatAdapter = new AppletFormatAdapter(alignFrame.alignPanel,
                       exportSettings);
               // export BioJSON string
        @@ -399,8 +399,9 @@ public class JSONFileTest
             for (AlignmentAnnotation annot : testAlignment.getAlignmentAnnotation())
             {
               AlignmentAnnotation expectedAnnot = expectedAnnots.get(annot.label);
        -      AssertJUnit.assertTrue("Failed AlignmentAnnotation Test for >>> "
        -              + annot.label, isAnnotationMatched(expectedAnnot, annot));
        +      AssertJUnit.assertTrue(
        +              "Failed AlignmentAnnotation Test for >>> " + annot.label,
        +              isAnnotationMatched(expectedAnnot, annot));
               passedCount++;
             }
             AssertJUnit.assertEquals("Some Sequences did not pass the test",
        @@ -437,8 +438,8 @@ public class JSONFileTest
             System.out.println("Testing >>> " + actualSeq.getName());
         
             if (expectedSeq.getName().equals(actualSeq.getName())
        -            && expectedSeq.getSequenceAsString().equals(
        -                    actualSeq.getSequenceAsString())
        +            && expectedSeq.getSequenceAsString()
        +                    .equals(actualSeq.getSequenceAsString())
                     && expectedSeq.getStart() == actualSeq.getStart()
                     && expectedSeq.getEnd() == actualSeq.getEnd()
                     && featuresMatched(expectedSeq, actualSeq))
        @@ -462,15 +463,15 @@ public class JSONFileTest
                     + actualGrp.getIgnoreGapsConsensus());
             System.out.println(expectedGrp.getSequences().size() + " | "
                     + actualGrp.getSequences().size());
        -    System.out.println(expectedGrp.getStartRes() + " | "
        -            + actualGrp.getStartRes());
        -    System.out.println(expectedGrp.getEndRes() + " | "
        -            + actualGrp.getEndRes());
        +    System.out.println(
        +            expectedGrp.getStartRes() + " | " + actualGrp.getStartRes());
        +    System.out.println(
        +            expectedGrp.getEndRes() + " | " + actualGrp.getEndRes());
             System.out.println(expectedGrp.cs.getColourScheme() + " | "
                     + actualGrp.cs.getColourScheme());
         
        -    boolean colourSchemeMatches = (expectedGrp.cs.getColourScheme() == null && actualGrp.cs
        -            .getColourScheme() == null)
        +    boolean colourSchemeMatches = (expectedGrp.cs.getColourScheme() == null
        +            && actualGrp.cs.getColourScheme() == null)
                     || expectedGrp.cs.getColourScheme().getClass()
                             .equals(actualGrp.cs.getColourScheme().getClass());
             if (expectedGrp.getName().equals(actualGrp.getName())
        @@ -479,8 +480,8 @@ public class JSONFileTest
                     && expectedGrp.getIgnoreGapsConsensus() == actualGrp
                             .getIgnoreGapsConsensus()
                     && colourSchemeMatches
        -            && expectedGrp.getSequences().size() == actualGrp
        -                    .getSequences().size()
        +            && expectedGrp.getSequences().size() == actualGrp.getSequences()
        +                    .size()
                     && expectedGrp.getStartRes() == actualGrp.getStartRes()
                     && expectedGrp.getEndRes() == actualGrp.getEndRes())
             {
        @@ -522,8 +523,8 @@ public class JSONFileTest
                 */
                 if (!in.equals(out))
                 {
        -          System.err.println("Mismatch of " + in.toString() + " "
        -                  + out.toString());
        +          System.err.println(
        +                  "Mismatch of " + in.toString() + " " + out.toString());
                   return false;
                 }
                 /*
        @@ -558,8 +559,8 @@ public class JSONFileTest
             {
               if (m1 != null || m2 != null)
               {
        -        System.err
        -                .println("only one SequenceFeature.otherDetails is not null");
        +        System.err.println(
        +                "only one SequenceFeature.otherDetails is not null");
                 return false;
               }
               else
        @@ -579,8 +580,9 @@ public class JSONFileTest
                 System.err.println(key + " in only one otherDetails");
                 return false;
               }
        -      if (m1.get(key) == null && m2.get(key) != null || m1.get(key) != null
        -              && m2.get(key) == null || !m1.get(key).equals(m2.get(key)))
        +      if (m1.get(key) == null && m2.get(key) != null
        +              || m1.get(key) != null && m2.get(key) == null
        +              || !m1.get(key).equals(m2.get(key)))
               {
                 System.err.println(key + " values in otherDetails don't match");
                 return false;
        @@ -600,8 +602,7 @@ public class JSONFileTest
             AlignmentI copy = new Alignment(testAlignment);
             SequenceGroup sg = testAlignment.getGroups().get(0);
             SequenceGroup copySg = new SequenceGroup(new ArrayList(),
        -            sg.getName(),
        -            null, sg.getDisplayBoxes(), sg.getDisplayText(),
        +            sg.getName(), null, sg.getDisplayBoxes(), sg.getDisplayText(),
                     sg.getColourText(), sg.getStartRes(), sg.getEndRes());
             for (SequenceI seq : sg.getSequences())
             {
        @@ -613,8 +614,8 @@ public class JSONFileTest
             AlignFrame af = new AlignFrame(copy, copy.getWidth(), copy.getHeight());
             AppletFormatAdapter formatAdapter = new AppletFormatAdapter(
                     af.alignPanel);
        -    String jsonOutput = formatAdapter.formatSequences(FileFormat.Json,
        -            copy, false);
        +    String jsonOutput = formatAdapter.formatSequences(FileFormat.Json, copy,
        +            false);
             formatAdapter = new AppletFormatAdapter();
             AlignmentI newAlignment = formatAdapter.readFile(jsonOutput,
                     DataSourceType.PASTE, FileFormat.Json);
        diff --git a/test/jalview/io/Jalview2xmlBase.java b/test/jalview/io/Jalview2xmlBase.java
        index fbdd782..dde23e6 100644
        --- a/test/jalview/io/Jalview2xmlBase.java
        +++ b/test/jalview/io/Jalview2xmlBase.java
        @@ -58,7 +58,8 @@ public class Jalview2xmlBase
              * set news feed last read to a future time to ensure no
              * 'unread' news item is displayed
              */
        -    Date oneHourFromNow = new Date(System.currentTimeMillis() + 3600 * 1000);
        +    Date oneHourFromNow = new Date(
        +            System.currentTimeMillis() + 3600 * 1000);
             Cache.setDateProperty("JALVIEW_NEWS_RSS_LASTMODIFIED", oneHourFromNow);
         
             Jalview.main(new String[] {});
        diff --git a/test/jalview/io/JalviewExportPropertiesTests.java b/test/jalview/io/JalviewExportPropertiesTests.java
        index 06d177d..1d138c0 100644
        --- a/test/jalview/io/JalviewExportPropertiesTests.java
        +++ b/test/jalview/io/JalviewExportPropertiesTests.java
        @@ -53,8 +53,9 @@ public class JalviewExportPropertiesTests
           @BeforeClass(alwaysRun = true)
           public static void setUpBeforeClass() throws Exception
           {
        -    jalview.bin.Jalview.main(new String[] { "-props",
        -        "test/jalview/io/testProps.jvprops" });
        +    jalview.bin.Jalview
        +            .main(new String[]
        +            { "-props", "test/jalview/io/testProps.jvprops" });
           }
         
           /**
        @@ -85,8 +86,8 @@ public class JalviewExportPropertiesTests
             sg.setStartRes(1);
             sg.setEndRes(7);
             af.getViewport().setSelectionGroup(sg);
        -    String fseqs = new FormatAdapter(af.alignPanel).formatSequences(
        -            FileFormat.Fasta, af.alignPanel, true);
        +    String fseqs = new FormatAdapter(af.alignPanel)
        +            .formatSequences(FileFormat.Fasta, af.alignPanel, true);
             assertTrue("Couldn't find '.' in the exported region\n" + fseqs,
                     fseqs.indexOf(".") > -1);
           }
        diff --git a/test/jalview/io/JalviewFileViewTest.java b/test/jalview/io/JalviewFileViewTest.java
        index aa124d9..6436da6 100644
        --- a/test/jalview/io/JalviewFileViewTest.java
        +++ b/test/jalview/io/JalviewFileViewTest.java
        @@ -40,12 +40,12 @@ public class JalviewFileViewTest
           public void testGetExtension()
           {
             assertEquals(JalviewFileView.getExtension(new File("text.txt")), "txt");
        -    assertEquals(JalviewFileView.getExtension(new File(
        -            "/a/longer/file/path/text.png.TXT")), "txt");
        -    assertNull(JalviewFileView.getExtension(new File(
        -            "/a/longer/file/path/text.")));
        -    assertNull(JalviewFileView.getExtension(new File(
        -            "/a/longer/file/path/text")));
        +    assertEquals(JalviewFileView.getExtension(
        +            new File("/a/longer/file/path/text.png.TXT")), "txt");
        +    assertNull(JalviewFileView
        +            .getExtension(new File("/a/longer/file/path/text.")));
        +    assertNull(JalviewFileView
        +            .getExtension(new File("/a/longer/file/path/text")));
           }
         
           @Test(groups = "Functional")
        diff --git a/test/jalview/io/NewickFileTests.java b/test/jalview/io/NewickFileTests.java
        index a92f5fb..beedb11 100644
        --- a/test/jalview/io/NewickFileTests.java
        +++ b/test/jalview/io/NewickFileTests.java
        @@ -63,18 +63,17 @@ public class NewickFileTests
           @Parameters
           public static Collection data()
           {
        -    return Arrays
        -            .asList(new Object[][] {
        -
        -                new String[] {
        -                    "Simple uniref50 newick",
        -                    "(((FER_BRANA:128.0,FER3_RAPSA:128.0):50.75,FER_CAPAA:178.75):121.94443,(Q93Z60_ARATH:271.45456,((O80429_MAIZE:183.0,FER1_MAIZE:183.0):30.5,((Q7XA98_TRIPR:90.0,FER1_PEA:90.0):83.32143,(((FER2_ARATH:64.0,FER1_ARATH:64.0):94.375,(FER1_SPIOL:124.5,FER1_MESCR:124.5):33.875):6.4166718,((Q93XJ9_SOLTU:33.5,FER1_SOLLC:33.5):49.0,FER_CAPAN:82.5):82.29167):8.529755):40.178574):57.95456):29.239868);" },
        -                new String[] {
        -                    "Tree with quotes",
        -                    "('Syn_PROSU-1_IIh_3d(CA4)|CK_Syn_PROSU-1_1907':1.0638313,'Syn_MINOS11_5.3_3d(CA4)|CK_Syn_MINOS11_750':1.063831);" },
        -                new String[] {
        -                    "Tree with double escaped comma in node",
        -                    "('Syn_PROSU-1_IIh_3d(CA4)|CK_Syn_PROSU-1_1907':1.0638313,'Syn_MINOS11_5.3_3d(CA4)''|CK_Syn_MINOS11_750':1.063831);" } });
        +    return Arrays.asList(new Object[][] {
        +
        +        new String[]
        +        { "Simple uniref50 newick",
        +            "(((FER_BRANA:128.0,FER3_RAPSA:128.0):50.75,FER_CAPAA:178.75):121.94443,(Q93Z60_ARATH:271.45456,((O80429_MAIZE:183.0,FER1_MAIZE:183.0):30.5,((Q7XA98_TRIPR:90.0,FER1_PEA:90.0):83.32143,(((FER2_ARATH:64.0,FER1_ARATH:64.0):94.375,(FER1_SPIOL:124.5,FER1_MESCR:124.5):33.875):6.4166718,((Q93XJ9_SOLTU:33.5,FER1_SOLLC:33.5):49.0,FER_CAPAN:82.5):82.29167):8.529755):40.178574):57.95456):29.239868);" },
        +        new String[]
        +        { "Tree with quotes",
        +            "('Syn_PROSU-1_IIh_3d(CA4)|CK_Syn_PROSU-1_1907':1.0638313,'Syn_MINOS11_5.3_3d(CA4)|CK_Syn_MINOS11_750':1.063831);" },
        +        new String[]
        +        { "Tree with double escaped comma in node",
        +            "('Syn_PROSU-1_IIh_3d(CA4)|CK_Syn_PROSU-1_1907':1.0638313,'Syn_MINOS11_5.3_3d(CA4)''|CK_Syn_MINOS11_750':1.063831);" } });
           };
         
           String name, testTree;
        @@ -125,8 +124,8 @@ public class NewickFileTests
               stage = "Compare original and generated tree" + treename;
         
               Vector oseqs, nseqs;
        -      oseqs = new TreeModel(new SequenceI[0], null, nf).findLeaves(nf
        -              .getTree());
        +      oseqs = new TreeModel(new SequenceI[0], null, nf)
        +              .findLeaves(nf.getTree());
               AssertJUnit.assertTrue(stage + "No nodes in original tree.",
                       oseqs.size() > 0);
               SequenceI[] olsqs = new SequenceI[oseqs.size()];
        @@ -135,8 +134,7 @@ public class NewickFileTests
                 olsqs[i] = (SequenceI) oseqs.get(i).element();
               }
               nseqs = new TreeModel(new SequenceI[0], null, nf_regen)
        -              .findLeaves(nf_regen
        -              .getTree());
        +              .findLeaves(nf_regen.getTree());
               AssertJUnit.assertTrue(stage + "No nodes in regerated tree.",
                       nseqs.size() > 0);
               SequenceI[] nsqs = new SequenceI[nseqs.size()];
        @@ -144,12 +142,12 @@ public class NewickFileTests
               {
                 nsqs[i] = (SequenceI) nseqs.get(i).element();
               }
        -      AssertJUnit.assertTrue(stage
        -              + " Different number of leaves (original " + olsqs.length
        -              + " and regen " + nsqs.length + ")",
        +      AssertJUnit.assertTrue(
        +              stage + " Different number of leaves (original "
        +                      + olsqs.length + " and regen " + nsqs.length + ")",
                       olsqs.length == nsqs.length);
        -      SequenceIdMatcher omatcher = new SequenceIdMatcher(olsqs), nmatcher = new SequenceIdMatcher(
        -              nsqs);
        +      SequenceIdMatcher omatcher = new SequenceIdMatcher(olsqs),
        +              nmatcher = new SequenceIdMatcher(nsqs);
         
               SequenceI[] osmatches = omatcher.findIdMatch(nsqs);
               SequenceI[] nsmatches = nmatcher.findIdMatch(olsqs);
        diff --git a/test/jalview/io/PfamFormatInputTest.java b/test/jalview/io/PfamFormatInputTest.java
        index 52a13f6..c91f8d7 100644
        --- a/test/jalview/io/PfamFormatInputTest.java
        +++ b/test/jalview/io/PfamFormatInputTest.java
        @@ -42,8 +42,8 @@ public class PfamFormatInputTest
           @Test(groups = "Functional")
           public void testPfamFormatNoLimits() throws IOException
           {
        -    AlignmentI al = new AppletFormatAdapter().readFile("ASEQ"
        -            + '\t' + "...--FFAFAFF--", DataSourceType.PASTE,
        +    AlignmentI al = new AppletFormatAdapter().readFile(
        +            "ASEQ" + '\t' + "...--FFAFAFF--", DataSourceType.PASTE,
                     FileFormat.Pfam);
             Assert.assertEquals(1, al.getHeight(), "Wrong number of sequences");
             Assert.assertTrue(al.hasValidSequence(),
        @@ -53,8 +53,9 @@ public class PfamFormatInputTest
           @Test(groups = "Functional")
           public void testPfamFormatValidLimits() throws IOException
           {
        -    AlignmentI al = new AppletFormatAdapter().readFile("ASEQ/15-25" + '\t'
        -            + "...--FFAFAFF--", DataSourceType.PASTE, FileFormat.Pfam);
        +    AlignmentI al = new AppletFormatAdapter().readFile(
        +            "ASEQ/15-25" + '\t' + "...--FFAFAFF--", DataSourceType.PASTE,
        +            FileFormat.Pfam);
             Assert.assertEquals(1, al.getHeight(), "Wrong number of sequences");
             Assert.assertTrue(al.hasValidSequence(),
                     "Didn't extract limits from PFAM ID");
        diff --git a/test/jalview/io/PhylipFileTests.java b/test/jalview/io/PhylipFileTests.java
        index d853350..f02769f 100644
        --- a/test/jalview/io/PhylipFileTests.java
        +++ b/test/jalview/io/PhylipFileTests.java
        @@ -37,8 +37,8 @@ import org.testng.annotations.Test;
         /**
          * Test file for {@link PhylipFile}.
          *
        - * Tests use example data obtained from molecularrevolution.org.
          *
          * @author David Corsar
        @@ -69,35 +69,25 @@ public class PhylipFileTests
           private static Map getTestData()
           {
             Map data = new HashMap();
        -    data.put(
        -            "Cow",
        +    data.put("Cow",
                     "ATGGCATATCCCATACAACTAGGATTCCAAGATGCAACATCACCAATCATAGAAGAACTACTTCACTTTCATGACCACACGCTAATAATTGTCTTCTTAATTAGCTCATTAGTACTTTACATTATTTCACTAATACTAACGACAAAGCTGACCCATACAAGCACGATAGATGCACAAGAAGTAGAGACAATCTGAACCATTCTGCCCGCCATCATCTTAATTCTAATTGCTCTTCCTTCTTTACGAATTCTATACATAATAGATGAAATCAATAACCCATCTCTTACAGTAAAAACCATAGGACATCAGTGATACTGAAGCTATGAGTATACAGATTATGAGGACTTAAGCTTCGACTCCTACATAATTCCAACATCAGAATTAAAGCCAGGGGAGCTACGACTATTAGAAGTCGATAATCGAGTTGTACTACCAATAGAAATAACAATCCGAATGTTAGTCTCCTCTGAAGACGTATTACACTCATGAGCTGTGCCCTCTCTAGGACTAAAAACAGACGCAATCCCAGGCCGTCTAAACCAAACAACCCTTATATCGTCCCGTCCAGGCTTATATTACGGTCAATGCTCAGAAATTTGCGGGTCAAACCACAGTTTCATACCCATTGTCCTTGAGTTAGTCCCACTAAAGTACTTTGAAAAATGATCTGCGTCAATATTA---------------------TAA");
        -    data.put(
        -            "Carp",
        +    data.put("Carp",
                     "ATGGCACACCCAACGCAACTAGGTTTCAAGGACGCGGCCATACCCGTTATAGAGGAACTTCTTCACTTCCACGACCACGCATTAATAATTGTGCTCCTAATTAGCACTTTAGTTTTATATATTATTACTGCAATGGTATCAACTAAACTTACTAATAAATATATTCTAGACTCCCAAGAAATCGAAATCGTATGAACCATTCTACCAGCCGTCATTTTAGTACTAATCGCCCTGCCCTCCCTACGCATCCTGTACCTTATAGACGAAATTAACGACCCTCACCTGACAATTAAAGCAATAGGACACCAATGATACTGAAGTTACGAGTATACAGACTATGAAAATCTAGGATTCGACTCCTATATAGTACCAACCCAAGACCTTGCCCCCGGACAATTCCGACTTCTGGAAACAGACCACCGAATAGTTGTTCCAATAGAATCCCCAGTCCGTGTCCTAGTATCTGCTGAAGACGTGCTACATTCTTGAGCTGTTCCATCCCTTGGCGTAAAAATGGACGCAGTCCCAGGACGACTAAATCAAGCCGCCTTTATTGCCTCACGCCCAGGGGTCTTTTACGGACAATGCTCTGAAATTTGTGGAGCTAATCACAGCTTTATACCAATTGTAGTTGAAGCAGTACCTCTCGAACACTTCGAAAACTGATCCTCATTAATACTAGAAGACGCCTCGCTAGGAAGCTAA");
        -    data.put(
        -            "Chicken",
        +    data.put("Chicken",
                     "ATGGCCAACCACTCCCAACTAGGCTTTCAAGACGCCTCATCCCCCATCATAGAAGAGCTCGTTGAATTCCACGACCACGCCCTGATAGTCGCACTAGCAATTTGCAGCTTAGTACTCTACCTTCTAACTCTTATACTTATAGAAAAACTATCA---TCAAACACCGTAGATGCCCAAGAAGTTGAACTAATCTGAACCATCCTACCCGCTATTGTCCTAGTCCTGCTTGCCCTCCCCTCCCTCCAAATCCTCTACATAATAGACGAAATCGACGAACCTGATCTCACCCTAAAAGCCATCGGACACCAATGATACTGAACCTATGAATACACAGACTTCAAGGACCTCTCATTTGACTCCTACATAACCCCAACAACAGACCTCCCCCTAGGCCACTTCCGCCTACTAGAAGTCGACCATCGCATTGTAATCCCCATAGAATCCCCCATTCGAGTAATCATCACCGCTGATGACGTCCTCCACTCATGAGCCGTACCCGCCCTCGGGGTAAAAACAGACGCAATCCCTGGACGACTAAATCAAACCTCCTTCATCACCACTCGACCAGGAGTGTTTTACGGACAATGCTCAGAAATCTGCGGAGCTAACCACAGCTACATACCCATTGTAGTAGAGTCTACCCCCCTAAAACACTTTGAAGCCTGATCCTCACTA------------------CTGTCATCTTAA");
        -    data.put(
        -            "Human",
        +    data.put("Human",
                     "ATGGCACATGCAGCGCAAGTAGGTCTACAAGACGCTACTTCCCCTATCATAGAAGAGCTTATCACCTTTCATGATCACGCCCTCATAATCATTTTCCTTATCTGCTTCCTAGTCCTGTATGCCCTTTTCCTAACACTCACAACAAAACTAACTAATACTAACATCTCAGACGCTCAGGAAATAGAAACCGTCTGAACTATCCTGCCCGCCATCATCCTAGTCCTCATCGCCCTCCCATCCCTACGCATCCTTTACATAACAGACGAGGTCAACGATCCCTCCCTTACCATCAAATCAATTGGCCACCAATGGTACTGAACCTACGAGTACACCGACTACGGCGGACTAATCTTCAACTCCTACATACTTCCCCCATTATTCCTAGAACCAGGCGACCTGCGACTCCTTGACGTTGACAATCGAGTAGTACTCCCGATTGAAGCCCCCATTCGTATAATAATTACATCACAAGACGTCTTGCACTCATGAGCTGTCCCCACATTAGGCTTAAAAACAGATGCAATTCCCGGACGTCTAAACCAAACCACTTTCACCGCTACACGACCGGGGGTATACTACGGTCAATGCTCTGAAATCTGTGGAGCAAACCACAGTTTCATGCCCATCGTCCTAGAATTAATTCCCCTAAAAATCTTTGAAATA---------------------GGGCCCGTATTTACCCTATAG");
        -    data.put(
        -            "Loach",
        +    data.put("Loach",
                     "ATGGCACATCCCACACAATTAGGATTCCAAGACGCGGCCTCACCCGTAATAGAAGAACTTCTTCACTTCCATGACCATGCCCTAATAATTGTATTTTTGATTAGCGCCCTAGTACTTTATGTTATTATTACAACCGTCTCAACAAAACTCACTAACATATATATTTTGGACTCACAAGAAATTGAAATCGTATGAACTGTGCTCCCTGCCCTAATCCTCATTTTAATCGCCCTCCCCTCACTACGAATTCTATATCTTATAGACGAGATTAATGACCCCCACCTAACAATTAAGGCCATGGGGCACCAATGATACTGAAGCTACGAGTATACTGATTATGAAAACTTAAGTTTTGACTCCTACATAATCCCCACCCAGGACCTAACCCCTGGACAATTCCGGCTACTAGAGACAGACCACCGAATGGTTGTTCCCATAGAATCCCCTATTCGCATTCTTGTTTCCGCCGAAGATGTACTACACTCCTGGGCCCTTCCAGCCATGGGGGTAAAGATAGACGCGGTCCCAGGACGCCTTAACCAAACCGCCTTTATTGCCTCCCGCCCCGGGGTATTCTATGGGCAATGCTCAGAAATCTGTGGAGCAAACCACAGCTTTATACCCATCGTAGTAGAAGCGGTCCCACTATCTCACTTCGAAAACTGGTCCACCCTTATACTAAAAGACGCCTCACTAGGAAGCTAA");
        -    data.put(
        -            "Mouse",
        +    data.put("Mouse",
                     "ATGGCCTACCCATTCCAACTTGGTCTACAAGACGCCACATCCCCTATTATAGAAGAGCTAATAAATTTCCATGATCACACACTAATAATTGTTTTCCTAATTAGCTCCTTAGTCCTCTATATCATCTCGCTAATATTAACAACAAAACTAACACATACAAGCACAATAGATGCACAAGAAGTTGAAACCATTTGAACTATTCTACCAGCTGTAATCCTTATCATAATTGCTCTCCCCTCTCTACGCATTCTATATATAATAGACGAAATCAACAACCCCGTATTAACCGTTAAAACCATAGGGCACCAATGATACTGAAGCTACGAATATACTGACTATGAAGACCTATGCTTTGATTCATATATAATCCCAACAAACGACCTAAAACCTGGTGAACTACGACTGCTAGAAGTTGATAACCGAGTCGTTCTGCCAATAGAACTTCCAATCCGTATATTAATTTCATCTGAAGACGTCCTCCACTCATGAGCAGTCCCCTCCCTAGGACTTAAAACTGATGCCATCCCAGGCCGACTAAATCAAGCAACAGTAACATCAAACCGACCAGGGTTATTCTATGGCCAATGCTCTGAAATTTGTGGATCTAACCATAGCTTTATGCCCATTGTCCTAGAAATGGTTCCACTAAAATATTTCGAAAACTGATCTGCTTCAATAATT---------------------TAA");
        -    data.put(
        -            "Rat",
        +    data.put("Rat",
                     "ATGGCTTACCCATTTCAACTTGGCTTACAAGACGCTACATCACCTATCATAGAAGAACTTACAAACTTTCATGACCACACCCTAATAATTGTATTCCTCATCAGCTCCCTAGTACTTTATATTATTTCACTAATACTAACAACAAAACTAACACACACAAGCACAATAGACGCCCAAGAAGTAGAAACAATTTGAACAATTCTCCCAGCTGTCATTCTTATTCTAATTGCCCTTCCCTCCCTACGAATTCTATACATAATAGACGAGATTAATAACCCAGTTCTAACAGTAAAAACTATAGGACACCAATGATACTGAAGCTATGAATATACTGACTATGAAGACCTATGCTTTGACTCCTACATAATCCCAACCAATGACCTAAAACCAGGTGAACTTCGTCTATTAGAAGTTGATAATCGGGTAGTCTTACCAATAGAACTTCCAATTCGTATACTAATCTCATCCGAAGACGTCCTGCACTCATGAGCCATCCCTTCACTAGGGTTAAAAACCGACGCAATCCCCGGCCGCCTAAACCAAGCTACAGTCACATCAAACCGACCAGGTCTATTCTATGGCCAATGCTCTGAAATTTGCGGCTCAAATCACAGCTTCATACCCATTGTACTAGAAATAGTGCCTCTAAAATATTTCGAAAACTGATCAGCTTCTATAATT---------------------TAA");
        -    data.put(
        -            "Seal",
        +    data.put("Seal",
                     "ATGGCATACCCCCTACAAATAGGCCTACAAGATGCAACCTCTCCCATTATAGAGGAGTTACTACACTTCCATGACCACACATTAATAATTGTGTTCCTAATTAGCTCATTAGTACTCTACATTATCTCACTTATACTAACCACGAAACTCACCCACACAAGTACAATAGACGCACAAGAAGTGGAAACGGTGTGAACGATCCTACCCGCTATCATTTTAATTCTCATTGCCCTACCATCATTACGAATCCTCTACATAATGGACGAGATCAATAACCCTTCCTTGACCGTAAAAACTATAGGACATCAGTGATACTGAAGCTATGAGTACACAGACTACGAAGACCTGAACTTTGACTCATATATGATCCCCACACAAGAACTAAAGCCCGGAGAACTACGACTGCTAGAAGTAGACAATCGAGTAGTCCTCCCAATAGAAATAACAATCCGCATACTAATCTCATCAGAAGATGTACTCCACTCATGAGCCGTACCGTCCCTAGGACTAAAAACTGATGCTATCCCAGGACGACTAAACCAAACAACCCTAATAACCATACGACCAGGACTGTACTACGGTCAATGCTCAGAAATCTGTGGTTCAAACCACAGCTTCATACCTATTGTCCTCGAATTGGTCCCACTATCCCACTTCGAGAAATGATCTACCTCAATGCTT---------------------TAA");
        -    data.put(
        -            "Whale",
        +    data.put("Whale",
                     "ATGGCATATCCATTCCAACTAGGTTTCCAAGATGCAGCATCACCCATCATAGAAGAGCTCCTACACTTTCACGATCATACACTAATAATCGTTTTTCTAATTAGCTCTTTAGTTCTCTACATTATTACCCTAATGCTTACAACCAAATTAACACATACTAGTACAATAGACGCCCAAGAAGTAGAAACTGTCTGAACTATCCTCCCAGCCATTATCTTAATTTTAATTGCCTTGCCTTCATTACGGATCCTTTACATAATAGACGAAGTCAATAACCCCTCCCTCACTGTAAAAACAATAGGTCACCAATGATATTGAAGCTATGAGTATACCGACTACGAAGACCTAAGCTTCGACTCCTATATAATCCCAACATCAGACCTAAAGCCAGGAGAACTACGATTATTAGAAGTAGATAACCGAGTTGTCTTACCTATAGAAATAACAATCCGAATATTAGTCTCATCAGAAGACGTACTCCACTCATGGGCCGTACCCTCCTTGGGCCTAAAAACAGATGCAATCCCAGGACGCCTAAACCAAACAACCTTAATATCAACACGACCAGGCCTATTTTATGGACAATGCTCAGAGATCTGCGGCTCAAACCACAGTTTCATACCAATTGTCCTAGAACTAGTACCCCTAGAAGTCTTTGAAAAATGATCTGTATCAATACTA---------------------TAA");
        -    data.put(
        -            "Frog",
        +    data.put("Frog",
                     "ATGGCACACCCATCACAATTAGGTTTTCAAGACGCAGCCTCTCCAATTATAGAAGAATTACTTCACTTCCACGACCATACCCTCATAGCCGTTTTTCTTATTAGTACGCTAGTTCTTTACATTATTACTATTATAATAACTACTAAACTAACTAATACAAACCTAATGGACGCACAAGAGATCGAAATAGTGTGAACTATTATACCAGCTATTAGCCTCATCATAATTGCCCTTCCATCCCTTCGTATCCTATATTTAATAGATGAAGTTAATGATCCACACTTAACAATTAAAGCAATCGGCCACCAATGATACTGAAGCTACGAATATACTAACTATGAGGATCTCTCATTTGACTCTTATATAATTCCAACTAATGACCTTACCCCTGGACAATTCCGGCTGCTAGAAGTTGATAATCGAATAGTAGTCCCAATAGAATCTCCAACCCGACTTTTAGTTACAGCCGAAGACGTCCTCCACTCGTGAGCTGTACCCTCCTTGGGTGTCAAAACAGATGCAATCCCAGGACGACTTCATCAAACATCATTTATTGCTACTCGTCCGGGAGTATTTTACGGACAATGTTCAGAAATTTGCGGAGCAAACCACAGCTTTATACCAATTGTAGTTGAAGCAGTACCGCTAACCGACTTTGAAAACTGATCTTCATCAATACTA---GAAGCATCACTA------AGA");
             return data;
           }
        @@ -142,8 +132,8 @@ public class PhylipFileTests
             Map data = PhylipFileTests.getTestData();
             for (SequenceI s : al.getSequencesArray())
             {
        -      assertTrue(s.getName() + " sequence did not match test data.", data
        -              .get(s.getName()).equals(s.getSequenceAsString()));
        +      assertTrue(s.getName() + " sequence did not match test data.",
        +              data.get(s.getName()).equals(s.getSequenceAsString()));
             }
           }
         
        diff --git a/test/jalview/io/RNAMLfileTest.java b/test/jalview/io/RNAMLfileTest.java
        index ae72de4..65cea6f 100644
        --- a/test/jalview/io/RNAMLfileTest.java
        +++ b/test/jalview/io/RNAMLfileTest.java
        @@ -51,9 +51,9 @@ public class RNAMLfileTest
           @Test(groups = { "Functional" })
           public void testRnamlToStockholmIO()
           {
        -    StockholmFileTest.testFileIOwithFormat(new File(
        -            "examples/testdata/rna-alignment.xml"), FileFormat.Stockholm,
        -            -1, -1, true, true, true);
        +    StockholmFileTest.testFileIOwithFormat(
        +            new File("examples/testdata/rna-alignment.xml"),
        +            FileFormat.Stockholm, -1, -1, true, true, true);
         
           }
         
        diff --git a/test/jalview/io/ScoreMatrixFileTest.java b/test/jalview/io/ScoreMatrixFileTest.java
        index 254feaa..99ec9a6 100644
        --- a/test/jalview/io/ScoreMatrixFileTest.java
        +++ b/test/jalview/io/ScoreMatrixFileTest.java
        @@ -19,7 +19,7 @@ import org.testng.annotations.Test;
         public class ScoreMatrixFileTest
         {
         
        -  @AfterMethod(alwaysRun=true)
        +  @AfterMethod(alwaysRun = true)
           public void tearDownAfterTest()
           {
             ScoreModels.getInstance().reset();
        @@ -33,8 +33,7 @@ public class ScoreMatrixFileTest
            */
           @Test(groups = "Functional")
           public void testParseMatrix_ncbiMixedDelimiters()
        -          throws MalformedURLException,
        -          IOException
        +          throws MalformedURLException, IOException
           {
             /*
              * some messy but valid input data, with comma, space
        @@ -262,8 +261,7 @@ public class ScoreMatrixFileTest
               fail("expected exception");
             } catch (IOException e)
             {
        -      assertEquals(
        -              e.getMessage(),
        +      assertEquals(e.getMessage(),
                       "Format error: expected 'ScoreMatrix ', found 'ScoreMatrix' at line 1");
             }
           }
        @@ -275,8 +273,8 @@ public class ScoreMatrixFileTest
            * @throws MalformedURLException
            */
           @Test(groups = "Functional")
        -  public void testParseMatrix_ncbiFormat() throws MalformedURLException,
        -          IOException
        +  public void testParseMatrix_ncbiFormat()
        +          throws MalformedURLException, IOException
           {
             // input including comment and blank lines
             String data = "ScoreMatrix MyTest\n#comment\n\n" + "\tA\tB\tC\n"
        @@ -285,7 +283,7 @@ public class ScoreMatrixFileTest
             FileParse fp = new FileParse(data, DataSourceType.PASTE);
             ScoreMatrixFile parser = new ScoreMatrixFile(fp);
             ScoreMatrix sm = parser.parseMatrix();
        -  
        +
             assertNotNull(sm);
             assertEquals(sm.getName(), "MyTest");
             assertEquals(parser.getMatrixName(), "MyTest");
        @@ -302,14 +300,13 @@ public class ScoreMatrixFileTest
            */
           @Test(groups = "Functional")
           public void testParseMatrix_aaIndexBlosum80()
        -          throws MalformedURLException,
        -          IOException
        +          throws MalformedURLException, IOException
           {
             FileParse fp = new FileParse("resources/scoreModel/blosum80.scm",
                     DataSourceType.FILE);
             ScoreMatrixFile parser = new ScoreMatrixFile(fp);
             ScoreMatrix sm = parser.parseMatrix();
        -  
        +
             assertNotNull(sm);
             assertEquals(sm.getName(), "HENS920103");
             assertEquals(sm.getDescription(),
        @@ -330,8 +327,8 @@ public class ScoreMatrixFileTest
            * @throws MalformedURLException
            */
           @Test(groups = "Functional")
        -  public void testParseMatrix_aaindexFormat() throws MalformedURLException,
        -          IOException
        +  public void testParseMatrix_aaindexFormat()
        +          throws MalformedURLException, IOException
           {
             /*
              * aaindex format has scores for diagonal and below only
        @@ -339,13 +336,12 @@ public class ScoreMatrixFileTest
             String data = "H MyTest\n" + "D My description\n" + "R PMID:1438297\n"
                     + "A Authors, names\n" + "T Journal title\n"
                     + "J Journal reference\n" + "* matrix in 1/3 Bit Units\n"
        -            + "M rows = ABC, cols = ABC\n" + "A\t1.0\n"
        -            + "B\t4.0\t5.0\n"
        +            + "M rows = ABC, cols = ABC\n" + "A\t1.0\n" + "B\t4.0\t5.0\n"
                     + "C\t7.0\t8.0\t9.0\n";
             FileParse fp = new FileParse(data, DataSourceType.PASTE);
             ScoreMatrixFile parser = new ScoreMatrixFile(fp);
             ScoreMatrix sm = parser.parseMatrix();
        -  
        +
             assertNotNull(sm);
             assertEquals(sm.getSize(), 3);
             assertEquals(sm.getName(), "MyTest");
        @@ -363,14 +359,12 @@ public class ScoreMatrixFileTest
         
           @Test(groups = "Functional")
           public void testParseMatrix_aaindex_mMissing()
        -          throws MalformedURLException,
        -          IOException
        +          throws MalformedURLException, IOException
           {
             /*
              * aaindex format but M cols=, rows= is missing
              */
        -    String data = "H MyTest\n" + "A\t1.0\n"
        -            + "B\t4.0\t5.0\n"
        +    String data = "H MyTest\n" + "A\t1.0\n" + "B\t4.0\t5.0\n"
                     + "C\t7.0\t8.0\t9.0\n";
             FileParse fp = new FileParse(data, DataSourceType.PASTE);
             ScoreMatrixFile parser = new ScoreMatrixFile(fp);
        @@ -386,12 +380,10 @@ public class ScoreMatrixFileTest
         
           @Test(groups = "Functional")
           public void testParseMatrix_aaindex_rowColMismatch()
        -          throws MalformedURLException,
        -          IOException
        +          throws MalformedURLException, IOException
           {
             String data = "H MyTest\n" + "M rows=ABC, cols=ABD\n" + "A\t1.0\n"
        -            + "B\t4.0\t5.0\n"
        -            + "C\t7.0\t8.0\t9.0\n";
        +            + "B\t4.0\t5.0\n" + "C\t7.0\t8.0\t9.0\n";
             FileParse fp = new FileParse(data, DataSourceType.PASTE);
             ScoreMatrixFile parser = new ScoreMatrixFile(fp);
             try
        @@ -400,8 +392,7 @@ public class ScoreMatrixFileTest
               fail("Expected exception");
             } catch (FileFormatException e)
             {
        -      assertEquals(
        -              e.getMessage(),
        +      assertEquals(e.getMessage(),
                       "Unexpected aaIndex score matrix data at line 2: M rows=ABC, cols=ABD rows != cols");
             }
           }
        @@ -424,8 +415,7 @@ public class ScoreMatrixFileTest
         
           @Test(groups = "Functional")
           public void testParseMatrix_aaindex_tooManyRows()
        -          throws MalformedURLException,
        -          IOException
        +          throws MalformedURLException, IOException
           {
             String data = "H MyTest\n" + "M rows=ABC, cols=ABC\n" + "A\t1.0\n"
                     + "B\t4.0\t5.0\n" + "C\t7.0\t8.0\t9.0\n" + "C\t7.0\t8.0\t9.0\n";
        @@ -443,8 +433,7 @@ public class ScoreMatrixFileTest
         
           @Test(groups = "Functional")
           public void testParseMatrix_aaindex_extraDataLines()
        -          throws MalformedURLException,
        -          IOException
        +          throws MalformedURLException, IOException
           {
             String data = "H MyTest\n" + "M rows=ABC, cols=ABC\n" + "A\t1.0\n"
                     + "B\t4.0\t5.0\n" + "C\t7.0\t8.0\t9.0\n" + "something extra\n";
        @@ -462,8 +451,7 @@ public class ScoreMatrixFileTest
         
           @Test(groups = "Functional")
           public void testParseMatrix_aaindex_tooFewColumns()
        -          throws MalformedURLException,
        -          IOException
        +          throws MalformedURLException, IOException
           {
             String data = "H MyTest\n" + "M rows=ABC, cols=ABC\n" + "A\t1.0\n"
                     + "B\t4.0\t5.0\n" + "C\t7.0\t8.0\n";
        @@ -475,8 +463,7 @@ public class ScoreMatrixFileTest
               fail("Expected exception");
             } catch (FileFormatException e)
             {
        -      assertEquals(
        -              e.getMessage(),
        +      assertEquals(e.getMessage(),
                       "Expected 3 scores at line 5: 'C\t7.0\t8.0' but found 2");
             }
           }
        @@ -488,8 +475,8 @@ public class ScoreMatrixFileTest
            * @throws MalformedURLException
            */
           @Test(groups = "Functional")
        -  public void testParse_ncbiFormat() throws MalformedURLException,
        -          IOException
        +  public void testParse_ncbiFormat()
        +          throws MalformedURLException, IOException
           {
             assertNull(ScoreModels.getInstance().getScoreModel("MyNewTest", null));
         
        @@ -500,9 +487,9 @@ public class ScoreMatrixFileTest
             ScoreMatrixFile parser = new ScoreMatrixFile(fp);
         
             parser.parse();
        -  
        -    ScoreMatrix sm = (ScoreMatrix) ScoreModels.getInstance().getScoreModel(
        -            "MyNewTest", null);
        +
        +    ScoreMatrix sm = (ScoreMatrix) ScoreModels.getInstance()
        +            .getScoreModel("MyNewTest", null);
             assertNotNull(sm);
             assertEquals(sm.getName(), "MyNewTest");
             assertEquals(parser.getMatrixName(), "MyNewTest");
        diff --git a/test/jalview/io/SequenceAnnotationReportTest.java b/test/jalview/io/SequenceAnnotationReportTest.java
        index 772ed2b..6459545 100644
        --- a/test/jalview/io/SequenceAnnotationReportTest.java
        +++ b/test/jalview/io/SequenceAnnotationReportTest.java
        @@ -62,8 +62,8 @@ public class SequenceAnnotationReportTest
             SequenceAnnotationReport sar = new SequenceAnnotationReport(false);
             StringBuilder sb = new StringBuilder();
             sb.append("123456");
        -    SequenceFeature sf = new SequenceFeature("disulfide bond", "desc", 1,
        -            3, 1.2f, "group");
        +    SequenceFeature sf = new SequenceFeature("disulfide bond", "desc", 1, 3,
        +            1.2f, "group");
         
             // residuePos == 2 does not match start or end of feature, nothing done:
             sar.appendFeature(sb, 2, null, sf, null, 0);
        @@ -105,8 +105,12 @@ public class SequenceAnnotationReportTest
             sfl.add(sf);
             sfl.add(sf);
             sfl.add(sf);
        -    int n = sar.appendFeatures(sb, 1, sfl,
        -            new FeatureRenderer(null), 200); // text should terminate before 200 characters
        +    int n = sar.appendFeatures(sb, 1, sfl, new FeatureRenderer(null), 200); // text
        +                                                                            // should
        +                                                                            // terminate
        +                                                                            // before
        +                                                                            // 200
        +                                                                            // characters
             String s = sb.toString();
             assertTrue(s.length() < 200);
             assertEquals(n, 7); // should be 7 features left over
        @@ -287,16 +291,16 @@ public class SequenceAnnotationReportTest
             /*
              * positional features are ignored
              */
        -    seq.addSequenceFeature(new SequenceFeature("Domain", "Ferredoxin", 5,
        -            10, 1f, null));
        +    seq.addSequenceFeature(
        +            new SequenceFeature("Domain", "Ferredoxin", 5, 10, 1f, null));
             sar.createSequenceAnnotationReport(sb, seq, true, true, null);
             assertEquals("SeqDesc", sb.toString());
         
             /*
              * non-positional feature
              */
        -    seq.addSequenceFeature(new SequenceFeature("Type1", "Nonpos", 0, 0, 1f,
        -            null));
        +    seq.addSequenceFeature(
        +            new SequenceFeature("Type1", "Nonpos", 0, 0, 1f, null));
             sb.setLength(0);
             sar.createSequenceAnnotationReport(sb, seq, true, true, null);
             String expected = "SeqDesc
        Type1 ; Nonpos Score=1.0
        "; @@ -315,8 +319,8 @@ public class SequenceAnnotationReportTest * score is only appended for positional features so ignored here! * minMax are not recorded for non-positional features */ - seq.addSequenceFeature(new SequenceFeature("Metal", "Desc", 0, 0, 5f, - null)); + seq.addSequenceFeature( + new SequenceFeature("Metal", "Desc", 0, 0, 5f, null)); FeatureRendererModel fr = new FeatureRenderer(null); Map minmax = fr.getMinMax(); @@ -326,7 +330,7 @@ public class SequenceAnnotationReportTest sar.createSequenceAnnotationReport(sb, seq, true, true, fr); expected = "SeqDesc
        Metal ; Desc
        Type1 ; Nonpos
        "; assertEquals(expected, sb.toString()); - + /* * 'linkonly' features are ignored; this is obsolete, as linkonly * is only set by DasSequenceFetcher, and DAS is history @@ -343,8 +347,8 @@ public class SequenceAnnotationReportTest * 'clinical_significance' attribute is only included in description * when used for feature colouring */ - SequenceFeature sf2 = new SequenceFeature("Variant", "Havana", 0, 0, - 5f, null); + SequenceFeature sf2 = new SequenceFeature("Variant", "Havana", 0, 0, 5f, + null); sf2.setValue(GffConstants.CLINICAL_SIGNIFICANCE, "benign"); seq.addSequenceFeature(sf2); sb.setLength(0); @@ -402,7 +406,7 @@ public class SequenceAnnotationReportTest { SequenceAnnotationReport sar = new SequenceAnnotationReport(false); StringBuilder sb = new StringBuilder(); - + SequenceI seq = new Sequence("s1", "ABC"); int maxSources = (int) PA.getValue(sar, "MAX_SOURCES"); @@ -410,21 +414,19 @@ public class SequenceAnnotationReportTest { seq.addDBRef(new DBRefEntry("PDB" + i, "0", "3iu1")); } - + int maxRefs = (int) PA.getValue(sar, "MAX_REFS_PER_SOURCE"); for (int i = 0; i <= maxRefs; i++) { seq.addDBRef(new DBRefEntry("Uniprot", "0", "P3041" + i)); } - + sar.createSequenceAnnotationReport(sb, seq, true, true, null, true); String report = sb.toString(); - assertTrue(report - .startsWith( - "
        UNIPROT P30410, P30411, P30412, P30413,...
        PDB0 3iu1")); - assertTrue(report - .endsWith( - "
        PDB7 3iu1
        PDB8,...
        (Output Sequence Details to list all database references)
        ")); + assertTrue(report.startsWith( + "
        UNIPROT P30410, P30411, P30412, P30413,...
        PDB0 3iu1")); + assertTrue(report.endsWith( + "
        PDB7 3iu1
        PDB8,...
        (Output Sequence Details to list all database references)
        ")); } /** @@ -475,8 +477,8 @@ public class SequenceAnnotationReportTest * feature at 11-12 on peptide maps to 110-115 on CDS * here we test for tooltip at 113 (t) */ - SequenceFeature sf2 = new SequenceFeature("metal", "Fe", 11, 12, - 2.3f, "Uniprot"); + SequenceFeature sf2 = new SequenceFeature("metal", "Fe", 11, 12, 2.3f, + "Uniprot"); features.clear(); features.add(sf2); mapping = new Mapping(peptide, map); diff --git a/test/jalview/io/StockholmFileTest.java b/test/jalview/io/StockholmFileTest.java index 5b74306..e4f2abc 100644 --- a/test/jalview/io/StockholmFileTest.java +++ b/test/jalview/io/StockholmFileTest.java @@ -119,18 +119,16 @@ public class StockholmFileTest assertTrue( Pattern.compile( "^#=GS\\s+FER2_SPIOL(/\\d+-\\d+)?\\s+AC\\s+P00224$", - Pattern.MULTILINE).matcher(toStockholm) - .find(), + Pattern.MULTILINE).matcher(toStockholm).find(), "Couldn't locate UNIPROT Accession in generated Stockholm file."); AlignmentI fromStockholm = af.readFile(toStockholm, DataSourceType.PASTE, FileFormat.Stockholm); SequenceI importedSeq = fromStockholm.getSequenceAt(0); - assertTrue(importedSeq.getDBRefs() - .size() == 1, + assertTrue(importedSeq.getDBRefs().size() == 1, "Expected just one database reference to be added to sequence."); assertTrue( - importedSeq.getDBRefs().get(0).getAccessionId().indexOf( - " ") == -1, + importedSeq.getDBRefs().get(0).getAccessionId() + .indexOf(" ") == -1, "Spaces were found in accession ID."); List dbrefs = DBRefUtils.searchRefs(importedSeq.getDBRefs(), "P00224"); @@ -144,11 +142,10 @@ public class StockholmFileTest * with no dataloss * * @param f - * - source datafile (IdentifyFile.identify() - * should work with it) + * - source datafile (IdentifyFile.identify() should work with it) * @param ioformat - * - label for IO class used to write and read - * back in the data from f + * - label for IO class used to write and read back in the data from + * f * @param ignoreFeatures * @param ignoreRowVisibility * @param allowNullAnnotations @@ -175,8 +172,8 @@ public class StockholmFileTest al.getSequenceAt(i).createDatasetSequence(); } String outputfile = rf.formatSequences(ioformat, al, true); - System.out.println("Output file in '" + ioformat + "':\n" - + outputfile + "\n<= nminseqann); + + nminseqann, + numsqswithali >= nminseqann); } catch (Exception e) { @@ -266,9 +264,10 @@ public class StockholmFileTest assertNotNull("Original alignment was null", al); assertNotNull("Generated alignment was null", al_input); - assertTrue("Alignment dimension mismatch: original: " + al.getHeight() - + "x" + al.getWidth() + ", generated: " + al_input.getHeight() - + "x" + al_input.getWidth(), + assertTrue( + "Alignment dimension mismatch: original: " + al.getHeight() + + "x" + al.getWidth() + ", generated: " + + al_input.getHeight() + "x" + al_input.getWidth(), al.getHeight() == al_input.getHeight() && al.getWidth() == al_input.getWidth()); @@ -299,8 +298,7 @@ public class StockholmFileTest if (!ignoreRowVisibility) { assertEquals("Visibility not identical.", - aa_original[i].visible, - aa_new[i].visible); + aa_original[i].visible, aa_new[i].visible); } assertEquals("Threshold line not identical.", aa_original[i].threshold, aa_new[i].threshold); @@ -336,7 +334,8 @@ public class StockholmFileTest // check sequences, annotation and features SequenceI[] seq_original = new SequenceI[al.getSequencesArray().length]; seq_original = al.getSequencesArray(); - SequenceI[] seq_new = new SequenceI[al_input.getSequencesArray().length]; + SequenceI[] seq_new = new SequenceI[al_input + .getSequencesArray().length]; seq_new = al_input.getSequencesArray(); List sequenceFeatures_original; List sequenceFeatures_new; @@ -347,8 +346,8 @@ public class StockholmFileTest String name = seq_original[i].getName(); int start = seq_original[i].getStart(); int end = seq_original[i].getEnd(); - System.out.println("Check sequence: " + name + "/" + start + "-" - + end); + System.out + .println("Check sequence: " + name + "/" + start + "-" + end); // search equal sequence for (int in = 0; in < al_input.getSequencesArray().length; in++) @@ -366,10 +365,12 @@ public class StockholmFileTest "Sequence Features were not equivalent" + (ignoreFeatures ? " ignoring." : ""), ignoreFeatures - || (seq_original[i].getSequenceFeatures() == null && seq_new[in] - .getSequenceFeatures() == null) - || (seq_original[i].getSequenceFeatures() != null && seq_new[in] - .getSequenceFeatures() != null)); + || (seq_original[i].getSequenceFeatures() == null + && seq_new[in] + .getSequenceFeatures() == null) + || (seq_original[i].getSequenceFeatures() != null + && seq_new[in] + .getSequenceFeatures() != null)); // compare sequence features if (seq_original[i].getSequenceFeatures() != null && seq_new[in].getSequenceFeatures() != null) @@ -379,9 +380,9 @@ public class StockholmFileTest .getSequenceFeatures(); sequenceFeatures_new = seq_new[in].getSequenceFeatures(); - assertEquals("different number of features", seq_original[i] - .getSequenceFeatures().size(), seq_new[in] - .getSequenceFeatures().size()); + assertEquals("different number of features", + seq_original[i].getSequenceFeatures().size(), + seq_new[in].getSequenceFeatures().size()); for (int feat = 0; feat < seq_original[i].getSequenceFeatures() .size(); feat++) @@ -395,10 +396,11 @@ public class StockholmFileTest if (al.getSequenceAt(i).getAnnotation() != null && al_input.getSequenceAt(in).getAnnotation() != null) { - for (int j = 0; j < al.getSequenceAt(i).getAnnotation().length; j++) + for (int j = 0; j < al.getSequenceAt(i) + .getAnnotation().length; j++) { - if (al.getSequenceAt(i).getAnnotation()[j] != null - && al_input.getSequenceAt(in).getAnnotation()[j] != null) + if (al.getSequenceAt(i).getAnnotation()[j] != null && al_input + .getSequenceAt(in).getAnnotation()[j] != null) { annot_original = al.getSequenceAt(i).getAnnotation()[j]; annot_new = al_input.getSequenceAt(in).getAnnotation()[j]; @@ -456,12 +458,14 @@ public class StockholmFileTest + annot_new.annotations.length); } boolean isRna = annot_or.isRNA(); - assertTrue("Expected " + (isRna ? " valid RNA " : " no RNA ") - + " secondary structure in the row.", + assertTrue( + "Expected " + (isRna ? " valid RNA " : " no RNA ") + + " secondary structure in the row.", isRna == annot_new.isRNA()); for (int i = 0; i < annot_or.annotations.length; i++) { - Annotation an_or = annot_or.annotations[i], an_new = annot_new.annotations[i]; + Annotation an_or = annot_or.annotations[i], + an_new = annot_new.annotations[i]; if (an_or != null && an_new != null) { @@ -469,7 +473,8 @@ public class StockholmFileTest { if (an_or.secondaryStructure != an_new.secondaryStructure || ((Float.isNaN(an_or.value) != Float - .isNaN(an_new.value)) || an_or.value != an_new.value)) + .isNaN(an_new.value)) + || an_or.value != an_new.value)) { fail("Different RNA secondary structure at column " + i + " expected: [" + annot_or.annotations[i].toString() @@ -481,17 +486,22 @@ public class StockholmFileTest { // not RNA secondary structure, so expect all elements to match... if ((an_or.isWhitespace() != an_new.isWhitespace()) - || !an_or.displayCharacter.trim().equals( - an_new.displayCharacter.trim()) - || !("" + an_or.secondaryStructure).trim().equals( - ("" + an_new.secondaryStructure).trim()) - || (an_or.description != an_new.description && !((an_or.description == null && an_new.description - .trim().length() == 0) - || (an_new.description == null && an_or.description - .trim().length() == 0) || an_or.description - .trim().equals(an_new.description.trim()))) - || !((Float.isNaN(an_or.value) && Float - .isNaN(an_new.value)) || an_or.value == an_new.value)) + || !an_or.displayCharacter.trim() + .equals(an_new.displayCharacter.trim()) + || !("" + an_or.secondaryStructure).trim() + .equals(("" + an_new.secondaryStructure).trim()) + || (an_or.description != an_new.description + && !((an_or.description == null + && an_new.description.trim() + .length() == 0) + || (an_new.description == null + && an_or.description.trim() + .length() == 0) + || an_or.description.trim().equals( + an_new.description.trim()))) + || !((Float.isNaN(an_or.value) + && Float.isNaN(an_new.value)) + || an_or.value == an_new.value)) { fail("Annotation Element Mismatch\nElement " + i + " in original: " + annot_or.annotations[i].toString() @@ -551,34 +561,40 @@ public class StockholmFileTest } if (!thrown) { - fail("Expected difference for [" + an_orig + "] and [" + an_new + "]"); + fail("Expected difference for [" + an_orig + "] and [" + an_new + + "]"); } } + private AlignmentAnnotation makeAnnot(Annotation ae) { - return new AlignmentAnnotation("label", "description", new Annotation[] - { ae }); + return new AlignmentAnnotation("label", "description", + new Annotation[] + { ae }); } - @Test(groups={"Functional"}) + @Test(groups = { "Functional" }) public void testAnnotationEquivalence() { AlignmentAnnotation one = makeAnnot(new Annotation("", "", ' ', 1)); - AlignmentAnnotation anotherOne = makeAnnot(new Annotation("", "", ' ', - 1)); - AlignmentAnnotation sheet = makeAnnot(new Annotation("","",'E',0f)); - AlignmentAnnotation anotherSheet = makeAnnot(new Annotation("","",'E',0f)); - AlignmentAnnotation sheetWithLabel = makeAnnot(new Annotation("1", "", - 'E', 0f)); - AlignmentAnnotation anotherSheetWithLabel = makeAnnot(new Annotation( - "1", "", 'E', 0f)); - AlignmentAnnotation rnaNoDC = makeAnnot(new Annotation("","",'<',0f)); - AlignmentAnnotation anotherRnaNoDC = makeAnnot(new Annotation("","",'<',0f)); - AlignmentAnnotation rnaWithDC = makeAnnot(new Annotation("B", "", '<', - 0f)); - AlignmentAnnotation anotherRnaWithDC = makeAnnot(new Annotation("B", - "", '<', 0f)); - + AlignmentAnnotation anotherOne = makeAnnot( + new Annotation("", "", ' ', 1)); + AlignmentAnnotation sheet = makeAnnot(new Annotation("", "", 'E', 0f)); + AlignmentAnnotation anotherSheet = makeAnnot( + new Annotation("", "", 'E', 0f)); + AlignmentAnnotation sheetWithLabel = makeAnnot( + new Annotation("1", "", 'E', 0f)); + AlignmentAnnotation anotherSheetWithLabel = makeAnnot( + new Annotation("1", "", 'E', 0f)); + AlignmentAnnotation rnaNoDC = makeAnnot( + new Annotation("", "", '<', 0f)); + AlignmentAnnotation anotherRnaNoDC = makeAnnot( + new Annotation("", "", '<', 0f)); + AlignmentAnnotation rnaWithDC = makeAnnot( + new Annotation("B", "", '<', 0f)); + AlignmentAnnotation anotherRnaWithDC = makeAnnot( + new Annotation("B", "", '<', 0f)); + // check self equivalence for (boolean allowNull : new boolean[] { true, false }) { @@ -609,7 +625,7 @@ public class StockholmFileTest if (p != q) { assertNotEqualSecondaryStructure("Should be different", - aaSet.get(p), aaSet.get(q), false); + aaSet.get(p), aaSet.get(q), false); } else { @@ -637,6 +653,7 @@ public class StockholmFileTest } String aliFile = ">Dm\nAAACCCUUUUACACACGGGAAAGGG"; + String annFile = "JALVIEW_ANNOTATION\n# Created: Thu May 04 11:16:52 BST 2017\n\n" + "SEQUENCE_REF\tDm\nNO_GRAPH\tsecondary structure\tsecondary structure\t" + "(|(|(|(|, .|, .|, .|, .|)|)|)|)|\t0.0\nROWPROPERTIES\t" @@ -646,6 +663,7 @@ public class StockholmFileTest + "SEQUENCE_REF\tDm\nNO_GRAPH\tsecondary structure\tsecondary structure\t" + "(|(|(|(||{|{||{|{||)|)|)|)||}|}|}|}|\t0.0\nROWPROPERTIES\t" + "secondary structure\tscaletofit=true\tshowalllabs=true\tcentrelabs=false"; + String annFileFullWuss = "JALVIEW_ANNOTATION\n# Created: Thu May 04 11:16:52 BST 2017\n\n" + "SEQUENCE_REF\tDm\nNO_GRAPH\tsecondary structure\tsecondary structure\t" + "(|(|(|(||{|{||[|[||)|)|)|)||}|}|]|]|\t0.0\nROWPROPERTIES\t" @@ -683,6 +701,7 @@ public class StockholmFileTest "Shouldn't recognise '" + ch + "' as a WUSS bracket"); } } + private static void roundTripSSForRNA(String aliFile, String annFile) throws Exception { @@ -708,20 +727,22 @@ public class StockholmFileTest // this is the single sequence alignment and the SS annotations equivalent to // the ones in file RnaSSTestFile - String aliFileRnaSS = ">Test.sequence/1-14\n" - + "GUACAAAAAAAAAA"; + String aliFileRnaSS = ">Test.sequence/1-14\n" + "GUACAAAAAAAAAA"; + String annFileRnaSSAlphaChars = "JALVIEW_ANNOTATION\n" + "# Created: Thu Aug 02 14:54:57 BST 2018\n" + "\n" + "NO_GRAPH\tSecondary Structure\tSecondary Structure\t<,<|(,(|E,E|H,H|B,B|h,h|e,e|b,b|(,(|E,E|),)|e,e|),)|>,>|\t2.0\n" + "\n" + "ROWPROPERTIES\tSecondary Structure\tscaletofit=true\tshowalllabs=true\tcentrelabs=false\n" + "\n" + "\n" + "ALIGNMENT\tID=RNA.SS.TEST\tTP=RNA;"; + String wrongAnnFileRnaSSAlphaChars = "JALVIEW_ANNOTATION\n" + "# Created: Thu Aug 02 14:54:57 BST 2018\n" + "\n" + "NO_GRAPH\tSecondary Structure\tSecondary Structure\t<,<|(,(|H,H|E,E|B,B|h,h|e,e|b,b|(,(|E,E|),)|e,e|),)|>,>|\t2.0\n" + "\n" + "ROWPROPERTIES\tSecondary Structure\tscaletofit=true\tshowalllabs=true\tcentrelabs=false\n" + "\n" + "\n" + "ALIGNMENT\tID=RNA.SS.TEST\tTP=RNA;"; + @Test(groups = { "Functional" }) public void stockholmFileRnaSSAlphaChars() throws Exception { @@ -743,14 +764,11 @@ public class StockholmFileTest } char[] shouldBe = { '<', '(', 'E', 'H', 'B', 'h', 'e', 'b', '(', 'E', ')', 'e', ')', '>' }; - Assert.assertTrue( - Arrays.equals(As, shouldBe), - "Annotation is " + new String(As) + " but should be " - + new String(shouldBe)); + Assert.assertTrue(Arrays.equals(As, shouldBe), "Annotation is " + + new String(As) + " but should be " + new String(shouldBe)); // this should result in the same RNA SS Annotations - AlignmentI newAl = new AppletFormatAdapter().readFile( - aliFileRnaSS, + AlignmentI newAl = new AppletFormatAdapter().readFile(aliFileRnaSS, DataSourceType.PASTE, jalview.io.FileFormat.Fasta); AnnotationFile aaf = new AnnotationFile(); aaf.readAnnotationFile(newAl, annFileRnaSSAlphaChars, @@ -764,14 +782,14 @@ public class StockholmFileTest + "RNA SS A 2:" + newAl.getAlignmentAnnotation()[0]); // this should NOT result in the same RNA SS Annotations - newAl = new AppletFormatAdapter().readFile( - aliFileRnaSS, DataSourceType.PASTE, - jalview.io.FileFormat.Fasta); + newAl = new AppletFormatAdapter().readFile(aliFileRnaSS, + DataSourceType.PASTE, jalview.io.FileFormat.Fasta); aaf = new AnnotationFile(); aaf.readAnnotationFile(newAl, wrongAnnFileRnaSSAlphaChars, DataSourceType.PASTE); - boolean mismatch = testRnaSSAnnotationsEquivalent(al.getAlignmentAnnotation()[0], + boolean mismatch = testRnaSSAnnotationsEquivalent( + al.getAlignmentAnnotation()[0], newAl.getAlignmentAnnotation()[0]); Assert.assertFalse(mismatch, "RNA SS Annotations SHOULD NOT be pair-wise equivalent (but apparently are): \n" @@ -780,8 +798,7 @@ public class StockholmFileTest } private static boolean testRnaSSAnnotationsEquivalent( - AlignmentAnnotation a1, - AlignmentAnnotation a2) + AlignmentAnnotation a1, AlignmentAnnotation a2) { return a1.rnaSecondaryStructureEquivalent(a2); } @@ -792,6 +809,7 @@ public class StockholmFileTest + "\n" + "ROWPROPERTIES\tSecondary Structure\tscaletofit=true\tshowalllabs=true\tcentrelabs=false\n" + "\n" + "\n" + "ALIGNMENT\tID=RNA.SS.TEST\tTP=RNA;"; + String annFileRnaSSWithoutSpaceChars = "JALVIEW_ANNOTATION\n" + "# Created: Thu Aug 02 14:54:57 BST 2018\n" + "\n" + "NO_GRAPH\tSecondary Structure\tSecondary Structure\t<,<|.,.|H,H|.,.|B,B|h,h|.,.|b,b|(,(|E,E|.,.|e,e|),)|>,>|\t2.0\n" @@ -841,8 +859,7 @@ public class StockholmFileTest jalview.io.FileFormat.Fasta); AnnotationFile afWithoutSpaces = new AnnotationFile(); afWithoutSpaces.readAnnotationFile(alWithoutSpaces, - annFileRnaSSWithoutSpaceChars, - DataSourceType.PASTE); + annFileRnaSSWithoutSpaceChars, DataSourceType.PASTE); Assert.assertTrue( testRnaSSAnnotationsEquivalent( @@ -862,8 +879,7 @@ public class StockholmFileTest jalview.io.FileFormat.Fasta); AnnotationFile wrongAfWithoutSpaces = new AnnotationFile(); wrongAfWithoutSpaces.readAnnotationFile(wrongAlWithoutSpaces, - wrongAnnFileRnaSSWithoutSpaceChars, - DataSourceType.PASTE); + wrongAnnFileRnaSSWithoutSpaceChars, DataSourceType.PASTE); Assert.assertFalse( testRnaSSAnnotationsEquivalent( diff --git a/test/jalview/io/TCoffeeScoreFileTest.java b/test/jalview/io/TCoffeeScoreFileTest.java index 38c9a89..278dd66 100644 --- a/test/jalview/io/TCoffeeScoreFileTest.java +++ b/test/jalview/io/TCoffeeScoreFileTest.java @@ -60,10 +60,9 @@ public class TCoffeeScoreFileTest Header header = scoreFile.header; AssertJUnit.assertNotNull(header); - AssertJUnit - .assertEquals( - "T-COFFEE, Version_9.02.r1228 (2012-02-16 18:15:12 - Revision 1228 - Build 336)", - header.head); + AssertJUnit.assertEquals( + "T-COFFEE, Version_9.02.r1228 (2012-02-16 18:15:12 - Revision 1228 - Build 336)", + header.head); AssertJUnit.assertEquals(90, header.score); AssertJUnit.assertEquals(89, header.getScoreFor("1PHT")); AssertJUnit.assertEquals(90, header.getScoreFor("1BB9")); @@ -156,42 +155,33 @@ public class TCoffeeScoreFileTest TCoffeeScoreFile parser = new TCoffeeScoreFile(SCORE_FILE.getPath(), DataSourceType.FILE); - AssertJUnit - .assertEquals( - "999999999999999999999999998762112222543211112134----------5666642367889999999999889", - parser.getScoresFor("1PHT")); - AssertJUnit - .assertEquals( - "99999999999999999999999999987-------4322----22341111111111676653-355679999999999889", - parser.getScoresFor("1BB9")); - AssertJUnit - .assertEquals( - "99999999999999999999999999987-------5321----2246----------788774--66789999999999889", - parser.getScoresFor("1UHC")); - AssertJUnit - .assertEquals( - "99999999999999999999999999986-------4321----1-35----------78777--356789999999999889", - parser.getScoresFor("1YCS")); - AssertJUnit - .assertEquals( - "999999999999999999999999999861-------3------1135----------78877--356789999999997-67", - parser.getScoresFor("1OOT")); - AssertJUnit - .assertEquals( - "99999999999999999999999999986-------422-------34----------687774--56779999999999889", - parser.getScoresFor("1ABO")); - AssertJUnit - .assertEquals( - "99999999999999999999999999985-------32--------35----------6888842356789999999999889", - parser.getScoresFor("1FYN")); - AssertJUnit - .assertEquals( - "99999999999999999999999999974-------2---------24----------6878742356789999999999889", - parser.getScoresFor("1QCF")); - AssertJUnit - .assertEquals( - "99999999999999999999999999985100011032110000113400100000006877641356789999999999889", - parser.getScoresFor("cons")); + AssertJUnit.assertEquals( + "999999999999999999999999998762112222543211112134----------5666642367889999999999889", + parser.getScoresFor("1PHT")); + AssertJUnit.assertEquals( + "99999999999999999999999999987-------4322----22341111111111676653-355679999999999889", + parser.getScoresFor("1BB9")); + AssertJUnit.assertEquals( + "99999999999999999999999999987-------5321----2246----------788774--66789999999999889", + parser.getScoresFor("1UHC")); + AssertJUnit.assertEquals( + "99999999999999999999999999986-------4321----1-35----------78777--356789999999999889", + parser.getScoresFor("1YCS")); + AssertJUnit.assertEquals( + "999999999999999999999999999861-------3------1135----------78877--356789999999997-67", + parser.getScoresFor("1OOT")); + AssertJUnit.assertEquals( + "99999999999999999999999999986-------422-------34----------687774--56779999999999889", + parser.getScoresFor("1ABO")); + AssertJUnit.assertEquals( + "99999999999999999999999999985-------32--------35----------6888842356789999999999889", + parser.getScoresFor("1FYN")); + AssertJUnit.assertEquals( + "99999999999999999999999999974-------2---------24----------6878742356789999999999889", + parser.getScoresFor("1QCF")); + AssertJUnit.assertEquals( + "99999999999999999999999999985100011032110000113400100000006877641356789999999999889", + parser.getScoresFor("cons")); } @Test(groups = { "Functional" }) @@ -202,42 +192,33 @@ public class TCoffeeScoreFileTest DataSourceType.FILE); AssertJUnit.assertTrue(parser.getWarningMessage(), parser.isValid()); List scores = parser.getScoresList(); - AssertJUnit - .assertEquals( - "999999999999999999999999998762112222543211112134----------5666642367889999999999889", - scores.get(0)); - AssertJUnit - .assertEquals( - "99999999999999999999999999987-------4322----22341111111111676653-355679999999999889", - scores.get(1)); - AssertJUnit - .assertEquals( - "99999999999999999999999999987-------5321----2246----------788774--66789999999999889", - scores.get(2)); - AssertJUnit - .assertEquals( - "99999999999999999999999999986-------4321----1-35----------78777--356789999999999889", - scores.get(3)); - AssertJUnit - .assertEquals( - "999999999999999999999999999861-------3------1135----------78877--356789999999997-67", - scores.get(4)); - AssertJUnit - .assertEquals( - "99999999999999999999999999986-------422-------34----------687774--56779999999999889", - scores.get(5)); - AssertJUnit - .assertEquals( - "99999999999999999999999999985-------32--------35----------6888842356789999999999889", - scores.get(6)); - AssertJUnit - .assertEquals( - "99999999999999999999999999974-------2---------24----------6878742356789999999999889", - scores.get(7)); - AssertJUnit - .assertEquals( - "99999999999999999999999999985100011032110000113400100000006877641356789999999999889", - scores.get(8)); + AssertJUnit.assertEquals( + "999999999999999999999999998762112222543211112134----------5666642367889999999999889", + scores.get(0)); + AssertJUnit.assertEquals( + "99999999999999999999999999987-------4322----22341111111111676653-355679999999999889", + scores.get(1)); + AssertJUnit.assertEquals( + "99999999999999999999999999987-------5321----2246----------788774--66789999999999889", + scores.get(2)); + AssertJUnit.assertEquals( + "99999999999999999999999999986-------4321----1-35----------78777--356789999999999889", + scores.get(3)); + AssertJUnit.assertEquals( + "999999999999999999999999999861-------3------1135----------78877--356789999999997-67", + scores.get(4)); + AssertJUnit.assertEquals( + "99999999999999999999999999986-------422-------34----------687774--56779999999999889", + scores.get(5)); + AssertJUnit.assertEquals( + "99999999999999999999999999985-------32--------35----------6888842356789999999999889", + scores.get(6)); + AssertJUnit.assertEquals( + "99999999999999999999999999974-------2---------24----------6878742356789999999999889", + scores.get(7)); + AssertJUnit.assertEquals( + "99999999999999999999999999985100011032110000113400100000006877641356789999999999889", + scores.get(8)); } @@ -276,7 +257,8 @@ public class TCoffeeScoreFileTest public void testHeightAndWidthWithResidueNumbers() throws Exception { String file = "test/jalview/io/tcoffee.score_ascii_with_residue_numbers"; - TCoffeeScoreFile result = new TCoffeeScoreFile(file, DataSourceType.FILE); + TCoffeeScoreFile result = new TCoffeeScoreFile(file, + DataSourceType.FILE); AssertJUnit.assertTrue(result.isValid()); AssertJUnit.assertEquals(5, result.getHeight()); AssertJUnit.assertEquals(84, result.getWidth()); diff --git a/test/jalview/io/cache/AppCacheTest.java b/test/jalview/io/cache/AppCacheTest.java index 5638028..41ac176 100644 --- a/test/jalview/io/cache/AppCacheTest.java +++ b/test/jalview/io/cache/AppCacheTest.java @@ -57,5 +57,4 @@ public class AppCacheTest appCache.updateCacheLimit(TEST_CACHE_KEY, 99); } - } diff --git a/test/jalview/io/gff/ExonerateHelperTest.java b/test/jalview/io/gff/ExonerateHelperTest.java index 825af24..49f574b 100644 --- a/test/jalview/io/gff/ExonerateHelperTest.java +++ b/test/jalview/io/gff/ExonerateHelperTest.java @@ -62,9 +62,8 @@ public class ExonerateHelperTest public void testGetMappingType() { // protein-to-dna: - assertSame(MappingType.PeptideToNucleotide, - ExonerateHelper - .getMappingType("exonerate:protein2genome:local")); + assertSame(MappingType.PeptideToNucleotide, ExonerateHelper + .getMappingType("exonerate:protein2genome:local")); assertSame(MappingType.PeptideToNucleotide, ExonerateHelper.getMappingType("exonerate:protein2dna:local")); @@ -117,11 +116,11 @@ public class ExonerateHelperTest assertSame(newseqs.get(0), mapping.getdnaSeqs()[0]); assertEquals(1, mapping.getdnaToProt().length); assertEquals(1, mapping.getdnaToProt()[0].getFromRanges().size()); - assertArrayEquals(new int[] { 400, 423 }, mapping.getdnaToProt()[0] - .getFromRanges().get(0)); + assertArrayEquals(new int[] { 400, 423 }, + mapping.getdnaToProt()[0].getFromRanges().get(0)); assertEquals(1, mapping.getdnaToProt()[0].getToRanges().size()); - assertArrayEquals(new int[] { 3, 10 }, mapping.getdnaToProt()[0] - .getToRanges().get(0)); + assertArrayEquals(new int[] { 3, 10 }, + mapping.getdnaToProt()[0].getToRanges().get(0)); } /** @@ -160,11 +159,11 @@ public class ExonerateHelperTest assertSame(newseqs.get(0), mapping.getdnaSeqs()[0]); assertEquals(1, mapping.getdnaToProt().length); assertEquals(1, mapping.getdnaToProt()[0].getFromRanges().size()); - assertArrayEquals(new int[] { 400, 377 }, mapping.getdnaToProt()[0] - .getFromRanges().get(0)); + assertArrayEquals(new int[] { 400, 377 }, + mapping.getdnaToProt()[0].getFromRanges().get(0)); assertEquals(1, mapping.getdnaToProt()[0].getToRanges().size()); - assertArrayEquals(new int[] { 3, 10 }, mapping.getdnaToProt()[0] - .getToRanges().get(0)); + assertArrayEquals(new int[] { 3, 10 }, + mapping.getdnaToProt()[0].getToRanges().get(0)); } /** @@ -206,11 +205,11 @@ public class ExonerateHelperTest assertEquals(1, mapping.getdnaSeqs().length); assertEquals(1, mapping.getdnaToProt().length); assertEquals(1, mapping.getdnaToProt()[0].getFromRanges().size()); - assertArrayEquals(new int[] { 400, 423 }, mapping.getdnaToProt()[0] - .getFromRanges().get(0)); + assertArrayEquals(new int[] { 400, 423 }, + mapping.getdnaToProt()[0].getFromRanges().get(0)); assertEquals(1, mapping.getdnaToProt()[0].getToRanges().size()); - assertArrayEquals(new int[] { 3, 10 }, mapping.getdnaToProt()[0] - .getToRanges().get(0)); + assertArrayEquals(new int[] { 3, 10 }, + mapping.getdnaToProt()[0].getToRanges().get(0)); } /** @@ -252,11 +251,11 @@ public class ExonerateHelperTest assertEquals(1, mapping.getdnaSeqs().length); assertEquals(1, mapping.getdnaToProt().length); assertEquals(1, mapping.getdnaToProt()[0].getFromRanges().size()); - assertArrayEquals(new int[] { 400, 377 }, mapping.getdnaToProt()[0] - .getFromRanges().get(0)); + assertArrayEquals(new int[] { 400, 377 }, + mapping.getdnaToProt()[0].getFromRanges().get(0)); assertEquals(1, mapping.getdnaToProt()[0].getToRanges().size()); - assertArrayEquals(new int[] { 3, 10 }, mapping.getdnaToProt()[0] - .getToRanges().get(0)); + assertArrayEquals(new int[] { 3, 10 }, + mapping.getdnaToProt()[0].getToRanges().get(0)); } /** @@ -268,20 +267,19 @@ public class ExonerateHelperTest { FileLoader loader = new FileLoader(false); AlignFrame af = loader.LoadFileWaitTillLoaded( - "examples/testdata/exonerateseqs.fa", - DataSourceType.FILE); - + "examples/testdata/exonerateseqs.fa", DataSourceType.FILE); + af.loadJalviewDataFile("examples/testdata/exonerateoutput.gff", DataSourceType.FILE, null, null); - + /* * verify one mapping to a dummy sequence, one to a real one */ - List mappings = af - .getViewport().getAlignment().getDataset().getCodonFrames(); + List mappings = af.getViewport().getAlignment() + .getDataset().getCodonFrames(); assertEquals(2, mappings.size()); Iterator iter = mappings.iterator(); - + // first mapping is to dummy sequence AlignedCodonFrame mapping = iter.next(); Mapping[] mapList = mapping.getProtMappings(); @@ -292,7 +290,7 @@ public class ExonerateHelperTest // 143 in protein should map to codon [11270, 11269, 11268] in dna int[] mappedRegion = mapList[0].getMap().locateInFrom(143, 143); assertArrayEquals(new int[] { 11270, 11268 }, mappedRegion); - + // second mapping is to a sequence in the alignment mapping = iter.next(); mapList = mapping.getProtMappings(); @@ -301,23 +299,23 @@ public class ExonerateHelperTest .findName("DDB_G0280897"); assertSame(proteinSeq.getDatasetSequence(), mapList[0].getTo()); assertEquals(1, mapping.getdnaToProt().length); - + // 143 in protein should map to codon [11270, 11269, 11268] in dna mappedRegion = mapList[0].getMap().locateInFrom(143, 143); assertArrayEquals(new int[] { 11270, 11268 }, mappedRegion); - + // 182 in protein should map to codon [11153, 11152, 11151] in dna mappedRegion = mapList[0].getMap().locateInFrom(182, 182); assertArrayEquals(new int[] { 11153, 11151 }, mappedRegion); - + // and the reverse mapping: mappedRegion = mapList[0].getMap().locateInTo(11151, 11153); assertArrayEquals(new int[] { 182, 182 }, mappedRegion); - + // 11150 in dna should _not_ map to protein mappedRegion = mapList[0].getMap().locateInTo(11150, 11150); assertNull(mappedRegion); - + // similarly 183 in protein should _not_ map to dna mappedRegion = mapList[0].getMap().locateInFrom(183, 183); assertNull(mappedRegion); diff --git a/test/jalview/io/gff/Gff3HelperTest.java b/test/jalview/io/gff/Gff3HelperTest.java index cd5a0d8..5660666 100644 --- a/test/jalview/io/gff/Gff3HelperTest.java +++ b/test/jalview/io/gff/Gff3HelperTest.java @@ -94,11 +94,11 @@ public class Gff3HelperTest assertSame(newseqs.get(0), mapping.getAaSeqs()[0]); assertEquals(1, mapping.getdnaToProt().length); assertEquals(1, mapping.getdnaToProt()[0].getFromRanges().size()); - assertArrayEquals(new int[] { 12923, 13060 }, mapping.getdnaToProt()[0] - .getFromRanges().get(0)); + assertArrayEquals(new int[] { 12923, 13060 }, + mapping.getdnaToProt()[0].getFromRanges().get(0)); assertEquals(1, mapping.getdnaToProt()[0].getToRanges().size()); - assertArrayEquals(new int[] { 1, 138 }, mapping.getdnaToProt()[0] - .getToRanges().get(0)); + assertArrayEquals(new int[] { 1, 138 }, + mapping.getdnaToProt()[0].getToRanges().get(0)); } /** @@ -141,11 +141,11 @@ public class Gff3HelperTest assertSame(newseqs.get(0), mapping.getAaSeqs()[0]); assertEquals(1, mapping.getdnaToProt().length); assertEquals(1, mapping.getdnaToProt()[0].getFromRanges().size()); - assertArrayEquals(new int[] { 12923, 13060 }, mapping.getdnaToProt()[0] - .getFromRanges().get(0)); + assertArrayEquals(new int[] { 12923, 13060 }, + mapping.getdnaToProt()[0].getFromRanges().get(0)); assertEquals(1, mapping.getdnaToProt()[0].getToRanges().size()); - assertArrayEquals(new int[] { 138, 1 }, mapping.getdnaToProt()[0] - .getToRanges().get(0)); + assertArrayEquals(new int[] { 138, 1 }, + mapping.getdnaToProt()[0].getToRanges().get(0)); } /** @@ -223,14 +223,14 @@ public class Gff3HelperTest assertEquals(1, mapping.getdnaToProt().length); assertEquals(2, mapping.getdnaToProt()[0].getFromRanges().size()); // the two spliced dna ranges are combined in one MapList - assertArrayEquals(new int[] { 12923, 13060 }, mapping.getdnaToProt()[0] - .getFromRanges().get(0)); - assertArrayEquals(new int[] { 13411, 13550 }, mapping.getdnaToProt()[0] - .getFromRanges().get(1)); + assertArrayEquals(new int[] { 12923, 13060 }, + mapping.getdnaToProt()[0].getFromRanges().get(0)); + assertArrayEquals(new int[] { 13411, 13550 }, + mapping.getdnaToProt()[0].getFromRanges().get(1)); assertEquals(1, mapping.getdnaToProt()[0].getToRanges().size()); // the two cdna ranges are merged into one contiguous region - assertArrayEquals(new int[] { 1, 278 }, mapping.getdnaToProt()[0] - .getToRanges().get(0)); + assertArrayEquals(new int[] { 1, 278 }, + mapping.getdnaToProt()[0].getToRanges().get(0)); } @Test(groups = "Functional") @@ -252,7 +252,8 @@ public class Gff3HelperTest // Ensembl variant feature - extract "alleles" value // may be sequence_variant or a sub-type in the sequence ontology - sf = new SequenceFeature("feature_variant", "desc", 10, 20, 3f, "group"); + sf = new SequenceFeature("feature_variant", "desc", 10, 20, 3f, + "group"); List atts = new ArrayList(); atts.add("A"); atts.add("C"); diff --git a/test/jalview/io/gff/GffHelperBaseTest.java b/test/jalview/io/gff/GffHelperBaseTest.java index a23518d..5bd60a8 100644 --- a/test/jalview/io/gff/GffHelperBaseTest.java +++ b/test/jalview/io/gff/GffHelperBaseTest.java @@ -53,21 +53,20 @@ public class GffHelperBaseTest { assertTrue(GffHelperBase.parseNameValuePairs(null, ";", ' ', ",") .isEmpty()); - assertTrue(GffHelperBase.parseNameValuePairs("", ";", ' ', ",") - .isEmpty()); - assertTrue(GffHelperBase.parseNameValuePairs("hello=world", ";", ' ', - ",").isEmpty()); + assertTrue( + GffHelperBase.parseNameValuePairs("", ";", ' ', ",").isEmpty()); + assertTrue(GffHelperBase + .parseNameValuePairs("hello=world", ";", ' ', ",").isEmpty()); - Map> map = GffHelperBase.parseNameValuePairs( - "hello world", ";", ' ', ", "); + Map> map = GffHelperBase + .parseNameValuePairs("hello world", ";", ' ', ", "); assertEquals(map.size(), 1); assertEquals(map.get("hello").size(), 1); assertEquals(map.get("hello").get(0), "world"); - map = GffHelperBase - .parseNameValuePairs( - "Method= manual curation ;nothing; Notes=F2 S ; Notes=Metal,Shiny%2Csmooth; Type=", - ";", '=', ","); + map = GffHelperBase.parseNameValuePairs( + "Method= manual curation ;nothing; Notes=F2 S ; Notes=Metal,Shiny%2Csmooth; Type=", + ";", '=', ","); // Type is ignored as no value was supplied assertEquals(map.size(), 2); diff --git a/test/jalview/io/gff/GffHelperFactoryTest.java b/test/jalview/io/gff/GffHelperFactoryTest.java index 84725ff..f607cd1 100644 --- a/test/jalview/io/gff/GffHelperFactoryTest.java +++ b/test/jalview/io/gff/GffHelperFactoryTest.java @@ -51,7 +51,8 @@ public class GffHelperFactoryTest */ String gff = "submitted\taffine:local\tsimilarity\t20\t30\t99\t+\t.\t"; // no attributes (column 9 data): - assertTrue(GffHelperFactory.getHelper(gff.split(tabRegex)) instanceof Gff2Helper); + assertTrue(GffHelperFactory + .getHelper(gff.split(tabRegex)) instanceof Gff2Helper); // attributes set but unhandled featureGroup - get generic handler gff = "submitted\taffine:local\tsimilarity\t20\t30\t99\t+\t.\tID=$1"; @@ -60,32 +61,40 @@ public class GffHelperFactoryTest // handled featureGroup (exonerate model) values gff = "submitted\texonerate:protein2dna:local\tsimilarity\t20\t30\t99\t+\t.\tID=$1"; - assertTrue(GffHelperFactory.getHelper(gff.split(tabRegex)) instanceof ExonerateHelper); + assertTrue(GffHelperFactory + .getHelper(gff.split(tabRegex)) instanceof ExonerateHelper); gff = "submitted\tprotein2genome\tsimilarity\t20\t30\t99\t+\t.\tID=$1"; - assertTrue(GffHelperFactory.getHelper(gff.split(tabRegex)) instanceof ExonerateHelper); + assertTrue(GffHelperFactory + .getHelper(gff.split(tabRegex)) instanceof ExonerateHelper); gff = "submitted\tcoding2coding\tsimilarity\t20\t30\t99\t+\t.\tID=$1"; - assertTrue(GffHelperFactory.getHelper(gff.split(tabRegex)) instanceof ExonerateHelper); + assertTrue(GffHelperFactory + .getHelper(gff.split(tabRegex)) instanceof ExonerateHelper); gff = "submitted\tcoding2genome\tsimilarity\t20\t30\t99\t+\t.\tID=$1"; - assertTrue(GffHelperFactory.getHelper(gff.split(tabRegex)) instanceof ExonerateHelper); + assertTrue(GffHelperFactory + .getHelper(gff.split(tabRegex)) instanceof ExonerateHelper); gff = "submitted\tcdna2genome\tsimilarity\t20\t30\t99\t+\t.\tID=$1"; - assertTrue(GffHelperFactory.getHelper(gff.split(tabRegex)) instanceof ExonerateHelper); + assertTrue(GffHelperFactory + .getHelper(gff.split(tabRegex)) instanceof ExonerateHelper); gff = "submitted\tgenome2genome\tsimilarity\t20\t30\t99\t+\t.\tID=$1"; - assertTrue(GffHelperFactory.getHelper(gff.split(tabRegex)) instanceof ExonerateHelper); + assertTrue(GffHelperFactory + .getHelper(gff.split(tabRegex)) instanceof ExonerateHelper); // not case-sensitive: gff = "submitted\tgenome2genome\tSIMILARITY\t20\t30\t99\t+\t.\tID=$1"; - assertTrue(GffHelperFactory.getHelper(gff.split(tabRegex)) instanceof ExonerateHelper); + assertTrue(GffHelperFactory + .getHelper(gff.split(tabRegex)) instanceof ExonerateHelper); /* * InterProScan has 'protein_match' in column 3 */ gff = "Submitted\tPANTHER\tprotein_match\t1\t1174\t0.0\t+\t.\tName=PTHR32154"; - assertTrue(GffHelperFactory.getHelper(gff.split(tabRegex)) instanceof InterProScanHelper); + assertTrue(GffHelperFactory + .getHelper(gff.split(tabRegex)) instanceof InterProScanHelper); /* * nothing specific - return the generic GFF3 class if Name=Value is present in col9 diff --git a/test/jalview/io/gff/GffTests.java b/test/jalview/io/gff/GffTests.java index 393f2ce..0bfb033 100644 --- a/test/jalview/io/gff/GffTests.java +++ b/test/jalview/io/gff/GffTests.java @@ -66,8 +66,8 @@ public class GffTests public void testResolveExonerateGff() { String proteinSeq = ">prot1/10-16\nYCWRSGA"; - AlignFrame af = new FileLoader(false).LoadFileWaitTillLoaded( - proteinSeq, DataSourceType.PASTE); + AlignFrame af = new FileLoader(false).LoadFileWaitTillLoaded(proteinSeq, + DataSourceType.PASTE); /* * exonerate GFF output mapping residues 11-15 (CWRSG) diff --git a/test/jalview/io/gff/InterProScanHelperTest.java b/test/jalview/io/gff/InterProScanHelperTest.java index dde83a3..1d08a4c 100644 --- a/test/jalview/io/gff/InterProScanHelperTest.java +++ b/test/jalview/io/gff/InterProScanHelperTest.java @@ -102,11 +102,11 @@ public class InterProScanHelperTest assertSame(newseqs.get(0), mapping.getAaSeqs()[0]); assertEquals(1, mapping.getdnaToProt().length); assertEquals(1, mapping.getdnaToProt()[0].getFromRanges().size()); - assertArrayEquals(new int[] { 5, 30 }, mapping.getdnaToProt()[0] - .getFromRanges().get(0)); + assertArrayEquals(new int[] { 5, 30 }, + mapping.getdnaToProt()[0].getFromRanges().get(0)); assertEquals(1, mapping.getdnaToProt()[0].getToRanges().size()); - assertArrayEquals(new int[] { 1, 26 }, mapping.getdnaToProt()[0] - .getToRanges().get(0)); + assertArrayEquals(new int[] { 1, 26 }, + mapping.getdnaToProt()[0].getToRanges().get(0)); } } diff --git a/test/jalview/io/vcf/VCFLoaderTest.java b/test/jalview/io/vcf/VCFLoaderTest.java index a2bb08e..f512d0b 100644 --- a/test/jalview/io/vcf/VCFLoaderTest.java +++ b/test/jalview/io/vcf/VCFLoaderTest.java @@ -36,11 +36,10 @@ public class VCFLoaderTest private static final float DELTA = 0.00001f; // columns 9717- of gene P30419 from Ensembl (much modified) - private static final String FASTA = "" - + - /* - * forward strand 'gene' and 'transcript' with two exons - */ + private static final String FASTA = "" + + /* + * forward strand 'gene' and 'transcript' with two exons + */ ">gene1/1-25 chromosome:GRCh38:17:45051610:45051634:1\n" + "CAAGCTGGCGGACGAGAGTGTGACA\n" + ">transcript1/1-18\n--AGCTGGCG----AGAGTGTGAC-\n" @@ -49,8 +48,8 @@ public class VCFLoaderTest * reverse strand gene and transcript (reverse complement alleles!) */ + ">gene2/1-25 chromosome:GRCh38:17:45051610:45051634:-1\n" - + "TGTCACACTCTCGTCCGCCAGCTTG\n" - + ">transcript2/1-18\n" + "-GTCACACTCT----CGCCAGCT--\n" + + "TGTCACACTCTCGTCCGCCAGCTTG\n" + ">transcript2/1-18\n" + + "-GTCACACTCT----CGCCAGCT--\n" /* * 'gene' on chromosome 5 with two transcripts @@ -61,7 +60,8 @@ public class VCFLoaderTest + ">transcript4/1-18\n-----TGG-GGACGAGAGTGTGA-A\n"; private static final String[] VCF = { "##fileformat=VCFv4.2", - // fields other than AF are ignored when parsing as they have no INFO definition + // fields other than AF are ignored when parsing as they have no INFO + // definition "##INFO=", "##INFO= seqlist = new ArrayList<>(); seqlist.add(seq); @@ -178,10 +168,10 @@ public class OverviewResColourFinderTest al.addGroup(sg); SequenceGroup[] groups = new SequenceGroup[1]; groups[0] = sg; - + final AlignViewport av = new AlignViewport(al); ResidueColourFinder rcf = new OverviewResColourFinder(); - + // G in group specified as magenta in Zappo assertEquals(Color.magenta, rcf.getResidueColour(false, av.getResidueShading(), groups, seq, 7, null)); @@ -196,7 +186,7 @@ public class OverviewResColourFinderTest // use legacy colouring rcf = new OverviewResColourFinder(true, Color.blue, Color.red); - + // G in group specified as magenta in Zappo assertEquals(Color.magenta, rcf.getResidueColour(false, av.getResidueShading(), groups, seq, 7, null)); diff --git a/test/jalview/renderer/ResidueColourFinderTest.java b/test/jalview/renderer/ResidueColourFinderTest.java index 81fb2c0..d8efc02 100644 --- a/test/jalview/renderer/ResidueColourFinderTest.java +++ b/test/jalview/renderer/ResidueColourFinderTest.java @@ -56,19 +56,14 @@ public class ResidueColourFinderTest av.setGlobalColourScheme(new ZappoColourScheme()); // @see ResidueProperties.zappo - assertEquals(Color.pink, - rcf.getResidueColour(true, av.getResidueShading(), null, seq, 0, - null)); // M - assertEquals(Color.green, - rcf.getResidueColour(true, av.getResidueShading(), null, seq, 2, - null)); // T - assertEquals(Color.magenta, - rcf.getResidueColour(true, av.getResidueShading(), null, seq, 5, - null)); // G - assertEquals(Color.orange, - rcf.getResidueColour(true, av.getResidueShading(), null, seq, - 12, - null)); // F + assertEquals(Color.pink, rcf.getResidueColour(true, + av.getResidueShading(), null, seq, 0, null)); // M + assertEquals(Color.green, rcf.getResidueColour(true, + av.getResidueShading(), null, seq, 2, null)); // T + assertEquals(Color.magenta, rcf.getResidueColour(true, + av.getResidueShading(), null, seq, 5, null)); // G + assertEquals(Color.orange, rcf.getResidueColour(true, + av.getResidueShading(), null, seq, 12, null)); // F // everything is white if showBoxes is false assertEquals(Color.white, rcf.getResidueColour(false, @@ -89,12 +84,10 @@ public class ResidueColourFinderTest final AlignViewport av = new AlignViewport(al); ResidueColourFinder rcf = new ResidueColourFinder(); - assertEquals(Color.white, - rcf.getResidueColour(true, av.getResidueShading(), - null, seq, 0, null)); - assertEquals(Color.white, - rcf.getResidueColour(true, av.getResidueShading(), - null, seq, 2, null)); + assertEquals(Color.white, rcf.getResidueColour(true, + av.getResidueShading(), null, seq, 0, null)); + assertEquals(Color.white, rcf.getResidueColour(true, + av.getResidueShading(), null, seq, 2, null)); // no change if showBoxes is false assertEquals(Color.white, rcf.getResidueColour(false, @@ -130,14 +123,12 @@ public class ResidueColourFinderTest // gap colour specified as pink assertEquals(Color.pink, rcf.getResidueColour(true, - av.getResidueShading(), - null, seq, 3, null)); + av.getResidueShading(), null, seq, 3, null)); // everything is white if showBoxes is false newColours[23] = null; assertEquals(Color.white, rcf.getResidueColour(false, - av.getResidueShading(), - null, seq, 3, null)); + av.getResidueShading(), null, seq, 3, null)); newColours[23] = Color.pink; av.setGlobalColourScheme(new UserColourScheme(newColours)); diff --git a/test/jalview/renderer/ResidueShaderTest.java b/test/jalview/renderer/ResidueShaderTest.java index eba5f59..df94d8c 100644 --- a/test/jalview/renderer/ResidueShaderTest.java +++ b/test/jalview/renderer/ResidueShaderTest.java @@ -161,9 +161,12 @@ public class ResidueShaderTest assertEquals(Color.WHITE, ccs.applyConservation(colour, 4)); assertEquals(Color.WHITE, ccs.applyConservation(colour, 5)); assertEquals(Color.WHITE, ccs.applyConservation(colour, 6)); - assertEquals(new Color(235, 225, 215), ccs.applyConservation(colour, 7)); - assertEquals(new Color(215, 195, 175), ccs.applyConservation(colour, 8)); - assertEquals(new Color(195, 165, 135), ccs.applyConservation(colour, 9)); + assertEquals(new Color(235, 225, 215), + ccs.applyConservation(colour, 7)); + assertEquals(new Color(215, 195, 175), + ccs.applyConservation(colour, 8)); + assertEquals(new Color(195, 165, 135), + ccs.applyConservation(colour, 9)); assertEquals(colour, ccs.applyConservation(colour, 10)); assertEquals(colour, ccs.applyConservation(colour, 11)); assertEquals(Color.WHITE, ccs.applyConservation(colour, 12)); @@ -186,10 +189,10 @@ public class ResidueShaderTest colours[23] = Color.red; // gap colour ColourSchemeI cs = new UserColourScheme(colours); rs = new ResidueShader(cs); - + assertEquals(Color.red, rs.findColour(' ', 7, null)); assertEquals(Color.blue, rs.findColour('Q', 7, null)); - + /* * stub Conservation to return a given consensus string */ @@ -204,14 +207,14 @@ public class ResidueShaderTest } }; rs.setConservation(cons); - + /* * with 0% threshold, there should be no fading */ rs.setConservationInc(0); assertEquals(Color.red, rs.findColour(' ', 7, null)); assertEquals(Color.blue, rs.findColour('Q', 7, null)); - + /* * with 40% threshold, 'fade factor' is * (11-score)/10 * 40/20 = (11-score)/5 @@ -261,12 +264,14 @@ public class ResidueShaderTest protected ProfilesI getStubConsensus(final String modalResidue, final float pid) { - ProfilesI consensus = new ProfilesI() { + ProfilesI consensus = new ProfilesI() + { @Override public ProfileI get(int i) { - return new ProfileI() { + return new ProfileI() + { @Override public void setCounts(ResidueCount residueCounts) { @@ -312,7 +317,8 @@ public class ResidueShaderTest public int getNonGapped() { return 0; - }}; + } + }; } @Override @@ -326,7 +332,7 @@ public class ResidueShaderTest { return 0; } - + }; return consensus; } diff --git a/test/jalview/renderer/seqfeatures/FeatureColourFinderTest.java b/test/jalview/renderer/seqfeatures/FeatureColourFinderTest.java index 6b1fbd2..fe77dd2 100644 --- a/test/jalview/renderer/seqfeatures/FeatureColourFinderTest.java +++ b/test/jalview/renderer/seqfeatures/FeatureColourFinderTest.java @@ -58,8 +58,7 @@ public class FeatureColourFinderTest { // aligned column 8 is sequence position 6 String s = ">s1\nABCDE---FGHIJKLMNOPQRSTUVWXYZ\n"; - af = new FileLoader().LoadFileWaitTillLoaded(s, - DataSourceType.PASTE); + af = new FileLoader().LoadFileWaitTillLoaded(s, DataSourceType.PASTE); av = af.getViewport(); seq = av.getAlignment().getSequenceAt(0); fr = af.getFeatureRenderer(); @@ -134,8 +133,8 @@ public class FeatureColourFinderTest @Test(groups = "Functional") public void testFindFeatureColour_gapPosition() { - seq.addSequenceFeature(new SequenceFeature("Metal", "Metal", 2, 12, 0f, - null)); + seq.addSequenceFeature( + new SequenceFeature("Metal", "Metal", 2, 12, 0f, null)); fr.setColour("Metal", new FeatureColour(Color.red)); fr.featuresAdded(); av.setShowSequenceFeatures(true); @@ -265,8 +264,8 @@ public class FeatureColourFinderTest /* * currently contact feature == type "Disulphide Bond" or "Disulfide Bond" !! */ - seq.addSequenceFeature(new SequenceFeature("Disulphide Bond", - "Contact", 2, 12, Float.NaN, "Disulphide")); + seq.addSequenceFeature(new SequenceFeature("Disulphide Bond", "Contact", + 2, 12, Float.NaN, "Disulphide")); fr.setColour("Disulphide Bond", new FeatureColour(Color.red)); fr.featuresAdded(); av.setShowSequenceFeatures(true); @@ -311,12 +310,12 @@ public class FeatureColourFinderTest @Test(groups = "Functional") public void testFindFeatureColour_graduatedFeatureColour() { - seq.addSequenceFeature(new SequenceFeature("kd", "hydrophobicity", 2, - 2, 0f, "KdGroup")); - seq.addSequenceFeature(new SequenceFeature("kd", "hydrophobicity", 4, - 4, 5f, "KdGroup")); - seq.addSequenceFeature(new SequenceFeature("kd", "hydrophobicity", 7, - 7, 10f, "KdGroup")); + seq.addSequenceFeature(new SequenceFeature("kd", "hydrophobicity", 2, 2, + 0f, "KdGroup")); + seq.addSequenceFeature(new SequenceFeature("kd", "hydrophobicity", 4, 4, + 5f, "KdGroup")); + seq.addSequenceFeature(new SequenceFeature("kd", "hydrophobicity", 7, 7, + 10f, "KdGroup")); /* * graduated colour from 0 to 10 @@ -356,7 +355,7 @@ public class FeatureColourFinderTest fr.setColour("Metal", red); fr.featuresAdded(); av.setShowSequenceFeatures(true); - + /* * the FeatureSettings transparency slider has range 0-70 which * corresponds to a transparency value of 1 - 0.3 @@ -382,7 +381,7 @@ public class FeatureColourFinderTest fr.setColour("Domain", green); fr.featuresAdded(); av.setShowSequenceFeatures(true); - + /* * Domain (green) rendered above Metal (red) above background (cyan) * 1) 0.6 * red(255, 0, 0) + 0.4 * cyan(0, 255, 255) = (153, 102, 102) @@ -391,7 +390,7 @@ public class FeatureColourFinderTest fr.setTransparency(0.6f); Color c = finder.findFeatureColour(Color.cyan, seq, 10); assertEquals(c, new Color(61, 194, 41)); - + /* * now promote Metal above Domain * - currently no way other than mimicking reordering of @@ -406,7 +405,7 @@ public class FeatureColourFinderTest fr.setFeaturePriority(data); c = finder.findFeatureColour(Color.cyan, seq, 10); assertEquals(c, new Color(153, 102, 41)); - + /* * ..and turn off display of Metal * Domain (green) above background (pink) @@ -478,15 +477,15 @@ public class FeatureColourFinderTest { String kdFeature = "kd"; String metalFeature = "Metal"; - seq.addSequenceFeature(new SequenceFeature(kdFeature, "hydrophobicity", 2, - 2, 0f, "KdGroup")); - seq.addSequenceFeature(new SequenceFeature(kdFeature, "hydrophobicity", 4, - 4, 5f, "KdGroup")); - seq.addSequenceFeature(new SequenceFeature(metalFeature, "Fe", 4, 4, - 5f, "MetalGroup")); - seq.addSequenceFeature(new SequenceFeature(kdFeature, "hydrophobicity", 7, - 7, 10f, "KdGroup")); - + seq.addSequenceFeature(new SequenceFeature(kdFeature, "hydrophobicity", + 2, 2, 0f, "KdGroup")); + seq.addSequenceFeature(new SequenceFeature(kdFeature, "hydrophobicity", + 4, 4, 5f, "KdGroup")); + seq.addSequenceFeature(new SequenceFeature(metalFeature, "Fe", 4, 4, 5f, + "MetalGroup")); + seq.addSequenceFeature(new SequenceFeature(kdFeature, "hydrophobicity", + 7, 7, 10f, "KdGroup")); + /* * kd feature has graduated colour from 0 to 10 * above threshold value of 5 @@ -510,7 +509,7 @@ public class FeatureColourFinderTest fr.setFeaturePriority(data); av.setShowSequenceFeatures(true); - + /* * position 2, column 1, score 0 - below threshold - default colour */ @@ -523,7 +522,7 @@ public class FeatureColourFinderTest */ c = finder.findFeatureColour(Color.blue, seq, 3); assertEquals(c, Color.green); - + /* * position 7, column 9, score 10 - maximum colour in range */ diff --git a/test/jalview/renderer/seqfeatures/FeatureRendererTest.java b/test/jalview/renderer/seqfeatures/FeatureRendererTest.java index 2e04ecb..a3d0a7c 100644 --- a/test/jalview/renderer/seqfeatures/FeatureRendererTest.java +++ b/test/jalview/renderer/seqfeatures/FeatureRendererTest.java @@ -463,7 +463,8 @@ public class FeatureRendererTest gc = new FeatureColour(Color.red, Color.yellow, Color.red, Color.green, 5f, 11f); fr.getFeatureColours().put("Cath", gc); - gc.setAutoScaled(false); // this does little other than save a checkbox setting! + gc.setAutoScaled(false); // this does little other than save a checkbox + // setting! assertEquals(fr.getColour(sf2), new Color(255, 213, 0)); /* @@ -649,7 +650,7 @@ public class FeatureRendererTest SequenceFeature sf2 = new SequenceFeature("sequence_variant", "C, CA", 3, 3, "ensembl"); seq1.addSequenceFeature(sf2); - + /* * 'find' mapped features from the peptide position * - first with CDS features _not_ shown on peptide alignment diff --git a/test/jalview/schemes/AnnotationColourGradientTest.java b/test/jalview/schemes/AnnotationColourGradientTest.java index c56da59..3c49ec2 100644 --- a/test/jalview/schemes/AnnotationColourGradientTest.java +++ b/test/jalview/schemes/AnnotationColourGradientTest.java @@ -50,8 +50,8 @@ public class AnnotationColourGradientTest } seq = new Sequence("Seq", ""); - al = new Alignment(new SequenceI[]{ seq}); - + al = new Alignment(new SequenceI[] { seq }); + /* * AlignmentAnnotation constructor works out min-max range */ @@ -217,12 +217,10 @@ public class AnnotationColourGradientTest * expect white at or below threshold of 5 */ Color expected = col <= 5 ? Color.white - : new Color(50 + 10 * col, - 200 - 10 * col, - 150 + 10 * col); + : new Color(50 + 10 * col, 200 - 10 * col, 150 + 10 * col); assertEquals(result, expected, "for column " + col); } - + /* * now make 6-10 the span of the colour range * (annotation value == column number in this test) @@ -236,9 +234,8 @@ public class AnnotationColourGradientTest */ int factor = col - THRESHOLD_FIVE; Color expected = col <= 5 ? Color.white - : new Color(50 + 20 * factor, - 200 - 20 * factor, - 150 + 20 * factor); + : new Color(50 + 20 * factor, 200 - 20 * factor, + 150 + 20 * factor); Color result = testee.findColour('a', col, seq); assertEquals(result, expected, "for column " + col); } @@ -253,16 +250,15 @@ public class AnnotationColourGradientTest AnnotationColourGradient testee = new AnnotationColourGradient(ann, minColour, maxColour, AnnotationColourGradient.BELOW_THRESHOLD); testee = (AnnotationColourGradient) testee.getInstance(null, al); - + for (int col = 0; col < WIDTH; col++) { Color result = testee.findColour('a', col, seq); Color expected = col >= 5 ? Color.white - : new Color(50 + 10 * col, - 200 - 10 * col, 150 + 10 * col); + : new Color(50 + 10 * col, 200 - 10 * col, 150 + 10 * col); assertEquals(result, expected, "for column " + col); } - + /* * now make 0-5 the span of the colour range * (annotation value == column number in this test) @@ -275,8 +271,7 @@ public class AnnotationColourGradientTest * range is 0-5 so steps of 100/5 = 20 */ Color expected = col >= 5 ? Color.white - : new Color(50 + 20 * col, - 200 - 20 * col, 150 + 20 * col); + : new Color(50 + 20 * col, 200 - 20 * col, 150 + 20 * col); Color result = testee.findColour('a', col, seq); assertEquals(result, expected, "for column " + col); } @@ -322,7 +317,8 @@ public class AnnotationColourGradientTest { int hue = col * 20; Color c = col == 0 ? minColour : new Color(hue, hue, hue); - assertEquals(testee.findColour('a', col, seq), c, "for column " + col); + assertEquals(testee.findColour('a', col, seq), c, + "for column " + col); } } } diff --git a/test/jalview/schemes/Blosum62ColourSchemeTest.java b/test/jalview/schemes/Blosum62ColourSchemeTest.java index 030a90f..1696bf6 100644 --- a/test/jalview/schemes/Blosum62ColourSchemeTest.java +++ b/test/jalview/schemes/Blosum62ColourSchemeTest.java @@ -14,7 +14,8 @@ public class Blosum62ColourSchemeTest *
      • white if there is no consensus
      • *
      • white if 'residue' is a gap
      • *
      • dark blue if residue matches consensus (or joint consensus)
      • - *
      • else, total the residue's Blosum score with the consensus residue(s)
      • + *
      • else, total the residue's Blosum score with the consensus + * residue(s)
      • *
          *
        • if positive, light blue, else white
        • *
        diff --git a/test/jalview/schemes/ClustalxColourSchemeTest.java b/test/jalview/schemes/ClustalxColourSchemeTest.java index d35ca76..a4c2613 100644 --- a/test/jalview/schemes/ClustalxColourSchemeTest.java +++ b/test/jalview/schemes/ClustalxColourSchemeTest.java @@ -87,7 +87,7 @@ public class ClustalxColourSchemeTest } // @formatter:on - + /** * Test for colour calculation when the consensus percentage ignores gapped * sequences @@ -107,7 +107,7 @@ public class ClustalxColourSchemeTest DataSourceType.PASTE); AlignmentI al = af.getViewport().getAlignment(); ClustalxColourScheme cs = new ClustalxColourScheme(al, null); - + /* * column 1 is 66% C which is above Clustalx threshold of 60% */ diff --git a/test/jalview/schemes/ColourSchemePropertyTest.java b/test/jalview/schemes/ColourSchemePropertyTest.java index f71d647..764da91 100644 --- a/test/jalview/schemes/ColourSchemePropertyTest.java +++ b/test/jalview/schemes/ColourSchemePropertyTest.java @@ -124,7 +124,7 @@ public class ColourSchemePropertyTest */ UserColourScheme ucs = (UserColourScheme) ColourSchemeProperty .getColourScheme(null, al, - "R,G=red;C=blue;c=green;Q=10,20,30;S,T=11ffdd"); + "R,G=red;C=blue;c=green;Q=10,20,30;S,T=11ffdd"); assertEquals(ucs.findColour('H'), Color.white); assertEquals(ucs.findColour('R'), Color.red); assertEquals(ucs.findColour('r'), Color.red); diff --git a/test/jalview/schemes/ColourSchemesTest.java b/test/jalview/schemes/ColourSchemesTest.java index 5db3743..26df9b7 100644 --- a/test/jalview/schemes/ColourSchemesTest.java +++ b/test/jalview/schemes/ColourSchemesTest.java @@ -58,12 +58,12 @@ public class ColourSchemesTest public ColourSchemeI getInstance(AlignViewportI view, AnnotatedCollectionI sg) { - final ColourSchemeI cs1 = ColourSchemes.getInstance() - .getColourScheme(JalviewColourScheme.Taylor.toString(), - (AnnotatedCollectionI) null); - final ColourSchemeI cs2 = ColourSchemes.getInstance() - .getColourScheme(JalviewColourScheme.Zappo.toString(), - (AnnotatedCollectionI) null); + final ColourSchemeI cs1 = ColourSchemes.getInstance().getColourScheme( + JalviewColourScheme.Taylor.toString(), + (AnnotatedCollectionI) null); + final ColourSchemeI cs2 = ColourSchemes.getInstance().getColourScheme( + JalviewColourScheme.Zappo.toString(), + (AnnotatedCollectionI) null); return new Stripy(cs1, cs2); } @@ -86,7 +86,7 @@ public class ColourSchemesTest return "stripy"; } }; - + /* * a colour scheme that is Clustal but using AWT colour equivalents */ @@ -183,7 +183,8 @@ public class ColourSchemesTest * in the order in which they are declared in the JalviewColourScheme enum * (this also determines their order in Colour menus) */ - Iterator schemes = ColourSchemes.getInstance().getColourSchemes().iterator(); + Iterator schemes = ColourSchemes.getInstance() + .getColourSchemes().iterator(); JalviewColourScheme[] jalviewSchemes = JalviewColourScheme.values(); int i = 0; while (schemes.hasNext() && i < jalviewSchemes.length) @@ -210,7 +211,7 @@ public class ColourSchemesTest } af.closeMenuItem_actionPerformed(true); } - + @Test(groups = "Functional") public void testRegisterColourScheme() { diff --git a/test/jalview/schemes/FeatureColourTest.java b/test/jalview/schemes/FeatureColourTest.java index dae70f7..42b898d 100644 --- a/test/jalview/schemes/FeatureColourTest.java +++ b/test/jalview/schemes/FeatureColourTest.java @@ -281,8 +281,9 @@ public class FeatureColourTest fc = new FeatureColour(); fc.setColourByLabel(true); fc.setAttributeName("CLIN_SIG"); - assertEquals("domain\tattribute|CLIN_SIG", fc.toJalviewFormat("domain")); - + assertEquals("domain\tattribute|CLIN_SIG", + fc.toJalviewFormat("domain")); + /* * colour by label (autoscaled) (an odd state you can reach by selecting * 'above threshold', then deselecting 'threshold is min/max' then 'colour @@ -348,7 +349,7 @@ public class FeatureColourTest "domain\tscore|%s|%s|noValueMax|abso|12.0|25.0|none", greenHex, redHex); assertEquals(expected, fc.toJalviewFormat("domain")); - + /* * colour ranges over the actual score ranges (not min/max) */ @@ -364,8 +365,8 @@ public class FeatureColourTest fc.setThreshold(12.5f); fc.setBelowThreshold(true); expected = String.format( - "domain\tscore|%s|%s|noValueMax|12.0|25.0|below|12.5", - greenHex, redHex); + "domain\tscore|%s|%s|noValueMax|12.0|25.0|below|12.5", greenHex, + redHex); assertEquals(expected, fc.toJalviewFormat("domain")); /* @@ -407,8 +408,8 @@ public class FeatureColourTest /* * simple colour by hex code */ - fc = FeatureColour.parseJalviewFeatureColour(Format - .getHexString(Color.RED)); + fc = FeatureColour + .parseJalviewFeatureColour(Format.getHexString(Color.RED)); assertTrue(fc.isSimpleColour()); assertEquals(Color.RED, fc.getColour()); @@ -671,7 +672,8 @@ public class FeatureColourTest public void testIsOutwithThreshold() { FeatureColourI fc = new FeatureColour(Color.red); - SequenceFeature sf = new SequenceFeature("METAL", "desc", 10, 12, 1.2f, "grp"); + SequenceFeature sf = new SequenceFeature("METAL", "desc", 10, 12, 1.2f, + "grp"); assertFalse(fc.isOutwithThreshold(null)); assertFalse(fc.isOutwithThreshold(sf)); @@ -722,14 +724,14 @@ public class FeatureColourTest String.format("r=%d,g=%d,b=%d", Color.RED.getRed(), Color.red.getGreen(), Color.red.getBlue()), fc.getDescription()); - + /* * colour by label (no threshold) */ fc = new FeatureColour(); fc.setColourByLabel(true); assertEquals("By Label", fc.getDescription()); - + /* * colour by attribute text (no threshold) */ @@ -737,7 +739,7 @@ public class FeatureColourTest fc.setColourByLabel(true); fc.setAttributeName("CLIN_SIG"); assertEquals("By CLIN_SIG", fc.getDescription()); - + /* * colour by label (above score threshold) */ @@ -746,47 +748,41 @@ public class FeatureColourTest fc.setAutoScaled(false); fc.setThreshold(12.5f); fc.setAboveThreshold(true); - assertEquals("By Label (Score > 12.5)", - fc.getDescription()); - + assertEquals("By Label (Score > 12.5)", fc.getDescription()); + /* * colour by label (below score threshold) */ fc.setBelowThreshold(true); - assertEquals("By Label (Score < 12.5)", - fc.getDescription()); - + assertEquals("By Label (Score < 12.5)", fc.getDescription()); + /* * colour by attributes text (below score threshold) */ fc.setBelowThreshold(true); fc.setAttributeName("CSQ", "Consequence"); - assertEquals( - "By CSQ:Consequence (Score < 12.5)", - fc.getDescription()); - + assertEquals("By CSQ:Consequence (Score < 12.5)", fc.getDescription()); + /* * graduated colour by score, no threshold */ fc = new FeatureColour(null, Color.GREEN, Color.RED, null, 12f, 25f); assertEquals("By Score", fc.getDescription()); - + /* * graduated colour by score, below threshold */ fc.setThreshold(12.5f); fc.setBelowThreshold(true); - assertEquals("By Score (< 12.5)", - fc.getDescription()); - + assertEquals("By Score (< 12.5)", fc.getDescription()); + /* * graduated colour by score, above threshold */ fc.setThreshold(12.5f); fc.setAboveThreshold(true); fc.setAutoScaled(false); - assertEquals("By Score (> 12.5)", - fc.getDescription()); + assertEquals("By Score (> 12.5)", fc.getDescription()); /* * graduated colour by attribute, no threshold @@ -795,13 +791,12 @@ public class FeatureColourTest fc.setAboveThreshold(false); fc.setAutoScaled(false); assertEquals("By CSQ:AF", fc.getDescription()); - + /* * graduated colour by attribute, above threshold */ fc.setAboveThreshold(true); fc.setAutoScaled(false); - assertEquals("By CSQ:AF (> 12.5)", - fc.getDescription()); + assertEquals("By CSQ:AF (> 12.5)", fc.getDescription()); } } diff --git a/test/jalview/schemes/HydrophobicColourSchemeTest.java b/test/jalview/schemes/HydrophobicColourSchemeTest.java index f3b93a9..0a83a19 100644 --- a/test/jalview/schemes/HydrophobicColourSchemeTest.java +++ b/test/jalview/schemes/HydrophobicColourSchemeTest.java @@ -22,12 +22,10 @@ public class HydrophobicColourSchemeTest float min = -3.9f; float max = 4.5f; float a = (1.8f - min) / (max - min); - assertEquals(scheme.findColour('A', 0, null), - new Color(a, 0, 1 - a)); + assertEquals(scheme.findColour('A', 0, null), new Color(a, 0, 1 - a)); float d = (-3.5f - min) / (max - min); - assertEquals(scheme.findColour('D', 0, null), - new Color(d, 0, 1 - d)); + assertEquals(scheme.findColour('D', 0, null), new Color(d, 0, 1 - d)); assertEquals(scheme.findColour('-', 0, null), Color.WHITE); } diff --git a/test/jalview/schemes/JalviewColourSchemeTest.java b/test/jalview/schemes/JalviewColourSchemeTest.java index e8a70e4..755ecba 100644 --- a/test/jalview/schemes/JalviewColourSchemeTest.java +++ b/test/jalview/schemes/JalviewColourSchemeTest.java @@ -10,20 +10,34 @@ public class JalviewColourSchemeTest @Test(groups = "Functional") public void testGetSchemeClass() { - assertTrue(JalviewColourScheme.Clustal.getSchemeClass() == ClustalxColourScheme.class); - assertTrue(JalviewColourScheme.Blosum62.getSchemeClass() == Blosum62ColourScheme.class); - assertTrue(JalviewColourScheme.PID.getSchemeClass() == PIDColourScheme.class); - assertTrue(JalviewColourScheme.Hydrophobic.getSchemeClass() == HydrophobicColourScheme.class); - assertTrue(JalviewColourScheme.Zappo.getSchemeClass() == ZappoColourScheme.class); - assertTrue(JalviewColourScheme.Taylor.getSchemeClass() == TaylorColourScheme.class); - assertTrue(JalviewColourScheme.Helix.getSchemeClass() == HelixColourScheme.class); - assertTrue(JalviewColourScheme.Strand.getSchemeClass() == StrandColourScheme.class); - assertTrue(JalviewColourScheme.Turn.getSchemeClass() == TurnColourScheme.class); - assertTrue(JalviewColourScheme.Buried.getSchemeClass() == BuriedColourScheme.class); - assertTrue(JalviewColourScheme.Nucleotide.getSchemeClass() == NucleotideColourScheme.class); - assertTrue(JalviewColourScheme.PurinePyrimidine.getSchemeClass() == PurinePyrimidineColourScheme.class); - assertTrue(JalviewColourScheme.TCoffee.getSchemeClass() == TCoffeeColourScheme.class); - assertTrue(JalviewColourScheme.RNAHelices.getSchemeClass() == RNAHelicesColour.class); + assertTrue(JalviewColourScheme.Clustal + .getSchemeClass() == ClustalxColourScheme.class); + assertTrue(JalviewColourScheme.Blosum62 + .getSchemeClass() == Blosum62ColourScheme.class); + assertTrue(JalviewColourScheme.PID + .getSchemeClass() == PIDColourScheme.class); + assertTrue(JalviewColourScheme.Hydrophobic + .getSchemeClass() == HydrophobicColourScheme.class); + assertTrue(JalviewColourScheme.Zappo + .getSchemeClass() == ZappoColourScheme.class); + assertTrue(JalviewColourScheme.Taylor + .getSchemeClass() == TaylorColourScheme.class); + assertTrue(JalviewColourScheme.Helix + .getSchemeClass() == HelixColourScheme.class); + assertTrue(JalviewColourScheme.Strand + .getSchemeClass() == StrandColourScheme.class); + assertTrue(JalviewColourScheme.Turn + .getSchemeClass() == TurnColourScheme.class); + assertTrue(JalviewColourScheme.Buried + .getSchemeClass() == BuriedColourScheme.class); + assertTrue(JalviewColourScheme.Nucleotide + .getSchemeClass() == NucleotideColourScheme.class); + assertTrue(JalviewColourScheme.PurinePyrimidine + .getSchemeClass() == PurinePyrimidineColourScheme.class); + assertTrue(JalviewColourScheme.TCoffee + .getSchemeClass() == TCoffeeColourScheme.class); + assertTrue(JalviewColourScheme.RNAHelices + .getSchemeClass() == RNAHelicesColour.class); assertTrue(JalviewColourScheme.IdColour .getSchemeClass() == IdColourScheme.class); } @@ -38,7 +52,8 @@ public class JalviewColourSchemeTest assertEquals(JalviewColourScheme.Taylor.toString(), "Taylor"); assertEquals(JalviewColourScheme.Hydrophobic.toString(), "Hydrophobic"); assertEquals(JalviewColourScheme.Helix.toString(), "Helix Propensity"); - assertEquals(JalviewColourScheme.Strand.toString(), "Strand Propensity"); + assertEquals(JalviewColourScheme.Strand.toString(), + "Strand Propensity"); assertEquals(JalviewColourScheme.Turn.toString(), "Turn Propensity"); assertEquals(JalviewColourScheme.Buried.toString(), "Buried Index"); assertEquals(JalviewColourScheme.Nucleotide.toString(), "Nucleotide"); diff --git a/test/jalview/schemes/PIDColourSchemeTest.java b/test/jalview/schemes/PIDColourSchemeTest.java index 8a584f6..59e626d 100644 --- a/test/jalview/schemes/PIDColourSchemeTest.java +++ b/test/jalview/schemes/PIDColourSchemeTest.java @@ -101,16 +101,14 @@ public class PIDColourSchemeTest /* * including gaps, A should be coloured for 50% consensus */ - Color c = viewport - .getResidueShading().findColour('A', 0, seq); + Color c = viewport.getResidueShading().findColour('A', 0, seq); assertEquals(c, over40); /* * now choose to ignore gaps; colour should be for 67% */ viewport.setIgnoreGapsConsensus(true, af.alignPanel); - c = viewport - .getResidueShading().findColour('A', 0, seq); + c = viewport.getResidueShading().findColour('A', 0, seq); assertEquals(c, over60); } } diff --git a/test/jalview/schemes/ResidueColourSchemeTest.java b/test/jalview/schemes/ResidueColourSchemeTest.java index b45e0d3..6978ea1 100644 --- a/test/jalview/schemes/ResidueColourSchemeTest.java +++ b/test/jalview/schemes/ResidueColourSchemeTest.java @@ -92,8 +92,8 @@ public class ResidueColourSchemeTest assertFalse(new NucleotideColourScheme().isApplicableTo(peptide)); assertTrue(new NucleotideColourScheme().isApplicableTo(nucleotide)); assertFalse(new PurinePyrimidineColourScheme().isApplicableTo(peptide)); - assertTrue(new PurinePyrimidineColourScheme() - .isApplicableTo(nucleotide)); + assertTrue( + new PurinePyrimidineColourScheme().isApplicableTo(nucleotide)); assertFalse(new RNAInteractionColourScheme().isApplicableTo(peptide)); assertTrue(new RNAInteractionColourScheme().isApplicableTo(nucleotide)); @@ -118,8 +118,8 @@ public class ResidueColourSchemeTest * TCoffee colour requires the presence of TCoffee score annotation */ assertFalse(new TCoffeeColourScheme(peptide).isApplicableTo(peptide)); - assertFalse(new TCoffeeColourScheme(nucleotide) - .isApplicableTo(nucleotide)); + assertFalse( + new TCoffeeColourScheme(nucleotide).isApplicableTo(nucleotide)); AlignmentAnnotation aa = new AlignmentAnnotation("T-COFFEE", "", null); aa.setCalcId(TCoffeeScoreFile.TCOFFEE_SCORE); peptide.addAnnotation(aa); @@ -127,14 +127,15 @@ public class ResidueColourSchemeTest aa.setCalcId(TCoffeeScoreFile.TCOFFEE_SCORE); nucleotide.addAnnotation(aa); assertTrue(new TCoffeeColourScheme(peptide).isApplicableTo(peptide)); - assertTrue(new TCoffeeColourScheme(nucleotide) - .isApplicableTo(nucleotide)); + assertTrue( + new TCoffeeColourScheme(nucleotide).isApplicableTo(nucleotide)); /* * RNAHelices requires the presence of rna secondary structure */ assertFalse(new RNAHelicesColour(peptide).isApplicableTo(peptide)); - assertFalse(new RNAHelicesColour(nucleotide).isApplicableTo(nucleotide)); + assertFalse( + new RNAHelicesColour(nucleotide).isApplicableTo(nucleotide)); // add secondary structure (small but perfectly formed) Annotation[] ss = new Annotation[2]; ss[0] = new Annotation("", "", '{', 0f); @@ -149,7 +150,7 @@ public class ResidueColourSchemeTest SequenceI pep1 = new Sequence("pep1", "APQTWLS"); SequenceI pep2 = new Sequence("pep2", "AILFQYG"); AlignmentI peptide = new Alignment(new SequenceI[] { pep1, pep2 }); - + /* * demonstrate that we can 'plug in' a colour scheme with specified * criteria for applicability; here, that there are more than 2 sequences @@ -177,20 +178,25 @@ public class ResidueColourSchemeTest assertEquals("Blosum62", new Blosum62ColourScheme().getSchemeName()); assertEquals("Buried Index", new BuriedColourScheme().getSchemeName()); - assertEquals("Helix Propensity", new HelixColourScheme().getSchemeName()); - assertEquals("Hydrophobic", new HydrophobicColourScheme().getSchemeName()); - assertEquals("Strand Propensity", new StrandColourScheme().getSchemeName()); + assertEquals("Helix Propensity", + new HelixColourScheme().getSchemeName()); + assertEquals("Hydrophobic", + new HydrophobicColourScheme().getSchemeName()); + assertEquals("Strand Propensity", + new StrandColourScheme().getSchemeName()); assertEquals("Taylor", new TaylorColourScheme().getSchemeName()); assertEquals("Turn Propensity", new TurnColourScheme().getSchemeName()); assertEquals("Zappo", new ZappoColourScheme().getSchemeName()); - assertEquals("Nucleotide", new NucleotideColourScheme().getSchemeName()); + assertEquals("Nucleotide", + new NucleotideColourScheme().getSchemeName()); assertEquals("Purine/Pyrimidine", new PurinePyrimidineColourScheme().getSchemeName()); assertEquals("RNA Interaction type", new RNAInteractionColourScheme().getSchemeName()); assertEquals("User Defined", new UserColourScheme().getSchemeName()); - assertEquals("Score", new ScoreColourScheme(new int[] {}, - new double[] {}, 0, 0d).getSchemeName()); + assertEquals("Score", + new ScoreColourScheme(new int[] {}, new double[] {}, 0, 0d) + .getSchemeName()); assertEquals("% Identity", new PIDColourScheme().getSchemeName()); assertEquals("Follower", new FollowerColourScheme().getSchemeName()); assertEquals("T-Coffee Scores", diff --git a/test/jalview/schemes/StrandColourSchemeTest.java b/test/jalview/schemes/StrandColourSchemeTest.java index 4a8d0e9..97c47be 100644 --- a/test/jalview/schemes/StrandColourSchemeTest.java +++ b/test/jalview/schemes/StrandColourSchemeTest.java @@ -22,12 +22,10 @@ public class StrandColourSchemeTest float min = 0.37f; float max = 1.7f; float a = (0.83f - min) / (max - min); - assertEquals(scheme.findColour('A', 0, null), - new Color(a, a, 1 - a)); + assertEquals(scheme.findColour('A', 0, null), new Color(a, a, 1 - a)); float d = (0.54f - min) / (max - min); - assertEquals(scheme.findColour('D', 0, null), - new Color(d, d, 1 - d)); + assertEquals(scheme.findColour('D', 0, null), new Color(d, d, 1 - d)); assertEquals(scheme.findColour('-', 0, null), Color.WHITE); } diff --git a/test/jalview/schemes/UserColourSchemeTest.java b/test/jalview/schemes/UserColourSchemeTest.java index 2a482ee..5cfaa29 100644 --- a/test/jalview/schemes/UserColourSchemeTest.java +++ b/test/jalview/schemes/UserColourSchemeTest.java @@ -60,7 +60,8 @@ public class UserColourSchemeTest assertEquals(Color.WHITE, cs.findColour(' ')); cs = new UserColourScheme("white"); - cs.parseAppletParameter("D,E=red; K,R,H=0022FF; c=10 , 20,30;t=orange;lowercase=blue;s=pink"); + cs.parseAppletParameter( + "D,E=red; K,R,H=0022FF; c=10 , 20,30;t=orange;lowercase=blue;s=pink"); assertEquals(Color.RED, cs.findColour('D')); assertEquals(Color.blue, cs.findColour('d')); assertEquals(Color.RED, cs.findColour('E')); diff --git a/test/jalview/structure/AtomSpecModelTest.java b/test/jalview/structure/AtomSpecModelTest.java index 394679f..81dd030 100644 --- a/test/jalview/structure/AtomSpecModelTest.java +++ b/test/jalview/structure/AtomSpecModelTest.java @@ -10,7 +10,7 @@ import org.testng.annotations.Test; public class AtomSpecModelTest { - @Test(groups="Functional") + @Test(groups = "Functional") public void testGetRanges() { AtomSpecModel model = new AtomSpecModel(); diff --git a/test/jalview/structure/AtomSpecTest.java b/test/jalview/structure/AtomSpecTest.java index 9881baf..7c13c0f 100644 --- a/test/jalview/structure/AtomSpecTest.java +++ b/test/jalview/structure/AtomSpecTest.java @@ -80,21 +80,21 @@ public class AtomSpecTest assertEquals(as.getPdbResNum(), 12); assertEquals(as.getChain(), "B"); assertNull(as.getPdbFile()); - + // no model - default to zero as = AtomSpec.fromChimeraXAtomspec("/C:13"); assertEquals(as.getModelNumber(), 0); assertEquals(as.getPdbResNum(), 13); assertEquals(as.getChain(), "C"); assertNull(as.getPdbFile()); - + // model.submodel as = AtomSpec.fromChimeraXAtomspec("#3.2/:15"); assertEquals(as.getModelNumber(), 3); assertEquals(as.getPdbResNum(), 15); assertEquals(as.getChain(), ""); assertNull(as.getPdbFile()); - + String spec = "3:12.B"; try { @@ -104,7 +104,7 @@ public class AtomSpecTest { // ok } - + spec = "#3:12-14.B"; try { @@ -114,7 +114,7 @@ public class AtomSpecTest { // ok } - + spec = ""; try { @@ -124,7 +124,7 @@ public class AtomSpecTest { // ok } - + spec = null; try { diff --git a/test/jalview/structure/Mapping.java b/test/jalview/structure/Mapping.java index 4bee3f5..f1feced 100644 --- a/test/jalview/structure/Mapping.java +++ b/test/jalview/structure/Mapping.java @@ -72,12 +72,14 @@ public class Mapping // original numbers taken from // http://www.ebi.ac.uk/pdbe-srv/view/entry/1qcf/secondary.html // these are in numbering relative to the subsequence above - int coils[] = { 266, 275, 278, 287, 289, 298, 302, 316 }, helices[] = new int[] - { 303, 315 }, sheets[] = new int[] { 267, 268, 269, 270 }; + int coils[] = { 266, 275, 278, 287, 289, 298, 302, 316 }, + helices[] = new int[] + { 303, 315 }, sheets[] = new int[] { 267, 268, 269, 270 }; StructureSelectionManager ssm = new jalview.structure.StructureSelectionManager(); StructureFile pmap = ssm.setMapping(true, new SequenceI[] { uprot }, - new String[] { "A" }, "test/jalview/ext/jmol/1QCF.pdb", + new String[] + { "A" }, "test/jalview/ext/jmol/1QCF.pdb", DataSourceType.FILE); assertTrue(pmap != null); SequenceI protseq = pmap.getSeqsAsArray()[0]; @@ -107,10 +109,10 @@ public class Mapping char expected = 'H'; for (int p : helices) { - Annotation a = ss.annotations[op = (uprot.findIndex(offset + p) - 1)]; - assertTrue( - "Expected a helix at position " + p + uprot.getCharAt(op) - + " but got coil", a != null); + Annotation a = ss.annotations[op = (uprot.findIndex(offset + p) + - 1)]; + assertTrue("Expected a helix at position " + p + + uprot.getCharAt(op) + " but got coil", a != null); assertEquals("Expected a helix at position " + p, a.secondaryStructure, expected); } @@ -118,8 +120,7 @@ public class Mapping for (int p : sheets) { Annotation a = ss.annotations[uprot.findIndex(offset + p) - 1]; - assertTrue( - "Expected a strand at position " + p + " but got coil", + assertTrue("Expected a strand at position " + p + " but got coil", a != null); assertEquals("Expected a strand at position " + p, a.secondaryStructure, expected); @@ -139,8 +140,7 @@ public class Mapping public void testPDBentryMapping() throws Exception { Assert.fail("This test intentionally left to fail"); - Sequence sq = new Sequence( - "1GAQ A subseq 126 to 219", + Sequence sq = new Sequence("1GAQ A subseq 126 to 219", "EIVKGVCSNFLCDLQPGDNVQITGPVGKEMLMPKDPNATIIMLATGTGIAPFRSFLWKMFFEKHDDYKFNGLGWLFLGVPTSSSLLYKEEFGKM"); Sequence sq1 = new Sequence(sq); String inFile; @@ -149,7 +149,7 @@ public class Mapping // source StructureFile pde = ssm.setMapping(true, new SequenceI[] { sq }, new String[] - { "A" }, inFile = "examples/1gaq.txt", DataSourceType.FILE); + { "A" }, inFile = "examples/1gaq.txt", DataSourceType.FILE); assertTrue("PDB File couldn't be found", pde != null); StructureMapping[] mp = ssm.getMapping(inFile); assertTrue("No mappings made.", mp != null && mp.length > 0); @@ -178,8 +178,8 @@ public class Mapping if (origMap.getSequence() == sq) { assertEquals("Mapping was incomplete.", sq.getLength() - 1, - (origMap.getPDBResNum(sq.getEnd()) - origMap - .getPDBResNum(sq.getStart()))); + (origMap.getPDBResNum(sq.getEnd()) + - origMap.getPDBResNum(sq.getStart()))); // sanity check - if this fails, mapping from first position in sequence // we want to transfer to is not where we expect assertEquals(1, origMap.getSeqPos(126)); @@ -198,8 +198,8 @@ public class Mapping { // walk along the pdb chain's jalview sequence int rseqpos; - int fpos = origMap.getSeqPos(rseqpos = firstChain - .findPosition(p)); + int fpos = origMap + .getSeqPos(rseqpos = firstChain.findPosition(p)); // only look at positions where there is a corresponding position in // mapping if (fpos < 1) @@ -217,10 +217,13 @@ public class Mapping break; } - Annotation a = transfer.annotations[tanpos], b = alan.annotations[p]; - assertEquals("Non-equivalent annotation element at " + p + "(" - + rseqpos + ")" + " expected at " + fpos + " (alIndex " - + tanpos + ")", a == null ? a : a.toString(), + Annotation a = transfer.annotations[tanpos], + b = alan.annotations[p]; + assertEquals( + "Non-equivalent annotation element at " + p + "(" + + rseqpos + ")" + " expected at " + fpos + + " (alIndex " + tanpos + ")", + a == null ? a : a.toString(), b == null ? b : b.toString()); System.out.print("(" + a + "|" + b + ")"); } @@ -238,15 +241,14 @@ public class Mapping @Test(groups = { "Functional" }) public void mapFer1From3W5V() throws Exception { - AlignFrame seqf = new FileLoader(false) - .LoadFileWaitTillLoaded( - ">FER1_MAIZE/1-150 Ferredoxin-1, chloroplast precursor\nMATVLGSPRAPAFFFSSSSLRAAPAPTAVALPAAKVGIMGRSASSRRRLRAQATYNVKLITPEGEVELQVPD\nDVYILDQAEEDGIDLPYSCRAGSCSSCAGKVVSGSVDQSDQSYLDDGQIADGWVLTCHAYPTSDVVIETHKE\nEELTGA", - DataSourceType.PASTE, FileFormat.Fasta); + AlignFrame seqf = new FileLoader(false).LoadFileWaitTillLoaded( + ">FER1_MAIZE/1-150 Ferredoxin-1, chloroplast precursor\nMATVLGSPRAPAFFFSSSSLRAAPAPTAVALPAAKVGIMGRSASSRRRLRAQATYNVKLITPEGEVELQVPD\nDVYILDQAEEDGIDLPYSCRAGSCSSCAGKVVSGSVDQSDQSYLDDGQIADGWVLTCHAYPTSDVVIETHKE\nEELTGA", + DataSourceType.PASTE, FileFormat.Fasta); SequenceI newseq = seqf.getViewport().getAlignment().getSequenceAt(0); StructureSelectionManager ssm = new jalview.structure.StructureSelectionManager(); StructureFile pmap = ssm.setMapping(true, new SequenceI[] { newseq }, - new String[] { null }, "examples/3W5V.pdb", - DataSourceType.FILE); + new String[] + { null }, "examples/3W5V.pdb", DataSourceType.FILE); if (pmap == null) { AssertJUnit.fail("Couldn't make a mapping for 3W5V to FER1_MAIZE"); @@ -263,9 +265,8 @@ public class Mapping StructureImportSettings.setProcessSecondaryStructure(true); StructureImportSettings.setVisibleChainAnnotation(true); StructureImportSettings.setShowSeqFeatures(true); - AlignFrame ref = new FileLoader(false) - .LoadFileWaitTillLoaded("test/jalview/ext/jmol/1QCF.pdb", - DataSourceType.FILE); + AlignFrame ref = new FileLoader(false).LoadFileWaitTillLoaded( + "test/jalview/ext/jmol/1QCF.pdb", DataSourceType.FILE); SequenceI refseq = ref.getViewport().getAlignment().getSequenceAt(0); SequenceI newseq = new Sequence(refseq.getName() + "Copy", refseq.getSequenceAsString()); @@ -276,7 +277,8 @@ public class Mapping ssm.setProcessSecondaryStructure(true); ssm.setAddTempFacAnnot(true); StructureFile pmap = ssm.setMapping(true, new SequenceI[] { newseq }, - new String[] { null }, "test/jalview/ext/jmol/1QCF.pdb", + new String[] + { null }, "test/jalview/ext/jmol/1QCF.pdb", DataSourceType.FILE); assertTrue(pmap != null); assertEquals("Original and copied sequence of different lengths.", @@ -291,9 +293,10 @@ public class Mapping { for (int p = 0, pSize = refseq.getLength(); p < pSize; p++) { - Annotation orig = oannot.annotations[p], tran = tannot.annotations[p]; - assertTrue("Mismatch: coil and non coil site " + p, orig == tran - || orig != null && tran != null); + Annotation orig = oannot.annotations[p], + tran = tannot.annotations[p]; + assertTrue("Mismatch: coil and non coil site " + p, + orig == tran || orig != null && tran != null); if (tran != null) { assertEquals("Mismatch in secondary structure at site " + p, diff --git a/test/jalview/structure/StructureSelectionManagerTest.java b/test/jalview/structure/StructureSelectionManagerTest.java index 9b240d3..66514f9 100644 --- a/test/jalview/structure/StructureSelectionManagerTest.java +++ b/test/jalview/structure/StructureSelectionManagerTest.java @@ -88,10 +88,12 @@ public class StructureSelectionManagerTest extends Jalview2xmlBase { AlignedCodonFrame acf1 = new AlignedCodonFrame(); acf1.addMap(new Sequence("s1", "ttt"), new Sequence("p1", "p"), - new MapList(new int[] { 1, 3 }, new int[] { 1, 1 }, 1, 1)); + new MapList(new int[] + { 1, 3 }, new int[] { 1, 1 }, 1, 1)); AlignedCodonFrame acf2 = new AlignedCodonFrame(); acf2.addMap(new Sequence("s2", "ttt"), new Sequence("p2", "p"), - new MapList(new int[] { 1, 3 }, new int[] { 1, 1 }, 1, 1)); + new MapList(new int[] + { 1, 3 }, new int[] { 1, 1 }, 1, 1)); ssm.registerMapping(acf1); assertEquals(1, ssm.getSequenceMappings().size()); @@ -116,13 +118,16 @@ public class StructureSelectionManagerTest extends Jalview2xmlBase { AlignedCodonFrame acf1 = new AlignedCodonFrame(); acf1.addMap(new Sequence("s1", "ttt"), new Sequence("p1", "p"), - new MapList(new int[] { 1, 3 }, new int[] { 1, 1 }, 1, 1)); + new MapList(new int[] + { 1, 3 }, new int[] { 1, 1 }, 1, 1)); AlignedCodonFrame acf2 = new AlignedCodonFrame(); acf2.addMap(new Sequence("s2", "ttt"), new Sequence("p2", "p"), - new MapList(new int[] { 1, 3 }, new int[] { 1, 1 }, 1, 1)); + new MapList(new int[] + { 1, 3 }, new int[] { 1, 1 }, 1, 1)); AlignedCodonFrame acf3 = new AlignedCodonFrame(); acf3.addMap(new Sequence("s3", "ttt"), new Sequence("p3", "p"), - new MapList(new int[] { 1, 3 }, new int[] { 1, 1 }, 1, 1)); + new MapList(new int[] + { 1, 3 }, new int[] { 1, 1 }, 1, 1)); List set1 = new ArrayList<>(); set1.add(acf1); @@ -152,14 +157,14 @@ public class StructureSelectionManagerTest extends Jalview2xmlBase @Test(groups = { "Functional" }) public void testSetMapping_seqFeatures() { - SequenceI seq = new Sequence( - "1GAQ|B", + SequenceI seq = new Sequence("1GAQ|B", "ATYNVKLITPEGEVELQVPDDVYILDQAEEDGIDLPYSCRAGSCSSCAGKVVSGSVDQSDQSYLDDGQIADGWVLTCHAYPTSDVVIETHKEEELTGA"); StructureSelectionManager sm = new StructureSelectionManager(); sm.setProcessSecondaryStructure(true); sm.setAddTempFacAnnot(true); StructureFile pmap = sm.setMapping(true, new SequenceI[] { seq }, - new String[] { null }, "examples/1gaq.txt", DataSourceType.FILE); + new String[] + { null }, "examples/1gaq.txt", DataSourceType.FILE); assertTrue(pmap != null); assertEquals(3, pmap.getSeqs().size()); @@ -200,9 +205,13 @@ public class StructureSelectionManagerTest extends Jalview2xmlBase // for some reason 'BeforeMethod' (which should be inherited from // Jalview2XmlBase isn't always called)... Desktop.instance.closeAll_actionPerformed(null); - try { + try + { Thread.sleep(200); - } catch (Exception foo) {}; + } catch (Exception foo) + { + } + ; SequenceI seq = new Sequence("4IM2|A", "LDFCIRNIEKTVMGEISDIHTKLLRLSSSQGTIE"); String P4IM2_MISSING = "examples/testdata/4IM2_missing.pdb"; @@ -211,8 +220,7 @@ public class StructureSelectionManagerTest extends Jalview2xmlBase sm.setAddTempFacAnnot(true); StructureFile pmap = sm.setMapping(true, new SequenceI[] { seq }, new String[] - { null }, P4IM2_MISSING, - DataSourceType.FILE); + { null }, P4IM2_MISSING, DataSourceType.FILE); assertTrue(pmap != null); assertEquals(1, pmap.getSeqs().size()); @@ -260,7 +268,6 @@ public class StructureSelectionManagerTest extends Jalview2xmlBase // alignment verifySeqFeats(pdb_viewseq, offset, fdesc); - JalviewStructureDisplayI viewr = openStructureViaChooser(alf, pdb_viewseq, "4IM2"); @@ -271,8 +278,7 @@ public class StructureSelectionManagerTest extends Jalview2xmlBase PDBEntry pdbe = seq.getPDBEntry("4IM2"); StructureSelectionManager apssm = alf.alignPanel .getStructureSelectionManager(); - StructureMapping[] smap = apssm - .getMapping(pdbe.getFile()); + StructureMapping[] smap = apssm.getMapping(pdbe.getFile()); assertNotNull(smap); assertNotNull(smap[0]); // find the last position in the alignment sequence - this is not @@ -318,8 +324,8 @@ public class StructureSelectionManagerTest extends Jalview2xmlBase { pdbe.getFile() }, new SequenceI[][] { new SequenceI[] { pdb_viewseq } }, - new SequenceRenderer(alf.alignPanel.getAlignViewport()), - alf.alignPanel); + new SequenceRenderer(alf.alignPanel.getAlignViewport()), + alf.alignPanel); // Expected - all residues are white for (String c : smcr) { @@ -351,43 +357,42 @@ public class StructureSelectionManagerTest extends Jalview2xmlBase // currently this test fails if trimming is enabled Cache.setProperty(DBRefFetcher.TRIM_RETRIEVED_SEQUENCES, Boolean.FALSE.toString()); - String TEMP_FACTOR_AA="Temperature Factor"; + String TEMP_FACTOR_AA = "Temperature Factor"; String PDBID = "4IM2"; - String FullLengthSeq = ">TBK1_HUMAN Serine/threonine-protein kinase TBK1\n" + - "MQSTSNHLWLLSDILGQGATANVFRGRHKKTGDLFAIKVFNNISFLRPVDVQMREFEVLKKLNHKNIVKLFA\n" + - "IEEETTTRHKVLIMEFCPCGSLYTVLEEPSNAYGLPESEFLIVLRDVVGGMNHLRENGIVHRDIKPGNIMRV\n" + - "IGEDGQSVYKLTDFGAARELEDDEQFVSLYGTEEYLHPDMYERAVLRKDHQKKYGATVDLWSIGVTFYHAAT\n" + - "GSLPFRPFEGPRRNKEVMYKIITGKPSGAISGVQKAENGPIDWSGDMPVSCSLSRGLQVLLTPVLANILEAD\n" + - "QEKCWGFDQFFAETSDILHRMVIHVFSLQQMTAHKIYIHSYNTATIFHELVYKQTKIISSNQELIYEGRRLV\n" + - "LEPGRLAQHFPKTTEENPIFVVSREPLNTIGLIYEKISLPKVHPRYDLDGDASMAKAITGVVCYACRIASTL\n" + - "LLYQELMRKGIRWLIELIKDDYNETVHKKTEVVITLDFCIRNIEKTVKVYEKLMKINLEAAELGEISDIHTK\n" + - "LLRLSSSQGTIETSLQDIDSRLSPGGSLADAWAHQEGTHPKDRNVEKLQVLLNCMTEIYYQFKKDKAERRLA\n" + - "YNEEQIHKFDKQKLYYHATKAMTHFTDECVKKYEAFLNKSEEWIRKMLHLRKQLLSLTNQCFDIEEEVSKYQ\n" + - "EYTNELQETLPQKMFTASSGIKHTMTPIYPSSNTLVEMTLGMKKLKEEMEGVVKELAENNHILERFGSLTMD\n" + - "GGLRNVDCL"; + String FullLengthSeq = ">TBK1_HUMAN Serine/threonine-protein kinase TBK1\n" + + "MQSTSNHLWLLSDILGQGATANVFRGRHKKTGDLFAIKVFNNISFLRPVDVQMREFEVLKKLNHKNIVKLFA\n" + + "IEEETTTRHKVLIMEFCPCGSLYTVLEEPSNAYGLPESEFLIVLRDVVGGMNHLRENGIVHRDIKPGNIMRV\n" + + "IGEDGQSVYKLTDFGAARELEDDEQFVSLYGTEEYLHPDMYERAVLRKDHQKKYGATVDLWSIGVTFYHAAT\n" + + "GSLPFRPFEGPRRNKEVMYKIITGKPSGAISGVQKAENGPIDWSGDMPVSCSLSRGLQVLLTPVLANILEAD\n" + + "QEKCWGFDQFFAETSDILHRMVIHVFSLQQMTAHKIYIHSYNTATIFHELVYKQTKIISSNQELIYEGRRLV\n" + + "LEPGRLAQHFPKTTEENPIFVVSREPLNTIGLIYEKISLPKVHPRYDLDGDASMAKAITGVVCYACRIASTL\n" + + "LLYQELMRKGIRWLIELIKDDYNETVHKKTEVVITLDFCIRNIEKTVKVYEKLMKINLEAAELGEISDIHTK\n" + + "LLRLSSSQGTIETSLQDIDSRLSPGGSLADAWAHQEGTHPKDRNVEKLQVLLNCMTEIYYQFKKDKAERRLA\n" + + "YNEEQIHKFDKQKLYYHATKAMTHFTDECVKKYEAFLNKSEEWIRKMLHLRKQLLSLTNQCFDIEEEVSKYQ\n" + + "EYTNELQETLPQKMFTASSGIKHTMTPIYPSSNTLVEMTLGMKKLKEEMEGVVKELAENNHILERFGSLTMD\n" + + "GGLRNVDCL"; /* * annotation exported after importing full length sequence to desktop, opening 4IM2 and selecting 'Add Reference Annotation'. * * Note - tabs must be replaced with \t - Eclipse expands them to spaces otherwise. */ - String FullLengthAnnot = "JALVIEW_ANNOTATION\n" + - "# Created: Mon Feb 05 15:30:20 GMT 2018\n" + - "# Updated: Fri Feb 09 17:05:17 GMT 2018\n" + - "\n" + - "\n" + - "SEQUENCE_REF\tTBK1_HUMAN\n" + String FullLengthAnnot = "JALVIEW_ANNOTATION\n" + + "# Created: Mon Feb 05 15:30:20 GMT 2018\n" + + "# Updated: Fri Feb 09 17:05:17 GMT 2018\n" + "\n" + "\n" + + "SEQUENCE_REF\tTBK1_HUMAN\n" + "LINE_GRAPH\tTemperature Factor\tTemperature Factor for 4im2A\t125.22|128.51|120.35|113.12|122.6|114.44|91.49|102.53|98.22|111.41|111.32|116.64|103.55|100.53|95.07|105.55|114.76|128.29|133.55|142.14|121.12|110.36|95.79|95.39|87.14|99.56|93.55|94.21|100.33|110.68|97.85|82.37|75.87|76.53|77.85|82.49|80.92|96.88|122.58|133.31|160.15|180.51|||||242.88|258.97|247.01|227.12|223.24|211.62|184.65|183.51|168.96|160.04|150.88|131.68|130.43|139.87|148.59|136.57|125.7|96.51|74.49|74.08|85.87|70.93|86.47|101.59|97.51|97.39|117.19|114.27|129.5|112.98|147.52|170.26|154.98|168.18|157.51|131.95|105.85|97.78|97.35|76.51|76.31|72.55|71.43|78.82|79.94|75.04|79.54|77.95|83.56|88.5|71.51|71.73|75.96|82.36|81.75|66.51|67.23|69.35|67.92|54.75|71.19|61.85|65.34|67.97|64.51|67.41|62.28|72.85|72.76|70.64|65.23|71.07|67.73|87.72|64.93|75.92|94.02|99.35|93.71|103.59|106.29|115.46|118.69|147.18|130.62|171.64|158.95|164.11||107.42|88.53|83.52|88.06|94.06|80.82|59.01|59.73|78.89|69.21|70.34|81.95|74.53|60.92|64.65|55.79|75.71|68.86|70.95|75.08|87.76|85.43|105.84|||||||||||||||||137.46|151.33|145.17|122.79|111.56|126.72|124.06|161.75|176.84|180.51|198.49|196.75|187.41||195.23|202.27|203.16|226.55|221.75|193.83||||||172.33|177.97|151.47|132.65|99.22|93.7|91.15|88.24|72.35|70.05|70.0|74.92|66.51|68.37|65.76|70.12|74.97|76.89|80.83|70.21|69.48|79.54|82.65|96.54|114.31|140.46|168.51|176.99|205.08|209.27|155.83|139.41|151.3|129.33|111.31|119.62|121.37|102.26|115.39|129.97|128.65|110.38|110.66|116.1|82.53|84.02|82.17|87.63|86.42|77.23|91.23|95.53|102.21|120.73|133.26|109.67|108.49|93.25|92.85|86.39|95.66|94.92|85.82|80.13|76.17|86.61|78.9|77.97|105.6|70.66|69.35|78.94|66.68|63.03|69.91|79.05|75.43|70.73|70.02|80.57|81.74|77.99|84.1|91.66|92.42|94.03|116.47|132.01|154.55|163.99|161.37|155.23|132.78|109.3|90.38|101.83|99.61|91.68|82.77|86.12|82.73|90.13|85.14|79.54|74.27|74.06|72.88|86.34|72.0|69.32|60.9|68.15|52.99|63.53|61.3|66.01|68.28|77.41|71.52|67.18|66.17|71.51|65.47|52.63|65.08|66.37|73.76|77.79|67.58|79.53|84.75|87.42|78.9|79.19|85.57|73.67|80.56|86.19|72.17|66.27|72.8|86.28|78.89|74.5|90.6|80.42|92.5|92.84|96.18|92.08|88.5|87.25|64.6|68.95|65.56|67.55|71.62|78.24|84.95|71.35|86.41|84.73|94.41|95.09|84.74|87.64|88.85|75.1|86.42|79.28|73.14|78.54|80.81|60.66|67.93|71.64|59.85|64.7|61.22|63.84|65.9|62.18|74.95|72.92|93.37|90.47|96.0|93.8|88.46|79.78|83.4|66.55|68.7|73.2|78.76|85.67|84.8|89.59|96.52|79.53|103.51|134.72|126.7|145.31|156.17|149.35|128.48|117.29|118.98|131.59|109.36|90.39|87.68|91.81|78.77|80.11|91.39|75.57|78.98|71.53|76.85|70.9|64.71|73.55|73.45|60.0|69.92|57.89|69.07|66.45|62.85|57.83|57.89|66.4|61.61|60.85|66.47|63.53|63.84|65.96|73.06|70.82|64.51|63.66|73.37|73.59|68.09|78.93|76.99|75.05|71.32|88.4|78.88|93.08|110.61|94.32|99.24|128.99|129.49|132.74|124.21|120.32|142.06|166.41|149.87|153.29|172.19|165.89|181.6|223.11|237.73|176.41|171.09|189.65|188.61|154.84|142.72|154.25|170.99|175.65|||||||110.61||||||||||158.07|170.73|167.93|198.47|212.36|181.71|157.69|163.31|138.96|120.29|131.63|152.26|125.06|136.66|148.97|129.68|120.52|135.31|136.05|119.39|124.18|128.94|123.02|103.37|128.44|134.12|118.88|120.94|130.38|124.67|112.21|113.69|123.65|132.06|114.97|110.75|92.38|101.2|103.25|94.84|85.3|82.19|89.81|98.81|83.03|68.91|65.24|70.31|63.49|86.38|71.07|62.65|63.95|66.98|58.06|68.28|62.11|63.86|67.4|68.69|69.57|68.03|74.23|75.66|70.67|81.08|81.31|82.49|88.15|95.99|92.97|100.01|113.18|122.37|110.99|122.19|159.27|147.74|133.96|111.2|115.64|126.55|107.15|102.85|117.06|116.56|109.55|96.82|98.92|96.53|86.0|88.11|92.76|85.77|79.41|93.06|86.96|76.35|72.37|74.19|68.6|67.46|74.47|76.25|66.73|73.18|75.2|88.21|84.93|75.04|71.09|82.6|80.03|76.22|75.76|83.72|75.85|79.36|90.35|86.9|78.24|95.64|97.38|86.41|85.02|91.87|87.36|77.56|81.25|91.66|83.65|77.67|85.07|89.21|92.66|92.46|89.0|100.83|96.71|94.81|101.37|111.28|124.48|119.73|127.81|134.41|132.4|140.32|140.86|166.52|160.16|168.39|176.74|174.63|172.86|168.55|155.9|132.71|113.44|113.49|123.9|151.11|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||\n" - + - "\n" + - ""; - AlignFrame alf_full=new - FileLoader(false).LoadFileWaitTillLoaded(FullLengthSeq,DataSourceType.PASTE); - alf_full.loadJalviewDataFile(FullLengthAnnot, DataSourceType.PASTE, null, null); + + "\n" + ""; + AlignFrame alf_full = new FileLoader(false) + .LoadFileWaitTillLoaded(FullLengthSeq, DataSourceType.PASTE); + alf_full.loadJalviewDataFile(FullLengthAnnot, DataSourceType.PASTE, + null, null); AlignmentI al_full = alf_full.getViewport().getAlignment(); - AlignmentAnnotation fullseq_tf = al_full.findAnnotations(al_full.getSequences().get(0), null, TEMP_FACTOR_AA).iterator() - .next(); + AlignmentAnnotation fullseq_tf = al_full + .findAnnotations(al_full.getSequences().get(0), null, + TEMP_FACTOR_AA) + .iterator().next(); assertNotNull(fullseq_tf); - + // getMappingFor // AlignmentI al_full=alf_full.getViewport().getAlignment(); // @@ -414,9 +419,9 @@ public class StructureSelectionManagerTest extends Jalview2xmlBase JalviewStructureDisplayI sview = openStructureViaChooser(alf, seq, PDBID); - AlignmentAnnotation subseq_tf=null; + AlignmentAnnotation subseq_tf = null; assertTrue(seq.getDBRefs() != null && seq.getDBRefs().size() > 0); - + if (!al.findAnnotations(seq, null, TEMP_FACTOR_AA).iterator().hasNext()) { // FIXME JAL-2321 - don't see reference annotation on alignment the first @@ -443,12 +448,12 @@ public class StructureSelectionManagerTest extends Jalview2xmlBase // verify location of secondary structure annotation // Specific positions: LYS477 (h),THR478 (no helix), ... GLY496(no helix), // GLU497 (helix), - + // check there is or is not a tempfactor for each mapped position, and that // values are equal for those positions. - for (int p=seq.getStart();p<=seq.getEnd();p++) + for (int p = seq.getStart(); p <= seq.getEnd(); p++) { - Annotation orig,subseq; + Annotation orig, subseq; orig = fullseq_tf.getAnnotationForPosition(p); subseq = subseq_tf.getAnnotationForPosition(p); if (orig == null) @@ -469,8 +474,7 @@ public class StructureSelectionManagerTest extends Jalview2xmlBase } private JalviewStructureDisplayI openStructureViaChooser(AlignFrame alf, - SequenceI seq, - String pDBID) + SequenceI seq, String pDBID) { SequenceI[] selectedSeqs = new SequenceI[] { seq }; diff --git a/test/jalview/structures/models/AAStructureBindingModelTest.java b/test/jalview/structures/models/AAStructureBindingModelTest.java index 5187167..1a2cb84 100644 --- a/test/jalview/structures/models/AAStructureBindingModelTest.java +++ b/test/jalview/structures/models/AAStructureBindingModelTest.java @@ -127,7 +127,7 @@ public class AAStructureBindingModelTest // TODO: JAL-2227 - import mmCIF PISA assembly & identify master/copy chains - @Test(groups= {"Functional"}) + @Test(groups = { "Functional" }) public void testImportPDBPreservesChainMappings() throws IOException { AlignmentI importedAl = new jalview.io.FormatAdapter().readFile( @@ -136,38 +136,38 @@ public class AAStructureBindingModelTest // ideally, we would match on the actual data for the 'File' handle for // pasted files, // see JAL-623 - pasting is still not correctly handled... - PDBEntry importedPDB = new PDBEntry("3A6S", "", Type.PDB, - "Paste"); + PDBEntry importedPDB = new PDBEntry("3A6S", "", Type.PDB, "Paste"); AAStructureBindingModel binder = new AAStructureBindingModel( new StructureSelectionManager(), new PDBEntry[] { importedPDB }, new SequenceI[][] { importedAl.getSequencesArray() }, null) { - + @Override public void updateColours(Object source) { } - + @Override public void releaseReferences(Object svl) { } - + @Override public String[] getStructureFiles() { return null; } - + @Override public void highlightAtoms(List atoms) { } - + @Override - public SequenceRenderer getSequenceRenderer(AlignmentViewPanel alignment) + public SequenceRenderer getSequenceRenderer( + AlignmentViewPanel alignment) { return null; } @@ -198,6 +198,7 @@ public class AAStructureBindingModelTest assertEquals(chains[0][0], "A"); assertEquals(chains[0][1], "B"); } + AAStructureBindingModel testee; AlignmentI al = null; @@ -244,11 +245,11 @@ public class AAStructureBindingModelTest * @param pdbFiles * @param seqs * @param ssm - * @param alignPanel + * @param alignPanel */ protected AAStructureBindingModel newBindingModel(PDBEntry[] pdbFiles, - SequenceI[][] seqs, - StructureSelectionManager ssm, AlignmentViewPanel avp) + SequenceI[][] seqs, StructureSelectionManager ssm, + AlignmentViewPanel avp) { AAStructureBindingModel model = new AAStructureBindingModel(ssm, pdbFiles, seqs, null) @@ -280,12 +281,10 @@ public class AAStructureBindingModelTest } @Override - public SequenceRenderer getSequenceRenderer( - AlignmentViewPanel avp) + public SequenceRenderer getSequenceRenderer(AlignmentViewPanel avp) { return avp == null ? null - : new jalview.gui.SequenceRenderer( - avp.getAlignViewport()); + : new jalview.gui.SequenceRenderer(avp.getAlignViewport()); } @Override @@ -332,10 +331,12 @@ public class AAStructureBindingModelTest /* * create a data bean to hold data per structure file */ - AAStructureBindingModel.SuperposeData[] structs = new AAStructureBindingModel.SuperposeData[testee.getStructureFiles().length]; + AAStructureBindingModel.SuperposeData[] structs = new AAStructureBindingModel.SuperposeData[testee + .getStructureFiles().length]; for (int i = 0; i < structs.length; i++) { - structs[i] = new AAStructureBindingModel.SuperposeData(al.getWidth(), "0"); + structs[i] = new AAStructureBindingModel.SuperposeData(al.getWidth(), + "0"); } /* * initialise BitSet of 'superposable columns' to true (would be false for @@ -347,8 +348,8 @@ public class AAStructureBindingModelTest matched.set(i); } - int refStructure = testee - .findSuperposableResidues(al, matched, structs); + int refStructure = testee.findSuperposableResidues(al, matched, + structs); assertEquals(refStructure, 0); @@ -380,10 +381,12 @@ public class AAStructureBindingModelTest @Test(groups = { "Functional" }) public void testFindSuperposableResidues_hiddenColumn() { - AAStructureBindingModel.SuperposeData[] structs = new AAStructureBindingModel.SuperposeData[al.getHeight()]; + AAStructureBindingModel.SuperposeData[] structs = new AAStructureBindingModel.SuperposeData[al + .getHeight()]; for (int i = 0; i < structs.length; i++) { - structs[i] = new AAStructureBindingModel.SuperposeData(al.getWidth(), "0"); + structs[i] = new AAStructureBindingModel.SuperposeData(al.getWidth(), + "0"); } /* * initialise BitSet of 'superposable columns' to true (would be false for @@ -398,8 +401,8 @@ public class AAStructureBindingModelTest // treat column 5 of the alignment as hidden matched.clear(4); - int refStructure = testee - .findSuperposableResidues(al, matched, structs); + int refStructure = testee.findSuperposableResidues(al, matched, + structs); assertEquals(refStructure, 0); @@ -437,7 +440,7 @@ public class AAStructureBindingModelTest pdbFiles[0] = new PDBEntry("PDB1", "A", Type.PDB, "seq1.pdb"); pdbFiles[1] = new PDBEntry("PDB2", "B", Type.PDB, "seq2.pdb"); StructureSelectionManager ssm = new StructureSelectionManager(); - + /* * map residues 1-10 to residues 21-30 (atoms 105-150) in structures */ @@ -463,7 +466,7 @@ public class AAStructureBindingModelTest Map colours = binding.buildColoursMap(ssm, seqs, af.alignPanel); ChimeraCommands helper = new ChimeraCommands(); - + /* * M colour is #82827d (see strand.html help page) * sequence residue 1 mapped to structure residue 21 @@ -471,7 +474,8 @@ public class AAStructureBindingModelTest Color mColor = new Color(0x82827d); AtomSpecModel atomSpec = colours.get(mColor); assertNotNull(atomSpec); - assertEquals(helper.getAtomSpec(atomSpec, AtomSpecType.RESIDUE_ONLY), "#0:21.A|#1:21.B"); + assertEquals(helper.getAtomSpec(atomSpec, AtomSpecType.RESIDUE_ONLY), + "#0:21.A|#1:21.B"); /* * H colour is #60609f, seq1.2 mapped to structure 0 residue 22 @@ -479,7 +483,8 @@ public class AAStructureBindingModelTest Color hColor = new Color(0x60609f); atomSpec = colours.get(hColor); assertNotNull(atomSpec); - assertEquals(helper.getAtomSpec(atomSpec, AtomSpecType.RESIDUE_ONLY), "#0:22.A"); + assertEquals(helper.getAtomSpec(atomSpec, AtomSpecType.RESIDUE_ONLY), + "#0:22.A"); /* * V colour is #ffff00, seq2.2 mapped to structure 1 residue 22 @@ -487,7 +492,8 @@ public class AAStructureBindingModelTest Color vColor = new Color(0xffff00); atomSpec = colours.get(vColor); assertNotNull(atomSpec); - assertEquals(helper.getAtomSpec(atomSpec, AtomSpecType.RESIDUE_ONLY), "#1:22.B"); + assertEquals(helper.getAtomSpec(atomSpec, AtomSpecType.RESIDUE_ONLY), + "#1:22.B"); /* * hidden columns are Gray (128, 128, 128) @@ -496,7 +502,8 @@ public class AAStructureBindingModelTest Color gray = new Color(128, 128, 128); atomSpec = colours.get(gray); assertNotNull(atomSpec); - assertEquals(helper.getAtomSpec(atomSpec, AtomSpecType.RESIDUE_ONLY), "#0:23-25.A|#1:23-25.B"); + assertEquals(helper.getAtomSpec(atomSpec, AtomSpecType.RESIDUE_ONLY), + "#0:23-25.A|#1:23-25.B"); /* * S and G are both coloured #4949b6, structure residues 26-30 diff --git a/test/jalview/urls/AppletUrlProviderFactoryTest.java b/test/jalview/urls/AppletUrlProviderFactoryTest.java index 2a967e4..4294855 100644 --- a/test/jalview/urls/AppletUrlProviderFactoryTest.java +++ b/test/jalview/urls/AppletUrlProviderFactoryTest.java @@ -32,7 +32,8 @@ import java.util.Map; import org.testng.Assert; import org.testng.annotations.Test; -public class AppletUrlProviderFactoryTest { +public class AppletUrlProviderFactoryTest +{ @Test(groups = { "Functional" }) public void testCreateUrlProvider() @@ -55,8 +56,7 @@ public class AppletUrlProviderFactoryTest { // default url correctly set Assert.assertEquals(prov.getPrimaryUrlId(), "Test2"); Assert.assertEquals(prov.getPrimaryUrl("FER_CAPAN"), - defaultUrl.replace("$SEQUENCE_ID$", - "FER_CAPAN")); + defaultUrl.replace("$SEQUENCE_ID$", "FER_CAPAN")); List allLinks = prov.getLinksForTable(); diff --git a/test/jalview/urls/CustomUrlProviderTest.java b/test/jalview/urls/CustomUrlProviderTest.java index f9ed893..58b2731 100644 --- a/test/jalview/urls/CustomUrlProviderTest.java +++ b/test/jalview/urls/CustomUrlProviderTest.java @@ -47,13 +47,13 @@ public class CustomUrlProviderTest private static final HashMap urlMap = new HashMap() { { - put("TEST","http://someurl.blah/$DB_ACCESSION$"); - put("ANOTHER","http://test/t$SEQUENCE_ID$"); + put("TEST", "http://someurl.blah/$DB_ACCESSION$"); + put("ANOTHER", "http://test/t$SEQUENCE_ID$"); put("TEST2", "http://address/$SEQUENCE_ID$"); put("SRS", "http://theSRSlink/$SEQUENCE_ID$"); } }; - + private static final HashMap unselUrlMap = new HashMap() { { @@ -65,8 +65,7 @@ public class CustomUrlProviderTest private static final String[] dlinks = { "TEST|http://someurl.blah/$DB_ACCESSION$", "ANOTHER|http://test/t$SEQUENCE_ID$", - "TEST2|http://address/$SEQUENCE_ID$", - UrlConstants.DEFAULT_STRING }; + "TEST2|http://address/$SEQUENCE_ID$", UrlConstants.DEFAULT_STRING }; private static final String[] unselDlinks = { "NON1|http://x/y/$DB_ACCESSION$", "NON2|http://a/b/c/$DB_ACCESSION" }; @@ -77,7 +76,8 @@ public class CustomUrlProviderTest private static final Vector unselDisplayLinks = new Vector( Arrays.asList(unselDlinks)); - private static final String[] dlinks2 = { "a|http://x.y.z/$SEQUENCE_ID$" }; + private static final String[] dlinks2 = { + "a|http://x.y.z/$SEQUENCE_ID$" }; private static final Vector displayLinks2 = new Vector( Arrays.asList(dlinks2)); @@ -100,7 +100,7 @@ public class CustomUrlProviderTest { UrlProviderI customProv = new CustomUrlProvider(cachedList, unselectedList); - + // default url can be set assertTrue(customProv.setPrimaryUrl("ANOTHER")); @@ -116,14 +116,12 @@ public class CustomUrlProviderTest assertFalse(customProv.setPrimaryUrl("No default")); result = customProv.getPrimaryUrl("testid"); assertEquals(null, result); - + // choosing the default picks the DEFAULT_STRING option customProv.choosePrimaryUrl(); result = customProv.getPrimaryUrl("seqid"); - assertEquals( - UrlConstants.DEFAULT_STRING.split("\\|")[1].split("\\$")[0] - + "seqid", - result); + assertEquals(UrlConstants.DEFAULT_STRING.split("\\|")[1].split("\\$")[0] + + "seqid", result); } /* diff --git a/test/jalview/urls/DesktopUrlProviderFactoryTest.java b/test/jalview/urls/DesktopUrlProviderFactoryTest.java index cc55034..8ff9e5f 100644 --- a/test/jalview/urls/DesktopUrlProviderFactoryTest.java +++ b/test/jalview/urls/DesktopUrlProviderFactoryTest.java @@ -60,8 +60,8 @@ public class DesktopUrlProviderFactoryTest bw.close(); } catch (IOException e) { - System.out - .println("Error initialising DesktopUrlProviderFactoryTest test: " + System.out.println( + "Error initialising DesktopUrlProviderFactoryTest test: " + e.getMessage()); } @@ -95,15 +95,15 @@ public class DesktopUrlProviderFactoryTest // 5 links in menu (cachedUrlList) Assert.assertEquals(menulinks.size(), 5); - Assert.assertTrue(menulinks - .contains("Test1|http://blah.blah/$SEQUENCE_ID$")); - Assert.assertTrue(menulinks - .contains("Test2|http://test2/$DB_ACCESSION$")); - Assert.assertTrue(menulinks - .contains("Test3|http://test3/$SEQUENCE_ID$")); - Assert.assertTrue(menulinks - .contains("UniProt Knowledgebase|http://identifiers.org/uniprot/$DB_ACCESSION$|uniprot")); - Assert.assertTrue(menulinks - .contains("InterPro|http://identifiers.org/interpro/$DB_ACCESSION$|interpro")); + Assert.assertTrue( + menulinks.contains("Test1|http://blah.blah/$SEQUENCE_ID$")); + Assert.assertTrue( + menulinks.contains("Test2|http://test2/$DB_ACCESSION$")); + Assert.assertTrue( + menulinks.contains("Test3|http://test3/$SEQUENCE_ID$")); + Assert.assertTrue(menulinks.contains( + "UniProt Knowledgebase|http://identifiers.org/uniprot/$DB_ACCESSION$|uniprot")); + Assert.assertTrue(menulinks.contains( + "InterPro|http://identifiers.org/interpro/$DB_ACCESSION$|interpro")); } } diff --git a/test/jalview/urls/IdentifiersUrlProviderTest.java b/test/jalview/urls/IdentifiersUrlProviderTest.java index eed58b0..1fb3146 100644 --- a/test/jalview/urls/IdentifiersUrlProviderTest.java +++ b/test/jalview/urls/IdentifiersUrlProviderTest.java @@ -47,7 +47,7 @@ public class IdentifiersUrlProviderTest + "\"url\":\"http://identifiers.org/interpro\"}," + "{\"id\":\"MIR:00000372\",\"name\":\"ENA\",\"pattern\":\"^[A-Z]+[0-9]+(\\.\\d+)?$\",\"definition\":\"The European Nucleotide Archive (ENA),\"" + "\"prefix\":\"ena.embl\",\"url\":\"http://identifiers.org/ena.embl\"}]}"; - + private static final String[] dlinks = { "UniProt Knowledgebase|http://identifiers.org/uniprot/$DB_ACCESSION$|uniprot", "InterPro|http://identifiers.org/interpro/$DB_ACCESSION$|interpro", @@ -65,11 +65,12 @@ public class IdentifiersUrlProviderTest + "MIR:00000011|http://identifiers.org/interpro/$DB_ACCESSION$" + "MIR:00000372|http://identifiers.org/ena.embl/$DB_ACCESSION$"; - private static final String[] unselDlinks = { "ChEBI|http://identifiers.org/chebi/$DB_ACCESSION$" }; + private static final String[] unselDlinks = { + "ChEBI|http://identifiers.org/chebi/$DB_ACCESSION$" }; private static final Vector displayLinks = new Vector( - Arrays.asList(dlinks)); - + Arrays.asList(dlinks)); + private static final Vector unselDisplayLinks = new Vector( Arrays.asList(unselDlinks)); @@ -90,7 +91,6 @@ public class IdentifiersUrlProviderTest private String testfile = ""; - @BeforeClass(alwaysRun = true) public void setup() { @@ -124,7 +124,7 @@ public class IdentifiersUrlProviderTest // creation from cached id list String idList = "MIR:00000005|MIR:00000011|MIR:00000372"; UrlProviderI idProv = new IdentifiersUrlProvider(idList); - + assertTrue(displayLinks.containsAll(idProv.getLinksForMenu())); // because UrlProvider does not guarantee order of links, we can't just @@ -148,18 +148,17 @@ public class IdentifiersUrlProviderTest // creation from cached id list String idList = "MIR:00000005|MIR:00000011|MIR:00000372"; UrlProviderI idProv = new IdentifiersUrlProvider(idList); - + // initially no default assertEquals(null, idProv.getPrimaryUrl("seqid")); - + // set and then retrieve default assertTrue(idProv.setPrimaryUrl("MIR:00000005")); assertEquals("http://identifiers.org/uniprot/seqid", idProv.getPrimaryUrl("seqid")); // ids less than length 4 return null - assertEquals(null, - idProv.getPrimaryUrl("123")); + assertEquals(null, idProv.getPrimaryUrl("123")); // attempt to set bad default assertFalse(idProv.setPrimaryUrl("MIR:00001234")); diff --git a/test/jalview/urls/UrlLinkDisplayTest.java b/test/jalview/urls/UrlLinkDisplayTest.java index 9eeac9f..46ec42e 100644 --- a/test/jalview/urls/UrlLinkDisplayTest.java +++ b/test/jalview/urls/UrlLinkDisplayTest.java @@ -7,7 +7,8 @@ import java.util.List; import org.testng.Assert; import org.testng.annotations.Test; -public class UrlLinkDisplayTest { +public class UrlLinkDisplayTest +{ @Test(groups = { "Functional" }) public void testDisplayColumnNames() @@ -40,8 +41,7 @@ public class UrlLinkDisplayTest { // default only editable if link contains $SEQUENCE_ID$ UrlLink link = new UrlLink("Test Url", - "http://identifiers.org/$DB_ACCESSION$", - "TestName"); + "http://identifiers.org/$DB_ACCESSION$", "TestName"); UrlLinkDisplay u = new UrlLinkDisplay("Test", link, false, false); Assert.assertFalse(u.isEditable(UrlLinkDisplay.PRIMARY)); @@ -101,7 +101,8 @@ public class UrlLinkDisplayTest { UrlLinkDisplay u = new UrlLinkDisplay("Test", link, false, false); // Url initially as input in link - Assert.assertEquals(u.getUrl(), "http://identifiers.org/$DB_ACCESSION$"); + Assert.assertEquals(u.getUrl(), + "http://identifiers.org/$DB_ACCESSION$"); // Setting updates url u.setUrl("http://something.new/$SEQUENCE_ID$"); diff --git a/test/jalview/urls/UrlLinkTableModelTest.java b/test/jalview/urls/UrlLinkTableModelTest.java index ab190ef..c6d23b9 100644 --- a/test/jalview/urls/UrlLinkTableModelTest.java +++ b/test/jalview/urls/UrlLinkTableModelTest.java @@ -41,7 +41,8 @@ import org.testng.Assert; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; -public class UrlLinkTableModelTest { +public class UrlLinkTableModelTest +{ private static final String inmenu = "TEST|http://someurl.blah/$DB_ACCESSION$|" + "ANOTHER|http://test/t$SEQUENCE_ID$|" @@ -193,8 +194,8 @@ public class UrlLinkTableModelTest { Assert.assertEquals(m.getValueAt(10, 4), false); // check data source has new row insrte - Assert.assertTrue(prov.getLinksForMenu().contains( - "newname" + SEP + "newurl")); + Assert.assertTrue( + prov.getLinksForMenu().contains("newname" + SEP + "newurl")); } /* @@ -232,7 +233,8 @@ public class UrlLinkTableModelTest { // get original default int olddefault; boolean isDefault = false; - for (olddefault = 0; olddefault < m.getRowCount() && !isDefault; olddefault++) + for (olddefault = 0; olddefault < m.getRowCount() + && !isDefault; olddefault++) { isDefault = (boolean) m.getValueAt(olddefault, 3); } @@ -268,12 +270,12 @@ public class UrlLinkTableModelTest { } // check table updated - Assert.assertTrue(prov.writeUrlsAsString(true).contains( - "descchanged" + SEP + m.getValueAt(6, 2))); - Assert.assertTrue(prov.writeUrlsAsString(true).contains( - m.getValueAt(7, 1) + SEP + "urlchanged")); - Assert.assertTrue(prov.writeUrlsAsString(false).contains( - (String) m.getValueAt(8, 1))); + Assert.assertTrue(prov.writeUrlsAsString(true) + .contains("descchanged" + SEP + m.getValueAt(6, 2))); + Assert.assertTrue(prov.writeUrlsAsString(true) + .contains(m.getValueAt(7, 1) + SEP + "urlchanged")); + Assert.assertTrue(prov.writeUrlsAsString(false) + .contains((String) m.getValueAt(8, 1))); Assert.assertEquals(prov.getPrimaryUrl("seqid"), m.getValueAt(6, 2) .toString().replace(DELIM + SEQUENCE_ID + DELIM, "seqid")); } diff --git a/test/jalview/urls/UrlProviderTest.java b/test/jalview/urls/UrlProviderTest.java index 460ebe9..be0b492 100644 --- a/test/jalview/urls/UrlProviderTest.java +++ b/test/jalview/urls/UrlProviderTest.java @@ -14,18 +14,18 @@ import org.testng.Assert; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; +public class UrlProviderTest +{ -public class UrlProviderTest { - // Test identifiers.org download file private static final String testIdOrgString = "{\"Local\": [{\"id\":\"MIR:00000002\",\"name\":\"ChEBI\",\"pattern\":\"^CHEBI:\\d+$\"," - + "\"definition\":\"Chemical Entities of Biological Interest (ChEBI)\",\"prefix\":\"chebi\"," - + "\"url\":\"http://identifiers.org/chebi\"},{\"id\":\"MIR:00000005\",\"name\":\"UniProt Knowledgebase\"," - + "\"pattern\":\"^([A-N,R-Z][0-9]([A-Z][A-Z, 0-9][A-Z, 0-9][0-9]){1,2})|([O,P,Q][0-9][A-Z, 0-9][A-Z, 0-9][A-Z, 0-9][0-9])(\\.\\d+)?$\"," - + "\"definition\":\"The UniProt Knowledgebase (UniProtKB)\",\"prefix\":\"uniprot\",\"url\":\"http://identifiers.org/uniprot\"}," - + "{\"id\":\"MIR:00000011\",\"name\":\"InterPro\",\"pattern\":\"^IPR\\d{6}$\",\"definition\":\"InterPro\",\"prefix\":\"interpro\"," - + "\"url\":\"http://identifiers.org/interpro\"}," - + "{\"id\":\"MIR:00000372\",\"name\":\"ENA\",\"pattern\":\"^[A-Z]+[0-9]+(\\.\\d+)?$\",\"definition\":\"The European Nucleotide Archive (ENA),\"" + + "\"definition\":\"Chemical Entities of Biological Interest (ChEBI)\",\"prefix\":\"chebi\"," + + "\"url\":\"http://identifiers.org/chebi\"},{\"id\":\"MIR:00000005\",\"name\":\"UniProt Knowledgebase\"," + + "\"pattern\":\"^([A-N,R-Z][0-9]([A-Z][A-Z, 0-9][A-Z, 0-9][0-9]){1,2})|([O,P,Q][0-9][A-Z, 0-9][A-Z, 0-9][A-Z, 0-9][0-9])(\\.\\d+)?$\"," + + "\"definition\":\"The UniProt Knowledgebase (UniProtKB)\",\"prefix\":\"uniprot\",\"url\":\"http://identifiers.org/uniprot\"}," + + "{\"id\":\"MIR:00000011\",\"name\":\"InterPro\",\"pattern\":\"^IPR\\d{6}$\",\"definition\":\"InterPro\",\"prefix\":\"interpro\"," + + "\"url\":\"http://identifiers.org/interpro\"}," + + "{\"id\":\"MIR:00000372\",\"name\":\"ENA\",\"pattern\":\"^[A-Z]+[0-9]+(\\.\\d+)?$\",\"definition\":\"The European Nucleotide Archive (ENA),\"" + "\"prefix\":\"ena.embl\",\"url\":\"http://identifiers.org/ena.embl\"}]}"; private UrlProviderI prov; @@ -33,23 +33,23 @@ public class UrlProviderTest { @BeforeMethod(alwaysRun = true) public void setup() { - // make a dummy identifiers.org download file - File temp = null; - - try - { - temp = File.createTempFile("tempfile", ".tmp"); - temp.deleteOnExit(); - BufferedWriter bw = new BufferedWriter(new FileWriter(temp)); - bw.write(testIdOrgString); - bw.close(); - } catch (IOException e) - { - System.out.println("Error initialising UrlProviderTest test: " - + e.getMessage()); - } - - IdOrgSettings.setDownloadLocation(temp.getPath()); + // make a dummy identifiers.org download file + File temp = null; + + try + { + temp = File.createTempFile("tempfile", ".tmp"); + temp.deleteOnExit(); + BufferedWriter bw = new BufferedWriter(new FileWriter(temp)); + bw.write(testIdOrgString); + bw.close(); + } catch (IOException e) + { + System.out.println( + "Error initialising UrlProviderTest test: " + e.getMessage()); + } + + IdOrgSettings.setDownloadLocation(temp.getPath()); String defaultUrlString = "No default"; String cachedUrlList = "MIR:00000005|MIR:00000011|Test1|http://blah.blah/$SEQUENCE_ID$|" @@ -59,7 +59,7 @@ public class UrlProviderTest { DesktopUrlProviderFactory factory = new DesktopUrlProviderFactory( defaultUrlString, cachedUrlList, userUrlList); prov = factory.createUrlProvider(); - } + } @Test(groups = { "Functional" }) public void testInitUrlProvider() @@ -83,18 +83,18 @@ public class UrlProviderTest { // 6 links in menu (cachedUrlList) + new default Assert.assertEquals(menulinks.size(), 6); - Assert.assertTrue(menulinks - .contains("Test1|http://blah.blah/$SEQUENCE_ID$")); - Assert.assertTrue(menulinks - .contains("Test2|http://test2/$DB_ACCESSION$")); - Assert.assertTrue(menulinks - .contains("Test3|http://test3/$SEQUENCE_ID$")); - Assert.assertTrue(menulinks - .contains("UniProt Knowledgebase|http://identifiers.org/uniprot/$DB_ACCESSION$|uniprot")); - Assert.assertTrue(menulinks - .contains("InterPro|http://identifiers.org/interpro/$DB_ACCESSION$|interpro")); - Assert.assertTrue(menulinks.contains(UrlConstants.DEFAULT_LABEL - + UrlConstants.SEP + emblUrl)); + Assert.assertTrue( + menulinks.contains("Test1|http://blah.blah/$SEQUENCE_ID$")); + Assert.assertTrue( + menulinks.contains("Test2|http://test2/$DB_ACCESSION$")); + Assert.assertTrue( + menulinks.contains("Test3|http://test3/$SEQUENCE_ID$")); + Assert.assertTrue(menulinks.contains( + "UniProt Knowledgebase|http://identifiers.org/uniprot/$DB_ACCESSION$|uniprot")); + Assert.assertTrue(menulinks.contains( + "InterPro|http://identifiers.org/interpro/$DB_ACCESSION$|interpro")); + Assert.assertTrue(menulinks.contains( + UrlConstants.DEFAULT_LABEL + UrlConstants.SEP + emblUrl)); } @Test(groups = { "Functional" }) @@ -110,8 +110,10 @@ public class UrlProviderTest { } @Test( - groups = { "Functional" }, - expectedExceptions = { IllegalArgumentException.class }) + groups = + { "Functional" }, + expectedExceptions = + { IllegalArgumentException.class }) public void testSetDefaultUrlWrongly() { // don't allow default to be a non-key diff --git a/test/jalview/util/ColorUtilsTest.java b/test/jalview/util/ColorUtilsTest.java index fa4091f..9c9437e 100644 --- a/test/jalview/util/ColorUtilsTest.java +++ b/test/jalview/util/ColorUtilsTest.java @@ -102,8 +102,8 @@ public class ColorUtilsTest /* * value two-thirds of the way between min and max */ - col = ColorUtils - .getGraduatedColour(30f, 10f, minColour, 40f, maxColour); + col = ColorUtils.getGraduatedColour(30f, 10f, minColour, 40f, + maxColour); assertEquals(153, col.getRed()); // Color constructor rounds float value to nearest int assertEquals(167, col.getGreen()); @@ -112,15 +112,15 @@ public class ColorUtilsTest /* * value = min */ - col = ColorUtils - .getGraduatedColour(10f, 10f, minColour, 30f, maxColour); + col = ColorUtils.getGraduatedColour(10f, 10f, minColour, 30f, + maxColour); assertEquals(minColour, col); /* * value = max */ - col = ColorUtils - .getGraduatedColour(30f, 10f, minColour, 30f, maxColour); + col = ColorUtils.getGraduatedColour(30f, 10f, minColour, 30f, + maxColour); assertEquals(maxColour, col); /* @@ -132,15 +132,15 @@ public class ColorUtilsTest /* * value > max */ - col = ColorUtils - .getGraduatedColour(40f, 10f, minColour, 30f, maxColour); + col = ColorUtils.getGraduatedColour(40f, 10f, minColour, 30f, + maxColour); assertEquals(maxColour, col); /* * min = max */ - col = ColorUtils - .getGraduatedColour(40f, 10f, minColour, 10f, maxColour); + col = ColorUtils.getGraduatedColour(40f, 10f, minColour, 10f, + maxColour); assertEquals(minColour, col); } @@ -207,15 +207,16 @@ public class ColorUtilsTest assertNull(ColorUtils.parseColourString(null)); assertNull(ColorUtils.parseColourString("rubbish")); assertEquals(Color.WHITE, ColorUtils.parseColourString("-1")); - assertNull(ColorUtils.parseColourString(String - .valueOf(Integer.MAX_VALUE))); + assertNull(ColorUtils + .parseColourString(String.valueOf(Integer.MAX_VALUE))); assertNull(ColorUtils.parseColourString("100,200,300")); // out of range assertNull(ColorUtils.parseColourString("100,200")); // too few assertNull(ColorUtils.parseColourString("100,200,100,200")); // too many } @Test(groups = "Functional") - public void testGetAWTColorFromName() { + public void testGetAWTColorFromName() + { assertEquals(Color.white, ColorUtils.getAWTColorFromName("white")); assertEquals(Color.white, ColorUtils.getAWTColorFromName("White")); assertEquals(Color.white, ColorUtils.getAWTColorFromName("WHITE")); @@ -229,7 +230,8 @@ public class ColorUtilsTest public void testCreateColourFromName() { assertEquals(Color.white, ColorUtils.createColourFromName(null)); - assertEquals(new Color(20, 20, 20), ColorUtils.createColourFromName("")); + assertEquals(new Color(20, 20, 20), + ColorUtils.createColourFromName("")); assertEquals(new Color(98, 131, 171), ColorUtils.createColourFromName("None")); // no special treatment! assertEquals(new Color(123, 211, 122), diff --git a/test/jalview/util/ComparisonTest.java b/test/jalview/util/ComparisonTest.java index 2e646f5..cef9ffc 100644 --- a/test/jalview/util/ComparisonTest.java +++ b/test/jalview/util/ComparisonTest.java @@ -62,8 +62,9 @@ public class ComparisonTest { SequenceI seq = new Sequence("eightypercent", "agctuAGCPV"); assertFalse(Comparison.isNucleotide(new SequenceI[] { seq })); - assertFalse(Comparison.isNucleotide(new SequenceI[][] { new SequenceI[] - { seq } })); + assertFalse( + Comparison.isNucleotide(new SequenceI[][] + { new SequenceI[] { seq } })); seq = new Sequence("eightyfivepercent", "agctuAGCPVagctuAGCUV"); assertFalse(Comparison.isNucleotide(new SequenceI[] { seq })); @@ -87,19 +88,25 @@ public class ComparisonTest /* * 90% DNA but one protein sequence - expect false */ - assertFalse(Comparison.isNucleotide(new SequenceI[] { seq, seq, seq, - seq, seq, seq, seq, seq, seq, seq2 })); - assertFalse(Comparison.isNucleotide(new SequenceI[][] { - new SequenceI[] { seq }, new SequenceI[] { seq, seq, seq }, - new SequenceI[] { seq, seq, seq, seq, seq, seq2 } })); + assertFalse( + Comparison.isNucleotide(new SequenceI[] + { seq, seq, seq, seq, seq, seq, seq, seq, seq, seq2 })); + assertFalse( + Comparison.isNucleotide(new SequenceI[][] + { new SequenceI[] { seq }, new SequenceI[] { seq, seq, seq }, + new SequenceI[] + { seq, seq, seq, seq, seq, seq2 } })); /* * 80% DNA but one protein sequence - Expect false */ - assertFalse(Comparison.isNucleotide(new SequenceI[] { seq, seq, seq, - seq, seq, seq, seq, seq, seq2, seq2 })); - assertFalse(Comparison.isNucleotide(new SequenceI[][] { new SequenceI[] - { seq }, new SequenceI[] { seq, seq, seq }, - new SequenceI[] { seq, seq, seq, seq, seq2, seq2, null } })); + assertFalse( + Comparison.isNucleotide(new SequenceI[] + { seq, seq, seq, seq, seq, seq, seq, seq, seq2, seq2 })); + assertFalse( + Comparison.isNucleotide(new SequenceI[][] + { new SequenceI[] { seq }, new SequenceI[] { seq, seq, seq }, + new SequenceI[] + { seq, seq, seq, seq, seq2, seq2, null } })); seq = new Sequence("ProteinThatLooksLikeDNA", "WYATGCCTGAgtcgt"); // 12/14 = 85.7% diff --git a/test/jalview/util/DBRefUtilsTest.java b/test/jalview/util/DBRefUtilsTest.java index f92e454..d4574c0 100644 --- a/test/jalview/util/DBRefUtilsTest.java +++ b/test/jalview/util/DBRefUtilsTest.java @@ -63,7 +63,9 @@ public class DBRefUtilsTest DBRefEntry ref2 = new DBRefEntry("UNIPROT", "1.2", "A12346"); // Source is converted to upper-case by this constructor! DBRefEntry ref3 = new DBRefEntry("Uniprot", "1.2", "A12347"); - List dbrefs = Arrays.asList(new DBRefEntry[] { ref1, ref2, ref3 }); + List dbrefs = Arrays + .asList(new DBRefEntry[] + { ref1, ref2, ref3 }); String[] sources = new String[] { "EMBL", "UNIPROT" }; List selected = DBRefUtils.selectRefs(dbrefs, sources); @@ -108,10 +110,12 @@ public class DBRefUtilsTest assertEquals("PDB", DBRefUtils.getCanonicalName("Pdb")); assertEquals("UNIPROT", DBRefUtils.getCanonicalName("uniprotkb/swiss-prot")); - assertEquals("UNIPROT", DBRefUtils.getCanonicalName("uniprotkb/trembl")); + assertEquals("UNIPROT", + DBRefUtils.getCanonicalName("uniprotkb/trembl")); assertEquals("UNIPROT", DBRefUtils.getCanonicalName("UNIPROTKB/SWISS-PROT")); - assertEquals("UNIPROT", DBRefUtils.getCanonicalName("UNIPROTKB/TREMBL")); + assertEquals("UNIPROT", + DBRefUtils.getCanonicalName("UNIPROTKB/TREMBL")); assertEquals("UNIPROTKB/SWISS-CHEESE", DBRefUtils.getCanonicalName("UNIPROTKB/SWISS-CHEESE")); assertEquals("ENSEMBL", DBRefUtils.getCanonicalName("Ensembl")); @@ -121,6 +125,7 @@ public class DBRefUtilsTest assertEquals("pfam", DBRefUtils.getCanonicalName("pfam")); } + /** * Test 'parsing' a DBRef - non PDB case */ @@ -187,12 +192,14 @@ public class DBRefUtilsTest DBRefEntry ref4 = new DBRefEntry("EMBLCDS", "1", "A1234"); // no match // ref5 matches although it has a mapping - ignored DBRefEntry ref5 = new DBRefEntry("EMBL", "1", "A1234"); - ref5.setMap(new Mapping(new MapList(new int[] { 1, 1 }, new int[] { 1, - 1 }, 1, 1))); + ref5.setMap( + new Mapping(new MapList(new int[] + { 1, 1 }, new int[] { 1, 1 }, 1, 1))); - List matches = DBRefUtils.searchRefs( - Arrays.asList(new DBRefEntry[] { - ref1, ref2, ref3, ref4, ref5 }), target, DBRefUtils.SEARCH_MODE_FULL); + List matches = DBRefUtils + .searchRefs(Arrays.asList(new DBRefEntry[] + { ref1, ref2, ref3, ref4, ref5 }), target, + DBRefUtils.SEARCH_MODE_FULL); assertEquals(3, matches.size()); assertSame(ref1, matches.get(0)); assertSame(ref2, matches.get(1)); @@ -207,26 +214,29 @@ public class DBRefUtilsTest public void testSearchRefs_withMapping() { DBRefEntry target = new DBRefEntry("EMBL", "2", "A1234"); - final Mapping map1 = new Mapping(new MapList(new int[] { 1, 1 }, - new int[] { 1, 1 }, 1, 1)); + final Mapping map1 = new Mapping( + new MapList(new int[] + { 1, 1 }, new int[] { 1, 1 }, 1, 1)); target.setMap(map1); // these all match target iff mappings match DBRefEntry ref1 = new DBRefEntry("EMBL", "1", "A1234"); // no map: matches DBRefEntry ref2 = new DBRefEntry("EMBL", "1", "A1234"); // =map: matches - final Mapping map2 = new Mapping(new MapList(new int[] { 1, 1 }, - new int[] { 1, 1 }, 1, 1)); + final Mapping map2 = new Mapping( + new MapList(new int[] + { 1, 1 }, new int[] { 1, 1 }, 1, 1)); ref2.setMap(map2); // different map: no match DBRefEntry ref3 = new DBRefEntry("EMBL", "1", "A1234"); - final Mapping map3 = new Mapping(new MapList(new int[] { 1, 1 }, - new int[] { 1, 1 }, 2, 2)); + final Mapping map3 = new Mapping( + new MapList(new int[] + { 1, 1 }, new int[] { 1, 1 }, 2, 2)); ref3.setMap(map3); - List matches = DBRefUtils.searchRefs( - Arrays.asList(new DBRefEntry[] { - ref1, ref2, ref3 }), target, DBRefUtils.SEARCH_MODE_FULL); + List matches = DBRefUtils + .searchRefs(Arrays.asList(new DBRefEntry[] + { ref1, ref2, ref3 }), target, DBRefUtils.SEARCH_MODE_FULL); assertEquals(2, matches.size()); assertSame(ref1, matches.get(0)); assertSame(ref2, matches.get(1)); @@ -247,11 +257,13 @@ public class DBRefUtilsTest DBRefEntry ref4 = new DBRefEntry("EMBLCDS", "1", "A1235"); // no match // ref5 matches although it has a mapping - ignored DBRefEntry ref5 = new DBRefEntry("EMBL", "1", "A1234"); - ref5.setMap(new Mapping(new MapList(new int[] { 1, 1 }, new int[] { 1, - 1 }, 1, 1))); + ref5.setMap( + new Mapping(new MapList(new int[] + { 1, 1 }, new int[] { 1, 1 }, 1, 1))); - List dbrefs = Arrays.asList(new DBRefEntry[] { - ref1, ref2, ref3, ref4, ref5 }); + List dbrefs = Arrays + .asList(new DBRefEntry[] + { ref1, ref2, ref3, ref4, ref5 }); List matches = DBRefUtils.searchRefs(dbrefs, "A1234"); assertEquals(3, matches.size()); assertSame(ref1, matches.get(0)); @@ -276,12 +288,14 @@ public class DBRefUtilsTest DBRefEntry ref4 = new DBRefEntry("EMBLCDS", "1", "A1234"); // no match // ref5 matches although it has a mapping - ignored DBRefEntry ref5 = new DBRefEntry("EMBL", "1", "A1237"); - ref5.setMap(new Mapping(new MapList(new int[] { 1, 1 }, new int[] { 1, - 1 }, 1, 1))); + ref5.setMap( + new Mapping(new MapList(new int[] + { 1, 1 }, new int[] { 1, 1 }, 1, 1))); - List matches = DBRefUtils.searchRefs( - Arrays.asList(new DBRefEntry[] { - ref1, ref2, ref3, ref4, ref5 }), target, DBRefUtils.SEARCH_MODE_FULL); + List matches = DBRefUtils + .searchRefs(Arrays.asList(new DBRefEntry[] + { ref1, ref2, ref3, ref4, ref5 }), target, + DBRefUtils.SEARCH_MODE_FULL); assertEquals(4, matches.size()); assertSame(ref1, matches.get(0)); assertSame(ref2, matches.get(1)); diff --git a/test/jalview/util/DnaUtilsTest.java b/test/jalview/util/DnaUtilsTest.java index 9815aa0..35b4592 100644 --- a/test/jalview/util/DnaUtilsTest.java +++ b/test/jalview/util/DnaUtilsTest.java @@ -102,8 +102,8 @@ public class DnaUtilsTest /* * join of two complements */ - ranges = DnaUtils - .parseLocation("join(complement(4918..5163),complement(2691..4571))"); + ranges = DnaUtils.parseLocation( + "join(complement(4918..5163),complement(2691..4571))"); assertEquals(2, ranges.size()); assertEquals(5163, ranges.get(0)[0]); assertEquals(4918, ranges.get(0)[1]); @@ -158,7 +158,8 @@ public class DnaUtilsTest * complement may not enclose multiple ranges * parsing fails for the same reason */ - checkForParseException("join(complement(36618..36700,4000..4200),86988..87064)"); + checkForParseException( + "join(complement(36618..36700,4000..4200),86988..87064)"); } /** diff --git a/test/jalview/util/FormatTest.java b/test/jalview/util/FormatTest.java index 999e456..f12a40c 100644 --- a/test/jalview/util/FormatTest.java +++ b/test/jalview/util/FormatTest.java @@ -148,8 +148,8 @@ public class FormatTest } long stop = System.currentTimeMillis(); long elapsed1 = stop - start; - System.out.println(iterations + " x Format.form took " + elapsed1 - + "ms"); + System.out + .println(iterations + " x Format.form took " + elapsed1 + "ms"); start = System.currentTimeMillis(); for (int i = 0; i < iterations; i++) @@ -158,8 +158,8 @@ public class FormatTest } stop = System.currentTimeMillis(); long elapsed2 = stop - start; - System.out.println(iterations + " x String.format took " + elapsed2 - + "ms"); + System.out.println( + iterations + " x String.format took " + elapsed2 + "ms"); assertTrue(elapsed2 > elapsed1); } } diff --git a/test/jalview/util/MapListTest.java b/test/jalview/util/MapListTest.java index 9e494e1..03b3c99 100644 --- a/test/jalview/util/MapListTest.java +++ b/test/jalview/util/MapListTest.java @@ -46,7 +46,7 @@ public class MapListTest { Console.initLogger(); } - + @BeforeClass(alwaysRun = true) public void setUpJvOptionPane() { @@ -907,11 +907,11 @@ public class MapListTest assertArrayEquals(new int[] { 5, 6 }, merged.get(1)); assertArrayEquals(new int[] { 12, 8 }, merged.get(2)); assertArrayEquals(new int[] { 8, 7 }, merged.get(3)); - + // 'subsumed' ranges are preserved ranges.clear(); ranges.add(new int[] { 10, 30 }); - ranges.add(new int[] { 15, 25 }); + ranges.add(new int[] { 15, 25 }); merged = MapList.coalesceRanges(ranges); assertEquals(2, merged.size()); diff --git a/test/jalview/util/MappingUtilsTest.java b/test/jalview/util/MappingUtilsTest.java index 1420cee..8cb1208 100644 --- a/test/jalview/util/MappingUtilsTest.java +++ b/test/jalview/util/MappingUtilsTest.java @@ -1347,12 +1347,14 @@ public class MappingUtilsTest overlap = MappingUtils.findOverlap(ranges, 13, 15); assertNull(overlap); } - + /** * Test mapping a sequence group where sequences in and outside the group * share a dataset sequence (e.g. alternative CDS for the same gene) *

        - * This scenario doesn't arise after JAL-3763 changes, but test left as still valid + * This scenario doesn't arise after JAL-3763 changes, but test left as still + * valid + * * @throws IOException */ @Test(groups = { "Functional" }) diff --git a/test/jalview/util/ParseHtmlBodyAndLinksTest.java b/test/jalview/util/ParseHtmlBodyAndLinksTest.java index bfaa7af..30a3f4d 100644 --- a/test/jalview/util/ParseHtmlBodyAndLinksTest.java +++ b/test/jalview/util/ParseHtmlBodyAndLinksTest.java @@ -65,9 +65,10 @@ public class ParseHtmlBodyAndLinksTest "Please click on this%LINK% to learn more about this%LINK%", testee.getNonHtmlContent()); assertEquals(2, testee.getLinks().size()); - assertEquals("on this|http://www.nowhere.com", testee.getLinks().get(0)); - assertEquals("this|http://www.somewhere.com/here", testee.getLinks() - .get(1)); + assertEquals("on this|http://www.nowhere.com", + testee.getLinks().get(0)); + assertEquals("this|http://www.somewhere.com/here", + testee.getLinks().get(1)); } @Test(groups = { "Functional" }) diff --git a/test/jalview/util/PlatformTest.java b/test/jalview/util/PlatformTest.java index d2c48f1..2f583a5 100644 --- a/test/jalview/util/PlatformTest.java +++ b/test/jalview/util/PlatformTest.java @@ -139,6 +139,7 @@ public class PlatformTest { assertNull(Platform.escapeBackslashes(null)); assertEquals(Platform.escapeBackslashes("hello world"), "hello world"); - assertEquals(Platform.escapeBackslashes("hello\\world"), "hello\\\\world"); + assertEquals(Platform.escapeBackslashes("hello\\world"), + "hello\\\\world"); } } diff --git a/test/jalview/util/QuickSortTest.java b/test/jalview/util/QuickSortTest.java index f09dee9..bf9d16b 100644 --- a/test/jalview/util/QuickSortTest.java +++ b/test/jalview/util/QuickSortTest.java @@ -120,8 +120,9 @@ public class QuickSortTest String[] values = new String[] { "JOHN", "henry", "lucy", "henry", "ALISON" }; QuickSort.sort(values, things); - assertTrue(Arrays.equals(new String[] { "lucy", "henry", "henry", - "JOHN", "ALISON" }, values)); + assertTrue( + Arrays.equals(new String[] + { "lucy", "henry", "henry", "JOHN", "ALISON" }, values)); assertTrue(Arrays.equals(new Object[] { c3, c2, c4, c1, c5 }, things)); } @@ -136,8 +137,9 @@ public class QuickSortTest QuickSort.sort(values, letters); assertTrue(Arrays.equals(new int[] { 1, 2, 3, 4, 4 }, values)); // this fails - do we care? - assertTrue(Arrays.equals(new Object[] { "Z", "Y", "A", "X", "B" }, - letters)); + assertTrue( + Arrays.equals(new Object[] + { "Z", "Y", "A", "X", "B" }, letters)); } /** @@ -194,10 +196,9 @@ public class QuickSortTest QuickSort.sort(counts, residues); } long elapsed = System.currentTimeMillis() - start; - System.out - .println(String - .format("Time for %d optimised sorts of mostly zeros array length %d was %dms", - iterations, counts.length, elapsed)); + System.out.println(String.format( + "Time for %d optimised sorts of mostly zeros array length %d was %dms", + iterations, counts.length, elapsed)); /* * time it using unoptimised external sort @@ -212,10 +213,9 @@ public class QuickSortTest QuickSort.charSortByFloat(counts, residues, true); } elapsed = System.currentTimeMillis() - start; - System.out - .println(String - .format("Time for %d external sorts of mostly zeros array length %d was %dms", - iterations, counts.length, elapsed)); + System.out.println(String.format( + "Time for %d external sorts of mostly zeros array length %d was %dms", + iterations, counts.length, elapsed)); /* * optimised external sort, well-filled array @@ -234,10 +234,9 @@ public class QuickSortTest QuickSort.sort(counts, residues); } elapsed = System.currentTimeMillis() - start; - System.out - .println(String - .format("Time for %d optimised sorts of non-zeros array length %d was %dms", - iterations, counts.length, elapsed)); + System.out.println(String.format( + "Time for %d optimised sorts of non-zeros array length %d was %dms", + iterations, counts.length, elapsed)); /* * time unoptimised external sort, filled array @@ -249,10 +248,9 @@ public class QuickSortTest QuickSort.charSortByFloat(counts, residues, true); } elapsed = System.currentTimeMillis() - start; - System.out - .println(String - .format("Time for %d external sorts of non-zeros array length %d was %dms", - iterations, counts.length, elapsed)); + System.out.println(String.format( + "Time for %d external sorts of non-zeros array length %d was %dms", + iterations, counts.length, elapsed)); } /** @@ -357,16 +355,18 @@ public class QuickSortTest * sort descending */ QuickSort.sortByString(values, things, false); - assertTrue(Arrays.equals(new String[] { "lucy", "henry", "henry", - "JOHN", "ALISON" }, values)); + assertTrue( + Arrays.equals(new String[] + { "lucy", "henry", "henry", "JOHN", "ALISON" }, values)); assertTrue(Arrays.equals(new Object[] { c3, c2, c4, c1, c5 }, things)); /* * resort ascending */ QuickSort.sortByString(values, things, true); - assertTrue(Arrays.equals(new String[] { "ALISON", "JOHN", "henry", - "henry", "lucy" }, values)); + assertTrue( + Arrays.equals(new String[] + { "ALISON", "JOHN", "henry", "henry", "lucy" }, values)); // sort is stable: c2/c4 do not swap order assertTrue(Arrays.equals(new Object[] { c5, c1, c2, c4, c3 }, things)); } diff --git a/test/jalview/util/SparseCountTest.java b/test/jalview/util/SparseCountTest.java index c4d67b6..711bb66 100644 --- a/test/jalview/util/SparseCountTest.java +++ b/test/jalview/util/SparseCountTest.java @@ -28,6 +28,7 @@ import jalview.gui.JvOptionPane; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; + public class SparseCountTest { diff --git a/test/jalview/util/StringUtilsTest.java b/test/jalview/util/StringUtilsTest.java index 37506c0..22324fc 100644 --- a/test/jalview/util/StringUtilsTest.java +++ b/test/jalview/util/StringUtilsTest.java @@ -67,20 +67,23 @@ public class StringUtilsTest char[] c1 = "ABC".toCharArray(); // delete second position - assertTrue(Arrays.equals(new char[] { 'A', 'C' }, - StringUtils.deleteChars(c1, 1, 2))); + assertTrue( + Arrays.equals(new char[] + { 'A', 'C' }, StringUtils.deleteChars(c1, 1, 2))); // delete positions 1 and 2 - assertTrue(Arrays.equals(new char[] { 'C' }, - StringUtils.deleteChars(c1, 0, 2))); + assertTrue( + Arrays.equals(new char[] + { 'C' }, StringUtils.deleteChars(c1, 0, 2))); // delete positions 1-3 assertTrue(Arrays.equals(new char[] {}, StringUtils.deleteChars(c1, 0, 3))); // delete position 3 - assertTrue(Arrays.equals(new char[] { 'A', 'B' }, - StringUtils.deleteChars(c1, 2, 3))); + assertTrue( + Arrays.equals(new char[] + { 'A', 'B' }, StringUtils.deleteChars(c1, 2, 3))); // out of range deletion is ignore assertTrue(Arrays.equals(c1, StringUtils.deleteChars(c1, 3, 4))); @@ -116,8 +119,8 @@ public class StringUtilsTest * String delimited by | containing a quoted | (should not be treated as * delimiter) */ - assertEquals("[abc='|'d, ef, g]", Arrays.toString(StringUtils - .separatorListToArray("abc='|'d|ef|g", "|"))); + assertEquals("[abc='|'d, ef, g]", Arrays.toString( + StringUtils.separatorListToArray("abc='|'d|ef|g", "|"))); } @Test(groups = { "Functional" }) @@ -126,19 +129,19 @@ public class StringUtilsTest assertEquals("*", StringUtils.arrayToSeparatorList(null, "*")); assertEquals("*", StringUtils.arrayToSeparatorList(new String[] {}, "*")); - assertEquals( - "a*bc*cde", - StringUtils.arrayToSeparatorList(new String[] { "a", "bc", - "cde" }, "*")); - assertEquals( - "a*cde", - StringUtils.arrayToSeparatorList(new String[] { "a", null, - "cde" }, "*")); - assertEquals("a**cde", StringUtils.arrayToSeparatorList(new String[] { - "a", "", "cde" }, "*")); + assertEquals("a*bc*cde", + StringUtils.arrayToSeparatorList(new String[] + { "a", "bc", "cde" }, "*")); + assertEquals("a*cde", + StringUtils.arrayToSeparatorList(new String[] + { "a", null, "cde" }, "*")); + assertEquals("a**cde", + StringUtils.arrayToSeparatorList(new String[] + { "a", "", "cde" }, "*")); // delimiter within token is not (yet) escaped - assertEquals("a*b*c*cde", StringUtils.arrayToSeparatorList(new String[] - { "a", "b*c", "cde" }, "*")); + assertEquals("a*b*c*cde", + StringUtils.arrayToSeparatorList(new String[] + { "a", "b*c", "cde" }, "*")); } @Test(groups = { "Functional" }) @@ -151,7 +154,8 @@ public class StringUtilsTest assertEquals("now", StringUtils.listToDelimitedString(list, ";")); list.add("is"); assertEquals("now;is", StringUtils.listToDelimitedString(list, ";")); - assertEquals("now ; is", StringUtils.listToDelimitedString(list, " ; ")); + assertEquals("now ; is", + StringUtils.listToDelimitedString(list, " ; ")); list.add("the"); list.add("winter"); list.add("of"); @@ -199,7 +203,8 @@ public class StringUtilsTest assertEquals(-1, StringUtils.compareVersions("2.8.3", "2.9.2")); assertEquals(-1, StringUtils.compareVersions("2.8", "2.8.3")); assertEquals(-1, StringUtils.compareVersions("2.8.3", "2.8.3b1", "b")); - assertEquals(-1, StringUtils.compareVersions("2.8.3b1", "2.8.3b2", "b")); + assertEquals(-1, + StringUtils.compareVersions("2.8.3b1", "2.8.3b2", "b")); assertEquals(-1, StringUtils.compareVersions("2.8", "2.8.0", "b")); assertEquals(-1, StringUtils.compareVersions("2", "12")); assertEquals(-1, StringUtils.compareVersions("3.2.4", "3.12.11")); @@ -234,18 +239,18 @@ public class StringUtilsTest { assertNull(StringUtils.stripHtmlTags(null)); assertEquals("", StringUtils.stripHtmlTags("")); - assertEquals( - "label", - StringUtils - .stripHtmlTags("label")); + assertEquals("label", + StringUtils.stripHtmlTags( + "label")); // if no "" tag, < and > get html-encoded (not sure why) assertEquals("<a href=\"something\">label</href>", - StringUtils.stripHtmlTags("label")); + StringUtils + .stripHtmlTags("label")); // gets removed but not (is this intentional?) - assertEquals("

        hello", - StringUtils.stripHtmlTags("

        hello")); + assertEquals("

        hello", StringUtils + .stripHtmlTags("

        hello")); assertEquals("kdHydro < 12.53", StringUtils.stripHtmlTags("kdHydro < 12.53")); diff --git a/test/jalview/util/UrlLinkTest.java b/test/jalview/util/UrlLinkTest.java index c7d37b0..cea1bf2 100644 --- a/test/jalview/util/UrlLinkTest.java +++ b/test/jalview/util/UrlLinkTest.java @@ -62,7 +62,7 @@ public class UrlLinkTest final static String DELIM = "$"; final static String REGEX_NESTED = "=/^(?:Label:)?(?:(?:gi\\|(\\d+))|([^:]+))/="; - + final static String REGEX_RUBBISH = "=/[0-9]++/="; /** @@ -155,11 +155,9 @@ public class UrlLinkTest assertEquals(REGEX_RUBBISH.substring(2, REGEX_RUBBISH.length() - 2), ul.getRegexReplace()); assertFalse(ul.isValid()); - assertEquals( - "Invalid Regular Expression : '" - + REGEX_RUBBISH.substring(2, REGEX_RUBBISH.length() - 2) - + "'\n", - ul.getInvalidMessage()); + assertEquals("Invalid Regular Expression : '" + + REGEX_RUBBISH.substring(2, REGEX_RUBBISH.length() - 2) + + "'\n", ul.getInvalidMessage()); } /** @@ -316,8 +314,9 @@ public class UrlLinkTest List refs = new ArrayList<>(); // links as might be added into Preferences | Connections dialog - links.add("EMBL-EBI Search | http://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&query=$" - + SEQUENCE_ID + "$"); + links.add( + "EMBL-EBI Search | http://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&query=$" + + SEQUENCE_ID + "$"); links.add("UNIPROT | http://www.uniprot.org/uniprot/$" + DB_ACCESSION + "$"); links.add("INTERPRO | http://www.ebi.ac.uk/interpro/entry/$" @@ -352,8 +351,8 @@ public class UrlLinkTest assertEquals(DB, linkset.get(key).get(0)); assertEquals(DB, linkset.get(key).get(1)); assertEquals(seq0.getName(), linkset.get(key).get(2)); - assertEquals(URL_PREFIX + seq0.getName() + URL_SUFFIX, linkset.get(key) - .get(3)); + assertEquals(URL_PREFIX + seq0.getName() + URL_SUFFIX, + linkset.get(key).get(3)); // Test where link takes a db annotation id and only has one dbref ul = new UrlLink(links.get(1)); @@ -364,11 +363,11 @@ public class UrlLinkTest assertEquals(linkset.size(), 1); assertTrue(linkset.containsKey(key)); assertEquals(DBRefSource.UNIPROT, linkset.get(key).get(0)); - assertEquals(DBRefSource.UNIPROT + SEP + "P83527", linkset.get(key) - .get(1)); + assertEquals(DBRefSource.UNIPROT + SEP + "P83527", + linkset.get(key).get(1)); assertEquals("P83527", linkset.get(key).get(2)); - assertEquals("http://www.uniprot.org/uniprot/P83527", linkset.get(key) - .get(3)); + assertEquals("http://www.uniprot.org/uniprot/P83527", + linkset.get(key).get(3)); // Test where link takes a db annotation id and has multiple dbrefs ul = new UrlLink(links.get(2)); @@ -382,24 +381,24 @@ public class UrlLinkTest assertEquals("INTERPRO", linkset.get(key).get(0)); assertEquals("INTERPRO" + SEP + "IPR001041", linkset.get(key).get(1)); assertEquals("IPR001041", linkset.get(key).get(2)); - assertEquals("http://www.ebi.ac.uk/interpro/entry/IPR001041", linkset - .get(key).get(3)); + assertEquals("http://www.ebi.ac.uk/interpro/entry/IPR001041", + linkset.get(key).get(3)); key = "IPR006058|http://www.ebi.ac.uk/interpro/entry/IPR006058"; assertTrue(linkset.containsKey(key)); assertEquals("INTERPRO", linkset.get(key).get(0)); assertEquals("INTERPRO" + SEP + "IPR006058", linkset.get(key).get(1)); assertEquals("IPR006058", linkset.get(key).get(2)); - assertEquals("http://www.ebi.ac.uk/interpro/entry/IPR006058", linkset - .get(key).get(3)); + assertEquals("http://www.ebi.ac.uk/interpro/entry/IPR006058", + linkset.get(key).get(3)); key = "IPR012675|http://www.ebi.ac.uk/interpro/entry/IPR012675"; assertTrue(linkset.containsKey(key)); assertEquals("INTERPRO", linkset.get(key).get(0)); assertEquals("INTERPRO" + SEP + "IPR012675", linkset.get(key).get(1)); assertEquals("IPR012675", linkset.get(key).get(2)); - assertEquals("http://www.ebi.ac.uk/interpro/entry/IPR012675", linkset - .get(key).get(3)); + assertEquals("http://www.ebi.ac.uk/interpro/entry/IPR012675", + linkset.get(key).get(3)); // Test where there are no matching dbrefs for the link ul = new UrlLink(DB + SEP + URL_PREFIX + DELIM + DB_ACCESSION + DELIM diff --git a/test/jalview/util/dialogrunner/DialogRunnerTest.java b/test/jalview/util/dialogrunner/DialogRunnerTest.java index c2d8129..b6e99b0 100644 --- a/test/jalview/util/dialogrunner/DialogRunnerTest.java +++ b/test/jalview/util/dialogrunner/DialogRunnerTest.java @@ -1,4 +1,5 @@ package jalview.util.dialogrunner; public class DialogRunnerTest -{} +{ +} diff --git a/test/jalview/util/matcher/MatcherTest.java b/test/jalview/util/matcher/MatcherTest.java index c964195..cd444ce 100644 --- a/test/jalview/util/matcher/MatcherTest.java +++ b/test/jalview/util/matcher/MatcherTest.java @@ -367,7 +367,7 @@ public class MatcherTest assertTrue(m.matches("2.0")); assertTrue(m.matches("2.000000f")); assertFalse(m.matches("2.01")); - + /* * NOT EQUALS test */ @@ -375,7 +375,7 @@ public class MatcherTest assertFalse(m.matches("123")); assertFalse(m.matches("123.0")); assertTrue(m.matches("-123")); - + /* * >= test */ @@ -383,14 +383,14 @@ public class MatcherTest assertTrue(m.matches("113890813")); assertTrue(m.matches("113890814")); assertFalse(m.matches("-113890813")); - + /* * > test */ m = new Matcher(Condition.GT, 113890813); assertFalse(m.matches("113890813")); assertTrue(m.matches("113890814")); - + /* * <= test */ @@ -398,7 +398,7 @@ public class MatcherTest assertTrue(m.matches("113890813")); assertFalse(m.matches("113890814")); assertTrue(m.matches("113890812")); - + /* * < test */ diff --git a/test/jalview/viewmodel/OverviewDimensionsHideHiddenTest.java b/test/jalview/viewmodel/OverviewDimensionsHideHiddenTest.java index f6a9d32..4640674 100644 --- a/test/jalview/viewmodel/OverviewDimensionsHideHiddenTest.java +++ b/test/jalview/viewmodel/OverviewDimensionsHideHiddenTest.java @@ -50,10 +50,15 @@ public class OverviewDimensionsHideHiddenTest // cached widths and heights int boxWidth; + int boxHeight; + int viewHeight; + int viewWidth; + int alheight; + int alwidth; ViewportRanges vpranges; @@ -79,7 +84,7 @@ public class OverviewDimensionsHideHiddenTest } ColumnSelection colsel = new ColumnSelection(); hiddenCols.revealAllHiddenColumns(colsel); - + vpranges = new ViewportRanges(al); vpranges.setViewportStartAndHeight(0, 18); vpranges.setViewportStartAndWidth(0, 63); @@ -100,12 +105,12 @@ public class OverviewDimensionsHideHiddenTest alheight = vpranges.getVisibleAlignmentHeight(); alwidth = vpranges.getVisibleAlignmentWidth(); - boxWidth = Math.round((float) (vpranges.getEndRes() - - vpranges.getStartRes() + 1) - * od.getWidth() / alwidth); - boxHeight = Math.round((float) (vpranges.getEndSeq() - - vpranges.getStartSeq() + 1) - * od.getSequencesHeight() / alheight); + boxWidth = Math.round( + (float) (vpranges.getEndRes() - vpranges.getStartRes() + 1) + * od.getWidth() / alwidth); + boxHeight = Math.round( + (float) (vpranges.getEndSeq() - vpranges.getStartSeq() + 1) + * od.getSequencesHeight() / alheight); } @AfterClass(alwaysRun = true) @@ -232,10 +237,8 @@ public class OverviewDimensionsHideHiddenTest assertEquals(od.getBoxHeight(), boxHeight); assertEquals(vpranges.getStartRes(), Math.round((float) od.getBoxX() * alwidth / od.getWidth())); - assertEquals( - vpranges.getStartSeq(), - Math.round((float) od.getBoxY() * alheight - / od.getSequencesHeight())); + assertEquals(vpranges.getStartSeq(), Math.round( + (float) od.getBoxY() * alheight / od.getSequencesHeight())); // overly large boxY value reset to sequenceHeight - boxHeight mouseClick(od, 10, 520); @@ -249,10 +252,8 @@ public class OverviewDimensionsHideHiddenTest // here (float) od.getBoxY() * alheight / od.getSequencesHeight() = 507.5 // and round rounds to 508; however we get 507 working with row values // hence the subtraction of 1 - assertEquals( - vpranges.getStartSeq(), - Math.round((float) od.getBoxY() * alheight - / od.getSequencesHeight()) - 1); + assertEquals(vpranges.getStartSeq(), Math.round( + (float) od.getBoxY() * alheight / od.getSequencesHeight()) - 1); // click past end of alignment, as above mouseClick(od, 3000, 5); @@ -261,10 +262,8 @@ public class OverviewDimensionsHideHiddenTest assertEquals(od.getBoxHeight(), boxHeight); assertEquals(vpranges.getStartRes(), Math.round((float) od.getBoxX() * alwidth / od.getWidth())); - assertEquals( - vpranges.getStartSeq(), - Math.round((float) od.getBoxY() * alheight - / od.getSequencesHeight())); + assertEquals(vpranges.getStartSeq(), Math.round( + (float) od.getBoxY() * alheight / od.getSequencesHeight())); // move viewport so startRes non-zero and then mouseclick moveViewportH(20); @@ -280,10 +279,8 @@ public class OverviewDimensionsHideHiddenTest assertEquals(vpranges.getStartRes(), Math.round((float) od.getBoxX() * alwidth / od.getWidth())); assertEquals(od.getBoxY(), oldboxy + 3); - assertEquals( - vpranges.getStartSeq(), - Math.round((float) od.getBoxY() * alheight - / od.getSequencesHeight())); + assertEquals(vpranges.getStartSeq(), Math.round( + (float) od.getBoxY() * alheight / od.getSequencesHeight())); // click at top corner mouseClick(od, 0, 0); @@ -350,7 +347,7 @@ public class OverviewDimensionsHideHiddenTest assertEquals(od.getBoxWidth(), boxWidth); assertEquals(vpranges.getStartRes(), 0); assertEquals(vpranges.getStartSeq(), 0); - + // hide columns 63-73, no change to box position or dimensions int firstHidden = 63; int lastHidden = 73; @@ -367,7 +364,7 @@ public class OverviewDimensionsHideHiddenTest // move box so that it overlaps with hidden cols on one side // box width, boxX and scrollCol as for unhidden case int xpos = 54 - boxWidth / 2; // 54 is position in overview approx halfway - // between cols 60 and 70 + // between cols 60 and 70 mouseClick(od, xpos, boxHeight / 2); testBoxIsAtClickPoint(xpos, boxHeight / 2); assertEquals(vpranges.getStartRes(), 1 + // rounding @@ -379,9 +376,8 @@ public class OverviewDimensionsHideHiddenTest xpos = 33; mouseClick(od, xpos, boxHeight / 2); testBoxIsAtClickPoint(xpos, boxHeight / 2); - assertEquals(vpranges.getStartRes(), - Math.round((float) (xpos - boxWidth / 2) * alwidth - / od.getWidth())); + assertEquals(vpranges.getStartRes(), Math.round( + (float) (xpos - boxWidth / 2) * alwidth / od.getWidth())); assertEquals(vpranges.getStartSeq(), 0); // move box so boxX is in hidden cols, box overhangs at right @@ -406,7 +402,7 @@ public class OverviewDimensionsHideHiddenTest assertEquals(od.getBoxHeight(), boxHeight); assertEquals(vpranges.getStartSeq(), 0); assertEquals(vpranges.getStartRes(), 75); - + // move box so it goes beyond full width of alignment // boxX, scrollCol adjusted back, box width normal xpos = 3000; @@ -461,9 +457,8 @@ public class OverviewDimensionsHideHiddenTest xpos = Math.round((float) 144 * od.getWidth() / alwidth) - boxWidth; mouseClick(od, xpos, boxHeight / 2); testBoxIsAtClickPoint(xpos, boxHeight / 2); - assertEquals(vpranges.getStartRes(), - Math.round((float) (xpos - boxWidth / 2) * alwidth - / od.getWidth())); + assertEquals(vpranges.getStartRes(), Math.round( + (float) (xpos - boxWidth / 2) * alwidth / od.getWidth())); assertEquals(vpranges.getStartSeq(), 0); // click off end of alignment @@ -541,9 +536,8 @@ public class OverviewDimensionsHideHiddenTest // move viewport to end of alignment - need to make startRes by removing // hidden cols because of how viewport/overview are implemented moveViewport(98 - lastHidden - 1, 0); - assertEquals(od.getBoxX(), - Math.round((float) (98 - lastHidden - 1) * od.getWidth() - / alwidth)); + assertEquals(od.getBoxX(), Math.round( + (float) (98 - lastHidden - 1) * od.getWidth() / alwidth)); assertEquals(od.getBoxY(), 0); assertEquals(od.getBoxWidth(), boxWidth); assertEquals(od.getBoxHeight(), boxHeight); @@ -619,9 +613,8 @@ public class OverviewDimensionsHideHiddenTest // viewport can't actually extend into hidden cols, // so move to the far right edge of the viewport moveViewport(firstHidden - viewWidth, 0); - assertEquals(od.getBoxX(), - Math.round((float) (firstHidden - viewWidth) - * od.getWidth() / alwidth)); + assertEquals(od.getBoxX(), Math.round( + (float) (firstHidden - viewWidth) * od.getWidth() / alwidth)); assertEquals(od.getBoxY(), 0); assertEquals(od.getBoxWidth(), boxWidth); assertEquals(od.getBoxHeight(), boxHeight); @@ -642,12 +635,12 @@ public class OverviewDimensionsHideHiddenTest alheight = vpranges.getVisibleAlignmentHeight(); alwidth = vpranges.getVisibleAlignmentWidth(); - boxWidth = Math.round((float) (vpranges.getEndRes() - - vpranges.getStartRes() + 1) - * od.getWidth() / alwidth); - boxHeight = Math.round((float) (vpranges.getEndSeq() - - vpranges.getStartSeq() + 1) - * od.getSequencesHeight() / alheight); + boxWidth = Math.round( + (float) (vpranges.getEndRes() - vpranges.getStartRes() + 1) + * od.getWidth() / alwidth); + boxHeight = Math.round( + (float) (vpranges.getEndSeq() - vpranges.getStartSeq() + 1) + * od.getSequencesHeight() / alheight); // move viewport to start of alignment: // box moves to below hidden rows, height remains same @@ -660,11 +653,9 @@ public class OverviewDimensionsHideHiddenTest // move viewport to end of alignment moveViewport(0, 525 - viewHeight - lastHidden - 1); assertEquals(od.getBoxX(), 0); - assertEquals( - od.getBoxY(), + assertEquals(od.getBoxY(), Math.round((float) (525 - viewHeight - lastHidden - 1) - * od.getSequencesHeight() - / alheight)); + * od.getSequencesHeight() / alheight)); assertEquals(od.getBoxWidth(), boxWidth); assertEquals(od.getBoxHeight(), boxHeight); } @@ -684,12 +675,12 @@ public class OverviewDimensionsHideHiddenTest alheight = vpranges.getVisibleAlignmentHeight(); alwidth = vpranges.getVisibleAlignmentWidth(); - boxWidth = Math.round((float) (vpranges.getEndRes() - - vpranges.getStartRes() + 1) - * od.getWidth() / alwidth); - boxHeight = Math.round((float) (vpranges.getEndSeq() - - vpranges.getStartSeq() + 1) - * od.getSequencesHeight() / alheight); + boxWidth = Math.round( + (float) (vpranges.getEndRes() - vpranges.getStartRes() + 1) + * od.getWidth() / alwidth); + boxHeight = Math.round( + (float) (vpranges.getEndSeq() - vpranges.getStartSeq() + 1) + * od.getSequencesHeight() / alheight); // move viewport to start of alignment: // box, height etc as in non-hidden case @@ -702,8 +693,8 @@ public class OverviewDimensionsHideHiddenTest // move viewport to straddle hidden rows moveViewport(0, 198); assertEquals(od.getBoxX(), 0); - assertEquals(od.getBoxY(), Math.round ((float)198 * od.getSequencesHeight() - / alheight)); + assertEquals(od.getBoxY(), + Math.round((float) 198 * od.getSequencesHeight() / alheight)); assertEquals(od.getBoxWidth(), boxWidth); assertEquals(od.getBoxHeight(), boxHeight); } @@ -723,12 +714,12 @@ public class OverviewDimensionsHideHiddenTest alheight = vpranges.getVisibleAlignmentHeight(); alwidth = vpranges.getVisibleAlignmentWidth(); - boxWidth = Math.round((float) (vpranges.getEndRes() - - vpranges.getStartRes() + 1) - * od.getWidth() / alwidth); - boxHeight = Math.round((float) (vpranges.getEndSeq() - - vpranges.getStartSeq() + 1) - * od.getSequencesHeight() / alheight); + boxWidth = Math.round( + (float) (vpranges.getEndRes() - vpranges.getStartRes() + 1) + * od.getWidth() / alwidth); + boxHeight = Math.round( + (float) (vpranges.getEndSeq() - vpranges.getStartSeq() + 1) + * od.getSequencesHeight() / alheight); // move viewport to start of alignment: // box, height etc as in non-hidden case @@ -742,8 +733,7 @@ public class OverviewDimensionsHideHiddenTest // viewport sits above hidden rows and does not include them moveViewport(0, firstHidden - viewHeight - 1); assertEquals(od.getBoxX(), 0); - assertEquals( - od.getBoxY(), + assertEquals(od.getBoxY(), Math.round((float) (firstHidden - viewHeight - 1) * od.getSequencesHeight() / alheight)); assertEquals(od.getBoxWidth(), boxWidth); @@ -774,12 +764,12 @@ public class OverviewDimensionsHideHiddenTest alheight = vpranges.getVisibleAlignmentHeight(); alwidth = vpranges.getVisibleAlignmentWidth(); - boxWidth = Math.round((float) (vpranges.getEndRes() - - vpranges.getStartRes() + 1) - * od.getWidth() / alwidth); - boxHeight = Math.round((float) (vpranges.getEndSeq() - - vpranges.getStartSeq() + 1) - * od.getSequencesHeight() / alheight); + boxWidth = Math.round( + (float) (vpranges.getEndRes() - vpranges.getStartRes() + 1) + * od.getWidth() / alwidth); + boxHeight = Math.round( + (float) (vpranges.getEndSeq() - vpranges.getStartSeq() + 1) + * od.getSequencesHeight() / alheight); od.setBoxPosition(al.getHiddenSequences(), hiddenCols); assertEquals(od.getBoxX(), 0); @@ -821,12 +811,12 @@ public class OverviewDimensionsHideHiddenTest alheight = vpranges.getVisibleAlignmentHeight(); alwidth = vpranges.getVisibleAlignmentWidth(); - boxWidth = Math.round((float) (vpranges.getEndRes() - - vpranges.getStartRes() + 1) - * od.getWidth() / alwidth); - boxHeight = Math.round((float) (vpranges.getEndSeq() - - vpranges.getStartSeq() + 1) - * od.getSequencesHeight() / alheight); + boxWidth = Math.round( + (float) (vpranges.getEndRes() - vpranges.getStartRes() + 1) + * od.getWidth() / alwidth); + boxHeight = Math.round( + (float) (vpranges.getEndSeq() - vpranges.getStartSeq() + 1) + * od.getSequencesHeight() / alheight); od.setBoxPosition(al.getHiddenSequences(), hiddenCols); @@ -881,12 +871,12 @@ public class OverviewDimensionsHideHiddenTest alheight = vpranges.getVisibleAlignmentHeight(); alwidth = vpranges.getVisibleAlignmentWidth(); - boxWidth = Math.round((float) (vpranges.getEndRes() - - vpranges.getStartRes() + 1) - * od.getWidth() / alwidth); - boxHeight = Math.round((float) (vpranges.getEndSeq() - - vpranges.getStartSeq() + 1) - * od.getSequencesHeight() / alheight); + boxWidth = Math.round( + (float) (vpranges.getEndRes() - vpranges.getStartRes() + 1) + * od.getWidth() / alwidth); + boxHeight = Math.round( + (float) (vpranges.getEndSeq() - vpranges.getStartSeq() + 1) + * od.getSequencesHeight() / alheight); od.setBoxPosition(al.getHiddenSequences(), hiddenCols); assertEquals(od.getBoxX(), 0); @@ -910,11 +900,9 @@ public class OverviewDimensionsHideHiddenTest mouseClick(od, 0, Math.round((float) ypos * od.getSequencesHeight() / alheight)); assertEquals(od.getBoxX(), 0); - assertEquals( - od.getBoxY(), - Math.round((float) firstHidden * od.getSequencesHeight() - / alheight) - - boxHeight); + assertEquals(od.getBoxY(), Math + .round((float) firstHidden * od.getSequencesHeight() / alheight) + - boxHeight); assertEquals(od.getBoxWidth(), boxWidth); assertEquals(od.getBoxHeight(), boxHeight); } @@ -961,10 +949,8 @@ public class OverviewDimensionsHideHiddenTest public void testDragging() { od.updateViewportFromMouse(0, 0, al.getHiddenSequences(), hiddenCols); - od.setDragPoint(4, 16, al.getHiddenSequences(), - hiddenCols); - od.adjustViewportFromMouse(20, 22, - al.getHiddenSequences(), hiddenCols); + od.setDragPoint(4, 16, al.getHiddenSequences(), hiddenCols); + od.adjustViewportFromMouse(20, 22, al.getHiddenSequences(), hiddenCols); // updates require an OverviewPanel to exist which it doesn't here // so call setBoxPosition() as it would be called by the AlignmentPanel @@ -1039,7 +1025,7 @@ public class OverviewDimensionsHideHiddenTest // normally od.setBoxPosition(al.getHiddenSequences(), hiddenCols); } - + /* * Test that the box is positioned with the top left corner at xpos, ypos * and with the original width and height @@ -1061,7 +1047,7 @@ public class OverviewDimensionsHideHiddenTest { SequenceI[] allseqs = al.getSequencesArray(); SequenceGroup theseSeqs = new SequenceGroup(); - + for (int i = start; i <= end; i++) { theseSeqs.addSequence(allseqs[i], false); diff --git a/test/jalview/viewmodel/OverviewDimensionsShowHiddenTest.java b/test/jalview/viewmodel/OverviewDimensionsShowHiddenTest.java index 842a0fd..b890e48 100644 --- a/test/jalview/viewmodel/OverviewDimensionsShowHiddenTest.java +++ b/test/jalview/viewmodel/OverviewDimensionsShowHiddenTest.java @@ -45,14 +45,20 @@ import org.testng.annotations.Test; public class OverviewDimensionsShowHiddenTest { AlignmentI al; + OverviewDimensionsShowHidden od; // cached widths and heights int boxWidth; + int boxHeight; + int viewHeight; + int viewWidth; + int alheight; + int alwidth; ViewportRanges vpranges; @@ -78,7 +84,7 @@ public class OverviewDimensionsShowHiddenTest } ColumnSelection colsel = new ColumnSelection(); hiddenCols.revealAllHiddenColumns(colsel); - + vpranges = new ViewportRanges(al); vpranges.setViewportStartAndHeight(0, 18); vpranges.setViewportStartAndWidth(0, 63); @@ -99,12 +105,12 @@ public class OverviewDimensionsShowHiddenTest alheight = vpranges.getAbsoluteAlignmentHeight(); alwidth = vpranges.getAbsoluteAlignmentWidth(); - boxWidth = Math.round((float) (vpranges.getEndRes() - - vpranges.getStartRes() + 1) - * od.getWidth() / alwidth); - boxHeight = Math.round((float) (vpranges.getEndSeq() - - vpranges.getStartSeq() + 1) - * od.getSequencesHeight() / alheight); + boxWidth = Math.round( + (float) (vpranges.getEndRes() - vpranges.getStartRes() + 1) + * od.getWidth() / alwidth); + boxHeight = Math.round( + (float) (vpranges.getEndSeq() - vpranges.getStartSeq() + 1) + * od.getSequencesHeight() / alheight); } @AfterClass(alwaysRun = true) @@ -231,10 +237,8 @@ public class OverviewDimensionsShowHiddenTest assertEquals(od.getBoxHeight(), boxHeight); assertEquals(vpranges.getStartRes(), Math.round((float) od.getBoxX() * alwidth / od.getWidth())); - assertEquals( - vpranges.getStartSeq(), - Math.round((float) od.getBoxY() * alheight - / od.getSequencesHeight())); + assertEquals(vpranges.getStartSeq(), Math.round( + (float) od.getBoxY() * alheight / od.getSequencesHeight())); // overly large boxY value reset to sequenceHeight - boxHeight mouseClick(od, 10, 520); @@ -248,10 +252,8 @@ public class OverviewDimensionsShowHiddenTest // here (float) od.getBoxY() * alheight / od.getSequencesHeight() = 507.5 // and round rounds to 508; however we get 507 working with row values // hence the subtraction of 1 - assertEquals( - vpranges.getStartSeq(), - Math.round((float) od.getBoxY() * alheight - / od.getSequencesHeight()) - 1); + assertEquals(vpranges.getStartSeq(), Math.round( + (float) od.getBoxY() * alheight / od.getSequencesHeight()) - 1); // click past end of alignment, as above mouseClick(od, 3000, 5); @@ -260,10 +262,8 @@ public class OverviewDimensionsShowHiddenTest assertEquals(od.getBoxHeight(), boxHeight); assertEquals(vpranges.getStartRes(), Math.round((float) od.getBoxX() * alwidth / od.getWidth())); - assertEquals( - vpranges.getStartSeq(), - Math.round((float) od.getBoxY() * alheight - / od.getSequencesHeight())); + assertEquals(vpranges.getStartSeq(), Math.round( + (float) od.getBoxY() * alheight / od.getSequencesHeight())); // move viewport so startRes non-zero and then mouseclick moveViewportH(20); @@ -279,10 +279,8 @@ public class OverviewDimensionsShowHiddenTest assertEquals(vpranges.getStartRes(), Math.round((float) od.getBoxX() * alwidth / od.getWidth())); assertEquals(od.getBoxY(), oldboxy + 3); - assertEquals( - vpranges.getStartSeq(), - Math.round((float) od.getBoxY() * alheight - / od.getSequencesHeight())); + assertEquals(vpranges.getStartSeq(), Math.round( + (float) od.getBoxY() * alheight / od.getSequencesHeight())); // click at top corner mouseClick(od, 0, 0); @@ -314,19 +312,16 @@ public class OverviewDimensionsShowHiddenTest hiddenCols.hideColumns(0, lastHiddenCol); od.setBoxPosition(al.getHiddenSequences(), hiddenCols); - assertEquals(od.getBoxX(), - Math.round((float) (lastHiddenCol + 1) * od.getWidth() - / alwidth)); + assertEquals(od.getBoxX(), Math + .round((float) (lastHiddenCol + 1) * od.getWidth() / alwidth)); assertEquals(od.getBoxWidth(), boxWidth); assertEquals(od.getBoxHeight(), boxHeight); // try to click in hidden cols, check box does not move int xpos = 10; mouseClick(od, xpos, 0); - assertEquals( - od.getBoxX(), - Math.round((float) (lastHiddenCol + 1) * od.getWidth() - / alwidth)); + assertEquals(od.getBoxX(), Math + .round((float) (lastHiddenCol + 1) * od.getWidth() / alwidth)); assertEquals(od.getBoxY(), 0); assertEquals(od.getBoxWidth(), boxWidth); assertEquals(od.getBoxHeight(), boxHeight); @@ -341,8 +336,7 @@ public class OverviewDimensionsShowHiddenTest assertEquals(od.getBoxHeight(), boxHeight); assertEquals(vpranges.getStartSeq(), 0); assertEquals(vpranges.getStartRes(), - Math.round( - (float) 60 * alwidth / od.getWidth()) + Math.round((float) 60 * alwidth / od.getWidth()) - (lastHiddenCol + 1)); // click to right of hidden columns such that box runs over right hand side @@ -358,10 +352,8 @@ public class OverviewDimensionsShowHiddenTest assertEquals(vpranges.getStartRes(), Math.round((float) od.getBoxX() * alwidth / od.getWidth()) - (lastHiddenCol + 1)); - assertEquals( - vpranges.getStartSeq(), - Math.round((float) od.getBoxY() * alheight - / od.getSequencesHeight())); + assertEquals(vpranges.getStartSeq(), Math.round( + (float) od.getBoxY() * alheight / od.getSequencesHeight())); } /** @@ -377,7 +369,7 @@ public class OverviewDimensionsShowHiddenTest assertEquals(od.getBoxWidth(), boxWidth); assertEquals(vpranges.getStartRes(), 0); assertEquals(vpranges.getStartSeq(), 0); - + // hide columns 63-73, no change to box position or dimensions int firstHidden = 63; int lastHidden = 73; @@ -393,12 +385,11 @@ public class OverviewDimensionsShowHiddenTest // move box so that it overlaps with hidden cols on one side // box width changes, boxX and scrollCol as for unhidden case int xpos = 54 - boxWidth / 2; // 54 is position in overview approx halfway - // between cols 60 and 70 + // between cols 60 and 70 mouseClick(od, xpos, boxHeight / 2); assertEquals(od.getBoxX(), xpos - boxWidth / 2); assertEquals(od.getBoxY(), 0); - assertEquals( - od.getBoxWidth(), + assertEquals(od.getBoxWidth(), Math.round(boxWidth + (float) (lastHidden - firstHidden + 1) * od.getWidth() / alwidth)); assertEquals(od.getBoxHeight(), boxHeight); @@ -413,8 +404,7 @@ public class OverviewDimensionsShowHiddenTest mouseClick(od, xpos, 0); assertEquals(od.getBoxX(), 24); assertEquals(od.getBoxY(), 0); - assertEquals( - od.getBoxWidth(), + assertEquals(od.getBoxWidth(), Math.round(boxWidth + (float) (lastHidden - firstHidden + 1) * od.getWidth() / alwidth)); assertEquals(od.getBoxHeight(), boxHeight); @@ -434,7 +424,7 @@ public class OverviewDimensionsShowHiddenTest assertEquals(vpranges.getStartSeq(), 0); assertEquals(vpranges.getStartRes(), 75 - (lastHidden - firstHidden + 1)); - + // move box so it goes beyond full width of alignment // boxX, scrollCol adjusted back, box width normal xpos = 3000; @@ -443,14 +433,11 @@ public class OverviewDimensionsShowHiddenTest assertEquals(od.getBoxY(), 0); assertEquals(od.getBoxWidth(), boxWidth); assertEquals(od.getBoxHeight(), boxHeight); - assertEquals( - vpranges.getStartRes(), + assertEquals(vpranges.getStartRes(), Math.round(((float) od.getBoxX() * alwidth / od.getWidth()) - (lastHidden - firstHidden + 1))); - assertEquals( - vpranges.getStartSeq(), - Math.round((float) od.getBoxY() * alheight - / od.getSequencesHeight())); + assertEquals(vpranges.getStartSeq(), Math.round( + (float) od.getBoxY() * alheight / od.getSequencesHeight())); } @@ -484,9 +471,8 @@ public class OverviewDimensionsShowHiddenTest int xpos = 30; int ypos = 6; testBoxIsAtClickPoint(xpos, ypos); - assertEquals(vpranges.getStartSeq(), Math - .round((float) (ypos - boxHeight / 2) * alheight - / od.getHeight())); + assertEquals(vpranges.getStartSeq(), Math.round( + (float) (ypos - boxHeight / 2) * alheight / od.getHeight())); assertEquals(vpranges.getStartRes(), Math.round( (float) (xpos - boxWidth / 2) * alwidth / od.getWidth())); @@ -495,15 +481,13 @@ public class OverviewDimensionsShowHiddenTest xpos = Math.round((float) 145 * od.getWidth() / alwidth) - boxWidth; mouseClick(od, xpos + boxWidth / 2, boxHeight / 2); assertEquals(od.getBoxX(), - Math.round((float) (firstHidden - 1) - * od.getWidth() / alwidth) + Math.round((float) (firstHidden - 1) * od.getWidth() / alwidth) - boxWidth + 1); assertEquals(od.getBoxY(), 0); assertEquals(od.getBoxWidth(), boxWidth); assertEquals(od.getBoxHeight(), boxHeight); assertEquals(vpranges.getStartRes(), - Math.round((float) (od.getBoxX()) * alwidth - / od.getWidth())); + Math.round((float) (od.getBoxX()) * alwidth / od.getWidth())); assertEquals(vpranges.getStartSeq(), 0); // click in hidden cols @@ -628,11 +612,9 @@ public class OverviewDimensionsShowHiddenTest assertEquals(od.getBoxX(), Math.round((float) 10 * od.getWidth() / alwidth)); assertEquals(od.getBoxY(), 0); - assertEquals( - od.getBoxWidth(), - boxWidth - + Math.round((float) (lastHidden - firstHidden + 1) - * od.getWidth() / alwidth)); + assertEquals(od.getBoxWidth(), + boxWidth + Math.round((float) (lastHidden - firstHidden + 1) + * od.getWidth() / alwidth)); assertEquals(od.getBoxHeight(), boxHeight); // move viewport to straddle hidden columns @@ -640,11 +622,8 @@ public class OverviewDimensionsShowHiddenTest assertEquals(od.getBoxX(), Math.round((float) 63 * od.getWidth() / alwidth)); assertEquals(od.getBoxY(), 0); - assertEquals( - od.getBoxWidth(), - boxWidth - + Math.round((lastHidden - firstHidden + 1) - * od.getWidth() / alwidth)); + assertEquals(od.getBoxWidth(), boxWidth + Math.round( + (lastHidden - firstHidden + 1) * od.getWidth() / alwidth)); assertEquals(od.getBoxHeight(), boxHeight); // move viewport to right of hidden columns, no overlap @@ -680,9 +659,8 @@ public class OverviewDimensionsShowHiddenTest // viewport can't actually extend into hidden cols, // so move to the far right edge of the viewport moveViewport(firstHidden - viewWidth, 0); - assertEquals(od.getBoxX(), - Math.round((float) (firstHidden - viewWidth) - * od.getWidth() / alwidth)); + assertEquals(od.getBoxX(), Math.round( + (float) (firstHidden - viewWidth) * od.getWidth() / alwidth)); assertEquals(od.getBoxY(), 0); assertEquals(od.getBoxWidth(), boxWidth); assertEquals(od.getBoxHeight(), boxHeight); @@ -703,19 +681,16 @@ public class OverviewDimensionsShowHiddenTest // box moves to below hidden rows, height remains same moveViewport(0, 0); assertEquals(od.getBoxX(), 0); - assertEquals(od.getBoxY(), - Math.round((float) (lastHidden + 1) * od.getSequencesHeight() - / alheight)); + assertEquals(od.getBoxY(), Math.round( + (float) (lastHidden + 1) * od.getSequencesHeight() / alheight)); assertEquals(od.getBoxWidth(), boxWidth); assertEquals(od.getBoxHeight(), boxHeight); // move viewport to end of alignment moveViewport(0, 525 - viewHeight - lastHidden - 1); assertEquals(od.getBoxX(), 0); - assertEquals( - od.getBoxY(), - Math.round((float) (525 - viewHeight) * od.getSequencesHeight() - / alheight)); + assertEquals(od.getBoxY(), Math.round((float) (525 - viewHeight) + * od.getSequencesHeight() / alheight)); assertEquals(od.getBoxWidth(), boxWidth); assertEquals(od.getBoxHeight(), boxHeight); } @@ -742,11 +717,10 @@ public class OverviewDimensionsShowHiddenTest // move viewport to straddle hidden rows moveViewport(0, 198); assertEquals(od.getBoxX(), 0); - assertEquals(od.getBoxY(), Math.round ((float)198 * od.getSequencesHeight() - / alheight)); + assertEquals(od.getBoxY(), + Math.round((float) 198 * od.getSequencesHeight() / alheight)); assertEquals(od.getBoxWidth(), boxWidth); - assertEquals( - od.getBoxHeight(), + assertEquals(od.getBoxHeight(), Math.round((float) (viewHeight + lastHidden - firstHidden + 1) * od.getSequencesHeight() / alheight)); } @@ -774,8 +748,7 @@ public class OverviewDimensionsShowHiddenTest // viewport sits above hidden rows and does not include them moveViewport(0, firstHidden - viewHeight - 1); assertEquals(od.getBoxX(), 0); - assertEquals( - od.getBoxY(), + assertEquals(od.getBoxY(), Math.round((float) (firstHidden - viewHeight - 1) * od.getSequencesHeight() / alheight)); assertEquals(od.getBoxWidth(), boxWidth); @@ -805,24 +778,21 @@ public class OverviewDimensionsShowHiddenTest od.setBoxPosition(al.getHiddenSequences(), hiddenCols); assertEquals(od.getBoxX(), 0); - assertEquals(od.getBoxY(), - Math.round((float) (lastHiddenRow + 1) - * od.getSequencesHeight() / alheight)); + assertEquals(od.getBoxY(), Math.round((float) (lastHiddenRow + 1) + * od.getSequencesHeight() / alheight)); assertEquals(od.getBoxWidth(), boxWidth); assertEquals(od.getBoxHeight(), boxHeight); // click in hidden rows - same result mouseClick(od, 0, 0); assertEquals(od.getBoxX(), 0); - assertEquals( - od.getBoxY(), - Math.round((float) (lastHiddenRow + 1) - * od.getSequencesHeight() / alheight)); + assertEquals(od.getBoxY(), Math.round((float) (lastHiddenRow + 1) + * od.getSequencesHeight() / alheight)); assertEquals(od.getBoxWidth(), boxWidth); assertEquals(od.getBoxHeight(), boxHeight); // click below hidden rows - mouseClick(od, 0, 150 + boxHeight/2); + mouseClick(od, 0, 150 + boxHeight / 2); assertEquals(od.getBoxX(), 0); assertEquals(od.getBoxY(), 150); assertEquals(od.getBoxWidth(), boxWidth); @@ -861,18 +831,15 @@ public class OverviewDimensionsShowHiddenTest // click above hidden rows, so that box overlaps int rowpos = 35; // row value in residues int centrepos = 43; // centre row - mouseClick(od, 0, - Math.round((float) centrepos * od.getSequencesHeight() - / alheight)); + mouseClick(od, 0, Math + .round((float) centrepos * od.getSequencesHeight() / alheight)); assertEquals(od.getBoxX(), 0); - assertEquals(od.getBoxY(), - Math.round( - (float) rowpos * od.getSequencesHeight() / alheight)); + assertEquals(od.getBoxY(), Math + .round((float) rowpos * od.getSequencesHeight() / alheight)); assertEquals(od.getBoxWidth(), boxWidth); - assertEquals( - od.getBoxHeight(), - boxHeight - + Math.round((float) (lastHiddenRow - firstHiddenRow + 1) + assertEquals(od.getBoxHeight(), + boxHeight + Math + .round((float) (lastHiddenRow - firstHiddenRow + 1) * od.getSequencesHeight() / alheight)); } @@ -919,10 +886,8 @@ public class OverviewDimensionsShowHiddenTest mouseClick(od, 0, Math.round((float) ypos * od.getSequencesHeight() / alheight)); assertEquals(od.getBoxX(), 0); - assertEquals( - od.getBoxY(), - Math.round((float) (firstHidden - viewHeight) - * od.getSequencesHeight() / alheight)); + assertEquals(od.getBoxY(), Math.round((float) (firstHidden - viewHeight) + * od.getSequencesHeight() / alheight)); assertEquals(od.getBoxWidth(), boxWidth); assertEquals(od.getBoxHeight(), boxHeight); @@ -931,10 +896,8 @@ public class OverviewDimensionsShowHiddenTest mouseClick(od, 0, Math.round((float) ypos * od.getSequencesHeight() / alheight)); assertEquals(od.getBoxX(), 0); - assertEquals( - od.getBoxY(), - Math.round((firstHidden - viewHeight) * od.getSequencesHeight() - / alheight)); + assertEquals(od.getBoxY(), Math.round((firstHidden - viewHeight) + * od.getSequencesHeight() / alheight)); assertEquals(od.getBoxWidth(), boxWidth); assertEquals(od.getBoxHeight(), boxHeight); } @@ -1078,7 +1041,7 @@ public class OverviewDimensionsShowHiddenTest // normally od.setBoxPosition(al.getHiddenSequences(), hiddenCols); } - + /* * Test that the box is positioned with the centre at xpos, ypos * and with the original width and height @@ -1100,7 +1063,7 @@ public class OverviewDimensionsShowHiddenTest { SequenceI[] allseqs = al.getSequencesArray(); SequenceGroup theseSeqs = new SequenceGroup(); - + for (int i = start; i <= end; i++) { theseSeqs.addSequence(allseqs[i], false); @@ -1125,31 +1088,28 @@ public class OverviewDimensionsShowHiddenTest assertEquals(od.getBoxWidth(), boxWidth); assertEquals(vpranges.getStartRes(), 0); assertEquals(vpranges.getStartSeq(), 0); - + // hide rows at start and check updated box position is correct // changes boxY but not boxheight int lastHiddenRow = 30; hideSequences(0, lastHiddenRow); - + od.setBoxPosition(al.getHiddenSequences(), hiddenCols); assertEquals(od.getBoxX(), 0); - assertEquals(od.getBoxY(), - Math.round((float) (lastHiddenRow + 1) - * od.getSequencesHeight() / alheight)); + assertEquals(od.getBoxY(), Math.round((float) (lastHiddenRow + 1) + * od.getSequencesHeight() / alheight)); assertEquals(od.getBoxWidth(), boxWidth); assertEquals(od.getBoxHeight(), boxHeight); - + // click in hidden rows - same result mouseClick(od, 0, 0); assertEquals(od.getBoxX(), 0); int boxY = od.getBoxY(); - assertEquals( - boxY, - Math.round((float) (lastHiddenRow + 1) - * od.getSequencesHeight() / alheight)); + assertEquals(boxY, Math.round((float) (lastHiddenRow + 1) + * od.getSequencesHeight() / alheight)); assertEquals(od.getBoxWidth(), boxWidth); assertEquals(od.getBoxHeight(), boxHeight); - + // click below hidden rows // vertical move of overview box is suppressed in wrapped mode mouseClick(od, 0, 150); diff --git a/test/jalview/viewmodel/ViewportRangesTest.java b/test/jalview/viewmodel/ViewportRangesTest.java index 41a313f..c443df9 100644 --- a/test/jalview/viewmodel/ViewportRangesTest.java +++ b/test/jalview/viewmodel/ViewportRangesTest.java @@ -20,7 +20,8 @@ import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; -public class ViewportRangesTest { +public class ViewportRangesTest +{ AlignmentGenerator gen = new AlignmentGenerator(false); @@ -47,12 +48,12 @@ public class ViewportRangesTest { } @Test(groups = { "Functional" }) - public void testViewportRanges() + public void testViewportRanges() { ViewportRanges vr = new ViewportRanges(al); - - assertEquals(vr.getStartRes(),0); - assertEquals(vr.getEndRes(), al.getWidth()-1); + + assertEquals(vr.getStartRes(), 0); + assertEquals(vr.getEndRes(), al.getWidth() - 1); assertEquals(vr.getStartSeq(), 0); assertEquals(vr.getEndSeq(), al.getHeight() - 1); } @@ -406,18 +407,18 @@ public class ViewportRangesTest { public void testScrollToVisible() { ViewportRanges vr = new ViewportRanges(al); - vr.setViewportStartAndWidth(12,5); - vr.setViewportStartAndHeight(10,6); + vr.setViewportStartAndWidth(12, 5); + vr.setViewportStartAndHeight(10, 6); vr.scrollToVisible(13, 14); - + // no change assertEquals(vr.getStartRes(), 12); assertEquals(vr.getStartSeq(), 10); - - vr.scrollToVisible(5,6); + + vr.scrollToVisible(5, 6); assertEquals(vr.getStartRes(), 5); assertEquals(vr.getStartSeq(), 6); - + // test for hidden columns too al.getHiddenColumns().hideColumns(1, 3); vr.scrollToVisible(13, 3); @@ -720,23 +721,23 @@ public class ViewportRangesTest { vr.setStartEndRes(-1, -1); assertEquals(vr.getStartRes(), 0); assertEquals(vr.getEndRes(), 0); - + vr.setStartEndRes(5, 19); assertEquals(vr.getStartRes(), 5); assertEquals(vr.getEndRes(), 19); - + // bounds are not constrained to alignment width // when in wrapped mode vr.setStartEndRes(88, 888); assertEquals(vr.getStartRes(), 88); assertEquals(vr.getEndRes(), 888); - + ViewportRanges vrsmall = new ViewportRanges(smallAl); vrsmall.setWrappedMode(true); vrsmall.setStartEndRes(88, 888); assertEquals(vrsmall.getStartRes(), 88); assertEquals(vrsmall.getEndRes(), 888); - + // make visible alignment width = 0 smallAl.getHiddenColumns().hideColumns(0, 6); vrsmall.setStartEndRes(0, 4); @@ -752,17 +753,17 @@ public class ViewportRangesTest { vr.setViewportStartAndWidth(2, 6); assertEquals(vr.getViewportWidth(), 6); assertEquals(vr.getStartRes(), 2); - + // reset -ve values of start to 0 vr.setViewportStartAndWidth(-1, 7); assertEquals(vr.getViewportWidth(), 7); assertEquals(vr.getStartRes(), 0); - + // out of bounds values are not forced to within bounds vr.setViewportStartAndWidth(35, 5); assertEquals(vr.getViewportWidth(), 5); assertEquals(vr.getStartRes(), 35); - + // small alignment doesn't get bounds reset ViewportRanges vrsmall = new ViewportRanges(smallAl); vrsmall.setViewportStartAndWidth(0, 63); @@ -780,7 +781,7 @@ public class ViewportRangesTest { vr.setStartEndRes(0, 39); int width = vr.getViewportWidth(); // 40 int partWidth = alignmentWidth % width; // 20 - + /* * there are 3 * 40 remainder 20 residues * number of widths depends on offset (scroll right) diff --git a/test/jalview/viewmodel/styles/ViewStyleTest.java b/test/jalview/viewmodel/styles/ViewStyleTest.java index 885cb71..3019afa 100644 --- a/test/jalview/viewmodel/styles/ViewStyleTest.java +++ b/test/jalview/viewmodel/styles/ViewStyleTest.java @@ -60,8 +60,8 @@ public class ViewStyleTest * @throws IllegalArgumentException */ @Test(groups = { "Functional" }) - public void testCopyConstructor() throws IllegalArgumentException, - IllegalAccessException + public void testCopyConstructor() + throws IllegalArgumentException, IllegalAccessException { ViewStyle vs1 = new ViewStyle(); Field[] fields = ViewStyle.class.getDeclaredFields(); @@ -83,7 +83,7 @@ public class ViewStyleTest final Object value1 = field1.get(vs1); final Object value2 = field1.get(vs2); String msg = "Mismatch in " + field1.getName() + "(" + value1 + "/" - + value2 + ") - not set in copy constructor?"; + + value2 + ") - not set in copy constructor?"; assertEquals(msg, value1, value2); } } @@ -91,8 +91,8 @@ public class ViewStyleTest } /** - * Add tests here for any fields that we expect to be ignored by - * the copy constructor + * Add tests here for any fields that we expect to be ignored by the copy + * constructor * * @param field * @return @@ -113,14 +113,14 @@ public class ViewStyleTest return false; } - + /** - * Change the value of one field in a ViewStyle object - * - * @param vs - * @param field - * @throws IllegalAccessException - */ + * Change the value of one field in a ViewStyle object + * + * @param vs + * @param field + * @throws IllegalAccessException + */ protected void changeValue(ViewStyle vs, Field field) throws IllegalAccessException { @@ -174,8 +174,8 @@ public class ViewStyleTest } else if (type.equals(Color.class)) { - field.set(vs, Color.RED.equals(field.get(vs)) ? Color.BLACK - : Color.RED); + field.set(vs, + Color.RED.equals(field.get(vs)) ? Color.BLACK : Color.RED); } else { @@ -208,8 +208,8 @@ public class ViewStyleTest * @throws IllegalArgumentException */ @Test(groups = { "Functional" }) - public void testEquals() throws IllegalArgumentException, - IllegalAccessException + public void testEquals() + throws IllegalArgumentException, IllegalAccessException { ViewStyle vs1 = new ViewStyle(); ViewStyle vs2 = new ViewStyle(vs1); @@ -228,7 +228,7 @@ public class ViewStyleTest Object oldValue = field.get(vs2); changeValue(vs2, field); assertFalse("equals method ignores " + field.getName(), - vs1.equals(vs2)); + vs1.equals(vs2)); if (vs1.hashCode() == vs2.hashCode()) { diff --git a/test/jalview/workers/AlignCalcManagerTest.java b/test/jalview/workers/AlignCalcManagerTest.java index 9cc4fc2..a523f38 100644 --- a/test/jalview/workers/AlignCalcManagerTest.java +++ b/test/jalview/workers/AlignCalcManagerTest.java @@ -64,10 +64,10 @@ public class AlignCalcManagerTest public void testRemoveWorkerForAnnotation() { AlignCalcManagerI acm = alignFrame.getViewport().getCalcManager(); - final AlignmentAnnotation ann1 = new AlignmentAnnotation("Ann1", - "desc", new Annotation[] {}); - final AlignmentAnnotation ann2 = new AlignmentAnnotation("Ann2", - "desc", new Annotation[] {}); + final AlignmentAnnotation ann1 = new AlignmentAnnotation("Ann1", "desc", + new Annotation[] {}); + final AlignmentAnnotation ann2 = new AlignmentAnnotation("Ann2", "desc", + new Annotation[] {}); /* * make two workers for ann1, one deletable, one not @@ -120,8 +120,8 @@ public class AlignCalcManagerTest * - should delete worker1 but not worker2 */ acm.removeWorkerForAnnotation(ann1); - assertEquals(1, acm.getRegisteredWorkersOfClass(worker1.getClass()) - .size()); + assertEquals(1, + acm.getRegisteredWorkersOfClass(worker1.getClass()).size()); assertTrue(acm.getRegisteredWorkersOfClass(worker1.getClass()) .contains(worker2)); assertFalse(acm.isDisabled(worker1)); @@ -167,8 +167,9 @@ public class AlignCalcManagerTest @BeforeMethod(alwaysRun = true) public void setUp() { - AlignmentI al = new Alignment(new SequenceI[] { new Sequence("Seq1", - "ABC") }); + AlignmentI al = new Alignment( + new SequenceI[] + { new Sequence("Seq1", "ABC") }); al.setDataset(null); alignFrame = new AlignFrame(al, 3, 1); } diff --git a/test/jalview/ws/PDBSequenceFetcherTest.java b/test/jalview/ws/PDBSequenceFetcherTest.java index d1e32b9..e7f9ff1 100644 --- a/test/jalview/ws/PDBSequenceFetcherTest.java +++ b/test/jalview/ws/PDBSequenceFetcherTest.java @@ -154,13 +154,10 @@ public class PDBSequenceFetcherTest List sf = sq.findFeatures(col, col, "RESNUM"); if (sf.size() != 1) { - errors.append( - str.id + ": " + - "Expected one feature at column (position): " - + (col - 1) - + " (" + sq.findPosition(col - 1) + ")" - + ": saw " - + sf.size()); + errors.append(str.id + ": " + + "Expected one feature at column (position): " + + (col - 1) + " (" + sq.findPosition(col - 1) + ")" + + ": saw " + sf.size()); errors.append("\n"); if (prev != null) { diff --git a/test/jalview/ws/SequenceFetcherTest.java b/test/jalview/ws/SequenceFetcherTest.java index 1706870..c643d6b 100644 --- a/test/jalview/ws/SequenceFetcherTest.java +++ b/test/jalview/ws/SequenceFetcherTest.java @@ -176,23 +176,24 @@ public class SequenceFetcherTest System.out.println("Type: " + source); SequenceI[] prod = crossRef.findXrefSequences(source, dna) .getSequencesArray(); - System.out.println("Found " - + ((prod == null) ? "no" : "" + prod.length) - + " products"); + System.out.println( + "Found " + ((prod == null) ? "no" : "" + prod.length) + + " products"); if (prod != null) { for (int p = 0; p < prod.length; p++) { - System.out.println("Prod " + p + ": " - + prod[p].getDisplayId(true)); + System.out.println( + "Prod " + p + ": " + prod[p].getDisplayId(true)); } } } } else { - noProds.addElement((dna ? new Object[] { al, al } - : new Object[] { al })); + noProds.addElement( + (dna ? new Object[] + { al, al } : new Object[] { al })); } } @@ -266,8 +267,8 @@ public class SequenceFetcherTest // present) for (int p = 0; p < prod.length; p++) { - System.out.println("Prod " + p + ": " - + prod[p].getDisplayId(true)); + System.out.println( + "Prod " + p + ": " + prod[p].getDisplayId(true)); } } } diff --git a/test/jalview/ws/dbsources/RemoteFormatTest.java b/test/jalview/ws/dbsources/RemoteFormatTest.java index 629bd8a..3f2c516 100644 --- a/test/jalview/ws/dbsources/RemoteFormatTest.java +++ b/test/jalview/ws/dbsources/RemoteFormatTest.java @@ -58,7 +58,8 @@ public class RemoteFormatTest protected Object[][] getAccessions() { return new Object[][] { { DBRefSource.UNIPROT, "P30419" }, - { DBRefSource.PDB, "1QIP" }, { DBRefSource.EMBL, "X53828" }, + { DBRefSource.PDB, "1QIP" }, + { DBRefSource.EMBL, "X53828" }, { DBRefSource.EMBLCDS, "CAA37824" }, { DBRefSource.ENSEMBL, "ENSG00000157764" }, { new EnsemblGenomes().getDbSource(), "DDB_G0283883" }, @@ -99,14 +100,14 @@ public class RemoteFormatTest wantedFields.add(client.getDataColumnByNameOrCode("organism")); wantedFields.add(client.getDataColumnByNameOrCode("reviewed")); // Status wantedFields.add(client.getDataColumnByNameOrCode("length")); - + FTSRestRequest request = new FTSRestRequest(); request.setAllowEmptySeq(false); request.setResponseSize(100); request.setFieldToSearchBy("Search All"); request.setSearchTerm("metanephrops"); // lobster! request.setWantedFields(wantedFields); - + FTSRestResponse response; response = client.executeRequest(request); assertTrue(response.getNumberOfItemsFound() > 20); diff --git a/test/jalview/ws/dbsources/UniprotTest.java b/test/jalview/ws/dbsources/UniprotTest.java index 8bfaef0..24f62bc 100644 --- a/test/jalview/ws/dbsources/UniprotTest.java +++ b/test/jalview/ws/dbsources/UniprotTest.java @@ -62,8 +62,7 @@ public class UniprotTest + "" + "" + "A9CKP4" - + "A9CKP5" - + "A9CKP4_AGRT5" + + "A9CKP5" + "A9CKP4_AGRT5" + "A9CKP4_AGRT6" + "Mitogen-activated protein kinase 13" + "" @@ -157,31 +156,27 @@ public class UniprotTest sf = features.get(6); assertEquals("sequence variant", sf.getType()); - assertEquals("Foo", - sf.getDescription()); + assertEquals("Foo", sf.getDescription()); assertEquals(42, sf.getLocation().getPosition().getPosition().intValue()); assertNull(sf.getLocation().getBegin()); assertNull(sf.getLocation().getEnd()); - Assert.assertEquals(Uniprot.getDescription(sf), - "p.Met42Leu" + "
          " - + "p.Met42LeuMetVal Foo"); + Assert.assertEquals(Uniprot.getDescription(sf), "p.Met42Leu" + + "
          " + "p.Met42LeuMetVal Foo"); sf = features.get(7); assertNull(sf.getLocation().getPosition()); assertEquals(42, sf.getLocation().getBegin().getPosition().intValue()); assertEquals(43, sf.getLocation().getEnd().getPosition().intValue()); - Assert.assertEquals(Uniprot.getDescription(sf), - "p.MetLeu42LeuLeu" + "
          " - + "p.MetLeu42LeuMetVal Foo"); + Assert.assertEquals(Uniprot.getDescription(sf), "p.MetLeu42LeuLeu" + + "
          " + "p.MetLeu42LeuMetVal Foo"); sf = features.get(8); assertNull(sf.getLocation().getPosition()); assertEquals(42, sf.getLocation().getBegin().getPosition().intValue()); assertEquals(45, sf.getLocation().getEnd().getPosition().intValue()); - Assert.assertEquals(Uniprot.getDescription(sf), - "p.MLML42LeuLeu" + "
          " - + "p.MLML42LMVK Foo Too"); + Assert.assertEquals(Uniprot.getDescription(sf), "p.MLML42LeuLeu" + + "
          " + "p.MLML42LMVK Foo Too"); /* * Check cross-references @@ -215,19 +210,20 @@ public class UniprotTest public void testGetUniprotSequence() throws UnsupportedEncodingException { InputStream is = new ByteArrayInputStream(UNIPROT_XML.getBytes()); - Entry entry = new Uniprot().getUniprotEntries( - is).get(0); + Entry entry = new Uniprot().getUniprotEntries(is).get(0); SequenceI seq = new Uniprot().uniprotEntryToSequence(entry); assertNotNull(seq); assertEquals(6, seq.getDBRefs().size()); // 2*Uniprot, PDB, PDBsum, 2*EMBL assertEquals(seq.getSequenceAsString(), seq.createDatasetSequence().getSequenceAsString()); - assertEquals(2,seq.getPrimaryDBRefs().size()); - List res = DBRefUtils.searchRefs(seq.getPrimaryDBRefs(), "A9CKP4"); - assertEquals(1,res.size()); + assertEquals(2, seq.getPrimaryDBRefs().size()); + List res = DBRefUtils.searchRefs(seq.getPrimaryDBRefs(), + "A9CKP4"); + assertEquals(1, res.size()); assertTrue(res.get(0).isCanonical()); - res = DBRefUtils.searchRefsForSource(seq.getDBRefs(), DBRefSource.UNIPROT); - assertEquals(2,res.size()); + res = DBRefUtils.searchRefsForSource(seq.getDBRefs(), + DBRefSource.UNIPROT); + assertEquals(2, res.size()); /* * NB this test fragile - relies on ordering being preserved */ @@ -250,8 +246,7 @@ public class UniprotTest * name formatted with Uniprot Entry name */ String expectedName = "A9CKP4_AGRT5|A9CKP4_AGRT6"; - assertEquals(expectedName, - Uniprot.getUniprotEntryId(entry)); + assertEquals(expectedName, Uniprot.getUniprotEntryId(entry)); } /** diff --git a/test/jalview/ws/dbsources/XfamFetcherTest.java b/test/jalview/ws/dbsources/XfamFetcherTest.java index 51cff6e..8a591b0 100644 --- a/test/jalview/ws/dbsources/XfamFetcherTest.java +++ b/test/jalview/ws/dbsources/XfamFetcherTest.java @@ -64,9 +64,8 @@ public class XfamFetcherTest AlignmentI fullpf = pff.getSequenceRecords(pff.getTestQuery()); Assert.assertNotNull(fullpf, "Full Alignment for " + pff.getTestQuery() + " didn't retrieve."); - Assert.assertTrue(fullpf.getHeight() > 1, - "Full Alignment for " + pff.getTestQuery() - + " didn't have more than one sequence."); + Assert.assertTrue(fullpf.getHeight() > 1, "Full Alignment for " + + pff.getTestQuery() + " didn't have more than one sequence."); AlignmentI seedpf = pfseed.getSequenceRecords(pff.getTestQuery()); Assert.assertNotNull(seedpf, "Seed Alignment for " + pff.getTestQuery() + " didn't retrieve."); diff --git a/test/jalview/ws/ebi/EBIFetchClientTest.java b/test/jalview/ws/ebi/EBIFetchClientTest.java index c3fae6c..20898ea 100644 --- a/test/jalview/ws/ebi/EBIFetchClientTest.java +++ b/test/jalview/ws/ebi/EBIFetchClientTest.java @@ -47,13 +47,15 @@ public class EBIFetchClientTest /* * EMBL */ - assertEquals("https://www.ebi.ac.uk/ena/browser/api/embl/x53838?download=true&gzip=true", + assertEquals( + "https://www.ebi.ac.uk/ena/browser/api/embl/x53838?download=true&gzip=true", EBIFetchClient.buildUrl("X53838", "EMBL", "display=xml")); /* * EMBLCDS */ - assertEquals("https://www.ebi.ac.uk/ena/browser/api/embl/caa37824?download=true&gzip=true", + assertEquals( + "https://www.ebi.ac.uk/ena/browser/api/embl/caa37824?download=true&gzip=true", EBIFetchClient.buildUrl("CAA37824", "EMBL", "display=xml")); /* diff --git a/test/jalview/ws/gui/Jws2ParamView.java b/test/jalview/ws/gui/Jws2ParamView.java index f04326b..e18e9fb 100644 --- a/test/jalview/ws/gui/Jws2ParamView.java +++ b/test/jalview/ws/gui/Jws2ParamView.java @@ -93,8 +93,8 @@ public class Jws2ParamView Iterator presetEnum = presetTests.iterator(); for (Jws2Instance service : disc.getServices()) { - if (serviceTests.size() == 0 - || serviceTests.contains(service.serviceType.toLowerCase(Locale.ROOT))) + if (serviceTests.size() == 0 || serviceTests + .contains(service.serviceType.toLowerCase(Locale.ROOT))) { List prl = null; Preset pr = null; @@ -132,9 +132,9 @@ public class Jws2ParamView } WsJobParameters pgui = new WsJobParameters(service, new JabaPreset(service, pr)); - JFrame jf = new JFrame(MessageManager.formatMessage( - "label.ws_parameters_for", - new String[] { service.getActionText() })); + JFrame jf = new JFrame(MessageManager + .formatMessage("label.ws_parameters_for", new String[] + { service.getActionText() })); jf.setSize(700, 800); JPanel cont = new JPanel(new BorderLayout()); pgui.validate(); diff --git a/test/jalview/ws/jabaws/DisorderAnnotExportImport.java b/test/jalview/ws/jabaws/DisorderAnnotExportImport.java index 5656a6d..629b6c3 100644 --- a/test/jalview/ws/jabaws/DisorderAnnotExportImport.java +++ b/test/jalview/ws/jabaws/DisorderAnnotExportImport.java @@ -88,7 +88,8 @@ public class DisorderAnnotExportImport iupreds = new ArrayList(); for (Jws2Instance svc : disc.getServices()) { - if (svc.getServiceTypeURI().toLowerCase(Locale.ROOT).contains("iupredws")) + if (svc.getServiceTypeURI().toLowerCase(Locale.ROOT) + .contains("iupredws")) { iupreds.add(svc); } @@ -96,7 +97,8 @@ public class DisorderAnnotExportImport assertTrue("Couldn't discover any IUPred services to use to test.", iupreds.size() > 0); jalview.io.FileLoader fl = new jalview.io.FileLoader(false); - af = fl.LoadFileWaitTillLoaded(testseqs, jalview.io.DataSourceType.FILE); + af = fl.LoadFileWaitTillLoaded(testseqs, + jalview.io.DataSourceType.FILE); assertNotNull("Couldn't load test data ('" + testseqs + "')", af); } @@ -152,30 +154,24 @@ public class DisorderAnnotExportImport { try { - String aligfileout = FileFormat.Pfam.getWriter(al).print( - al.getSequencesArray(), true); + String aligfileout = FileFormat.Pfam.getWriter(al) + .print(al.getSequencesArray(), true); String anfileout = new AnnotationFile() .printAnnotationsForAlignment(al); - assertTrue( - "Test " - + testname - + "\nAlignment annotation file was not regenerated. Null string", + assertTrue("Test " + testname + + "\nAlignment annotation file was not regenerated. Null string", anfileout != null); - assertTrue( - "Test " - + testname - + "\nAlignment annotation file was not regenerated. Empty string", + assertTrue("Test " + testname + + "\nAlignment annotation file was not regenerated. Empty string", anfileout.length() > "JALVIEW_ANNOTATION".length()); - System.out.println("Output annotation file:\n" + anfileout - + "\n< 0, "Failed to discover any services at "); diff --git a/test/jalview/ws/jabaws/MinJabawsClientTests.java b/test/jalview/ws/jabaws/MinJabawsClientTests.java index 6af831f..db5f9e4 100644 --- a/test/jalview/ws/jabaws/MinJabawsClientTests.java +++ b/test/jalview/ws/jabaws/MinJabawsClientTests.java @@ -58,8 +58,8 @@ public class MinJabawsClientTests public void msaTest() throws Exception { String url; - RegistryWS registry = Jws2Client - .connectToRegistry(url = "http://www.compbio.dundee.ac.uk/jabaws"); + RegistryWS registry = Jws2Client.connectToRegistry( + url = "http://www.compbio.dundee.ac.uk/jabaws"); if (registry != null) { @@ -82,7 +82,8 @@ public class MinJabawsClientTests } if (msaservice == null) { - Assert.fail("couldn't find a clustalO service on the public registry"); + Assert.fail( + "couldn't find a clustalO service on the public registry"); } FastaSequence fsq = new FastaSequence("seqA", "SESESESESESESESSESESSESESESESESESESESESEEEEEESSESESESESSSSESESESESESESE"); diff --git a/test/jalview/ws/jabaws/RNAStructExportImport.java b/test/jalview/ws/jabaws/RNAStructExportImport.java index e66f016..bc11d2f 100644 --- a/test/jalview/ws/jabaws/RNAStructExportImport.java +++ b/test/jalview/ws/jabaws/RNAStructExportImport.java @@ -101,7 +101,8 @@ public class RNAStructExportImport for (Jws2Instance svc : disc.getServices()) { - if (svc.getServiceTypeURI().toLowerCase(Locale.ROOT).contains("rnaalifoldws")) + if (svc.getServiceTypeURI().toLowerCase(Locale.ROOT) + .contains("rnaalifoldws")) { rnaalifoldws = svc; } @@ -116,7 +117,8 @@ public class RNAStructExportImport jalview.io.FileLoader fl = new jalview.io.FileLoader(false); - af = fl.LoadFileWaitTillLoaded(testseqs, jalview.io.DataSourceType.FILE); + af = fl.LoadFileWaitTillLoaded(testseqs, + jalview.io.DataSourceType.FILE); assertNotNull("Couldn't load test data ('" + testseqs + "')", af); @@ -217,32 +219,26 @@ public class RNAStructExportImport try { // what format would be appropriate for RNAalifold annotations? - String aligfileout = FileFormat.Pfam.getWriter(null).print( - al.getSequencesArray(), true); + String aligfileout = FileFormat.Pfam.getWriter(null) + .print(al.getSequencesArray(), true); String anfileout = new AnnotationFile() .printAnnotationsForAlignment(al); - assertNotNull( - "Test " - + testname - + "\nAlignment annotation file was not regenerated. Null string", + assertNotNull("Test " + testname + + "\nAlignment annotation file was not regenerated. Null string", anfileout); - assertTrue( - "Test " - + testname - + "\nAlignment annotation file was not regenerated. Empty string", + assertTrue("Test " + testname + + "\nAlignment annotation file was not regenerated. Empty string", anfileout.length() > "JALVIEW_ANNOTATION".length()); - System.out.println("Output annotation file:\n" + anfileout - + "\n< primRefs = uniprotSeq.getPrimaryDBRefs(); assertNotNull(primRefs); - assertTrue(primRefs.size()>0); - boolean canonicalUp=false; - for (DBRefEntry ref:primRefs) { + assertTrue(primRefs.size() > 0); + boolean canonicalUp = false; + for (DBRefEntry ref : primRefs) + { assertEquals(DBRefSource.UNIPROT, ref.getCanonicalSourceName()); canonicalUp |= ref.isCanonical(); } assertTrue("No Canonical Uniprot reference detected", canonicalUp); } + /** * Tests that standard protein database sources include Uniprot (as the first) * and also PDB. (Additional sources are dependent on availability of DAS @@ -157,8 +159,8 @@ public class DbRefFetcherTest public void testEmblUniprotProductRecovery() throws Exception { String retrievalId = "V00488"; - DbSourceProxy embl = new SequenceFetcher().getSourceProxy( - DBRefSource.EMBL).get(0); + DbSourceProxy embl = new SequenceFetcher() + .getSourceProxy(DBRefSource.EMBL).get(0); assertNotNull("Couldn't find the EMBL retrieval client", embl); verifyProteinNucleotideXref(retrievalId, embl); } @@ -173,8 +175,8 @@ public class DbRefFetcherTest public void testEmblCDSUniprotProductRecovery() throws Exception { String retrievalId = "AAH29712"; - DbSourceProxy embl = new SequenceFetcher().getSourceProxy( - DBRefSource.EMBLCDS).get(0); + DbSourceProxy embl = new SequenceFetcher() + .getSourceProxy(DBRefSource.EMBLCDS).get(0); assertNotNull("Couldn't find the EMBL retrieval client", embl); verifyProteinNucleotideXref(retrievalId, embl); } @@ -194,23 +196,22 @@ public class DbRefFetcherTest assertEquals("Didn't retrieve right number of records", 1, alsq.getHeight()); SequenceI seq = alsq.getSequenceAt(0); - assertEquals("Wrong sequence name", embl.getDbSource() + "|" - + retrievalId, seq.getName()); + assertEquals("Wrong sequence name", + embl.getDbSource() + "|" + retrievalId, seq.getName()); List sfs = seq.getSequenceFeatures(); assertFalse("Sequence features missing", sfs.isEmpty()); - assertTrue( - "Feature not CDS", - FeatureProperties.isCodingFeature(embl.getDbSource(), - sfs.get(0).getType())); + assertTrue("Feature not CDS", FeatureProperties + .isCodingFeature(embl.getDbSource(), sfs.get(0).getType())); assertEquals(embl.getDbSource(), sfs.get(0).getFeatureGroup()); List dr = DBRefUtils.selectRefs(seq.getDBRefs(), - new String[] { DBRefSource.UNIPROT }); + new String[] + { DBRefSource.UNIPROT }); assertNotNull(dr); assertEquals("Expected a single Uniprot cross reference", 1, dr.size()); - assertEquals("Expected cross reference map to be one amino acid", dr.get(0) - .getMap().getMappedWidth(), 1); - assertEquals("Expected local reference map to be 3 nucleotides", dr.get(0) - .getMap().getWidth(), 3); + assertEquals("Expected cross reference map to be one amino acid", + dr.get(0).getMap().getMappedWidth(), 1); + assertEquals("Expected local reference map to be 3 nucleotides", + dr.get(0).getMap().getWidth(), 3); AlignmentI sprods = new CrossRef(alsq.getSequencesArray(), alsq) .findXrefSequences(dr.get(0).getSource(), true); assertNotNull( @@ -219,8 +220,8 @@ public class DbRefFetcherTest assertEquals("Didn't xref right number of records", 1, sprods.getHeight()); SequenceI proteinSeq = sprods.getSequenceAt(0); - assertEquals(proteinSeq.getSequenceAsString(), dr.get(0).getMap().getTo() - .getSequenceAsString()); + assertEquals(proteinSeq.getSequenceAsString(), + dr.get(0).getMap().getTo().getSequenceAsString()); assertEquals(dr.get(0).getSource() + "|" + dr.get(0).getAccessionId(), proteinSeq.getName()); } diff --git a/test/jalview/ws/sifts/SiftsClientTest.java b/test/jalview/ws/sifts/SiftsClientTest.java index 6122d6d..44a6a02 100644 --- a/test/jalview/ws/sifts/SiftsClientTest.java +++ b/test/jalview/ws/sifts/SiftsClientTest.java @@ -62,19 +62,18 @@ public class SiftsClientTest } public static final String DEFAULT_SIFTS_DOWNLOAD_DIR = System - .getProperty("user.home") - + File.separatorChar + .getProperty("user.home") + File.separatorChar + ".sifts_downloads" + File.separatorChar; private String testPDBId = "1a70"; private SiftsClient siftsClient = null; - SequenceI testSeq = new Sequence( - "P00221", + SequenceI testSeq = new Sequence("P00221", "MAAT..TTTMMG..MATTFVPKPQAPPMMAALPSNTGR..SLFGLKT.GSR..GGRMTMA" + "AYKVTLVTPTGNVEFQCPDDVYILDAAEEEGIDLPYSCRAGSCSSCAGKLKTGSLNQDD" - + "QSFLDDDQIDEGWVLTCAAYPVSDVTIETHKEEELTA.", 1, 147); + + "QSFLDDDQIDEGWVLTCAAYPVSDVTIETHKEEELTA.", + 1, 147); int u = SiftsClient.UNASSIGNED; @@ -190,14 +189,14 @@ public class SiftsClientTest // SIFTs entries are updated weekly - so use saved SIFTs file to enforce // test reproducibility new SiftsSettings(); - SiftsSettings.setSiftDownloadDirectory(jalview.bin.Cache.getDefault( - "sifts_download_dir", DEFAULT_SIFTS_DOWNLOAD_DIR)); + SiftsSettings.setSiftDownloadDirectory(jalview.bin.Cache + .getDefault("sifts_download_dir", DEFAULT_SIFTS_DOWNLOAD_DIR)); SiftsSettings.setMapWithSifts(true); SiftsSettings.setCacheThresholdInDays("2"); SiftsSettings.setFailSafePIDThreshold("70"); PDBfile pdbFile; - pdbFile = new PDBfile(false, false, false, "test/jalview/io/" - + testPDBId + ".pdb", DataSourceType.FILE); + pdbFile = new PDBfile(false, false, false, + "test/jalview/io/" + testPDBId + ".pdb", DataSourceType.FILE); siftsClient = new SiftsClient(pdbFile); } @@ -278,8 +277,8 @@ public class SiftsClientTest try { - HashMap actualMapping = siftsClient.getGreedyMapping( - "A", testSeq, null); + HashMap actualMapping = siftsClient + .getGreedyMapping("A", testSeq, null); Assert.assertEquals(testSeq.getStart(), 1); Assert.assertEquals(testSeq.getEnd(), 147); // Can't do Assert.assertEquals(actualMapping, expectedMapping); @@ -317,7 +316,8 @@ public class SiftsClientTest } @Test( - groups = { "Network" }, + groups = + { "Network" }, expectedExceptions = IllegalArgumentException.class) private void getAtomIndexNullTest() { @@ -330,18 +330,14 @@ public class SiftsClientTest } - @Test( -groups = { "Network" }, - expectedExceptions = SiftsException.class) + @Test(groups = { "Network" }, expectedExceptions = SiftsException.class) private void populateAtomPositionsNullTest1() throws IllegalArgumentException, SiftsException { siftsClient.populateAtomPositions(null, null); } - @Test( -groups = { "Network" }, - expectedExceptions = SiftsException.class) + @Test(groups = { "Network" }, expectedExceptions = SiftsException.class) private void populateAtomPositionsNullTest2() throws IllegalArgumentException, SiftsException { @@ -360,18 +356,14 @@ groups = { "Network" }, Assert.assertEquals(actualValidSrcDBRef, expectedDBRef); } - @Test( -groups = { "Network" }, - expectedExceptions = SiftsException.class) + @Test(groups = { "Network" }, expectedExceptions = SiftsException.class) public void getValidSourceDBRefExceptionTest() throws SiftsException { SequenceI invalidTestSeq = new Sequence("testSeq", "ABCDEFGH"); siftsClient.getValidSourceDBRef(invalidTestSeq); } - @Test( -groups = { "Network" }, - expectedExceptions = SiftsException.class) + @Test(groups = { "Network" }, expectedExceptions = SiftsException.class) public void getValidSourceDBRefExceptionXTest() throws SiftsException { SequenceI invalidTestSeq = new Sequence("testSeq", "ABCDEFGH"); @@ -395,11 +387,10 @@ groups = { "Network" }, public void getSiftsStructureMappingTest() throws SiftsException { Assert.assertTrue(SiftsSettings.isMapWithSifts()); - StructureMapping strucMapping = siftsClient.getSiftsStructureMapping( - testSeq, testPDBId, "A"); + StructureMapping strucMapping = siftsClient + .getSiftsStructureMapping(testSeq, testPDBId, "A"); String expectedMappingOutput = "\nSequence ⟷ Structure mapping details\n" - + "Method: SIFTS\n\n" - + "P00221 : 51 - 147 Maps to \n" + + "Method: SIFTS\n\n" + "P00221 : 51 - 147 Maps to \n" + "1A70|A : 1 - 97\n\n" + "P00221 AAYKVTLVTPTGNVEFQCPDDVYILDAAEEEGIDLPYSCRAGSCSSCAGKLKTGSLNQDDQSFLD\n" + " |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||\n" @@ -423,8 +414,8 @@ groups = { "Network" }, while (it.hasNext()) { Map.Entry pair = it.next(); - Assert.assertTrue(strucMapping.getMapping() - .containsKey(pair.getKey())); + Assert.assertTrue( + strucMapping.getMapping().containsKey(pair.getKey())); Assert.assertEquals(strucMapping.getMapping().get(pair.getKey()), pair.getValue()); } @@ -471,13 +462,13 @@ groups = { "Network" }, } @Test(groups = { "Network" }) - public void getEntityByMostOptimalMatchedIdTest1() throws IOException, - SiftsException + public void getEntityByMostOptimalMatchedIdTest1() + throws IOException, SiftsException { SiftsClient siftsClientX = null; PDBfile pdbFile; - pdbFile = new PDBfile(false, false, false, "test/jalview/io/2nq2" - + ".pdb", DataSourceType.FILE); + pdbFile = new PDBfile(false, false, false, + "test/jalview/io/2nq2" + ".pdb", DataSourceType.FILE); siftsClientX = new SiftsClient(pdbFile); Entity entityA = siftsClientX.getEntityByMostOptimalMatchedId("A"); Assert.assertEquals(entityA.getEntityId(), "A"); @@ -491,8 +482,8 @@ groups = { "Network" }, } @Test(groups = { "Network" }) - public void getEntityByMostOptimalMatchedIdTest2() throws IOException, - SiftsException + public void getEntityByMostOptimalMatchedIdTest2() + throws IOException, SiftsException { // This test is for a SIFTS file in which entity A should map to chain P for // the given PDB Id. All the other chains shouldn't be mapped as there are @@ -518,18 +509,14 @@ groups = { "Network" }, @Test(groups = { "Network" }) public void getLeadingIntegerFromString() { - Assert.assertEquals( - SiftsClient.getLeadingIntegerValue("1234abcd", -1), 1234); - Assert.assertEquals( - SiftsClient.getLeadingIntegerValue("1234", -1), + Assert.assertEquals(SiftsClient.getLeadingIntegerValue("1234abcd", -1), + 1234); + Assert.assertEquals(SiftsClient.getLeadingIntegerValue("1234", -1), 1234); - Assert.assertEquals( - SiftsClient.getLeadingIntegerValue("abcd", -1), -1); - Assert.assertEquals( - SiftsClient.getLeadingIntegerValue("abcd1234", -1), -1); - Assert.assertEquals( - SiftsClient.getLeadingIntegerValue("None", -1), -1); - Assert.assertEquals( - SiftsClient.getLeadingIntegerValue("Null", -1), -1); + Assert.assertEquals(SiftsClient.getLeadingIntegerValue("abcd", -1), -1); + Assert.assertEquals(SiftsClient.getLeadingIntegerValue("abcd1234", -1), + -1); + Assert.assertEquals(SiftsClient.getLeadingIntegerValue("None", -1), -1); + Assert.assertEquals(SiftsClient.getLeadingIntegerValue("Null", -1), -1); } } diff --git a/test/jalview/ws/utils/UrlDownloadClientTest.java b/test/jalview/ws/utils/UrlDownloadClientTest.java index 2bd8dd0..3a24661 100644 --- a/test/jalview/ws/utils/UrlDownloadClientTest.java +++ b/test/jalview/ws/utils/UrlDownloadClientTest.java @@ -26,7 +26,8 @@ import java.io.IOException; import org.testng.Assert; import org.testng.annotations.Test; -public class UrlDownloadClientTest { +public class UrlDownloadClientTest +{ /** * Test that url is successfully loaded into download file @@ -71,9 +72,11 @@ public class UrlDownloadClientTest { * Test that garbage in results in IOException */ @Test( - groups = { "Network" }, + groups = + { "Network" }, enabled = true, - expectedExceptions = { IOException.class }) + expectedExceptions = + { IOException.class }) public void DownloadGarbageUrlTest() throws IOException { UrlDownloadClient client = new UrlDownloadClient(); diff --git a/test/junit/extensions/PA.java b/test/junit/extensions/PA.java index 57c873f..e878653 100644 --- a/test/junit/extensions/PA.java +++ b/test/junit/extensions/PA.java @@ -18,8 +18,10 @@ package junit.extensions; import java.util.Collection; /** - * This class is used to access a method or field of an object no matter what the access modifier of the method or field. The syntax - * for accessing fields and methods is out of the ordinary because this class uses reflection to peel away protection. + * This class is used to access a method or field of an object no matter what + * the access modifier of the method or field. The syntax for accessing fields + * and methods is out of the ordinary because this class uses reflection to peel + * away protection. *

        * a.k.a. The "ObjectMolester" *

        @@ -27,18 +29,21 @@ import java.util.Collection; * Given the following class MyClass:
        * *

        - * public class MyClass {
        - *    private String name; // private attribute
        + * public class MyClass
        + * {
        + *   private String name; // private attribute
          * 
        - *    // private constructor
        - *    private MyClass() {
        - *       super();
        - *    }
        + *   // private constructor
        + *   private MyClass()
        + *   {
        + *     super();
        + *   }
          * 
        - *    // private method
        - *    private void setName(String newName) {
        - *       this.name = newName;
        - *    }
        + *   // private method
        + *   private void setName(String newName)
        + *   {
        + *     this.name = newName;
        + *   }
          * }
          * 
        * @@ -50,7 +55,8 @@ import java.util.Collection; * String name = PA.getValue(myObj, "name"); *
        * - * This class extends {@link PrivilegedAccessor} by re-throwing checked {@link Exception}s as {@link RuntimeException}s. + * This class extends {@link PrivilegedAccessor} by re-throwing checked + * {@link Exception}s as {@link RuntimeException}s. * * * @see PrivilegedAccessor @@ -58,274 +64,386 @@ import java.util.Collection; * @author Sebastian Dietrich (sebastian.dietrich@e-movimento.com) * @author Lubos Bistak (lubos@bistak.sk) */ -public class PA { - private final Object instanceOrClass; +public class PA +{ + private final Object instanceOrClass; - /** - * Private constructor to make it impossible to instantiate this class from outside of PA. - * - * @param instanceOrClass - */ - private PA(Object instanceOrClass) { - this.instanceOrClass = instanceOrClass; - } + /** + * Private constructor to make it impossible to instantiate this class from + * outside of PA. + * + * @param instanceOrClass + */ + private PA(Object instanceOrClass) + { + this.instanceOrClass = instanceOrClass; + } - /** - * Returns a string representation of the given object. The string has the following format: " {}" - * whereas is a comma separated list with = includes - * all attributes of the objects class followed by the attributes of its superclass (if any) and so on. - * - * @param instanceOrClass the object or class to get a string representation of - * @return a string representation of the given object - * - * @see PrivilegedAccessor#toString(Object) - */ - public static String toString(final Object instanceOrClass) { - return PrivilegedAccessor.toString(instanceOrClass); - } + /** + * Returns a string representation of the given object. The string has the + * following format: " {}" whereas + * is a comma separated list with + * = includes all + * attributes of the objects class followed by the attributes of its + * superclass (if any) and so on. + * + * @param instanceOrClass + * the object or class to get a string representation of + * @return a string representation of the given object + * + * @see PrivilegedAccessor#toString(Object) + */ + public static String toString(final Object instanceOrClass) + { + return PrivilegedAccessor.toString(instanceOrClass); + } - /** - * Gets the name of all fields (public, private, protected, default) of the given instance or class. This includes as well all - * fields (public, private, protected, default) of all its super classes. - * - * @param instanceOrClass the instance or class to get the fields of - * @return the collection of field names of the given instance or class - * - * @see PrivilegedAccessor#getFieldNames(Object) - */ - public static Collection getFieldNames(final Object instanceOrClass) { - return PrivilegedAccessor.getFieldNames(instanceOrClass); - } + /** + * Gets the name of all fields (public, private, protected, default) of the + * given instance or class. This includes as well all fields (public, private, + * protected, default) of all its super classes. + * + * @param instanceOrClass + * the instance or class to get the fields of + * @return the collection of field names of the given instance or class + * + * @see PrivilegedAccessor#getFieldNames(Object) + */ + public static Collection getFieldNames( + final Object instanceOrClass) + { + return PrivilegedAccessor.getFieldNames(instanceOrClass); + } - /** - * Gets the signatures of all methods (public, private, protected, default) of the given instance or class. This includes as well - * all methods (public, private, protected, default) of all its super classes. This does not include constructors. - * - * @param instanceOrClass the instance or class to get the method signatures of - * @return the collection of method signatures of the given instance or class - * - * @see PrivilegedAccessor#getMethodSignatures(Object) - */ - public static Collection getMethodSignatures(final Object instanceOrClass) { - return PrivilegedAccessor.getMethodSignatures(instanceOrClass); - } + /** + * Gets the signatures of all methods (public, private, protected, default) of + * the given instance or class. This includes as well all methods (public, + * private, protected, default) of all its super classes. This does not + * include constructors. + * + * @param instanceOrClass + * the instance or class to get the method signatures of + * @return the collection of method signatures of the given instance or class + * + * @see PrivilegedAccessor#getMethodSignatures(Object) + */ + public static Collection getMethodSignatures( + final Object instanceOrClass) + { + return PrivilegedAccessor.getMethodSignatures(instanceOrClass); + } - /** - * Gets the value of the named field and returns it as an object. If instanceOrClass is a class then a static field is returned. - * - * @param instanceOrClass the instance or class to get the field from - * @param fieldName the name of the field - * @return an object representing the value of the field - * @throws IllegalArgumentException if the field does not exist - * - * @see PrivilegedAccessor#getValue(Object,String) - */ - public static Object getValue(final Object instanceOrClass, final String fieldName) { - try { - return PrivilegedAccessor.getValue(instanceOrClass, fieldName); - } catch (Exception e) { - throw new IllegalArgumentException("Can't get value of " + fieldName + " from " + instanceOrClass, e); - } - } + /** + * Gets the value of the named field and returns it as an object. If + * instanceOrClass is a class then a static field is returned. + * + * @param instanceOrClass + * the instance or class to get the field from + * @param fieldName + * the name of the field + * @return an object representing the value of the field + * @throws IllegalArgumentException + * if the field does not exist + * + * @see PrivilegedAccessor#getValue(Object,String) + */ + public static Object getValue(final Object instanceOrClass, + final String fieldName) + { + try + { + return PrivilegedAccessor.getValue(instanceOrClass, fieldName); + } catch (Exception e) + { + throw new IllegalArgumentException("Can't get value of " + fieldName + + " from " + instanceOrClass, e); + } + } - /** - * Gets the value of the named field and returns it as an object. - * - * @param fieldName the name of the field - * @return an object representing the value of the field - * @throws IllegalArgumentException if the field does not exist - * - * @see PA#getValue(Object,String) - */ - public Object getValue(final String fieldName) { - return PA.getValue(instanceOrClass, fieldName); - } + /** + * Gets the value of the named field and returns it as an object. + * + * @param fieldName + * the name of the field + * @return an object representing the value of the field + * @throws IllegalArgumentException + * if the field does not exist + * + * @see PA#getValue(Object,String) + */ + public Object getValue(final String fieldName) + { + return PA.getValue(instanceOrClass, fieldName); + } - /** - * Instantiates an object of the given class with the given arguments and the given argument types. If you want to instantiate a - * member class, you must provide the object it is a member of as first argument. - * - * @param fromClass the class to instantiate an object from - * @param arguments the arguments to pass to the constructor - * @param argumentTypes the fully qualified types of the arguments of the constructor - * @return an object of the given type - * @throws IllegalArgumentException if the class can't be instantiated. This could be the case if the number of actual and formal - * parameters differ; if an unwrapping conversion for primitive arguments fails; if, after possible unwrapping, a - * parameter value cannot be converted to the corresponding formal parameter type by a method invocation conversion; if - * this Constructor object enforces Java language access control and the underlying constructor is inaccessible; if the - * underlying constructor throws an exception; if the constructor could not be found; or if the class that declares the - * underlying constructor represents an abstract class. - * - * @see PrivilegedAccessor#instantiate(Class,Class[],Object[]) - */ - public static T instantiate(final Class fromClass, final Class[] argumentTypes, final Object... arguments) { - try { - return PrivilegedAccessor.instantiate(fromClass, argumentTypes, correctVarargs(arguments)); - } catch (Exception e) { - throw new IllegalArgumentException("Can't instantiate class " + fromClass + " with arguments " + arguments, e); - } - } + /** + * Instantiates an object of the given class with the given arguments and the + * given argument types. If you want to instantiate a member class, you must + * provide the object it is a member of as first argument. + * + * @param fromClass + * the class to instantiate an object from + * @param arguments + * the arguments to pass to the constructor + * @param argumentTypes + * the fully qualified types of the arguments of the constructor + * @return an object of the given type + * @throws IllegalArgumentException + * if the class can't be instantiated. This could be the case if the + * number of actual and formal parameters differ; if an unwrapping + * conversion for primitive arguments fails; if, after possible + * unwrapping, a parameter value cannot be converted to the + * corresponding formal parameter type by a method invocation + * conversion; if this Constructor object enforces Java language + * access control and the underlying constructor is inaccessible; if + * the underlying constructor throws an exception; if the + * constructor could not be found; or if the class that declares the + * underlying constructor represents an abstract class. + * + * @see PrivilegedAccessor#instantiate(Class,Class[],Object[]) + */ + public static T instantiate(final Class fromClass, + final Class[] argumentTypes, final Object... arguments) + { + try + { + return PrivilegedAccessor.instantiate(fromClass, argumentTypes, + correctVarargs(arguments)); + } catch (Exception e) + { + throw new IllegalArgumentException("Can't instantiate class " + + fromClass + " with arguments " + arguments, e); + } + } - /** - * Instantiates an object of the given class with the given arguments. If you want to instantiate a member class, you must provide - * the object it is a member of as first argument. - * - * @param fromClass the class to instantiate an object from - * @param arguments the arguments to pass to the constructor - * @return an object of the given type - * @throws IllegalArgumentException if the class can't be instantiated. This could be the case if the number of actual and formal - * parameters differ; if an unwrapping conversion for primitive arguments fails; or if, after possible unwrapping, a - * parameter value cannot be converted to the corresponding formal parameter type by a method invocation conversion; if - * this Constructor object enforces Java language access control and the underlying constructor is inaccessible; if the - * underlying constructor throws an exception; if the constructor could not be found; or if the class that declares the - * underlying constructor represents an abstract class. - * - * @see PrivilegedAccessor#instantiate(Class,Object[]) - */ - public static T instantiate(final Class fromClass, final Object... arguments) { - try { - return PrivilegedAccessor.instantiate(fromClass, correctVarargs(arguments)); - } catch (Exception e) { - throw new IllegalArgumentException("Can't instantiate class " + fromClass + " with arguments " + arguments, e); - } - } + /** + * Instantiates an object of the given class with the given arguments. If you + * want to instantiate a member class, you must provide the object it is a + * member of as first argument. + * + * @param fromClass + * the class to instantiate an object from + * @param arguments + * the arguments to pass to the constructor + * @return an object of the given type + * @throws IllegalArgumentException + * if the class can't be instantiated. This could be the case if the + * number of actual and formal parameters differ; if an unwrapping + * conversion for primitive arguments fails; or if, after possible + * unwrapping, a parameter value cannot be converted to the + * corresponding formal parameter type by a method invocation + * conversion; if this Constructor object enforces Java language + * access control and the underlying constructor is inaccessible; if + * the underlying constructor throws an exception; if the + * constructor could not be found; or if the class that declares the + * underlying constructor represents an abstract class. + * + * @see PrivilegedAccessor#instantiate(Class,Object[]) + */ + public static T instantiate(final Class fromClass, + final Object... arguments) + { + try + { + return PrivilegedAccessor.instantiate(fromClass, + correctVarargs(arguments)); + } catch (Exception e) + { + throw new IllegalArgumentException("Can't instantiate class " + + fromClass + " with arguments " + arguments, e); + } + } - /** - * Calls a method on the given object instance with the given arguments. Arguments can be object types or representations for - * primitives. - * - * @param instanceOrClass the instance or class to invoke the method on - * @param methodSignature the name of the method and the parameters
        - * (e.g. "myMethod(java.lang.String, com.company.project.MyObject)") - * @param arguments an array of objects to pass as arguments - * @return the return value of this method or null if void - * @throws IllegalArgumentException if the method could not be invoked. This could be the case if the method is inaccessible; if the - * underlying method throws an exception; if no method with the given methodSignature could be found; or if - * an argument couldn't be converted to match the expected type - * - * @see PrivilegedAccessor#invokeMethod(Object,String,Object[]) - */ - public static Object invokeMethod(final Object instanceOrClass, final String methodSignature, final Object... arguments) { - try { - return PrivilegedAccessor.invokeMethod(instanceOrClass, methodSignature, correctVarargs(arguments)); - } catch (Exception e) { - throw new IllegalArgumentException("Can't invoke method " + methodSignature + " on " + instanceOrClass + " with arguments " - + arguments, e); - } - } + /** + * Calls a method on the given object instance with the given arguments. + * Arguments can be object types or representations for primitives. + * + * @param instanceOrClass + * the instance or class to invoke the method on + * @param methodSignature + * the name of the method and the parameters
        + * (e.g. "myMethod(java.lang.String, com.company.project.MyObject)") + * @param arguments + * an array of objects to pass as arguments + * @return the return value of this method or null if void + * @throws IllegalArgumentException + * if the method could not be invoked. This could be the case if the + * method is inaccessible; if the underlying method throws an + * exception; if no method with the given + * methodSignature could be found; or if an argument + * couldn't be converted to match the expected type + * + * @see PrivilegedAccessor#invokeMethod(Object,String,Object[]) + */ + public static Object invokeMethod(final Object instanceOrClass, + final String methodSignature, final Object... arguments) + { + try + { + return PrivilegedAccessor.invokeMethod(instanceOrClass, + methodSignature, correctVarargs(arguments)); + } catch (Exception e) + { + throw new IllegalArgumentException( + "Can't invoke method " + methodSignature + " on " + + instanceOrClass + " with arguments " + arguments, + e); + } + } - /** - * Calls a method with the given arguments. Arguments can be object types or representations for primitives. - * - * @param methodSignature the name of the method and the parameters
        - * (e.g. "myMethod(java.lang.String, com.company.project.MyObject)") - * @param arguments an array of objects to pass as arguments - * @return the return value of this method or null if void - * @throws IllegalArgumentException if the method could not be invoked. This could be the case if the method is inaccessible; if the - * underlying method throws an exception; if no method with the given methodSignature could be found; or if - * an argument couldn't be converted to match the expected type - * @see PA#invokeMethod(Object, String, Object...) - */ - public Object invokeMethod(final String methodSignature, final Object... arguments) { - return PA.invokeMethod(instanceOrClass, methodSignature, arguments); - } + /** + * Calls a method with the given arguments. Arguments can be object types or + * representations for primitives. + * + * @param methodSignature + * the name of the method and the parameters
        + * (e.g. "myMethod(java.lang.String, com.company.project.MyObject)") + * @param arguments + * an array of objects to pass as arguments + * @return the return value of this method or null if void + * @throws IllegalArgumentException + * if the method could not be invoked. This could be the case if the + * method is inaccessible; if the underlying method throws an + * exception; if no method with the given + * methodSignature could be found; or if an argument + * couldn't be converted to match the expected type + * @see PA#invokeMethod(Object, String, Object...) + */ + public Object invokeMethod(final String methodSignature, + final Object... arguments) + { + return PA.invokeMethod(instanceOrClass, methodSignature, arguments); + } - /** - * Corrects varargs to their initial form. If you call a method with an object-array as last argument the Java varargs mechanism - * converts this array in single arguments. This method returns an object array if the arguments are all of the same type. - * - * @param arguments the possibly converted arguments of a vararg method - * @return arguments possibly converted - */ - private static Object[] correctVarargs(final Object... arguments) { - if ((arguments == null) || changedByVararg(arguments)) return new Object[] {arguments}; - return arguments; - } + /** + * Corrects varargs to their initial form. If you call a method with an + * object-array as last argument the Java varargs mechanism converts this + * array in single arguments. This method returns an object array if the + * arguments are all of the same type. + * + * @param arguments + * the possibly converted arguments of a vararg method + * @return arguments possibly converted + */ + private static Object[] correctVarargs(final Object... arguments) + { + if ((arguments == null) || changedByVararg(arguments)) + return new Object[] { arguments }; + return arguments; + } - /** - * Tests if the arguments were changed by vararg. Arguments are changed by vararg if they are of a non primitive array type. E.g. - * arguments[] = Object[String[]] is converted to String[] while e.g. arguments[] = Object[int[]] is not converted and stays - * Object[int[]] - * - * Unfortunately we can't detect the difference for arg = Object[primitive] since arguments[] = Object[Object[primitive]] which is - * converted to Object[primitive] and arguments[] = Object[primitive] which stays Object[primitive] - * - * and we can't detect the difference for arg = Object[non primitive] since arguments[] = Object[Object[non primitive]] is converted - * to Object[non primitive] and arguments[] = Object[non primitive] stays Object[non primitive] - * - * @param parameters the parameters - * @return true if parameters were changes by varargs, false otherwise - */ - private static boolean changedByVararg(final Object[] parameters) { - if ((parameters.length == 0) || (parameters[0] == null)) return false; + /** + * Tests if the arguments were changed by vararg. Arguments are changed by + * vararg if they are of a non primitive array type. E.g. arguments[] = + * Object[String[]] is converted to String[] while e.g. arguments[] = + * Object[int[]] is not converted and stays Object[int[]] + * + * Unfortunately we can't detect the difference for arg = Object[primitive] + * since arguments[] = Object[Object[primitive]] which is converted to + * Object[primitive] and arguments[] = Object[primitive] which stays + * Object[primitive] + * + * and we can't detect the difference for arg = Object[non primitive] since + * arguments[] = Object[Object[non primitive]] is converted to Object[non + * primitive] and arguments[] = Object[non primitive] stays Object[non + * primitive] + * + * @param parameters + * the parameters + * @return true if parameters were changes by varargs, false otherwise + */ + private static boolean changedByVararg(final Object[] parameters) + { + if ((parameters.length == 0) || (parameters[0] == null)) + return false; - if (parameters.getClass() == Object[].class) return false; + if (parameters.getClass() == Object[].class) + return false; - return true; - } + return true; + } - /** - * Sets the value of the named field. If fieldName denotes a static field, provide a class, otherwise provide an instance. If the - * fieldName denotes a final field, this method could fail with an IllegalAccessException, since setting the value of final fields - * at other times than instantiation can have unpredictable effects.
        - *
        - * Example:
        - *
        - * - * String myString = "Test";
        - *
        - * //setting the private field value
        - * PrivilegedAccessor.setValue(myString, "value", new char[] {'T', 'e', 's', 't'});
        - *
        - * //setting the static final field serialVersionUID - MIGHT FAIL
        - * PrivilegedAccessor.setValue(myString.getClass(), "serialVersionUID", 1);
        - *
        - *
        - * - * @param instanceOrClass the instance or class to set the field - * @param fieldName the name of the field - * @param value the new value of the field - * @throws IllegalArgumentException if the value could not be set. This could be the case if no field with the given - * fieldName can be found; or if the field was final - * - * @see PrivilegedAccessor.setValue(Object,String,Object) - */ - public static PA setValue(final Object instanceOrClass, final String fieldName, final Object value) { - try { - PrivilegedAccessor.setValue(instanceOrClass, fieldName, value); - } catch (Exception e) { - throw new IllegalArgumentException("Can't set value " + value + " at " + fieldName + " in " + instanceOrClass, e); - } - return new PA(instanceOrClass); - } + /** + * Sets the value of the named field. If fieldName denotes a static field, + * provide a class, otherwise provide an instance. If the fieldName denotes a + * final field, this method could fail with an IllegalAccessException, since + * setting the value of final fields at other times than instantiation can + * have unpredictable effects.
        + *
        + * Example:
        + *
        + * + * String myString = "Test";
        + *
        + * //setting the private field value
        + * PrivilegedAccessor.setValue(myString, "value", new char[] {'T', 'e', 's', 't'});
        + *
        + * //setting the static final field serialVersionUID - MIGHT FAIL
        + * PrivilegedAccessor.setValue(myString.getClass(), "serialVersionUID", 1);
        + *
        + *
        + * + * @param instanceOrClass + * the instance or class to set the field + * @param fieldName + * the name of the field + * @param value + * the new value of the field + * @throws IllegalArgumentException + * if the value could not be set. This could be the case if no field + * with the given fieldName can be found; or if the + * field was final + * + * @see PrivilegedAccessor.setValue(Object,String,Object) + */ + public static PA setValue(final Object instanceOrClass, + final String fieldName, final Object value) + { + try + { + PrivilegedAccessor.setValue(instanceOrClass, fieldName, value); + } catch (Exception e) + { + throw new IllegalArgumentException("Can't set value " + value + " at " + + fieldName + " in " + instanceOrClass, e); + } + return new PA(instanceOrClass); + } - /** - * Sets the value of the named field. If fieldName denotes a static field, provide a class, otherwise provide an instance. If the - * fieldName denotes a final field, this method could fail with an IllegalAccessException, since setting the value of final fields - * at other times than instantiation can have unpredictable effects.
        - *
        - * Example:
        - *
        - * - * String myString = "Test";
        - *
        - * //setting the private field value
        - * PrivilegedAccessor.setValue(myString, "value", new char[] {'T', 'e', 's', 't'});
        - *
        - * //setting the static final field serialVersionUID - MIGHT FAIL
        - * PrivilegedAccessor.setValue(myString.getClass(), "serialVersionUID", 1);
        - *
        - *
        - * - * @param fieldName the name of the field - * @param value the new value of the field - * @throws IllegalArgumentException if the value could not be set. This could be the case if no field with the given - * fieldName can be found; or if the field was final - * - * @see PA.setValue(Object,String,Object) - */ - public PA setValue(final String fieldName, final Object value) { - PA.setValue(instanceOrClass, fieldName, value); - return this; - } + /** + * Sets the value of the named field. If fieldName denotes a static field, + * provide a class, otherwise provide an instance. If the fieldName denotes a + * final field, this method could fail with an IllegalAccessException, since + * setting the value of final fields at other times than instantiation can + * have unpredictable effects.
        + *
        + * Example:
        + *
        + * + * String myString = "Test";
        + *
        + * //setting the private field value
        + * PrivilegedAccessor.setValue(myString, "value", new char[] {'T', 'e', 's', 't'});
        + *
        + * //setting the static final field serialVersionUID - MIGHT FAIL
        + * PrivilegedAccessor.setValue(myString.getClass(), "serialVersionUID", 1);
        + *
        + *
        + * + * @param fieldName + * the name of the field + * @param value + * the new value of the field + * @throws IllegalArgumentException + * if the value could not be set. This could be the case if no field + * with the given fieldName can be found; or if the + * field was final + * + * @see PA.setValue(Object,String,Object) + */ + public PA setValue(final String fieldName, final Object value) + { + PA.setValue(instanceOrClass, fieldName, value); + return this; + } } diff --git a/test/junit/extensions/PrivilegedAccessor.java b/test/junit/extensions/PrivilegedAccessor.java index c5c0f04..49409e6 100644 --- a/test/junit/extensions/PrivilegedAccessor.java +++ b/test/junit/extensions/PrivilegedAccessor.java @@ -32,618 +32,827 @@ import java.util.Map; import java.util.StringTokenizer; /** - * This class is used to access a method or field of an object no matter what the access modifier of the method or field. The syntax - * for accessing fields and methods is out of the ordinary because this class uses reflection to peel away protection. + * This class is used to access a method or field of an object no matter what + * the access modifier of the method or field. The syntax for accessing fields + * and methods is out of the ordinary because this class uses reflection to peel + * away protection. *

        * a.k.a. The "ObjectMolester" *

        * Here is an example of using this to access a private member:
        - * myObject is an object of type MyClass. setName(String) is a private method of - * MyClass. + * myObject is an object of type MyClass. + * setName(String) is a private method of MyClass. * *

        - * PrivilegedAccessor.invokeMethod(myObject, "setName(java.lang.String)", "newName");
        + * PrivilegedAccessor.invokeMethod(myObject, "setName(java.lang.String)",
        + *         "newName");
          * 
        * * @author Charlie Hubbard (chubbard@iss.net) * @author Prashant Dhokte (pdhokte@iss.net) * @author Sebastian Dietrich (sebastian.dietrich@e-movimento.com) * - * @deprecated use PA instead. PA improves the functionality of PrivilegedAccessor by introducing support for varargs and removal of - * the necessity to catch exceptions. + * @deprecated use PA instead. PA improves the functionality of + * PrivilegedAccessor by introducing support for varargs and removal + * of the necessity to catch exceptions. */ @Deprecated final class PrivilegedAccessor { - /** - * Private constructor to make it impossible to instantiate this class. - */ - private PrivilegedAccessor() { - assert false : "You mustn't instantiate PrivilegedAccessor, use its methods statically"; - } - - /** - * Returns a string representation of the given object. The string has the following format: " {}" - * whereas is a comma separated list with = includes - * all attributes of the objects class followed by the attributes of its superclass (if any) and so on. - * - * @param instanceOrClass the object or class to get a string representation of - * @return a string representation of the given object - */ - public static String toString(final Object instanceOrClass) { - Collection fields = getFieldNames(instanceOrClass); - - if (fields.isEmpty()) + /** + * Private constructor to make it impossible to instantiate this class. + */ + private PrivilegedAccessor() + { + assert false : "You mustn't instantiate PrivilegedAccessor, use its methods statically"; + } + + /** + * Returns a string representation of the given object. The string has the + * following format: " {}" whereas + * is a comma separated list with + * = includes all + * attributes of the objects class followed by the attributes of its + * superclass (if any) and so on. + * + * @param instanceOrClass + * the object or class to get a string representation of + * @return a string representation of the given object + */ + public static String toString(final Object instanceOrClass) + { + Collection fields = getFieldNames(instanceOrClass); + + if (fields.isEmpty()) + { + return getClass(instanceOrClass).getName(); + } + + StringBuffer stringBuffer = new StringBuffer(); + + stringBuffer.append(getClass(instanceOrClass).getName() + " {"); + + for (String fieldName : fields) + { + try { - return getClass(instanceOrClass).getName(); - } - - StringBuffer stringBuffer = new StringBuffer(); - - stringBuffer.append(getClass(instanceOrClass).getName() + " {"); - - for (String fieldName : fields) { - try { - stringBuffer.append(fieldName + "=" + getValue(instanceOrClass, fieldName) + ", "); - } catch (NoSuchFieldException e) { - assert false : "It should always be possible to get a field that was just here"; - } - } - - stringBuffer.replace(stringBuffer.lastIndexOf(", "), stringBuffer.length(), "}"); - return stringBuffer.toString(); - } - - /** - * Gets the name of all fields (public, private, protected, default) of the given instance or class. This includes as well all - * fields (public, private, protected, default) of all its super classes. - * - * @param instanceOrClass the instance or class to get the fields of - * @return the collection of field names of the given instance or class - */ - public static Collection getFieldNames(final Object instanceOrClass) { - if (instanceOrClass == null) - { - return Collections.EMPTY_LIST; - } - - Class clazz = getClass(instanceOrClass); - Field[] fields = clazz.getDeclaredFields(); - Collection fieldNames = new ArrayList(fields.length); - - for (Field field : fields) { - fieldNames.add(field.getName()); - } - fieldNames.addAll(getFieldNames(clazz.getSuperclass())); - - return fieldNames; - } - - /** - * Gets the signatures of all methods (public, private, protected, default) of the given instance or class. This includes as well - * all methods (public, private, protected, default) of all its super classes. This does not include constructors. - * - * @param instanceOrClass the instance or class to get the method signatures of - * @return the collection of method signatures of the given instance or class - */ - public static Collection getMethodSignatures(final Object instanceOrClass) { - if (instanceOrClass == null) - { - return Collections.EMPTY_LIST; - } - - Class clazz = getClass(instanceOrClass); - Method[] methods = clazz.getDeclaredMethods(); - Collection methodSignatures = new ArrayList(methods.length + Object.class.getDeclaredMethods().length); - - for (Method method : methods) { - methodSignatures.add(method.getName() + "(" + getParameterTypesAsString(method.getParameterTypes()) + ")"); - } - methodSignatures.addAll(getMethodSignatures(clazz.getSuperclass())); - - return methodSignatures; - } - - /** - * Gets the value of the named field and returns it as an object. If instanceOrClass is a class then a static field is returned. - * - * @param instanceOrClass the instance or class to get the field from - * @param fieldName the name of the field - * @return an object representing the value of the field - * @throws NoSuchFieldException if the field does not exist - */ - public static Object getValue(final Object instanceOrClass, final String fieldName) throws NoSuchFieldException { - Field field = getField(instanceOrClass, fieldName); - try { - return field.get(instanceOrClass); - } catch (IllegalAccessException e) { - assert false : "getField() should have setAccessible(true), so an IllegalAccessException should not occur in this place"; - return null; - } - } - - /** - * Instantiates an object of the given class with the given arguments. If you want to instantiate a member class, you must provide - * the object it is a member of as first argument. - * - * @param fromClass the class to instantiate an object from - * @param args the arguments to pass to the constructor - * @return an object of the given type - * @throws IllegalArgumentException if the number of actual and formal parameters differ; if an unwrapping conversion for primitive - * arguments fails; or if, after possible unwrapping, a parameter value cannot be converted to the corresponding formal - * parameter type by a method invocation conversion. - * @throws IllegalAccessException if this Constructor object enforces Java language access control and the underlying constructor is - * inaccessible. - * @throws InvocationTargetException if the underlying constructor throws an exception. - * @throws NoSuchMethodException if the constructor could not be found - * @throws InstantiationException if the class that declares the underlying constructor represents an abstract class. - * - * @see PrivilegedAccessor#instantiate(Class,Class[],Object[]) - */ - public static T instantiate(final Class fromClass, final Object[] args) throws IllegalArgumentException, - InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException { - return instantiate(fromClass, getParameterTypes(args), args); - } - - /** - * Instantiates an object of the given class with the given arguments and the given argument types. If you want to instantiate a - * member class, you must provide the object it is a member of as first argument. - * - * - * @param fromClass the class to instantiate an object from - * @param args the arguments to pass to the constructor - * @param argumentTypes the fully qualified types of the arguments of the constructor - * @return an object of the given type - * @throws IllegalArgumentException if the number of actual and formal parameters differ; if an unwrapping conversion for primitive - * arguments fails; or if, after possible unwrapping, a parameter value cannot be converted to the corresponding formal - * parameter type by a method invocation conversion. - * @throws IllegalAccessException if this Constructor object enforces Java language access control and the underlying constructor is - * inaccessible. - * @throws InvocationTargetException if the underlying constructor throws an exception. - * @throws NoSuchMethodException if the constructor could not be found - * @throws InstantiationException if the class that declares the underlying constructor represents an abstract class. - * - * @see PrivilegedAccessor#instantiate(Class,Object[]) - */ - public static T instantiate(final Class fromClass, final Class[] argumentTypes, final Object[] args) - throws IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException, - NoSuchMethodException { - return getConstructor(fromClass, argumentTypes).newInstance(args); - } - - /** - * Calls a method on the given object instance with the given arguments. Arguments can be object types or representations for - * primitives. - * - * @param instanceOrClass the instance or class to invoke the method on - * @param methodSignature the name of the method and the parameters
        - * (e.g. "myMethod(java.lang.String, com.company.project.MyObject)") - * @param arguments an array of objects to pass as arguments - * @return the return value of this method or null if void - * @throws IllegalAccessException if the method is inaccessible - * @throws InvocationTargetException if the underlying method throws an exception. - * @throws NoSuchMethodException if no method with the given methodSignature could be found - * @throws IllegalArgumentException if an argument couldn't be converted to match the expected type - */ - public static Object invokeMethod(final Object instanceOrClass, final String methodSignature, final Object[] arguments) - throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, NoSuchMethodException { - if ((methodSignature.indexOf('(') == -1) || (methodSignature.indexOf('(') >= methodSignature.indexOf(')'))) - { - throw new NoSuchMethodException(methodSignature); - } - Class[] parameterTypes = getParameterTypes(methodSignature); - return getMethod(instanceOrClass, getMethodName(methodSignature), parameterTypes).invoke(instanceOrClass, - getCorrectedArguments(parameterTypes, arguments)); - } - - /** - * Gets the given arguments corrected to match the given methodSignature. Correction is necessary for array arguments not to be - * mistaken by varargs. - * - * @param parameterTypes the method signatue the given arguments should match - * @param arguments the arguments that should be corrected - * @return the corrected arguments - */ - private static Object[] getCorrectedArguments(Class[] parameterTypes, Object[] arguments) { - if (arguments == null) - { - return arguments; - } - if (parameterTypes.length > arguments.length) - { - return arguments; - } - if (parameterTypes.length < arguments.length) - { - return getCorrectedArguments(parameterTypes, new Object[] {arguments}); - } - - Object[] correctedArguments = new Object[arguments.length]; - int currentArgument = 0; - for (Class parameterType : parameterTypes) { - correctedArguments[currentArgument] = getCorrectedArgument(parameterType, arguments[currentArgument]); - currentArgument++; - } - return correctedArguments; - } - - /** - * Gets the given argument corrected to match the given parameterType. Correction is necessary for array arguments not to be - * mistaken by varargs. - * - * @param parameterType the type to match the given argument upon - * @param argument the argument to match the given parameterType - * @return the corrected argument - */ - private static Object getCorrectedArgument(Class parameterType, Object argument) { - if (!parameterType.isArray() || (argument == null)) { - return argument; // normal argument for normal parameterType - } - - if (!argument.getClass().isArray()) { - return new Object[] {argument}; - } - - if (parameterType.equals(argument.getClass())) - { - return argument; // no need to cast - } - - // (typed) array argument for (object) array parameterType, elements need to be casted - Object correctedArrayArgument = Array.newInstance(parameterType.getComponentType(), Array.getLength(argument)); - for (int index = 0; index < Array.getLength(argument); index++) { - if (parameterType.getComponentType().isPrimitive()) { // rely on autoboxing - Array.set(correctedArrayArgument, index, Array.get(argument, index)); - } else { // cast to expected type - try { - Array.set(correctedArrayArgument, index, parameterType.getComponentType().cast(Array.get(argument, index))); - } catch (ClassCastException e) { - throw new IllegalArgumentException("Argument " + argument + " of type " + argument.getClass() - + " does not match expected argument type " + parameterType + "."); - } - } - } - return correctedArrayArgument; - } - - /** - * Sets the value of the named field. If fieldName denotes a static field, provide a class, otherwise provide an instance. If the - * fieldName denotes a final field, this method could fail with an IllegalAccessException, since setting the value of final fields - * at other times than instantiation can have unpredictable effects.
        - *
        - * Example:
        - *
        - * - * String myString = "Test";
        - *
        - * //setting the private field value
        - * PrivilegedAccessor.setValue(myString, "value", new char[] {'T', 'e', 's', 't'});
        - *
        - * //setting the static final field serialVersionUID - MIGHT FAIL
        - * PrivilegedAccessor.setValue(myString.getClass(), "serialVersionUID", 1);
        - *
        - *
        - * - * @param instanceOrClass the instance or class to set the field - * @param fieldName the name of the field - * @param value the new value of the field - * @throws NoSuchFieldException if no field with the given fieldName can be found - * @throws IllegalAccessException possibly if the field was final - */ - public static void setValue(final Object instanceOrClass, final String fieldName, final Object value) throws NoSuchFieldException, - IllegalAccessException { - Field field = getField(instanceOrClass, fieldName); - if (Modifier.isFinal(field.getModifiers())) { - PrivilegedAccessor.setValue(field, "modifiers", field.getModifiers() ^ Modifier.FINAL); - } - field.set(instanceOrClass, value); - } - - /** - * Gets the class with the given className. - * - * @param className the name of the class to get - * @return the class for the given className - * @throws ClassNotFoundException if the class could not be found - */ - private static Class getClassForName(final String className) throws ClassNotFoundException { - if (className.indexOf('[') > -1) { - Class clazz = getClassForName(className.substring(0, className.indexOf('['))); - return Array.newInstance(clazz, 0).getClass(); - } - - if (className.indexOf("...") > -1) { - Class clazz = getClassForName(className.substring(0, className.indexOf("..."))); - return Array.newInstance(clazz, 0).getClass(); - } - - try { - return Class.forName(className, false, Thread.currentThread().getContextClassLoader()); - } catch (ClassNotFoundException e) { - return getSpecialClassForName(className); - } - } - - /** - * Maps string representation of primitives to their corresponding classes. - */ - private static final Map> PRIMITIVE_MAPPER = new HashMap>(8); - - /** - * Fills the map with all java primitives and their corresponding classes. - */ - static { - PRIMITIVE_MAPPER.put("int", Integer.TYPE); - PRIMITIVE_MAPPER.put("float", Float.TYPE); - PRIMITIVE_MAPPER.put("double", Double.TYPE); - PRIMITIVE_MAPPER.put("short", Short.TYPE); - PRIMITIVE_MAPPER.put("long", Long.TYPE); - PRIMITIVE_MAPPER.put("byte", Byte.TYPE); - PRIMITIVE_MAPPER.put("char", Character.TYPE); - PRIMITIVE_MAPPER.put("boolean", Boolean.TYPE); - } - - /** - * Gets special classes for the given className. Special classes are primitives and "standard" Java types (like String) - * - * @param className the name of the class to get - * @return the class for the given className - * @throws ClassNotFoundException if the class could not be found - */ - private static Class getSpecialClassForName(final String className) throws ClassNotFoundException { - if (PRIMITIVE_MAPPER.containsKey(className)) + stringBuffer.append(fieldName + "=" + + getValue(instanceOrClass, fieldName) + ", "); + } catch (NoSuchFieldException e) { - return PRIMITIVE_MAPPER.get(className); - } - - if (missesPackageName(className)) - { - return getStandardClassForName(className); - } - - throw new ClassNotFoundException(className); - } - - /** - * Gets a 'standard' java class for the given className. - * - * @param className the className - * @return the class for the given className (if any) - * @throws ClassNotFoundException of no 'standard' java class was found for the given className - */ - private static Class getStandardClassForName(String className) throws ClassNotFoundException { - try { - return Class.forName("java.lang." + className, false, Thread.currentThread().getContextClassLoader()); - } catch (ClassNotFoundException e) { - try { - return Class.forName("java.util." + className, false, Thread.currentThread().getContextClassLoader()); - } catch (ClassNotFoundException e1) { - throw new ClassNotFoundException(className); - } + assert false : "It should always be possible to get a field that was just here"; + } + } + + stringBuffer.replace(stringBuffer.lastIndexOf(", "), + stringBuffer.length(), "}"); + return stringBuffer.toString(); + } + + /** + * Gets the name of all fields (public, private, protected, default) of the + * given instance or class. This includes as well all fields (public, private, + * protected, default) of all its super classes. + * + * @param instanceOrClass + * the instance or class to get the fields of + * @return the collection of field names of the given instance or class + */ + public static Collection getFieldNames( + final Object instanceOrClass) + { + if (instanceOrClass == null) + { + return Collections.EMPTY_LIST; + } + + Class clazz = getClass(instanceOrClass); + Field[] fields = clazz.getDeclaredFields(); + Collection fieldNames = new ArrayList(fields.length); + + for (Field field : fields) + { + fieldNames.add(field.getName()); + } + fieldNames.addAll(getFieldNames(clazz.getSuperclass())); + + return fieldNames; + } + + /** + * Gets the signatures of all methods (public, private, protected, default) of + * the given instance or class. This includes as well all methods (public, + * private, protected, default) of all its super classes. This does not + * include constructors. + * + * @param instanceOrClass + * the instance or class to get the method signatures of + * @return the collection of method signatures of the given instance or class + */ + public static Collection getMethodSignatures( + final Object instanceOrClass) + { + if (instanceOrClass == null) + { + return Collections.EMPTY_LIST; + } + + Class clazz = getClass(instanceOrClass); + Method[] methods = clazz.getDeclaredMethods(); + Collection methodSignatures = new ArrayList( + methods.length + Object.class.getDeclaredMethods().length); + + for (Method method : methods) + { + methodSignatures.add(method.getName() + "(" + + getParameterTypesAsString(method.getParameterTypes()) + + ")"); + } + methodSignatures.addAll(getMethodSignatures(clazz.getSuperclass())); + + return methodSignatures; + } + + /** + * Gets the value of the named field and returns it as an object. If + * instanceOrClass is a class then a static field is returned. + * + * @param instanceOrClass + * the instance or class to get the field from + * @param fieldName + * the name of the field + * @return an object representing the value of the field + * @throws NoSuchFieldException + * if the field does not exist + */ + public static Object getValue(final Object instanceOrClass, + final String fieldName) throws NoSuchFieldException + { + Field field = getField(instanceOrClass, fieldName); + try + { + return field.get(instanceOrClass); + } catch (IllegalAccessException e) + { + assert false : "getField() should have setAccessible(true), so an IllegalAccessException should not occur in this place"; + return null; + } + } + + /** + * Instantiates an object of the given class with the given arguments. If you + * want to instantiate a member class, you must provide the object it is a + * member of as first argument. + * + * @param fromClass + * the class to instantiate an object from + * @param args + * the arguments to pass to the constructor + * @return an object of the given type + * @throws IllegalArgumentException + * if the number of actual and formal parameters differ; if an + * unwrapping conversion for primitive arguments fails; or if, after + * possible unwrapping, a parameter value cannot be converted to the + * corresponding formal parameter type by a method invocation + * conversion. + * @throws IllegalAccessException + * if this Constructor object enforces Java language access control + * and the underlying constructor is inaccessible. + * @throws InvocationTargetException + * if the underlying constructor throws an exception. + * @throws NoSuchMethodException + * if the constructor could not be found + * @throws InstantiationException + * if the class that declares the underlying constructor represents + * an abstract class. + * + * @see PrivilegedAccessor#instantiate(Class,Class[],Object[]) + */ + public static T instantiate(final Class fromClass, + final Object[] args) throws IllegalArgumentException, + InstantiationException, IllegalAccessException, + InvocationTargetException, NoSuchMethodException + { + return instantiate(fromClass, getParameterTypes(args), args); + } + + /** + * Instantiates an object of the given class with the given arguments and the + * given argument types. If you want to instantiate a member class, you must + * provide the object it is a member of as first argument. + * + * + * @param fromClass + * the class to instantiate an object from + * @param args + * the arguments to pass to the constructor + * @param argumentTypes + * the fully qualified types of the arguments of the constructor + * @return an object of the given type + * @throws IllegalArgumentException + * if the number of actual and formal parameters differ; if an + * unwrapping conversion for primitive arguments fails; or if, after + * possible unwrapping, a parameter value cannot be converted to the + * corresponding formal parameter type by a method invocation + * conversion. + * @throws IllegalAccessException + * if this Constructor object enforces Java language access control + * and the underlying constructor is inaccessible. + * @throws InvocationTargetException + * if the underlying constructor throws an exception. + * @throws NoSuchMethodException + * if the constructor could not be found + * @throws InstantiationException + * if the class that declares the underlying constructor represents + * an abstract class. + * + * @see PrivilegedAccessor#instantiate(Class,Object[]) + */ + public static T instantiate(final Class fromClass, + final Class[] argumentTypes, final Object[] args) + throws IllegalArgumentException, InstantiationException, + IllegalAccessException, InvocationTargetException, + NoSuchMethodException + { + return getConstructor(fromClass, argumentTypes).newInstance(args); + } + + /** + * Calls a method on the given object instance with the given arguments. + * Arguments can be object types or representations for primitives. + * + * @param instanceOrClass + * the instance or class to invoke the method on + * @param methodSignature + * the name of the method and the parameters
        + * (e.g. "myMethod(java.lang.String, com.company.project.MyObject)") + * @param arguments + * an array of objects to pass as arguments + * @return the return value of this method or null if void + * @throws IllegalAccessException + * if the method is inaccessible + * @throws InvocationTargetException + * if the underlying method throws an exception. + * @throws NoSuchMethodException + * if no method with the given methodSignature could be + * found + * @throws IllegalArgumentException + * if an argument couldn't be converted to match the expected type + */ + public static Object invokeMethod(final Object instanceOrClass, + final String methodSignature, final Object[] arguments) + throws IllegalArgumentException, IllegalAccessException, + InvocationTargetException, NoSuchMethodException + { + if ((methodSignature.indexOf('(') == -1) || (methodSignature + .indexOf('(') >= methodSignature.indexOf(')'))) + { + throw new NoSuchMethodException(methodSignature); + } + Class[] parameterTypes = getParameterTypes(methodSignature); + return getMethod(instanceOrClass, getMethodName(methodSignature), + parameterTypes).invoke(instanceOrClass, + getCorrectedArguments(parameterTypes, arguments)); + } + + /** + * Gets the given arguments corrected to match the given methodSignature. + * Correction is necessary for array arguments not to be mistaken by varargs. + * + * @param parameterTypes + * the method signatue the given arguments should match + * @param arguments + * the arguments that should be corrected + * @return the corrected arguments + */ + private static Object[] getCorrectedArguments(Class[] parameterTypes, + Object[] arguments) + { + if (arguments == null) + { + return arguments; + } + if (parameterTypes.length > arguments.length) + { + return arguments; + } + if (parameterTypes.length < arguments.length) + { + return getCorrectedArguments(parameterTypes, + new Object[] + { arguments }); + } + + Object[] correctedArguments = new Object[arguments.length]; + int currentArgument = 0; + for (Class parameterType : parameterTypes) + { + correctedArguments[currentArgument] = getCorrectedArgument( + parameterType, arguments[currentArgument]); + currentArgument++; + } + return correctedArguments; + } + + /** + * Gets the given argument corrected to match the given parameterType. + * Correction is necessary for array arguments not to be mistaken by varargs. + * + * @param parameterType + * the type to match the given argument upon + * @param argument + * the argument to match the given parameterType + * @return the corrected argument + */ + private static Object getCorrectedArgument(Class parameterType, + Object argument) + { + if (!parameterType.isArray() || (argument == null)) + { + return argument; // normal argument for normal parameterType + } + + if (!argument.getClass().isArray()) + { + return new Object[] { argument }; + } + + if (parameterType.equals(argument.getClass())) + { + return argument; // no need to cast + } + + // (typed) array argument for (object) array parameterType, elements need to + // be casted + Object correctedArrayArgument = Array.newInstance( + parameterType.getComponentType(), Array.getLength(argument)); + for (int index = 0; index < Array.getLength(argument); index++) + { + if (parameterType.getComponentType().isPrimitive()) + { // rely on autoboxing + Array.set(correctedArrayArgument, index, + Array.get(argument, index)); + } + else + { // cast to expected type + try + { + Array.set(correctedArrayArgument, index, parameterType + .getComponentType().cast(Array.get(argument, index))); + } catch (ClassCastException e) + { + throw new IllegalArgumentException( + "Argument " + argument + " of type " + argument.getClass() + + " does not match expected argument type " + + parameterType + "."); + } } - } - - /** - * Tests if the given className possibly misses its package name. - * - * @param className the className - * @return true if the className might miss its package name, otherwise false - */ - private static boolean missesPackageName(String className) { - if (className.contains(".")) + } + return correctedArrayArgument; + } + + /** + * Sets the value of the named field. If fieldName denotes a static field, + * provide a class, otherwise provide an instance. If the fieldName denotes a + * final field, this method could fail with an IllegalAccessException, since + * setting the value of final fields at other times than instantiation can + * have unpredictable effects.
        + *
        + * Example:
        + *
        + * + * String myString = "Test";
        + *
        + * //setting the private field value
        + * PrivilegedAccessor.setValue(myString, "value", new char[] {'T', 'e', 's', 't'});
        + *
        + * //setting the static final field serialVersionUID - MIGHT FAIL
        + * PrivilegedAccessor.setValue(myString.getClass(), "serialVersionUID", 1);
        + *
        + *
        + * + * @param instanceOrClass + * the instance or class to set the field + * @param fieldName + * the name of the field + * @param value + * the new value of the field + * @throws NoSuchFieldException + * if no field with the given fieldName can be found + * @throws IllegalAccessException + * possibly if the field was final + */ + public static void setValue(final Object instanceOrClass, + final String fieldName, final Object value) + throws NoSuchFieldException, IllegalAccessException + { + Field field = getField(instanceOrClass, fieldName); + if (Modifier.isFinal(field.getModifiers())) + { + PrivilegedAccessor.setValue(field, "modifiers", + field.getModifiers() ^ Modifier.FINAL); + } + field.set(instanceOrClass, value); + } + + /** + * Gets the class with the given className. + * + * @param className + * the name of the class to get + * @return the class for the given className + * @throws ClassNotFoundException + * if the class could not be found + */ + private static Class getClassForName(final String className) + throws ClassNotFoundException + { + if (className.indexOf('[') > -1) + { + Class clazz = getClassForName( + className.substring(0, className.indexOf('['))); + return Array.newInstance(clazz, 0).getClass(); + } + + if (className.indexOf("...") > -1) + { + Class clazz = getClassForName( + className.substring(0, className.indexOf("..."))); + return Array.newInstance(clazz, 0).getClass(); + } + + try + { + return Class.forName(className, false, + Thread.currentThread().getContextClassLoader()); + } catch (ClassNotFoundException e) + { + return getSpecialClassForName(className); + } + } + + /** + * Maps string representation of primitives to their corresponding classes. + */ + private static final Map> PRIMITIVE_MAPPER = new HashMap>( + 8); + + /** + * Fills the map with all java primitives and their corresponding classes. + */ + static + { + PRIMITIVE_MAPPER.put("int", Integer.TYPE); + PRIMITIVE_MAPPER.put("float", Float.TYPE); + PRIMITIVE_MAPPER.put("double", Double.TYPE); + PRIMITIVE_MAPPER.put("short", Short.TYPE); + PRIMITIVE_MAPPER.put("long", Long.TYPE); + PRIMITIVE_MAPPER.put("byte", Byte.TYPE); + PRIMITIVE_MAPPER.put("char", Character.TYPE); + PRIMITIVE_MAPPER.put("boolean", Boolean.TYPE); + } + + /** + * Gets special classes for the given className. Special classes are + * primitives and "standard" Java types (like String) + * + * @param className + * the name of the class to get + * @return the class for the given className + * @throws ClassNotFoundException + * if the class could not be found + */ + private static Class getSpecialClassForName(final String className) + throws ClassNotFoundException + { + if (PRIMITIVE_MAPPER.containsKey(className)) + { + return PRIMITIVE_MAPPER.get(className); + } + + if (missesPackageName(className)) + { + return getStandardClassForName(className); + } + + throw new ClassNotFoundException(className); + } + + /** + * Gets a 'standard' java class for the given className. + * + * @param className + * the className + * @return the class for the given className (if any) + * @throws ClassNotFoundException + * of no 'standard' java class was found for the given className + */ + private static Class getStandardClassForName(String className) + throws ClassNotFoundException + { + try + { + return Class.forName("java.lang." + className, false, + Thread.currentThread().getContextClassLoader()); + } catch (ClassNotFoundException e) + { + try { - return false; - } - if (className.startsWith(className.substring(0, 1).toUpperCase(Locale.ROOT))) + return Class.forName("java.util." + className, false, + Thread.currentThread().getContextClassLoader()); + } catch (ClassNotFoundException e1) { - return true; - } + throw new ClassNotFoundException(className); + } + } + } + + /** + * Tests if the given className possibly misses its package name. + * + * @param className + * the className + * @return true if the className might miss its package name, otherwise false + */ + private static boolean missesPackageName(String className) + { + if (className.contains(".")) + { return false; - } - - /** - * Gets the constructor for a given class with the given parameters. - * - * @param type the class to instantiate - * @param parameterTypes the types of the parameters - * @return the constructor - * @throws NoSuchMethodException if the method could not be found - */ - private static Constructor getConstructor(final Class type, final Class[] parameterTypes) throws NoSuchMethodException { - Constructor constructor = type.getDeclaredConstructor(parameterTypes); - constructor.setAccessible(true); - return constructor; - } - - /** - * Return the named field from the given instance or class. Returns a static field if instanceOrClass is a class. - * - * @param instanceOrClass the instance or class to get the field from - * @param fieldName the name of the field to get - * @return the field - * @throws NoSuchFieldException if no such field can be found - * @throws InvalidParameterException if instanceOrClass was null - */ - private static Field getField(final Object instanceOrClass, final String fieldName) throws NoSuchFieldException, - InvalidParameterException { - if (instanceOrClass == null) + } + if (className + .startsWith(className.substring(0, 1).toUpperCase(Locale.ROOT))) + { + return true; + } + return false; + } + + /** + * Gets the constructor for a given class with the given parameters. + * + * @param type + * the class to instantiate + * @param parameterTypes + * the types of the parameters + * @return the constructor + * @throws NoSuchMethodException + * if the method could not be found + */ + private static Constructor getConstructor(final Class type, + final Class[] parameterTypes) throws NoSuchMethodException + { + Constructor constructor = type + .getDeclaredConstructor(parameterTypes); + constructor.setAccessible(true); + return constructor; + } + + /** + * Return the named field from the given instance or class. Returns a static + * field if instanceOrClass is a class. + * + * @param instanceOrClass + * the instance or class to get the field from + * @param fieldName + * the name of the field to get + * @return the field + * @throws NoSuchFieldException + * if no such field can be found + * @throws InvalidParameterException + * if instanceOrClass was null + */ + private static Field getField(final Object instanceOrClass, + final String fieldName) + throws NoSuchFieldException, InvalidParameterException + { + if (instanceOrClass == null) + { + throw new InvalidParameterException( + "Can't get field on null object/class"); + } + + Class type = getClass(instanceOrClass); + + try + { + Field field = type.getDeclaredField(fieldName); + field.setAccessible(true); + return field; + } catch (NoSuchFieldException e) + { + if (type.getSuperclass() == null) { - throw new InvalidParameterException("Can't get field on null object/class"); - } - - Class type = getClass(instanceOrClass); - - try { - Field field = type.getDeclaredField(fieldName); - field.setAccessible(true); - return field; - } catch (NoSuchFieldException e) { - if (type.getSuperclass() == null) - { - throw e; - } - return getField(type.getSuperclass(), fieldName); - } - } - - /** - * Gets the class of the given parameter. If the parameter is a class, it is returned, if it is an object, its class is returned - * - * @param instanceOrClass the instance or class to get the class of - * @return the class of the given parameter - */ - private static Class getClass(final Object instanceOrClass) { - if (instanceOrClass instanceof Class) + throw e; + } + return getField(type.getSuperclass(), fieldName); + } + } + + /** + * Gets the class of the given parameter. If the parameter is a class, it is + * returned, if it is an object, its class is returned + * + * @param instanceOrClass + * the instance or class to get the class of + * @return the class of the given parameter + */ + private static Class getClass(final Object instanceOrClass) + { + if (instanceOrClass instanceof Class) + { + return (Class) instanceOrClass; + } + + return instanceOrClass.getClass(); + } + + /** + * Return the named method with a method signature matching classTypes from + * the given class. + * + * @param type + * the class to get the method from + * @param methodName + * the name of the method to get + * @param parameterTypes + * the parameter-types of the method to get + * @return the method + * @throws NoSuchMethodException + * if the method could not be found + */ + private static Method getMethod(final Class type, + final String methodName, final Class[] parameterTypes) + throws NoSuchMethodException + { + try + { + return type.getDeclaredMethod(methodName, parameterTypes); + } catch (NoSuchMethodException e) + { + if (type.getSuperclass() == null) { - return (Class) instanceOrClass; - } - - return instanceOrClass.getClass(); - } - - /** - * Return the named method with a method signature matching classTypes from the given class. - * - * @param type the class to get the method from - * @param methodName the name of the method to get - * @param parameterTypes the parameter-types of the method to get - * @return the method - * @throws NoSuchMethodException if the method could not be found - */ - private static Method getMethod(final Class type, final String methodName, final Class[] parameterTypes) - throws NoSuchMethodException { - try { - return type.getDeclaredMethod(methodName, parameterTypes); - } catch (NoSuchMethodException e) { - if (type.getSuperclass() == null) - { - throw e; - } - return getMethod(type.getSuperclass(), methodName, parameterTypes); - } - } - - /** - * Gets the method with the given name and parameters from the given instance or class. If instanceOrClass is a class, then we get a - * static method. - * - * @param instanceOrClass the instance or class to get the method of - * @param methodName the name of the method - * @param parameterTypes the parameter-types of the method to get - * @return the method - * @throws NoSuchMethodException if the method could not be found - */ - private static Method getMethod(final Object instanceOrClass, final String methodName, final Class[] parameterTypes) - throws NoSuchMethodException { - Class type; - - type = getClass(instanceOrClass); - - Method accessMethod = getMethod(type, methodName, parameterTypes); - accessMethod.setAccessible(true); - return accessMethod; - } - - /** - * Gets the name of a method. - * - * @param methodSignature the signature of the method - * @return the name of the method - */ - private static String getMethodName(final String methodSignature) { - try { - return methodSignature.substring(0, methodSignature.indexOf('(')).trim(); - } catch (StringIndexOutOfBoundsException e) { - assert false : "Signature must have been checked before this method was called"; - return null; - } - } - - /** - * Gets the types of the parameters. - * - * @param parameters the parameters - * @return the class-types of the arguments - */ - private static Class[] getParameterTypes(final Object[] parameters) { - if (parameters == null) + throw e; + } + return getMethod(type.getSuperclass(), methodName, parameterTypes); + } + } + + /** + * Gets the method with the given name and parameters from the given instance + * or class. If instanceOrClass is a class, then we get a static method. + * + * @param instanceOrClass + * the instance or class to get the method of + * @param methodName + * the name of the method + * @param parameterTypes + * the parameter-types of the method to get + * @return the method + * @throws NoSuchMethodException + * if the method could not be found + */ + private static Method getMethod(final Object instanceOrClass, + final String methodName, final Class[] parameterTypes) + throws NoSuchMethodException + { + Class type; + + type = getClass(instanceOrClass); + + Method accessMethod = getMethod(type, methodName, parameterTypes); + accessMethod.setAccessible(true); + return accessMethod; + } + + /** + * Gets the name of a method. + * + * @param methodSignature + * the signature of the method + * @return the name of the method + */ + private static String getMethodName(final String methodSignature) + { + try + { + return methodSignature.substring(0, methodSignature.indexOf('(')) + .trim(); + } catch (StringIndexOutOfBoundsException e) + { + assert false : "Signature must have been checked before this method was called"; + return null; + } + } + + /** + * Gets the types of the parameters. + * + * @param parameters + * the parameters + * @return the class-types of the arguments + */ + private static Class[] getParameterTypes(final Object[] parameters) + { + if (parameters == null) + { + return new Class[0]; + } + + Class[] typesOfParameters = new Class[parameters.length]; + + for (int i = 0; i < parameters.length; i++) + { + typesOfParameters[i] = parameters[i].getClass(); + } + return typesOfParameters; + } + + /** + * Gets the types of the given parameters. If the parameters don't match the + * given methodSignature an IllegalArgumentException is thrown. + * + * @param methodSignature + * the signature of the method + * @return the parameter types as class[] + * @throws NoSuchMethodException + * if the method could not be found + * @throws IllegalArgumentException + * if one of the given parameters doesn't math the given + * methodSignature + */ + private static Class[] getParameterTypes(final String methodSignature) + throws NoSuchMethodException, IllegalArgumentException + { + String signature = getSignatureWithoutBraces(methodSignature); + + StringTokenizer tokenizer = new StringTokenizer(signature, ", *"); + Class[] typesInSignature = new Class[tokenizer.countTokens()]; + + for (int x = 0; tokenizer.hasMoreTokens(); x++) + { + String className = tokenizer.nextToken(); + try { - return new Class[0]; - } - - Class[] typesOfParameters = new Class[parameters.length]; - - for (int i = 0; i < parameters.length; i++) { - typesOfParameters[i] = parameters[i].getClass(); - } - return typesOfParameters; - } - - /** - * Gets the types of the given parameters. If the parameters don't match the given methodSignature an IllegalArgumentException is - * thrown. - * - * @param methodSignature the signature of the method - * @return the parameter types as class[] - * @throws NoSuchMethodException if the method could not be found - * @throws IllegalArgumentException if one of the given parameters doesn't math the given methodSignature - */ - private static Class[] getParameterTypes(final String methodSignature) throws NoSuchMethodException, IllegalArgumentException { - String signature = getSignatureWithoutBraces(methodSignature); - - StringTokenizer tokenizer = new StringTokenizer(signature, ", *"); - Class[] typesInSignature = new Class[tokenizer.countTokens()]; - - for (int x = 0; tokenizer.hasMoreTokens(); x++) { - String className = tokenizer.nextToken(); - try { - typesInSignature[x] = getClassForName(className); - } catch (ClassNotFoundException e) { - NoSuchMethodException noSuchMethodException = new NoSuchMethodException(methodSignature); - noSuchMethodException.initCause(e); - throw noSuchMethodException; - } - } - return typesInSignature; - } - - /** - * Gets the parameter types as a string. - * - * @param classTypes the types to get as names. - * @return the parameter types as a string - * - * @see java.lang.Class#argumentTypesToString(Class[]) - */ - private static String getParameterTypesAsString(final Class[] classTypes) { - assert classTypes != null : "getParameterTypes() should have been called before this method and should have provided not-null classTypes"; - if (classTypes.length == 0) + typesInSignature[x] = getClassForName(className); + } catch (ClassNotFoundException e) { - return ""; - } - - StringBuilder parameterTypes = new StringBuilder(); - for (Class clazz : classTypes) { - assert clazz != null : "getParameterTypes() should have been called before this method and should have provided not-null classTypes"; - parameterTypes.append(clazz.getName()).append(", "); - } - - return parameterTypes.substring(0, parameterTypes.length() - 2); - } - - /** - * Removes the braces around the methods signature. - * - * @param methodSignature the signature with braces - * @return the signature without braces - */ - private static String getSignatureWithoutBraces(final String methodSignature) { - try { - return methodSignature.substring(methodSignature.indexOf('(') + 1, methodSignature.indexOf(')')); - } catch (IndexOutOfBoundsException e) { - assert false : "signature must have been checked before this method"; - return null; - } - } + NoSuchMethodException noSuchMethodException = new NoSuchMethodException( + methodSignature); + noSuchMethodException.initCause(e); + throw noSuchMethodException; + } + } + return typesInSignature; + } + + /** + * Gets the parameter types as a string. + * + * @param classTypes + * the types to get as names. + * @return the parameter types as a string + * + * @see java.lang.Class#argumentTypesToString(Class[]) + */ + private static String getParameterTypesAsString( + final Class[] classTypes) + { + assert classTypes != null : "getParameterTypes() should have been called before this method and should have provided not-null classTypes"; + if (classTypes.length == 0) + { + return ""; + } + + StringBuilder parameterTypes = new StringBuilder(); + for (Class clazz : classTypes) + { + assert clazz != null : "getParameterTypes() should have been called before this method and should have provided not-null classTypes"; + parameterTypes.append(clazz.getName()).append(", "); + } + + return parameterTypes.substring(0, parameterTypes.length() - 2); + } + + /** + * Removes the braces around the methods signature. + * + * @param methodSignature + * the signature with braces + * @return the signature without braces + */ + private static String getSignatureWithoutBraces( + final String methodSignature) + { + try + { + return methodSignature.substring(methodSignature.indexOf('(') + 1, + methodSignature.indexOf(')')); + } catch (IndexOutOfBoundsException e) + { + assert false : "signature must have been checked before this method"; + return null; + } + } } diff --git a/test/mc_view/PDBfileTest.java b/test/mc_view/PDBfileTest.java index c99d185..b636669 100644 --- a/test/mc_view/PDBfileTest.java +++ b/test/mc_view/PDBfileTest.java @@ -102,7 +102,8 @@ public class PDBfileTest assertEquals(0, chainA.seqend); // not set assertEquals(18, chainA.sequence.getStart()); assertEquals(314, chainA.sequence.getEnd()); - assertTrue(chainA.sequence.getSequenceAsString().startsWith("KCSKKQEE")); + assertTrue( + chainA.sequence.getSequenceAsString().startsWith("KCSKKQEE")); assertTrue(chainA.sequence.getSequenceAsString().endsWith("WNVEVY")); assertEquals("3W5V|A", chainA.sequence.getName()); assertNull(chainA.sequence.getAnnotation()); @@ -122,7 +123,8 @@ public class PDBfileTest PDBChain chainC = pf.getChains().get(2); assertEquals(18, chainC.sequence.getStart()); assertEquals(314, chainC.sequence.getEnd()); - assertTrue(chainC.sequence.getSequenceAsString().startsWith("KCSKKQEE")); + assertTrue( + chainC.sequence.getSequenceAsString().startsWith("KCSKKQEE")); assertTrue(chainC.sequence.getSequenceAsString().endsWith("WNVEVY")); assertEquals("3W5V|C", chainC.sequence.getName()); @@ -243,8 +245,7 @@ public class PDBfileTest * @throws IOException */ @Test(groups = { "Functional" }) - public void testParse_withJmolAddAlignmentAnnotations() - throws IOException + public void testParse_withJmolAddAlignmentAnnotations() throws IOException { PDBfile pf = new PDBfile(true, true, false, "examples/3W5V.pdb", DataSourceType.FILE); -- 1.7.10.2
        LocationCds109-230
        Peptide LocationTestSeq10-13