use of cbit.vcell.client.LocalDataSetControllerProvider in project vcell by virtualcell.
the class VCellClientDataServiceImpl method getVtkManager.
@Override
public VtkManager getVtkManager(SimulationDataSetRef simulationDataSetRef) throws FileNotFoundException, DataAccessException {
VCSimulationDataIdentifier vcSimulationDataIdentifier = getVCSimulationDataIdentifier(simulationDataSetRef);
VtkManager vtkManager = null;
if (!simulationDataSetRef.isLocal) {
vtkManager = vcellClient.getRequestManager().getVtkManager(null, vcSimulationDataIdentifier);
} else {
// ---- preliminary : construct the localDatasetControllerProvider
File primaryDir = ResourceUtil.getLocalRootDir();
User usr = User.tempUser;
DataSetControllerImpl dataSetControllerImpl = new DataSetControllerImpl(null, primaryDir, null);
ExportServiceImpl localExportServiceImpl = new ExportServiceImpl();
LocalDataSetControllerProvider localDSCProvider = new LocalDataSetControllerProvider(usr, dataSetControllerImpl, localExportServiceImpl);
VCDataManager vcDataManager = new VCDataManager(localDSCProvider);
vtkManager = new VtkManager(null, vcDataManager, vcSimulationDataIdentifier);
}
return vtkManager;
}
use of cbit.vcell.client.LocalDataSetControllerProvider in project vcell by virtualcell.
the class VCellClientDataServiceImpl method getVCSimulationDataIdentifier.
public VCSimulationDataIdentifier getVCSimulationDataIdentifier(SimulationDataSetRef simulationDataSetRef) throws FileNotFoundException {
User user = new User(simulationDataSetRef.getUsername(), new KeyValue(simulationDataSetRef.getUserkey()));
KeyValue simKeyValue = new KeyValue(simulationDataSetRef.getSimId());
VCSimulationIdentifier vcSimulationIdentifier = new VCSimulationIdentifier(simKeyValue, user);
if (simulationDataSetRef.isIsLocal()) {
File primaryDir = ResourceUtil.getLocalRootDir();
DataSetControllerImpl dataSetControllerImpl = new DataSetControllerImpl(null, primaryDir, null);
ExportServiceImpl localExportServiceImpl = new ExportServiceImpl();
LocalDataSetControllerProvider localDSCProvider = new LocalDataSetControllerProvider(user, dataSetControllerImpl, localExportServiceImpl);
VCDataManager vcDataManager = new VCDataManager(localDSCProvider);
File localSimDir = ResourceUtil.getLocalSimDir(User.tempUser.getName());
VCSimulationDataIdentifier simulationDataIdentifier = new LocalVCSimulationDataIdentifier(vcSimulationIdentifier, 0, localSimDir);
return simulationDataIdentifier;
} else {
VCSimulationDataIdentifier vcSimulationDataIdentifier = new VCSimulationDataIdentifier(vcSimulationIdentifier, simulationDataSetRef.getJobIndex());
return vcSimulationDataIdentifier;
}
}
Aggregations