Proposal for Document Previews/Thumbnails/Renditions in CMIS ------------------------------------------------- Document Preview Source: http://www.oasis-open.org/committees/download.php/32640/document_preview_proposal_v0.3.txt http://www.oasis-open.org/committees/document.php?document_id=32640&wg_abbrev=cmis Date: Version 0.3 posted Friday, 22 May 2009 03:16pm, by Ryan McVeigh http://lists.oasis-open.org/archives/cmis/200905/msg00183.html Description: A revised Document Thumbnail proposal for requirements around rendition for discussion in a follow-up working group meeting. Earlier: http://www.oasis-open.org/committees/download.php/32477/document_preview_proposal_v0.2.txt http://www.oasis-open.org/committees/document.php?document_id=32477&wg_abbrev=cmis Earlier: http://www.oasis-open.org/committees/download.php/32474/document_preview_proposal_v0.1.txt http://www.oasis-open.org/committees/document.php?document_id=32474&wg_abbrev=cmis See: http://tools.oasis-open.org/issues/browse/CMIS-183 Document thumbnail proposal Comments by Ethan Gur-esh, David Caruana, Al Brown, Steve Roth Summary: http://xml.coverpages.org/cmis.html#DocumentRenditions Proposal for Document Previews/Thumbnails in CMIS v0.1 David Caruana, Alfresco Initial version v0.2 David Caruana, Alfresco Minor formatting edits v0.3 Ryan McVeigh, Oracle Corporation Added requirements specifically for renditions Only changed wording in the Objective and Requirements to the Rendition Terminology # Objective Some ECM repositories provide renditions where a client can get an alterntiave version of a document. This could apply to a preview case which would enable the client to preview the content of a document without needing to download the full content. Previews are generally reduced fidelity representations such as thumbnails. Renditions can take on any general form, such as a PDF version of a word document, This proposal offers an optional extension to CMIS for allowing a client to gain access to document renditions. # Requirements a) Model a.1) a document may support zero or more renditions a.1.1) The server is responsible for determining the number and types of renditions present for a given document a.1.2) The server is responsible for the availability of a document rendition. A rendition may not be immediately available after checkin. a.1.3) Renditions can be related to one another - such as an ordered list. We should be able to express this model as part of the rendition metadata. a.1.4) Renditions are specific to the version of the document and may differ between document versions. a.2) each rendition consists of a content stream containing the alternative representation a.3) each rendition consists of a content stream of a given mimetype a.4) each rendition may have a descriptive label a.5) each rendition is loosely identified by label and mimetype (although uniqueness not enforced) a.6) each rendition may provide additional metadata such as sizing TODO: Some disucssion is appropriate about expected rendition types. If one of those is document thumbnail, that works for Oracle. b) API b.1) Must: retrieve available renditions for a document b.2) Must: retrieve rendition descriptive label and additional metadata b.3) Must: retrieve rendition content stream b.4) Should: retrieve document represented by rendition b.5) Wont: create rendition (assumption: repository creates the rendition) # Specification Additions This proposal advocates describing document previews in the CMIS Domain Model. This provides a formal definition of a preview which may be mapped by each of the CMIS bindings. ## Part I: Domain Model Previews are themselves Documents. They are associated to their original document via relationships of the 'preview' relationship type. This proposal does not impose any constraints on whether preview documents are filed in folders or unfiled. ### Preview relationship type typeId cmis:preview * assuming namespace proposal is accepted queryName Preview displayName baseType Relationship baseTypeQueryName Relationship parentId Relationship description creatable FALSE fileable FALSE queryable FALSE includedInSupertypeQuery TRUE controllable allowedSourceTypes document allowedTargetTypes document Property Definitions cmis:previewlabel preview label, string, read-only, required, single, choices: small/medium/large, open choice: true cmis:height height in px, integer, read-only, not required, single cmis:width width in px, integer, read-only, not required, single ### getRelationships() Already supports requirements: b.1) retrieve available previews for a document b.2) retrieve preview descriptive label and additional metadata b.4) retrieve document represented by preview ### getContentStream() Already supports requirements: b.3) retrieve preview content stream ## Part 2: Web Services Binding No additional Web Service methods or adjustments to existing methods are required to support document previews, as getRelationships() and getContentStream() suffice. ## Part 2: AtomPub Binding As with the Web Service, the AtomPub binding does not strictly need enhancing to support document previews. However, the natural AtomPub use of links lends itself well to representing 'preview' relationships. For Atom Entries representing documents, each related preview is represented via the following link: link rel="preview" The href refers to the preview document resource (uri mapping of its getContentStream()). Optionally, the following attributes (mapped from the preview relationship) may also decorate the link: cmis:previewlabel cmis:height cmis:width =========================================================================