DefaultHandler (marc4j)
Keywords: org.marc4j.helpers.DefaultHandler class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.marc4j.helpers
Class DefaultHandler

    java.lang.Object
      org.marc4j.helpers.DefaultHandler

All Implemented Interfaces:
  ErrorHandler, MarcHandler

public class DefaultHandler
extends Object
implements MarcHandler, ErrorHandler

Provides default implementations for the callbacks in the `MarcHandler` and `ErrorHandler` interface.

Application writers can extend this class when they need to implement only part of an interface.

Version:
  $Revision: 1.4 $
Author:
  Bas Peters
See Also:
  `MarcHandler`, `ErrorHandler`

Constructor Summary
`DefaultHandler()`

Method Summary
`void` | `controlField(String tag, char[] data)` Receives notification of a control field.
`void` | `endCollection()` Receives notification at the end of the collection.
`void` | `endDataField(String tag)` Receives notification at the end of each data field
`void` | `endRecord()` Receives notification at the end of each record.
`void` | `error(MarcReaderException exception)` Receive notification of an error.
`void` | `fatalError(MarcReaderException exception)` Receive notification of a fatal error.
`void` | `startCollection()` Receives notification at the start of the collection.
`void` | `startDataField(String tag, char ind1, char ind2)` Receives notification at the start of each data field.
`void` | `startRecord(Leader leader)` Receives notification at the start of each record.
`void` | `subfield(char identifier, char[] data)` Receives notification of a data element (subfield).
`void` | `warning(MarcReaderException exception)` Receive notification of a warning.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DefaultHandler

    public DefaultHandler()

Method Detail

### startCollection

    public void startCollection()

  Description copied from interface: `MarcHandler`

  Receives notification at the start of the collection.

  Specified by:
    `startCollection` in interface `MarcHandler`

### endCollection

    public void endCollection()

  Description copied from interface: `MarcHandler`

  Receives notification at the end of the collection.

  Specified by:
    `endCollection` in interface `MarcHandler`

### startRecord

    public void startRecord(Leader leader)

  Description copied from interface: `MarcHandler`

  Receives notification at the start of each record.

  Specified by:
    `startRecord` in interface `MarcHandler`
  Parameters:
    `leader` - the `Leader` object containing the record label

### endRecord

    public void endRecord()

  Description copied from interface: `MarcHandler`

  Receives notification at the end of each record.

  Specified by:
    `endRecord` in interface `MarcHandler`

### controlField

    public void controlField(String tag,
                             char[] data)

  Description copied from interface: `MarcHandler`

  Receives notification of a control field.

  Specified by:
    `controlField` in interface `MarcHandler`
  Parameters:
    `tag` - the tag name
    `data` - the control field data

### startDataField

    public void startDataField(String tag,
                               char ind1,
                               char ind2)

  Description copied from interface: `MarcHandler`

  Receives notification at the start of each data field.

  Specified by:
    `startDataField` in interface `MarcHandler`
  Parameters:
    `tag` - the tag name
    `ind1` - the first indicator value
    `ind2` - the second indicator value

### endDataField

    public void endDataField(String tag)

  Description copied from interface: `MarcHandler`

  Receives notification at the end of each data field

  Specified by:
    `endDataField` in interface `MarcHandler`
  Parameters:
    `tag` - the tag name

### subfield

    public void subfield(char identifier,
                         char[] data)

  Description copied from interface: `MarcHandler`

  Receives notification of a data element (subfield).

  Specified by:
    `subfield` in interface `MarcHandler`
  Parameters:
    `identifier` - the data element identifier
    `data` - the data element

### warning

    public void warning(MarcReaderException exception)

  Description copied from interface: `ErrorHandler`

  Receive notification of a warning.

  Specified by:
    `warning` in interface `ErrorHandler`

### error

    public void error(MarcReaderException exception)

  Description copied from interface: `ErrorHandler`

  Receive notification of an error.

  Specified by:
    `error` in interface `ErrorHandler`

### fatalError

    public void fatalError(MarcReaderException exception)

  Description copied from interface: `ErrorHandler`

  Receive notification of a fatal error.

  Specified by:
    `fatalError` in interface `ErrorHandler`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2004 Bas Peters. All Rights Reserved.