Skip to content

Commit 7a13dbb

Browse files
committed
feat: update temp url to w3id for compliance report
1 parent 774a658 commit 7a13dbb

File tree

9 files changed

+18
-18
lines changed

9 files changed

+18
-18
lines changed

demo/test-n3-engine.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const odrlPolicyText = `
1010
@prefix dct: <http://purl.org/dc/terms/>.
1111
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
1212
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
13-
@prefix report: <http://example.com/report/temp/>.
13+
@prefix report: <https://w3id.org/force/compliance-report#>.
1414
1515
<urn:uuid:95efe0e8-4fb7-496d-8f3c-4d78c97829bc> a odrl:Set;
1616
dct:description "ZENO is data owner of resource X. ALICE may READ resource X.";
@@ -29,7 +29,7 @@ const odrlRequestText = `
2929
@prefix dct: <http://purl.org/dc/terms/>.
3030
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
3131
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
32-
@prefix report: <http://example.com/report/temp/>.
32+
@prefix report: <https://w3id.org/force/compliance-report#>.
3333
3434
<urn:uuid:1bafee59-006c-46a3-810c-5d176b4be364> a odrl:Request;
3535
dct:description "Requesting Party ALICE requests to READ resource X.";
@@ -46,7 +46,7 @@ const stateOfTheWorldText = `
4646
@prefix dct: <http://purl.org/dc/terms/>.
4747
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
4848
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
49-
@prefix report: <http://example.com/report/temp/>.
49+
@prefix report: <https://w3id.org/force/compliance-report#>.
5050
5151
<urn:uuid:f580eb45-e8bf-4bf0-b85f-f3d37774e2d4> a ex:Sotw ;
5252
ex:includes temp:currentTime, ex:alice, ex:zeno.
@@ -63,8 +63,8 @@ const ruleDir = path.join(path.dirname(__filename), "..", "src", "rules");
6363
const rulePath = path.join(ruleDir, "simpleRules.n3");
6464
const rules = fs.readFileSync(rulePath, "utf-8");
6565

66-
const ODRLEyeLocalEngine = new ODRLN3Engine(eye, rules);
67-
const ODRLEyeJsEngine = new ODRLN3Engine(eyeJs, rules);
66+
const ODRLEyeLocalEngine = new ODRLN3Engine(eye, [rules]);
67+
const ODRLEyeJsEngine = new ODRLN3Engine(eyeJs, [rules]);
6868

6969
async function main() {
7070
// parse input

demo/test-n3-evaluator.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const odrlPolicyText = `
88
@prefix dct: <http://purl.org/dc/terms/>.
99
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
1010
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
11-
@prefix report: <http://example.com/report/temp/>.
11+
@prefix report: <https://w3id.org/force/compliance-report#>.
1212
1313
<urn:uuid:95efe0e8-4fb7-496d-8f3c-4d78c97829bc> a odrl:Set;
1414
dct:description "ZENO is data owner of resource X. ALICE may READ resource X.";
@@ -27,7 +27,7 @@ const odrlRequestText = `
2727
@prefix dct: <http://purl.org/dc/terms/>.
2828
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
2929
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
30-
@prefix report: <http://example.com/report/temp/>.
30+
@prefix report: <https://w3id.org/force/compliance-report#>.
3131
3232
<urn:uuid:1bafee59-006c-46a3-810c-5d176b4be364> a odrl:Request;
3333
dct:description "Requesting Party ALICE requests to READ resource X.";
@@ -44,7 +44,7 @@ const stateOfTheWorldText = `
4444
@prefix dct: <http://purl.org/dc/terms/>.
4545
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
4646
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
47-
@prefix report: <http://example.com/report/temp/>.
47+
@prefix report: <https://w3id.org/force/compliance-report#>.
4848
4949
<urn:uuid:f580eb45-e8bf-4bf0-b85f-f3d37774e2d4> a ex:Sotw ;
5050
ex:includes temp:currentTime, ex:alice, ex:zeno.
@@ -75,7 +75,7 @@ async function main() {
7575
'dct': 'http://purl.org/dc/terms/',
7676
'xsd': 'http://www.w3.org/2001/XMLSchema#',
7777
'foaf': 'http://xmlns.com/foaf/0.1/',
78-
'report': 'http://example.com/report/temp/'
78+
'report': 'https://w3id.org/force/compliance-report#'
7979
}
8080

8181
// created report with N3

