edu.vt.marian.Document
Class MarcRecord

java.lang.Object
  |
  +--edu.vt.marian.Document.MarcRecord

public class MarcRecord
extends java.lang.Object

class name: MarcRecord class description: this class represnets a us marc record, user can assume a us marc record is composed of a number of fixed fields and a number of variabel fields and a header which is a string

uses the services of class(es): designer(s): Jianxin Zhao (jxzhao@csgrad.cs.vt.edu) implementator(s): Jianxin(Jason) Zhao (jxzhao@csgrad.cs.vt.edu) finished time: known bugs: JDK version: 1.1.5 side effects:


Constructor Summary
MarcRecord(java.lang.String raw_marc_record, edu.vt.marian.common.Debug debug)
          method description: this constructor will create a MarcRecord object from the parameters raw_marc_record uses the services of class(es): input parameter(s): raw_marc_record --- this string contains all the information about a us marc record, the format of the string is specified by US MARC debug -- used for debugging output parameter(s): none return value: none
 
Method Summary
 char get_char_from_header(int index)
          method description: this method will return the indexth char in the header of this object uses the services of class(es): input parameter(s): index -- specifies with char to return in the header output parameter(s): none return value: a char not '\0' -- the indexth char in the header '\0' -- the index is not valid
 MarcFixField get_fix_field_by_id(int id)
          method description: this method will return the fixed field of this object with the specified id uses the services of class(es): input parameter(s): id -- the fixed field with this id will be returned output parameter(s): none return value: a MarcFixField -- the fixed field in this object with the specified id null -- the id is invalid or there is no such fixed field in this object with the specified id
 MarcFixField get_fix_field_by_index(int index)
          method description: this method will return the indexth fixed field of this object uses the services of class(es): input parameter(s): index -- this will be used to search the fixed fields output parameter(s): none return value: the fixed field at the specified index or null if the index is not valid
 int get_number_fix_fields()
          method description: this will return the number of fixed fields contained in this object uses the services of class(es): input parameter(s): none output parameter(s): none return value: the number of the fixed fields of this object as an integer
 int get_number_var_fields()
          method description: this will return the number of variable fields contained in this object uses the services of class(es): input parameter(s): none output parameter(s): none return value: the number of the variable fields of this object as an integer
 MarcVarField get_var_field_by_index(int index)
          method description: this method will return the indexth variable field of this object uses the services of class(es): input parameter(s): index -- this will be used to search the variable fields output parameter(s): none return value: the variable field at the specified index or null if the index is not valid
 java.util.Vector get_var_fields_by_id(int id)
          method description: this method will return all the variable fields of this object with the specified id uses the services of class(es): input parameter(s): id -- all the variable fields with this id will be returned output parameter(s): none return value: a vector -- contains all the variable fields found with the same id null -- the id is not valid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarcRecord

public MarcRecord(java.lang.String raw_marc_record,
                  edu.vt.marian.common.Debug debug)
method description: this constructor will create a MarcRecord object from the parameters raw_marc_record

uses the services of class(es): input parameter(s): raw_marc_record --- this string contains all the information about a us marc record, the format of the string is specified by US MARC debug -- used for debugging output parameter(s): none return value: none

Method Detail

get_number_fix_fields

public int get_number_fix_fields()
method description: this will return the number of fixed fields contained in this object

uses the services of class(es): input parameter(s): none output parameter(s): none return value: the number of the fixed fields of this object as an integer


get_number_var_fields

public int get_number_var_fields()
method description: this will return the number of variable fields contained in this object

uses the services of class(es): input parameter(s): none output parameter(s): none return value: the number of the variable fields of this object as an integer


get_fix_field_by_id

public MarcFixField get_fix_field_by_id(int id)
method description: this method will return the fixed field of this object with the specified id

uses the services of class(es): input parameter(s): id -- the fixed field with this id will be returned output parameter(s): none return value: a MarcFixField -- the fixed field in this object with the specified id null -- the id is invalid or there is no such fixed field in this object with the specified id


get_var_fields_by_id

public java.util.Vector get_var_fields_by_id(int id)
method description: this method will return all the variable fields of this object with the specified id

uses the services of class(es): input parameter(s): id -- all the variable fields with this id will be returned output parameter(s): none return value: a vector -- contains all the variable fields found with the same id null -- the id is not valid


get_fix_field_by_index

public MarcFixField get_fix_field_by_index(int index)
method description: this method will return the indexth fixed field of this object

uses the services of class(es): input parameter(s): index -- this will be used to search the fixed fields output parameter(s): none return value: the fixed field at the specified index or null if the index is not valid


get_var_field_by_index

public MarcVarField get_var_field_by_index(int index)
method description: this method will return the indexth variable field of this object

uses the services of class(es): input parameter(s): index -- this will be used to search the variable fields output parameter(s): none return value: the variable field at the specified index or null if the index is not valid


get_char_from_header

public char get_char_from_header(int index)
method description: this method will return the indexth char in the header of this object

uses the services of class(es): input parameter(s): index -- specifies with char to return in the header output parameter(s): none return value: a char not '\0' -- the indexth char in the header '\0' -- the index is not valid