org.openstreetmap.josm.actions.upload
Class RelationUploadOrderHook

java.lang.Object
  extended by org.openstreetmap.josm.actions.upload.RelationUploadOrderHook
All Implemented Interfaces:
UploadHook

public class RelationUploadOrderHook
extends java.lang.Object
implements UploadHook

This upload hook reorders the list of new relations to upload such that child relations are uploaded before parent relations. It also checks for cyclic dependencies in the list of new relations.


Field Summary
private  APIDataSet data
          the data to be analyzed
 
Constructor Summary
RelationUploadOrderHook()
           
 
Method Summary
protected  javax.swing.JPanel buildWarningPanel(java.util.List<Relation> dep)
          builds the panel which warns users about a cyclic dependency
 boolean checkUpload(APIDataSet apiDataSet)
          Checks the upload.
protected  void warnCyclicUploadDependency(CyclicUploadDependencyException e)
          Warns the user if a cyclic dependency is detected
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

data

private APIDataSet data
the data to be analyzed

Constructor Detail

RelationUploadOrderHook

public RelationUploadOrderHook()
Method Detail

buildWarningPanel

protected javax.swing.JPanel buildWarningPanel(java.util.List<Relation> dep)
builds the panel which warns users about a cyclic dependency

Parameters:
dep - the list of relations with a cyclic dependency
Returns:
the panel

warnCyclicUploadDependency

protected void warnCyclicUploadDependency(CyclicUploadDependencyException e)
Warns the user if a cyclic dependency is detected

Parameters:
e - the cyclic dependency exception

checkUpload

public boolean checkUpload(APIDataSet apiDataSet)
Description copied from interface: UploadHook
Checks the upload.

Specified by:
checkUpload in interface UploadHook
Parameters:
apiDataSet - the data to upload


JOSM