|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectedu.ksi.virtualclassroom.mappers.jaxb.xmlwrapper.impl.runtime.ValidationContext
Maintains information that needs to be stored across * validations of multiple objects. * * Specifically, this object is responsible for: * *
ValidationErrorHandler.
* MSVValidators should use this error handler to report any error.
*
| Field Summary | |
private javax.xml.bind.ValidationEventHandler |
eventHandler
Field eventHandler |
private java.util.HashMap |
IDREFs
Field IDREFs |
private java.util.HashSet |
IDs
Field IDs |
(package private) DefaultJAXBContextImpl |
jaxbContext
Field jaxbContext |
private NamespaceContextImpl |
nsContext
namespace context. |
private java.util.HashSet |
validatedObjects
Set of all validated objects. |
private boolean |
validateID
ID/IDREF validation is done only when this flag is true. |
| Constructor Summary | |
(package private) |
ValidationContext(DefaultJAXBContextImpl _context,
javax.xml.bind.ValidationEventHandler _eventHandler,
boolean validateID)
|
| Method Summary | |
NamespaceContextImpl |
getNamespaceContext()
Method getNamespaceContext |
java.lang.String |
onID(XMLSerializable owner,
java.lang.String value)
Method onID |
java.lang.String |
onIDREF(XMLSerializable referer,
java.lang.String value)
Method onIDREF |
protected void |
reconcileIDs()
Tests if all IDREFs have corresponding IDs. |
void |
reportEvent(ValidatableObject source,
java.lang.Exception nestedException)
Reports an error to the client. |
void |
reportEvent(ValidatableObject source,
java.lang.String formattedMessage)
Reports an error to the application. |
void |
reportEvent(ValidatableObject source,
javax.xml.bind.ValidationEvent event)
Method reportEvent |
void |
validate(ValidatableObject vo)
Validates the sub-tree rooted at vo and reports
any errors/warnings to the error handler. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
final DefaultJAXBContextImpl jaxbContext
private final java.util.HashSet validatedObjects
private final NamespaceContextImpl nsContext
private final boolean validateID
private final java.util.HashSet IDs
private final java.util.HashMap IDREFs
private final javax.xml.bind.ValidationEventHandler eventHandler
| Constructor Detail |
ValidationContext(DefaultJAXBContextImpl _context,
javax.xml.bind.ValidationEventHandler _eventHandler,
boolean validateID)
_context - DefaultJAXBContextImpl_eventHandler - ValidationEventHandlervalidateID - if true, ID/IDREF validation will be performed.| Method Detail |
public void validate(ValidatableObject vo)
throws org.xml.sax.SAXException
vo and reports
any errors/warnings to the error handler.
vo - ValidatableObject
org.xml.sax.SAXExceptionpublic NamespaceContextImpl getNamespaceContext()
public java.lang.String onID(XMLSerializable owner,
java.lang.String value)
throws org.xml.sax.SAXException
owner - XMLSerializablevalue - String
org.xml.sax.SAXException
public java.lang.String onIDREF(XMLSerializable referer,
java.lang.String value)
throws org.xml.sax.SAXException
referer - XMLSerializablevalue - String
org.xml.sax.SAXException
protected void reconcileIDs()
throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void reportEvent(ValidatableObject source,
java.lang.String formattedMessage)
throws com.sun.xml.bind.serializer.AbortSerializationException
source - ValidatableObjectformattedMessage - String
com.sun.xml.bind.serializer.AbortSerializationException
public void reportEvent(ValidatableObject source,
java.lang.Exception nestedException)
throws com.sun.xml.bind.serializer.AbortSerializationException
source - ValidatableObjectnestedException - Exception
com.sun.xml.bind.serializer.AbortSerializationException
public void reportEvent(ValidatableObject source,
javax.xml.bind.ValidationEvent event)
throws com.sun.xml.bind.serializer.AbortSerializationException
source - ValidatableObjectevent - ValidationEvent
com.sun.xml.bind.serializer.AbortSerializationException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||