Commit d8a32c6f authored by Daniel Eggert's avatar Daniel Eggert
Browse files

removed deprecated progress bitmasking

parent 9540dd06
......@@ -18,18 +18,6 @@ import de.potsdam.gfz.gms.database.shared.Enums.job_status;
*/
public class ProcessingJob {
// public static final int PROGRESS_DOWNLOADS_FINISHED_SUCCESSFULLY = 1 << 0;
// public static final int PROGRESS_DOWNLOADS_FINISHED_WITH_WARNINGS = 1 << 1;
// public static final int PROGRESS_DOWNLOADS_CANCELED = 1 << 2;
//
// public static final int PROGRESS_PROCESSING_FINISHED_SUCCESSFULLY = 1 << 8;
// public static final int PROGRESS_PROCESSING_FINISHED_WITH_WARNINGS = 1 << 9;
// public static final int PROGRESS_PROCESSING_CANCELED = 1 << 10;
//
// public static final int PROGRESS_ANALYSIS_FINISHED_SUCCESSFULLY = 1 << 16;
// public static final int PROGRESS_ANALYSIS_FINISHED_WITH_WARNINGS = 1 << 17;
// public static final int PROGRESS_ANALYSIS_CANCELED = 1 << 18;
public static final int PROC_STAT_IDX_PROC_PENDING = 0;
public static final int PROC_STAT_IDX_PROC_STARTED = 1;
public static final int PROC_STAT_IDX_L1A = 2;
......@@ -60,29 +48,6 @@ public class ProcessingJob {
*/
public double[] bounds;
public int distributionIndex;
// /**
// * used for further details<br>
// * success/progress bits<br>
// * Download progress bits<br>
// * [0] downloads finished successfully<br>
// * [1] downloads finished with failed scenes<br>
// * [2] downloads canceled<br>
// * [3..7] reserved for later use<br>
// * <br>
// * Processing progress bits<br>
// * [8] processing job finished successfully<br>
// * [9] processing job finished with warnings (e.g. failed scenes)<br>
// * [10] processing job canceled<br>
// * [11..15] reserved for later use<br>
// * <br>
// * Analysis progress bits<br>
// * [16] analysis finished successfully<br>
// * [17] analysis finished with warnings<br>
// * [18] analysis canceled<br>
// * [19..31] reserved for later use
// *
// *
// */
public int progress;
public String feedback;
public Long[] failedSceneids;
......@@ -452,16 +417,15 @@ public class ProcessingJob {
@Override
public String toString() {
return "[" + id + "] creationtime(" + creationtime + "), finishtime(" + finishtime + "),\n" + "sceneids("
+ (sceneids != null ? Arrays.toString(sceneids) : "null") + "),\n" + "timerangeStart(" + timerangeStart + "), timerangeEnd(" + timerangeEnd
+ "), bounds(" + Arrays.toString(bounds) + "),\n" + "distributionIndex(" + distributionIndex + "), progress(" + progress + "), feedback("
+ feedback + "),\n" + "failedSceneIds(" + (failedSceneids != null ? Arrays.toString(failedSceneids) : "null") + "),\n" + "datasetidSpatialRef("
+ datasetidSpatialRef + "), virtualsensorid(" + virtualsensorid + "), refJobId(" + refJobId + "),\n" + "datacubeMgrsTilesProc("
return "[" + id + "] creationtime(" + creationtime + "), finishtime(" + finishtime + "),\n" + "sceneids(" + (sceneids != null ? Arrays.toString(sceneids) : "null") + "),\n"
+ "timerangeStart(" + timerangeStart + "), timerangeEnd(" + timerangeEnd + "), bounds(" + Arrays.toString(bounds) + "),\n" + "distributionIndex("
+ distributionIndex + "), progress(" + progress + "), feedback(" + feedback + "),\n" + "failedSceneIds("
+ (failedSceneids != null ? Arrays.toString(failedSceneids) : "null") + "),\n" + "datasetidSpatialRef(" + datasetidSpatialRef + "), virtualsensorid("
+ virtualsensorid + "), refJobId(" + refJobId + "),\n" + "datacubeMgrsTilesProc("
+ (datacubeMgrsTilesProc != null ? Arrays.toString(datacubeMgrsTilesProc) : "null") + "),\n" + "nonRefDatasetIds("
+ (nonRefDatasetIds != null ? Arrays.toString(nonRefDatasetIds) : "null") + "),\n" + "comment(" + comment + "), maxCloudcover(" + maxCloudcover
+ "), seasonCode(" + seasonCode + "),\n" + "status(" + status + "),\n" + "pathAnalysisScript(" + pathAnalysisScript + "), analysisParameter("
+ analysisParameter + "), mode(" + mode + ")\n"
+ (downloadJobs != null ? ("\ndownloadJobs {" + Arrays.toString(downloadJobs.values().toArray()) + "}") : "") + ")\n"
+ (nonRefDatasetIds != null ? Arrays.toString(nonRefDatasetIds) : "null") + "),\n" + "comment(" + comment + "), maxCloudcover(" + maxCloudcover + "), seasonCode("
+ seasonCode + "),\n" + "status(" + status + "),\n" + "pathAnalysisScript(" + pathAnalysisScript + "), analysisParameter(" + analysisParameter + "), mode(" + mode
+ ")\n" + (downloadJobs != null ? ("\ndownloadJobs {" + Arrays.toString(downloadJobs.values().toArray()) + "}") : "") + ")\n"
+ (procJobs != null ? ("\nprocJobs {" + Arrays.toString(procJobs.values().toArray()) + "}") : "") + ")\n"
+ (analysisJobs != null ? ("\nanalysisJobs {" + Arrays.toString(analysisJobs.toArray()) + "}") : "");
}
......@@ -492,171 +456,11 @@ public class ProcessingJob {
}
public boolean involvesProcessing() {
return mode == job_mode.download_and_processing || mode == job_mode.processing_only || mode == job_mode.processing_and_analysis
|| mode == job_mode.full;
return mode == job_mode.download_and_processing || mode == job_mode.processing_only || mode == job_mode.processing_and_analysis || mode == job_mode.full;
}
public boolean involvesAnalysis() {
return mode == job_mode.analysis_only || mode == job_mode.processing_and_analysis || mode == job_mode.full;
}
// private boolean hasProgressField(int mask) {
// return (progress & mask) == mask;
// }
//
// private void setProgressField(int mask) {
// progress = progress | mask;
// }
//
// private void unsetProgressField(int mask) {
// progress = progress & ~mask;
// }
//
// public boolean hasDownloadProgress() {
// return hasDownloadsCanceled() || hasDownloadsFinishedSuccessfully() || hasDownloadsFinishedWithWarnings();
// }
// public boolean hasDownloadsFinishedSuccessfully() {
// return hasProgressField(PROGRESS_DOWNLOADS_FINISHED_SUCCESSFULLY);
// }
//
// public boolean hasDownloadsFinishedWithWarnings() {
// return hasProgressField(PROGRESS_DOWNLOADS_FINISHED_WITH_WARNINGS);
// }
//
// public boolean hasDownloadsCanceled() {
// return hasProgressField(PROGRESS_DOWNLOADS_CANCELED);
// }
//
// public boolean hasProcessingProgress() {
// return hasProcessingCanceled() || hasProcessingFinishedSuccessfully() || hasProcessingFinishedWithWarnings();
// }
//
// public boolean hasProcessingFinishedSuccessfully() {
// return hasProgressField(PROGRESS_PROCESSING_FINISHED_SUCCESSFULLY);
// }
//
// public boolean hasProcessingFinishedWithWarnings() {
// return hasProgressField(PROGRESS_PROCESSING_FINISHED_WITH_WARNINGS);
// }
//
// public boolean hasProcessingCanceled() {
// return hasProgressField(PROGRESS_PROCESSING_CANCELED);
// }
//
// public boolean hasAnalysisProgress() {
// return hasAnalysisCanceled() || hasAnalysisFinishedSuccessfully() || hasAnalysisFinishedWithWarnings();
// }
//
// public boolean hasAnalysisFinishedSuccessfully() {
// return hasProgressField(PROGRESS_ANALYSIS_FINISHED_SUCCESSFULLY);
// }
//
// public boolean hasAnalysisFinishedWithWarnings() {
// return hasProgressField(PROGRESS_ANALYSIS_FINISHED_WITH_WARNINGS);
// }
//
// public boolean hasAnalysisCanceled() {
// return hasProgressField(PROGRESS_ANALYSIS_CANCELED);
// }
//
// public void setDownloadsFinishedSuccessfully() {
// setProgressField(PROGRESS_DOWNLOADS_FINISHED_SUCCESSFULLY);
//
// unsetProgressField(PROGRESS_DOWNLOADS_FINISHED_WITH_WARNINGS);
// unsetProgressField(PROGRESS_DOWNLOADS_CANCELED);
// }
//
// public void setDownloadsFinishedWithWarnings() {
// setProgressField(PROGRESS_DOWNLOADS_FINISHED_WITH_WARNINGS);
//
// unsetProgressField(PROGRESS_DOWNLOADS_FINISHED_SUCCESSFULLY);
// unsetProgressField(PROGRESS_DOWNLOADS_CANCELED);
// }
//
// public void setDownloadsCanceled() {
// setProgressField(PROGRESS_DOWNLOADS_CANCELED);
//
// unsetProgressField(PROGRESS_DOWNLOADS_FINISHED_SUCCESSFULLY);
// unsetProgressField(PROGRESS_DOWNLOADS_FINISHED_WITH_WARNINGS);
// }
//
// public void setProcessingFinishedSuccessfully() {
// setProgressField(PROGRESS_PROCESSING_FINISHED_SUCCESSFULLY);
//
// unsetProgressField(PROGRESS_PROCESSING_FINISHED_WITH_WARNINGS);
// unsetProgressField(PROGRESS_PROCESSING_CANCELED);
// }
//
// public void setProcessingFinishedWithWarnings() {
// setProgressField(PROGRESS_PROCESSING_FINISHED_WITH_WARNINGS);
//
// unsetProgressField(PROGRESS_PROCESSING_FINISHED_SUCCESSFULLY);
// unsetProgressField(PROGRESS_PROCESSING_CANCELED);
// }
//
// public void setProcessingCanceled() {
// setProgressField(PROGRESS_PROCESSING_CANCELED);
//
// unsetProgressField(PROGRESS_PROCESSING_FINISHED_SUCCESSFULLY);
// unsetProgressField(PROGRESS_PROCESSING_FINISHED_WITH_WARNINGS);
// }
//
// public void setAnalysisFinishedSuccessfully() {
// setProgressField(PROGRESS_ANALYSIS_FINISHED_SUCCESSFULLY);
//
// unsetProgressField(PROGRESS_ANALYSIS_FINISHED_WITH_WARNINGS);
// unsetProgressField(PROGRESS_ANALYSIS_CANCELED);
// }
//
// public void setAnalysisFinishedWithWarnings() {
// setProgressField(PROGRESS_ANALYSIS_FINISHED_WITH_WARNINGS);
//
// unsetProgressField(PROGRESS_ANALYSIS_FINISHED_SUCCESSFULLY);
// unsetProgressField(PROGRESS_ANALYSIS_CANCELED);
// }
//
// public void setAnalysisCanceled() {
// setProgressField(PROGRESS_ANALYSIS_CANCELED);
//
// unsetProgressField(PROGRESS_ANALYSIS_FINISHED_SUCCESSFULLY);
// unsetProgressField(PROGRESS_ANALYSIS_FINISHED_WITH_WARNINGS);
// }
//
// public void unsetDownloadsFinishedSuccessfully() {
// unsetProgressField(PROGRESS_DOWNLOADS_FINISHED_SUCCESSFULLY);
// }
//
// public void unsetDownloadsFinishedWithWarnings() {
// unsetProgressField(PROGRESS_DOWNLOADS_FINISHED_WITH_WARNINGS);
// }
//
// public void unsetDownloadsCanceled() {
// unsetProgressField(PROGRESS_DOWNLOADS_CANCELED);
// }
//
// public void unsetProcessingFinishedSuccessfully() {
// unsetProgressField(PROGRESS_PROCESSING_FINISHED_SUCCESSFULLY);
// }
//
// public void unsetProcessingFinishedWithWarnings() {
// unsetProgressField(PROGRESS_PROCESSING_FINISHED_WITH_WARNINGS);
// }
//
// public void unsetProcessingCanceled() {
// unsetProgressField(PROGRESS_PROCESSING_CANCELED);
// }
//
// public void unsetAnalysisFinishedSuccessfully() {
// unsetProgressField(PROGRESS_ANALYSIS_FINISHED_SUCCESSFULLY);
// }
//
// public void unsetAnalysisFinishedWithWarnings() {
// unsetProgressField(PROGRESS_ANALYSIS_FINISHED_WITH_WARNINGS);
// }
//
// public void unsetAnalysisCanceled() {
// unsetProgressField(PROGRESS_ANALYSIS_CANCELED);
// }
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment