Modifier and Type | Class and Description |
---|---|
protected class |
XsdBasedValidator.Handler
Handler to receive parse events.
|
Validator.ResultItem, Validator.ResultType
Constructor and Description |
---|
XsdBasedValidator()
Creates a new instance of XsdBasedValidation
|
Modifier and Type | Method and Description |
---|---|
protected Schema |
getCompiledSchema(InputStream[] schemas,
LSResourceResolver lsResourceResolver)
Subclasses can use this to get a compiled schema object.
|
protected Schema |
getCompiledSchema(Source[] schemas,
LSResourceResolver lsResourceResolver,
ErrorHandler errorHandler) |
protected abstract Schema |
getSchema(Model model)
Get Schemas that the model has to be validated against.
|
protected Source |
getSource(Model model,
XsdBasedValidator.Handler handler) |
DocumentModel |
resolveResource(String systemId,
Model currentModel) |
protected void |
validate(Model model,
Schema schema,
XsdBasedValidator.Handler handler)
Validates the model against the schema.
|
ValidationResult |
validate(Model model,
Validation validation,
Validation.ValidationType validationType)
Entry point to validate a model.
|
public XsdBasedValidator()
protected abstract Schema getSchema(Model model)
model
- Get Schemas that the model has to be validated against.public ValidationResult validate(Model model, Validation validation, Validation.ValidationType validationType)
protected Source getSource(Model model, XsdBasedValidator.Handler handler)
model
- handler
- protected void validate(Model model, Schema schema, XsdBasedValidator.Handler handler)
model
- Model to be validated.schema
- Compiled schema against which the model is validated.handler
- Handler to receive validation messages.protected Schema getCompiledSchema(InputStream[] schemas, LSResourceResolver lsResourceResolver)
schemas
- Input stream of schemas.lsResourceResolver
- resolver can be supplied optionally. Otherwise pass null.protected Schema getCompiledSchema(Source[] schemas, LSResourceResolver lsResourceResolver, ErrorHandler errorHandler)
public DocumentModel resolveResource(String systemId, Model currentModel)