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

Java CanceledExecutionException类代码示例

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

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



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

示例1: loadInternals

import org.knime.core.node.CanceledExecutionException; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected void loadInternals(final File internDir,
        final ExecutionMonitor exec) throws IOException,
        CanceledExecutionException {
    
    // TODO load internal data. 
    // Everything handed to output ports is loaded automatically (data
    // returned by the execute method, models loaded in loadModelContent,
    // and user settings set through loadSettingsFrom - is all taken care 
    // of). Load here only the other internals that need to be restored
    // (e.g. data used by the views).
	logger.info("---------------- ENTRANDO NO MÉTODO loadInternals()-----------------------");
	logger.info("String m_selStr: " + m_selStr.toString());
	
}
 
开发者ID:daniacs,项目名称:knime_brtagger,代码行数:19,代码来源:BrTaggerNodeModel.java


示例2: suspendExecution

import org.knime.core.node.CanceledExecutionException; //导入依赖的package包/类
/**
 * Wait for the user to continue or terminate the loop.
 *
 * @param exec
 *            the execution context
 * @throws InterruptedException
 * @throws CanceledExecutionException
 */
private void suspendExecution(final ExecutionContext exec)
        throws InterruptedException, CanceledExecutionException {
    m_semaphore.setState(false);
    stateChanged();

    while (!m_semaphore.getState()) {
        Thread.sleep(1000);
        try {
            exec.checkCanceled();
        } catch (final CanceledExecutionException e) {
            m_semaphore.setState(true);
            stateChanged();
            throw e;
        }
    }
    m_curIterationIndex++;
}
 
开发者ID:knime,项目名称:knime-activelearning,代码行数:26,代码来源:ActiveLearnLoopEndNodeModel.java


示例3: loadInternals

import org.knime.core.node.CanceledExecutionException; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected void loadInternals(final File nodeInternDir,
        final ExecutionMonitor exec)
                throws IOException, CanceledExecutionException {

    final String path = nodeInternDir.getAbsolutePath();

    final File file = new File(path + "LoopEndNode.intern");

    final DataInputStream is =
            new DataInputStream(new FileInputStream(file));

    final int numClasses = is.readInt();

    for (int i = 0; i < numClasses; i++) {
        m_classModel.addClass(is.readUTF());
    }
    is.close();
}
 
开发者ID:knime,项目名称:knime-activelearning,代码行数:23,代码来源:ActiveLearnLoopEndNodeModel.java


示例4: saveInternals

import org.knime.core.node.CanceledExecutionException; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected void saveInternals(final File nodeInternDir,
        final ExecutionMonitor exec)
                throws IOException, CanceledExecutionException {

    final String path = nodeInternDir.getAbsolutePath();

    final File file = new File(path + "LoopEndNode.intern");

    // save the defined classes
    final DataOutputStream os =
            new DataOutputStream(new FileOutputStream(file));

    os.writeInt(m_classModel.getSize());

    for (final String clsName : m_classModel.getDefinedClasses()) {
        os.writeUTF(clsName);
    }
    os.close();
}
 
开发者ID:knime,项目名称:knime-activelearning,代码行数:24,代码来源:ActiveLearnLoopEndNodeModel.java


示例5: execute

import org.knime.core.node.CanceledExecutionException; //导入依赖的package包/类
/**
 * Execute the snippet.
 * 
 * @param table
 *            the data table at the inport
 * @param flowVariableRepository
 *            the flow variables at the inport
 * @param exec
 *            the execution context to report progress
 * @return the table for the output
 * @throws InvalidSettingsException
 *             when settings are inconsistent with the table or the flow
 *             variables at the input
 * @throws CanceledExecutionException
 *             when execution is canceled by the user
 */
public BufferedDataTable execute(final BufferedDataTable table,
		final FlowVariableRepository flowVariableRepository,
		final ExecutionContext exec) throws CanceledExecutionException,
		InvalidSettingsException {
	OutColList outFields = m_fields.getOutColFields();
	if (outFields.size() > 0) {
		ColumnRearranger rearranger = createRearranger(
				table.getDataTableSpec(), flowVariableRepository,
				table.getRowCount());

		return exec.createColumnRearrangeTable(table, rearranger, exec);
	} else {
		CellFactory factory = new JavaSnippetCellFactory(this,
				table.getDataTableSpec(), flowVariableRepository,
				table.getRowCount());
		for (DataRow row : table) {
			factory.getCells(row);
		}
		return table;
	}
}
 
