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