8 messages in org.apache.jackrabbit.usersRe: DM Rule #6: Files are Files are F...
FromSent OnAttachments
David NueschelerJul 7, 2007 4:29 am 
Tako SchotanusJul 10, 2007 4:37 am 
fmandelbaumOct 29, 2007 1:06 pm 
Julian ReschkeOct 30, 2007 12:37 am 
David NueschelerOct 30, 2007 3:13 am 
Julian ReschkeOct 30, 2007 4:10 am 
Felix MeschbergerOct 30, 2007 4:11 am 
Fabián MandelbaumOct 30, 2007 4:30 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: DM Rule #6: Files are Files are Files.Actions...
From:Julian Reschke (juli@gmx.de)
Date:Oct 30, 2007 12:37:42 am
List:org.apache.jackrabbit.users

fmandelbaum wrote:

Tako, I think the reason is that nt:file is not "customizable", while nt:resource is. That is, nt:file has a fixed set of properties, you cannot set your own.

That's the case for both nt:file and nt:resource. To set "own" properties, you need to extend both.

Whether or not custom properties should live on nt:file or nt:resource gets discussed regularly and I think it's fair so say that there is no standard way to do that.

For instance, if your data model is file system like (folders and files + metadata), such as in WebDAV, it definitively makes sense to have the underlying properties both on the nt:folder and nt:file (thus nt:hierachicalNode) nodes, and to use nt:resource only for metadata of the binary content (such as mime type, encoding and so on).

David,

how does one "extend" a node? By just adding properties to it? Is that the definition of "extends" that applies here? Or you extend nt:resource programatically somehow?

You need to extend the node type, for which there isn't yet a standard API (so you need Jackrabbit-specific APIs or config files for it).

Best regard, Julian