Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] create owl

Timothy Redmond 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
> like
> "create_owl_File(uri);"
> 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 
parameter.

-Timothy


>
>
> --
> 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
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-owl/attachments/20120223/f2a37f66/attachment.html>


More information about the protege-owl mailing list