Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
title3g. Select Objects Directly Or Indirectly Linked To A Collection
curl -X POST http://localhost:8080/rest/objects/proj1
echo "prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix index: <http://fedora.info/definitions/v4/indexing#>  insert data { <> rdf:type index:indexable . }" \
| curl -X PATCH --upload-file - http://localhost:8080/rest/objects/proj1
echo '"prefix ex: <http://example.org/> insert data { <http://localhost:8080/rest/objects/obj1> ex:project <http://localhost:8080/rest/objects/proj1> . }" \
| curl -X PATCH --upload-file - http://localhost:8080/rest/objects/obj1

Find objects in a collection or linked to a project:

Code Block
languagesql
title3h. Select Objects Linked To A Collection or A Project
prefix rels: <http://fedora.info/definitions/v4/rels-ext#>
prefix ex: <http://example.org/>
select ?obj where {
  { ?obj ex:project <http://localhost:8080/rest/objects/proj1> }
  UNION
  { ?obj rels:isMemberOfCollection <http://localhost:8080/rest/objects/col2> }
 }
Expected Results
obj
<http://localhost:8080/rest/objects/obj1>
<http://localhost:8080/rest/objects/obj2>

...