Is there a way to load an ontology from string using OWL API?
Asked
Active
Viewed 151 times
0
-
From a string you can get a ByteArrayInputStream, so if you can load from an input stream, you can load from a string. – Joshua Taylor Jun 09 '15 at 21:37
-
E.g., see [How do I convert a String to an InputStream in Java?](http://stackoverflow.com/q/782178/1281433) – Joshua Taylor Jun 09 '15 at 21:38
-
Then you can use the method [loadOntologyFromOntologyDocument(InputStream)](http://goo.gl/F7KGzF). – Joshua Taylor Jun 09 '15 at 21:40
-
There it tries to create an IRI from which the document can be read. – user1364591 Jun 09 '15 at 21:40
-
No, I didn't mean load from the string. I mean create a bytearrayinputstream from the string, and then load the ontology from the input stream with loadOntologyFromOntologyDocument. – Joshua Taylor Jun 09 '15 at 21:41