jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carlo Camerino <carlo.camer...@gmail.com>
Subject Re: How Does Jack Rabbit Generate Its UUID
Date Wed, 09 Feb 2011 14:40:47 GMT
the reason is, i need to get the filename based on the UUID.
is there any code that i could use to get the contents of the file

for example, the UUID in my database is c658068c-d124-4aa7-83ce-5383e8f06a47

i would like to know which file in the fsDataStore it corresponds to?

is there anything i could do to derive this?

On Wed, Feb 9, 2011 at 10:32 PM, Alexander Klimetschek

> On 09.02.11 15:25, "Carlo Camerino" <carlo.camerino@gmail.com> wrote:
> >is there anyway that I could relate this UUID to the filename?
> >how does jackrabbit compute what file name to fetch  based on the UUID
> >attribute ?
> Why do you want to do that?
> The generation of the UUID is implementation specific. You can get it with
> getUUID() (for mix:referenceable nodes) or with getIdentifier() (in JCR
> 2.0). But in most cases when you model content or use the JCR API you want
> to use paths instead of UUIDs:
> http://wiki.apache.org/jackrabbit/DavidsModel#Rule_.237:_ID.27s_are_evil.
> And how nodes and properties are stored on the file system is an
> implementation detail of the persistence manager. You should use the JCR
> API to access things, just as you don't access the database files of a
> Regards,
> Alex
> --
> Alexander Klimetschek
> Developer // Adobe (Day) // Berlin - Basel

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message