jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sorel <johann.so...@geomatys.fr>
Subject NodeDefinition on Node ? what is expected
Date Thu, 22 Oct 2009 08:11:58 GMT

I have been wondering for some time what is expected to be seen when we 
call getDefinition on a Node.

The JCR definition is pretty minimal :
"A node definition. Used in node type definitions."

On the Node interface "getDefinition" we have :
"Returns the node definition that applies to this node. In some cases 
there may appear to be more than one definition that could apply to this 
node. However, it is assumed that upon creation of this node, a single 
particular definition was used and it is /that/ definition that this 
method returns. How this governing definition is selected upon node 
creation from among others which may have been applicable is an 
implementation issue and is not covered by this specification. The 
|NodeDefinition| returned when this method is called on the root node of 
a workspace is also up to the implementation. "

What I don't understand is that the node definition holds information 
for the children nodes and the parent node, but not the current node.
The Javadoc is in contradiction since we create nodes by giving a NodeType :
addNode(String relPath,String primaryNodeTypeName)

So what Is expected in the NodeDefinition of a Node ?

thanks for the explications.


View raw message