joker in N3 queries

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

joker in N3 queries

Jean-Marc Vanel-2

Hi

Would it make sense to add some kind of joker in N3 queries ?
What do I mean with "joker" ?

Something like :

?X a  myPrefix:* .

where * stands for any resource name in that namespace .

I guess the answer is no ...
Indeed, there is nothing like that in http://www.w3.org/TeamSubmission/n3/ .

My use case is the following . I'm using Euler Proof Mechanism
<http://eulersharp.sourceforge.net/> with its new Coherent Logic
engine to infer (or instantiate if you prefer) Java objects
represented by triples such as :

_:sk2 a http://java.sun.com/class#myPackage_MyClass .

and I'd like to get hold of all those triples by this query :
?X a http://java.sun.com/class#* .

The alternative for me would be to assert all subClassOf relations for
the Java classes I use , and query this :
?X a http://java.sun.com/class#java_lang_Object .

Any idea welcome.

Notes:
- I tried to find "standard" URI's for representing Java classes but couldn't
- I was obliged to use underscore instead of point as a separator of
Java packages because CWM ( and Euler ) refuse points in Qnames

--
Jean-Marc Vanel
http://jmvanel.free.fr/

Reply | Threaded
Open this post in threaded view
|

Re: joker in N3 queries

Henry Story-2

I think what you would like is cwm enhanced with POWDER rules. Then  
you could express that using it's vocab.

http://www.w3.org/2007/powder/

There would then be a question as to whether adding shortcuts to the  
N3 language to make that easier to express would be a good idea.

Henry

On 8 Sep 2008, at 10:57, Jean-Marc Vanel wrote:

>
> Hi
>
> Would it make sense to add some kind of joker in N3 queries ?
> What do I mean with "joker" ?
>
> Something like :
>
> ?X a  myPrefix:* .
>
> where * stands for any resource name in that namespace .
>
> I guess the answer is no ...
> Indeed, there is nothing like that in http://www.w3.org/TeamSubmission/n3/ 
>  .
>
> My use case is the following . I'm using Euler Proof Mechanism
> <http://eulersharp.sourceforge.net/> with its new Coherent Logic
> engine to infer (or instantiate if you prefer) Java objects
> represented by triples such as :
>
> _:sk2 a http://java.sun.com/class#myPackage_MyClass .
>
> and I'd like to get hold of all those triples by this query :
> ?X a http://java.sun.com/class#* .
>
> The alternative for me would be to assert all subClassOf relations for
> the Java classes I use , and query this :
> ?X a http://java.sun.com/class#java_lang_Object .
>
> Any idea welcome.
>
> Notes:
> - I tried to find "standard" URI's for representing Java classes but  
> couldn't
> - I was obliged to use underscore instead of point as a separator of
> Java packages because CWM ( and Euler ) refuse points in Qnames
>
> --
> Jean-Marc Vanel
> http://jmvanel.free.fr/
>


Reply | Threaded
Open this post in threaded view
|

Re: joker in N3 queries

Andrea Perego
In reply to this post by Jean-Marc Vanel-2

Probably you're looking for something like:

?X a [ log:uri [ string:startsWith "http://java.sun.com/class#" ] ] .

This is similar to what POWDER rules are meant for, as pointed out by
Henry [1].

Hope this helps

Andrea

[1]http://lists.w3.org/Archives/Public/public-cwm-talk/2008JulSep/0010.html


Jean-Marc Vanel wrote:

> Hi
>
> Would it make sense to add some kind of joker in N3 queries ?
> What do I mean with "joker" ?
>
> Something like :
>
> ?X a  myPrefix:* .
>
> where * stands for any resource name in that namespace .
>
> I guess the answer is no ...
> Indeed, there is nothing like that in http://www.w3.org/TeamSubmission/n3/ .
>
> My use case is the following . I'm using Euler Proof Mechanism
> <http://eulersharp.sourceforge.net/> with its new Coherent Logic
> engine to infer (or instantiate if you prefer) Java objects
> represented by triples such as :
>
> _:sk2 a http://java.sun.com/class#myPackage_MyClass .
>
> and I'd like to get hold of all those triples by this query :
> ?X a http://java.sun.com/class#* .
>
> The alternative for me would be to assert all subClassOf relations for
> the Java classes I use , and query this :
> ?X a http://java.sun.com/class#java_lang_Object .
>
> Any idea welcome.
>
> Notes:
> - I tried to find "standard" URI's for representing Java classes but couldn't
> - I was obliged to use underscore instead of point as a separator of
> Java packages because CWM ( and Euler ) refuse points in Qnames
>
> --
> Jean-Marc Vanel
> http://jmvanel.free.fr/