|
||||||||||
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
gov.nih.nlm.mms.RichMRMetamorphoSysOutputStream
This MetamorphoSysOutputStream
obtains data from the
MetamorphoSys
subset routine and generates a subset of Rich Release
MR files.
Field Summary | |
protected ApplicationConfiguration |
default_config
|
protected UserConfiguration |
user_config
|
protected String |
validate_msg
|
Fields inherited from class gov.nih.nlm.umls.io.RichMRMetathesaurusOutputStream |
ancillary_files, atoms, change_files, config, lui_to_cui_set, 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 | |
RichMRMetamorphoSysOutputStream()
Instantiates an empty RichMRMetamorphoSysOutputStream . |
Method Summary | |
void |
addDataChangeListener(DataChangeListener dcl)
Adds a DataChangeListener that will be notified every time a
fireDataChanged() call is made. |
boolean |
addUnicodeBom()
Indicates whether or not the output stream is configured to prepend the UTF-8 BOM character. |
void |
beginInitializeCuiList()
Informs SubsetListener that the Initialize Cui List phase is
starting. |
void |
beginSubsetContent()
Informs SubsetListener that the Subset Content phase is starting. |
boolean |
calculateMD5s()
Indicates whether or not the output stream is configured to calculate md5 values for all of the output files. |
void |
close()
Closes source files that were opened by this class's openTargets() method. |
int |
compareTo(Object o)
Compares this object with the specified object for order. |
void |
endInitializeCuiList()
Informs SubsetListener that the Initialize Cui List phase is
ending. |
void |
endSubsetContent()
Informs SubsetListener that the Subset Content phase is ending. |
protected void |
fireDataChanged()
Enables filters to inform listeners of data changed event. |
protected void |
fireNotUndoableDataChanged()
Enables filters to indicate that data has changed without notifying the listeners or making this change undoable. |
Color |
getColor()
Indicates the Color that should be used to display the name. |
String |
getConfigurationDetails()
Returns a message for the log. |
GUIConfigurable |
getGUIConfigurableForValidationFailure()
Returns the GUIConfigurable whose tab should next be displayed to
allow the user to correct an error or warning. |
JPanel |
getHelpPanel()
Returns a JPanel that will be displayed when the user selects the
corresponding menu item from the Help menu and will provide the user with
detailed instructions on the tab's use. |
String |
getName()
Returns the short name for display purposes. |
JPanel |
getPanel()
Returns the GUI panel that will be displayed on one of the tabs on the main GUI window. |
Properties |
getProperties()
Returns the current state of the output stream as a Properties
object. |
String |
getTabDescription()
Returns a description of the screen and includes instructions on use. |
String |
getValidateMessage()
Returns the message that the user will see if this GUIConfigurable
is invalid. |
String[] |
getValidationErrors()
Returns the messages indicating why validation failed. |
String[] |
getValidationWarnings()
Returns warnings that were indicated during validation. |
boolean |
hasAdvancedOptions()
Indicates whether or not an options menu item should be supplied for advanced configuration options. |
boolean |
hasDataChanged()
Returns a boolean indicating whether or not the values on this gui have changed. |
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 |
removeDataChangeListener(DataChangeListener dcl)
Removes a DataChangeListener so that it will no longer be notified
every time a fireDataChanged() call is made from this gui. |
boolean |
removeMTHOnlyConcepts()
Indicates whether or not the output stream is configured to remove concepts with only MTH atoms. |
boolean |
removeUnicode()
Indicates whether or not the output stream is configured to remove non-ASCII Unicode lines. |
void |
resetDataChanged()
Resets the data_changed flag to indicate that no data has been changed since the last save. |
void |
resetToDefaults()
Provides a mechanism for resetting the variables on a tab back to their default values. |
void |
setConfiguration(ApplicationConfiguration c)
Sets the ApplicationConfiguration . |
void |
setConfiguration(UserConfiguration user_config)
Sets the UserConfiguration . |
void |
setCuiList(CuiList cui_list)
Sets the CuiList reference. |
void |
setDataChanged(boolean b)
Sets the "has data changed" flag. |
void |
setPanelSelections()
Applies the state of the output stream to the GUI. |
void |
setProperties(Properties p)
Sets the current state of the output stream from a Properties
object. |
void |
showOptions()
Presents an advanced options GUI to the user. |
boolean |
validate()
Indicates whether or not the GUIConfigurable is valid. |
void |
writeIndexEntry(IndexEntry ie)
Writes index entries with the "remove utf8" settings in mind. |
protected void |
writeMRCONSO(Concept concept)
Writes MRCONSO.RRF 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 |
writeMRDOC(ReleaseMetadata release_metadata)
Write release_info lines to the MRDOC.RRF file, ensuring no
duplicates. |
protected void |
writeMRSAT(Concept concept)
Writes MRSAT entries for a Concept . |
Methods inherited from class gov.nih.nlm.umls.io.RichMRFilesConceptOutputStream |
flush, getFilePosition, writeMRCOC, writeMRHIER, writeMRHIST, writeMRMAP, writeMRREL, 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.MetathesaurusOutputStream |
setCandidateAmbiguousStringIdentifiers, setCandidateAmbiguousStringIdentifiers, setCandidateAmbiguousTermIdentifiers, setCandidateAmbiguousTermIdentifiers, writeReleaseMetadata |
Methods inherited from interface gov.nih.nlm.umls.io.ConceptOutputStream |
writeConcept |
Field Detail |
protected UserConfiguration user_config
protected ApplicationConfiguration default_config
protected String validate_msg
Constructor Detail |
public RichMRMetamorphoSysOutputStream() throws IOException
RichMRMetamorphoSysOutputStream
.
IOException
Method Detail |
public String getName()
getName
in interface GUIConfigurable
public void setConfiguration(UserConfiguration user_config)
UserConfiguration
.
setConfiguration
in interface Configurable
user_config
- the UserConfiguration
.public void setCuiList(CuiList cui_list)
CuiList
reference.
setCuiList
in interface SubsetListener
cui_list
- the CuiList
public void setConfiguration(ApplicationConfiguration c)
ApplicationConfiguration
.
setConfiguration
in interface Configurable
c
- the ApplicationConfiguration
public String getConfigurationDetails()
getConfigurationDetails
in interface Configurable
public void open(String mr_dir) throws IOException
open
in interface ConceptOutputStream
open
in class RichMRFilesConceptOutputStream
mr_dir
- the subset directory
IOException
- if the files cannot be openedpublic void close() throws IOException
close
in interface ConceptOutputStream
close
in class RichMRMetathesaurusOutputStream
IOException
protected BufferedWriter openTargetFile(String name) throws IOException
open(String)
.
openTargetFile
in class RichMRMetathesaurusOutputStream
name
- the filename
BufferedWriter
for the file
IOException
- if the file could not be opened.public JPanel getPanel()
getPanel
in interface GUIConfigurable
JPanel
that displays graphical interface for a tabpublic boolean hasDataChanged()
hasDataChanged
in interface GUIConfigurable
boolean
true
if data has changed
false
otherwisepublic void setDataChanged(boolean b)
setDataChanged
in interface GUIConfigurable
b
- boolean
indicating whether or not data has changedpublic Properties getProperties()
Properties
object.
getProperties
in interface Configurable
Properties
only those directly related to the guipublic void setProperties(Properties p)
Properties
object.
setProperties
in interface Configurable
p
- Properties
only those directly related to the guipublic void resetDataChanged()
resetDataChanged
in interface GUIConfigurable
public void addDataChangeListener(DataChangeListener dcl)
DataChangeListener
that will be notified every time a
fireDataChanged()
call is made. Allows main GUI to record all
changes to this gui in the undo/redo mechanism.
addDataChangeListener
in interface GUIConfigurable
dcl
- DataChangeListener
public void removeDataChangeListener(DataChangeListener dcl)
DataChangeListener
so that it will no longer be notified
every time a fireDataChanged()
call is made from this gui.
removeDataChangeListener
in interface GUIConfigurable
dcl
- DataChangeListener
public Color getColor()
Color
that should be used to display the name.
getColor
in interface GUIConfigurable
Color
public String getTabDescription()
getTabDescription
in interface GUIConfigurable
String
text of filter instructionspublic void resetToDefaults()
resetToDefaults
in interface Configurable
public void showOptions()
showOptions
in interface GUIConfigurable
public boolean hasAdvancedOptions()
hasAdvancedOptions
in interface GUIConfigurable
true
if so; false
otherwisepublic JPanel getHelpPanel()
JPanel
that will be displayed when the user selects the
corresponding menu item from the Help menu and will provide the user with
detailed instructions on the tab's use.
getHelpPanel
in interface GUIConfigurable
JPanel
to be added to the Help menupublic void setPanelSelections()
setPanelSelections
in interface GUIConfigurable
public boolean validate()
GUIConfigurable
is valid.
validate
in interface GUIConfigurable
boolean
true
if
GUIConfigurable
is valid false
if
GUIConfigurable
is invalidpublic String getValidateMessage()
GUIConfigurable
is invalid.
String
with error messagepublic String[] getValidationErrors()
validate()
returns false
.
getValidationErrors
in interface GUIConfigurable
public String[] getValidationWarnings()
getValidationWarnings
in interface GUIConfigurable
public GUIConfigurable getGUIConfigurableForValidationFailure()
GUIConfigurable
whose tab should next be displayed to
allow the user to correct an error or warning.
getGUIConfigurableForValidationFailure
in interface GUIConfigurable
protected void fireDataChanged()
protected void fireNotUndoableDataChanged()
protected void writeMRDOC(ReleaseMetadata release_metadata) throws IOException
MRDOC.RRF
file, ensuring no
duplicates.
writeMRDOC
in class RichMRMetathesaurusOutputStream
release_metadata
- the ReleaseMetadata
IOException
- if anything goes wrongprotected void writeMRDEF(Concept concept) throws IOException
Concept
. Truncates long fields and/or
removes unicode characters as user specifies.
writeMRDEF
in class RichMRFilesConceptOutputStream
concept
- the Concept
to write
IOException
- if anything goes wrongprotected void writeMRSAT(Concept concept) throws IOException
Concept
. Truncates long fields and/or
removes unicode characters as user specifies.
writeMRSAT
in class RichMRFilesConceptOutputStream
concept
- the Concept
to write
IOException
- if anything goes wrongprotected void writeMRCXT(Concept concept) throws IOException
Concept
. Truncates long fields and/or
removes unicode characters as user specifies.
writeMRCXT
in class RichMRFilesConceptOutputStream
concept
- the Concept
to write
IOException
- if anything goes wrongprotected void writeMRCONSO(Concept concept) throws IOException
MRCONSO.RRF
entries for a Concept
. Also
writes modified MRXNW.ENG file that tallies sui word count as well.
writeMRCONSO
in class RichMRFilesConceptOutputStream
concept
- the Concept
to write
IOException
- if anything goes wrongprotected void printLine(String line, String file_name) throws IOException
printLine
in class RichMRMetathesaurusOutputStream
line
- the line to be printedfile_name
- printing destination
IOException
public void writeIndexEntry(IndexEntry ie) throws IOException
writeIndexEntry
in interface MetathesaurusOutputStream
writeIndexEntry
in class RichMRMetathesaurusOutputStream
ie
- IndexEntry
to be written
IOException
- if anything goes wrongpublic boolean removeUnicode()
removeUnicode
in interface MetamorphoSysOutputStream
true
if so, false
otherwisepublic boolean addUnicodeBom()
true
if so, false
otherwisepublic boolean removeMTHOnlyConcepts()
removeMTHOnlyConcepts
in interface MetamorphoSysOutputStream
boolean
public boolean calculateMD5s()
boolean
public void beginInitializeCuiList()
SubsetListener
that the Initialize Cui List phase is
starting.
beginInitializeCuiList
in interface SubsetListener
public void endInitializeCuiList()
SubsetListener
that the Initialize Cui List phase is
ending.
endInitializeCuiList
in interface SubsetListener
public void beginSubsetContent()
SubsetListener
that the Subset Content phase is starting.
beginSubsetContent
in interface SubsetListener
public void endSubsetContent()
SubsetListener
that the Subset Content phase is ending.
endSubsetContent
in interface SubsetListener
public int compareTo(Object o)
Required method for implementing
Comparable
interface.
Indicates the means for comparison between two
MetamorphoSysOutputStream
s.
compareTo
in interface Comparable
o
- the Object to be compared.
ClassCastException
- if the specified object's type is not
GUIConfigurable
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |