* @return the converter
*/
private IConverter getConverter(Class<?> targetFormat) {
ParameterBlock pb = new ParameterBlock();
pb.addSubBl(AbstractConverterFactory.TYPE, targetFormat);
ConverterFactory cF = null;
try {
cF =
SimSystem.getRegistry()
.getFactory(AbstractConverterFactory.class, pb);
} catch (NoFactoryFoundException nothingFound) {
if (targetFormat.equals(SimpleDocument.class)) {
return new DefaultConverter();
}
throw new ConversionException("Configuration problem: No converter for "
+ this.getClass().getCanonicalName() + " to a document of type "
+ targetFormat + " exists!", nothingFound);
}
pb.setValue(this);
return cF.create(pb, SimSystem.getRegistry().createContext());
}