|
|||||||||
| 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
gov.nih.nlm.mms.OriginalMRMetamorphoSysOutputStream
public class OriginalMRMetamorphoSysOutputStream
Represents a MetamorphoSysOutputStream that writes a directory
containing Original Release Format Metathesaurus files.
| Field Summary | |
|---|---|
protected boolean |
data_changed
|
protected ApplicationConfiguration |
default_config
|
protected List |
listeners
|
protected UserConfiguration |
user_config
|
| Fields inherited from class gov.nih.nlm.umls.io.OriginalMRMetathesaurusOutputStream |
|---|
ancillary_files, change_files, config, lui_to_cui_set, sui_to_cui_set |
| Fields inherited from class gov.nih.nlm.umls.io.OriginalMRFilesConceptOutputStream |
|---|
add_unicode_bom, mr_dir, mr_targets, null_value, target_files, versioned_output, warnings |
| Constructor Summary | |
|---|---|
OriginalMRMetamorphoSysOutputStream()
Instantiates an empty OriginalMRMetamorphoSysOutputStream. |
|
| Method Summary | |
|---|---|
void |
addDataChangeListener(DataChangeListener dcl)
Adds a DataChangeListener that will be notified every time a
fireDataChanged() call is made. |
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 target 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 details of the configuration for use in a 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 the 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()
Indicates whether or not the values on this gui have changed. |
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 |
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 "has 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 used for default settings. |
void |
setConfiguration(UserConfiguration user_config)
Sets the UserConfiguration. |
void |
setCuiList(CuiList cui_list)
Provides output stream access to the cui list. |
void |
setDataChanged(boolean b)
Sets the "has data changed" flag. |
void |
setPanelSelections()
Method makes selections on the panel. |
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()
This method indicates whether or not the GUIConfigurable is valid. |
void |
writeIndexEntry(IndexEntry ie)
Writes index entries with the "remove utf8" settings in mind. |
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. |
| Methods inherited from class gov.nih.nlm.umls.io.OriginalMRFilesConceptOutputStream |
|---|
assignLrl, getNullValue, getWarnings, isEmptyValue, setNullValue, writeMRCON, 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.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
protected boolean data_changed
protected List listeners
| Constructor Detail |
|---|
public OriginalMRMetamorphoSysOutputStream()
throws IOException
OriginalMRMetamorphoSysOutputStream.
IOException - if anything goes wrong| 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)
setCuiList in interface SubsetListenercui_list - CuiListpublic void setConfiguration(ApplicationConfiguration c)
ApplicationConfiguration used for default settings.
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 OriginalMRMetathesaurusOutputStreammr_dir - the subset directory
IOException - if the files cannot be opened
public void close()
throws IOException
close in interface ConceptOutputStreamclose in class OriginalMRMetathesaurusOutputStreamIOException - if any files cannot be closed, or if the release.dat
file or DB load scripts cannot be written.
protected boolean isLuiSuppressible(String lui,
Atom[] atoms)
true if the specified LUI is suppressible.
isLuiSuppressible in class OriginalMRFilesConceptOutputStreamlui - the LUI value to checkatoms - the Atoms
true if the LUI is suppressible, false otherwise
protected void writeMRDEF(Concept concept)
throws IOException
Concept. Truncates long fields and/or
removes unicode characters as user specifies.
writeMRDEF in class OriginalMRFilesConceptOutputStreamconcept - 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 OriginalMRFilesConceptOutputStreamconcept - 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 OriginalMRFilesConceptOutputStreamconcept - the Concept to write
IOException - if anything goes wrong
public void writeIndexEntry(IndexEntry ie)
throws IOException
writeIndexEntry in interface MetathesaurusOutputStreamwriteIndexEntry in class OriginalMRMetathesaurusOutputStreamie - IndexEntry to be written
IOException - if anything goes wrong
protected void printLine(String line,
String file_name)
throws IOException
printLine in class OriginalMRMetathesaurusOutputStreamline - the line to be printedfile_name - printing destination
IOExceptionpublic boolean removeUnicode()
removeUnicode in interface MetamorphoSysOutputStreamtrue if so, false otherwisepublic boolean removeMTHOnlyConcepts()
removeMTHOnlyConcepts in interface MetamorphoSysOutputStreambooleanpublic boolean calculateMD5s()
booleanpublic JPanel getPanel()
getPanel in interface GUIConfigurableJPanel that displays graphical interface for a tabpublic 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 boolean hasDataChanged()
hasDataChanged in interface GUIConfigurableboolean true if data has changed
false otherwisepublic void setDataChanged(boolean b)
setDataChanged in interface GUIConfigurableb - booleanpublic 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 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 BufferedWriter openTargetFile(String name)
throws IOException
open(String).
openTargetFile in class OriginalMRMetathesaurusOutputStreamname - the filename
BufferedWriter for the file
IOException - if the file could not be opened.public 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 | ||||||||