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-discussion] Ontology based applications!!

Michael Rusch mcrusch at wisc.edu
Thu Aug 20 09:22:34 PDT 2009


Disclaimer: I'm speaking from 3.4.1 experience--not sure how much has 
changed.

You can store your ontology in a .owl file, or in a database.  I have no 
experience putting it in a database, so I just use the .owl file.  For 
my program, I put the .owl file in the classpath under a package that 
made sense to me, and then I had my code find it in the classpath:

/*
  * This is in a class in the same package as model.owl:
  */
private static final String RESOURCE_NAME = "model.owl";
/*
  * This is in a method in that class:
  */
InputStream stream = this.getClass().getResourceAsStream(RESOURCE_NAME);
OWLModel owlModel =
	ProtegeOWL.createJenaOWLModelFromInputStream(stream);

If you want to read from a different package, you can fully qualify 
RESOURCE_NAME.

There's also a ProtegeOWL static method for loading the model from a 
URI, and maybe others.

One thing I found is that there are often these different "qualifiers" 
in the class and method names that I don't understand.  For example, 
this says create-JENA-model...  What is the difference between a Jena 
model and another?  I don't know, but in experience it seems like it 
often doesn't matter, it all just works.  I'm sure others know much more 
than I.

 From there, it's a lot of playing around with the API.  Keep in mind 
that you are working with in-memory objects, so they are not saved back 
to the OWL file.  I'm not sure how things work if you're accessing it in 
a db.

Also, there isn't a ton you can do just with a model.  You can find 
classes, get super and subclasses and do some basic manipulation.  For 
any more advanced reasoning, you have to use a reasoner.  There's a 
tutorial about using the protege reasoner api.

One more tip: if you are in a position where you know this can somehow 
help you solve your problem, but you're not sure how, I suggest playing 
around in Protege before trying to hook stuff up to Protege.  Just about 
anything you can do through the API, there is a way to do in the 
interface.  Once you know how to do it in the interface, it's easier to 
figure out how to do it in the API.

Hope this helps...

Michael

