//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v1.0.6-b27-fcs
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.06.11 at 10:34:07 AM PDT
//
/**
* Maintains information that needs to be stored across
* validations of multiple objects.
*
* Specifically, this object is responsible for:
*
* <ol>
* <li>detecting a cycle in a content tree by keeping track of
* objects that were validated.
*
* <li>keeping an instance of NamespaceContextImpl, which is
* shared by all MSVValidators.
*
* <li>keeping a reference to {@link ValidationErrorHandler}.
* MSVValidators should use this error handler to report any error.
* </ol>
*/
class ValidationContext
{
/**
* @param validateID
*/
ValidationContext( DefaultJAXBContextImpl _context, ValidationEventHandler _eventHandler, boolean validateID ) {
this.jaxbContext = _context;
this.eventHandler = _eventHandler;
this.validateID = validateID;
}
//
//
// detecting cycles.
//
//
/** Set of all validated objects. Used to detect a cycle. */
/**
* Validates the sub-tree rooted at <code>vo</code> and reports
*/
// setup a new validator for this object and validate it.
} else {
// this object has already been validated once.
}
}
//
//
// Keeping track of namespace bindings.
//
//
/** namespace context. */
//
//
//
//
private final boolean validateID;
if(!validateID) return value;
// this ID value has already been used.
//reportEvent(Util.toValidatableObject(owner),
// Messages.format(Messages.DUPLICATE_ID,value));
}
return value;
}
if(!validateID) return value;
return value; // this IDREF has the corresponding ID.
// remember the value to check the value later.
return value;
}
/** Tests if all IDREFs have corresponding IDs. */
if(!validateID) return;
continue; // OK.
// ID was not found.
new ValidationEventLocatorImpl( source ) ) );
}
}
//
//
// Keeping track of ValidationErrorHandler
//
//
/**
* Reports an error to the application.
*/
public void reportEvent(ValidatableObject source, String formattedMessage) throws AbortSerializationException {
new ValidationEventLocatorImpl(source) ) );
}
/**
* Reports an error to the client.
* This version should be used when an exception is thrown from sub-modules.
*/
public void reportEvent(ValidatableObject source, Exception nestedException ) throws AbortSerializationException {
nestedException ) );
}
public void reportEvent( ValidatableObject source, ValidationEvent event ) throws AbortSerializationException {
boolean r;
try {
} catch( RuntimeException re ) {
// if the client event handler causes a RuntimeException, then
// we have to return false.
r = false;
}
if(!r) {
// throw an exception to abort validation
}
}
}