How to insert Individuals with special symbol (colon, brackets etc.) with OWL API !!!!

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to insert Individuals with special symbol (colon, brackets etc.) with OWL API !!!!

SWRLMamba
Hi All,

I have a question about Owl API. I want to use OWL API to insert an individual:

OWLNamedIndividual NamedIndividual = dataFactory.getOWLNamedIndivieual(IRI.create(prefix + "#"+"ch10:18766(pf6)"))

It does not give error when inserting. However, when I want to open the owl file, Protege gives the error:

"prefix#ch10:18766(pf6)" cannnot be resolved against IRI:prefix.

So I am wondering how to insert an individual with like colon, brackets and so on. Do I need to add any special symbol around the individual ? 

Thanks a lot,

Feichen

_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback
Reply | Threaded
Open this post in threaded view
|

Re: How to insert Individuals with special symbol (colon, brackets etc.) with OWL API !!!!

Steve Wartik
That colon is going to cause you problems when you use prefixes. Replace it with the hex equivalent (%3A, I believe).
________________________________________
From: [hidden email] [[hidden email]] On Behalf Of Shen, Feichen (UMKC-Student) [[hidden email]]
Sent: Thursday, July 04, 2013 3:24 PM
To: Protege 4.x support and discussion
Subject: [p4-feedback] How to insert Individuals with special symbol (colon, brackets etc.) with OWL API !!!!

Hi All,

I have a question about Owl API. I want to use OWL API to insert an individual:

OWLNamedIndividual NamedIndividual = dataFactory.getOWLNamedIndivieual(IRI.create(prefix + "#"+"ch10:18766(pf6)"))

It does not give error when inserting. However, when I want to open the owl file, Protege gives the error:

"prefix#ch10:18766(pf6)" cannnot be resolved against IRI:prefix.

So I am wondering how to insert an individual with like colon, brackets and so on. Do I need to add any special symbol around the individual ?

Thanks a lot,

Feichen

_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback