I want to record that some data was published on a specific data e.g.
However, sometimes I only have a period in which it was published not a specific date.
Now in my OWL file I want to constrain :published_in to either one of these datatypes. So I want to give it a Range. The usual approach for one datatype is:
My first naive approach was:
This fails in pellet once data is introduced. (No literal can meet the restrictions of date and duration).
Two other approaches I tried were:
This seems to work in Pellet but not in Protege (a random datatype is loaded as constraint in Protege instead of the unionOf).
The second approach I tried was
This second approach does not work at all. It expects a <> empty element/literal with a datatype of either which is not at all that I want.
So in other words how do I correctly encode in OWL that :published_in is limit to the things that are a date or a duration?
You have made the same mistake that I did some time ago.
Take a look at this answer for further discussion on domain/range behaviour.
To define a value type constraint you need to a Restriction.
Hope it will help you!
answered 23 Feb '10, 12:03