w3c / market-data-odrl-profile

Rights Automation for Market Data W3C Community Group
Other
4 stars 6 forks source link

Reporting Duties #7

Closed benedictws closed 3 years ago

benedictws commented 4 years ago

Reporting duties share the same structure as Notification duties, except the action is to report rather than notify. So:

:D4                 a                   odrl:Duty ;
                    nl:creditor         <https://permid.org/1-4295899615> ; # CME
                    odrl:action         [   a                   md:Report ; 
                                            md:actionScope      md:Usage ;
                                        ] .

We can usually add some useful detail on what needs reporting. Often it's a list, or count, of devices or applications. We can add that by constraining the Report action by the unit of count:

:D4                 odrl:action         [   a                   md:Report ; 
                                            md:actionScope      md:Usage ;
                                            odrl:unitOfCount    md:Application ;
                                        ] .
benedictws commented 4 years ago

The big difference between the notification duty we modeled earlier and standard reporting duties is their periodicity: while notification only need happen once, reporting must be repeated monthly.

We can express that by adding a time interval after which the duty "resets" and needs to be fulfilled again:

:D4                 odrl:timeInterval   [   a                   time:ProperInterval ;
                                            time:hasXSDDuration "P1M"^^xsd:duration 
                                        ] .

You only need to report once within this time interval, so we can set the "count" attribute in the action to one. Our duty now looks so:

:D4                 a                   odrl:Duty ;
                    nl:creditor         <https://permid.org/1-4295899615> ; # CME
                    odrl:timeInterval   [   a                   time:ProperInterval ;
                                            time:hasXSDDuration "P1M"^^xsd:duration 
                                        ] ;
                    odrl:action         [   a                   md:Report ; 
                                            md:actionScope      md:Usage ;
                                            odrl:unitOfCount    md:Application ;
                                            odrl:count          "1"^^xsd:int
                                        ] .
benedictws commented 4 years ago

Often, reporting (like payments) can be done one month in arrears. We can model this by adding a deadline delta that provides a grace period for the duty to be fulfilled before it is set to the violated state. The final duty looks so:

:D4                 a                   odrl:Duty ;
                    nl:creditor         <https://permid.org/1-4295899615> ; # CME
                    nl:hasDeadlineDelta [   a                   time:ProperInterval ;
                                            time:hasXSDDuration "P1M"^^xsd:duration
                                        ] ;
                    odrl:timeInterval   [   a                   time:ProperInterval ;
                                            time:hasXSDDuration "P1M"^^xsd:duration 
                                        ] ;
                    odrl:action         [   a                   md:Report ; 
                                            md:actionScope      md:Usage ;
                                            odrl:unitOfCount    md:Application ;
                                            odrl:count          "1"^^xsd:int
                                        ] .
benedictws commented 4 years ago

For those interested in reading further about the possible states of rules, this paper is very useful: https://people.lu.usi.ch/fornaran/AIComm2019/AIComm32(2019)_Fornara.pdf