On Wed, Jun 12, 2013 at 09:01:51AM +0200, Jürgen Schmidt wrote: > On 6/12/13 8:45 AM, Rajath Shashidhara wrote: > > Hello Juergen, > > > > I'm following this: > > http://www.openoffice.org/api/docs/common/ref/com/sun/star/ucb/Content.html > > . > > Is there any other revised source that I have to follow? > > ok, I see what you mean. You have to implement simply a UNO object > implementing the XRow interface. And yes the docu say it is similar to a > ResultSet.
An XRow is the return type of the command "getPropertyValues", but when the command is "open" and OpenCommandArgument::Mode: is OpenMode::ALL or OpenMode::FOLDERS or OpenMode::DOCUMENTS the return type must be an XDynamicResultSet: http://svn.apache.org/viewvc/openoffice/trunk/main/ucb/source/ucp/ftp/ftpcontent.cxx?revision=1413471&view=markup#l551 http://svn.apache.org/viewvc/openoffice/trunk/main/ucb/source/ucp/package/pkgcontent.cxx?revision=1413471&view=markup#l1525 http://svn.apache.org/viewvc/openoffice/trunk/main/ucb/source/ucp/tdoc/tdoc_content.cxx?revision=1413471&view=markup#l1504 http://svn.apache.org/viewvc/openoffice/trunk/main/ucb/source/ucp/webdav/webdavcontent.cxx?revision=1460359&view=markup#l2168 > >> But the return datatype of Open Command is a dynamic result set. So, a > >> result set service must be implemented right? yes, when OpenCommandArgument::Mode: is OpenMode::ALL or OpenMode::FOLDERS or OpenMode::DOCUMENTS. When the "open" command tries to open a document, you must put the document stream into OpenCommandArgument::Sink. Please note that you are handling a wrong concept of "document". In the UCB context, a document is any content that "can dump itself into a data sink"; you are handling this as if documents were only AOO documents: in private Object obtainProperties(): else if(p.Name.equals("IsDocument")) result.add(content.getType().getDisplayName().equals("openDocument")?"True":"False"); Besides, you shouldn't rely on the display name, use instead http://chemistry.apache.org/java/0.8.0/maven/apidocs/org/apache/chemistry/opencmis/client/api/ObjectType.html There are 4 type of CMIS objects: document, folder, policy, relationship; the first two can be mapped to the UCB properties IsDocument and IsFolder, respectively. Regards -- Ariel Constenla-Haile La Plata, Argentina
pgp9nMvKFTFSk.pgp
Description: PGP signature
