Skip to content

Commit bcaa8e4

Browse files
committed
Initial project import.
1 parent 29727dd commit bcaa8e4

20 files changed

+955
-1
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/target/
2+
/.settings/
3+
/.classpath
4+
/.project

README.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
google-geocoding
22
================
33

4-
Java API for the Google geocoding service.
4+
Java API for the [Google geocoding](https://developers.google.com/maps/documentation/geocoding/) service.
5+
6+
# Usage
7+
8+
Add the dependency to your Maven POM:
9+
10+
```xml
11+
<dependency>
12+
<groupId>com.bytebybyte</groupId>
13+
<artifactId>google-geocoding</artifactId>
14+
<version>3.0.0</version>
15+
</dependency>
16+
```

pom.xml

+195
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
4+
<modelVersion>4.0.0</modelVersion>
5+
6+
<groupId>com.bytebybyte</groupId>
7+
<artifactId>google-geocoding</artifactId>
8+
<version>3.0.0-SNAPSHOT</version>
9+
10+
<name>Google Geocoding Service</name>
11+
<description>Java API for the Google geocoding service.</description>
12+
<url>https://github.com/gjordi/google-geocoding</url>
13+
14+
<parent>
15+
<groupId>org.springframework.boot</groupId>
16+
<artifactId>spring-boot-starter-parent</artifactId>
17+
<version>1.1.6.RELEASE</version>
18+
</parent>
19+
20+
<organization>
21+
<name>Byte by Byte Inc.</name>
22+
<url>http://www.bytebybyte.com</url>
23+
</organization>
24+
25+
<prerequisites>
26+
<maven>3.0.0</maven>
27+
</prerequisites>
28+
29+
<properties>
30+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
31+
</properties>
32+
33+
<dependencies>
34+
<dependency>
35+
<groupId>org.springframework.boot</groupId>
36+
<artifactId>spring-boot-starter</artifactId>
37+
<exclusions>
38+
<exclusion>
39+
<groupId>org.springframework.boot</groupId>
40+
<artifactId>spring-boot-starter-logging</artifactId>
41+
</exclusion>
42+
</exclusions>
43+
</dependency>
44+
<dependency>
45+
<groupId>org.springframework.boot</groupId>
46+
<artifactId>spring-boot-starter-log4j</artifactId>
47+
</dependency>
48+
49+
<dependency>
50+
<groupId>org.springframework</groupId>
51+
<artifactId>spring-web</artifactId>
52+
</dependency>
53+
<dependency>
54+
<groupId>com.fasterxml.jackson.core</groupId>
55+
<artifactId>jackson-databind</artifactId>
56+
</dependency>
57+
58+
<dependency>
59+
<groupId>org.springframework.boot</groupId>
60+
<artifactId>spring-boot-starter-test</artifactId>
61+
<scope>test</scope>
62+
</dependency>
63+
</dependencies>
64+
65+
<scm>
66+
<connection>scm:git:[email protected]:gjordi/google-geocoding.git</connection>
67+
<developerConnection>scm:git:[email protected]:gjordi/google-geocoding.git</developerConnection>
68+
<url>[email protected]:gjordi/google-geocoding.git</url>
69+
</scm>
70+
71+
<issueManagement>
72+
<system>github</system>
73+
<url>https://github.com/gjordi/google-geocoding/issues</url>
74+
</issueManagement>
75+
76+
<licenses>
77+
<license>
78+
<name>Apache License Version 2</name>
79+
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
80+
</license>
81+
</licenses>
82+
83+
<developers>
84+
<developer>
85+
<id>gjordi</id>
86+
<name>Gjordi McIntyre</name>
87+
<email>[email protected]</email>
88+
<roles>
89+
<role>architect</role>
90+
<role>developer</role>
91+
</roles>
92+
<timezone>UTC-7</timezone>
93+
</developer>
94+
</developers>
95+
96+
<build>
97+
<plugins>
98+
<plugin>
99+
<groupId>org.apache.maven.plugins</groupId>
100+
<artifactId>maven-compiler-plugin</artifactId>
101+
<version>3.1</version>
102+
<configuration>
103+
<source>1.7</source>
104+
<target>1.7</target>
105+
</configuration>
106+
</plugin>
107+
<plugin>
108+
<groupId>org.apache.maven.plugins</groupId>
109+
<artifactId>maven-release-plugin</artifactId>
110+
<version>2.5</version>
111+
<configuration>
112+
<autoVersionSubmodules>true</autoVersionSubmodules>
113+
<useReleaseProfile>false</useReleaseProfile>
114+
<releaseProfiles>release</releaseProfiles>
115+
<goals>deploy</goals>
116+
</configuration>
117+
</plugin>
118+
<plugin>
119+
<groupId>org.sonatype.plugins</groupId>
120+
<artifactId>nexus-staging-maven-plugin</artifactId>
121+
<version>1.6.2</version>
122+
<extensions>true</extensions>
123+
<configuration>
124+
<serverId>ossrh</serverId>
125+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
126+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
127+
</configuration>
128+
</plugin>
129+
</plugins>
130+
</build>
131+
132+
<profiles>
133+
<profile>
134+
<id>release</id>
135+
<build>
136+
<plugins>
137+
<plugin>
138+
<groupId>org.apache.maven.plugins</groupId>
139+
<artifactId>maven-source-plugin</artifactId>
140+
<version>2.3</version>
141+
<executions>
142+
<execution>
143+
<id>attach-sources</id>
144+
<goals>
145+
<goal>jar-no-fork</goal>
146+
</goals>
147+
</execution>
148+
</executions>
149+
</plugin>
150+
<plugin>
151+
<groupId>org.apache.maven.plugins</groupId>
152+
<artifactId>maven-javadoc-plugin</artifactId>
153+
<version>2.9.1</version>
154+
<executions>
155+
<execution>
156+
<id>attach-javadocs</id>
157+
<goals>
158+
<goal>jar</goal>
159+
</goals>
160+
</execution>
161+
</executions>
162+
</plugin>
163+
<plugin>
164+
<groupId>org.apache.maven.plugins</groupId>
165+
<artifactId>maven-gpg-plugin</artifactId>
166+
<version>1.5</version>
167+
<executions>
168+
<execution>
169+
<id>sign-artifacts</id>
170+
<phase>verify</phase>
171+
<goals>
172+
<goal>sign</goal>
173+
</goals>
174+
</execution>
175+
</executions>
176+
</plugin>
177+
</plugins>
178+
</build>
179+
</profile>
180+
</profiles>
181+
182+
<distributionManagement>
183+
<snapshotRepository>
184+
<id>ossrh</id>
185+
<name>Maven Central Snapshot Repository</name>
186+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
187+
</snapshotRepository>
188+
<repository>
189+
<id>ossrh</id>
190+
<name>Maven Central Staging Repository</name>
191+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
192+
</repository>
193+
</distributionManagement>
194+
195+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package com.bytebybyte.google.geocoding.service;
2+
3+
import java.util.Map;
4+
5+
public interface IGeocodeRequest {
6+
7+
Map<String, String> getParameters();
8+
9+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.bytebybyte.google.geocoding.service;
2+
3+
public interface IGeocodingService {
4+
5+
IResponse geocode(IGeocodeRequest request);
6+
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package com.bytebybyte.google.geocoding.service;
2+
3+
import com.bytebybyte.google.geocoding.service.response.Result;
4+
import com.bytebybyte.google.geocoding.service.response.Status;
5+
6+
public interface IResponse {
7+
8+
/**
9+
* An array of geocoded address information and geometry information.
10+
*
11+
* @return Result[]
12+
*/
13+
Result[] getResults();
14+
15+
/**
16+
* Metadata on the request.
17+
*
18+
* @return Status
19+
*/
20+
Status getStatus();
21+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package com.bytebybyte.google.geocoding.service.request;
2+
3+
import java.util.Map;
4+
5+
import com.bytebybyte.google.geocoding.service.IGeocodeRequest;
6+
7+
public class GeocodeRequest implements IGeocodeRequest {
8+
9+
protected Map<String, String> parameters;
10+
11+
protected GeocodeRequest() {
12+
}
13+
14+
public GeocodeRequest(Map<String, String> parameters) {
15+
this.parameters = parameters;
16+
}
17+
18+
@Override
19+
public Map<String, String> getParameters() {
20+
return parameters;
21+
}
22+
23+
}

0 commit comments

Comments
 (0)