4

I would like to define the range of a data type property as an exhaustive enumeration of strings, in a way that an individual could have as value of this property only one of the strings in the enumeration.

For example, a data type property called "color", which can assume only 3 values: "Red", "Green" and "Blue".

I'm using OWL 2, and Protégé 5.0.

Is there an easy way of doing that using Protégé?

David Medinets
  • 5,160
  • 3
  • 29
  • 42
Zaratruta
  • 2,097
  • 2
  • 20
  • 26
  • Yes, the range expression would be `{"Red", "Blue", "Green"}`. I think this has been answered on Stack Overflow before. Let me see if I can find the old post. – Joshua Taylor Feb 11 '16 at 20:15
  • 1
    See [Using enumerated data type in defining property value for individual in Protege](http://stackoverflow.com/questions/25686636/using-enumerated-data-type-in-defining-property-value-for-individual-in-protege). – Joshua Taylor Feb 11 '16 at 20:16
  • 1
    [Defining DataRange Expression in Protege for a Data Type Property](http://stackoverflow.com/q/24531940/1281433) isn't quite a duplicate, but it may be helpful. – Joshua Taylor Feb 11 '16 at 20:16
  • Did you end up finding a solution for this? – Joshua Taylor Jun 20 '16 at 14:11

1 Answers1

2

I don't seem to be able to find an exact duplicate question, though I think that this may have been asked before. In Protege, you can use a datatype expression to represent an enumeration of literals. In your case, you can add a range and use the expression:

        {"Red", "Green", "Blue"}

Joshua Taylor
  • 84,998
  • 9
  • 154
  • 353
  • 2
    For the record, this doesn't work in Protege 5 beta 21. It has been fixed in the current trunk https://github.com/protegeproject/protege/issues/308 – Ignazio Feb 13 '16 at 10:13