Sohaib Ahmed wrote:
> Hi All!!
> 
> Thanx for Tim and Michael for ur replys.. but i think so i m not much 
> clear in describing my problem..anywayz..i will try again to explain in 
> a simplied form..
> 
> "I want to develop a adaptive learning management system by using 
> ontologies"... (Goal)
> 
> Now the question arises...how i can develop ontology...so Protege 4.0 
> can help me in this regard..right After developing ontology in Protege 
> 4.0 then i want to develop a system how i can do that...after googling i 
> found two APIs...Jena API and OWL API ...Now my question is that...
> 
> Can you plz guide me how i can implement an existing ontology (developed 
> in Protege 4.0) means a file present somewhere in my system with .owl 
> extension..by using that particular ontology i want to develop a 
> system...Is there any tutorial available which can be helpful in this 
> regard...
> 
> As far as my research goal is concerned, i want to see whether 
> ontologies can help in understanding different learners and their 
> behaviours or not??...
> 
> I hope i m much clear in my queries this time...
> 
> Thanking you in advance...
> 
> *Sohaib Ahmed*
> *Doctoral Candidate
> *
> 
> 
>  > From: tredmond at stanford.edu
>  > To: protege-discussion at lists.stanford.edu
>  > Date: Wed, 19 Aug 2009 09:30:27 -0700
>  > Subject: Re: [protege-discussion] Ontology based applications!!
>  >
>  >
>  > > Thanks for your reply. This documentation is definitely helpful but
>  > > i am interested in the implementation of ontology (developed in
>  > > Protege 4.0) in a real-world application. Currently, I am using OWL
>  > > API which behaves as a framework between application and the
>  > > developed ontology. Can you please tell me about any tutorial which
>  > > describes how an application can be implemented through OWL ontology
>  > > (developed in Protege 4.0)...
>  >
>  > So I didn't get this from your original post, but it sounds like you
>  > are talking about an application which uses Protege 4 capabilities
>  > (probably widgets) but which does not start anything that looks like
>  > Protege. Is your motivation to reuse some of the Protege 4 widgets in
>  > your application which will have its own (non-Protege) branding? What
>  > are the requirements that you are trying to meet by using Protege 4?
>  >
>  > If you are writing an application that uses Protege widgets but which
>  > has its own branding, then, as far as I know, this has not been done
>  > yet. As was the case in Protege 3 based applications, it will
>  > probably be simplest to start with a tab plugin and then work your way
>  > to a Protege 4 based application
>  >
>  > If this is what you are looking to do then we will probably need to
>  > make some minor tweaks such as a system flag that suppresses the
>  > Protege 4 welcome screen. You will almost certainly have to work in
>  > the OSGi environment. For a new application this is not a problem but
>  > if you are embedding your application inside an existing framework
>  > then you will probably want to look at [1].
>  >
>  > -Timothy
>  >
>  >
>  > [1] http://protegewiki.stanford.edu/index.php/Embedding_OSGi
>  >
>  > On Aug 18, 2009, at 9:35 PM, Sohaib Ahmed wrote:
>  >
>  > > Hi Samson !!
>  > >
>  > > Thanks for your reply. This documentation is definitely helpful but
>  > > i am interested in the implementation of ontology (developed in
>  > > Protege 4.0) in a real-world application. Currently, I am using OWL
>  > > API which behaves as a framework between application and the
>  > > developed ontology. Can you please tell me about any tutorial which
>  > > describes how an application can be implemented through OWL ontology
>  > > (developed in Protege 4.0)...
>  > >
>  > > As far as the import problem is concerned it is also solved after
>  > > using OWL API. The link is as under:-
>  > > http://owlapi.sourceforge.net/
>  > >
>  > > please guide me in the above defined matter. Hope for the positive
>  > > response from you as always...
>  > >
>  > > Regards,
>  > >
>  > > Sohaib Ahmed
>  > >
>  > >
>  > >
>  > >
>  > >
>  > > > To: protege-discussion at lists.stanford.edu
>  > > > From: swt at stanford.edu
>  > > > Date: Tue, 18 Aug 2009 15:31:21 -0700
>  > > > Subject: Re: [protege-discussion] Ontology based applications!!
>  > > >
>  > > >
>  > > > You need to find the Protege 4 developer documentation site:
>  > > >
>  > > > http://protegewiki.stanford.edu/index.php/Protege4DevDocs
>  > > >
>  > > > Samson
>  > > >
>  > > > Sohaib Ahmed wrote:
>  > > > >
>  > > > > Hi!!
>  > > > >
>  > > > > Can anyone tell me abt how i can use ontology in JAVA IDEs like
>  > > Net
>  > > > > beans or Eclipse which is developed in Protege 4.0 . I came
>  > > across few
>  > > > > tutorials and web pages used Protege 3.x instead of Protege
>  > > 4.0.. and
>  > > > > similarly if i want to import
>  > > "edu.stanford.smi.protegex.owl.model" as
>  > > > > mentioned in most of the tutorials.. How i can import in Protege
>  > > 4.0
>  > > > > which i cant able to find in Protege 4.0 because there are limited
>  > > > > number of jars files present. so plz help me in this regard...or
>  > > if any
>  > > > > one tell me any tutorial which can help me in understanding to
>  > > develop
>  > > > > applications by Protege 4.0 ontologies...
>  > > > >
>  > > > > Thanking you in advance
>  > > >
>  > > > _______________________________________________
>  > > > protege-discussion mailing list
>  > > > protege-discussion at lists.stanford.edu
>  > > > https://mailman.stanford.edu/mailman/listinfo/protege-discussion
>  > > >
>  > > > Instructions for unsubscribing: 
> http://protege.stanford.edu/doc/faq.html#01a.03
>  > >
>  > > check out the rest of the Windows Live™. More than mail–Windows
>  > > Live™ goes way beyond your inbox. More than messages
>  > > _______________________________________________
>  > > protege-discussion mailing list
>  > > protege-discussion at lists.stanford.edu
>  > > https://mailman.stanford.edu/mailman/listinfo/protege-discussion
>  > >
>  > > Instructions for unsubscribing: 
> http://protege.stanford.edu/doc/faq.html#01a.03
>  >
>  > _______________________________________________
>  > protege-discussion mailing list
>  > protege-discussion at lists.stanford.edu
>  > https://mailman.stanford.edu/mailman/listinfo/protege-discussion
>  >
>  > Instructions for unsubscribing: 
> http://protege.stanford.edu/doc/faq.html#01a.03
> 
> ------------------------------------------------------------------------
> With Windows Live, you can organize, edit, and share your photos. 
> <http://www.microsoft.com/middleeast/windows/windowslive/products/photo-gallery-edit.aspx>
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> protege-discussion mailing list
> protege-discussion at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-discussion
> 
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03



More information about the protege-discussion mailing list