jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Perez <mper...@gmail.com>
Subject Re: Child nodes and inheritance
Date Fri, 17 Feb 2006 11:22:28 GMT
Yes, you can. There is no need to specify the list of sub-types.

Martin

On 2/17/06, Mark Slater <lists@humanesoftware.com> wrote:
>
> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message