Help

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Help

Subashini Hari Kumar
Hello friends,
   
  I have constructed an ontology for student model using Protege and represented in RDF.  Now I want to query it using SPARQL query language. I would like to do this through a Java program.  Please tell me how to embed a SPARQL query in a Java program.
   
  Thanking in advance,
   
  Subashini

                               
---------------------------------
 Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: Help

Blais, Curt USA


Download Jena -- http://jena.sourceforge.net/ARQ/
Or see http://protege.stanford.edu/plugins/owl/sparql.html

Curt

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of
Subashini Hari Kumar
Sent: Tuesday, April 25, 2006 8:31 PM
To: [hidden email]
Subject: [protege-discussion] Help

Hello friends,
   
  I have constructed an ontology for student model using Protege and
represented in RDF.  Now I want to query it using SPARQL query language.
I would like to do this through a Java program.  Please tell me how to
embed a SPARQL query in a Java program.
   
  Thanking in advance,
   
  Subashini

                               
---------------------------------
 Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.

------------------------------------------------------------------------
-
To unsubscribe go to
http://protege.stanford.edu/community/subscribe.html


-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: Help

Tania Tudorache
In reply to this post by Subashini Hari Kumar

Hi Subashini,

you can use the executeSPARQLQuery method from the OWLModel interface
for this. Below is the javadoc for it:

   /**
     * Executes a SPARQL query on this OWLModel.
     * The method will internally add prefix declarations according to
the current
     * namespace declarations.
     * The resulting QueryResults object can be used to iterate over the
results.
     *
     * @param partialQueryText the query text, typically beginning with
"SELECT"
     * @return a QueryResults object
     * @throws Exception if the query string could not be handled
     */
    QueryResults executeSPARQLQuery(String partialQueryText) throws
Exception;

Here is the link to the full javadoc:
http://protege.stanford.edu/download/prerelease_javadoc_owl/edu/stanford/smi/protegex/owl/model/OWLModel.html#executeSPARQLQuery(java.lang.String)

Tania



Subashini Hari Kumar wrote:

>Hello friends,
>  
>  I have constructed an ontology for student model using Protege and represented in RDF.  Now I want to query it using SPARQL query language. I would like to do this through a Java program.  Please tell me how to embed a SPARQL query in a Java program.
>  
>  Thanking in advance,
>  
>  Subashini
>
>
>---------------------------------
> Jiyo cricket on Yahoo! India cricket
>Yahoo! Messenger Mobile Stay in touch with your buddies all the time.
>
>-------------------------------------------------------------------------
>To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>
>
>  
>

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: Help

Subashini Hari Kumar
Thank you very much Tania

Tania Tudorache <[hidden email]> wrote:  
Hi Subashini,

you can use the executeSPARQLQuery method from the OWLModel interface
for this. Below is the javadoc for it:

/**
* Executes a SPARQL query on this OWLModel.
* The method will internally add prefix declarations according to
the current
* namespace declarations.
* The resulting QueryResults object can be used to iterate over the
results.
*
* @param partialQueryText the query text, typically beginning with
"SELECT"
* @return a QueryResults object
* @throws Exception if the query string could not be handled
*/
QueryResults executeSPARQLQuery(String partialQueryText) throws
Exception;

Here is the link to the full javadoc:
http://protege.stanford.edu/download/prerelease_javadoc_owl/edu/stanford/smi/protegex/owl/model/OWLModel.html#executeSPARQLQuery(java.lang.String)

Tania



Subashini Hari Kumar wrote:

>Hello friends,
>
> I have constructed an ontology for student model using Protege and represented in RDF. Now I want to query it using SPARQL query language. I would like to do this through a Java program. Please tell me how to embed a SPARQL query in a Java program.
>
> Thanking in advance,
>
> Subashini
>
>
>---------------------------------
> Jiyo cricket on Yahoo! India cricket
>Yahoo! Messenger Mobile Stay in touch with your buddies all the time.
>
>-------------------------------------------------------------------------
>To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>
>
>
>

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html



                               
---------------------------------
 Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html