Versions Compared

Key

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

...

For authorization: TBD

Design

This design relates specifically to how versioning could be done in the Modeshape Implementation of Fedora 4.

Players: 

  • LDPR - original resource
  • LDPRv - one in the same with LDPR, but it has versioning turned on. This implies that it has a TimeGate and TimeMap.
  • LDPCv - a LDP container that contains information about the LDPRm's associated with a LDPRv. The TimeMap is generated from this information, so this is generally considered the TimeMap, though it may contain more information then what's delivered in a TimeMap response. 
  • LDPRm - a specific version of a LDPR


Enable Versioning on a LDPR:

The following actions will creating versioning on a LDPR, effectively making it a LDPRv.  

  • Upon Resource Creation: if a Link: rel="type" specifying a type http://fedora.info/definitions/fcrepo#VersionedResource, the resource will be created with versioning turned on for that resource. 
    • A LDPRm will be generated immediately as well. 
    • A LDPCv will be created, from which a TimeMap can be generated.
  • On Existing Resource: The resource will become version-able if a PUT with an empty body and a link header ( Link: rel="type") specifying type of http://fedora.info/definitions/fcrepo#VersionedResource is included. 
    • A LDPRm will be generated immediately for this resource.
    • A LDCPv will be created, from which a TimeMap can be generated.

Accessing the TimeMap (aka LDPCv):

  • A GET request to the LDPCv will cause the TimeMap to be returned in "application/link-format" MIME-type.  No headers are necessary in that GET request, but an "Accept" header could be included, especially if there is more then one format implemented. At this point in time, only "application/link-format" is supported.
    • The response from the GET will include a "Accept-Post: */*; p=0.0" to indicate that a body is not supported on a POST to the LDPCv. 
    • The response from the GET will include a "Vary-Post: Memento-Datetime" to indicate that a client can request a specific time be associated with a memento when it's created via a POST. 

Accessing the TimeGate (aka LDPRv):

Accessing a LDPRm:

Creating a new version of a LDPRv:

  • A POST request to the LDPCv with an empty body will cause a new memento of the LDPRv to be created. 
  • If a "Memento-Datetime"  header is included in the POST request, then the time that represents will be used as the memento creation date.  The resulting memento will be accessible via that Memento-Datetime
  • A POST request with a body will be rejected with a HTTP 415 response. 


Finding the ACL on a LDPRm (memento): 

...