开发者ID:pavloff-de,项目名称:spark4knime,代码行数:38,代码来源:JavaSnippet.java


示例6: endElement

import org.knime.core.node.CanceledExecutionException; //导入依赖的package包/类
@Override
public void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)
		throws SAXException
	{
	if(builder!=null)
		{
		DataRow row=new DefaultRow(RowKey.createRowKey(++rowOut),new IntCell(Integer.parseInt(builder.toString())));
		container.addRowToTable(row);
		exec.setProgress("ESearch "+(rowOut));
      		try {
			exec.checkCanceled();
		} catch (CanceledExecutionException e) {
			throw new SAXException(e);
		}
		}
	builder=null;
	}
 
开发者ID:lindenb,项目名称:knime4bio,代码行数:18,代码来源:ESearchNodeModel.java


示例7: getIndex

import org.knime.core.node.CanceledExecutionException; //导入依赖的package包/类
private GeocodingResult getIndex(String address, List<GeocodingResult> choices, GeocodingResult defaultValue)
		throws CanceledExecutionException {
	if (choices.size() == 0) {
		return defaultValue;
	} else if (choices.size() == 1) {
		return choices.get(0);
	} else if (set.getMultipleResults() == GeocodingSettings.Multiple.DO_NOT_USE) {
		return defaultValue;
	} else if (set.getMultipleResults() == GeocodingSettings.Multiple.USE_FIRST) {
		return choices.get(0);
	} else if (set.getMultipleResults() == GeocodingSettings.Multiple.ASK_USER) {
		ChooseDialog dialog = new ChooseDialog(address, choices, defaultValue);

		dialog.setVisible(true);

		if (dialog.isCanceled()) {
			throw new CanceledExecutionException();
		}

		return dialog.getResult();
	}

	return defaultValue;
}
 
开发者ID:SiLeBAT,项目名称:BfROpenLab,代码行数:25,代码来源:GeocodingNodeModel.java


示例8: testWithoutWeights

import org.knime.core.node.CanceledExecutionException; //导入依赖的package包/类
@Test
public void testWithoutWeights() throws PersistenceException, CanceledExecutionException {
	Mockito.when(view.getEdgeWeight(e12)).thenReturn(1.0);
	Mockito.when(view.getEdgeWeight(e13)).thenReturn(1.0);
	Mockito.when(view.getEdgeWeight(e14)).thenReturn(1.0);
	Mockito.when(view.getEdgeWeight(e15)).thenReturn(1.0);
	Mockito.when(view.getEdgeWeight(e23)).thenReturn(1.0);
	Mockito.when(view.getEdgeWeight(e34)).thenReturn(1.0);

	ClosenessAnalyzerType analyzer = new ClosenessAnalyzerType();

	analyzer.initializeInternal(view, new ExecutionMonitor());

	assertEquals(1.0 / 4.0, analyzer.numericAnalyzeInternal(new ExecutionMonitor(), view, n1)[0], 0.0);
	assertEquals(1.0 / 6.0, analyzer.numericAnalyzeInternal(new ExecutionMonitor(), view, n2)[0], 0.0);
	assertEquals(1.0 / 5.0, analyzer.numericAnalyzeInternal(new ExecutionMonitor(), view, n3)[0], 0.0);
	assertEquals(1.0 / 6.0, analyzer.numericAnalyzeInternal(new ExecutionMonitor(), view, n4)[0], 0.0);
	assertEquals(1.0 / 7.0, analyzer.numericAnalyzeInternal(new ExecutionMonitor(), view, n5)[0], 0.0);
}
 
开发者ID:SiLeBAT,项目名称:BfROpenLab,代码行数:20,代码来源:ClosenessAnalyzerTypeTest.java


示例9: testWithWeights

