source: josm/trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java@ 8565

Last change on this file since 8565 was 8540, checked in by Don-vip, 9 years ago

fix remaining checkstyle issues

  • Property svn:eol-style set to native
File size: 24.6 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.io;
3
4import static org.openstreetmap.josm.tools.I18n.tr;
5import static org.openstreetmap.josm.tools.I18n.trn;
6
7import java.io.IOException;
8import java.io.InputStream;
9import java.net.HttpURLConnection;
10import java.util.ArrayList;
11import java.util.Collection;
12import java.util.HashSet;
13import java.util.Iterator;
14import java.util.LinkedHashSet;
15import java.util.List;
16import java.util.NoSuchElementException;
17import java.util.Set;
18import java.util.concurrent.Callable;
19import java.util.concurrent.CompletionService;
20import java.util.concurrent.ExecutionException;
21import java.util.concurrent.Executor;
22import java.util.concurrent.ExecutorCompletionService;
23import java.util.concurrent.Executors;
24import java.util.concurrent.Future;
25
26import org.openstreetmap.josm.Main;
27import org.openstreetmap.josm.data.osm.DataSet;
28import org.openstreetmap.josm.data.osm.DataSetMerger;
29import org.openstreetmap.josm.data.osm.Node;
30import org.openstreetmap.josm.data.osm.OsmPrimitive;
31import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
32import org.openstreetmap.josm.data.osm.PrimitiveId;
33import org.openstreetmap.josm.data.osm.Relation;
34import org.openstreetmap.josm.data.osm.RelationMember;
35import org.openstreetmap.josm.data.osm.SimplePrimitiveId;
36import org.openstreetmap.josm.data.osm.Way;
37import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
38import org.openstreetmap.josm.gui.progress.ProgressMonitor;
39import org.openstreetmap.josm.tools.CheckParameterUtil;
40
41/**
42 * Retrieves a set of {@link OsmPrimitive}s from an OSM server using the so called
43 * Multi Fetch API.
44 *
45 * Usage:
46 * <pre>
47 * MultiFetchServerObjectReader reader = MultiFetchServerObjectReader()
48 * .append(2345,2334,4444)
49 * .append(new Node(72343));
50 * reader.parseOsm();
51 * if (!reader.getMissingPrimitives().isEmpty()) {
52 * Main.info("There are missing primitives: " + reader.getMissingPrimitives());
53 * }
54 * if (!reader.getSkippedWays().isEmpty()) {
55 * Main.info("There are skipped ways: " + reader.getMissingPrimitives());
56 * }
57 * </pre>
58 */
59public class MultiFetchServerObjectReader extends OsmServerReader{
60 /**
61 * the max. number of primitives retrieved in one step. Assuming IDs with 7 digits,
62 * this leads to a max. request URL of ~ 1600 Bytes ((7 digits + 1 Separator) * 200),
63 * which should be safe according to the
64 * <a href="http://www.boutell.com/newfaq/misc/urllength.html">WWW FAQ</a>.
65 */
66 private static final int MAX_IDS_PER_REQUEST = 200;
67
68 private Set<Long> nodes;
69 private Set<Long> ways;
70 private Set<Long> relations;
71 private Set<PrimitiveId> missingPrimitives;
72 private DataSet outputDataSet;
73
74 /**
75 * Constructs a {@code MultiFetchServerObjectReader}.
76 */
77 public MultiFetchServerObjectReader() {
78 nodes = new LinkedHashSet<>();
79 ways = new LinkedHashSet<>();
80 relations = new LinkedHashSet<>();
81 this.outputDataSet = new DataSet();
82 this.missingPrimitives = new LinkedHashSet<>();
83 }
84
85 /**
86 * Remembers an {@link OsmPrimitive}'s id. The id will
87 * later be fetched as part of a Multi Get request.
88 *
89 * Ignore the id if it represents a new primitives.
90 *
91 * @param id the id
92 */
93 protected void remember(PrimitiveId id) {
94 if (id.isNew()) return;
95 switch(id.getType()) {
96 case NODE: nodes.add(id.getUniqueId()); break;
97 case WAY: ways.add(id.getUniqueId()); break;
98 case RELATION: relations.add(id.getUniqueId()); break;
99 }
100 }
101
102 /**
103 * remembers an {@link OsmPrimitive}'s id. <code>ds</code> must include
104 * an {@link OsmPrimitive} with id=<code>id</code>. The id will
105 * later we fetched as part of a Multi Get request.
106 *
107 * Ignore the id if it id &lt;= 0.
108 *
109 * @param ds the dataset (must not be null)
110 * @param id the primitive id
111 * @param type The primitive type. Must be one of {@link OsmPrimitiveType#NODE NODE}, {@link OsmPrimitiveType#WAY WAY},
112 * {@link OsmPrimitiveType#RELATION RELATION}
113 * @throws IllegalArgumentException if ds is null
114 * @throws NoSuchElementException if ds does not include an {@link OsmPrimitive} with id=<code>id</code>
115 */
116 protected void remember(DataSet ds, long id, OsmPrimitiveType type) throws NoSuchElementException {
117 CheckParameterUtil.ensureParameterNotNull(ds, "ds");
118 if (id <= 0) return;
119 OsmPrimitive primitive = ds.getPrimitiveById(id, type);
120 if (primitive == null)
121 throw new NoSuchElementException(tr("No primitive with id {0} in local dataset. Cannot infer primitive type.", id));
122 remember(primitive.getPrimitiveId());
123 return;
124 }
125
126 /**
127 * appends a {@link OsmPrimitive} id to the list of ids which will be fetched from the server.
128 *
129 * @param ds the {@link DataSet} to which the primitive belongs
130 * @param id the primitive id
131 * @param type The primitive type. Must be one of {@link OsmPrimitiveType#NODE NODE}, {@link OsmPrimitiveType#WAY WAY},
132 * {@link OsmPrimitiveType#RELATION RELATION}
133 * @return this
134 */
135 public MultiFetchServerObjectReader append(DataSet ds, long id, OsmPrimitiveType type) {
136 OsmPrimitive p = ds.getPrimitiveById(id, type);
137 switch(type) {
138 case NODE:
139 return appendNode((Node) p);
140 case WAY:
141 return appendWay((Way) p);
142 case RELATION:
143 return appendRelation((Relation) p);
144 }
145 return this;
146 }
147
148 /**
149 * appends a {@link Node} id to the list of ids which will be fetched from the server.
150 *
151 * @param node the node (ignored, if null)
152 * @return this
153 */
154 public MultiFetchServerObjectReader appendNode(Node node) {
155 if (node == null) return this;
156 remember(node.getPrimitiveId());
157 return this;
158 }
159
160 /**
161 * appends a {@link Way} id and the list of ids of nodes the way refers to the list of ids which will be fetched from the server.
162 *
163 * @param way the way (ignored, if null)
164 * @return this
165 */
166 public MultiFetchServerObjectReader appendWay(Way way) {
167 if (way == null) return this;
168 if (way.isNew()) return this;
169 for (Node node: way.getNodes()) {
170 if (!node.isNew()) {
171 remember(node.getPrimitiveId());
172 }
173 }
174 remember(way.getPrimitiveId());
175 return this;
176 }
177
178 /**
179 * appends a {@link Relation} id to the list of ids which will be fetched from the server.
180 *
181 * @param relation the relation (ignored, if null)
182 * @return this
183 */
184 protected MultiFetchServerObjectReader appendRelation(Relation relation) {
185 if (relation == null) return this;
186 if (relation.isNew()) return this;
187 remember(relation.getPrimitiveId());
188 for (RelationMember member : relation.getMembers()) {
189 if (OsmPrimitiveType.from(member.getMember()).equals(OsmPrimitiveType.RELATION)) {
190 // avoid infinite recursion in case of cyclic dependencies in relations
191 //
192 if (relations.contains(member.getMember().getId())) {
193 continue;
194 }
195 }
196 if (!member.getMember().isIncomplete()) {
197 append(member.getMember());
198 }
199 }
200 return this;
201 }
202
203 /**
204 * appends an {@link OsmPrimitive} to the list of ids which will be fetched from the server.
205 * @param primitive the primitive
206 * @return this
207 */
208 public MultiFetchServerObjectReader append(OsmPrimitive primitive) {
209 if (primitive != null) {
210 switch (OsmPrimitiveType.from(primitive)) {
211 case NODE: return appendNode((Node) primitive);
212 case WAY: return appendWay((Way) primitive);
213 case RELATION: return appendRelation((Relation) primitive);
214 }
215 }
216 return this;
217 }
218
219 /**
220 * appends a list of {@link OsmPrimitive} to the list of ids which will be fetched from the server.
221 *
222 * @param primitives the list of primitives (ignored, if null)
223 * @return this
224 *
225 * @see #append(OsmPrimitive)
226 */
227 public MultiFetchServerObjectReader append(Collection<? extends OsmPrimitive> primitives) {
228 if (primitives == null) return this;
229 for (OsmPrimitive primitive : primitives) {
230 append(primitive);
231 }
232 return this;
233 }
234
235 /**
236 * extracts a subset of max {@link #MAX_IDS_PER_REQUEST} ids from <code>ids</code> and
237 * replies the subset. The extracted subset is removed from <code>ids</code>.
238 *
239 * @param ids a set of ids
240 * @return the subset of ids
241 */
242 protected Set<Long> extractIdPackage(Set<Long> ids) {
243 Set<Long> pkg = new HashSet<>();
244 if (ids.isEmpty())
245 return pkg;
246 if (ids.size() > MAX_IDS_PER_REQUEST) {
247 Iterator<Long> it = ids.iterator();
248 for (int i = 0; i < MAX_IDS_PER_REQUEST; i++) {
249 pkg.add(it.next());
250 }
251 ids.removeAll(pkg);
252 } else {
253 pkg.addAll(ids);
254 ids.clear();
255 }
256 return pkg;
257 }
258
259 /**
260 * builds the Multi Get request string for a set of ids and a given {@link OsmPrimitiveType}.
261 *
262 * @param type The primitive type. Must be one of {@link OsmPrimitiveType#NODE NODE}, {@link OsmPrimitiveType#WAY WAY},
263 * {@link OsmPrimitiveType#RELATION RELATION}
264 * @param idPackage the package of ids
265 * @return the request string
266 */
267 protected static String buildRequestString(OsmPrimitiveType type, Set<Long> idPackage) {
268 StringBuilder sb = new StringBuilder();
269 sb.append(type.getAPIName()).append("s?")
270 .append(type.getAPIName()).append("s=");
271
272 Iterator<Long> it = idPackage.iterator();
273 for (int i = 0; i < idPackage.size(); i++) {
274 sb.append(it.next());
275 if (i < idPackage.size()-1) {
276 sb.append(',');
277 }
278 }
279 return sb.toString();
280 }
281
282 /**
283 * builds the Multi Get request string for a single id and a given {@link OsmPrimitiveType}.
284 *
285 * @param type The primitive type. Must be one of {@link OsmPrimitiveType#NODE NODE}, {@link OsmPrimitiveType#WAY WAY},
286 * {@link OsmPrimitiveType#RELATION RELATION}
287 * @param id the id
288 * @return the request string
289 */
290 protected static String buildRequestString(OsmPrimitiveType type, long id) {
291 StringBuilder sb = new StringBuilder();
292 sb.append(type.getAPIName()).append("s?")
293 .append(type.getAPIName()).append("s=")
294 .append(id);
295 return sb.toString();
296 }
297
298 protected void rememberNodesOfIncompleteWaysToLoad(DataSet from) {
299 for (Way w: from.getWays()) {
300 if (w.hasIncompleteNodes()) {
301 for (Node n: w.getNodes()) {
302 if (n.isIncomplete()) {
303 nodes.add(n.getId());
304 }
305 }
306 }
307 }
308 }
309
310 /**
311 * merges the dataset <code>from</code> to {@link #outputDataSet}.
312 *
313 * @param from the other dataset
314 */
315 protected void merge(DataSet from) {
316 final DataSetMerger visitor = new DataSetMerger(outputDataSet, from);
317 visitor.merge();
318 }
319
320 /**
321 * fetches a set of ids of a given {@link OsmPrimitiveType} from the server
322 *
323 * @param ids the set of ids
324 * @param type The primitive type. Must be one of {@link OsmPrimitiveType#NODE NODE}, {@link OsmPrimitiveType#WAY WAY},
325 * {@link OsmPrimitiveType#RELATION RELATION}
326 * @throws OsmTransferException if an error occurs while communicating with the API server
327 */
328 protected void fetchPrimitives(Set<Long> ids, OsmPrimitiveType type, ProgressMonitor progressMonitor) throws OsmTransferException {
329 String msg = "";
330 String baseUrl = OsmApi.getOsmApi().getBaseUrl();
331 switch (type) {
332 case NODE: msg = tr("Fetching a package of nodes from ''{0}''", baseUrl); break;
333 case WAY: msg = tr("Fetching a package of ways from ''{0}''", baseUrl); break;
334 case RELATION: msg = tr("Fetching a package of relations from ''{0}''", baseUrl); break;
335 }
336 progressMonitor.setTicksCount(ids.size());
337 progressMonitor.setTicks(0);
338 // The complete set containg all primitives to fetch
339 Set<Long> toFetch = new HashSet<>(ids);
340 // Build a list of fetchers that will download smaller sets containing only MAX_IDS_PER_REQUEST (200) primitives each.
341 // we will run up to MAX_DOWNLOAD_THREADS concurrent fetchers.
342 int threadsNumber = Main.pref.getInteger("osm.download.threads", OsmApi.MAX_DOWNLOAD_THREADS);
343 threadsNumber = Math.min(Math.max(threadsNumber, 1), OsmApi.MAX_DOWNLOAD_THREADS);
344 Executor exec = Executors.newFixedThreadPool(threadsNumber);
345 CompletionService<FetchResult> ecs = new ExecutorCompletionService<>(exec);
346 List<Future<FetchResult>> jobs = new ArrayList<>();
347 while (!toFetch.isEmpty()) {
348 jobs.add(ecs.submit(new Fetcher(type, extractIdPackage(toFetch), progressMonitor)));
349 }
350 // Run the fetchers
351 for (int i = 0; i < jobs.size() && !isCanceled(); i++) {
352 progressMonitor.subTask(msg + "... " + progressMonitor.getTicks() + "/" + progressMonitor.getTicksCount());
353 try {
354 FetchResult result = ecs.take().get();
355 if (result.missingPrimitives != null) {
356 missingPrimitives.addAll(result.missingPrimitives);
357 }
358 if (result.dataSet != null && !isCanceled()) {
359 rememberNodesOfIncompleteWaysToLoad(result.dataSet);
360 merge(result.dataSet);
361 }
362 } catch (InterruptedException | ExecutionException e) {
363 Main.error(e);
364 }
365 }
366 // Cancel requests if the user choosed to
367 if (isCanceled()) {
368 for (Future<FetchResult> job : jobs) {
369 job.cancel(true);
370 }
371 }
372 }
373
374 /**
375 * invokes one or more Multi Gets to fetch the {@link OsmPrimitive}s and replies
376 * the dataset of retrieved primitives. Note that the dataset includes non visible primitives too!
377 * In contrast to a simple Get for a node, a way, or a relation, a Multi Get always replies
378 * the latest version of the primitive (if any), even if the primitive is not visible (i.e. if
379 * visible==false).
380 *
381 * Invoke {@link #getMissingPrimitives()} to get a list of primitives which have not been
382 * found on the server (the server response code was 404)
383 *
384 * @return the parsed data
385 * @throws OsmTransferException if an error occurs while communicating with the API server
386 * @see #getMissingPrimitives()
387 *
388 */
389 @Override
390 public DataSet parseOsm(ProgressMonitor progressMonitor) throws OsmTransferException {
391 int n = nodes.size() + ways.size() + relations.size();
392 progressMonitor.beginTask(trn("Downloading {0} object from ''{1}''",
393 "Downloading {0} objects from ''{1}''", n, n, OsmApi.getOsmApi().getBaseUrl()));
394 try {
395 missingPrimitives = new HashSet<>();
396 if (isCanceled()) return null;
397 fetchPrimitives(ways, OsmPrimitiveType.WAY, progressMonitor);
398 if (isCanceled()) return null;
399 fetchPrimitives(nodes, OsmPrimitiveType.NODE, progressMonitor);
400 if (isCanceled()) return null;
401 fetchPrimitives(relations, OsmPrimitiveType.RELATION, progressMonitor);
402 if (outputDataSet != null) {
403 outputDataSet.deleteInvisible();
404 }
405 return outputDataSet;
406 } finally {
407 progressMonitor.finishTask();
408 }
409 }
410
411 /**
412 * replies the set of ids of all primitives for which a fetch request to the
413 * server was submitted but which are not available from the server (the server
414 * replied a return code of 404)
415 *
416 * @return the set of ids of missing primitives
417 */
418 public Set<PrimitiveId> getMissingPrimitives() {
419 return missingPrimitives;
420 }
421
422 /**
423 * The class holding the results given by {@link Fetcher}.
424 * It is only a wrapper of the resulting {@link DataSet} and the collection of {@link PrimitiveId} that could not have been loaded.
425 */
426 protected static class FetchResult {
427
428 /**
429 * The resulting data set
430 */
431 public final DataSet dataSet;
432
433 /**
434 * The collection of primitive ids that could not have been loaded
435 */
436 public final Set<PrimitiveId> missingPrimitives;
437
438 /**
439 * Constructs a {@code FetchResult}
440 * @param dataSet The resulting data set
441 * @param missingPrimitives The collection of primitive ids that could not have been loaded
442 */
443 public FetchResult(DataSet dataSet, Set<PrimitiveId> missingPrimitives) {
444 this.dataSet = dataSet;
445 this.missingPrimitives = missingPrimitives;
446 }
447 }
448
449 /**
450 * The class that actually download data from OSM API.
451 * Several instances of this class are used by {@link MultiFetchServerObjectReader} (one per set of primitives to fetch).
452 * The inheritance of {@link OsmServerReader} is only explained by the need to have a distinct OSM connection by {@code Fetcher} instance.
453 * @see FetchResult
454 */
455 protected static class Fetcher extends OsmServerReader implements Callable<FetchResult> {
456
457 private final Set<Long> pkg;
458 private final OsmPrimitiveType type;
459 private final ProgressMonitor progressMonitor;
460
461 /**
462 * Constructs a {@code Fetcher}
463 * @param type The primitive type. Must be one of {@link OsmPrimitiveType#NODE NODE}, {@link OsmPrimitiveType#WAY WAY},
464 * {@link OsmPrimitiveType#RELATION RELATION}
465 * @param idsPackage The set of primitives ids to fetch
466 * @param progressMonitor The progress monitor
467 */
468 public Fetcher(OsmPrimitiveType type, Set<Long> idsPackage, ProgressMonitor progressMonitor) {
469 this.pkg = idsPackage;
470 this.type = type;
471 this.progressMonitor = progressMonitor;
472 }
473
474 @Override
475 public DataSet parseOsm(ProgressMonitor progressMonitor) throws OsmTransferException {
476 // This method is implemented because of the OsmServerReader inheritance, but not used,
477 // as the main target of this class is the call() method.
478 return fetch(progressMonitor).dataSet;
479 }
480
481 @Override
482 public FetchResult call() throws Exception {
483 return fetch(progressMonitor);
484 }
485
486 /**
487 * fetches the requested primitives and updates the specified progress monitor.
488 * @param progressMonitor the progress monitor
489 * @return the {@link FetchResult} of this operation
490 * @throws OsmTransferException if an error occurs while communicating with the API server
491 */
492 protected FetchResult fetch(ProgressMonitor progressMonitor) throws OsmTransferException {
493 try {
494 return multiGetIdPackage(type, pkg, progressMonitor);
495 } catch (OsmApiException e) {
496 if (e.getResponseCode() == HttpURLConnection.HTTP_NOT_FOUND) {
497 Main.info(tr("Server replied with response code 404, retrying with an individual request for each object."));
498 return singleGetIdPackage(type, pkg, progressMonitor);
499 } else {
500 throw e;
501 }
502 }
503 }
504
505 /**
506 * invokes a Multi Get for a set of ids and a given {@link OsmPrimitiveType}.
507 * The retrieved primitives are merged to {@link #outputDataSet}.
508 *
509 * @param type The primitive type. Must be one of {@link OsmPrimitiveType#NODE NODE}, {@link OsmPrimitiveType#WAY WAY},
510 * {@link OsmPrimitiveType#RELATION RELATION}
511 * @param pkg the package of ids
512 * @return the {@link FetchResult} of this operation
513 * @throws OsmTransferException if an error occurs while communicating with the API server
514 */
515 protected FetchResult multiGetIdPackage(OsmPrimitiveType type, Set<Long> pkg, ProgressMonitor progressMonitor)
516 throws OsmTransferException {
517 String request = buildRequestString(type, pkg);
518 FetchResult result = null;
519 try (InputStream in = getInputStream(request, NullProgressMonitor.INSTANCE)) {
520 if (in == null) return null;
521 progressMonitor.subTask(tr("Downloading OSM data..."));
522 try {
523 result = new FetchResult(OsmReader.parseDataSet(in, progressMonitor.createSubTaskMonitor(pkg.size(), false)), null);
524 } catch (Exception e) {
525 throw new OsmTransferException(e);
526 }
527 } catch (IOException ex) {
528 Main.warn(ex);
529 }
530 return result;
531 }
532
533 /**
534 * invokes a Multi Get for a single id and a given {@link OsmPrimitiveType}.
535 * The retrieved primitive is merged to {@link #outputDataSet}.
536 *
537 * @param type The primitive type. Must be one of {@link OsmPrimitiveType#NODE NODE}, {@link OsmPrimitiveType#WAY WAY},
538 * {@link OsmPrimitiveType#RELATION RELATION}
539 * @param id the id
540 * @return the {@link DataSet} resulting of this operation
541 * @throws OsmTransferException if an error occurs while communicating with the API server
542 */
543 protected DataSet singleGetId(OsmPrimitiveType type, long id, ProgressMonitor progressMonitor) throws OsmTransferException {
544 String request = buildRequestString(type, id);
545 DataSet result = null;
546 try (InputStream in = getInputStream(request, NullProgressMonitor.INSTANCE)) {
547 if (in == null) return null;
548 progressMonitor.subTask(tr("Downloading OSM data..."));
549 try {
550 result = OsmReader.parseDataSet(in, progressMonitor.createSubTaskMonitor(1, false));
551 } catch (Exception e) {
552 throw new OsmTransferException(e);
553 }
554 } catch (IOException ex) {
555 Main.warn(ex);
556 }
557 return result;
558 }
559
560 /**
561 * invokes a sequence of Multi Gets for individual ids in a set of ids and a given {@link OsmPrimitiveType}.
562 * The retrieved primitives are merged to {@link #outputDataSet}.
563 *
564 * This method is used if one of the ids in pkg doesn't exist (the server replies with return code 404).
565 * If the set is fetched with this method it is possible to find out which of the ids doesn't exist.
566 * Unfortunately, the server does not provide an error header or an error body for a 404 reply.
567 *
568 * @param type The primitive type. Must be one of {@link OsmPrimitiveType#NODE NODE}, {@link OsmPrimitiveType#WAY WAY},
569 * {@link OsmPrimitiveType#RELATION RELATION}
570 * @param pkg the set of ids
571 * @return the {@link FetchResult} of this operation
572 * @throws OsmTransferException if an error occurs while communicating with the API server
573 */
574 protected FetchResult singleGetIdPackage(OsmPrimitiveType type, Set<Long> pkg, ProgressMonitor progressMonitor)
575 throws OsmTransferException {
576 FetchResult result = new FetchResult(new DataSet(), new HashSet<PrimitiveId>());
577 String baseUrl = OsmApi.getOsmApi().getBaseUrl();
578 for (long id : pkg) {
579 try {
580 String msg = "";
581 switch (type) {
582 case NODE: msg = tr("Fetching node with id {0} from ''{1}''", id, baseUrl); break;
583 case WAY: msg = tr("Fetching way with id {0} from ''{1}''", id, baseUrl); break;
584 case RELATION: msg = tr("Fetching relation with id {0} from ''{1}''", id, baseUrl); break;
585 }
586 progressMonitor.setCustomText(msg);
587 result.dataSet.mergeFrom(singleGetId(type, id, progressMonitor));
588 } catch (OsmApiException e) {
589 if (e.getResponseCode() == HttpURLConnection.HTTP_NOT_FOUND) {
590 Main.info(tr("Server replied with response code 404 for id {0}. Skipping.", Long.toString(id)));
591 result.missingPrimitives.add(new SimplePrimitiveId(id, type));
592 } else {
593 throw e;
594 }
595 }
596 }
597 return result;
598 }
599 }
600}
Note: See TracBrowser for help on using the repository browser.