JBoss XML Binding 2.0.3.GA-redhat-2

org.jboss.xb.util
Interface SchemaBindingValidator

All Known Implementing Classes:
AbstractSchemaBindingValidator, DefaultSchemaBindingValidator

public interface SchemaBindingValidator

Simple schema binding interface.

Author:
Alexey Loubyansky, Ales Justin

Method Summary
 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.
 void includeNs(String ns)
          Removes the namespace from the excluded set.
 void includeType(QName qName)
          Removes the specified type from the excluded set.
 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.
 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.
 

Method Detail

excludeNs

void excludeNs(String ns)
Types and elements from the namespace passed into this method will be excluded from validation.

Parameters:
ns - namespace to exclude

isNsExcluded

boolean isNsExcluded(String ns)
Checks if the specified namespace is excluded from validation.

Parameters:
ns - the namespace to check
Returns:
true if the namespace is excluded

includeNs

void includeNs(String ns)
Removes the namespace from the excluded set. If the namespace has not been excluded, the method does nothing.

Parameters:
ns - the namespace to remove from the excluded set.

excludeType

void excludeType(QName qName)
Excludes the specified type from validation.

Parameters:
qName - the QName of the type to exclude from validation

isTypeExcluded

boolean isTypeExcluded(QName qName)
Checks if the type is excluded from validation.

Parameters:
qName - the QName of the type to check
Returns:
true if the type is excluded from validation

includeType

void includeType(QName qName)
Removes the specified type from the excluded set. If the type has not been excluded, the method does nothing.

Parameters:
qName - the QName of type to remove from the excluded set.

validate

void validate(InputSource is,
              SchemaBinding binding)
This method will check that the XSD represented with InputSource and SchemaBinding are consistent. The consistency is checked to certain degree and is far from 100%. Currently it checks just for basic things such as the existence of type definitions, attribute and element declarations and element ordering.

Parameters:
is - InputSource of the XSD
binding - SchemaBinding

validate

void validate(String xsdName,
              Class<?>... cls)
Validate xsd schema against classes.

Parameters:
xsdName - the schema name
cls - the classes to check

JBoss XML Binding 2.0.3.GA-redhat-2

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.