Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 18876C8B8 for ; Thu, 23 Aug 2012 07:04:46 +0000 (UTC) Received: (qmail 33481 invoked by uid 500); 23 Aug 2012 07:04:45 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 33380 invoked by uid 500); 23 Aug 2012 07:04:43 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 33346 invoked by uid 99); 23 Aug 2012 07:04:42 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Aug 2012 07:04:42 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 3FDB02C090A for ; Thu, 23 Aug 2012 07:04:42 +0000 (UTC) Date: Thu, 23 Aug 2012 18:04:42 +1100 (NCT) From: "Claus Ibsen (JIRA)" To: issues@camel.apache.org Message-ID: <201195617.4262.1345705482262.JavaMail.jiratomcat@arcas> In-Reply-To: <1481670670.8427.1343955482495.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (CAMEL-5483) Component for neo4j MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-5483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13440092#comment-13440092 ] Claus Ibsen commented on CAMEL-5483: ------------------------------------ Stephen, have you created an account on the wiki? Read this page http://camel.apache.org/how-do-i-edit-the-website.html > Component for neo4j > ------------------- > > Key: CAMEL-5483 > URL: https://issues.apache.org/jira/browse/CAMEL-5483 > Project: Camel > Issue Type: Improvement > Reporter: stephen samuel > Assignee: Willem Jiang > Priority: Minor > Fix For: 2.11.0 > > Attachments: camel-neo4j.patch, remove-int-tests.patch > > > I have created a component for neo4j. It is a producer only and it allows you to create / remove nodes and relationships. > ------ read me ---------- > camel-neo4j > ======== > The camel-neo4j component allows you to treat Neo4j as a camel producer endpoint. This means you can use this component in to() calls but not from() calls. This component is backed by the Spring Data Neo4j Library. > * As a producer, can create or remove nodes, and create or remove relationships. > * Can support as many endpoints as required, eg for multiple databases across multiple instances. > * Headers set for node id (for created nodes), relationship id (for created relationships) > How to Use > ========== > You can use neo4j as an endpoint with the following URI. > `neo4j:http://hostname[:port]/database` > Then you need to set a header on each message, one of the following enum types > ` CREATE_NODE, > REMOVE_NODE, > CREATE_RELATIONSHIP, > REMOVE_RELATIONSHIP` > Eg, > `exchange.getIn().setHeader(Neo4jEndpoint.HEADER_OPERATION, Neo4jOperation.CREATE_NODE);` > The body of the message is used to determine the node or relationship to manipulate. The following body types are supported: > For CREATE_NODE: > * null body - create default node > * Map body - create node with the properties set from the map > For REMOVE_NODE: > * Long or Integer - remove node using the body as the id > * neo4j Node instance - remove the node specified by that instance > For CREATE_RELATIONSHIP: > * SpringDataRelationship - create relationship specified by any @NodeEntity annoted Spring entities. > * BasicRelationship - create relationship specified by the neo4j node types > For REMOVE_RELATIONSHIP: > * Long or Integer - remove relationship using the body as the id > * SpringDataRelationship - remove relationship specified by the @NodeEntity annoted Spring entities. > * BasicRelationship - remove relationship specified by the neo4j node types > Tests > ===== > camel-neo4j has a complete set of unit tests. In addition there are some integration tests that require you to run a local instance of neo4j. By default the tests will look at localhost:7474 on http://localhost:7474/db/data/ > - Initial contribution by Stephen Samuel. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira