Hello everyone
Potentially very simple problem here - we are trying to figure out how to create a condition in PEARL. I have provided a simple example rule below:
rule it.uniroma2.art.Sheet2RDFAnnotation id:row {
nodes = {
cs uri(coda:formatter("%s", "
https://data.stat.ee/cat/code_cs")).
code literal col_0/value .
@Memoized
codeRes uri(coda:formatter("%s%s", "
https://data.stat.ee/cat/code#", $code )) col_0/value .
parentCode literal col_1/value .
@Memoized
parentCodeRes uri(coda:formatter("%s%s", "
https://data.stat.ee/cat/code#", $parentCode )) col_1/value .
}
insert = {
OPTIONAL{
$codeRes skos:topConceptOf $cs .
}
}
}
In this rule, every row's code is made into an URI (assigned codeRes) and then made top concept of the Concept Scheme cs. We would like to know how the insertion can be made conditional - for example, it is inserted ONLY when the parentCode (col_1/value) in that row is empty, or perhaps with value '1'?
We tried referring to PEARL documentation and looking into conditions, where clause, etc. but had no luck.
Thanks in advance.