From 2d11774110564c33e2e1460beab078095af22a29 Mon Sep 17 00:00:00 2001 From: tcofoegbu Date: Wed, 2 Sep 2015 16:44:25 +0100 Subject: [PATCH] JAL-1739 reverted BioJSON schema to use one main version for the whole schema and remove every other versioning for different fragments of the schema --- .../biojson/v1/AlignmentAnnotationPojo.java | 7 +- .../json/binding/biojson/v1/AlignmentPojo.java | 15 ++-- .../json/binding/biojson/v1/AppSettingsPojo.java | 91 -------------------- .../binding/biojson/v1/SequenceFeaturesPojo.java | 16 ---- .../json/binding/biojson/v1/SequenceGrpPojo.java | 11 +-- .../json/binding/biojson/v1/SequencePojo.java | 7 -- 6 files changed, 13 insertions(+), 134 deletions(-) delete mode 100644 src/jalview/json/binding/biojson/v1/AppSettingsPojo.java diff --git a/src/jalview/json/binding/biojson/v1/AlignmentAnnotationPojo.java b/src/jalview/json/binding/biojson/v1/AlignmentAnnotationPojo.java index 6f21a2a..9fd712f 100644 --- a/src/jalview/json/binding/biojson/v1/AlignmentAnnotationPojo.java +++ b/src/jalview/json/binding/biojson/v1/AlignmentAnnotationPojo.java @@ -7,8 +7,6 @@ import com.github.reinert.jjschema.Attributes; public class AlignmentAnnotationPojo { - @Attributes(required = true, description = "Serial version id for the alignAnnotation object model") - private String svid = "1.0"; @Attributes(required = false, description = "Label for the Alignment Annotation") private String label; @@ -49,9 +47,6 @@ public class AlignmentAnnotationPojo this.annotations = annotations; } - public String getSvid() - { - return svid; - } + } diff --git a/src/jalview/json/binding/biojson/v1/AlignmentPojo.java b/src/jalview/json/binding/biojson/v1/AlignmentPojo.java index f7f20bb..f68ea86 100644 --- a/src/jalview/json/binding/biojson/v1/AlignmentPojo.java +++ b/src/jalview/json/binding/biojson/v1/AlignmentPojo.java @@ -17,8 +17,7 @@ public class AlignmentPojo @Attributes( required = true, minItems = 1, - maxItems = 2147483647, - description = "A sequence group is a bracket of alignment residues spanning
across multiple columns and rows. These can be treated as a
sub-alignments.") + description = "An array of Sequences which makes up the Alignment") private List seqs = new ArrayList(); @Attributes( @@ -33,7 +32,7 @@ public class AlignmentPojo required = false, minItems = 0, maxItems = 2147483647, - description = "A sequence group is a bracket of alignment residues which
could span across multiple columns and/or rows. These can be
treated as a sub-alignments.") + description = "A sequence group is a region of an alignment which could
span across multiple columns and rows. These can be treated as
a sub-alignments.") private List seqGroups = new ArrayList(); @Attributes( @@ -43,9 +42,13 @@ public class AlignmentPojo description = "Sequence features are associated with sequences rather than
alignments. A sequence feature can span across multiple
sequences in an alignment. They indicate features generated
by the same analysis process or retrieved from the same database
(such as Uniprot features).") private List seqFeatures = new ArrayList(); - @Attributes(required = false, enums = { "None", "Custom", "Clustal", - "Zappo", "Taylor", "Nucleotide", "Pyrimidine", "Purine", "Turn", - "Strand", "Buried", "Hydro" }) + @Attributes( + required = false, + enums = { "None", "User Defined", "Clustal", "Zappo", "Taylor", + "Nucleotide", "Pyrimidine", "Purine", "Turn", "Helix", "Strand", + "Buried", "Hydro", "T-Coffee Scores", "RNA Interaction type", + "Blosum62", "RNA Helices", "% Identity" }, + description = "The Colour Scheme applied to the alignment") private String colourScheme; @Attributes(required = true, maxItems = 1, description = "This is an array of key=value pairs for storing custom application
specific settings") diff --git a/src/jalview/json/binding/biojson/v1/AppSettingsPojo.java b/src/jalview/json/binding/biojson/v1/AppSettingsPojo.java deleted file mode 100644 index 3385682..0000000 --- a/src/jalview/json/binding/biojson/v1/AppSettingsPojo.java +++ /dev/null @@ -1,91 +0,0 @@ -package jalview.json.binding.biojson.v1; - - -public class AppSettingsPojo -{ - // private String globalColorScheme = "none"; - - - - public AppSettingsPojo() - { - - } - - // - // - // public void setGlobalColorScheme(String globalColorScheme) - // { - // for (JalviewBioJsColorSchemeMapper cs : JalviewBioJsColorSchemeMapper - // .values()) - // { - // if (cs.getJalviewName().equals(globalColorScheme)) - // { - // // this.globalColorScheme = cs.getBioJsName(); - // this.settings.put("globalColorScheme", cs.getBioJsName()); - // break; - // } - // } - // } - // - // public enum JalviewBioJsColorSchemeMapper - // { - // USER_DEFINED("User Defined", "user defined", null), NONE("None", "foo", - // null), CLUSTAL("Clustal", "clustal", null), ZAPPO("Zappo", - // "zappo", new ZappoColourScheme()), TAYLOR("Taylor", "taylor", - // new TaylorColourScheme()), NUCLEOTIDE("Nucleotide", - // "nucleotide", new NucleotideColourScheme()), PURINE_PYRIMIDINE( - // "Purine/Pyrimidine", "purine", - // new PurinePyrimidineColourScheme()), HELIX_PROPENCITY( - // "Helix Propensity", "helix", new HelixColourScheme()), TURN_PROPENSITY( - // "Turn Propensity", "turn", new TurnColourScheme()), STRAND_PROPENSITY( - // "Strand Propensity", "strand", new StrandColourScheme()), BURIED_INDEX( - // "Buried Index", "buried", new BuriedColourScheme()), HYDROPHOBIC( - // "Hydrophobic", "hydro", new HydrophobicColourScheme()), - // - // // The color types below are not yet supported by BioJs MSA viewer - // T_COFFE_SCORES("T-Coffee Scores", "T-Coffee Scores", null), RNA_INT_TYPE( - // "RNA Interaction type", "RNA Interaction type", - // new RNAInteractionColourScheme()), BLOSUM62("Blosum62", - // "Blosum62", new Blosum62ColourScheme()), RNA_HELICES( - // "RNA Helices", "RNA Helices", null), PERCENTAGE_IDENTITY( - // "% Identity", "pid", new PIDColourScheme()); - // - // private String jalviewName; - // - // private String bioJsName; - // - // private ColourSchemeI jvColourScheme; - // - // private JalviewBioJsColorSchemeMapper(String jalviewName, - // String bioJsName, ColourSchemeI jvColourScheme) - // { - // this.jalviewName = jalviewName; - // this.bioJsName = bioJsName; - // this.setJvColourScheme(jvColourScheme); - // } - // - // public String getJalviewName() - // { - // return jalviewName; - // } - // - // public String getBioJsName() - // { - // return bioJsName; - // } - // - // public ColourSchemeI getJvColourScheme() - // { - // return jvColourScheme; - // } - // - // public void setJvColourScheme(ColourSchemeI jvColourScheme) - // { - // this.jvColourScheme = jvColourScheme; - // } - // - // } - - -} diff --git a/src/jalview/json/binding/biojson/v1/SequenceFeaturesPojo.java b/src/jalview/json/binding/biojson/v1/SequenceFeaturesPojo.java index 4c413c5..64fee65 100644 --- a/src/jalview/json/binding/biojson/v1/SequenceFeaturesPojo.java +++ b/src/jalview/json/binding/biojson/v1/SequenceFeaturesPojo.java @@ -7,9 +7,6 @@ import com.github.reinert.jjschema.Attributes; public class SequenceFeaturesPojo { - @Attributes(required = true, description = "Serial version id for the SeqFeature object") - private String svid = "1.0"; - @Attributes(required = true, description = "Start residue position for the sequence feature") private int xStart; @@ -153,17 +150,4 @@ public class SequenceFeaturesPojo this.sequenceRef = sequenceRef; } - public String getSvid() - { - return svid; - } - -//public Map getOtherDetails() { -// return otherDetails; -//} -// -//public void setOtherDetails(Map otherDetails) { -// this.otherDetails = otherDetails; -//} - } diff --git a/src/jalview/json/binding/biojson/v1/SequenceGrpPojo.java b/src/jalview/json/binding/biojson/v1/SequenceGrpPojo.java index 4bc6e3b..7c2a8fd 100644 --- a/src/jalview/json/binding/biojson/v1/SequenceGrpPojo.java +++ b/src/jalview/json/binding/biojson/v1/SequenceGrpPojo.java @@ -6,10 +6,9 @@ import com.github.reinert.jjschema.Attributes; public class SequenceGrpPojo { - @Attributes(required = true, description = "Serial version identifier for the seqGroup object model") - private String svid = "1.0"; - - @Attributes(required = false, description = "The Colour Scheme applied to the Sequence Group") + @Attributes( + required = false, + description = "The Colour Scheme applied to the Sequence Group") private String colourScheme; @Attributes(required = true, description = "The name assigned to the seqGroup") @@ -144,9 +143,5 @@ public class SequenceGrpPojo this.sequenceRefs = sequenceRefs; } - public String getSvid() - { - return svid; - } } diff --git a/src/jalview/json/binding/biojson/v1/SequencePojo.java b/src/jalview/json/binding/biojson/v1/SequencePojo.java index 5677b13..9d39d42 100644 --- a/src/jalview/json/binding/biojson/v1/SequencePojo.java +++ b/src/jalview/json/binding/biojson/v1/SequencePojo.java @@ -6,9 +6,6 @@ import com.github.reinert.jjschema.Attributes; public class SequencePojo { - @Attributes(required = true, description = "Serial version identifier for the seqs object model") - private String svid = "1.0"; - @Attributes( required = true, minLength = 3, @@ -106,10 +103,6 @@ public class SequencePojo this.order = order; } - public String getSvid() - { - return svid; - } public String getType() { -- 1.7.10.2