jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting" <jukka.zitt...@gmail.com>
Subject Re: SPI: PropertyDefinition.getRequiredType
Date Wed, 22 Nov 2006 14:49:04 GMT

On 11/22/06, Julian Reschke <julian.reschke@gmx.de> wrote:
> No, the point is that in JSR-170 it is possible that for a given node
> type N, the NodeType interface will only return residual property
> definitions (because the set of property definitions on this node type
> may be very large), while Property.getPropertyDefinition() will return a
> non-residual definition (because in this case, the property name is
> known in advance, so the size problem above doesn't matter).

Are you sure this is OK? At least it breaks the following symmetry:

    PropertyDefinition definition = property.getDefinition();
    NodeType type = definition.getDeclaringNodeType();
    assert Arrays.asList(type.getDeclaredPropertyDefinitions()).contains(definition);

I would return the residual node definition from
Property.getDefinition() unless the underlying more specific
definition has been explicitly exposed through the NodeType API.


Jukka Zitting

View raw message