Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/332.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 遍历整个标签_Java_Label_Neo4j - Fatal编程技术网

Java 遍历整个标签

Java 遍历整个标签,java,label,neo4j,Java,Label,Neo4j,我正在使用Neo4j 2.0里程碑3 目前有以下工作代码: String DB_PATH = "/usr/local/Cellar/neo4j/community-1.8.1-unix/libexec/data/graph.db"; GraphDatabaseService graphDb = new GraphDatabaseFactory().newEmbeddedDatabase(DB_PATH); Transaction tx = graphDb.beginTx(); try { N

我正在使用Neo4j 2.0里程碑3

目前有以下工作代码:

String DB_PATH = "/usr/local/Cellar/neo4j/community-1.8.1-unix/libexec/data/graph.db";
GraphDatabaseService graphDb = new GraphDatabaseFactory().newEmbeddedDatabase(DB_PATH);
Transaction tx = graphDb.beginTx();
try {
  Node myNode = graphDb.createNode();
  Label myLabel = DynamicLabel.label('Label_Name');
  myNode.addLabel(myLabel);
  tx.success();
}
finally {
  tx.finish();
}
如何使用嵌入式API遍历所有具有
Label\u Name

签出的节点:

GlobalGraphOperations.at(graphDb).getAllNodesWithLabel(DynamicLabel.label('Label_Name'));