Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle TopLink
11g Release 1 (11.1.1)

E28847-01


org.eclipse.persistence.jaxb
Class JAXBValidator

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

All Implemented Interfaces:
javax.xml.bind.Validator

public class JAXBValidator
extends java.lang.Object
implements javax.xml.bind.Validator

Facilitates JAXBValidation.


Field Summary
private  javax.xml.bind.ValidationEventHandler validationEventHandler
           
private  XMLValidator xmlValidator
           

 

Constructor Summary
JAXBValidator(XMLValidator newValidator)
          This constructor creates a DefaultValidationEventHandlervalidation instance, and sets the XMLMarshaller instance to the one provided.

 

Method Summary
 javax.xml.bind.ValidationEventHandler getEventHandler()
           
 java.lang.Object getProperty(java.lang.String key)
           
 void setEventHandler(javax.xml.bind.ValidationEventHandler newValidationEventHandler)
           
 void setProperty(java.lang.String key, java.lang.Object value)
           
 boolean validate(java.lang.Object object)
          Validate a non-root object against a schema.
 boolean validateRoot(java.lang.Object rootObject)
          Validate a root object against a schema.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

validationEventHandler

private javax.xml.bind.ValidationEventHandler validationEventHandler

xmlValidator

private XMLValidator xmlValidator

Constructor Detail

JAXBValidator

public JAXBValidator(XMLValidator newValidator)
This constructor creates a DefaultValidationEventHandlervalidation instance, and sets the XMLMarshaller instance to the one provided.
Parameters:
newXMLMarshaller -

Method Detail

validateRoot

public boolean validateRoot(java.lang.Object rootObject)
                     throws javax.xml.bind.JAXBException
Validate a root object against a schema.
Specified by:
validateRoot in interface javax.xml.bind.Validator
Parameters:
rootObject - - the root object to be validated
Returns:
true if a valid root object, false otherwise
Throws:
javax.xml.bind.JAXBException

validate

public boolean validate(java.lang.Object object)
                 throws javax.xml.bind.JAXBException
Validate a non-root object against a schema.
Specified by:
validate in interface javax.xml.bind.Validator
Parameters:
object - - the object to be validated
Returns:
true if a valid object, false otherwise
Throws:
javax.xml.bind.JAXBException

setEventHandler

public void setEventHandler(javax.xml.bind.ValidationEventHandler newValidationEventHandler)
                     throws javax.xml.bind.JAXBException
Specified by:
setEventHandler in interface javax.xml.bind.Validator
Throws:
javax.xml.bind.JAXBException

getEventHandler

public javax.xml.bind.ValidationEventHandler getEventHandler()
                                                      throws javax.xml.bind.JAXBException
Specified by:
getEventHandler in interface javax.xml.bind.Validator
Throws:
javax.xml.bind.JAXBException

setProperty

public void setProperty(java.lang.String key,
                        java.lang.Object value)
                 throws javax.xml.bind.PropertyException
Specified by:
setProperty in interface javax.xml.bind.Validator
Throws:
javax.xml.bind.PropertyException

getProperty

public java.lang.Object getProperty(java.lang.String key)
                             throws javax.xml.bind.PropertyException
Specified by:
getProperty in interface javax.xml.bind.Validator
Throws:
javax.xml.bind.PropertyException

Skip navigation links

Copyright © 1998, 2012, Oracle. All Rights Reserved.