Java Doc for XMLSchemaLoader.java in  » XML » xerces-2_9_1 » org » apache » xerces » impl » xs » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » XML » xerces 2_9_1 » org.apache.xerces.impl.xs 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.xerces.impl.xs.XMLSchemaLoader

XMLSchemaLoader
public class XMLSchemaLoader implements XMLGrammarLoader,XMLComponent,XSLoader,DOMConfiguration(Code)
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.
author:
   Neil Graham, IBM
version:
   $Id: XMLSchemaLoader.java 521495 2007-03-22 22:12:05Z mrglavas $


Inner Class :static class LocationArray

Field Summary
final protected static  StringALLOW_JAVA_ENCODINGS
     Feature identifier: allow java encodings to be recognized when parsing schema docs.
final protected static  StringAUGMENT_PSVI
    
final protected static  StringCONTINUE_AFTER_FATAL_ERROR
     Feature identifier: continue after fatal error.
final protected static  StringDISALLOW_DOCTYPE
    
final protected static  StringENTITY_MANAGER
    
final public static  StringENTITY_RESOLVER
     Property identifier: entity resolver.
final protected static  StringERROR_HANDLER
     Property identifier: error handler.
final public static  StringERROR_REPORTER
     Property identifier: error reporter.
final protected static  StringGENERATE_SYNTHETIC_ANNOTATIONS
    
final protected static  StringHONOUR_ALL_SCHEMALOCATIONS
    
final protected static  StringJAXP_SCHEMA_SOURCE
     Property identifier: JAXP schema source.
final protected static  StringPARSER_SETTINGS
    
final protected static  StringSCHEMA_FULL_CHECKING
    
final protected static  StringSCHEMA_LOCATION
     Property identifier: schema location.
final protected static  StringSCHEMA_NONS_LOCATION
     Property identifier: no namespace schema location.
final protected static  StringSECURITY_MANAGER
    
final protected static  StringSTANDARD_URI_CONFORMANT_FEATURE
     Feature identifier: standard uri conformant feature.
final public static  StringSYMBOL_TABLE
     Property identifier: symbol table.
final protected static  StringVALIDATE_ANNOTATIONS
     Feature identifier: validate annotations.
final public static  StringXMLGRAMMAR_POOL
     Property identifier: grammar pool.

Constructor Summary
public  XMLSchemaLoader()
    
public  XMLSchemaLoader(SymbolTable symbolTable)
    
 XMLSchemaLoader(XMLErrorReporter errorReporter, XSGrammarBucket grammarBucket, SubstitutionGroupHandler sHandler, CMBuilder builder)
     This constractor is used by the XMLSchemaValidator.
 XMLSchemaLoader(SymbolTable symbolTable, XMLErrorReporter errorReporter, XMLEntityManager entityResolver, XSGrammarBucket grammarBucket, SubstitutionGroupHandler sHandler, CMBuilder builder)
    

Method Summary
public  booleancanSetParameter(String name, Object value)
    
 XMLInputSourcedom2xmlInputSource(LSInput is)
    
public  DOMConfigurationgetConfig()
    
public  XMLEntityResolvergetEntityResolver()
     Returns the registered entity resolver.
public  XMLErrorHandlergetErrorHandler()
     Returns the registered error handler.
public  booleangetFeature(String featureId)
     Returns the state of a feature.
public  BooleangetFeatureDefault(String featureId)
    
public  LocalegetLocale()
     Return the Locale the XMLGrammarLoader is using.
public  ObjectgetParameter(String name)
    
public  DOMStringListgetParameterNames()
    
public  ObjectgetProperty(String propertyId)
     Returns the state of a property.
public  ObjectgetPropertyDefault(String propertyId)
    
public  String[]getRecognizedFeatures()
     Returns a list of feature identifiers that are recognized by this XMLGrammarLoader.
public  String[]getRecognizedProperties()
     Returns a list of property identifiers that are recognized by this XMLGrammarLoader.
public  XSModelload(LSInput is)
    
public  voidloadGrammar(XMLInputSource source)
     Returns a Grammar object by parsing the contents of the entities pointed to by sources.
public  GrammarloadGrammar(XMLInputSource source)
     Returns a Grammar object by parsing the contents of the entity pointed to by source.
public  XSModelloadInputList(LSInputList is)
    
 SchemaGrammarloadSchema(XSDDescription desc, XMLInputSource source, Hashtable locationPairs)
     This method is called either from XMLGrammarLoader.loadGrammar or from XMLSchemaValidator.
public  XSModelloadURI(String uri)
    
public  XSModelloadURIList(StringList uriList)
    
public static  voidprocessExternalHints(String sl, String nsl, Hashtable locations, XMLErrorReporter er)
    
 voidreportDOMFatalError(Exception e)
    
