当前位置: 首页>>代码示例>>Java>>正文


Java ProjectController类代码示例

本文整理汇总了Java中org.gephi.project.api.ProjectController的典型用法代码示例。如果您正苦于以下问题:Java ProjectController类的具体用法?Java ProjectController怎么用?Java ProjectController使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ProjectController类属于org.gephi.project.api包,在下文中一共展示了ProjectController类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: load

import org.gephi.project.api.ProjectController; //导入依赖的package包/类
/**
 * Will load a network file, based on the Gephi ImportController
 * 
 * @param netFile
 * @throws IOException
 */
public void load(File netFile) throws IOException {
	Workspace workspace = Lookup.getDefault()
			.lookup(ProjectController.class).getCurrentWorkspace();

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

	// Import file
	Container container;
	container = importController.importFile(netFile);
	container.getLoader().setEdgeDefault(EdgeDefault.DIRECTED);

	// Append imported data to GraphAPI
	importController.process(container, new DefaultProcessor(), workspace);
}
 
开发者ID:dev-cuttlefish,项目名称:cuttlefish,代码行数:22,代码来源:BrowsableNetwork.java

示例2: main

import org.gephi.project.api.ProjectController; //导入依赖的package包/类
public static void main(String[] args) throws FileNotFoundException {

		Lookup.getDefault().lookup(ProjectController.class).newProject();
		CxfNetwork network = new CxfNetwork();

		network.load(new File(
				"/home/ilias/workspace/sg/resources/networks/linear.cxf"));

		NetworkStatistics netStats = new NetworkStatistics();
		netStats.execute();

		System.out.println("~~~ Network Statistics Report ~~~");
		System.out.println(netStats.getReport());
		System.out.println("~~~~~~~~~ End of Report  ~~~~~~~~");

		netStats.getReportUI().setVisible(true);
	}
 
开发者ID:dev-cuttlefish,项目名称:cuttlefish,代码行数:18,代码来源:NetworkStatistics.java

示例3: HistoryFrame

import org.gephi.project.api.ProjectController; //导入依赖的package包/类
/**
 * Constructor creates new form HistoryFrame
 */
public HistoryFrame() {
    super();
    
    initComponents();
    this.setVisible(true);
    
    // setup
    pc = Lookup.getDefault().lookup(ProjectController.class);
    fileSeparator = System.getProperty("file.separator");
    
    // init the project
    initProject();
    
    // load history from previous savings
    loadHistory();
    
    // set closing operation
    this.addWindowListener(new java.awt.event.WindowAdapter() {
        @Override
        public void windowClosing(java.awt.event.WindowEvent windowEvent) {
            saveHistory();
            windowEvent.getWindow().dispose();
        }
    });
}
 
开发者ID:KSD-research-group,项目名称:plugin4gephi,代码行数:29,代码来源:HistoryFrame.java

示例4: initProject

import org.gephi.project.api.ProjectController; //导入依赖的package包/类
/**
 * Initialize a Gephi Toolkit project.
 */
private static void initProject() {
	ProjectController pc = Lookup.getDefault().lookup(
			ProjectController.class);
	pc.newProject();
	pc.getCurrentWorkspace();
}
 
开发者ID:dev-cuttlefish,项目名称:cuttlefish,代码行数:10,代码来源:Cuttlefish.java

示例5: exit

import org.gephi.project.api.ProjectController; //导入依赖的package包/类
private static void exit(int code, String msg) {
	if (msg != null && !msg.isEmpty()) {
		out(msg);
	}

	ProjectController pc = Lookup.getDefault().lookup(
			ProjectController.class);
	pc.closeCurrentWorkspace();
	pc.closeCurrentProject();

	out("Exit!");
	System.exit(code);
}
 
开发者ID:dev-cuttlefish,项目名称:cuttlefish,代码行数:14,代码来源:Cuttlefish.java

示例6: bootstrapGephi

import org.gephi.project.api.ProjectController; //导入依赖的package包/类
private GraphModel bootstrapGephi() {
	// boostrap gephi
	Lookup lookup = Lookup.getDefault();
	ProjectController pc = lookup.lookup(ProjectController.class);
	pc.newProject();
	@SuppressWarnings("unused")
	Workspace workspace = pc.getCurrentWorkspace();
	GraphModel graphModel = Lookup.getDefault().lookup(GraphController.class).getModel();
	return graphModel;
}
 
开发者ID:ServiceCutter,项目名称:ServiceCutter,代码行数:11,代码来源:GephiSolver.java

示例7: initializing

import org.gephi.project.api.ProjectController; //导入依赖的package包/类
public static void initializing() {
	if (!initialized) {
		pc = Lookup.getDefault().lookup(ProjectController.class);
		pc.newProject();
		workspace = pc.getCurrentWorkspace();
		graph_model = Lookup.getDefault().lookup(GraphController.class).getModel(workspace);
		the_graph = graph_model.getUndirectedGraph();
	}
	the_graph.clear();
	// System.gc();
}
 
开发者ID:gama-platform,项目名称:gama,代码行数:12,代码来源:AbstractGraphLayoutStatement.java

示例8: GephiProcessing

import org.gephi.project.api.ProjectController; //导入依赖的package包/类
public GephiProcessing(final String filePath, final double reportingIntervalCount) {
    betweennessAverages = new ArrayList<>();
    closenessAverages = new ArrayList<>();
    eccentricityAverages = new ArrayList<>();

    clusteringCoefficientAverages = new ArrayList<>();

    topicDiameterAverages = new ArrayList<>();

    degreeAverages = new ArrayList<>();
    inDegreeAverages = new ArrayList<>();
    outDegreeAverages = new ArrayList<>();

    controlMsgsSentAvg = new ArrayList<>();
    controlMsgsRcvdAvg = new ArrayList<>();
    controlKbSentAvg = new ArrayList<>();
    controlKbRcvdAvg = new ArrayList<>();

    ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
    pc.newProject();
    workspace = pc.getCurrentWorkspace();

    this.filePath = filePath;
    open();

    graphModel = Lookup.getDefault().lookup(GraphController.class).getModel();
    this.reportingIntervalCount = reportingIntervalCount;
}
 
开发者ID:vizpub,项目名称:vizpub,代码行数:29,代码来源:GephiProcessing.java

示例9: GephiController

import org.gephi.project.api.ProjectController; //导入依赖的package包/类
public GephiController(DataController dc) {
	ProjectController projectController = Lookup.getDefault().lookup(ProjectController.class);
	workspace = projectController.getCurrentWorkspace();
	projectController.newProject();

	this.dataController = dc;
	ipMap = dc.getMongoController().getIpToNodeMap();
	GraphMouseListener gml = Lookup.getDefault().lookup(GraphMouseListener.class);
	gml.setGephiController(this);

	// By now the JPanel on which to draw on is not known, so we cannot set up the RenderTarget.
	// This is done in setGraphPanel(...)
}
 
开发者ID:nullbox,项目名称:Data-and-Information-Visualization-Project,代码行数:14,代码来源:GephiController.java

示例10: LouvainClustering

import org.gephi.project.api.ProjectController; //导入依赖的package包/类
public LouvainClustering() {
	this.pc = Lookup.getDefault().lookup(ProjectController.class);
	pc.newProject();
	this.workspace = pc.getCurrentWorkspace();
	 
	this.graphModel = Lookup.getDefault().lookup(GraphController.class).getModel();
	this.factory = graphModel.factory();
	
	this.partitionController = Lookup.getDefault().lookup(PartitionController.class);
}
 
开发者ID:socialsensor,项目名称:social-event-detection,代码行数:11,代码来源:LouvainClustering.java

示例11: convert

import org.gephi.project.api.ProjectController; //导入依赖的package包/类
/**
    * 
    * @param srcpath
    * @throws IOException
    */
   public void convert(String srcpath) throws IOException {
File graphmlFile = new File(srcpath);

// Init a project - and therefore a workspace
ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
pc.newProject();
Workspace workspace = pc.getCurrentWorkspace();

// get import controller
ImportController importController = Lookup.getDefault().lookup(ImportController.class);

// Import file
Container container = importController.importFile(graphmlFile);


// Append imported data to GraphAPI
importController.process(container, new DefaultProcessor(), workspace);

graphModel = Lookup.getDefault().lookup(GraphController.class).getModel();

   }
 
开发者ID:learning-layers,项目名称:Expert-Identification-Service,代码行数:27,代码来源:GraphMl2GEXFConverter.java

示例12: GexfToVectorImage

import org.gephi.project.api.ProjectController; //导入依赖的package包/类
public GexfToVectorImage() {
    pc = Lookup.getDefault().lookup(ProjectController.class);
    pc.newProject();
    workspace = pc.getCurrentWorkspace();
}
 
开发者ID:phiradet,项目名称:gephiSample,代码行数:6,代码来源:GexfToVectorImage.java

示例13: load

import org.gephi.project.api.ProjectController; //导入依赖的package包/类
public void load(QueryWindowData newDataset) {
	if (newDataset == null)
		return;

	currentQueryWindow = newDataset;

	if (skip) {
		skip = false;
		return;
	}
	if (this.selectedNodes == null || this.currentQueryWindow == null) {
		logger.info("Not all data yet, not displaying graph");
		return;
	}

	GraphModel graphModel = Lookup.getDefault().lookup(GraphController.class).getModel();

	if (graphModel != null) {
		if (!keep)
			graphModel.getGraph().clear();
		else
			graphModel.getGraph().clearEdges();

		ProjectController projectController = Lookup.getDefault().lookup(ProjectController.class);
		projectController.cleanWorkspace(workspace);

		// Gephi doesn't terminate these Threads. Since many of these threads lead to OutOfMemory Errors,
		// kill all left-over threads manually.
		terminateThreads("DHNS View Destructor");

	}

	// import to container
	Container container = Lookup.getDefault().lookup(ContainerFactory.class).newContainer();
	GephiImporter gImporter = new GephiImporter(currentQueryWindow, ipMap, this.selectedNodes);
	ContainerLoader loader = container.getLoader();
	gImporter.execute(loader);

	// process data from container into internal graph structure
	ImportController importController = Lookup.getDefault().lookup(ImportController.class);
	importController.process(container, new CustomProcessor(), workspace);

	// update view
	setChanged();
	notifyObservers();
}
 
开发者ID:nullbox,项目名称:Data-and-Information-Visualization-Project,代码行数:47,代码来源:GephiController.java


注:本文中的org.gephi.project.api.ProjectController类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。