...
Code Block |
---|
language | bash |
---|
title | 1a. Creating Sample Objects |
---|
|
curl -X PUT "http://localhost:8080/rest/objects/101"
curl -X PATCH -H "Content-type: application/sparql-update" --data-binary "@object-indexing.rdf" "http://localhost:8080/rest/objects/101"
curl -X PUT -H "Content-type: application/pdf" --data-binary "@test.pdf" "http://localhost:8080/rest/objects/101/master"
curl -X PATCH -H "Content-type: application/sparql-update" --data-binary "@object-indexing.rdf" "http://localhost:8080/rest/objects/101/master/fcr:metadata"
curl -X PUT "http://localhost:8080/rest/objects/102"
curl -X PATCH -H "Content-type: application/sparql-update" --data-binary "@object-indexing.rdf" "http://localhost:8080/rest/objects/102"
curl -X PUT -H "Content-type: text/plain" --data-binary "@test.txt" "http://localhost:8080/rest/objects/102/master"
curl -X PUT PATCH -H "Content-type: application/sparql-update" --data-binary "@object-indexing.rdf" "http://localhost:8080/rest/objects/102/master/fcr:metadata"
curl -X PUT "http://localhost:8080/rest/objects/103"
curl -X PATCH -H "Content-type: application/sparql-update" --data-binary "@object-indexing.rdf" "http://localhost:8080/rest/objects/103"
curl -X PUT -H "Content-type: application/pdf" --data-binary "@test.pdf" "http://localhost:8080/rest/objects/103/master"
curl -X PATCHPUT -H "Content-type: applicationtext/sparql-updateplain" --data-binary "@object-indexing@test.rdftxt" "http://localhost:8080/rest/objects/103/text"
curl -X PUTPATCH -H "Content-type: application/pdfsparql-update" --data-binary "@test@object-indexing.pdfrdf" "http://localhost:8080/rest/objects/103/master/fcr:metadata"
curl -X PUTPATCH -H "Content-type: textapplication/plainsparql-update" --data-binary "@test@object-indexing.txtrdf" "http://localhost:8080/rest/objects/103/text/fcr:metadata" |
Find objects with a datastream named "text":
Code Block |
---|
language | sql |
---|
title | 1b. 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/fcr:metadata'))
} |
Expected Results
object |
---|
<http://localhost:8080/rest/objects/103> |
...