class XmlExtensionNotificationDataConverter implements ExtensionNotificationDataConverter {

    @Override
    public Object convertApplicationLastResult(
            final List<LastResult> lastresults) throws ConversionException {
        if (lastresults == null || lastresults.isEmpty()) {
            return null;
        }
        final LastResult lastresult = lastresults.get(0);
        final String utterance = lastresult.getUtterance();
        final String mode = lastresult.getInputmode();
        final float confidence = lastresult.getConfidence();
        final Object interpretation = lastresult.getInterpretation();
        try {
            return createEmma("lastresult", utterance, mode, confidence,
                    interpretation);
        } catch (ParserConfigurationException e) {
            throw new ConversionException(e.getMessage(), e);
        }
    }

}