All Packages Class Hierarchy This Package Previous Next Index
Class edu.vt.marian.Document.MarcDocument
java.lang.Object
|
+----edu.vt.marian.Document.MarcRecord
|
+----edu.vt.marian.Document.MarcDocument
- public class MarcDocument
- extends MarcRecord
- implements Document
A USMARC record interpreted as a MARIAN Document.
-
MarcDocument(Debug)
- Create a null MarcDocument.
-
MarcDocument(EntityMap, Debug)
- Create a MarcDocuemnt object using an explicit EntityMap.
-
MarcDocument(int, Debug)
- Create a null MarcRecord, with a minimal xmlMap (one with only & and < in it).
-
MarcDocument(int, EntityMap, Debug)
- Create a MarcDocuemnt object using an explicit EntityMap.
-
attributes()
- return a Vector of metadata attributes for this document.
-
copy()
- Make a new MarcDocument just like this one.
-
equals(MarcDocument)
- Does this object represent the same document as parameter object?
NOTE: At this point we are using String compare on the
raw strings to determine equality.
-
hasSectionType(MarcVarField, int)
-
-
init()
- Set instance variables to default values.
-
newVarField(int)
- Create the correct sort of field object.
-
presentAttribute(int, int)
- Return an Object (almost certainly a String) in some markupType for the given
attribute.
-
presentAttributes(int)
- return a Vector of metadata attributes for this document.
-
presentCallNumber(int, BufferedWriter)
-
-
presentFull(int)
- Return a full description of the document this object represents.
-
presentFull(int, BufferedWriter)
-
-
presentLong(int)
- return a long description of the document this object represents
-
presentLong(int, BufferedWriter)
-
-
presentNotesSection(int, BufferedWriter)
- Prsent the notes information of this object.
-
presentPublishingInfoSection(int, BufferedWriter)
- format the publishing information of this MarcRecord
-
presentSection(int, int, BufferedWriter)
- format the specified variable
fields of this object from the MarcRecord
-
presentShort(int)
- Return a short description
(probably only one sentence) of the document this represents.
-
presentShort(int, BufferedWriter)
-
MarcDocument
public MarcDocument(Debug dbg)
- Create a null MarcDocument.
- Parameters:
- debug - -- used for debugging
MarcDocument
public MarcDocument(int clID,
Debug dbg)
- Create a null MarcRecord, with a minimal xmlMap (one with only & and < in it).
- Parameters:
- clID - -- class ID of this record.
- debug - -- used for debugging
MarcDocument
public MarcDocument(EntityMap xMap,
Debug dbg)
- Create a MarcDocuemnt object using an explicit EntityMap.
- Parameters:
- xMap - -- an EntityMap used when reading or writing the record
in XML.
- debug - -- used for debugging
MarcDocument
public MarcDocument(int clID,
EntityMap xMap,
Debug dbg)
- Create a MarcDocuemnt object using an explicit EntityMap.
- Parameters:
- xMap - -- an EntityMap used when reading or writing the record
in XML.
- debug - -- used for debugging
init
protected void init()
- Set instance variables to default values.
NOTE: Called in constructors and in setFrom*(). Note call to
superclass to initialize MarcRecord variables.
- Overrides:
- init in class MarcRecord
hasSectionType
protected boolean hasSectionType(MarcVarField mvf,
int section)
newVarField
protected MarcVarField newVarField(int id)
- Create the correct sort of field object.
NOTE: This may not seem very sensible at this level, but in
the MarcDocument subclass, where variable fields with different
semantics get created as different subclasses of MarcVarField,
it will become indispensable.
- Overrides:
- newVarField in class MarcRecord
presentCallNumber
protected int presentCallNumber(int markupType,
BufferedWriter out) throws IOException
presentPublishingInfoSection
protected int presentPublishingInfoSection(int markupType,
BufferedWriter out) throws IOException
- format the publishing information of this MarcRecord
- Parameters:
- markupType - specifies which markup type the result should be
only ASCII is supported now
- Returns:
- the formated publish information of this object as a string
presentNotesSection
protected int presentNotesSection(int markupType,
BufferedWriter out) throws IOException
- Prsent the notes information of this object.
- Parameters:
- markupType - specifies which markup type the result should be
- Returns:
- the formated notes information of this object as a string
presentSection
protected int presentSection(int fieldType,
int markupType,
BufferedWriter out) throws IOException
- format the specified variable
fields of this object from the MarcRecord
- Parameters:
- markupType - see edu.vt.marian.common.DigInfObj
- Returns:
- the formated information of this object from the specified
variable fields as a string
equals
public boolean equals(MarcDocument d)
- Does this object represent the same document as parameter object?
NOTE: At this point we are using String compare on the
raw strings to determine equality. This obviously leaves
something to be desired.
- Parameters:
- d - the document used to compare with this object
- Returns:
- true / false
copy
public DigInfObj copy()
- Make a new MarcDocument just like this one.
(Substitutes for public Object clone() until we straighten things out.)
- Returns:
- another MarcDocument object just like this one.
presentShort
public String presentShort(int markupType)
- Return a short description
(probably only one sentence) of the document this represents.
- Parameters:
- markupType - -- specifies the charater set type need to be returned
- Returns:
- the short description of this object as a string
presentShort
public int presentShort(int markupType,
BufferedWriter out) throws IOException
presentLong
public String presentLong(int markupType)
- return a long description of the document this object represents
- Returns:
- the long description of this document as a string
presentLong
public int presentLong(int markupType,
BufferedWriter out) throws IOException
presentFull
public String presentFull(int markupType)
- Return a full description of the document this object represents.
NOTE: At the risk of conflating two uses -- presentaion
of the complete object for tranport to another system and
presentation to a sophisticated data administrator (e.g.,
a library cataloger) -- we are using the transport
methods defined in MarcRecord to implement this.
- Parameters:
- markupType - specifies the character set type need to be returned
- Returns:
- the full description of this document as a string
presentFull
public int presentFull(int markupType,
BufferedWriter out) throws IOException
presentAttributes
public Vector presentAttributes(int markupType)
- return a Vector of metadata attributes for this document.
- Parameters:
- markupType - how to mark up the string returned (e.g., HTML or ASCII).
- Returns:
- a Vector of triples [attrName, attrType, attrValue].
presentAttribute
public Object presentAttribute(int attrID,
int markupType)
- Return an Object (almost certainly a String) in some markupType for the given
attribute.
- Parameters:
- markupType - how to mark up the string returned (e.g., HTML or ASCII).
- Returns:
- a Vector of triples [attrName, attrType, attrValue].
attributes
public Vector attributes()
- return a Vector of metadata attributes for this document.
- Parameters:
- markupType - how to mark up the string returned (e.g., HTML or ASCII).
- Returns:
- a Vector of triples [attrName, attrType, attrValue].
All Packages Class Hierarchy This Package Previous Next Index