Package org.jamesii.core.model.symbolic.convert.plugintype

Examples of org.jamesii.core.model.symbolic.convert.plugintype.ConverterFactory


   * @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());
  }
View Full Code Here

TOP

Related Classes of org.jamesii.core.model.symbolic.convert.plugintype.ConverterFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.