de.rowa.posps.client.connection
Class ValidationResult

java.lang.Object
  extended by de.rowa.posps.client.connection.ValidationResult
All Implemented Interfaces:
org.xml.sax.ErrorHandler

public class ValidationResult
extends java.lang.Object
implements org.xml.sax.ErrorHandler

Container for the messages which are generated during the validation of an XML document. To use this class, set an instance as error handler on a Validator (usually obtained from Schema.newValidator(). After the validation of a document, the generated information can be read from the instance.

Author:
Michael Koch

Constructor Summary
ValidationResult()
           
 
Method Summary
 void error(org.xml.sax.SAXParseException exception)
           
 void fatalError(org.xml.sax.SAXParseException exception)
           
 java.util.List<ValidationMessage> getMessages()
           
 boolean getValid()
          Returns if the document which was checked is valid.
 void warning(org.xml.sax.SAXParseException exception)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidationResult

public ValidationResult()
Method Detail

getValid

public boolean getValid()
Returns if the document which was checked is valid. It is valid if no errors and fatal errors were seen. Warnings are ignored.

Returns:
true if the validated document is valid.

error

public void error(org.xml.sax.SAXParseException exception)
           throws org.xml.sax.SAXException
Specified by:
error in interface org.xml.sax.ErrorHandler
Throws:
org.xml.sax.SAXException

fatalError

public void fatalError(org.xml.sax.SAXParseException exception)
                throws org.xml.sax.SAXException
Specified by:
fatalError in interface org.xml.sax.ErrorHandler
Throws:
org.xml.sax.SAXException

warning

public void warning(org.xml.sax.SAXParseException exception)
             throws org.xml.sax.SAXException
Specified by:
warning in interface org.xml.sax.ErrorHandler
Throws:
org.xml.sax.SAXException

getMessages

public java.util.List<ValidationMessage> getMessages()


Copyright © 2007-2016 Becton Dickinson. All Rights Reserved.