6102775491436ea888a4ea39bb43d81f29c29d71
[jalview.git] / src / jalview / datamodel / xdb / uniprot / UniprotFeature.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3  * Copyright (C) $$Year-Rel$$ 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
10  * of the License, or (at your option) any later version.
11  *  
12  * Jalview is distributed in the hope that it will be useful, but 
13  * WITHOUT ANY WARRANTY; without even the implied warranty 
14  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
15  * PURPOSE.  See the GNU General Public License for more details.
16  * 
17  * You should have received a copy of the GNU General Public License
18  * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
19  * The Jalview Authors are detailed in the 'AUTHORS' file.
20  */
21 package jalview.datamodel.xdb.uniprot;
22
23 /**
24  * A data model class for binding from Uniprot XML via uniprot_mapping.xml
25  */
26 public class UniprotFeature
27 {
28   private String type;
29
30   private String description = null;
31
32   private String original = null;
33
34   private String variation = null;
35
36   private String status;
37
38   private int begin;
39
40   private int end;
41
42   public String getType()
43   {
44     return type;
45   }
46
47   public void setType(String t)
48   {
49     this.type = t;
50   }
51
52   public String getDescription()
53   {
54     return (description == null && variation == null && original == null)
55             ? null
56             : (description == null ? "" : description)
57                     + ((variation != null)
58                             ? "Variation: '" + variation + "' "
59                     : "")
60             + ((original != null) ? "Original: '" + original + "'" : "");
61   }
62
63   public void setDescription(String d)
64   {
65     this.description = d;
66   }
67
68   public String getStatus()
69   {
70     return status;
71   }
72
73   public void setStatus(String s)
74   {
75     this.status = s;
76   }
77
78   public int getBegin()
79   {
80     return begin;
81   }
82
83   public void setBegin(int b)
84   {
85     this.begin = b;
86   }
87
88   public int getEnd()
89   {
90     return end;
91   }
92
93   public void setEnd(int e)
94   {
95     this.end = e;
96   }
97
98   public int getPosition()
99   {
100     return begin;
101   }
102
103   public void setPosition(int p)
104   {
105     this.begin = p;
106     this.end = p;
107   }
108
109   public String getOriginal()
110   {
111     return original;
112   }
113
114   public void setOriginal(String original)
115   {
116     this.original = original;
117   }
118
119   public String getVariation()
120   {
121     return variation;
122   }
123
124   public void setVariation(String variant)
125   {
126     this.variation = variant;
127   }
128 }