logger.warning("Attribute " + attributeName + " cannot be processed. (" + location + ")"); warning(context.getMonitor(), "AttributeCannotBeProcessed", processors, attributeName, location); logger.warning("Could not find Default Attribute processor !"); warning(context.getMonitor(), "DefaultAttributeProcessorNotAvailable", processors, ANY_ATTRIBUTE, location);
@SuppressWarnings("unchecked") public void write(Object model, XMLStreamWriter outputSource, ProcessorContext context) throws ContributionWriteException, XMLStreamException { if (model == null) { return; } // Delegate to the processor associated with the model type StAXAttributeProcessor processor = processors.getProcessor(model.getClass()); if (processor == null) { if (!Extension.class.isInstance(model)) { if (logger.isLoggable(Level.WARNING)) { logger.warning("No StAX processor is configured to handle " + model.getClass()); } warning(context.getMonitor(), "NoStaxProcessor", processors, model.getClass()); } } else { processor.write(model, outputSource, context); return; } //handle extension attributes without processors processor = (StAXAttributeProcessor<?>)processors.getProcessor(ANY_ATTRIBUTE); if (processor == null) { if (logger.isLoggable(Level.WARNING)) { logger.warning("No Default StAX processor is configured to handle " + model.getClass()); } warning(context.getMonitor(), "NoDefaultStaxProcessor", processors, model.getClass()); } else { processor.write(model, outputSource, context); return; } }
@SuppressWarnings("unchecked") public void write(Object model, XMLStreamWriter outputSource, ProcessorContext context) throws ContributionWriteException, XMLStreamException { if (model == null) { return; } // Delegate to the processor associated with the model type StAXAttributeProcessor processor = processors.getProcessor(model.getClass()); if (processor == null) { if (!Extension.class.isInstance(model)) { if (logger.isLoggable(Level.WARNING)) { logger.warning("No StAX processor is configured to handle " + model.getClass()); } warning(context.getMonitor(), "NoStaxProcessor", processors, model.getClass()); } } else { processor.write(model, outputSource, context); return; } //handle extension attributes without processors processor = (StAXAttributeProcessor<?>)processors.getProcessor(ANY_ATTRIBUTE); if (processor == null) { if (logger.isLoggable(Level.WARNING)) { logger.warning("No Default StAX processor is configured to handle " + model.getClass()); } warning(context.getMonitor(), "NoDefaultStaxProcessor", processors, model.getClass()); } else { processor.write(model, outputSource, context); return; } }
logger.warning("Attribute " + attributeName + " cannot be processed. (" + location + ")"); warning(context.getMonitor(), "AttributeCannotBeProcessed", processors, attributeName, location); logger.warning("Could not find Default Attribute processor !"); warning(context.getMonitor(), "DefaultAttributeProcessorNotAvailable", processors, ANY_ATTRIBUTE, location);