issue with adding ICV cardinality constraint on rdfs:label

0 views
Skip to first unread message

Conrad Leonard

unread,
Oct 13, 2014, 8:56:29 PM10/13/14
to sta...@clarkparsia.com
Adding a cardinality constraint on rdfs:label...

@prefix  : <http://purl.org/net/grafli#> .

:Entity rdfs:subClassOf
       
[ a owl:Restriction ;
          owl
:onProperty rdfs:label ;
          owl
:minCardinality 1 ] .


Command line "stardog-admin icv add" reports that constraint was added but then export shows nothing...

[conradL@momerath icv]$ stardog-admin icv add grafli constraint_8_has_rdfslabel.ttl
Successfully added constraints in 00:00:01.
[conradL@momerath icv]$ stardog icv export -- grafli
No constraints found in database: grafli


Substituting other properties for rdfs:label, adding this ICV rule works just fine.

It doesn't seem to be a caching issue because when other constraints are added after this one, they show up but this one still doesn't; in fact it never shows up in export even after a server restart

Is there something special about rdfs:label in this context? I couldn't find anything in the docs that says this isn't allowed, and in any case if the constraint is being ignored/not added the response should not be "Successfully added constraints".

Evren Sirin

unread,
Oct 14, 2014, 1:15:38 PM10/14/14
to Stardog
Right now there is limited support for annotation properties in OWL
constraints. Only the annotation axioms from the OWL spec [1] are
supported which means you can use annotation properties only in
subPropertyOf, domain and range constraints. but we will improve this
in the future and support the kind of constraint you have here. For
now you can use a SPARQL or rule constraint. For example, your OWL
constraint would correspond to the following rule constraint (if x is
an Entity then x should have a label):

[] a rule:SPARQLRule ;
rule:content """
PREFIX : <http://purl.org/net/grafli#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
IF {
?x a :Entity
}
THEN {
?x rdfs:label ?label
}""" .

Best,
Evren

[1] http://www.w3.org/TR/2012/REC-owl2-syntax-20121211/#Annotation_Axioms
> --
> -- --
> You received this message because you are subscribed to the C&P "Stardog"
> group.
> To post to this group, send email to sta...@clarkparsia.com
> To unsubscribe from this group, send email to
> stardog+u...@clarkparsia.com
> For more options, visit this group at
> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en

Conrad Leonard

unread,
Oct 14, 2014, 5:14:43 PM10/14/14
to sta...@clarkparsia.com
Thanks for the clarification Evren.
I'll use the SPARQL form instead.

cheers,
Conrad.
Reply all
Reply to author
Forward
0 new messages