Changeset 558 for trunk/grails-app/domain/dbnp/data/Ontology.groovy
- Timestamp:
- Jun 11, 2010, 4:00:10 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/domain/dbnp/data/Ontology.groovy
r552 r558 57 57 ); 58 58 } 59 60 static Ontology getBioPortalOntologyByTerm(String termId) { 61 // Get ontology from BioPortal via Ontocat 62 // TODO: maybe make a static OntologyService instance to be more efficient, and decorate it with caching? 63 uk.ac.ebi.ontocat.OntologyService os = new uk.ac.ebi.ontocat.bioportal.BioportalOntologyService() 64 uk.ac.ebi.ontocat.OntologyTerm term = os.getTerm( termId ); 65 println( term ); 66 uk.ac.ebi.ontocat.Ontology o = os.getOntology( term.getOntologyAccession() ); 67 println( o ); 68 69 // Instantiate and return Ontology object 70 new dbnp.data.Ontology( 71 name: o.label, 72 description: o.description, 73 url: o.properties['homepage'] ?: "http://bioportal.bioontology.org/ontologies/${o.id}", 74 versionNumber: o.versionNumber, 75 ncboId: o.ontologyAccession, 76 ncboVersionedId: o.id 77 ); 78 } 59 79 }
Note: See TracChangeset
for help on using the changeset viewer.