All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class edu.vt.marian.Document.PresentableMarcVarField

java.lang.Object
   |
   +----edu.vt.marian.Document.MarcVarField
           |
           +----edu.vt.marian.Document.PresentableMarcVarField

public class PresentableMarcVarField
extends MarcVarField
An enhanced version of a "variable field" in a US MARC record, capable of supporting flexible presentation to a user.


Variable Index

 o isConfName
 o isCorpName
 o isImprint
 o isNote
 o isPersName
 o isSubject
 o isTitle
 o urlPrefix
Prefix (notably including substitution points for WebGate) used in constructing URLs implementing "Hot Links" in presented records as new searches.

Constructor Index

 o PresentableMarcVarField(int, EntityMap, Debug)
Create a PresentableMarcVarField object with no subfields from a field ID and a pair of indicator characters.

Method Index

 o presentLong(int, BufferedWriter)
Default "long" presentation for any variable field: use all subfields with a minimal separator.
 o presentShort(int, BufferedWriter)
Default "short" presentation for any variable field: just use the 'a' subfield.
 o presentUrl(String, BufferedWriter)
Certain chars (the space, for example), cannot appear in URLs.

Variables

 o isTitle
 protected boolean isTitle
 o isSubject
 protected boolean isSubject
 o isNote
 protected boolean isNote
 o isPersName
 protected boolean isPersName
 o isCorpName
 protected boolean isCorpName
 o isConfName
 protected boolean isConfName
 o isImprint
 protected boolean isImprint
 o urlPrefix
 protected static String urlPrefix
Prefix (notably including substitution points for WebGate) used in constructing URLs implementing "Hot Links" in presented records as new searches.

Constructors

 o PresentableMarcVarField
 public PresentableMarcVarField(int id,
                                EntityMap xMap,
                                Debug debug)
Create a PresentableMarcVarField object with no subfields from a field ID and a pair of indicator characters. Used when creating a PresentableMarcVarField from an XML or Atomic format record, e.g.

Parameters:
id - --- this will be the id of this object
data - -- this string contains the indicators and all the subfields. The format is specified in US MARC.
debug - -- used for debugging

Methods

 o presentUrl
 protected void presentUrl(String urlBody,
                           BufferedWriter out) throws IOException
Certain chars (the space, for example), cannot appear in URLs. Instead, we use the hex value for that particular character to display it in a URL.

e.g. "Program Files" becomes "Program%20Files" for a URL.

 o presentShort
 public int presentShort(int markupType,
                         BufferedWriter out) throws IOException
Default "short" presentation for any variable field: just use the 'a' subfield.

Parameters:
markupType - see edu.vt.marian.common.DigInfObj
out - A BufferedWriter (presumably String or OutputStream) to present on.
Returns:
OK -- everything jake.
IO_ERROR or PARSE_ERROR -- problems.
 o presentLong
 public int presentLong(int markupType,
                        BufferedWriter out) throws IOException
Default "long" presentation for any variable field: use all subfields with a minimal separator.

Parameters:
markupType - see edu.vt.marian.common.DigInfObj
out - A BufferedWriter (presumably String or OutputStream) to present on.
Returns:
OK -- everything jake.
IO_ERROR or PARSE_ERROR -- problems.

All Packages  Class Hierarchy  This Package  Previous  Next  Index