Martin, That should do the trick. Thank you for your help. It is much appreciated.
Regards, Cullen On Fri, Jun 2, 2017 at 1:36 PM, Martin Desruisseaux < [email protected]> wrote: > Hello Cullen > > Completing my yesterday email with the second question: > > Le 01/06/2017 à 21:22, Cullen Rombach a écrit : > > > I also can't find where the codelist URL is injected, but I need to > > override that behavior. > > > There is not yet a public API for that, but it is possible to use the > internal API in the meantime. Everything in "org.apache.sis.internal" is > undocumented and may change in any future version, but this part has not > changed for years. > > First, the new CodeList type will need a new JAXB adapter. It can be > done be copying the > org.apache.sis.internal.jaxb.code.CI_OnLineFunctionCode class (for > instance) and rename all "OnLineFunction" part by the name of the new > CodeList. > > Next, we can cheat by modifying the 'getElement()' method in the new > adapter, like below: > > @Override > @XmlElement(name = "MyCodeListType") > public CodeListUID getElement() { > identifier.codeList = "http://myURL#myCodeList"; > return identifier; > } > > This will work only for new code list types. If a different URL is > desired for new code list *elements* in an existing type (like adding > new OnlineFunctionCode), then we will need a better mechanism. In any > case we need a better approach than the above; we just didn't had a > though yet about what could be the public API for the purpose of > injecting different URLs for different code lists. > > Martin > > > -- Cullen Rombach Image Matters LLC www.imagemattersllc.com
