[英]Nodes are missing in Neoclipse graph
I have created Neo4j nodes and relatioships in java ,their values are coming from DB.When i am trying to display it on Neoclipse only first two nodes and their relationship is shown.
我在Java中创建了Neo4j节点和关系,它们的值来自DB。当我试图在Neoclipse上显示它时,仅显示前两个节点及其关系。 Code:
码:
GraphDatabaseService graphDb = new GraphDatabaseFactory().newEmbeddedDatabase("D://ws-NEO//Fade");
Transaction tx=graphDb.beginTx();
Connection conn = null;
try{
conn=ConnectionFactory.getConnection();
Statement stat=conn.createStatement();
String sql="select * from Fade where App_Int_Id < 19"; //Two records are there in result
ResultSet rs=stat.executeQuery(sql);
String n1 = "",n2="",rel="",type="";
while(rs.next()){
n1=rs.getString(2);
n2=rs.getString(7);
rel=rs.getString(3);
type=rs.getString(4);
Node first=graphDb.createNode();
first.setProperty("name", n1);
Node second=graphDb.createNode();
second.setProperty("name", n2);
RelationshipType KNOWS = DynamicRelationshipType.withName(rel);
first.createRelationshipTo(second, KNOWS);
}
tx.success();}
finally
{ tx.finish();
graphDb.shutdown();
conn.close();
}
It outputs two records in console:
node1 -- My App
node2 -- GCAM
relationship -- Cash focus
Node1 ceated
Node2 ceated
relationship created
----------------------------------------------------------------------------------------------------
node1 -- My Test app
node2 -- GCAM
relationship -- Test Interface 11
Node1 ceated
Node2 ceated
relationship created
----------------------------------------------------------------------------------------------------
however only single record is displayed in Neoclipse ,others are missing . 但是Neoclipse中仅显示单个记录,其他记录则丢失。 Plz guide.
PLZ指南。
Neoclipse seems to have a default traversal depth of 1, giving you the result that you saw. Neoclipse的默认遍历深度似乎为1,从而为您提供看到的结果。 But the traversal depth is adjustable, and neoclipse will remember the last-used traversal depth the next time it starts up.
但是遍历深度是可调整的,并且Neoclipse会在下次启动时记住上一次使用的遍历深度。
To increment the traversal depth, you can click on the green '+' button in the toolbar at the top of the graph pane, and to decrement it you click on the green '-' button. 要增加遍历深度,可以在图形窗格顶部的工具栏中单击绿色的“ +”按钮,而要减小其深度,请单击绿色的“-”按钮。
You can also change the starting node (for traversal purposes) by clicking on it. 您也可以通过单击更改起始节点(出于遍历目的)。 And double-clicking on a node causes all its neighbor nodes to display.
双击节点将显示其所有邻居节点。
There is a lot more functionality, but you need to read the help documentation and play around with the tool to discover all its capabilities. 还有很多功能,但是您需要阅读帮助文档并试用该工具以发现其所有功能。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.