class XmlExtensionNotificationDataExtractor implements ExtensionNotificationDataExtractor {

    @Override
    public RecognitionResult getRecognitionResult(final Mmi mmi,
            final ExtensionNotification ext) throws ConversionException {
        JAXBContext context;
        try {
            context = JAXBContext.newInstance(Mmi.class);
            Marshaller marshaller = context.createMarshaller();
            final EmmaSemanticInterpretationExtractor extractor = new EmmaSemanticInterpretationExtractor();
            marshaller.marshal(mmi, extractor);
            return extractor.getRecognitonResult();
        } catch (JAXBException e) {
            throw new ConversionException(e.getMessage(), e);
        }
    }

}