edu.vt.marian.Document
Class MarcVarField

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

public class MarcVarField
extends java.lang.Object

class name: MarcVarField class description: this class represnets a variable field in us marc record, user can assume a variable field is composed of an integer id, a string indicator and a number of subfields

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
MarcVarField(int id, java.lang.String data, edu.vt.marian.common.Debug debug)
          method description: this constructor will create a MarcVarField object from the parameters id and data uses the services of class(es): input parameter(s): id --- this will be the id of this object data -- this string contains the indicator and all the subfields the format is specified in US MARC debug -- used for debugging output parameter(s): none return value: none
 
Method Summary
 java.lang.String concat_subfields(java.lang.String labels, java.lang.String delimiter)
          method description: this method will concat the subfields with one of the specified labels in this object with the specified delimiter uses the services of class(es): input parameter(s): labels -- subfields with one of these labels will be concated delimiter -- used to concat subfields output parameter(s): none return value: a string which is the concatation of the subfields with one of the specified labels, the seperator is the specified delimiter if labels or delimiter is not valid null will be returned a MarcSubField object or null if the index is not invalid
 int get_id()
          method description: this will return the id of this object uses the services of class(es): input parameter(s): none output parameter(s): none return value: the id of this object as an integer
 java.lang.String get_indicator()
          method description: this will return the indicator of this object uses the services of class(es): input parameter(s): none output parameter(s): none return value: the indicator of this object as a string
 int get_number_subfields()
          method description: this method will return the number of subfields in this object uses the services of class(es): input parameter(s): none output parameter(s): none return value: the number of subfields in this object as an integer
 MarcSubField get_subfield_by_index(int index)
          method description: this will method return the indexth subfield of this object uses the services of class(es): input parameter(s): index -- used to search the subfields vector output parameter(s): none return value: a MarcSubField object or null if the index is not invalid
 java.util.Vector get_subfields_by_label(char label)
          method description: this method will return all the subfields in this object with the specified label uses the services of class(es): input parameter(s): label -- used to search the subfields vector output parameter(s): none return value: a vector contains all the subfields in this object which has the specified label
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarcVarField

public MarcVarField(int id,
                    java.lang.String data,
                    edu.vt.marian.common.Debug debug)
method description: this constructor will create a MarcVarField object from the parameters id and data

uses the services of class(es): input parameter(s): id --- this will be the id of this object data -- this string contains the indicator and all the subfields the format is specified in US MARC debug -- used for debugging output parameter(s): none return value: none

Method Detail

get_id

public int get_id()
method description: this will return the id of this object

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


get_number_subfields

public int get_number_subfields()
method description: this method will return the number of subfields in this object

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


get_subfield_by_index

public MarcSubField get_subfield_by_index(int index)
method description: this will method return the indexth subfield of this object

uses the services of class(es): input parameter(s): index -- used to search the subfields vector output parameter(s): none return value: a MarcSubField object or null if the index is not invalid


get_subfields_by_label

public java.util.Vector get_subfields_by_label(char label)
method description: this method will return all the subfields in this object with the specified label

uses the services of class(es): input parameter(s): label -- used to search the subfields vector output parameter(s): none return value: a vector contains all the subfields in this object which has the specified label


concat_subfields

public java.lang.String concat_subfields(java.lang.String labels,
                                         java.lang.String delimiter)
method description: this method will concat the subfields with one of the specified labels in this object with the specified delimiter

uses the services of class(es): input parameter(s): labels -- subfields with one of these labels will be concated delimiter -- used to concat subfields output parameter(s): none return value: a string which is the concatation of the subfields with one of the specified labels, the seperator is the specified delimiter if labels or delimiter is not valid null will be returned a MarcSubField object or null if the index is not invalid


get_indicator

public java.lang.String get_indicator()
method description: this will return the indicator of this object

uses the services of class(es): input parameter(s): none output parameter(s): none return value: the indicator of this object as a string