use of org.vcell.util.document.VCDataJobID in project vcell by virtualcell.
the class DataSetControllerImpl method doDataOperation.
public DataOperationResults doDataOperation(DataOperation dataOperation) throws DataAccessException {
VCDataJobID vcDataJobID = null;
try {
if (dataOperation instanceof DataOperation.DataProcessingOutputTimeSeriesOP) {
vcDataJobID = ((DataOperation.DataProcessingOutputTimeSeriesOP) dataOperation).getTimeSeriesJobSpec().getVcDataJobID();
}
if (!(getVCData(dataOperation.getVCDataIdentifier()) instanceof SimulationData)) {
return null;
}
File dataProcessingOutputFileHDF5 = ((SimulationData) getVCData(dataOperation.getVCDataIdentifier())).getDataProcessingOutputSourceFileHDF5();
DataOperationResults dataOperationResults = getDataProcessingOutput(dataOperation, dataProcessingOutputFileHDF5);
if (vcDataJobID != null) {
fireDataJobEventIfNecessary(vcDataJobID, MessageEvent.DATA_COMPLETE, dataOperation.getVCDataIdentifier(), new Double(0), ((DataOperationResults.DataProcessingOutputTimeSeriesValues) dataOperationResults).getTimeSeriesJobResults(), null);
}
return dataOperationResults;
} catch (Exception e) {
if (vcDataJobID != null) {
fireDataJobEventIfNecessary(vcDataJobID, MessageEvent.DATA_FAILURE, dataOperation.getVCDataIdentifier(), new Double(0), null, e);
}
if (e instanceof DataAccessException) {
throw (DataAccessException) e;
} else {
throw new DataAccessException("Datasetcontrollerimpl.doDataOperation error: " + e.getMessage(), e);
}
}
}
use of org.vcell.util.document.VCDataJobID in project vcell by virtualcell.
the class DataJobEvent method fromJsonRep.
public static DataJobEvent fromJsonRep(Object eventSource, DataJobEventRepresentation eventRep) {
Double progress = eventRep.progress;
User owner = new User(eventRep.username, new KeyValue(eventRep.userkey));
VCDataJobID dataJobID = new VCDataJobID(eventRep.jobid, owner, eventRep.isBackgroundTask);
int eventType = eventRep.eventType;
KeyValue dataKey = new KeyValue(eventRep.dataKey);
String dataIdString = eventRep.dataIdString;
DataJobEvent dataJobEvent = new DataJobEvent(dataJobID, eventType, dataKey, dataIdString, progress);
return dataJobEvent;
}
Aggregations