JAL-1739 reverted BioJSON schema to use one main version for the whole schema and...
[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     maxItems = 2147483647,
27     exclusiveMaximum = true,
28     description = "Alignment annotations stores symbols and graphs usually rendered </br>below the alignment.")
29   private List<AlignmentAnnotationPojo> alignAnnotation = new ArrayList<AlignmentAnnotationPojo>();
30
31   @Attributes(
32     required = false,
33     minItems = 0,
34     maxItems = 2147483647,
35     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.")
36   private List<SequenceGrpPojo> seqGroups = new ArrayList<SequenceGrpPojo>();
37
38   @Attributes(
39     required = false,
40     minItems = 0,
41     maxItems = 2147483647,
42     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).")
43   private List<SequenceFeaturesPojo> seqFeatures = new ArrayList<SequenceFeaturesPojo>();
44
45   @Attributes(
46     required = false,
47     enums = { "None", "User Defined", "Clustal", "Zappo", "Taylor",
48         "Nucleotide", "Pyrimidine", "Purine", "Turn", "Helix", "Strand",
49         "Buried", "Hydro", "T-Coffee Scores", "RNA Interaction type",
50         "Blosum62", "RNA Helices", "% Identity" },
51     description = "The <a href=\"colour_schemes.html\">Colour Scheme</a> applied to the alignment")
52   private String colourScheme;
53   
54   @Attributes(required = true, maxItems = 1, description = "This is an array of key=value pairs for storing custom application <br>specific settings")
55   Map<String, Object> appSettings = new HashMap<String, Object>();
56
57   public AlignmentPojo()
58   {
59   }
60
61   public List<SequencePojo> getSeqs()
62   {
63     return seqs;
64   }
65
66   public void setSeqs(ArrayList<SequencePojo> seqs)
67   {
68     this.seqs = seqs;
69   }
70
71   public Map<String, Object> getAppSettings()
72   {
73     return appSettings;
74   }
75
76   public void setAppSettings(Map<String, Object> appSettings)
77   {
78     this.appSettings = appSettings;
79   }
80
81   public List<AlignmentAnnotationPojo> getAlignAnnotation()
82   {
83     return alignAnnotation;
84   }
85
86   public void setAlignAnnotation(
87           List<AlignmentAnnotationPojo> alignAnnotation)
88   {
89     this.alignAnnotation = alignAnnotation;
90   }
91
92   public List<SequenceGrpPojo> getSeqGroups()
93   {
94     return seqGroups;
95   }
96
97   public void setSeqGroups(List<SequenceGrpPojo> seqGroups)
98   {
99     this.seqGroups = seqGroups;
100   }
101
102   public List<SequenceFeaturesPojo> getSeqFeatures()
103   {
104     return seqFeatures;
105   }
106
107   public void setSeqFeatures(List<SequenceFeaturesPojo> seqFeatures)
108   {
109     this.seqFeatures = seqFeatures;
110   }
111
112   public String getSvid()
113   {
114     return svid;
115   }
116
117   public void setGlobalColorScheme(String globalColorScheme)
118   {
119     this.appSettings.put("globalColorScheme", globalColorScheme);
120   }
121
122   public String getColourScheme()
123   {
124     return colourScheme;
125   }
126
127   public void setColourScheme(String colourScheme)
128   {
129     this.colourScheme = colourScheme;
130   }
131
132 }