In:
cls-maxqc3
# cls-maxqc3
CONSTRUCT {
?y1 owl:sameAs ?y2 .
}
WHERE {
?x owl:maxQualifiedCardinality "1"^^xsd:nonNegativeInteger .
?x owl:onProperty ?p .
?x owl:onClass ?c .
?u a ?x .
?u ?p ?y1 .
?y1 a ?c .
?u ?p ?y1 .
?y2 a ?c .
}
Shouldn’t the one but last line read:
?u ?p ?y2 .
(we have some strange sameas inferencing…)
Thx for feedback, Michel
|
From: topbrai...@googlegroups.com [mailto:topbrai...@googlegroups.com]
On Behalf Of Jack Hodges
Sent: 13 June 2016 19:16
To: TopBraid Suite Users
Subject: Re: [topbraid-users] How to associate a constraint with a property?
Irene,
I am not generally interested in the property, per se, but the rdfs:range associated with the property, but I'd like to see the constraint violation associated with the property in the UI just as it was in the example case you (TQ) provided. My constraint isn't on the literal values that I had in my example but on the cardinality restriction on the property. I never tested for the values. In other cases I do.
Jack
On Friday, June 10, 2016 at 3:01:57 PM UTC-7, Irene Polikoff wrote:
Jack,
I don’t believe it makes sense to actually attach the violation to a property. Property is potentially used with many instances – it is not in itself violating anything. If you attach a violation to a property, you wouldn’t know what resource has a problem – that what resource has more than allowed number of values for this property.
You can’t attach the violation to the values either. First, in this case, they are literals. Secondly, even if they were resources, which of the three is in violation and in what context – any of them could be also a value for some other resource where there are only two values.
So, in this particular example, I don’t see how a violation could be usefully attached to anything but edispin:Variable1.
Having said this, if you wanted to attach it to eddl:constantUnit, you could by using a CONSTRUCT template.
You may be confusing the resource that has a violation raised against it with the UI, where a warning sign may appear in a resource's form next to some property widget.
This is not because the violation is “attached” to the property, it is is just a UI presentation of the violation that is found for edispin:Variable1. In case of CONSTRUCT templates, the property next to which we display a warning signal on a form is set using spin:violationPath. In case of ASK templates, I believe that the code tries to figure it out itself. It may be that it is not smart enough to know which property is being used when this is going through a template. I am not sure. I also don’t know how exactly you are declaring the template.
However, I do know that if you use a CONSTRUCT template, you can provide the spin:violationPath property, and then the display should work just fine. You should use any of the spl templates as an example. For example, take a look at spl:RangePropertyConstraint.
Irene Polikoff
From:
Jack Hodges <jhodg...@gmail.com>
Reply-To: <topbrai...@googlegroups.com>
Date: Friday, June 10, 2016 at 4:46 PM
To: TopBraid Suite Users <topbrai...@googlegroups.com>
Subject: Re: [topbraid-users] How to associate a constraint with a property?
Irene,
Thank you for this clarification but in the cases I am referring to I have sent the property type into the ASK template as a SPIN constraint, and when the violation fails it is showing the violation on the instance and not on the property but the failure is most assuredly on the property value. I am attaching the ASK statement below:
# a class property cardinality is inconsistent with an instance property cardinality
ASK WHERE {
?this ?testPredicate ?predValues .
?this a ?iclassType .
BIND (smf:minCardinality(?iclassType, ?testPredicate) AS ?cmin) .
BIND (smf:minCardinality(?iclassType, ?testPredicate) AS ?cmax) .
FILTER ((spl:objectCount(?inst, ?testPredicate) < ?cmin) || (spl:objectCount(?inst, ?testPredicate) > ?cmax)) .
}
This one is clearly a cardinality constraint check, where the SPIN constraint is ?testPredicate and, in the test instance I have provided, is the property 'eddl:constantUnit'. The ASK template is attached to the parent class using this property, where the cardinality constraint is 'max 1' and I have created 3 in the test instance. I have attached a screen grab of this.
Based on your explanation and my understanding (or at least wish), I'd have expected the violation to be attached to the eddl:constantUnit property. That is in fact the way it worked in the myPurchases example, except that in that example the property wasn't an argument but declared in the SPARQL directly. Such a template would not be very generally applicable and that is why I made the property an argument in the first place.
Jack
On Wednesday, June 8, 2016 at 2:56:00 PM UTC-7, Irene Polikoff wrote:
Violations from ASK templates always show against a resource that failed the check.
You can use CONSTRUCT templates. With these, you can create whatever violation messages you want and define where it applies using spin:violationPath property. This means that the violation can be shown for some other resource, but I am not sure this is what you are asking for.
Irene Polikoff
From:
Jack Hodges <jhodg...@gmail.com>
Reply-To: <topbrai...@googlegroups.com>
Date: Wednesday, June 8, 2016 at 5:28 PM
To: TopBraid Suite Users <topbrai...@googlegroups.com>
Subject: [topbraid-users] How to associate a constraint with a property?
I am building some constraints using ASK templates. In the myPurchases example when the checkInvoiceAge ASK template (an invoice with no paidDate is > 90 days old) is applied to the purchases:MaterialsPurchase class errors show up next to the invoiceDate and paidDate properties. I am guessing that this is because they are the only properties directly referenced in the checkInvoiceAge ASK template. Is this true?
And what if I want to associated a constraint test with a provided property name? How would I show the violation against that property? Right now it ends up showing against the instance, which isn't nearly as helpful.
Jack
--
You received this message because you are subscribed to the Google Group "TopBraid Suite Users", the topics of which include the TopBraid Suite family of products and its base technologies such as SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to topbrai...@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
For more options, visit
https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Group "TopBraid Suite Users", the topics of which include the TopBraid Suite family of products and its base technologies such as SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to topbrai...@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
topbraid-user...@googlegroups.com.
For more options, visit
https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Group "TopBraid Suite Users", the topics of which include the TopBraid Suite family of products and its base technologies such as SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to topbrai...@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
topbraid-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thx for confirm. Onemore..when i do the change myself I still get:
So constructions of form x sameas x…how can I change that in the construct query for now?
Irene Polikoff,
Ok, clear!
I guess there is a case to always filter out some of the inferences (like the ones you mentioned x sameas x, a subclass of x …) since they are not ‘consistent’/complete anyway (ie not “x sameas x for all asserted individuals”)
Hi Holger, here is another issue.
Maybe not glitch but feature? J
When running topspin, we expected 2 individuals inferred for “IndividualsRelatedToSomeOtherClass”
Can you explain why this is not the case?
|
From: topbrai...@googlegroups.com [mailto:topbrai...@googlegroups.com] On Behalf Of Holger Knublauch
Sent: 19 June 2016 05:27
To: topbrai...@googlegroups.com
Subject: Re: [topbraid-users] topspin issue
Hi Michel,
Oeps small typo, now ok
Same result though..
|
From: topbrai...@googlegroups.com
[mailto:topbrai...@googlegroups.com] On Behalf Of Bohms, H.M. (Michel)
Sent: 22 June 2016 10:13
To: topbrai...@googlegroups.com
Subject: RE: [topbraid-users] topspin issue
Hi Holger, here is another issue.
Ahhh!
Not even non-qualified minCard ones i see…. That explains
Strange though…if own assertions do not provide such data it would be undecidable because of owa
But if own assertions provide at least 1 that satisfy you would say its simple to infer…..
Ie why is it so “hard” (even for RL)
Gr michel
|
|