Versions Compared

Key

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

...

Code Block
languagebash
title1a. Creating Sample Objects
curl -X POSTPUT "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 POSTPUT -H "Content-type: application/pdf" --data-binary "@test.pdf" "http://localhost:8080/rest/objects/101/master/fcr:content"
curl -X POST 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 POSTPUT -H "Content-type: text/plain" --data-binary "@test.txt" "http://localhost:8080/rest/objects/102/master/fcr:content"
curl -X POSTPUT "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 POSTPUT -H "Content-type: application/pdf" --data-binary "@test.pdf" "http://localhost:8080/rest/objects/103/master/fcr:content"
curl -X POSTPUT -H "Content-type: text/plain" --data-binary "@test.txt" "http://localhost:8080/rest/objects/103/text/fcr:content"

...

Code Block
languagebash
title2a. Creating Sample Objects
curl -X POSTPUT http://localhost:8080/rest/objects/201
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/201
echo "prefix dc: <http://purl.org/dc/elements/1.1/> insert data { <http://localhost:8080/rest/objects/201> dc:title 'Foo' . }" \
| curl -X PATCH --upload-file - http://localhost:8080/rest/objects/201

...

Code Block
languagebash
title3a. Creating Sample Objects And Collections
curl -X POSTPUT http://localhost:8080/rest/objects/col1
curl -X POSTPUT http://localhost:8080/rest/objects/col2
curl -X POSTPUT http://localhost:8080/rest/objects/col3
curl -X POSTPUT http://localhost:8080/rest/objects/obj1
curl -X POSTPUT http://localhost:8080/rest/objects/obj2
curl -X POSTPUT http://localhost:8080/rest/objects/obj3

...

Code Block
languagebash
title3g. Link Objects To A Project
curl -X POSTPUT http://localhost:8080/rest/objects/proj1
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/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

...