@prefix spin: .
@prefix foaf: .
@prefix rsine: .
@prefix dcterms: .
a rsine:Subscription;
rsine:query [
dcterms:description "Notification on circular hierarchical relations";
spin:text "PREFIX cs:
PREFIX spin:
PREFIX rdf:
PREFIX skos:
SELECT ?concept ?otherConcept WHERE {
?cs a cs:ChangeSet .
?cs cs:createdDate ?csdate .
?cs cs:addition ?addition .
?addition rdf:subject ?concept .
?addition rdf:predicate skos:broader .
?addition rdf:object ?otherConcept .
FILTER (?csdate > 'QUERY_LAST_ISSUED'^^)
}";
rsine:condition [
spin:text "PREFIX skos:
ASK {
?concept skos:broader+ ?otherConcept .
?otherConcept skos:broader+ ?concept
}";
rsine:expect true;
];
rsine:auxiliary [
spin:text "PREFIX skos:
SELECT ?conceptLabel WHERE {
?concept skos:prefLabel ?conceptLabel .
FILTER(langMatches(lang(?conceptLabel), 'en'))
}";
spin:text "PREFIX skos:
SELECT ?otherConceptLabel WHERE {
?otherConcept skos:prefLabel ?otherConceptLabel .
FILTER(langMatches(lang(?otherConceptLabel), 'en'))
}";
];
rsine:formatter [
a rsine:vtlFormatter;
rsine:message "The concepts $bindingSet.getValue('conceptLabel').getLabel() and
$bindingSet.getValue('otherConceptLabel').getLabel() form a hierarchical cycle";
];
];
rsine:notifier [
a rsine:loggingNotifier;
];
rsine:notifier [
a rsine:emailNotifier;
foaf:mbox
].