blob: 30d1a4bfb9b28c7da23f02b253f7c1e27827e6a3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
package cgeo.geocaching.connector;
import cgeo.geocaching.cgCache;
import org.apache.commons.lang3.StringUtils;
public class GeocachingAustraliaConnector extends AbstractConnector {
@Override
public String getName() {
return "Geocaching Australia";
}
@Override
public String getCacheUrl(final cgCache cache) {
return getCacheUrlPrefix() + cache.getGeocode();
}
@Override
public String getHost() {
return "geocaching.com.au";
}
@Override
public boolean canHandle(final String geocode) {
return (StringUtils.startsWithIgnoreCase(geocode, "GA") || StringUtils.startsWithIgnoreCase(geocode, "TP")) && isNumericId(geocode.substring(2));
}
@Override
protected String getCacheUrlPrefix() {
return "http://" + getHost() + "/cache/";
}
}
|