org.openstreetmap.josm.actions
Class UploadSelectionAction.UploadHullBuilder

java.lang.Object
  extended by org.openstreetmap.josm.actions.UploadSelectionAction.UploadHullBuilder
All Implemented Interfaces:
Visitor
Enclosing class:
UploadSelectionAction

static class UploadSelectionAction.UploadHullBuilder
extends java.lang.Object
implements Visitor

Computes the collection of primitives to upload, given a collection of candidate primitives. Some of the candidates are excluded, i.e. if they aren't modified. Other primitives are added. A typical case is a primitive which is new and and which is referred by a modified relation. In order to upload the relation the new primitive has to be uploaded as well, even if it isn't included in the list of candidate primitives.


Field Summary
private  java.util.Set<OsmPrimitive> hull
           
 
Constructor Summary
UploadSelectionAction.UploadHullBuilder()
           
 
Method Summary
 java.util.Set<OsmPrimitive> build(java.util.Collection<OsmPrimitive> base)
          Builds the "hull" of primitives to be uploaded given a base collection of osm primitives.
 void visit(Changeset cs)
          Visiting call for changesets.
 void visit(Node n)
          Visiting call for points.
 void visit(Relation r)
          Visiting call for relations.
 void visit(Way w)
          Visiting call for lines.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hull

private java.util.Set<OsmPrimitive> hull
Constructor Detail

UploadSelectionAction.UploadHullBuilder

public UploadSelectionAction.UploadHullBuilder()
Method Detail

visit

public void visit(Node n)
Description copied from interface: Visitor
Visiting call for points.

Specified by:
visit in interface Visitor
Parameters:
n - The node to inspect.

visit

public void visit(Way w)
Description copied from interface: Visitor
Visiting call for lines.

Specified by:
visit in interface Visitor
Parameters:
w - The way to inspect.

visit

public void visit(Relation r)
Description copied from interface: Visitor
Visiting call for relations.

Specified by:
visit in interface Visitor
Parameters:
r - The relation to inspect.

visit

public void visit(Changeset cs)
Description copied from interface: Visitor
Visiting call for changesets.

Specified by:
visit in interface Visitor
Parameters:
cs - The changeset to inspect.

build

public java.util.Set<OsmPrimitive> build(java.util.Collection<OsmPrimitive> base)
                                  throws java.lang.IllegalArgumentException
Builds the "hull" of primitives to be uploaded given a base collection of osm primitives.

Parameters:
base - the base collection. Must not be null.
Returns:
the "hull"
Throws:
java.lang.IllegalArgumentException - thrown if base is null


JOSM