|
1 | 1 |
|
2 | | -import { ODRLEngineMultipleSteps, ODRLEvaluator, resourceToOptimisedTurtle, turtleStringToStore } from "../dist/index"; |
3 | | -import { EyelingReasoner } from "../src"; |
| 2 | +import { ODRLEngineMultipleSteps, ODRLEvaluator, prefixes, EyelingReasoner, turtleStringToStore } from "../dist/index"; |
| 3 | +import { write } from '@jeswr/pretty-turtle'; |
4 | 4 |
|
5 | 5 |
|
6 | 6 | const odrlPolicyText = ` |
@@ -70,19 +70,7 @@ async function main() { |
70 | 70 | odrlRequestStore.getQuads(null, null, null, null), |
71 | 71 | stateOfTheWorldStore.getQuads(null, null, null, null)) |
72 | 72 | // printing report nicely |
73 | | - const prefixes = { |
74 | | - 'odrl': 'http://www.w3.org/ns/odrl/2/', |
75 | | - 'ex': 'http://example.org/', |
76 | | - 'temp': 'http://example.com/request/', |
77 | | - 'dct': 'http://purl.org/dc/terms/', |
78 | | - 'xsd': 'http://www.w3.org/2001/XMLSchema#', |
79 | | - 'foaf': 'http://xmlns.com/foaf/0.1/', |
80 | | - 'report': 'https://w3id.org/force/compliance-report#' |
81 | | - } |
82 | | - |
83 | | - // created report with N3 |
84 | | - // @ts-ignore |
85 | | - console.log(resourceToOptimisedTurtle(reasoningResult, prefixes)); |
| 73 | + console.log(await write(reasoningResult, {prefixes})); |
86 | 74 |
|
87 | 75 | } |
88 | 76 | main() |
0 commit comments