Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/378.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 了解Neo4j服务器插件_Java_Neo4j - Fatal编程技术网

Java 了解Neo4j服务器插件

Java 了解Neo4j服务器插件,java,neo4j,Java,Neo4j,我正处于学习如何使用Neo4J的早期阶段,刚刚开始试用Neo4J REST服务器。特别是,我对创建服务器插件很感兴趣,但是这里的问题给我留下了很多问题。首先: 他们举了以下例子: @Description( "An extension to the Neo4j Server for getting all nodes or relationships") public class GetAll extends ServerPlugin { @Name( "get_all_nodes" )

我正处于学习如何使用Neo4J的早期阶段,刚刚开始试用Neo4J REST服务器。特别是,我对创建服务器插件很感兴趣,但是这里的问题给我留下了很多问题。首先:

他们举了以下例子:

@Description( "An extension to the Neo4j Server for getting all nodes or relationships")
public class GetAll extends ServerPlugin {
    @Name( "get_all_nodes" )
    @Description( "Get all nodes from the Neo4j graph database" )
    @PluginTarget( GraphDatabaseService.class )
    public Iterable<Node> getAllNodes( @Source GraphDatabaseService graphDb )....{
  • a) 什么是发现点
  • b)
    @PluginTarget
    @Source
    注释指定了什么,它们应该指向什么

@PluginTarget
决定您的服务器插件是否在节点、关系或数据库级别的上下文中丰富了现有的REST接口,因此它是定位点

@Source
注释用于在相应的上下文中作为参数传递到应用程序中

看一看。
getAllNodes
扩展作用于全局上下文,而
shortestPath
基于节点

Make sure that the discovery point type in the @PluginTarget and the @Source parameter   
are of the same type.