Beispiel #1
0
def evalRevArcRule(ec, o, rar):
    og = evalPredicateFilter(rar.p, triplesForObject(o, ec.graph))
    res = evalCardinality(og, rar.min, rar.max)
    if res == P:
        res = evalSubjectSpecification(ec, rar.s, og)
    if res == P:
        res = dispatch(rar.action, og, ec)
    return res
Beispiel #2
0
def evalArcRule(ec, i, ar):
    sg = evalPredicateFilter(ar.p, triplesForSubject(i, ec.graph))
    res = evalCardinality(sg, ar.min, ar.max)
    if res == P:
        res = evalObjectSpecification(ec, ar.o, sg)
    if res == P:
        res = dispatch(ar.action, sg, ec)
    return res