jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Woonsan Ko <woon...@apache.org>
Subject Re: Retrieving Binary Value Identifier
Date Fri, 08 Jul 2016 04:24:54 GMT
On Thu, Jul 7, 2016 at 6:59 PM, Clay Ferguson <wclayf@gmail.com> wrote:
> also one more thing. The only purpose of the contentIdentity is probably
> for comparing one blob against another blob to see if the blobs are
> byte-by-byte exactly the same or not without having to read the blobs. If
> you are using the contentIdentity for any other purpose, you probably
> should rethink. It's like a checksum for efficient blob comparison.

My intention is to help build a migration tool by showing the binary
content id in a jcr explorer. Then the tool can allow to compare/debug
the data between source and destination DataStore. So, it's really for
internal debugging/tracing purpose only in backends.

Regards,

Woonsan

>
> Best regards,
> Clay Ferguson
> wclayf@gmail.com
>
>
> On Thu, Jul 7, 2016 at 4:14 PM, Woonsan Ko <woonsan@apache.org> 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
>>

Mime
View raw message