edu.ucsb.adl.reports
Class BucketReport

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

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

Parses and represents ADL bucket reports.

Version:
$Header: /export/home/gjanee/utils/reports/edu/ucsb/adl/reports/RCS/BucketReport.java,v 1.1 2007/02/19 23:47:42 gjanee Exp $

$Log: BucketReport.java,v $ Revision 1.1 2007/02/19 23:47:42 gjanee Initial revision

Author:
Greg Janée
Alexandria Digital Library

Nested Class Summary
static class BucketReport.BoxSpatialValue
          A box spatial value.
static class BucketReport.DateTemporalValue
          A date temporal value.
static class BucketReport.Field
          Identifies a source metadata field.
static class BucketReport.HierarchicalValue
          A hierarchical bucket value, i.e., a vocabulary term.
static class BucketReport.IdentificationValue
          An identification bucket value, i.e., an identifier drawn from a namespace.
static class BucketReport.NumericValue
          A numeric bucket value.
static class BucketReport.PointSpatialValue
          A point spatial value.
static class BucketReport.PolygonSpatialValue
          A polygon spatial value.
static class BucketReport.PolylineSpatialValue
          A polyline spatial value.
static class BucketReport.RangeTemporalValue
          A range temporal value.
static class BucketReport.RelationalValue
          A relational bucket value.
static class BucketReport.SpatialValue
          A spatial bucket value, i.e., a geographic region.
static class BucketReport.TemporalValue
          A temporal bucket value, i.e., a date or date range.
static class BucketReport.TextualValue
          A textual bucket value.
static class BucketReport.Value
          Abstract base class for bucket values.
static class BucketReport.Vertex
          A polygon or polyline vertex.
 
Field Summary
 java.util.Hashtable buckets
          The item's bucket mappings.
 java.lang.String identifier
          The item's ADL identifier, e.g., "adl_catalog:1001652".
 
Constructor Summary
BucketReport(java.io.Reader reader)
          Creates a BucketReport.
 
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)
           
 void startElement(int elementCode, java.lang.String[] attributes)
          For use by ValidatingXmlParser only.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

identifier

public java.lang.String identifier
The item's ADL identifier, e.g., "adl_catalog:1001652".


buckets

public java.util.Hashtable buckets
The item's bucket mappings. The hashtable maps bucket names (e.g., "adl:titles") to arrays of Values.

Constructor Detail

BucketReport

public BucketReport(java.io.Reader reader)
             throws XmlException
Creates a BucketReport.

Parameters:
reader - The source of the bucket report.
Throws:
XmlException - If any error is encountered.
Method Detail

startElement

public void startElement(int elementCode,
                         java.lang.String[] attributes)
                  throws XmlException
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.
Throws:
XmlException - If any error occurs.

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,
                        java.lang.IllegalAccessException
java.io.IOException
XmlException
java.lang.IllegalAccessException