Hi,
My goal is to retrieve the identifier to locate the actual file in the data
store back-end which is in an oracle database. The files are currently in a
table with a hash value for those document contents that it has apparently
stored.
I'm not a java guy but I found this code in your data store page that I"m
trying to put to use:
InputStream in;Binary b =
session.getValueFactory().createBinary(in);Value value =
session.getValueFactory().createValue(b);if (value instanceof
JackrabbitValue) { JackrabbitValue jv = (JackrabbitValue) value;
String id = jv.getContentIdentity();}
=========
So here's what I did by putting them in a identifier.java file:
import javax.jcr.*;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
public class identifier {
public static void main(String[] args) {
InputStream in;
Binary b = session.getValueFactory().createBinary(in);
Value value = session.getValueFactory().createValue(b);
if (value instanceof JackrabbitValue) {
JackrabbitValue jv = (JackrabbitValue) value;
String id = jv.getContentIdentity();
}
}}
==
And then from the command prompt, I tried to execute like this
javac -cp "C:\Program Files\Apache Software Foundation\Tomcat
5.5\webapps\fullcourtweb\WEB-INF\lib" c:\identifier.java
But then I got a stream of errors that it's unable to locate the
package..I tried pointing the ..\classpath to \classes instead of
..\lib, but that didn't help either.
The reason I used this lib path is because that's where the war files
(many *.jar's are in there) seem to be deployed.
Any assistance from you guys to retrieve the information would be appreciated.
Thank you,
PR