cancel
Showing results for 
Search instead for 
Did you mean: 

CMIS Query Language - Has not Aspect

castgroupteam
Champ in-the-making
Champ in-the-making
How can I query my Alfresco repository through CMIS Query Language asking for all nodes which does not implement a custom aspect?
(Something like NOT hasAspect("my:customAspect")).
Using the join syntax I can ask for nodes with all aspects I want but in this case I need to exclude nodes which has not a particular aspect.

Someone can help?

Thanks in advance.
Daniele
12 REPLIES 12

iblanco
Confirmed Champ
Confirmed Champ
You're right kaynezhang, it increases capabilities but be aware that this is out of the CMIS estándar so don't expect your code to work properly if ported to other CMIS compliant server.

kaynezhang
World-Class Innovator
World-Class Innovator
The CMIS interface is designed to be layered on top of existing Content Management systems and their existing programmatic interfaces. It is not intended to exhaustively expose all of the CM system's capabilities through the CMIS interfaces. So if we want to use CMIS interface ,we will lose some specific  capabilities provided by a specicific CM system.If we wan to use some specific  capabilities ,we still need to use CMIS extension or vendor specific api.
alfresco Aspects is alfresco specific feature( apsect is not  include CMIS v1.0 specification ,Secondary object types are added in CMIS v1.1,but opencmis has not implemented yet ).
So I think it's ok to use cmis-alfresco query language.

castgroupteam
Champ in-the-making
Champ in-the-making
you are all right.
contains clause (cmis-alfresco) increase CMIS query capabilities but your code then cannot work properly if ported to other cmis compliant server.
In any case I think that if you have to integrate Alfresco with any other environements, cmis choice is the better (and easiest) solution.
In many cases it is not enough, for transaction based tasks, for example, cmis is not enough.