@prefix dc: .
@prefix rcs: .
<>
dc:title "TR Data Filter";
dc:description """
This filter takes as input a list of tr-process#latestVersion docs, and any data you have on this docs and keeps only those that are #Interesting.
""";
rcs:id "$Id: filter-trdata.n3,v 1.3 2004/08/06 18:56:15 syosi Exp $";
dc:relation , .
@prefix rec: .
@prefix rdf: .
@prefix log: .
@prefix trp: .
@prefix : <#>.
<> dc:description "we use :ALL_CAPS variable style (thx, Sandro)".
this log:forAll :WORK, :WORK2, :GENERIC, :P, :X, :P2.
# get document interesting properties
{
# :GENERIC trp:latestVersion :WORK.
:WORK :P :X;
is trp:latestVersion of [].
:P a trp:Interesting.
} log:implies {
:WORK :P :X.
}.
{
:P a trp:Interesting.
:P2 a trp:Interesting;
log:notEqualTo .
:WORK :P [:P2 :X]; is trp:latestVersion of [].
}
log:implies { :WORK :P [ :P2 :X]}.
# Keep info about activity statements (@@@useful?)
{
:X a rec:ActivityStatement.
} log:implies {
:X a rec:ActivityStatement.
}.
# Keep any interesting info about generic versions
{
:GENERIC trp:latestVersion []; :P :X.
:P a trp:Interesting.
} log:implies {
:GENERIC :P :X.
}.
# Keep interesting info on first editions for RECs
{
:WORK a rec:FirstEdition;
:P :X.
:P a trp:Interesting.
} log:implies {
:WORK a rec:FirstEdition;
:P :X.
}.
# Keep any interesting info about submissions
{
:GENERIC trp:latestVersion [ rec:fromSubmission :WORK2].
:WORK2 :P :X.
:P a trp:Interesting.
} log:implies {
:WORK2 :P :X.
}.