• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java InvalidSettingsException类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.knime.core.node.InvalidSettingsException的典型用法代码示例。如果您正苦于以下问题:Java InvalidSettingsException类的具体用法?Java InvalidSettingsException怎么用?Java InvalidSettingsException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



InvalidSettingsException类属于org.knime.core.node包,在下文中一共展示了InvalidSettingsException类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: validateSettings

import org.knime.core.node.InvalidSettingsException; //导入依赖的package包/类
/**
 * Verificar se as configurações podem ser aplicadas ao modelo.
 * <b>NÃO fazer nenhuma atribuição de valores do modelo aqui!!!!!</b><BR>
 * {@inheritDoc}
 */
@Override
protected void validateSettings(final NodeSettingsRO settings)
        throws InvalidSettingsException {
        
    // TODO check if the settings could be applied to our model
    // e.g. if the count is in a certain range (which is ensured by the
    // SettingsModel).
    // Do not actually set any values of any member variables.
	//m_str.validateSettings(settings);
	logger.info("---------------- ENTRANDO NO MÉTODO validateSettings()-----------------------");
	Iterator<String> it = settings.iterator();
	while (it.hasNext()) {
		String str = it.next();
		logger.info("settings: " + str);
	}
	logger.info("String m_selStr antes de validateSettings: " + m_selStr.getKey() + " = " + m_selStr.getStringValue());
	m_selStr.validateSettings(settings);
	logger.info("String m_selStr após validateSettings: " + m_selStr.getKey() + " = " + m_selStr.getStringValue());
}
 
开发者ID:daniacs,项目名称:knime_brtagger,代码行数:25,代码来源:BrTaggerNodeModel.java


示例2: configure

import org.knime.core.node.InvalidSettingsException; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@SuppressWarnings("deprecation")
@Override
protected DataTableSpec[] configure(final DataTableSpec[] inSpecs)
        throws InvalidSettingsException {

    m_classColIdx = NodeUtils.autoColumnSelection(inSpecs[DATA_PORT],
            m_classColModel, StringValue.class, this.getClass());

    m_repColIdx = NodeUtils.autoColumnSelection(inSpecs[DATA_PORT],
            m_repColModel, DataValue.class, this.getClass());

    m_renderer = inSpecs[DATA_PORT].getColumnSpec(m_repColIdx).getType()
            .getRenderer(inSpecs[DATA_PORT].getColumnSpec(m_repColIdx));

    m_colNames = inSpecs[DATA_PORT].getColumnNames();

    // Pass through
    if (inSpecs[PASSTHROUGH_PORT] != null) {
        return new DataTableSpec[] { inSpecs[PASSTHROUGH_PORT] };
    }
    // else route the input port
    return new DataTableSpec[] { inSpecs[DATA_PORT] };
}
 
开发者ID:knime,项目名称:knime-activelearning,代码行数:27,代码来源:ActiveLearnLoopEndNodeModel.java


示例3: initializeClassMap

import org.knime.core.node.InvalidSettingsException; //导入依赖的package包/类
/**
 * Reads the classes from the ground truth table and adds them to the class
 * map.
 *
 * @param inData
 * @throws InvalidSettingsException
 */
private void initializeClassMap(final BufferedDataTable[] inData)
        throws InvalidSettingsException {
    final int classColIdxLabeledTable = NodeUtils.autoColumnSelection(
            inData[LABELED_PORT].getDataTableSpec(),
            m_groundTruthColumnModel, StringValue.class, this.getClass());

    // initialize all classes map
    m_allClassesMap = new HashMap<>((int)inData[LABELED_PORT].size());

    for (final DataRow row : inData[LABELED_PORT]) {
        m_allClassesMap.put(row.getKey(),
                ((StringCell) row.getCell(classColIdxLabeledTable))
                        .getStringValue());
    }
}
 
开发者ID:knime,项目名称:knime-activelearning,代码行数:23,代码来源:DBGActiveLearnLoopEndNodeModel.java


示例4: configure

