org.codehaus.spice.configkit
Class ConfigValidator

java.lang.Object
  |
  +--org.codehaus.spice.configkit.ConfigValidator

public class ConfigValidator
extends Object

The ConfigValidator is responsible for validating an XML configuration source according to a specified Schema. The schema is defined when the validator is created. Note that the user should get a reference to the validator via the ConfigValidatorFactory.

Version:
$Revision: 1.1 $ $Date: 2003/12/03 03:19:28 $
Author:
Peter Donald

Method Summary
 ValidationResult validate(org.xml.sax.InputSource source)
          Validate InputSource according to shcema.
 ValidationResult validate(org.xml.sax.InputSource source, org.xml.sax.ContentHandler contentHandler)
          Validate InputSource according to shcema.
 void validate(org.xml.sax.InputSource source, org.xml.sax.ContentHandler contentHandler, org.xml.sax.ErrorHandler errorHandler)
          Validate InputSource according to shcema.
 void validate(org.xml.sax.InputSource source, org.xml.sax.ErrorHandler errorHandler)
          Validate InputSource according to shcema.
 ValidationResult validate(InputStream inputStream)
          Validate InputStream according to shcema.
 ValidationResult validate(InputStream inputStream, org.xml.sax.ContentHandler contentHandler)
          Validate InputStream according to shcema.
 void validate(InputStream inputStream, org.xml.sax.ContentHandler contentHandler, org.xml.sax.ErrorHandler errorHandler)
          Validate input stream according to shcema.
 void validate(InputStream inputStream, org.xml.sax.ErrorHandler errorHandler)
          Validate input stream according to shcema.
 ValidationResult validate(org.w3c.dom.Node node)
          Validate Node according to shcema.
 void validate(org.w3c.dom.Node node, org.xml.sax.ErrorHandler errorHandler)
          Validate Node according to shcema.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

validate

public void validate(InputStream inputStream,
                     org.xml.sax.ContentHandler contentHandler,
                     org.xml.sax.ErrorHandler errorHandler)
              throws ValidateException
Validate input stream according to shcema.

Parameters:
inputStream - the inputStream to validate
contentHandler - the handler to send to after validation
errorHandler - that will be passed any errors. May be null.
Throws:
ValidateException - if unable to validate the input

validate

public void validate(InputStream inputStream,
                     org.xml.sax.ErrorHandler errorHandler)
              throws ValidateException
Validate input stream according to shcema.

Parameters:
inputStream - the inputStream to validate
errorHandler - that will be passed any errors. May be null.
Throws:
ValidateException - if unable to validate the input

validate

public ValidationResult validate(InputStream inputStream)
Validate InputStream according to shcema.

Parameters:
inputStream - the inputStream to validate
Returns:
the ValidationResults

validate

public ValidationResult validate(InputStream inputStream,
                                 org.xml.sax.ContentHandler contentHandler)
Validate InputStream according to shcema.

Parameters:
inputStream - the inputStream to validate
contentHandler - the handler to send to after validation
Returns:
the ValidationResults

validate

public void validate(org.xml.sax.InputSource source,
                     org.xml.sax.ErrorHandler errorHandler)
              throws ValidateException
Validate InputSource according to shcema.

Parameters:
source - the InputSource to validate
errorHandler - that will be passed any errors. May be null.
Throws:
ValidateException - if unable to validate the input

validate

public void validate(org.xml.sax.InputSource source,
                     org.xml.sax.ContentHandler contentHandler,
                     org.xml.sax.ErrorHandler errorHandler)
              throws ValidateException
Validate InputSource according to shcema.

Parameters:
source - the InputSource to validate
contentHandler - the handler to send to after validation
errorHandler - that will be passed any errors. May be null.
Throws:
ValidateException - if unable to validate the input

validate

public ValidationResult validate(org.xml.sax.InputSource source)
Validate InputSource according to shcema.

Parameters:
source - the source to validate
Returns:
the ValidationResults

validate

public ValidationResult validate(org.xml.sax.InputSource source,
                                 org.xml.sax.ContentHandler contentHandler)
Validate InputSource according to shcema.

Parameters:
source - the source to validate
contentHandler - the handler to send to after validation
Returns:
the ValidationResults

validate

public void validate(org.w3c.dom.Node node,
                     org.xml.sax.ErrorHandler errorHandler)
              throws ValidateException
Validate Node according to shcema.

Parameters:
node - the node to validate
errorHandler - that will be passed any errors. May be null.
Throws:
ValidateException - if unable to validate the input

validate

public ValidationResult validate(org.w3c.dom.Node node)
Validate Node according to shcema.

Parameters:
node - the node to validate
Returns:
the ValidationResults


Copyright © 2003 Codehaus. All Rights Reserved.