1

I created a new Alfresco document, and added a custom aspect (EXIF aspect) to it.

How to get the values of this metadata via OpenCMIS/DotCMIS?

I tried the following but it does not show the EXIF metadata (nor presumably any custom aspect metadata):

foreach(IProperty property in document.Properties)
{
    if (property.IsMultiValued)
    {
         metadata.Add(property.Id, property.ValuesAsString);
    }
    else
    {
         metadata.Add(property.Id, property.ValueAsString);
    }
}
Nicolas Raoul
  • 58,567
  • 58
  • 222
  • 373
  • Have you tried with the [Alfresco OpenCMIS Extension](http://code.google.com/a/apache-extras.org/p/alfresco-opencmis-extension/)? That makes it much easier to get at aspect properties, which come through as `CMIS Policy Types` and won't by default be available in the properties map (as Policies are different) – Gagravarr Apr 09 '13 at 11:40
  • @Gagravarr: Since CMIS 1.1 now has a Secondary Object Type feature which sounds tailor-made for aspects, I guess there must be a pure-CMIS way to access them? I would prefer to avoid using Alfresco-specific code/extensions. https://www.oasis-open.org/committees/download.php/41368/SecondaryTypesProposal.docx – Nicolas Raoul Apr 10 '13 at 05:01
  • I'm not certain, but I think you'll need to be running a nightly build of Alfresco to get CMIS 1.1 support. Apache Chemistry has some CMIS 1.1 support on the Java side, but I don't believe it's complete, and I'm pretty sure the other language bindings haven't been updated yet. Can you maybe wait 3-6 months? :) – Gagravarr Apr 10 '13 at 09:05
  • Otherwise, you'll have to get them from the policy types data, which is a bit fiddly (unless you use the Alfresco extension) – Gagravarr Apr 10 '13 at 09:06

1 Answers1

2

You cannot read aspect based properties without using the extension Gagravarr mentioned until Alfresco supports CMIS 1.1. As of today there are no Alfresco releases either in Enterprise Edition or Community Edition that supports CMIS 1.1. I doubt 4.2 will include CMIS 1.1 but hopefully the release after that will.

Jeff Potts
  • 10,468
  • 17
  • 40