src/rules/Rules.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ export const RULES: string[] = [`@prefix string: <http://www.w3.org/2000/10/swap
66
@prefix list: <http://www.w3.org/2000/10/swap/list#> .
77
@prefix log: <http://www.w3.org/2000/10/swap/log#> .
88
@prefix odrl: <http://www.w3.org/ns/odrl/2/> .
9-
@prefix report: <http://example.com/report/temp/> .
9+
@prefix report: <https://w3id.org/force/compliance-report#> .
1010
@prefix temp: <http://example.com/request/> .
1111
@prefix : <http://example.org/> .
1212
@prefix math: <http://www.w3.org/2000/10/swap/math#> .
1313
@prefix dct: <http://purl.org/dc/terms/> .
1414
@prefix list: <http://www.w3.org/2000/10/swap/list#> .
1515
@prefix log: <http://www.w3.org/2000/10/swap/log#> .
1616
@prefix odrl: <http://www.w3.org/ns/odrl/2/> .
17-
@prefix report: <http://example.com/report/temp/> .
17+
@prefix report: <https://w3id.org/force/compliance-report#> .
1818
@prefix temp: <http://example.com/request/> .
1919
@prefix skos: <http://www.w3.org/2004/02/skos/core#>.
2020
@prefix cc: <http://creativecommons.org/ns#> .
@@ -2484,7 +2484,7 @@ odrl:display odrl:includedIn odrl:use.
24842484
odrl:extract odrl:includedIn odrl:use.`, `@prefix : <http://example.org/> .
24852485
@prefix list: <http://www.w3.org/2000/10/swap/list#> .
24862486
@prefix log: <http://www.w3.org/2000/10/swap/log#> .
2487-
@prefix report: <http://example.com/report/temp/> .
2487+
@prefix report: <https://w3id.org/force/compliance-report#> .
24882488
24892489
# check whether rule report is active
24902490
{

src/rules/activation-state.n3

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@prefix : <http://example.org/> .
22
@prefix list: <http://www.w3.org/2000/10/swap/list#> .
33
@prefix log: <http://www.w3.org/2000/10/swap/log#> .
4-
@prefix report: <http://example.com/report/temp/> .
4+
@prefix report: <https://w3id.org/force/compliance-report#> .
55

66
# check whether rule report is active
77
{

src/rules/constraints.n3

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
@prefix list: <http://www.w3.org/2000/10/swap/list#> .
55
@prefix log: <http://www.w3.org/2000/10/swap/log#> .
66
@prefix odrl: <http://www.w3.org/ns/odrl/2/> .
7-
@prefix report: <http://example.com/report/temp/> .
7+
@prefix report: <https://w3id.org/force/compliance-report#> .
88
@prefix temp: <http://example.com/request/> .
99

1010
# Constraint report

src/rules/detective/deontic-states.n3

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
@prefix list: <http://www.w3.org/2000/10/swap/list#> .
55
@prefix log: <http://www.w3.org/2000/10/swap/log#> .
66
@prefix odrl: <http://www.w3.org/ns/odrl/2/> .
7-
@prefix report: <http://example.com/report/temp/> .
7+
@prefix report: <https://w3id.org/force/compliance-report#> .
88
@prefix temp: <http://example.com/request/> .
99

1010
####################################################################################################

src/rules/report.n3

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
@prefix list: <http://www.w3.org/2000/10/swap/list#> .
55
@prefix log: <http://www.w3.org/2000/10/swap/log#> .
66
@prefix odrl: <http://www.w3.org/ns/odrl/2/> .
7-
@prefix report: <http://example.com/report/temp/> .
7+
@prefix report: <https://w3id.org/force/compliance-report#> .
88
@prefix temp: <http://example.com/request/> .
99
@prefix skos: <http://www.w3.org/2004/02/skos/core#>.
1010
# Policy report

src/rules/simpleRules.n3

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
@prefix list: <http://www.w3.org/2000/10/swap/list#> .
55
@prefix log: <http://www.w3.org/2000/10/swap/log#> .
66
@prefix odrl: <http://www.w3.org/ns/odrl/2/> .
7-
@prefix report: <http://example.com/report/temp/> .
7+
@prefix report: <https://w3id.org/force/compliance-report#> .
88
@prefix string: <http://www.w3.org/2000/10/swap/string#> .
99
@prefix temp: <http://example.com/request/> .
1010

test/integration/ODRL-Evaluator.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const stateOfTheWorldText = `
3232
@prefix dct: <http://purl.org/dc/terms/>.
3333
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
3434
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
35-
@prefix report: <http://example.com/report/temp/>.
35+
@prefix report: <https://w3id.org/force/compliance-report#>.
3636
3737
<urn:uuid:b3d04120-04b4-4176-b0d7-c813fa654ab8> a report:PolicyReport;
3838
dct:created "2025-01-14T10:09:08.370Z"^^xsd:dateTime;

0 commit comments

Comments
 (0)