diff options
author | Bananeweizen <bananeweizen@gmx.de> | 2011-09-19 20:55:47 +0200 |
---|---|---|
committer | Bananeweizen <bananeweizen@gmx.de> | 2011-09-19 20:55:47 +0200 |
commit | 00a58e738e1a56a84143444b4057bca5d1e4821c (patch) | |
tree | c73125fd3dc5d17455afd1dc29e2642e4211f737 /main/src/cgeo/geocaching/files | |
parent | 8f725d2903b73b4908809f7bfd3c7d50c3076983 (diff) | |
download | cgeo-00a58e738e1a56a84143444b4057bca5d1e4821c.zip cgeo-00a58e738e1a56a84143444b4057bca5d1e4821c.tar.gz cgeo-00a58e738e1a56a84143444b4057bca5d1e4821c.tar.bz2 |
new: LOC files import
Diffstat (limited to 'main/src/cgeo/geocaching/files')
-rw-r--r-- | main/src/cgeo/geocaching/files/LocParser.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/main/src/cgeo/geocaching/files/LocParser.java b/main/src/cgeo/geocaching/files/LocParser.java index 3bb69cd..12cb1e7 100644 --- a/main/src/cgeo/geocaching/files/LocParser.java +++ b/main/src/cgeo/geocaching/files/LocParser.java @@ -86,11 +86,8 @@ public final class LocParser extends FileParser { final Matcher matcherName = patternName.matcher(pointString); if (matcherName.find()) { String name = matcherName.group(1).trim(); - int pos = name.indexOf(" by "); - if (pos > 0) { - name = name.substring(0, pos).trim(); - } - pointCoord.name = name; + pointCoord.name = StringUtils.substringBeforeLast(name, " by ").trim(); + // owner = StringUtils.substringAfterLast(" by ").trim(); } final Matcher matcherLat = patternLat.matcher(pointString); final Matcher matcherLon = patternLon.matcher(pointString); @@ -158,8 +155,9 @@ public final class LocParser extends FileParser { caches.cacheList.add(cache); fixCache(cache); + cache.type = "traditional"; // type is not given in the LOC file cache.reason = listId; - cache.detailed = false; + cache.detailed = true; cgeoapplication.getInstance().addCacheToSearch(search, cache); } |