jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rahul Raj <rahul....@option3consulting.com>
Subject Re: Query on nt:Linkedfile
Date Sat, 02 Apr 2016 15:41:07 GMT
I can add a  node property to the leaf nodes. Will it help in dereferencing
the linked files?

Let me make the question clear with the structure below.

rootfolder
         -nt:file(file1)
         -nt:folder(folder1)
                           -nt:file(file2)
                           -nt:file(file3)
         -nt:file(file4)

Here, a query like select f.* from [nt:file] as f where
ISDESCENDANTNODE(f,'/rootfolder')
fetches all files from root folder.

Now the same files are linked to form a sharedfolder as below:

sharedfolder
         -nt:linkedfile(to file1)
         -nt:linkedfile(to folder1)
                              -file2
                              -file3
         -nt:linkedfile(to file4)

What query would achieve similar results?

Rahul

On Sat, Apr 2, 2016 at 8:29 PM, Clay Ferguson <wclayf@gmail.com> wrote:

> probably the way that makes most sense is make your files (leaf nodes) a
> specific node type, or else let them all have a property that you can test
> for like "objType=file" or something. Even if you found a solution based on
> finding nodes that are leaf nodes, or have no children or whatever, i would
> still go with the approach I just said, because it's clean, and allows more
> nodes to be attached to the tree later on without "breaking your logic"
> about how to find all files under some branch.
>
> Best regards,
> Clay Ferguson
> wclayf@gmail.com
>
>
> On Fri, Apr 1, 2016 at 11:30 PM, Rahul Raj <
> rahul.raj@option3consulting.com>
> wrote:
>
> > We have a shared directory structure as shown below. The shared folder
> has
> > links to files and folders.
> >
> > sharedfolder
> >          -nt:linkedfile(file1)
> >          -nt:linkedfile(folder1)
> >                               -file2
> >                               -file3
> >          -nt:linkedfile(file4)
> >
> > How to write a jcr sql2 query that will fetch all of file1,file2,file3
> and
> > file4 while performing a  ISDESCENDANTNODE on the sharedfolder
> > I could not figure out a way to de-reference the linkedFiles while using
> > ISDESCENDANTNODE.
> >
> >
> > Regards,
> > Rahul
> >
> > --
> > **** This email and any files transmitted with it are confidential and
> > intended solely for the use of the individual or entity to whom it is
> > addressed. If you are not the named addressee then you should not
> > disseminate, distribute or copy this e-mail. Please notify the sender
> > immediately and delete this e-mail from your system.****
> >
>

-- 
**** This email and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom it is 
addressed. If you are not the named addressee then you should not 
disseminate, distribute or copy this e-mail. Please notify the sender 
immediately and delete this e-mail from your system.****

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