At some point in time it would be great to have a collection of SPIN
templates that use the syntax of the OWL 2 datatypes for constraint
checking. Any contributors?
Christian Fuerber has recently contributed a similar SPIN library for
data quality checks, which is included in the standard ontology library
of TopBraid: see http://www.fuerber.com/
Also, it would certainly not hurt to have the checking done as you type,
even without SPIN, at least as an option. If more people need this, we
can give it higher priority.
Holger
On 17/03/2011 1:56 AM, Scott Henninger wrote:
Chris; No, Composer, nor any other OWL editor, will not restrict the
values that can be legally entered for user-defined datatypes. Using
OWL standards alone, the best you can do this is to enter the value,
then run inferences to see if any inconsistencies occur. Basically,
RDFS and OWL are not designed for constraint checking, but rather for
inferring data from existing data and checking for consistency against
the model. Also note that annotation properties are not used in
inference.
An alternative is to use SPIN constraints. Supposing the name of the
property you want to check the value on is named myex:dValue. Add the
following to the most general class you need to run the constraint on
(to start, use owl:Thing):
#value must be between 0.0 and 1.0
ASK
WHERE
{ ?this myex:dValue ?value .
FILTER ((?value< 0.0) || (?value> 1.0))
}
Turn on Constraint violations warnings (yellow warning triangle in top
icon row for Composer) and enter a vale for an instance of this
property. If the value is outside of the range, then a violation
warning will appear with the comment field providing documentation on
what the violation is.
For other examples on how this works, see the TopBraid/Examples/
kennedysSPIN.rdf file in the Navigator. There are some constraints
set up in the :Person class - a simple one like the above and a more
complex one that provides a way to suggest ways to fix the violation.
On Mar 16, 7:32 am, chris<[email protected]> wrote:
Hi all,
I work with TopBraid Composer since a few weeks and I want to create a
userdefined datatype within an annotation property. These datatype
should only accept double values between 0 and 1. I did this by typing
"xsd:double[>= 0.0 ,<= 1.0]" into the annotation properties
"rdfs:range" field. Everything works fine, but if I use this
annotation property in an instance or a class, I can type in every
double value I want.
So my questions are:
1. Does the Topbraid Composer not check these restriction or did I
make a mistake?
2. Is there a way to get the Topbraid Composer to not accept values
outside the given interval?
--
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