import org.knime.core.node.CanceledExecutionException; //导入依赖的package包/类
@Test
public void testWithWeights() throws PersistenceException, CanceledExecutionException {
	Mockito.when(view.getEdgeWeight(e12)).thenReturn(2.0);
	Mockito.when(view.getEdgeWeight(e13)).thenReturn(2.0);
	Mockito.when(view.getEdgeWeight(e14)).thenReturn(2.0);
	Mockito.when(view.getEdgeWeight(e15)).thenReturn(2.0);
	Mockito.when(view.getEdgeWeight(e23)).thenReturn(1.0);
	Mockito.when(view.getEdgeWeight(e34)).thenReturn(1.0);

	ClosenessAnalyzerType analyzer = new ClosenessAnalyzerType();

	analyzer.initializeInternal(view, new ExecutionMonitor());

	assertEquals(1.0 / 8.0, analyzer.numericAnalyzeInternal(new ExecutionMonitor(), view, n1)[0], 0.0);
	assertEquals(1.0 / 9.0, analyzer.numericAnalyzeInternal(new ExecutionMonitor(), view, n2)[0], 0.0);
	assertEquals(1.0 / 8.0, analyzer.numericAnalyzeInternal(new ExecutionMonitor(), view, n3)[0], 0.0);
	assertEquals(1.0 / 9.0, analyzer.numericAnalyzeInternal(new ExecutionMonitor(), view, n4)[0], 0.0);
	assertEquals(1.0 / 14.0, analyzer.numericAnalyzeInternal(new ExecutionMonitor(), view, n5)[0], 0.0);
}
 
开发者ID:SiLeBAT,项目名称:BfROpenLab,代码行数:20,代码来源:ClosenessAnalyzerTypeTest.java


示例10: initializeInternal

import org.knime.core.node.CanceledExecutionException; //导入依赖的package包/类
@Override
protected void initializeInternal(KPartiteGraphView<PersistentObject, Partition> view, ExecutionMonitor exec)
		throws PersistenceException, CanceledExecutionException {
	super.initializeInternal(view, exec);
	numberOfNodes = (int) view.getNoOfNodes();
	numberOfEdges = (int) view.getNoOfEdges();
	edgeWeights.clear();
	incidentNodes.clear();
	outgoingEdges.clear();

	for (PersistentObject edge : view.getEdges()) {
		edgeWeights.put(edge.getId(), view.getEdgeWeight(edge));
		incidentNodes.put(edge.getId(),
				view.getIncidentNodes(edge).stream().map(o -> o.getId()).collect(Collectors.toList()));
	}

	if (edgeWeights.values().stream().allMatch(v -> v == 1.0)) {
		edgeWeights.clear();
	}

	for (PersistentObject node : view.getNodes()) {
		outgoingEdges.put(node.getId(),
				view.getOutgoingEdges(node).stream().map(o -> o.getId()).collect(Collectors.toList()));
	}
}
 
开发者ID:SiLeBAT,项目名称:BfROpenLab,代码行数:26,代码来源:ClosenessAnalyzerType.java


示例11: saveInternals

import org.knime.core.node.CanceledExecutionException; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected void saveInternals(final File internDir,
        final ExecutionMonitor exec) throws IOException,
        CanceledExecutionException {
   
    // TODO save internal models. 
    // Everything written to output ports is saved automatically (data
    // returned by the execute method, models saved in the saveModelContent,
    // and user settings saved through saveSettingsTo - is all taken care 
    // of). Save here only the other internals that need to be preserved
    // (e.g. data used by the views).
	logger.info("---------------- ENTRANDO NO MÉTODO saveInternals()-----------------------");
	logger.info("String m_selStr: " + m_selStr.toString());
}
 
开发者ID:daniacs,项目名称:knime_brtagger,代码行数:18,代码来源:BrTaggerNodeModel.java


示例12: loadInternals

import org.knime.core.node.CanceledExecutionException; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected void loadInternals(final File nodeInternDir,
        final ExecutionMonitor exec)
                throws IOException, CanceledExecutionException {
    //
}
 
开发者ID:knime,项目名称:knime-activelearning,代码行数:10,代码来源:ActiveLearnLoopStartNodeModel.java


示例13: saveInternals

import org.knime.core.node.CanceledExecutionException; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected void saveInternals(final File nodeInternDir,
        final ExecutionMonitor exec)
                throws IOException, CanceledExecutionException {
    //
}
 
开发者ID:knime,项目名称:knime-activelearning,代码行数:10,代码来源:ActiveLearnLoopStartNodeModel.java


示例14: loadInternals

import org.knime.core.node.CanceledExecutionException; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected void loadInternals(final File nodeInternDir,
        final ExecutionMonitor exec)
                throws IOException, CanceledExecutionException {
    // Nothing to do here
}
 
