How to for the LDPath Test Suite?

36 views
Skip to first unread message

Matteo Busanelli

unread,
Jul 31, 2012, 12:29:00 PM7/31/12
to lmf-...@googlegroups.com
How can I use the  LDPath Test Suite for testing LDPath?
I tried but I only can see a table like the one in the attached image.

Some example on the books?

Thanx in advance.

Matteo
31-07-2012 18-27-54.png

Sebastian

unread,
Aug 3, 2012, 5:57:08 AM8/3/12
to lmf-...@googlegroups.com
Hi Matteo,

LDPath is a "rooted" query language, i.e. it always has to start at some resource and follows RDF links to other resources (which may be either local or on some remote Linked Data Server). To test what kind of results your LDPath query would yield, you simply need to give the URI of a resource where the query should start. If you click then on "test" you will see the fields in the table filled.

Greetings,

Sebastian

Jonathan Koppenhofer

unread,
Apr 9, 2013, 4:09:57 PM4/9/13
to lmf-...@googlegroups.com
Not sure I understand... I put in a resource url like "http://localhost:8080/LMF/resource/055357342X" but when I try to run, I get a 404: Not found error. What am I doing wrong?

Sergio Fernández

unread,
Apr 10, 2013, 2:31:06 AM4/10/13
to lmf-...@googlegroups.com, Jonathan Koppenhofer
Hi Jonathan,

On 09/04/13 22:09, Jonathan Koppenhofer wrote:
> Not sure I understand... I put in a resource url like
> "http://localhost:8080/LMF/resource/055357342X" but when I try to run, I
> get a 404: Not found error. What am I doing wrong?

Let's try to help you to know what's going on.. I'd need to know few things:

1) how did you "put in" the resource? Import, directly request to the
resource or how?
2) the request returns 404, but could you please inspect your data
through sparql (snorql is quite helpful on this) to actually check what
is there?

Hope we'll solve your issue.

Cheers,

--
Sergio Fern�ndez
Salzburg Research
+43 662 2288 318
Jakob-Haringer Strasse 5/II
A-5020 Salzburg (Austria)
http://www.salzburgresearch.at

Jonathan Koppenhofer

unread,
Apr 10, 2013, 6:59:11 AM4/10/13
to lmf-...@googlegroups.com, Jonathan Koppenhofer
My apologies, I should have been more clear, as I was responding to Sebastian's reply in this thread....

"http://localhost:8080/LMF/resource/055357342X" is a known good resource, and I can access it directly. My question was around how to use the LDPath Test Suite. Like the original poster Matteo, I tried to put the context url (http://localhost:8080/LMF/context/default) in, and then execute and LDPath program against it, but it retruned blank results. Sebastian mentions above that you have to give the "URI of a resource" to test the LDPath program, so I put in the url of a known resource, but it is giving me a "404: Not Found" message when I try to run the LDPath test.

I'm just confused on how to run test LDPath programs.

On Wednesday, April 10, 2013 2:31:06 AM UTC-4, Sergio Fernández wrote:
Hi Jonathan,

On 09/04/13 22:09, Jonathan Koppenhofer wrote:
> Not sure I understand... I put in a resource url like
> "http://localhost:8080/LMF/resource/055357342X" but when I try to run, I
> get a 404: Not found error. What am I doing wrong?

Let's try to help you to know what's going on.. I'd need to know few things:

1) how did you "put in" the resource? Import, directly request to the
resource or how?
2) the request returns 404, but could you please inspect your data
through sparql (snorql is quite helpful on this) to actually check what
is there?

Hope we'll solve your issue.

Cheers,

--
Sergio Fern�ndez

Sergio Fernández

unread,
Apr 10, 2013, 8:45:56 AM4/10/13
to lmf-...@googlegroups.com, Jonathan Koppenhofer
Hi,

On 10/04/13 12:59, Jonathan Koppenhofer wrote:
> My apologies, I should have been more clear, as I was responding to
> Sebastian's reply in this thread....

No worries...

