Hello Cullen

Welcome!

Le 01/06/2017 à 21:22, Cullen Rombach a écrit :

> I am currently working on implementing a new profile of ISO metadata
> using Apache SIS, and I need to extend two codelists to have new
> values. More specifically, I need to add new codes to OnLineFunction
> (CI_OnLineFunctionCode) and ScopeCode (MD_ScopeCode).
>
Just invoking something like the following should work (you do not need
to create a subclass):

    public static final OnlineFunction MY_NEW_CODE =
    OnlineFunction.valueOf("myNewCode");

Contrarily to Enum.valueOf(String), invoking CodeList.valueOf(String)
does not throw an exception; it creates the new code instead. This is
the main difference between CodeList and Enum.


> I'd also like my new classes to use a different codelist URL.
>
I would suggest to copy and paste an existing CodeList, for example [1],
rename it and replace all fields by the new fields for that code list.
But for injecting a different URL at XML marshalling time, I need to
check first and will send another email after.

    Regards,

        Martin

[1] 
https://github.com/opengeospatial/geoapi/blob/master/geoapi/src/main/java/org/opengis/metadata/citation/OnLineFunction.java

Reply via email to