java.lang.Object
org.eclipse.persistence.jaxb.JAXBValidator
Facilitates JAXBValidation.
-
Constructor Summary
ConstructorDescriptionJAXBValidator
(XMLValidator newValidator) This constructor creates a DefaultValidationEventHandlervalidation instance, and sets the XMLMarshaller instance to the one provided. -
Method Summary
Modifier and TypeMethodDescriptiongetProperty
(String key) void
setEventHandler
(ValidationEventHandler newValidationEventHandler) void
setProperty
(String key, Object value) boolean
Validate a non-root object against a schema.boolean
validateRoot
(Object rootObject) Validate a root object against a schema.
-
Constructor Details
-
JAXBValidator
This constructor creates a DefaultValidationEventHandlervalidation instance, and sets the XMLMarshaller instance to the one provided.
-
-
Method Details
-
validateRoot
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:
JAXBException
-
validate
Validate a non-root object against a schema.- Parameters:
object
- - the object to be validated- Returns:
- true if a valid object, false otherwise
- Throws:
JAXBException
-
setEventHandler
- Throws:
JAXBException
-
getEventHandler
- Throws:
JAXBException
-
setProperty
- Throws:
PropertyException
-
getProperty
- Throws:
PropertyException
-