當前位置: 首頁>>代碼示例>>Java>>正文


Java PortConnectedCondition類代碼示例

本文整理匯總了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;
}
 
開發者ID:rapidminer,項目名稱:rapidminer-5,代碼行數:18,代碼來源:CommandLineOperator.java

示例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;
}
 
開發者ID:rapidminer,項目名稱:rapidminer-5,代碼行數:25,代碼來源:CSVExampleSetWriter.java

示例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;
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:13,代碼來源:FileOutputPortHandler.java

示例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;
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:31,代碼來源:CSVExampleSetWriter.java

示例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;
}
 
開發者ID:rapidminer,項目名稱:rapidminer-studio,代碼行數:29,代碼來源:CSVExampleSetWriter.java

示例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;
}
 
開發者ID:rapidminer,項目名稱:rapidminer-5,代碼行數:9,代碼來源:FileOutputPortHandler.java

示例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;
}
 
開發者ID:rapidminer,項目名稱:rapidminer-5,代碼行數:22,代碼來源:FileInputPortHandler.java

示例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;
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:36,代碼來源:FileInputPortHandler.java

示例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));
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:12,代碼來源:FileOutputPortHandler.java

示例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));
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:12,代碼來源:FileInputPortHandler.java

示例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));
}
 
開發者ID:rapidminer,項目名稱:rapidminer-5,代碼行數:10,代碼來源:FileOutputPortHandler.java

示例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));
}
 
開發者ID:rapidminer,項目名稱:rapidminer-5,代碼行數:10,代碼來源:FileInputPortHandler.java


注:本文中的com.rapidminer.parameter.conditions.PortConnectedCondition類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。