Thank you for your reply, I’m really glad you understood my question ! and your 
reply was very helpful

I refactored my data to make “freezes” children of the “Pug-2” LDPC and 
modified my query, I can get what I need now.

Many thanks for taking the time

Alan

From: Sergio Fernández [mailto:wik...@apache.org]
Sent: Thursday, July 23, 2015 1:06 AM
To: users@marmotta.apache.org
Subject: Re: LDPath Query

Hi Alan

On Wed, Jul 22, 2015 at 9:16 AM, Robson, Alan 
<alan.rob...@viasat.com<mailto:alan.rob...@viasat.com>> wrote:
I’d like a single query to return all the freezes for a system specified by its 
fqdn in one shot (ie. if possible not have to query to collect the resources 
with that fqdn (eg sys:Pug-2) followed by a separate query to get the freezes 
that are rdf:about sys:Pug-2)

First of all LDPath is a resource-centered query language: you start with a 
context resource and then you follow paths. For such kind of queries " return 
all the freezes for a system" maybe SPARQL would give your better 
expressiveness. Check it out in Marmotta, please.


I have two questions…

1)      How can I select cal:dtstart and cal:dtend times for freezes belonging 
to the  freeze matching rdf:about[crtv:fqdn is "pug.local"]  ? I can see how I 
can select rdf:about, but not the other fields in the freeze record
Because at that point you already walked the path, you're already in the 
rdf:about, and you can' t go back to the parent.

Jakob, do we have any trick for such construction?


2)      How can I group the results together ?  If I mess with it I can get a 
list of start times, a list of end times or even a big list of start and end 
times mixed together, but I can’t figure a way to get a list of pairs of start 
and end times that go together, one for each “Freeze”. Maybe I have just 
structured the data wrongly.
I guess this is something easier to query with SPARQL...

I'd recomend you to take a look to the language specification:

  
http://marmotta.apache.org/ldpath/language<https://urldefense.proofpoint.com/v2/url?u=http-3A__marmotta.apache.org_ldpath_language&d=BQMFaQ&c=jcv3orpCsv7C4ly8-ubDob57ycZ4jvhoYZNDBA06fPk&r=xN9AnMDZvO_QvUZQZcoply6WFqSJuNcpv-dDu2fA4Ac&m=6dKkc45v-VtUhr8N5yVvFxs6iUwTMsTmXkBxiLJxep8&s=Ac2ojgwD6rw2P_hogJwTlLr30Dqycnd0LS1wvnIhEmQ&e=>

Sorry for not being so helpful. If Jakob jumps in he could probably help you 
more, since he is the expert on LDPath.

Cheers,

--
Sergio Fernández
Partner Technology Manager
Redlink GmbH
m: +43 6602747925
e: sergio.fernan...@redlink.co<mailto:sergio.fernan...@redlink.co>
w: 
http://redlink.co<https://urldefense.proofpoint.com/v2/url?u=http-3A__redlink.co_&d=BQMFaQ&c=jcv3orpCsv7C4ly8-ubDob57ycZ4jvhoYZNDBA06fPk&r=xN9AnMDZvO_QvUZQZcoply6WFqSJuNcpv-dDu2fA4Ac&m=6dKkc45v-VtUhr8N5yVvFxs6iUwTMsTmXkBxiLJxep8&s=UpfBfd6ivLMSjRuXEcQGhTt2w_mcxsScwEfwS7BVjWM&e=>

Reply via email to