Open SiteSearch 4.1.1
Final

ORG.oclc.z39
Class MarcDecoder

java.lang.Object
  |
  +--ORG.oclc.z39.MarcDecoder

public class MarcDecoder
extends Object

MarcDecoder allows ZBase to decode Marc records.


Constructor Summary
MarcDecoder(InputStream in)
          Constructs a MarcDecoder object using the input InputStream Object.
MarcDecoder(String data)
          Initializes an object so that individual Marc field 000 and Marc field 008 elements may be picked out of a String containing the entire field.
 
Method Summary
 char bibliographicLevel()
           
 char byteBeforeDate1()
           
 char catalogingSourceCode()
           
 char[] date1()
           
 char[] date2()
           
 char[] dateRecordEntered()
           
 char encodingLevel()
           
static String formatmarc(String begrec, int linelen)
          Method to format a marc record into something suitable for display.
 char[] languageIndex()
           
static boolean marc2dir(String begrec, DataDir dir, boolean frequencyEncode)
          Method to format a marc record into BER.
 char modifiedRecordIndicator()
           
 byte[] record()
          Returns a byte array object representation of the input data.
 char recordStatus()
           
 char recordType()
           
 String stringData()
          Returns a string representation of the input data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarcDecoder

public MarcDecoder(String data)
Initializes an object so that individual Marc field 000 and Marc field 008 elements may be picked out of a String containing the entire field.
Parameters:
data - String containing data for the Marc field.

MarcDecoder

public MarcDecoder(InputStream in)
            throws FileNotFoundException,
                   IOException,
                   EOFException
Constructs a MarcDecoder object using the input InputStream Object.
Parameters:
in - InputStream
Method Detail

record

public byte[] record()
Returns a byte array object representation of the input data.

stringData

public String stringData()
Returns a string representation of the input data.

recordStatus

public final char recordStatus()
Returns:
recordStatus char

recordType

public final char recordType()
Returns:
recordType char

bibliographicLevel

public final char bibliographicLevel()
Returns:
bibliographicLevel char

encodingLevel

public final char encodingLevel()
Returns:
encodingLevel char

dateRecordEntered

public final char[] dateRecordEntered()
Returns:
char[] containing dateRecordEntered

byteBeforeDate1

public final char byteBeforeDate1()
Returns:
byteBeforeDate1 char

date1

public final char[] date1()
Returns:
char[] containing date1

date2

public final char[] date2()
Returns:
char[] containing date2

languageIndex

public final char[] languageIndex()
Returns:
char[] containing languageIndex

modifiedRecordIndicator

public final char modifiedRecordIndicator()
Returns:
modifiedRecordIndicator char

catalogingSourceCode

public final char catalogingSourceCode()
Returns:
catalogingSourceCode char

formatmarc

public static final String formatmarc(String begrec,
                                      int linelen)
Method to format a marc record into something suitable for display.
Parameters:
begrec - Marc record.
linelen - Desired length of formatted lines.
Returns:
String containing formatted record.

marc2dir

public static boolean marc2dir(String begrec,
                               DataDir dir,
                               boolean frequencyEncode)
Method to format a marc record into BER. This allows overcite to be used for displaying marc records.
Parameters:
begrec - Marc record.
dir - parent node of DataDir to hold BER record.
frequencyEncode - flag to turn on frequency encoding of marc tags.
Returns:
true if record was converted, false if errors occurred.

Open SiteSearch 4.1.1
Final