AnsweredAssumed Answered

Access aspects data with OpenCMIS

Question asked by ajperez on Jun 8, 2010
Latest reply on Jun 24, 2010 by makz
Hi all,

I'm trying to write a small application based on OpenCMIS, which is supposed to extract some data from Alfresco 3.3. It works OK with standard CMIS properties such as cmis:name or cmis:contentStreamMimeType, however I'm unable to get aspects data, like cm:description or cm:author.

These properties are also present on the CMIS AtomPub feed (see code below), I just don't know how to access them with OpenCMIS. My guess is that I need to use the DocumentType interface instead of Document, and then call its getExtensions() method. But I don't know how to get an instance of DocumentType.

<cmisra:object>
  <cmis:properties>
    <cmis:propertyString propertyDefinitionId="cmis:name" displayName="Name" queryName="cmis:name">
      <cmis:value>test document</cmis:value>
    </cmis:propertyString>
    <cmis:propertyString propertyDefinitionId="cmis:contentStreamMimeType" displayName="Content Stream MIME Type" queryName="cmis:contentStreamMimeType">
      <cmis:value>text/html</cmis:value>
    </cmis:propertyString>
    …
    <alf:aspects>
      …
      <alf:properties>
        <cmis:propertyString propertyDefinitionId="cm:description" displayName="Description" queryName="cm:description">
          <cmis:value>This is just a test document</cmis:value>
        </cmis:propertyString>
      </alf:properties>
    </alf:aspects>
  </cmis:properties>
</cmisra:object>
Any help would be really appreciated.

Regards

Outcomes