1 //$Id: Leader.java,v 1.15 2006/08/04 12:27:36 bpeters Exp $
\r
3 * Copyright (C) 2004 Bas Peters
\r
5 * This file is part of MARC4J
\r
7 * MARC4J is free software; you can redistribute it and/or
\r
8 * modify it under the terms of the GNU Lesser General Public
\r
9 * License as published by the Free Software Foundation; either
\r
10 * version 2.1 of the License, or (at your option) any later version.
\r
12 * MARC4J is distributed in the hope that it will be useful,
\r
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
\r
15 * Lesser General Public License for more details.
\r
17 * You should have received a copy of the GNU Lesser General Public
\r
18 * License along with MARC4J; if not, write to the Free Software
\r
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
\r
21 package org.marc4j.marc;
\r
23 import java.io.Serializable;
\r
26 * Represents a record label in a MARC record.
\r
28 * @author Bas Peters
\r
29 * @version $Revision: 1.15 $
\r
32 public interface Leader extends Serializable {
\r
35 * Sets the identifier.
\r
38 * The purpose of this identifier is to provide an identifier for
\r
44 public void setId(Long id);
\r
47 * Returns the identifier.
\r
49 * @return Long - the identifier
\r
51 public Long getId();
\r
54 * Sets the logical record length (positions 00-04).
\r
56 * @param recordLength
\r
57 * integer representing the record length
\r
59 public void setRecordLength(int recordLength);
\r
62 * Sets the record status (position 05).
\r
64 * @param recordStatus
\r
65 * character representing the record status
\r
67 public void setRecordStatus(char recordStatus);
\r
70 * Sets the type of record (position 06).
\r
72 * @param typeOfRecord
\r
73 * character representing the type of record
\r
75 public void setTypeOfRecord(char typeOfRecord);
\r
78 * Sets implementation defined values (position 07-08).
\r
80 * @param implDefined1
\r
81 * character array representing the implementation defined data
\r
83 public void setImplDefined1(char[] implDefined1);
\r
86 * Sets the character encoding scheme (position 09).
\r
88 * @param charCodingScheme
\r
89 * character representing the character encoding
\r
91 public void setCharCodingScheme(char charCodingScheme);
\r
94 * Sets the indicator count (position 10).
\r
96 * @param indicatorCount
\r
97 * integer representing the number of indicators present in a
\r
100 public void setIndicatorCount(int indicatorCount);
\r
103 * Sets the subfield code length (position 11).
\r
105 * @param subfieldCodeLength
\r
106 * integer representing the subfield code length
\r
108 public void setSubfieldCodeLength(int subfieldCodeLength);
\r
111 * Sets the base address of data (positions 12-16).
\r
113 * @param baseAddressOfData
\r
114 * integer representing the base address of data
\r
116 public void setBaseAddressOfData(int baseAddressOfData);
\r
119 * Sets implementation defined values (positions 17-19).
\r
121 * @param implDefined2
\r
122 * character array representing the implementation defined data
\r
124 public void setImplDefined2(char[] implDefined2);
\r
127 * Sets the entry map (positions 20-23).
\r
130 * character array representing the entry map
\r
132 public void setEntryMap(char[] entryMap);
\r
135 * Returns the logical record length (positions 00-04).
\r
137 * @return <code>int</code>- the record length
\r
139 public int getRecordLength();
\r
142 * Returns the record status (positions 05).
\r
144 * @return <code>char</code>- the record status
\r
146 public char getRecordStatus();
\r
149 * Returns the record type (position 06).
\r
151 * @return <code>char</code>- the record type
\r
153 public char getTypeOfRecord();
\r
156 * Returns implementation defined values (positions 07-08).
\r
158 * @return <code>char[]</code>- implementation defined values
\r
160 public char[] getImplDefined1();
\r
163 * Returns the character coding scheme (position 09).
\r
165 * @return <code>char</code>- the character coding scheme
\r
167 public char getCharCodingScheme();
\r
170 * Returns the indicator count (positions 10).
\r
172 * @return <code>int</code>- the indicator count
\r
174 public int getIndicatorCount();
\r
177 * Returns the subfield code length (position 11).
\r
179 * @return <code>int</code>- the subfield code length
\r
181 public int getSubfieldCodeLength();
\r
184 * Returns the base address of data (positions 12-16).
\r
186 * @return <code>int</code>- the base address of data
\r
188 public int getBaseAddressOfData();
\r
191 * Returns implementation defined values (positions 17-19).
\r
193 * @return <code>char[]</code>- implementation defined values
\r
195 public char[] getImplDefined2();
\r
198 * Returns the entry map (positions 20-23).
\r
200 * @return <code>char[]</code>- the entry map
\r
202 public char[] getEntryMap();
\r
206 * Creates a leader object from a string object.
\r
210 * Indicator count and subfield code length are defaulted to 2 if they are
\r
211 * not integer values.
\r
217 public void unmarshal(String ldr);
\r
220 * Creates a string object from this leader object.
\r
222 * @return String - the string object from this leader object
\r
224 public String marshal();
\r