...
Create a few sample objects with either a PDF or a text file, or both attached as datastreams (these commands assume you have two files named test.pdf and test.txt in your current working directory, please substitute working filenames as needed):
Code Block |
---|
title | File: object-indexing.rdf |
---|
|
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX indexing: <http://fedora.info/definitions/v4/indexing#>
DELETE { }
INSERT {
<> indexing:hasIndexingTransformation "default";
rdf:type indexing:indexable }
WHERE { } |
Code Block |
---|
language | bash |
---|
title | 1a. Creating Sample Objects |
---|
|
curl -X POST -H "Content-type: application/sparql-update" -d @object-indexing.rdf http://localhost:8080/rest/objects/101?mixin=fedora:object
curl -X POST -H "Content-type: application/pdf" --data-binary @test.pdf \
http://localhost:8080/rest/objects/101/master/fcr:content
curl -X POST -H "Content-type: application/sparql-update" -d @object-indexing.rdf http://localhost:8080/rest/objects/102?mixin=fedora:object
curl -X POST -H "Content-type: text/plain" --data-binary @test.txt \
httphttp://localhost:8080/rest/objects/102/master/fcr:content
curl -X POST -H "Content-type: application/sparql-update" -d @object-indexing.rdf http://localhost:8080/rest/objects/103?mixin=fedora:object
curl -X POST -H "Content-type: application/pdf" --data-binary @test.pdf \
http://localhost:8080/rest/objects/103/master/fcr:content
curl -X POST -H "Content-type: text/plain" --data-binary @test.txt \
httphttp://localhost:8080/rest/objects/103/text/fcr:content |
...