Package org.jibx.schema.validation
Class ValidationUtils
- java.lang.Object
-
- org.jibx.schema.validation.ValidationUtils
-
public class ValidationUtils extends java.lang.Object
Utility methods for schema validation.- Author:
- Dennis M. Sosnoski
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
ValidationUtils.SyntheticSchemaResolver
Resolver for synthesized schema, used when no-namespace schemas are being generated within a namespace.
-
Field Summary
Fields Modifier and Type Field Description private static Logger
s_logger
Logger for class.
-
Constructor Summary
Constructors Constructor Description ValidationUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SchemaElement[]
load(java.util.Collection resolves, java.lang.String uri, ValidationContext vctx)
Load and validate a list of schemas.static void
validateSchemas(SchemaElement[] schemas, ValidationContext vctx)
Validate an ordered array of schemas.
-
-
-
Method Detail
-
validateSchemas
public static void validateSchemas(SchemaElement[] schemas, ValidationContext vctx)
Validate an ordered array of schemas. To assure proper handling of chameleon schemas, schemas with target namespaces need to precede schemas with no target namespace in the array.- Parameters:
schemas
- schemas to be validatedvctx
- validation context to be used
-
load
public static SchemaElement[] load(java.util.Collection resolves, java.lang.String uri, ValidationContext vctx) throws JiBXException, java.io.IOException
Load and validate a list of schemas.- Parameters:
resolves
- resolvers for schemas to be loadeduri
- effective namespace used for generation when no namespaced schemas are found (null
if none)vctx
- context to use for validating schemas- Returns:
- schemas in validation order
- Throws:
JiBXException
- on unrecoverable error in schemasjava.io.IOException
- on error reading schemas
-
-