> "http://localhost:8080/LMF/resource/055357342X" is a known good resource,
> and I can access it directly. My question was around how to use the LDPath
> Test Suite. Like the original poster Matteo, I tried to put the context url
> (http://localhost:8080/LMF/context/default) in, and then execute and LDPath
> program against it, but it retruned blank results. Sebastian mentions above
> that you have to give the "URI of a resource" to test the LDPath program,
> so I put in the url of a known resource, but it is giving me a "404: Not
> Found" message when I try to run the LDPath test.
>
> I'm just confused on how to run test LDPath programs.

And I think it could be normal. In LMF we use the word "context" for two
completely different concepts:

1) A context in the triple store is what SPARQL names "named graph".
This nomenclature comes from Sesame, the base framework which the KiWi
triple store in build on.

2) A context in LDPath is the root resource which is used to evaluated
the paths.

So I'd say the error is ours for putting together those two different
meanings. Hope this would have clarified a bit the issue.

Back to your concrete problem: the must use the URI of the resource as
context in your LDPath query.

Cheers

--
Sergio Fern�ndez

Jonathan Koppenhofer

unread,
Apr 10, 2013, 10:22:37 AM4/10/13
to lmf-...@googlegroups.com, Jonathan Koppenhofer
Great!!! That clears things up a bit. Thanks!!!

However, I have tried using the URI of the resource, but it is not working. That is when I am getting a "404: Not found" error. Is this a bug then? Maybe I'll dig further into the source to see what is happening.

As always, I appreciate the work you have done... really enjoying using the framework!!!
Sergio Fern�ndez

Sergio Fernández

unread,
Apr 10, 2013, 11:17:32 AM4/10/13
to lmf-...@googlegroups.com, Jonathan Koppenhofer
Hi,

On 10/04/13 16:22, Jonathan Koppenhofer wrote:
> Great!!! That clears things up a bit. Thanks!!!

Apologize for the confusion this causes. We are already aware of it, and
we would need to find a proper solution for it.

> However, I have tried using the URI of the resource, but it is not working.
> That is when I am getting a "404: Not found" error. Is this a bug then?
> Maybe I'll dig further into the source to see what is happening.

What version are you using?

I'd need to check with 2.6.0, but I've just tried with 3.0.0-SNAPSHOT,
and works fine.

Cheers,

--
Sergio Fern�ndez

Jonathan Koppenhofer

unread,
Apr 10, 2013, 1:37:12 PM4/10/13
to lmf-...@googlegroups.com, Jonathan Koppenhofer
2.6.0... maybe I'll get 3.0.0-SNAPSHOT and give it a whirl... Thanks again


On Wednesday, April 10, 2013 11:17:32 AM UTC-4, Sergio Fernández wrote:
Hi,

On 10/04/13 16:22, Jonathan Koppenhofer wrote:
> Great!!! That clears things up a bit. Thanks!!!

Apologize for the confusion this causes. We are already aware of it, and
we would need to find a proper solution for it.

> However, I have tried using the URI of the resource, but it is not working.
> That is when I am getting a "404: Not found" error. Is this a bug then?
> Maybe I'll dig further into the source to see what is happening.

What version are you using?

I'd need to check with 2.6.0, but I've just tried with 3.0.0-SNAPSHOT,
and works fine.

Cheers,

--
Sergio Fern�ndez

Sergio Fernández

unread,
Apr 10, 2013, 2:29:04 PM4/10/13
to lmf-...@googlegroups.com, Jonathan Koppenhofer
Hi Jonathan,

On 10/04/13 19:37, Jonathan Koppenhofer wrote:
> 2.6.0... maybe I'll get 3.0.0-SNAPSHOT and give it a whirl... Thanks again

No problem.

LMF 3.0.0-SNAPSHOT is only available from the code, so you'd need Maven
[1] to build it from the code. Please, take into account what SNAPSHOT
means, specially in this concrete version, which we extracted some core
parts to Apache Marmotta [2]. Also because Jakob is currently upgrading
the Semantic Search engine to use the latest Solr version, so you may
face some issues with that module.

