Changeset 552 for trunk/grails-app/domain
- Timestamp:
- Jun 10, 2010, 1:36:02 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/domain/dbnp/data/Ontology.groovy
r496 r552 40 40 }*/ 41 41 } 42 43 static Ontology getBioPortalOntology(String ncboId) { 44 // Get ontology from BioPortal via Ontocat 45 // TODO: maybe make a static OntologyService instance to be more efficient, and decorate it with caching? 46 uk.ac.ebi.ontocat.OntologyService os = new uk.ac.ebi.ontocat.bioportal.BioportalOntologyService() 47 uk.ac.ebi.ontocat.Ontology o = os.getOntology(ncboId) 48 49 // Instantiate and return Ontology object 50 new dbnp.data.Ontology( 51 name: o.label, 52 description: o.description, 53 url: o.properties['homepage'] ?: "http://bioportal.bioontology.org/ontologies/${o.id}", 54 versionNumber: o.versionNumber, 55 ncboId: o.ontologyAccession, 56 ncboVersionedId: o.id 57 ); 58 } 42 59 }
Note: See TracChangeset
for help on using the changeset viewer.