jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Jackrabbit Wiki] Update of "DataStore" by ThomasMueller
Date Tue, 04 Jan 2011 09:41:13 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jackrabbit Wiki" for change notification.

The "DataStore" page has been changed by ThomasMueller.
http://wiki.apache.org/jackrabbit/DataStore?action=diff&rev1=62&rev2=63

--------------------------------------------------

  
  === Retrieve the Identifier ===
  
+ The identifier can help you locate the file in the data store backend; 
+ however, creating a value instance from a identifier is currently not supported.
- To get the identifier of a binary value, use [[http://jackrabbit.apache.org/api/2.1/org/apache/jackrabbit/api/JackrabbitValue.html#getContentIdentity()|JackrabbitValue.getContentIdentity()]].
+ To get the identifier of a binary value, use [[http://jackrabbit.apache.org/api/2.1/org/apache/jackrabbit/api/JackrabbitValue.html#getContentIdentity()|JackrabbitValue.getContentIdentity()]].

+ Example:
+ 
+ {{{
+ 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();
+ }
+ }}}
  
  == Data Store Garbage Collection ==
  

Mime
View raw message