Versions Compared

Key

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

...

URIDescription
http://www.w3.org/ns/ldp#PreferMembershiplinks to other resources (including child nodes) and LDP container properties (included in representation by default)
http://www.w3.org/ns/ldp#PreferContainmenttriples describing the child nodes (included in representation by default)
http://fedora.info/definitions/v4/repository#InboundReferenceslinks from other Fedora resources to this node (excluded from representation by default)

 

Example (1): Turtle

Code Block
curl -H "Accept: text/turtle" "http://localhost:8080/rest/path/to/resource"

Response:

Code Block
Status: 200 OK
 
Headers:
Content-Type: text/turtle
Cache-Control: ETag: "0ed38fe211c2663ace5322e970e7b7d606196e00"
Last-Modified-At: 2013-01-01T01:23:45Z
Link: http://localhost:8080/rest/?offset=0&limit=10;rel="first"
Link:: Mon, 19 May 2014 19:44:59 GMT
Preference-Applied: return=representation; include="http://www.w3.org/ns/ldp#PreferMembership http://www.w3.org/ns/ldp/Resource;rel="type"ldp#PreferContainment"
Vary: Prefer
Accept-Patch: application/sparql-update
 
Body:

<http://localhost:8080/rest/>
        a       <http://www.w3.org/ns/ldp#Container> ,Allow: MOVE,COPY,DELETE,POST,HEAD,GET,PUT,PATCH,OPTIONS
Accept-Post: text/turtle,text/rdf+n3,application/n3,text/n3,application/rdf+xml,application/n-triples,multipart/form-data,application/sparql-update
Link: <http://www.w3.org/ns/ldp#Page> ;
        ldp#Resource>;rel="type"
Link: <http://www.w3.org/ns/ldp#membersInlined>
                "true" ;
        <http://www.w3.org/ns/ldp#membershipObject>
                <http://www.w3.org/ns/ldp#MemberSubject>ldp#DirectContainer>;rel="type"
Content-Type: text/turtle
 
Body:

<http://localhost:8080/rest/path/to/resource> <http://fedora.info/definitions/v4/rest-api#hasAccessRoles> <http://localhost:8080/rest/path/to/resource/fcr:accessroles> ;
        <http://www.w3.org/ns/ldp#membershipPredicate>
                <http://fedora.info/definitions/v4/repository#hasChild>fedora.info/definitions/v4/rest-api#exportsAs> <http://localhost:8080/rest/path/to/resource/fcr:export?format=jcr/xml> ;
        <http://www.w3.org/ns/ldp#membershipSubject>
                fedora.info/definitions/v4/repository#hasParent> <http://localhost:8080/rest/>path/to> ;
    a    <http://www.w3.org/ns/ldp#pageOf>
ldp#Container>     , <http://www.w3.org/ns/ldp#DirectContainer> ;
           <http://www.w3.org/ns/ldp#membershipResource> <http://localhost:8080/rest/path/to/>resource> ;
		    <http://www.w3.org/ns/ldp#hasMemberRelation> <http://fedora.info/definitions/v4/rest-api#exportsAs>repository#hasChild> ;
                a <http://localhost:8080/rest//fcr:export?format=jcr/xml> ;
        www.jcp.org/jcr/nt/1.0folder> , <http://www.jcp.org/jcr/nt/1.0hierarchyNode> , <http://www.jcp.org/jcr/nt/1.0base> , <http://www.jcp.org/jcr/mix/1.0created> , <http://fedora.info/definitions/v4/rest-api#hasNamespaces>
api#resource>                , <http://localhost:8080/rest/fcr:namespaces> ;
        fedora.info/definitions/v4/rest-api#object> , <http://fedora.info/definitions/v4/rest-api#hasTransactionProvider>
                api#relations> , <http://localhost:8080/rest/fcr:tx> ;
        www.jcp.org/jcr/mix/1.0created> , <http://fedorawww.jcp.infoorg/definitionsjcr/v4/rest-api#hasWorkspaces>
                <http://localhost:8080/rest/fcr:workspaces> ;
    mix/1.0lastModified> , <http://www.jcp.org/jcr/mix/1.0lockable> , <http://www.jcp.org/jcr/mix/1.0referenceable> , <http://purl.org/dc/elements/1.1/describable> , <http://fedora.info/definitions/v4/rest-api#resource> ;
    <http://microformatsfedora.orginfo/wiki/rel-sitemap>
                <http://localhost:8080/rest/sitemap> ;

Example (2):

Code Block
curl -H "Accept: text/turtle" "http://localhost:8080/rest/path/to/resource"

Response:

