From 5c9623b7296d1b1be7ca242c531489262630c477 Mon Sep 17 00:00:00 2001 From: tcofoegbu Date: Wed, 20 May 2015 10:39:39 +0100 Subject: [PATCH] JAL-1739 added svid - serial version id to hold version info for all the json objects --- .../json/binding/v1/AlignmentAnnotationPojo.java | 8 ++++++++ src/jalview/json/binding/v1/AlignmentPojo.java | 7 ++++++- src/jalview/json/binding/v1/AnnotationPojo.java | 1 + .../json/binding/v1/JalviewSettingsPojo.java | 8 ++++++++ .../json/binding/v1/SequenceFeaturesPojo.java | 7 +++++++ src/jalview/json/binding/v1/SequenceGrpPojo.java | 8 ++++++++ src/jalview/json/binding/v1/SequencePojo.java | 20 ++++++++------------ 7 files changed, 46 insertions(+), 13 deletions(-) diff --git a/src/jalview/json/binding/v1/AlignmentAnnotationPojo.java b/src/jalview/json/binding/v1/AlignmentAnnotationPojo.java index 17fe2a7..32c433b 100644 --- a/src/jalview/json/binding/v1/AlignmentAnnotationPojo.java +++ b/src/jalview/json/binding/v1/AlignmentAnnotationPojo.java @@ -5,6 +5,8 @@ import java.util.List; public class AlignmentAnnotationPojo { + private String svid = "1.0"; + private String label; private String description; @@ -40,4 +42,10 @@ public class AlignmentAnnotationPojo { this.annotations = annotations; } + + public String getSvid() + { + return svid; + } + } diff --git a/src/jalview/json/binding/v1/AlignmentPojo.java b/src/jalview/json/binding/v1/AlignmentPojo.java index ccf55a4..b3189c0 100644 --- a/src/jalview/json/binding/v1/AlignmentPojo.java +++ b/src/jalview/json/binding/v1/AlignmentPojo.java @@ -5,6 +5,8 @@ import java.util.List; public class AlignmentPojo { + private String svid = "1.0"; + private List seqs = new ArrayList(); private List alignAnnotation = new ArrayList(); @@ -70,5 +72,8 @@ public class AlignmentPojo this.seqFeatures = seqFeatures; } - + public String getSvid() + { + return svid; + } } diff --git a/src/jalview/json/binding/v1/AnnotationPojo.java b/src/jalview/json/binding/v1/AnnotationPojo.java index 2e5aac4..41eae82 100644 --- a/src/jalview/json/binding/v1/AnnotationPojo.java +++ b/src/jalview/json/binding/v1/AnnotationPojo.java @@ -51,4 +51,5 @@ public class AnnotationPojo { this.value = value; } + } diff --git a/src/jalview/json/binding/v1/JalviewSettingsPojo.java b/src/jalview/json/binding/v1/JalviewSettingsPojo.java index 3cc8824..595234c 100644 --- a/src/jalview/json/binding/v1/JalviewSettingsPojo.java +++ b/src/jalview/json/binding/v1/JalviewSettingsPojo.java @@ -16,6 +16,8 @@ import jalview.schemes.ZappoColourScheme; public class JalviewSettingsPojo { + private String svid = "1.0"; + private String globalColorScheme = "none"; private String jalviewVersion; @@ -147,4 +149,10 @@ public class JalviewSettingsPojo } } + + public String getSvid() + { + return svid; + } + } diff --git a/src/jalview/json/binding/v1/SequenceFeaturesPojo.java b/src/jalview/json/binding/v1/SequenceFeaturesPojo.java index c69d811..f55be46 100644 --- a/src/jalview/json/binding/v1/SequenceFeaturesPojo.java +++ b/src/jalview/json/binding/v1/SequenceFeaturesPojo.java @@ -5,6 +5,7 @@ import java.util.Vector; public class SequenceFeaturesPojo { + private String svid = "1.0"; private int xstart; @@ -134,4 +135,10 @@ public class SequenceFeaturesPojo { this.sequenceRef = sequenceRef; } + + public String getSvid() + { + return svid; + } + } diff --git a/src/jalview/json/binding/v1/SequenceGrpPojo.java b/src/jalview/json/binding/v1/SequenceGrpPojo.java index bb0e724..f19f8ba 100644 --- a/src/jalview/json/binding/v1/SequenceGrpPojo.java +++ b/src/jalview/json/binding/v1/SequenceGrpPojo.java @@ -4,6 +4,8 @@ import java.util.ArrayList; public class SequenceGrpPojo { + private String svid = "1.0"; + private String colourScheme; private String groupName; @@ -123,4 +125,10 @@ public class SequenceGrpPojo { this.seqsHash = seqsHash; } + + public String getSvid() + { + return svid; + } + } diff --git a/src/jalview/json/binding/v1/SequencePojo.java b/src/jalview/json/binding/v1/SequencePojo.java index 232cefb..d96da2a 100644 --- a/src/jalview/json/binding/v1/SequencePojo.java +++ b/src/jalview/json/binding/v1/SequencePojo.java @@ -4,6 +4,8 @@ package jalview.json.binding.v1; public class SequencePojo { + private String svid = "1.0"; + private String seq; private String name; @@ -16,8 +18,6 @@ public class SequencePojo private int end; - // private ArrayList features = new - // ArrayList(); public SequencePojo() { @@ -80,16 +80,6 @@ public class SequencePojo this.end = end; } - // public ArrayList getFeatures() - // { - // return features; - // } - // - // public void setFeatures(ArrayList features) - // { - // this.features = features; - // } - public int getOrder() { return order; @@ -99,4 +89,10 @@ public class SequencePojo { this.order = order; } + + public String getSvid() + { + return svid; + } + } -- 1.7.10.2