|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nih.nlm.umls.io.OriginalMRFilesConceptOutputStream
public class OriginalMRFilesConceptOutputStream
This ConceptOutputStream generates a subset of standard MR files.
| Field Summary | |
|---|---|
protected boolean |
add_unicode_bom
|
protected String |
mr_dir
|
protected Map |
mr_targets
|
protected String |
null_value
|
protected static String[] |
target_files
|
protected boolean |
versioned_output
|
protected List |
warnings
|
| Constructor Summary | |
|---|---|
OriginalMRFilesConceptOutputStream()
Instantiates an empty OriginalMRFilesConceptOutputStream. |
|
| Method Summary | |
|---|---|
protected Map |
assignLrl(Atom[] atoms)
Assigns the LRL value. |
void |
close()
Closes files opened in open(String). |
String |
getNullValue()
Returns the null value. |
String[] |
getWarnings()
Returns a String[] of warnings accumulated during
processing of the output stream. |
boolean |
isEmptyValue(String token)
Indicates whether or not the specified token is null or contains a null value as defined by being either zero length or a value equal to the null value. |
protected boolean |
isLuiSuppressible(String lui,
Atom[] atoms)
Returns true if the specified LUI is suppressible. |
void |
open(String mr_dir)
Opens all target files in the specified directory. |
protected BufferedWriter |
openTargetFile(String name)
Opens the specified file in the directory passed to open(String). |
protected void |
printLine(String line,
String file_name)
Prints the given line to the file with the given name. |
void |
setNullValue(String null_value)
Sets the null value to use. |
void |
writeConcept(Concept concept)
Writes a Concept to the appropriate MR files. |
protected void |
writeMRCON(Concept concept)
Writes MRCON entries for a Concept |
protected void |
writeMRCXT(Concept concept)
Writes MRCXT entries for a Concept |
protected void |
writeMRDEF(Concept concept)
Writes MRDEF entries for a Concept |
protected void |
writeMRSAT(Concept concept)
Writes MRSAT entries for a Concept |
protected void |
writeMRSO(Concept concept)
Writes MRSO entries for a Concept |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Map mr_targets
protected static String[] target_files
protected String mr_dir
protected boolean versioned_output
protected boolean add_unicode_bom
protected List warnings
protected String null_value
| Constructor Detail |
|---|
public OriginalMRFilesConceptOutputStream()
OriginalMRFilesConceptOutputStream.
| Method Detail |
|---|
public void setNullValue(String null_value)
setNullValue in interface LocalNullValueSupportnull_value - the new null string valuepublic String getNullValue()
getNullValue in interface LocalNullValueSupportpublic boolean isEmptyValue(String token)
isEmptyValue in interface LocalNullValueSupport
public void open(String mr_dir)
throws IOException
open in interface ConceptOutputStreammr_dir - the subset directory
IOException - if the files cannot be opened
public void close()
throws IOException
open(String).
close in interface ConceptOutputStreamIOException - if the stream cannot be closed
public void writeConcept(Concept concept)
throws IOException
Concept to the appropriate MR files.
writeConcept in interface ConceptOutputStreamconcept - the Concept to write
IOException - if the files could not be written
protected void writeMRSO(Concept concept)
throws IOException
MRSO entries for a Concept
concept - the Concept to write
IOException - if anything goes wrong
protected void writeMRCON(Concept concept)
throws IOException
MRCON entries for a Concept
concept - the Concept to write
IOException - if anything goes wrong
protected boolean isLuiSuppressible(String lui,
Atom[] atoms)
true if the specified LUI is suppressible.
lui - the LUI value to checkatoms - the Atoms
true if the LUI is suppressible, false otherwiseprotected Map assignLrl(Atom[] atoms)
atoms - the Atoms to be assigned
Map of cui:sui tuple mapped to lrl
protected void writeMRCXT(Concept concept)
throws IOException
MRCXT entries for a Concept
concept - the Concept to write
IOException - if anything goes wrong
protected void writeMRDEF(Concept concept)
throws IOException
MRDEF entries for a Concept
concept - the Concept to write
IOException - if anything goes wrong
protected void writeMRSAT(Concept concept)
throws IOException
MRSAT entries for a Concept
concept - the Concept to write
IOException - if anything goes wrong
protected void printLine(String line,
String file_name)
throws IOException
line - the line to be printedfile_name - filename to print to
IOException
protected BufferedWriter openTargetFile(String name)
throws IOException
open(String).
name - the filename
BufferedWriter for the file
IOException - if the file could not be opened.public String[] getWarnings()
String[] of warnings accumulated during
processing of the output stream.
getWarnings in interface ConceptOutputStreamString[] of warnings
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||