[Mulgara-general] Query from restricted graphs
Ben Hysell
BenH at viewpointusa.com
Wed Aug 23 13:37:16 UTC 2006
Alex,
I'm with you...
Select $g $p $o from <rmi://...> where
$g <dc:title> 'test graph' and $g $p $o;
Or
select $g
subquery(select $p $o from <rmi://...> where g$ $p $o) from <rmi://...>
where $g <dc:title> 'test graph';
-ben
-----Original Message-----
From: apassant at gmail.com [mailto:apassant at gmail.com] On Behalf Of
Alexandre Passant
Sent: Wednesday, August 23, 2006 9:28 AM
To: Ben Hysell
Subject: Re: [Mulgara-general] Query from restricted graphs
Hi,
Actually I'm trying to retrieve all triples from any graph $g that
have dc:title = "test graph"
I consider only one model (rmi:///) that got different graphs
(http://apassant...) (I hope I use the right definition for
graph/models here :)
thanks
On 8/23/06, Ben Hysell <BenH at viewpointusa.com> wrote:
> Alex,
>
> In your query you are trying to not only find $g, but also find out
> which model (they are called models in Mulgara if we are talking about
> <rmi://192.168...>) $g exists in?
>
> -ben
>
> -----Original Message-----
> From: apassant at gmail.com [mailto:apassant at gmail.com] On Behalf Of
> Alexandre Passant
> Sent: Wednesday, August 23, 2006 9:19 AM
> To: Ben Hysell
> Cc: mulgara-general at mulgara.org
> Subject: Re: [Mulgara-general] Query from restricted graphs
>
> Hi,
>
> On 8/23/06, Ben Hysell <BenH at viewpointusa.com> wrote:
> > Alex,
> >
> > The try this:
> >
> > select $g from <rmi://192.168.0.1/server1#sampledata> where $g
> > <dc:title> 'test graph';
> >
>
> Actually, I already made this kind of query work.
> What I'd like to do is something like
>
> SELECT ?s ?p ?o
> WHERE {
> ?g dc:title 'test graph'
> GRAPH ?g { ?s ?p ?o }
> }
>
> i.e. not retrieve the graph name, but the statements from some graphs
> (in a single query).
> Is there a way to do it (as what I've tried before) ?
>
> Thanks,
>
> Alex.
>
>
> > If you navigate to http://192.168.0.1:8080 on your test machine the
> help
> > pages for Mulgara will be visible...try 'iTQL Commands' on the left
> hand
> > side of the page for structuring queries.
> >
> > -ben
> >
> > -----Original Message-----
> > From: mulgara-general-bounces at mulgara.org
> > [mailto:mulgara-general-bounces at mulgara.org] On Behalf Of Alexandre
> > Passant
> > Sent: Wednesday, August 23, 2006 5:46 AM
> > To: mulgara-general at mulgara.org
> > Subject: [Mulgara-general] Query from restricted graphs
> >
> > Hi all,
> >
> > I'm currently trying mulgura (never used kowari before), and got a
> > question regarding 'from' queries.
> >
> > I'd like to retrieve information from a set of statements constraint
> > with their properties.
> >
> > I first add all needed statements:
> >
> > create <rmi://192.168.0.1/server1#sampledata>;
> > load <http://apassant.net/blog/sioc.php?type=post&id=104>
> > into<rmi://192.168.0.1/server1#sampledata>;
> > insert <http://apassant.net/blog/sioc.php?type=post&id=104>
<dc:title>
> > 'test graph' into <rmi://192.168.0.1/server1#sampledata>;
> >
> > I'm looking for something like
> >
> > select $s $p $o from $g where $s $p $o and $g <dc:title> 'test
graph';
> > (leads to Query Error: [1,22] expecting: '(', resource )
> >
> > Is there a way to do such queries ?
> >
> > Finally, is there any difference between from and in ?
> >
> > Thanks for your help,
> >
> > Alex.
> > _______________________________________________
> > Mulgara-general mailing list
> > Mulgara-general at mulgara.org
> > http://mulgara.org/mailman/listinfo/mulgara-general
> >
>
More information about the Mulgara-general
mailing list