Class JAXBValidator

java.lang.Object
org.eclipse.persistence.jaxb.JAXBValidator

public class JAXBValidator extends Object
Facilitates JAXBValidation.
  • Constructor Details

    • JAXBValidator

      public JAXBValidator(XMLValidator newValidator)
      This constructor creates a DefaultValidationEventHandlervalidation instance, and sets the XMLMarshaller instance to the one provided.
  • Method Details

    • validateRoot

      public boolean validateRoot(Object rootObject) throws jakarta.xml.bind.JAXBException
      Validate a root object against a schema.
      Parameters:
      rootObject - - the root object to be validated
      Returns:
      true if a valid root object, false otherwise
      Throws:
      jakarta.xml.bind.JAXBException
    • validate

      public boolean validate(Object object) throws jakarta.xml.bind.JAXBException
      Validate a non-root object against a schema.
      Parameters:
      object - - the object to be validated
      Returns:
      true if a valid object, false otherwise
      Throws:
      jakarta.xml.bind.JAXBException
    • setEventHandler

      public void setEventHandler(jakarta.xml.bind.ValidationEventHandler newValidationEventHandler) throws jakarta.xml.bind.JAXBException
      Throws:
      jakarta.xml.bind.JAXBException
    • getEventHandler

      public jakarta.xml.bind.ValidationEventHandler getEventHandler() throws jakarta.xml.bind.JAXBException
      Throws:
      jakarta.xml.bind.JAXBException
    • setProperty

      public void setProperty(String key, Object value) throws jakarta.xml.bind.PropertyException
      Throws:
      jakarta.xml.bind.PropertyException
    • getProperty

      public Object getProperty(String key) throws jakarta.xml.bind.PropertyException
      Throws:
      jakarta.xml.bind.PropertyException