aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/Context.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-12-31 11:41:56 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-12-31 11:41:56 +1300
commit679c2852e3c4987091e0b84b7e7d80a9f72964a0 (patch)
treec0fe0ab222bbd251b25e3520c5f62c68669fbaa2 /src/org/traccar/Context.java
parent68569c05fb4be377baed5cd0ecb1b75176d24f01 (diff)
downloadtrackermap-server-679c2852e3c4987091e0b84b7e7d80a9f72964a0.tar.gz
trackermap-server-679c2852e3c4987091e0b84b7e7d80a9f72964a0.tar.bz2
trackermap-server-679c2852e3c4987091e0b84b7e7d80a9f72964a0.zip
Add exception classes and more renames
Diffstat (limited to 'src/org/traccar/Context.java')
-rw-r--r--src/org/traccar/Context.java46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/org/traccar/Context.java b/src/org/traccar/Context.java
index 72d5dd9f8..46294edfa 100644
--- a/src/org/traccar/Context.java
+++ b/src/org/traccar/Context.java
@@ -34,15 +34,15 @@ import org.traccar.database.NotificationManager;
import org.traccar.database.PermissionsManager;
import org.traccar.database.GeofenceManager;
import org.traccar.database.StatisticsManager;
-import org.traccar.geocoder.BingMapsReverseGeocoder;
-import org.traccar.geocoder.FactualReverseGeocoder;
-import org.traccar.geocoder.GeocodeFarmReverseGeocoder;
-import org.traccar.geocoder.GisgraphyReverseGeocoder;
-import org.traccar.geocoder.GoogleReverseGeocoder;
-import org.traccar.geocoder.MapQuestReverseGeocoder;
-import org.traccar.geocoder.NominatimReverseGeocoder;
-import org.traccar.geocoder.OpenCageReverseGeocoder;
-import org.traccar.geocoder.ReverseGeocoder;
+import org.traccar.geocoder.BingMapsGeocoder;
+import org.traccar.geocoder.FactualGeocoder;
+import org.traccar.geocoder.GeocodeFarmGeocoder;
+import org.traccar.geocoder.GisgraphyGeocoder;
+import org.traccar.geocoder.GoogleGeocoder;
+import org.traccar.geocoder.MapQuestGeocoder;
+import org.traccar.geocoder.NominatimGeocoder;
+import org.traccar.geocoder.OpenCageGeocoder;
+import org.traccar.geocoder.Geocoder;
import org.traccar.helper.Log;
import org.traccar.geolocation.GoogleGeolocationProvider;
import org.traccar.geolocation.GeolocationProvider;
@@ -104,10 +104,10 @@ public final class Context {
return permissionsManager;
}
- private static ReverseGeocoder reverseGeocoder;
+ private static Geocoder geocoder;
- public static ReverseGeocoder getReverseGeocoder() {
- return reverseGeocoder;
+ public static Geocoder getGeocoder() {
+ return geocoder;
}
private static GeolocationProvider geolocationProvider;
@@ -213,37 +213,37 @@ public final class Context {
switch (type) {
case "nominatim":
if (key != null) {
- reverseGeocoder = new NominatimReverseGeocoder(url, key, cacheSize);
+ geocoder = new NominatimGeocoder(url, key, cacheSize);
} else {
- reverseGeocoder = new NominatimReverseGeocoder(url, cacheSize);
+ geocoder = new NominatimGeocoder(url, cacheSize);
}
break;
case "gisgraphy":
- reverseGeocoder = new GisgraphyReverseGeocoder(url, cacheSize);
+ geocoder = new GisgraphyGeocoder(url, cacheSize);
break;
case "mapquest":
- reverseGeocoder = new MapQuestReverseGeocoder(url, key, cacheSize);
+ geocoder = new MapQuestGeocoder(url, key, cacheSize);
break;
case "opencage":
- reverseGeocoder = new OpenCageReverseGeocoder(url, key, cacheSize);
+ geocoder = new OpenCageGeocoder(url, key, cacheSize);
break;
case "bingmaps":
- reverseGeocoder = new BingMapsReverseGeocoder(url, key, cacheSize);
+ geocoder = new BingMapsGeocoder(url, key, cacheSize);
break;
case "factual":
- reverseGeocoder = new FactualReverseGeocoder(url, key, cacheSize);
+ geocoder = new FactualGeocoder(url, key, cacheSize);
break;
case "geocodefarm":
if (key != null) {
- reverseGeocoder = new GeocodeFarmReverseGeocoder(key, cacheSize);
+ geocoder = new GeocodeFarmGeocoder(key, cacheSize);
} else {
- reverseGeocoder = new GeocodeFarmReverseGeocoder(cacheSize);
+ geocoder = new GeocodeFarmGeocoder(cacheSize);
}
default:
if (key != null) {
- reverseGeocoder = new GoogleReverseGeocoder(key, cacheSize);
+ geocoder = new GoogleGeocoder(key, cacheSize);
} else {
- reverseGeocoder = new GoogleReverseGeocoder(cacheSize);
+ geocoder = new GoogleGeocoder(cacheSize);
}
break;
}