Igor Perko | 2 Jul 2007 00:25
Picon

SPARQL and database end

Hello,

 

I saved an ontology in a database, joust to find, that some selects which worked well with a flat file, return errors in the line Queryresults.hasNext().

Otherwise I can’t find any difference between the ontologies.

I also find the Open SPARQL…. grayed-out.

 

Any Idea?

 

Regards,

Igor

 

_______________________________________________
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 
Igor | 2 Jul 2007 08:26
Picon

Re: SPARQL in a Database

Tania Tudorache <tudorache <at> stanford.edu> writes:

> 
> Igor,
> 
> How are you executing the SPARQL queries in database mode? The menu 
> "Open SPARQL panel" should be disabled...
> 
> Initially, the SPARQL queries worked with JenaOWLModels (i.e. files 
> mode), but I have just tested them in database mode and it seems that 
> they work fine. I'll do some more testing and I will enable the menu 
> item for database mode if everything is fine.
> 
> I have tested the following query in database mode:
> 
> SELECT ?subject ?object
> WHERE { ?subject rdf:first ?object }
> 
> and it worked fine. Can you send us the query which did not work? Do you 
> have a prefix and namespace declaration for "rdf" in the MetadataTab?
> 
> Cheers,
> Tania
> 
> Igor Perko wrote:
> >
> > Hello,
> >
> >  
> >
> > I am trying to use SPARQL in a database and it works, as long I don't 
> > try to use rdf: in my where sentences.
> >
> > Is this connected with imported ontologies?
> >
> >  
> >
> > I wolud realy appreciate a good hint.
> >
> >  
> >
> > Igor
> >
> >  
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > 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 
> >   
> 
> _______________________________________________
> 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 
> 
> 

Hello Tania,

first I am sorry for the late response and that I opened a similar question 
yesterday, but the problem remains almost the same.

I am trying to run Select statements trough java, 
using AbstractOWLModel
SPARQLQueryResults
and QueryExecution.

I Tried with several ontologies, 
for instance
PeriodicTable.owl

where statements as:

SELECT ?subject ?object
WHERE { ?subject rdf:first ?object }

behave OK, bit statements as 

"PREFIX table: <http://www.daml.org/2003/01/periodictable/PeriodicTable#> " +
        "SELECT ?GroupName ?ElementName ?Symbol " +
        "FROM :table " +
            "{  ?element table:symbol ?Symbol;                      " +
            "table:name ?ElementName}";

from a file returns some results, on an identical database instance returns 
null...

Is there a general recommendations on which classes to use with database saved 
ontologies or did I forgot something?

If it would help I could send a java script.

Thank you,
Igor

_______________________________________________
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 

Oylum Alatlı | 2 Jul 2007 12:53
Picon

Converting SPARQL queries to DIG queries

Hello,

In the application I am currently working on I want to translate incoming SPARQL queries to DIG queries. I parsed the queries, but I do not have a complete idea on how to do that.

Could someone please help me?


Thanks in advance.


Oylum

_______________________________________________
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 
Neoflex | 2 Jul 2007 15:43
Picon

SWRL pb with hasNumberOfProperties

Hi,

I couldn't get the builtin hasNumberOfProperties work.
According to protégé the syntax is good but it seems like Jess can't
deels with it. Any idea of a solution to my problem ?

my rule :

Parent(?p)  ∧  abox:hasNumberOfProperties(?n, ?p, isTheParentOf)  ∧
swrlb:greaterThanOrEqual(?n, 2)  → hasABigFamily(?p,true)

the error message :

"Exception importing SWRL rules and OWL knowledge:
edu.stanford.smi.protegex.owl.swrl.bridge.jess.exceptions.SWRLJessBridgeException:
Jess reported an error in routine invokeSWRLBuiltIn
	while executing (invokeSWRLBuiltIn rule1 abox:hasNumberOfProperties 0
nil ?p isTheParentOf)
	while executing rule LHS (Node2)
	while executing rule LHS (TECT)
	while executing (assert (MAIN::Parent (name roger))).
  Message: Error invoking built-in from Jess: unresolved built-in
method 'abox:hasNumberOfProperties' in rule rule1'.
edu.stanford.smi.protegex.owl.swrl.bridge.builtins.abox.SWRLBuiltInLibraryImpl.hasNumberOfProperties(java.util.List).
  Program text: ( assert ( Parent ( name roger ) ) )  at line 1."