definitions/v4/repository#primaryType> "nt:folder"^^<http://www.w3.org/2001/XMLSchema#string> ;
    <http://fedora.info/definitions/v4/repository#created> "2014-05-19T19:44:59.647Z"^^<http://www.w3.org/2001/XMLSchema#string> ;
    <http://fedora.info/definitions/v4/repository#lastModified> "2014-05-19T19:44:59.645Z"^^<http://www.w3.org/2001/XMLSchema#string> ;
    <http://fedora.info/definitions/v4/repository#mixinTypes> "fedora:resource"^^<http://www.w3.org/2001/XMLSchema#string> , "fedora:object"^^<http://www.w3.org/2001/XMLSchema#string> ;
    <http://fedora.info/definitions/v4/repository#lastModifiedBy> "bypassAdmin"^^<http://www.w3.org/2001/XMLSchema#string> ;
    <http://fedora.info/definitions/v4/repository#uuid> "2b655d37-e88a-44c5-86c1-3b3935cdea49"^^<http://www.w3.org/2001/XMLSchema#string> ;
    <http://fedora.info/definitions/v4/repository#createdBy> "bypassAdmin"^^<http://www.w3.org/2001/XMLSchema#string> ;
    a <http://www.jcp.org/jcr/nt/1.0folder> , <http://www.jcp.org/jcr/nt/1.0hierarchyNode> , <http://www.jcp.org/jcr/nt/1.0base> , <http://www.jcp.org/jcr/mix/1.0created> , <http://fedora.info/definitions/v4/rest-api#resource> , <http://fedora.info/definitions/v4/rest-api#object> , <http://fedora.info/definitions/v4/rest-api#relations> , <http://www.jcp.org/jcr/mix/1.0created> , <http://www.jcp.org/jcr/mix/1.0lastModified> , <http://www.jcp.org/jcr/mix/1.0lockable> , <http://www.jcp.org/jcr/mix/1.0referenceable> , <http://purl.org/dc/elements/1.1/describable> , <http://fedora.info/definitions/v4/rest-api#resource> .


Example (2): RDF/XML

Code Block
curl -H "Accept: application/rdf+xml" "http://localhost:8080/rest/path/to/resource"

Response:

Code Block
Status: 200 OK
 
Headers:
ETag: "0ed38fe211c2663ace5322e970e7b7d606196e00"
Last-Modified: Mon, 19 May 2014 19:44:59 GMT
Preference-Applied: return=representation; include="http://www.w3.org/ns/ldp#PreferMembership http://www.w3.org/ns/ldp#PreferContainment"
Vary: Prefer
Accept-Patch: application/sparql-update
Allow: MOVE,COPY,DELETE,POST,HEAD,GET,PUT,PATCH,OPTIONS
Accept-Post: text/turtle,text/rdf+n3,application/n3,text/n3,application/rdf+xml,application/n-triples,multipart/form-data,application/sparql-update
Link: <http://www.w3.org/ns/ldp#Resource>;rel="type"
Link: <http://www.w3.org/ns/ldp#DirectContainer>;rel="type"
Content-Type: application/rdf+xml 

Body:

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">

<rdf:Description rdf:about="http://localhost:8080/rest/path/to/resource">
    <hasAccessRoles xmlns="http://fedora.info/definitions/v4/rest-api#" rdf:resource="http://localhost:8080/rest/path/to/resource/fcr:accessroles"/>
    <exportsAs xmlns="http://fedora.info/definitions/v4/rest-api#" rdf:resource="http://localhost:8080/rest/path/to/resource/fcr:export?format=jcr/xml"/>
    <hasParent xmlns="http://fedora.info/definitions/v4/repository#" rdf:resource="http://localhost:8080/rest/path/to"/>
    <rdf:type rdf:resource="http://www.w3.org/ns/ldp#Container"/>
    <rdf:type rdf:resource="http://www.w3.org/ns/ldp#DirectContainer"/>
    <membershipResource xmlns="http://www.w3.org/ns/ldp#" rdf:resource="http://localhost:8080/rest/path/to/resource"/>
    <hasMemberRelation xmlns="http://www.w3.org/ns/ldp#" rdf:resource="http://fedora.info/definitions/v4/repository#hasChild"/>
    <rdf:type rdf:resource="http://www.jcp.org/jcr/nt/1.0folder"/>
    <rdf:type rdf:resource="http://www.jcp.org/jcr/nt/1.0hierarchyNode"/>
    <rdf:type rdf:resource="http://www.jcp.org/jcr/nt/1.0base"/>
    <rdf:type rdf:resource="http://www.jcp.org/jcr/mix/1.0created"/>
    <rdf:type rdf:resource="http://fedora.info/definitions/v4/rest-api#resource"/>
    <rdf:type rdf:resource="http://fedora.info/definitions/v4/rest-api#object"/>
    <rdf:type rdf:resource="http://fedora.info/definitions/v4/rest-api#relations"/>
    <rdf:type rdf:resource="http://www.jcp.org/jcr/mix/1.0created"/>
    <rdf:type rdf:resource="http://www.jcp.org/jcr/mix/1.0lastModified"/>
    <rdf:type rdf:resource="http://www.jcp.org/jcr/mix/1.0lockable"/>
    <rdf:type rdf:resource="http://www.jcp.org/jcr/mix/1.0referenceable"/>
    <rdf:type rdf:resource="http://purl.org/dc/elements/1.1/describable"/>
    <rdf:type rdf:resource="http://fedora.info/definitions/v4/rest-api#resource"/>
    <primaryType xmlns="http://fedora.info/definitions/v4/repository#" rdf:datatype="http://www.w3.org/2001/XMLSchema#string">nt:folder</primaryType>
    <created xmlns="http://fedora.info/definitions/v4/repository#" rdf:datatype="
