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

OM, SM, and GM may have no reference, template, or constant #111

Open
chrdebru opened this issue Mar 4, 2024 · 6 comments
Open

OM, SM, and GM may have no reference, template, or constant #111

chrdebru opened this issue Mar 4, 2024 · 6 comments
Labels
pending Waiting for another spec or issue to be ready

Comments

@chrdebru
Copy link
Collaborator

chrdebru commented Mar 4, 2024

https://github.com/chrdebru/rml-core/blob/missing-test/shapes/expression_map.ttl

Implements the following:

    # Exactly one rml:template, one rml:constant, one rml:reference,
    # one rml:returnMap, or one rml:functionExecution is required.

We, however, allow no such thing for subject maps and object maps (and arguably graph maps) as well. The iterations are then used to generate blank nodes. Should we remove the mincount?

@DylanVanAssche
Copy link
Collaborator

This construct you mention is to enforce that any of these options is picked (so minCount == 1) and also that you don't put multiple of these options (maxCount == 1).

allow no such thing for subject maps and object maps (and arguably graph maps)

I cannot follow here. Each of these maps must have exactly one of these options right? A subject map must have a template/constant/reference/... right?
You can enforce it more strict in the specific maps though if needed.

@DylanVanAssche
Copy link
Collaborator

Rethinking this issue: is this when you have rml:termType rml:BlankNode without a template?
If that's the only 'exception' to the rule, we should maybe define this restriction:

IF termType == BlankNode
  minCount = 0
ELSE
  minCount = 1

?

@chrdebru
Copy link
Collaborator Author

chrdebru commented Mar 4, 2024

Yes, but what if no rml:termType is provided? I'm also thinking about the Gather Maps, and it is difficult (impossible?) to "overwrite" shapes in SHACL. My approach is more: if no rml:template, rml:reference, and rml:constant, then the rml:termType is assumed to be rml:BlankNode. This rule would work with predicate maps as well as the inferred term type blank node violates the rml:termType rr:IRI constraint.

@DylanVanAssche
Copy link
Collaborator

Yes, but what if no rml:termType is provided?

There should be a default which should be used. For SubjectMaps this is IRI. It will be a 'fun' job to actually check this in SHACL shapes...

and it is difficult (impossible?) to "overwrite" shapes in SHACL.

I'm not sure how you can overwrite things I'm afraid... It is purely an AND/OR/XOR story AFAIK. Correct me if I'm wrong.

@chrdebru
Copy link
Collaborator Author

chrdebru commented Mar 7, 2024

I would argue that the default when no constant, template, or reference is provided should be blank nodes. That's the only thing that you can generate based on the iteration. Defaults can be "inferred" once you have one of them.

@dachafra
Copy link
Member

dachafra commented Jul 5, 2024

This depends on the final decision of #52

@dachafra dachafra added the pending Waiting for another spec or issue to be ready label Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending Waiting for another spec or issue to be ready
Projects
None yet
Development

No branches or pull requests

5 participants