JAL-1705 JAL-1191 SequenceOntologyLite added as hard-coded alternative
[jalview.git] / src / jalview / io / gff / SequenceOntologyI.java
diff --git a/src/jalview/io/gff/SequenceOntologyI.java b/src/jalview/io/gff/SequenceOntologyI.java
new file mode 100644 (file)
index 0000000..8128177
--- /dev/null
@@ -0,0 +1,54 @@
+package jalview.io.gff;
+
+import java.util.List;
+
+public interface SequenceOntologyI
+{
+  /*
+   * selected commonly used values for quick reference
+   */
+  public static final String POLYPEPTIDE = "polypeptide";
+
+  public static final String PROTEIN_MATCH = "protein_match";
+
+  public static final String NUCLEOTIDE_MATCH = "nucleotide_match";
+
+  // SO:0000316
+  public static final String CDS = "CDS";
+
+  // SO:0001060
+  public static final String SEQUENCE_VARIANT = "sequence_variant";
+
+  // SO:0000147
+  public static final String EXON = "exon";
+
+  // SO:0000673
+  public static final String TRANSCRIPT = "transcript";
+
+  // SO:0000704
+  public static final String GENE = "gene";
+
+  public boolean isA(String childTerm, String parentTerm);
+
+  /**
+   * Returns a sorted list of all valid terms queried for (i.e. terms processed
+   * which were valid in the SO), using the friendly description.
+   * 
+   * This can be used to check that any hard-coded stand-in for the full SO
+   * includes all the terms needed for correct processing.
+   * 
+   * @return
+   */
+  public List<String> termsFound();
+
+  /**
+   * Returns a sorted list of all invalid terms queried for (i.e. terms
+   * processed which were not found in the SO), using the friendly description.
+   * 
+   * This can be used to report any 'non-compliance' in data, and/or to report
+   * valid terms missing from any hard-coded stand-in for the full SO.
+   * 
+   * @return
+   */
+  public List<String> termsNotFound();
+}