org.fcrepo.client.batch
Class BatchModifyValidator
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.fcrepo.client.batch.BatchModifyValidator
- All Implemented Interfaces:
- ContentHandler, DTDHandler, EntityResolver, ErrorHandler
public class BatchModifyValidator
- extends DefaultHandler
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.
- Author:
- Ross Wayland
| 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 |
BatchModifyValidator
public BatchModifyValidator(InputStream in,
PrintStream out)
throws 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:
Exception - If an error occurs in configuring the SAX parser.
isValid
public boolean isValid()
getErrorCount
public int getErrorCount()
main
public static void main(String[] args)
Copyright © 2012 DuraSpace. All Rights Reserved.