java neo4j rest api_Neo4j: Remote Restful API (java)

#git clone https://github.com/neo4j-contrib/java-rest-binding.git

#git tag -l

#git checkout neo4j-rest-graphdb-2.0.1

#mvn clean install

In mvn project's pom.xml

add

org.neo4j

neo4j-rest-graphdb

2.0.1

compile

Sample code

package inokStormSolrContentRec;

import org.neo4j.graphdb.GraphDatabaseService;

import org.neo4j.graphdb.Node;

import org.neo4j.graphdb.ResourceIterable;

import org.neo4j.graphdb.ResourceIterator;

import org.neo4j.rest.graphdb.RestGraphDatabase;

public class Neo4JSearch {

public static void main(String[] args) {

GraphDatabaseService gds = new RestGraphDatabase("http://localhost:7474/db/data");

ResourceIterable nodes = gds.findNodesByLabelAndProperty(FIFONeo4jLabel.User, "nickname", "zhaohj");

ResourceIterator it = nodes.iterator();

while(it.hasNext()){

Node node = it.next();

System.out.println("node info: " + node.getId() + "\t"+node.getProperty("nickname"));

}

}

}

Reference

https://github.com/neo4j-contrib/java-rest-binding/tree/neo4j-rest-graphdb-2.0.1

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值