本文整理汇总了Java中org.gephi.io.importer.api.Container类的典型用法代码示例。如果您正苦于以下问题:Java Container类的具体用法?Java Container怎么用?Java Container使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Container类属于org.gephi.io.importer.api包,在下文中一共展示了Container类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: load
import org.gephi.io.importer.api.Container; //导入依赖的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: importFile
import org.gephi.io.importer.api.Container; //导入依赖的package包/类
private void importFile(String filename)
{
ImportController importController = Lookup.getDefault().lookup(ImportController.class);
Container container = null;
try{
System.out.println("Start reading gexf file");
File file = new File(filename);
System.out.println("Finishing reading gexf file");
container = importController.importFile(file);
container.getLoader().setEdgeDefault(EdgeDefault.UNDIRECTED);
container.setAllowAutoNode(false);
}
catch (Exception ex)
{
System.out.println("Error during reading the file:");
ex.printStackTrace();
}
importController.process(container, new DefaultProcessor(), workspace);
}
开发者ID:phiradet,项目名称:gephiSample,代码行数:21,代码来源:GexfToVectorImage.java
示例3: open
import org.gephi.io.importer.api.Container; //导入依赖的package包/类
private void open() {
ImportController importController = Lookup.getDefault().lookup(ImportController.class);
Container container;
try {
File file = new File(filePath);
container = importController.importFile(file.getAbsoluteFile());
container.getLoader().setEdgeDefault(EdgeDefault.DIRECTED);
} catch (Exception ex) {
ex.printStackTrace();
return;
}
importController.process(container, new DefaultProcessor(), workspace);
}
开发者ID:vizpub,项目名称:vizpub,代码行数:14,代码来源:GephiProcessing.java
示例4: convert
import org.gephi.io.importer.api.Container; //导入依赖的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
示例5: load
import org.gephi.io.importer.api.Container; //导入依赖的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.io.importer.api.Container类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论