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

BUG: Incomplete output KG when quoting TMs with multiple POMs #124

Closed
arenas-guerrero-julian opened this issue Dec 16, 2022 · 0 comments
Closed
Assignees
Labels
bug Something isn't working rml-star

Comments

@arenas-guerrero-julian
Copy link
Member

What Happens?

When quoting a triples map that has multiple predicate object maps, the output KG does not contain all the quoted triples.

To Reproduce

The following mapping only generates the triples for one on the predicate object maps within the quoted triples maps:

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix ex: <http://example/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix : <http://example.org/> .
@base <http://example.org/> .

:firstTM a rr:TriplesMap ;
    rml:logicalSource [
        rml:source "test/rml-star/RMLSTARTC004a/data.csv";
        rml:referenceFormulation ql:CSV
    ];
    rml:subjectMap [
        rr:template "http://example/{c1}"
    ];
    rr:predicateObjectMap [
        rr:predicate ex:p1 ;
        rml:objectMap [
            rr:template "http://example/{c2}"
        ]
    ];
    rr:predicateObjectMap [
        rr:predicate ex:p2 ;
        rml:objectMap [
            rr:template "http://example/{c2}"
        ]
    ] .

:secondTM a rr:TriplesMap ;
    rml:logicalSource [
        rml:source "test/rml-star/RMLSTARTC004a/data.csv";
        rml:referenceFormulation ql:CSV
    ];
    rml:subjectMap [
        rr:template "http://example/{c3}"
    ];
    rr:predicateObjectMap [
        rr:predicate ex:q1 ;
        rml:objectMap [
            rml:quotedTriplesMap :firstTM
        ]
    ];
    rr:predicateObjectMap [
        rr:predicate ex:q2 ;
        rml:objectMap [
            rml:quotedTriplesMap :firstTM
        ]
    ] .

:thirdTM a rr:TriplesMap ;
    rml:logicalSource [
        rml:source "test/rml-star/RMLSTARTC004a/data.csv";
        rml:referenceFormulation ql:CSV
    ];
    rml:subjectMap [
        rml:quotedTriplesMap :secondTM
    ];
    rr:predicateObjectMap [
        rr:predicate ex:r ;
        rml:objectMap [
            rr:template "http://example/{c4}"
        ]
    ] .

CSV data:

c1,c2,c3,c4
s,o,a,z

This is because RML-star is not normalized at this moment (converting TMs with several POMs to TMs with only one POM), just RML is normalized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working rml-star
Projects
None yet
Development

No branches or pull requests

1 participant