Closed jvendetti closed 8 months ago
@alexskr - any opinion on where our copy of skos.rdf
should live?
do you know if there a way to specify local file system path instead of a web address? If thats possible then embedding it with owlapi_wrapper would be my first choice. Or maybe we can host skos core in BioPortal?
Alternatively we can create a purl for it and host file on ontoportal or www.bioontology.org site.
The example code provided by the OWL API shows that you can use a local file system path. I tested it and it seems to work - at least in a simple unit test scenario:
@Test
public void testSimpleIRIMapper() throws Exception {
IRI skosCoreIRI = IRI.create("http://www.w3.org/2004/02/skos/core");
IRI skosCoreDocumentIRI = IRI.create("file:/Users/vendetti/Downloads/skos.rdf");
SimpleIRIMapper mapper = new SimpleIRIMapper(skosCoreIRI, skosCoreDocumentIRI);
OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
manager.getIRIMappers().add(mapper);
File broFile = new File("src/test/resources/BRO_v3.2.owl");
FileDocumentSource fileDocumentSource = new FileDocumentSource(broFile);
OWLOntology ontology = manager.loadOntologyFromOntologyDocument(fileDocumentSource);
assertNotNull(ontology);
}
So I take it that means you'd prefer to have it embedded?
embedding file should reduce overall complexity and improve resiliency against external resource connectivity issues.
As of recently, the W3C started rate limiting requests to http://www.w3.org/2004/02/skos/core:
As a side effect of this, attempting to load ontologies in BioPortal that import SKOS Core, e.g.:
.... result in missing import errors in the logs:
... and intermittently failing metrics-related unit tests in the ontologies_linked_data project. See this issue: https://github.com/ontoportal/ontologies_linked_data/issues/6.
Since this is an oft-imported vocabulary, I propose an initial solution of using an IRI mapper that maps to a copy of the file that we host somewhere.