What is the relationship between cmis: document and cmis: folder, so I can search and know which folder a document belongs to (Qual a relação entre cmis:document e cmis:folder, para que eu possa fazer uma busca e saber para qual pasta pertence um document

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
gustavosandrade
Member II

What is the relationship between cmis: document and cmis: folder, so I can search and know which folder a document belongs to (Qual a relação entre cmis:document e cmis:folder, para que eu possa fazer uma busca e saber para qual pasta pertence um document

What is the relationship between cmis: document and cmis: folder, so I can search and know which folder a document belongs to using query?

2 Replies
afaust
Master

Re: What is the relationship between cmis: document and cmis: folder, so I can search and know which folder a document belongs to (Qual a relação entre cmis:document e cmis:folder, para que eu possa fazer uma busca e saber para qual pasta pertence um docu

I don't really understand the question. cmis:document is a 100% distinct base type from cmis:folder. Instances of cmis:folder form the filing hierarchy within a content repository while cmis:document will typically be the filed elements. Thus the relationship between cmis:folder and cmis:document could be described as "container" and "content".

In CMIS queries you can express a relationship condition using the IN_FOLDER(folderId) or IN_TREE(folderId) conditions within the WHERE clause. The former only checks for direct contents in that specific folder while the latter checks for contents anywhere in the entire tree below the folder.

jego
Established Member

Re: What is the relationship between cmis: document and cmis: folder, so I can search and know which folder a document belongs to (Qual a relação entre cmis:document e cmis:folder, para que eu possa fazer uma busca e saber para qual pasta pertence um docu

I guess that ‌ wants to list documents and the folder information via one cmis query!  Maybe he is thinking about a property to relate cmis:document and cmis:folder- I already answered him to the other question which relates to this one here. Alfresco is using associations for modeling this relationship!

If you are coming from Documentum  (or maybe other systems), you have a i_folder_id attribute on each document, so that you have the direct information as metadata. Alfresco does not have this out of the box, so you are not able to request this information via a CMIS query...

Thanks

Jens