public  voidreset(XMLComponentManager componentManager)
    
public static  XMLInputSourceresolveDocument(XSDDescription desc, Hashtable locationPairs, XMLEntityResolver entityResolver)
     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).
public  voidsetEntityResolver(XMLEntityResolver entityResolver)
     Sets the entity resolver.
public  voidsetErrorHandler(XMLErrorHandler errorHandler)
     Sets the error handler.
public  voidsetFeature(String featureId, boolean state)
     Sets the state of a feature.
public  voidsetLocale(Locale locale)
     Set the locale to use for messages.
public  voidsetParameter(String name, Object value)
    
public  voidsetProperty(String propertyId, Object state)
     Sets the state of a property.
public static  booleantokenizeSchemaLocationStr(String schemaStr, Hashtable locations)
    

Field Detail
ALLOW_JAVA_ENCODINGS
final protected static String ALLOW_JAVA_ENCODINGS(Code)
Feature identifier: allow java encodings to be recognized when parsing schema docs.



AUGMENT_PSVI
final protected static String AUGMENT_PSVI(Code)



CONTINUE_AFTER_FATAL_ERROR
final protected static String CONTINUE_AFTER_FATAL_ERROR(Code)
Feature identifier: continue after fatal error.



DISALLOW_DOCTYPE
final protected static String DISALLOW_DOCTYPE(Code)
Feature: disallow doctype



ENTITY_MANAGER
final protected static String ENTITY_MANAGER(Code)



ENTITY_RESOLVER
final public static String ENTITY_RESOLVER(Code)
Property identifier: entity resolver.



ERROR_HANDLER
final protected static String ERROR_HANDLER(Code)
Property identifier: error handler.



ERROR_REPORTER
final public static String ERROR_REPORTER(Code)
Property identifier: error reporter.



GENERATE_SYNTHETIC_ANNOTATIONS
final protected static String GENERATE_SYNTHETIC_ANNOTATIONS(Code)
Feature: generate synthetic annotations



HONOUR_ALL_SCHEMALOCATIONS
final protected static String HONOUR_ALL_SCHEMALOCATIONS(Code)
Feature identifier: honour all schemaLocations



JAXP_SCHEMA_SOURCE
final protected static String JAXP_SCHEMA_SOURCE(Code)
Property identifier: JAXP schema source.



PARSER_SETTINGS
final protected static String PARSER_SETTINGS(Code)



SCHEMA_FULL_CHECKING
final protected static String SCHEMA_FULL_CHECKING(Code)
Feature identifier: schema full checking



SCHEMA_LOCATION
final protected static String SCHEMA_LOCATION(Code)
Property identifier: schema location.



SCHEMA_NONS_LOCATION
final protected static String SCHEMA_NONS_LOCATION(Code)
Property identifier: no namespace schema location.



SECURITY_MANAGER
final protected static String SECURITY_MANAGER(Code)



STANDARD_URI_CONFORMANT_FEATURE
final protected static String STANDARD_URI_CONFORMANT_FEATURE(Code)
Feature identifier: standard uri conformant feature.



SYMBOL_TABLE
final public static String SYMBOL_TABLE(Code)
Property identifier: symbol table.



VALIDATE_ANNOTATIONS
final protected static String VALIDATE_ANNOTATIONS(Code)
Feature identifier: validate annotations.



XMLGRAMMAR_POOL
final public static String XMLGRAMMAR_POOL(Code)
Property identifier: grammar pool.




Constructor Detail
XMLSchemaLoader
public XMLSchemaLoader()(Code)



XMLSchemaLoader
public XMLSchemaLoader(SymbolTable symbolTable)(Code)



XMLSchemaLoader
XMLSchemaLoader(XMLErrorReporter errorReporter, XSGrammarBucket grammarBucket, SubstitutionGroupHandler sHandler, CMBuilder builder)(Code)
This constractor is used by the XMLSchemaValidator. Additional properties, i.e. XMLEntityManager, will be passed during reset(XMLComponentManager).
Parameters:
  errorReporter -
Parameters:
  grammarBucket -
Parameters:
  sHandler -
Parameters:
  builder -



XMLSchemaLoader
XMLSchemaLoader(SymbolTable symbolTable, XMLErrorReporter errorReporter, XMLEntityManager entityResolver, XSGrammarBucket grammarBucket, SubstitutionGroupHandler sHandler, CMBuilder builder)(Code)




Method Detail
canSetParameter
public boolean canSetParameter(String name, Object value)(Code)



dom2xmlInputSource
XMLInputSource dom2xmlInputSource(LSInput is)(Code)



getConfig
public DOMConfiguration getConfig()(Code)



getEntityResolver
public XMLEntityResolver getEntityResolver()(Code)
Returns the registered entity resolver.



