繁体   English   中英

了解Neo4j服务器插件

[英]Understanding Neo4j server plugins

我正处于学习如何使用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 )....{

并说:

Make sure that the discovery point type in the @PluginTarget and the @Source parameter   
are of the same type.
  • a)什么是发现点
  • b) @PluginTarget@Source注释指定了什么,它们应该指向什么?

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

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

看看这个例子 getAllNodes延伸作用于全球范围内,而shortestPath是基于一个节点上。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM