You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by "Datta, Neela" <Ne...@dialog.com> on 2002/03/21 00:47:32 UTC
Versioned text files in Slide does not store deltas???( I am not
using WebDAV but plain slide API)
I was wondering how I could store only deltas of a text document when I use
filecontentstore( on the file system).
I want to make sure, as the way I am doing it seems to be storing the whole
content in a separate file. The following code creates /files/test_1.0.txt
and /files/test_1.1txt with the whole text and not the delta. I am trying
to store the following character array:
First version - "This is NodeRevisionContent Rev. 1.0"
Second version - "This is NodeRevisionContent Rev. 2.0"
// Now creating some revisions
NodeRevisionDescriptor revisionDescriptor =
new NodeRevisionDescriptor(0);
NodeRevisionContent rc = new NodeRevisionContent();
//rc.setContent("This is NodeRevisionContent Rev.
1.0".toCharArray());
String tmp = "This is NodeRevisionContent Rev. 1.0";
rc.setContent(tmp.toCharArray());
token.begin();
revisionDescriptor.setProperty("revision", "1");
revisionDescriptor.setContentLength(tmp.length());
content.create(slideToken, "/test", revisionDescriptor, rc);
revisionDescriptor.setProperty("revision", "2");
String tmp1 = "This is NodeRevisionContent Rev. 2.0";
revisionDescriptor.setContentLength(tmp1.length());
NodeRevisionContent rc1 = new NodeRevisionContent();
rc1.setContent(tmp1.toCharArray());
content.create(slideToken, "/test", "main",revisionDescriptor,
rc1);
--Neela
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>