Package org.gephi.io.importer.api

Examples of org.gephi.io.importer.api.Container


        return null;
    }

    public Container importSpigot(SpigotImporter importer) {
        //Create Container
        final Container container = Lookup.getDefault().lookup(ContainerFactory.class).newContainer();

        //Report
        Report report = new Report();
        container.setReport(report);

        try {
            if (importer.execute(container.getLoader())) {
                if (importer.getReport() != null) {
                    report.append(importer.getReport());
                }
                return container;
            }
View Full Code Here


            String taskName = NbBundle.getMessage(DesktopImportControllerUI.class, "DesktopImportControllerUI.taskName", containerSource);
            executor.execute(task, new Runnable() {

                public void run() {
                    try {
                        Container container = controller.importFile(stream, importer);
                        if (container != null) {
                            container.setSource(containerSource);
                            finishImport(container);
                        }
                    } catch (Exception ex) {
                        throw new RuntimeException(ex);
                    }
View Full Code Here

            String taskName = NbBundle.getMessage(DesktopImportControllerUI.class, "DesktopImportControllerUI.taskName", containerSource);
            executor.execute(task, new Runnable() {

                public void run() {
                    try {
                        Container container = controller.importFile(stream, importer);
                        if (container != null) {
                            container.setSource(containerSource);
                            finishImport(container);
                        }
                    } catch (Exception ex) {
                        throw new RuntimeException(ex);
                    }
View Full Code Here

            String taskName = NbBundle.getMessage(DesktopImportControllerUI.class, "DesktopImportControllerUI.taskName", containerSource);
            executor.execute(task, new Runnable() {

                public void run() {
                    try {
                        Container container = controller.importFile(reader, importer);
                        if (container != null) {
                            container.setSource(containerSource);
                            finishImport(container);
                        }
                    } catch (Exception ex) {
                        throw new RuntimeException(ex);
                    }
View Full Code Here

            String taskName = NbBundle.getMessage(DesktopImportControllerUI.class, "DesktopImportControllerUI.taskName", containerSource);
            executor.execute(task, new Runnable() {

                public void run() {
                    try {
                        Container container = controller.importDatabase(db, importer);
                        if (container != null) {
                            container.setSource(containerSource);
                            finishImport(container);
                        }
                    } catch (Exception ex) {
                        throw new RuntimeException(ex);
                    }
View Full Code Here

            String taskName = NbBundle.getMessage(DesktopImportControllerUI.class, "DesktopImportControllerUI.taskName", containerSource);
            executor.execute(task, new Runnable() {

                public void run() {
                    try {
                        Container container = controller.importSpigot(importer);
                        if (container != null) {
                            container.setSource(source);
                            finishImport(container);
                        }
                    } catch (Exception ex) {
                        throw new RuntimeException(ex);
                    }
View Full Code Here

                return;
            }
            ui.unsetup();
        }

        final Container container = Lookup.getDefault().lookup(ContainerFactory.class).newContainer();
        container.setSource("" + generator.getName());
        container.setReport(new Report());
        String taskname = NbBundle.getMessage(DesktopGeneratorController.class, "DesktopGeneratorController.taskname", generator.getName());

        //Error handler
        LongTaskErrorHandler errorHandler = new LongTaskErrorHandler() {

            public void fatalError(Throwable t) {
                Logger.getLogger("").log(Level.WARNING, "", t.getCause() != null ? t.getCause() : t);
            }
        };

        //Execute
        executor.execute(generator, new Runnable() {

            public void run() {
                generator.generate(container.getLoader());
                finishGenerate(container);
            }
        }, taskname, errorHandler);
    }
View Full Code Here

    projectController.newProject();
    projectController.newWorkspace(projectController.getCurrentProject());

    ImportController importController = Lookup.getDefault().lookup(ImportController.class);

    Container container;
    try {
      File file = new File(getClass().getResource("/org/gephi/dynamic/test_graph.gexf").toURI());
      container = importController.importFile(file);
    }
    catch (Exception ex) {
View Full Code Here

            String taskName = NbBundle.getMessage(DesktopImportControllerUI.class, "DesktopImportControllerUI.taskName", containerSource);
            executor.execute(task, new Runnable() {
                @Override
                public void run() {
                    try {
                        Container container = controller.importFile(stream, importer);
                        if (container != null) {
                            container.setSource(containerSource);
                            finishImport(container);
                        }
                    } catch (Exception ex) {
                        throw new RuntimeException(ex);
                    }
View Full Code Here

            String taskName = NbBundle.getMessage(DesktopImportControllerUI.class, "DesktopImportControllerUI.taskName", containerSource);
            executor.execute(task, new Runnable() {
                @Override
                public void run() {
                    try {
                        Container container = controller.importFile(stream, importer);
                        if (container != null) {
                            container.setSource(containerSource);
                            finishImport(container);
                        }
                    } catch (Exception ex) {
                        throw new RuntimeException(ex);
                    }
View Full Code Here

TOP

Related Classes of org.gephi.io.importer.api.Container

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.