/[aagtl_public1]/src/com/zoffcc/applications/aagtl/GeocacheCoordinate.java
aagtl

Contents of /src/com/zoffcc/applications/aagtl/GeocacheCoordinate.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (show annotations) (download)
Sun Aug 5 13:48:36 2012 UTC (11 years, 7 months ago) by zoffadmin
File size: 4535 byte(s)
initial import of aagtl source code
1 /**
2 * aagtl Advanced Geocaching Tool for Android
3 * loosely based on agtl by Daniel Fett <fett@danielfett.de>
4 * Copyright (C) 2010 - 2012 Zoff.cc <aagtl@work.zoff.cc>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * version 2 as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the
17 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19 */
20
21 package com.zoffcc.applications.aagtl;
22
23 import java.io.Serializable;
24 import java.util.HashMap;
25
26 public class GeocacheCoordinate extends Coordinate implements Serializable
27 {
28 private static final long serialVersionUID = 9038943407829519828L;
29
30 public final static int LOG_NO_LOG = 0;
31 public final static int LOG_AS_FOUND = 1;
32 public final static int LOG_AS_NOTFOUND = 2;
33 public final static int LOG_AS_NOTE = 3;
34
35 public final static HashMap<Integer, String> LOG_AS_HASH = new HashMap<Integer, String>()
36 {
37 /**
38 *
39 */
40 private static final long serialVersionUID = -7496572942942411474L;
41
42 {
43 put(LOG_NO_LOG, "XXXX");
44 put(LOG_AS_FOUND, "Found it");
45 put(LOG_AS_NOTFOUND, "Didn't find it");
46 put(LOG_AS_NOTE, "Write note");
47 }
48 };
49
50 public final static String TYPE_REGULAR = "regular";
51 public final static String TYPE_MULTI = "multi";
52 public final static String TYPE_VIRTUAL = "virtual";
53 public final static String TYPE_EVENT = "event";
54 public final static String TYPE_MYSTERY = "mystery";
55 public final static String TYPE_WEBCAM = "webcam";
56 public final static String TYPE_EARTH = "earth";
57 public final static String TYPE_UNKNOWN = "unknown";
58
59 public final static HashMap<String, String> GC_TYPE_HASH = new HashMap<String, String>()
60 {
61 /**
62 *
63 */
64 private static final long serialVersionUID = 1820707086245641420L;
65
66 {
67 put("2", TYPE_REGULAR);
68 put("3", TYPE_MULTI);
69 put("4", TYPE_VIRTUAL);
70 put("6", TYPE_EVENT);
71 put("8", TYPE_MYSTERY);
72 put("11", TYPE_WEBCAM);
73 put("137", TYPE_EARTH);
74 }
75 };
76
77 // public final static String[] TYPES = {TYPE_REGULAR, TYPE_MULTI,
78 // TYPE_VIRTUAL, TYPE_EVENT, TYPE_MYSTERY, TYPE_WEBCAM, TYPE_EARTH, TYPE_UNKNOWN};
79
80 public final static int STATUS_NORMAL = 0;
81 public final static int STATUS_DISABLED = 1;
82
83 public final static HashMap<Integer, String> STATUS_HASH = new HashMap<Integer, String>()
84 {
85 /**
86 *
87 */
88 private static final long serialVersionUID = 7496571242948713474L;
89
90 {
91 put(STATUS_NORMAL, "normal");
92 put(STATUS_DISABLED, "disabled");
93 }
94 };
95
96 public final static int AAGTL_STATUS_NORMAL = 0;
97 public final static int AAGTL_STATUS_FOUND = 1;
98
99 public final static String LOG_TYPE_FOUND = "smile";
100 public final static String LOG_TYPE_NOTFOUND = "sad";
101 public final static String LOG_TYPE_NOTE = "note";
102 public final static String LOG_TYPE_MAINTENANCE = "maint";
103
104 double lat;
105 double lon;
106 String name;
107 String title;
108 String desc;
109 String shortdesc;
110 String hints;
111 String type;
112 int size;
113 int difficulty;
114 int terrain;
115 String owner;
116 Boolean found;
117 String waypoints;
118 String images;
119 String notes;
120 String fieldnotes;
121 int log_as;
122 String log_date;
123 Boolean marked;
124 String logs;
125 String guid;
126 int status;
127 int aagtl_status;
128
129 public GeocacheCoordinate(double lat, double lon, String name)
130 {
131 super(lat, lon);
132
133 this.lat = lat;
134 this.lon = lon;
135
136 // this.name --> GC-CODE !!!
137 this.name = name;
138
139 // this.title --> cache name !!!
140 this.title = "";
141
142 this.shortdesc = "";
143 this.desc = "";
144 this.hints = "";
145 this.type = "";
146 this.size = -1;
147 this.difficulty = -1;
148 this.terrain = -1;
149 this.owner = "";
150 this.found = false;
151 this.waypoints = "";
152 this.images = "";
153 this.notes = "";
154 this.fieldnotes = "";
155 this.log_as = LOG_NO_LOG;
156 this.log_date = "";
157 this.marked = false;
158 this.logs = "";
159 this.guid = "";
160 this.status = STATUS_NORMAL;
161 this.aagtl_status = AAGTL_STATUS_NORMAL;
162
163 }
164 }

   
Visit the aagtl Website