Re: The Counter Ontology

Bob Ferris wrote:
> How can I make sure that the value of my counter concept is of the type 
> xsd:Integer? I think with the current definition:
> 
> co:count
>        rdf:type rdf:Property , owl:FunctionalProperty ;
>        rdfs:comment "Links a counter resource to the actual count"@en ;
>        rdfs:domain co:Counter ;
>        rdfs:isDefinedBy co: ;
>        rdfs:label "has count"@en ;
>        rdfs:range xsd:integer ;
>        vs:term_status "stable"@en .
> 
> it works.

Hmm. I may be mistaken here, but I think that's a wrong declaration.

The range of co:count is not xsd:integer, it's rdfs:Literal.
rdfs:Literal is the class, xsd:integer is a datatype (a special feature
of the rdfs:Literal class). In other words, you don't write:

	"99" a xsd:integer .

but instead:

	"99"^^xsd:integer a rdfs:Literal .

At least, the FOAF and SIOC ontologies specify rdfs:Literal as the range
of datatype properties.

Also note that you can't really "make sure" that the value is of the
right type, unless people use some kind of RDFS-driven validator, which
I guess isn't common.

-- 
Vasiliy Faronov

Received on Tuesday, 20 July 2010 13:51:30 UTC