On Thu, Nov 29, 2012 at 11:34 AM, Martin Desruisseaux <
[email protected]> wrote:

> In Java, we can not really express "nil value" by null, because "nil
> value" are not completely nil... They may still be associated to XLink or
> the above-cited NilReason. So the proposed approach, which was implemented
> in Geotk, is to still return an instance of the metadata object, but the
> instance additionally implements the NilObject marker interface - meaning
> "I'm totally empty from an ISO 19115 point of view - but I may still have
> some ISO 19139 attributes, in particular a NilReason attribute" (sorry for
> the headache... The OGC/ISO standards are very complex...). The above-cited
> javadoc contains an example of what it looks like in XML.
>
> Is there any comment about this approach?


I think this looks like a good approach. On first glance I wondered if
using some kind of enum or constant would be preferable, but it sounds like
a marker interface is more flexible. It gives you the flexibility to
include the other attributes you were referring to.

Greg

Reply via email to