import org.knime.core.node.InvalidSettingsException; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected DataTableSpec[] configure(final DataTableSpec[] inSpecs)
        throws InvalidSettingsException {

    // a^2
    final double alphaValue = m_radiusAlphaModel.getDoubleValue();
    m_alpha = 4.0d / (alphaValue * alphaValue);

    // a^2*rb^2
    m_beta = 4.0d / (alphaValue * alphaValue * FACTOR_RB * FACTOR_RB);

    m_exploitation = m_exploitationModel.getDoubleValue();

    m_classIdx = NodeUtils.autoColumnSelection(inSpecs[1], m_classColModel,
            StringValue.class, PBACScorerNodeModel.class);

    m_doubleIndices = NodeTools
            .collectAllColumnIndicesOfType(DoubleValue.class, inSpecs[0]);

    m_resSpec = createResRearranger(inSpecs[0]);

    return new DataTableSpec[] { m_resSpec.createSpec() };
}
 
开发者ID:knime,项目名称:knime-activelearning,代码行数:27,代码来源:PBACScorerNodeModel.java


示例5: execute

import org.knime.core.node.InvalidSettingsException; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected BufferedDataTable[] execute(final BufferedDataTable[] inData,
        final ExecutionContext exec) throws Exception {

    if (m_columnFilterModel.applyTo(inData[0].getDataTableSpec())
            .getIncludes().length == 0) {
        throw new InvalidSettingsException("No Columns selected!");
    }

    final ColumnRearranger c =
            createResRearranger(inData[0].getDataTableSpec());
    final BufferedDataTable out =
            exec.createColumnRearrangeTable(inData[0], c, exec);
    return new BufferedDataTable[] { out };
}
 
开发者ID:knime,项目名称:knime-activelearning,代码行数:19,代码来源:AbstractUncertaintyNodeModel.java


示例6: createResRearranger

import org.knime.core.node.InvalidSettingsException; //导入依赖的package包/类
/**
 * {@inheritDoc} Variance based score.
 */
@Override
protected ColumnRearranger createResRearranger(final DataTableSpec inSpec)
        throws InvalidSettingsException {
    final ColumnRearranger rearranger = new ColumnRearranger(inSpec);
    final DataColumnSpec newColSpec =
            new DataColumnSpecCreator("Variance Score", DoubleCell.TYPE)
                    .createSpec();

    // utility object that performs the calculation
    rearranger.append(new SingleCellFactory(newColSpec) {
        final List<Integer> m_selectedIndicies =
                NodeTools.getIndicesFromFilter(inSpec, m_columnFilterModel,
                        DoubleValue.class, VarianceScorerNodeModel.class);

        @Override
        public DataCell getCell(final DataRow row) {
            return new DoubleCell(MathUtils.variance(
                    NodeTools.toDoubleArray(row, m_selectedIndicies)));
        }
    });
    return rearranger;
}
 
开发者ID:knime,项目名称:knime-activelearning,代码行数:26,代码来源:VarianceScorerNodeModel.java


示例7: configure

import org.knime.core.node.InvalidSettingsException; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected DataTableSpec[] configure(final DataTableSpec[] inSpecs)
        throws InvalidSettingsException {

    if (NodeTools.collectAllColumnIndicesOfType(DoubleValue.class,
            inSpecs[UNLABELED_PORT]).isEmpty()) {
        throw new InvalidSettingsException("No Double columns avaiable!");
    }

    m_beta = 4.0d / ((m_radiusAlphaModel.getDoubleValue() * FACTOR_RB)
            * (m_radiusAlphaModel.getDoubleValue() * FACTOR_RB));

    m_alpha = 4.0d / (m_radiusAlphaModel.getDoubleValue()
            * m_radiusAlphaModel.getDoubleValue());

    m_resSpec = createResRearranger(inSpecs[UNLABELED_PORT]);

    return new DataTableSpec[] { m_resSpec.createSpec() };
}
 
开发者ID:knime,项目名称:knime-activelearning,代码行数:23,代码来源:NodePotentialScorerNodeModel.java


示例8: configure

import org.knime.core.node.InvalidSettingsException; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected DataTableSpec[] configure(final DataTableSpec[] inSpecs)
        throws InvalidSettingsException
    {
    if(inSpecs==null || inSpecs.length!=1)
    	{
    	throw new InvalidSettingsException("Expected one table.");
    	}
   
    findColumnIndex(inSpecs[0],m_chromCol,StringCell.TYPE);
    findColumnIndex(inSpecs[0],m_posCol,IntCell.TYPE);
    findColumnIndex(inSpecs[0],m_refCol,StringCell.TYPE);
    findColumnIndex(inSpecs[0],m_altCol,StringCell.TYPE);
    
	return new DataTableSpec[0];
	}
 
