Package org.gephi.io.importer.api

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


        try {
            stream.reset();
        } catch (IOException ex) {
            //Exceptions.printStackTrace(ex);
        }
        ImportController importController = Lookup.getDefault().lookup(ImportController.class);
        FileImporter fileImporter = importController.getFileImporter(".gexf");
        Container container = importController.importFile(stream, fileImporter);

        importController.process(container, new DefaultProcessor(), workspace);

        PreviewModel model = Lookup.getDefault().lookup(PreviewController.class).getModel();
        model.getNodeSupervisor().setShowNodeLabels(Boolean.TRUE);

        SVGExporter sVGExporter = new SVGExporter();
View Full Code Here


        Container container = Lookup.getDefault().lookup(ContainerFactory.class).newContainer();
        RandomGraph randomGraph = new RandomGraph();
        randomGraph.generate(container.getLoader());

        //Append container to graph structure
        ImportController importController = Lookup.getDefault().lookup(ImportController.class);
        importController.process(container, new DefaultProcessor(), workspace);

        //Set labels
        GraphController gc = Lookup.getDefault().lookup(GraphController.class);
        GraphModel graphModel = gc.getModel(workspace);
        for (Node n : graphModel.getGraph().getNodes()) {
View Full Code Here

  public void setUp() {
    ProjectController projectController = Lookup.getDefault().lookup(ProjectController.class);
    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) {
      Exceptions.printStackTrace(ex);
      return;
    }

    importController.process(container, new DefaultProcessor(), projectController.getCurrentWorkspace());

    GraphController graphController = Lookup.getDefault().lookup(GraphController.class);
    graphModel = graphController.getModel();
  }
View Full Code Here

        }
        ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
        pc.newProject();
        Workspace workspace = pc.getCurrentWorkspace();
        Container container = Lookup.getDefault().lookup(ContainerFactory.class).newContainer();
        ImportController importController = Lookup.getDefault().lookup(ImportController.class);
        importController.process(container, new DefaultProcessor(), workspace);

        //Get a graph model - it exists because we have a workspace
        GraphModel graphModel = Lookup.getDefault().lookup(GraphController.class).getModel();
        g = loadNetwork(n, graphModel,lookupFileName);
        return g;
View Full Code Here

        }
        ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
        pc.newProject();
        Workspace workspace = pc.getCurrentWorkspace();
        Container container = Lookup.getDefault().lookup(ContainerFactory.class).newContainer();
        ImportController importController = Lookup.getDefault().lookup(ImportController.class);
        importController.process(container, new DefaultProcessor(), workspace);

        //Get a graph model - it exists because we have a workspace
        GraphModel graphModel = Lookup.getDefault().lookup(GraphController.class).getModel();
        HierarchicalDirectedGraph g = loadNetwork(n, graphModel,lookupFileName);
        //set the preview configuration of the graph
View Full Code Here

TOP

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

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.