Benjamin,
having a Java dependency kind of beats the purpose of
containerization. The platform should know as little as possible about
ontop beyond that it is a SPARQL-compatible datasource. In this case,
also that a mapping has to be supplied to instantiate it.
I think it makes sense viewing ontop as a large function that given a
mapping argument, it returns a SPARQL endpoint. Which means it can
have a second variant where the argument is omitted, and therefore
auto-generated. Both cases can be implemented by mounting the mapping
file as VOLUME. You'll see :)
Right now I am just trying out ontop as I go, and then will codify the
steps in the Dockerfile. I want to look at the mappings first because
I'm not familiar with them, so naturally I'm bootstrapping them first.
What I've tried so far:
$ ./ontop bootstrap -p jdbc.properties -m mapping.obda -t ontology.owl
-b
https://linkeddatahub/atomgraph/ontop/
Error: Could not find or load main class it.unibz.inf.ontop.cli.Ontop
Maybe this is due to me using bash on Windows. I will try on Windows
Linux Subsystem (Ubuntu). The .bat file worked fine on the other hand:
ontop.bat bootstrap -p jdbc.properties -m mapping.obda -t ontology.owl
-b
https://linkeddatahub/atomgraph/ontop/
But not the conversion to R2RML:
λ ontop mapping to-r2rml -i mapping.obda -o mapping.ttl -t ontology.owl
it.unibz.inf.ontop.exception.InvalidMappingExceptionWithIndicator:
The syntax of the mapping is invalid (and therefore cannot be
processed). Problems:
MappingId = 'MAPPING-ID1'
Line 10: Invalid target: 'BNODE({id}, {************}, {************},
{************}, {************}, {************}, {************},
{************}, {************}, {************}, {************},
{************}) a <
https://linkeddatahub/atomgraph/ontop/************>
; <
https://linkeddatahub/atomgraph/ontop/************#id>
{id}^^xsd:integer ;
<
https://linkeddatahub/atomgraph/ontop/************#************>
{************}^^xsd:string ;
<
https://linkeddatahub/atomgraph/ontop/************#************>
{************}^^xsd:string ;
<
https://linkeddatahub/atomgraph/ontop/************#************>
{************}^^xsd:string ;
<
https://linkeddatahub/atomgraph/ontop/************#************>
{************}^^xsd:integer ;
<
https://linkeddatahub/atomgraph/ontop/************#************>
{************}^^xsd:boolean ;
<
https://linkeddatahub/atomgraph/ontop/************#************>
{************}^^xsd:string ;
<
https://linkeddatahub/atomgraph/ontop/************#************>
{************}^^xsd:string ;
<
https://linkeddatahub/atomgraph/ontop/************#************>
{************}^^xsd:dateTime ;
<
https://linkeddatahub/atomgraph/ontop/************#************>
{************}^^xsd:dateTime ;
<
https://linkeddatahub/atomgraph/ontop/************#************>
{************}^^xsd:string ;
<
https://linkeddatahub/atomgraph/ontop/************#************>
{************}^^xsd:string .'
Debug information
Problem parsing in OBDA document.
Could not load OBDA model. Either a suitable parser could not be
found, or parsing failed. See parser logs below for explanation.
The following parsers were tried:
1) TurtleOBDASQLParser
Details:
--------------------------------------------------------------------------------
Parser: TurtleOBDASQLParser
Syntax error location: column 0
extraneous input 'BNODE' expecting {'@prefix', '@PREFIX', '@base',
'@BASE', STRING_WITH_CURLY_BRACKET, IRIREF_EXT, IRIREF, PREFIXED_NAME,
PREFIXED_NAME_EXT, BLANK_NODE_LABEL, ANON}
at it.unibz.inf.ontop.spec.mapping.parser.impl.OntopNativeMappingParser.load(OntopNativeMappingParser.java:200)
at it.unibz.inf.ontop.spec.mapping.parser.impl.OntopNativeMappingParser.parse(OntopNativeMappingParser.java:104)
at it.unibz.inf.ontop.injection.impl.OntopMappingSQLConfigurationImpl.loadPPMapping(OntopMappingSQLConfigurationImpl.java:117)
at it.unibz.inf.ontop.injection.impl.OntopMappingSQLAllConfigurationImpl.loadPPMapping(OntopMappingSQLAllConfigurationImpl.java:57)
at it.unibz.inf.ontop.injection.OntopMappingSQLConfiguration.loadProvidedPPMapping(OntopMappingSQLConfiguration.java:26)
at it.unibz.inf.ontop.cli.OntopOBDAToR2RML.run(OntopOBDAToR2RML.java:79)
at it.unibz.inf.ontop.cli.Ontop.main(Ontop.java:18)
I've masked the column names as I cannot share the schema details at
this point, unfortunately. But I hope it's enough to indicate the
issue.
Martynas
On Wed, Aug 8, 2018 at 11:10 AM, 'Benjamin Cogrel' via ontop4obda