如何可视化从嵌入式 Neo4j java 应用程序创建的 Neo4j 图形数据库 [英] How to visualise Neo4j graph database created from an embedded Neo4j java application

查看:23
本文介绍了如何可视化从嵌入式 Neo4j java 应用程序创建的 Neo4j 图形数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个嵌入 Neo4j 的应用程序.在那个应用程序中,我创建并存储了一些具有某些关系的节点.我的应用程序已将此数据库保存到文件中.我想将这些数据可视化.我知道如果我启动 Neo4j 服务器,我可以看到图表,但我不知道如何将我的 neo4j.db 文件导入 Neo4j 服务器,以便我可以对其进行可视化.任何建议将不胜感激.

I created an application which embedded Neo4j. In that application I created and stored some nodes with some relationships. My application has saved this database to a file. I would like to visualise that data. I know I can see graphs if I fire up the Neo4j server but I do not know how to import my neo4j.db file into the Neo4j server so that I can visualise it. Any suggestions would be greatly appreciated.

推荐答案

根据您的用例,您可能有不同的解决方案:

Depending on your use case you might have different solutions:

  • 使用基于网络的可视化
  • 使用桌面应用程序可视化您的数据

在这种情况下,您必须使用网络应用来可视化数据.您基本上有两种解决方案:Javascript 或 Java 小程序.

In this case you have to take care of the web-app to visualize the data. You have basically two solutions out there: Javascript or Java applets.

对于 Javascript 方面,您有很多选择:D3jsVivaGraphSigmaJSKeyLines.
前三个是开源且免费的,而最后一个有商业许可证且非免费.
SO 上已经有关于这些库的一百万个问题,所以我会把你链接到 一些 那些 了解各种差异.

For the Javascript side you have many choices: D3js, VivaGraph, SigmaJS, KeyLines.
The first three are open source and free while the last one has a commercial licence and non-free.
There're already a million questions about these libraries on SO, so I'll link you to some of those to understand the various differences.

在这种情况下,我建议您的主要解决方案是:GephiCytoscape.
在这两种情况下,我认为您必须编写自己的适配器才能与您的应用程序进行通信.

The main solutions in this case I would recommend you, depending on the kind of data are: either Gephi or Cytoscape.
In both cases I believe you have to write your own adapter to communicate with your application.

两种情况下的架构如下:

The architecture in both cases will be the following:

  • 控制器使用您要使用的 JS 可视化框架呈现网页
  • 控制器提供了几个 JSON 端点,客户端可以使用它们来查询来自 Neo4J 嵌入式的数据
  • 每个查询获取数据,放入模型并渲染 JSON 以发送给客户端

这篇关于如何可视化从嵌入式 Neo4j java 应用程序创建的 Neo4j 图形数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