[Biojava-dev] cardinalities on AnnotationType & PropertyConstraint

Schreiber, Mark mark.schreiber@agresearch.co.nz
Fri, 1 Nov 2002 09:19:10 +1300


I don't think ZERO is needed at all except in the case of ZERO_OR_ONE.

-Mark

> -----Original Message-----
> From: Thomas Down [mailto:td2@sanger.ac.uk] 
> Sent: Friday, 1 November 2002 6:07 a.m.
> To: Matthew Pocock
> Cc: Biojava-dev@biojava.org
> Subject: Re: [Biojava-dev] cardinalities on AnnotationType & 
> PropertyConstraint
> 
> 
> On Thu, Oct 31, 2002 at 04:21:46PM +0000, Matthew Pocock wrote:
> > I've made some changes to the AnnotationType and PropertyConstraint
> > classes. We now have a class CardinalityConstraint that 
> lets us say how 
> > many values we expect to see associated with a property in 
> an annotation 
> > bundle. There are some common values - ZERO, ONE, 
> ZERO_OR_ONE, ANY, and 
> > you can make new ones (e.g. 4..4, 12..15, 1..2) if they help you.
> 
> This is good to have.
> 
> I think we need to clarify the semantics a little, though.
> Do we distinguish between properties which exist with 
> cardinality 0 (which is possibly in the current Annotation 
> interface, if the value is a Collection of size zero), and 
> properties which are undefined.
> 
> I guess defined properties with zero cardinality are useful
> as flags.  But that feels like a bit of a hack, since you 
> could equally well have a property of datatype boolean, 
> cardinality EXACTLY_ONE.  
> 
> Any thoughts?
> 
>     Thomas.
> _______________________________________________
> biojava-dev mailing list
> biojava-dev@biojava.org 
> http://biojava.org/mailman/listinfo/biojava-dev
> 
=======================================================================
Attention: The information contained in this message and/or attachments
from AgResearch Limited is intended only for the persons or entities
to which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipients is prohibited by AgResearch
Limited. If you have received this message in error, please notify the
sender immediately.
=======================================================================