Get Alfresco extension properties with OpenCMIS
Posted
by AJPerez
on Stack Overflow
See other posts from Stack Overflow
or by AJPerez
Published on 2010-06-08T14:43:13Z
Indexed on
2010/06/10
14:03 UTC
Read the original article
Hit count: 717
I'm writing an OpenCMIS based application, which extracts some data from Alfresco 3.3.
It works fine with standard CMIS properties such as cmis:name
or cmis:contentStreamMimeType
; however, I can't access Alfresco especific properties, which are present on the CMIS AtomPub feed as "Alfresco extensions":
<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>
Is there any way in which I can get the value of cm:descripcion
, 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.
Any help would be really appreciated.
Regards
Edit: altough Florian's answer already worked out for me, I've just realized that I can get these properties' values with CMIS SQL, too:
select d.*, t.*, a.*
from cmis:document d
join cm:titled t on d.cmis:objectid = t.cmis:objectid
join cm:author a on d.cmis:objectid = a.cmis:objectid
where t.cm:description like ...
© Stack Overflow or respective owner