开发者ID:knime,项目名称:knime-activelearning,代码行数:10,代码来源:PBACScorerNodeModel.java


示例15: saveInternals

import org.knime.core.node.CanceledExecutionException; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected void saveInternals(final File nodeInternDir,
        final ExecutionMonitor exec)
                throws IOException, CanceledExecutionException {
    // Nothing to do here
}
 
开发者ID:knime,项目名称:knime-activelearning,代码行数:10,代码来源:PBACScorerNodeModel.java


示例16: load

import org.knime.core.node.CanceledExecutionException; //导入依赖的package包/类
@Override
protected void load(final PortObjectZipInputStream in,
        final PortObjectSpec spec, final ExecutionMonitor exec)
                throws IOException, CanceledExecutionException {
    ObjectInputStream oi = null;
    KNFST knfst = null;
    try {
        // load classifier
        final ZipEntry zentry = in.getNextEntry();
        assert zentry.getName().equals("knfst.objectout");
        oi = new ObjectInputStream(new NonClosableInputStream.Zip(in));
        knfst = (KNFST) Class.forName(oi.readUTF()).newInstance();
        knfst.readExternal(oi);
    } catch (final IOException ioe) {

    } catch (final ClassNotFoundException cnf) {

    } catch (final InstantiationException | IllegalAccessException e) {
        e.printStackTrace();
    } finally {
        if (oi != null) {
            try {
                oi.close();
            } catch (final Exception e) {

            }
        }
    }
    m_knfstModel = knfst;
    m_spec = (KNFSTPortObjectSpec) spec;
}
 
开发者ID:knime,项目名称:knime-activelearning,代码行数:32,代码来源:KNFSTPortObject.java


示例17: loadInternals

import org.knime.core.node.CanceledExecutionException; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected void loadInternals(final File internDir,
        final ExecutionMonitor exec) throws IOException,
        CanceledExecutionException {
    
    // TODO load internal data. 
    // Everything handed to output ports is loaded automatically (data
    // returned by the execute method, models loaded in loadModelContent,
    // and user settings set through loadSettingsFrom - is all taken care 
    // of). Load here only the other internals that need to be restored
    // (e.g. data used by the views).

}
 
开发者ID:knime,项目名称:knime-sdk-setup,代码行数:17,代码来源:MyExampleNodeNodeModel.java


示例18: saveInternals

import org.knime.core.node.CanceledExecutionException; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected void saveInternals(final File internDir,
        final ExecutionMonitor exec) throws IOException,
        CanceledExecutionException {
   
    // TODO save internal models. 
    // Everything written to output ports is saved automatically (data
    // returned by the execute method, models saved in the saveModelContent,
    // and user settings saved through saveSettingsTo - is all taken care 
    // of). Save here only the other internals that need to be preserved
    // (e.g. data used by the views).

}
 
开发者ID:knime,项目名称:knime-sdk-setup,代码行数:17,代码来源:MyExampleNodeNodeModel.java


示例19: loadInternals

import org.knime.core.node.CanceledExecutionException; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected void loadInternals(final File nodeInternDir,
		final ExecutionMonitor exec) throws IOException,
		CanceledExecutionException {
	// load internal data. Everything handed to output ports is loaded
	// automatically (data returned by the execute method, models loaded in
	// loadModelContent, and user settings set through loadSettingsFrom - is
	// all taken care of). Load here only the other internals that need to
	// be restored (e.g. data used by the views).
}
 
开发者ID:pavloff-de,项目名称:spark4knime,代码行数:14,代码来源:JavaSnippetForRDDNodeModel.java


示例20: saveInternals

import org.knime.core.node.CanceledExecutionException; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected void saveInternals(final File nodeInternDir,
		final ExecutionMonitor exec) throws IOException,
		CanceledExecutionException {
	// save internal models. Everything written to output ports is saved
	// automatically (data returned by the execute method, models saved in
	// the saveModelContent, and user settings saved through saveSettingsTo
	// - is all taken care of). Save here only the other internals that need
	// to be preserved (e.g. data used by the views).
}
 
开发者ID:pavloff-de,项目名称:spark4knime,代码行数:14,代码来源:JavaSnippetForRDDNodeModel.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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