Hi Scott,
Scenario 1:
a) within a project create new RDF/OWL/SPIN
b) n3 with DC elements and SKOS
c) go to profile tab and add RDFSplus and SKOS constraints
Result:
<owl:Ontology rdf:about="">
<owl:imports rdf:resource="http://spinrdf.org/spin"/>
<owl:imports rdf:resource="http://www.w3.org/2004/02/skos/core"/>
<owl:imports rdf:resource="http://purl.org/dc/elements/1.1/"/>
<owl:versionInfo rdf:datatype="http://www.w3.org/2001/
XMLSchema#string"
>Created with TopBraid Composer</owl:versionInfo>
<j.0:imports rdf:resource="http://topbraid.org/spin/skosspin"/>
<j.0:imports rdf:resource="http://topbraid.org/spin/rdfsplus"/>
</owl:Ontology>
d) open form of skos:Concept class
No spin:constraints to be seen
e) add instance Concept_1
with skos:prefLabel value "test1 {...@nl}"
and
with skos:prefLabel value "test2 {...@nl}"
which is an error according to the skos spec.
With "Display constraint violation warnings" (yellow triangle in top
icon bar of Composer) turned on, nothing happens.
Same for explicitly refreshing by pushing the button next to the
yellow triangle.
Scenario 2
Same approach but explicitly importing the file skosspin.spin.rdf.
Result I see now in the form of class skos:Concept the defined
constraints, e.g.
CONSTRUCT {
_:b0 a spin:ConstraintViolation .
_:b0 rdfs:comment "Constraint S14: a resource has no more than one
value of skos:prefLabel per language tag." .
_:b0 rdfs:label "A concept can't have more than one preferred
label with the same value in the same language." .
_:b0 spin:violationRoot ?this .
_:b0 spin:violationPath skos:prefLabel .
}
WHERE {
?this skos:prefLabel ?label1 .
?this skos:prefLabel ?label2 .
LET (?label1lang := lang(?label1)) .
LET (?label2lang := lang(?label2)) .
FILTER ((?label1lang = ?label2lang) && (?label1 != ?label2)) .
}
which wasn't the case previously.
Running this Construct query in the SPARQL tab gives as expected:
<j.0:spinConstraintViolation>
<j.0:spinviolationRoot rdf:resource="#Concept_1"/>
<rdfs:label>A concept can't have more than one preferred label
with the same value in the same language.</rdfs:label>
<j.0:spinviolationPath rdf:resource="http://www.w3.org/2004/02/
skos/core#prefLabel"/>
<rdfs:comment>Constraint S14: a resource has no more than one
value of skos:prefLabel per language tag.</rdfs:comment>
</j.0:spinConstraintViolation>
<j.0:spinConstraintViolation>
<rdfs:label>A concept can't have more than one preferred label
with the same value in the same language.</rdfs:label>
<j.0:spinviolationRoot rdf:resource="#Concept_1"/>
<j.0:spinviolationPath rdf:resource="http://www.w3.org/2004/02/
skos/core#prefLabel"/>
<rdfs:comment>Constraint S14: a resource has no more than one
value of skos:prefLabel per language tag.</rdfs:comment>
</j.0:spinConstraintViolation>
However when I go to the form of the instance Concept_1
With "Display constraint violation warnings" (yellow triangle in top
icon bar of Composer) turned on, nothing happens.
Same for explicitly refreshing by pushing the button next to the
yellow triangle.
Nothin appears in the Problems tab.
???
On Nov 30, 8:42 pm, Scott Henninger <[email protected]>
wrote:
> Paul; I created a new thread for this post.
>
> The SKOS constraints seem to work OK in TBC 3.4 betas. Scanning the
> blog posting, it may not be clear that constraint violations need to
> be turned on in Composer. Make sure "Display constraint violation
> warnings" (yellow triangle in top icon bar of Composer) is turned on.
>
> If that is not working for you,then we'll need further details on what
> you have done and what behavior you are seeing.
>
> -- Scott
>
> On 11/30/10 10:51 AM, PaulZH wrote:
>
> > I do not seem to get skos constraint checking as described at
> >http://topquadrantblog.blogspot.com/2010/08/how-to-find-skos-constrai...
> > working in the latest beta.
>
> > Paul
--
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