JAL-2525 get sequence features for Ontology term(s), tidy feature sort
[jalview.git] / src / jalview / datamodel / features / SequenceFeaturesI.java
index cfcdc76..ed966e7 100644 (file)
@@ -42,6 +42,16 @@ public interface SequenceFeaturesI
   List<SequenceFeature> getAllFeatures(String... type);
 
   /**
+   * Answers a list of all features stored, whose type either matches one of the
+   * given ontology terms, or is a specialisation of a term in the Sequence
+   * Ontology. Results are returned in no particular guaranteed order.
+   * 
+   * @param ontologyTerm
+   * @return
+   */
+  List<SequenceFeature> getFeaturesByOntology(String... ontologyTerm);
+
+  /**
    * Answers the number of (positional or non-positional) features, optionally
    * restricted to specified feature types. Contact features are counted as 1.
    * 
@@ -134,11 +144,13 @@ public interface SequenceFeaturesI
           boolean positionalFeatures, String... groups);
 
   /**
-   * Answers a set of the distinct feature types for which a feature is stored
+   * Answers a set of the distinct feature types for which a feature is stored.
+   * The types may optionally be restricted to those which match, or are a
+   * subtype of, given sequence ontology terms
    * 
    * @return
    */
-  Set<String> getFeatureTypes();
+  Set<String> getFeatureTypes(String... soTerm);
 
   /**
    * Answers the minimum score held for positional or non-positional features