Dear all,
I am learning ways of doing things in Marklogic server. I have managed to save 
a collection to Marklogic server which consists of few .gif images. The 
document URI's are the actual file names when I stored them in collection e.g. 
image1, image2 etc..The collection is named "imageCollection". I can query for 
"imageCollection" and it does return 3 images in result set. Unfortunately, I 
am unable to figure out how to get "file name" or Document URI of these images 
? 

                createOptions = ContentCreateOptions.newBinaryInstance();       
        createOptions.setCollections(new String[]{"imageCollection"});          
                createOptions.setFormatBinary();
                content = 
ContentFactory.newContent(someContent.getAttachmentsFileNames()[i], 
someContent.getAttachments()[i], createOptions);            
System.out.println("Inserting contents..");            
session.insertContent(content);         
The call to 
    Request request = session.newAdhocQuery(" collection(\"imageCollection\") 
");
        ResultSequence rs = session.submitRequest(request);
while(rs.hasNext()){            System.out.println("Inside contentDao 
44444444");
                ResultItem item = rs.next();
       Following call returns null       
System.out.println(item.getDocumentURI()); Please help me understand how to get 
the file names of the images so that I can use them to render back on screen.

ThanksAmaresh Wakkar                                              
_______________________________________________
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to