Last change
on this file since 1523 was 1523, checked in by framm, 15 years ago |
- Major redesign of how JOSM talks to the OSM server. Connections now all go through a new
OsmApi class that finds out which version the server uses. JOSM should now be able to handle
0.5 and 0.6 without configuration change. Config options osm-server.version and
osm-server.additional-versions now obsolete. Handling of error and cancel situations might
still need some improvement.
|
-
Property svn:eol-style
set to
native
|
File size:
784 bytes
|
Line | |
---|
1 | // License: GPL. Copyright 2007 by Immanuel Scholz and others
|
---|
2 | package org.openstreetmap.josm.data.osm.visitor;
|
---|
3 |
|
---|
4 | import org.openstreetmap.josm.data.osm.DataSet;
|
---|
5 | import org.openstreetmap.josm.data.osm.Relation;
|
---|
6 | import org.openstreetmap.josm.data.osm.Node;
|
---|
7 | import org.openstreetmap.josm.data.osm.Way;
|
---|
8 |
|
---|
9 | /**
|
---|
10 | * Visitor that adds the visited object to the dataset given at constructor.
|
---|
11 | *
|
---|
12 | * Is not capable of adding keys.
|
---|
13 | *
|
---|
14 | * @author imi
|
---|
15 | */
|
---|
16 | public class AddVisitor extends AbstractVisitor {
|
---|
17 |
|
---|
18 | protected final DataSet ds;
|
---|
19 |
|
---|
20 | public AddVisitor(DataSet ds) {
|
---|
21 | this.ds = ds;
|
---|
22 | }
|
---|
23 |
|
---|
24 | public void visit(Node n) {
|
---|
25 | ds.nodes.add(n);
|
---|
26 | }
|
---|
27 | public void visit(Way w) {
|
---|
28 | ds.ways.add(w);
|
---|
29 | }
|
---|
30 | public void visit(Relation e) {
|
---|
31 | ds.relations.add(e);
|
---|
32 | }
|
---|
33 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.