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    

[p4-feedback] How can I get Matching Values?

Timothy Redmond tredmond at stanford.edu
Tue Jan 24 12:19:36 PST 2012


Your errors aren't coming through for some reason.

> Apparently, if I remove the  org.apache.commons.lang import package from my
> MANIFEST file, it will run without errors. But is it ok?

This is probably ok but it is a bit strange.

> Moreover, I searched for a guide/tutorial on how to make programmatically
> sparql queries for protege4 and I could not find something.

There is no documentation yet.  There is a library (that is included in 
the latest Protege 4.2) that makes this relatively easy.  Almost all the 
code for how to do this is contained in http://goo.gl/2JRoq.  The 
OwlTripleStore object is an object that maintains an openrdf sesame 
(openrdf.org) in-memory triple store model that corresponds to an OWL 
ontology (or set of OWL ontologies).  It can be kept in sync with the 
OWL ontology so that changes made to the OWL ontology are reflected in 
the triple store (but not vice versa - that is harder).  To make a 
SPARQL query you use the openrdf api and there is an example of this in 
the executeQuery method of http://goo.gl/2JRoq.

Also - I don't know what you are making - you don't need Protege to 
either do the SPARQL queries.  It was important to me that I keep the 
library that manages the OWL to rdf mapping as a separate library that 
can be used without installing Protege or using Protege libraries.

> Also, if you have something else to suggest me for quick searching, please
> do... I'm running out of options...

Actually if it is feasible it would be nice to see your ontology.  If it 
is private and you want to you could send it out of line.  I am curious 
as to why the behavior of the dl query was slow even though you said 
that the ontology was small.  This situation is very possible but it is 
not the norm.

Are you trying to handle a wide variety of queries as scripted by a user 
or do you have a small set of queries that you want to be able to ask?  
In the latter case, as a programmer you could use the OWL api to walk 
through the ontology to find what you want.

-Timothy

On 1/24/12 11:45 AM, Jen1234 wrote:
> I did included a part of it, but here it is full this time:
>
>
>
> Apparently, if I remove the  org.apache.commons.lang import package from my
> MANIFEST file, it will run without errors. But is it ok?
>
> Moreover, I searched for a guide/tutorial on how to make programmatically
> sparql queries for protege4 and I could not find something. Tutorial code
> for protege3 doesn't work (apparently again as there are different
> libraries, but I thought I should give it a chance)
>
> Also, if you have something else to suggest me for quick searching, please
> do... I'm running out of options... As I said before, I want to be able to
> search through the entire ontology. For example what's Mike's proffesor's
> name? Or get all papers containing the word "semantic". Then, for each of
> the results retrieved (a Person or Paper instance for the example), I want
> to get all the related classes/individuals and show the corresponding graph
> on ontograf plug-in. I want this to be quick and be able to search not only
> in classes/individuals but also in all values of the ontology data
> properties.
>
> Once again, thank you for your time,
> Jen
>
> --
> View this message in context: http://protege-ontology-editor-knowledge-acquisition-system.136.n4.nabble.com/How-can-I-get-Matching-Values-tp3776060p4324937.html
> Sent from the Protege 4 Feedback mailing list archive at Nabble.com.
> _______________________________________________
> p4-feedback mailing list
> p4-feedback at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/p4-feedback



More information about the p4-feedback mailing list