Hi Gerrit,

I am not sure which spin:constraint is producing the violation, and this would 
have to contain sufficient information to populate the other fields of the 
ConstraintViolation object. For example, if you have a constraint using the 
CONSTRUCT syntax such as

http://spinrdf.org/spin.html#spin-constraint-construct
CONSTRUCT {
        _:b0 a spin:ConstraintViolation ;
             spin:violationRoot ?this ;
             spin:violationPath kennedys:spouse ;
             rdfs:label "Same-sex marriage not permitted (in this model)"
    }
    WHERE {
        ?this kennedys:spouse ?spouse .
        ?this kennedys:gender ?gender .
        ?spouse kennedys:gender ?spouseGender .
        FILTER (?gender = ?spouseGender) .
    }
then you can access the values of violationRoot and Path using the 
corresponding methods getRoot() and getPaths().

So I guess you may want to clarify what constraints you currently have. If it's 
just a simple ASK then this may not contain all the information.

BTW SPIN also supports fixes

        http://spinrdf.org/spin.html#spin-constraint-fixes

and your use case sounds like something where the system could automatically 
suggest an UPDATE operation that would fix the constraint violation.

Cheers
Holger


On Aug 16, 2011, at 11:07 PM, Gerrit wrote:

> Hi all,
> 
> I have an irreflexive property. When a triple is inferred that
> violates this constraint, I would like to remove the offending triple
> from the inferred model. (Actually, I would like to prevent the triple
> from being inferred, but constraints only give a warning.)
> 
> How can I determine which triple is generating the warning?
> 
> SPINLabels.get().getLabel(cv.getRoot()) only shows the subject of the
> triple
> cv.getMessage() shows "Irreflexive property"
> SPINLabels.get().getLabel(cv.getSource()) is empty
> 
> -- 
> You received this message because you are subscribed to the Google
> Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
> TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
> To post to this group, send email to
> [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/topbraid-users?hl=en

-- 
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

Reply via email to