-
Notifications
You must be signed in to change notification settings - Fork 17
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
Define Atomic and Compound Constraint as subclasses #206
Comments
I contemplated this...then asked what was the overall benefit.... |
Sub-classing constraints will likely be of use to any evaluation engine testing these constraints. I also think we have the opportunity here to significantly enhance the expressiveness of ODRL. I notice that three of the four operators allowable in a compound constraint have no sensitivity to order - i.e there's no distinction between a left and a right operand. This suggest two things: both left and right operands are sub-classes of operand, which should be used in compound constraints when the order of the operands is irrelevant. While we must have a minimum of two operands in a compound constraint there is no reason why we could not have more - linking a set of constraints with the specified operator. This satisfies several scenarios I've come across while translating licenses. |
To clarify: the leftOperand and the rightOperand are properties and may become sub-properties of a operand property.
Note: such a "many operands and 1 operator" Constraint subclass may look interesting in terms of a simplified/compact syntax but in the end all compactness has to be expanded to the atomic level. |
My view on the change of the Constraint design as discussed at the call on 2017-07-03 - https://www.w3.org/2017/07/03-poe-minutes
|
I question the "sequential logical operator" in the Binary Constraint - just to support the logical andSequence All logical constraints should be in the "Multi Constraint". Perhaps we should then support rdf:Seq for this purpose:
And we then don't even need o:andSequence any more ? |
I've raised where should andSequence reside at the call on Monday and heard it should be moved to the Binary Constraint as it should process only two Constraint results. That's why I've put it there in my suggestion. Re @riannella suggestion:
|
RDF brings up lots of emotions ;-)) My main point was that we should have the same solution for all logical constraints. Proposal: for logical constraints, we need to define a new (abstract) operand property with sub-properties: and, or, xor, andSequence And the object of these properties is a list (referring to 2 or more binary Constraints) |
To sort out things:
... which is doable but n 8000 ot any easy syntax.
|
Yes, agree, scratch the idea of rdf:Seq ;-) Also, I think that @simonstey wants to use odrl:and as the property:
|
May I infer from the diagram above that there are two Constraint classes: Constraint and Logical Constraint? ... and what happens to odrl:andSequence? I suggest:
|
yes, like in SHACL
didn't we agree to have it as one of the operators of "normal" constraints?
the range of what? |
@simonstey I've been talking about odrl:andSequence above: it's Range should be Constraint. If we create two constraint classed also the Domains of all operators in the Core and the Common Vocabulary must be set according to our split up above - currently the Domain is not shown in the HTML page of the Vocabulary but in exists in the Turtle. |
if {
"@context": "http://www.w3.org/ns/odrl.jsonld",
"@type": "Offer",
"uid": "http://example.com/policy:88",
"permission": [{
"target": "http://example.com/photo.jpg",
"assigner": "http://example.com/org/fifa",
"action": "distribute",
"constraint": [{
"leftOperand": "http://example.com/policy:88/C1",
"operator": "andSequence",
"rightOperand": "http://example.com/policy:88/C2"
}],
}]
} it has neither a we could state, however, that if the operator is |
If it helps, I would just say that in MPEG-21 Media Contract Ontology, we opted for a very similar approach. Instead of contraints, I suggested speaking in terms of "facts" Consequently, we defined: Union and Intersection had two operands, negation only one. |
WG agreed to the above updated model for constraints: https://www.w3.org/2017/07/10-poe-minutes |
Updated the IM with the constraint/logical model Commit: bee8032 (note: the vocab is next...) |
Updated the Vocab (and encodings) commit: effcc01 |
Hmmm...turtle (and JSON-LD) shortcuts for collections: Hence, we could use these for the andSequence logical operand as well? |
Updated the Logical Constraints to support an ordered list for operands (such as andSequence) |
The IM defines for the 2.6 Constraint Class an Atomic Constraint and a Compound Constraint.
Each of them has different sets of usable properties and properties have different rules for their use - but they are not defined as subclasses of the Constraint Class.
As e.g. the Policy Class has the sub-classes of Set, Offer and Agreement (and possibly more) providing different sets of properties with different cardinalities and also the subclasses of the Rule Class have different sets of properties I suggest to define also for this context
Note: the definition of the constraint property of the Rule Class does not require a change as it allows the Constraint Class (and its subclasses) as object.
The text was updated successfully, but these errors were encountered: