|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nih.nlm.mms.UserConfiguration
public class UserConfiguration
Represents a set of user configurations, including all of the relevant filter configuration data.
| Field Summary | |
|---|---|
protected List |
default_subsets
|
protected DefaultSubset |
selected_default_subset
|
| Constructor Summary | |
|---|---|
UserConfiguration(File config_file)
Instantiates a UserConfiguration from the specified properties
File. |
|
UserConfiguration(Properties p)
Instantiates a UserConfiguration from the specified
Properties. |
|
| Method Summary | |
|---|---|
void |
addProperty(String key,
String value)
Adds a property. |
void |
addSourcePath(String ip)
Adds a path to the list of installation sources. |
void |
clearFilters()
Clears the active filter list. |
void |
clearProperties(Configurable f)
Clears the properties associated with a particular Configurable. |
void |
clearSourcePaths()
Clears the list of installation sources. |
boolean |
didLoadCauseWarnings()
Indicates if there were warnings while loading the user configuration file. |
void |
enableFilter(Filter f)
Enables the specified valid filter. |
List |
getActiveFilters()
Returns the List of active Filters. |
boolean |
getAutomaticSelection()
Returns a flag indicating whether or not "auto selection mode" is on. |
List |
getConceptContentSelectors()
Returns the List of active ConceptContentSelectors. |
List |
getConceptManipulators()
Returns the List of active ConceptManipulators. |
List |
getConceptSelectors()
Returns the List of active ConceptSelectors. |
String |
getCurrentConfigurationFilename()
Returns the path to the current configuration file. |
DefaultSubset[] |
getDefaultSubsets()
Returns all available DefaultSubsets. |
List |
getDefaultSubsetsAsList()
Returns all available DefaultSubsets as a List. |
MetamorphoSysInputStream |
getInputStream()
Returns the ConceptInputStream selected by the user. |
String |
getLoadWarningsReport()
Returns a report indicating all warnings that occurred while loading the user configuration file. |
List |
getOldStyleFilters()
Returns the List of old style filters. |
MetamorphoSysOutputStream |
getOutputStream()
Returns the ConceptOutputStream selected by the user. |
List |
getPrecedence()
Returns a List of all SourceTermType objects in the
precedence order. |
Properties |
getProperties(Configurable f)
Return the Properties corresponding to the specified
Configurable. |
String |
getProperty(GUIConfigurable f,
String key)
Returns the GUIConfigurable-specific property value. |
String |
getReleaseDate()
Returns a String indicating the release date corresponding to the
configuration file being used. |
String |
getReleaseDescription()
Returns a String indicating the release description corresponding
to the configuration file being used. |
String |
getReleaseVersion()
Returns a String indicating the release version corresponding to
the configuration file being used. |
DefaultSubset |
getSelectedDefaultSubset()
Returns the selected DefaultSubset. |
String[] |
getSourcePaths()
Returns paths to the the installation sources. |
String |
getSubsetDirectory()
Returns path to the the subset folder. |
List |
getUserSuppressedSourceTermTypes()
Returns a List of user suppressed SourceTermType objects. |
List |
getValidFilters()
Returns the List of valid Filters. |
boolean |
hasDataChanged()
Returns a flag indicating whether or not the user has changed the underlying configuration since it was last loaded or saved. |
void |
importFilter(Filter f)
Imports and enables the specified filter. |
boolean |
isOutputVersioned()
Returns true if output stream should write versioned format. |
boolean |
isSourceTermTypeSuppressed(SourceTermType sab_tty)
Indicates if given SourceTermType is suppressed by the user. |
protected Properties |
load(String file)
Loads Properties from the specified file. |
protected Properties |
loadProperties(Properties props)
Configures the class based on the Properties. |
void |
removeProperty(GUIConfigurable f,
String key)
Removes the GUIConfigurable-specific property value. |
void |
removeSourcePath(String ip)
Removes a path from the list of installation sources. |
void |
reorderActiveFilters(int initial_index,
int final_index)
Moves the active filter at initial_index to insert it before final_index. |
void |
resetDataChanged()
Resets the "has data changed" flag to false. |
void |
saveState(File file_path)
Saves the configuration properties to the specified File. |
void |
setAutomaticSelection(boolean b)
Sets the "automatic selection mode" flag. |
void |
setCurrentConfigFile(String file)
Sets the path to the current configuration file. |
void |
setInputStream(MetamorphoSysInputStream input_stream)
Sets the class name of the ConceptInputStream to be used during
subsetting and instantiates it. |
void |
setOutputStream(MetamorphoSysOutputStream output_stream)
Sets the ConceptOutputStream to be used during subsetting and
instantiates it. |
void |
setPrecedence(List precedence)
Sets the List of all SourceTermType objects in the
precedence order. |
void |
setProperties(Configurable f)
Set the Properties corresponding to the specified
Configurable. |
void |
setPropertiesChanged()
Sets the flag indicating that the non-filter properties have changed. |
void |
setSelectedDefaultSubset(DefaultSubset ds)
Sets the selected DefaultSubset. |
void |
setSourcePaths(String[] ip)
Sets the paths to the installation sources. |
void |
setSubsetDirectory(String sd)
Sets the path to the subset folder. |
void |
setUserSuppressedSourceTermTypes(List sup_tgps)
Sets the List of user suppressed SourceTermType objects. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected List default_subsets
protected DefaultSubset selected_default_subset
| Constructor Detail |
|---|
public UserConfiguration(File config_file)
throws LocalException
UserConfiguration from the specified properties
File.
config_file - a valid Java properties File
LocalException - if there is a problem loading the properties file.
public UserConfiguration(Properties p)
throws LocalException
UserConfiguration from the specified
Properties.
p - Properties
LocalException - if there is a problem loading the properties.| Method Detail |
|---|
public List getPrecedence()
List of all SourceTermType objects in the
precedence order.
List of all SourceTermType objects.public void setPrecedence(List precedence)
List of all SourceTermType objects in the
precedence order.
precedence - Listpublic List getUserSuppressedSourceTermTypes()
List of user suppressed SourceTermType objects.
List of all user suppressed SourceTermType objects.public void setUserSuppressedSourceTermTypes(List sup_tgps)
List of user suppressed SourceTermType objects.
sup_tgps - Listpublic boolean isSourceTermTypeSuppressed(SourceTermType sab_tty)
SourceTermType is suppressed by the user.
sab_tty - SourceTermType in question
true if SourceTermType is suppressed
false otherwisepublic String[] getSourcePaths()
public void setSourcePaths(String[] ip)
ip - the paths to the installation sourcespublic void addSourcePath(String ip)
ip - source path to be addedpublic void removeSourcePath(String ip)
ip - source path to be removedpublic void clearSourcePaths()
public String getSubsetDirectory()
public void setSubsetDirectory(String sd)
sd - the path to the subset folderpublic MetamorphoSysInputStream getInputStream()
ConceptInputStream selected by the user.
ConceptInputStream selected by the userpublic void setInputStream(MetamorphoSysInputStream input_stream)
ConceptInputStream to be used during
subsetting and instantiates it.
input_stream - input streampublic MetamorphoSysOutputStream getOutputStream()
ConceptOutputStream selected by the user.
ConceptOutputStream selected by the userpublic void setOutputStream(MetamorphoSysOutputStream output_stream)
ConceptOutputStream to be used during subsetting and
instantiates it.
output_stream - output streampublic String getCurrentConfigurationFilename()
public void setCurrentConfigFile(String file)
file - the String path to the current configuration filepublic boolean getAutomaticSelection()
true if automatic selection mode is enabled,
false otherwise.public void setAutomaticSelection(boolean b)
b - the "automatic selection mode" flagpublic List getConceptSelectors()
List of active ConceptSelectors. These are
ConceptSelectors that have been loaded or imported and
enabled.
List of active ConceptSelectorspublic List getConceptContentSelectors()
List of active ConceptContentSelectors. These
are ConceptContentSelectors that have been loaded or imported
and enabled.
List of active ConceptContentSelectorspublic List getConceptManipulators()
List of active ConceptManipulators. These are
ConceptManipulators that have been loaded or imported and
enabled.
List of active ConceptManipulatorspublic List getOldStyleFilters()
List of old style filters. These are not
instances of ConceptSelector, ConceptManipulator,
or ConceptContentSelector.
List of active old style filterspublic List getActiveFilters()
List of active Filters.
These are filters that have been loaded or imported and enabled.
List of active Filters
public void reorderActiveFilters(int initial_index,
int final_index)
initial_index - position of filter initiallyfinal_index - position of filter after reorderpublic List getValidFilters()
List of valid Filters. These are filters that
have been loaded but not enabled.
List of valid Filterspublic boolean isOutputVersioned()
true if output stream should write versioned format.
false if output stream should write versionless format.
true if output stream should write versioned format
false if output stream should write versionless
formatpublic Properties getProperties(Configurable f)
Properties corresponding to the specified
Configurable.
f - the Configurable
Properties corresponding to the specified
Configurablepublic void setProperties(Configurable f)
Properties corresponding to the specified
Configurable.
f - Configurable
public String getProperty(GUIConfigurable f,
String key)
GUIConfigurable-specific property value.
f - a GUIConfigurablekey - a property name specific to the specified GUIConfigurable
GUIConfigurable-specific property value
public void removeProperty(GUIConfigurable f,
String key)
GUIConfigurable-specific property value.
f - a GUIConfigurablekey - a property name specific to the specified GUIConfigurablepublic void clearProperties(Configurable f)
Configurable.
f - the Configurablepublic void enableFilter(Filter f)
f - the Filter to enablepublic void importFilter(Filter f)
f - the Filter to importpublic void clearFilters()
public boolean hasDataChanged()
true if changed have been made, false
otherwisepublic void resetDataChanged()
public void setPropertiesChanged()
public String getReleaseVersion()
String indicating the release version corresponding to
the configuration file being used.
String indicating the release version corresponding to
the configuration file being used.public String getReleaseDate()
String indicating the release date corresponding to the
configuration file being used.
String indicating the release date corresponding to the
configuration file being used.public String getReleaseDescription()
String indicating the release description corresponding
to the configuration file being used.
String indicating the release description corresponding
to the configuration file being used.public String getLoadWarningsReport()
String report of warningspublic boolean didLoadCauseWarnings()
boolean true if warnings occurred false otherwise
protected Properties load(String file)
throws LocalException
Properties from the specified file. This method should be
overridden by subclasses. It opens the named properties file, configures
the class and returns the Properties object intact.
file - a String filename
Properties
LocalException - if there is a problem loading the properties
protected Properties loadProperties(Properties props)
throws LocalException
Properties.
props - user-level Properties
Properties
LocalException - if there is a problem loading the properties
public void saveState(File file_path)
throws LocalException
File.
file_path - the File
LocalException - if there is an error while saving the configurationpublic void setSelectedDefaultSubset(DefaultSubset ds)
DefaultSubset.
ds - the selected DefaultSubsetpublic DefaultSubset getSelectedDefaultSubset()
DefaultSubset.
DefaultSubsetpublic DefaultSubset[] getDefaultSubsets()
DefaultSubsets.
DefaultSubsetspublic List getDefaultSubsetsAsList()
DefaultSubsets as a List.
DefaultSubsets as a List
public void addProperty(String key,
String value)
key - the String keyvalue - the String value
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||