Skip to content

Commit 2a68a2a

Browse files
committed
Initial Commit
Iniital Commit
1 parent dbf1008 commit 2a68a2a

File tree

17 files changed

+758
-1
lines changed

17 files changed

+758
-1
lines changed

README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,24 @@
11
# Neo4jH3
2-
Example usage of Uber H3 with Neo4j
2+
3+
Usage of Uber H3 with Neo4j
4+
This project requires Neo4j 3.5.x or higher
5+
6+
Instructions
7+
------------
8+
9+
This project uses maven, to build a jar-file with the procedure in this
10+
project, simply package the project with maven:
11+
12+
mvn clean package
13+
14+
This will produce a jar-file, `target/uberh3-0.1-SNAPSHOT.jar`,
15+
that can be copied to the `plugin` directory of your Neo4j instance.
16+
17+
cp target/uberh3-0.1-SNAPSHOT.jar neo4j-enterprise-3.5.2/plugins/.
18+
19+
Restart your Neo4j Server. Several new stored procedures are available:
20+
21+
22+
CALL com.dfauth.h3.returnHexAddress("38.439779", "-77.410522","9");
23+
CALL com.dfauth.h3.polygonSearch
24+
CALL call com.dfauth.h3.lineBetweenLocations(37.131,-71.234,38.13,-71.3)

dependency-reduced-pom.xml

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>com.dfauth</groupId>
5+
<artifactId>uberh3</artifactId>
6+
<version>0.1-SNAPSHOT</version>
7+
<build>
8+
<plugins>
9+
<plugin>
10+
<artifactId>maven-compiler-plugin</artifactId>
11+
<version>3.1</version>
12+
<configuration>
13+
<source>1.8</source>
14+
<target>1.8</target>
15+
</configuration>
16+
</plugin>
17+
<plugin>
18+
<artifactId>maven-shade-plugin</artifactId>
19+
<version>2.4.3</version>
20+
<executions>
21+
<execution>
22+
<phase>package</phase>
23+
<goals>
24+
<goal>shade</goal>
25+
</goals>
26+
</execution>
27+
</executions>
28+
</plugin>
29+
</plugins>
30+
</build>
31+
<dependencies>
32+
<dependency>
33+
<groupId>org.neo4j</groupId>
34+
<artifactId>neo4j</artifactId>
35+
<version>3.5.1</version>
36+
<scope>provided</scope>
37+
<exclusions>
38+
<exclusion>
39+
<artifactId>neo4j-kernel</artifactId>
40+
<groupId>org.neo4j</groupId>
41+
</exclusion>
42+
<exclusion>
43+
<artifactId>neo4j-lucene-index</artifactId>
44+
<groupId>org.neo4j</groupId>
45+
</exclusion>
46+
<exclusion>
47+
<artifactId>neo4j-fulltext-index</artifactId>
48+
<groupId>org.neo4j</groupId>
49+
</exclusion>
50+
<exclusion>
51+
<artifactId>neo4j-graph-algo</artifactId>
52+
<groupId>org.neo4j</groupId>
53+
</exclusion>
54+
<exclusion>
55+
<artifactId>neo4j-udc</artifactId>
56+
<groupId>org.neo4j</groupId>
57+
</exclusion>
58+
<exclusion>
59+
<artifactId>neo4j-data-collector</artifactId>
60+
<groupId>org.neo4j</groupId>
61+
</exclusion>
62+
<exclusion>
63+
<artifactId>neo4j-cypher</artifactId>
64+
<groupId>org.neo4j</groupId>
65+
</exclusion>
66+
<exclusion>
67+
<artifactId>neo4j-jmx</artifactId>
68+
<groupId>org.neo4j</groupId>
69+
</exclusion>
70+
<exclusion>
71+
<artifactId>neo4j-bolt</artifactId>
72+
<groupId>org.neo4j</groupId>
73+
</exclusion>
74+
<exclusion>
75+
<artifactId>neo4j-consistency-check</artifactId>
76+
<groupId>org.neo4j</groupId>
77+
</exclusion>
78+
</exclusions>
79+
</dependency>
80+
<dependency>
81+
<groupId>org.neo4j.test</groupId>
82+
<artifactId>neo4j-harness</artifactId>
83+
<version>3.5.1</version>
84+
<scope>test</scope>
85+
<exclusions>
86+
<exclusion>
87+
<artifactId>neo4j-server</artifactId>
88+
<groupId>org.neo4j.app</groupId>
89+
</exclusion>
90+
<exclusion>
91+
<artifactId>neo4j-common</artifactId>
92+
<groupId>org.neo4j</groupId>
93+
</exclusion>
94+
<exclusion>
95+
<artifactId>neo4j-kernel</artifactId>
96+
<groupId>org.neo4j</groupId>
97+
</exclusion>
98+
<exclusion>
99+
<artifactId>neo4j-io</artifactId>
100+
<groupId>org.neo4j</groupId>
101+
</exclusion>
102+
<exclusion>
103+
<artifactId>jersey-client</artifactId>
104+
<groupId>com.sun.jersey</groupId>
105+
</exclusion>
106+
<exclusion>
107+
<artifactId>neo4j-server</artifactId>
108+
<groupId>org.neo4j.app</groupId>
109+
</exclusion>
110+
<exclusion>
111+
<artifactId>commons-codec</artifactId>
112+
<groupId>commons-codec</groupId>
113+
</exclusion>
114+
<exclusion>
115+
<artifactId>httpclient</artifactId>
116+
<groupId>org.apache.httpcomponents</groupId>
117+
</exclusion>
118+
<exclusion>
119+
<artifactId>httpcore</artifactId>
120+
<groupId>org.apache.httpcomponents</groupId>
121+
</exclusion>
122+
</exclusions>
123+
</dependency>
124+
<dependency>
125+
<groupId>org.neo4j.driver</groupId>
126+
<artifactId>neo4j-java-driver</artifactId>
127+
<version>1.4.3</version>
128+
<scope>test</scope>
129+
</dependency>
130+
<dependency>
131+
<groupId>junit</groupId>
132+
<artifactId>junit</artifactId>
133+
<version>4.12</version>
134+
<scope>test</scope>
135+
<exclusions>
136+
<exclusion>
137+
<artifactId>hamcrest-core</artifactId>
138+
<groupId>org.hamcrest</groupId>
139+
</exclusion>
140+
</exclusions>
141+
</dependency>
142+
</dependencies>
143+
<properties>
144+
<commons.version>4.1</commons.version>
145+
<uber.version>3.3.0</uber.version>
146+
<neo4j.version>3.5.1</neo4j.version>
147+
<csv.version>1.2</csv.version>
148+
<lang3.version>3.7</lang3.version>
149+
</properties>
150+
</project>
151+

