jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Reschke <julian.resc...@gmx.de>
Subject Re: SPI: PropertyDefinition.getRequiredType
Date Wed, 22 Nov 2006 14:57:55 GMT
Jukka Zitting schrieb:
> Hi,
> 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:

That's what I'm trying to find out...

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

Question here is whether that symmetry is guaranteed (maybe JSR-283 can 
clarify that), and whether breaking the symmetry provides any useful 
additional information to the client...

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

Best regards, Julian

View raw message