@Test public void testGetDataIdentifiers() throws FileNotFoundException, DataAccessException, IOException { DataIdentifier[] dataIdentifiers = dsc.getDataIdentifiers(outputContext, vcDataIdentifier); String[] varNames = Arrays.asList(dataIdentifiers) .stream() .map (a -> a.getName()) .collect(Collectors.toList()).toArray(new String[0]); String[] expectedVarNames = { "C_cyt","Ran_cyt","RanC_cyt","RanC_nuc","s2", "vcRegionVolume","vcRegionArea","vcRegionVolume_subdomain1","vcRegionVolume_subdomain0","J_flux0", "J_r0","KFlux_nm_cyt","KFlux_nm_nuc","RanC_cyt_init_uM","Size_cyt", "Size_EC","Size_nm","Size_nuc","Size_pm","sobj_subdomain11_subdomain00_size", "vobj_subdomain00_size","vobj_subdomain11_size" }; Assert.assertArrayEquals(expectedVarNames, varNames); }
public DataIdentifier[] getDataIdentifiers(OutputContext outputContext, VCDataIdentifier vcdID) throws DataAccessException, IOException, FileNotFoundException { if (lg.isTraceEnabled()) lg.trace("DataSetControllerImpl.getDataIdentifiers("+vcdID.getID()+")"); VCData simData = getVCData(vcdID); DataIdentifier[] dataIdentifiersIncludingOutsideAndInside = simData.getVarAndFunctionDataIdentifiers(outputContext); Vector<DataIdentifier> v = new Vector<DataIdentifier>(); for (int i = 0; i < dataIdentifiersIncludingOutsideAndInside.length; i++){ DataIdentifier di = dataIdentifiersIncludingOutsideAndInside[i]; if (!di.getName().endsWith(InsideVariable.INSIDE_VARIABLE_SUFFIX) && !di.getName().endsWith(OutsideVariable.OUTSIDE_VARIABLE_SUFFIX)) { if (di.getVariableType() == null || di.getVariableType().equals(VariableType.UNKNOWN)) { if (di.isFunction()) { AnnotatedFunction f = getFunction(outputContext,vcdID,di.getName()); VariableType varType = getVariableTypeForFieldFunction(outputContext,vcdID, f); di = new DataIdentifier(di.getName(), varType, di.getDomain(), di.isFunction(), f.getDisplayName()); } } v.addElement(di); } } DataIdentifier[] ids = new DataIdentifier[v.size()]; v.copyInto(ids); return ids; }
DataSetControllerImpl implements SimDataConstants,DataJobListenerHolder { public DataIdentifier[] getDataIdentifiers(OutputContext outputContext, VCDataIdentifier vcdID) throws DataAccessException, IOException, FileNotFoundException { if (lg.isTraceEnabled()) lg.trace("DataSetControllerImpl.getDataIdentifiers("+vcdID.getID()+")"); VCData simData = getVCData(vcdID); DataIdentifier[] dataIdentifiersIncludingOutsideAndInside = simData.getVarAndFunctionDataIdentifiers(outputContext); Vector<DataIdentifier> v = new Vector<DataIdentifier>(); for (int i = 0; i < dataIdentifiersIncludingOutsideAndInside.length; i++){ DataIdentifier di = dataIdentifiersIncludingOutsideAndInside[i]; if (!di.getName().endsWith(InsideVariable.INSIDE_VARIABLE_SUFFIX) && !di.getName().endsWith(OutsideVariable.OUTSIDE_VARIABLE_SUFFIX)) { if (di.getVariableType() == null || di.getVariableType().equals(VariableType.UNKNOWN)) { if (di.isFunction()) { AnnotatedFunction f = getFunction(outputContext,vcdID,di.getName()); VariableType varType = getVariableTypeForFieldFunction(outputContext,vcdID, f); di = new DataIdentifier(di.getName(), varType, di.getDomain(), di.isFunction(), f.getDisplayName()); } } v.addElement(di); } } DataIdentifier[] ids = new DataIdentifier[v.size()]; v.copyInto(ids); return ids; } }
DataSetControllerImpl implements SimDataConstants,DataJobListenerHolder { public DataIdentifier[] getDataIdentifiers(OutputContext outputContext, VCDataIdentifier vcdID) throws DataAccessException, IOException, FileNotFoundException { if (lg.isTraceEnabled()) lg.trace("DataSetControllerImpl.getDataIdentifiers("+vcdID.getID()+")"); VCData simData = getVCData(vcdID); DataIdentifier[] dataIdentifiersIncludingOutsideAndInside = simData.getVarAndFunctionDataIdentifiers(outputContext); Vector<DataIdentifier> v = new Vector<DataIdentifier>(); for (int i = 0; i < dataIdentifiersIncludingOutsideAndInside.length; i++){ DataIdentifier di = dataIdentifiersIncludingOutsideAndInside[i]; if (!di.getName().endsWith(InsideVariable.INSIDE_VARIABLE_SUFFIX) && !di.getName().endsWith(OutsideVariable.OUTSIDE_VARIABLE_SUFFIX)) { if (di.getVariableType() == null || di.getVariableType().equals(VariableType.UNKNOWN)) { if (di.isFunction()) { AnnotatedFunction f = getFunction(outputContext,vcdID,di.getName()); VariableType varType = getVariableTypeForFieldFunction(outputContext,vcdID, f); di = new DataIdentifier(di.getName(), varType, di.getDomain(), di.isFunction(), f.getDisplayName()); } } v.addElement(di); } } DataIdentifier[] ids = new DataIdentifier[v.size()]; v.copyInto(ids); return ids; } DataSetControllerImpl(Cachetable aCacheTable, File primaryDir, File secondDir); }
DataSetControllerImpl implements SimDataConstants,DataJobListenerHolder { public DataIdentifier[] getDataIdentifiers(OutputContext outputContext, VCDataIdentifier vcdID) throws DataAccessException, IOException, FileNotFoundException { if (lg.isTraceEnabled()) lg.trace("DataSetControllerImpl.getDataIdentifiers("+vcdID.getID()+")"); VCData simData = getVCData(vcdID); DataIdentifier[] dataIdentifiersIncludingOutsideAndInside = simData.getVarAndFunctionDataIdentifiers(outputContext); Vector<DataIdentifier> v = new Vector<DataIdentifier>(); for (int i = 0; i < dataIdentifiersIncludingOutsideAndInside.length; i++){ DataIdentifier di = dataIdentifiersIncludingOutsideAndInside[i]; if (!di.getName().endsWith(InsideVariable.INSIDE_VARIABLE_SUFFIX) && !di.getName().endsWith(OutsideVariable.OUTSIDE_VARIABLE_SUFFIX)) { if (di.getVariableType() == null || di.getVariableType().equals(VariableType.UNKNOWN)) { if (di.isFunction()) { AnnotatedFunction f = getFunction(outputContext,vcdID,di.getName()); VariableType varType = getVariableTypeForFieldFunction(outputContext,vcdID, f); di = new DataIdentifier(di.getName(), varType, di.getDomain(), di.isFunction(), f.getDisplayName()); } } v.addElement(di); } } DataIdentifier[] ids = new DataIdentifier[v.size()]; v.copyInto(ids); return ids; } DataSetControllerImpl(Cachetable aCacheTable, File primaryDir, File secondDir); void addDataJobListener(DataJobListener newListener); DataOperationResults doDataOperation(DataOperation dataOperation); static DataOperationResults getDataProcessingOutput(DataOperation dataOperation,File dataProcessingOutputFileHDF5); FieldDataFileOperationResults fieldDataFileOperation(FieldDataFileOperationSpec fieldDataFileOperationSpec); DataIdentifier[] getDataIdentifiers(OutputContext outputContext, VCDataIdentifier vcdID); double[] getDataSetTimes(VCDataIdentifier vcdID); AnnotatedFunction getFunction(OutputContext outputContext,VCDataIdentifier vcdID,String variableName); AnnotatedFunction[] getFunctions(OutputContext outputContext,VCDataIdentifier vcdID); PlotData getLineScan(OutputContext outputContext, VCDataIdentifier vcdID, String varName, double time, SpatialSelection spatialSelection); CartesianMesh getMesh(VCDataIdentifier vcdID); ODEDataBlock getODEDataBlock(VCDataIdentifier vcdID); ParticleDataBlock getParticleDataBlock(VCDataIdentifier vcdID, double time); boolean getParticleDataExists(VCDataIdentifier vcdID); SimDataBlock getSimDataBlock(OutputContext outputContext, VCDataIdentifier vcdID, String varName, double time); TimeSeriesJobResults getTimeSeriesValues(OutputContext outputContext,final VCDataIdentifier vcdID,final TimeSeriesJobSpec timeSeriesJobSpec); VCData getVCData(VCDataIdentifier vcdID); void removeDataJobListener(DataJobListener djListener); void setAllowOptimizedTimeDataRetrieval(boolean bAllowOptimizedTimeDataRetrieval); boolean isAllowOptimizedTimeDataRetrieval(); void writeFieldFunctionData(
		OutputContext outputContext,
		FieldDataIdentifierSpec[] argFieldDataIDSpecs,
		boolean[] bResampleFlags,
		CartesianMesh newMesh,
		SimResampleInfoProvider simResampleInfoProvider,
		int simResampleMembraneDataLength,
		int handleExistingResampleMode); DataSetMetadata getDataSetMetadata(VCDataIdentifier vcdataID); DataSetTimeSeries getDataSetTimeSeries(VCDataIdentifier vcdataID, String[] variableNames); boolean getIsChombo(VCDataIdentifier vcdataID); boolean getIsMovingBoundary(VCDataIdentifier vcdataID); boolean getIsComsol(VCDataIdentifier vcdataID); ChomboFiles getChomboFiles(VCDataIdentifier vcdataID); VCellSimFiles getVCellSimFiles(VCDataIdentifier vcdataID); MovingBoundarySimFiles getMovingBoundarySimFiles(VCDataIdentifier vcdataID); ComsolSimFiles getComsolSimFiles(VCDataIdentifier vcdataID); VtuFileContainer getEmptyVtuMeshFiles(ComsolSimFiles comsolSimFiles, VCDataIdentifier vcdataID, int timeIndex); VtuFileContainer getEmptyVtuMeshFiles(ChomboFiles chomboFiles, VCDataIdentifier vcdataID, int timeIndex); VtuFileContainer getEmptyVtuMeshFiles(VCellSimFiles vcellSimFiles, VCDataIdentifier vcdataID, int timeIndex); VtuFileContainer getEmptyVtuMeshFiles(MovingBoundarySimFiles movingBoundarySimFiles, VCDataIdentifier vcdataID, int timeIndex); double[] getVtuTimes(ComsolSimFiles comsolSimFiles, VCDataIdentifier vcdataID); double[] getVtuMeshData(ComsolSimFiles comsolSimFiles, OutputContext outputContext, VCDataIdentifier vcdataID, VtuVarInfo var, double time); double[] getVtuMeshData(ChomboFiles chomboFiles, OutputContext outputContext, VCDataIdentifier vcdataID, VtuVarInfo var, double time); double[] getVtuMeshData(MovingBoundarySimFiles movingBoundarySimFiles, OutputContext outputContext, VCDataIdentifier vcdataID, VtuVarInfo var, double time); double[] getVtuMeshData(VCellSimFiles vcellFiles, OutputContext outputContext, VCDataIdentifier vcdataID, VtuVarInfo var, double time); VtuVarInfo[] getVtuVarInfos(VCellSimFiles vcellFiles, OutputContext outputContext, VCDataIdentifier vcdataID); VtuVarInfo[] getVtuVarInfos(ChomboFiles chomboFiles, OutputContext outputContext, VCDataIdentifier vcdataID); VtuVarInfo[] getVtuVarInfos(MovingBoundarySimFiles movingBoundaryFiles, OutputContext outputContext, VCDataIdentifier vcdataID); VtuVarInfo[] getVtuVarInfos(ComsolSimFiles comsolFiles, OutputContext outputContext, VCDataIdentifier vcdataID); NFSimMolecularConfigurations getNFSimMolecularConfigurations(VCDataIdentifier vcdID); }
