I'm looking for some general design feedback.

We are using xstream to serialize/unserialize java content as the most
expeditious way to provide a persistent file format for a design model.

Initially we didn't have any custom converters since there was no motivation
to do so since the generic transforms worked great.
Unfortunately now we are running into a situation where it would be
desirable to have our own converters, but we still need to
be able to convert the older model files.

Is there a way to 'chain' converters such that I can behave sanely in the
'HELP' situation below I've presented below.

Thanks,
 Thomas
-----------------

XStream xstream = new XStream(new Xpp3Driver() )
xstream.registerConverter(new MyConverter())

class MyConverter implements Converter {
 public Object unmarshal(HierarchicalStreamReader reader,
UnmarshallingContext context) {
  //If this is something converted using the new style ... convert it and
return

       //Otherwise: HELP! I don't want to fail here! =;-)
 }
 ...
}
 


Reply via email to