getErrorHandler
public XMLErrorHandler getErrorHandler()(Code)
Returns the registered error handler.



getFeature
public boolean getFeature(String featureId) throws XMLConfigurationException(Code)
Returns the state of a feature.
Parameters:
  featureId - The feature identifier.
throws:
  XMLConfigurationException - Thrown on configuration error.



getFeatureDefault
public Boolean getFeatureDefault(String featureId)(Code)



getLocale
public Locale getLocale()(Code)
Return the Locale the XMLGrammarLoader is using.



getParameter
public Object getParameter(String name) throws DOMException(Code)



getParameterNames
public DOMStringList getParameterNames()(Code)



getProperty
public Object getProperty(String propertyId) throws XMLConfigurationException(Code)
Returns the state of a property.
Parameters:
  propertyId - The property identifier.
throws:
  XMLConfigurationException - Thrown on configuration error.



getPropertyDefault
public Object getPropertyDefault(String propertyId)(Code)



getRecognizedFeatures
public String[] getRecognizedFeatures()(Code)
Returns a list of feature identifiers that are recognized by this XMLGrammarLoader. This method may return null if no features are recognized.



getRecognizedProperties
public String[] getRecognizedProperties()(Code)
Returns a list of property identifiers that are recognized by this XMLGrammarLoader. This method may return null if no properties are recognized.



load
public XSModel load(LSInput is)(Code)



loadGrammar
public void loadGrammar(XMLInputSource source) throws IOException, XNIException(Code)
Returns a Grammar object by parsing the contents of the entities pointed to by sources.
Parameters:
  source - the locations of the entity which forms the staring point of the grammars to be constructed
throws:
  IOException - when a problem is encounted reading the entity
throws:
  XNIException - when a condition arises (such as a FatalError) that requires parsingof the entity be terminated



loadGrammar
public Grammar loadGrammar(XMLInputSource source) throws IOException, XNIException(Code)
Returns a Grammar object by parsing the contents of the entity pointed to by source.
Parameters:
  source - the location of the entity which formsthe starting point of the grammar to be constructed.
throws:
  IOException - When a problem is encountered reading the entityXNIException When a condition arises (such as a FatalError) that requires parsingof the entity be terminated.



loadInputList
public XSModel loadInputList(LSInputList is)(Code)



loadSchema
SchemaGrammar loadSchema(XSDDescription desc, XMLInputSource source, Hashtable locationPairs) throws IOException, XNIException(Code)
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
Parameters:
  desc -
Parameters:
  source -
Parameters:
  locationPairs - An XML Schema grammar
throws:
  IOException -
throws:
  XNIException -



loadURI
public XSModel loadURI(String uri)(Code)



loadURIList
public XSModel loadURIList(StringList uriList)(Code)



processExternalHints
public static void processExternalHints(String sl, String nsl, Hashtable locations, XMLErrorReporter er)(Code)



reportDOMFatalError
void reportDOMFatalError(Exception e)(Code)



reset
public void reset(XMLComponentManager componentManager) throws XMLConfigurationException(Code)



resolveDocument
public static XMLInputSource resolveDocument(XSDDescription desc, Hashtable locationPairs, XMLEntityResolver entityResolver) throws IOException(Code)
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.
Parameters:
  desc -
Parameters:
  locationPairs -
Parameters:
  entityResolver - the XMLInputSource
throws:
  IOException -



setEntityResolver
public void setEntityResolver(XMLEntityResolver entityResolver)(Code)
Sets the entity resolver.
Parameters:
  entityResolver - The new entity resolver.



setErrorHandler
public void setErrorHandler(XMLErrorHandler errorHandler)(Code)
Sets the error handler.
Parameters:
  errorHandler - The error handler.



setFeature
public void setFeature(String featureId, boolean state) throws XMLConfigurationException(Code)
Sets the state of a feature.
Parameters:
  featureId - The feature identifier.
Parameters:
  state - The state of the feature.
throws:
  XMLConfigurationException - Thrown when a feature is notrecognized or cannot be set.



setLocale
public void setLocale(Locale locale)(Code)
Set the locale to use for messages.
Parameters:
  locale - The locale object to use for localization of messages.
exception:
  XNIException - Thrown if the parser does not support thespecified locale.



setParameter
public void setParameter(String name, Object value) throws DOMException(Code)



setProperty
public void setProperty(String propertyId, Object state) throws XMLConfigurationException(Code)
Sets the state of a property.
Parameters:
  propertyId - The property identifier.
Parameters:
  state - The state of the property.
throws:
  XMLConfigurationException - Thrown when a property is notrecognized or cannot be set.



tokenizeSchemaLocationStr
public static boolean tokenizeSchemaLocationStr(String schemaStr, Hashtable locations)(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.