File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Open Source Projects and the fly likes objectPath vs. objectId in CMIS specification Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "objectPath vs. objectId in CMIS specification" Watch "objectPath vs. objectId in CMIS specification" New topic

objectPath vs. objectId in CMIS specification

Nikes Shah
Ranch Hand

Joined: Jul 18, 2007
Posts: 133

I see there are two types of inputs we can specify to get the node, document etc. objectPath and objectId.

As far as I understand, objectId would differ from product to product and again if same product then instance to instance.

I have already created a forum topic in Alfresco as I am into Alfresco, but seems it would be great if we get more insights into it.

Interested people can check this topic here

Florian Mueller

Joined: Sep 24, 2012
Posts: 6
Hi Nikesh,

Each object in CMIS has a unique, immutable, and opaque object id. You can address every folder, document, document version, relationship, policy, and item (CMIS 1.1) with its object id. Object paths, on the other hand, are volatile and some objects cannot be reached by path.

The CMIS specification defines the following rules for objects.
  • Folders must have exactly one parent (except for the root folder) and have exactly one path.
  • Documents, Policies, and Items can be filed (= one parent folder and one path), unfiled (= no parent folder and no path), or multi-filed (= multiple parents and multiple path).
  • Older document versions may be filed, but that is not supported many repositories. Usually, document versions are not filed and don't have a path.
  • Relationships cannot be filed and therefore never have a path.

  • This definition is not random. It reflects, more or less, the implementation of most content management systems. Operations that are based on the path of an object are often more expensive for content management systems than those that use the object id.

    If you want to identify the same (or a similar) object in two different repositories, then neither the object id nor the object path helps you. The object id depends on the content management system and the instance. The folder hierarchy within a content repository also depends on the content management system and the administrator. In reality, it is virtually impossible to have the same path to a document in, lets say, Alfresco and SharePoint.

    The key here is metadata. Define in both repositories a document type with properties. Lets say, an invoice has an invoice number. Then, you can perform a CMIS query like this:

    Each repository would respond with the name and the object id the invoice document. The parent folders of documents don't matter. With the object id you can then perform whatever operation you need.


    Nikes Shah
    Ranch Hand

    Joined: Jul 18, 2007
    Posts: 133
    Thanks for the detailed reply Florian,

    So in general, if we want to switch from one CMS to another we should make sure Folder structure is same as previous CMS, and if not, relatively change in CMIS client.

    It is sorta covered in the JavaRanch Style Guide.
    subject: objectPath vs. objectId in CMIS specification
    It's not a secret anymore!