org.exist.validation
Class Validator

java.lang.Object
  extended by org.exist.validation.Validator

public class Validator
extends Object

Validate XML documents with their grammars (DTD's and Schemas).

Author:
Dannes Wessels (dizzzz@exist-db.org)

Constructor Summary
Validator(BrokerPool pool)
          Setup Validator object with brokerpool as centre.
 
Method Summary
 ValidationReport validate(InputStream is)
          Validate XML data in inputstream.
 ValidationReport validate(InputStream is, String grammarPath)
          Validate XML data in inputstream.
 ValidationReport validate(Reader reader)
          Validate XML data from reader.
 ValidationReport validate(Reader reader, String grammarPath)
          Validate XML data from reader using specified grammar.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Validator

public Validator(BrokerPool pool)
Setup Validator object with brokerpool as centre.

Method Detail

validate

public ValidationReport validate(InputStream is)
Validate XML data in inputstream.

Parameters:
is - XML input stream.
Returns:
Validation report containing all validation info.

validate

public ValidationReport validate(InputStream is,
                                 String grammarPath)
Validate XML data in inputstream.

Parameters:
is - XML input stream.
Returns:
Validation report containing all validation info.

validate

public ValidationReport validate(Reader reader)
Validate XML data from reader.

Parameters:
reader - XML input
Returns:
Validation report containing all validation info.

validate

public ValidationReport validate(Reader reader,
                                 String grammarPath)
Validate XML data from reader using specified grammar. grammar path null : search all documents starting in /db /db/doc/ : start search start in specified collection /db/doc/schema/schema.xsd :start with this schema, no search needed.

Parameters:
grammarPath - User supplied path to grammar.
reader - XML input.
Returns:
Validation report containing all validation info.


Copyright (C) Wolfgang Meier. All rights reserved.