I am running the sample owlapi examples at: https://github.com/owlcs/owlapi/tree/master/contract/src/test/java/org/coode/owlapi/example to retrieve subclasses for a class with odd character(s). My owl file contains classes with odd characters such as /, ( but the parser seems to truncate them before the odd character and eventually throws an error. I have peeked into the ManchesterOWLSyntaxTokenizer and looks like it considers these odd characters as delimiters. Anyone else made this observation? What is the workaround? As an aside, I have tried the HermiT reasoner with similar results. Also, in Protege, if you try to add a new OWLClass name with odd character to a hierarchy, it adds single quotes around the classname. To retrieve its subclasses in 'DL Query' view, I must run it with the added single quotes around the class name. Is protege internally using a different syntax tokenizer that I can use instead of the ManchesterOWLSyntaxTokenizer that truncates class names?
1 Answers
0
votes
The / character is a delimiter in the URI specs; see http://www.ietf.org/rfc/rfc3986.txt, http://www.ietf.org/rfc/rfc3987.txt and http://www.w3.org/2004/11/uri-iri-pressrelease.
There is no workaround for classes IRIs. If you wish to use such characters in the human readable version of your class names, you can use rdfs:label
annotations, whose text can contain any character, and use rdfs:label
when displaying the classes to users.
The single quotes Protege shows represent the fact that that's the value of an rdfs:label
annotation.