E
Elhanan
hi..
i've been wrapping my heard around this for days but i can't seem to
find suitble solution..
i have an xml structure, which some if it's elements can be referened
by more then one element..
for example doctor could be related to patient element AND to person
element at the same time.
natrually this throws out the nesting completly, i don't know much
about jaxb customizing features, but i thought about maybe extending
the classes, but won't work either, the entire model needs to be saved
to a database with hibernate.
my only option as i see it is to maybe flatten the entire structure,
and then create my own collection of relations classes, where each
relations would have two classes attached to it, i would then during
marsheling use jaxb's regular marsheling and then before i output the
string mashel the relation classes myself and append it as a string to
entire xml..
the other problem is that i need create a uniq id for each class when i
turn to xml, jaxb naturally doesnt support this, i thought about
generating id's the entire set of elements uniq id's just before i
marshel them (or save them to a database) but for that i would need
that each element would inherit from one super class which will have id
attribute..
any thoughts?
i've been wrapping my heard around this for days but i can't seem to
find suitble solution..
i have an xml structure, which some if it's elements can be referened
by more then one element..
for example doctor could be related to patient element AND to person
element at the same time.
natrually this throws out the nesting completly, i don't know much
about jaxb customizing features, but i thought about maybe extending
the classes, but won't work either, the entire model needs to be saved
to a database with hibernate.
my only option as i see it is to maybe flatten the entire structure,
and then create my own collection of relations classes, where each
relations would have two classes attached to it, i would then during
marsheling use jaxb's regular marsheling and then before i output the
string mashel the relation classes myself and append it as a string to
entire xml..
the other problem is that i need create a uniq id for each class when i
turn to xml, jaxb naturally doesnt support this, i thought about
generating id's the entire set of elements uniq id's just before i
marshel them (or save them to a database) but for that i would need
that each element would inherit from one super class which will have id
attribute..
any thoughts?