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:25:11 GMT
Angela Schreiber schrieb:
> hi
> 
> sorry. i reread you mail multiple times, and i don't get
> your point.

Sorry, I'll try to do better this time.

> here is what jsr170 defines:
> 
> - that PropertyDefinition.getRequiredType() may be one of
>   STRING, BINARY, DATE, LONG, DOUBLE, NAME, PATH, REFERENCE,
>   BOOLEAN or UNDEFINED.

OK.

> - If PropertyDefinition.getRequiredType() is UNDEFINED,
>   then a Property having this definition may be of any type.

OK.

> - The value of a property may never be UNDEFINED. Thus,
>   Property.getType() will never return UNDEFINED.

OK.

> - Node.setProperty: If the node type of this node does not indicate
>   a specific property type, then the property type of the supplied
>   Value object is used and if the property already exists (has
>   previously been set) it assumes both the new value and new
>   property type.

Yes.

> if you want to point out, that the NodeTypeRegistry doesn't
> get informed about new registrations: that's a known issue
> (see TODO.txt) and covered by the jira issue, you created
> recently.

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).

I understand this is not the case for Jackrabbit, but for other stores, 
it may happen. What I'm trying to understand is whether this is a hole 
in SPI or not. Keep in mind that there are document management systems 
where the set of property types really is open-ended, such as in a 
generic WebDAV server.

Best regards, Julian





Mime
View raw message