Search in sources :

Example 6 with MemoryRepository

use of org.vcell.workflow.MemoryRepository in project vcell by virtualcell.

the class KenworthyTest method main.

public static void main(String[] args) {
    if (args.length != 2) {
        System.out.println("expecting 2 arguments");
        System.out.println("usage: java " + Workflow.class.getSimpleName() + " workingdir workflowInputFile");
        System.out.println("workingdir example: " + "D:\\developer\\eclipse\\workspace\\VCell_5.4_vmicro\\datadir");
        System.out.println("workflowInputFile example: " + "D:\\developer\\eclipse\\workspace\\VCell_5.4_vmicro\\workflow1.txt");
        System.exit(1);
    }
    try {
        // PropertyLoader.loadProperties();
        // workflowInputFile "C:\\developer\\eclipse\\workspace\\VCell_5.3_vmicro\\workflow1.txt"
        File workingDirectory = new File(args[0]);
        LocalWorkspace localWorkspace = new LocalWorkspace(workingDirectory);
        Repository repository = new MemoryRepository();
        // String workflowLanguageText = BeanUtils.readBytesFromFile(new File(args[1]), null);
        // Workflow workflow = Workflow.parse(localWorkspace, workflowLanguageText);
        System.err.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> using hard-coded example instead <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<");
        File vfrapFile = new File("D:\\Developer\\eclipse\\workspace_refactor\\VCell_5.4_vmicro\\3D_FRAP_2_ZProjection_Simulation1.vfrap");
        // Workflow workflow = getVFrapSimpleExample(workingDirectory, vfrapFile);
        // Workflow workflow = getFakeDataExample(workingDirectory);
        Workflow workflow = getInteractiveModelWorkflow(repository, workingDirectory);
        TaskContext taskContext = new TaskContext(workflow, repository, localWorkspace);
        ArrayList<Issue> issues = new ArrayList<Issue>();
        IssueContext issueContext = new IssueContext();
        workflow.gatherIssues(issueContext, issues);
        // WorkflowJGraphProxy workflowJGraphProxy = new WorkflowJGraphProxy(workflow);
        // displayWorkflowGraphJGraphX(workflowJGraphProxy);
        WorkflowUtilities.displayWorkflowGraph(workflow);
        WorkflowUtilities.displayWorkflowTable(taskContext);
        workflow.reportIssues(issues, Issue.SEVERITY_INFO, true);
        // 
        // execute the workflow
        // 
        workflow.compute(taskContext, new WorkflowUtilities.Progress());
    } catch (Exception e) {
        e.printStackTrace(System.out);
    }
}
Also used : LocalWorkspace(org.vcell.vmicro.workflow.data.LocalWorkspace) TaskContext(org.vcell.workflow.TaskContext) Issue(org.vcell.util.Issue) ArrayList(java.util.ArrayList) Workflow(org.vcell.workflow.Workflow) Repository(org.vcell.workflow.Repository) MemoryRepository(org.vcell.workflow.MemoryRepository) MemoryRepository(org.vcell.workflow.MemoryRepository) IssueContext(org.vcell.util.IssueContext) File(java.io.File)

Aggregations

MemoryRepository (org.vcell.workflow.MemoryRepository)6 Repository (org.vcell.workflow.Repository)6 File (java.io.File)5 LocalWorkspace (org.vcell.vmicro.workflow.data.LocalWorkspace)5 TaskContext (org.vcell.workflow.TaskContext)5 Workflow (org.vcell.workflow.Workflow)5 ArrayList (java.util.ArrayList)3 Issue (org.vcell.util.Issue)3 IssueContext (org.vcell.util.IssueContext)2 DisplayProfileLikelihoodPlots (org.vcell.vmicro.workflow.task.DisplayProfileLikelihoodPlots)2 AsynchClientTask (cbit.vcell.client.task.AsynchClientTask)1 Hashtable (java.util.Hashtable)1 ClientTaskStatusSupport (org.vcell.util.ClientTaskStatusSupport)1 ProgressDialogListener (org.vcell.util.ProgressDialogListener)1 OptContext (org.vcell.vmicro.workflow.data.OptContext)1 WorkflowJGraphProxy (org.vcell.vmicro.workflow.jgraphx.WorkflowJGraphProxy)1 DisplayDependentROIs (org.vcell.vmicro.workflow.task.DisplayDependentROIs)1 DisplayTimeSeries (org.vcell.vmicro.workflow.task.DisplayTimeSeries)1 ImportRawTimeSeriesFromVFrap (org.vcell.vmicro.workflow.task.ImportRawTimeSeriesFromVFrap)1 RunProfileLikelihoodGeneral (org.vcell.vmicro.workflow.task.RunProfileLikelihoodGeneral)1