Child pages
  • Fedora Resource Index
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

The ResourceIndex manages relationships between Fedora objects. It is very powerful, but the query syntax can be tricky.

The ResourceIndex's search system provides an interface that will translate queries from iTQL into URL form: RIsearch on Ryan's machine.

Sample RIsearch queries

Select objects, modification dates, and titles. Start with the 50th Fedora object, and get the next 25 objects:

select     $object $modified $title $type
from       <#ri>
where      $object <rdf:type> $type
and        $object <rdf:type> <fedora-model:FedoraObject>
and        $object <fedora-view:lastModifiedDate> $modified
and        $object <dc:title> $title
order by   $title $object
limit      25
offset     50 

Count all objects that are members of the collection object iudl:10:

select count(
  select  $object
  from    <#ri>
  where   $object 
          <info:fedora/fedora-system:def/relations-external#isMemberOfCollection>
          <info:fedora/iudl:10>
  )
from <#ri>
where $a $b $c

Encoding queries as URLs

The version of risearch that comes with Fedora 2.1 doesn't display the encoded-URL version of the query. To manually encode a query, make the following substitutions:

Original

Replaced

:

%3A

/

%2F

#

%23

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="d9f7bfcd-540c-4e3d-b5ad-70ebf3d3c070"><ac:plain-text-body><![CDATA[

[space]

+

]]></ac:plain-text-body></ac:structured-macro>

The encoded query should be placed after a suitable base URL like

http://mallow.dlib.indiana.edu:9090/fedora/risearch?type=tuples&lang=itql&format=Sparql&query=
  • No labels