JAL-1432 updated copyright notices
[jalview.git] / src / jalview / datamodel / xdb / embl / Qualifier.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
3  * Copyright (C) 2014 The Jalview Authors
4  * 
5  * This file is part of Jalview.
6  * 
7  * Jalview is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License 
9  * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
10  *  
11  * Jalview is distributed in the hope that it will be useful, but 
12  * WITHOUT ANY WARRANTY; without even the implied warranty 
13  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14  * PURPOSE.  See the GNU General Public License for more details.
15  * 
16  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
17  * The Jalview Authors are detailed in the 'AUTHORS' file.
18  */
19 package jalview.datamodel.xdb.embl;
20
21 public class Qualifier
22 {
23   String name;
24
25   String[] values;
26
27   String[] evidence;
28
29   /**
30    * @return the name
31    */
32   public String getName()
33   {
34     return name;
35   }
36
37   /**
38    * @param name
39    *          the name to set
40    */
41   public void setName(String name)
42   {
43     this.name = name;
44   }
45
46   /**
47    * @return the values
48    */
49   public String[] getValues()
50   {
51     return values;
52   }
53
54   /**
55    * @param values
56    *          the values to set
57    */
58   public void setValues(String[] values)
59   {
60     this.values = values;
61   }
62
63   public void addEvidence(String qevidence)
64   {
65     if (evidence == null)
66     {
67       evidence = new String[1];
68     }
69     else
70     {
71       String[] temp = new String[evidence.length + 1];
72       System.arraycopy(evidence, 0, temp, 0, evidence.length);
73       evidence = temp;
74     }
75     evidence[evidence.length - 1] = qevidence;
76   }
77
78   public void addValues(String value)
79   {
80     if (values == null)
81     {
82       values = new String[1];
83     }
84     else
85     {
86       String[] temp = new String[values.length + 1];
87       System.arraycopy(values, 0, temp, 0, values.length);
88       values = temp;
89     }
90     values[values.length - 1] = value;
91   }
92
93   /**
94    * @return the evidence
95    */
96   public String[] getEvidence()
97   {
98     return evidence;
99   }
100
101   /**
102    * @param evidence
103    *          the evidence to set
104    */
105   public void setEvidence(String[] evidence)
106   {
107     this.evidence = evidence;
108   }
109 }