Re: Store object

2005-06-02 Thread Martin Kalén

Guillaume Chervet wrote:

Do you know where I can find more informations about slide? I don't
understand the store system. I am using (org.apache.slide.content) but I
don't find how to store some java objects. I can store String object
using this example
http://wiki.apache.org/jakarta-slide/Sample_API_application, but nothing
more.
Do you know how it works?


If you can serialize your objects, you can use Java serialization to
byte array or ObjectOutputStream/ObjectInputStream and store the
contents by calling:

void store(SlideToken token, String strUri,
   NodeRevisionDescriptor revisionDescriptor,
   NodeRevisionContent revisionContent)

The NodeRevisionContent is the Slide API object carrying the content
itself and you need to attach content to it like so:
  NodeRevisionContent content = new NodeRevisionContent();
  content.setContent(bytes[] or char[] or Reader or InputStream);


To understand how to use the API it's a good idea to browse through
different methods in the WebDAV servlet implementation. Or you can
try WCK for an API that might be easier to digest than the full
Content / Storage etc in Slide.

HTH,
 Martin


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Store object

2005-05-26 Thread Darren Hartford
Sounds like your looking for an object-oriented database (storing java
objects).  Check out ozone-db, intersystems cache, db4o, and similar
systems if that is your intent.

If you are looking to use Slide for storing files, recommend you look
into using the WebDAV interface instead of the direct Slide API, or the
WCK (http://jakarta.apache.org/slide/wck.html), and maybe read some of
the website to understand where 'Slide' may fit in.

As for the actual example, it lookes like the 'data' parameter is in
this example an XML data file, per why it's a String?

-D


 -Original Message-
 From: Guillaume Chervet [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, May 26, 2005 7:37 AM
 To: slide-user@jakarta.apache.org
 Subject: Store object
 
 Hello,
 
 Do you know where I can find more informations about slide? I 
 don't understand the store system. I am using 
 (org.apache.slide.content) but I don't find how to store some 
 java objects. I can store String object using this example 
 http://wiki.apache.org/jakarta-slide/Sample_API_application, 
 but nothing more.
 Do you know how it works?
 
 Thanks
 
 Guillaume
 
  Disclaimer, Security  Viruses :
 ==
 ===
  This email is confidential and intended solely for the use 
 of the individual to whom it is addressed. Any views or 
 opinions presented are solely those of the author and do not 
 necessarily represent those of Result Group Ltd. If you are 
 not the intended recipient, be advised that you have received 
 this email in error and that any use, dissemination, 
 forwarding, printing,or copying of this email is strictly prohibited.
 
  If you have received this email in error please notify the 
 sender by reply or by telephone on +44 (0)1422 327000.
 
  Please note that this e-mail has been created in the 
 knowledge that the Internet e-mail is not a 100% secure 
 communications medium.
  We advise that you understand and observe this lack of 
 security when e-mailing us.
 
  Although we have taken steps to ensure that this e-mail and 
 attachments are free from any virus, we advise that in 
 keeping with good computing practice the recipient is 
 responsible for ensuring they are actually virus free.
 ==
 ===
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]