|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.vt.marian.Document.MarcDocument
this class represents a MARC document in the system.
uses the services of class(es):
designer(s): Jianxin Zhao (jxzhao@csgrad.cs.vt.edu)
implementator(s):
finished time:
known bugs:
JDK version: 1.1.5
side effects:
Field Summary | |
char |
encoding_level
this is the encoding level of this document |
static int |
FIX_FIELD_PARSE_ERROR
|
static int |
INVALID_WEIGHT
|
boolean |
is_conference
this variable specifies whether or not this document is a conference |
java.lang.String |
language
this is the language of this document |
char |
level
this is the level of this document |
static int |
LONG
|
static int |
NULL_ID
|
static int |
NULL_RAW_MARC_RECORD
|
static int |
NULL_STREAM
|
static int |
NULL_WEIGHT
|
static int |
OK
those are the return values of methods of this class |
static int |
PARSE_ID_ERROR
|
static int |
PARSE_YEAR_ERROR
|
int |
pub_year
this is the publish year of this document |
static int |
SHORT
these are the possible format levels |
char |
type
this is the type of this document |
MarcRecord |
umr
this is structured information of this document, in fact it's parsed from the above string |
static int |
WRITE_ID_ERROR
|
static int |
WRITE_WEIGHT_ERROR
|
Constructor Summary | |
MarcDocument(java.io.BufferedReader br,
edu.vt.marian.common.Debug debug)
create a MarcDocument object from the specified stream |
|
MarcDocument(java.lang.String rawStr,
edu.vt.marian.common.Debug debug)
create a MarcDocument object from a raw string. |
Method Summary | |
edu.vt.marian.common.DigInfObj |
copy()
make a new one just like this one. |
boolean |
equals(MarcDocument d)
tell whether this object and the parameter object represent the same document NOTE: At this point we are using String compare on the raw strings to determine equality. |
java.lang.String |
get_long_description()
return a long description of the document this object represents |
java.lang.String |
get_short_description()
return a short description (probably only one sentence) of the document it represnets |
java.lang.String |
getRawString()
return the raw marc record of the document this object represents. |
boolean |
isValid()
is this object valid? |
java.util.Vector |
presentAttributes(int markupType)
return a Vector of metadata attributes for this document. |
java.lang.String |
presentFull(int markup_type)
return a long description of the document this object represents |
java.lang.String |
presentShort(int markup_type)
return a short description (probably only one sentence) of the document it represnets |
int |
setRawString(java.lang.String rawStr)
set the raw marc record of the document this object represents. |
int |
toStream(java.io.PrintWriter pw)
print the contents of this object to the specified stream |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public MarcRecord umr
public char type
public char level
public char encoding_level
public int pub_year
public java.lang.String language
public boolean is_conference
public static final int SHORT
public static final int LONG
public static final int OK
public static final int NULL_WEIGHT
public static final int INVALID_WEIGHT
public static final int NULL_STREAM
public static final int WRITE_ID_ERROR
public static final int WRITE_WEIGHT_ERROR
public static final int FIX_FIELD_PARSE_ERROR
public static final int PARSE_YEAR_ERROR
public static final int PARSE_ID_ERROR
public static final int NULL_RAW_MARC_RECORD
public static final int NULL_ID
Constructor Detail |
public MarcDocument(java.io.BufferedReader br, edu.vt.marian.common.Debug debug)
br
- the stream to read out this documentdebug
- used for debuggingpublic MarcDocument(java.lang.String rawStr, edu.vt.marian.common.Debug debug)
rawStr
- a (raw) string in MARC Tape Formatdebug
- -- used for debuggingMethod Detail |
public boolean isValid()
public boolean equals(MarcDocument d)
NOTE: At this point we are using String compare on the raw strings to determine equality. This obviously leaves something to be desired.
d
- the document used to compare with this objectpublic edu.vt.marian.common.DigInfObj copy()
public java.lang.String get_long_description()
public java.lang.String presentFull(int markup_type)
markup_type
- specifies the character set type need to be returnedpublic java.lang.String get_short_description()
public java.lang.String presentShort(int markup_type)
markup_type
- -- specifies the charater set type need to be returnedpublic java.util.Vector presentAttributes(int markupType)
markupType
- how to mark up the string returned (e.g., HTML or ASCII).public int toStream(java.io.PrintWriter pw)
pw
- the stream to wtire this objectpublic java.lang.String getRawString()
public int setRawString(java.lang.String rawStr)
rawString
- this will become the new raw marc record of
this document object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |