Hi Catrina,

please import the file spinowl.owl (http://topbraid.org/spin/spinowl)  
into your model. Then either activate the main constraint checking  
button, or open the Problems view and hit refresh. This is also  
described in the help, as pasted below.

If you don't want to owl:imports the whole library, you can also  
simply declare a property spin:imports and then create the following  
triple at your owl:Ontology:

<my:Ontology> spin:imports <http://topbraid.org/spin/spinowl>

The benefit of this approach is that you can customize which  
constraint checks you would like to be performed, and even add your  
own patterns.

The current solution will not catch all possible violations of OWL DL  
- please let me know if you have design patterns that are not yet  
represented in the constraint library.

Holger

Constraint Checking
Constraint checking can be activated using the corresponding tool bar  
button Display constraint violation warnings. If activated, TopBraid  
will run constraint checks on the currently selected resource, after  
each editing step.

Constraints must be expressed using SPIN. TopBraid's system ontology  
library contains pluggable SPIN libraries for common RDF Schema and  
OWL design patterns, in the files spinowl.owl and spinrdfs.owl. If  
your ontology imports these files, then OWL restrictions (cardinality  
constraints, allValuesFrom, hasValue and someValuesFrom) will be  
checked. Furthermore, rdfs:range will be verified. Note that OWL and  
RDFS have by definition different, "open-world" semantics. However, in  
many applications OWL restrictions are used in the closed world sense,  
under which they are used to enforce integrity constraints. SPIN  
implements those closed world semantics for pragmatic reasons.



On Sep 2, 2009, at 6:23 AM, Catrina wrote:

>
> The Help pages show that some consistency checking can be performed
> and warnings shown in the Problems view in Composer.  There is a
> screenshot under the Constraint Checking heading that shows warnings
> given for cardinality violations.  (See Help Contents > TopBraid
> Composer > How to? > Test and debug ontologies for the screenshot.)
>
> How can I get such warnings to appear in my Problems view?
>
> I have a class that is defined as follows:
> UtilityScriptsProps:MyClass
>      a       owl:Class ;
>      rdfs:label "my class"^^xsd:string ;
>      rdfs:subClassOf owl:Thing ;
>      owl:equivalentClass
>              [ a       owl:Restriction ;
>                owl:cardinality "1"^^xsd:int ;
>                owl:onProperty UtilityScriptsProps:myProperty
>              ] .
>
>
> I want to have some kind of warnings (similar to that in the
> screenshot posted in the Help pages) or red boxes (if possible) to
> appear when a new instance of MyClass is created and the myProperty is
> not set.  How can I achieve this?
>
> Thanks,
> Catrina
> >


--~--~---------~--~----~------------~-------~--~----~
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