
function.event.rule.rq Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of corese-gui Show documentation
Show all versions of corese-gui Show documentation
Corese is a Semantic Web Factory (triple store and SPARQL endpoint)
implementing RDF, RDFS, SPARQL 1.1 Query and Update, Shacl. STTL. LDScript.
The newest version!
#
# Event driven functions to trace Rule Engine
#
@public @beforeEntailment
function us:beforeEntailment (re, path) {
set(countLoop = 0);
xt:print("before entailment:", path, xt:size(xt:graph()))
}
@public @afterEntailment
function us:afterEntailment(re, path) {
xt:print("after entailment:", path, xt:size(xt:graph()))
}
@public @prepareEntailment
function us:prepareEntailment(re, q) {
xt:print("prepare entailment:", xt:size(xt:graph()));
xt:print(q)
}
@public @loopEntailment
function us:loopEntailment(re, path) {
xt:print("loop entailment:", set(countLoop = countLoop + 1), xt:size(xt:graph()))
}
#@public
@beforeRule
function us:beforeRule(re, q) {
xt:print("@beforeRule");
xt:print(java:getAST(q))
}
@public @afterRule
function us:afterRule(re, q, res) {
if (xt:size(res) > 0) { # && java:hasMetadata(java:getAST(q), "@test")) {
xt:print("@afterRule");
xt:print(java:getAST(q));
xt:print("result:", xt:size(res));
xt:print()
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy