Class RelationUploadOrderHook

  • All Implemented Interfaces:
    UploadHook

    public class RelationUploadOrderHook
    extends 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.
    • Method Detail

      • buildWarningPanel

        protected JPanel buildWarningPanel​(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
      • checkUpload

        public boolean checkUpload​(APIDataSet apiDataSet)
        Description copied from interface: UploadHook
        Check, and/or change, the data to be uploaded. Default implementation is to approve the upload.
        Specified by:
        checkUpload in interface UploadHook
        Parameters:
        apiDataSet - the data to upload, modify this to change the data.
        Returns:
        true if upload is possible, false to block the upload.