mp2930696631 / visualization-neo4j-using-java Goto Github PK
View Code? Open in Web Editor NEW利用neo4j的java驱动包,取出数据,并在网页上面进行可视化
利用neo4j的java驱动包,取出数据,并在网页上面进行可视化
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
public class ToJson {
private String json = "";
//将格式化节点数据和关系数据拼凑成完整的json数据
public ToJson(StringBuffer relationNodesBuffer, StringBuffer relationBuffer){
StringBuffer result = new StringBuffer("");
result.append("{");
result.append(relationNodesBuffer);
result.append(",");
result.append("\n");//换行
result.append(relationBuffer);
result.append("}");
json = result.toString();
}
//将json数据写入文件
public void writeJson(){
try {
FileOutputStream fileOutputStream = new FileOutputStream("D:\\Idea\\Workspace\\TestTraining\\web\\data.json");
fileOutputStream.write(json.getBytes());
fileOutputStream.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
//返回完整的json数据
public String getJson(){
return json;
}
}
为了赚点csdn积分,煞费苦心,文件单独上传,目录结构打乱。各种文件都下全了,积分都给了,你到时代码给全啊。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.