jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Slater <li...@humanesoftware.com>
Subject Child nodes and inheritance
Date Fri, 17 Feb 2006 10:48:23 GMT
I'm working on the definitions of the node types in my application.  
After reading the spec, there's one thing that didn't come across  
clearly (well, so far anyway). If I define a node with a required  
type of child node, can that child's primary type be a sub-type of  
the required node?

For example, say I have the following nodes defined

nt:base
|
|--- Vehicle
|      |
|      |--- Car
|      |
|      |--- Bicycle
|      |
|      |--- Boat
|
|--- Person

And I want to require a person to have a "primaryVehicle" child. I'd  
like that type to be anything in the Vehicle hierarchy. So can I  
define the type to be Vehicle, or do I need to give the list of  
Vehicle sub-types?

I'm assuming there's no way to define a type as abstract... if there  
were, I'd make Vehicle in the above example abstract.

Thanks,

Mark



Mime
View raw message