Let's say I have to define a custom datatype :abcDatatype that contains only the string values "a", "b" and "c", so that I can use it as a range of some property, like this:

:abcProperty
  rdf:type owl:DatatypeProperty ;
  rdfs:range :abcDatatype .

and then use it to describe some individual like this:

:test :abcProperty "a"^^xsd:string .

Defining my datatype as follows (which is compliant to OWL2 primer) and checking the consistency of the whole model, the Pellet reasoner does not raise any issue:

:abcDatatype  owl:equivalentClass [
  rdf:type rdfs:Datatype ;
  owl:oneOf ("a"^^xsd:string "b"^^xsd:string "c"^^xsd:string) 
 ].

On the contrary, if I define it as follows, then Pellet says the model is not consistent because Literal value "a"^^string does not belong to datatype abcDatatype:

:abcDatatype  rdf:type rdfs:Datatype ;
  owl:oneOf ("a"^^xsd:string "b"^^xsd:string "c"^^xsd:string) .

Is there any way to define a custom datatype without using the blank node? Any explanation about this will be very welcome.

asked 30 Mar '12, 12:26

iricelino's gravatar image

iricelino
855
accept rate: 0%

edited 31 Mar '12, 14:21

Michael%20Schneider's gravatar image

Michael Schn... ♦
6.2k1712

@Moderators: The question text is somewhat confusing, as it suggests a more generic question. I would restate it such that it is clear that the question is about data enumerations.

(30 Mar '12, 16:57) Michael Schn... ♦ Michael%20Schneider's gravatar image

@Michael personally I'm not comfortable editing an OWL question other than to fix spelling/grammer/formatting as I don't have sufficient technical knowledge. You have sufficient karma to edit posts so if you see a question like this that needs clean up please go ahead and edit it like you've done so here

(31 Mar '12, 12:21) Rob Vesse ♦ Rob%20Vesse's gravatar image

@Rob: Ok, did it. I wasn't aware that I am allowed to do it myself.

@iricelino: I hope you are fine with the new title. It now makes clear that the question refers specifically to data enumerations, not to defining custom datatypes in general.

(31 Mar '12, 14:24) Michael Schn... ♦ Michael%20Schneider's gravatar image

@iricelino, just to add some background context to Michael's excellent answer. Pellet applies OWL reasoning using something called the Direct Semantics (which is defined for OWL 2 DL and subsets thereof). The Direct Semantics is defined over ~axioms, not over triples. Axioms must be mapped to and from RDF triples in a very specific way to be understood by reasoners such as Pellet. This is defined in the documentation Michael links. Your latter example breaks the conventions laid out there as Michael explains, and so Pellet doesn't understand: it can't parse out the axioms it needs.

(31 Mar '12, 20:35) Signified ♦ Signified's gravatar image

@Michael: yes, I'm fine with your title editing; it was misleading indeed

@Signified: thanks also for the explanation about Pellet (which is definitely a great tool)

(02 Apr '12, 03:54) iricelino iricelino's gravatar image

As you use Pellet, an OWL 2 DL reasoner, for parsing an RDF graph, I expect that you actually want to have an answer to the following question:

Is there a reverse RDF mapping rule into the OWL 2 structural specification for the RDF triples

:abcDatatype  rdf:type rdfs:Datatype ;
    owl:oneOf ("a"^^xsd:string "b"^^xsd:string "c"^^xsd:string) .

?

So let's have a look into Chap. 3 of the OWL 2 Mapping to RDF Graphs document, which defines the reverse RDF mapping. All we have to do is to check for all the table entries including the property owl:oneOf, and see whether one of them matches your triple data.

First, we can exclude all those entries that refer to enumerations of individuals, i.e., those enumerations that result into classes, as OWL 2 DL strictly separates between classes and datatypes. These "forbidden rules" are those in the tables 13, 15, and 18.

So let's go through the remaining entries that are really about data enumerations:

  • The entry in table 12, while matching the part "rdf:type rdfs:Datatype", actually requires a blank node ("_:x") in subject position.
  • The two entries in table 14 also ask for a blank node ("_:x"). They even ask for "rdf:type owl:DataRange", but this is secondary for your question, I think.

And that's it! Sorry, there is no mapping rule for your case, so an RDF graph with your triples cannot be an "OWL 2 DL ontology in RDF graph form". That's what the spec says. This doesn't stop OWL 2 DL tools in the wild to still treat such input, but it is then a tool-specific thing.

For completeness, your triples are, of course, syntactically valid OWL 2 Full (simply because every RDF graph is valid OWL 2 Full), and they also lead to the expected semantic meaning of a datatype consisting of three strings in OWL 2 Full. One can see this from Table 5.5 of the OWL 2 RDF-Based Semantics, although a bit of proving using the rest of the document is needed. :-)

permanent link

answered 30 Mar '12, 16:54

Michael%20Schneider's gravatar image

Michael Schn... ♦
6.2k1712
accept rate: 34%

@Michael thanks a lot for your detailed answer! It clarifies a lot of things. Now I understand that I was addressing the issue from the RDF pov, while I should have started from the OWL2 end... :-) Thanks a lot for your time!

(02 Apr '12, 03:53) iricelino iricelino'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

Question tags:

×869
×72
×46
×29
×4

question asked: 30 Mar '12, 12:26

question was seen: 1,684 times

last updated: 02 Apr '12, 03:54