Package org.openscience.cdk.io.setting
Class IOSetting
- java.lang.Object
-
- org.openscience.cdk.io.setting.IOSetting
-
- All Implemented Interfaces:
ISetting
- Direct Known Subclasses:
BooleanIOSetting
,IntegerIOSetting
,OptionIOSetting
,StringIOSetting
public abstract class IOSetting extends Object implements ISetting
An interface for reader settings. It is subclassed by implementations, one for each type of field, e.g. IntReaderSetting.- Author:
- Egon Willighagen <egonw@sci.kun.nl>
- Source code:
- main
- Belongs to CDK module:
- io
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IOSetting.Importance
-
Constructor Summary
Constructors Constructor Description IOSetting(String name, IOSetting.Importance level, String question, String defaultSetting)
The default constructor that sets this field.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDefaultSetting()
IOSetting.Importance
getLevel()
String
getName()
Access the name of the setting.String
getQuestion()
String
getSetting()
Sets the setting for a certain question.void
setSetting(String setting)
Sets the setting for a certain question.
-
-
-
Field Detail
-
level
protected final IOSetting.Importance level
-
name
protected final String name
-
question
protected final String question
-
setting
protected String setting
-
-
Constructor Detail
-
IOSetting
public IOSetting(String name, IOSetting.Importance level, String question, String defaultSetting)
The default constructor that sets this field. All textual information is supposed to be English. Localization is taken care off by the ReaderConfigurator.- Parameters:
name
- Name of the settinglevel
- Level at which question is askedquestion
- Question that is popped to the user when the ReaderSetting needs settingdefaultSetting
- The default setting, used if not overwritten by a user
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:ISetting
Access the name of the setting.
-
getQuestion
public String getQuestion()
-
getDefaultSetting
public String getDefaultSetting()
-
getLevel
public IOSetting.Importance getLevel()
-
setSetting
public void setSetting(String setting) throws CDKException
Sets the setting for a certain question. It will throw a CDKException when the setting is not valid.- Throws:
CDKException
-
getSetting
public String getSetting()
Sets the setting for a certain question. It will throw a CDKException when the setting is not valid.
-
-