Getting Started With Apoc
From Neo4j Wiki
Note: this page is now updated for relase 1.0 of Apoc, with the new component name neo4j-apoc.
Apoc is A Package Of Components, i.e. a handful of useful Neo4j components bundled together in one convenient package. It includes sample code that demonstrates basic usage of these components.
Apoc contains no new actual functionality but is simply a a meta package of components that we noticed were "always" included in new projects.
Contents |
[edit] Components included in Apoc
Apoc currently includes four components:
- neo4j-kernel -- the Neo4j kernel
- neo4j-index -- an indexing component that lets you look up nodes by property value
- neo4j-shell -- a command line browser that allows you to connect to a running Neo4j instance and browse the graph using familiar Unix commands like
ls,cdandpwd - neo4j-remote-graphdb -- an implementation of the Neo4j API that delegates all operations to a remote Neo4j instance
[edit] How to get started with Apoc
[edit] Using Maven
Apoc is a Maven project that depends on the four components listed above. So you only have to declare a single dependency in your application's POM to get a tested set of useful components on top of Neo4j itself. Simply add the following to your pom.xml:
<project>
...
<repositories>
<repository>
<id>neo4j-public-repository</id>
<name>Publically available Maven 2 repository for Neo4j</name>
<url>http://m2.neo4j.org </url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
...
<dependencies>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-apoc</artifactId>
<version>1.0</version>
<type>pom</type>
</dependency>
...
</dependencies>
...
</project>
Code examples using the libraries are found in the neo4j-apoc-examples source code.
[edit] Using a downloaded zip/tarball
- Download the libraries together with examples: neo4j-apoc-1.0.tar.gz neo4j-apoc-1.0.zip
- Unpack the downloaded file
- The contents of the download:
-
binshortcuts to start the example applications on *nix or Windows systems -
examplessource code of the examples -
libthe Apoc libraries -
LICENSE, NOTICE, READMEgeneral and license information
-
[edit] How to use Apoc
- Try out the examples and learn from the code
- Check out the introductory 10-minute Getting Started Guide
- Read in the apidocs to get the finer points regarding neo4j: http://api.neo4j.org/
- Find more information about the included libraries on the Apoc component page http://components.neo4j.org/apoc/
- Go to the Main Page and look for more getting started information

