|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.xb.binding.resolver.AbstractMutableSchemaResolver
public abstract class AbstractMutableSchemaResolver
A AbstractMutableSchemaResolver.
| Constructor Summary | |
|---|---|
protected |
AbstractMutableSchemaResolver(org.jboss.logging.Logger log)
|
protected |
AbstractMutableSchemaResolver(org.jboss.logging.Logger log,
org.jboss.util.xml.JBossEntityResolver resolver)
|
| Method Summary | |
|---|---|
String |
getBaseURI()
|
protected abstract Class<?>[] |
getClassesForSchemaLocation(String uri)
|
protected abstract Class<?>[] |
getClassesForURI(String uri)
|
boolean |
isCacheResolvedSchemas()
|
protected Class<?> |
loadReference(String sbiClassName)
|
void |
mapLocationToClass(String schemaLocation,
String reference)
Maps schema location to a class which should be used as the base for the SchemaBinding. |
void |
mapLocationToClasses(String schemaLocation,
String... reference)
Maps schema location to an array of classes that should be used as the base for the SchemaBinding. |
void |
mapSchemaInitializer(String nsUri,
SchemaBindingInitializer sbi)
Registers an instance of SchemaBindingInitializer for the namespace URI. |
void |
mapSchemaInitializer(String nsUri,
String sbiClassName)
Registers a SchemaBindingInitializer for the namespace URI. |
void |
mapSchemaLocation(String nsUri,
String location)
Registers a location for the namespace URI. |
void |
mapURIToClass(String nsUri,
String reference)
Maps a namespace URI to a class which will be used as the base for the SchemaBinding. |
void |
mapURIToClasses(String nsUri,
String... reference)
Maps a namespace URI to an array of classes that will be used as the base for the SchemaBinding. |
SchemaBindingInitializer |
removeSchemaInitializer(String nsUri)
Unregisters and returns the SchemaBindingInitializer for the namespace URI. |
void |
removeSchemaLocation(String nsUri)
Removes a location for the namespace URI. |
SchemaBinding |
resolve(String nsURI,
String baseURI,
String schemaLocation)
Uses the JBossEntityResolver.resolveEntity by: 1. |
LSInput |
resolveAsLSInput(String nsURI,
String baseURI,
String schemaLocation)
This one is used to resolve imported schemas with |
protected Class<?>[] |
resolveClassFromSchemaLocation(String schemaLocation,
boolean trace)
Lookup a binding class by schemaLocation. |
void |
setBaseURI(String baseURI)
|
void |
setCacheResolvedSchemas(boolean cacheResolvedSchemas)
Passing in true will make the schema resolver to cache successfully resolved schemas (which is the default) with namespace URI being the identifier of a schema. |
void |
setParseXSDAnnotations(String nsUri,
boolean value)
Whether to parse annotations for this namespace. |
Boolean |
unsetParseXSDAnnotations(String nsURI)
Clears the flag to parse XSD annotations for the namespace URI. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jboss.xb.binding.resolver.MutableSchemaResolver |
|---|
mapLocationToClass, mapLocationToClasses, mapURIToClass, mapURIToClasses, removeLocationToClassMapping, removeURIToClassMapping |
| Constructor Detail |
|---|
protected AbstractMutableSchemaResolver(org.jboss.logging.Logger log)
protected AbstractMutableSchemaResolver(org.jboss.logging.Logger log,
org.jboss.util.xml.JBossEntityResolver resolver)
| Method Detail |
|---|
public boolean isCacheResolvedSchemas()
isCacheResolvedSchemas in interface MutableSchemaResolverpublic void setCacheResolvedSchemas(boolean cacheResolvedSchemas)
setCacheResolvedSchemas in interface MutableSchemaResolvercacheResolvedSchemas -
public void mapSchemaLocation(String nsUri,
String location)
This location is looked using the JBossEntityResolver, i.e. it is a classpath location
mapSchemaLocation in interface MutableSchemaResolvernsUri - the namespace locationlocation - the classpath locationpublic void removeSchemaLocation(String nsUri)
removeSchemaLocation in interface MutableSchemaResolvernsUri - the namespace location
public void setParseXSDAnnotations(String nsUri,
boolean value)
setParseXSDAnnotations in interface MutableSchemaResolvernsUri - the namespacevalue - the value of the optionpublic Boolean unsetParseXSDAnnotations(String nsURI)
MutableSchemaResolver
unsetParseXSDAnnotations in interface MutableSchemaResolvernsURI - the namespace URI
public void mapSchemaInitializer(String nsUri,
String sbiClassName)
throws Exception
mapSchemaInitializer in interface MutableSchemaResolvernsUri - the namespace URI to register the schema initializer forsbiClassName - the class name SchemaBindingInitializer
Exception - for any error
public void mapSchemaInitializer(String nsUri,
SchemaBindingInitializer sbi)
mapSchemaInitializer in interface MutableSchemaResolvernsUri - the namespace URI to register the schema initializer forsbi - an instance of SchemaBindingInitializerpublic SchemaBindingInitializer removeSchemaInitializer(String nsUri)
removeSchemaInitializer in interface MutableSchemaResolvernsUri - the namespace URI to unregister SchemaBindingInitializer for
public String getBaseURI()
getBaseURI in interface SchemaBindingResolverpublic void setBaseURI(String baseURI)
setBaseURI in interface SchemaBindingResolver
public SchemaBinding resolve(String nsURI,
String baseURI,
String schemaLocation)
resolve in interface SchemaBindingResolvernsURI - - namespace URI of the element with the schema referencebaseURI - - an optional baseURI for resolving the schemaLocation.schemaLocation - - the option schema location uri that matches
nsUri if one exists
public void mapURIToClass(String nsUri,
String reference)
throws ClassNotFoundException
MutableSchemaResolver
mapURIToClass in interface MutableSchemaResolvernsUri - the namespace URIreference - fully qualified class name to build the SchemaBinding from
ClassNotFoundException - if the reference cannot be loaded
public void mapURIToClasses(String nsUri,
String... reference)
throws ClassNotFoundException
MutableSchemaResolver
mapURIToClasses in interface MutableSchemaResolvernsUri - the namespace URIreference - array of fully qualified class names to build the SchemaBinding from
ClassNotFoundException - if at least one of the references cannot be loaded
public void mapLocationToClass(String schemaLocation,
String reference)
throws ClassNotFoundException
MutableSchemaResolver
mapLocationToClass in interface MutableSchemaResolverschemaLocation - the location of the schemareference - the fully qualified class name to build the SchemaBinding from
ClassNotFoundException - if the reference cannot be loaded
public void mapLocationToClasses(String schemaLocation,
String... reference)
throws ClassNotFoundException
MutableSchemaResolver
mapLocationToClasses in interface MutableSchemaResolverschemaLocation - the location of the schemareference - the array of fully qualified class names to build the SchemaBinding from
ClassNotFoundException - if at least one of the references cannot be loaded
protected Class<?> loadReference(String sbiClassName)
throws ClassNotFoundException
ClassNotFoundException
protected Class<?>[] resolveClassFromSchemaLocation(String schemaLocation,
boolean trace)
schemaLocation - the schema location from the parsertrace - - logging trace flag
public LSInput resolveAsLSInput(String nsURI,
String baseURI,
String schemaLocation)
SchemaBindingResolver
resolveAsLSInput in interface SchemaBindingResolverprotected abstract Class<?>[] getClassesForURI(String uri)
protected abstract Class<?>[] getClassesForSchemaLocation(String uri)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||