Woosan,
The contentIdentity is basically a "hash" of the data, so it can't be
generated for the first time without using the actual data, so the data I
think has to be read first. But it seems like you could store the hash
somewhere if you wanted to, You could just set a breakpoing on the
'getContentIdentity' and step into the code and see that it's generating a
hash. Seems like they would have stored this hash so it can be used again,
but i'm not sure if it's stored or not. If it is, stored you could use the
stored value rather than let it get recalculated every time.

Best regards,
Clay Ferguson
[email protected]


On Thu, Jul 7, 2016 at 4:14 PM, Woonsan Ko <[email protected]> wrote:

> Hi,
>
> I'm trying to retrieve Binary Value Identifier by following [1].
> The example shows retrieving it when creating a binary value.
> Is it possible to retrieve the identifier when reading binary value
> afterward?
> I tried it like this:
>
>             if (value instanceof JackrabbitValue) {
>                 contentId = ((JackrabbitValue) value).getContentIdentity();
>             }
>
> But, it always returns null. In debugging, it hits
> org.apache.jackrabbit.core.value.BLOBFileValue#getDataIdentifier() in
> my example and the method always returns null.
>
> Is #getContentIdentity() supposed to be used only when creating a
> binary value once initially, or is it kind of shortcoming at the
> moment?
>
> Regards,
>
> Woonsan
>
> [1] https://wiki.apache.org/jackrabbit/DataStore#Retrieve_the_Identifier
>

Reply via email to