JAL-1831 added changes to allow auto-generation of BioJSON schema from src code
[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(required = true, minItems = 1, maxItems = 1999999999, description = "A sequence group is a bracket of alignment residues spanning <br>across multiple columns and rows. These can be treated as a <br>sub-alignments.")
18   private List<SequencePojo> seqs = new ArrayList<SequencePojo>();
19
20   @Attributes(required = false, minItems = 0, maxItems = 1999999999, exclusiveMaximum=true, description = "Alignment annotations stores symbols and graphs usually rendered </br>below the alignment.")
21   private List<AlignmentAnnotationPojo> alignAnnotation = new ArrayList<AlignmentAnnotationPojo>();
22
23   @Attributes(required = false, minItems = 0, maxItems = 1999999999, description = "A sequence group is a bracket of alignment residues spanning <br>across multiple columns and rows. These can be treated as a <br>sub-alignments.")
24   private List<SequenceGrpPojo> seqGroups = new ArrayList<SequenceGrpPojo>();
25
26   @Attributes(required = false, minItems = 0, maxItems = 1999999999, 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).")
27   private List<SequenceFeaturesPojo> seqFeatures = new ArrayList<SequenceFeaturesPojo>();
28
29   @Attributes(required = false, enums = { "None", "Custom", "Clustal",
30       "Zappo", "Taylor", "Nucleotide", "Pyrimidine", "Purine", "Turn",
31       "Strand", "Buried", "Hydro" })
32   private String colourScheme;
33   
34   @Attributes(required = true, maxItems = 1, description = "This is an array of key=value pairs for storing custom application <br>specific settings")
35   Map<String, Object> appSettings = new HashMap<String, Object>();
36
37   public AlignmentPojo()
38   {
39   }
40
41   public List<SequencePojo> getSeqs()
42   {
43     return seqs;
44   }
45
46   public void setSeqs(ArrayList<SequencePojo> seqs)
47   {
48     this.seqs = seqs;
49   }
50
51   public Map<String, Object> getAppSettings()
52   {
53     return appSettings;
54   }
55
56   public void setAppSettings(Map<String, Object> appSettings)
57   {
58     this.appSettings = appSettings;
59   }
60
61   public List<AlignmentAnnotationPojo> getAlignAnnotation()
62   {
63     return alignAnnotation;
64   }
65
66   public void setAlignAnnotation(
67           List<AlignmentAnnotationPojo> alignAnnotation)
68   {
69     this.alignAnnotation = alignAnnotation;
70   }
71
72   public List<SequenceGrpPojo> getSeqGroups()
73   {
74     return seqGroups;
75   }
76
77   public void setSeqGroups(List<SequenceGrpPojo> seqGroups)
78   {
79     this.seqGroups = seqGroups;
80   }
81
82   public List<SequenceFeaturesPojo> getSeqFeatures()
83   {
84     return seqFeatures;
85   }
86
87   public void setSeqFeatures(List<SequenceFeaturesPojo> seqFeatures)
88   {
89     this.seqFeatures = seqFeatures;
90   }
91
92   public String getSvid()
93   {
94     return svid;
95   }
96
97   public void setGlobalColorScheme(String globalColorScheme)
98   {
99 //        this.appSettings.put("globalColorScheme", globalColorScheme);
100   }
101
102   public String getColourScheme()
103   {
104     return colourScheme;
105   }
106
107   public void setColourScheme(String colourScheme)
108   {
109     this.colourScheme = colourScheme;
110   }
111
112 }