@Immutable public final class UBL21Marshaller extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
readUBLDocument(Node aNode,
Class<T> aDestClass)
Convert the passed XML node into a domain object.
|
static <T> T |
readUBLDocument(Node aNode,
Class<T> aDestClass,
ValidationEventHandler aCustomEventHandler)
Convert the passed XML node into a domain object.
|
static <T> T |
readUBLDocument(Source aSource,
Class<T> aDestClass)
Convert the passed XML node into a domain object.
|
static <T> T |
readUBLDocument(Source aSource,
Class<T> aDestClass,
ValidationEventHandler aCustomEventHandler)
Convert the passed XML node into a domain object.
|
static com.helger.commons.error.IResourceErrorGroup |
validateUBLObject(Object aUBLDocument,
EUBL21DocumentType eDocType)
Validate the passed domain object against the XML Schema rules.
|
static Document |
writeUBLDocument(Object aUBLDocument,
EUBL21DocumentType eDocType)
Convert the passed domain object into an XML node.
|
static com.helger.commons.state.ESuccess |
writeUBLDocument(Object aUBLDocument,
EUBL21DocumentType eDocType,
Result aResult)
Convert the passed domain object into an XML node.
|
static Document |
writeUBLDocument(Object aUBLDocument,
EUBL21DocumentType eDocType,
ValidationEventHandler aCustomEventHandler)
Convert the passed domain object into an XML node.
|
static com.helger.commons.state.ESuccess |
writeUBLDocument(Object aUBLDocument,
EUBL21DocumentType eDocType,
ValidationEventHandler aCustomEventHandler,
Result aResult)
Convert the passed domain object into an XML node.
|
@Nullable public static <T> T readUBLDocument(@Nonnull Node aNode, @Nonnull Class<T> aDestClass)
UBL21DocumentMarshaller for a type-safe API for all
supported document types.aNode - The XML node to be converted. May not be null.aDestClass - The UBL class of the result type. May not be null.null in case conversion to the specified class failed.
See the log output for details.@Nullable public static <T> T readUBLDocument(@Nonnull Node aNode, @Nonnull Class<T> aDestClass, @Nullable ValidationEventHandler aCustomEventHandler)
UBL21Reader for a type-safe API for all supported
document types.aNode - The XML node to be converted. May not be null.aDestClass - The UBL class of the result type. May not be null.aCustomEventHandler - An optional custom event handler to be used in unmarshalling. May
be null.null in case conversion to the specified class failed.
See the log output for details.@Nullable public static <T> T readUBLDocument(@Nonnull Source aSource, @Nonnull Class<T> aDestClass)
UBL21Reader for a type-safe API for all supported
document types.aSource - The source object to be converted. May not be null.aDestClass - The UBL class of the result type. May not be null.null in case conversion to the specified class failed.
See the log output for details.@Nullable public static <T> T readUBLDocument(@Nonnull Source aSource, @Nonnull Class<T> aDestClass, @Nullable ValidationEventHandler aCustomEventHandler)
UBL21Reader for a type-safe API for all supported
document types.aSource - The source object to be converted. May not be null.aDestClass - The UBL class of the result type. May not be null.aCustomEventHandler - An optional custom event handler to be used in unmarshalling. May
be null.null in case conversion to the specified class failed.
See the log output for details.@Nullable public static Document writeUBLDocument(@Nonnull Object aUBLDocument, @Nonnull EUBL21DocumentType eDocType)
UBL21Writer for a type-safe API for all supported
document types.aUBLDocument - The domain object to be converted. May not be null.eDocType - The UBL document type matching the document. May not be
null.null in case conversion to the specified class failed.
See the log output for details.@Nullable public static Document writeUBLDocument(@Nonnull Object aUBLDocument, @Nonnull EUBL21DocumentType eDocType, @Nullable ValidationEventHandler aCustomEventHandler)
UBL21Writer for a type-safe API for all supported
document types.aUBLDocument - The domain object to be converted. May not be null.eDocType - The UBL document type matching the document. May not be
null.aCustomEventHandler - An optional custom event handler to be used in marshalling. May be
null.null in case conversion to the specified class failed.
See the log output for details.@Nonnull public static com.helger.commons.state.ESuccess writeUBLDocument(@Nonnull Object aUBLDocument, @Nonnull EUBL21DocumentType eDocType, @Nonnull Result aResult)
UBL21Writer for a type-safe API for all supported
document types.aUBLDocument - The domain object to be converted. May not be null.eDocType - The UBL document type matching the document. May not be
null.aResult - the result object to write the marshaled document to. May not be
null.ESuccess.FAILURE in case conversion to the specified class
failed.@Nonnull public static com.helger.commons.state.ESuccess writeUBLDocument(@Nonnull Object aUBLDocument, @Nonnull EUBL21DocumentType eDocType, @Nullable ValidationEventHandler aCustomEventHandler, @Nonnull Result aResult)
UBL21Writer for a type-safe API for all supported
document types.aUBLDocument - The domain object to be converted. May not be null.eDocType - The UBL document type matching the document. May not be
null.aCustomEventHandler - An optional custom event handler to be used in marshalling. May be
null.aResult - the result object to write the marshaled document to. May not be
null.ESuccess.FAILURE in case conversion to the specified class
failed.@Nonnull public static com.helger.commons.error.IResourceErrorGroup validateUBLObject(@Nonnull Object aUBLDocument, @Nonnull EUBL21DocumentType eDocType)
UBL21Validator for a type-safe API for all
supported document types.aUBLDocument - The domain object to be converted. May not be null.eDocType - The UBL document type matching the document. May not be
null.null.Copyright © 2014–2015 Philip Helger. All rights reserved.