edu.ksi.virtualclassroom.mappers.jaxb.xmlwrapper.impl.runtime
Class ValidatorImpl

java.lang.Object
  extended byedu.ksi.virtualclassroom.mappers.jaxb.xmlwrapper.impl.runtime.ValidatorImpl
All Implemented Interfaces:
javax.xml.bind.Validator

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

Validator implementation of JAXB RI. * @author Administrator * @version $Revision$


Nested Class Summary
private static class ValidatorImpl.EventInterceptor
          We need to know whether an validation error was detected or not.
 
Field Summary
private  javax.xml.bind.ValidationEventHandler eventHandler
          Validation errors will be reported to this object.
(package private)  DefaultJAXBContextImpl jaxbContext
          Field jaxbContext
 
Constructor Summary
ValidatorImpl(DefaultJAXBContextImpl c)
          Constructor for ValidatorImpl
 
Method Summary
 javax.xml.bind.ValidationEventHandler getEventHandler()
          Method getEventHandler
 java.lang.Object getProperty(java.lang.String name)
          There are no required properties, so simply throw an exception.
 void setEventHandler(javax.xml.bind.ValidationEventHandler handler)
          Method setEventHandler
 void setProperty(java.lang.String name, java.lang.Object value)
          There are no required properties, so simply throw an exception.
 boolean validate(java.lang.Object o)
          Method validate
private  boolean validate(java.lang.Object o, boolean validateId)
          Method validate
 boolean validateRoot(java.lang.Object o)
          Method validateRoot
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

eventHandler

private javax.xml.bind.ValidationEventHandler eventHandler
Validation errors will be reported to this object.


jaxbContext

final DefaultJAXBContextImpl jaxbContext
Field jaxbContext

Constructor Detail

ValidatorImpl

public ValidatorImpl(DefaultJAXBContextImpl c)
Constructor for ValidatorImpl

Parameters:
c - DefaultJAXBContextImpl
Method Detail

validateRoot

public boolean validateRoot(java.lang.Object o)
                     throws javax.xml.bind.ValidationException
Method validateRoot

Specified by:
validateRoot in interface javax.xml.bind.Validator
Parameters:
o - Object
Returns:
boolean
Throws:
javax.xml.bind.ValidationException
See Also:
Validator.validateRoot(Object)

validate

public boolean validate(java.lang.Object o)
                 throws javax.xml.bind.ValidationException
Method validate

Specified by:
validate in interface javax.xml.bind.Validator
Parameters:
o - Object
Returns:
boolean
Throws:
javax.xml.bind.ValidationException
See Also:
Validator.validate(Object)

validate

private boolean validate(java.lang.Object o,
                         boolean validateId)
                  throws javax.xml.bind.ValidationException
Method validate

Parameters:
o - Object
validateId - boolean
Returns:
boolean
Throws:
javax.xml.bind.ValidationException

getEventHandler

public javax.xml.bind.ValidationEventHandler getEventHandler()
Method getEventHandler

Specified by:
getEventHandler in interface javax.xml.bind.Validator
Returns:
ValidationEventHandler
See Also:
Validator.getEventHandler()

setEventHandler

public void setEventHandler(javax.xml.bind.ValidationEventHandler handler)
Method setEventHandler

Specified by:
setEventHandler in interface javax.xml.bind.Validator
Parameters:
handler - ValidationEventHandler
See Also:
Validator.setEventHandler(ValidationEventHandler)

setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object value)
                 throws javax.xml.bind.PropertyException
There are no required properties, so simply throw an exception. Other providers may have support for properties on Validator, but the RI doesn't

Specified by:
setProperty in interface javax.xml.bind.Validator
Parameters:
name - String
value - Object
Throws:
javax.xml.bind.PropertyException
See Also:
Validator.setProperty(String, Object)

getProperty

public java.lang.Object getProperty(java.lang.String name)
                             throws javax.xml.bind.PropertyException
There are no required properties, so simply throw an exception. Other providers may have support for properties on Validator, but the RI doesn't

Specified by:
getProperty in interface javax.xml.bind.Validator
Parameters:
name - String
Returns:
Object
Throws:
javax.xml.bind.PropertyException
See Also:
Validator.getProperty(String)