Save This Page
Home » Xerces-J-src.2.9.1 » org.apache.xerces » impl » xs » [javadoc | source]
org.apache.xerces.impl.xs
public class: XMLSchemaLoader [javadoc | source]
java.lang.Object
   org.apache.xerces.impl.xs.XMLSchemaLoader

All Implemented Interfaces:
    DOMConfiguration, XMLComponent, XSLoader, XMLGrammarLoader

This class implements xni.grammars.XMLGrammarLoader. It also serves as implementation of xs.XSLoader interface and DOMConfiguration interface. This class is designed to interact either with a proxy for a user application which wants to preparse schemas, or with our own Schema validator. It is hoped that none of these "external" classes will therefore need to communicate directly with XSDHandler in future.

This class only knows how to make XSDHandler do its thing. The caller must ensure that all its properties (schemaLocation, JAXPSchemaSource etc.) have been properly set.

Nested Class Summary:
static class  XMLSchemaLoader.LocationArray   
Field Summary
protected static final  String SCHEMA_FULL_CHECKING    Feature identifier: schema full checking 
protected static final  String CONTINUE_AFTER_FATAL_ERROR    Feature identifier: continue after fatal error. 
protected static final  String ALLOW_JAVA_ENCODINGS    Feature identifier: allow java encodings to be recognized when parsing schema docs. 
protected static final  String STANDARD_URI_CONFORMANT_FEATURE    Feature identifier: standard uri conformant feature. 
protected static final  String VALIDATE_ANNOTATIONS    Feature identifier: validate annotations. 
protected static final  String DISALLOW_DOCTYPE    Feature: disallow doctype 
protected static final  String GENERATE_SYNTHETIC_ANNOTATIONS    Feature: generate synthetic annotations 
protected static final  String HONOUR_ALL_SCHEMALOCATIONS    Feature identifier: honour all schemaLocations 
protected static final  String AUGMENT_PSVI     
protected static final  String PARSER_SETTINGS     
public static final  String SYMBOL_TABLE    Property identifier: symbol table. 
public static final  String ERROR_REPORTER    Property identifier: error reporter. 
protected static final  String ERROR_HANDLER    Property identifier: error handler. 
public static final  String ENTITY_RESOLVER    Property identifier: entity resolver. 
public static final  String XMLGRAMMAR_POOL    Property identifier: grammar pool. 
protected static final  String SCHEMA_LOCATION    Property identifier: schema location. 
protected static final  String SCHEMA_NONS_LOCATION    Property identifier: no namespace schema location. 
protected static final  String JAXP_SCHEMA_SOURCE    Property identifier: JAXP schema source. 
protected static final  String SECURITY_MANAGER     
protected static final  String ENTITY_MANAGER     
Constructor:
 public XMLSchemaLoader() 
 public XMLSchemaLoader(SymbolTable symbolTable) 
 XMLSchemaLoader(XMLErrorReporter errorReporter,
    XSGrammarBucket grammarBucket,
    SubstitutionGroupHandler sHandler,
    CMBuilder builder) 
    This constractor is used by the XMLSchemaValidator. Additional properties, i.e. XMLEntityManager, will be passed during reset(XMLComponentManager).
    Parameters:
    errorReporter -
    grammarBucket -
    sHandler -
    builder -
 XMLSchemaLoader(SymbolTable symbolTable,
    XMLErrorReporter errorReporter,
    XMLEntityManager entityResolver,
    XSGrammarBucket grammarBucket,
    SubstitutionGroupHandler sHandler,
    CMBuilder builder) 
Method from org.apache.xerces.impl.xs.XMLSchemaLoader Summary:
canSetParameter,   dom2xmlInputSource,   getConfig,   getEntityResolver,   getErrorHandler,   getFeature,   getFeatureDefault,   getLocale,   getParameter,   getParameterNames,   getProperty,   getPropertyDefault,   getRecognizedFeatures,   getRecognizedProperties,   load,   loadGrammar,   loadGrammar,   loadInputList,   loadSchema,   loadURI,   loadURIList,   processExternalHints,   reportDOMFatalError,   reset,   resolveDocument,   setEntityResolver,   setErrorHandler,   setFeature,   setLocale,   setParameter,   setProperty,   tokenizeSchemaLocationStr
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.xerces.impl.xs.XMLSchemaLoader Detail:
 public boolean canSetParameter(String name,
    Object value) 
 XMLInputSource dom2xmlInputSource(LSInput is) 
 public DOMConfiguration getConfig() 
 public XMLEntityResolver getEntityResolver() 
    Returns the registered entity resolver.
 public XMLErrorHandler getErrorHandler() 
    Returns the registered error handler.
 public boolean getFeature(String featureId) throws XMLConfigurationException 
    Returns the state of a feature.
 public Boolean getFeatureDefault(String featureId) 
 public Locale getLocale() 
    Return the Locale the XMLGrammarLoader is using.
 public Object getParameter(String name) throws DOMException 
 public DOMStringList getParameterNames() 
 public Object getProperty(String propertyId) throws XMLConfigurationException 
    Returns the state of a property.
 public Object getPropertyDefault(String propertyId) 
 public String[] getRecognizedFeatures() 
    Returns a list of feature identifiers that are recognized by this XMLGrammarLoader. This method may return null if no features are recognized.
 public String[] getRecognizedProperties() 
    Returns a list of property identifiers that are recognized by this XMLGrammarLoader. This method may return null if no properties are recognized.
 public XSModel load(LSInput is) 
 public  void loadGrammar(XMLInputSource[] source) throws IOException, XNIException 
    Returns a Grammar object by parsing the contents of the entities pointed to by sources.
 public Grammar loadGrammar(XMLInputSource source) throws IOException, XNIException 
    Returns a Grammar object by parsing the contents of the entity pointed to by source.
 public XSModel loadInputList(LSInputList is) 
 SchemaGrammar loadSchema(XSDDescription desc,
    XMLInputSource source,
    Hashtable locationPairs) throws IOException, XNIException 
    This method is called either from XMLGrammarLoader.loadGrammar or from XMLSchemaValidator. Note: in either case, the EntityManager (or EntityResolvers) are not going to be invoked to resolve the location of the schema in XSDDescription
 public XSModel loadURI(String uri) 
 public XSModel loadURIList(StringList uriList) 
 public static  void processExternalHints(String sl,
    String nsl,
    Hashtable locations,
    XMLErrorReporter er) 
  void reportDOMFatalError(Exception e) 
 public  void reset(XMLComponentManager componentManager) throws XMLConfigurationException 
 public static XMLInputSource resolveDocument(XSDDescription desc,
    Hashtable locationPairs,
    XMLEntityResolver entityResolver) throws IOException 
    This method tries to resolve location of the given schema. The loader stores the namespace/location pairs in a hashtable (use "" as the namespace of absent namespace). When resolving an entity, loader first tries to find in the hashtable whether there is a value for that namespace, if so, pass that location value to the user-defined entity resolver.
 public  void setEntityResolver(XMLEntityResolver entityResolver) 
    Sets the entity resolver.
 public  void setErrorHandler(XMLErrorHandler errorHandler) 
    Sets the error handler.
 public  void setFeature(String featureId,
    boolean state) throws XMLConfigurationException 
    Sets the state of a feature.
 public  void setLocale(Locale locale) 
    Set the locale to use for messages.
 public  void setParameter(String name,
    Object value) throws DOMException 
 public  void setProperty(String propertyId,
    Object state) throws XMLConfigurationException 
    Sets the state of a property.
 public static boolean tokenizeSchemaLocationStr(String schemaStr,
    Hashtable locations)