Hi Christoph,
first off, we will support checking OWL 2 datatypes on TBC forms with
version 3.5 - my colleague Gokhan has just implemented it.
For a SPIN solution, here is an example of how the OWL 2 syntax can be
used unchanged and generically. The following WHERE clause find the
minExclusive facet, and these snippets could be turned into SPIN
functions, templates and finally spin:constraints.
?instance ?p ?o .
?instance a ?type .
LET (?range :=smf:localRange(?type, ?p))
FILTER bound(?range) .
?range a rdfs:Datatype .
?range owl:onDatatype ?baseType .
?range owl:withRestrictions ?facets .
?facets <http://jena.hpl.hp.com/ARQ/list#member> ?facet .
?facet xsd:minExclusive ?minExclusive .
Holger
On 18/03/2011 1:46 AM, chris wrote:
Hi,
thanks for your reply.
I have tested the SPIN constraint and I've got it to work, but not in
the way I want. My problem is, that I want to use the property
("myex:weight") with the user-defined datatype especially in classes
and other properties but therewith the Constraint violations warnings
seem not to work. Is that right?
The OWL created with TBC will be later imported in a tool I have to
implement. Only this Tool will use the value the "myex:weight"-
property contains. This property should not be used for inferencing,
that's because it is an annotation property. So if my tool will be the
first that checks the constraint, it might be possible that a user who
has edited the owl will see the constraint violation after a huge
amount of false inputs. Therefore it would be nice to have a checking
done when the user types a value into the "myex:weight"-property-
field. But for now it will work without the check to.
Christoph
On 16 Mrz., 23:42, Holger Knublauch<[email protected]> wrote:
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: seehttp://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