org.marc4j.helpers
Class RecordBuilder
java.lang.Object
org.marc4j.helpers.RecordBuilder
- All Implemented Interfaces:
- MarcHandler
- public class RecordBuilder
- extends Object
- implements MarcHandler
Creates record objects from MarcHandler events and reports
events to the RecordHandler.
- Version:
- $Revision: 1.4 $
- Author:
- Bas Peters
- See Also:
RecordHandler
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RecordBuilder
public RecordBuilder()
setRecordHandler
public void setRecordHandler(RecordHandler recordHandler)
Registers the RecordHandler object.
- Parameters:
recordHandler - the record handler object
startCollection
public void startCollection()
Reports the start of the file.
- Specified by:
startCollection in interface MarcHandler
startRecord
public void startRecord(Leader leader)
Creates a new record object.
- Specified by:
startRecord in interface MarcHandler
- Parameters:
leader - the Leader object containing the record label
controlField
public void controlField(String tag,
char[] data)
Adds a control field to the record object.
- Specified by:
controlField in interface MarcHandler
- Parameters:
tag - the tag namedata - the control field data
startDataField
public void startDataField(String tag,
char ind1,
char ind2)
Creates a new data field object.
- Specified by:
startDataField in interface MarcHandler
- Parameters:
tag - the tag nameind1 - the first indicator valueind2 - the second indicator value
subfield
public void subfield(char identifier,
char[] data)
Adds a subfield to the data field.
- Specified by:
subfield in interface MarcHandler
- Parameters:
identifier - the data element identifierdata - the data element
endDataField
public void endDataField(String tag)
Adds a data field to the record object.
- Specified by:
endDataField in interface MarcHandler
- Parameters:
tag - the tag name
endRecord
public void endRecord()
Reports the end of a record and sets the record object.
- Specified by:
endRecord in interface MarcHandler
endCollection
public void endCollection()
Reports the end of the file.
- Specified by:
endCollection in interface MarcHandler
Copyright © 2001-2004 Bas Peters. All Rights Reserved.