Class RelationUploadOrderHook
java.lang.Object
org.openstreetmap.josm.actions.upload.RelationUploadOrderHook
- All Implemented Interfaces:
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.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected JPanelbuildWarningPanel(List<Relation> dep) builds the panel which warns users about a cyclic dependencybooleancheckUpload(APIDataSet apiDataSet) Check and/or change the data to be uploaded.protected voidWarns the user if a cyclic dependency is detectedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.openstreetmap.josm.actions.upload.UploadHook
modifyChangesetTags
-
Constructor Details
-
RelationUploadOrderHook
public RelationUploadOrderHook()
-
-
Method Details
-
buildWarningPanel
builds the panel which warns users about a cyclic dependency- Parameters:
dep- the list of relations with a cyclic dependency- Returns:
- the panel
-
warnCyclicUploadDependency
Warns the user if a cyclic dependency is detected- Parameters:
e- the cyclic dependency exception
-
checkUpload
Description copied from interface:UploadHookCheck and/or change the data to be uploaded. Default implementation is to approve the upload.- Specified by:
checkUploadin interfaceUploadHook- Parameters:
apiDataSet- the data to upload, modify this to change the data.- Returns:
trueif upload is possible,falseto block the upload.
-