Thanx

Valentin
_______________________________________________
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 
Cesbron, Brice | 2 Jul 2007 16:09
Favicon

Question about ontologies, database and everything else...

Hello everyone,
 
There is something I don't understand in OWL in general :
 
    - When an ontology has been done, checked with reasonner, classified, modeled (correctly) with Ontoviz, what do you do with ?
 
I though that insert it in a database was the way... so I used Protege with a MySQL database. I hoped to have a database in which I could insert data and execute SPARQl queries but it's not the case... Protege doesn't assume SPARQL queries on database.
Moreover, the database generated is strange :
    - Only 1 table
    - 9 columns with useless name (to me)
    - Only few datas recognizable, other are numbers...
 
I'm (completly) lost, I don't know what to do...so if s.o can help me to reach the next points please :
    - How to insert data in my MySQL database ?
    - How to execute SPARQL queries on data inserted?
 
My goal is to share a global ontology model (thanks to the database so) where different people insert their datas in and use queries on...
    - Am I on the wrong way to do it? or not?
 
Please, explain me in detail because I think I won't understand a non step by step explanation. :(
 
Thanks in advance.
 
Brice Cesbron
Capgemini Marseille - France
 
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.

_______________________________________________
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 
Martin O'Connor | 2 Jul 2007 23:40
Picon
Favicon

Re: SWRL pb with hasNumberOfProperties


The built-in is 'tbox:hasNumberOfPropertyValues' [1]. Perhaps you are 
using an older version of the 3.3 beta?

Also, as per the warning in their documentation [2], you should not be 
using these built-ins in rules that infer new knowledge if you are 
concerned about correctness. They should be used in queries only.

Martin

[1] http://protege.cim3.net/cgi-bin/wiki.pl?SWRLABoxBuiltIns
[2] http://protege.cim3.net/cgi-bin/wiki.pl?SWRLABoxBuiltIns#nid90D

Neoflex wrote:

> Hi,
>
> I couldn't get the builtin hasNumberOfProperties work.
> According to protégé the syntax is good but it seems like Jess can't
> deels with it. Any idea of a solution to my problem ?
>
> my rule :
>
> Parent(?p) ∧ abox:hasNumberOfProperties(?n, ?p, isTheParentOf) ∧
> swrlb:greaterThanOrEqual(?n, 2) → hasABigFamily(?p,true)
>
> the error message :
>
> "Exception importing SWRL rules and OWL knowledge:
> edu.stanford.smi.protegex.owl.swrl.bridge.jess.exceptions.SWRLJessBridgeException: 
>
> Jess reported an error in routine invokeSWRLBuiltIn
> while executing (invokeSWRLBuiltIn rule1 abox:hasNumberOfProperties 0
> nil ?p isTheParentOf)
> while executing rule LHS (Node2)
> while executing rule LHS (TECT)
> while executing (assert (MAIN::Parent (name roger))).
> Message: Error invoking built-in from Jess: unresolved built-in
> method 'abox:hasNumberOfProperties' in rule rule1'.
>
edu.stanford.smi.protegex.owl.swrl.bridge.builtins.abox.SWRLBuiltInLibraryImpl.hasNumberOfProperties(java.util.List). 
>
> Program text: ( assert ( Parent ( name roger ) ) ) at line 1."
>
> Thanx
>
> Valentin
>
>------------------------------------------------------------------------
>
>_______________________________________________
>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 
>  
>

_______________________________________________
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 
adasal | 3 Jul 2007 00:50
Picon
Gravatar

Re: Question about ontologies, database and everything else...

You need to do some research into RDF/OWL data stores. There are different layers.
Here are some toolkits and db implementations:-
Jena http://jena.sourceforge.net/
Jena is a Java framework for building Semantic Web applications. It provides a programmatic environment for RDF, RDFS and OWL, SPARQL and includes a rule-based inference engine.
Redland http://librdf.org/
Redland is a set of free software libraries that provide support for the Resource Description Framework (RDF).
Sesame http://openrdf.org/ Sesame is an open source RDF framework with support for RDF Schema inferencing and querying.
There are others. You may want to note the difference between Triple and Quad store (named graph implementations using a forth property in Sesame known as context.)
You have checked your Ontology with a reasoner, but that is just one use of a reasoner. The usage and implementation of reasoners is an open issue. They are being improved and extended all the time, with different implementations offering different features achieved with very different algorithms.
A search on google for prolog open world cuts to the chase on this one.
It turns up a paper from Institute AIFB, Universitat Karlsruhe, Germany http://64.233.183.104/search?q=cache:nNFv3-6jpMkJ:www.aifb.uni-karlsruhe.de/WBS/phi/resources/publications/prowlog.pdf+prolog+open+world&hl=en&ct=clnk&cd=2

