org.knime.base.node.io.listfiles
Class ListFilesSettings

java.lang.Object
  extended by org.knime.base.node.io.listfiles.ListFilesSettings

public class ListFilesSettings
extends Object

Author:
Bernd Wiswedel, KNIME.com, Zurich, Switzerland

Field Summary
static String CASE_SENSITIVE_STRING
          Key to store the case sensitive settings.
static String EXTENSIONS_SETTINGS
          Key to store the extension_settings.
static String FILTER_SETTINGS
          Key to store the Filter Settings.
static String LOCATION_SETTINGS
          Key to store the location settings.
static String RECURSIVE_SETTINGS
          Key to store the RECURSIVE_SETTINGS.
 
Constructor Summary
ListFilesSettings()
           
 
Method Summary
 Collection<File> getDirectoriesFromLocationString()
          Split location string by ";" and return individual directories.
(package private) static String[] getExtensionHistory()
           
 String getExtensionsString()
           
 ListFiles.Filter getFilter()
           
(package private) static String[] getLocationHistory()
           
 String getLocationString()
           
 boolean isCaseSensitive()
           
 boolean isRecursive()
           
protected  void loadSettingsInDialog(NodeSettingsRO settings)
          Load settings in dialog (no fail).
protected  void loadSettingsInModel(NodeSettingsRO settings)
          Load settings, fail if incomplete.
protected  void saveSettingsTo(NodeSettingsWO settings)
          Save settings in model & dialog.
 void setCaseSensitive(boolean caseSensitive)
           
 void setExtensionsString(String extensionsString)
           
 void setFilter(ListFiles.Filter filter)
           
 void setLocationString(String locationString)
           
 void setRecursive(boolean recursive)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOCATION_SETTINGS

public static final String LOCATION_SETTINGS
Key to store the location settings.

See Also:
Constant Field Values

RECURSIVE_SETTINGS

public static final String RECURSIVE_SETTINGS
Key to store the RECURSIVE_SETTINGS.

See Also:
Constant Field Values

FILTER_SETTINGS

public static final String FILTER_SETTINGS
Key to store the Filter Settings.

See Also:
Constant Field Values

CASE_SENSITIVE_STRING

public static final String CASE_SENSITIVE_STRING
Key to store the case sensitive settings.

See Also:
Constant Field Values

EXTENSIONS_SETTINGS

public static final String EXTENSIONS_SETTINGS
Key to store the extension_settings.

See Also:
Constant Field Values
Constructor Detail

ListFilesSettings

public ListFilesSettings()
Method Detail

getLocationString

public String getLocationString()
Returns:
the locationString

setLocationString

public void setLocationString(String locationString)
Parameters:
locationString - the locationString to set

getExtensionsString

public String getExtensionsString()
Returns:
the extensionsString

setExtensionsString

public void setExtensionsString(String extensionsString)
Parameters:
extensionsString - the extensionsString to set

isRecursive

public boolean isRecursive()
Returns:
the recursive

setRecursive

public void setRecursive(boolean recursive)
Parameters:
recursive - the recursive to set

isCaseSensitive

public boolean isCaseSensitive()
Returns:
the caseSensitive

setCaseSensitive

public void setCaseSensitive(boolean caseSensitive)
Parameters:
caseSensitive - the caseSensitive to set

getFilter

public ListFiles.Filter getFilter()
Returns:
the filter

setFilter

public void setFilter(ListFiles.Filter filter)
Parameters:
filter - the filter to set
Throws:
NullPointerException - If argument is null.

getDirectoriesFromLocationString

public Collection<File> getDirectoriesFromLocationString()
                                                  throws InvalidSettingsException
Split location string by ";" and return individual directories.

Returns:
A list of files representing directories.
Throws:
InvalidSettingsException - If the argument is invalid or does not represent a list of existing directories.

loadSettingsInModel

protected void loadSettingsInModel(NodeSettingsRO settings)
                            throws InvalidSettingsException
Load settings, fail if incomplete.

Parameters:
settings - To load from.
Throws:
InvalidSettingsException - If that fails.

loadSettingsInDialog

protected void loadSettingsInDialog(NodeSettingsRO settings)
Load settings in dialog (no fail).

Parameters:
settings - To load from.

saveSettingsTo

protected void saveSettingsTo(NodeSettingsWO settings)
Save settings in model & dialog.

Parameters:
settings - To save to.

getLocationHistory

static String[] getLocationHistory()
Returns:
the previously analyzed folders.

getExtensionHistory

static String[] getExtensionHistory()
Returns:
the previous selected extension field strings.


Copyright, 2003 - 2012. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.