|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nih.nlm.umls.io.OriginalMRFilesConceptOutputStream
gov.nih.nlm.umls.io.OriginalMRMetathesaurusOutputStream
This MetathesaurusOutputStream
generates standard MR files.
Field Summary | |
protected String[] |
ancillary_files
|
protected String[] |
change_files
|
protected FileStatisticsConfiguration |
config
|
protected Map |
lui_to_cui_set
|
protected Map |
sui_to_cui_set
|
Fields inherited from class gov.nih.nlm.umls.io.OriginalMRFilesConceptOutputStream |
add_unicode_bom, mr_dir, mr_targets, target_files, versioned_output |
Constructor Summary | |
OriginalMRMetathesaurusOutputStream(FileStatisticsConfiguration config)
Instantiates an empty OriginalMRMetathesaurusOutputStream . |
Method Summary | |
protected void |
ambigCheck(Atom atom)
Checks the maps to see if the given Atom s sui
or lui should be added to the ambiguous maps. |
void |
close()
Closes source files that were opened by this class's openTargets() method. |
protected String |
getColumnTextFromFileStatistics(FileStatistics file_stats)
Returns a MRCOLS line. |
protected String |
getFileTextFromFileStatistics(FileStatistics file_stats)
Returns a MRFILES line. |
protected BufferedWriter |
openTargetFile(String name)
Opens the specified file in the directory passed to OriginalMRFilesConceptOutputStream.open(String) . |
protected void |
printLine(String line,
String file_name)
Prints the given line to the file with the given name. |
void |
setCandidateAmbiguousStringIdentifiers(List suis)
Sets the list of suis that are candidates to be ambiguous. |
void |
setCandidateAmbiguousStringIdentifiers(String[] suis)
Sets the list of suis that are candidates to be ambiguous. |
void |
setCandidateAmbiguousTermIdentifiers(List luis)
Sets the list of luis that are candidates to be ambiguous. |
void |
setCandidateAmbiguousTermIdentifiers(String[] luis)
Sets the list of terms that are candidates to be ambiguous. |
void |
writeConcept(Concept c)
Writes the specified Concept . |
protected void |
writeFileColumnStats()
This method computes the file and columns statistics for the MRFILES and MRCOLS tables themselves. |
void |
writeIndexEntry(IndexEntry index_entry)
Writes an IndexEntry to the appropriate MR index file. |
protected void |
writeMRCUI(ReleaseMetadata release_metadata)
Writes the specified ReleaseMetadata to MRCUI . |
protected void |
writeMRRANK(ReleaseMetadata release_metadata)
Write MRRANK . |
protected void |
writeMRSAB(ReleaseMetadata release_metadata)
Writes MRSAB . |
void |
writeReleaseMetadata(ReleaseMetadata release_metadata)
Writes an ReleaseMetadata to the appropriate MR metadata files. |
Methods inherited from class gov.nih.nlm.umls.io.OriginalMRFilesConceptOutputStream |
open, writeMRCON, writeMRCXT, writeMRDEF, writeMRSAT, writeMRSO |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface gov.nih.nlm.umls.io.ConceptOutputStream |
open |
Field Detail |
protected FileStatisticsConfiguration config
protected String[] change_files
protected String[] ancillary_files
protected Map sui_to_cui_set
protected Map lui_to_cui_set
Constructor Detail |
public OriginalMRMetathesaurusOutputStream(FileStatisticsConfiguration config)
OriginalMRMetathesaurusOutputStream
.
config
- FileStatisticsConfiguration
Method Detail |
protected BufferedWriter openTargetFile(String name) throws IOException
OriginalMRFilesConceptOutputStream.open(String)
.
openTargetFile
in class OriginalMRFilesConceptOutputStream
name
- the filename
BufferedWriter
for the file
IOException
- if the file could not be opened.protected void printLine(String line, String file_name) throws IOException
printLine
in class OriginalMRFilesConceptOutputStream
line
- the line to be printedfile_name
- printing destination
IOException
public void close() throws IOException
close
in interface ConceptOutputStream
close
in class OriginalMRFilesConceptOutputStream
IOException
public void writeConcept(Concept c) throws IOException
Concept
.
writeConcept
in interface ConceptOutputStream
writeConcept
in class OriginalMRFilesConceptOutputStream
c
- the specified Concept
IOException
- if anything goes wrongpublic void writeIndexEntry(IndexEntry index_entry) throws IOException
IndexEntry
to the appropriate MR index file.
writeIndexEntry
in interface MetathesaurusOutputStream
index_entry
- the IndexEntry
to write
IOException
- if the file could not be writtenprotected void writeMRCUI(ReleaseMetadata release_metadata) throws IOException
ReleaseMetadata
to MRCUI
.
release_metadata
- the specified ReleaseMetadata
IOException
- if anything goes wrongprotected void writeMRSAB(ReleaseMetadata release_metadata) throws IOException
MRSAB
.
release_metadata
- the ReleaseMetadata
containing MRSAB data
IOException
- if anything goes wrongprotected void writeMRRANK(ReleaseMetadata release_metadata) throws IOException
MRRANK
.
release_metadata
- the ReleaseMetadata
containing MRRANK
data
IOException
- if anything goes wrongpublic void writeReleaseMetadata(ReleaseMetadata release_metadata) throws IOException
ReleaseMetadata
to the appropriate MR metadata files.
writeReleaseMetadata
in interface MetathesaurusOutputStream
release_metadata
- the ReleaseMetadata
to write
IOException
- if the file could not be writtenpublic void setCandidateAmbiguousStringIdentifiers(String[] suis)
setCandidateAmbiguousStringIdentifiers
in interface MetathesaurusOutputStream
suis
- the list of suis that are candidates to be ambiguouspublic void setCandidateAmbiguousStringIdentifiers(List suis)
setCandidateAmbiguousStringIdentifiers
in interface MetathesaurusOutputStream
suis
- the list of suis that are candidates to be ambiguouspublic void setCandidateAmbiguousTermIdentifiers(String[] luis)
setCandidateAmbiguousTermIdentifiers
in interface MetathesaurusOutputStream
luis
- candidate termspublic void setCandidateAmbiguousTermIdentifiers(List luis)
setCandidateAmbiguousTermIdentifiers
in interface MetathesaurusOutputStream
luis
- the list of luis that are candidates to be ambiguousprotected void writeFileColumnStats() throws IOException
IOException
- if problem writing to filesprotected String getFileTextFromFileStatistics(FileStatistics file_stats)
MRFILES
line.
file_stats
- FileStatistics
MRFILES
lineprotected String getColumnTextFromFileStatistics(FileStatistics file_stats)
file_stats
- FileStatistics
protected void ambigCheck(Atom atom)
Atom
s sui
or lui should be added to the ambiguous maps.
atom
- the Atom
to check
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |