public class YDataValidator
extends java.lang.Object
Constructor and Description |
---|
YDataValidator(java.lang.String schema)
Constructs a new validator and handler.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
getMessages() |
java.util.Set<java.lang.String> |
getPrimaryTypeNames() |
java.lang.String |
getSchema() |
SchemaHandler |
getSchemaHandler() |
void |
validate(java.util.Collection vars,
Element data,
java.lang.String source)
Validates a collection of variables against the schema.
|
void |
validate(YVariable variable,
Element data,
java.lang.String source)
Validates a single data variable
|
boolean |
validateSchema()
Compiles and determines the validity of the current schema
|
public YDataValidator(java.lang.String schema)
schema
- a W3C XML Schemapublic boolean validateSchema()
public void validate(YVariable variable, Element data, java.lang.String source) throws YDataValidationException
variable
- to be validateddata
- XML representation of variable to be validatedsource
- YDataValidationException
- if the data is not validpublic void validate(java.util.Collection vars, Element data, java.lang.String source) throws YDataValidationException
vars
- variables to be validateddata
- XML representation fo the variables to be validatedsource
- YDataValidationException
- if the data is not validpublic java.lang.String getSchema()
public SchemaHandler getSchemaHandler()
public java.util.List<java.lang.String> getMessages()
public java.util.Set<java.lang.String> getPrimaryTypeNames()
Copyright © 2004-2014 The YAWL Foundation.