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

Cardinality of odrl:rightOperand #255

Closed
simonstey opened this issue Sep 12, 2017 · 7 comments
Closed

Cardinality of odrl:rightOperand #255

simonstey opened this issue Sep 12, 2017 · 7 comments

Comments

@simonstey
Copy link
Contributor

https://w3c.github.io/poe/vocab/#term-isAnyOf:

Indicating that a given value is any of the right operand of the Constraint.

<http://example.com/policy:42>
  a odrl:Policy ;
  odrl:permission [
    a odrl:Permission ;
    odrl:target ex:asset_9898 ;
    odrl:action odrl:reproduce ;
    odrl:constraint [ 
        odrl:leftOperand odrl:media;
        odrl:operator odrl:isAnyOf ;
        odrl:rightOperand odrl:print, odrl:online ;
    ]
   ] .

but =>

http://w3c.github.io/poe/model/#constraint-class:

A Constraint MUST have either:

  • one rightOperand property value of type literal, IRI [rfc3987], or RightOperand; or,
  • one rightOperandReference property value (of type IRI [rfc3987]) for a reference to a right operand value.
@nitmws
Copy link
Contributor

nitmws commented Sep 12, 2017

I get the need from this case using odrl:isAnyOf but that raises some questions:
What about

...
    odrl:constraint [ 
        odrl:leftOperand odrl:media;
        odrl:operator odrl:eq ;
        odrl:rightOperand odrl:print, odrl:online ;
    ]
...
  • Are the "atomic" triples odrl:media odrl:isAnyOf odrl:print and odrl:media odrl:isAnyOf odrl:online ok?
  • What is the logic of the atomic triples odrl:media odrl:eq odrl:print, odrl:media odrl:eq odrl:online: AND or OR or something else?

I guess these set-related operators isA, isPartOf, isAllOf, isAnyOf, isNoneOf need an explicit list/collection of values as rightOperand and a list is a single thing, does not require a changed cardinality.

@riannella
Copy link
Contributor

@simonstey Perhaps we add this option as well:

A Constraint MUST have either:
one rightOperand property value of type literal, IRI [rfc3987], or RightOperand; or,
one rightOperand property value of type list of literals, list of IRIs [rfc3987], or list of RightOperands (for set-based operators); or,
one rightOperandReference property value (of type IRI [rfc3987]) for a reference to a right operand value.

Thoughts or other options?

@nitmws the odrl:eq examples would then be invalid

@vroddon
Copy link
Contributor

vroddon commented Sep 12, 2017

Good point!

What about following the same strategy as with the andSequence? In such a case, an RDF list would follow.

@nitmws
Copy link
Contributor

nitmws commented Sep 12, 2017

@riannella I was hoping the odrl:eq example is invalid - but one never knows ;-)

Re suggestion above: I would simply append the lists to the rightOperand definition:

one rightOperand property value of type literal, or? IRI [rfc3987], or RightOperand; or, list of literals, or? list of IRIs [rfc3987], or list of RightOperands (for set-based operators); or,
(Question: why are no "or"s before the IRIs?)

@vroddon this strategy already exists:

2.5.2 Logical Constraint Class - properties

A Logical Constraint must have one operand sub-property indicating the logical relationship of the compared existing constraints; its value is a list of the existing Constraint types.

@riannella there is an error: ... its value is a list of the existing Constraint instances.

... and operator andSequence:

all of the Constraints - in sequence - must be satisfied

@riannella
Copy link
Contributor

Ok, done...and added note to vocab terms.

@nitmws
Copy link
Contributor

nitmws commented Sep 13, 2017

Sorry to come back to this issue, but: if the rightOperand property may be a list of values I think this feature must be opened to the rightOperandReference property too:
one rightOperandReference property value of type
-- IRI [rfc3987]; or
-- list of IRIs [rfc3987]
for a reference to right operand value(s).

riannella added a commit that referenced this issue Sep 13, 2017
@riannella
Copy link
Contributor

Done.
Also added notes to Vocab terms.

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

4 participants