|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.marc4j.marc.Directory
Directory
is a helper class to build a directory.
The directory is an index to the location of the variable fields within a record. The directory consists of entries. Each directory entry is 12 characters in length. The structure of each entry according to the MARC standard is as follows:
TAG LENGTH_OF_FIELD STARTING_CHARACTER_POSITION 00-02 03-06 07-11
This structure is returned by the marshal()
method.
The starting character position gives the starting position of the variable field to which the entry corresponds relative to the base address of data of the record. A starting character position or length of field of fewer than five digits is right justified and unused positions contain zero's.
Constructor Summary | |
Directory()
Default constructor. |
Method Summary | |
void |
add(String tag,
int length)
Adds a new entry to the directory. |
int |
getLength()
Returns the length of the serialized form of the directory. |
String |
marshal()
Returns a String representation for the directory
following the structure of the MARC directory. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Directory()
Default constructor.
Method Detail |
public void add(String tag, int length)
Adds a new entry to the directory.
tag
- the tag namelength
- the length of fieldpublic String marshal()
Returns a String
representation for the directory
following the structure of the MARC directory.
String
- the directorypublic int getLength()
Returns the length of the serialized form of the directory.
int
- the directory length
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |