List of utility methods to do XML JAXB Marshaller
Marshaller | getMarshaller() get Marshaller return jaxbContext.createMarshaller();
|
Marshaller | getMarshaller() get Marshaller Marshaller m = marshaller.get(); if (m == null) { m = jaxbContext.createMarshaller(); marshaller.set(m); return m; |
Marshaller | getMarshaller(boolean prettyFormat) get Marshaller Marshaller m = jxbc.createMarshaller(); m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, prettyFormat); m.setProperty("com.sun.xml.bind.indentString", " "); return m; |
Unmarshaller | getMarshaller(Class> c) get Marshaller if (marshallerMap.containsKey(c)) { return marshallerMap.get(c); } else { JAXBContext context = JAXBContext.newInstance(c); Unmarshaller unmarshaller = context.createUnmarshaller(); marshallerMap.put(c, unmarshaller); return unmarshaller; |
Marshaller | getMarshaller(Class get Marshaller Marshaller marshaller = marshallers.get(clazz); if (marshaller == null) marshaller = createMarshaller(clazz); return marshaller; |
Marshaller | getMarshaller(final String contextPath) get Marshaller final JAXBContext jaxbContext = JAXBContext.newInstance(contextPath); final Marshaller marshaller = jaxbContext.createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); return marshaller; |
Marshaller | getMarshaller(String jaxbContext, boolean pretty) creates a marshaller on pooled JAXBContext instances. JAXBContext context = null; synchronized (contexts) { context = contexts.get(jaxbContext); if (null == context) { context = JAXBContext.newInstance(jaxbContext); contexts.put(jaxbContext, context); Marshaller marshaller = null; synchronized (context) { marshaller = context.createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, new Boolean(pretty)); return marshaller; |
String | getSchemaLocation(@Nonnull final Marshaller aMarshaller) get Schema Location return _getStringProperty(aMarshaller, Marshaller.JAXB_SCHEMA_LOCATION);
|
Object | getSunNamespacePrefixMapper(@Nonnull final Marshaller aMarshaller) get Sun Namespace Prefix Mapper return _getProperty(aMarshaller, SUN_PREFIX_MAPPER);
|
boolean | isInternalSunJAXB2Marshaller(@Nullable final Marshaller aMarshaller) Check if the passed marshaller is an internal one contained in the runtime. return aMarshaller != null && aMarshaller.getClass().getName().equals(JAXB_INTERNAL_CLASS_NAME);
|