开发者ID:lindenb,项目名称:knime4bio,代码行数:20,代码来源:AbstractPredictionOutNodeModel.java


示例9: loadSettings

import org.knime.core.node.InvalidSettingsException; //导入依赖的package包/类
/** Loads parameters in NodeModel.
 * @param settings To load from.
 * @throws InvalidSettingsException If incomplete or wrong.
 */
public void loadSettings(final NodeSettingsRO settings)
        throws InvalidSettingsException {
    m_scriptImports = settings.getString(SCRIPT_IMPORTS);
    m_scriptFields = settings.getString(SCRIPT_FIELDS);
    m_scriptBody = settings.getString(SCRIPT_BODY);
    m_jarFiles = settings.getStringArray(JAR_FILES);
    m_outCols.loadSettings(settings.getConfig(OUT_COLS));
    m_outVars.loadSettings(settings.getConfig(OUT_VARS));
    m_inCols.loadSettings(settings.getConfig(IN_COLS));
    m_inVars.loadSettings(settings.getConfig(IN_VARS));
    m_version = settings.getString(VERSION);
    if (settings.containsKey(TEMPLATE_UUID)) {
        m_templateUUID = settings.getString(TEMPLATE_UUID);
    }
    // added in 2.8 (only java edit variable) -- 2.7 scripts were always run on execute()
    m_runOnExecute = settings.getBoolean(RUN_ON_EXECUTE, true);
}
 
开发者ID:pavloff-de,项目名称:spark4knime,代码行数:22,代码来源:JavaSnippetSettings.java


示例10: loadSettingsForDialog

import org.knime.core.node.InvalidSettingsException; //导入依赖的package包/类
/** Loads parameters in Dialog.
 * @param settings To load from.
 */
public void loadSettingsForDialog(final NodeSettingsRO settings) {
    try {
        m_scriptImports = settings.getString(SCRIPT_IMPORTS, "");
        m_scriptFields = settings.getString(SCRIPT_FIELDS, "");
        m_scriptBody = settings.getString(SCRIPT_BODY, null);
        m_jarFiles = settings.getStringArray(JAR_FILES, new String[0]);
        m_outCols.loadSettingsForDialog(settings.getConfig(OUT_COLS));
        m_outVars.loadSettingsForDialog(settings.getConfig(OUT_VARS));
        m_inCols.loadSettingsForDialog(settings.getConfig(IN_COLS));
        m_inVars.loadSettingsForDialog(settings.getConfig(IN_VARS));
        m_version = settings.getString(VERSION, JavaSnippet.VERSION_1_X);
        m_templateUUID = settings.getString(TEMPLATE_UUID, null);
        // added in 2.8 (only java edit variable)
        m_runOnExecute = settings.getBoolean(RUN_ON_EXECUTE, false);
    } catch (InvalidSettingsException e) {
        throw new IllegalStateException(e);
    }
}
 
开发者ID:pavloff-de,项目名称:spark4knime,代码行数:22,代码来源:JavaSnippetSettings.java


示例11: createDataTableSpec

import org.knime.core.node.InvalidSettingsException; //导入依赖的package包/类
private DataTableSpec createDataTableSpec() throws InvalidSettingsException
{
List<String> tags=extractFields();
if(tags.isEmpty()) throw new InvalidSettingsException("No tag was defined");
DataColumnSpec cols[]=new DataColumnSpec[tags.size()*this.m_callColumns.getIncludeList().size()];
DataType t=getDataType();
int n=0;
for(String call:this.m_callColumns.getIncludeList())
	{
	for(int i=0;i< tags.size();++i)
		{
		cols[n++]=new DataColumnSpecCreator(call+":"+tags.get(i),t).createSpec();
		}
	}
return new DataTableSpec(cols);
}
 
开发者ID:lindenb,项目名称:knime4bio,代码行数:17,代码来源:ExtractFormatMultiNodeModel.java


示例12: configure

import org.knime.core.node.InvalidSettingsException; //导入依赖的package包/类
@Override
  protected DataTableSpec[] configure(DataTableSpec[] inSpecs)
  		throws InvalidSettingsException {
  	if(inSpecs==null || inSpecs.length!=1)
  		{
  		throw new InvalidSettingsException("Expected one table");
  		}
  	
  	DataTableSpec in=inSpecs[0];
  	int chromCol= in.findColumnIndex(m_chromCol.getColumnName());
if(chromCol==-1) throw new InvalidSettingsException("Cannot find column for chrom");
if(!(in.getColumnSpec(chromCol).getType().equals(IntCell.TYPE) ||
		in.getColumnSpec(chromCol).getType().equals(StringCell.TYPE)
   ))
	{
	throw new InvalidSettingsException("Bad type for chrom:"+in.getColumnSpec(chromCol).getType());
	}
DataTableSpec spec2= ReplacedColumnsTable.createTableSpec(in,
		new DataColumnSpecCreator(in.getColumnSpec(chromCol).getName(),StringCell.TYPE).createSpec(),
		chromCol);
  	
  	return new DataTableSpec[]{spec2};
  	}
 
开发者ID:lindenb,项目名称:knime4bio,代码行数:24,代码来源:NormalizeChromNodeModel.java


示例13: toFile

import org.knime.core.node.InvalidSettingsException; //导入依赖的package包/类
/** Convert file location to File. Also accepts file in URL format
 * (e.g. local drop files as URL).
 * @param location The location string.
 * @return The file to the location
 * @throws InvalidSettingsException if argument is null, empty or the file
 * does not exist.
 */
public static final File toFile(final String location) throws InvalidSettingsException {
    CheckUtils.checkSetting(StringUtils.isNotEmpty(location), "Invalid (empty) jar file location");
    File result;
    URL url = null;
    try {
        url = new URL(location);
    } catch (MalformedURLException mue) {
    }
    if (url != null) {
        result = FileUtil.getFileFromURL(url);
    } else {
        result = new File(location);
    }
    CheckUtils.checkSetting(result != null && result.exists(),
            "Can't read file \"%s\"; invalid class path", location);
    return result;
}
 
开发者ID:pavloff-de,项目名称:spark4knime,代码行数:25,代码来源:JavaSnippetUtil.java


示例14: configure

import org.knime.core.node.InvalidSettingsException; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected DataTableSpec[] configure(final DataTableSpec[] inSpecs)
        throws InvalidSettingsException
    {
    if(inSpecs!=null && inSpecs.length!=0)
    	{
    	throw new InvalidSettingsException("Expected zero input.");
    	}
  

	return new DataTableSpec[]{
		null,
		createVcfHeaderDataColumnSpec(),
		};
	}
 
开发者ID:lindenb,项目名称:knime4bio,代码行数:19,代码来源:ReadMultiVCFNodeModel.java


示例15: getDataType

import org.knime.core.node.InvalidSettingsException; //导入依赖的package包/类
public DataType getDataType() throws InvalidSettingsException
 	{
 	if(m_dataType.getStringValue().equals("Long"))
 		{
 		return LongCell.TYPE;
 		}
 	else if(m_dataType.getStringValue().equals("Integer"))
 		{
 		return IntCell.TYPE;
 		}
 	else if(m_dataType.getStringValue().equals("Double"))
{
return DoubleCell.TYPE;
}
 	else if(m_dataType.getStringValue().equals("Boolean"))
 		{
 		return BooleanCell.TYPE;
 		}
 	return StringCell.TYPE;
 	}
 
开发者ID:lindenb,项目名称:knime4bio,代码行数:21,代码来源:ExtractFormatMultiNodeModel.java


示例16: configure

import org.knime.core.node.InvalidSettingsException; //导入依赖的package包/类
@Override
public void configure(PortMetadata[] inputTypes, XPathTable operator)
		throws InvalidSettingsException {
	RecordTokenType rtt = ((RecordMetadata)inputTypes[0]).getType();
	if (inputField.getStringValue().isEmpty()) {
		// Choose first string column.
		boolean found = false;
		for(Field f : rtt) {
			if (f.getType().equals(TokenTypeConstant.STRING)) {
				found = true;
				inputField.setStringValue(f.getName());
			}
		}
		if (!found) {
			inputField.setStringValue(rtt.get(0).getName());
		}
	}
	operator.setExpression(expression.getStringValue());
	operator.setSchema(model.schema.getSchema(new TextConversionDefaults()));
	operator.setInputField(inputField.getStringValue());
	operator.setIncludeSourceXML(includeSource.getBooleanValue());
	operator.setIncludeNodeXML(includeNode.getBooleanValue());
	operator.setIncludeChildXML(includeChildren.getBooleanValue());
}
 
