Forums Register Login

objectPath vs. objectId in CMIS specification

+Pie Number of slices to send: Send
Hello,

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


Thanks,
Nikesh
+Pie Number of slices to send: Send
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.


    Regards,

    Florian
    +Pie Number of slices to send: Send
    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.

    -Nikesh
    A lot of people cry when they cut onions. The trick is not to form an emotional bond. This tiny ad told me:
    a bit of art, as a gift, that will fit in a stocking
    https://gardener-gift.com


    reply
    reply
    This thread has been viewed 2016 times.
    Similar Threads
    Liferay Portal Enterprise Intranets - Query
    Which Portal to use
    Alfresco enterprise installation components
    Alfresco
    How to sell Alfresco into the Enterprise?
    More...

    All times above are in ranch (not your local) time.
    The current ranch time is
    Apr 16, 2024 05:40:17.