I'm working on an ontology and I need to tell protege that one class x can only have the values y and z.
I want something like:
Vegetable rdf:type owl:Class;
owl:oneOf (carrot corn).
Must I edit the file directly or is there a way to do it via Protege?
In the Class Description you should choose "Equivalent To" option and in Class Expression editor write the comma-separated list of the individuals in curly brackets. In your example:
Vegetable equivalentTo {carrot,corn}