public AbstractWritingJAXBBuilder (@Nonnull final IJAXBDocumentType aDocType) { super (aDocType); exceptionCallbacks ().add (new LoggingJAXBWriteExceptionHandler ()); }
/** * Create the main marshaller with the contained settings. * * @return The Marshaller and never <code>null</code>. * @throws JAXBException * In case creation fails */ @Nonnull @OverrideOnDemand protected Marshaller createMarshaller () throws JAXBException { final JAXBContext aJAXBContext = getJAXBContext (); // create a Marshaller final Marshaller aMarshaller = aJAXBContext.createMarshaller (); // Validating (if possible) final Schema aSchema = getSchema (); if (aSchema != null) aMarshaller.setSchema (aSchema); return aMarshaller; }
@Nonnull public final IMPLTYPE setMarshallerCustomizer (@Nullable final Consumer <? super Marshaller> aMarshallerCustomizer) { m_aMarshallerCustomizer = aMarshallerCustomizer; return thisAsT (); }
protected Marshaller createMarshaller () throws JAXBException final Marshaller aMarshaller = super.createMarshaller ();
@Override public String toString () { return ToStringGenerator.getDerived (super.toString ()) .append ("EventHandler", m_aEventHandler) .append ("NamespaceContext", m_aNSContext) .append ("FormattedOutput", m_bFormattedOutput) .append ("Charset", m_aCharset) .append ("IndentString", StringHelper.getHexEncoded (m_sIndentString, StandardCharsets.ISO_8859_1)) .append ("SchemaLocation", m_sSchemaLocation) .append ("NoNamespaceSchemaLocation", m_sNoNamespaceSchemaLocation) .getToString (); } }