merge from develop
[jalview.git] / src / jalview / json / binding / biojson / v1 / AlignmentPojo.java
diff --git a/src/jalview/json/binding/biojson/v1/AlignmentPojo.java b/src/jalview/json/binding/biojson/v1/AlignmentPojo.java
new file mode 100644 (file)
index 0000000..f68ea86
--- /dev/null
@@ -0,0 +1,132 @@
+package jalview.json.binding.biojson.v1;
+
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.github.reinert.jjschema.Attributes;
+
+@Attributes(title="BioJSON", description="A specification for the representation and exchange of bioinformatics data")
+public class AlignmentPojo
+{
+  @Attributes(required = true, description = "Serial version identifier for <b>BioJSON</b> schema")
+  private String svid = "1.0";
+
+  @Attributes(
+    required = true,
+    minItems = 1,
+           description = "An array of Sequences which makes up the Alignment")
+  private List<SequencePojo> seqs = new ArrayList<SequencePojo>();
+
+  @Attributes(
+    required = false,
+    minItems = 0,
+    maxItems = 2147483647,
+    exclusiveMaximum = true,
+    description = "Alignment annotations stores symbols and graphs usually rendered </br>below the alignment.")
+  private List<AlignmentAnnotationPojo> alignAnnotation = new ArrayList<AlignmentAnnotationPojo>();
+
+  @Attributes(
+    required = false,
+    minItems = 0,
+    maxItems = 2147483647,
+    description = "A sequence group is a region of an alignment which could <br>span across multiple columns and rows. These can be treated as<br> a sub-alignments.")
+  private List<SequenceGrpPojo> seqGroups = new ArrayList<SequenceGrpPojo>();
+
+  @Attributes(
+    required = false,
+    minItems = 0,
+    maxItems = 2147483647,
+    description = "Sequence features are associated with sequences rather than <br>alignments. A sequence feature can span across multiple <br>sequences in an alignment. They indicate features generated <br>by the same analysis process or retrieved from the same database <br>(such as Uniprot features).")
+  private List<SequenceFeaturesPojo> seqFeatures = new ArrayList<SequenceFeaturesPojo>();
+
+  @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 <a href=\"colour_schemes.html\">Colour Scheme</a> 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 <br>specific settings")
+  Map<String, Object> appSettings = new HashMap<String, Object>();
+
+  public AlignmentPojo()
+  {
+  }
+
+  public List<SequencePojo> getSeqs()
+  {
+    return seqs;
+  }
+
+  public void setSeqs(ArrayList<SequencePojo> seqs)
+  {
+    this.seqs = seqs;
+  }
+
+  public Map<String, Object> getAppSettings()
+  {
+    return appSettings;
+  }
+
+  public void setAppSettings(Map<String, Object> appSettings)
+  {
+    this.appSettings = appSettings;
+  }
+
+  public List<AlignmentAnnotationPojo> getAlignAnnotation()
+  {
+    return alignAnnotation;
+  }
+
+  public void setAlignAnnotation(
+          List<AlignmentAnnotationPojo> alignAnnotation)
+  {
+    this.alignAnnotation = alignAnnotation;
+  }
+
+  public List<SequenceGrpPojo> getSeqGroups()
+  {
+    return seqGroups;
+  }
+
+  public void setSeqGroups(List<SequenceGrpPojo> seqGroups)
+  {
+    this.seqGroups = seqGroups;
+  }
+
+  public List<SequenceFeaturesPojo> getSeqFeatures()
+  {
+    return seqFeatures;
+  }
+
+  public void setSeqFeatures(List<SequenceFeaturesPojo> seqFeatures)
+  {
+    this.seqFeatures = seqFeatures;
+  }
+
+  public String getSvid()
+  {
+    return svid;
+  }
+
+  public void setGlobalColorScheme(String globalColorScheme)
+  {
+    this.appSettings.put("globalColorScheme", globalColorScheme);
+  }
+
+  public String getColourScheme()
+  {
+    return colourScheme;
+  }
+
+  public void setColourScheme(String colourScheme)
+  {
+    this.colourScheme = colourScheme;
+  }
+
+}