|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nih.nlm.mms.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 Filter s. |
boolean |
getAutomaticSelection()
Returns a flag indicating whether or not "auto selection mode" is on. |
List |
getConceptContentSelectors()
Returns the List of active ConceptContentSelector s. |
List |
getConceptManipulators()
Returns the List of active ConceptManipulator s. |
List |
getConceptSelectors()
Returns the List of active ConceptSelector s. |
String |
getCurrentConfigurationFilename()
Returns the path to the current configuration file. |
DefaultSubset[] |
getDefaultSubsets()
Returns all available DefaultSubset s. |
List |
getDefaultSubsetsAsList()
Returns all available DefaultSubset s 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. |
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 |
getValidFilters()
Returns the List of valid Filter s. |
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. |
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 |
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. |
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 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 ConceptSelector
s. These are
ConceptSelector
s that have been loaded or imported and
enabled.
List
of active ConceptSelector
spublic List getConceptContentSelectors()
List
of active ConceptContentSelector
s. These
are ConceptContentSelector
s that have been loaded or imported
and enabled.
List
of active ConceptContentSelector
spublic List getConceptManipulators()
List
of active ConceptManipulator
s. These are
ConceptManipulator
s that have been loaded or imported and
enabled.
List
of active ConceptManipulator
spublic 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 Filter
s.
These are filters that have been loaded or imported and enabled.
List
of active Filter
spublic 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 Filter
s. These are filters that
have been loaded but not enabled.
List
of valid Filter
spublic 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
Configurable
public 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 GUIConfigurable
key
- a property name specific to the specified GUIConfigurable
GUIConfigurable
-specific property valuepublic void removeProperty(GUIConfigurable f, String key)
GUIConfigurable
-specific property value.
f
- a GUIConfigurable
key
- a property name specific to the specified GUIConfigurable
public void clearProperties(Configurable f)
Configurable
.
f
- the Configurable
public 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 otherwiseprotected 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 propertiesprotected Properties loadProperties(Properties props) throws LocalException
Properties
.
props
- user-level Properties
Properties
LocalException
- if there is a problem loading the propertiespublic 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 DefaultSubset
public DefaultSubset getSelectedDefaultSubset()
DefaultSubset
.
DefaultSubset
public DefaultSubset[] getDefaultSubsets()
DefaultSubset
s.
DefaultSubset
spublic List getDefaultSubsetsAsList()
DefaultSubset
s as a List
.
DefaultSubset
s 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 |