Mapping CMIS to SharePoint objects

Repository Capabilities

This exposes the functionality of the document library
  • Multi-filing -> TRUE
  • Unfiling -> TRUE
  • Version-specific-filing -> FALSE
  • PWC-Searchable -> TRUE
  • PWC-Updatable -> TRUE
  • Query-non-latest-versions -> FALSE
  • Inner-join -> TRUE
  • Outer-join -> FALSE
  • Full-text-query -> Full-text + Properties

Model Mapping

Here we discuss the correspondence between the SharePoint object model and CMIS.
note 1: (*) - Not supporté.
note 2: "Relationship" is not implémenté

Object properties

« Item » is an « SPListItem » object.
  • ObjectId -> item.UniqueId
  • Uri =item.URL
  • ObjectTypeId -> item.ContentType.Id.
  • CreatedBy -> item.File.Author.Name
  • CreationDate -> item.File.TimeCreated
  • LastModifiedBy -> item.File.ModifiedBy.Name
  • LastModificationDate -> item.File.TimeLastModified
  • ChangeToken (*)

Document (inc. Object) Properties

« file » is an « SPFile » object.
  • Name -> file.Name
  • IsImmutable -> !file.Item.DoesUserHavePermissions(SPBasePermissions.OpenItems) IsLatestVersion -> file.Versions.File.Equals(file)
  • IsMajorVersion -> file.MinorVersion == 0
  • IsLatestMajorVersion ->((file.MinorVersion == 0) && (file.Versions.File.MajorVersion == file.MajorVersion))
  • VersionLabel -> file.UIVersionLabel
  • VersionSeriesId -> file.Versions.File.UniqueId (as a String)
  • IsVersionSeriesCheckedOut -> file.Level == SPFileLevel.Checkout
  • VersionSeriesCheckedOutBy -> file.CheckedOutBy.Name
  • CheckinComment -> file.CheckInComment
  • ContentStreamAllowed -> enumContentStreamAllowed.allowed
  • ContentStreamLength ->file.Length
  • ContentStreamMimeType -> *Simulated
  • ContentStreamFilename-> file.Name
  • ContentStreamUri -> file.Url

Folder (inc. Object) properties

« folder » is an « SPFolder » object.
  • Name -> folder.Name
  • ParentId -> folder.ParentFolder.UniqueId
  • AllowedChildObjecTypeIds *

Relationship (inc. Object) properties *

Meta Model Mapping

Base Object Types

  • DOCUMENTOBJECTTYPE -> SPContentType mapping
  • FOLDEROBJECTTYPE -> SPContentType mapping
  • RELATIONSHIPOBJECTTYPE -> SPContentType mapping

Object Type Definition

« myContentType » is an « SPContentType » object.
  • ObjectTypeId -> myContentType.Id
  • ObjectTypeQueryName -> myContentType.Name
  • ObjectTypeDisplayName-> myContentType.Name
  • ParentTypeId ->myContentType.Name
  • Description ->RootTypeQueryName
  • Creatable -> simulated
  • Fileable -> true for files and folders and false otherwise
  • Queryable -> true for files and folders and false otherwise
  • Controllable -> true for files and folders and false otherwise
  • Versionable -> true for files
  • ContentStreamAllowed -> allowed for files
  • AllowedSourceTypes( *)
  • AllowedTargetTypes (*)

Property Type Definition

« field » is an « SPField » object.
  • PropertyName ->field.InternalName
  • PropertyId ->field.Id
  • DisplayName ->field.Title
  • Description -> field.Description
  • IsInherited -> field.Description
  • PropertyType -> (Note: refer to Property Type mapping)
  • Cardinality -> field.Sortable ? enumCardinality.single : enumCardinality.multi;
  • MaximumLength -> 256
  • SchemaURI -> null
  • Encoding -> null
  • OpenChoice -> false
  • Required -> field.Required
  • Updatability -> field.ReadOnlyField
  • Queryable - field.ReadOnlyField
  • Orderable - field.ReadOnlyField

Property Type Mapping

  • String -> SPFieldType.Text
  • Decimal -> SPFieldType.Number
  • Integer -> SPFieldType.Integer
  • Boolean -> SPFieldType.Boolean
  • DateTime -> SPFieldType.Boolean
  • Uri ->SPFieldType.URL
  • Id -> SPFieldType.Guid
  • Xml ->SPFieldType.File
  • Html (*)

Permissions

To get the permissions we use the class method "SPItem" DoesUserHavePermissions (SPBasePermissions mask) "

Document

  • DeleteObject -> SPBasePermissions.DeleteListItems
  • UpdateProperties -> SPBasePermissions.EditListItems
  • CheckOut -> SPBasePermissions.EditListItems
  • CancelCheckout -> SPBasePermissions.CancelCheckout
  • CheckIn -> SPBasePermissions.ApproveItems
  • DeleteAllVersions -> TRUE
  • AddDocumentToFolder -> SPBasePermissions.BrowseDirectories | SPBasePermissions.AddListItems
  • RemoveDocumentFromFolder -> SPBasePermissions.EditListItems
  • SetContentStream -> SPBasePermissions.EditListItems
  • DeleteContentStream -> SPBasePermissions.DeleteListItems
  • GetAllVersions -> SPBasePermissions.ViewVersions
  • GetDocumentParents -> SPBasePermissions.BrowseDirectories
  • GetRelationships (*)
  • GetProperties -> SPBasePermissions.ViewListItems
  • GetContentStream -> SPBasePermissions.Open
  • MoveObject -> SPBasePermissions.EditListItems

Folder

  • DeleteObject -> SPBasePermissions.DeleteListItems
  • DeleteTree -> SPBasePermissions.DeleteListItems
  • UpdateProperties -> SPBasePermissions.EditListItems
  • GetChildren -> SPBasePermissions.BrowseDirectories
  • GetDescendants -> SPBasePermissions.BrowseDirectories
  • GetFolderParent -> SPBasePermissions.BrowseDirectories
  • GetProperties -> SPBasePermissions.ViewListItems
  • GetRelationships (*)
  • MoveObject -> SPBasePermissions.EditListItems

Relationship *

Last edited Dec 4, 2009 at 7:40 AM by achaabouni, version 2

Comments

No comments yet.