Hi Laura:

I don't see the rest of your query, but I built one and tested it against my
repo with success:

PREFIX fedora: <info:fedora/fedora-system:def/relations-external#>
PREFIX fedora-model: <info:fedora/fedora-system:def/model#>
SELECT $pid $model  from <#ri> WHERE {
$pid <fedora-model:hasModel> $model
}

That returned what I expected: a list of all objects and their content
models.  I tried it using the web form (localhost:8080/fedora/risearch),
rather than pasting it into the browser address bar.  I suspect the problem
is you need to url encode that string.

I converted that query and this encoded version works when pasted into the
address bar of my browser:
http://localhost:8080/fedora/risearch?type=tuples&lang=sparql&format=CSV&query=PREFIX%20fedora%3A%20%3Cinfo%3Afedora%2Ffedora-system%3Adef%2Frelations-external%23%3E%0APREFIX%20fedora-model%3A%20%3Cinfo%3Afedora%2Ffedora-system%3Adef%2Fmodel%23%3E%0ASELECT%20%24pid%20%24model%20%20from%20%3C%23ri%3E%20WHERE%20%7B%0A%24pid%20%3Cfedora-model%3AhasModel%3E%20%24model%0A%7D

By the way, I don't think you need the prefix statements.  If you look on
the "Aliases" tab on that web form, you'll see that most common fedora
namespaces have been aliased for your convenience.

Best of luck,

Matthew Stephens
University of Virginia Library

On Wed, Apr 13, 2011 at 6:16 AM, Laura delli Paoli <[email protected]>wrote:

> Hello everybody!
> I have to interrogate fedora repository without using the
> browser interface, so I need prepare an ad-hoc URL as:
>
> http://localhost:8080/fedora/risearch?
> type=tuples&lang=sparql&format=Sparql&limit=1000&query=
> PREFIX fedora: <info:fedora/fedora-system:def/relations-external#>
> PREFIX fedora-model: <info:fedora/fedora-system:def/model#>
> .....
>
> but I get a HTTP response code: 505 for URL and if I paste the
> complete URL in
> the address bar of my browser i get this error:
> Encountered "<" at line 1, column 16. Was expecting: ...
> So I think that the problem should be the "<" character!
> Can anyone help me???
> Thanks Laura
>
>
>
> ------------------------------------------------------------------------------
> Forrester Wave Report - Recovery time is now measured in hours and minutes
> not days. Key insights are discussed in the 2010 Forrester Wave Report as
> part of an in-depth evaluation of disaster recovery service providers.
> Forrester found the best-in-class provider in terms of services and vision.
> Read this report now!  http://p.sf.net/sfu/ibm-webcastpromo
> _______________________________________________
> Fedora-commons-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/fedora-commons-developers
>
------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now!  http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
Fedora-commons-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-developers

Reply via email to