Hello,
   I currently have a model in which I've defined Cardinality constraints on 
some Class attributes using the "Create from SPIN template" tool.  For a test I 
inject a cardinality constraint violation into the model.  I then run spin 
constraint checking on the model with the following code:

                List<ConstraintViolation> cvs = SPINConstraints.check(memModel, 
null);

 and while I'm getting a returned ConstraintViolation object, the object has no 
message.  I noticed when I view the model in TBC, it shows the constraint 
violation and provides a message stating that there is a SPIN constraint 
violation and lists the predicate that has the cardinality constraint error, 
although it doesn't actually say it's a cardinality constraint violation.

In my code, I am able to call cvs.getRoot().getURI() to get the URI of the 
individual that has the constraint violation, but I can't figure out how to 
retrieve the predicate that has the cardinality violation like TBC is doing.

Really, the best would be if I could just attach a "cardinality constraint 
error" message to the attributes that have cardinality constraints on them in 
the model, but I don't see anyway to add such a message like can be done for 
spin:constraint's specified as ASK queries (by adding comments to the ASK 
query).  Is there a way to do this for such cardinality constraints?

Jeff


--

You received this message because you are subscribed to the Google Groups 
"TopBraid Composer Users" group.
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-composer-users?hl=en.


Reply via email to