Code Block
Status: 200 OK
 
Headers:
ETag: "d98e86c48a3e31857f5311f51ad7a2e13a7cedee"
Content-Type: text/turtle
Cache-Control: must-revalidate
Last-Modified: Fri, 15 Nov 2013 23:31:07 +0000
Link: http://localhost:8080/rest/path/to/resource/?offset=0&limit=10;rel="first"
Link: http://www.w3.org/ns/ldp/Resource;rel="type"
Accept-Patch: application/sparql-update
 
Body:

<http://localhost:8080/rest/path/to/resource>
		a       <http2001/XMLSchema#string">2014-05-19T19:44:59.647Z</created>
    <lastModified xmlns="http://fedora.info/definitions/v4/repository#" rdf:datatype="http://www.w3.org/2001/XMLSchema#string">2014-05-19T19:44:59.645Z</lastModified>
    <mixinTypes xmlns="http://fedora.info/definitions/v4/rest-api#resource> , <httprepository#" rdf:datatype="http://fedorawww.w3.infoorg/definitions/v4/rest-api#object> , 		
				<http://www.w3.org/ns/ldp#Container> , <http2001/XMLSchema#string">fedora:resource</mixinTypes>
    <mixinTypes xmlns="http://fedora.info/definitions/v4/repository#" rdf:datatype="http://www.w3.org/ns/ldp#Page> ;/2001/XMLSchema#string">fedora:object</mixinTypes>
        <http<lastModifiedBy xmlns="http://fedora.info/definitions/v4/repository#uuid>
                "e8baa85c-f05a-49e8-9578-9adef92ac60d"^^<httprepository#" rdf:datatype="http://www.w3.org/2001/XMLSchema#string> ;/XMLSchema#string">bypassAdmin</lastModifiedBy>
    <uuid    <httpxmlns="http://fedora.info/definitions/v4/repository#" rdf:datatype="http://www.w3.org/ns/ldp#inlinedResource>2001/XMLSchema#string">2b655d37-e88a-44c5-86c1-3b3935cdea49</uuid>
                <http<createdBy xmlns="http://localhost:8080/rest/path/to> ;
        <httpfedora.info/definitions/v4/repository#" rdf:datatype="http://www.w3.org/2001/nsXMLSchema#string">bypassAdmin</ldp#membersInlined>createdBy>
                "true" ;
        <http<rdf:type rdf:resource="http://www.w3jcp.org/ns/ldp#pageOf>/jcr/nt/1.0folder"/>
                <http://localhost:8080/rest/path/to/resource> .<rdf:type rdf:resource="http://www.jcp.org/jcr/nt/1.0hierarchyNode"/>
        <http<rdf:type rdf:resource="http://fedora.info/definitions/v4/rest-api#exportsAs>www.jcp.org/jcr/nt/1.0base"/>
                <http://localhost:8080/rest/path/to/resource/fcr:export?format=jcr/xml> ;<rdf:type rdf:resource="http://www.jcp.org/jcr/mix/1.0created"/>
        <http<rdf:type rdf:resource="http://fedora.info/definitions/v4/rest-api#hasVersions>api#resource"/>
                <http://localhost:8080/rest/path/to/resource/fcr:versions> ;<rdf:type rdf:resource="http://fedora.info/definitions/v4/rest-api#object"/>
        <http<rdf:type rdf:resource="http://fedora.info/definitions/v4/repository#created>/v4/rest-api#relations"/>
                "2013-11-15T23:31:07.275Z"^^<http<rdf:type rdf:resource="http://www.w3jcp.org/2001/XMLSchema#dateTime> ;/jcr/mix/1.0created"/>
        <http<rdf:type rdf:resource="http://fedora.info/definitions/v4/repository#createdBy>
        www.jcp.org/jcr/mix/1.0lastModified"/>
        "bypassAdmin"^^<http<rdf:type rdf:resource="http://www.w3jcp.org/2001/XMLSchema#string> ;/jcr/mix/1.0lockable"/>
        <http<rdf:type rdf:resource="http://fedora.info/definitions/v4/repository#hasParent>www.jcp.org/jcr/mix/1.0referenceable"/>
                <http://localhost:8080/rest/path/to> ;<rdf:type rdf:resource="http://purl.org/dc/elements/1.1/describable"/>
        <http<rdf:type rdf:resource="http://fedora.info/definitions/v4/repository#lastModified>
                "2013-11-15T23:31:07.268Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;rest-api#resource"/>
</rdf:Description>

</rdf:RDF>


Example (3): Prefer headers

Code Block
curl -H "Prefer: return=representation; include=\"http://fedora.info/definitions/v4/repository#InboundReferences\"; omit=\"http://www.w3.org/ns/ldp#PreferMembership http://www.w3.org/ns/ldp#PreferContainment\"" http://localhost:8080/rest/parent

...