If you are only using the Linked Data capabilities (RDF, SPARQL, LDPath
and so on), i.e. not using the Semantic Search, you could give a try
directly to Marmotta. Just these days we are preparing the first release
there, staging available at [3].

Please, do not hesitate to contact us for any issue you find. Although
you can continue using this list for everything related with LMF (we'll
manage to forward the issues when necessary), those things particularly
related to Marmotta are better to discuss it directly at users@marmotta
mailing list [4].

Kind regards,

[1] http://code.google.com/p/lmf/wiki/Maven
[2] http://marmotta.incubator.apache.org
[3]
http://dist.apache.org/repos/dist/dev/incubator/marmotta/3.0.0-incubating/
[4] http://marmotta.incubator.apache.org/mail-lists.html

--
Sergio Fern�ndez

Jonathan Koppenhofer

unread,
Apr 10, 2013, 4:16:09 PM4/10/13
to lmf-...@googlegroups.com, Jonathan Koppenhofer
Wow... great response! Off topic, so move if necessary.

[1] Yes I am aware, have already built it... had some troubles with HttpClient 4.2.3 (not sure why... maybe a maven resolving issue of some kind??? used 4.2.2 and it worked?!?!?), but I got it to build at least :)

[2] Yes, I saw the commit come across... I do plan to use Semantic Search, so I'll keep an eye on it.

[3] I plan to use semantic search, but good to know

[4] Will do... along these lines, I noticed some errors in the Resource Webservices/Services in 2.6.0 (was using ResourceUtils.getUriResource())... Looks like they are fixed in 2.6.1 and Marmotta (in looking at code). Do you plan to release 2.6.1? Is it stable? Should I just build it myself? Also, as a side note, when playing with Sesame resource stuff, I was having unexpected behavior when doing a remove and then add of the same triples in the same transaction... The remove happened, but they did not get re-added... Didn't really investigate... maybe it's an H2 thing. Maybe I'll give this a go in marmotta/3.0 with a real database to see if the same happens

Thanks again... You've been a huge help!!!
Sergio Fern�ndez

Sergio Fernández

unread,
Apr 11, 2013, 3:58:02 AM4/11/13
to lmf-...@googlegroups.com, Jonathan Koppenhofer
Hi Jonathan,

On 10/04/13 22:16, Jonathan Koppenhofer wrote:
> [1] Yes I am aware, have already built it... had some troubles with
> HttpClient 4.2.3 (not sure why... maybe a maven resolving issue of some
> kind??? used 4.2.2 and it worked?!?!?), but I got it to build at least :)

It is strange... even if both version should be fine, I don't know
what's the source of your problem, because 4.2.3 is available at maven
central repository:

http://search.maven.org/#artifactdetails%7Corg.apache.httpcomponents%7Chttpclient%7C4.2.3%7Cjar

> [4] Will do... along these lines, I noticed some errors in the Resource
> Webservices/Services in 2.6.0 (was using ResourceUtils.getUriResource())...
> Looks like they are fixed in 2.6.1 and Marmotta (in looking at code). Do
> you plan to release 2.6.1? Is it stable? Should I just build it myself?

Yes, we fixed some errors, and we plan to publish a 2.6.1 maintenance
release in the upcoming days, which would be probably the last one on
that branch.

> Also, as a side note, when playing with Sesame resource stuff, I was having
> unexpected behavior when doing a remove and then add of the same triples in
> the same transaction... The remove happened, but they did not get
> re-added... Didn't really investigate... maybe it's an H2 thing. Maybe I'll
> give this a go in marmotta/3.0 with a real database to see if the same
> happens

Well, 3.x comes with many improvements/fixes on that part.

With respect to the database, H2 is only for demo and quick
installations; for a proper running system I recommend you to switch to
PostgreSQL.

> Thanks again... You've been a huge help!!!

You are welcome :-)

Cheers,

--
Sergio Fern�ndez
Reply all
Reply to author
Forward
0 new messages