31 lines
1.0 KiB
Java
31 lines
1.0 KiB
Java
|
package org.gcube.data_catalogue.grsf_publish_ws.utils.threads;
|
||
|
|
||
|
import org.gcube.data_catalogue.grsf_publish_ws.json.input.Common;
|
||
|
import org.gcube.data_catalogue.grsf_publish_ws.utils.HelperMethods;
|
||
|
import org.gcube.datacatalogue.ckanutillibrary.DataCatalogue;
|
||
|
import org.slf4j.LoggerFactory;
|
||
|
|
||
|
/**
|
||
|
* Extract the time series present in the record, load them as resource on ckan and on the .catalogue
|
||
|
* folder under the vre folder.
|
||
|
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
|
||
|
*/
|
||
|
public class ManageTimeSeriesThread extends Thread{
|
||
|
|
||
|
// Logger
|
||
|
private static final org.slf4j.Logger logger = LoggerFactory.getLogger(ManageTimeSeriesThread.class);
|
||
|
|
||
|
public ManageTimeSeriesThread(Common record, String packageId,
|
||
|
String username, DataCatalogue catalogue, String context) {
|
||
|
|
||
|
logger.info("Time series manager thread started");
|
||
|
try {
|
||
|
HelperMethods.manageTimeSeries(record, packageId, username);
|
||
|
} catch (Exception e){
|
||
|
logger.error("Failed to attach one or more resource to the product", e);
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|