Versions Compared

Key

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

...

Panel
titleBGColorgray
titlePage0 - Create DirectContainer

Here we repeat the exact steps as for the "cover/" above, but for "page0/".

Code Block
curl -i -XPUT -H"Content-Type: text/turtle" --data-binary @ldp-coverpage0-direct.ttl localhost:8080/rest/objects/raven/pages/coverpage0/files/

Where "ldp-page0-direct.ttl" follows:

Code Block
titleldp-page0-direct.ttl
@prefix ldp: <http://www.w3.org/ns/ldp#>
@prefix pcdm: <http://pcdm.org/models#>

<> a ldp:DirectContainer, pcdm:Object ;
  ldp:membershipResource </rest/objects/raven/pages/page0/> ;
  ldp:hasMemberRelation pcdm:hasFile .
Panel
titleBGColorgray
titlePage0 - Create Files

Here we add the attached page0 files (page0.jpg and page0.tif) to the newly created DirectContainer. 

Code Block
curl -i -XPUT -H"Content-Type: image/jpeg" --data-binary @page0.jpg localhost:8080/rest/objects/raven/pages/page0/files/page0.jpg
curl -i -XPUT -H"Content-Type: image/tiff" --data-binary @page0.tif localhost:8080/rest/objects/raven/pages/page0/files/page0.tif

Followed by assigning the type of pcdm:File to the respective RDF Sources found in the "Link; rel=describedby" header of each of the ldp:NonRdfSources.

Code Block
curl -i -XPATCH -H"Content-Type: application/sparql-update" --data-binary @pcdm-file.ru localhost:8080/rest/objects/raven/pages/page0/files/page0.jpg/fcr:metadata
curl -i -XPATCH -H"Content-Type: application/sparql-update" --data-binary @pcdm-file.ru localhost:8080/rest/objects/raven/pages/page0/files/page0.tif/fcr:metadata

Where "pcdm-file.ru" follows:

Code Block
titlepcdm-file.ru
PREFIX pcdm: <http://pcdm.org/models#>
INSERT {
  <> a pcdm:File
} WHERE {
}
Panel
titleBGColorgray
titlePage1 - Create DirectContainer

Here we repeat the exact steps as for the "page0/" above, but for "page1/".

Image Added

Code Block
curl -i -XPUT -H"Content-Type: text/turtle" --data-binary @ldp-page1-direct.ttl localhost:8080/rest/objects/raven/pages/page1/files/

Where "ldp-page1-direct.ttl" follows:

Code Block
titleldp-page0-direct.ttl
@prefix ldp: <http://www.w3.org/ns/ldp#>
@prefix pcdm: <http://pcdm.org/models#>

<> a ldp:DirectContainer, pcdm:Object ;
  ldp:membershipResource </rest/objects/raven/pages/page1/> ;
  ldp:hasMemberRelation pcdm:hasFile .
Panel
titleBGColorgray
titlePage1 - Create Files

Finally, we add the attached page1 files (page1.jpg and page1.tif) to the newly created DirectContainer. 

Image Added

Code Block
curl -i -XPUT -H"Content-Type: image/jpeg" --data-binary @page1.jpg localhost:8080/rest/objects/raven/pages/page1/files/page1.jpg
curl -i -XPUT -H"Content-Type: image/tiff" --data-binary @page1.tif localhost:8080/rest/objects/raven/pages/page1/files/page1.tif

Followed by assigning the type of pcdm:File to the respective RDF Sources found in the "Link; rel=describedby" header of each of the ldp:NonRdfSources.

Code Block
curl -i -XPATCH -H"Content-Type: application/sparql-update" --data-binary @pcdm-file.ru localhost:8080/rest/objects/raven/pages/page1/files/page0.jpg/fcr:metadata
curl -i -XPATCH -H"Content-Type: application/sparql-update" --data-binary @pcdm-file.ru localhost:8080/rest/objects/raven/pages/page1/files/page0.tif/fcr:metadata

Where "pcdm-file.ru" follows:

Code Block
titlepcdm-file.ru
PREFIX pcdm: <http://pcdm.org/models#>
INSERT {
  <> a pcdm:File
} WHERE {
}

...