org.marc4j.marc
Interface DataField

All Superinterfaces:
Comparable, Serializable, VariableField
All Known Implementing Classes:
DataFieldImpl

public interface DataField
extends VariableField

Represents a data field in a MARC record.

Version:
$Revision: 1.9 $
Author:
Bas Peters

Method Summary
 void addSubfield(int index, Subfield subfield)
          Inserts a Subfield at the specified position.
 void addSubfield(Subfield subfield)
          Adds a Subfield.
 char getIndicator1()
          Returns the first indicator
 char getIndicator2()
          Returns the second indicator
 Subfield getSubfield(char code)
          Returns the first Subfield with the given code.
 List getSubfields()
          Returns the list of Subfield objects.
 List getSubfields(char code)
          Returns the list of Subfield objects for the goven subfield code.
 void removeSubfield(Subfield subfield)
          Removes a Subfield.
 void setIndicator1(char ind1)
          Sets the first indicator.
 void setIndicator2(char ind2)
          Sets the second indicator.
 
Methods inherited from interface org.marc4j.marc.VariableField
find, getId, getTag, setId, setTag
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getIndicator1

char getIndicator1()
Returns the first indicator

Returns:
char - the first indicator

setIndicator1

void setIndicator1(char ind1)
Sets the first indicator.

Parameters:
ind1 - the first indicator

getIndicator2

char getIndicator2()
Returns the second indicator

Returns:
char - the second indicator

setIndicator2

void setIndicator2(char ind2)
Sets the second indicator.

Parameters:
ind2 - the second indicator

getSubfields

List getSubfields()
Returns the list of Subfield objects.

Returns:
List - the list of Subfield objects

getSubfields

List getSubfields(char code)
Returns the list of Subfield objects for the goven subfield code.

Parameters:
code - the subfield code
Returns:
List - the list of Subfield objects

getSubfield

Subfield getSubfield(char code)
Returns the first Subfield with the given code.

Parameters:
code - the subfield code
Returns:
Subfield - the subfield object or null if no subfield is found

addSubfield

void addSubfield(Subfield subfield)
Adds a Subfield.

Parameters:
subfield - the Subfield object
Throws:
IllegalAddException - when the parameter is not a Subfield instance

addSubfield

void addSubfield(int index,
                 Subfield subfield)
Inserts a Subfield at the specified position.

Parameters:
index - the position within the list
subfield - the Subfield object
Throws:
IllegalAddException - when the parameter is not a Subfield instance

removeSubfield

void removeSubfield(Subfield subfield)
Removes a Subfield.



Copyright © 2002-2006 Bas Peters. All Rights Reserved.