Versions Compared

Key

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

...

Code Block
languagesql
title1b. Selecting Objects With Datastreams Named "text"
prefix fcrepo: <http://fedora.info/definitions/v4/repository#>
select ?object where { ?ds fcrepo:mixinTypes "fedora:datastream" .
    ?ds fcrepo:hasParent ?object . filter(str(?ds)=concat(str(?object),'/text')) }
Expected Results
object
<http://localhost:8080/rest/objects/103>

Find objects with a PDF datastream:

Code Block
languagesql
title1c. Selecting Objects With PDF Datastreams
prefix fcrepo: <http://fedora.info/definitions/v4/repository#>
select ?object where { ?ds fcrepo:mixinTypes "fedora:datastream" .
    ?ds fcrepo:hasParent ?object . ?ds fcrepo:hasContent ?content .
    ?content fcrepo:mimeType "application/pdf" }
Expected Results
object
<http://localhost:8080/rest/objects/101>
<http://localhost:8080/rest/objects/103>

2. Attach metadata properties directly to objects

...

Expected Results
object     title
<http://localhost:8080/rest/objects/201>"Foo"

Find Objects By Collection Membership

...