Search in sources :

Example 1 with LocalVCSimulationDataIdentifier

use of cbit.vcell.client.ClientSimManager.LocalVCSimulationDataIdentifier 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;
    }
}
Also used : LocalDataSetControllerProvider(cbit.vcell.client.LocalDataSetControllerProvider) VCSimulationIdentifier(cbit.vcell.solver.VCSimulationIdentifier) User(org.vcell.util.document.User) KeyValue(org.vcell.util.document.KeyValue) LocalVCSimulationDataIdentifier(cbit.vcell.client.ClientSimManager.LocalVCSimulationDataIdentifier) DataSetControllerImpl(cbit.vcell.simdata.DataSetControllerImpl) ExportServiceImpl(cbit.vcell.export.server.ExportServiceImpl) File(java.io.File) VCDataManager(cbit.vcell.simdata.VCDataManager) VCSimulationDataIdentifier(cbit.vcell.solver.VCSimulationDataIdentifier) LocalVCSimulationDataIdentifier(cbit.vcell.client.ClientSimManager.LocalVCSimulationDataIdentifier)

Aggregations

LocalVCSimulationDataIdentifier (cbit.vcell.client.ClientSimManager.LocalVCSimulationDataIdentifier)1 LocalDataSetControllerProvider (cbit.vcell.client.LocalDataSetControllerProvider)1 ExportServiceImpl (cbit.vcell.export.server.ExportServiceImpl)1 DataSetControllerImpl (cbit.vcell.simdata.DataSetControllerImpl)1 VCDataManager (cbit.vcell.simdata.VCDataManager)1 VCSimulationDataIdentifier (cbit.vcell.solver.VCSimulationDataIdentifier)1 VCSimulationIdentifier (cbit.vcell.solver.VCSimulationIdentifier)1 File (java.io.File)1 KeyValue (org.vcell.util.document.KeyValue)1 User (org.vcell.util.document.User)1