Versions Compared

Key

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

Some Definitions

jcr - java content repository http://www.day.com/day/en/products/jcr.html; used by fcrepo4 for storing object structure and content

...

namespace - JCR nodes MAY have a namespace component to their identifier. Unlike fcrepo 3.x, a namespace prefix must be explicitly registered before it can be used. (I assume we can create nodes with the fully-qualified namespace without registering it?)  

External-ish services

/rest/fcr:sitemap
- GET retrieve a sitemap of all the "fedora:object" in the repository (wrapped as a sitemap index, pointing to other sitemaps..) 

...

/rest/fcr:nextPID
- POST mints an ID

Nodes

/rest/{path}
- GET lists children, with optional filter by mixin
- POST create a new node of QueryParam "mixin" at {path}
- PUT mutate the object at {path}
- DELETE remove the object at {path}

...

Code Block
POST /rest/objects/sufia:123456789/fcr:new/fcr:content
  create a new child datastream (with an automatically generated unique identifier) with the content provided by the request body

Describe

/rest/{path}/fcr:describe
- GET profile or description [repo describe at root, profiles by type]
- POST unsupported?
- PUT unsupported?
- DELETE unsupported?

Code Block
GET /rest/fcr:describe
  describe the fcrepo4 repository

GET /rest/objects/sufia:123456789/fcr:describe
  describe the object /objects/sufia:123456789 (equivalent to the fcrepo 3.x "object profile") 

GET /rest/objects/sufia:123456789/content/fcr:describe
  describe the datastream /objects/sufia:123456789/content (equivalent to the fcrepo 3.x "datastream profile")

GET /rest/some/arbitrary/jcr:path/to/sufia:123456789/the/tree/continues/fcr:describe
  describe the node at /some/arbitrary/jcr:path/to/sufia:123456789/the/tree/continues (equivalent to the fcrepo3.x "datastream profile"). 
  If the node resolves to a JCR "nt:file", we treat it as a datastream. Else, an object (or collection)

 

Versioning

/rest/{path}/fcr:versions
- GET the version history of the nt:file or the nt:folder (as appropriate) at {path}

Code Block
GET /rest/objects/sufia:123456789/fcr:versions
  get the version history of /objects/sufia:123456789 fedora object (not sure what the response looks like, though)
 
GET /rest/objects/sufia:123456789/THUMBNAIL/fcr:versions
  get the version history of the THUMBNAIL datastream
 
GET /rest/objects/sufia:123456789/THUMBNAIL/fcr:content?version=XYZ
  get the jcr:content@jcr:data of  /objects/sufia:123456789/THUMBNAIL with version id 'XYZ'
 
GET /rest/objects/sufia:123456789/fcr:describe?version=XYZ
  get the profile/description of /objects/sufia:123456789 with version id 'XYZ'

 

Datastream Batch Operations

/rest/{path}/fcr:datastreams is only for batch DS operations
- GET
- POST
- DELETE

Code Block
GET /rest/objects/sufia:123456789/fcr:datastreams?dsid=DC&dsid=RELS-EXT&dsid=CONTENT_METADATA
  receive a multipart/mixed response of the 3 named datastreams under /objects/sufia:123456789
 
POST /rest/objects/sufia:123456789/fcr:datastreams (with a multipart body)
  create any number of datastreams under /objects/sufia:123456789
 
DELETE /rest/objects/sufia:123456789/fcr:datastreams?dsid=THUMBNAIL&dsid=CONTENT
  delete the two named datastreams under /objects/sufia:123456789

 

Fixity

/rest/{path}/fcr:fixity
- GET get the fixity report for the nt:file at {path}

Code Block
GET /rest/objects/sufia:123456789/THUMBNAIL/fcr:fixity
  retrieve the fixity report for the /objects/sufia:123456789/THUMBNAIL node

 

Relationships

See this fcrepo3 discussion: Supporting the Semantic Web and Linked Data

...