Hi,
In Ontop 4.2, for testing rdb2rdf we used the Ontop DirectMappingBootstrapper configured with OntopSQLOWLAPIConfiguration to extract a mapping and ontology from a relational data source if no mapping was provided, then used either the provided mapping/ontology or the bootstrapped mapping/ontology to configure the OntopRepository.
In Ontop 5.0, OntopSQLOWLAPIConfiguration Builder removed the .ontology(OWLOntology) method, only allowing an Ontology to be provided by ontologyFile(File), ontologyFile(String), ontologyFile(URL), or (new) ontologyReader(Reader).
The DirectMappingBootstrapper.BootstrappingResults still returns an OWLOntology getOntology(), so it looks like we're forced to wrap the OWLOntology in a Reader for Ontop 5.0.
In issue #24, ghxiao states "A relevant issue is #138. The current OWLAPI binding implementation is incomplete. In general, users should [use] the RDF4J binding of Ontop, but not OWLAPI binding. The OWLAPI binding is mainly used internally for the protege plugin."
1. In Ontop-5, what is the recommended way to provide an in-memory ontology to the Ontop Configuration/Repository? Is there a plan to support RDF4J Models?
2. Are the different Ontop Configuration settings documented somewhere? The closest I've found is the Configuration Keys page on the website or searching through the code.
Example Code:
Builder<?> builder = OntopSQLOWLAPIConfiguration.defaultBuilder()
.jdbcUrl(db.url)
.jdbcDriver(db.driver)
.jdbcUser(db.username)
.jdbcPassword(db.password)
.properties(db.properties)
.enableDefaultDatatypeInference(true);
BootstrappingResults results = DirectMappingBootstrapper.defaultBootstrapper()
.bootstrap(builder.build(), BASE_IRI);
// Ontop 4.2 - OntopSQLOWLAPIConfiguration.Builder - supports .ontology(OWLOntology)
builder
.ppMapping(results.getPPMapping())
.ontology(results.getOntology());
// Ontop 5.0 - OntopSQLOWLAPIConfiguration.Builder - removes .ontology, adds .ontologyReader
ByteArrayOutputStream out = new ByteArrayOutputStream();
results.getOntology().saveOntology(out);
builder
.ppMapping(results.getPPMapping())
.ontologyReader(new InputStreamReader(new ByteArrayInputStream(out.toByteArray())));
OntopRepository repo = OntopRepository.defaultRepository(builder.build());
Best regards,
Thomas Taylor
--
Please follow our guidelines on how to report a bug https://ontop-vkg.org/community/contributing/bug-report
---
You received this message because you are subscribed to the Google Groups "ontop4obda" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ontop4obda+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ontop4obda/b9dfced6-2f67-4655-b0e2-199a19538472n%40googlegroups.com.