Skip to content
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

rr:template Yields URI instead of IRI #187

Open
tobiasschweizer opened this issue Sep 16, 2022 · 2 comments
Open

rr:template Yields URI instead of IRI #187

tobiasschweizer opened this issue Sep 16, 2022 · 2 comments
Labels
help wanted Extra attention is needed upstream Issue is related to another component then the RMLMapper

Comments

@tobiasschweizer
Copy link

Hi there,

When using rr:template, URIs are produced instead of IRIs: https://data.connectome.ch/author/A%20Bergstr%C3%B6m instead of https://data.connectome.ch/author/A%20Bergström for "A Bergström".

I am using RMLMapper CLI:
java -jar rmlmapper-6.0.0-r363-all.jar -m mapping.ttl -s turtle

Example data test.xml:

<result source="corda" type="relatedResult">


    <availableLanguages readOnly="true">en</availableLanguages>


    <rcn>4321</rcn>


    <id>1243</id>


    <title>Some title</title>


    <details>


        <authors><author>A Bergström</author>
        </authors>


        <journalTitle>Some Journal</journalTitle>


        <journalNumber>31/12</journalNumber>


        <publisher>Some Academic Publishers</publisher>


        <publishedYear>2016</publishedYear>


        <publishedPages>1243-1264</publishedPages>


    </details>


</result>

mapping.ttl:

PREFIX rr: <http://www.w3.org/ns/r2rml#>
PREFIX rml: <http://semweb.mmlab.be/ns/rml#>
PREFIX ql: <http://semweb.mmlab.be/ns/ql#>
PREFIX carml: <http://carml.taxonic.com/carml/>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX premis: <http://id.loc.gov/vocabulary/preservation/>
PREFIX schema: <http://schema.org/>
@base <http://example.com/ns#>.

<#LogicalSourceArticle> a rml:BaseSource ;
    rml:source "test.xml";
    rml:referenceFormulation ql:XPath ;
    rml:iterator "/result[@type='relatedResult']" .

<#article> a rr:TriplesMap ;
    rml:logicalSource <#LogicalSourceArticle> ;

    rr:subjectMap [
    	rr:template "https://data.connectome.ch/publication/{id}" ;
    	rr:class schema:ScholarlyArticle ;
    ] ;

    rr:predicateObjectMap [
    	rr:predicate schema:name ;
    	rr:objectMap [
    		rml:reference "title" ;
    	];
    ] ;

  	rr:predicateObjectMap [
  		rr:predicate schema:author ;
  		rr:objectMap [
  			rr:template "https://data.connectome.ch/author/{details/authors/author}" ;
  		];
  	] .

Result:

@prefix schema: <http://schema.org/> .

<https://data.connectome.ch/publication/1243> a schema:ScholarlyArticle;
  schema:author <https://data.connectome.ch/author/A%20Bergstr%C3%B6m>;
  schema:name "Some title" .

More context can be found here: kg-construct/rml-questions#28

Please let me know if more information is needed.

@tobiasschweizer
Copy link
Author

I am not sure how to best ensure backward compatibility since IRIs would not match the URIs, e.g., when doing incremental updates of data etc.

@DylanVanAssche
Copy link
Contributor

As discussed in in the link above, we may need to have rr:URI as well.
The RMLMapper calls an encoding method to encode the parameters as in the R2RML spec.

@DylanVanAssche DylanVanAssche added help wanted Extra attention is needed upstream Issue is related to another component then the RMLMapper labels Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed upstream Issue is related to another component then the RMLMapper
Projects
None yet
Development

No branches or pull requests

2 participants