login about faq
4
2

From the SKOS spec.

Example 20 (consistent)

<MyConcept> skos:notation "303.4833"^^<MyNotationDatatype> .

New datatypes can be defined, and these are commonly called "user-defined datatypes".

What needs to be done to define ?

Is it something along the lines of

<MyNotationDatatype>
      a       rdfs:Datatype ;
      rdfs:label "Test"^^xsd:string ;
      rdfs:subClassOf rdfs:Resource .

Are there differences doing this in RDFS, OWL(2) Full, OWL-DL?

asked Nov 10 '09 at 08:07

PaulZH's gravatar image

PaulZH
412


OWL 2 has some powerful new features for defining datatypes. (When reading that document and all other OWL documents be sure to turn on the RDF examples first - you can do that somewhere after the table of contents.) For a SKOS notation you would probably do a regexp restriction on the datatype xsd:string. It would look like that:

<MyNotationDatatype>
   rdfs:label "XYZ notation"@en ;
   owl:equivalentClass [
      a rdfs:Datatype ;
      owl:onDatatype xsd:string ;
      owl:withRestrictions ([xsd:pattern "your regular expression goes here"])
   ] .

Using that in OWL 2 DL is no problem. If you want to stay within one of the profiles though note that defining datatypes through such restrictions isn't allowed in any of them. So for increased interoperability (also with OWL 1 and RDFS) you could just use xsd:string instead. That should be perfectly fine with SKOS.

answered Nov 13 '09 at 02:07

Simon%20Reinhardt's gravatar image

Simon Reinhardt
1.4k27

Thanks, how would that look in RDF/XML Syntax? (Will try to find out myself... but it's always helpful if someone can provide the correct version directly, and there are not too much material on this out on the web yet :( )

(Dec 07 '09 at 14:26) Samuel Lampa Samuel%20Lampa's gravatar image

I have now tried the following, but not sure if it is does what I expect (I expect it to define nmr:ppm as a double type, with no added restrictions):

<rdf:rdf xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:nmr="http://www.ebi.ac.uk/nmrshiftdb/onto#"> <rdf:description rdf:about="nmr:ppm"> <rdf:type rdf:resource="rdfs:Datatype"/> <owl:ondatatype rdf:resource="xsd:double"/> </rdf:description> </rdf:rdf>
(Dec 07 '09 at 15:26) Samuel Lampa Samuel%20Lampa's gravatar image

Why do you need the link with owl:equivalentClass to a blank node? It looks more convenient to directly link owl:onDatatype and owl:withRestriction to the new data type.

(Dec 13 '10 at 13:40) Jakob Jakob's gravatar image

Good question. I'm not sure if it's needed or not. But it would seem that if you don't do it that way then your class is actually describing everything to which this restriction applies. So if someone else defines a class with the same restrictions then a reasoner would probably see them as the same class and attach your rdf:label to it. I think it's safer to use owl:equivalentClass here.

(Dec 23 '10 at 13:27) Simon Reinhardt Simon%20Reinhardt's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×425

Asked: Nov 10 '09 at 08:07

Seen: 1,060 times

Last updated: Nov 27 '09 at 02:11