|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nih.nlm.umls.io.RichMRFilesConceptOutputStream
gov.nih.nlm.umls.io.RichMRMetathesaurusOutputStream
This MetathesaurusOutputStream
generates MR files in the "Rich
Release Format". It is an extension of RichMRFilesConceptOutputStream
with
additional code for the ReleaseMetadata
content.
Field Summary | |
protected String[] |
ancillary_files
|
protected Atom[] |
atoms
|
protected String[] |
change_files
|
protected FileStatisticsConfiguration |
config
|
protected List |
listeners
|
protected Map |
lui_to_cui_set
|
protected Map |
sui_to_cui_set
|
Fields inherited from class gov.nih.nlm.umls.io.RichMRFilesConceptOutputStream |
add_unicode_bom, file_ext, mr_dir, mr_targets, target_files, target_to_output_stream, versioned_output |
Constructor Summary | |
RichMRMetathesaurusOutputStream(FileStatisticsConfiguration config)
Instantiates an empty RichMRMetathesaurusOutputStream . |
Method Summary | |
void |
addProgressListener(ProgressListener l)
Adds a ProgressListener . |
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 void |
fireProgressEvent(int pct,
String note)
Fires a ProgressEvent . |
protected String |
getColumnTextFromFileStatistics(FileStatistics file_stats)
Returns the MRCOLS.RRF lines for the specified FileStatistics . |
protected String |
getFileTextFromFileStatistics(FileStatistics file_stats)
Returns the MRFILES.RRF line for the specified FileStatistics . |
protected BufferedWriter |
openTargetFile(String name)
Opens the specified file in the directory passed to RichMRFilesConceptOutputStream.open(String) . |
protected void |
printLine(String line,
String file_name)
Prints the given line to the file with the given name. |
void |
removeProgressListener(ProgressListener l)
Removes a ProgressListener . |
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 terms that are candidates to be ambiguous. |
void |
setCandidateAmbiguousTermIdentifiers(String[] luis)
Sets the list of terms that are candidates to be ambiguous. |
void |
writeConcept(Concept concept)
Writes a Concept to the appropriate MR files. |
protected void |
writeFileColumnStats()
This method computes the file and columns statistics for the MRFILES.RRF and MRCOLS.RRF files themselves. |
void |
writeIndexEntry(IndexEntry index_entry)
Writes an IndexEntry to the appropriate MR index file. |
protected void |
writeMRAUI(ReleaseMetadata release_metadata)
Writes a line to the MRAUI.RRF file. |
protected void |
writeMRCUI(ReleaseMetadata release_metadata)
Writes a line to the MRCUI.RRF file. |
protected void |
writeMRDOC(ReleaseMetadata release_metadata)
Write a line to the MRDOC.RRF file. |
protected void |
writeMRRANK(ReleaseMetadata release_metadata)
Writes a line to the MRRANK.RRF file. |
protected void |
writeMRSAB(ReleaseMetadata release_metadata)
Write a line to the MRSAB.RRF file. |
void |
writeReleaseMetadata(ReleaseMetadata release_metadata)
Writes an ReleaseMetadata to the appropriate MR metadata files. |
Methods inherited from class gov.nih.nlm.umls.io.RichMRFilesConceptOutputStream |
flush, getFilePosition, open, writeMRCOC, writeMRCONSO, writeMRCXT, writeMRDEF, writeMRHIER, writeMRHIST, writeMRMAP, writeMRREL, writeMRSAT, writeMRSMAP, writeMRSTY |
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 List listeners
protected FileStatisticsConfiguration config
protected String[] change_files
protected String[] ancillary_files
protected Map sui_to_cui_set
protected Map lui_to_cui_set
protected Atom[] atoms
Constructor Detail |
public RichMRMetathesaurusOutputStream(FileStatisticsConfiguration config)
RichMRMetathesaurusOutputStream
.
config
- FileStatisticsConfiguration
Method Detail |
public void close() throws IOException
close
in interface ConceptOutputStream
close
in class RichMRFilesConceptOutputStream
IOException
protected void printLine(String line, String file_name) throws IOException
printLine
in class RichMRFilesConceptOutputStream
line
- the line to be printedfile_name
- printing destination
IOException
public void writeConcept(Concept concept) throws IOException
Concept
to the appropriate MR files.
writeConcept
in interface ConceptOutputStream
writeConcept
in class RichMRFilesConceptOutputStream
concept
- the Concept
to write
IOException
- if the files could not be writtenpublic 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
MRCUI.RRF
file.
release_metadata
- the ReleaseMetadata
IOException
- if anything goes wrongprotected void writeMRAUI(ReleaseMetadata release_metadata) throws IOException
MRAUI.RRF
file.
release_metadata
- the ReleaseMetadata
IOException
- if anything goes wrongprotected void writeMRDOC(ReleaseMetadata release_metadata) throws IOException
MRDOC.RRF
file.
release_metadata
- the ReleaseMetadata
IOException
- if anything goes wrongprotected void writeMRSAB(ReleaseMetadata release_metadata) throws IOException
MRSAB.RRF
file.
release_metadata
- the ReleaseMetadata
IOException
- if anything goes wrongprotected void writeMRRANK(ReleaseMetadata release_metadata) throws IOException
MRRANK.RRF
file.
release_metadata
- the ReleaseMetadata
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
- list of terms that are candidates to be ambiguouspublic void setCandidateAmbiguousTermIdentifiers(List luis)
setCandidateAmbiguousTermIdentifiers
in interface MetathesaurusOutputStream
luis
- list of terms that are candidates to be ambiguousprotected BufferedWriter openTargetFile(String name) throws IOException
RichMRFilesConceptOutputStream.open(String)
.
openTargetFile
in class RichMRFilesConceptOutputStream
name
- the filename
BufferedWriter
for the file
IOException
- if the file could not be opened.public void addProgressListener(ProgressListener l)
ProgressListener
.
addProgressListener
in interface ProgressReporter
l
- thefProgressListener
public void removeProgressListener(ProgressListener l)
ProgressListener
.
removeProgressListener
in interface ProgressReporter
l
- thefProgressListener
protected void fireProgressEvent(int pct, String note)
ProgressEvent
.
pct
- percent donenote
- progress noteprotected void writeFileColumnStats() throws IOException
MRFILES.RRF
and MRCOLS.RRF
files themselves.
Should it be using "\n"?
IOException
- if anything goes wrongprotected String getFileTextFromFileStatistics(FileStatistics file_stats)
MRFILES.RRF
line for the specified FileStatistics
.
file_stats
- the FileStatistics
MRFILES.RRF
line for the specified FileStatistics
protected String getColumnTextFromFileStatistics(FileStatistics file_stats)
MRCOLS.RRF
lines for the specified FileStatistics
.
file_stats
- the FileStatistics
MRCOLS.RRF
lines for the specified 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 |