|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.marc4j.marc.Leader
Leader
defines behaviour for the record label
(record position 00-23).
The leader is a fixed field that occurs at the beginning of a MARC record and provides information for the processing of the record. The structure of the leader according to the MARC standard is as follows:
RECORD_LENGTH RECORD_STATUS TYPE_OF_RECORD IMPLEMENTATION-DEFINED 00-04 05 06 07-08 CHARACTER_CODING_SCHEME INDICATOR_COUNT SUBFIELD_CODE_LENGTH 09 10 11 BASE_ADDRESS_OF_DATA IMPLEMENTATION-DEFINED ENTRY_MAP 12-16 17-19 20-23
This structure is returned by the marshal()
method.
Constructor Summary | |
Leader()
|
|
Leader(String ldr)
|
Method Summary | |
int |
getBaseAddressOfData()
Returns the base address of data (positions 12-16). |
char |
getCharCodingScheme()
Returns the character coding scheme (position 09). |
char[] |
getEntryMap()
Returns the entry map (positions 20-23). |
char[] |
getImplDefined1()
Returns implementation defined values (positions 07-08). |
char[] |
getImplDefined2()
Returns implementation defined values (positions 17-19). |
int |
getIndicatorCount()
Returns the indicator count (positions 10). |
int |
getRecordLength()
Returns the logical record length (positions 00-04). |
char |
getRecordStatus()
Returns the record status (positions 05). |
int |
getSubfieldCodeLength()
Returns the subfield code length (position 11). |
char |
getTypeOfRecord()
Returns the record type (position 06). |
String |
marshal()
Returns a String representation of the record label following the MARC structure. |
void |
setBaseAddressOfData(int baseAddressOfData)
Registers the base address of data (positions 12-16). |
void |
setCharCodingScheme(char charCodingScheme)
Registers the character encoding scheme (position 09). |
void |
setEntryMap(char[] entryMap)
Registers the entry map (positions 20-23). |
void |
setImplDefined1(char[] implDefined1)
Registers implementation defined values (position 07-08). |
void |
setImplDefined2(char[] implDefined2)
Registers implementation defined values (positions 17-19). |
void |
setIndicatorCount(int indicatorCount)
Registers the indicator count (position 10). |
void |
setRecordLength(int recordLength)
Registers the logical record length (positions 00-04). |
void |
setRecordStatus(char recordStatus)
Registers the record status (position 05). |
void |
setSubfieldCodeLength(int subfieldCodeLength)
Registers the subfield code length (position 11). |
void |
setTypeOfRecord(char typeOfRecord)
Registers the type of record (position 06). |
void |
unmarshal(String ldr)
Creates a leader object from a string object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Leader()
public Leader(String ldr) throws MarcException
Method Detail |
public void setRecordLength(int recordLength)
Registers the logical record length (positions 00-04).
recordLength
- integer representing the
record lengthpublic void setRecordStatus(char recordStatus)
Registers the record status (position 05).
recordStatus
- character representing the
record statuspublic void setTypeOfRecord(char typeOfRecord)
Registers the type of record (position 06).
typeOfRecord
- character representing the
type of recordpublic void setImplDefined1(char[] implDefined1)
Registers implementation defined values (position 07-08).
implDefined1
- character array representing the
implementation defined datapublic void setCharCodingScheme(char charCodingScheme)
Registers the character encoding scheme (position 09).
charCodingScheme
- character representing the
character encodingpublic void setIndicatorCount(int indicatorCount)
Registers the indicator count (position 10).
indicatorCount
- integer representing the
number of indicators present
in a data fieldpublic void setSubfieldCodeLength(int subfieldCodeLength)
Registers the subfield code length (position 11).
subfieldCodeLength
- integer representing the
subfield code lengthpublic void setBaseAddressOfData(int baseAddressOfData)
Registers the base address of data (positions 12-16).
baseAddressOfData
- integer representing the
base address of datapublic void setImplDefined2(char[] implDefined2)
Registers implementation defined values (positions 17-19).
implDefined2
- character array representing the
implementation defined datapublic void setEntryMap(char[] entryMap)
Registers the entry map (positions 20-23).
entryMap
- character array representing the
entry mappublic int getRecordLength()
Returns the logical record length (positions 00-04).
int
- the record lengthpublic char getRecordStatus()
Returns the record status (positions 05).
char
- the record statuspublic char getTypeOfRecord()
Returns the record type (position 06).
char
- the record typepublic char[] getImplDefined1()
Returns implementation defined values (positions 07-08).
char[]
- implementation defined valuespublic char getCharCodingScheme()
Returns the character coding scheme (position 09).
char
- the character coding schemepublic int getIndicatorCount()
Returns the indicator count (positions 10).
int
- the indicator countpublic int getSubfieldCodeLength()
Returns the subfield code length (position 11).
int
- the subfield code lengthpublic int getBaseAddressOfData()
Returns the base address of data (positions 12-16).
int
- the base address of datapublic char[] getImplDefined2()
Returns implementation defined values (positions 17-19).
char
- implementation defined valuespublic char[] getEntryMap()
Returns the entry map (positions 20-23).
char[]
- the entry mappublic void unmarshal(String ldr) throws MarcException
Creates a leader object from a string object.
Indicator count and subfield code length are defaulted to 2 if they are not integer values.
ldr
- the leader
MarcException
public String marshal()
Returns a String representation of the record label following the MARC structure.
String
- the record label
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |