Class ValidatingUnmarshaller
- java.lang.Object
-
- org.iso_relax.verifier.impl.ForkContentHandler
-
- com.sun.identity.wsfederation.jaxb.entityconfig.impl.runtime.ValidatingUnmarshaller
-
- All Implemented Interfaces:
SAXUnmarshallerHandler,UnmarshallerHandler,ContentHandler
public class ValidatingUnmarshaller extends org.iso_relax.verifier.impl.ForkContentHandler implements SAXUnmarshallerHandler
Filter implementation of SAXUnmarshallerHandler.This component internally uses a VerifierFilter to validate SAX events that goes through this component. Discovered error information is just passed down to the next component.
This will enable the implementation to validate all sources of SAX events in the RI - XMLReader, DOMScanner SAX events will go the VerifierFilter and then to the SAXUnmarshaller...
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ValidatingUnmarshallercreate(com.sun.msv.grammar.Grammar grammar, SAXUnmarshallerHandler _core, com.sun.xml.bind.validator.Locator locator)Creates a new instance of ValidatingUnmarshaller.ObjectgetResult()voidhandleEvent(ValidationEvent event, boolean canRecover)Reports an error to the user, and asks if s/he wants to recover.voidstartElement(String nsUri, String local, String qname, Attributes atts)-
Methods inherited from class org.iso_relax.verifier.impl.ForkContentHandler
characters, create, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.xml.sax.ContentHandler
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping
-
-
-
-
Method Detail
-
create
public static ValidatingUnmarshaller create(com.sun.msv.grammar.Grammar grammar, SAXUnmarshallerHandler _core, com.sun.xml.bind.validator.Locator locator)
Creates a new instance of ValidatingUnmarshaller.
-
getResult
public Object getResult() throws JAXBException, IllegalStateException
- Specified by:
getResultin interfaceUnmarshallerHandler- Throws:
JAXBExceptionIllegalStateException
-
handleEvent
public void handleEvent(ValidationEvent event, boolean canRecover) throws SAXException
Description copied from interface:SAXUnmarshallerHandlerReports an error to the user, and asks if s/he wants to recover. If the canRecover flag is false, regardless of the client instruction, an exception will be thrown. Only if the flag is true and the user wants to recover from an error, the method returns normally. The thrown exception will be catched by the unmarshaller.- Specified by:
handleEventin interfaceSAXUnmarshallerHandler- Throws:
SAXException
-
startElement
public void startElement(String nsUri, String local, String qname, Attributes atts) throws SAXException
- Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classorg.iso_relax.verifier.impl.ForkContentHandler- Throws:
SAXException
-
-