All Packages Class Hierarchy This Package Previous Next Index
Class edu.vt.marian.Document.MarcFixField
java.lang.Object
|
+----edu.vt.marian.Document.MarcFixField
- public class MarcFixField
- extends Object
A fixed field in us marc record.
User can assume a fix field is composed of an integer id and a
string data.
-
xmlMap
- Device for mapping ANSEL (and some ASCII) characters to XML entities.
-
MarcFixField(int, EntityMap, Debug)
- Create a MarcFixField object with no data.
-
MarcFixField(int, String, EntityMap, Debug)
- Create a MarcFixField object from the parameters id and data .
-
getData()
- Return the field string itself.
-
getID()
- Return the id of this object.
-
presentAsXml(BufferedWriter)
- Send this field to an output stream in the form of OAI XML.
-
setFromXml(BufferedReader)
- Instantiate this object from an XML stream.
xmlMap
protected EntityMap xmlMap
- Device for mapping ANSEL (and some ASCII) characters to XML entities.
MarcFixField
public MarcFixField(int fieldID,
EntityMap xMap,
Debug d)
- Create a MarcFixField object with no data.
- Parameters:
- id - --- this will be the id of this object
- debug - -- used for debugging
MarcFixField
public MarcFixField(int fieldID,
String dataStr,
EntityMap xMap,
Debug d)
- Create a MarcFixField object from the parameters id and data .
- Parameters:
- fieldID - -- the MARC field id of this object
- dataStr - -- the data of this object, ASSUMED to be in
ASCII/ANSEL encoding.
- debug - -- used for debugging
setFromXml
public int setFromXml(BufferedReader in)
- Instantiate this object from an XML stream.
- Parameters:
- in - -- a BufferedReader (String or InputStream, presumably) from which
to read the field in OAI MARC XML format.
- Returns:
- OK -- everything jake.
IO_ERROR or PARSE_ERROR -- problems.
NOTE: Expects opening tag to already be read; eats closing tag.
presentAsXml
public int presentAsXml(BufferedWriter out) throws IOException
- Send this field to an output stream in the form of OAI XML.
- Parameters:
- out - -- a BufferedWriter (String or InputStream, presumably) to which
to write the next record in OAI MARC XML format.
- Returns:
- OK -- everything jake.
INVALID_INPUT or PARSE_ERROR -- problems.
getID
public int getID()
- Return the id of this object.
- Returns:
- the id of this object as an integer
getData
public String getData()
- Return the field string itself.
- Returns:
- the data of this object as a string
All Packages Class Hierarchy This Package Previous Next Index