+ return ACCESSION_REGEX;
+ }
+
+ @Override
+ protected EnsemblFeatureType[] getFeaturesToFetch()
+ {
+ return FEATURES_TO_FETCH;
+ }
+
+ /**
+ * Answers true unless the feature type is 'transcript' (or a sub-type in the
+ * Sequence Ontology).
+ */
+ @Override
+ protected boolean retainFeature(SequenceFeature sf, String accessionId)
+ {
+ if (isTranscript(sf.getType()))
+ {
+ return false;
+ }
+ return featureMayBelong(sf, accessionId);
+ }
+
+ /**
+ * Answers a list of sequence features (if any) whose type is 'exon' (or a
+ * subtype of exon in the Sequence Ontology), and whose Parent is the
+ * transcript we are retrieving
+ */
+ @Override
+ protected List<SequenceFeature> getIdentifyingFeatures(SequenceI seq,
+ String accId)
+ {
+ List<SequenceFeature> result = new ArrayList<>();
+ List<SequenceFeature> sfs = seq.getFeatures()
+ .getFeaturesByOntology(SequenceOntologyI.EXON);
+ for (SequenceFeature sf : sfs)
+ {
+ String parentFeature = (String) sf.getValue(PARENT);
+ if (accId.equals(parentFeature))
+ {
+ result.add(sf);
+ }
+ }
+
+ return result;