I have XML that has tags corresponding to the three types of Java objects that will be created from XML. Objects have the form:
A
- static Map<String, A>
- String name
- String aInfo1
- String aInfo2
B
- static Map<String, B>
- String name
- String bInfo1
- String bInfo2
C
- A aObject
- B bObject
Now, in my XML, I define a list of tags for objects A and B, and then I define tags for objects C that refer to objects A and B using the name field. I have two requirements:
- populates static maps in A and B when reading objects A and B from XML. Maps will contain a mapping of A.name to A and B.name to B, respectively.
- populate C objects by reading A.name and B.name from the XML tag, and then using the maps defined in objects A and B.
Java, JAXB, XML. Java , ?
Edit:
:
D E
D
- Map<A, E>
E, , web.xml. E, E - . , E. :
<E>
<name>queryProcessor</name>
<class>com.mydomain.QueryProcessor</class>
</E>
D
<D>
<map>
<A>name_of_some_A_object</A>
<E name="queryProcessor">
<param1>name_of_some_B_object</param1>
<param2>name_of_some_B_object</param2>
</E>
<A>name_of_some_A_object</A>
<E name="queryProcessor">
<param1>name_of_some_B_object</param1>
<param2>name_of_some_B_object</param2>
</E>
</map>
</D>
, D E A, .