本文整理汇总了Java中com.rapidminer.parameter.conditions.PortConnectedCondition类的典型用法代码示例。如果您正苦于以下问题:Java PortConnectedCondition类的具体用法?Java PortConnectedCondition怎么用?Java PortConnectedCondition使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PortConnectedCondition类属于com.rapidminer.parameter.conditions包,在下文中一共展示了PortConnectedCondition类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getParameterTypes
import com.rapidminer.parameter.conditions.PortConnectedCondition; //导入依赖的package包/类
@Override
public List<ParameterType> getParameterTypes() {
List<ParameterType> types = super.getParameterTypes();
types.add(new ParameterTypeString(PARAMETER_COMMAND, "Command to execute.", false, false));
ParameterTypeBoolean t = new ParameterTypeBoolean(PARAMETER_LOG_STDOUT, "If set to true, the stdout stream of the command is redirected to the logfile.", true);
t.registerDependencyCondition(new PortConnectedCondition(this, new PortProvider() {
@Override public Port getPort() { return stdout; }
}, false, false));
types.add(t);
ParameterTypeBoolean e = new ParameterTypeBoolean(PARAMETER_LOG_STDERR, "If set to true, the stderr stream of the command is redirected to the logfile.", true);
e.registerDependencyCondition(new PortConnectedCondition(this, new PortProvider() {
@Override public Port getPort() { return stderr; }
}, false, false));
types.add(e);
return types;
}
示例2: getParameterTypes
import com.rapidminer.parameter.conditions.PortConnectedCondition; //导入依赖的package包/类
@Override
public List<ParameterType> getParameterTypes() {
List<ParameterType> types = new LinkedList<ParameterType>();
types.add(makeFileParameterType());
// types.add(new ParameterTypeFile(PARAMETER_CSV_FILE,
// "The CSV file which should be written.", "csv", false));
types.add(new ParameterTypeString(PARAMETER_COLUMN_SEPARATOR, "The column separator.", ";", false));
types.add(new ParameterTypeBoolean(PARAMETER_WRITE_ATTRIBUTE_NAMES, "Indicates if the attribute names should be written as first row.", true, false));
types.add(new ParameterTypeBoolean(PARAMETER_QUOTE_NOMINAL_VALUES, "Indicates if nominal values should be quoted with double quotes.", true, false));
types.add(new ParameterTypeBoolean(PARAMETER_FORMAT_DATE,
"Indicates if date attributes are written as a formated string or as milliseconds past since January 1, 1970, 00:00:00 GMT", true, true));
ParameterType type = new ParameterTypeBoolean(PARAMETER_APPEND_FILE,
"Indicates if new content should be appended to the file or if the pre-existing file content should be overwritten.", false, false);
type.registerDependencyCondition(new PortConnectedCondition(this, new PortProvider() {
@Override
public Port getPort() {
return fileOutputPort;
}
}, true, false));
types.add(type);
types.addAll(super.getParameterTypes());
return types;
}
示例3: makeFileParameterType
import com.rapidminer.parameter.conditions.PortConnectedCondition; //导入依赖的package包/类
/**
* Creates the file parameter named by fileParameterName that depends on whether or not the port
* returned by the given PortProvider is connected.
*/
public static ParameterType makeFileParameterType(ParameterHandler parameterHandler, String parameterName,
String fileExtension, PortProvider portProvider) {
final ParameterTypeFile fileParam = new ParameterTypeFile(parameterName, "Name of the file to write the data in.",
true, new String[] { fileExtension });
fileParam.setExpert(false);
fileParam.registerDependencyCondition(new PortConnectedCondition(parameterHandler, portProvider, true, false));
return fileParam;
}
示例4: getParameterTypes
import com.rapidminer.parameter.conditions.PortConnectedCondition; //导入依赖的package包/类
@Override
public List<ParameterType> getParameterTypes() {
List<ParameterType> types = new LinkedList<ParameterType>();
types.add(makeFileParameterType());
// types.add(new ParameterTypeFile(PARAMETER_CSV_FILE,
// "The CSV file which should be written.", "csv", false));
types.add(new ParameterTypeString(PARAMETER_COLUMN_SEPARATOR, "The column separator.", ";", false));
types.add(new ParameterTypeBoolean(PARAMETER_WRITE_ATTRIBUTE_NAMES,
"Indicates if the attribute names should be written as first row.", true, false));
types.add(new ParameterTypeBoolean(PARAMETER_QUOTE_NOMINAL_VALUES,
"Indicates if nominal values should be quoted with double quotes.", true, false));
types.add(new ParameterTypeBoolean(
PARAMETER_FORMAT_DATE,
"Indicates if date attributes are written as a formated string or as milliseconds past since January 1, 1970, 00:00:00 GMT",
true, true));
ParameterType type = new ParameterTypeBoolean(
PARAMETER_APPEND_FILE,
"Indicates if new content should be appended to the file or if the pre-existing file content should be overwritten.",
false, false);
type.registerDependencyCondition(new PortConnectedCondition(this, new PortProvider() {
@Override
public Port getPort() {
return fileOutputPort;
}
}, true, false));
types.add(type);
types.addAll(super.getParameterTypes());
return types;
}
示例5: getParameterTypes
import com.rapidminer.parameter.conditions.PortConnectedCondition; //导入依赖的package包/类
@Override
public List<ParameterType> getParameterTypes() {
List<ParameterType> types = new LinkedList<ParameterType>();
types.add(makeFileParameterType());
// types.add(new ParameterTypeFile(PARAMETER_CSV_FILE,
// "The CSV file which should be written.", "csv", false));
types.add(new ParameterTypeString(PARAMETER_COLUMN_SEPARATOR, "The column separator.", ";", false));
types.add(new ParameterTypeBoolean(PARAMETER_WRITE_ATTRIBUTE_NAMES,
"Indicates if the attribute names should be written as first row.", true, false));
types.add(new ParameterTypeBoolean(PARAMETER_QUOTE_NOMINAL_VALUES,
"Indicates if nominal values should be quoted with double quotes.", true, false));
types.add(new ParameterTypeBoolean(PARAMETER_FORMAT_DATE,
"Indicates if date attributes are written as a formated string or as milliseconds past since January 1, 1970, 00:00:00 GMT",
true, true));
ParameterType type = new ParameterTypeBoolean(PARAMETER_APPEND_FILE,
"Indicates if new content should be appended to the file or if the pre-existing file content should be overwritten.",
false, false);
type.registerDependencyCondition(new PortConnectedCondition(this, new PortProvider() {
@Override
public Port getPort() {
return fileOutputPort;
}
}, true, false));
types.add(type);
types.addAll(super.getParameterTypes());
return types;
}
示例6: makeFileParameterType
import com.rapidminer.parameter.conditions.PortConnectedCondition; //导入依赖的package包/类
/** Creates the file parameter named by fileParameterName
* that depends on whether or not the port returned by the given PortProvider is connected. */
public static ParameterType makeFileParameterType(ParameterHandler parameterHandler, String parameterName, String fileExtension, PortProvider portProvider) {
final ParameterTypeFile fileParam = new ParameterTypeFile(parameterName, "Name of the file to write the data in.", true, new String[] { fileExtension });
fileParam.setExpert(false);
fileParam.registerDependencyCondition(new PortConnectedCondition(parameterHandler, portProvider, true, false));
return fileParam;
}
示例7: makeFileParameterType
import com.rapidminer.parameter.conditions.PortConnectedCondition; //导入依赖的package包/类
/** Creates the file parameter named by fileParameterName
* that depends on whether or not the port returned by the given PortProvider is connected.
*
* @param parameterHandler used to check dependencies
* @param parameterName Name of the parameter that is created
* @param description Description of the parameter
* @param portProvider port which accepts the FileObject. If this port is connected, the parameter will be hidden.
* @param fileExtensions allowed file types.
* */
public static ParameterType makeFileParameterType(ParameterHandler parameterHandler, String parameterName, String description, PortProvider portProvider,
String... fileExtensions) {
String[] fileExtArray = new String[fileExtensions.length];
int i = 0;
for (String fileExtension : fileExtensions) {
fileExtArray[i++] = fileExtension;
}
final ParameterTypeFile fileParam = new ParameterTypeFile(parameterName, description, true, fileExtArray);
fileParam.setExpert(false);
fileParam.registerDependencyCondition(new PortConnectedCondition(parameterHandler, portProvider, true, false));
return fileParam;
}
示例8: makeFileParameterType
import com.rapidminer.parameter.conditions.PortConnectedCondition; //导入依赖的package包/类
/**
* Creates the file parameter named by fileParameterName that depends on whether or not the port
* returned by the given PortProvider is connected.
*
* @param parameterHandler
* used to check dependencies
* @param parameterName
* Name of the parameter that is created
* @param description
* Description of the parameter
* @param portProvider
* port which accepts the FileObject. If this port is connected, the parameter will
* be hidden.
* @param addAllFileFormatsFilter
* defines whether a filter for all file extension should be added as default filter
* for the file chooser dialog. This makes most sense for file reading operations
* that allow to read files with multiple file extensions. For file writing
* operations it is not recommended as the new filter will not add the correct file
* ending when entering the path of a file that does not exist.
* @param fileExtensions
* allowed file types.
* */
public static ParameterType makeFileParameterType(ParameterHandler parameterHandler, String parameterName,
String description, PortProvider portProvider, boolean addAllFileExtensionsFilter, String... fileExtensions) {
String[] fileExtArray = new String[fileExtensions.length];
int i = 0;
for (String fileExtension : fileExtensions) {
fileExtArray[i++] = fileExtension;
}
final ParameterTypeFile fileParam = new ParameterTypeFile(parameterName, description, true, fileExtArray);
fileParam.setExpert(false);
fileParam.setAddAllFileExtensionsFilter(addAllFileExtensionsFilter);
fileParam.registerDependencyCondition(new PortConnectedCondition(parameterHandler, portProvider, true, false));
return fileParam;
}
示例9: addFileDependencyCondition
import com.rapidminer.parameter.conditions.PortConnectedCondition; //导入依赖的package包/类
/**
* Adds a new (file-)OutputPortNotConnectedCondition for a given parameter.
*
* @param parameter
* @param parameterHandler
* @param portProvider
*/
public static void addFileDependencyCondition(ParameterType parameter, ParameterHandler parameterHandler,
PortProvider portProvider) {
parameter.registerDependencyCondition(new PortConnectedCondition(parameterHandler, portProvider, true, false));
}
示例10: addFileDependencyCondition
import com.rapidminer.parameter.conditions.PortConnectedCondition; //导入依赖的package包/类
/**
* Adds a new (file-)InputPortNotConnectedCondition for a given parameter.
*
* @param parameter
* @param parameterHandler
* @param portProvider
*/
public static void addFileDependencyCondition(ParameterType parameter, ParameterHandler parameterHandler,
PortProvider portProvider) {
parameter.registerDependencyCondition(new PortConnectedCondition(parameterHandler, portProvider, true, false));
}
示例11: addFileDependencyCondition
import com.rapidminer.parameter.conditions.PortConnectedCondition; //导入依赖的package包/类
/**
* Adds a new (file-)OutputPortNotConnectedCondition for a given parameter.
* @param parameter
* @param parameterHandler
* @param portProvider
*/
public static void addFileDependencyCondition(ParameterType parameter, ParameterHandler parameterHandler, PortProvider portProvider) {
parameter.registerDependencyCondition(new PortConnectedCondition(parameterHandler, portProvider, true, false));
}
示例12: addFileDependencyCondition
import com.rapidminer.parameter.conditions.PortConnectedCondition; //导入依赖的package包/类
/**
* Adds a new (file-)InputPortNotConnectedCondition for a given parameter.
* @param parameter
* @param parameterHandler
* @param portProvider
*/
public static void addFileDependencyCondition(ParameterType parameter, ParameterHandler parameterHandler, PortProvider portProvider) {
parameter.registerDependencyCondition(new PortConnectedCondition(parameterHandler, portProvider, true, false));
}