gpt4 book ai didi

org.apache.taverna.scufl2.api.io.WorkflowBundleIO.()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-26 09:15:05 26 4
gpt4 key购买 nike

本文整理了Java中org.apache.taverna.scufl2.api.io.WorkflowBundleIO.<init>()方法的一些代码示例,展示了WorkflowBundleIO.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WorkflowBundleIO.<init>()方法的具体详情如下:
包路径:org.apache.taverna.scufl2.api.io.WorkflowBundleIO
类名称:WorkflowBundleIO
方法名:<init>

WorkflowBundleIO.<init>介绍

暂无

代码示例

代码示例来源:origin: org.apache.taverna.server/taverna-server-worker

/**
 * An RMI-enabled factory for runs.
 * 
 * @param command
 *            What command to call to actually run a run.
 * @throws RemoteException
 *             If anything goes wrong during creation of the instance.
 */
public TavernaRunManager(String command) throws RemoteException {
  this.command = command;
  this.io = new WorkflowBundleIO();
}

代码示例来源:origin: org.apache.taverna.language/taverna-databundle

public static WorkflowBundleIO getWfBundleIO() {
  if (wfBundleIO == null)
    wfBundleIO = new WorkflowBundleIO();
  return wfBundleIO;
}

代码示例来源:origin: org.apache.taverna.language/taverna-scufl2-t2flow

@Test
  public void readSemanticAnnotations() throws Exception {
    URL wfResource = getClass().getResource(SEMANTIC_ANNOTATIONS);
    assertNotNull("Could not find workflow " + SEMANTIC_ANNOTATIONS, wfResource);
    T2FlowParser parser = new T2FlowParser();
    parser.setValidating(true);
    parser.setStrict(false);
    WorkflowBundle wfBundle = parser.parseT2Flow(wfResource.openStream());
    assertEquals(4, wfBundle.getAnnotations().size());
    for (Annotation x : wfBundle.getAnnotations()) {
      System.out.println(x.getTarget());
//            System.out.println(x.getBodyStatements().get(0));
    }
    File f = File.createTempFile("annotation", ".wfbundle");
    System.err.println(f);
    new WorkflowBundleIO().writeBundle(wfBundle, f, "application/vnd.taverna.scufl2.workflow-bundle");
  }

代码示例来源:origin: org.apache.taverna.language/taverna-scufl2-t2flow

@Before
public void readWorkflow() throws ReaderException, IOException {
  WorkflowBundleIO io = new WorkflowBundleIO();
  InputStream is = getClass().getResourceAsStream(ITERATIONSTRATEGIES_T2FLOW);
  wfBundle = io.readBundle(is, APPLICATION_VND_TAVERNA_T2FLOW_XML);
  wf = wfBundle.getMainWorkflow();
  coloursLisr = wf.getProcessors().getByName("ColoursLisr");
  concat = wf.getProcessors().getByName("Concatenate_two_strings");
  shape = wf.getProcessors().getByName("ShapeAnimals");
}

代码示例来源:origin: org.apache.taverna.language/taverna-databundle

@Test
public void setWorkflowBundle() throws Exception {
  WorkflowBundleIO wfBundleIO = new WorkflowBundleIO();
  WorkflowBundle wfBundle = wfBundleIO.createBundle();
  DataBundles.setWorkflowBundle(dataBundle, wfBundle);
  
  Path wf = DataBundles.getWorkflow(dataBundle);
  assertEquals("/workflow.wfbundle", wf.toString());        
  assertEquals("application/vnd.taverna.scufl2.workflow-bundle", 
      Files.probeContentType(wf));
}

代码示例来源:origin: org.apache.taverna.language/taverna-databundle

@Ignore
@Test
public void getWorkflowBundle() throws Exception {
  WorkflowBundleIO wfBundleIO = new WorkflowBundleIO();
  WorkflowBundle wfBundle = wfBundleIO.createBundle();
  
  String name = wfBundle.getName();
  String wfName = wfBundle.getMainWorkflow().getName();
  URI id = wfBundle.getIdentifier();
  
  DataBundles.setWorkflowBundle(dataBundle, wfBundle);
  // Reload the bundle
  wfBundle = DataBundles.getWorkflowBundle(dataBundle);        
  assertEquals(name, wfBundle.getName());
  assertEquals(wfName, wfBundle.getMainWorkflow().getName());        
  assertEquals(id, wfBundle.getIdentifier());        
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com