-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add IRI mapper for SKOS Core Vocabulary to prevent missing import errors #22
Comments
@alexskr - any opinion on where our copy of |
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. 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: ontoportal/ontologies_linked_data#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.
The text was updated successfully, but these errors were encountered: