Search in sources :

Example 1 with XmlInputFileException

use of gov.cms.qpp.conversion.decode.XmlInputFileException in project qpp-conversion-tool by CMSgov.

the class Converter method encode.

/**
 * Place transformed content into an input stream
 *
 * @return content resulting from the transformation
 */
private JsonWrapper encode() {
    JsonOutputEncoder encoder = getEncoder();
    DEV_LOG.info("Encoding template ID {}", decoded.getType());
    try {
        encoder.setNodes(Collections.singletonList(decoded));
        JsonWrapper qpp = encoder.encode();
        details.addAll(encoder.getDetails());
        return qpp;
    } catch (EncodeException e) {
        throw new XmlInputFileException("Issues decoding/encoding.", e);
    }
}
Also used : JsonWrapper(gov.cms.qpp.conversion.encode.JsonWrapper) XmlInputFileException(gov.cms.qpp.conversion.decode.XmlInputFileException) JsonOutputEncoder(gov.cms.qpp.conversion.encode.JsonOutputEncoder) EncodeException(gov.cms.qpp.conversion.encode.EncodeException)

Aggregations

XmlInputFileException (gov.cms.qpp.conversion.decode.XmlInputFileException)1 EncodeException (gov.cms.qpp.conversion.encode.EncodeException)1 JsonOutputEncoder (gov.cms.qpp.conversion.encode.JsonOutputEncoder)1 JsonWrapper (gov.cms.qpp.conversion.encode.JsonWrapper)1