Search in sources :

Example 1 with LocalDataSetControllerProvider

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

Example 2 with LocalDataSetControllerProvider

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;
    }
}
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)2 LocalDataSetControllerProvider (cbit.vcell.client.LocalDataSetControllerProvider)2 ExportServiceImpl (cbit.vcell.export.server.ExportServiceImpl)2 DataSetControllerImpl (cbit.vcell.simdata.DataSetControllerImpl)2 VCDataManager (cbit.vcell.simdata.VCDataManager)2 VCSimulationDataIdentifier (cbit.vcell.solver.VCSimulationDataIdentifier)2 File (java.io.File)2 User (org.vcell.util.document.User)2 VtkManager (cbit.vcell.simdata.VtkManager)1 VCSimulationIdentifier (cbit.vcell.solver.VCSimulationIdentifier)1 KeyValue (org.vcell.util.document.KeyValue)1