throws ValidationException {
try {
if(!(o instanceof ValidatableObject))
throw new ValidationException(
Messages.format( Messages.NOT_VALIDATABLE ) );
ValidatableObject vo = (ValidatableObject)o;
EventInterceptor ei = new EventInterceptor(eventHandler);
ValidationContext context = new ValidationContext(ei,validateId);
context.validate(vo);
context.reconcileIDs();
return !ei.hadError();
} catch( SAXException e ) {
// TODO exception handling.
// we need a consistent mechanism to convert SAXException into JAXBException
Exception nested = e.getException();
if( e != null ) {
throw new ValidationException( nested );
} else {
throw new ValidationException( e );
}
//return false;
}
}