|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.ebi.microarray.zooma.retrieval.OntologyRetriever
public class OntologyRetriever
Retrieves OntologyTerm
s from an ontology file in
OWL or OBO formats. This retriever uses the OWLAPI to load and handle the
ontology, and operates over the reasoned version of the ontology using the
pellet reasoner (and utilities from fluxion-utils). Therefore, you should
only use this if you have direct axis to the ontology fiel, and you know this
file will both classify and not overwhelm the capacity of the OWLAPI
Method Summary | |
---|---|
java.util.Collection<OntologyMappingContext> |
fetchMappingContexts(Value value,
uk.ac.ebi.ontocat.OntologyTerm term)
Fetch the contexts in which the given description is mapped to the given term, if any. |
java.util.Collection<uk.ac.ebi.ontocat.OntologyTerm> |
fetchTerms(Value value)
Fetches terms that can be matched against EFO. |
java.util.Collection<uk.ac.ebi.ontocat.OntologyTerm> |
fetchTermsByAccession(java.lang.String accession)
Takes the given term "accession" and attempts to resolve it against the URIs for classes in the ontology. |
java.util.List<java.lang.String> |
getClassNames(org.semanticweb.owl.model.OWLClass owlClass)
Retrieve all possible names for the supplied class. |
java.util.Set<java.lang.String> |
getClassRDFSLabels(org.semanticweb.owl.model.OWLClass owlClass)
Recovers all string values of the rdfs:label annotation attribute on the supplied class. |
java.util.Set<java.lang.String> |
getClassSynonyms(org.semanticweb.owl.model.OWLClass owlClass)
Recovers all synonyms for the supplied owl class, based on the literal value of the efo synonym annotation. |
static OntologyRetriever |
getInstance(java.lang.String ontologyName)
Gets the singleton instance of a retriever for the named ontology. |
void |
init()
Initializes this retriever, loading and preclassifying the ontology. |
protected boolean |
isObsolete(org.semanticweb.owl.model.OWLClass owlClass)
Returns true if this ontology term is obsolete in EFO, false otherwise. |
protected boolean |
isUnit(org.semanticweb.owl.model.OWLClass owlClass)
|
protected java.util.Set<org.semanticweb.owl.model.OWLClass> |
matchSearchString(java.lang.String searchString)
Searches the classes known to this retriever for any that may match the given search string. |
protected java.lang.String |
normalizeSearchString(java.lang.String string)
"Normalizes" a string into a searchable string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static OntologyRetriever getInstance(java.lang.String ontologyName)
ontologyName
- the name of the ontology to retrieve, as specified in
the config files
public void init()
public java.util.Collection<uk.ac.ebi.ontocat.OntologyTerm> fetchTerms(Value value) throws java.io.IOException
fetchTerms
in interface OntologyTermRetriever
value
- the text description to search for
java.io.IOException
- if the ontology could not be readpublic java.util.Collection<OntologyMappingContext> fetchMappingContexts(Value value, uk.ac.ebi.ontocat.OntologyTerm term) throws java.io.IOException
OntologyTermRetriever
fetchMappingContexts
in interface OntologyTermRetriever
value
- the original description used to retrieve the supplied termterm
- the term that is mapped to this description - usually,
retrieved by OntologyTermRetriever.fetchTerms(uk.ac.ebi.microarray.zooma.lang.Value)
first
java.io.IOException
- if context could not be fetched from the underlying
sourcepublic java.util.Collection<uk.ac.ebi.ontocat.OntologyTerm> fetchTermsByAccession(java.lang.String accession)
fetchTerms(uk.ac.ebi.microarray.zooma.lang.Value)
to
attempt to resolve the "accession" against the term name or synonym.
accession
- the "accession" assigned to a term e.g. from bioportal
public java.util.List<java.lang.String> getClassNames(org.semanticweb.owl.model.OWLClass owlClass)
owlClass
- the owl class to derive names for
public java.util.Set<java.lang.String> getClassRDFSLabels(org.semanticweb.owl.model.OWLClass owlClass)
owlClass
- the class to recover labels for
public java.util.Set<java.lang.String> getClassSynonyms(org.semanticweb.owl.model.OWLClass owlClass)
owlClass
- the class to retrieve the synonyms of
protected java.util.Set<org.semanticweb.owl.model.OWLClass> matchSearchString(java.lang.String searchString)
searchString
- the search string - this will usually be the class
name/synonym
protected java.lang.String normalizeSearchString(java.lang.String string)
string
- the string to normalize
protected boolean isObsolete(org.semanticweb.owl.model.OWLClass owlClass)
owlClass
- the owlClass to check for obsolesence
protected boolean isUnit(org.semanticweb.owl.model.OWLClass owlClass)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |