JAL-2189 apply license
[jalview.git] / src / jalview / io / gff / SequenceOntologyI.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.io.gff;
22
23 import java.util.List;
24
25 public interface SequenceOntologyI
26 {
27   /*
28    * selected commonly used values for quick reference
29    */
30   // SO:0000104
31   public static final String POLYPEPTIDE = "polypeptide";
32
33   // SO:0000349
34   public static final String PROTEIN_MATCH = "protein_match";
35
36   // SO:0000347
37   public static final String NUCLEOTIDE_MATCH = "nucleotide_match";
38
39   // SO:0000316
40   public static final String CDS = "CDS";
41
42   // SO:0001060
43   public static final String SEQUENCE_VARIANT = "sequence_variant";
44
45   // SO:0000147
46   public static final String EXON = "exon";
47
48   // SO:0000673
49   public static final String TRANSCRIPT = "transcript";
50
51   // SO:0001621 isA sequence_variant but used in Ensembl as a transcript
52   public static final String NMD_TRANSCRIPT_VARIANT = "NMD_transcript_variant";
53
54   // SO:0000704
55   public static final String GENE = "gene";
56
57   public boolean isA(String childTerm, String parentTerm);
58
59   /**
60    * Returns a sorted list of all valid terms queried for (i.e. terms processed
61    * which were valid in the SO), using the friendly description.
62    * 
63    * This can be used to check that any hard-coded stand-in for the full SO
64    * includes all the terms needed for correct processing.
65    * 
66    * @return
67    */
68   public List<String> termsFound();
69
70   /**
71    * Returns a sorted list of all invalid terms queried for (i.e. terms
72    * processed which were not found in the SO), using the friendly description.
73    * 
74    * This can be used to report any 'non-compliance' in data, and/or to report
75    * valid terms missing from any hard-coded stand-in for the full SO.
76    * 
77    * @return
78    */
79   public List<String> termsNotFound();
80 }