Search Mailing List Archives
[protege-owl] create owl
tredmond at stanford.edu
Thu Feb 23 10:56:39 PST 2012
On 02/23/2012 06:14 AM, jamelmharsi wrote:
> i didn't understand very well because i still beginner in this topic
> what i want is a method when i call it with URI, it give me an owl file
> what i want is this method "create_owl_File"
If this is your only requirement then I suggest that you
1. remove all jar files other than the owlapi-bin.jar from
owlapi.sourceforge.net from your classpath and buildpath.
2. adapt the code that I sent you a little while back to your purpose.
The code you need looks like this:
OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
OWLOntology ontology = manager.createOntology(IRI.create(NS));
manager.saveOntology(ontology, IRI.create(new File(LOCATION)));
The reason you had trouble with it is that last time you resolved the
IRI class to an IRI class found in a jena jar file. If you remove all
the jar files other than the owlapi-bin.jar file from your buildpath
then the only IRI class you will find is the one supplied by the
Manchester OWL api. The IRI.create method also takes a URI object as a
> View this message in context: http://protege-ontology-editor-knowledge-acquisition-system.136.n4.nabble.com/create-owl-tp4396842p4413962.html
> Sent from the Protege OWL mailing list archive at Nabble.com.
> protege-owl mailing list
> protege-owl at lists.stanford.edu
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the protege-owl