pom.xml

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>com.dfauth</groupId>
8+
<artifactId>uberh3</artifactId>
9+
<version>0.1-SNAPSHOT</version>
10+
11+
<properties>
12+
<neo4j.version>3.5.1</neo4j.version>
13+
<csv.version>1.2</csv.version>
14+
<lang3.version>3.7</lang3.version>
15+
<uber.version>3.3.0</uber.version>
16+
<commons.version>4.1</commons.version>
17+
</properties>
18+
19+
<dependencies>
20+
<dependency>
21+
<!-- This gives us the Procedure API our runtime code uses.
22+
We have a `provided` scope on it, because when this is
23+
deployed in a Neo4j Instance, the API will be provided
24+
by Neo4j. If you add non-Neo4j dependencies to this
25+
project, their scope should normally be `compile` -->
26+
27+
<groupId>org.neo4j</groupId>
28+
<artifactId>neo4j</artifactId>
29+
<version>${neo4j.version}</version>
30+
<scope>provided</scope>
31+
</dependency>
32+
33+
<dependency>
34+
<groupId>org.apache.commons</groupId>
35+
<artifactId>commons-csv</artifactId>
36+
<version>${csv.version}</version>
37+
</dependency>
38+
39+
<dependency>
40+
<groupId>org.apache.commons</groupId>
41+
<artifactId>commons-lang3</artifactId>
42+
<version>${lang3.version}</version>
43+
</dependency>
44+
45+
<!-- Test Dependencies -->
46+
<dependency>
47+
<!-- This is used for a utility that lets us start Neo4j with
48+
a specific Procedure, which is nice for writing tests. -->
49+
<groupId>org.neo4j.test</groupId>
50+
<artifactId>neo4j-harness</artifactId>
51+
<version>${neo4j.version}</version>
52+
<scope>test</scope>
53+
</dependency>
54+
55+
<dependency>
56+
<!-- Used to send cypher statements to our procedure. -->
57+
<groupId>org.neo4j.driver</groupId>
58+
<artifactId>neo4j-java-driver</artifactId>
59+
<version>1.4.3</version>
60+
<scope>test</scope>
61+
</dependency>
62+
63+
<dependency>
64+
<groupId>junit</groupId>
65+
<artifactId>junit</artifactId>
66+
<version>4.12</version>
67+
<scope>test</scope>
68+
</dependency>
69+
70+
<dependency>
71+
<groupId>com.uber</groupId>
72+
<artifactId>h3</artifactId>
73+
<version>${uber.version}</version>
74+
</dependency>
75+
76+
<dependency>
77+
<groupId>org.apache.commons</groupId>
78+
<artifactId>commons-collections4</artifactId>
79+
<version>${commons.version}</version>
80+
</dependency>
81+
82+
<dependency>
83+
<groupId>org.neo4j</groupId>
84+
<artifactId>procedure-compiler</artifactId>
85+
<version>${neo4j.version}</version>
86+
<optional>true</optional>
87+
<scope>compile</scope>
88+
</dependency>
89+
</dependencies>
90+
91+
<build>
92+
<plugins>
93+
<plugin>
94+
<artifactId>maven-compiler-plugin</artifactId>
95+
<version>3.1</version>
96+
<configuration>
97+
<!-- Neo4j Procedures require Java 8 -->
98+
<source>1.8</source>
99+
<target>1.8</target>
100+
</configuration>
101+
</plugin>
102+
<plugin>
103+
<!-- This generates a jar-file with our procedure code,
104+
plus any dependencies marked as `compile` scope.
105+
This should then be deployed in the `plugins` directory
106+
of each Neo4j instance in your deployment.
107+
After a restart, the procedure is available for calling. -->
108+
<artifactId>maven-shade-plugin</artifactId>
109+
<version>2.4.3</version>
110+
<executions>
111+
<execution>
112+
<phase>package</phase>
113+
<goals>
114+
<goal>shade</goal>
115+
</goals>
116+
</execution>
117+
</executions>
118+
</plugin>
119+
</plugins>
120+
</build>
121+
</project>

src/.DS_Store

6 KB
Binary file not shown.

src/main/.DS_Store

6 KB
Binary file not shown.

src/main/java/.DS_Store

6 KB
Binary file not shown.

src/main/java/com/.DS_Store

6 KB
Binary file not shown.

src/main/java/com/dfauth/.DS_Store

6 KB
Binary file not shown.
6 KB
Binary file not shown.

0 commit comments

Comments
 (0)