fedora.client.batch
Class BatchModifyValidator

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by fedora.client.batch.BatchModifyValidator
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class BatchModifyValidator
extends org.xml.sax.helpers.DefaultHandler

Title: BatchModifyValidator.java

Description: A class for parsing the xml modify directives in the Batch Modify input file. The parsing is configured to parse directives in the file sequentially. Logs are written for each successful and failed directive that is processed. Recoverable(non-fatal) errors are written to the log file and processing continues. Catastrophic errors will cause parsing to halt and set the count of failed directives to -1 indicating that parsing was halted prior to the end of the file. In this case the logs will contain all directives processed up to the point of failure.

Version:
$Id: BatchModifyValidator.java 3879 2005-04-13 19:16:38Z rlw $
Author:
rlw@virginia.edu

Constructor Summary
BatchModifyValidator(java.io.InputStream in, java.io.PrintStream out)
          Constructor allows this class to initiate the parsing.
 
Method Summary
 int getErrorCount()
           
 boolean isValid()
           
static void main(java.lang.String[] args)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BatchModifyValidator

public BatchModifyValidator(java.io.InputStream in,
                            java.io.PrintStream out)
                     throws java.lang.Exception

Constructor allows this class to initiate the parsing.

Parameters:
in - - An input stream containing the xml to be parsed.
out - - A print stream used for writing log info.
Throws:
java.lang.Exception - - If an error occurs in configuring the SAX parser.
Method Detail

isValid

public boolean isValid()

getErrorCount

public int getErrorCount()

main

public static void main(java.lang.String[] args)