Package com.helger.jaxb.builder
Class JAXBWriterBuilder<JAXBTYPE,IMPLTYPE extends JAXBWriterBuilder<JAXBTYPE,IMPLTYPE>>
java.lang.Object
com.helger.jaxb.builder.AbstractJAXBBuilder<IMPLTYPE>
com.helger.jaxb.builder.AbstractWritingJAXBBuilder<JAXBTYPE,IMPLTYPE>
com.helger.jaxb.builder.JAXBWriterBuilder<JAXBTYPE,IMPLTYPE>
- Type Parameters:
JAXBTYPE- The JAXB implementation class to be writtenIMPLTYPE- The implementation class implementing this abstract class.
- All Implemented Interfaces:
com.helger.commons.lang.IHasClassLoader,com.helger.commons.traits.IGenericImplTrait<IMPLTYPE>,IJAXBWriter<JAXBTYPE>
@NotThreadSafe
@Deprecated(forRemoval=true,
since="11.0.0")
public class JAXBWriterBuilder<JAXBTYPE,IMPLTYPE extends JAXBWriterBuilder<JAXBTYPE,IMPLTYPE>>
extends AbstractWritingJAXBBuilder<JAXBTYPE,IMPLTYPE>
implements IJAXBWriter<JAXBTYPE>
Deprecated, for removal: This API element is subject to removal in a future version.
Since v11 - use the GenericJAXBMarshaller instead - it deals with
all of the stuff in one class. Will be removed in v12
Builder class for writing JAXB documents.
- Author:
- Philip Helger
-
Field Summary
Fields inherited from class com.helger.jaxb.builder.AbstractJAXBBuilder
m_aDocTypeFields inherited from interface com.helger.jaxb.IJAXBWriter
USE_JAXB_CHARSET_FIX -
Constructor Summary
ConstructorsConstructorDescriptionJAXBWriterBuilder(IJAXBDocumentType aDocType) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionprotected jakarta.xml.bind.MarshallerDeprecated, for removal: This API element is subject to removal in a future version.Create the main marshaller with the contained settings.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.jakarta.xml.bind.ValidationEventHandlerDeprecated, for removal: This API element is subject to removal in a future version.booleanDeprecated, for removal: This API element is subject to removal in a future version.final IMPLTYPEsetCharset(Charset aCharset) Deprecated, for removal: This API element is subject to removal in a future version.Set the charset to be used for writing JAXB objects.final IMPLTYPEsetFormattedOutput(boolean bFormattedOutput) Deprecated, for removal: This API element is subject to removal in a future version.Enable or disable the formatting of the output.final IMPLTYPEsetIndentString(String sIndentString) Deprecated, for removal: This API element is subject to removal in a future version.Set the indent string to be used for writing JAXB objects.final IMPLTYPEsetNamespaceContext(NamespaceContext aNSContext) Deprecated, for removal: This API element is subject to removal in a future version.Set the namespace context (prefix to namespace URL mapping) to be used.final IMPLTYPEsetNoNamespaceSchemaLocation(String sNoNamespaceSchemaLocation) Deprecated, for removal: This API element is subject to removal in a future version.Set the no namespace Schema Location to be used for writing JAXB objects.final IMPLTYPEsetSchemaLocation(String sSchemaLocation) Deprecated, for removal: This API element is subject to removal in a future version.Set the Schema Location to be used for writing JAXB objects.final IMPLTYPEsetValidationEventHandler(jakarta.xml.bind.ValidationEventHandler aEventHandler) Deprecated, for removal: This API element is subject to removal in a future version.Set the JAXB validation event handler to be used.toString()Deprecated, for removal: This API element is subject to removal in a future version.com.helger.commons.state.ESuccesswrite(JAXBTYPE aJAXBDocument, IJAXBMarshaller<JAXBTYPE> aMarshallerFunc) Deprecated, for removal: This API element is subject to removal in a future version.Convert the passed object to XML.Methods inherited from class com.helger.jaxb.builder.AbstractWritingJAXBBuilder
createJAXBElement, getMarshallerCustomizer, setMarshallerCustomizerMethods inherited from class com.helger.jaxb.builder.AbstractJAXBBuilder
exceptionCallbacks, getClassLoader, getJAXBContext, getJAXBDocumentType, getSchema, isUseJAXBContextCache, isUseSchema, setUseJAXBContextCache, setUseSchemaMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.helger.commons.traits.IGenericImplTrait
thisAsTMethods inherited from interface com.helger.commons.lang.IHasClassLoader
hasClassLoaderMethods inherited from interface com.helger.jaxb.IJAXBWriter
getAsByteBuffer, getAsBytes, getAsDocument, getAsElement, getAsInputStream, getAsMicroDocument, getAsMicroElement, getAsString, getXMLWriterSettings, hasCharset, hasIndentString, hasNoNamespaceSchemaLocation, hasSchemaLocation, isUseSchema, write, write, write, write, write, write, write, write, write
-
Constructor Details
-
JAXBWriterBuilder
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
getValidationEventHandler
Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- The special JAXB validation event handler to be used. By default
JAXBBuilderDefaultSettings.getDefaultValidationEventHandler()is used.
-
setValidationEventHandler
@Nonnull public final IMPLTYPE setValidationEventHandler(@Nullable jakarta.xml.bind.ValidationEventHandler aEventHandler) Deprecated, for removal: This API element is subject to removal in a future version.Set the JAXB validation event handler to be used. May benull.- Parameters:
aEventHandler- The event handler to be used. May benull.- Returns:
- this for chaining
-
getNamespaceContext
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getNamespaceContextin interfaceIJAXBWriter<JAXBTYPE>- Returns:
- The special JAXB namespace context to be used. By default
JAXBBuilderDefaultSettings.getDefaultNamespaceContext()is used.
-
setNamespaceContext
Deprecated, for removal: This API element is subject to removal in a future version.Set the namespace context (prefix to namespace URL mapping) to be used.- Parameters:
aNSContext- The namespace context to be used. May benull.- Returns:
- this for chaining
-
isFormattedOutput
public boolean isFormattedOutput()Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
isFormattedOutputin interfaceIJAXBWriter<JAXBTYPE>- Returns:
trueif the JAXB output should be formatted. Default isfalse.
-
setFormattedOutput
Deprecated, for removal: This API element is subject to removal in a future version.Enable or disable the formatting of the output.- Parameters:
bFormattedOutput-trueto enable it,falseto disable it.- Returns:
- this for chaining
-
getCharset
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getCharsetin interfaceIJAXBWriter<JAXBTYPE>- Returns:
- The special JAXB Charset to be used for writing.
nullby default.
-
setCharset
Deprecated, for removal: This API element is subject to removal in a future version.Set the charset to be used for writing JAXB objects.- Parameters:
aCharset- The charset to be used by default. May benull.- Returns:
- this for chaining
-
getIndentString
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getIndentStringin interfaceIJAXBWriter<JAXBTYPE>- Returns:
- The JAXB indentation string to be used for writing.
nullby default. Only used when formatted output is used.
-
setIndentString
Deprecated, for removal: This API element is subject to removal in a future version.Set the indent string to be used for writing JAXB objects.- Parameters:
sIndentString- The indent string to be used. May benull.- Returns:
- this for chaining
-
getSchemaLocation
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getSchemaLocationin interfaceIJAXBWriter<JAXBTYPE>- Returns:
- The schema location to be used for writing.
nullby default.
-
setSchemaLocation
Deprecated, for removal: This API element is subject to removal in a future version.Set the Schema Location to be used for writing JAXB objects.- Parameters:
sSchemaLocation- The Schema Location to be used. May benull.- Returns:
- this for chaining
- Since:
- 8.6.0
-
getNoNamespaceSchemaLocation
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getNoNamespaceSchemaLocationin interfaceIJAXBWriter<JAXBTYPE>- Returns:
- The no namespace schema location to be used for writing.
nullby default.
-
setNoNamespaceSchemaLocation
@Nonnull public final IMPLTYPE setNoNamespaceSchemaLocation(@Nullable String sNoNamespaceSchemaLocation) Deprecated, for removal: This API element is subject to removal in a future version.Set the no namespace Schema Location to be used for writing JAXB objects.- Parameters:
sNoNamespaceSchemaLocation- The no namespace Schema Location to be used. May benull.- Returns:
- this for chaining
- Since:
- 9.0.0
-
createMarshaller
@Nonnull protected jakarta.xml.bind.Marshaller createMarshaller() throws jakarta.xml.bind.JAXBExceptionDeprecated, for removal: This API element is subject to removal in a future version.Description copied from class:AbstractWritingJAXBBuilderCreate the main marshaller with the contained settings.- Overrides:
createMarshallerin classAbstractWritingJAXBBuilder<JAXBTYPE,IMPLTYPE extends JAXBWriterBuilder<JAXBTYPE, IMPLTYPE>> - Returns:
- The Marshaller and never
null. - Throws:
jakarta.xml.bind.JAXBException- In case creation fails
-
write
@Nonnull public com.helger.commons.state.ESuccess write(@Nonnull JAXBTYPE aJAXBDocument, @Nonnull IJAXBMarshaller<JAXBTYPE> aMarshallerFunc) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IJAXBWriterConvert the passed object to XML.- Specified by:
writein interfaceIJAXBWriter<JAXBTYPE>- Parameters:
aJAXBDocument- The object to be converted. May not benull.aMarshallerFunc- The marshalling function. May not benull.- Returns:
ESuccess
-
toString
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
toStringin classAbstractJAXBBuilder<IMPLTYPE extends JAXBWriterBuilder<JAXBTYPE,IMPLTYPE>>
-