开发者ID:ActianCorp,项目名称:df-xpath,代码行数:25,代码来源:XPathTableNodeSettings.java


示例17: configure

import org.knime.core.node.InvalidSettingsException; //导入依赖的package包/类
@Override
  protected DataTableSpec[] configure(DataTableSpec[] inSpecs)
  		throws InvalidSettingsException {
  	if(inSpecs==null || inSpecs.length!=1)
  		{
  		throw new InvalidSettingsException("Expected one tables");
  		}
  	if(m_ucscHandler.getStringValue().isEmpty())
  		{
  		throw new InvalidSettingsException("UCSC database was not selected");
  		}
  	UcscDatabaseMysqlHandler handler=UCSC_HANDLERS.getHandlerById(m_ucscHandler.getStringValue());
  	if(m_ucscHandler.getStringValue().isEmpty())
	{
	throw new InvalidSettingsException("undefined handler "+m_ucscHandler.getStringValue());
	}
  	DataTableSpec in=inSpecs[0];
  	findColumnIndex(in,this.m_chrom1Col,StringCell.TYPE);
findColumnIndex(in, this.m_posCol,IntCell.TYPE);
  	
  	return new DataTableSpec[]{new DataTableSpec(in,handler.getDataTableSpec())};
  	}
 
开发者ID:lindenb,项目名称:knime4bio,代码行数:23,代码来源:MysqlUCSCNodeModel.java


示例18: loadValidatedSettingsFrom

import org.knime.core.node.InvalidSettingsException; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected void loadValidatedSettingsFrom(final NodeSettingsRO settings)
        throws InvalidSettingsException {
        
    // TODO load (valid) settings from the config object.
    // It can be safely assumed that the settings are valided by the 
    // method below.
    
    m_minsup.loadSettingsFrom(settings);
    m_minpattern.loadSettingsFrom(settings);
    m_maxpattern.loadSettingsFrom(settings);
    m_requireditems.loadSettingsFrom(settings);
    m_maxgap.loadSettingsFrom(settings);
    m_showsequence.loadSettingsFrom(settings);
    m_colsel.loadSettingsFrom(settings);
}
 
开发者ID:DeOlSo,项目名称:ADC2015_De,代码行数:20,代码来源:CMSPAMNodeModel.java


示例19: configure

import org.knime.core.node.InvalidSettingsException; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected DataTableSpec[] configure(final DataTableSpec[] inSpecs)
        throws InvalidSettingsException {
	getLogger().info("calling configure");
    if(inSpecs==null || inSpecs.length!=1)
    	{
    	throw new InvalidSettingsException("Expect one input.");
    	}
  

	return new DataTableSpec[]{
		createVcfDataColumnSpec(),
		createVcfHeaderDataColumnSpec(),
		};
	}
 
开发者ID:lindenb,项目名称:knime4bio,代码行数:19,代码来源:ReadVCFNodeModel.java


示例20: configure

import org.knime.core.node.InvalidSettingsException; //导入依赖的package包/类
@Override
protected DataTableSpec[] configure(DataTableSpec[] inSpecs)
		throws InvalidSettingsException {
	if(inSpecs==null || inSpecs.length!=1)
		{
		throw new InvalidSettingsException("Expected one table");
		}
	
	DataTableSpec in=inSpecs[0];
	int index;
	if((index=in.findColumnIndex("ID"))==-1)
		{
		throw new InvalidSettingsException("Node "+this.getNodeName()+" column \"ID\"");
		}
	if(!in.getColumnSpec(index).getType().equals(StringCell.TYPE))
		{
		throw new InvalidSettingsException("column \"ID\" is not a string");
		}
	
	return new DataTableSpec[]{in,in};
	}
 
开发者ID:lindenb,项目名称:knime4bio,代码行数:22,代码来源:HavingIdNodeModel.java



注:本文中的org.knime.core.node.InvalidSettingsException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java IdFilter类代码示例发布时间:2022-05-22
下一篇:
Java MinguoChronology类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap