users@jaxb.java.net

Customize ObjectFactory

From: Lulseged Zerfu <lulseged.zerfu_at_ericsson.com>
Date: Tue, 1 Jun 2010 08:44:05 +0200

Hi

 1. Is it possible to customize ObjectFactory? I have 20 schemas that are compiled to java and I get 20 ObjectFactories. Same class name but different.

 2. Is it possible to customize so that when compiling to java, any elemnts are put into a List and other defined elements are put in Set or Vector?

Example:


If the schema is compiled, one can see ListType, EntryType, ExternalType and EntryReftype including AnyType are all put together mixed in a java.util.List. Is it possible to put only AnyType in to a java.util.List and the other known types in a java.util.Set or java.util.Vector? The order of the orignal xml document is not offen important.

Instead of a method like getListOrExternalOrEntry() it will create get methods for each type, (getList(), getExternal(), getEntry(), getEntryRef() and getAny()).

This was how it used to work in 2.1.6 or earlier.

Lulseged