| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.marc4j.marc.VariableField
org.marc4j.marc.ControlField
ControlField defines behaviour for a control
 field (tag 001-009).  
Control fields are variable fields identified by tags beginning with two zero's. They are comprised of data and a field terminator and do not contain indicators or subfield codes. The structure of a control field according to the MARC standard is as follows:
DATA_ELEMENT FIELD_TERMINATOR
This structure is returned by the marshal()
 method.
| Field Summary | 
| Fields inherited from class org.marc4j.marc.VariableField | 
| FT | 
| Constructor Summary | |
| ControlField()Default constructor. | |
| ControlField(String tag,
             char[] data)Creates a new control field instance and registers the tag and the control field data. | |
| ControlField(String tag,
             String data)Creates a new control field instance and registers the tag and the control field data. | |
| Method Summary | |
|  char[] | getData()Returns the control field data. | 
|  int | getLength()Returns the length of the serialized form of the control field. | 
|  String | getTag()Returns the tag name. | 
|  String | marshal()Returns a Stringrepresentation for a control
 field following the structure of a MARC control field. | 
|  void | setData(char[] data)Registers the control field data. | 
|  void | setData(String data)Registers the control field data. | 
|  void | setTag(String tag)Registers the tag. | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
public ControlField()
Default constructor.
public ControlField(String tag,
                    char[] data)
Creates a new control field instance and registers the tag and the control field data.
tag - the tag namedata - the control field data
public ControlField(String tag,
                    String data)
Creates a new control field instance and registers the tag and the control field data.
tag - the tag namedata - the control field data| Method Detail | 
public void setTag(String tag)
Registers the tag.
setTag in class VariableFieldtag - the tag name
IllegalTagException - when the tag is not a valid
                                     control field identifierpublic String getTag()
Returns the tag name.
getTag in class VariableFieldString - the tag namepublic void setData(char[] data)
Registers the control field data.
data - the control field datapublic void setData(String data)
Registers the control field data.
data - the control field datapublic char[] getData()
Returns the control field data.
char[] - control field as a
                               character arraypublic String marshal()
Returns a String representation for a control
 field following the structure of a MARC control field.
String - control fieldpublic int getLength()
Returns the length of the serialized form of the control field.
int - length of control field| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||