+ * NOTE: this can take several seconds when done for the first time after JVM start, + * needs to scan all the jars in classpath. + * + * @return the context + * @throws JAXBException if the context cannot be created + */ + public static synchronized JAXBContext getAixm511FullJAXBContext() throws JAXBException { + if (aixm511FullJaxbContext == null) { + aixm511FullJaxbContext = JAXBContext.newInstance("icao.iwxxm2023_1:aero.aixm511full:net.opengis.gml32:org.iso19139.ogc2007.gmd:org.iso19139.ogc2007.gco:org" + + ".iso19139.ogc2007.gss:org.iso19139.ogc2007.gts:org.iso19139.ogc2007.gsr:net.opengis.om20:net.opengis.sampling:net.opengis.sampling" + + ".spatial:wmo.metce2013:wmo.opm2013:wmo.collect2014:org.w3c.xlink11"); + } + return aixm511FullJaxbContext; + } + + protected Document renderXMLDocument(final Object input, final ConversionHints hints) throws ConversionException { + final StringWriter sw = new StringWriter(); + try { + final Marshaller marshaller = getAixm511FullJAXBContext().createMarshaller(); + marshaller.setProperty(Marshaller.JAXB_ENCODING, "UTF-8"); + marshaller.setProperty(Marshaller.JAXB_SCHEMA_LOCATION, getSchemaInfo().getCombinedSchemaLocations()); + marshaller.setProperty("com.sun.xml.bind.namespacePrefixMapper", getNamespaceContext()); + marshaller.marshal(wrap(input, (Class