JAL-1831 updated BioJSON schema
[jalview.git] / src / jalview / json / binding / biojson / v1 / AlignmentPojo.java
1 package jalview.json.binding.biojson.v1;
2
3
4 import java.util.ArrayList;
5 import java.util.HashMap;
6 import java.util.List;
7 import java.util.Map;
8
9 import com.github.reinert.jjschema.Attributes;
10
11 @Attributes(title="BioJSON", description="A specification for the representation and exchange of bioinformatics data")
12 public class AlignmentPojo
13 {
14   @Attributes(required = true, description = "Serial version identifier for <b>BioJSON</b> schema")
15   private String svid = "1.0";
16
17   @Attributes(
18     required = true,
19     minItems = 1,
20             description = "An array of Sequences which makes up the Alignment")
21   private List<SequencePojo> seqs = new ArrayList<SequencePojo>();
22
23   @Attributes(
24     required = false,
25     minItems = 0,
26     exclusiveMaximum = true,
27     description = "Alignment annotations stores symbols and graphs usually rendered </br>"
28             + "below the alignment and often reflect properties of the alignment </br>as a whole.")
29   private List<AlignmentAnnotationPojo> alignAnnotation = new ArrayList<AlignmentAnnotationPojo>();
30
31   @Attributes(
32     required = false,
33     minItems = 0,
34     description = "A sequence group is a rectangular region of an alignment <br>bounded by startRes and endRes positions in the alignment <br>coordinate system for a set of sequences")
35   private List<SequenceGrpPojo> seqGroups = new ArrayList<SequenceGrpPojo>();
36
37   @Attributes(
38     required = false,
39     minItems = 0,
40     description = "Sequence features are properties of the individual sequences, <br>they do not change with the alignment, but are shown mapped<br> on to specific residues within the alignment")
41   private List<SequenceFeaturesPojo> seqFeatures = new ArrayList<SequenceFeaturesPojo>();
42
43   @Attributes(
44     required = false,
45     enums = { "None", "User Defined", "Clustal", "Zappo", "Taylor",
46         "Nucleotide", "Pyrimidine", "Purine", "Turn", "Helix", "Strand",
47         "Buried", "Hydro", "T-Coffee Scores", "RNA Interaction type",
48         "Blosum62", "RNA Helices", "% Identity" },
49     description = "The <a href=\"#colourScheme\">Colour Scheme</a> applied to the alignment")
50   private String colourScheme;
51   
52   @Attributes(
53         required = true, 
54         maxItems = 0, description = "AppSettings stores key=value pairs of custom application specific <br>"
55                                           + "settings (i.e visualisation settings, etc) for different applications<br>"
56                                           + "that consume or generate BioJSON")
57   Map<String, Object> appSettings = new HashMap<String, Object>();
58
59   public AlignmentPojo()
60   {
61   }
62
63   public List<SequencePojo> getSeqs()
64   {
65     return seqs;
66   }
67
68   public void setSeqs(ArrayList<SequencePojo> seqs)
69   {
70     this.seqs = seqs;
71   }
72
73   public Map<String, Object> getAppSettings()
74   {
75     return appSettings;
76   }
77
78   public void setAppSettings(Map<String, Object> appSettings)
79   {
80     this.appSettings = appSettings;
81   }
82
83   public List<AlignmentAnnotationPojo> getAlignAnnotation()
84   {
85     return alignAnnotation;
86   }
87
88   public void setAlignAnnotation(
89           List<AlignmentAnnotationPojo> alignAnnotation)
90   {
91     this.alignAnnotation = alignAnnotation;
92   }
93
94   public List<SequenceGrpPojo> getSeqGroups()
95   {
96     return seqGroups;
97   }
98
99   public void setSeqGroups(List<SequenceGrpPojo> seqGroups)
100   {
101     this.seqGroups = seqGroups;
102   }
103
104   public List<SequenceFeaturesPojo> getSeqFeatures()
105   {
106     return seqFeatures;
107   }
108
109   public void setSeqFeatures(List<SequenceFeaturesPojo> seqFeatures)
110   {
111     this.seqFeatures = seqFeatures;
112   }
113
114   public String getSvid()
115   {
116     return svid;
117   }
118
119   public void setGlobalColorScheme(String globalColorScheme)
120   {
121     this.appSettings.put("globalColorScheme", globalColorScheme);
122   }
123
124   public String getColourScheme()
125   {
126     return colourScheme;
127   }
128
129   public void setColourScheme(String colourScheme)
130   {
131     this.colourScheme = colourScheme;
132   }
133
134 }