Here we will begin to walk through the mechanics of creating the structu=
res that will facilitate creation of the book and its pages.
First, create the top-level "objects/" pcdm:Object, which is also an =
ldp:BasicContainer.
curl -i=
-XPUT -H"Content-Type: text/turtle" --data-binary @pcdm-object.ttl localho=
st:8080/fcrepo/rest/objects/
Where "pcdm-object.ttl" follows:
@prefix=
pcdm: <http://pcdm.org/models#>
<> a pcdm:Object .
Second, create the nested "raven/" pcdm:Object, which is also another ld=
p:BasicContainer.
curl -i=
-XPUT -H"Content-Type: text/turtle" --data-binary @pcdm-object.ttl localho=
st:8080/fcrepo/rest/objects/raven/
Lastly, create an ldp:DirectContainer, "pages/" that will facilitate the=
establishment of relationships between "raven/" and its constituent pages.=
curl -i=
-XPUT -H"Content-Type: text/turtle" --data-binary @ldp-direct.ttl localhos=
t:8080/fcrepo/rest/objects/raven/pages/
Where "ldp-direct.ttl" follows:
@prefix=
ldp: <http://www.w3.org/ns/ldp#>
@prefix pcdm: <http://pcdm.org/models#>
<> a ldp:DirectContainer, pcdm:Object ;
ldp:membershipResource </fcrepo/rest/objects/raven/> ;
ldp:hasMemberRelation pcdm:hasMember .
An ldp:DirectContaner is an LDP construct that activates the creation of=
certain RDF triples when a new resource is added as a child of this contai=
ner.
Specifically, when a new resource is added inside of the "pages/" DirectCo=
ntainer, a new triple on the ldp:membershipResource ("raven/") will be crea=
ted with the predicate defined by the ldp:hasMemberRelation property ("pcdm=
:hasMember") and an object that is a reference to the new resource.
The auto-created triple resulting from the addition of a new child=
resource within "pages/" will take the form:
We will see this in action next!