edu.ucsb.adl.reports
Class AccessReportValidator

java.lang.Object
  |
  +--edu.ucsb.adl.reports.AccessReportValidator
All Implemented Interfaces:
XmlHandler

public final class AccessReportValidator
extends java.lang.Object
implements XmlHandler

Validates ADL access reports.

Version:
$Header: /export/home/gjanee/utils/reports/edu/ucsb/adl/reports/RCS/AccessReportValidator.java,v 1.1 2003/03/18 17:46:20 gjanee Exp $

$Log: AccessReportValidator.java,v $ Revision 1.1 2003/03/18 17:46:20 gjanee Initial revision

Author:
Greg Janée
Alexandria Digital Library

Constructor Summary
AccessReportValidator()
          Creates an AccessReportValidator.
 
Method Summary
 void characters(char[] string, int start, int length)
          For use by ValidatingXmlParser only.
 void endElement(int elementCode)
          For use by ValidatingXmlParser only.
static void main(java.lang.String[] args)
          Test driver.
 void startElement(int elementCode, java.lang.String[] attributes)
          For use by ValidatingXmlParser only.
 void validate(java.io.Reader reader)
          Validates an ADL access report.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccessReportValidator

public AccessReportValidator()
Creates an AccessReportValidator. The validator may be invoked multiple times, but is not multithread-safe.

Method Detail

validate

public void validate(java.io.Reader reader)
              throws XmlException
Validates an ADL access report. This method is not multithread-safe.

Parameters:
reader - The primary source of the access report.
Throws:
XmlException - If a validation error occurs.

startElement

public void startElement(int elementCode,
                         java.lang.String[] attributes)
For use by ValidatingXmlParser only.

Specified by:
startElement in interface XmlHandler
Parameters:
elementCode - The element's code.
attributes - Element attribute values, indexed by attribute code. All of the element's declared attributes are represented in the array; attributes for which a value is specified in the document or for which there is a DTD-specified default have non-null values. The handler should reference the array for the duration of the call only, as it is reused by the parser. Also, the array may be longer than necessary.

endElement

public void endElement(int elementCode)
                throws XmlException
For use by ValidatingXmlParser only.

Specified by:
endElement in interface XmlHandler
Parameters:
elementCode - The element's code.
Throws:
XmlException - If any error occurs.

characters

public void characters(char[] string,
                       int start,
                       int length)
For use by ValidatingXmlParser only.

Specified by:
characters in interface XmlHandler
Parameters:
string - The textual content.
start - The index in string at which the textual content starts.
length - The length of the content.

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException,
                        XmlException
Test driver.

java.io.IOException
XmlException