Search in sources :

Example 6 with ContainerUnloader

use of org.gephi.io.importer.api.ContainerUnloader in project gephi by gephi.

the class ImportControllerImpl method process.

@Override
public void process(Container[] containers, Processor processor, Workspace workspace) {
    ContainerUnloader[] unloaders = new ContainerUnloader[containers.length];
    int i = 0;
    for (Container container : containers) {
        container.closeLoader();
        if (container.getUnloader().isAutoScale()) {
            Scaler scaler = Lookup.getDefault().lookup(Scaler.class);
            if (scaler != null) {
                scaler.doScale(container);
            }
        }
        unloaders[i++] = container.getUnloader();
    }
    processor.setContainers(unloaders);
    processor.setWorkspace(workspace);
    processor.process();
}
Also used : ContainerUnloader(org.gephi.io.importer.api.ContainerUnloader) Container(org.gephi.io.importer.api.Container) Scaler(org.gephi.io.processor.spi.Scaler)

Aggregations

ContainerUnloader (org.gephi.io.importer.api.ContainerUnloader)6 ProjectController (org.gephi.project.api.ProjectController)4 Random (java.util.Random)1 Container (org.gephi.io.importer.api.Container)1 NodeDraft (org.gephi.io.importer.api.NodeDraft)1 Scaler (org.gephi.io.processor.spi.Scaler)1