Versions Compared

Key

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

...

Code Block
languagebash
title3b. Marking objects indexable
echo "prefix rdf:insert data { <> <http://www.w3.org/1999/02/22-rdf-syntax-ns#>ns#type> prefix index: <http://fedora.info/definitions/v4/indexing#>  insert data { <> rdf:type index:indexable indexing#indexable> . }" \
| curl -X PATCH --upload-file - http://localhost:8080/rest/objects/obj1
echo "prefix rdf:insert data { <> <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix index:ns#type> <http://fedora.info/definitions/v4/indexing#>indexing#indexable> . insert data { <> rdf:type index:indexable . }" }" \
| curl -X PATCH --upload-file - http://localhost:8080/rest/objects/obj2
echo "prefix rdf:insert data { <> <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix index: ns#type> <http://fedora.info/definitions/v4/indexing#>indexing#indexable>  insert data { <> rdf:type index:indexable. }" \
| curl -X PATCH --upload-file - http://localhost:8080/rest/objects/obj3
echo "insert data { <> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://fedora.info/definitions/v4/indexing#indexable> . }" \
| curl -X PATCH --upload-file - http://localhost:8080/rest/objects/col1
echo "insert data { <> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://fedora.info/definitions/v4/indexing#indexable> . }" \
| curl -X PATCH --upload-file - http://localhost:8080/rest/objects/col2
echo "insert data { <> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://fedora.info/definitions/v4/indexing#indexable> . }" \
| curl -X PATCH --upload-file - http://localhost:8080/rest/objects/obj3col3

Link each object to a collection:

...

Code Block
languagesql
title3f. Select Objects Directly Or Indirectly Linked To A Collection
prefix rels: <http://fedora.info/definitions/v4/rels-ext#>
select ?obj where {
  { ?obj rels:isMemberOfCollection <http://localhost:8080/rest/objects/col1> }
  UNION
  { <http://localhost:8080/rest/objects/col1> rels:hasPart+* ?col
  . ?obj rels:isMemberOfCollection ?col }
}
Expected Results
obj
<http://localhost:8080/rest/objects/obj1>
<http://localhost:8080/rest/objects/obj2>
<http://localhost:8080/rest/objects/obj3>

...