Interface IJAXBValidator<JAXBTYPE>

Type Parameters:
JAXBTYPE - The JAXB type to be written
All Known Implementing Classes:
GenericJAXBMarshaller, JAXBValidationBuilder

public interface IJAXBValidator<JAXBTYPE>
Interface for validating JAXB documents.
Author:
Philip Helger
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    default boolean
    isValid(JAXBTYPE aJAXBDocument)
    Check if the passed JAXB document is valid according to the XSD or not.
    default com.helger.commons.error.list.IErrorList
    validate(JAXBTYPE aJAXBDocument)
    Validate the passed JAXB document.
    void
    validate(JAXBTYPE aJAXBDocument, com.helger.commons.error.list.ErrorList aErrorList)
    Validate the passed JAXB document.
  • Method Details

    • isUseSchema

      boolean isUseSchema()
      Returns:
      true if an eventually configured XML Schema should be used, false to explicitly disable the usage of XML Schema.
      Since:
      11.0.3
    • isValid

      default boolean isValid(@Nonnull JAXBTYPE aJAXBDocument)
      Check if the passed JAXB document is valid according to the XSD or not.
      Parameters:
      aJAXBDocument - The JAXB document to be validated. May not be null.
      Returns:
      true if the document is valid, false if not.
      See Also:
    • validate

      void validate(@Nonnull JAXBTYPE aJAXBDocument, @Nonnull com.helger.commons.error.list.ErrorList aErrorList)
      Validate the passed JAXB document.
      Parameters:
      aJAXBDocument - The JAXB document to be validated. May not be null.
      aErrorList - The error list to be filled. May not be null.
      Since:
      v9.3.7
    • validate

      @Nonnull default com.helger.commons.error.list.IErrorList validate(@Nonnull JAXBTYPE aJAXBDocument)
      Validate the passed JAXB document.
      Parameters:
      aJAXBDocument - The JAXB document to be validated. May not be null.
      Returns:
      The validation results. Never null.