This is a demonstration how to run the Koreografeye reasoner.
git clone git@github.com:eyereasoner/KoreografeyeDemo.git YourProject
cd YourProject
npm install
in/
: an input directory for RDF resourcesin/demo.ttl
: an example input RDF resourceerr/
: an error directory for failed RDF resourcesout/
: an output directory for successful processed RDF resourcesrules/
: a directory containing zero or more N3 policy filesrules/*.n3
: example N3 policy files
An N3 policy can contain any valid Notation3 (N3) rule. The premise of the N3 rule should match the RDF resource one is interested in. The conclusion of the N3 rule should specify one or more policies. The policy has the format:
<PolicyName> pol:policy <PolicyDescription>
where:
<PolicyName>
is a unique identifier for the policy<PolicyDescription>
is an FnO description of the required policyFile: rules/demo.n3
?id
to the main subject of the input RDF resource
[ pol:mainSubject <id> ]
.?class
to the class of the main subject and demands it is an as:Announce
or an as:Create
?id
and ?class
binding is found
ex:MyDemoPolicy
was chosen for this examplepol:policy
defines the required policy using the FnO vocabulary
fno:executes
with a name of a policy interfaceex:param1
ex:param2
ex:body
Process all RDF resource in the in
directory using the demo.n3
rule file.
Step 1. Run the orchestrator component
npx orch --info --keep --in in --out out --err err rules/demo.n3
or shorter
npm run orch:demo
This will generate a out/demo.ttl
file as output containing the input RDF resource plus injected policies.
Step 2. Run the policy executor against the output of step 1
npx pol --info --keep --single out/demo.ttl
or shorter
npm run pol
This will return some debugging output from the DemoPlugin
implementation of the demo policy.
Process all RDF resource in the in
directory using the ldn.n3
rule file.
Step 1. Run the orchestrator component
npx orch --info --keep --in in --out out --err err rules/ldn.n3
or shorter
npm run orch:ldn
This will generate a out/demo.ttl
file as output containing the input RDF resource plus injected policies.
Step 2. Run the policy executor against the output of step 1
npx pol --info --keep --single out/demo.ttl
or shorter
npm run pol
This will send a notification to https://httpbin.org/post
using the SendNotificationPlugin
implementation of the demo policy.
The ComponentsJS configuration file config.jsonld
defined all start up parameters of the Koreografeye components.
urn:koreografeye:reasonerInstance
contains arguments to pass to the internal Eye reasoner. On our example we make use of the EyeJS implementation.http://example.org/demoPlugin
defines the demo policy, demoPlugin
. The Koreografeye plugin DemoPlugin
is an implementation of this policy.http://example.org/sendNotify
defines the startup parameters of the sendNotify
policy. The Koreografeye plugin SendNotificationPlugin
is an implementation of this policy.npx orch --help
npx pol --help