|
|||||||||
| 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
public class 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
|
| 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, null_value, target_files, target_to_output_stream, versioned_output, warnings |
| 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 |
addValidationError(String validation_error)
Adds a validation error to the list of errors. |
void |
addValidationWarning(String validation_warning)
Adds a validation warning to the list of warnings. |
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 |
clearValidationErrors()
Clears the list of validation errors. |
void |
clearValidationWarnings()
Clears the list of validation warnings. |
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[] |
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. |
boolean |
validateSubsetDirectory(File subset_directory)
Indicates whether or not specified directory 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, getNullValue, getWarnings, isEmptyValue, setNullValue, 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 |
|---|
getWarnings, writeConcept |
| Methods inherited from interface gov.nih.nlm.util.LocalNullValueSupport |
|---|
getNullValue, isEmptyValue, setNullValue |
| Field Detail |
|---|
protected UserConfiguration user_config
protected ApplicationConfiguration default_config
| Constructor Detail |
|---|
public RichMRMetamorphoSysOutputStream()
throws IOException
RichMRMetamorphoSysOutputStream.
IOException| Method Detail |
|---|
public String getName()
getName in interface GUIConfigurablepublic void setConfiguration(UserConfiguration user_config)
UserConfiguration.
setConfiguration in interface Configurableuser_config - the UserConfiguration.public void setCuiList(CuiList cui_list)
CuiList reference.
setCuiList in interface SubsetListenercui_list - the CuiListpublic void setConfiguration(ApplicationConfiguration c)
ApplicationConfiguration.
setConfiguration in interface Configurablec - the ApplicationConfigurationpublic String getConfigurationDetails()
getConfigurationDetails in interface Configurable
public void open(String mr_dir)
throws IOException
open in interface ConceptOutputStreamopen in class RichMRMetathesaurusOutputStreammr_dir - the subset directory
IOException - if the files cannot be opened
public void close()
throws IOException
close in interface ConceptOutputStreamclose in class RichMRMetathesaurusOutputStreamIOException
protected BufferedWriter openTargetFile(String name)
throws IOException
open(String).
openTargetFile in class RichMRMetathesaurusOutputStreamname - the filename
BufferedWriter for the file
IOException - if the file could not be opened.public JPanel getPanel()
getPanel in interface GUIConfigurableJPanel that displays graphical interface for a tabpublic boolean hasDataChanged()
hasDataChanged in interface GUIConfigurableboolean true if data has changed
false otherwisepublic void setDataChanged(boolean b)
setDataChanged in interface GUIConfigurableb - boolean indicating whether or not data has changedpublic Properties getProperties()
Properties
object.
getProperties in interface ConfigurableProperties only those directly related to the guipublic void setProperties(Properties p)
Properties
object.
setProperties in interface Configurablep - Properties only those directly related to the guipublic void resetDataChanged()
resetDataChanged in interface GUIConfigurablepublic 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 GUIConfigurabledcl - DataChangeListenerpublic 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 GUIConfigurabledcl - DataChangeListenerpublic Color getColor()
Color that should be used to display the name.
getColor in interface GUIConfigurableColorpublic String getTabDescription()
getTabDescription in interface GUIConfigurableString text of filter instructionspublic void resetToDefaults()
resetToDefaults in interface Configurablepublic void showOptions()
showOptions in interface GUIConfigurablepublic boolean hasAdvancedOptions()
hasAdvancedOptions in interface GUIConfigurabletrue 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 GUIConfigurableJPanel to be added to the Help menupublic void setPanelSelections()
setPanelSelections in interface GUIConfigurablepublic boolean validateSubsetDirectory(File subset_directory)
booleantrue if
GUIConfigurable is valid false if
GUIConfigurable is invalidpublic boolean validate()
GUIConfigurable is valid.
validate in interface GUIConfigurablebooleantrue if
GUIConfigurable is valid false if
GUIConfigurable is invalidpublic void addValidationError(String validation_error)
validation_error - Stringpublic void clearValidationErrors()
public String[] getValidationErrors()
validate() returns false.
getValidationErrors in interface GUIConfigurablepublic String[] getValidationWarnings()
getValidationWarnings in interface GUIConfigurablepublic void addValidationWarning(String validation_warning)
validation_warning - Stringpublic void clearValidationWarnings()
public GUIConfigurable getGUIConfigurableForValidationFailure()
GUIConfigurable whose tab should next be displayed to
allow the user to correct an error or warning.
getGUIConfigurableForValidationFailure in interface GUIConfigurableprotected void fireDataChanged()
protected void fireNotUndoableDataChanged()
protected void writeMRDOC(ReleaseMetadata release_metadata)
throws IOException
MRDOC.RRF file, ensuring no
duplicates.
writeMRDOC in class RichMRMetathesaurusOutputStreamrelease_metadata - the ReleaseMetadata
IOException - if anything goes wrong
protected void writeMRDEF(Concept concept)
throws IOException
Concept. Truncates long fields and/or
removes unicode characters as user specifies.
writeMRDEF in class RichMRFilesConceptOutputStreamconcept - the Concept to write
IOException - if anything goes wrong
protected void writeMRSAT(Concept concept)
throws IOException
Concept. Truncates long fields and/or
removes unicode characters as user specifies.
writeMRSAT in class RichMRFilesConceptOutputStreamconcept - the Concept to write
IOException - if anything goes wrong
protected void writeMRCXT(Concept concept)
throws IOException
Concept. Truncates long fields and/or
removes unicode characters as user specifies.
writeMRCXT in class RichMRFilesConceptOutputStreamconcept - the Concept to write
IOException - if anything goes wrong
protected 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 RichMRFilesConceptOutputStreamconcept - the Concept to write
IOException - if anything goes wrong
protected void printLine(String line,
String file_name)
throws IOException
printLine in class RichMRMetathesaurusOutputStreamline - the line to be printedfile_name - printing destination
IOException
public void writeIndexEntry(IndexEntry ie)
throws IOException
writeIndexEntry in interface MetathesaurusOutputStreamwriteIndexEntry in class RichMRMetathesaurusOutputStreamie - IndexEntry to be written
IOException - if anything goes wrongpublic boolean removeUnicode()
removeUnicode in interface MetamorphoSysOutputStreamtrue if so, false otherwisepublic boolean addUnicodeBom()
true if so, false otherwisepublic boolean removeMTHOnlyConcepts()
removeMTHOnlyConcepts in interface MetamorphoSysOutputStreambooleanpublic boolean calculateMD5s()
booleanpublic void beginInitializeCuiList()
SubsetListener that the Initialize Cui List phase is
starting.
beginInitializeCuiList in interface SubsetListenerpublic void endInitializeCuiList()
SubsetListener that the Initialize Cui List phase is
ending.
endInitializeCuiList in interface SubsetListenerpublic void beginSubsetContent()
SubsetListener that the Subset Content phase is starting.
beginSubsetContent in interface SubsetListenerpublic void endSubsetContent()
SubsetListener that the Subset Content phase is ending.
endSubsetContent in interface SubsetListenerpublic int compareTo(Object o)
Required method for implementing
Comparable interface.
Indicates the means for comparison between two
MetamorphoSysOutputStreams.
compareTo in interface Comparableo - 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 | ||||||||