Implementation Best Practices - example 5

I have a question about example 5:

 
What is the difference (if any) between having a list of constraints and a logical constraint with the “and”?
 

{

 "@context": "http://www.w3.org/ns/odrl.jsonld",

 "@type": "Set",

 "uid": "https://w3c.github.io/odrl/bp/examples/5",

 "permission": [{

     "target": "http://example.com/asset:9898.movie",

     "action": "display",

     "constraint": [{

           "leftOperand": "dateTime",

           "operator": "gte",

           "rightOperand":  { "@value": "2019-01-01", "@type": "xsd:date" }

        }, {

           "leftOperand": "spatial",

           "operator": "eq",

           "rightOperand":  "https://www.wikidata.org/resource/Q183",

           "comment": "i.e Germany"

       }]

 }]

}

 

With and:

 

{

 "@context": "http://www.w3.org/ns/odrl.jsonld",

 "@type": "Set",

 "uid": "https://w3c.github.io/odrl/bp/examples/5",

 "permission": [{

     "target": "http://example.com/asset:9898.movie",

     "action": "display",

      “constraint” : [

            “and”: {       

                "@list": [ 

                  { "@id": "http://example.com/p:5/C1" },

                  { "@id": "http://example.com/p:5/C2" } 

              ]

      }]

 }]

}

 

Regards,

___________________________________

Joshua Cornejo

marketdata

embed open standards 

across your supply chain

Received on Wednesday, 10 April 2024 19:08:09 UTC