kg-construct / mapping-challenges

Issues for discussion about limitations of current mapping languages
Apache License 2.0
4 stars 9 forks source link

Base IRI #31

Closed marioscrock closed 2 years ago

marioscrock commented 3 years ago
  1. The R2RML specification says the base IRI is added to a term if the term map's term type is rr:IRI and the IRI is relative. As far as I understand, in the current version of the RMLMapper, this behavior is implemented only with respect to subjects (https://github.com/RMLio/rmlmapper-java/pull/45), however, I think it can be useful also for named objects. What do you think should be the behavior of the processor if the ObjectMap is of type IRI and generates a relative IRI?

Example in YARRML

po:
  - [ex:hasContactDetails, "ContactDetails-$(id)~iri"]
  1. I think the mapping language specification should clarify how to handle @base IRI in the RDF file containing the mappings. The @base IRI in the RML file is by default considered by the RMLMapper as the IRI to complement relative IRIs in generated triples, but this is not the intended usage of @base within an RDF file. Since the IRI defined for TripleMaps in the mapping file (IRI of the mappings) and the IRI to complement relative IRIs in triples generated using the mappings ("IRI of the data") are usually different, I think it can be useful to define a specific keyword in the mapping language allowing the user to define the IRI that the RML processor should use for the generated triples. Example available here: https://github.com/RMLio/yarrrml-parser/issues/30
dachafra commented 2 years ago

This is already solved in the R2RML spec, and we have a similar discussion w.r.t test-cases in R2RML. Engines should provide a way to indicate the base IRI (using a config file, parameter in CLI, etc). Closing the issue as it seems more a related-issue with the RMLMapper than a issue for RML