b7626486cca93c8ce380e69d4dcd3bd89ad50ce4
[jalview.git] / src / jalview / datamodel / FeatureProperties.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8)
3  * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle
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  */
18 package jalview.datamodel;
19
20 /**
21  * A set of feature property constants used by jalview
22  * 
23  * @author JimP
24  * 
25  */
26 public class FeatureProperties
27 {
28
29   public static final String EXONPOS = "exon number";
30
31   public static final String EXONPRODUCT = "product";
32
33   /**
34    * lookup feature type for a particular database to see if its a coding region
35    * feature
36    * 
37    * @param dbrefsource
38    * @param string
39    * @return
40    */
41   public static boolean isCodingFeature(String dbrefsource, String type)
42   {
43     return ((dbrefsource == null
44             || dbrefsource.equalsIgnoreCase(DBRefSource.EMBL) || dbrefsource
45               .equalsIgnoreCase(DBRefSource.EMBLCDS)) && type
46             .equalsIgnoreCase("CDS"));
47   }
48 }