在 JUNG 中导入 GraphML 文件

发布于 2024-08-22 17:53:42 字数 47 浏览 3 评论 0原文

我是 JUNG 的新手,谁能告诉我如何将 GraphML 导入到 JUNG 中。

I am new to JUNG, can any one show me how to import a GraphML to JUNG.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

深海不蓝 2024-08-29 17:53:42

我不确定您是否正在使用数据库,但如果您正在使用数据库,那么使用 Neo4J 就非常容易。 Neo4J 支持从 .graphml 文件导入/导出。完成所有操作后,您可以使用蓝图将 Neo4J 数据库连接到 JUNG。不超过 2 行代码:

com.tinkerpop.blueprints.Graph g = new Neo4JGraph(gds);
GraphJung gj = new GraphJung(g);

其中 gds 是 Neo4J 中的 GraphDatabaseService 对象。就像我说的,非常简单,您可以想象应用程序背后有强大的图形数据库的可能性。

I'm not sure if you're working with a database, but if you are this is very easy with Neo4J. Neo4J supports import/export from .graphml files. Once you have everything done, you can hook up your Neo4J database to JUNG using blueprints. It takes no more than 2 lines of code:

com.tinkerpop.blueprints.Graph g = new Neo4JGraph(gds);
GraphJung gj = new GraphJung(g);

In which gds is the GraphDatabaseService object from Neo4J. Like I said, very easy, and you can imagine the possibilities with a powerful graph database behind your application.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文