DataSetControllerImpl implements SimDataConstants,DataJobListenerHolder { public DataIdentifier[] getDataIdentifiers(OutputContext outputContext, VCDataIdentifier vcdID) throws DataAccessException, IOException, FileNotFoundException { if (lg.isTraceEnabled()) lg.trace("DataSetControllerImpl.getDataIdentifiers("+vcdID.getID()+")"); VCData simData = getVCData(vcdID); DataIdentifier[] dataIdentifiersIncludingOutsideAndInside = simData.getVarAndFunctionDataIdentifiers(outputContext); Vector<DataIdentifier> v = new Vector<DataIdentifier>(); for (int i = 0; i < dataIdentifiersIncludingOutsideAndInside.length; i++){ DataIdentifier di = dataIdentifiersIncludingOutsideAndInside[i]; if (!di.getName().endsWith(InsideVariable.INSIDE_VARIABLE_SUFFIX) && !di.getName().endsWith(OutsideVariable.OUTSIDE_VARIABLE_SUFFIX)) { if (di.getVariableType() == null || di.getVariableType().equals(VariableType.UNKNOWN)) { if (di.isFunction()) { AnnotatedFunction f = getFunction(outputContext,vcdID,di.getName()); VariableType varType = getVariableTypeForFieldFunction(outputContext,vcdID, f); di = new DataIdentifier(di.getName(), varType, di.getDomain(), di.isFunction(), f.getDisplayName()); } } v.addElement(di); } } DataIdentifier[] ids = new DataIdentifier[v.size()]; v.copyInto(ids); return ids; } DataSetControllerImpl(Cachetable aCacheTable, File primaryDir, File secondDir); void addDataJobListener(DataJobListener newListener); DataOperationResults doDataOperation(DataOperation dataOperation); static DataOperationResults getDataProcessingOutput(DataOperation dataOperation,File dataProcessingOutputFileHDF5); FieldDataFileOperationResults fieldDataFileOperation(FieldDataFileOperationSpec fieldDataFileOperationSpec); DataIdentifier[] getDataIdentifiers(OutputContext outputContext, VCDataIdentifier vcdID); double[] getDataSetTimes(VCDataIdentifier vcdID); AnnotatedFunction getFunction(OutputContext outputContext,VCDataIdentifier vcdID,String variableName); AnnotatedFunction[] getFunctions(OutputContext outputContext,VCDataIdentifier vcdID); PlotData getLineScan(OutputContext outputContext, VCDataIdentifier vcdID, String varName, double time, SpatialSelection spatialSelection); CartesianMesh getMesh(VCDataIdentifier vcdID); ODEDataBlock getODEDataBlock(VCDataIdentifier vcdID); ParticleDataBlock getParticleDataBlock(VCDataIdentifier vcdID, double time); boolean getParticleDataExists(VCDataIdentifier vcdID); SimDataBlock getSimDataBlock(OutputContext outputContext, VCDataIdentifier vcdID, String varName, double time); TimeSeriesJobResults getTimeSeriesValues(OutputContext outputContext,final VCDataIdentifier vcdID,final TimeSeriesJobSpec timeSeriesJobSpec); VCData getVCData(VCDataIdentifier vcdID); void removeDataJobListener(DataJobListener djListener); void setAllowOptimizedTimeDataRetrieval(boolean bAllowOptimizedTimeDataRetrieval); boolean isAllowOptimizedTimeDataRetrieval(); void writeFieldFunctionData(
		OutputContext outputContext,
		FieldDataIdentifierSpec[] argFieldDataIDSpecs,
		boolean[] bResampleFlags,
		CartesianMesh newMesh,
		SimResampleInfoProvider simResampleInfoProvider,
		int simResampleMembraneDataLength,
		int handleExistingResampleMode); DataSetMetadata getDataSetMetadata(VCDataIdentifier vcdataID); DataSetTimeSeries getDataSetTimeSeries(VCDataIdentifier vcdataID, String[] variableNames); boolean getIsChombo(VCDataIdentifier vcdataID); boolean getIsMovingBoundary(VCDataIdentifier vcdataID); boolean getIsComsol(VCDataIdentifier vcdataID); ChomboFiles getChomboFiles(VCDataIdentifier vcdataID); VCellSimFiles getVCellSimFiles(VCDataIdentifier vcdataID); MovingBoundarySimFiles getMovingBoundarySimFiles(VCDataIdentifier vcdataID); ComsolSimFiles getComsolSimFiles(VCDataIdentifier vcdataID); VtuFileContainer getEmptyVtuMeshFiles(ComsolSimFiles comsolSimFiles, VCDataIdentifier vcdataID, int timeIndex); VtuFileContainer getEmptyVtuMeshFiles(ChomboFiles chomboFiles, VCDataIdentifier vcdataID, int timeIndex); VtuFileContainer getEmptyVtuMeshFiles(VCellSimFiles vcellSimFiles, VCDataIdentifier vcdataID, int timeIndex); VtuFileContainer getEmptyVtuMeshFiles(MovingBoundarySimFiles movingBoundarySimFiles, VCDataIdentifier vcdataID, int timeIndex); double[] getVtuTimes(ComsolSimFiles comsolSimFiles, VCDataIdentifier vcdataID); double[] getVtuMeshData(ComsolSimFiles comsolSimFiles, OutputContext outputContext, VCDataIdentifier vcdataID, VtuVarInfo var, double time); double[] getVtuMeshData(ChomboFiles chomboFiles, OutputContext outputContext, VCDataIdentifier vcdataID, VtuVarInfo var, double time); double[] getVtuMeshData(MovingBoundarySimFiles movingBoundarySimFiles, OutputContext outputContext, VCDataIdentifier vcdataID, VtuVarInfo var, double time); double[] getVtuMeshData(VCellSimFiles vcellFiles, OutputContext outputContext, VCDataIdentifier vcdataID, VtuVarInfo var, double time); VtuVarInfo[] getVtuVarInfos(VCellSimFiles vcellFiles, OutputContext outputContext, VCDataIdentifier vcdataID); VtuVarInfo[] getVtuVarInfos(ChomboFiles chomboFiles, OutputContext outputContext, VCDataIdentifier vcdataID); VtuVarInfo[] getVtuVarInfos(MovingBoundarySimFiles movingBoundaryFiles, OutputContext outputContext, VCDataIdentifier vcdataID); VtuVarInfo[] getVtuVarInfos(ComsolSimFiles comsolFiles, OutputContext outputContext, VCDataIdentifier vcdataID); NFSimMolecularConfigurations getNFSimMolecularConfigurations(VCDataIdentifier vcdID); static final Logger lg; }