Search in sources :

Example 1 with VizmapWriterManager

use of org.cytoscape.io.write.VizmapWriterManager in project cytoscape-impl by cytoscape.

the class ExportVizmapTaskFactoryImpl method createTaskIterator.

@Override
public TaskIterator createTaskIterator() {
    final VizmapWriterManager writerManager = serviceRegistrar.getService(VizmapWriterManager.class);
    final CyApplicationManager cyApplicationManager = serviceRegistrar.getService(CyApplicationManager.class);
    return new TaskIterator(2, new VizmapWriter(writerManager, cyApplicationManager, serviceRegistrar));
}
Also used : CyApplicationManager(org.cytoscape.application.CyApplicationManager) TaskIterator(org.cytoscape.work.TaskIterator) VizmapWriterManager(org.cytoscape.io.write.VizmapWriterManager)

Example 2 with VizmapWriterManager

use of org.cytoscape.io.write.VizmapWriterManager in project cytoscape-impl by cytoscape.

the class ExportVizmapTaskFactoryImpl method createTaskIterator.

@Override
public TaskIterator createTaskIterator(File file) {
    final Map<String, Object> m = new HashMap<>();
    m.put("OutputFile", file);
    final VizmapWriterManager writerManager = serviceRegistrar.getService(VizmapWriterManager.class);
    final CyApplicationManager cyApplicationManager = serviceRegistrar.getService(CyApplicationManager.class);
    final VizmapWriter writer = new VizmapWriter(writerManager, cyApplicationManager, serviceRegistrar);
    writer.setDefaultFileFormatUsingFileExt(file);
    final TunableSetter tunableSetter = serviceRegistrar.getService(TunableSetter.class);
    return tunableSetter.createTaskIterator(new TaskIterator(2, writer), m);
}
Also used : CyApplicationManager(org.cytoscape.application.CyApplicationManager) TunableSetter(org.cytoscape.work.TunableSetter) TaskIterator(org.cytoscape.work.TaskIterator) HashMap(java.util.HashMap) VizmapWriterManager(org.cytoscape.io.write.VizmapWriterManager)

Aggregations

CyApplicationManager (org.cytoscape.application.CyApplicationManager)2 VizmapWriterManager (org.cytoscape.io.write.VizmapWriterManager)2 TaskIterator (org.cytoscape.work.TaskIterator)2 HashMap (java.util.HashMap)1 TunableSetter (org.cytoscape.work.TunableSetter)1