Get metatadata and content of document in sub-folders - using Java backed webscript or CMIS query

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

Get metatadata and content of document in sub-folders - using Java backed webscript or CMIS query

Under Document Library, under Document, I have the folder structure as:

Folder1
    Folder 11
         Folder 111
               Doc1.pdf
                Doc2.pdf

I know the starting point URL of Folder1

I have written a java=backed WebScript using WebScriptRequest and WebScriptResponse. Within that webscript, I need to obtain the metadata and content of Doc1.pdf and Doc2.pdf

My questions:

1. With the starting point of Folder 1 being known to me, what API is available to navigate to the Doc1 and Doc2?

2. Is any CMIS query available, which can be used inside the webscript to navigate to Doc1 and Doc2?

3. What API could be used to get the metadata of Doc1?

4. What API could be used to get the content of Doc1?

5. Is there any API, or CMIS query available to find the count of the documents (count of Doc1, Doc2) that are at the lowest sub-folders?

1 Reply
sanjaybandhniya
Intermediate

Re: Get metatadata and content of document in sub-folders - using Java backed webscript or CMIS quer

Hi,

You can use recursion to get all files of subfolder.

NodeService is used to get metada of files.

You can use ContentReader to get content of file.