|
Nate; The tutorial is designed to show some basic modeling features
in TopBraid Composer. To run rules or constraints requires some
additional steps. (See the How to use SPIN section on
http://www.topquadrant.com/technology/sparql-rules-spin/ for more.) First, you need to realize that the kind of constraint check you are looking for is not covered in standard SWP-based reasoners because they assume an open world. I.e. you cannot use cardinality to check consistency because there isn't a way to know if all known properties are being included. Fortunately, you can use come closed-world constraints, and this is what SPIN excels at. There are a couple of approaches. The first is to use a someValuesOf restriction wit a CWA reasoning profile. To do this: 1. modify the restriction from the tutorial to be a someValuesFrom restriction. You can use the same wizard and can define this in a subClassOf property for :Person. The Manchester syntax will look like: person:bornIn some countries:Country 2. In the Ontology Home, open the Profile sub-tab (see Help > TopBraid Composer > User Interface Overview > Resource Editor> Ontology Profile) 3. Choose "SPIN constraints on OWL axioms with CWA) 4. Refresh the Problems view. This should get you the constraint violations you are looking for. Note that a someValuesOf restriction was used because the CWA reasoning profile used does not have any CWA rules for cardinality. This can be added as a SPIN constraint using the following procedure: 5. Import spin.ttl from /TopBraid/SPIN/spin.ttl 6. in the person:Person class define the following in the spin:constraint property # Each person must have at one instance of person:bornIn ASK WHERE { NOT EXISTS { ?this person:bornIn ?country . } . } If you subsequently refresh the problems view, the comment at the beginning of the constraint will appear for each member of person:Person that does not have an instance of person:bornIn. One could use the same constraint technique to create a constraint violation rule, that looks for the cardinality restriction from the quickstart guide, to query the restrictions on a class and raise a violation when the cardinality restriction is violated. This could in fact be added to the CWA profile included in Composer, but I leave that to another exercise... Let us know if this is helpful. -- Scott On 1/11/2015 10:37 AM, Nate Marks
wrote:
-- You received this message because you are subscribed to the Google Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), Reference Data Manager (RDM), TopBraid Composer, TopBraid Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN. To post to this group, send email to [email protected] --- 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 [email protected]. For more options, visit https://groups.google.com/d/optout. |
- [topbraid-users] TBC Quick Start guide - can't identify pr... Nate Marks
- Re: [topbraid-users] TBC Quick Start guide - can't id... Scott Henninger
- RE: [topbraid-users] TBC Quick Start guide - can'... Irene Polikoff
- [topbraid-users] Re: TBC Quick Start guide - can't id... Nate Marks
