|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.xb.binding.resolver.AbstractMutableSchemaResolver
org.jboss.xb.binding.sunday.unmarshalling.DefaultSchemaResolver
public class DefaultSchemaResolver
A default SchemaBindingResolver that uses a JBossEntityResolver to locate the schema xsd.
| Constructor Summary | |
|---|---|
DefaultSchemaResolver()
|
|
DefaultSchemaResolver(org.jboss.util.xml.JBossEntityResolver resolver)
|
|
| Method Summary | |
|---|---|
void |
addClassBinding(String nsUri,
Class<?> clazz)
|
void |
addClassBinding(String nsUri,
String reference)
Add an in-memory schema. |
void |
addClassBindingForLocation(String schemaLocation,
Class<?> clazz)
|
void |
addSchemaInitializer(String nsUri,
SchemaBindingInitializer sbi)
Registers an instance of SchemaBindingInitializer for the namespace URI. |
void |
addSchemaInitializer(String nsUri,
String sbiClassName)
Registers a SchemaBindingInitializer for the namespace URI. |
void |
addSchemaLocation(String nsUri,
String location)
Registers a location for the namespace URI. |
void |
addSchemaParseAnnotations(String nsUri,
Boolean value)
Whether to parse annotations for this namespace. |
protected Class<?>[] |
getClassesForSchemaLocation(String uri)
|
protected Class<?>[] |
getClassesForURI(String uri)
|
void |
mapLocationToClass(String schemaLocation,
Class<?> clazz)
Maps schema location to a class which should be used as the base for the SchemaBinding. |
void |
mapLocationToClasses(String schemaLocation,
Class<?>... classes)
Maps schema location to an array of classes that should be used as the base for the SchemaBinding. |
void |
mapURIToClass(String nsUri,
Class<?> clazz)
Maps a namespace URI to a class which will be used as the base for the SchemaBinding. |
void |
mapURIToClasses(String nsUri,
Class<?>... clazz)
Maps a namespace URI to an array of classes that 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. |
Class<?> |
removeClassBinding(String nsUri)
|
Class<?> |
removeClassBindingForLocation(String schemaLocation)
|
Class<?>[] |
removeLocationToClassMapping(String schemaLocation)
Removes schema location to class mapping. |
Boolean |
removeSchemaParseAnnotations(String nsUri)
Removes the parse annotation configuration for this namespace. |
Class<?>[] |
removeURIToClassMapping(String nsUri)
Removes namespace URI to class mapping |
| Methods inherited from class org.jboss.xb.binding.resolver.AbstractMutableSchemaResolver |
|---|
getBaseURI, isCacheResolvedSchemas, loadReference, mapLocationToClass, mapLocationToClasses, mapSchemaInitializer, mapSchemaInitializer, mapSchemaLocation, mapURIToClass, removeSchemaInitializer, removeSchemaLocation, resolve, resolveAsLSInput, resolveClassFromSchemaLocation, setBaseURI, setCacheResolvedSchemas, setParseXSDAnnotations, unsetParseXSDAnnotations |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultSchemaResolver()
public DefaultSchemaResolver(org.jboss.util.xml.JBossEntityResolver resolver)
| Method Detail |
|---|
public void addSchemaLocation(String nsUri,
String location)
This method delegates to mapSchemaLocation(nsUri, location). This location is looked using the JBossEntityResolver, i.e. it is a classpath location
nsUri - the namespace locationlocation - the classpath location
public void addSchemaParseAnnotations(String nsUri,
Boolean value)
nsUri - the namespacevalue - the value of the optionpublic Boolean removeSchemaParseAnnotations(String nsUri)
nsUri - the namespace
public void addSchemaInitializer(String nsUri,
String sbiClassName)
throws Exception
nsUri - the namespace URI to register the schema initializer forsbiClassName - the class name SchemaBindingInitializer
Exception - for any error
public void addSchemaInitializer(String nsUri,
SchemaBindingInitializer sbi)
nsUri - the namespace URI to register the schema initializer forsbi - an instance of SchemaBindingInitializer
public void addClassBinding(String nsUri,
String reference)
throws ClassNotFoundException
nsUri - schema namespacereference - the schema reference class name
Exception - for any error
ClassNotFoundException
public void addClassBinding(String nsUri,
Class<?> clazz)
public Class<?> removeClassBinding(String nsUri)
public void addClassBindingForLocation(String schemaLocation,
Class<?> clazz)
public Class<?> removeClassBindingForLocation(String schemaLocation)
protected Class<?>[] getClassesForSchemaLocation(String uri)
getClassesForSchemaLocation in class AbstractMutableSchemaResolverprotected Class<?>[] getClassesForURI(String uri)
getClassesForURI in class AbstractMutableSchemaResolver
public void mapLocationToClass(String schemaLocation,
Class<?> clazz)
MutableSchemaResolver
schemaLocation - the location of the schemaclazz - the class to build the SchemaBinding from
public void mapLocationToClasses(String schemaLocation,
Class<?>... classes)
MutableSchemaResolver
schemaLocation - the location of the schemaclasses - the array of classes to build the SchemaBinding from
public void mapURIToClass(String nsUri,
Class<?> clazz)
MutableSchemaResolver
nsUri - the namespace URIclazz - class to build the SchemaBinding from
public void mapURIToClasses(String nsUri,
String... reference)
throws ClassNotFoundException
MutableSchemaResolver
mapURIToClasses in interface MutableSchemaResolvermapURIToClasses in class AbstractMutableSchemaResolvernsUri - 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 mapURIToClasses(String nsUri,
Class<?>... clazz)
MutableSchemaResolver
nsUri - the namespace URIpublic Class<?>[] removeLocationToClassMapping(String schemaLocation)
MutableSchemaResolver
schemaLocation - the schema location
public Class<?>[] removeURIToClassMapping(String nsUri)
MutableSchemaResolver
nsUri - the namespace URI to unmap
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||