Reputation: 93
In the SWRL Tab in Protege I am trying to write a rule, but I can only do so with classes that don't have spaces in them. For example, I have a class called "equipment" in my ontology, so I can do this with no errors:
equipment(?x)
I also have a class called "machine tool". Because this class a space in its name, it says "Invalid SWRL atom predicate 'machine'" when I do this:
machine tool(?x)
I tried using an underscore instead of a space but that didn't work. I also tried putting machine tool and quotes as follows but then it says " Unexpected character ''' ":
'machine tool'(?x)
How do I refer to a class if it the class name has a space in it? Is there some way I can refer to it with the URI instead?
Upvotes: 1
Views: 341
Reputation: 93
OK I figured it out. I had to update the SWRLTab plugin in Protege and then I could refer to the class by its URI as follows:
msdl:MSDL_0000070(?x)
Upvotes: 1
Reputation: 10659
machine tool
is not the name of the class in your ontology, it is the value of an rdfs:label (or rdfs:comment) property attached to the class. The editor is not allowing you to use that (which would be convenient, I guess). A workaround is to find the actual IRI of the class and use that - shortened to its QName if that works.
Upvotes: 2