|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.xb.util.AbstractSchemaBindingValidator
public abstract class AbstractSchemaBindingValidator
Mostly a holder for excluded and validated types, namespaces.
| Field Summary | |
|---|---|
protected Set<String> |
excludedNs
|
protected Set<QName> |
excludedTypes
|
protected static org.jboss.logging.Logger |
log
|
protected Set<QName> |
validatedElements
|
protected Set<QName> |
validatedTypes
|
protected static QName |
WILDCARD
|
| Constructor Summary | |
|---|---|
protected |
AbstractSchemaBindingValidator()
|
protected |
AbstractSchemaBindingValidator(SchemaBindingResolver resolver)
|
| Method Summary | |
|---|---|
void |
enableLogging(boolean value)
|
void |
excludeNs(String ns)
Types and elements from the namespace passed into this method will be excluded from validation. |
void |
excludeType(QName qName)
Excludes the specified type from validation. |
SchemaBindingResolver |
getSchemaResolver()
|
protected void |
handleError(String msg)
This an error handler method. |
void |
includeNs(String ns)
Removes the namespace from the excluded set. |
void |
includeType(QName qName)
Removes the specified type from the excluded set. |
boolean |
isLoggingEnabled()
|
boolean |
isNsExcluded(String ns)
Checks if the specified namespace is excluded from validation. |
boolean |
isTypeExcluded(QName qName)
Checks if the type is excluded from validation. |
protected void |
log(String msg)
This method is supposed to log a message. |
void |
reset()
Resets instance variables (such as a set of validated types and elements). |
void |
setSchemaResolver(SchemaBindingResolver resolver)
|
void |
validate(InputSource is,
SchemaBinding binding)
This method will check that the XSD represented with InputSource and SchemaBinding are consistent. |
void |
validate(String xsdName,
Class<?>... cls)
Validate xsd schema against classes. |
protected abstract void |
validate(org.apache.xerces.xs.XSModel xsSchema,
SchemaBinding schemaBinding)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.jboss.logging.Logger log
protected static final QName WILDCARD
protected Set<String> excludedNs
protected Set<QName> excludedTypes
protected Set<QName> validatedTypes
protected Set<QName> validatedElements
| Constructor Detail |
|---|
protected AbstractSchemaBindingValidator()
protected AbstractSchemaBindingValidator(SchemaBindingResolver resolver)
resolver - default schema resolver| Method Detail |
|---|
public void reset()
public boolean isLoggingEnabled()
public void enableLogging(boolean value)
public void excludeNs(String ns)
SchemaBindingValidator
excludeNs in interface SchemaBindingValidatorns - namespace to excludepublic boolean isNsExcluded(String ns)
SchemaBindingValidator
isNsExcluded in interface SchemaBindingValidatorns - the namespace to check
public void includeNs(String ns)
SchemaBindingValidator
includeNs in interface SchemaBindingValidatorns - the namespace to remove from the excluded set.public void excludeType(QName qName)
SchemaBindingValidator
excludeType in interface SchemaBindingValidatorqName - the QName of the type to exclude from validationpublic boolean isTypeExcluded(QName qName)
SchemaBindingValidator
isTypeExcluded in interface SchemaBindingValidatorqName - the QName of the type to check
public void includeType(QName qName)
SchemaBindingValidator
includeType in interface SchemaBindingValidatorqName - the QName of type to remove from the excluded set.public SchemaBindingResolver getSchemaResolver()
public void setSchemaResolver(SchemaBindingResolver resolver)
resolver - The default resolver used to resolve schemas
public void validate(InputSource is,
SchemaBinding binding)
SchemaBindingValidator
validate in interface SchemaBindingValidatoris - InputSource of the XSDbinding - SchemaBinding
public void validate(String xsdName,
Class<?>... cls)
SchemaBindingValidator
validate in interface SchemaBindingValidatorxsdName - the schema namecls - the classes to check
protected abstract void validate(org.apache.xerces.xs.XSModel xsSchema,
SchemaBinding schemaBinding)
protected void handleError(String msg)
msg - the error messageprotected void log(String msg)
msg - the message to log.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||