Abstract: The W3C standard OWL provides a decidable language for representing ontologies. While its use is rapidly spreading, efforts are being made by researchers worldwide to augment
OWL with additional expressive features or by interlacing it with other forms of knowledge representation, in order to make it applicable for even further purposes. In this paper, we integrate OWL with one of the most successful and most widely used forms of knowledge representation, namely Prolog, and present a hybrid approach which layers Prolog on top of OWL in such a way that the open-world semantics of OWL becomes directly accessible within the Prolog system.

In other words Prolog has a lot to offer, but it uses closed world reasoning. I am sure this paper would throw light on the whole issue.
So what does one do with an ontology? I would have thought the very least would be inference, for instance the type of a new datum, or missing data - an expected type.
What are you doing with your ontology?
Adam


On 02/07/07, Cesbron, Brice <brice.cesbron <at> capgemini.com > wrote:
Hello everyone,
 
There is something I don't understand in OWL in general :
 
    - When an ontology has been done, checked with reasonner, classified, modeled (correctly) with Ontoviz, what do you do with ?
 
I though that insert it in a database was the way... so I used Protege with a MySQL database. I hoped to have a database in which I could insert data and execute SPARQl queries but it's not the case... Protege doesn't assume SPARQL queries on database.
Moreover, the database generated is strange :
    - Only 1 table
    - 9 columns with useless name (to me)
    - Only few datas recognizable, other are numbers...
 
I'm (completly) lost, I don't know what to do...so if s.o can help me to reach the next points please :
    - How to insert data in my MySQL database ?
    - How to execute SPARQL queries on data inserted?
 
My goal is to share a global ontology model (thanks to the database so) where different people insert their datas in and use queries on...
    - Am I on the wrong way to do it? or not?
 
Please, explain me in detail because I think I won't understand a non step by step explanation. :(
 
Thanks in advance.
 
Brice Cesbron
Capgemini Marseille - France
 
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.


_______________________________________________
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


_______________________________________________
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 
Leonardo Ayres | 3 Jul 2007 00:54
Picon

Modelling a new OWLClass

How can i model a class that is a especialization of another class like that


Class A 
     hasPropertyName
     hasPropertyValue


Class B => (A and hasPropertyName.P and hasPropertyValue.v1) and (A and hasPropertyName.P and hasPropertyValue.v2)


 class B equivalents a intersection of two classes A that has the same value on hasPropertyName

Anybody can help?


Thanks


_______________________________________________
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 
Tania Tudorache | 3 Jul 2007 01:26
Picon
Favicon

Re: SPARQL and database end

Igor,

What version of Protege are you using? In the latest Protege beta, the 
SPARQL query menu item is enabled in database mode.

Can you send me the SPARQL query that did not work right in database mode?

Thanks,
Tania

Igor Perko wrote:
>
> Hello,
>
> I saved an ontology in a database, joust to find, that some selects 
> which worked well with a flat file, return errors in the line 
> Queryresults.hasNext().
>
> Otherwise I can’t find any difference between the ontologies.
>
> I also find the Open SPARQL…. grayed-out.
>
> Any Idea?
>
> Regards,
>
> Igor
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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 
>   

_______________________________________________
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 

Leonard Chan | 3 Jul 2007 02:16
Picon
Favicon

Anyone using Velociowl?

I'm using the velocity tab (velociowl -
http://www.mcoletti.net/dev/iskb/velociowlPlugin.html)
to generate some custom HTML/XML/SVG.  Velocity
template engine is easy to use, but I've come across
some issues (e.g. when a data property is null, it
just crashes with a null pointer exception).  Anyone
else using velociowl - would like to share some
experience.

Also, what else do you guys use to generate custom
reports/HTML/XML/SVG aside from writing Java codes?

       
____________________________________________________________________________________
Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out.
http://answers.yahoo.com/dir/?link=list&sid=396545469
_______________________________________________
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 


Gmane