Top Description Inners Fields Constructors Methods
com.sun.tools.xjc

public final Class SchemaCache

Additional top-level class in compilation unit: Input.

extends Object
Class Inheritance
Imports
java.io.IOException, .InputStream, .Reader, java.util.ArrayList, .Collections, .List, javax.xml.transform.stream.StreamSource, javax.xml.validation.Schema, .SchemaFactory, .ValidatorHandler, org.glassfish.jaxb.core.v2.util.XmlFactory, javax.xml.XMLConstants, org.w3c.dom.ls.LSInput, .LSResourceResolver, org.xml.sax.SAXException

Wraps a JAXP Schema object and lazily instantiate it. This object is thread-safe. There should be only one instance of this for the whole VM.
Author
Kohsuke Kawaguchi

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class

Field Summary

Modifier and TypeField and Description
private final Class<?>
private final boolean
private final String
private Schema

Constructor Summary

AccessConstructor and Description
public
SchemaCache(String resourceName, Class<?> classToResolveResources)

public
SchemaCache(String resourceName, Class<?> classToResolveResources, boolean createResolver)

Method Summary

Modifier and TypeMethod and Description
public ValidatorHandler
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

clazzback to summary
private final Class<?> clazz
createResolverback to summary
private final boolean createResolver
resourceNameback to summary
private final String resourceName
schemaback to summary
private Schema schema

Constructor Detail

SchemaCacheback to summary
public SchemaCache(String resourceName, Class<?> classToResolveResources)
SchemaCacheback to summary
public SchemaCache(String resourceName, Class<?> classToResolveResources, boolean createResolver)

Method Detail

newValidatorback to summary
public ValidatorHandler newValidator()
com.sun.tools.xjc back to summary

pack-priv Class SchemaCache.ResourceResolver

extends Object
implements LSResourceResolver
Class Inheritance
All Implemented Interfaces
org.w3c.dom.ls.LSResourceResolver

Field Summary

Modifier and TypeField and Description
private Class<?>
private List<InputStream>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv void
public LSInput
resolveResource(String type, String namespaceURI, String publicId, String systemId, String baseURI)

Implements org.w3c.dom.ls.LSResourceResolver.resolveResource.

Allow the application to resolve external resources.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

clazzback to summary
private Class<?> clazz
streamsToCloseback to summary
private List<InputStream> streamsToClose

Constructor Detail

ResourceResolverback to summary
pack-priv ResourceResolver(Class<?> clazz)

Method Detail

closeStreamsback to summary
pack-priv void closeStreams()
resolveResourceback to summary
public LSInput resolveResource(String type, String namespaceURI, String publicId, String systemId, String baseURI)

Implements org.w3c.dom.ls.LSResourceResolver.resolveResource.

Doc from org.w3c.dom.ls.LSResourceResolver.resolveResource.

Allow the application to resolve external resources.
The LSParser will call this method before opening any external resource, including the external DTD subset, external entities referenced within the DTD, and external entities referenced within the document element (however, the top-level document entity is not passed to this method). The application may then request that the LSParser resolve the external resource itself, that it use an alternative URI, or that it use an entirely different input source.
Application writers can use this method to redirect external system identifiers to secure and/or local URI, to look up public identifiers in a catalogue, or to read an entity from a database or other input source (including, for example, a dialog box).

Annotations
@Override