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

Throw a better exception when a constant bnode is used #17

Open
bcogrel opened this issue Oct 24, 2023 · 0 comments
Open

Throw a better exception when a constant bnode is used #17

bcogrel opened this issue Oct 24, 2023 · 0 comments

Comments

@bcogrel
Copy link
Contributor

bcogrel commented Oct 24, 2023

The property rr:constant (https://www.w3.org/TR/r2rml/#constant) does not accept blank nodes, only IRIs or literals according to the context.

Invalid triples maps like

<urn:MAPID-institution> a rr:TriplesMap;
  rr:logicalTable [ a rr:R2RMLView;
      rr:sqlQuery "SELECT prof_id FROM professors;"
    ];
  rr:predicateObjectMap [ a rr:PredicateObjectMap;
      rr:objectMap [ a rr:ObjectMap, rr:TermMap;
          rr:constant _:mit
        ];
      rr:predicate :institution
    ];
  rr:subjectMap [ a rr:SubjectMap, rr:TermMap;
      rr:template "professor_{prof_id}";
      rr:termType rr:BlankNode
    ] .

<urn:MAPID-mit> a rr:TriplesMap;
  rr:logicalTable [ a rr:R2RMLView;
      rr:sqlQuery "SELECT prof_id FROM professors;"
    ];
  rr:subjectMap [ a rr:SubjectMap, rr:TermMap;
      rr:class :Institution;
      rr:constant _:mit
    ] .

triggers casting exceptions instead of saying that the mapping is invalid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant