Jody Garnett a écrit :
> - I imagine Martin has carefully named the methods so an Java 5 Enum can
> extend CodeList, although I am not positive on this
It was my intend. Unfortunatly it doesn't seem to be possible (at least last
time I tried).
The ISO specification make a clear distinction between "enumeration" and "code
list". According ISO
19103, an enumeration is frozen: you can't add new elements to an enumeration.
Code list on the
other hand are extensible. This is the only difference I'm aware of.
Last time I tried, I have been unable to extends a java.lang.Enum (I means
create new constants for
an existing Enum). Being able to add new constants as been considered as a
strong requirement for
code list. Unless I missed some technic or unless there is some changes in
java.lang.Enum
restriction in a future Java release, I'm not sure that it will be possible to
turn CodeList into
java.lang.Enum in a future GeoAPI release. Note that java.lang.Enum
restrictions are really
consistent with ISO definition of enumeration.
Right now, the approach when derivating an interface from ISO specification is
to look at the ISO
type. If ISO said that it is an enum, use java.lang.Enum. If ISO said that it
is a code list,
extends CodeList. In the vast majority of case, ISO ask for code list. I have
found very few
enumerations in ISO specifications (but there is some).
Martin.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel