APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.sun.org.apache.xerces.internal.jaxp

pack-priv final Class JAXPValidatorComponent

extends TeeXMLDocumentFilterImpl
implements XMLComponent
Class Inheritance
All Implemented Interfaces
com.sun.org.apache.xerces.internal.xni.parser.XMLComponent
Imports
java.io.IOException, javax.xml.validation.TypeInfoProvider, .ValidatorHandler, com.sun.org.apache.xerces.internal.dom.DOMInputImpl, com.sun.org.apache.xerces.internal.impl.Constants, .XMLErrorReporter, com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultXMLDocumentHandler, com.sun.org.apache.xerces.internal.util.AttributesProxy, .AugmentationsImpl, .ErrorHandlerProxy, .ErrorHandlerWrapper, .LocatorProxy, .SymbolTable, .XMLResourceIdentifierImpl, com.sun.org.apache.xerces.internal.xni.Augmentations, .NamespaceContext, .QName, .XMLAttributes, .XMLDocumentHandler, .XMLLocator, .XMLString, .XNIException, com.sun.org.apache.xerces.internal.xni.parser.XMLComponent, .XMLComponentManager, .XMLConfigurationException, .XMLEntityResolver, .XMLErrorHandler, .XMLInputSource, org.w3c.dom.TypeInfo, org.w3c.dom.ls.LSInput, .LSResourceResolver, org.xml.sax.Attributes, .ContentHandler, .ErrorHandler, .SAXException, .SAXParseException, org.xml.sax.helpers.DefaultHandler

Runs events through a javax.xml.validation.ValidatorHandler and performs validation/infoset-augmentation by an external validator.

This component sets up the pipeline as follows:

            __                                           __
           /  |==> XNI2SAX --> Validator --> SAX2XNI ==>|
          /   |                                         |
      ==>| Tee|                                         | next
          \   |                                         |  component
           \  |============other XNI events============>|
            ~~                                           ~~

only those events that need to go through Validator will go the 1st route, and other events go the 2nd direct route.

Author
Kohsuke Kawaguchi

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private class
JAXPValidatorComponent.SAX2XNI

Uses DefaultHandler as a default implementation of ContentHandler.

private class

Field Summary

Modifier and TypeField and Description
private static final String
ENTITY_MANAGER

Property identifier: entity manager.

private static final String
ERROR_REPORTER

Property identifier: error reporter.

private XMLAttributes
private Augmentations
fCurrentAug

Used to store the Augmentations associated with the current event, so that we can pick it up again when the event is forwarded by the ValidatorHandler.

private XMLEntityResolver
private XMLErrorReporter
private SymbolTable
private static final TypeInfoProvider
noInfoProvider

TypeInfoProvider that returns no info.

private final JAXPValidatorComponent.SAX2XNI
private static final String
SYMBOL_TABLE

Property identifier: symbol table.

private final TypeInfoProvider
private final ValidatorHandler
private final JAXPValidatorComponent.XNI2SAX

Constructor Summary

AccessConstructor and Description
public
JAXPValidatorComponent(ValidatorHandler
may not be null.
validatorHandler
)

Method Summary

Modifier and TypeMethod and Description
public void
public void
public void
public Boolean
getFeatureDefault(String featureId)

Implements com.sun.org.apache.xerces.internal.xni.parser.XMLComponent.getFeatureDefault.

Returns the default state for a feature, or null if this component does not want to report a default value for this feature.

public Object
getPropertyDefault(String propertyId)

Implements com.sun.org.apache.xerces.internal.xni.parser.XMLComponent.getPropertyDefault.

Returns the default state for a property, or null if this component does not want to report a default value for this property.

public String[]
getRecognizedFeatures()

Implements com.sun.org.apache.xerces.internal.xni.parser.XMLComponent.getRecognizedFeatures.

Returns a list of feature identifiers that are recognized by this component.

public String[]
getRecognizedProperties()

Implements com.sun.org.apache.xerces.internal.xni.parser.XMLComponent.getRecognizedProperties.

Returns a list of property identifiers that are recognized by this component.

public void
public void
public void
setFeature(String featureId, boolean state)

Implements com.sun.org.apache.xerces.internal.xni.parser.XMLComponent.setFeature.

Sets the state of a feature.

public void
setProperty(String propertyId, Object value)

Implements com.sun.org.apache.xerces.internal.xni.parser.XMLComponent.setProperty.

Sets the value of a property.

public void
private String
private void
updateAttributes(Attributes atts)

Compares the given Attributes with fCurrentAttributes and update the latter accordingly.

Inherited from com.sun.org.apache.xerces.internal.jaxp.TeeXMLDocumentFilterImpl:
commentdoctypeDeclendCDATAendDocumentendGeneralEntitygetDocumentHandlergetDocumentSourcegetSideprocessingInstructionsetDocumentHandlersetDocumentSourcesetSidestartCDATAstartDocumentstartGeneralEntitytextDeclxmlDecl