From 1f143237e94b1f1bbc17da7f0d94e1a4887eebf1 Mon Sep 17 00:00:00 2001 From: Jim Schaff Date: Wed, 26 Jul 2023 18:41:56 -0400 Subject: [PATCH] trim unused python scripts and unused thrift generated java/python --- .github/workflows/CI-full.yml | 2 +- .github/workflows/NightlyBMDB_CLI.yml | 2 +- .github/workflows/ci_cd.yml | 6 +- .github/workflows/nightly-model-testing.yml | 2 +- Dockerfile | 9 +- docker/build/Dockerfile-batch-dev | 2 +- docker/build/Dockerfile-clientgen-dev | 1 - docker/build/Dockerfile-data-dev | 9 +- docker/build/Dockerfile-web-dev | 3 +- docker/build/build.sh | 4 +- docker/build/installers/VCell.install4j | 3 - docker/swarm/README_stack_on_mac.md | 12 +- {pythonProject => pythonCopasiOpt}/Dockerfile | 0 {pythonProject => pythonCopasiOpt}/build.sh | 0 .../docker_run.sh | 0 {pythonProject => pythonCopasiOpt}/run.sh | 0 .../vcell-opt/README.md | 0 .../vcell-opt/mypy.ini | 0 .../vcell-opt/paramest.ipynb | 0 .../vcell-opt/poetry.lock | 0 .../vcell-opt/pyproject.toml | 0 .../test_data/Biomodel_simple_parest.json | 0 .../test_data/Biomodel_simple_parest.vcml | 0 .../vcell-opt/test_data/optproblem.json | 0 .../vcell-opt/test_data/optproblem.vcml | 0 .../vcell-opt/tests}/__init__.py | 0 .../vcell-opt/tests/vcellopt_test.py | 0 .../vcell-opt/vcell_opt/__init__.py | 0 .../vcell-opt/vcell_opt/data/__init__.py | 0 .../vcell-opt/vcell_opt/optService.py | 0 .../vcell-opt/vcell_opt/optUtils.py | 0 pythonScripts/VCell_API/testapi.py | 97 - pythonScripts/VCell_API/vcellapi.py | 320 - .../vcellij/SimulationService-remote | 152 - .../VCell_ImageJ/vcellij/SimulationService.py | 1312 ---- .../VCell_ImageJ/vcellij/__init__.py | 1 - pythonScripts/VCell_ImageJ/vcellij/ttypes.py | 480 -- pythonScripts/VCell_Opt/__init__.py | 0 pythonScripts/VCell_Opt/copasi.ipynb | 97 - pythonScripts/VCell_Opt/optService.py | 496 -- pythonScripts/VCell_Opt/optprob.bin | Bin 10797 -> 0 bytes pythonScripts/VCell_Opt/vcellopt/constants.py | 12 - pythonScripts/VCell_Opt/vcellopt/ttypes.py | 1105 --- pythonScripts/VCell_VTK/__init__.py | 0 pythonScripts/VCell_VTK/makeLittleVtk.py | 30 - .../VCell_VTK/pyvcell/VCellProxy-remote | 152 - pythonScripts/VCell_VTK/pyvcell/VCellProxy.py | 1241 ---- pythonScripts/VCell_VTK/pyvcell/__init__.py | 1 - pythonScripts/VCell_VTK/pyvcell/constants.py | 12 - pythonScripts/VCell_VTK/pyvcell/ttypes.py | 696 -- .../VCell_VTK/vcellvismesh/__init__.py | 1 - .../VCell_VTK/vcellvismesh/constants.py | 12 - .../VCell_VTK/vtkAddData_not_used.py | 42 - .../vcell-opt/tests => pythonVtk}/__init__.py | 0 pythonVtk/poetry.lock | 512 ++ pythonVtk/pyproject.toml | 16 + .../vcellvismesh}/__init__.py | 0 .../vcellvismesh}/constants.py | 4 +- .../vcellvismesh/ttypes.py | 345 +- .../vtkService}/__init__.py | 0 pythonVtk/vtkService/makeLittleVtk.py | 30 + pythonVtk/vtkService/vtkAddData_not_used.py | 41 + .../vtkService}/vtkService.py | 144 +- thriftBuild/ImageDataset.thrift | 71 - thriftBuild/VCellImageJ.thrift | 101 - thriftBuild/codegen-jtd.sh | 2 +- thriftBuild/codegen-thrift.sh | 4 + thriftBuild/genVCThriftClasses.bat | 17 - thriftBuild/genVCellThriftClasses.sh | 27 - thriftBuild/pyVCell.thrift | 83 - .../data/VCellClientDataServiceImpl.java | 272 - vcell-core/pom.xml | 2 +- .../vcell/client/pyvcellproxy/DataType.java | 45 - .../vcell/client/pyvcellproxy/DomainType.java | 45 - .../vcell/client/pyvcellproxy/PlotData.java | 567 -- .../pyvcellproxy/PostProcessingData.java | 572 -- .../PostProcessingDisplayFrame.java | 30 - .../pyvcellproxy/SimulationDataSetRef.java | 1649 ----- .../ThriftDataAccessException.java | 365 - .../pyvcellproxy/VCellClientDataService.java | 14 - .../vcell/client/pyvcellproxy/VCellProxy.java | 6171 ----------------- .../pyvcellproxy/VCellProxyHandler.java | 283 - .../client/pyvcellproxy/VCellProxyServer.java | 53 - .../client/pyvcellproxy/VariableInfo.java | 1104 --- .../cbit/vcell/resource/ResourceUtil.java | 30 - .../org/vcell/optimization/CopasiUtils.java | 33 +- .../java/org/vcell/sbml/OmexPythonUtils.java | 52 +- .../main/java/org/vcell/util/PythonUtils.java | 56 + .../mapping/chombo/ChomboVtkFileWriter.java | 4 +- .../MovingBoundaryVtkFileWriter.java | 4 +- .../mapping/vcell/CartesianMeshMapping.java | 314 +- .../vcell/CartesianMeshVtkFileWriter.java | 6 +- .../org/vcell/vis/vcell/CartesianMesh.java | 2 +- .../vis/vismesh/thrift/ChomboIndexData.java | 60 +- .../vismesh/thrift/ChomboSurfaceIndex.java | 27 +- .../vis/vismesh/thrift/ChomboVolumeIndex.java | 33 +- .../org/vcell/vis/vismesh/thrift/Face.java | 9 +- .../vis/vismesh/thrift/FiniteVolumeIndex.java | 29 +- .../vismesh/thrift/FiniteVolumeIndexData.java | 46 +- .../thrift/MovingBoundaryIndexData.java | 62 +- .../thrift/MovingBoundarySurfaceIndex.java | 27 +- .../thrift/MovingBoundaryVolumeIndex.java | 27 +- .../vis/vismesh/thrift/PolyhedronFace.java | 35 +- .../org/vcell/vis/vismesh/thrift/Vect3D.java | 31 +- .../thrift/VisIrregularPolyhedron.java | 53 +- .../org/vcell/vis/vismesh/thrift/VisLine.java | 50 +- .../org/vcell/vis/vismesh/thrift/VisMesh.java | 153 +- .../vcell/vis/vismesh/thrift/VisPoint.java | 31 +- .../vcell/vis/vismesh/thrift/VisPolygon.java | 56 +- .../vismesh/thrift/VisSurfaceTriangle.java | 49 +- .../vis/vismesh/thrift/VisTetrahedron.java | 49 +- .../vcell/vis/vismesh/thrift/VisVoxel.java | 56 +- .../java/org/vcell/vis/vtk/VisMeshUtils.java | 63 +- .../java/org/vcell/vis/vtk/VtkService.java | 10 +- .../org/vcell/vis/vtk/VtkServicePython.java | 87 +- .../org/vcell/vis/vtk/DebugWriteProblem.java | 83 - .../java/org/vcell/vis/vtk/VCellDataTest.java | 236 +- .../simdata/MembraneFrap3D/Membrane_Frap.vcml | 313 + .../SimID_956955326_0_.functions | 14 + .../MembraneFrap3D/SimID_956955326_0_.fvinput | 68 + .../MembraneFrap3D/SimID_956955326_0_.hdf5 | Bin 0 -> 14080 bytes .../MembraneFrap3D/SimID_956955326_0_.mesh | 1195 ++++ .../SimID_956955326_0_.meshmetrics | 1162 ++++ .../SimID_956955326_0_.subdomains | 5 + .../MembraneFrap3D/SimID_956955326_0_.vcg | 1170 ++++ .../SimID_956955326_0__0.simtask.xml | 115 + 126 files changed, 5978 insertions(+), 18810 deletions(-) rename {pythonProject => pythonCopasiOpt}/Dockerfile (100%) rename {pythonProject => pythonCopasiOpt}/build.sh (100%) rename {pythonProject => pythonCopasiOpt}/docker_run.sh (100%) rename {pythonProject => pythonCopasiOpt}/run.sh (100%) rename {pythonProject => pythonCopasiOpt}/vcell-opt/README.md (100%) rename {pythonProject => pythonCopasiOpt}/vcell-opt/mypy.ini (100%) rename {pythonProject => pythonCopasiOpt}/vcell-opt/paramest.ipynb (100%) rename {pythonProject => pythonCopasiOpt}/vcell-opt/poetry.lock (100%) rename {pythonProject => pythonCopasiOpt}/vcell-opt/pyproject.toml (100%) rename {pythonProject => pythonCopasiOpt}/vcell-opt/test_data/Biomodel_simple_parest.json (100%) rename {pythonProject => pythonCopasiOpt}/vcell-opt/test_data/Biomodel_simple_parest.vcml (100%) rename {pythonProject => pythonCopasiOpt}/vcell-opt/test_data/optproblem.json (100%) rename {pythonProject => pythonCopasiOpt}/vcell-opt/test_data/optproblem.vcml (100%) rename {docker/swarm/vcell-admin => pythonCopasiOpt/vcell-opt/tests}/__init__.py (100%) rename {pythonProject => pythonCopasiOpt}/vcell-opt/tests/vcellopt_test.py (100%) rename {pythonProject => pythonCopasiOpt}/vcell-opt/vcell_opt/__init__.py (100%) rename {pythonProject => pythonCopasiOpt}/vcell-opt/vcell_opt/data/__init__.py (100%) rename {pythonProject => pythonCopasiOpt}/vcell-opt/vcell_opt/optService.py (100%) rename {pythonProject => pythonCopasiOpt}/vcell-opt/vcell_opt/optUtils.py (100%) delete mode 100644 pythonScripts/VCell_API/testapi.py delete mode 100644 pythonScripts/VCell_API/vcellapi.py delete mode 100755 pythonScripts/VCell_ImageJ/vcellij/SimulationService-remote delete mode 100644 pythonScripts/VCell_ImageJ/vcellij/SimulationService.py delete mode 100644 pythonScripts/VCell_ImageJ/vcellij/__init__.py delete mode 100644 pythonScripts/VCell_ImageJ/vcellij/ttypes.py delete mode 100644 pythonScripts/VCell_Opt/__init__.py delete mode 100644 pythonScripts/VCell_Opt/copasi.ipynb delete mode 100644 pythonScripts/VCell_Opt/optService.py delete mode 100644 pythonScripts/VCell_Opt/optprob.bin delete mode 100644 pythonScripts/VCell_Opt/vcellopt/constants.py delete mode 100644 pythonScripts/VCell_Opt/vcellopt/ttypes.py delete mode 100644 pythonScripts/VCell_VTK/__init__.py delete mode 100644 pythonScripts/VCell_VTK/makeLittleVtk.py delete mode 100755 pythonScripts/VCell_VTK/pyvcell/VCellProxy-remote delete mode 100644 pythonScripts/VCell_VTK/pyvcell/VCellProxy.py delete mode 100644 pythonScripts/VCell_VTK/pyvcell/__init__.py delete mode 100644 pythonScripts/VCell_VTK/pyvcell/constants.py delete mode 100644 pythonScripts/VCell_VTK/pyvcell/ttypes.py delete mode 100644 pythonScripts/VCell_VTK/vcellvismesh/__init__.py delete mode 100644 pythonScripts/VCell_VTK/vcellvismesh/constants.py delete mode 100644 pythonScripts/VCell_VTK/vtkAddData_not_used.py rename {pythonProject/vcell-opt/tests => pythonVtk}/__init__.py (100%) create mode 100644 pythonVtk/poetry.lock create mode 100644 pythonVtk/pyproject.toml rename {pythonScripts/VCell_Opt/vcellopt => pythonVtk/vcellvismesh}/__init__.py (100%) rename {pythonScripts/VCell_ImageJ/vcellij => pythonVtk/vcellvismesh}/constants.py (77%) rename {pythonScripts/VCell_VTK => pythonVtk}/vcellvismesh/ttypes.py (86%) rename {pythonScripts/VCell_ImageJ => pythonVtk/vtkService}/__init__.py (100%) create mode 100644 pythonVtk/vtkService/makeLittleVtk.py create mode 100644 pythonVtk/vtkService/vtkAddData_not_used.py rename {pythonScripts/VCell_VTK => pythonVtk/vtkService}/vtkService.py (82%) delete mode 100644 thriftBuild/ImageDataset.thrift delete mode 100644 thriftBuild/VCellImageJ.thrift create mode 100755 thriftBuild/codegen-thrift.sh delete mode 100644 thriftBuild/genVCThriftClasses.bat delete mode 100755 thriftBuild/genVCellThriftClasses.sh delete mode 100644 thriftBuild/pyVCell.thrift delete mode 100644 vcell-client/src/main/java/cbit/vcell/client/data/VCellClientDataServiceImpl.java delete mode 100644 vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/DataType.java delete mode 100644 vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/DomainType.java delete mode 100644 vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/PlotData.java delete mode 100644 vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/PostProcessingData.java delete mode 100644 vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/PostProcessingDisplayFrame.java delete mode 100644 vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/SimulationDataSetRef.java delete mode 100644 vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/ThriftDataAccessException.java delete mode 100644 vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/VCellClientDataService.java delete mode 100644 vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/VCellProxy.java delete mode 100644 vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/VCellProxyHandler.java delete mode 100644 vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/VCellProxyServer.java delete mode 100644 vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/VariableInfo.java create mode 100644 vcell-core/src/main/java/org/vcell/util/PythonUtils.java delete mode 100644 vcell-core/src/test/java/org/vcell/vis/vtk/DebugWriteProblem.java create mode 100644 vcell-core/src/test/resources/simdata/MembraneFrap3D/Membrane_Frap.vcml create mode 100644 vcell-core/src/test/resources/simdata/MembraneFrap3D/SimID_956955326_0_.functions create mode 100644 vcell-core/src/test/resources/simdata/MembraneFrap3D/SimID_956955326_0_.fvinput create mode 100644 vcell-core/src/test/resources/simdata/MembraneFrap3D/SimID_956955326_0_.hdf5 create mode 100644 vcell-core/src/test/resources/simdata/MembraneFrap3D/SimID_956955326_0_.mesh create mode 100644 vcell-core/src/test/resources/simdata/MembraneFrap3D/SimID_956955326_0_.meshmetrics create mode 100644 vcell-core/src/test/resources/simdata/MembraneFrap3D/SimID_956955326_0_.subdomains create mode 100644 vcell-core/src/test/resources/simdata/MembraneFrap3D/SimID_956955326_0_.vcg create mode 100644 vcell-core/src/test/resources/simdata/MembraneFrap3D/SimID_956955326_0__0.simtask.xml diff --git a/.github/workflows/CI-full.yml b/.github/workflows/CI-full.yml index 6cbdbd385b..3cdd518c9f 100644 --- a/.github/workflows/CI-full.yml +++ b/.github/workflows/CI-full.yml @@ -57,7 +57,7 @@ jobs: - name: build vcell-opt package run: | - cd pythonProject/vcell-opt + cd pythonCopasiOpt/vcell-opt poetry install poetry run python -m pytest diff --git a/.github/workflows/NightlyBMDB_CLI.yml b/.github/workflows/NightlyBMDB_CLI.yml index 7e4a116d7e..70a21b7a97 100644 --- a/.github/workflows/NightlyBMDB_CLI.yml +++ b/.github/workflows/NightlyBMDB_CLI.yml @@ -49,7 +49,7 @@ jobs: - name: build vcell-opt package run: | - cd pythonProject/vcell-opt + cd pythonCopasiOpt/vcell-opt poetry install - name: Setup Java for Build diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index eac83fc161..d4e4056594 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -41,7 +41,7 @@ jobs: - name: build vcell-opt package run: | - cd pythonProject/vcell-opt + cd pythonCopasiOpt/vcell-opt poetry install poetry run python -m pytest @@ -104,7 +104,7 @@ jobs: - name: build vcell-opt package run: | - cd pythonProject/vcell-opt + cd pythonCopasiOpt/vcell-opt poetry install poetry run python -m pytest @@ -155,7 +155,7 @@ jobs: - name: build vcell-opt package run: | - cd pythonProject/vcell-opt + cd pythonCopasiOpt/vcell-opt poetry install poetry run python -m pytest diff --git a/.github/workflows/nightly-model-testing.yml b/.github/workflows/nightly-model-testing.yml index 1dbecae3b0..7b7efca9b3 100644 --- a/.github/workflows/nightly-model-testing.yml +++ b/.github/workflows/nightly-model-testing.yml @@ -50,7 +50,7 @@ jobs: - name: build vcell-opt package run: | - cd pythonProject/vcell-opt + cd pythonCopasiOpt/vcell-opt poetry install - name: setup java 17 with maven cache diff --git a/Dockerfile b/Dockerfile index c7a300a0af..0e7ea0eeff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -56,12 +56,7 @@ RUN mkdir -p /usr/local/app/vcell/lib && \ mkdir -p /usr/local/app/vcell/installDir/python/vcell_cli_utils && \ mkdir -p /usr/local/app/vcell/installDir/bionetgen -# Install Poetry dependency -#RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3 - && \ -# echo export PATH="$HOME/.poetry/bin:$PATH" >> /etc/bash.bashrc -RUN python3 -m pip install wheel fire biosimulators-utils seaborn deprecated python-libsbml-experimental pandas RUN python3 -m pip install poetry && poetry config cache-dir "/poetry/.cache" - ENV PATH="/root/.poetry/bin:/root/.local/bin:$PATH" # Copy JAR files @@ -83,7 +78,9 @@ COPY ./vcell-client/target/vcell-client-0.0.1-SNAPSHOT.jar \ # Install required python-packages COPY ./vcell-cli-utils/ /usr/local/app/vcell/installDir/python/vcell_cli_utils/ RUN cd /usr/local/app/vcell/installDir/python/vcell_cli_utils/ && \ - poetry config cache-dir "/poetry/.cache" --local && chmod 755 poetry.toml && poetry install + poetry config cache-dir "/poetry/.cache" --local && \ + chmod 755 poetry.toml && \ + poetry install # Add linux local solvers only ADD ./localsolvers /usr/local/app/vcell/installDir/localsolvers diff --git a/docker/build/Dockerfile-batch-dev b/docker/build/Dockerfile-batch-dev index 774652bfc5..c4b1ca1cdc 100644 --- a/docker/build/Dockerfile-batch-dev +++ b/docker/build/Dockerfile-batch-dev @@ -96,7 +96,7 @@ COPY ./docker/build/batch/JavaPreprocessor64 \ ./docker/build/batch/JavaPostprocessor64 \ ./docker/build/batch/JavaSimExe64 \ ./docker/build/batch/entrypoint.sh \ - ./pythonScripts \ + ./pythonVtk \ /vcellscripts/ ENV PATH=/vcellscripts:$PATH \ diff --git a/docker/build/Dockerfile-clientgen-dev b/docker/build/Dockerfile-clientgen-dev index 634c184c5e..7cd31b7219 100644 --- a/docker/build/Dockerfile-clientgen-dev +++ b/docker/build/Dockerfile-clientgen-dev @@ -14,7 +14,6 @@ COPY ./bionetgen /vcellclient/bionetgen COPY ./exampleModels /vcellclient/exampleModels COPY ./localsolvers /vcellclient/localsolvers COPY ./nativelibs /vcellclient/nativelibs -COPY ./pythonScripts /vcellclient/pythonScripts COPY ./vcell-client/target/vcell-client-0.0.1-SNAPSHOT.jar \ ./vcell-client/target/maven-jars/*.jar \ diff --git a/docker/build/Dockerfile-data-dev b/docker/build/Dockerfile-data-dev index 43e9f2af97..1b8358ffd8 100644 --- a/docker/build/Dockerfile-data-dev +++ b/docker/build/Dockerfile-data-dev @@ -75,7 +75,8 @@ RUN mkdir -p /usr/local/app && \ apt-get -y update && \ apt-get -y install openssh-client screen -RUN pip install vtk +RUN python3 -m pip install poetry && poetry config cache-dir "/poetry/.cache" +ENV PATH="/root/.poetry/bin:/root/.local/bin:$PATH" WORKDIR /usr/local/app @@ -83,8 +84,12 @@ COPY ./vcell-server/target/vcell-server-0.0.1-SNAPSHOT.jar \ ./vcell-server/target/maven-jars/*.jar \ ./lib/ +# Copy and install pythonVtk +COPY ./pythonVtk/ /usr/local/app/pythonVtk/ +RUN cd /usr/local/app/pythonVtk && \ + poetry config cache-dir "/poetry/.cache" --local && \ + poetry install -COPY ./pythonScripts ./pythonScripts COPY ./nativelibs/linux64 ./nativelibs/linux64 COPY ./docker/build/vcell-data.log4j.xml . diff --git a/docker/build/Dockerfile-web-dev b/docker/build/Dockerfile-web-dev index 27975d62b8..e9f507333d 100644 --- a/docker/build/Dockerfile-web-dev +++ b/docker/build/Dockerfile-web-dev @@ -23,8 +23,7 @@ COPY ./vcell-web/target/vcell-web-0.0.1-SNAPSHOT.jar \ ./vcell-web/target/maven-jars/*.jar \ ./lib/ - -COPY ./pythonScripts ./pythonScripts +COPY ./pythonVtk ./pythonVtk COPY ./nativelibs/linux64 ./nativelibs/linux64 COPY ./docker/build/vcell-web.log4j.xml . diff --git a/docker/build/build.sh b/docker/build/build.sh index 54b1c37f67..a20f7c6970 100755 --- a/docker/build/build.sh +++ b/docker/build/build.sh @@ -188,8 +188,8 @@ build_admin() { build_opt() { echo "building $repo/vcell-opt:$tag" - echo "$SUDO_CMD docker build -f ../../pythonProject/Dockerfile --tag $repo/vcell-opt:$tag ../../pythonProject" - $SUDO_CMD docker build -f ../../pythonProject/Dockerfile --tag $repo/vcell-opt:$tag ../../pythonProject + echo "$SUDO_CMD docker build -f ../../pythonCopasiOpt/Dockerfile --tag $repo/vcell-opt:$tag ../../pythonCopasiOpt" + $SUDO_CMD docker build -f ../../pythonCopasiOpt/Dockerfile --tag $repo/vcell-opt:$tag ../../pythonCopasiOpt if [[ $? -ne 0 ]]; then echo "docker build failed"; exit 1; fi if [ "$skip_push" == "false" ]; then $SUDO_CMD docker push $repo/vcell-opt:$tag diff --git a/docker/build/installers/VCell.install4j b/docker/build/installers/VCell.install4j index 4d397f108f..326db8204a 100644 --- a/docker/build/installers/VCell.install4j +++ b/docker/build/installers/VCell.install4j @@ -18,7 +18,6 @@ - @@ -61,7 +60,6 @@ - @@ -90,7 +88,6 @@ - diff --git a/docker/swarm/README_stack_on_mac.md b/docker/swarm/README_stack_on_mac.md index 5bf1a7c873..a1149e0175 100644 --- a/docker/swarm/README_stack_on_mac.md +++ b/docker/swarm/README_stack_on_mac.md @@ -5,7 +5,15 @@ pushd ../../ mvn clean install dependency:copy-dependencies -DskipTests=true popd -pushd ../../pythonProject/vcell-opt +pushd ../../pythonCopasiOpt/vcell-opt +poetry install +popd + +pushd vcell-admin +poetry install +popd + +pushd ../../pythonVtk poetry install popd @@ -28,7 +36,7 @@ on cluster (e.g. xanadu-76) as user vcell build vcell-opt singularity container export docker_image=ghcr.io/virtualcell/vcell-opt:dev export singularity_file=ghcr.io_virtualcell_vcell-opt_dev.img module load singularity -#singularity remote login -u -p docker://ghcr.io +# singularity remote login -u -p docker://ghcr.io singularity build --force ${singularity_file} docker://${docker_image} cp ${singularity_file} /state/partition1/singularityImages/ cp ${singularity_file} /share/apps/vcell3/singularityImages/ diff --git a/pythonProject/Dockerfile b/pythonCopasiOpt/Dockerfile similarity index 100% rename from pythonProject/Dockerfile rename to pythonCopasiOpt/Dockerfile diff --git a/pythonProject/build.sh b/pythonCopasiOpt/build.sh similarity index 100% rename from pythonProject/build.sh rename to pythonCopasiOpt/build.sh diff --git a/pythonProject/docker_run.sh b/pythonCopasiOpt/docker_run.sh similarity index 100% rename from pythonProject/docker_run.sh rename to pythonCopasiOpt/docker_run.sh diff --git a/pythonProject/run.sh b/pythonCopasiOpt/run.sh similarity index 100% rename from pythonProject/run.sh rename to pythonCopasiOpt/run.sh diff --git a/pythonProject/vcell-opt/README.md b/pythonCopasiOpt/vcell-opt/README.md similarity index 100% rename from pythonProject/vcell-opt/README.md rename to pythonCopasiOpt/vcell-opt/README.md diff --git a/pythonProject/vcell-opt/mypy.ini b/pythonCopasiOpt/vcell-opt/mypy.ini similarity index 100% rename from pythonProject/vcell-opt/mypy.ini rename to pythonCopasiOpt/vcell-opt/mypy.ini diff --git a/pythonProject/vcell-opt/paramest.ipynb b/pythonCopasiOpt/vcell-opt/paramest.ipynb similarity index 100% rename from pythonProject/vcell-opt/paramest.ipynb rename to pythonCopasiOpt/vcell-opt/paramest.ipynb diff --git a/pythonProject/vcell-opt/poetry.lock b/pythonCopasiOpt/vcell-opt/poetry.lock similarity index 100% rename from pythonProject/vcell-opt/poetry.lock rename to pythonCopasiOpt/vcell-opt/poetry.lock diff --git a/pythonProject/vcell-opt/pyproject.toml b/pythonCopasiOpt/vcell-opt/pyproject.toml similarity index 100% rename from pythonProject/vcell-opt/pyproject.toml rename to pythonCopasiOpt/vcell-opt/pyproject.toml diff --git a/pythonProject/vcell-opt/test_data/Biomodel_simple_parest.json b/pythonCopasiOpt/vcell-opt/test_data/Biomodel_simple_parest.json similarity index 100% rename from pythonProject/vcell-opt/test_data/Biomodel_simple_parest.json rename to pythonCopasiOpt/vcell-opt/test_data/Biomodel_simple_parest.json diff --git a/pythonProject/vcell-opt/test_data/Biomodel_simple_parest.vcml b/pythonCopasiOpt/vcell-opt/test_data/Biomodel_simple_parest.vcml similarity index 100% rename from pythonProject/vcell-opt/test_data/Biomodel_simple_parest.vcml rename to pythonCopasiOpt/vcell-opt/test_data/Biomodel_simple_parest.vcml diff --git a/pythonProject/vcell-opt/test_data/optproblem.json b/pythonCopasiOpt/vcell-opt/test_data/optproblem.json similarity index 100% rename from pythonProject/vcell-opt/test_data/optproblem.json rename to pythonCopasiOpt/vcell-opt/test_data/optproblem.json diff --git a/pythonProject/vcell-opt/test_data/optproblem.vcml b/pythonCopasiOpt/vcell-opt/test_data/optproblem.vcml similarity index 100% rename from pythonProject/vcell-opt/test_data/optproblem.vcml rename to pythonCopasiOpt/vcell-opt/test_data/optproblem.vcml diff --git a/docker/swarm/vcell-admin/__init__.py b/pythonCopasiOpt/vcell-opt/tests/__init__.py similarity index 100% rename from docker/swarm/vcell-admin/__init__.py rename to pythonCopasiOpt/vcell-opt/tests/__init__.py diff --git a/pythonProject/vcell-opt/tests/vcellopt_test.py b/pythonCopasiOpt/vcell-opt/tests/vcellopt_test.py similarity index 100% rename from pythonProject/vcell-opt/tests/vcellopt_test.py rename to pythonCopasiOpt/vcell-opt/tests/vcellopt_test.py diff --git a/pythonProject/vcell-opt/vcell_opt/__init__.py b/pythonCopasiOpt/vcell-opt/vcell_opt/__init__.py similarity index 100% rename from pythonProject/vcell-opt/vcell_opt/__init__.py rename to pythonCopasiOpt/vcell-opt/vcell_opt/__init__.py diff --git a/pythonProject/vcell-opt/vcell_opt/data/__init__.py b/pythonCopasiOpt/vcell-opt/vcell_opt/data/__init__.py similarity index 100% rename from pythonProject/vcell-opt/vcell_opt/data/__init__.py rename to pythonCopasiOpt/vcell-opt/vcell_opt/data/__init__.py diff --git a/pythonProject/vcell-opt/vcell_opt/optService.py b/pythonCopasiOpt/vcell-opt/vcell_opt/optService.py similarity index 100% rename from pythonProject/vcell-opt/vcell_opt/optService.py rename to pythonCopasiOpt/vcell-opt/vcell_opt/optService.py diff --git a/pythonProject/vcell-opt/vcell_opt/optUtils.py b/pythonCopasiOpt/vcell-opt/vcell_opt/optUtils.py similarity index 100% rename from pythonProject/vcell-opt/vcell_opt/optUtils.py rename to pythonCopasiOpt/vcell-opt/vcell_opt/optUtils.py diff --git a/pythonScripts/VCell_API/testapi.py b/pythonScripts/VCell_API/testapi.py deleted file mode 100644 index 7da22b49a6..0000000000 --- a/pythonScripts/VCell_API/testapi.py +++ /dev/null @@ -1,97 +0,0 @@ -import vcellapi -import sys - -def main(argv): - if (len(argv)!=5): - print("usage: testapi host port clientID userid") - sys.exit(1) - - host = argv[1] # "vcellapi.cam.uchc.edu" - port = argv[2] # 8080 - clientID = argv[3] # "85133f8d-26f7-4247-8356-d175399fc2e6" - userid = argv[4] # schaff - password = raw_input("password ") - - api = vcellapi.VCellApi(host,port,clientID) - api.authenticate(userid,password) - biomodels = api.getBiomodels(vcellapi.BiomodelsQuerySpec()) - for model in biomodels: - print("model name = "+model.name); - for app in model.applications: - print(" app name = "+app.name) - for sim in model.simulations: - print(" sim name = "+sim.name) - - - bFirstSimulationToStartStop = True; - if (len(biomodels)>0): - # test /biomodel/[bmkey] - print(" ... re-fetching first biomodel ..."); - biomodelsQuerySpec = vcellapi.BiomodelsQuerySpec() - biomodelsQuerySpec.owner = userid - firstBiomodel = api.getBiomodels(biomodelsQuerySpec)[0]; - print("biomodel : "+firstBiomodel.bmKey+" : "+firstBiomodel.name); - for app in firstBiomodel.applications: - print(" app : "+app.name) - - for sim in firstBiomodel.simulations: - print(" sim (returned with BioModel) : "+sim.key+" : "+sim.name); - - # test /biomodel/[bmkey]/simulation/simkey - simulation = api.getSimulation(firstBiomodel.bmKey, sim.key); - print(" sim (retrieved separately) : "+simulation.key+" : "+simulation.name); - - if (bFirstSimulationToStartStop): - bFirstSimulationToStartStop = False; - # test /biomodel/[bmkey]/simulation/[simkey]/startSimulation - simTasksQuerySpec = vcellapi.SimulationTasksQuerySpec(); - simTasksQuerySpec.simId = sim.key; - beforeStartSimTasks = api.getSimulationTasks(simTasksQuerySpec); - print("SENDING START SIMULATION"); - justAfterStartSimTasks = api.startSimulation(firstBiomodel.bmKey, sim.key); - print("SENT START SIMULATION"); - - print("WAITING 5 seconds"); - sleep(5) - longAfterStartSimTasks = api.getSimulationTasks(simTasksQuerySpec); - - print("SENDING STOP SIMULATION"); - justAfterStopSimTasks = api.stopSimulation(firstBiomodel.bmKey, sim.key); - print("SENT STOP SIMULATION"); - - print("WAITING 5 seconds"); - sleep(5) - longAfterStopSimTasks = api.getSimulationTasks(simTasksQuerySpec); - - print("\n\nsimulation status:"); - for simTask in beforeStartSimTasks: - print(" BEFORE START Job = "+simTask.jobIndex+", Task = "+simTask.taskId+", Status = "+simTask.status); - - for simTask in justAfterStartSimTasks: - print(" JUST AFTER START Job = "+simTask.jobIndex+", Task = "+simTask.taskId+", Status = "+simTask.status); - - for simTask in longAfterStartSimTasks: - print(" LONG AFTER START Job = "+simTask.jobIndex+", Task = "+simTask.taskId+", Status = "+simTask.status); - - for simTask in justAfterStopSimTasks: - print(" JUST AFTER STOP Job = "+simTask.jobIndex+", Task = "+simTask.taskId+", Status = "+simTask.status); - - for simTask in longAfterStopSimTasks: - print(" LONG AFTER STOP Job = "+simTask.jobIndex+", Task = "+simTask.taskId+", Status = "+simTask.status); - - print("\n\n"); - - print("\n"); - - # test /simtask - simTasks = vcellApiClient.getSimulationTasks(vcellapi.SimulationTasksQuerySpec()); - for simTask in simTasks: - print("simTask : "+simTask.simKey+" : "+simTask.simName); - - print("done") - - - - -if __name__ == "__main__": - main(sys.argv) \ No newline at end of file diff --git a/pythonScripts/VCell_API/vcellapi.py b/pythonScripts/VCell_API/vcellapi.py deleted file mode 100644 index 587d397753..0000000000 --- a/pythonScripts/VCell_API/vcellapi.py +++ /dev/null @@ -1,320 +0,0 @@ -import requests -import hashlib - - -class BiomodelsQuerySpec(object): - def __init__(self): - self.bmName=""; - self.bmId=""; - self.category="all"; - self.owner=""; - self.savedLow=""; - self.savedHigh=""; - self.startRow=""; - self.maxRows="10"; - self.orderBy="date_desc"; - - def getQueryString(self): - return "bmName="+self.bmName+"&"+ \ - "bmId="+self.bmId+"&"+ \ - "category="+self.category+"&"+ \ - "owner="+self.owner+"&"+ \ - "savedLow="+self.savedLow+"&"+ \ - "savedHigh="+self.savedHigh+"&"+ \ - "startRow="+self.startRow+"&"+ \ - "maxRows="+self.maxRows+"&"+ \ - "orderBy="+self.orderBy; - -class SimulationTasksQuerySpec(object): - def __init__(self): - self.submitLow = ""; - self.submitHigh = ""; - self.startRow = "1"; - self.maxRows = "10"; - self.serverId = ""; # "alpha" - self.computeHost = ""; # "signode10" - self.simId = ""; - self.jobId = ""; - self.taskId = ""; - self.hasData = "all"; # "all", "yes", "no" - self.waiting = "on"; - self.queued = "on"; - self.dispatched = "on"; - self.running = "on"; - self.completed = "on"; - self.failed = "on"; - self.stopped = "on"; - - def getQueryString(self): - return "submitLow"+"="+self.submitLow+"&"+ \ - "submitHigh"+"="+self.submitHigh+"&"+ \ - "startRow"+"="+self.startRow+"&"+ \ - "maxRows"+"="+self.maxRows+"&"+ \ - "serverId"+"="+self.serverId+"&"+ \ - "computeHost"+"="+self.computeHost+"&"+ \ - "simId"+"="+self.simId+"&"+ \ - "jobId"+"="+self.jobId+"&"+ \ - "taskId"+"="+self.taskId+"&"+ \ - "hasData"+"="+self.hasData+"&"+ \ - "waiting"+"="+self.waiting+"&"+ \ - "queued"+"="+self.queued+"&"+ \ - "dispatched"+"="+self.dispatched+"&"+ \ - "running"+"="+self.running+"&"+ \ - "completed"+"="+self.completed+"&"+ \ - "failed"+"="+self.failed+"&"+ \ - "stopped"+"="+self.stopped; - - -class AccessToken(object): - def __init__(self): - self.token = "" - self.creationDateSeconds = 0; - self.expireDateSeconds = 0; - self.userId = ""; - self.userKey = ""; - - def loadJSON(self, accessToken_dict): - self.__dict__.update(accessToken_dict) - -class MathModelLink(object): - def __init__(self): - self.mathModelKey = ""; - self.mathModelBranchId = ""; - self.mathModelName = ""; - -class BioModelLink(object): - def __init__(self): - self.bioModelKey = ""; - self.bioModelBranchId = ""; - self.bioModelName = ""; - self.simContextKey = ""; - self.simContextBranchId = ""; - self.simContextName = ""; - -class Application(object): - def __init__(self): - self.key = ""; - self.branchId = ""; - self.name = ""; - self.ownerName = ""; - self.ownerKey = ""; - self.mathKey = ""; - - def loadJSON(self, json_dictionary): - self.__dict__.update(json_dictionary) - -class Simulation(object): - def __init__(self): - self.key = ""; - self.branchId = ""; - self.name = ""; - self.ownerName = ""; - self.ownerKey = ""; - self.mathKey = ""; - self.solverName = ""; - self.scanCount = -1; - self.mathModelLink = None; - self.bioModelLink = None; - - def loadJSON(self,simulation_dict): - self.__dict__.update(simulation_dict) - - if (self.bioModelLink != None): - link = BioModelLink() - link.__dict__.update(self.bioModelLink) - self.bioModelLink = link - - if (self.mathModelLink != None): - link = MathModelLink() - link.__dict__.update(s.mathModelLink) - self.mathModelLink = link - -class SimulationTask(object): - def __init__(self): - self.simKey = ""; - self.simName = ""; - self.userName = ""; - self.userKey = ""; - self.htcJobId = ""; - self.status = ""; - self.startdate = None; - self.jobIndex = None; - self.taskId = None; - self.message = ""; - self.site = ""; - self.computeHost = ""; - self.schedulerStatus = ""; - self.hasData = None; - self.scanCount = None; - self.mathModelLink = None; - self.bioModelLink = None; - - def loadJSON(self, simTask_dict): - self.__dict__.update(simTask_dict) - - if (self.bioModelLink != None): - link = BioModelLink() - link.__dict__.update(self.bioModelLink) - self.bioModelLink = link - - if (self.mathModelLink != None): - link = MathModelLink() - link.__dict__.update(s.mathModelLink) - self.mathModelLink = link - - -class Biomodel(object): - def __init__(self): - self.bmKey = ""; - self.name = ""; - self.privacy = -1; - self.groupUsers = { "" }; - self.savedDate = -1; - self.annot = ""; - self.branchID = ""; - self.modelKey = ""; - self.ownerName = "" - self.ownerKey = ""; - self.simulations = []; - self.applications = []; - - def loadJSON(self,biomodel_dict): - self.__dict__.update(biomodel_dict) - - if (self.applications != None): - apps = []; - for application_dict in self.applications: - a = Application() - a.loadJSON(application_dict) - apps.append(a) - self.applications = apps - - if (self.simulations != None): - sims = []; - for simulation_dict in self.simulations: - s = Simulation() - s.loadJSON(simulation_dict) - sims.append(s) - self.simulations = sims - - -class VCellApi(object): - - def __init__(self, host, port, clientID): # (self, host, port, clientID, bIgnoreCertProblem, bIgnoreHostMismatch): - self.host = host - self.port = port - self.clientID = clientID - #self.bIgnoreCertProblem = bIgnoreCertProblem - #self.bIgnoreHostMismatch = bIgnoreHostMismatch - self.userid = None; - self.passowrd = None; - self.access_token = None; # '30fead75-4f3e-40af-88c5-3623e3228858'; - - def _getResponse(self,url,bRequiresAuth): - if (self.access_token == None): - if (bRequiresAuth == False): - response = requests.get(url) - else: - raise AssertionError("call requires authentication") - else: - response = requests.get(url, auth=('access_token', self.access_token)) - - if (response.status_code != 200): - print("url "+url+" returned with unexpected status "+str(response.status_code)) - raise Exception("url "+url+" returned with unexpected status "+str(response.status_code)) - - return response - - def _post(self,url,bRequiresAuth): - if (self.access_token == None): - if (bRequiresAuth == False): - response = requests.post(url) - else: - raise AssertionError("call requires authentication") - else: - response = requests.get(url, auth=('access_token', self.access_token)) - - if (response.status_code != 200): - print("url "+url+" returned with unexpected status "+str(response.status_code)) - raise Exception("url "+url+" returned with unexpected status "+str(response.status_code)) - - return response - - - def authenticate(self,userid,clearTextPassword): - m = hashlib.sha1() - m.update(clearTextPassword); - digestedPassword = m.hexdigest().upper() - url = 'https://'+self.host+":"+str(self.port)+"/access_token?user_id="+userid+"&user_password="+digestedPassword+"&client_id="+self.clientID - accessTokenResponse = requests.get(url); - accessToken = AccessToken() - accessToken.loadJSON(accessTokenResponse.json()) - self.access_token = accessToken.token - - - def logout(self): - self.access_token = null; - - - def getBiomodel(self,biomodelID): - biomodelResponse = self._getResponse('https://'+self.host+":"+str(self.port)+'/biomodel/'+str(biomodelID),False) - biomodel = Biomodel() - biomodel.loadJSON(biomodelResponse.json()) - assert isinstance(biomodel,Biomodel) - return biomodel - - - def getBiomodels(self,biomodelsQuerySpec): - assert isinstance(biomodelsQuerySpec,BiomodelsQuerySpec) or biomodelsQuerySpec == None - if (biomodelsQuerySpec == None): - biomodelsQuerySpec = BiomodelsQuerySpec() - biomodelsResponse = self._getResponse('https://'+self.host+":"+str(self.port)+'/biomodel?'+biomodelsQuerySpec.getQueryString(),False) - biomodels = []; - for biomodel_dict in biomodelsResponse.json(): - b = Biomodel() - b.loadJSON(biomodel_dict) - biomodels.append(b) - return biomodels - - - def getSimulation(self, biomodelID, simKey): - simulationResponse = self._getResponse('https://'+self.host+":"+str(self.port)+'/biomodel/'+str(biomodelID)+'/simulation/'+str(simKey), False) - s = Simulation() - s.loadJSON(simulationResponse.json()); - assert isinstance(s,Simulation) - return s - - - def getSimulationTasks(self, simTasksQuerySpec): - assert isinstance(simTasksQuerySpec,SimulationTasksQuerySpec) or simTasksQuerySpec == None - if (simTasksQuerySpec == None): - simTasksQuerySpec = SimulationTasksQuerySpec() - simTasksResponse = self._getResponse('https://'+self.host+":"+str(self.port)+'/simtask?'+simTasksQuerySpec.getQueryString(), True) - simTasks = []; - for simTask_dict in simTasksResponse.json(): - s = SimulationTask() - s.loadJSON(simTask_dict) - simTasks.append(s) - return simTasks - - - - def startSimulation(self, biomodelID, simKey): - simulationStartResponse = self._post('https://'+self.host+":"+str(self.port)+'/biomodel/'+str(biomodelID)+'/simulation/'+str(simKey)+'/startSimulation', True) - simTasks = []; - for simTask_dict in simulationStartResponse.json(): - s = SimulationTask() - s.loadJSON(simTask_dict) - simTasks.append(s) - return simTasks - - - def stopSimulation(self, biomodelID, simKey): - simulationStopResponse = self._post('https://'+self.host+":"+str(self.port)+'/biomodel/'+str(biomodelID)+'/simulation/'+str(simKey)+'/stopSimulation', True) - simTasks = []; - for simTask_dict in simulationStartResponse.json(): - s = SimulationTask() - s.loadJSON(simTask_dict) - simTasks.append(s) - return simTasks - \ No newline at end of file diff --git a/pythonScripts/VCell_ImageJ/vcellij/SimulationService-remote b/pythonScripts/VCell_ImageJ/vcellij/SimulationService-remote deleted file mode 100755 index 716accdbe9..0000000000 --- a/pythonScripts/VCell_ImageJ/vcellij/SimulationService-remote +++ /dev/null @@ -1,152 +0,0 @@ -#!/usr/bin/env python -# -# Autogenerated by Thrift Compiler (0.10.0) -# -# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -# -# options string: py -# - -import sys -import pprint -if sys.version_info[0] > 2: - from urllib.parse import urlparse -else: - from urlparse import urlparse -from thrift.transport import TTransport, TSocket, TSSLSocket, THttpClient -from thrift.protocol.TBinaryProtocol import TBinaryProtocol - -from vcellij import SimulationService -from vcellij.ttypes import * - -if len(sys.argv) <= 1 or sys.argv[1] == '--help': - print('') - print('Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] [-s[sl]] [-novalidate] [-ca_certs certs] [-keyfile keyfile] [-certfile certfile] function [arg1 [arg2...]]') - print('') - print('Functions:') - print(' SBML getSBML(VCML vcml, ApplicationName applicationName)') - print(' Data getData(SimulationInfo simInfo, VariableInfo varInfo, TimeIndex timeIndex)') - print(' TimePoints getTimePoints(SimulationInfo simInfo)') - print(' VariableList getVariableList(SimulationInfo simInfo)') - print(' SimulationStatus getStatus(SimulationInfo simInfo)') - print(' SimulationInfo computeModel(SBMLModel model, SimulationSpec simSpec)') - print('') - sys.exit(0) - -pp = pprint.PrettyPrinter(indent=2) -host = 'localhost' -port = 9090 -uri = '' -framed = False -ssl = False -validate = True -ca_certs = None -keyfile = None -certfile = None -http = False -argi = 1 - -if sys.argv[argi] == '-h': - parts = sys.argv[argi + 1].split(':') - host = parts[0] - if len(parts) > 1: - port = int(parts[1]) - argi += 2 - -if sys.argv[argi] == '-u': - url = urlparse(sys.argv[argi + 1]) - parts = url[1].split(':') - host = parts[0] - if len(parts) > 1: - port = int(parts[1]) - else: - port = 80 - uri = url[2] - if url[4]: - uri += '?%s' % url[4] - http = True - argi += 2 - -if sys.argv[argi] == '-f' or sys.argv[argi] == '-framed': - framed = True - argi += 1 - -if sys.argv[argi] == '-s' or sys.argv[argi] == '-ssl': - ssl = True - argi += 1 - -if sys.argv[argi] == '-novalidate': - validate = False - argi += 1 - -if sys.argv[argi] == '-ca_certs': - ca_certs = sys.argv[argi+1] - argi += 2 - -if sys.argv[argi] == '-keyfile': - keyfile = sys.argv[argi+1] - argi += 2 - -if sys.argv[argi] == '-certfile': - certfile = sys.argv[argi+1] - argi += 2 - -cmd = sys.argv[argi] -args = sys.argv[argi + 1:] - -if http: - transport = THttpClient.THttpClient(host, port, uri) -else: - if ssl: - socket = TSSLSocket.TSSLSocket(host, port, validate=validate, ca_certs=ca_certs, keyfile=keyfile, certfile=certfile) - else: - socket = TSocket.TSocket(host, port) - if framed: - transport = TTransport.TFramedTransport(socket) - else: - transport = TTransport.TBufferedTransport(socket) -protocol = TBinaryProtocol(transport) -client = SimulationService.Client(protocol) -transport.open() - -if cmd == 'getSBML': - if len(args) != 2: - print('getSBML requires 2 args') - sys.exit(1) - pp.pprint(client.getSBML(eval(args[0]), eval(args[1]),)) - -elif cmd == 'getData': - if len(args) != 3: - print('getData requires 3 args') - sys.exit(1) - pp.pprint(client.getData(eval(args[0]), eval(args[1]), eval(args[2]),)) - -elif cmd == 'getTimePoints': - if len(args) != 1: - print('getTimePoints requires 1 args') - sys.exit(1) - pp.pprint(client.getTimePoints(eval(args[0]),)) - -elif cmd == 'getVariableList': - if len(args) != 1: - print('getVariableList requires 1 args') - sys.exit(1) - pp.pprint(client.getVariableList(eval(args[0]),)) - -elif cmd == 'getStatus': - if len(args) != 1: - print('getStatus requires 1 args') - sys.exit(1) - pp.pprint(client.getStatus(eval(args[0]),)) - -elif cmd == 'computeModel': - if len(args) != 2: - print('computeModel requires 2 args') - sys.exit(1) - pp.pprint(client.computeModel(eval(args[0]), eval(args[1]),)) - -else: - print('Unrecognized method %s' % cmd) - sys.exit(1) - -transport.close() diff --git a/pythonScripts/VCell_ImageJ/vcellij/SimulationService.py b/pythonScripts/VCell_ImageJ/vcellij/SimulationService.py deleted file mode 100644 index fd2688e820..0000000000 --- a/pythonScripts/VCell_ImageJ/vcellij/SimulationService.py +++ /dev/null @@ -1,1312 +0,0 @@ -# -# Autogenerated by Thrift Compiler (0.10.0) -# -# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -# -# options string: py -# - -from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException -from thrift.protocol.TProtocol import TProtocolException -import sys -import logging -from .ttypes import * -from thrift.Thrift import TProcessor -from thrift.transport import TTransport - - -class Iface(object): - def getSBML(self, vcml, applicationName): - """ - Parameters: - - vcml - - applicationName - """ - pass - - def getData(self, simInfo, varInfo, timeIndex): - """ - Parameters: - - simInfo - - varInfo - - timeIndex - """ - pass - - def getTimePoints(self, simInfo): - """ - Parameters: - - simInfo - """ - pass - - def getVariableList(self, simInfo): - """ - Parameters: - - simInfo - """ - pass - - def getStatus(self, simInfo): - """ - Parameters: - - simInfo - """ - pass - - def computeModel(self, model, simSpec): - """ - Parameters: - - model - - simSpec - """ - pass - - -class Client(Iface): - def __init__(self, iprot, oprot=None): - self._iprot = self._oprot = iprot - if oprot is not None: - self._oprot = oprot - self._seqid = 0 - - def getSBML(self, vcml, applicationName): - """ - Parameters: - - vcml - - applicationName - """ - self.send_getSBML(vcml, applicationName) - return self.recv_getSBML() - - def send_getSBML(self, vcml, applicationName): - self._oprot.writeMessageBegin('getSBML', TMessageType.CALL, self._seqid) - args = getSBML_args() - args.vcml = vcml - args.applicationName = applicationName - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_getSBML(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = getSBML_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.dataAccessException is not None: - raise result.dataAccessException - raise TApplicationException(TApplicationException.MISSING_RESULT, "getSBML failed: unknown result") - - def getData(self, simInfo, varInfo, timeIndex): - """ - Parameters: - - simInfo - - varInfo - - timeIndex - """ - self.send_getData(simInfo, varInfo, timeIndex) - return self.recv_getData() - - def send_getData(self, simInfo, varInfo, timeIndex): - self._oprot.writeMessageBegin('getData', TMessageType.CALL, self._seqid) - args = getData_args() - args.simInfo = simInfo - args.varInfo = varInfo - args.timeIndex = timeIndex - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_getData(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = getData_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.dataAccessException is not None: - raise result.dataAccessException - raise TApplicationException(TApplicationException.MISSING_RESULT, "getData failed: unknown result") - - def getTimePoints(self, simInfo): - """ - Parameters: - - simInfo - """ - self.send_getTimePoints(simInfo) - return self.recv_getTimePoints() - - def send_getTimePoints(self, simInfo): - self._oprot.writeMessageBegin('getTimePoints', TMessageType.CALL, self._seqid) - args = getTimePoints_args() - args.simInfo = simInfo - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_getTimePoints(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = getTimePoints_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.dataAccessException is not None: - raise result.dataAccessException - raise TApplicationException(TApplicationException.MISSING_RESULT, "getTimePoints failed: unknown result") - - def getVariableList(self, simInfo): - """ - Parameters: - - simInfo - """ - self.send_getVariableList(simInfo) - return self.recv_getVariableList() - - def send_getVariableList(self, simInfo): - self._oprot.writeMessageBegin('getVariableList', TMessageType.CALL, self._seqid) - args = getVariableList_args() - args.simInfo = simInfo - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_getVariableList(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = getVariableList_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.dataAccessException is not None: - raise result.dataAccessException - raise TApplicationException(TApplicationException.MISSING_RESULT, "getVariableList failed: unknown result") - - def getStatus(self, simInfo): - """ - Parameters: - - simInfo - """ - self.send_getStatus(simInfo) - return self.recv_getStatus() - - def send_getStatus(self, simInfo): - self._oprot.writeMessageBegin('getStatus', TMessageType.CALL, self._seqid) - args = getStatus_args() - args.simInfo = simInfo - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_getStatus(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = getStatus_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.dataAccessException is not None: - raise result.dataAccessException - raise TApplicationException(TApplicationException.MISSING_RESULT, "getStatus failed: unknown result") - - def computeModel(self, model, simSpec): - """ - Parameters: - - model - - simSpec - """ - self.send_computeModel(model, simSpec) - return self.recv_computeModel() - - def send_computeModel(self, model, simSpec): - self._oprot.writeMessageBegin('computeModel', TMessageType.CALL, self._seqid) - args = computeModel_args() - args.model = model - args.simSpec = simSpec - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_computeModel(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = computeModel_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.dataAccessException is not None: - raise result.dataAccessException - raise TApplicationException(TApplicationException.MISSING_RESULT, "computeModel failed: unknown result") - - -class Processor(Iface, TProcessor): - def __init__(self, handler): - self._handler = handler - self._processMap = {} - self._processMap["getSBML"] = Processor.process_getSBML - self._processMap["getData"] = Processor.process_getData - self._processMap["getTimePoints"] = Processor.process_getTimePoints - self._processMap["getVariableList"] = Processor.process_getVariableList - self._processMap["getStatus"] = Processor.process_getStatus - self._processMap["computeModel"] = Processor.process_computeModel - - def process(self, iprot, oprot): - (name, type, seqid) = iprot.readMessageBegin() - if name not in self._processMap: - iprot.skip(TType.STRUCT) - iprot.readMessageEnd() - x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name)) - oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid) - x.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - return - else: - self._processMap[name](self, seqid, iprot, oprot) - return True - - def process_getSBML(self, seqid, iprot, oprot): - args = getSBML_args() - args.read(iprot) - iprot.readMessageEnd() - result = getSBML_result() - try: - result.success = self._handler.getSBML(args.vcml, args.applicationName) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except ThriftDataAccessException as dataAccessException: - msg_type = TMessageType.REPLY - result.dataAccessException = dataAccessException - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("getSBML", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_getData(self, seqid, iprot, oprot): - args = getData_args() - args.read(iprot) - iprot.readMessageEnd() - result = getData_result() - try: - result.success = self._handler.getData(args.simInfo, args.varInfo, args.timeIndex) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except ThriftDataAccessException as dataAccessException: - msg_type = TMessageType.REPLY - result.dataAccessException = dataAccessException - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("getData", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_getTimePoints(self, seqid, iprot, oprot): - args = getTimePoints_args() - args.read(iprot) - iprot.readMessageEnd() - result = getTimePoints_result() - try: - result.success = self._handler.getTimePoints(args.simInfo) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except ThriftDataAccessException as dataAccessException: - msg_type = TMessageType.REPLY - result.dataAccessException = dataAccessException - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("getTimePoints", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_getVariableList(self, seqid, iprot, oprot): - args = getVariableList_args() - args.read(iprot) - iprot.readMessageEnd() - result = getVariableList_result() - try: - result.success = self._handler.getVariableList(args.simInfo) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except ThriftDataAccessException as dataAccessException: - msg_type = TMessageType.REPLY - result.dataAccessException = dataAccessException - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("getVariableList", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_getStatus(self, seqid, iprot, oprot): - args = getStatus_args() - args.read(iprot) - iprot.readMessageEnd() - result = getStatus_result() - try: - result.success = self._handler.getStatus(args.simInfo) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except ThriftDataAccessException as dataAccessException: - msg_type = TMessageType.REPLY - result.dataAccessException = dataAccessException - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("getStatus", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_computeModel(self, seqid, iprot, oprot): - args = computeModel_args() - args.read(iprot) - iprot.readMessageEnd() - result = computeModel_result() - try: - result.success = self._handler.computeModel(args.model, args.simSpec) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except ThriftDataAccessException as dataAccessException: - msg_type = TMessageType.REPLY - result.dataAccessException = dataAccessException - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("computeModel", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - -# HELPER FUNCTIONS AND STRUCTURES - - -class getSBML_args(object): - """ - Attributes: - - vcml - - applicationName - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'vcml', 'UTF8', None, ), # 1 - (2, TType.STRING, 'applicationName', 'UTF8', None, ), # 2 - ) - - def __init__(self, vcml=None, applicationName=None,): - self.vcml = vcml - self.applicationName = applicationName - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.vcml = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.applicationName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getSBML_args') - if self.vcml is not None: - oprot.writeFieldBegin('vcml', TType.STRING, 1) - oprot.writeString(self.vcml.encode('utf-8') if sys.version_info[0] == 2 else self.vcml) - oprot.writeFieldEnd() - if self.applicationName is not None: - oprot.writeFieldBegin('applicationName', TType.STRING, 2) - oprot.writeString(self.applicationName.encode('utf-8') if sys.version_info[0] == 2 else self.applicationName) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class getSBML_result(object): - """ - Attributes: - - success - - dataAccessException - """ - - thrift_spec = ( - (0, TType.STRING, 'success', 'UTF8', None, ), # 0 - (1, TType.STRUCT, 'dataAccessException', (ThriftDataAccessException, ThriftDataAccessException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, dataAccessException=None,): - self.success = success - self.dataAccessException = dataAccessException - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.dataAccessException = ThriftDataAccessException() - self.dataAccessException.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getSBML_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) - oprot.writeFieldEnd() - if self.dataAccessException is not None: - oprot.writeFieldBegin('dataAccessException', TType.STRUCT, 1) - self.dataAccessException.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class getData_args(object): - """ - Attributes: - - simInfo - - varInfo - - timeIndex - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'simInfo', (SimulationInfo, SimulationInfo.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'varInfo', (VariableInfo, VariableInfo.thrift_spec), None, ), # 2 - (3, TType.I32, 'timeIndex', None, None, ), # 3 - ) - - def __init__(self, simInfo=None, varInfo=None, timeIndex=None,): - self.simInfo = simInfo - self.varInfo = varInfo - self.timeIndex = timeIndex - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.simInfo = SimulationInfo() - self.simInfo.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.varInfo = VariableInfo() - self.varInfo.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I32: - self.timeIndex = iprot.readI32() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getData_args') - if self.simInfo is not None: - oprot.writeFieldBegin('simInfo', TType.STRUCT, 1) - self.simInfo.write(oprot) - oprot.writeFieldEnd() - if self.varInfo is not None: - oprot.writeFieldBegin('varInfo', TType.STRUCT, 2) - self.varInfo.write(oprot) - oprot.writeFieldEnd() - if self.timeIndex is not None: - oprot.writeFieldBegin('timeIndex', TType.I32, 3) - oprot.writeI32(self.timeIndex) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class getData_result(object): - """ - Attributes: - - success - - dataAccessException - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.DOUBLE, None, False), None, ), # 0 - (1, TType.STRUCT, 'dataAccessException', (ThriftDataAccessException, ThriftDataAccessException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, dataAccessException=None,): - self.success = success - self.dataAccessException = dataAccessException - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype3, _size0) = iprot.readListBegin() - for _i4 in range(_size0): - _elem5 = iprot.readDouble() - self.success.append(_elem5) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.dataAccessException = ThriftDataAccessException() - self.dataAccessException.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getData_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.DOUBLE, len(self.success)) - for iter6 in self.success: - oprot.writeDouble(iter6) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.dataAccessException is not None: - oprot.writeFieldBegin('dataAccessException', TType.STRUCT, 1) - self.dataAccessException.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class getTimePoints_args(object): - """ - Attributes: - - simInfo - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'simInfo', (SimulationInfo, SimulationInfo.thrift_spec), None, ), # 1 - ) - - def __init__(self, simInfo=None,): - self.simInfo = simInfo - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.simInfo = SimulationInfo() - self.simInfo.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getTimePoints_args') - if self.simInfo is not None: - oprot.writeFieldBegin('simInfo', TType.STRUCT, 1) - self.simInfo.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class getTimePoints_result(object): - """ - Attributes: - - success - - dataAccessException - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.DOUBLE, None, False), None, ), # 0 - (1, TType.STRUCT, 'dataAccessException', (ThriftDataAccessException, ThriftDataAccessException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, dataAccessException=None,): - self.success = success - self.dataAccessException = dataAccessException - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype10, _size7) = iprot.readListBegin() - for _i11 in range(_size7): - _elem12 = iprot.readDouble() - self.success.append(_elem12) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.dataAccessException = ThriftDataAccessException() - self.dataAccessException.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getTimePoints_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.DOUBLE, len(self.success)) - for iter13 in self.success: - oprot.writeDouble(iter13) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.dataAccessException is not None: - oprot.writeFieldBegin('dataAccessException', TType.STRUCT, 1) - self.dataAccessException.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class getVariableList_args(object): - """ - Attributes: - - simInfo - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'simInfo', (SimulationInfo, SimulationInfo.thrift_spec), None, ), # 1 - ) - - def __init__(self, simInfo=None,): - self.simInfo = simInfo - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.simInfo = SimulationInfo() - self.simInfo.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getVariableList_args') - if self.simInfo is not None: - oprot.writeFieldBegin('simInfo', TType.STRUCT, 1) - self.simInfo.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class getVariableList_result(object): - """ - Attributes: - - success - - dataAccessException - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, (VariableInfo, VariableInfo.thrift_spec), False), None, ), # 0 - (1, TType.STRUCT, 'dataAccessException', (ThriftDataAccessException, ThriftDataAccessException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, dataAccessException=None,): - self.success = success - self.dataAccessException = dataAccessException - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype17, _size14) = iprot.readListBegin() - for _i18 in range(_size14): - _elem19 = VariableInfo() - _elem19.read(iprot) - self.success.append(_elem19) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.dataAccessException = ThriftDataAccessException() - self.dataAccessException.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getVariableList_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter20 in self.success: - iter20.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.dataAccessException is not None: - oprot.writeFieldBegin('dataAccessException', TType.STRUCT, 1) - self.dataAccessException.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class getStatus_args(object): - """ - Attributes: - - simInfo - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'simInfo', (SimulationInfo, SimulationInfo.thrift_spec), None, ), # 1 - ) - - def __init__(self, simInfo=None,): - self.simInfo = simInfo - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.simInfo = SimulationInfo() - self.simInfo.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getStatus_args') - if self.simInfo is not None: - oprot.writeFieldBegin('simInfo', TType.STRUCT, 1) - self.simInfo.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class getStatus_result(object): - """ - Attributes: - - success - - dataAccessException - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (SimulationStatus, SimulationStatus.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'dataAccessException', (ThriftDataAccessException, ThriftDataAccessException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, dataAccessException=None,): - self.success = success - self.dataAccessException = dataAccessException - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = SimulationStatus() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.dataAccessException = ThriftDataAccessException() - self.dataAccessException.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getStatus_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.dataAccessException is not None: - oprot.writeFieldBegin('dataAccessException', TType.STRUCT, 1) - self.dataAccessException.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class computeModel_args(object): - """ - Attributes: - - model - - simSpec - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'model', (SBMLModel, SBMLModel.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'simSpec', (SimulationSpec, SimulationSpec.thrift_spec), None, ), # 2 - ) - - def __init__(self, model=None, simSpec=None,): - self.model = model - self.simSpec = simSpec - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.model = SBMLModel() - self.model.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.simSpec = SimulationSpec() - self.simSpec.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('computeModel_args') - if self.model is not None: - oprot.writeFieldBegin('model', TType.STRUCT, 1) - self.model.write(oprot) - oprot.writeFieldEnd() - if self.simSpec is not None: - oprot.writeFieldBegin('simSpec', TType.STRUCT, 2) - self.simSpec.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class computeModel_result(object): - """ - Attributes: - - success - - dataAccessException - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (SimulationInfo, SimulationInfo.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'dataAccessException', (ThriftDataAccessException, ThriftDataAccessException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, dataAccessException=None,): - self.success = success - self.dataAccessException = dataAccessException - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = SimulationInfo() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.dataAccessException = ThriftDataAccessException() - self.dataAccessException.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('computeModel_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.dataAccessException is not None: - oprot.writeFieldBegin('dataAccessException', TType.STRUCT, 1) - self.dataAccessException.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) diff --git a/pythonScripts/VCell_ImageJ/vcellij/__init__.py b/pythonScripts/VCell_ImageJ/vcellij/__init__.py deleted file mode 100644 index 8630c1fb59..0000000000 --- a/pythonScripts/VCell_ImageJ/vcellij/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__all__ = ['ttypes', 'constants', 'SimulationService'] diff --git a/pythonScripts/VCell_ImageJ/vcellij/ttypes.py b/pythonScripts/VCell_ImageJ/vcellij/ttypes.py deleted file mode 100644 index 754cae4d8e..0000000000 --- a/pythonScripts/VCell_ImageJ/vcellij/ttypes.py +++ /dev/null @@ -1,480 +0,0 @@ -# -# Autogenerated by Thrift Compiler (0.10.0) -# -# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -# -# options string: py -# - -from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException -from thrift.protocol.TProtocol import TProtocolException -import sys - -from thrift.transport import TTransport - - -class DomainType(object): - VOLUME = 0 - MEMBRANE = 1 - - _VALUES_TO_NAMES = { - 0: "VOLUME", - 1: "MEMBRANE", - } - - _NAMES_TO_VALUES = { - "VOLUME": 0, - "MEMBRANE": 1, - } - - -class SimulationState(object): - notRun = 0 - running = 1 - done = 2 - failed = 3 - - _VALUES_TO_NAMES = { - 0: "notRun", - 1: "running", - 2: "done", - 3: "failed", - } - - _NAMES_TO_VALUES = { - "notRun": 0, - "running": 1, - "done": 2, - "failed": 3, - } - - -class SimulationInfo(object): - """ - Attributes: - - id - """ - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'id', None, None, ), # 1 - ) - - def __init__(self, id=None,): - self.id = id - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I32: - self.id = iprot.readI32() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('SimulationInfo') - if self.id is not None: - oprot.writeFieldBegin('id', TType.I32, 1) - oprot.writeI32(self.id) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.id is None: - raise TProtocolException(message='Required field id is unset!') - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class SBMLModel(object): - """ - Attributes: - - filepath - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'filepath', 'UTF8', None, ), # 1 - ) - - def __init__(self, filepath=None,): - self.filepath = filepath - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.filepath = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('SBMLModel') - if self.filepath is not None: - oprot.writeFieldBegin('filepath', TType.STRING, 1) - oprot.writeString(self.filepath.encode('utf-8') if sys.version_info[0] == 2 else self.filepath) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.filepath is None: - raise TProtocolException(message='Required field filepath is unset!') - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class VariableInfo(object): - """ - Attributes: - - variableVtuName - - variableDisplayName - - domainName - - variableDomainType - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'variableVtuName', 'UTF8', None, ), # 1 - (2, TType.STRING, 'variableDisplayName', 'UTF8', None, ), # 2 - (3, TType.STRING, 'domainName', 'UTF8', None, ), # 3 - (4, TType.I32, 'variableDomainType', None, None, ), # 4 - ) - - def __init__(self, variableVtuName=None, variableDisplayName=None, domainName=None, variableDomainType=None,): - self.variableVtuName = variableVtuName - self.variableDisplayName = variableDisplayName - self.domainName = domainName - self.variableDomainType = variableDomainType - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.variableVtuName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.variableDisplayName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.domainName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I32: - self.variableDomainType = iprot.readI32() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('VariableInfo') - if self.variableVtuName is not None: - oprot.writeFieldBegin('variableVtuName', TType.STRING, 1) - oprot.writeString(self.variableVtuName.encode('utf-8') if sys.version_info[0] == 2 else self.variableVtuName) - oprot.writeFieldEnd() - if self.variableDisplayName is not None: - oprot.writeFieldBegin('variableDisplayName', TType.STRING, 2) - oprot.writeString(self.variableDisplayName.encode('utf-8') if sys.version_info[0] == 2 else self.variableDisplayName) - oprot.writeFieldEnd() - if self.domainName is not None: - oprot.writeFieldBegin('domainName', TType.STRING, 3) - oprot.writeString(self.domainName.encode('utf-8') if sys.version_info[0] == 2 else self.domainName) - oprot.writeFieldEnd() - if self.variableDomainType is not None: - oprot.writeFieldBegin('variableDomainType', TType.I32, 4) - oprot.writeI32(self.variableDomainType) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.variableVtuName is None: - raise TProtocolException(message='Required field variableVtuName is unset!') - if self.variableDisplayName is None: - raise TProtocolException(message='Required field variableDisplayName is unset!') - if self.domainName is None: - raise TProtocolException(message='Required field domainName is unset!') - if self.variableDomainType is None: - raise TProtocolException(message='Required field variableDomainType is unset!') - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class SimulationSpec(object): - """ - Attributes: - - outputTimeStep - - totalTime - """ - - thrift_spec = ( - None, # 0 - (1, TType.DOUBLE, 'outputTimeStep', None, None, ), # 1 - (2, TType.DOUBLE, 'totalTime', None, None, ), # 2 - ) - - def __init__(self, outputTimeStep=None, totalTime=None,): - self.outputTimeStep = outputTimeStep - self.totalTime = totalTime - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.DOUBLE: - self.outputTimeStep = iprot.readDouble() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.DOUBLE: - self.totalTime = iprot.readDouble() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('SimulationSpec') - if self.outputTimeStep is not None: - oprot.writeFieldBegin('outputTimeStep', TType.DOUBLE, 1) - oprot.writeDouble(self.outputTimeStep) - oprot.writeFieldEnd() - if self.totalTime is not None: - oprot.writeFieldBegin('totalTime', TType.DOUBLE, 2) - oprot.writeDouble(self.totalTime) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.outputTimeStep is None: - raise TProtocolException(message='Required field outputTimeStep is unset!') - if self.totalTime is None: - raise TProtocolException(message='Required field totalTime is unset!') - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class ThriftDataAccessException(TException): - """ - Attributes: - - message - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', 'UTF8', None, ), # 1 - ) - - def __init__(self, message=None,): - self.message = message - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.message = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('ThriftDataAccessException') - if self.message is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.message is None: - raise TProtocolException(message='Required field message is unset!') - return - - def __str__(self): - return repr(self) - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class SimulationStatus(object): - """ - Attributes: - - simState - """ - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'simState', None, None, ), # 1 - ) - - def __init__(self, simState=None,): - self.simState = simState - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I32: - self.simState = iprot.readI32() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('SimulationStatus') - if self.simState is not None: - oprot.writeFieldBegin('simState', TType.I32, 1) - oprot.writeI32(self.simState) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.simState is None: - raise TProtocolException(message='Required field simState is unset!') - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) diff --git a/pythonScripts/VCell_Opt/__init__.py b/pythonScripts/VCell_Opt/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/pythonScripts/VCell_Opt/copasi.ipynb b/pythonScripts/VCell_Opt/copasi.ipynb deleted file mode 100644 index 4945208e6d..0000000000 --- a/pythonScripts/VCell_Opt/copasi.ipynb +++ /dev/null @@ -1,97 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [ - "import COPASI" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "COPASI.CCopasiRootContainer.init()" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 6, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "dataModel = COPASI.CCopasiRootContainer.addDatamodel()\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [ - "dataModel.importSBML(sbmlFile)\n", - "\n", - "# fitTask = dataModel.getTaskList()[\"Parameter Estimation\"]\n", - "fitTask = COPASI.self.datamodel.addTask(COPASI.CCopasiTask.parameterFitting)\n", - "assert(fitTask!=None)\n", - "assert(fitTask.__class__==COPASI.CFitTask)\n", - "\n", - "fitMethod = fitTask.getMethod()\n", - "assert(isinstance(fitMethod,COPASI.COptMethod))\n", - "\n", - "fitProblem = fitTask.getProblem()\n", - "assert(fitProblem!=None)\n", - "assert(fitProblem.__class__==COPASI.CFitProblem)\n", - "\n", - "experimentSet = fitProblem.getParameter(\"Experiment Set\")\n", - "assert(experimentSet!=None)\n", - "assert(experimentSet.__class__ == COPASI.CExperimentSet)\n", - "assert(experimentSet.getExperimentCount() == 0)\n" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 2", - "language": "python", - "name": "python2" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 2 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython2", - "version": "2.7.12" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/pythonScripts/VCell_Opt/optService.py b/pythonScripts/VCell_Opt/optService.py deleted file mode 100644 index 71f579ccb6..0000000000 --- a/pythonScripts/VCell_Opt/optService.py +++ /dev/null @@ -1,496 +0,0 @@ -import argparse -import sys -import traceback -from __builtin__ import isinstance - -import COPASI -import vcellopt.ttypes as VCELLOPT -import tempfile -import os -import os.path - -from thrift.TSerialization import TTransport -from thrift.TSerialization import TBinaryProtocol -from thrift.TSerialization import deserialize -from thrift.TSerialization import serialize - - -def main(): - #sys.setrecursionlimit(100000) - interresults = [None] - try: - #-------------------------------------------------------------------------- - # parse input and deserialize the (thrift) optimization problem - #-------------------------------------------------------------------------- - parser = argparse.ArgumentParser() - parser.add_argument("optfile",help="filename of input optimization file") - parser.add_argument("resultfile",help="filename of optimization results") - args = parser.parse_args() - assert isinstance(args.resultfile, str) - resultFile = args.resultfile - - dir_path = os.path.dirname(os.path.realpath(resultFile)) - interresults[0]=os.path.join(dir_path,"interresults.txt") - - f_optfile = open(args.optfile, "rb") - blob_opt = f_optfile.read() - print("read "+str(len(blob_opt))+" bytes from "+args.optfile) - f_optfile.close() - - ''' - struct OptProblem { - 1: required string mathModelSbmlFile; - 2: required int numberOfOptimizationRuns; - 3: required ParameterDescriptionList parameterDescriptionList; - 4: required ReferenceVariableList referenceVariableList; - 5: required string experimentalDataCSV; - 6: required CopasiOptimizationMethod optimizationMethod; - } - ''' - vcellOptProblem = VCELLOPT.OptProblem() - protocol_factory = TBinaryProtocol.TBinaryProtocolFactory - deserialize(vcellOptProblem, blob_opt, protocol_factory = protocol_factory()) - print("done with deserialization") - - #----------------------------------------------------------------------------- - # add CDataModel - # - assert(COPASI.CCopasiRootContainer.getRoot() != None) - # create a datamodel - dataModel = COPASI.CCopasiRootContainer.addDatamodel(); - assert(isinstance(dataModel,COPASI.CCopasiDataModel)) - assert(COPASI.CCopasiRootContainer.getDatamodelList().size() == 1) - - try: - #sbmlFile = "C:\\COPASI-4.19.140-Source\\copasi\\bindings\\python\\examples\\exampleDeni.xml" - sbmlString = vcellOptProblem.mathModelSbmlContents - dataModel.importSBMLFromString(str(sbmlString)) - print("data model loaded") - except: - e_info = sys.exc_info() - traceback.print_exception(e_info[0],e_info[1],e_info[2],file=sys.stdout) - sys.stderr.write("exception: error importing sbml file: "+str(e_info[0])+": "+str(e_info[1])+"\n") - sys.stderr.flush() - return -1 - - model = dataModel.getModel() - assert(isinstance(model,COPASI.CModel)) - model.compileIfNecessary() - - printModel(model) - - mathContainer = model.getMathContainer() - assert(isinstance(mathContainer,COPASI.CMathContainer)) - # dataModel.saveModel("optModel.cps", True) - - - #--------------------------------------------------------------------------- - # add CFitTask - #--------------------------------------------------------------------------- - fitTask = dataModel.addTask(COPASI.CTaskEnum.parameterFitting) - assert(isinstance(fitTask, COPASI.CFitTask)) - - ''' - enum OptimizationMethodType { - EvolutionaryProgram, - SRES, - GeneticAlgorithm, - GeneticAlgorithmSR, - HookeJeeves, - LevenbergMarquardt, - NelderMead, - ParticleSwarm, - RandomSearch, - SimulatedAnnealing, - SteepestDescent, - Praxis, - TruncatedNewton - } - ''' - methodTypeDict = dict() - methodTypeDict[VCELLOPT.OptimizationMethodType.EvolutionaryProgram] = COPASI.CTaskEnum.EvolutionaryProgram - methodTypeDict[VCELLOPT.OptimizationMethodType.SRES] = COPASI.CTaskEnum.SRES - methodTypeDict[VCELLOPT.OptimizationMethodType.GeneticAlgorithm] = COPASI.CTaskEnum.GeneticAlgorithm - methodTypeDict[VCELLOPT.OptimizationMethodType.GeneticAlgorithmSR] = COPASI.CTaskEnum.GeneticAlgorithmSR - methodTypeDict[VCELLOPT.OptimizationMethodType.HookeJeeves] = COPASI.CTaskEnum.HookeJeeves - methodTypeDict[VCELLOPT.OptimizationMethodType.LevenbergMarquardt] = COPASI.CTaskEnum.LevenbergMarquardt - methodTypeDict[VCELLOPT.OptimizationMethodType.NelderMead] = COPASI.CTaskEnum.NelderMead - methodTypeDict[VCELLOPT.OptimizationMethodType.ParticleSwarm] = COPASI.CTaskEnum.ParticleSwarm - methodTypeDict[VCELLOPT.OptimizationMethodType.RandomSearch] = COPASI.CTaskEnum.RandomSearch - methodTypeDict[VCELLOPT.OptimizationMethodType.SimulatedAnnealing] = COPASI.CTaskEnum.SimulatedAnnealing - methodTypeDict[VCELLOPT.OptimizationMethodType.SteepestDescent] = COPASI.CTaskEnum.SteepestDescent - methodTypeDict[VCELLOPT.OptimizationMethodType.Praxis] = COPASI.CTaskEnum.Praxis - methodTypeDict[VCELLOPT.OptimizationMethodType.TruncatedNewton] = COPASI.CTaskEnum.TruncatedNewton - - # - # set CFitMethod - # - copasiFitMethodType = methodTypeDict[vcellOptProblem.optimizationMethod.optimizationMethodType] - if (copasiFitMethodType not in fitTask.getValidMethods()): - print "fit method not allowed" - return 1 - fitTask.setMethodType(copasiFitMethodType) - fitMethod = fitTask.getMethod() - assert(isinstance(fitMethod,COPASI.COptMethod)) - - ''' - enum OptimizationParameterType { - Number_of_Generations, - Number_of_Iterations, - Population_Size, - Random_Number_Generator, - Seed, - IterationLimit, - Tolerance, - Rho, - Scale, - Swarm_Size, - Std_Deviation, - Start_Temperature, - Cooling_Factor, - Pf - } - ''' - methodParamDict = dict() - methodParamDict[VCELLOPT.OptimizationParameterType.Number_of_Generations] = "Number of Generations" - methodParamDict[VCELLOPT.OptimizationParameterType.Number_of_Iterations] = "Number of Iterations" - methodParamDict[VCELLOPT.OptimizationParameterType.Population_Size] = "Population Size" - methodParamDict[VCELLOPT.OptimizationParameterType.Random_Number_Generator] = "Random Number Generator" - methodParamDict[VCELLOPT.OptimizationParameterType.Seed] = "Seed" - methodParamDict[VCELLOPT.OptimizationParameterType.IterationLimit] = "Iteration Limit" - methodParamDict[VCELLOPT.OptimizationParameterType.Tolerance] = "Tolerance" - methodParamDict[VCELLOPT.OptimizationParameterType.Rho] = "Rho" - methodParamDict[VCELLOPT.OptimizationParameterType.Scale] = "Scale" - methodParamDict[VCELLOPT.OptimizationParameterType.Swarm_Size] = "Swarm Size" - methodParamDict[VCELLOPT.OptimizationParameterType.Std_Deviation] = "Std Deviation" - methodParamDict[VCELLOPT.OptimizationParameterType.Start_Temperature] = "Start Temperature" - methodParamDict[VCELLOPT.OptimizationParameterType.Cooling_Factor] = "Cooling Factor" - methodParamDict[VCELLOPT.OptimizationParameterType.Pf] = "Pf" - - # - # set FitMethod parameters - # - ''' - - - - - - - - - - - - - - - ''' - vcellOptParamList = vcellOptProblem.optimizationMethod.optimizationParameterList - assert(isinstance(vcellOptParamList, list)) - for vcellOptParam in vcellOptParamList: - assert(isinstance(vcellOptParam,VCELLOPT.CopasiOptimizationParameter)) - print methodParamDict[vcellOptParam.paramType] - fitMethod.removeParameter(methodParamDict[vcellOptParam.paramType]) - if (vcellOptParam.dataType == VCELLOPT.OptimizationParameterDataType.INT): - fitMethod.addParameter(methodParamDict[vcellOptParam.paramType], COPASI.CCopasiParameter.INT) - fitParameter = fitMethod.getParameter(methodParamDict[vcellOptParam.paramType]) - assert (isinstance(fitParameter, COPASI.CCopasiParameter)) - fitParameter.setIntValue(int(vcellOptParam.value)) - else: - fitMethod.addParameter(methodParamDict[vcellOptParam.paramType], COPASI.CCopasiParameter.DOUBLE) - fitParameter = fitMethod.getParameter(methodParamDict[vcellOptParam.paramType]) - assert (isinstance(fitParameter, COPASI.CCopasiParameter)) - fitParameter.setDblValue(vcellOptParam.value) - - # - # get FitProblem - # - fitProblem = fitTask.getProblem() - assert(isinstance(fitProblem, COPASI.COptProblem)) # works for all COPASI builds >= 140 - #assert(isinstance(fitProblem, COPASI.CFitProblem)) # not CFitProblem in COPASI build 140 - #fitProblem.setRandomizeStartValues(True) - - experimentSet = fitProblem.getParameter("Experiment Set") - assert(isinstance(experimentSet,COPASI.CExperimentSet)) - assert(experimentSet.getExperimentCount() == 0) - - # first experiment - experiment = COPASI.CExperiment(dataModel) - assert(isinstance(experiment,COPASI.CExperiment)) - experiment.setIsRowOriented(True) - - # Use the TemporaryFile context manager for easy clean-up - tmpExportCSVFile = tempfile.NamedTemporaryFile(delete=False) - varNameList = list(v.varName for v in vcellOptProblem.referenceVariableList) - csvString = ", ".join(map(str, varNameList)) + "\n" - for row in vcellOptProblem.experimentalDataSet.rows: - csvString += ", ".join(map(str, row.data)) + "\n" - num_lines = len(vcellOptProblem.experimentalDataSet.rows) + 1 - tmpExportCSVFile.write(csvString) - tmpExportCSVFile.close() - - experiment.setFileName(str(tmpExportCSVFile.name)) - experiment.setFirstRow(1) - experiment.setKeyValue("Experiment_1") - experiment.setLastRow(num_lines) - experiment.setHeaderRow(1) - experiment.setSeparator(",") - experiment.setExperimentType(COPASI.CTaskEnum.timeCourse) - experiment.setNormalizeWeightsPerExperiment(True) - vcellReferenceVariableList = vcellOptProblem.referenceVariableList - assert(isinstance(vcellReferenceVariableList, list)) - num_ref_variables = len(vcellReferenceVariableList) - experiment.setNumColumns(num_ref_variables) # one independent (time), all the other dependent - - # experiment object map - objectMap = experiment.getObjectMap() - assert (isinstance(objectMap, COPASI.CExperimentObjectMap)) - result = objectMap.setNumCols(num_ref_variables) - assert result == True - - # map time column to model time - ''' - - ''' - result = objectMap.setRole(0, COPASI.CExperiment.time) - assert (result==True) - assert objectMap.getRole(0) == COPASI.CExperiment.time - timeReference = model.getValueReference() - #timeReference = model.getObject(COPASI.CCopasiObjectName("Reference=Time")) - assert(timeReference!=None) - assert(isinstance(timeReference,COPASI.CCopasiObject)) - objectMap.setObjectCN(0,timeReference.getCN().getString()) - # getObjectCN returns a string whereas getCN returns a CCopasiObjectName - assert(objectMap.getObjectCN(0)==timeReference.getCN().getString()) - - # map rest of data columns as dependent variables - ''' - - - ''' - for refIndex in range(1,num_ref_variables): # skip first columnn (time) - refVar = vcellReferenceVariableList[refIndex] - assert(isinstance(refVar,VCELLOPT.ReferenceVariable)) - modelValue = getModelValue(model,str(refVar.varName)) - assert(isinstance(modelValue,COPASI.CModelValue)) - objectMap.setRole(refIndex, COPASI.CExperiment.dependent) - modelValueReference = modelValue.getObject(COPASI.CCopasiObjectName("Reference=Value")) - assert(isinstance(modelValueReference,COPASI.CCopasiObject)) - print "modelValue CN is "+str(modelValue.getCN())+", modelValueReference CN is "+str(modelValueReference.getCN()) - objectMap.setObjectCN(refIndex, modelValueReference.getCN().getString()) - - experimentSet.addExperiment(experiment) # addExperiment makes a copy - assert experimentSet.getExperimentCount() == 1 - experiment = experimentSet.getExperiment(0) # need to get the correct instance - assert(isinstance(experiment,COPASI.CExperiment)) - - #--------------------------------------------------------------------------------------- - # define CFitItems - #--------------------------------------------------------------------------------------- - ''' - - - - - ''' - assert(fitProblem.getOptItemSize()==0) - vcellParameterDescriptionList = vcellOptProblem.parameterDescriptionList - for vcellParam in vcellParameterDescriptionList: - assert(isinstance(vcellParam,VCELLOPT.ParameterDescription)) - paramModelValue = getModelValue(model,str(vcellParam.name)) - assert(isinstance(paramModelValue,COPASI.CModelValue)) - paramModelValueRef = paramModelValue.getInitialValueReference() - assert(isinstance(paramModelValueRef,COPASI.CCopasiObject)) - fitItem = COPASI.CFitItem(dataModel) - assert(isinstance(fitItem,COPASI.CFitItem)) - fitItem.setObjectCN(paramModelValueRef.getCN()) - fitItem.setStartValue(vcellParam.initialValue) - fitItem.setLowerBound(COPASI.CCopasiObjectName(str(vcellParam.minValue))) - fitItem.setUpperBound(COPASI.CCopasiObjectName(str(vcellParam.maxValue))) - # todo: what about scale? - # add the fit item to the correct parameter group - optimizationItemGroup = fitProblem.getParameter("OptimizationItemList") - assert(isinstance(optimizationItemGroup,COPASI.CCopasiParameterGroup)) - optimizationItemGroup.addParameter(fitItem) - # addParameter makes a copy of the fit item, so we have to get it back - #fitItem = optimizationItemGroup.getParameter(0) - #assert(isinstance(fitItem,COPASI.CFitItem)) - model.compileIfNecessary() - #print optimizationItemGroup.printToString() # debug anyway, not present in COPASI build 140 - - # -------------------------------------------------------------------------------------- - # Run the optimization (N times) - # -------------------------------------------------------------------------------------- - leastError = 1e8 - paramNames = [] - paramValues = [] - numObjFuncEvals = 0 - numParamsToFit = fitProblem.getOptItemSize() - - # Create intermediate results file - with open(interresults[0], 'a') as foutput: - foutput.write(str(vcellOptProblem.numberOfOptimizationRuns)+"\n") - foutput.close() - - for i in range(0, vcellOptProblem.numberOfOptimizationRuns): - result = True - try: - print ("This can take some time...") - initialize = (i==0) - result = fitTask.processWithOutputFlags(initialize, COPASI.CCopasiTask.NO_OUTPUT) # NO_OUTPUT - except: - print "Unexpected error:", sys.exc_info()[0] - return 1 - - if result == False: - sys.stderr.write("An error occured while running the Parameter estimation.\n") - # dataModel.saveModel('test_failed.cps', True) - sys.stderr.write("fitTask warning: '" + str(fitTask.getProcessWarning()) + "'") - sys.stderr.write("fitTask error: '" + str(fitTask.getProcessError()) + "'") - # check if there are additional error messages - if COPASI.CCopasiMessage.size() > 0: - # print the messages in chronological order - sys.stderr.write(COPASI.CCopasiMessage.getAllMessageText(True)) - return 1 - - currentFuncValue = fitProblem.getSolutionValue() - print "currFuncValue = " + str(currentFuncValue) - if (currentFuncValue < leastError) or (i == 0): # current run has the smallest error so far - bestObjectiveFunction = currentFuncValue - numObjFuncEvals = fitProblem.getFunctionEvaluations() - - paramNames = [] - paramValues = [] - for j in range(0, numParamsToFit): - optItem = fitProblem.getOptItemList()[j] - paramName = optItem.getObject().getCN().getRemainder().getRemainder().getElementName(0) - paramNames.append(paramName) - paramValue = fitProblem.getSolutionVariables().get(j) - paramValues.append(paramValue) - print "param " + paramName + " --> " + str(paramValue) - assert isinstance(currentFuncValue, float) - leastError = currentFuncValue - - with open(interresults[0], 'a') as foutput: - foutput.write(str(i)+" "+str(leastError)+" "+str(numObjFuncEvals)+"\n") - foutput.close() - - #result = dataModel.saveModel('test_succeeded.cps', True) - #assert(result==True) - - optRun = VCELLOPT.OptRun() - optRun.optProblem = vcellOptProblem - optRun.statusMessage = "complete" - optRun.status = VCELLOPT.OptRunStatus.Complete - optResultSet = VCELLOPT.OptResultSet() - optResultSet.numFunctionEvaluations = numObjFuncEvals - optResultSet.objectiveFunction = leastError - optResultSet.optParameterValues = [] - paramValueDict = dict(zip(paramNames,paramValues)) - for paramName in paramNames: - optParameterValue = VCELLOPT.OptParameterValue(paramName,paramValueDict[paramName]) - optResultSet.optParameterValues.append(optParameterValue) - optRun.optResultSet = optResultSet - - protocol_factory = TBinaryProtocol.TBinaryProtocolFactory - optRunBlob = serialize(vcellOptProblem, protocol_factory = protocol_factory()) - transportOut = TTransport.TMemoryBuffer() - protocolOut = TBinaryProtocol.TBinaryProtocol(transportOut) - optRun.write(protocolOut) - with open(resultFile, 'wb') as foutput: - foutput.write(transportOut.getvalue()) - foutput.close() - - with open(interresults[0], 'a') as foutput: - foutput.write("done") - foutput.close() - - # writeOptSolverResultSet(resultFile, leastError, numObjFuncEvals, paramNames, paramValues) - - except: - e_info = sys.exc_info() - traceback.print_exception(e_info[0],e_info[1],e_info[2],file=sys.stdout) - sys.stderr.write("exception: "+str(e_info[0])+": "+str(e_info[1])+"\n") - sys.stderr.flush() - if interresults[0] != None: - with open(interresults[0], 'a') as foutput: - foutput.write("exception: "+str(e_info[0])+": "+str(e_info[1])) - foutput.close() - - return -1 - else: - return 0 - finally: - os.unlink(tmpExportCSVFile.name) - - -def writeOptSolverResultSet(resultFile, leastError, numObjFuncEvals, paramNames, paramValues): - import xml.etree.cElementTree as ET - - numParamsToFit = len(paramNames) - root = ET.Element("optSolverResultSet") - for paramName in paramNames: - ET.SubElement(root, "parameter", name=paramName) - - doc = ET.SubElement(root, "bestOptRunResultSet", bestObjectiveFunction=str(leastError), - numObjectiveFunctionEvaluations=str(numObjFuncEvals), status="unknown") - - for j in range(0, numParamsToFit): - paramName = paramNames[j] - paramValue = paramValues[j] - text = "parameter name=\"" + paramName + "\" bestValue=\"" + str(paramValue) + "\"" - ET.SubElement(doc, text) - - tree = ET.ElementTree(root) - tree.write(resultFile) - - -def getModelValue(model, objectName): - modelValues = model.getModelValues() - assert (isinstance(modelValues, COPASI.ModelValueVectorN)) - return modelValues.getByName(objectName) - - -def printModel(model): - # - # print all of the model metabolites - # - metabs = model.getMetabolites() - assert (isinstance(metabs, COPASI.MetabVector)) - print "Metabolites size = " + str(metabs.size()) - for index in range(0, metabs.size()): - metab = metabs.get(index) - assert (isinstance(metab, COPASI.CMetab)) - print "metabolite [{0}]: objectName = {1}, commonName = {2}, displayName = {3}".format( - str(index), str(metab.getObjectName()), str(metab.getCN()), str(metab.getObjectDisplayName())) - - # - # print all of the model values - # - modelValues = model.getModelValues() - assert (isinstance(modelValues, COPASI.ModelValueVectorN)) - print "ModelValues size = " + str(modelValues.size()) - for index in range(0, modelValues.size()): - modelValue = modelValues.get(index) - assert (isinstance(modelValue, COPASI.CModelValue)) - print "modelValue [{0}]: objectName = {1}, commonName = {2}, displayName = {3}".format( - str(index), str(modelValue.getObjectName()), str(modelValue.getCN()), - str(modelValue.getObjectDisplayName())) - - # - # print all of the model compartments - # - compartments = model.getCompartments() - assert (isinstance(compartments, COPASI.CompartmentVectorNS)) - print "Compartments size = " + str(compartments.size()) - for index in range(0, compartments.size()): - compartment = compartments.get(index) - assert (isinstance(compartment, COPASI.CCompartment)) - print "compartment [{0}]: objectName = {1}, commonName = {2}, displayName = {3}".format( - str(index), str(compartment.getObjectName()), str(compartment.getCN()), - str(compartment.getObjectDisplayName())) - - -if __name__ == '__main__': - main() diff --git a/pythonScripts/VCell_Opt/optprob.bin b/pythonScripts/VCell_Opt/optprob.bin deleted file mode 100644 index b9d1222580391a64deef22ea896ff92612c56f44..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10797 zcmd^Fe{37o9ls_nq$Q9|P{ER>G6oSLQQPM`|2SlygGvIeNs2;Qf&Fp1I+t+beD>^f zLqQvCn!1T?R0ttjDhdK5MA0Y=Z7|wR45n^qL!AWwRNV@wf+8eV5CSn(z`pO@dv_P# zyZB7qMD6@XV!!)-Kkxhfe1E*}oqZm+jN`7@kT2d@F``?wdPA?8g%LiU9EoaXxjLsCcGtp-v=uYB2E#1Nj(v4ky^PXy@`;2YICY-Rxw4lHbBFGb5$6LDY_ zVphGW#qcJ|xB_mdMpG-qq>PwL(yhRtwwh+8YIxM+pg*=Y9Uh^iTz7rR1>nclO5v3! zmD;@RGx20J|T8Q%^pO#XYw2;n8SxE>FGv%V>1YQiUxXD!%lHqw@rDejtc|#v)}^|$M@Jq_spcut3katgAq-(Q%l;t8Av&Tc348{!RFFg|oy>;jq>-`# zp=z{p)6g19v!b9TW>lxkOTl1f#RU_SnRpfq%19|Omrdo`Wt^KrHdM3hU;#!pp5z7KKATMe zW@zRyRL!+Y%nCVZmdQ*q320(Ad<-F0aIQf~kf4Qcci)F9S7$ZFLr(aJQ)Q12?UX&G zyFr;Tns;`jQ13vxq|mChs+MZBiHgTAtY{Z&$C^+~o$8DO2|z!t9CDrq9I{>;sTTBu z@SYJuI#R$ygx6@at0a#TH^X5yu9mH89gZyMI)dW%AXA%F+GVi^szWPjE2VzX0jhOQ zBIDC~FjQBKYZ?uG)|@|`p#yi`B|JW@zgFReShTUNvZZPiVzza3^n&PCU<_mom~#Ri zFL_DICD5dZ|4iHvlkHJ38YMHKJs0Y7)Xq|J=tuL3vhLX=fp&2}W2J=8UMi6HU2!~t z*_L|Z5J%Oz=nTcC=i90HLj$_LH9TYhCV`zo=N)w=uR8HX>yG=VtJZaOivhE+J#J8q zE;+B(YQ{Df69>xDD_X;82X_4PWmAswh!(R&nt=eeP3v3rX{`kW)`MWkrA#u#+9ToH zB;UG}XQteITB+p$Y~#U$vQ1A2sn}S=v(SSPl5Bx z&BxZU@JvZfe6tY9E=f@DO)4V{K5`c!PmyH{+D_7Pp-~2z31a^4#a#5sbs>e)z7(?U zwTJz)Du>zy!bdNT4YM5ubT51$E|?QoVlfQ~JVu?)?|JYNuCjbQbs-Hi^V86|+gyYM zWF16qAZryCDTutbH+eyd?B`NG>C-`Tb{@_2RvSIqT5_UICeiHb`!@6c!rj_OHlqP| zA4N9+811b~mj>WbiQaOtj{;n)nY7dxSrxC@D^SXuDAGyUFh{lgo}(`PFI&x0gh_bL2Go!C>8*% z(Oao#Wc2l4kk#c>fE(ZkkzuzF~VKzgvB0=;5FKT7Eb4%I>!k17MMjP&`ZoKHs@!&9jfm@_XYSKDglr z2V8;A1oRS%1E22UAGq>K`RyH>p7`p`epleXHbU{j+YbLd`^B7mDE{@j^B?`x5f~)~ z7FQkZ+k5P(Rq|ht-1p?Y*SzQo^pY(u-v8>sOZIM-U#o9A`LDy5x&r6Spx12iduw)2 z^1oamA2@b*>f?L%y8cWf(*LwDc*lj0|{@^gC%^1dHE;|hG2Y%z3v@6qA~m&?!mO**;q-y2d}jdo2y^gcj(Y{`{c)8+poO*^NNcwNZed~?5YAc zd9D2Dka6O!JHB!ShKUWUzy9%N;q#x#k39Rv2hVT*(iMmjgyHiaJb2{3OXXcR-GA;s zU%c8Ch!G=)R~_H`pFb(`&WE<2_~ut0CNCpf3=iJ>o8*ZD^3JRF9Nl%L;v$fuC=L%@ z|NhDM*2+5v58m_TZNKBVe(sz;TvH(1gVHoYKB7|5?S1=5&e~Uc&=rw&rPouG^K~L{ M#n#|BdWGZu2UuLz3IG5A diff --git a/pythonScripts/VCell_Opt/vcellopt/constants.py b/pythonScripts/VCell_Opt/vcellopt/constants.py deleted file mode 100644 index eb0d35aa12..0000000000 --- a/pythonScripts/VCell_Opt/vcellopt/constants.py +++ /dev/null @@ -1,12 +0,0 @@ -# -# Autogenerated by Thrift Compiler (0.10.0) -# -# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -# -# options string: py -# - -from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException -from thrift.protocol.TProtocol import TProtocolException -import sys -from .ttypes import * diff --git a/pythonScripts/VCell_Opt/vcellopt/ttypes.py b/pythonScripts/VCell_Opt/vcellopt/ttypes.py deleted file mode 100644 index 7d212d4ec9..0000000000 --- a/pythonScripts/VCell_Opt/vcellopt/ttypes.py +++ /dev/null @@ -1,1105 +0,0 @@ -# -# Autogenerated by Thrift Compiler (0.10.0) -# -# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -# -# options string: py -# - -from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException -from thrift.protocol.TProtocol import TProtocolException -import sys - -from thrift.transport import TTransport - - -class ReferenceVariableType(object): - independent = 0 - dependent = 1 - - _VALUES_TO_NAMES = { - 0: "independent", - 1: "dependent", - } - - _NAMES_TO_VALUES = { - "independent": 0, - "dependent": 1, - } - - -class OptimizationParameterType(object): - Number_of_Generations = 0 - Number_of_Iterations = 1 - Population_Size = 2 - Random_Number_Generator = 3 - Seed = 4 - IterationLimit = 5 - Tolerance = 6 - Rho = 7 - Scale = 8 - Swarm_Size = 9 - Std_Deviation = 10 - Start_Temperature = 11 - Cooling_Factor = 12 - Pf = 13 - - _VALUES_TO_NAMES = { - 0: "Number_of_Generations", - 1: "Number_of_Iterations", - 2: "Population_Size", - 3: "Random_Number_Generator", - 4: "Seed", - 5: "IterationLimit", - 6: "Tolerance", - 7: "Rho", - 8: "Scale", - 9: "Swarm_Size", - 10: "Std_Deviation", - 11: "Start_Temperature", - 12: "Cooling_Factor", - 13: "Pf", - } - - _NAMES_TO_VALUES = { - "Number_of_Generations": 0, - "Number_of_Iterations": 1, - "Population_Size": 2, - "Random_Number_Generator": 3, - "Seed": 4, - "IterationLimit": 5, - "Tolerance": 6, - "Rho": 7, - "Scale": 8, - "Swarm_Size": 9, - "Std_Deviation": 10, - "Start_Temperature": 11, - "Cooling_Factor": 12, - "Pf": 13, - } - - -class OptimizationParameterDataType(object): - INT = 0 - DOUBLE = 1 - - _VALUES_TO_NAMES = { - 0: "INT", - 1: "DOUBLE", - } - - _NAMES_TO_VALUES = { - "INT": 0, - "DOUBLE": 1, - } - - -class OptimizationMethodType(object): - EvolutionaryProgram = 0 - SRES = 1 - GeneticAlgorithm = 2 - GeneticAlgorithmSR = 3 - HookeJeeves = 4 - LevenbergMarquardt = 5 - NelderMead = 6 - ParticleSwarm = 7 - RandomSearch = 8 - SimulatedAnnealing = 9 - SteepestDescent = 10 - Praxis = 11 - TruncatedNewton = 12 - - _VALUES_TO_NAMES = { - 0: "EvolutionaryProgram", - 1: "SRES", - 2: "GeneticAlgorithm", - 3: "GeneticAlgorithmSR", - 4: "HookeJeeves", - 5: "LevenbergMarquardt", - 6: "NelderMead", - 7: "ParticleSwarm", - 8: "RandomSearch", - 9: "SimulatedAnnealing", - 10: "SteepestDescent", - 11: "Praxis", - 12: "TruncatedNewton", - } - - _NAMES_TO_VALUES = { - "EvolutionaryProgram": 0, - "SRES": 1, - "GeneticAlgorithm": 2, - "GeneticAlgorithmSR": 3, - "HookeJeeves": 4, - "LevenbergMarquardt": 5, - "NelderMead": 6, - "ParticleSwarm": 7, - "RandomSearch": 8, - "SimulatedAnnealing": 9, - "SteepestDescent": 10, - "Praxis": 11, - "TruncatedNewton": 12, - } - - -class OptRunStatus(object): - Queued = 0 - Running = 1 - Complete = 2 - Failed = 3 - - _VALUES_TO_NAMES = { - 0: "Queued", - 1: "Running", - 2: "Complete", - 3: "Failed", - } - - _NAMES_TO_VALUES = { - "Queued": 0, - "Running": 1, - "Complete": 2, - "Failed": 3, - } - - -class ParameterDescription(object): - """ - Attributes: - - name - - scale - - minValue - - maxValue - - initialValue - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'name', 'UTF8', None, ), # 1 - (2, TType.DOUBLE, 'scale', None, None, ), # 2 - (3, TType.DOUBLE, 'minValue', None, None, ), # 3 - (4, TType.DOUBLE, 'maxValue', None, None, ), # 4 - (5, TType.DOUBLE, 'initialValue', None, None, ), # 5 - ) - - def __init__(self, name=None, scale=None, minValue=None, maxValue=None, initialValue=None,): - self.name = name - self.scale = scale - self.minValue = minValue - self.maxValue = maxValue - self.initialValue = initialValue - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.DOUBLE: - self.scale = iprot.readDouble() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.DOUBLE: - self.minValue = iprot.readDouble() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.DOUBLE: - self.maxValue = iprot.readDouble() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.DOUBLE: - self.initialValue = iprot.readDouble() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('ParameterDescription') - if self.name is not None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) - oprot.writeFieldEnd() - if self.scale is not None: - oprot.writeFieldBegin('scale', TType.DOUBLE, 2) - oprot.writeDouble(self.scale) - oprot.writeFieldEnd() - if self.minValue is not None: - oprot.writeFieldBegin('minValue', TType.DOUBLE, 3) - oprot.writeDouble(self.minValue) - oprot.writeFieldEnd() - if self.maxValue is not None: - oprot.writeFieldBegin('maxValue', TType.DOUBLE, 4) - oprot.writeDouble(self.maxValue) - oprot.writeFieldEnd() - if self.initialValue is not None: - oprot.writeFieldBegin('initialValue', TType.DOUBLE, 5) - oprot.writeDouble(self.initialValue) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.name is None: - raise TProtocolException(message='Required field name is unset!') - if self.scale is None: - raise TProtocolException(message='Required field scale is unset!') - if self.minValue is None: - raise TProtocolException(message='Required field minValue is unset!') - if self.maxValue is None: - raise TProtocolException(message='Required field maxValue is unset!') - if self.initialValue is None: - raise TProtocolException(message='Required field initialValue is unset!') - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class ReferenceVariable(object): - """ - Attributes: - - varName - - varType - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'varName', 'UTF8', None, ), # 1 - (2, TType.I32, 'varType', None, None, ), # 2 - ) - - def __init__(self, varName=None, varType=None,): - self.varName = varName - self.varType = varType - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.varName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.I32: - self.varType = iprot.readI32() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('ReferenceVariable') - if self.varName is not None: - oprot.writeFieldBegin('varName', TType.STRING, 1) - oprot.writeString(self.varName.encode('utf-8') if sys.version_info[0] == 2 else self.varName) - oprot.writeFieldEnd() - if self.varType is not None: - oprot.writeFieldBegin('varType', TType.I32, 2) - oprot.writeI32(self.varType) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.varName is None: - raise TProtocolException(message='Required field varName is unset!') - if self.varType is None: - raise TProtocolException(message='Required field varType is unset!') - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class CopasiOptimizationParameter(object): - """ - Attributes: - - paramType - - value - - dataType - """ - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'paramType', None, None, ), # 1 - (2, TType.DOUBLE, 'value', None, None, ), # 2 - (3, TType.I32, 'dataType', None, None, ), # 3 - ) - - def __init__(self, paramType=None, value=None, dataType=None,): - self.paramType = paramType - self.value = value - self.dataType = dataType - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I32: - self.paramType = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.DOUBLE: - self.value = iprot.readDouble() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I32: - self.dataType = iprot.readI32() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('CopasiOptimizationParameter') - if self.paramType is not None: - oprot.writeFieldBegin('paramType', TType.I32, 1) - oprot.writeI32(self.paramType) - oprot.writeFieldEnd() - if self.value is not None: - oprot.writeFieldBegin('value', TType.DOUBLE, 2) - oprot.writeDouble(self.value) - oprot.writeFieldEnd() - if self.dataType is not None: - oprot.writeFieldBegin('dataType', TType.I32, 3) - oprot.writeI32(self.dataType) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.paramType is None: - raise TProtocolException(message='Required field paramType is unset!') - if self.value is None: - raise TProtocolException(message='Required field value is unset!') - if self.dataType is None: - raise TProtocolException(message='Required field dataType is unset!') - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class CopasiOptimizationMethod(object): - """ - Attributes: - - optimizationMethodType - - optimizationParameterList - """ - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'optimizationMethodType', None, None, ), # 1 - (2, TType.LIST, 'optimizationParameterList', (TType.STRUCT, (CopasiOptimizationParameter, CopasiOptimizationParameter.thrift_spec), False), None, ), # 2 - ) - - def __init__(self, optimizationMethodType=None, optimizationParameterList=None,): - self.optimizationMethodType = optimizationMethodType - self.optimizationParameterList = optimizationParameterList - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I32: - self.optimizationMethodType = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.LIST: - self.optimizationParameterList = [] - (_etype3, _size0) = iprot.readListBegin() - for _i4 in range(_size0): - _elem5 = CopasiOptimizationParameter() - _elem5.read(iprot) - self.optimizationParameterList.append(_elem5) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('CopasiOptimizationMethod') - if self.optimizationMethodType is not None: - oprot.writeFieldBegin('optimizationMethodType', TType.I32, 1) - oprot.writeI32(self.optimizationMethodType) - oprot.writeFieldEnd() - if self.optimizationParameterList is not None: - oprot.writeFieldBegin('optimizationParameterList', TType.LIST, 2) - oprot.writeListBegin(TType.STRUCT, len(self.optimizationParameterList)) - for iter6 in self.optimizationParameterList: - iter6.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.optimizationMethodType is None: - raise TProtocolException(message='Required field optimizationMethodType is unset!') - if self.optimizationParameterList is None: - raise TProtocolException(message='Required field optimizationParameterList is unset!') - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class DataRow(object): - """ - Attributes: - - data - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'data', (TType.DOUBLE, None, False), None, ), # 1 - ) - - def __init__(self, data=None,): - self.data = data - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.data = [] - (_etype10, _size7) = iprot.readListBegin() - for _i11 in range(_size7): - _elem12 = iprot.readDouble() - self.data.append(_elem12) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('DataRow') - if self.data is not None: - oprot.writeFieldBegin('data', TType.LIST, 1) - oprot.writeListBegin(TType.DOUBLE, len(self.data)) - for iter13 in self.data: - oprot.writeDouble(iter13) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.data is None: - raise TProtocolException(message='Required field data is unset!') - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class DataSet(object): - """ - Attributes: - - rows - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'rows', (TType.STRUCT, (DataRow, DataRow.thrift_spec), False), None, ), # 1 - ) - - def __init__(self, rows=None,): - self.rows = rows - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.rows = [] - (_etype17, _size14) = iprot.readListBegin() - for _i18 in range(_size14): - _elem19 = DataRow() - _elem19.read(iprot) - self.rows.append(_elem19) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('DataSet') - if self.rows is not None: - oprot.writeFieldBegin('rows', TType.LIST, 1) - oprot.writeListBegin(TType.STRUCT, len(self.rows)) - for iter20 in self.rows: - iter20.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.rows is None: - raise TProtocolException(message='Required field rows is unset!') - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class OptProblem(object): - """ - Attributes: - - mathModelSbmlContents - - numberOfOptimizationRuns - - parameterDescriptionList - - referenceVariableList - - experimentalDataSet - - optimizationMethod - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'mathModelSbmlContents', 'UTF8', None, ), # 1 - (2, TType.I32, 'numberOfOptimizationRuns', None, None, ), # 2 - (3, TType.LIST, 'parameterDescriptionList', (TType.STRUCT, (ParameterDescription, ParameterDescription.thrift_spec), False), None, ), # 3 - (4, TType.LIST, 'referenceVariableList', (TType.STRUCT, (ReferenceVariable, ReferenceVariable.thrift_spec), False), None, ), # 4 - (5, TType.STRUCT, 'experimentalDataSet', (DataSet, DataSet.thrift_spec), None, ), # 5 - (6, TType.STRUCT, 'optimizationMethod', (CopasiOptimizationMethod, CopasiOptimizationMethod.thrift_spec), None, ), # 6 - ) - - def __init__(self, mathModelSbmlContents=None, numberOfOptimizationRuns=None, parameterDescriptionList=None, referenceVariableList=None, experimentalDataSet=None, optimizationMethod=None,): - self.mathModelSbmlContents = mathModelSbmlContents - self.numberOfOptimizationRuns = numberOfOptimizationRuns - self.parameterDescriptionList = parameterDescriptionList - self.referenceVariableList = referenceVariableList - self.experimentalDataSet = experimentalDataSet - self.optimizationMethod = optimizationMethod - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.mathModelSbmlContents = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.I32: - self.numberOfOptimizationRuns = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.parameterDescriptionList = [] - (_etype24, _size21) = iprot.readListBegin() - for _i25 in range(_size21): - _elem26 = ParameterDescription() - _elem26.read(iprot) - self.parameterDescriptionList.append(_elem26) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.LIST: - self.referenceVariableList = [] - (_etype30, _size27) = iprot.readListBegin() - for _i31 in range(_size27): - _elem32 = ReferenceVariable() - _elem32.read(iprot) - self.referenceVariableList.append(_elem32) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRUCT: - self.experimentalDataSet = DataSet() - self.experimentalDataSet.read(iprot) - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.STRUCT: - self.optimizationMethod = CopasiOptimizationMethod() - self.optimizationMethod.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('OptProblem') - if self.mathModelSbmlContents is not None: - oprot.writeFieldBegin('mathModelSbmlContents', TType.STRING, 1) - oprot.writeString(self.mathModelSbmlContents.encode('utf-8') if sys.version_info[0] == 2 else self.mathModelSbmlContents) - oprot.writeFieldEnd() - if self.numberOfOptimizationRuns is not None: - oprot.writeFieldBegin('numberOfOptimizationRuns', TType.I32, 2) - oprot.writeI32(self.numberOfOptimizationRuns) - oprot.writeFieldEnd() - if self.parameterDescriptionList is not None: - oprot.writeFieldBegin('parameterDescriptionList', TType.LIST, 3) - oprot.writeListBegin(TType.STRUCT, len(self.parameterDescriptionList)) - for iter33 in self.parameterDescriptionList: - iter33.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.referenceVariableList is not None: - oprot.writeFieldBegin('referenceVariableList', TType.LIST, 4) - oprot.writeListBegin(TType.STRUCT, len(self.referenceVariableList)) - for iter34 in self.referenceVariableList: - iter34.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.experimentalDataSet is not None: - oprot.writeFieldBegin('experimentalDataSet', TType.STRUCT, 5) - self.experimentalDataSet.write(oprot) - oprot.writeFieldEnd() - if self.optimizationMethod is not None: - oprot.writeFieldBegin('optimizationMethod', TType.STRUCT, 6) - self.optimizationMethod.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.mathModelSbmlContents is None: - raise TProtocolException(message='Required field mathModelSbmlContents is unset!') - if self.numberOfOptimizationRuns is None: - raise TProtocolException(message='Required field numberOfOptimizationRuns is unset!') - if self.parameterDescriptionList is None: - raise TProtocolException(message='Required field parameterDescriptionList is unset!') - if self.referenceVariableList is None: - raise TProtocolException(message='Required field referenceVariableList is unset!') - if self.experimentalDataSet is None: - raise TProtocolException(message='Required field experimentalDataSet is unset!') - if self.optimizationMethod is None: - raise TProtocolException(message='Required field optimizationMethod is unset!') - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class OptParameterValue(object): - """ - Attributes: - - parameterName - - bestValue - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'parameterName', 'UTF8', None, ), # 1 - (2, TType.DOUBLE, 'bestValue', None, None, ), # 2 - ) - - def __init__(self, parameterName=None, bestValue=None,): - self.parameterName = parameterName - self.bestValue = bestValue - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.parameterName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.DOUBLE: - self.bestValue = iprot.readDouble() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('OptParameterValue') - if self.parameterName is not None: - oprot.writeFieldBegin('parameterName', TType.STRING, 1) - oprot.writeString(self.parameterName.encode('utf-8') if sys.version_info[0] == 2 else self.parameterName) - oprot.writeFieldEnd() - if self.bestValue is not None: - oprot.writeFieldBegin('bestValue', TType.DOUBLE, 2) - oprot.writeDouble(self.bestValue) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.parameterName is None: - raise TProtocolException(message='Required field parameterName is unset!') - if self.bestValue is None: - raise TProtocolException(message='Required field bestValue is unset!') - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class OptResultSet(object): - """ - Attributes: - - objectiveFunction - - numFunctionEvaluations - - optParameterValues - """ - - thrift_spec = ( - None, # 0 - (1, TType.DOUBLE, 'objectiveFunction', None, None, ), # 1 - (2, TType.I64, 'numFunctionEvaluations', None, None, ), # 2 - None, # 3 - (4, TType.LIST, 'optParameterValues', (TType.STRUCT, (OptParameterValue, OptParameterValue.thrift_spec), False), None, ), # 4 - ) - - def __init__(self, objectiveFunction=None, numFunctionEvaluations=None, optParameterValues=None,): - self.objectiveFunction = objectiveFunction - self.numFunctionEvaluations = numFunctionEvaluations - self.optParameterValues = optParameterValues - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.DOUBLE: - self.objectiveFunction = iprot.readDouble() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.I64: - self.numFunctionEvaluations = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.LIST: - self.optParameterValues = [] - (_etype38, _size35) = iprot.readListBegin() - for _i39 in range(_size35): - _elem40 = OptParameterValue() - _elem40.read(iprot) - self.optParameterValues.append(_elem40) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('OptResultSet') - if self.objectiveFunction is not None: - oprot.writeFieldBegin('objectiveFunction', TType.DOUBLE, 1) - oprot.writeDouble(self.objectiveFunction) - oprot.writeFieldEnd() - if self.numFunctionEvaluations is not None: - oprot.writeFieldBegin('numFunctionEvaluations', TType.I64, 2) - oprot.writeI64(self.numFunctionEvaluations) - oprot.writeFieldEnd() - if self.optParameterValues is not None: - oprot.writeFieldBegin('optParameterValues', TType.LIST, 4) - oprot.writeListBegin(TType.STRUCT, len(self.optParameterValues)) - for iter41 in self.optParameterValues: - iter41.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.objectiveFunction is None: - raise TProtocolException(message='Required field objectiveFunction is unset!') - if self.numFunctionEvaluations is None: - raise TProtocolException(message='Required field numFunctionEvaluations is unset!') - if self.optParameterValues is None: - raise TProtocolException(message='Required field optParameterValues is unset!') - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class OptRun(object): - """ - Attributes: - - optProblem - - optResultSet - - statusMessage - - status - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'optProblem', (OptProblem, OptProblem.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'optResultSet', (OptResultSet, OptResultSet.thrift_spec), None, ), # 2 - (3, TType.STRING, 'statusMessage', 'UTF8', None, ), # 3 - (4, TType.I32, 'status', None, None, ), # 4 - ) - - def __init__(self, optProblem=None, optResultSet=None, statusMessage=None, status=None,): - self.optProblem = optProblem - self.optResultSet = optResultSet - self.statusMessage = statusMessage - self.status = status - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.optProblem = OptProblem() - self.optProblem.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.optResultSet = OptResultSet() - self.optResultSet.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.statusMessage = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I32: - self.status = iprot.readI32() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('OptRun') - if self.optProblem is not None: - oprot.writeFieldBegin('optProblem', TType.STRUCT, 1) - self.optProblem.write(oprot) - oprot.writeFieldEnd() - if self.optResultSet is not None: - oprot.writeFieldBegin('optResultSet', TType.STRUCT, 2) - self.optResultSet.write(oprot) - oprot.writeFieldEnd() - if self.statusMessage is not None: - oprot.writeFieldBegin('statusMessage', TType.STRING, 3) - oprot.writeString(self.statusMessage.encode('utf-8') if sys.version_info[0] == 2 else self.statusMessage) - oprot.writeFieldEnd() - if self.status is not None: - oprot.writeFieldBegin('status', TType.I32, 4) - oprot.writeI32(self.status) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.optProblem is None: - raise TProtocolException(message='Required field optProblem is unset!') - if self.statusMessage is None: - raise TProtocolException(message='Required field statusMessage is unset!') - if self.status is None: - raise TProtocolException(message='Required field status is unset!') - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) diff --git a/pythonScripts/VCell_VTK/__init__.py b/pythonScripts/VCell_VTK/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/pythonScripts/VCell_VTK/makeLittleVtk.py b/pythonScripts/VCell_VTK/makeLittleVtk.py deleted file mode 100644 index 48f4f78686..0000000000 --- a/pythonScripts/VCell_VTK/makeLittleVtk.py +++ /dev/null @@ -1,30 +0,0 @@ -import vtk -import vtkService - -x = [1,2,3,4] -y = [1,2,3,4] -ugrid = vtk.vtkUnstructuredGrid() -points = vtk.vtkPoints() -points.SetDataTypeToDouble() -xyToNode = [[] for i in range(len(x))] -index = 0 -for i, xCoord in enumerate(x): - for yCoord in y: - points.InsertNextPoint(xCoord, yCoord, 0.0) - xyToNode[i].append(index) - index += 1 -ugrid.SetPoints(points) - -# Add the volume elements -for i, xCoord in enumerate(x[:-1]): - for j, yCoord in enumerate(y[:-1]): - idList = vtk.vtkIdList() - idList.InsertNextId(xyToNode[i][j]) - idList.InsertNextId(xyToNode[i + 1][j]) - idList.InsertNextId(xyToNode[i + 1][j + 1]) - idList.InsertNextId(xyToNode[i][j + 1]) - ugrid.InsertNextCell(vtk.VTK_QUAD, idList) - -vtkService.writevtk(ugrid,"abc.vtu") -vtkService.writeDataArrayToNewVtkFile("abc.vtu","var",[1.,2.,3.,4.,5.,6.,7.,8.,9.],"abc_var.vtu") - diff --git a/pythonScripts/VCell_VTK/pyvcell/VCellProxy-remote b/pythonScripts/VCell_VTK/pyvcell/VCellProxy-remote deleted file mode 100755 index d0d7c4bfe6..0000000000 --- a/pythonScripts/VCell_VTK/pyvcell/VCellProxy-remote +++ /dev/null @@ -1,152 +0,0 @@ -#!/usr/bin/env python -# -# Autogenerated by Thrift Compiler (0.10.0) -# -# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -# -# options string: py -# - -import sys -import pprint -if sys.version_info[0] > 2: - from urllib.parse import urlparse -else: - from urlparse import urlparse -from thrift.transport import TTransport, TSocket, TSSLSocket, THttpClient -from thrift.protocol.TBinaryProtocol import TBinaryProtocol - -from pyvcell import VCellProxy -from pyvcell.ttypes import * - -if len(sys.argv) <= 1 or sys.argv[1] == '--help': - print('') - print('Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] [-s[sl]] [-novalidate] [-ca_certs certs] [-keyfile keyfile] [-certfile certfile] function [arg1 [arg2...]]') - print('') - print('Functions:') - print(' FilePath getDataSetFileOfVariableAtTimeIndex(SimulationDataSetRef simulationDataSetRef, VariableInfo varInfo, TimeIndex timeIndex)') - print(' SimulationDataSetRefList getSimsFromOpenModels()') - print(' TimePoints getTimePoints(SimulationDataSetRef simulationDataSetRef)') - print(' VariableList getVariableList(SimulationDataSetRef simulationDataSetRef)') - print(' PostProcessingData getPostProcessingData(SimulationDataSetRef simulationDataSetRef)') - print(' void displayPostProcessingDataInVCell(SimulationDataSetRef simulationDataSetRef)') - print('') - sys.exit(0) - -pp = pprint.PrettyPrinter(indent=2) -host = 'localhost' -port = 9090 -uri = '' -framed = False -ssl = False -validate = True -ca_certs = None -keyfile = None -certfile = None -http = False -argi = 1 - -if sys.argv[argi] == '-h': - parts = sys.argv[argi + 1].split(':') - host = parts[0] - if len(parts) > 1: - port = int(parts[1]) - argi += 2 - -if sys.argv[argi] == '-u': - url = urlparse(sys.argv[argi + 1]) - parts = url[1].split(':') - host = parts[0] - if len(parts) > 1: - port = int(parts[1]) - else: - port = 80 - uri = url[2] - if url[4]: - uri += '?%s' % url[4] - http = True - argi += 2 - -if sys.argv[argi] == '-f' or sys.argv[argi] == '-framed': - framed = True - argi += 1 - -if sys.argv[argi] == '-s' or sys.argv[argi] == '-ssl': - ssl = True - argi += 1 - -if sys.argv[argi] == '-novalidate': - validate = False - argi += 1 - -if sys.argv[argi] == '-ca_certs': - ca_certs = sys.argv[argi+1] - argi += 2 - -if sys.argv[argi] == '-keyfile': - keyfile = sys.argv[argi+1] - argi += 2 - -if sys.argv[argi] == '-certfile': - certfile = sys.argv[argi+1] - argi += 2 - -cmd = sys.argv[argi] -args = sys.argv[argi + 1:] - -if http: - transport = THttpClient.THttpClient(host, port, uri) -else: - if ssl: - socket = TSSLSocket.TSSLSocket(host, port, validate=validate, ca_certs=ca_certs, keyfile=keyfile, certfile=certfile) - else: - socket = TSocket.TSocket(host, port) - if framed: - transport = TTransport.TFramedTransport(socket) - else: - transport = TTransport.TBufferedTransport(socket) -protocol = TBinaryProtocol(transport) -client = VCellProxy.Client(protocol) -transport.open() - -if cmd == 'getDataSetFileOfVariableAtTimeIndex': - if len(args) != 3: - print('getDataSetFileOfVariableAtTimeIndex requires 3 args') - sys.exit(1) - pp.pprint(client.getDataSetFileOfVariableAtTimeIndex(eval(args[0]), eval(args[1]), eval(args[2]),)) - -elif cmd == 'getSimsFromOpenModels': - if len(args) != 0: - print('getSimsFromOpenModels requires 0 args') - sys.exit(1) - pp.pprint(client.getSimsFromOpenModels()) - -elif cmd == 'getTimePoints': - if len(args) != 1: - print('getTimePoints requires 1 args') - sys.exit(1) - pp.pprint(client.getTimePoints(eval(args[0]),)) - -elif cmd == 'getVariableList': - if len(args) != 1: - print('getVariableList requires 1 args') - sys.exit(1) - pp.pprint(client.getVariableList(eval(args[0]),)) - -elif cmd == 'getPostProcessingData': - if len(args) != 1: - print('getPostProcessingData requires 1 args') - sys.exit(1) - pp.pprint(client.getPostProcessingData(eval(args[0]),)) - -elif cmd == 'displayPostProcessingDataInVCell': - if len(args) != 1: - print('displayPostProcessingDataInVCell requires 1 args') - sys.exit(1) - pp.pprint(client.displayPostProcessingDataInVCell(eval(args[0]),)) - -else: - print('Unrecognized method %s' % cmd) - sys.exit(1) - -transport.close() diff --git a/pythonScripts/VCell_VTK/pyvcell/VCellProxy.py b/pythonScripts/VCell_VTK/pyvcell/VCellProxy.py deleted file mode 100644 index abf170181c..0000000000 --- a/pythonScripts/VCell_VTK/pyvcell/VCellProxy.py +++ /dev/null @@ -1,1241 +0,0 @@ -# -# Autogenerated by Thrift Compiler (0.10.0) -# -# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -# -# options string: py -# - -from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException -from thrift.protocol.TProtocol import TProtocolException -import sys -import logging -from .ttypes import * -from thrift.Thrift import TProcessor -from thrift.transport import TTransport - - -class Iface(object): - def getDataSetFileOfVariableAtTimeIndex(self, simulationDataSetRef, varInfo, timeIndex): - """ - Parameters: - - simulationDataSetRef - - varInfo - - timeIndex - """ - pass - - def getSimsFromOpenModels(self): - pass - - def getTimePoints(self, simulationDataSetRef): - """ - Parameters: - - simulationDataSetRef - """ - pass - - def getVariableList(self, simulationDataSetRef): - """ - Parameters: - - simulationDataSetRef - """ - pass - - def getPostProcessingData(self, simulationDataSetRef): - """ - Parameters: - - simulationDataSetRef - """ - pass - - def displayPostProcessingDataInVCell(self, simulationDataSetRef): - """ - Parameters: - - simulationDataSetRef - """ - pass - - -class Client(Iface): - def __init__(self, iprot, oprot=None): - self._iprot = self._oprot = iprot - if oprot is not None: - self._oprot = oprot - self._seqid = 0 - - def getDataSetFileOfVariableAtTimeIndex(self, simulationDataSetRef, varInfo, timeIndex): - """ - Parameters: - - simulationDataSetRef - - varInfo - - timeIndex - """ - self.send_getDataSetFileOfVariableAtTimeIndex(simulationDataSetRef, varInfo, timeIndex) - return self.recv_getDataSetFileOfVariableAtTimeIndex() - - def send_getDataSetFileOfVariableAtTimeIndex(self, simulationDataSetRef, varInfo, timeIndex): - self._oprot.writeMessageBegin('getDataSetFileOfVariableAtTimeIndex', TMessageType.CALL, self._seqid) - args = getDataSetFileOfVariableAtTimeIndex_args() - args.simulationDataSetRef = simulationDataSetRef - args.varInfo = varInfo - args.timeIndex = timeIndex - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_getDataSetFileOfVariableAtTimeIndex(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = getDataSetFileOfVariableAtTimeIndex_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.dataAccessException is not None: - raise result.dataAccessException - raise TApplicationException(TApplicationException.MISSING_RESULT, "getDataSetFileOfVariableAtTimeIndex failed: unknown result") - - def getSimsFromOpenModels(self): - self.send_getSimsFromOpenModels() - return self.recv_getSimsFromOpenModels() - - def send_getSimsFromOpenModels(self): - self._oprot.writeMessageBegin('getSimsFromOpenModels', TMessageType.CALL, self._seqid) - args = getSimsFromOpenModels_args() - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_getSimsFromOpenModels(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = getSimsFromOpenModels_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.dataAccessException is not None: - raise result.dataAccessException - raise TApplicationException(TApplicationException.MISSING_RESULT, "getSimsFromOpenModels failed: unknown result") - - def getTimePoints(self, simulationDataSetRef): - """ - Parameters: - - simulationDataSetRef - """ - self.send_getTimePoints(simulationDataSetRef) - return self.recv_getTimePoints() - - def send_getTimePoints(self, simulationDataSetRef): - self._oprot.writeMessageBegin('getTimePoints', TMessageType.CALL, self._seqid) - args = getTimePoints_args() - args.simulationDataSetRef = simulationDataSetRef - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_getTimePoints(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = getTimePoints_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.dataAccessException is not None: - raise result.dataAccessException - raise TApplicationException(TApplicationException.MISSING_RESULT, "getTimePoints failed: unknown result") - - def getVariableList(self, simulationDataSetRef): - """ - Parameters: - - simulationDataSetRef - """ - self.send_getVariableList(simulationDataSetRef) - return self.recv_getVariableList() - - def send_getVariableList(self, simulationDataSetRef): - self._oprot.writeMessageBegin('getVariableList', TMessageType.CALL, self._seqid) - args = getVariableList_args() - args.simulationDataSetRef = simulationDataSetRef - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_getVariableList(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = getVariableList_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.dataAccessException is not None: - raise result.dataAccessException - raise TApplicationException(TApplicationException.MISSING_RESULT, "getVariableList failed: unknown result") - - def getPostProcessingData(self, simulationDataSetRef): - """ - Parameters: - - simulationDataSetRef - """ - self.send_getPostProcessingData(simulationDataSetRef) - return self.recv_getPostProcessingData() - - def send_getPostProcessingData(self, simulationDataSetRef): - self._oprot.writeMessageBegin('getPostProcessingData', TMessageType.CALL, self._seqid) - args = getPostProcessingData_args() - args.simulationDataSetRef = simulationDataSetRef - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_getPostProcessingData(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = getPostProcessingData_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.dataAccessException is not None: - raise result.dataAccessException - raise TApplicationException(TApplicationException.MISSING_RESULT, "getPostProcessingData failed: unknown result") - - def displayPostProcessingDataInVCell(self, simulationDataSetRef): - """ - Parameters: - - simulationDataSetRef - """ - self.send_displayPostProcessingDataInVCell(simulationDataSetRef) - self.recv_displayPostProcessingDataInVCell() - - def send_displayPostProcessingDataInVCell(self, simulationDataSetRef): - self._oprot.writeMessageBegin('displayPostProcessingDataInVCell', TMessageType.CALL, self._seqid) - args = displayPostProcessingDataInVCell_args() - args.simulationDataSetRef = simulationDataSetRef - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_displayPostProcessingDataInVCell(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = displayPostProcessingDataInVCell_result() - result.read(iprot) - iprot.readMessageEnd() - if result.dataAccessException is not None: - raise result.dataAccessException - return - - -class Processor(Iface, TProcessor): - def __init__(self, handler): - self._handler = handler - self._processMap = {} - self._processMap["getDataSetFileOfVariableAtTimeIndex"] = Processor.process_getDataSetFileOfVariableAtTimeIndex - self._processMap["getSimsFromOpenModels"] = Processor.process_getSimsFromOpenModels - self._processMap["getTimePoints"] = Processor.process_getTimePoints - self._processMap["getVariableList"] = Processor.process_getVariableList - self._processMap["getPostProcessingData"] = Processor.process_getPostProcessingData - self._processMap["displayPostProcessingDataInVCell"] = Processor.process_displayPostProcessingDataInVCell - - def process(self, iprot, oprot): - (name, type, seqid) = iprot.readMessageBegin() - if name not in self._processMap: - iprot.skip(TType.STRUCT) - iprot.readMessageEnd() - x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name)) - oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid) - x.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - return - else: - self._processMap[name](self, seqid, iprot, oprot) - return True - - def process_getDataSetFileOfVariableAtTimeIndex(self, seqid, iprot, oprot): - args = getDataSetFileOfVariableAtTimeIndex_args() - args.read(iprot) - iprot.readMessageEnd() - result = getDataSetFileOfVariableAtTimeIndex_result() - try: - result.success = self._handler.getDataSetFileOfVariableAtTimeIndex(args.simulationDataSetRef, args.varInfo, args.timeIndex) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except ThriftDataAccessException as dataAccessException: - msg_type = TMessageType.REPLY - result.dataAccessException = dataAccessException - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("getDataSetFileOfVariableAtTimeIndex", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_getSimsFromOpenModels(self, seqid, iprot, oprot): - args = getSimsFromOpenModels_args() - args.read(iprot) - iprot.readMessageEnd() - result = getSimsFromOpenModels_result() - try: - result.success = self._handler.getSimsFromOpenModels() - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except ThriftDataAccessException as dataAccessException: - msg_type = TMessageType.REPLY - result.dataAccessException = dataAccessException - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("getSimsFromOpenModels", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_getTimePoints(self, seqid, iprot, oprot): - args = getTimePoints_args() - args.read(iprot) - iprot.readMessageEnd() - result = getTimePoints_result() - try: - result.success = self._handler.getTimePoints(args.simulationDataSetRef) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except ThriftDataAccessException as dataAccessException: - msg_type = TMessageType.REPLY - result.dataAccessException = dataAccessException - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("getTimePoints", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_getVariableList(self, seqid, iprot, oprot): - args = getVariableList_args() - args.read(iprot) - iprot.readMessageEnd() - result = getVariableList_result() - try: - result.success = self._handler.getVariableList(args.simulationDataSetRef) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except ThriftDataAccessException as dataAccessException: - msg_type = TMessageType.REPLY - result.dataAccessException = dataAccessException - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("getVariableList", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_getPostProcessingData(self, seqid, iprot, oprot): - args = getPostProcessingData_args() - args.read(iprot) - iprot.readMessageEnd() - result = getPostProcessingData_result() - try: - result.success = self._handler.getPostProcessingData(args.simulationDataSetRef) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except ThriftDataAccessException as dataAccessException: - msg_type = TMessageType.REPLY - result.dataAccessException = dataAccessException - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("getPostProcessingData", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_displayPostProcessingDataInVCell(self, seqid, iprot, oprot): - args = displayPostProcessingDataInVCell_args() - args.read(iprot) - iprot.readMessageEnd() - result = displayPostProcessingDataInVCell_result() - try: - self._handler.displayPostProcessingDataInVCell(args.simulationDataSetRef) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except ThriftDataAccessException as dataAccessException: - msg_type = TMessageType.REPLY - result.dataAccessException = dataAccessException - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("displayPostProcessingDataInVCell", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - -# HELPER FUNCTIONS AND STRUCTURES - - -class getDataSetFileOfVariableAtTimeIndex_args(object): - """ - Attributes: - - simulationDataSetRef - - varInfo - - timeIndex - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'simulationDataSetRef', (SimulationDataSetRef, SimulationDataSetRef.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'varInfo', (VariableInfo, VariableInfo.thrift_spec), None, ), # 2 - (3, TType.I32, 'timeIndex', None, None, ), # 3 - ) - - def __init__(self, simulationDataSetRef=None, varInfo=None, timeIndex=None,): - self.simulationDataSetRef = simulationDataSetRef - self.varInfo = varInfo - self.timeIndex = timeIndex - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.simulationDataSetRef = SimulationDataSetRef() - self.simulationDataSetRef.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.varInfo = VariableInfo() - self.varInfo.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I32: - self.timeIndex = iprot.readI32() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getDataSetFileOfVariableAtTimeIndex_args') - if self.simulationDataSetRef is not None: - oprot.writeFieldBegin('simulationDataSetRef', TType.STRUCT, 1) - self.simulationDataSetRef.write(oprot) - oprot.writeFieldEnd() - if self.varInfo is not None: - oprot.writeFieldBegin('varInfo', TType.STRUCT, 2) - self.varInfo.write(oprot) - oprot.writeFieldEnd() - if self.timeIndex is not None: - oprot.writeFieldBegin('timeIndex', TType.I32, 3) - oprot.writeI32(self.timeIndex) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class getDataSetFileOfVariableAtTimeIndex_result(object): - """ - Attributes: - - success - - dataAccessException - """ - - thrift_spec = ( - (0, TType.STRING, 'success', 'UTF8', None, ), # 0 - (1, TType.STRUCT, 'dataAccessException', (ThriftDataAccessException, ThriftDataAccessException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, dataAccessException=None,): - self.success = success - self.dataAccessException = dataAccessException - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.dataAccessException = ThriftDataAccessException() - self.dataAccessException.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getDataSetFileOfVariableAtTimeIndex_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) - oprot.writeFieldEnd() - if self.dataAccessException is not None: - oprot.writeFieldBegin('dataAccessException', TType.STRUCT, 1) - self.dataAccessException.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class getSimsFromOpenModels_args(object): - - thrift_spec = ( - ) - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getSimsFromOpenModels_args') - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class getSimsFromOpenModels_result(object): - """ - Attributes: - - success - - dataAccessException - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, (SimulationDataSetRef, SimulationDataSetRef.thrift_spec), False), None, ), # 0 - (1, TType.STRUCT, 'dataAccessException', (ThriftDataAccessException, ThriftDataAccessException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, dataAccessException=None,): - self.success = success - self.dataAccessException = dataAccessException - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype45, _size42) = iprot.readListBegin() - for _i46 in range(_size42): - _elem47 = SimulationDataSetRef() - _elem47.read(iprot) - self.success.append(_elem47) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.dataAccessException = ThriftDataAccessException() - self.dataAccessException.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getSimsFromOpenModels_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter48 in self.success: - iter48.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.dataAccessException is not None: - oprot.writeFieldBegin('dataAccessException', TType.STRUCT, 1) - self.dataAccessException.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class getTimePoints_args(object): - """ - Attributes: - - simulationDataSetRef - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'simulationDataSetRef', (SimulationDataSetRef, SimulationDataSetRef.thrift_spec), None, ), # 1 - ) - - def __init__(self, simulationDataSetRef=None,): - self.simulationDataSetRef = simulationDataSetRef - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.simulationDataSetRef = SimulationDataSetRef() - self.simulationDataSetRef.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getTimePoints_args') - if self.simulationDataSetRef is not None: - oprot.writeFieldBegin('simulationDataSetRef', TType.STRUCT, 1) - self.simulationDataSetRef.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class getTimePoints_result(object): - """ - Attributes: - - success - - dataAccessException - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.DOUBLE, None, False), None, ), # 0 - (1, TType.STRUCT, 'dataAccessException', (ThriftDataAccessException, ThriftDataAccessException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, dataAccessException=None,): - self.success = success - self.dataAccessException = dataAccessException - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype52, _size49) = iprot.readListBegin() - for _i53 in range(_size49): - _elem54 = iprot.readDouble() - self.success.append(_elem54) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.dataAccessException = ThriftDataAccessException() - self.dataAccessException.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getTimePoints_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.DOUBLE, len(self.success)) - for iter55 in self.success: - oprot.writeDouble(iter55) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.dataAccessException is not None: - oprot.writeFieldBegin('dataAccessException', TType.STRUCT, 1) - self.dataAccessException.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class getVariableList_args(object): - """ - Attributes: - - simulationDataSetRef - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'simulationDataSetRef', (SimulationDataSetRef, SimulationDataSetRef.thrift_spec), None, ), # 1 - ) - - def __init__(self, simulationDataSetRef=None,): - self.simulationDataSetRef = simulationDataSetRef - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.simulationDataSetRef = SimulationDataSetRef() - self.simulationDataSetRef.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getVariableList_args') - if self.simulationDataSetRef is not None: - oprot.writeFieldBegin('simulationDataSetRef', TType.STRUCT, 1) - self.simulationDataSetRef.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class getVariableList_result(object): - """ - Attributes: - - success - - dataAccessException - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT, (VariableInfo, VariableInfo.thrift_spec), False), None, ), # 0 - (1, TType.STRUCT, 'dataAccessException', (ThriftDataAccessException, ThriftDataAccessException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, dataAccessException=None,): - self.success = success - self.dataAccessException = dataAccessException - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype59, _size56) = iprot.readListBegin() - for _i60 in range(_size56): - _elem61 = VariableInfo() - _elem61.read(iprot) - self.success.append(_elem61) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.dataAccessException = ThriftDataAccessException() - self.dataAccessException.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getVariableList_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter62 in self.success: - iter62.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.dataAccessException is not None: - oprot.writeFieldBegin('dataAccessException', TType.STRUCT, 1) - self.dataAccessException.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class getPostProcessingData_args(object): - """ - Attributes: - - simulationDataSetRef - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'simulationDataSetRef', (SimulationDataSetRef, SimulationDataSetRef.thrift_spec), None, ), # 1 - ) - - def __init__(self, simulationDataSetRef=None,): - self.simulationDataSetRef = simulationDataSetRef - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.simulationDataSetRef = SimulationDataSetRef() - self.simulationDataSetRef.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getPostProcessingData_args') - if self.simulationDataSetRef is not None: - oprot.writeFieldBegin('simulationDataSetRef', TType.STRUCT, 1) - self.simulationDataSetRef.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class getPostProcessingData_result(object): - """ - Attributes: - - success - - dataAccessException - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (PostProcessingData, PostProcessingData.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'dataAccessException', (ThriftDataAccessException, ThriftDataAccessException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, dataAccessException=None,): - self.success = success - self.dataAccessException = dataAccessException - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = PostProcessingData() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.dataAccessException = ThriftDataAccessException() - self.dataAccessException.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getPostProcessingData_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.dataAccessException is not None: - oprot.writeFieldBegin('dataAccessException', TType.STRUCT, 1) - self.dataAccessException.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class displayPostProcessingDataInVCell_args(object): - """ - Attributes: - - simulationDataSetRef - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'simulationDataSetRef', (SimulationDataSetRef, SimulationDataSetRef.thrift_spec), None, ), # 1 - ) - - def __init__(self, simulationDataSetRef=None,): - self.simulationDataSetRef = simulationDataSetRef - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.simulationDataSetRef = SimulationDataSetRef() - self.simulationDataSetRef.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('displayPostProcessingDataInVCell_args') - if self.simulationDataSetRef is not None: - oprot.writeFieldBegin('simulationDataSetRef', TType.STRUCT, 1) - self.simulationDataSetRef.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class displayPostProcessingDataInVCell_result(object): - """ - Attributes: - - dataAccessException - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'dataAccessException', (ThriftDataAccessException, ThriftDataAccessException.thrift_spec), None, ), # 1 - ) - - def __init__(self, dataAccessException=None,): - self.dataAccessException = dataAccessException - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.dataAccessException = ThriftDataAccessException() - self.dataAccessException.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('displayPostProcessingDataInVCell_result') - if self.dataAccessException is not None: - oprot.writeFieldBegin('dataAccessException', TType.STRUCT, 1) - self.dataAccessException.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) diff --git a/pythonScripts/VCell_VTK/pyvcell/__init__.py b/pythonScripts/VCell_VTK/pyvcell/__init__.py deleted file mode 100644 index f8487d2c4e..0000000000 --- a/pythonScripts/VCell_VTK/pyvcell/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__all__ = ['ttypes', 'constants', 'VCellProxy'] diff --git a/pythonScripts/VCell_VTK/pyvcell/constants.py b/pythonScripts/VCell_VTK/pyvcell/constants.py deleted file mode 100644 index eb0d35aa12..0000000000 --- a/pythonScripts/VCell_VTK/pyvcell/constants.py +++ /dev/null @@ -1,12 +0,0 @@ -# -# Autogenerated by Thrift Compiler (0.10.0) -# -# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -# -# options string: py -# - -from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException -from thrift.protocol.TProtocol import TProtocolException -import sys -from .ttypes import * diff --git a/pythonScripts/VCell_VTK/pyvcell/ttypes.py b/pythonScripts/VCell_VTK/pyvcell/ttypes.py deleted file mode 100644 index 6dc6551b0f..0000000000 --- a/pythonScripts/VCell_VTK/pyvcell/ttypes.py +++ /dev/null @@ -1,696 +0,0 @@ -# -# Autogenerated by Thrift Compiler (0.10.0) -# -# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -# -# options string: py -# - -from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException -from thrift.protocol.TProtocol import TProtocolException -import sys - -from thrift.transport import TTransport - - -class DomainType(object): - VOLUME = 0 - MEMBRANE = 1 - - _VALUES_TO_NAMES = { - 0: "VOLUME", - 1: "MEMBRANE", - } - - _NAMES_TO_VALUES = { - "VOLUME": 0, - "MEMBRANE": 1, - } - - -class DataType(object): - CELLDATA = 0 - POINTDATA = 1 - - _VALUES_TO_NAMES = { - 0: "CELLDATA", - 1: "POINTDATA", - } - - _NAMES_TO_VALUES = { - "CELLDATA": 0, - "POINTDATA": 1, - } - - -class VariableInfo(object): - """ - Attributes: - - variableVtuName - - variableDisplayName - - domainName - - variableDomainType - - unitsLabel - - isMeshVar - - expressionString - - dataType - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'variableVtuName', 'UTF8', None, ), # 1 - (2, TType.STRING, 'variableDisplayName', 'UTF8', None, ), # 2 - (3, TType.STRING, 'domainName', 'UTF8', None, ), # 3 - (4, TType.I32, 'variableDomainType', None, None, ), # 4 - (5, TType.STRING, 'unitsLabel', 'UTF8', None, ), # 5 - (6, TType.BOOL, 'isMeshVar', None, None, ), # 6 - (7, TType.STRING, 'expressionString', 'UTF8', None, ), # 7 - (8, TType.I32, 'dataType', None, None, ), # 8 - ) - - def __init__(self, variableVtuName=None, variableDisplayName=None, domainName=None, variableDomainType=None, unitsLabel=None, isMeshVar=None, expressionString=None, dataType=None,): - self.variableVtuName = variableVtuName - self.variableDisplayName = variableDisplayName - self.domainName = domainName - self.variableDomainType = variableDomainType - self.unitsLabel = unitsLabel - self.isMeshVar = isMeshVar - self.expressionString = expressionString - self.dataType = dataType - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.variableVtuName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.variableDisplayName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.domainName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I32: - self.variableDomainType = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRING: - self.unitsLabel = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.BOOL: - self.isMeshVar = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.STRING: - self.expressionString = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - else: - iprot.skip(ftype) - elif fid == 8: - if ftype == TType.I32: - self.dataType = iprot.readI32() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('VariableInfo') - if self.variableVtuName is not None: - oprot.writeFieldBegin('variableVtuName', TType.STRING, 1) - oprot.writeString(self.variableVtuName.encode('utf-8') if sys.version_info[0] == 2 else self.variableVtuName) - oprot.writeFieldEnd() - if self.variableDisplayName is not None: - oprot.writeFieldBegin('variableDisplayName', TType.STRING, 2) - oprot.writeString(self.variableDisplayName.encode('utf-8') if sys.version_info[0] == 2 else self.variableDisplayName) - oprot.writeFieldEnd() - if self.domainName is not None: - oprot.writeFieldBegin('domainName', TType.STRING, 3) - oprot.writeString(self.domainName.encode('utf-8') if sys.version_info[0] == 2 else self.domainName) - oprot.writeFieldEnd() - if self.variableDomainType is not None: - oprot.writeFieldBegin('variableDomainType', TType.I32, 4) - oprot.writeI32(self.variableDomainType) - oprot.writeFieldEnd() - if self.unitsLabel is not None: - oprot.writeFieldBegin('unitsLabel', TType.STRING, 5) - oprot.writeString(self.unitsLabel.encode('utf-8') if sys.version_info[0] == 2 else self.unitsLabel) - oprot.writeFieldEnd() - if self.isMeshVar is not None: - oprot.writeFieldBegin('isMeshVar', TType.BOOL, 6) - oprot.writeBool(self.isMeshVar) - oprot.writeFieldEnd() - if self.expressionString is not None: - oprot.writeFieldBegin('expressionString', TType.STRING, 7) - oprot.writeString(self.expressionString.encode('utf-8') if sys.version_info[0] == 2 else self.expressionString) - oprot.writeFieldEnd() - if self.dataType is not None: - oprot.writeFieldBegin('dataType', TType.I32, 8) - oprot.writeI32(self.dataType) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.variableVtuName is None: - raise TProtocolException(message='Required field variableVtuName is unset!') - if self.variableDisplayName is None: - raise TProtocolException(message='Required field variableDisplayName is unset!') - if self.domainName is None: - raise TProtocolException(message='Required field domainName is unset!') - if self.variableDomainType is None: - raise TProtocolException(message='Required field variableDomainType is unset!') - if self.unitsLabel is None: - raise TProtocolException(message='Required field unitsLabel is unset!') - if self.isMeshVar is None: - raise TProtocolException(message='Required field isMeshVar is unset!') - if self.dataType is None: - raise TProtocolException(message='Required field dataType is unset!') - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class SimulationDataSetRef(object): - """ - Attributes: - - simId - - simName - - modelId - - username - - userkey - - jobIndex - - isMathModel - - simulationContextName - - modelName - - originXYZ - - extentXYZ - - isTimeVaryingMesh - - isLocal - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'simId', 'UTF8', None, ), # 1 - (2, TType.STRING, 'simName', 'UTF8', None, ), # 2 - (3, TType.STRING, 'modelId', 'UTF8', None, ), # 3 - (4, TType.STRING, 'username', 'UTF8', None, ), # 4 - (5, TType.STRING, 'userkey', 'UTF8', None, ), # 5 - (6, TType.I32, 'jobIndex', None, None, ), # 6 - (7, TType.BOOL, 'isMathModel', None, None, ), # 7 - (8, TType.STRING, 'simulationContextName', 'UTF8', None, ), # 8 - (9, TType.STRING, 'modelName', 'UTF8', None, ), # 9 - (10, TType.LIST, 'originXYZ', (TType.DOUBLE, None, False), None, ), # 10 - (11, TType.LIST, 'extentXYZ', (TType.DOUBLE, None, False), None, ), # 11 - (12, TType.BOOL, 'isTimeVaryingMesh', None, None, ), # 12 - (13, TType.BOOL, 'isLocal', None, None, ), # 13 - ) - - def __init__(self, simId=None, simName=None, modelId=None, username=None, userkey=None, jobIndex=None, isMathModel=None, simulationContextName=None, modelName=None, originXYZ=None, extentXYZ=None, isTimeVaryingMesh=None, isLocal=None,): - self.simId = simId - self.simName = simName - self.modelId = modelId - self.username = username - self.userkey = userkey - self.jobIndex = jobIndex - self.isMathModel = isMathModel - self.simulationContextName = simulationContextName - self.modelName = modelName - self.originXYZ = originXYZ - self.extentXYZ = extentXYZ - self.isTimeVaryingMesh = isTimeVaryingMesh - self.isLocal = isLocal - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.simId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.simName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.modelId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.username = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRING: - self.userkey = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.I32: - self.jobIndex = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.BOOL: - self.isMathModel = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 8: - if ftype == TType.STRING: - self.simulationContextName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - else: - iprot.skip(ftype) - elif fid == 9: - if ftype == TType.STRING: - self.modelName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - else: - iprot.skip(ftype) - elif fid == 10: - if ftype == TType.LIST: - self.originXYZ = [] - (_etype3, _size0) = iprot.readListBegin() - for _i4 in range(_size0): - _elem5 = iprot.readDouble() - self.originXYZ.append(_elem5) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 11: - if ftype == TType.LIST: - self.extentXYZ = [] - (_etype9, _size6) = iprot.readListBegin() - for _i10 in range(_size6): - _elem11 = iprot.readDouble() - self.extentXYZ.append(_elem11) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 12: - if ftype == TType.BOOL: - self.isTimeVaryingMesh = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 13: - if ftype == TType.BOOL: - self.isLocal = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('SimulationDataSetRef') - if self.simId is not None: - oprot.writeFieldBegin('simId', TType.STRING, 1) - oprot.writeString(self.simId.encode('utf-8') if sys.version_info[0] == 2 else self.simId) - oprot.writeFieldEnd() - if self.simName is not None: - oprot.writeFieldBegin('simName', TType.STRING, 2) - oprot.writeString(self.simName.encode('utf-8') if sys.version_info[0] == 2 else self.simName) - oprot.writeFieldEnd() - if self.modelId is not None: - oprot.writeFieldBegin('modelId', TType.STRING, 3) - oprot.writeString(self.modelId.encode('utf-8') if sys.version_info[0] == 2 else self.modelId) - oprot.writeFieldEnd() - if self.username is not None: - oprot.writeFieldBegin('username', TType.STRING, 4) - oprot.writeString(self.username.encode('utf-8') if sys.version_info[0] == 2 else self.username) - oprot.writeFieldEnd() - if self.userkey is not None: - oprot.writeFieldBegin('userkey', TType.STRING, 5) - oprot.writeString(self.userkey.encode('utf-8') if sys.version_info[0] == 2 else self.userkey) - oprot.writeFieldEnd() - if self.jobIndex is not None: - oprot.writeFieldBegin('jobIndex', TType.I32, 6) - oprot.writeI32(self.jobIndex) - oprot.writeFieldEnd() - if self.isMathModel is not None: - oprot.writeFieldBegin('isMathModel', TType.BOOL, 7) - oprot.writeBool(self.isMathModel) - oprot.writeFieldEnd() - if self.simulationContextName is not None: - oprot.writeFieldBegin('simulationContextName', TType.STRING, 8) - oprot.writeString(self.simulationContextName.encode('utf-8') if sys.version_info[0] == 2 else self.simulationContextName) - oprot.writeFieldEnd() - if self.modelName is not None: - oprot.writeFieldBegin('modelName', TType.STRING, 9) - oprot.writeString(self.modelName.encode('utf-8') if sys.version_info[0] == 2 else self.modelName) - oprot.writeFieldEnd() - if self.originXYZ is not None: - oprot.writeFieldBegin('originXYZ', TType.LIST, 10) - oprot.writeListBegin(TType.DOUBLE, len(self.originXYZ)) - for iter12 in self.originXYZ: - oprot.writeDouble(iter12) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.extentXYZ is not None: - oprot.writeFieldBegin('extentXYZ', TType.LIST, 11) - oprot.writeListBegin(TType.DOUBLE, len(self.extentXYZ)) - for iter13 in self.extentXYZ: - oprot.writeDouble(iter13) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.isTimeVaryingMesh is not None: - oprot.writeFieldBegin('isTimeVaryingMesh', TType.BOOL, 12) - oprot.writeBool(self.isTimeVaryingMesh) - oprot.writeFieldEnd() - if self.isLocal is not None: - oprot.writeFieldBegin('isLocal', TType.BOOL, 13) - oprot.writeBool(self.isLocal) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.simId is None: - raise TProtocolException(message='Required field simId is unset!') - if self.simName is None: - raise TProtocolException(message='Required field simName is unset!') - if self.modelId is None: - raise TProtocolException(message='Required field modelId is unset!') - if self.username is None: - raise TProtocolException(message='Required field username is unset!') - if self.userkey is None: - raise TProtocolException(message='Required field userkey is unset!') - if self.jobIndex is None: - raise TProtocolException(message='Required field jobIndex is unset!') - if self.isMathModel is None: - raise TProtocolException(message='Required field isMathModel is unset!') - if self.modelName is None: - raise TProtocolException(message='Required field modelName is unset!') - if self.originXYZ is None: - raise TProtocolException(message='Required field originXYZ is unset!') - if self.extentXYZ is None: - raise TProtocolException(message='Required field extentXYZ is unset!') - if self.isTimeVaryingMesh is None: - raise TProtocolException(message='Required field isTimeVaryingMesh is unset!') - if self.isLocal is None: - raise TProtocolException(message='Required field isLocal is unset!') - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class PlotData(object): - """ - Attributes: - - timePoints - - data - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'timePoints', (TType.DOUBLE, None, False), None, ), # 1 - (2, TType.LIST, 'data', (TType.DOUBLE, None, False), None, ), # 2 - ) - - def __init__(self, timePoints=None, data=None,): - self.timePoints = timePoints - self.data = data - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.timePoints = [] - (_etype17, _size14) = iprot.readListBegin() - for _i18 in range(_size14): - _elem19 = iprot.readDouble() - self.timePoints.append(_elem19) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.LIST: - self.data = [] - (_etype23, _size20) = iprot.readListBegin() - for _i24 in range(_size20): - _elem25 = iprot.readDouble() - self.data.append(_elem25) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('PlotData') - if self.timePoints is not None: - oprot.writeFieldBegin('timePoints', TType.LIST, 1) - oprot.writeListBegin(TType.DOUBLE, len(self.timePoints)) - for iter26 in self.timePoints: - oprot.writeDouble(iter26) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.data is not None: - oprot.writeFieldBegin('data', TType.LIST, 2) - oprot.writeListBegin(TType.DOUBLE, len(self.data)) - for iter27 in self.data: - oprot.writeDouble(iter27) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.timePoints is None: - raise TProtocolException(message='Required field timePoints is unset!') - if self.data is None: - raise TProtocolException(message='Required field data is unset!') - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class PostProcessingData(object): - """ - Attributes: - - variableList - - plotData - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'variableList', (TType.STRUCT, (VariableInfo, VariableInfo.thrift_spec), False), None, ), # 1 - (2, TType.LIST, 'plotData', (TType.STRUCT, (PlotData, PlotData.thrift_spec), False), None, ), # 2 - ) - - def __init__(self, variableList=None, plotData=None,): - self.variableList = variableList - self.plotData = plotData - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.variableList = [] - (_etype31, _size28) = iprot.readListBegin() - for _i32 in range(_size28): - _elem33 = VariableInfo() - _elem33.read(iprot) - self.variableList.append(_elem33) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.LIST: - self.plotData = [] - (_etype37, _size34) = iprot.readListBegin() - for _i38 in range(_size34): - _elem39 = PlotData() - _elem39.read(iprot) - self.plotData.append(_elem39) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('PostProcessingData') - if self.variableList is not None: - oprot.writeFieldBegin('variableList', TType.LIST, 1) - oprot.writeListBegin(TType.STRUCT, len(self.variableList)) - for iter40 in self.variableList: - iter40.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.plotData is not None: - oprot.writeFieldBegin('plotData', TType.LIST, 2) - oprot.writeListBegin(TType.STRUCT, len(self.plotData)) - for iter41 in self.plotData: - iter41.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.variableList is None: - raise TProtocolException(message='Required field variableList is unset!') - if self.plotData is None: - raise TProtocolException(message='Required field plotData is unset!') - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - -class ThriftDataAccessException(TException): - """ - Attributes: - - message - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', 'UTF8', None, ), # 1 - ) - - def __init__(self, message=None,): - self.message = message - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.message = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('ThriftDataAccessException') - if self.message is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.message is None: - raise TProtocolException(message='Required field message is unset!') - return - - def __str__(self): - return repr(self) - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) diff --git a/pythonScripts/VCell_VTK/vcellvismesh/__init__.py b/pythonScripts/VCell_VTK/vcellvismesh/__init__.py deleted file mode 100644 index adefd8e51f..0000000000 --- a/pythonScripts/VCell_VTK/vcellvismesh/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__all__ = ['ttypes', 'constants'] diff --git a/pythonScripts/VCell_VTK/vcellvismesh/constants.py b/pythonScripts/VCell_VTK/vcellvismesh/constants.py deleted file mode 100644 index eb0d35aa12..0000000000 --- a/pythonScripts/VCell_VTK/vcellvismesh/constants.py +++ /dev/null @@ -1,12 +0,0 @@ -# -# Autogenerated by Thrift Compiler (0.10.0) -# -# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -# -# options string: py -# - -from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException -from thrift.protocol.TProtocol import TProtocolException -import sys -from .ttypes import * diff --git a/pythonScripts/VCell_VTK/vtkAddData_not_used.py b/pythonScripts/VCell_VTK/vtkAddData_not_used.py deleted file mode 100644 index f32b4cad4f..0000000000 --- a/pythonScripts/VCell_VTK/vtkAddData_not_used.py +++ /dev/null @@ -1,42 +0,0 @@ -import argparse - -import numpy as np -import vtk - -from vtkService import writeDataArrayToNewVtkFile - - - - -def main(): -# try: - parser = argparse.ArgumentParser() - parser.add_argument("invtkfile",help="filename of input vtk mesh (VTK XML unstructured grid") - parser.add_argument("varname",help="name of cell data variable") - parser.add_argument("outvtkfile",help="filename of output vtk mesh (VTK XML unstructured grid") - args = parser.parse_args() - - # deserialize raw bytes into VarDataAdd - reader = vtk.vtkXMLUnstructuredGridReader() - reader.SetFileName(args.invtkfile) - reader.Update() - mesh = reader.GetOutput() - assert isinstance(mesh, vtk.vtkUnstructuredGrid) - numcells = mesh.GetCells().GetSize() - - # write 0..N-1 into data - npdata = np.arange(0,numcells,0.1) - - writeDataArrayToNewVtkFile(args.invtkfile, args.varname, npdata, args.outvtkfile) - print("done") - # except: - # e = sys.exc_info()[0] - # print("exception "+e) - # sys.exit(-1) - # else: - # sys.exit(0) - - - -if __name__ == '__main__': - main() diff --git a/pythonProject/vcell-opt/tests/__init__.py b/pythonVtk/__init__.py similarity index 100% rename from pythonProject/vcell-opt/tests/__init__.py rename to pythonVtk/__init__.py diff --git a/pythonVtk/poetry.lock b/pythonVtk/poetry.lock new file mode 100644 index 0000000000..7fae22076e --- /dev/null +++ b/pythonVtk/poetry.lock @@ -0,0 +1,512 @@ +# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand. + +[[package]] +name = "contourpy" +version = "1.1.0" +description = "Python library for calculating contours of 2D quadrilateral grids" +optional = false +python-versions = ">=3.8" +files = [ + {file = "contourpy-1.1.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:89f06eff3ce2f4b3eb24c1055a26981bffe4e7264acd86f15b97e40530b794bc"}, + {file = "contourpy-1.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:dffcc2ddec1782dd2f2ce1ef16f070861af4fb78c69862ce0aab801495dda6a3"}, + {file = "contourpy-1.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:25ae46595e22f93592d39a7eac3d638cda552c3e1160255258b695f7b58e5655"}, + {file = "contourpy-1.1.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:17cfaf5ec9862bc93af1ec1f302457371c34e688fbd381f4035a06cd47324f48"}, + {file = "contourpy-1.1.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:18a64814ae7bce73925131381603fff0116e2df25230dfc80d6d690aa6e20b37"}, + {file = "contourpy-1.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:90c81f22b4f572f8a2110b0b741bb64e5a6427e0a198b2cdc1fbaf85f352a3aa"}, + {file = "contourpy-1.1.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:53cc3a40635abedbec7f1bde60f8c189c49e84ac180c665f2cd7c162cc454baa"}, + {file = "contourpy-1.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:1f795597073b09d631782e7245016a4323cf1cf0b4e06eef7ea6627e06a37ff2"}, + {file = "contourpy-1.1.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:0b7b04ed0961647691cfe5d82115dd072af7ce8846d31a5fac6c142dcce8b882"}, + {file = "contourpy-1.1.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:27bc79200c742f9746d7dd51a734ee326a292d77e7d94c8af6e08d1e6c15d545"}, + {file = "contourpy-1.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:052cc634bf903c604ef1a00a5aa093c54f81a2612faedaa43295809ffdde885e"}, + {file = "contourpy-1.1.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9382a1c0bc46230fb881c36229bfa23d8c303b889b788b939365578d762b5c18"}, + {file = "contourpy-1.1.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e5cec36c5090e75a9ac9dbd0ff4a8cf7cecd60f1b6dc23a374c7d980a1cd710e"}, + {file = "contourpy-1.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1f0cbd657e9bde94cd0e33aa7df94fb73c1ab7799378d3b3f902eb8eb2e04a3a"}, + {file = "contourpy-1.1.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:181cbace49874f4358e2929aaf7ba84006acb76694102e88dd15af861996c16e"}, + {file = "contourpy-1.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:fb3b7d9e6243bfa1efb93ccfe64ec610d85cfe5aec2c25f97fbbd2e58b531256"}, + {file = "contourpy-1.1.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:bcb41692aa09aeb19c7c213411854402f29f6613845ad2453d30bf421fe68fed"}, + {file = "contourpy-1.1.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:5d123a5bc63cd34c27ff9c7ac1cd978909e9c71da12e05be0231c608048bb2ae"}, + {file = "contourpy-1.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:62013a2cf68abc80dadfd2307299bfa8f5aa0dcaec5b2954caeb5fa094171103"}, + {file = "contourpy-1.1.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0b6616375d7de55797d7a66ee7d087efe27f03d336c27cf1f32c02b8c1a5ac70"}, + {file = "contourpy-1.1.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:317267d915490d1e84577924bd61ba71bf8681a30e0d6c545f577363157e5e94"}, + {file = "contourpy-1.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d551f3a442655f3dcc1285723f9acd646ca5858834efeab4598d706206b09c9f"}, + {file = "contourpy-1.1.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:e7a117ce7df5a938fe035cad481b0189049e8d92433b4b33aa7fc609344aafa1"}, + {file = "contourpy-1.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:d4f26b25b4f86087e7d75e63212756c38546e70f2a92d2be44f80114826e1cd4"}, + {file = "contourpy-1.1.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:bc00bb4225d57bff7ebb634646c0ee2a1298402ec10a5fe7af79df9a51c1bfd9"}, + {file = "contourpy-1.1.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:189ceb1525eb0655ab8487a9a9c41f42a73ba52d6789754788d1883fb06b2d8a"}, + {file = "contourpy-1.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9f2931ed4741f98f74b410b16e5213f71dcccee67518970c42f64153ea9313b9"}, + {file = "contourpy-1.1.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:30f511c05fab7f12e0b1b7730ebdc2ec8deedcfb505bc27eb570ff47c51a8f15"}, + {file = "contourpy-1.1.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:143dde50520a9f90e4a2703f367cf8ec96a73042b72e68fcd184e1279962eb6f"}, + {file = "contourpy-1.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e94bef2580e25b5fdb183bf98a2faa2adc5b638736b2c0a4da98691da641316a"}, + {file = "contourpy-1.1.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ed614aea8462735e7d70141374bd7650afd1c3f3cb0c2dbbcbe44e14331bf002"}, + {file = "contourpy-1.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:438ba416d02f82b692e371858143970ed2eb6337d9cdbbede0d8ad9f3d7dd17d"}, + {file = "contourpy-1.1.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:a698c6a7a432789e587168573a864a7ea374c6be8d4f31f9d87c001d5a843493"}, + {file = "contourpy-1.1.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:397b0ac8a12880412da3551a8cb5a187d3298a72802b45a3bd1805e204ad8439"}, + {file = "contourpy-1.1.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:a67259c2b493b00e5a4d0f7bfae51fb4b3371395e47d079a4446e9b0f4d70e76"}, + {file = "contourpy-1.1.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:2b836d22bd2c7bb2700348e4521b25e077255ebb6ab68e351ab5aa91ca27e027"}, + {file = "contourpy-1.1.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:084eaa568400cfaf7179b847ac871582199b1b44d5699198e9602ecbbb5f6104"}, + {file = "contourpy-1.1.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:911ff4fd53e26b019f898f32db0d4956c9d227d51338fb3b03ec72ff0084ee5f"}, + {file = "contourpy-1.1.0.tar.gz", hash = "sha256:e53046c3863828d21d531cc3b53786e6580eb1ba02477e8681009b6aa0870b21"}, +] + +[package.dependencies] +numpy = ">=1.16" + +[package.extras] +bokeh = ["bokeh", "selenium"] +docs = ["furo", "sphinx-copybutton"] +mypy = ["contourpy[bokeh,docs]", "docutils-stubs", "mypy (==1.2.0)", "types-Pillow"] +test = ["Pillow", "contourpy[test-no-images]", "matplotlib"] +test-no-images = ["pytest", "pytest-cov", "wurlitzer"] + +[[package]] +name = "cycler" +version = "0.11.0" +description = "Composable style cycles" +optional = false +python-versions = ">=3.6" +files = [ + {file = "cycler-0.11.0-py3-none-any.whl", hash = "sha256:3a27e95f763a428a739d2add979fa7494c912a32c17c4c38c4d5f082cad165a3"}, + {file = "cycler-0.11.0.tar.gz", hash = "sha256:9c87405839a19696e837b3b818fed3f5f69f16f1eec1a1ad77e043dcea9c772f"}, +] + +[[package]] +name = "fonttools" +version = "4.41.1" +description = "Tools to manipulate font files" +optional = false +python-versions = ">=3.8" +files = [ + {file = "fonttools-4.41.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a7bbb290d13c6dd718ec2c3db46fe6c5f6811e7ea1e07f145fd8468176398224"}, + {file = "fonttools-4.41.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ec453a45778524f925a8f20fd26a3326f398bfc55d534e37bab470c5e415caa1"}, + {file = "fonttools-4.41.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c2071267deaa6d93cb16288613419679c77220543551cbe61da02c93d92df72f"}, + {file = "fonttools-4.41.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4e3334d51f0e37e2c6056e67141b2adabc92613a968797e2571ca8a03bd64773"}, + {file = "fonttools-4.41.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:cac73bbef7734e78c60949da11c4903ee5837168e58772371bd42a75872f4f82"}, + {file = "fonttools-4.41.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:edee0900cf0eedb29d17c7876102d6e5a91ee333882b1f5abc83e85b934cadb5"}, + {file = "fonttools-4.41.1-cp310-cp310-win32.whl", hash = "sha256:2a22b2c425c698dcd5d6b0ff0b566e8e9663172118db6fd5f1941f9b8063da9b"}, + {file = "fonttools-4.41.1-cp310-cp310-win_amd64.whl", hash = "sha256:547ab36a799dded58a46fa647266c24d0ed43a66028cd1cd4370b246ad426cac"}, + {file = "fonttools-4.41.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:849ec722bbf7d3501a0e879e57dec1fc54919d31bff3f690af30bb87970f9784"}, + {file = "fonttools-4.41.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:38cdecd8f1fd4bf4daae7fed1b3170dfc1b523388d6664b2204b351820aa78a7"}, + {file = "fonttools-4.41.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3ae64303ba670f8959fdaaa30ba0c2dabe75364fdec1caeee596c45d51ca3425"}, + {file = "fonttools-4.41.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f14f3ccea4cc7dd1b277385adf3c3bf18f9860f87eab9c2fb650b0af16800f55"}, + {file = "fonttools-4.41.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:33191f062549e6bb1a4782c22a04ebd37009c09360e2d6686ac5083774d06d95"}, + {file = "fonttools-4.41.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:704bccd69b0abb6fab9f5e4d2b75896afa48b427caa2c7988792a2ffce35b441"}, + {file = "fonttools-4.41.1-cp311-cp311-win32.whl", hash = "sha256:4edc795533421e98f60acee7d28fc8d941ff5ac10f44668c9c3635ad72ae9045"}, + {file = "fonttools-4.41.1-cp311-cp311-win_amd64.whl", hash = "sha256:aaaef294d8e411f0ecb778a0aefd11bb5884c9b8333cc1011bdaf3b58ca4bd75"}, + {file = "fonttools-4.41.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:3d1f9471134affc1e3b1b806db6e3e2ad3fa99439e332f1881a474c825101096"}, + {file = "fonttools-4.41.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:59eba8b2e749a1de85760da22333f3d17c42b66e03758855a12a2a542723c6e7"}, + {file = "fonttools-4.41.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a9b3cc10dc9e0834b6665fd63ae0c6964c6bc3d7166e9bc84772e0edd09f9fa2"}, + {file = "fonttools-4.41.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:da2c2964bdc827ba6b8a91dc6de792620be4da3922c4cf0599f36a488c07e2b2"}, + {file = "fonttools-4.41.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:7763316111df7b5165529f4183a334aa24c13cdb5375ffa1dc8ce309c8bf4e5c"}, + {file = "fonttools-4.41.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b2d1ee95be42b80d1f002d1ee0a51d7a435ea90d36f1a5ae331be9962ee5a3f1"}, + {file = "fonttools-4.41.1-cp38-cp38-win32.whl", hash = "sha256:f48602c0b3fd79cd83a34c40af565fe6db7ac9085c8823b552e6e751e3a5b8be"}, + {file = "fonttools-4.41.1-cp38-cp38-win_amd64.whl", hash = "sha256:b0938ebbeccf7c80bb9a15e31645cf831572c3a33d5cc69abe436e7000c61b14"}, + {file = "fonttools-4.41.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e5c2b0a95a221838991e2f0e455dec1ca3a8cc9cd54febd68cc64d40fdb83669"}, + {file = "fonttools-4.41.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:891cfc5a83b0307688f78b9bb446f03a7a1ad981690ac8362f50518bc6153975"}, + {file = "fonttools-4.41.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:73ef0bb5d60eb02ba4d3a7d23ada32184bd86007cb2de3657cfcb1175325fc83"}, + {file = "fonttools-4.41.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f240d9adf0583ac8fc1646afe7f4ac039022b6f8fa4f1575a2cfa53675360b69"}, + {file = "fonttools-4.41.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:bdd729744ae7ecd7f7311ad25d99da4999003dcfe43b436cf3c333d4e68de73d"}, + {file = "fonttools-4.41.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:b927e5f466d99c03e6e20961946314b81d6e3490d95865ef88061144d9f62e38"}, + {file = "fonttools-4.41.1-cp39-cp39-win32.whl", hash = "sha256:afce2aeb80be72b4da7dd114f10f04873ff512793d13ce0b19d12b2a4c44c0f0"}, + {file = "fonttools-4.41.1-cp39-cp39-win_amd64.whl", hash = "sha256:1df1b6f4c7c4bc8201eb47f3b268adbf2539943aa43c400f84556557e3e109c0"}, + {file = "fonttools-4.41.1-py3-none-any.whl", hash = "sha256:952cb405f78734cf6466252fec42e206450d1a6715746013f64df9cbd4f896fa"}, + {file = "fonttools-4.41.1.tar.gz", hash = "sha256:e16a9449f21a93909c5be2f5ed5246420f2316e94195dbfccb5238aaa38f9751"}, +] + +[package.extras] +all = ["brotli (>=1.0.1)", "brotlicffi (>=0.8.0)", "fs (>=2.2.0,<3)", "lxml (>=4.0,<5)", "lz4 (>=1.7.4.2)", "matplotlib", "munkres", "scipy", "skia-pathops (>=0.5.0)", "sympy", "uharfbuzz (>=0.23.0)", "unicodedata2 (>=15.0.0)", "xattr", "zopfli (>=0.1.4)"] +graphite = ["lz4 (>=1.7.4.2)"] +interpolatable = ["munkres", "scipy"] +lxml = ["lxml (>=4.0,<5)"] +pathops = ["skia-pathops (>=0.5.0)"] +plot = ["matplotlib"] +repacker = ["uharfbuzz (>=0.23.0)"] +symfont = ["sympy"] +type1 = ["xattr"] +ufo = ["fs (>=2.2.0,<3)"] +unicode = ["unicodedata2 (>=15.0.0)"] +woff = ["brotli (>=1.0.1)", "brotlicffi (>=0.8.0)", "zopfli (>=0.1.4)"] + +[[package]] +name = "importlib-resources" +version = "6.0.0" +description = "Read resources from Python packages" +optional = false +python-versions = ">=3.8" +files = [ + {file = "importlib_resources-6.0.0-py3-none-any.whl", hash = "sha256:d952faee11004c045f785bb5636e8f885bed30dc3c940d5d42798a2a4541c185"}, + {file = "importlib_resources-6.0.0.tar.gz", hash = "sha256:4cf94875a8368bd89531a756df9a9ebe1f150e0f885030b461237bc7f2d905f2"}, +] + +[package.dependencies] +zipp = {version = ">=3.1.0", markers = "python_version < \"3.10\""} + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +testing = ["pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-ruff"] + +[[package]] +name = "kiwisolver" +version = "1.4.4" +description = "A fast implementation of the Cassowary constraint solver" +optional = false +python-versions = ">=3.7" +files = [ + {file = "kiwisolver-1.4.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:2f5e60fabb7343a836360c4f0919b8cd0d6dbf08ad2ca6b9cf90bf0c76a3c4f6"}, + {file = "kiwisolver-1.4.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:10ee06759482c78bdb864f4109886dff7b8a56529bc1609d4f1112b93fe6423c"}, + {file = "kiwisolver-1.4.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c79ebe8f3676a4c6630fd3f777f3cfecf9289666c84e775a67d1d358578dc2e3"}, + {file = "kiwisolver-1.4.4-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:abbe9fa13da955feb8202e215c4018f4bb57469b1b78c7a4c5c7b93001699938"}, + {file = "kiwisolver-1.4.4-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:7577c1987baa3adc4b3c62c33bd1118c3ef5c8ddef36f0f2c950ae0b199e100d"}, + {file = "kiwisolver-1.4.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f8ad8285b01b0d4695102546b342b493b3ccc6781fc28c8c6a1bb63e95d22f09"}, + {file = "kiwisolver-1.4.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8ed58b8acf29798b036d347791141767ccf65eee7f26bde03a71c944449e53de"}, + {file = "kiwisolver-1.4.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a68b62a02953b9841730db7797422f983935aeefceb1679f0fc85cbfbd311c32"}, + {file = "kiwisolver-1.4.4-cp310-cp310-win32.whl", hash = "sha256:e92a513161077b53447160b9bd8f522edfbed4bd9759e4c18ab05d7ef7e49408"}, + {file = "kiwisolver-1.4.4-cp310-cp310-win_amd64.whl", hash = "sha256:3fe20f63c9ecee44560d0e7f116b3a747a5d7203376abeea292ab3152334d004"}, + {file = "kiwisolver-1.4.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:e0ea21f66820452a3f5d1655f8704a60d66ba1191359b96541eaf457710a5fc6"}, + {file = "kiwisolver-1.4.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:bc9db8a3efb3e403e4ecc6cd9489ea2bac94244f80c78e27c31dcc00d2790ac2"}, + {file = "kiwisolver-1.4.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d5b61785a9ce44e5a4b880272baa7cf6c8f48a5180c3e81c59553ba0cb0821ca"}, + {file = "kiwisolver-1.4.4-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c2dbb44c3f7e6c4d3487b31037b1bdbf424d97687c1747ce4ff2895795c9bf69"}, + {file = "kiwisolver-1.4.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6295ecd49304dcf3bfbfa45d9a081c96509e95f4b9d0eb7ee4ec0530c4a96514"}, + {file = "kiwisolver-1.4.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4bd472dbe5e136f96a4b18f295d159d7f26fd399136f5b17b08c4e5f498cd494"}, + {file = "kiwisolver-1.4.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bf7d9fce9bcc4752ca4a1b80aabd38f6d19009ea5cbda0e0856983cf6d0023f5"}, + {file = "kiwisolver-1.4.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:78d6601aed50c74e0ef02f4204da1816147a6d3fbdc8b3872d263338a9052c51"}, + {file = "kiwisolver-1.4.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:877272cf6b4b7e94c9614f9b10140e198d2186363728ed0f701c6eee1baec1da"}, + {file = "kiwisolver-1.4.4-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:db608a6757adabb32f1cfe6066e39b3706d8c3aa69bbc353a5b61edad36a5cb4"}, + {file = "kiwisolver-1.4.4-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:5853eb494c71e267912275e5586fe281444eb5e722de4e131cddf9d442615626"}, + {file = "kiwisolver-1.4.4-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:f0a1dbdb5ecbef0d34eb77e56fcb3e95bbd7e50835d9782a45df81cc46949750"}, + {file = "kiwisolver-1.4.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:283dffbf061a4ec60391d51e6155e372a1f7a4f5b15d59c8505339454f8989e4"}, + {file = "kiwisolver-1.4.4-cp311-cp311-win32.whl", hash = "sha256:d06adcfa62a4431d404c31216f0f8ac97397d799cd53800e9d3efc2fbb3cf14e"}, + {file = "kiwisolver-1.4.4-cp311-cp311-win_amd64.whl", hash = "sha256:e7da3fec7408813a7cebc9e4ec55afed2d0fd65c4754bc376bf03498d4e92686"}, + {file = "kiwisolver-1.4.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:62ac9cc684da4cf1778d07a89bf5f81b35834cb96ca523d3a7fb32509380cbf6"}, + {file = "kiwisolver-1.4.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:41dae968a94b1ef1897cb322b39360a0812661dba7c682aa45098eb8e193dbdf"}, + {file = "kiwisolver-1.4.4-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:02f79693ec433cb4b5f51694e8477ae83b3205768a6fb48ffba60549080e295b"}, + {file = "kiwisolver-1.4.4-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d0611a0a2a518464c05ddd5a3a1a0e856ccc10e67079bb17f265ad19ab3c7597"}, + {file = "kiwisolver-1.4.4-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:db5283d90da4174865d520e7366801a93777201e91e79bacbac6e6927cbceede"}, + {file = "kiwisolver-1.4.4-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:1041feb4cda8708ce73bb4dcb9ce1ccf49d553bf87c3954bdfa46f0c3f77252c"}, + {file = "kiwisolver-1.4.4-cp37-cp37m-win32.whl", hash = "sha256:a553dadda40fef6bfa1456dc4be49b113aa92c2a9a9e8711e955618cd69622e3"}, + {file = "kiwisolver-1.4.4-cp37-cp37m-win_amd64.whl", hash = "sha256:03baab2d6b4a54ddbb43bba1a3a2d1627e82d205c5cf8f4c924dc49284b87166"}, + {file = "kiwisolver-1.4.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:841293b17ad704d70c578f1f0013c890e219952169ce8a24ebc063eecf775454"}, + {file = "kiwisolver-1.4.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:f4f270de01dd3e129a72efad823da90cc4d6aafb64c410c9033aba70db9f1ff0"}, + {file = "kiwisolver-1.4.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:f9f39e2f049db33a908319cf46624a569b36983c7c78318e9726a4cb8923b26c"}, + {file = "kiwisolver-1.4.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c97528e64cb9ebeff9701e7938653a9951922f2a38bd847787d4a8e498cc83ae"}, + {file = "kiwisolver-1.4.4-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1d1573129aa0fd901076e2bfb4275a35f5b7aa60fbfb984499d661ec950320b0"}, + {file = "kiwisolver-1.4.4-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ad881edc7ccb9d65b0224f4e4d05a1e85cf62d73aab798943df6d48ab0cd79a1"}, + {file = "kiwisolver-1.4.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b428ef021242344340460fa4c9185d0b1f66fbdbfecc6c63eff4b7c29fad429d"}, + {file = "kiwisolver-1.4.4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:2e407cb4bd5a13984a6c2c0fe1845e4e41e96f183e5e5cd4d77a857d9693494c"}, + {file = "kiwisolver-1.4.4-cp38-cp38-win32.whl", hash = "sha256:75facbe9606748f43428fc91a43edb46c7ff68889b91fa31f53b58894503a191"}, + {file = "kiwisolver-1.4.4-cp38-cp38-win_amd64.whl", hash = "sha256:5bce61af018b0cb2055e0e72e7d65290d822d3feee430b7b8203d8a855e78766"}, + {file = "kiwisolver-1.4.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:8c808594c88a025d4e322d5bb549282c93c8e1ba71b790f539567932722d7bd8"}, + {file = "kiwisolver-1.4.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f0a71d85ecdd570ded8ac3d1c0f480842f49a40beb423bb8014539a9f32a5897"}, + {file = "kiwisolver-1.4.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b533558eae785e33e8c148a8d9921692a9fe5aa516efbdff8606e7d87b9d5824"}, + {file = "kiwisolver-1.4.4-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:efda5fc8cc1c61e4f639b8067d118e742b812c930f708e6667a5ce0d13499e29"}, + {file = "kiwisolver-1.4.4-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:7c43e1e1206cd421cd92e6b3280d4385d41d7166b3ed577ac20444b6995a445f"}, + {file = "kiwisolver-1.4.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bc8d3bd6c72b2dd9decf16ce70e20abcb3274ba01b4e1c96031e0c4067d1e7cd"}, + {file = "kiwisolver-1.4.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4ea39b0ccc4f5d803e3337dd46bcce60b702be4d86fd0b3d7531ef10fd99a1ac"}, + {file = "kiwisolver-1.4.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:968f44fdbf6dd757d12920d63b566eeb4d5b395fd2d00d29d7ef00a00582aac9"}, + {file = "kiwisolver-1.4.4-cp39-cp39-win32.whl", hash = "sha256:da7e547706e69e45d95e116e6939488d62174e033b763ab1496b4c29b76fabea"}, + {file = "kiwisolver-1.4.4-cp39-cp39-win_amd64.whl", hash = "sha256:ba59c92039ec0a66103b1d5fe588fa546373587a7d68f5c96f743c3396afc04b"}, + {file = "kiwisolver-1.4.4-pp37-pypy37_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:91672bacaa030f92fc2f43b620d7b337fd9a5af28b0d6ed3f77afc43c4a64b5a"}, + {file = "kiwisolver-1.4.4-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:787518a6789009c159453da4d6b683f468ef7a65bbde796bcea803ccf191058d"}, + {file = "kiwisolver-1.4.4-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:da152d8cdcab0e56e4f45eb08b9aea6455845ec83172092f09b0e077ece2cf7a"}, + {file = "kiwisolver-1.4.4-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:ecb1fa0db7bf4cff9dac752abb19505a233c7f16684c5826d1f11ebd9472b871"}, + {file = "kiwisolver-1.4.4-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:28bc5b299f48150b5f822ce68624e445040595a4ac3d59251703779836eceff9"}, + {file = "kiwisolver-1.4.4-pp38-pypy38_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:81e38381b782cc7e1e46c4e14cd997ee6040768101aefc8fa3c24a4cc58e98f8"}, + {file = "kiwisolver-1.4.4-pp38-pypy38_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:2a66fdfb34e05b705620dd567f5a03f239a088d5a3f321e7b6ac3239d22aa286"}, + {file = "kiwisolver-1.4.4-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:872b8ca05c40d309ed13eb2e582cab0c5a05e81e987ab9c521bf05ad1d5cf5cb"}, + {file = "kiwisolver-1.4.4-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:70e7c2e7b750585569564e2e5ca9845acfaa5da56ac46df68414f29fea97be9f"}, + {file = "kiwisolver-1.4.4-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:9f85003f5dfa867e86d53fac6f7e6f30c045673fa27b603c397753bebadc3008"}, + {file = "kiwisolver-1.4.4-pp39-pypy39_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2e307eb9bd99801f82789b44bb45e9f541961831c7311521b13a6c85afc09767"}, + {file = "kiwisolver-1.4.4-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b1792d939ec70abe76f5054d3f36ed5656021dcad1322d1cc996d4e54165cef9"}, + {file = "kiwisolver-1.4.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f6cb459eea32a4e2cf18ba5fcece2dbdf496384413bc1bae15583f19e567f3b2"}, + {file = "kiwisolver-1.4.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:36dafec3d6d6088d34e2de6b85f9d8e2324eb734162fba59d2ba9ed7a2043d5b"}, + {file = "kiwisolver-1.4.4.tar.gz", hash = "sha256:d41997519fcba4a1e46eb4a2fe31bc12f0ff957b2b81bac28db24744f333e955"}, +] + +[[package]] +name = "matplotlib" +version = "3.7.2" +description = "Python plotting package" +optional = false +python-versions = ">=3.8" +files = [ + {file = "matplotlib-3.7.2-cp310-cp310-macosx_10_12_universal2.whl", hash = "sha256:2699f7e73a76d4c110f4f25be9d2496d6ab4f17345307738557d345f099e07de"}, + {file = "matplotlib-3.7.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:a8035ba590658bae7562786c9cc6ea1a84aa49d3afab157e414c9e2ea74f496d"}, + {file = "matplotlib-3.7.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2f8e4a49493add46ad4a8c92f63e19d548b2b6ebbed75c6b4c7f46f57d36cdd1"}, + {file = "matplotlib-3.7.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:71667eb2ccca4c3537d9414b1bc00554cb7f91527c17ee4ec38027201f8f1603"}, + {file = "matplotlib-3.7.2-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:152ee0b569a37630d8628534c628456b28686e085d51394da6b71ef84c4da201"}, + {file = "matplotlib-3.7.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:070f8dddd1f5939e60aacb8fa08f19551f4b0140fab16a3669d5cd6e9cb28fc8"}, + {file = "matplotlib-3.7.2-cp310-cp310-win32.whl", hash = "sha256:fdbb46fad4fb47443b5b8ac76904b2e7a66556844f33370861b4788db0f8816a"}, + {file = "matplotlib-3.7.2-cp310-cp310-win_amd64.whl", hash = "sha256:23fb1750934e5f0128f9423db27c474aa32534cec21f7b2153262b066a581fd1"}, + {file = "matplotlib-3.7.2-cp311-cp311-macosx_10_12_universal2.whl", hash = "sha256:30e1409b857aa8a747c5d4f85f63a79e479835f8dffc52992ac1f3f25837b544"}, + {file = "matplotlib-3.7.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:50e0a55ec74bf2d7a0ebf50ac580a209582c2dd0f7ab51bc270f1b4a0027454e"}, + {file = "matplotlib-3.7.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ac60daa1dc83e8821eed155796b0f7888b6b916cf61d620a4ddd8200ac70cd64"}, + {file = "matplotlib-3.7.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:305e3da477dc8607336ba10bac96986d6308d614706cae2efe7d3ffa60465b24"}, + {file = "matplotlib-3.7.2-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1c308b255efb9b06b23874236ec0f10f026673ad6515f602027cc8ac7805352d"}, + {file = "matplotlib-3.7.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:60c521e21031632aa0d87ca5ba0c1c05f3daacadb34c093585a0be6780f698e4"}, + {file = "matplotlib-3.7.2-cp311-cp311-win32.whl", hash = "sha256:26bede320d77e469fdf1bde212de0ec889169b04f7f1179b8930d66f82b30cbc"}, + {file = "matplotlib-3.7.2-cp311-cp311-win_amd64.whl", hash = "sha256:af4860132c8c05261a5f5f8467f1b269bf1c7c23902d75f2be57c4a7f2394b3e"}, + {file = "matplotlib-3.7.2-cp38-cp38-macosx_10_12_universal2.whl", hash = "sha256:a1733b8e84e7e40a9853e505fe68cc54339f97273bdfe6f3ed980095f769ddc7"}, + {file = "matplotlib-3.7.2-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:d9881356dc48e58910c53af82b57183879129fa30492be69058c5b0d9fddf391"}, + {file = "matplotlib-3.7.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:f081c03f413f59390a80b3e351cc2b2ea0205839714dbc364519bcf51f4b56ca"}, + {file = "matplotlib-3.7.2-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:1cd120fca3407a225168238b790bd5c528f0fafde6172b140a2f3ab7a4ea63e9"}, + {file = "matplotlib-3.7.2-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:a2c1590b90aa7bd741b54c62b78de05d4186271e34e2377e0289d943b3522273"}, + {file = "matplotlib-3.7.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6d2ff3c984b8a569bc1383cd468fc06b70d7b59d5c2854ca39f1436ae8394117"}, + {file = "matplotlib-3.7.2-cp38-cp38-win32.whl", hash = "sha256:5dea00b62d28654b71ca92463656d80646675628d0828e08a5f3b57e12869e13"}, + {file = "matplotlib-3.7.2-cp38-cp38-win_amd64.whl", hash = "sha256:0f506a1776ee94f9e131af1ac6efa6e5bc7cb606a3e389b0ccb6e657f60bb676"}, + {file = "matplotlib-3.7.2-cp39-cp39-macosx_10_12_universal2.whl", hash = "sha256:6515e878f91894c2e4340d81f0911857998ccaf04dbc1bba781e3d89cbf70608"}, + {file = "matplotlib-3.7.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:71f7a8c6b124e904db550f5b9fe483d28b896d4135e45c4ea381ad3b8a0e3256"}, + {file = "matplotlib-3.7.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:12f01b92ecd518e0697da4d97d163b2b3aa55eb3eb4e2c98235b3396d7dad55f"}, + {file = "matplotlib-3.7.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a7e28d6396563955f7af437894a36bf2b279462239a41028323e04b85179058b"}, + {file = "matplotlib-3.7.2-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dbcf59334ff645e6a67cd5f78b4b2cdb76384cdf587fa0d2dc85f634a72e1a3e"}, + {file = "matplotlib-3.7.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:318c89edde72ff95d8df67d82aca03861240512994a597a435a1011ba18dbc7f"}, + {file = "matplotlib-3.7.2-cp39-cp39-win32.whl", hash = "sha256:ce55289d5659b5b12b3db4dc9b7075b70cef5631e56530f14b2945e8836f2d20"}, + {file = "matplotlib-3.7.2-cp39-cp39-win_amd64.whl", hash = "sha256:2ecb5be2b2815431c81dc115667e33da0f5a1bcf6143980d180d09a717c4a12e"}, + {file = "matplotlib-3.7.2-pp38-pypy38_pp73-macosx_10_12_x86_64.whl", hash = "sha256:fdcd28360dbb6203fb5219b1a5658df226ac9bebc2542a9e8f457de959d713d0"}, + {file = "matplotlib-3.7.2-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0c3cca3e842b11b55b52c6fb8bd6a4088693829acbfcdb3e815fa9b7d5c92c1b"}, + {file = "matplotlib-3.7.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ebf577c7a6744e9e1bd3fee45fc74a02710b214f94e2bde344912d85e0c9af7c"}, + {file = "matplotlib-3.7.2-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:936bba394682049919dda062d33435b3be211dc3dcaa011e09634f060ec878b2"}, + {file = "matplotlib-3.7.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:bc221ffbc2150458b1cd71cdd9ddd5bb37962b036e41b8be258280b5b01da1dd"}, + {file = "matplotlib-3.7.2-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:35d74ebdb3f71f112b36c2629cf32323adfbf42679e2751252acd468f5001c07"}, + {file = "matplotlib-3.7.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:717157e61b3a71d3d26ad4e1770dc85156c9af435659a25ee6407dc866cb258d"}, + {file = "matplotlib-3.7.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:20f844d6be031948148ba49605c8b96dfe7d3711d1b63592830d650622458c11"}, + {file = "matplotlib-3.7.2.tar.gz", hash = "sha256:a8cdb91dddb04436bd2f098b8fdf4b81352e68cf4d2c6756fcc414791076569b"}, +] + +[package.dependencies] +contourpy = ">=1.0.1" +cycler = ">=0.10" +fonttools = ">=4.22.0" +importlib-resources = {version = ">=3.2.0", markers = "python_version < \"3.10\""} +kiwisolver = ">=1.0.1" +numpy = ">=1.20" +packaging = ">=20.0" +pillow = ">=6.2.0" +pyparsing = ">=2.3.1,<3.1" +python-dateutil = ">=2.7" + +[[package]] +name = "numpy" +version = "1.25.1" +description = "Fundamental package for array computing in Python" +optional = false +python-versions = ">=3.9" +files = [ + {file = "numpy-1.25.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:77d339465dff3eb33c701430bcb9c325b60354698340229e1dff97745e6b3efa"}, + {file = "numpy-1.25.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d736b75c3f2cb96843a5c7f8d8ccc414768d34b0a75f466c05f3a739b406f10b"}, + {file = "numpy-1.25.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4a90725800caeaa160732d6b31f3f843ebd45d6b5f3eec9e8cc287e30f2805bf"}, + {file = "numpy-1.25.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c6c9261d21e617c6dc5eacba35cb68ec36bb72adcff0dee63f8fbc899362588"}, + {file = "numpy-1.25.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0def91f8af6ec4bb94c370e38c575855bf1d0be8a8fbfba42ef9c073faf2cf19"}, + {file = "numpy-1.25.1-cp310-cp310-win32.whl", hash = "sha256:fd67b306320dcadea700a8f79b9e671e607f8696e98ec255915c0c6d6b818503"}, + {file = "numpy-1.25.1-cp310-cp310-win_amd64.whl", hash = "sha256:c1516db588987450b85595586605742879e50dcce923e8973f79529651545b57"}, + {file = "numpy-1.25.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6b82655dd8efeea69dbf85d00fca40013d7f503212bc5259056244961268b66e"}, + {file = "numpy-1.25.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e8f6049c4878cb16960fbbfb22105e49d13d752d4d8371b55110941fb3b17800"}, + {file = "numpy-1.25.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:41a56b70e8139884eccb2f733c2f7378af06c82304959e174f8e7370af112e09"}, + {file = "numpy-1.25.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d5154b1a25ec796b1aee12ac1b22f414f94752c5f94832f14d8d6c9ac40bcca6"}, + {file = "numpy-1.25.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:38eb6548bb91c421261b4805dc44def9ca1a6eef6444ce35ad1669c0f1a3fc5d"}, + {file = "numpy-1.25.1-cp311-cp311-win32.whl", hash = "sha256:791f409064d0a69dd20579345d852c59822c6aa087f23b07b1b4e28ff5880fcb"}, + {file = "numpy-1.25.1-cp311-cp311-win_amd64.whl", hash = "sha256:c40571fe966393b212689aa17e32ed905924120737194b5d5c1b20b9ed0fb171"}, + {file = "numpy-1.25.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3d7abcdd85aea3e6cdddb59af2350c7ab1ed764397f8eec97a038ad244d2d105"}, + {file = "numpy-1.25.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1a180429394f81c7933634ae49b37b472d343cccb5bb0c4a575ac8bbc433722f"}, + {file = "numpy-1.25.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d412c1697c3853c6fc3cb9751b4915859c7afe6a277c2bf00acf287d56c4e625"}, + {file = "numpy-1.25.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:20e1266411120a4f16fad8efa8e0454d21d00b8c7cee5b5ccad7565d95eb42dd"}, + {file = "numpy-1.25.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:f76aebc3358ade9eacf9bc2bb8ae589863a4f911611694103af05346637df1b7"}, + {file = "numpy-1.25.1-cp39-cp39-win32.whl", hash = "sha256:247d3ffdd7775bdf191f848be8d49100495114c82c2bd134e8d5d075fb386a1c"}, + {file = "numpy-1.25.1-cp39-cp39-win_amd64.whl", hash = "sha256:1d5d3c68e443c90b38fdf8ef40e60e2538a27548b39b12b73132456847f4b631"}, + {file = "numpy-1.25.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:35a9527c977b924042170a0887de727cd84ff179e478481404c5dc66b4170009"}, + {file = "numpy-1.25.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0d3fe3dd0506a28493d82dc3cf254be8cd0d26f4008a417385cbf1ae95b54004"}, + {file = "numpy-1.25.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:012097b5b0d00a11070e8f2e261128c44157a8689f7dedcf35576e525893f4fe"}, + {file = "numpy-1.25.1.tar.gz", hash = "sha256:9a3a9f3a61480cc086117b426a8bd86869c213fc4072e606f01c4e4b66eb92bf"}, +] + +[[package]] +name = "packaging" +version = "23.1" +description = "Core utilities for Python packages" +optional = false +python-versions = ">=3.7" +files = [ + {file = "packaging-23.1-py3-none-any.whl", hash = "sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61"}, + {file = "packaging-23.1.tar.gz", hash = "sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f"}, +] + +[[package]] +name = "pillow" +version = "10.0.0" +description = "Python Imaging Library (Fork)" +optional = false +python-versions = ">=3.8" +files = [ + {file = "Pillow-10.0.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:1f62406a884ae75fb2f818694469519fb685cc7eaff05d3451a9ebe55c646891"}, + {file = "Pillow-10.0.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d5db32e2a6ccbb3d34d87c87b432959e0db29755727afb37290e10f6e8e62614"}, + {file = "Pillow-10.0.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:edf4392b77bdc81f36e92d3a07a5cd072f90253197f4a52a55a8cec48a12483b"}, + {file = "Pillow-10.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:520f2a520dc040512699f20fa1c363eed506e94248d71f85412b625026f6142c"}, + {file = "Pillow-10.0.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:8c11160913e3dd06c8ffdb5f233a4f254cb449f4dfc0f8f4549eda9e542c93d1"}, + {file = "Pillow-10.0.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:a74ba0c356aaa3bb8e3eb79606a87669e7ec6444be352870623025d75a14a2bf"}, + {file = "Pillow-10.0.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d5d0dae4cfd56969d23d94dc8e89fb6a217be461c69090768227beb8ed28c0a3"}, + {file = "Pillow-10.0.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:22c10cc517668d44b211717fd9775799ccec4124b9a7f7b3635fc5386e584992"}, + {file = "Pillow-10.0.0-cp310-cp310-win_amd64.whl", hash = "sha256:dffe31a7f47b603318c609f378ebcd57f1554a3a6a8effbc59c3c69f804296de"}, + {file = "Pillow-10.0.0-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:9fb218c8a12e51d7ead2a7c9e101a04982237d4855716af2e9499306728fb485"}, + {file = "Pillow-10.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d35e3c8d9b1268cbf5d3670285feb3528f6680420eafe35cccc686b73c1e330f"}, + {file = "Pillow-10.0.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3ed64f9ca2f0a95411e88a4efbd7a29e5ce2cea36072c53dd9d26d9c76f753b3"}, + {file = "Pillow-10.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0b6eb5502f45a60a3f411c63187db83a3d3107887ad0d036c13ce836f8a36f1d"}, + {file = "Pillow-10.0.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:c1fbe7621c167ecaa38ad29643d77a9ce7311583761abf7836e1510c580bf3dd"}, + {file = "Pillow-10.0.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:cd25d2a9d2b36fcb318882481367956d2cf91329f6892fe5d385c346c0649629"}, + {file = "Pillow-10.0.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:3b08d4cc24f471b2c8ca24ec060abf4bebc6b144cb89cba638c720546b1cf538"}, + {file = "Pillow-10.0.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d737a602fbd82afd892ca746392401b634e278cb65d55c4b7a8f48e9ef8d008d"}, + {file = "Pillow-10.0.0-cp311-cp311-win_amd64.whl", hash = "sha256:3a82c40d706d9aa9734289740ce26460a11aeec2d9c79b7af87bb35f0073c12f"}, + {file = "Pillow-10.0.0-cp311-cp311-win_arm64.whl", hash = "sha256:bc2ec7c7b5d66b8ec9ce9f720dbb5fa4bace0f545acd34870eff4a369b44bf37"}, + {file = "Pillow-10.0.0-cp312-cp312-macosx_10_10_x86_64.whl", hash = "sha256:d80cf684b541685fccdd84c485b31ce73fc5c9b5d7523bf1394ce134a60c6883"}, + {file = "Pillow-10.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:76de421f9c326da8f43d690110f0e79fe3ad1e54be811545d7d91898b4c8493e"}, + {file = "Pillow-10.0.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:81ff539a12457809666fef6624684c008e00ff6bf455b4b89fd00a140eecd640"}, + {file = "Pillow-10.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ce543ed15570eedbb85df19b0a1a7314a9c8141a36ce089c0a894adbfccb4568"}, + {file = "Pillow-10.0.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:685ac03cc4ed5ebc15ad5c23bc555d68a87777586d970c2c3e216619a5476223"}, + {file = "Pillow-10.0.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:d72e2ecc68a942e8cf9739619b7f408cc7b272b279b56b2c83c6123fcfa5cdff"}, + {file = "Pillow-10.0.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d50b6aec14bc737742ca96e85d6d0a5f9bfbded018264b3b70ff9d8c33485551"}, + {file = "Pillow-10.0.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:00e65f5e822decd501e374b0650146063fbb30a7264b4d2744bdd7b913e0cab5"}, + {file = "Pillow-10.0.0-cp312-cp312-win_amd64.whl", hash = "sha256:f31f9fdbfecb042d046f9d91270a0ba28368a723302786c0009ee9b9f1f60199"}, + {file = "Pillow-10.0.0-cp312-cp312-win_arm64.whl", hash = "sha256:1ce91b6ec08d866b14413d3f0bbdea7e24dfdc8e59f562bb77bc3fe60b6144ca"}, + {file = "Pillow-10.0.0-cp38-cp38-macosx_10_10_x86_64.whl", hash = "sha256:349930d6e9c685c089284b013478d6f76e3a534e36ddfa912cde493f235372f3"}, + {file = "Pillow-10.0.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:3a684105f7c32488f7153905a4e3015a3b6c7182e106fe3c37fbb5ef3e6994c3"}, + {file = "Pillow-10.0.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b4f69b3700201b80bb82c3a97d5e9254084f6dd5fb5b16fc1a7b974260f89f43"}, + {file = "Pillow-10.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3f07ea8d2f827d7d2a49ecf1639ec02d75ffd1b88dcc5b3a61bbb37a8759ad8d"}, + {file = "Pillow-10.0.0-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:040586f7d37b34547153fa383f7f9aed68b738992380ac911447bb78f2abe530"}, + {file = "Pillow-10.0.0-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:f88a0b92277de8e3ca715a0d79d68dc82807457dae3ab8699c758f07c20b3c51"}, + {file = "Pillow-10.0.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:c7cf14a27b0d6adfaebb3ae4153f1e516df54e47e42dcc073d7b3d76111a8d86"}, + {file = "Pillow-10.0.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:3400aae60685b06bb96f99a21e1ada7bc7a413d5f49bce739828ecd9391bb8f7"}, + {file = "Pillow-10.0.0-cp38-cp38-win_amd64.whl", hash = "sha256:dbc02381779d412145331789b40cc7b11fdf449e5d94f6bc0b080db0a56ea3f0"}, + {file = "Pillow-10.0.0-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:9211e7ad69d7c9401cfc0e23d49b69ca65ddd898976d660a2fa5904e3d7a9baa"}, + {file = "Pillow-10.0.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:faaf07ea35355b01a35cb442dd950d8f1bb5b040a7787791a535de13db15ed90"}, + {file = "Pillow-10.0.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c9f72a021fbb792ce98306ffb0c348b3c9cb967dce0f12a49aa4c3d3fdefa967"}, + {file = "Pillow-10.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9f7c16705f44e0504a3a2a14197c1f0b32a95731d251777dcb060aa83022cb2d"}, + {file = "Pillow-10.0.0-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:76edb0a1fa2b4745fb0c99fb9fb98f8b180a1bbceb8be49b087e0b21867e77d3"}, + {file = "Pillow-10.0.0-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:368ab3dfb5f49e312231b6f27b8820c823652b7cd29cfbd34090565a015e99ba"}, + {file = "Pillow-10.0.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:608bfdee0d57cf297d32bcbb3c728dc1da0907519d1784962c5f0c68bb93e5a3"}, + {file = "Pillow-10.0.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5c6e3df6bdd396749bafd45314871b3d0af81ff935b2d188385e970052091017"}, + {file = "Pillow-10.0.0-cp39-cp39-win_amd64.whl", hash = "sha256:7be600823e4c8631b74e4a0d38384c73f680e6105a7d3c6824fcf226c178c7e6"}, + {file = "Pillow-10.0.0-pp310-pypy310_pp73-macosx_10_10_x86_64.whl", hash = "sha256:92be919bbc9f7d09f7ae343c38f5bb21c973d2576c1d45600fce4b74bafa7ac0"}, + {file = "Pillow-10.0.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f8182b523b2289f7c415f589118228d30ac8c355baa2f3194ced084dac2dbba"}, + {file = "Pillow-10.0.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:38250a349b6b390ee6047a62c086d3817ac69022c127f8a5dc058c31ccef17f3"}, + {file = "Pillow-10.0.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:88af2003543cc40c80f6fca01411892ec52b11021b3dc22ec3bc9d5afd1c5334"}, + {file = "Pillow-10.0.0-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:c189af0545965fa8d3b9613cfdb0cd37f9d71349e0f7750e1fd704648d475ed2"}, + {file = "Pillow-10.0.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ce7b031a6fc11365970e6a5686d7ba8c63e4c1cf1ea143811acbb524295eabed"}, + {file = "Pillow-10.0.0-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:db24668940f82321e746773a4bc617bfac06ec831e5c88b643f91f122a785684"}, + {file = "Pillow-10.0.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:efe8c0681042536e0d06c11f48cebe759707c9e9abf880ee213541c5b46c5bf3"}, + {file = "Pillow-10.0.0.tar.gz", hash = "sha256:9c82b5b3e043c7af0d95792d0d20ccf68f61a1fec6b3530e718b688422727396"}, +] + +[package.extras] +docs = ["furo", "olefile", "sphinx (>=2.4)", "sphinx-copybutton", "sphinx-inline-tabs", "sphinx-removed-in", "sphinxext-opengraph"] +tests = ["check-manifest", "coverage", "defusedxml", "markdown2", "olefile", "packaging", "pyroma", "pytest", "pytest-cov", "pytest-timeout"] + +[[package]] +name = "pyparsing" +version = "3.0.9" +description = "pyparsing module - Classes and methods to define and execute parsing grammars" +optional = false +python-versions = ">=3.6.8" +files = [ + {file = "pyparsing-3.0.9-py3-none-any.whl", hash = "sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc"}, + {file = "pyparsing-3.0.9.tar.gz", hash = "sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb"}, +] + +[package.extras] +diagrams = ["jinja2", "railroad-diagrams"] + +[[package]] +name = "python-dateutil" +version = "2.8.2" +description = "Extensions to the standard Python datetime module" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" +files = [ + {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"}, + {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"}, +] + +[package.dependencies] +six = ">=1.5" + +[[package]] +name = "six" +version = "1.16.0" +description = "Python 2 and 3 compatibility utilities" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +files = [ + {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, + {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, +] + +[[package]] +name = "thrift" +version = "0.16.0" +description = "Python bindings for the Apache Thrift RPC system" +optional = false +python-versions = "*" +files = [ + {file = "thrift-0.16.0.tar.gz", hash = "sha256:2b5b6488fcded21f9d312aa23c9ff6a0195d0f6ae26ddbd5ad9e3e25dfc14408"}, +] + +[package.dependencies] +six = ">=1.7.2" + +[package.extras] +all = ["tornado (>=4.0)", "twisted"] +tornado = ["tornado (>=4.0)"] +twisted = ["twisted"] + +[[package]] +name = "vtk" +version = "9.2.6" +description = "VTK is an open-source toolkit for 3D computer graphics, image processing, and visualization" +optional = false +python-versions = "*" +files = [ + {file = "vtk-9.2.6-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:acf8b0e0a2b51b8aa36cee1ea1ba0b73c565871efaa14cf2606d9bef36feba3a"}, + {file = "vtk-9.2.6-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8ec9827287f1743c736ea9b51572d20dcd15a065170808f97408eebd404275b4"}, + {file = "vtk-9.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3473f3b3dc919d3e2ef0cc9927654731941fd7b79d3dcaa343cdaff3e4e40838"}, + {file = "vtk-9.2.6-cp310-cp310-win_amd64.whl", hash = "sha256:37561b19b4b70c7034d9e689238560d7afec49ff89704b9bb3c9bb89a90ee54e"}, + {file = "vtk-9.2.6-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:9289f6ee5432f0a00aeb7b674d7ca03054bc50fa6c74126751f8b19f931f52fc"}, + {file = "vtk-9.2.6-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:0b947a33a7c5562ac4d9c8dce389f4ed720cc2559389048993ae45cbed3bbeb1"}, + {file = "vtk-9.2.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:87930115c8067a2d482beebc48a50fcacdc0154d8d7c763471a9be8b5eb76cc3"}, + {file = "vtk-9.2.6-cp311-cp311-win_amd64.whl", hash = "sha256:6c3ca0663f251fbd6e26d93294801ceee6c3cc329f6070dccde3b68046ab9ee7"}, + {file = "vtk-9.2.6-cp36-cp36m-macosx_10_10_x86_64.whl", hash = "sha256:86c548da22a0bd9ce9e060364925e8fa0a551064f9660ae1d486ac3118ffb770"}, + {file = "vtk-9.2.6-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f7622e98b3590bf909f056a1bad55575760727fd673c3e8e224134d52b11d00d"}, + {file = "vtk-9.2.6-cp36-cp36m-win_amd64.whl", hash = "sha256:bb28432277136774e91eb1084a8f5f1c4c952d4e74f74626a16ac6e199eba5c5"}, + {file = "vtk-9.2.6-cp37-cp37m-macosx_10_10_x86_64.whl", hash = "sha256:feb9d211583d7b1dd45ca6616bf2f9622d0eadf9e3084f53d20de819e5808d42"}, + {file = "vtk-9.2.6-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3bc1123b6f2f3746d35325cf1a48630c8f49a3516c9970a5bdea15823909bbca"}, + {file = "vtk-9.2.6-cp37-cp37m-win_amd64.whl", hash = "sha256:78103568e97d947026cd39a70e6719277d7341f984c06abaec64d3429e200a6f"}, + {file = "vtk-9.2.6-cp38-cp38-macosx_10_10_x86_64.whl", hash = "sha256:8236e00d0ad24730f4b783bbc038108426e6a78c892fd6ae9a8e8eb846f3e8e3"}, + {file = "vtk-9.2.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:affbb15762bcb6d9632a668ec53c6a3102d4f6c14c4178f01489c0b711114521"}, + {file = "vtk-9.2.6-cp38-cp38-win_amd64.whl", hash = "sha256:f9d3450c00ced28f942a0a7dc5f27a667cf6b171d9ef5a090cb7c8e21dd1a121"}, + {file = "vtk-9.2.6-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:9b396909a4372d3be4a01fde4a0af4f3e410742d73d185982c6f48a61090ebfe"}, + {file = "vtk-9.2.6-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:9d41a18bbd6fac18a814bbaeeb615044da036afc2bd98cdf7ea52853fd1ef950"}, + {file = "vtk-9.2.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:79991dccbc483a8e5d23e5d3ae1e358fee0526fe8f710d07868ecae58c6b9535"}, + {file = "vtk-9.2.6-cp39-cp39-win_amd64.whl", hash = "sha256:2d905a686ee1b28dd2ac3c3595a3fbcbd171e4b1f9aabac3c8019c6f3a4f8157"}, +] + +[package.dependencies] +matplotlib = ">=2.0.0" + +[package.extras] +numpy = ["numpy (>=1.9)"] +web = ["wslink (>=1.0.4)"] + +[[package]] +name = "zipp" +version = "3.16.2" +description = "Backport of pathlib-compatible object wrapper for zip files" +optional = false +python-versions = ">=3.8" +files = [ + {file = "zipp-3.16.2-py3-none-any.whl", hash = "sha256:679e51dd4403591b2d6838a48de3d283f3d188412a9782faadf845f298736ba0"}, + {file = "zipp-3.16.2.tar.gz", hash = "sha256:ebc15946aa78bd63458992fc81ec3b6f7b1e92d51c35e6de1c3804e73b799147"}, +] + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy (>=0.9.1)", "pytest-ruff"] + +[metadata] +lock-version = "2.0" +python-versions = "^3.9" +content-hash = "86bd7d80887ec92066f94784de565257b546a1dac9f43dbd1557707623ead830" diff --git a/pythonVtk/pyproject.toml b/pythonVtk/pyproject.toml new file mode 100644 index 0000000000..b3de55fb8e --- /dev/null +++ b/pythonVtk/pyproject.toml @@ -0,0 +1,16 @@ +[tool.poetry] +name = "pythonvtk" +version = "0.1.0" +description = "" +authors = ["Jim Schaff "] +readme = "README.md" + +[tool.poetry.dependencies] +python = "^3.9" +vtk = "^9.2.6" +thrift = "^0.16.0" + +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" + diff --git a/pythonScripts/VCell_Opt/vcellopt/__init__.py b/pythonVtk/vcellvismesh/__init__.py similarity index 100% rename from pythonScripts/VCell_Opt/vcellopt/__init__.py rename to pythonVtk/vcellvismesh/__init__.py diff --git a/pythonScripts/VCell_ImageJ/vcellij/constants.py b/pythonVtk/vcellvismesh/constants.py similarity index 77% rename from pythonScripts/VCell_ImageJ/vcellij/constants.py rename to pythonVtk/vcellvismesh/constants.py index eb0d35aa12..a352d6b7ad 100644 --- a/pythonScripts/VCell_ImageJ/vcellij/constants.py +++ b/pythonVtk/vcellvismesh/constants.py @@ -1,5 +1,5 @@ # -# Autogenerated by Thrift Compiler (0.10.0) +# Autogenerated by Thrift Compiler (0.18.1) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # @@ -8,5 +8,7 @@ from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException from thrift.protocol.TProtocol import TProtocolException +from thrift.TRecursive import fix_spec + import sys from .ttypes import * diff --git a/pythonScripts/VCell_VTK/vcellvismesh/ttypes.py b/pythonVtk/vcellvismesh/ttypes.py similarity index 86% rename from pythonScripts/VCell_VTK/vcellvismesh/ttypes.py rename to pythonVtk/vcellvismesh/ttypes.py index d48246983e..ca95816cb3 100644 --- a/pythonScripts/VCell_VTK/vcellvismesh/ttypes.py +++ b/pythonVtk/vcellvismesh/ttypes.py @@ -1,5 +1,5 @@ # -# Autogenerated by Thrift Compiler (0.10.0) +# Autogenerated by Thrift Compiler (0.18.1) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # @@ -8,9 +8,12 @@ from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException from thrift.protocol.TProtocol import TProtocolException +from thrift.TRecursive import fix_spec + import sys from thrift.transport import TTransport +all_structs = [] class Face(object): @@ -46,14 +49,9 @@ class Vect3D(object): - x - y - z + """ - thrift_spec = ( - None, # 0 - (1, TType.DOUBLE, 'x', None, None, ), # 1 - (2, TType.DOUBLE, 'y', None, None, ), # 2 - (3, TType.DOUBLE, 'z', None, None, ), # 3 - ) def __init__(self, x=None, y=None, z=None,): self.x = x @@ -62,7 +60,7 @@ def __init__(self, x=None, y=None, z=None,): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -91,7 +89,7 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('Vect3D') if self.x is not None: @@ -136,14 +134,9 @@ class VisPoint(object): - x - y - z + """ - thrift_spec = ( - None, # 0 - (1, TType.DOUBLE, 'x', None, None, ), # 1 - (2, TType.DOUBLE, 'y', None, None, ), # 2 - (3, TType.DOUBLE, 'z', None, None, ), # 3 - ) def __init__(self, x=None, y=None, z=None,): self.x = x @@ -152,7 +145,7 @@ def __init__(self, x=None, y=None, z=None,): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -181,7 +174,7 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('VisPoint') if self.x is not None: @@ -227,15 +220,9 @@ class ChomboVolumeIndex(object): - boxNumber - boxIndex - fraction + """ - thrift_spec = ( - None, # 0 - (1, TType.I32, 'level', None, None, ), # 1 - (2, TType.I32, 'boxNumber', None, None, ), # 2 - (3, TType.I32, 'boxIndex', None, None, ), # 3 - (4, TType.DOUBLE, 'fraction', None, None, ), # 4 - ) def __init__(self, level=None, boxNumber=None, boxIndex=None, fraction=None,): self.level = level @@ -245,7 +232,7 @@ def __init__(self, level=None, boxNumber=None, boxIndex=None, fraction=None,): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -279,7 +266,7 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('ChomboVolumeIndex') if self.level is not None: @@ -328,19 +315,16 @@ class ChomboSurfaceIndex(object): """ Attributes: - index + """ - thrift_spec = ( - None, # 0 - (1, TType.I32, 'index', None, None, ), # 1 - ) def __init__(self, index=None,): self.index = index def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -359,7 +343,7 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('ChomboSurfaceIndex') if self.index is not None: @@ -390,19 +374,16 @@ class MovingBoundarySurfaceIndex(object): """ Attributes: - index + """ - thrift_spec = ( - None, # 0 - (1, TType.I32, 'index', None, None, ), # 1 - ) def __init__(self, index=None,): self.index = index def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -421,7 +402,7 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('MovingBoundarySurfaceIndex') if self.index is not None: @@ -452,19 +433,16 @@ class MovingBoundaryVolumeIndex(object): """ Attributes: - index + """ - thrift_spec = ( - None, # 0 - (1, TType.I32, 'index', None, None, ), # 1 - ) def __init__(self, index=None,): self.index = index def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -483,7 +461,7 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('MovingBoundaryVolumeIndex') if self.index is not None: @@ -515,13 +493,9 @@ class FiniteVolumeIndex(object): Attributes: - globalIndex - regionIndex + """ - thrift_spec = ( - None, # 0 - (1, TType.I32, 'globalIndex', None, None, ), # 1 - (2, TType.I32, 'regionIndex', None, None, ), # 2 - ) def __init__(self, globalIndex=None, regionIndex=None,): self.globalIndex = globalIndex @@ -529,7 +503,7 @@ def __init__(self, globalIndex=None, regionIndex=None,): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -553,7 +527,7 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('FiniteVolumeIndex') if self.globalIndex is not None: @@ -593,15 +567,9 @@ class VisPolygon(object): - chomboVolumeIndex - finiteVolumeIndex - movingBoundaryVolumeIndex + """ - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'pointIndices', (TType.I32, None, False), None, ), # 1 - (2, TType.STRUCT, 'chomboVolumeIndex', (ChomboVolumeIndex, ChomboVolumeIndex.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'finiteVolumeIndex', (FiniteVolumeIndex, FiniteVolumeIndex.thrift_spec), None, ), # 3 - (4, TType.STRUCT, 'movingBoundaryVolumeIndex', (MovingBoundaryVolumeIndex, MovingBoundaryVolumeIndex.thrift_spec), None, ), # 4 - ) def __init__(self, pointIndices=None, chomboVolumeIndex=None, finiteVolumeIndex=None, movingBoundaryVolumeIndex=None,): self.pointIndices = pointIndices @@ -611,7 +579,7 @@ def __init__(self, pointIndices=None, chomboVolumeIndex=None, finiteVolumeIndex= def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -653,7 +621,7 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('VisPolygon') if self.pointIndices is not None: @@ -699,19 +667,16 @@ class PolyhedronFace(object): """ Attributes: - vertices + """ - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'vertices', (TType.I32, None, False), None, ), # 1 - ) def __init__(self, vertices=None,): self.vertices = vertices def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -735,7 +700,7 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('PolyhedronFace') if self.vertices is not None: @@ -771,14 +736,9 @@ class VisIrregularPolyhedron(object): - polyhedronFaces - chomboVolumeIndex - finiteVolumeIndex + """ - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'polyhedronFaces', (TType.STRUCT, (PolyhedronFace, PolyhedronFace.thrift_spec), False), None, ), # 1 - (2, TType.STRUCT, 'chomboVolumeIndex', (ChomboVolumeIndex, ChomboVolumeIndex.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'finiteVolumeIndex', (FiniteVolumeIndex, FiniteVolumeIndex.thrift_spec), None, ), # 3 - ) def __init__(self, polyhedronFaces=None, chomboVolumeIndex=None, finiteVolumeIndex=None,): self.polyhedronFaces = polyhedronFaces @@ -787,7 +747,7 @@ def __init__(self, polyhedronFaces=None, chomboVolumeIndex=None, finiteVolumeInd def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -824,7 +784,7 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('VisIrregularPolyhedron') if self.polyhedronFaces is not None: @@ -869,15 +829,9 @@ class VisVoxel(object): - chomboVolumeIndex - finiteVolumeIndex - movingBoundaryVolumeIndex + """ - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'pointIndices', (TType.I32, None, False), None, ), # 1 - (2, TType.STRUCT, 'chomboVolumeIndex', (ChomboVolumeIndex, ChomboVolumeIndex.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'finiteVolumeIndex', (FiniteVolumeIndex, FiniteVolumeIndex.thrift_spec), None, ), # 3 - (4, TType.STRUCT, 'movingBoundaryVolumeIndex', (MovingBoundaryVolumeIndex, MovingBoundaryVolumeIndex.thrift_spec), None, ), # 4 - ) def __init__(self, pointIndices=None, chomboVolumeIndex=None, finiteVolumeIndex=None, movingBoundaryVolumeIndex=None,): self.pointIndices = pointIndices @@ -887,7 +841,7 @@ def __init__(self, pointIndices=None, chomboVolumeIndex=None, finiteVolumeIndex= def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -929,7 +883,7 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('VisVoxel') if self.pointIndices is not None: @@ -977,14 +931,9 @@ class VisTetrahedron(object): - pointIndices - chomboVolumeIndex - finiteVolumeIndex + """ - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'pointIndices', (TType.I32, None, False), None, ), # 1 - (2, TType.STRUCT, 'chomboVolumeIndex', (ChomboVolumeIndex, ChomboVolumeIndex.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'finiteVolumeIndex', (FiniteVolumeIndex, FiniteVolumeIndex.thrift_spec), None, ), # 3 - ) def __init__(self, pointIndices=None, chomboVolumeIndex=None, finiteVolumeIndex=None,): self.pointIndices = pointIndices @@ -993,7 +942,7 @@ def __init__(self, pointIndices=None, chomboVolumeIndex=None, finiteVolumeIndex= def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -1029,7 +978,7 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('VisTetrahedron') if self.pointIndices is not None: @@ -1073,14 +1022,9 @@ class VisSurfaceTriangle(object): - pointIndices - face - chomboSurfaceIndex + """ - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'pointIndices', (TType.I32, None, False), None, ), # 1 - (2, TType.I32, 'face', None, None, ), # 2 - (3, TType.STRUCT, 'chomboSurfaceIndex', (ChomboSurfaceIndex, ChomboSurfaceIndex.thrift_spec), None, ), # 3 - ) def __init__(self, pointIndices=None, face=None, chomboSurfaceIndex=None,): self.pointIndices = pointIndices @@ -1089,7 +1033,7 @@ def __init__(self, pointIndices=None, face=None, chomboSurfaceIndex=None,): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -1124,7 +1068,7 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('VisSurfaceTriangle') if self.pointIndices is not None: @@ -1172,16 +1116,9 @@ class VisLine(object): - chomboSurfaceIndex - finiteVolumeIndex - movingBoundarySurfaceIndex + """ - thrift_spec = ( - None, # 0 - (1, TType.I32, 'p1', None, None, ), # 1 - (2, TType.I32, 'p2', None, None, ), # 2 - (3, TType.STRUCT, 'chomboSurfaceIndex', (ChomboSurfaceIndex, ChomboSurfaceIndex.thrift_spec), None, ), # 3 - (4, TType.STRUCT, 'finiteVolumeIndex', (FiniteVolumeIndex, FiniteVolumeIndex.thrift_spec), None, ), # 4 - (5, TType.STRUCT, 'movingBoundarySurfaceIndex', (MovingBoundarySurfaceIndex, MovingBoundarySurfaceIndex.thrift_spec), None, ), # 5 - ) def __init__(self, p1=None, p2=None, chomboSurfaceIndex=None, finiteVolumeIndex=None, movingBoundarySurfaceIndex=None,): self.p1 = p1 @@ -1192,7 +1129,7 @@ def __init__(self, p1=None, p2=None, chomboSurfaceIndex=None, finiteVolumeIndex= def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -1234,7 +1171,7 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('VisLine') if self.p1 is not None: @@ -1284,13 +1221,9 @@ class FiniteVolumeIndexData(object): Attributes: - domainName - finiteVolumeIndices + """ - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'domainName', 'UTF8', None, ), # 1 - (2, TType.LIST, 'finiteVolumeIndices', (TType.STRUCT, (FiniteVolumeIndex, FiniteVolumeIndex.thrift_spec), False), None, ), # 2 - ) def __init__(self, domainName=None, finiteVolumeIndices=None,): self.domainName = domainName @@ -1298,7 +1231,7 @@ def __init__(self, domainName=None, finiteVolumeIndices=None,): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -1307,7 +1240,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.domainName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.domainName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: @@ -1328,7 +1261,7 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('FiniteVolumeIndexData') if self.domainName is not None: @@ -1370,14 +1303,9 @@ class ChomboIndexData(object): - domainName - chomboSurfaceIndices - chomboVolumeIndices + """ - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'domainName', 'UTF8', None, ), # 1 - (2, TType.LIST, 'chomboSurfaceIndices', (TType.STRUCT, (ChomboSurfaceIndex, ChomboSurfaceIndex.thrift_spec), False), None, ), # 2 - (3, TType.LIST, 'chomboVolumeIndices', (TType.STRUCT, (ChomboVolumeIndex, ChomboVolumeIndex.thrift_spec), False), None, ), # 3 - ) def __init__(self, domainName=None, chomboSurfaceIndices=None, chomboVolumeIndices=None,): self.domainName = domainName @@ -1386,7 +1314,7 @@ def __init__(self, domainName=None, chomboSurfaceIndices=None, chomboVolumeIndic def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -1395,7 +1323,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.domainName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.domainName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: @@ -1427,7 +1355,7 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('ChomboIndexData') if self.domainName is not None: @@ -1475,15 +1403,9 @@ class MovingBoundaryIndexData(object): - timeIndex - movingBoundarySurfaceIndices - movingBoundaryVolumeIndices + """ - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'domainName', 'UTF8', None, ), # 1 - (2, TType.I32, 'timeIndex', None, None, ), # 2 - (3, TType.LIST, 'movingBoundarySurfaceIndices', (TType.STRUCT, (MovingBoundarySurfaceIndex, MovingBoundarySurfaceIndex.thrift_spec), False), None, ), # 3 - (4, TType.LIST, 'movingBoundaryVolumeIndices', (TType.STRUCT, (MovingBoundaryVolumeIndex, MovingBoundaryVolumeIndex.thrift_spec), False), None, ), # 4 - ) def __init__(self, domainName=None, timeIndex=None, movingBoundarySurfaceIndices=None, movingBoundaryVolumeIndices=None,): self.domainName = domainName @@ -1493,7 +1415,7 @@ def __init__(self, domainName=None, timeIndex=None, movingBoundarySurfaceIndices def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -1502,7 +1424,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.domainName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.domainName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: @@ -1539,7 +1461,7 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('MovingBoundaryIndexData') if self.domainName is not None: @@ -1600,22 +1522,9 @@ class VisMesh(object): - surfaceTriangles - visLines - surfacePoints + """ - thrift_spec = ( - None, # 0 - (1, TType.I32, 'dimension', None, None, ), # 1 - (2, TType.STRUCT, 'origin', (Vect3D, Vect3D.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'extent', (Vect3D, Vect3D.thrift_spec), None, ), # 3 - (4, TType.LIST, 'points', (TType.STRUCT, (VisPoint, VisPoint.thrift_spec), False), None, ), # 4 - (5, TType.LIST, 'polygons', (TType.STRUCT, (VisPolygon, VisPolygon.thrift_spec), False), None, ), # 5 - (6, TType.LIST, 'irregularPolyhedra', (TType.STRUCT, (VisIrregularPolyhedron, VisIrregularPolyhedron.thrift_spec), False), None, ), # 6 - (7, TType.LIST, 'tetrahedra', (TType.STRUCT, (VisTetrahedron, VisTetrahedron.thrift_spec), False), None, ), # 7 - (8, TType.LIST, 'visVoxels', (TType.STRUCT, (VisVoxel, VisVoxel.thrift_spec), False), None, ), # 8 - (9, TType.LIST, 'surfaceTriangles', (TType.STRUCT, (VisSurfaceTriangle, VisSurfaceTriangle.thrift_spec), False), None, ), # 9 - (10, TType.LIST, 'visLines', (TType.STRUCT, (VisLine, VisLine.thrift_spec), False), None, ), # 10 - (11, TType.LIST, 'surfacePoints', (TType.STRUCT, (VisPoint, VisPoint.thrift_spec), False), None, ), # 11 - ) def __init__(self, dimension=None, origin=None, extent=None, points=None, polygons=None, irregularPolyhedra=None, tetrahedra=None, visVoxels=None, surfaceTriangles=None, visLines=None, surfacePoints=None,): self.dimension = dimension @@ -1632,7 +1541,7 @@ def __init__(self, dimension=None, origin=None, extent=None, points=None, polygo def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -1751,7 +1660,7 @@ def read(self, iprot): def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('VisMesh') if self.dimension is not None: @@ -1844,3 +1753,135 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) +all_structs.append(Vect3D) +Vect3D.thrift_spec = ( + None, # 0 + (1, TType.DOUBLE, 'x', None, None, ), # 1 + (2, TType.DOUBLE, 'y', None, None, ), # 2 + (3, TType.DOUBLE, 'z', None, None, ), # 3 +) +all_structs.append(VisPoint) +VisPoint.thrift_spec = ( + None, # 0 + (1, TType.DOUBLE, 'x', None, None, ), # 1 + (2, TType.DOUBLE, 'y', None, None, ), # 2 + (3, TType.DOUBLE, 'z', None, None, ), # 3 +) +all_structs.append(ChomboVolumeIndex) +ChomboVolumeIndex.thrift_spec = ( + None, # 0 + (1, TType.I32, 'level', None, None, ), # 1 + (2, TType.I32, 'boxNumber', None, None, ), # 2 + (3, TType.I32, 'boxIndex', None, None, ), # 3 + (4, TType.DOUBLE, 'fraction', None, None, ), # 4 +) +all_structs.append(ChomboSurfaceIndex) +ChomboSurfaceIndex.thrift_spec = ( + None, # 0 + (1, TType.I32, 'index', None, None, ), # 1 +) +all_structs.append(MovingBoundarySurfaceIndex) +MovingBoundarySurfaceIndex.thrift_spec = ( + None, # 0 + (1, TType.I32, 'index', None, None, ), # 1 +) +all_structs.append(MovingBoundaryVolumeIndex) +MovingBoundaryVolumeIndex.thrift_spec = ( + None, # 0 + (1, TType.I32, 'index', None, None, ), # 1 +) +all_structs.append(FiniteVolumeIndex) +FiniteVolumeIndex.thrift_spec = ( + None, # 0 + (1, TType.I32, 'globalIndex', None, None, ), # 1 + (2, TType.I32, 'regionIndex', None, None, ), # 2 +) +all_structs.append(VisPolygon) +VisPolygon.thrift_spec = ( + None, # 0 + (1, TType.LIST, 'pointIndices', (TType.I32, None, False), None, ), # 1 + (2, TType.STRUCT, 'chomboVolumeIndex', [ChomboVolumeIndex, None], None, ), # 2 + (3, TType.STRUCT, 'finiteVolumeIndex', [FiniteVolumeIndex, None], None, ), # 3 + (4, TType.STRUCT, 'movingBoundaryVolumeIndex', [MovingBoundaryVolumeIndex, None], None, ), # 4 +) +all_structs.append(PolyhedronFace) +PolyhedronFace.thrift_spec = ( + None, # 0 + (1, TType.LIST, 'vertices', (TType.I32, None, False), None, ), # 1 +) +all_structs.append(VisIrregularPolyhedron) +VisIrregularPolyhedron.thrift_spec = ( + None, # 0 + (1, TType.LIST, 'polyhedronFaces', (TType.STRUCT, [PolyhedronFace, None], False), None, ), # 1 + (2, TType.STRUCT, 'chomboVolumeIndex', [ChomboVolumeIndex, None], None, ), # 2 + (3, TType.STRUCT, 'finiteVolumeIndex', [FiniteVolumeIndex, None], None, ), # 3 +) +all_structs.append(VisVoxel) +VisVoxel.thrift_spec = ( + None, # 0 + (1, TType.LIST, 'pointIndices', (TType.I32, None, False), None, ), # 1 + (2, TType.STRUCT, 'chomboVolumeIndex', [ChomboVolumeIndex, None], None, ), # 2 + (3, TType.STRUCT, 'finiteVolumeIndex', [FiniteVolumeIndex, None], None, ), # 3 + (4, TType.STRUCT, 'movingBoundaryVolumeIndex', [MovingBoundaryVolumeIndex, None], None, ), # 4 +) +all_structs.append(VisTetrahedron) +VisTetrahedron.thrift_spec = ( + None, # 0 + (1, TType.LIST, 'pointIndices', (TType.I32, None, False), None, ), # 1 + (2, TType.STRUCT, 'chomboVolumeIndex', [ChomboVolumeIndex, None], None, ), # 2 + (3, TType.STRUCT, 'finiteVolumeIndex', [FiniteVolumeIndex, None], None, ), # 3 +) +all_structs.append(VisSurfaceTriangle) +VisSurfaceTriangle.thrift_spec = ( + None, # 0 + (1, TType.LIST, 'pointIndices', (TType.I32, None, False), None, ), # 1 + (2, TType.I32, 'face', None, None, ), # 2 + (3, TType.STRUCT, 'chomboSurfaceIndex', [ChomboSurfaceIndex, None], None, ), # 3 +) +all_structs.append(VisLine) +VisLine.thrift_spec = ( + None, # 0 + (1, TType.I32, 'p1', None, None, ), # 1 + (2, TType.I32, 'p2', None, None, ), # 2 + (3, TType.STRUCT, 'chomboSurfaceIndex', [ChomboSurfaceIndex, None], None, ), # 3 + (4, TType.STRUCT, 'finiteVolumeIndex', [FiniteVolumeIndex, None], None, ), # 4 + (5, TType.STRUCT, 'movingBoundarySurfaceIndex', [MovingBoundarySurfaceIndex, None], None, ), # 5 +) +all_structs.append(FiniteVolumeIndexData) +FiniteVolumeIndexData.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'domainName', 'UTF8', None, ), # 1 + (2, TType.LIST, 'finiteVolumeIndices', (TType.STRUCT, [FiniteVolumeIndex, None], False), None, ), # 2 +) +all_structs.append(ChomboIndexData) +ChomboIndexData.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'domainName', 'UTF8', None, ), # 1 + (2, TType.LIST, 'chomboSurfaceIndices', (TType.STRUCT, [ChomboSurfaceIndex, None], False), None, ), # 2 + (3, TType.LIST, 'chomboVolumeIndices', (TType.STRUCT, [ChomboVolumeIndex, None], False), None, ), # 3 +) +all_structs.append(MovingBoundaryIndexData) +MovingBoundaryIndexData.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'domainName', 'UTF8', None, ), # 1 + (2, TType.I32, 'timeIndex', None, None, ), # 2 + (3, TType.LIST, 'movingBoundarySurfaceIndices', (TType.STRUCT, [MovingBoundarySurfaceIndex, None], False), None, ), # 3 + (4, TType.LIST, 'movingBoundaryVolumeIndices', (TType.STRUCT, [MovingBoundaryVolumeIndex, None], False), None, ), # 4 +) +all_structs.append(VisMesh) +VisMesh.thrift_spec = ( + None, # 0 + (1, TType.I32, 'dimension', None, None, ), # 1 + (2, TType.STRUCT, 'origin', [Vect3D, None], None, ), # 2 + (3, TType.STRUCT, 'extent', [Vect3D, None], None, ), # 3 + (4, TType.LIST, 'points', (TType.STRUCT, [VisPoint, None], False), None, ), # 4 + (5, TType.LIST, 'polygons', (TType.STRUCT, [VisPolygon, None], False), None, ), # 5 + (6, TType.LIST, 'irregularPolyhedra', (TType.STRUCT, [VisIrregularPolyhedron, None], False), None, ), # 6 + (7, TType.LIST, 'tetrahedra', (TType.STRUCT, [VisTetrahedron, None], False), None, ), # 7 + (8, TType.LIST, 'visVoxels', (TType.STRUCT, [VisVoxel, None], False), None, ), # 8 + (9, TType.LIST, 'surfaceTriangles', (TType.STRUCT, [VisSurfaceTriangle, None], False), None, ), # 9 + (10, TType.LIST, 'visLines', (TType.STRUCT, [VisLine, None], False), None, ), # 10 + (11, TType.LIST, 'surfacePoints', (TType.STRUCT, [VisPoint, None], False), None, ), # 11 +) +fix_spec(all_structs) +del all_structs diff --git a/pythonScripts/VCell_ImageJ/__init__.py b/pythonVtk/vtkService/__init__.py similarity index 100% rename from pythonScripts/VCell_ImageJ/__init__.py rename to pythonVtk/vtkService/__init__.py diff --git a/pythonVtk/vtkService/makeLittleVtk.py b/pythonVtk/vtkService/makeLittleVtk.py new file mode 100644 index 0000000000..a697d8c162 --- /dev/null +++ b/pythonVtk/vtkService/makeLittleVtk.py @@ -0,0 +1,30 @@ +import vtk + +import vtkService.vtkService as vtkService + +x = [1, 2, 3, 4] +y = [1, 2, 3, 4] +ugrid = vtk.vtkUnstructuredGrid() +points = vtk.vtkPoints() +points.SetDataTypeToDouble() +xyToNode = [[] for i in range(len(x))] +index = 0 +for i, xCoord in enumerate(x): + for yCoord in y: + points.InsertNextPoint(xCoord, yCoord, 0.0) + xyToNode[i].append(index) + index += 1 +ugrid.SetPoints(points) + +# Add the volume elements +for i, xCoord in enumerate(x[:-1]): + for j, yCoord in enumerate(y[:-1]): + idList = vtk.vtkIdList() + idList.InsertNextId(xyToNode[i][j]) + idList.InsertNextId(xyToNode[i + 1][j]) + idList.InsertNextId(xyToNode[i + 1][j + 1]) + idList.InsertNextId(xyToNode[i][j + 1]) + ugrid.InsertNextCell(vtk.VTK_QUAD, idList) + +vtkService.writevtk(ugrid, "abc.vtu") +vtkService.writeDataArrayToNewVtkFile("abc.vtu", "var", [1., 2., 3., 4., 5., 6., 7., 8., 9.], "abc_var.vtu") diff --git a/pythonVtk/vtkService/vtkAddData_not_used.py b/pythonVtk/vtkService/vtkAddData_not_used.py new file mode 100644 index 0000000000..1d2407b429 --- /dev/null +++ b/pythonVtk/vtkService/vtkAddData_not_used.py @@ -0,0 +1,41 @@ +import argparse + +import numpy as np +import vtk + +from vtkService.vtkService import writeDataArrayToNewVtkFile + + +def main(): + # try: + parser = argparse.ArgumentParser() + parser.add_argument("invtkfile", help="filename of input vtk mesh (VTK XML unstructured grid") + parser.add_argument("varname", help="name of cell data variable") + parser.add_argument("outvtkfile", help="filename of output vtk mesh (VTK XML unstructured grid") + args = parser.parse_args() + + # deserialize raw bytes into VarDataAdd + reader = vtk.vtkXMLUnstructuredGridReader() + reader.SetFileName(args.invtkfile) + reader.Update() + mesh = reader.GetOutput() + assert isinstance(mesh, vtk.vtkUnstructuredGrid) + num_cells = mesh.GetCells().GetSize() + + # write 0..N-1 into data + npdata = np.arange(0, num_cells, 0.1) + + writeDataArrayToNewVtkFile(args.invtkfile, args.varname, npdata, args.outvtkfile) + print("done") + + +# except: +# e = sys.exc_info()[0] +# print("exception "+e) +# sys.exit(-1) +# else: +# sys.exit(0) + + +if __name__ == '__main__': + main() diff --git a/pythonScripts/VCell_VTK/vtkService.py b/pythonVtk/vtkService/vtkService.py similarity index 82% rename from pythonScripts/VCell_VTK/vtkService.py rename to pythonVtk/vtkService/vtkService.py index 4ea5e1a243..074a705b60 100644 --- a/pythonScripts/VCell_VTK/vtkService.py +++ b/pythonVtk/vtkService/vtkService.py @@ -1,20 +1,18 @@ import argparse import copy import os - import sys import traceback -import vtk - -from pyvcell.ttypes import SimulationDataSetRef -from pyvcell.ttypes import VariableInfo +import vtkmodules.all as vtk from thrift.TSerialization import TBinaryProtocol from thrift.TSerialization import deserialize from thrift.TSerialization import serialize + from vcellvismesh.ttypes import ChomboIndexData from vcellvismesh.ttypes import FiniteVolumeIndexData from vcellvismesh.ttypes import MovingBoundaryIndexData +from vcellvismesh.ttypes import PolyhedronFace from vcellvismesh.ttypes import VisIrregularPolyhedron from vcellvismesh.ttypes import VisLine from vcellvismesh.ttypes import VisMesh @@ -22,10 +20,7 @@ from vcellvismesh.ttypes import VisTetrahedron -def writeChomboVolumeVtkGridAndIndexData(visMesh, domainname, vtkfile, indexfile): - assert isinstance(visMesh, VisMesh) - assert type(domainname) is str - +def writeChomboVolumeVtkGridAndIndexData(visMesh: VisMesh, domainname: str, vtkfile, indexfile) -> None: originalVisMesh = visMesh correctedVisMesh = originalVisMesh # same mesh if no irregularPolyhedra if originalVisMesh.irregularPolyhedra is not None: @@ -38,9 +33,7 @@ def writeChomboVolumeVtkGridAndIndexData(visMesh, domainname, vtkfile, indexfile correctedVisMesh.tetrahedra.append(tet) correctedVisMesh.irregularPolyhedra = None - assert isinstance(correctedVisMesh, VisMesh) - vtkgrid = getVolumeVtkGrid(correctedVisMesh) - assert isinstance(vtkgrid, vtk.vtkUnstructuredGrid) + vtkgrid: vtk.vtkUnstructuredGrid = getVolumeVtkGrid(correctedVisMesh) writevtk(vtkgrid, vtkfile) chomboIndexData = ChomboIndexData() chomboIndexData.chomboVolumeIndices = [] @@ -67,9 +60,7 @@ def writeChomboVolumeVtkGridAndIndexData(visMesh, domainname, vtkfile, indexfile writeChomboIndexData(indexfile, chomboIndexData) -def writeChomboMembraneVtkGridAndIndexData(visMesh, domainname, vtkfile, indexfile): - assert isinstance(visMesh, VisMesh) - assert type(domainname) is str +def writeChomboMembraneVtkGridAndIndexData(visMesh: VisMesh, domainname: str, vtkfile, indexfile) -> None: vtkgrid = getMembraneVtkGrid(visMesh) writevtk(vtkgrid, vtkfile) @@ -93,10 +84,12 @@ def writeChomboMembraneVtkGridAndIndexData(visMesh, domainname, vtkfile, indexfi writeChomboIndexData(indexfile, chomboIndexData) -def writeFiniteVolumeSmoothedVtkGridAndIndexData(visMesh, domainName, vtuFile, indexFile): - assert isinstance(visMesh, VisMesh) +def writeFiniteVolumeSmoothedVtkGridAndIndexData(visMesh: VisMesh, domainName: str, vtuFile, indexFile) -> None: vtkgrid = getVolumeVtkGrid(visMesh) - vtkgridSmoothed = smoothUnstructuredGridSurface(vtkgrid) + if visMesh.dimension == 3: + vtkgridSmoothed = smoothUnstructuredGridSurface(vtkgrid) + else: + vtkgridSmoothed = vtkgrid writevtk(vtkgridSmoothed, vtuFile) finiteVolumeIndexData = FiniteVolumeIndexData() finiteVolumeIndexData.finiteVolumeIndices = [] @@ -126,7 +119,7 @@ def writeFiniteVolumeSmoothedVtkGridAndIndexData(visMesh, domainName, vtuFile, i finiteVolumeIndexData.finiteVolumeIndices.append(polygon.finiteVolumeIndex) if finiteVolumeIndexData.finiteVolumeIndices == None or len(finiteVolumeIndexData.finiteVolumeIndices) == 0: - print "didn't find any indices ... bad" + print("didn't find any indices ... bad") writeFiniteVolumeIndexData(indexFile, finiteVolumeIndexData) @@ -140,8 +133,7 @@ def writeFiniteVolumeIndexData(finiteVolumeIndexFile, finiteVolumeIndexData): print("wrote finitevolume data to file "+str(finiteVolumeIndexFile)) -def writeMovingBoundaryVolumeVtkGridAndIndexData(visMesh, domainName, vtuFile, indexFile): - assert isinstance(visMesh, VisMesh) +def writeMovingBoundaryVolumeVtkGridAndIndexData(visMesh: VisMesh, domainName: str, vtuFile, indexFile): vtkgrid = getVolumeVtkGrid(visMesh) writevtk(vtkgrid, vtuFile) movingBoundaryIndexData = MovingBoundaryIndexData() @@ -173,13 +165,13 @@ def writeMovingBoundaryVolumeVtkGridAndIndexData(visMesh, domainName, vtuFile, i # movingBoundaryIndexData.finiteVolumeIndices.append(polygon.finiteVolumeIndex) if movingBoundaryIndexData.movingBoundaryVolumeIndices == None and movingBoundaryIndexData.movingBoundarySurfaceIndices == None: - print "didn't find any indices ... bad" + print("didn't find any indices ... bad") if movingBoundaryIndexData.movingBoundaryVolumeIndices != None and len(movingBoundaryIndexData.movingBoundaryVolumeIndices) == 0: - print "didn't find any indices ... bad" + print("didn't find any indices ... bad") if movingBoundaryIndexData.movingBoundarySurfaceIndices != None and len(movingBoundaryIndexData.movingBoundarySurfaceIndices) == 0: - print "didn't find any indices ... bad" + print("didn't find any indices ... bad") writeMovingBoundaryIndexData(indexFile, movingBoundaryIndexData) @@ -316,10 +308,9 @@ def writeDataArrayToNewVtkFile(emptyMeshFile, varName, data, newMeshFile): # dataArray = vtk.vtkDoubleArray() dataArray = numpy_support.numpy_to_vtk(data) - assert isinstance(dataArray, vtk.vtkDoubleArray) + assert isinstance(dataArray, ) dataArray.SetName(varName) - cellData = vtkgrid.GetCellData() - assert isinstance(cellData, vtk.vtkCellData) + cellData: vtk.vtkCellData = vtkgrid.GetCellData() cellData.AddArray(dataArray) # @@ -331,11 +322,10 @@ def writeDataArrayToNewVtkFile(emptyMeshFile, varName, data, newMeshFile): import array print("writing varData using array package") - print type(data) - print str(data) + print(type(data)) + print(str(data)) data = array.array('d', data) vtkgrid = readvtk(emptyMeshFile) - assert isinstance(vtkgrid, vtk.vtkUnstructuredGrid) # # add cell data array to the empty mesh for this variable @@ -344,8 +334,7 @@ def writeDataArrayToNewVtkFile(emptyMeshFile, varName, data, newMeshFile): dataArray.SetVoidArray(data, len(data), 1) dataArray.SetNumberOfComponents(1) dataArray.SetName(varName) - cellData = vtkgrid.GetCellData() - assert isinstance(cellData, vtk.vtkCellData) + cellData: vtk.vtkCellData = vtkgrid.GetCellData() cellData.AddArray(dataArray) # @@ -354,29 +343,7 @@ def writeDataArrayToNewVtkFile(emptyMeshFile, varName, data, newMeshFile): writevtk(vtkgrid, newMeshFile) -def getPopulatedMeshFileLocation(basedir, simulationDataSetRef, varInfo, timeIndex): - assert type(basedir) is str - assert isinstance(simulationDataSetRef, SimulationDataSetRef) - assert isinstance(varInfo, VariableInfo) - assert type(timeIndex) is int - - #create the dataset directory if necessary - if not os.path.isdir(basedir): - os.makedirs(basedir) - - # - # compose the specific mesh filename - # - timeIndexStr = "%06d" % timeIndex - domainName = varInfo.domainName - varName = varInfo.variableVtuName.replace(":", "_") - simStr = "SimID_" + simulationDataSetRef.simId + "_" + str(simulationDataSetRef.jobIndex) - vtuDataFile = os.path.join(basedir, simStr + "__" + domainName + "__" + varName + "__" + timeIndexStr + ".vtu") - return vtuDataFile - - -def getMembraneVtkGrid(visMesh): - assert isinstance(visMesh, VisMesh) +def getMembraneVtkGrid(visMesh: VisMesh) -> vtk.vtkUnstructuredGrid: vtkpoints = vtk.vtkPoints() for visPoint in visMesh.surfacePoints: vtkpoints.InsertNextPoint(visPoint.x,visPoint.y,visPoint.z) @@ -408,13 +375,7 @@ def getMembraneVtkGrid(visMesh): return vtkgrid -def getVolumeVtkGrid(visMesh): - """ - - Returns: - vtk.vtkUnstructuredGrid: - """ - assert isinstance(visMesh, VisMesh) +def getVolumeVtkGrid(visMesh: VisMesh) -> vtk.vtkUnstructuredGrid: bClipPolyhedra = True vtkpoints = vtk.vtkPoints() @@ -493,8 +454,7 @@ def getVolumeVtkGrid(visMesh): return vtkgrid -def getVtkFaceStream(irregularPolyhedron): - assert isinstance(irregularPolyhedron, VisIrregularPolyhedron) +def getVtkFaceStream(irregularPolyhedron: VisIrregularPolyhedron) -> list[int]: faceStream = [len(irregularPolyhedron.polyhedronFaces), ] for polyhedronFace in irregularPolyhedron.polyhedronFaces: faceStream.append(len(polyhedronFace.getVertices())) @@ -504,8 +464,7 @@ def getVtkFaceStream(irregularPolyhedron): return intFaceStream -def smoothUnstructuredGridSurface(vtkGrid): - assert isinstance(vtkGrid, vtk.vtkUnstructuredGrid) +def smoothUnstructuredGridSurface(vtkGrid: vtk.vtkUnstructuredGrid) -> vtk.vtkUnstructuredGrid: ugGeometryFilter = vtk.vtkUnstructuredGridGeometryFilter() ugGeometryFilter.PassThroughPointIdsOn() ugGeometryFilter.MergingOff() @@ -514,8 +473,7 @@ def smoothUnstructuredGridSurface(vtkGrid): except AttributeError: ugGeometryFilter.SetInput(vtkGrid) ugGeometryFilter.Update() - surfaceUnstructuredGrid = ugGeometryFilter.GetOutput() - assert isinstance(surfaceUnstructuredGrid, vtk.vtkUnstructuredGrid) + surfaceUnstructuredGrid: vtk.vtkUnstructuredGrid = ugGeometryFilter.GetOutput() originalPointsIdsName = ugGeometryFilter.GetOriginalPointIdsName() cellData = surfaceUnstructuredGrid.GetCellData() @@ -523,22 +481,19 @@ def smoothUnstructuredGridSurface(vtkGrid): for i in range(0, numCellArrays): cellArrayName = cellData.GetArrayName(i) print("CellArray(" + str(i) + ") '" + cellArrayName + "')") - pointData = surfaceUnstructuredGrid.GetPointData() - assert isinstance(pointData, vtk.vtkPointData) + pointData: vtk.vtkPointData = surfaceUnstructuredGrid.GetPointData() numPointArrays = pointData.GetNumberOfArrays() for i in range(0, numPointArrays): pointArrayName = pointData.GetArrayName(i) print("PointArray(" + str(i) + ") '" + pointArrayName + "'") geometryFilter = vtk.vtkGeometryFilter() - assert isinstance(geometryFilter, vtk.vtkGeometryFilter) try: geometryFilter.SetInputData(surfaceUnstructuredGrid) except AttributeError: geometryFilter.SetInput(surfaceUnstructuredGrid) geometryFilter.Update() - polyData = geometryFilter.GetOutput() - assert isinstance(polyData, vtk.vtkPolyData) + polyData: vtk.vtkPolyData = geometryFilter.GetOutput() filter = vtk.vtkWindowedSincPolyDataFilter() try: @@ -556,13 +511,10 @@ def smoothUnstructuredGridSurface(vtkGrid): smoothedPolydata = filter.GetOutput() - smoothedPoints = smoothedPolydata.GetPoints() - assert isinstance(smoothedPoints, vtk.vtkPoints) + smoothedPoints: vtk.vtkPoints = smoothedPolydata.GetPoints() - smoothedPointData = smoothedPolydata.GetPointData() - assert isinstance(smoothedPointData, vtk.vtkPointData) - pointIdsArray = smoothedPointData.GetArray(originalPointsIdsName) - assert isinstance(pointIdsArray, vtk.vtkIdTypeArray) + smoothedPointData: vtk.vtkPointData = smoothedPolydata.GetPointData() + pointIdsArray: vtk.vtkIdTypeArray = smoothedPointData.GetArray(originalPointsIdsName) pointsIdsArraySize = pointIdsArray.GetSize() origPoints = vtkGrid.GetPoints() for i in range(0, pointsIdsArraySize): @@ -573,19 +525,18 @@ def smoothUnstructuredGridSurface(vtkGrid): return vtkGrid -def getPointIndices(irregularPolyhedron): +def getPointIndices(irregularPolyhedron: VisIrregularPolyhedron) -> list[int]: assert isinstance(irregularPolyhedron, VisIrregularPolyhedron) pointIndicesSet = set() for face in irregularPolyhedron.polyhedronFaces: + assert(isinstance(face, PolyhedronFace)) for pointIndex in face.vertices: pointIndicesSet.add(pointIndex) pointArray = [int(x) for x in pointIndicesSet] return pointArray -def createTetrahedra(clippedPolyhedron, visMesh): - assert isinstance(clippedPolyhedron, VisIrregularPolyhedron) - assert isinstance(visMesh, VisMesh) +def createTetrahedra(clippedPolyhedron: VisIrregularPolyhedron, visMesh: VisMesh): vtkpolydata = vtk.vtkPolyData() vtkpoints = vtk.vtkPoints() @@ -614,8 +565,8 @@ def createTetrahedra(clippedPolyhedron, visMesh): delaunayFilter.SetInput(vtkpolydata) delaunayFilter.Update() delaunayFilter.SetAlpha(0.1) - vtkgrid2 = delaunayFilter.GetOutput() - assert isinstance(vtkgrid2, vtk.vtkUnstructuredGrid) + vtkgrid2: vtk.vtkUnstructuredGrid = delaunayFilter.GetOutput() + assert isinstance(vtkgrid2, vtk.vtkUnstructuredGrid) # runtime check, remove later visTets = [] numTets = vtkgrid2.GetNumberOfCells() @@ -633,10 +584,9 @@ def createTetrahedra(clippedPolyhedron, visMesh): # print("numFaces = "+str(vtkpolydata.GetNumberOfCells())+", numTets = "+str(numTets)); for cellIndex in range(0, numTets): cell = vtkgrid2.GetCell(cellIndex) - if (isinstance(cell, vtk.vtkTetra)): - vtkTet = cell - assert isinstance(vtkTet, vtk.vtkTetra) - tetPointIds = vtkTet.GetPointIds() + if isinstance(cell, vtk.vtkTetra): + vtkTet: vtk.vtkTetra = cell + tetPointIds: vtk.vtkIdList = vtkTet.GetPointIds() assert isinstance(tetPointIds, vtk.vtkIdList) # # translate from vtkgrid pointids to visMesh point ids @@ -656,20 +606,18 @@ def createTetrahedra(clippedPolyhedron, visMesh): return visTets -#import sys def main(): - - #sys.setrecursionlimit(100000) + # sys.setrecursionlimit(100000) try: parser = argparse.ArgumentParser() list_of_meshtypes = ["chombovolume", "chombomembrane", "finitevolume", "movingboundary", "comsolvolume"] parser.add_argument("meshtype", help="type of visMesh processing required and index file generated", choices=list_of_meshtypes) parser.add_argument("domainname", help="domain name for output mesh") - parser.add_argument("vismeshfile",help="filename of input visMesh to be processed (thrift serialization via TBinaryProtocol)") - parser.add_argument("vtkfile",help="filename of output vtk mesh (VTK XML unstructured grid") - parser.add_argument("indexfile",help="filename of output ChomboIndexData or FiniteVolumeIndexData (thrift serialization via TBinaryProtocol)") + parser.add_argument("vismeshfile", help="filename of input visMesh to be processed (thrift serialization via TBinaryProtocol)") + parser.add_argument("vtkfile", help="filename of output vtk mesh (VTK XML unstructured grid") + parser.add_argument("indexfile", help="filename of output ChomboIndexData or FiniteVolumeIndexData (thrift serialization via TBinaryProtocol)") args = parser.parse_args() @@ -680,9 +628,9 @@ def main(): visMesh = VisMesh() protocol_factory = TBinaryProtocol.TBinaryProtocolFactory - # deserialize(visMesh, blob_vismesh, protocol_factory = protocol_factory()) + # deserialize(visMesh, blob_vismesh, protocol_factory = protocol_factory()) print("starting deserialization") - deserialize(visMesh, blob_vismesh, protocol_factory = protocol_factory()) + deserialize(visMesh, blob_vismesh, protocol_factory=protocol_factory()) print("done with deserialization") if args.meshtype == "chombovolume": @@ -700,7 +648,7 @@ def main(): except: e_info = sys.exc_info() - traceback.print_exception(e_info[0],e_info[1],e_info[2],file=sys.stdout) + traceback.print_exception(e_info[0], e_info[1], e_info[2], file=sys.stdout) sys.stderr.write("exception: "+str(e_info[0])+": "+str(e_info[1])+"\n") sys.stderr.flush() sys.exit(-1) diff --git a/thriftBuild/ImageDataset.thrift b/thriftBuild/ImageDataset.thrift deleted file mode 100644 index 5de92c4700..0000000000 --- a/thriftBuild/ImageDataset.thrift +++ /dev/null @@ -1,71 +0,0 @@ -namespace java org.vcell.imagedataset - -typedef i16 short -typedef i32 int -typedef i64 long - -struct ISize { - 1: required int x; - 2: required int y; - 3: required int z; -} - -struct Extent { - 1: required double x; - 2: required double y; - 3: required double z; -} - -struct Origin { - 1: required double x; - 2: required double y; - 3: required double z; -} - -struct ImageSizeInfo { - 1: required string imagePath; - 2: required ISize iSize; - 3: required int numChannels; - 4: required list timePoints; - 5: required int selectedTimeIndex; -} - -struct UShortImage { - 1: required list pixels; - 2: required ISize size; - 3: required Extent extent; - 4: required Origin origin; - 5: optional string name; - 6: optional string description; -} - -struct ImageDataset { - 1: required list images; - 2: required list imageTimeStamps; - 3: required int numZ; -} - -typedef list ImageDatasetList; -typedef string FilePath; -typedef list FilePathList; - -exception ThriftImageException { - 1: required string message; -} - -service ImageDatasetService { - ImageSizeInfo getImageSizeInfo(1:string fileName) - throws (1: ThriftImageException imageException); - - ImageSizeInfo getImageSizeInfoForceZ(1:string fileName, 2:int forceZSize) - throws (1: ThriftImageException imageException); - - ImageDataset readImageDataset(1:string imageID) - throws (1: ThriftImageException imageException); - - ImageDatasetList readImageDatasetChannels(1:string imageID, 2:bool bMergeChannels, 3:int timeIndex, 4:ISize resize) - throws (1: ThriftImageException imageException); - - ImageDataset readImageDatasetFromMultiFiles(1:FilePathList files, 2:bool isTimeSeries, 3:double timeInterval) - throws (1: ThriftImageException imageException); -} diff --git a/thriftBuild/VCellImageJ.thrift b/thriftBuild/VCellImageJ.thrift deleted file mode 100644 index 07a7643590..0000000000 --- a/thriftBuild/VCellImageJ.thrift +++ /dev/null @@ -1,101 +0,0 @@ -namespace java org.vcell.vcellij.api -namespace py vcellij - -typedef i32 int -typedef i64 long - -enum DomainType { - VOLUME - MEMBRANE -} - -typedef int TimeIndex -typedef double TimePoint -typedef double Datum -typedef string DomainName -typedef string FilePath -typedef string SimDataID -typedef string VCML -typedef string SBML -typedef string ApplicationName - -typedef list TimePoints -typedef list Data - -struct SimulationInfo { - 1: required int id; -} - -struct SBMLModel { - 1: required FilePath filepath; -} - -struct VariableInfo{ - 1: required string variableVtuName; - 2: required string variableDisplayName; - 3: required DomainName domainName; - 4: required DomainType variableDomainType; -} - -struct SimulationSpec { - 1: required double outputTimeStep; - 2: required double totalTime; -} - -typedef list VariableList - -exception ThriftDataAccessException { - 1: required string message; -} - -enum SimulationState { - notRun, - running, - done, - failed -} - -struct SimulationStatus { - 1: required SimulationState simState; -} - -//struct ModelInfo { -// 1: required int id; -//} - -service SimulationService { - -// ModelInfo openInVCell( -// 1: SBMLModel sbmlModel) -// throws (1:ThriftDataAccessException dataAccessException); - - SBML getSBML( - 1: VCML vcml, - 2: ApplicationName applicationName) - throws (1:ThriftDataAccessException dataAccessException) - - Data getData( - 1:SimulationInfo simInfo, - 2:VariableInfo varInfo, - 3:TimeIndex timeIndex) - throws (1:ThriftDataAccessException dataAccessException) - - TimePoints getTimePoints( - 1: SimulationInfo simInfo) - throws (1:ThriftDataAccessException dataAccessException); - - VariableList getVariableList( - 1: SimulationInfo simInfo) - throws (1: ThriftDataAccessException dataAccessException); - - SimulationStatus getStatus( - 1: SimulationInfo simInfo) - throws (1:ThriftDataAccessException dataAccessException); - - SimulationInfo computeModel( - 1: SBMLModel model, - 2: SimulationSpec simSpec) - throws (1:ThriftDataAccessException dataAccessException); -} - - diff --git a/thriftBuild/codegen-jtd.sh b/thriftBuild/codegen-jtd.sh index 389aab04ef..50bed9a4e2 100755 --- a/thriftBuild/codegen-jtd.sh +++ b/thriftBuild/codegen-jtd.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash -jtd-codegen vcellopt.jtd.json --python-out ../pythonProject/vcell-opt/vcell_opt/data +jtd-codegen vcellopt.jtd.json --python-out ../pythonCopasiOpt/vcell-opt/vcell_opt/data jtd-codegen vcellopt.jtd.json --java-jackson-out ../vcell-core/src/main/java/org/vcell/optimization/jtd --java-jackson-package org.vcell.optimization.jtd \ No newline at end of file diff --git a/thriftBuild/codegen-thrift.sh b/thriftBuild/codegen-thrift.sh new file mode 100755 index 0000000000..5a7fe3dfe9 --- /dev/null +++ b/thriftBuild/codegen-thrift.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +thrift -out ../vcell-core/src/main/java -v --gen java:generated_annotations=undated VisMesh.thrift +thrift -out ../pythonVtk -v --gen py VisMesh.thrift diff --git a/thriftBuild/genVCThriftClasses.bat b/thriftBuild/genVCThriftClasses.bat deleted file mode 100644 index d917d6ff9c..0000000000 --- a/thriftBuild/genVCThriftClasses.bat +++ /dev/null @@ -1,17 +0,0 @@ -REM Utility to (re-)generate Java and Python classes from thrift IDL specifications -REM writes Java and Python source files as specified in the .thrift files. - -REM Calling thrift executable separately for Java and Python code generation. Comment out either if suppression of one is desired. -thrift --out ..\vcell-core\src\main\java --gen java:generated_annotations=undated pyVCell.thrift -REM thrift_0.9.2.exe --out ..\pythonScripts/VCell_VisIt --gen py pyVCell.thrift - -REM Done. Remember to refresh Eclipse and Visual Studio projects. -thrift --out ..\vcell-core\src\main\java --gen java:generated_annotations=undated VisMesh.thrift -thrift --out ..\pythonScripts/VCell_VTK --gen py VisMesh.thrift - -# ImageJ -thrift --out ..\vcell-core\src\main\java --gen java:generated_annotations=undated VCellImageJ.thrift -thrift --out ..\pythonScripts/VCell_ImageJ --gen py VCellIma - -# ImageDataset -thrift --out ..\vcell-core\src\main\java --gen java:generated_annotations=undated ImageDataset.thrift diff --git a/thriftBuild/genVCellThriftClasses.sh b/thriftBuild/genVCellThriftClasses.sh deleted file mode 100755 index e84f9ba939..0000000000 --- a/thriftBuild/genVCellThriftClasses.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash - -THRIFT_0_10_0=thrift -THRIFT_0_9_2= - -# Utility to (re-)generate Java and Python classes from thrift IDL specifications -# writes Java and Python source files as specified in the .thrift files. - -# Calling thrift executable separately for Java and Python code generation. Comment out either if suppression of one is desired. -$THRIFT_0_10_0 --out ../vcell-core/src/main/java --gen java:generated_annotations=undated pyVCell.thrift -$THRIFT_0_10_0 --out ../pythonScripts/VCell_VTK --gen py pyVCell.thrift -if [ ! -z "$THRIFT_0_9_2" ]; then - $THRIFT_0_9_2 --out ../pythonScripts/VCell_VisIt --gen py pyVCell.thrift -else - echo "skipping python visit binding, thrift 0.9.2 binary required for currently bundled thrift python module." -fi - -# Done. Remember to refresh Eclipse and Visual Studio projects. -$THRIFT_0_10_0 --out ../vcell-core/src/main/java --gen java:generated_annotations=undated VisMesh.thrift -$THRIFT_0_10_0 --out ../pythonScripts/VCell_VTK --gen py VisMesh.thrift - -# Image Simulation service -$THRIFT_0_10_0 --out ../vcell-core/src/main/java --gen java:generated_annotations=undated VCellImageJ.thrift -$THRIFT_0_10_0 --out ../pythonScripts/VCell_ImageJ --gen py VCellImageJ.thrift - -# ImageDataset Service -$THRIFT_0_10_0 --out ../vcell-core/src/main/java --gen java:generated_annotations=undated ImageDataset.thrift diff --git a/thriftBuild/pyVCell.thrift b/thriftBuild/pyVCell.thrift deleted file mode 100644 index 0fcd978aa9..0000000000 --- a/thriftBuild/pyVCell.thrift +++ /dev/null @@ -1,83 +0,0 @@ -namespace java cbit.vcell.client.pyvcellproxy -namespace py pyvcell - -typedef i32 int -typedef i64 long - -enum DomainType { - VOLUME - MEMBRANE -} - -enum DataType { - CELLDATA - POINTDATA -} - -typedef int TimeIndex -typedef double TimePoint -typedef double Datum -typedef string DomainName -typedef string FilePath - -typedef list TimePoints -typedef list Data - -struct VariableInfo{ - 1: required string variableVtuName; - 2: required string variableDisplayName; - 3: required DomainName domainName; - 4: required DomainType variableDomainType; - 5: required string unitsLabel; - 6: required bool isMeshVar; - 7: optional string expressionString; - 8: required DataType dataType; -} - -typedef list VariableList - -struct SimulationDataSetRef { - 1: required string simId; - 2: required string simName; - 3: required string modelId; - 4: required string username; - 5: required string userkey; - 6: required int jobIndex; - 7: required bool isMathModel; - 8: optional string simulationContextName; - 9: required string modelName; - 10: required list originXYZ; - 11: required list extentXYZ; - 12: required bool isTimeVaryingMesh; - 13: required bool isLocal; -} -typedef list SimulationDataSetRefList - -struct PlotData { - 1: required TimePoints timePoints; - 2: required Data data; -} - -struct PostProcessingData { - 1: required VariableList variableList; - 2: required list plotData ; -} - -exception ThriftDataAccessException { - 1: required string message; -} - -service VCellProxy { - - FilePath getDataSetFileOfVariableAtTimeIndex(1:SimulationDataSetRef simulationDataSetRef, 2:VariableInfo varInfo, 3:TimeIndex timeIndex) throws (1:ThriftDataAccessException dataAccessException) - - SimulationDataSetRefList getSimsFromOpenModels() throws (1: ThriftDataAccessException dataAccessException); - - TimePoints getTimePoints(1: SimulationDataSetRef simulationDataSetRef) throws (1:ThriftDataAccessException dataAccessException); - - VariableList getVariableList(1: SimulationDataSetRef simulationDataSetRef) throws (1: ThriftDataAccessException dataAccessException); - - PostProcessingData getPostProcessingData(1: SimulationDataSetRef simulationDataSetRef) throws (1: ThriftDataAccessException dataAccessException); - - void displayPostProcessingDataInVCell(1: SimulationDataSetRef simulationDataSetRef) throws (1: ThriftDataAccessException dataAccessException); -} diff --git a/vcell-client/src/main/java/cbit/vcell/client/data/VCellClientDataServiceImpl.java b/vcell-client/src/main/java/cbit/vcell/client/data/VCellClientDataServiceImpl.java deleted file mode 100644 index daabd171a3..0000000000 --- a/vcell-client/src/main/java/cbit/vcell/client/data/VCellClientDataServiceImpl.java +++ /dev/null @@ -1,272 +0,0 @@ -package cbit.vcell.client.data; - -import java.awt.Component; -import java.awt.Window; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.List; -import java.util.Optional; -import java.util.Vector; - -import javax.swing.JOptionPane; - -import org.vcell.util.DataAccessException; -import org.vcell.util.Extent; -import org.vcell.util.Origin; -import org.vcell.util.VCAssert; -import org.vcell.util.document.KeyValue; -import org.vcell.util.document.User; -import org.vcell.util.document.VCDocument; -import org.vcell.util.gui.DialogUtils; - -import cbit.vcell.biomodel.BioModel; -import cbit.vcell.client.BioModelWindowManager; -import cbit.vcell.client.ClientSimManager.LocalVCSimulationDataIdentifier; -import cbit.vcell.client.LocalDataSetControllerProvider; -import cbit.vcell.client.MathModelWindowManager; -import cbit.vcell.client.TopLevelWindowManager; -import cbit.vcell.client.VCellClient; -import cbit.vcell.client.pyvcellproxy.SimulationDataSetRef; -import cbit.vcell.client.pyvcellproxy.VCellClientDataService; -import cbit.vcell.client.task.AsynchClientTask; -import cbit.vcell.client.task.ClientTaskDispatcher; -import cbit.vcell.clientdb.ClientDocumentManager; -import cbit.vcell.export.server.ExportServiceImpl; -import cbit.vcell.mathmodel.MathModel; -import cbit.vcell.messaging.server.SimulationTask; -import cbit.vcell.parser.ExpressionException; -import cbit.vcell.resource.ResourceUtil; -import cbit.vcell.server.SimulationStatus; -import cbit.vcell.simdata.ClientPDEDataContext; -import cbit.vcell.simdata.DataSetControllerImpl; -import cbit.vcell.simdata.OutputContext; -import cbit.vcell.simdata.PDEDataManager; -import cbit.vcell.simdata.VCDataManager; -import cbit.vcell.simdata.VtkManager; -import cbit.vcell.solver.AnnotatedFunction; -import cbit.vcell.solver.Simulation; -import cbit.vcell.solver.SimulationInfo; -import cbit.vcell.solver.SimulationOwner; -import cbit.vcell.solver.VCSimulationDataIdentifier; -import cbit.vcell.solver.VCSimulationIdentifier; -import cbit.vcell.xml.XmlHelper; -import cbit.vcell.xml.XmlParseException; - -public class VCellClientDataServiceImpl implements VCellClientDataService { - private final VCellClient vcellClient; - - public VCellClientDataServiceImpl(VCellClient vcellClient){ - this.vcellClient = vcellClient; - } - private boolean isVtkSupported(Simulation simulation){ - if (simulation.getMathDescription().getGeometry().getDimension()<2){ - return false; - } - return true; - } - - @Override - public List getSimsFromOpenModels() { - ArrayList simulationDataSetRefs = new ArrayList(); - - for ( TopLevelWindowManager windowManager : vcellClient.getMdiManager().getWindowManagers() ) { - Simulation[] simulations = null; - VCDocument modelDocument = null; - - if (windowManager instanceof BioModelWindowManager){ - BioModelWindowManager selectedBioWindowManager = (BioModelWindowManager)windowManager; - BioModel bioModel = selectedBioWindowManager.getBioModel(); - simulations = bioModel.getSimulations(); - modelDocument = bioModel; -// simOwnerCount = bioModel.getNumSimulationContexts(); - - }else if (windowManager instanceof MathModelWindowManager){ - MathModelWindowManager selectedMathWindowManager = (MathModelWindowManager)windowManager; - MathModel mathModel = selectedMathWindowManager.getMathModel(); - simulations = mathModel.getSimulations(); - modelDocument = mathModel; -// simOwnerCount = 1; - } - if (simulations != null){ - for (Simulation simulation : simulations){ - if (!isVtkSupported(simulation)){ - continue; - } - Origin origin = simulation.getMathDescription().getGeometry().getOrigin(); - Extent extent = simulation.getMathDescription().getGeometry().getExtent(); - SimulationInfo simInfo=simulation.getSimulationInfo(); - SimulationStatus simStatus = vcellClient.getRequestManager().getServerSimulationStatus(simInfo); - for (int jobIndex = 0; jobIndex (name.endsWith(".simtask.xml"))); - for (String simtaskFilename : simtaskFilenames){ - try { - SimulationTask simTask = XmlHelper.XMLToSimTask(org.apache.commons.io.FileUtils.readFileToString(new File(localSimDir,simtaskFilename))); - VCDocument modelDocument = null; - SimulationDataSetRef simulationDataSetReference = VCellClientDataServiceImpl.createSimulationDataSetRef(simTask.getSimulation(), modelDocument, simTask.getSimulationJob().getJobIndex(), true); - simulationDataSetRefs.add(simulationDataSetReference); - }catch (ExpressionException | XmlParseException | IOException e){ - e.printStackTrace(); - } - } - return simulationDataSetRefs; - } - - @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; - } - - 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; - } - } - - @Override - public void displayPostProcessingDataInVCell(SimulationDataSetRef simulationDataSetRef) throws NumberFormatException, DataAccessException { - User vcUser = vcellClient.getRequestManager().getDocumentManager().getUser(); - VCSimulationIdentifier vcSimId = new VCSimulationIdentifier(new KeyValue(simulationDataSetRef.getSimId()), vcUser ); - ClientDocumentManager clientDocumentManager = (ClientDocumentManager) vcellClient.getClientServerManager().getDocumentManager(); - SimulationOwner simulationOwner = null; - - if(simulationDataSetRef.isMathModel){ - simulationOwner = clientDocumentManager.getMathModel(new KeyValue(simulationDataSetRef.getModelId())); - }else{ - BioModel bioModel = clientDocumentManager.getBioModel(new KeyValue(simulationDataSetRef.getModelId())); - simulationOwner = bioModel.getSimulationContext(simulationDataSetRef.getSimulationContextName()); - } - - ArrayList outputFunctionsList = simulationOwner.getOutputFunctionContext().getOutputFunctionsList(); - OutputContext outputContext = new OutputContext(outputFunctionsList.toArray(new AnnotatedFunction[outputFunctionsList.size()])); - VCSimulationDataIdentifier vcSimDataId = new VCSimulationDataIdentifier(vcSimId, simulationDataSetRef.getJobIndex()); - PDEDataManager pdeDataManager = (PDEDataManager)vcellClient.getRequestManager().getDataManager(outputContext, vcSimDataId , true); - final ClientPDEDataContext newClientPDEDataContext = pdeDataManager.getPDEDataContext(); - -// this was the code before the windows refactoring; appears to just always get the first window??? -// Enumeration windowManagers = vcellClient.getMdiManager().getWindowManagers(); -// final Window window = FindWindow.getWindow(windowManagers.nextElement().getComponent()); - - Optional first = vcellClient.getMdiManager().getWindowManagers().stream( ).findFirst(); - VCAssert.assertTrue(first.isPresent(), "window manager not present?" ); - - final Window window = getWindow(first.get().getComponent()); - - AsynchClientTask task = new AsynchClientTask("Display Post Processing Statistics", AsynchClientTask.TASKTYPE_SWING_NONBLOCKING,false,false) { - - @Override - public void run(Hashtable hashTable) throws Exception { - DataProcessingResultsPanel dataProcessingResultsPanel = new DataProcessingResultsPanel(); - dataProcessingResultsPanel.update(newClientPDEDataContext); - DialogUtils.showComponentOKCancelDialog(window, dataProcessingResultsPanel, "Post Processing Statistics"); - } - }; - Hashtable hash = new Hashtable(); - Vector tasksV = new Vector(); - tasksV.add(task); - AsynchClientTask[] tasks = new AsynchClientTask[tasksV.size()]; - tasksV.copyInto(tasks); - ClientTaskDispatcher.dispatch(window, hash, tasks, true); - } - - private Window getWindow(Component component) { - if (component == null) { - return JOptionPane.getRootFrame(); - } else if (component instanceof Window) { - return (Window) component; - } else { - return getWindow(component.getParent()); - } - } - - - public static SimulationDataSetRef createSimulationDataSetRef(Simulation simulation, VCDocument modelDocument, int jobIndex, boolean isLocal){ - SimulationDataSetRef simulationDataSetReference = new SimulationDataSetRef(); - Origin origin = simulation.getMathDescription().getGeometry().getOrigin(); - Extent extent = simulation.getMathDescription().getGeometry().getExtent(); - SimulationInfo simInfo=simulation.getSimulationInfo(); - simulationDataSetReference.setSimName(simInfo.getName()); - // String simName = simInfo.getName(); - // if (jobIndex!=0){ - // simName = simName + " job#"+String.valueOf(jobIndex); - // } - final String modelId; - final boolean isMathModel; - final String modelName; - final String simContextName; - - if (modelDocument!=null){ - modelId = modelDocument.getVersion().getVersionKey().toString(); - isMathModel = (modelDocument instanceof MathModel); - modelName = modelDocument.getName(); - if (modelDocument instanceof BioModel && simulation.getSimulationOwner() != null){ - simContextName = simulation.getSimulationOwner().getName(); - }else{ - simContextName = null; - } - }else{ - modelId = "no id"; - isMathModel = false; - modelName = "no model"; - simContextName = null; - } - simulationDataSetReference.setSimId(simInfo.getAuthoritativeVCSimulationIdentifier().getSimulationKey().toString()); - simulationDataSetReference.setModelId(modelId); - simulationDataSetReference.setUsername(simInfo.getVersion().getOwner().getName()); - simulationDataSetReference.setUserkey(simInfo.getVersion().getOwner().getID().toString()); - simulationDataSetReference.setIsMathModel(isMathModel); - simulationDataSetReference.setJobIndex(jobIndex); - simulationDataSetReference.setModelName(modelName); - simulationDataSetReference.setOriginXYZ(Arrays.asList(new Double[] {origin.getX(),origin.getY(),origin.getZ()})); - simulationDataSetReference.setExtentXYZ(Arrays.asList(new Double[] {extent.getX(),extent.getY(),extent.getZ()})); - if (simContextName!=null){ - simulationDataSetReference.setSimulationContextName(simContextName); - } - simulationDataSetReference.setSimName(simInfo.getName()); - boolean movingBoundarySolver = simulation.getSolverTaskDescription().getSolverDescription().isMovingBoundarySolver(); - simulationDataSetReference.setIsTimeVaryingMesh(movingBoundarySolver); - simulationDataSetReference.setIsLocal(isLocal); - return simulationDataSetReference; - } - - - } \ No newline at end of file diff --git a/vcell-core/pom.xml b/vcell-core/pom.xml index a8af29c3a4..b04e388bbc 100644 --- a/vcell-core/pom.xml +++ b/vcell-core/pom.xml @@ -153,7 +153,7 @@ org.apache.thrift libthrift - 0.10.0 + 0.18.0 diff --git a/vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/DataType.java b/vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/DataType.java deleted file mode 100644 index f9f2aa7934..0000000000 --- a/vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/DataType.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.10.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package cbit.vcell.client.pyvcellproxy; - - -import java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - -public enum DataType implements org.apache.thrift.TEnum { - CELLDATA(0), - POINTDATA(1); - - private final int value; - - private DataType(int value) { - this.value = value; - } - - /** - * Get the integer value of this enum value, as defined in the Thrift IDL. - */ - public int getValue() { - return value; - } - - /** - * Find a the enum type by its integer value, as defined in the Thrift IDL. - * @return null if the value is not found. - */ - public static DataType findByValue(int value) { - switch (value) { - case 0: - return CELLDATA; - case 1: - return POINTDATA; - default: - return null; - } - } -} diff --git a/vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/DomainType.java b/vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/DomainType.java deleted file mode 100644 index e6724a45e4..0000000000 --- a/vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/DomainType.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.10.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package cbit.vcell.client.pyvcellproxy; - - -import java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - -public enum DomainType implements org.apache.thrift.TEnum { - VOLUME(0), - MEMBRANE(1); - - private final int value; - - private DomainType(int value) { - this.value = value; - } - - /** - * Get the integer value of this enum value, as defined in the Thrift IDL. - */ - public int getValue() { - return value; - } - - /** - * Find a the enum type by its integer value, as defined in the Thrift IDL. - * @return null if the value is not found. - */ - public static DomainType findByValue(int value) { - switch (value) { - case 0: - return VOLUME; - case 1: - return MEMBRANE; - default: - return null; - } - } -} diff --git a/vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/PlotData.java b/vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/PlotData.java deleted file mode 100644 index 962bcea447..0000000000 --- a/vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/PlotData.java +++ /dev/null @@ -1,567 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.10.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package cbit.vcell.client.pyvcellproxy; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)") -public class PlotData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PlotData"); - - private static final org.apache.thrift.protocol.TField TIME_POINTS_FIELD_DESC = new org.apache.thrift.protocol.TField("timePoints", org.apache.thrift.protocol.TType.LIST, (short)1); - private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.LIST, (short)2); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new PlotDataStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new PlotDataTupleSchemeFactory(); - - public java.util.List timePoints; // required - public java.util.List data; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TIME_POINTS((short)1, "timePoints"), - DATA((short)2, "data"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TIME_POINTS - return TIME_POINTS; - case 2: // DATA - return DATA; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TIME_POINTS, new org.apache.thrift.meta_data.FieldMetaData("timePoints", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.LIST , "TimePoints"))); - tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.LIST , "Data"))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PlotData.class, metaDataMap); - } - - public PlotData() { - } - - public PlotData( - java.util.List timePoints, - java.util.List data) - { - this(); - this.timePoints = timePoints; - this.data = data; - } - - /** - * Performs a deep copy on other. - */ - public PlotData(PlotData other) { - if (other.isSetTimePoints()) { - java.util.List __this__timePoints = new java.util.ArrayList(other.timePoints.size()); - for (java.lang.Double other_element : other.timePoints) { - __this__timePoints.add(other_element); - } - this.timePoints = __this__timePoints; - } - if (other.isSetData()) { - java.util.List __this__data = new java.util.ArrayList(other.data.size()); - for (java.lang.Double other_element : other.data) { - __this__data.add(other_element); - } - this.data = __this__data; - } - } - - public PlotData deepCopy() { - return new PlotData(this); - } - - @Override - public void clear() { - this.timePoints = null; - this.data = null; - } - - public int getTimePointsSize() { - return (this.timePoints == null) ? 0 : this.timePoints.size(); - } - - public java.util.Iterator getTimePointsIterator() { - return (this.timePoints == null) ? null : this.timePoints.iterator(); - } - - public void addToTimePoints(double elem) { - if (this.timePoints == null) { - this.timePoints = new java.util.ArrayList(); - } - this.timePoints.add(elem); - } - - public java.util.List getTimePoints() { - return this.timePoints; - } - - public PlotData setTimePoints(java.util.List timePoints) { - this.timePoints = timePoints; - return this; - } - - public void unsetTimePoints() { - this.timePoints = null; - } - - /** Returns true if field timePoints is set (has been assigned a value) and false otherwise */ - public boolean isSetTimePoints() { - return this.timePoints != null; - } - - public void setTimePointsIsSet(boolean value) { - if (!value) { - this.timePoints = null; - } - } - - public int getDataSize() { - return (this.data == null) ? 0 : this.data.size(); - } - - public java.util.Iterator getDataIterator() { - return (this.data == null) ? null : this.data.iterator(); - } - - public void addToData(double elem) { - if (this.data == null) { - this.data = new java.util.ArrayList(); - } - this.data.add(elem); - } - - public java.util.List getData() { - return this.data; - } - - public PlotData setData(java.util.List data) { - this.data = data; - return this; - } - - public void unsetData() { - this.data = null; - } - - /** Returns true if field data is set (has been assigned a value) and false otherwise */ - public boolean isSetData() { - return this.data != null; - } - - public void setDataIsSet(boolean value) { - if (!value) { - this.data = null; - } - } - - public void setFieldValue(_Fields field, java.lang.Object value) { - switch (field) { - case TIME_POINTS: - if (value == null) { - unsetTimePoints(); - } else { - setTimePoints((java.util.List)value); - } - break; - - case DATA: - if (value == null) { - unsetData(); - } else { - setData((java.util.List)value); - } - break; - - } - } - - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case TIME_POINTS: - return getTimePoints(); - - case DATA: - return getData(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case TIME_POINTS: - return isSetTimePoints(); - case DATA: - return isSetData(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that == null) - return false; - if (that instanceof PlotData) - return this.equals((PlotData)that); - return false; - } - - public boolean equals(PlotData that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_timePoints = true && this.isSetTimePoints(); - boolean that_present_timePoints = true && that.isSetTimePoints(); - if (this_present_timePoints || that_present_timePoints) { - if (!(this_present_timePoints && that_present_timePoints)) - return false; - if (!this.timePoints.equals(that.timePoints)) - return false; - } - - boolean this_present_data = true && this.isSetData(); - boolean that_present_data = true && that.isSetData(); - if (this_present_data || that_present_data) { - if (!(this_present_data && that_present_data)) - return false; - if (!this.data.equals(that.data)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetTimePoints()) ? 131071 : 524287); - if (isSetTimePoints()) - hashCode = hashCode * 8191 + timePoints.hashCode(); - - hashCode = hashCode * 8191 + ((isSetData()) ? 131071 : 524287); - if (isSetData()) - hashCode = hashCode * 8191 + data.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(PlotData other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.valueOf(isSetTimePoints()).compareTo(other.isSetTimePoints()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTimePoints()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timePoints, other.timePoints); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.valueOf(isSetData()).compareTo(other.isSetData()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetData()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.data, other.data); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("PlotData("); - boolean first = true; - - sb.append("timePoints:"); - if (this.timePoints == null) { - sb.append("null"); - } else { - sb.append(this.timePoints); - } - first = false; - if (!first) sb.append(", "); - sb.append("data:"); - if (this.data == null) { - sb.append("null"); - } else { - sb.append(this.data); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (timePoints == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'timePoints' was not present! Struct: " + toString()); - } - if (data == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'data' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class PlotDataStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public PlotDataStandardScheme getScheme() { - return new PlotDataStandardScheme(); - } - } - - private static class PlotDataStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, PlotData struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // TIME_POINTS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list16 = iprot.readListBegin(); - struct.timePoints = new java.util.ArrayList(_list16.size); - double _elem17; - for (int _i18 = 0; _i18 < _list16.size; ++_i18) - { - _elem17 = iprot.readDouble(); - struct.timePoints.add(_elem17); - } - iprot.readListEnd(); - } - struct.setTimePointsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // DATA - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list19 = iprot.readListBegin(); - struct.data = new java.util.ArrayList(_list19.size); - double _elem20; - for (int _i21 = 0; _i21 < _list19.size; ++_i21) - { - _elem20 = iprot.readDouble(); - struct.data.add(_elem20); - } - iprot.readListEnd(); - } - struct.setDataIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, PlotData struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.timePoints != null) { - oprot.writeFieldBegin(TIME_POINTS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.DOUBLE, struct.timePoints.size())); - for (double _iter22 : struct.timePoints) - { - oprot.writeDouble(_iter22); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.data != null) { - oprot.writeFieldBegin(DATA_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.DOUBLE, struct.data.size())); - for (double _iter23 : struct.data) - { - oprot.writeDouble(_iter23); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class PlotDataTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public PlotDataTupleScheme getScheme() { - return new PlotDataTupleScheme(); - } - } - - private static class PlotDataTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, PlotData struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - { - oprot.writeI32(struct.timePoints.size()); - for (double _iter24 : struct.timePoints) - { - oprot.writeDouble(_iter24); - } - } - { - oprot.writeI32(struct.data.size()); - for (double _iter25 : struct.data) - { - oprot.writeDouble(_iter25); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, PlotData struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - { - org.apache.thrift.protocol.TList _list26 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.DOUBLE, iprot.readI32()); - struct.timePoints = new java.util.ArrayList(_list26.size); - double _elem27; - for (int _i28 = 0; _i28 < _list26.size; ++_i28) - { - _elem27 = iprot.readDouble(); - struct.timePoints.add(_elem27); - } - } - struct.setTimePointsIsSet(true); - { - org.apache.thrift.protocol.TList _list29 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.DOUBLE, iprot.readI32()); - struct.data = new java.util.ArrayList(_list29.size); - double _elem30; - for (int _i31 = 0; _i31 < _list29.size; ++_i31) - { - _elem30 = iprot.readDouble(); - struct.data.add(_elem30); - } - } - struct.setDataIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/PostProcessingData.java b/vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/PostProcessingData.java deleted file mode 100644 index e9ccbd4943..0000000000 --- a/vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/PostProcessingData.java +++ /dev/null @@ -1,572 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.10.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package cbit.vcell.client.pyvcellproxy; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)") -public class PostProcessingData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PostProcessingData"); - - private static final org.apache.thrift.protocol.TField VARIABLE_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("variableList", org.apache.thrift.protocol.TType.LIST, (short)1); - private static final org.apache.thrift.protocol.TField PLOT_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("plotData", org.apache.thrift.protocol.TType.LIST, (short)2); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new PostProcessingDataStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new PostProcessingDataTupleSchemeFactory(); - - public java.util.List variableList; // required - public java.util.List plotData; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - VARIABLE_LIST((short)1, "variableList"), - PLOT_DATA((short)2, "plotData"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // VARIABLE_LIST - return VARIABLE_LIST; - case 2: // PLOT_DATA - return PLOT_DATA; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.VARIABLE_LIST, new org.apache.thrift.meta_data.FieldMetaData("variableList", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.LIST , "VariableList"))); - tmpMap.put(_Fields.PLOT_DATA, new org.apache.thrift.meta_data.FieldMetaData("plotData", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PlotData.class)))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PostProcessingData.class, metaDataMap); - } - - public PostProcessingData() { - } - - public PostProcessingData( - java.util.List variableList, - java.util.List plotData) - { - this(); - this.variableList = variableList; - this.plotData = plotData; - } - - /** - * Performs a deep copy on other. - */ - public PostProcessingData(PostProcessingData other) { - if (other.isSetVariableList()) { - java.util.List __this__variableList = new java.util.ArrayList(other.variableList.size()); - for (VariableInfo other_element : other.variableList) { - __this__variableList.add(new VariableInfo(other_element)); - } - this.variableList = __this__variableList; - } - if (other.isSetPlotData()) { - java.util.List __this__plotData = new java.util.ArrayList(other.plotData.size()); - for (PlotData other_element : other.plotData) { - __this__plotData.add(new PlotData(other_element)); - } - this.plotData = __this__plotData; - } - } - - public PostProcessingData deepCopy() { - return new PostProcessingData(this); - } - - @Override - public void clear() { - this.variableList = null; - this.plotData = null; - } - - public int getVariableListSize() { - return (this.variableList == null) ? 0 : this.variableList.size(); - } - - public java.util.Iterator getVariableListIterator() { - return (this.variableList == null) ? null : this.variableList.iterator(); - } - - public void addToVariableList(VariableInfo elem) { - if (this.variableList == null) { - this.variableList = new java.util.ArrayList(); - } - this.variableList.add(elem); - } - - public java.util.List getVariableList() { - return this.variableList; - } - - public PostProcessingData setVariableList(java.util.List variableList) { - this.variableList = variableList; - return this; - } - - public void unsetVariableList() { - this.variableList = null; - } - - /** Returns true if field variableList is set (has been assigned a value) and false otherwise */ - public boolean isSetVariableList() { - return this.variableList != null; - } - - public void setVariableListIsSet(boolean value) { - if (!value) { - this.variableList = null; - } - } - - public int getPlotDataSize() { - return (this.plotData == null) ? 0 : this.plotData.size(); - } - - public java.util.Iterator getPlotDataIterator() { - return (this.plotData == null) ? null : this.plotData.iterator(); - } - - public void addToPlotData(PlotData elem) { - if (this.plotData == null) { - this.plotData = new java.util.ArrayList(); - } - this.plotData.add(elem); - } - - public java.util.List getPlotData() { - return this.plotData; - } - - public PostProcessingData setPlotData(java.util.List plotData) { - this.plotData = plotData; - return this; - } - - public void unsetPlotData() { - this.plotData = null; - } - - /** Returns true if field plotData is set (has been assigned a value) and false otherwise */ - public boolean isSetPlotData() { - return this.plotData != null; - } - - public void setPlotDataIsSet(boolean value) { - if (!value) { - this.plotData = null; - } - } - - public void setFieldValue(_Fields field, java.lang.Object value) { - switch (field) { - case VARIABLE_LIST: - if (value == null) { - unsetVariableList(); - } else { - setVariableList((java.util.List)value); - } - break; - - case PLOT_DATA: - if (value == null) { - unsetPlotData(); - } else { - setPlotData((java.util.List)value); - } - break; - - } - } - - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case VARIABLE_LIST: - return getVariableList(); - - case PLOT_DATA: - return getPlotData(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case VARIABLE_LIST: - return isSetVariableList(); - case PLOT_DATA: - return isSetPlotData(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that == null) - return false; - if (that instanceof PostProcessingData) - return this.equals((PostProcessingData)that); - return false; - } - - public boolean equals(PostProcessingData that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_variableList = true && this.isSetVariableList(); - boolean that_present_variableList = true && that.isSetVariableList(); - if (this_present_variableList || that_present_variableList) { - if (!(this_present_variableList && that_present_variableList)) - return false; - if (!this.variableList.equals(that.variableList)) - return false; - } - - boolean this_present_plotData = true && this.isSetPlotData(); - boolean that_present_plotData = true && that.isSetPlotData(); - if (this_present_plotData || that_present_plotData) { - if (!(this_present_plotData && that_present_plotData)) - return false; - if (!this.plotData.equals(that.plotData)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetVariableList()) ? 131071 : 524287); - if (isSetVariableList()) - hashCode = hashCode * 8191 + variableList.hashCode(); - - hashCode = hashCode * 8191 + ((isSetPlotData()) ? 131071 : 524287); - if (isSetPlotData()) - hashCode = hashCode * 8191 + plotData.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(PostProcessingData other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.valueOf(isSetVariableList()).compareTo(other.isSetVariableList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetVariableList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.variableList, other.variableList); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.valueOf(isSetPlotData()).compareTo(other.isSetPlotData()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPlotData()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.plotData, other.plotData); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("PostProcessingData("); - boolean first = true; - - sb.append("variableList:"); - if (this.variableList == null) { - sb.append("null"); - } else { - sb.append(this.variableList); - } - first = false; - if (!first) sb.append(", "); - sb.append("plotData:"); - if (this.plotData == null) { - sb.append("null"); - } else { - sb.append(this.plotData); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (variableList == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'variableList' was not present! Struct: " + toString()); - } - if (plotData == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'plotData' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class PostProcessingDataStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public PostProcessingDataStandardScheme getScheme() { - return new PostProcessingDataStandardScheme(); - } - } - - private static class PostProcessingDataStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, PostProcessingData struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // VARIABLE_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list32 = iprot.readListBegin(); - struct.variableList = new java.util.ArrayList(_list32.size); - VariableInfo _elem33; - for (int _i34 = 0; _i34 < _list32.size; ++_i34) - { - _elem33 = new VariableInfo(); - _elem33.read(iprot); - struct.variableList.add(_elem33); - } - iprot.readListEnd(); - } - struct.setVariableListIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // PLOT_DATA - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list35 = iprot.readListBegin(); - struct.plotData = new java.util.ArrayList(_list35.size); - PlotData _elem36; - for (int _i37 = 0; _i37 < _list35.size; ++_i37) - { - _elem36 = new PlotData(); - _elem36.read(iprot); - struct.plotData.add(_elem36); - } - iprot.readListEnd(); - } - struct.setPlotDataIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, PostProcessingData struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.variableList != null) { - oprot.writeFieldBegin(VARIABLE_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.variableList.size())); - for (VariableInfo _iter38 : struct.variableList) - { - _iter38.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.plotData != null) { - oprot.writeFieldBegin(PLOT_DATA_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.plotData.size())); - for (PlotData _iter39 : struct.plotData) - { - _iter39.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class PostProcessingDataTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public PostProcessingDataTupleScheme getScheme() { - return new PostProcessingDataTupleScheme(); - } - } - - private static class PostProcessingDataTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, PostProcessingData struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - { - oprot.writeI32(struct.variableList.size()); - for (VariableInfo _iter40 : struct.variableList) - { - _iter40.write(oprot); - } - } - { - oprot.writeI32(struct.plotData.size()); - for (PlotData _iter41 : struct.plotData) - { - _iter41.write(oprot); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, PostProcessingData struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - { - org.apache.thrift.protocol.TList _list42 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.variableList = new java.util.ArrayList(_list42.size); - VariableInfo _elem43; - for (int _i44 = 0; _i44 < _list42.size; ++_i44) - { - _elem43 = new VariableInfo(); - _elem43.read(iprot); - struct.variableList.add(_elem43); - } - } - struct.setVariableListIsSet(true); - { - org.apache.thrift.protocol.TList _list45 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.plotData = new java.util.ArrayList(_list45.size); - PlotData _elem46; - for (int _i47 = 0; _i47 < _list45.size; ++_i47) - { - _elem46 = new PlotData(); - _elem46.read(iprot); - struct.plotData.add(_elem46); - } - } - struct.setPlotDataIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/PostProcessingDisplayFrame.java b/vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/PostProcessingDisplayFrame.java deleted file mode 100644 index df30f672d7..0000000000 --- a/vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/PostProcessingDisplayFrame.java +++ /dev/null @@ -1,30 +0,0 @@ -package cbit.vcell.client.pyvcellproxy; - -import cbit.vcell.simdata.ClientPDEDataContext; -import cbit.vcell.simdata.DataOperation; -import cbit.vcell.simdata.DataOperationResults.DataProcessingOutputInfo; -import cbit.vcell.simdata.PDEDataContext; - -public class PostProcessingDisplayFrame { - - - - - private PDEDataContext pdeDataContext; - private DataProcessingOutputInfo dataProcessingOutputInfo; - - - - - private void read(ClientPDEDataContext pdeDataContext0) throws Exception { - this.pdeDataContext = pdeDataContext0; - dataProcessingOutputInfo = null; - try { - dataProcessingOutputInfo = (DataProcessingOutputInfo)pdeDataContext.doDataOperation(new DataOperation.DataProcessingOutputInfoOP(pdeDataContext.getVCDataIdentifier(),true,((ClientPDEDataContext)pdeDataContext0).getDataManager().getOutputContext())); - } catch (Exception e) { - e.printStackTrace(); - throw new Exception("Data Processing Output Error - '"+e.getMessage()+"' (Note: Data Processing Output is generated automatically when running VCell 5.2 or later simulations)"); - } - } - -} diff --git a/vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/SimulationDataSetRef.java b/vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/SimulationDataSetRef.java deleted file mode 100644 index f3dba8b81a..0000000000 --- a/vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/SimulationDataSetRef.java +++ /dev/null @@ -1,1649 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.10.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package cbit.vcell.client.pyvcellproxy; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)") -public class SimulationDataSetRef implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SimulationDataSetRef"); - - private static final org.apache.thrift.protocol.TField SIM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("simId", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField SIM_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("simName", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField MODEL_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("modelId", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", org.apache.thrift.protocol.TType.STRING, (short)4); - private static final org.apache.thrift.protocol.TField USERKEY_FIELD_DESC = new org.apache.thrift.protocol.TField("userkey", org.apache.thrift.protocol.TType.STRING, (short)5); - private static final org.apache.thrift.protocol.TField JOB_INDEX_FIELD_DESC = new org.apache.thrift.protocol.TField("jobIndex", org.apache.thrift.protocol.TType.I32, (short)6); - private static final org.apache.thrift.protocol.TField IS_MATH_MODEL_FIELD_DESC = new org.apache.thrift.protocol.TField("isMathModel", org.apache.thrift.protocol.TType.BOOL, (short)7); - private static final org.apache.thrift.protocol.TField SIMULATION_CONTEXT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("simulationContextName", org.apache.thrift.protocol.TType.STRING, (short)8); - private static final org.apache.thrift.protocol.TField MODEL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("modelName", org.apache.thrift.protocol.TType.STRING, (short)9); - private static final org.apache.thrift.protocol.TField ORIGIN_XYZ_FIELD_DESC = new org.apache.thrift.protocol.TField("originXYZ", org.apache.thrift.protocol.TType.LIST, (short)10); - private static final org.apache.thrift.protocol.TField EXTENT_XYZ_FIELD_DESC = new org.apache.thrift.protocol.TField("extentXYZ", org.apache.thrift.protocol.TType.LIST, (short)11); - private static final org.apache.thrift.protocol.TField IS_TIME_VARYING_MESH_FIELD_DESC = new org.apache.thrift.protocol.TField("isTimeVaryingMesh", org.apache.thrift.protocol.TType.BOOL, (short)12); - private static final org.apache.thrift.protocol.TField IS_LOCAL_FIELD_DESC = new org.apache.thrift.protocol.TField("isLocal", org.apache.thrift.protocol.TType.BOOL, (short)13); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new SimulationDataSetRefStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new SimulationDataSetRefTupleSchemeFactory(); - - public java.lang.String simId; // required - public java.lang.String simName; // required - public java.lang.String modelId; // required - public java.lang.String username; // required - public java.lang.String userkey; // required - public int jobIndex; // required - public boolean isMathModel; // required - public java.lang.String simulationContextName; // optional - public java.lang.String modelName; // required - public java.util.List originXYZ; // required - public java.util.List extentXYZ; // required - public boolean isTimeVaryingMesh; // required - public boolean isLocal; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SIM_ID((short)1, "simId"), - SIM_NAME((short)2, "simName"), - MODEL_ID((short)3, "modelId"), - USERNAME((short)4, "username"), - USERKEY((short)5, "userkey"), - JOB_INDEX((short)6, "jobIndex"), - IS_MATH_MODEL((short)7, "isMathModel"), - SIMULATION_CONTEXT_NAME((short)8, "simulationContextName"), - MODEL_NAME((short)9, "modelName"), - ORIGIN_XYZ((short)10, "originXYZ"), - EXTENT_XYZ((short)11, "extentXYZ"), - IS_TIME_VARYING_MESH((short)12, "isTimeVaryingMesh"), - IS_LOCAL((short)13, "isLocal"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SIM_ID - return SIM_ID; - case 2: // SIM_NAME - return SIM_NAME; - case 3: // MODEL_ID - return MODEL_ID; - case 4: // USERNAME - return USERNAME; - case 5: // USERKEY - return USERKEY; - case 6: // JOB_INDEX - return JOB_INDEX; - case 7: // IS_MATH_MODEL - return IS_MATH_MODEL; - case 8: // SIMULATION_CONTEXT_NAME - return SIMULATION_CONTEXT_NAME; - case 9: // MODEL_NAME - return MODEL_NAME; - case 10: // ORIGIN_XYZ - return ORIGIN_XYZ; - case 11: // EXTENT_XYZ - return EXTENT_XYZ; - case 12: // IS_TIME_VARYING_MESH - return IS_TIME_VARYING_MESH; - case 13: // IS_LOCAL - return IS_LOCAL; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __JOBINDEX_ISSET_ID = 0; - private static final int __ISMATHMODEL_ISSET_ID = 1; - private static final int __ISTIMEVARYINGMESH_ISSET_ID = 2; - private static final int __ISLOCAL_ISSET_ID = 3; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.SIMULATION_CONTEXT_NAME}; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SIM_ID, new org.apache.thrift.meta_data.FieldMetaData("simId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.SIM_NAME, new org.apache.thrift.meta_data.FieldMetaData("simName", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.MODEL_ID, new org.apache.thrift.meta_data.FieldMetaData("modelId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.USERKEY, new org.apache.thrift.meta_data.FieldMetaData("userkey", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.JOB_INDEX, new org.apache.thrift.meta_data.FieldMetaData("jobIndex", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32 , "int"))); - tmpMap.put(_Fields.IS_MATH_MODEL, new org.apache.thrift.meta_data.FieldMetaData("isMathModel", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.SIMULATION_CONTEXT_NAME, new org.apache.thrift.meta_data.FieldMetaData("simulationContextName", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.MODEL_NAME, new org.apache.thrift.meta_data.FieldMetaData("modelName", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.ORIGIN_XYZ, new org.apache.thrift.meta_data.FieldMetaData("originXYZ", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)))); - tmpMap.put(_Fields.EXTENT_XYZ, new org.apache.thrift.meta_data.FieldMetaData("extentXYZ", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)))); - tmpMap.put(_Fields.IS_TIME_VARYING_MESH, new org.apache.thrift.meta_data.FieldMetaData("isTimeVaryingMesh", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.IS_LOCAL, new org.apache.thrift.meta_data.FieldMetaData("isLocal", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SimulationDataSetRef.class, metaDataMap); - } - - public SimulationDataSetRef() { - } - - public SimulationDataSetRef( - java.lang.String simId, - java.lang.String simName, - java.lang.String modelId, - java.lang.String username, - java.lang.String userkey, - int jobIndex, - boolean isMathModel, - java.lang.String modelName, - java.util.List originXYZ, - java.util.List extentXYZ, - boolean isTimeVaryingMesh, - boolean isLocal) - { - this(); - this.simId = simId; - this.simName = simName; - this.modelId = modelId; - this.username = username; - this.userkey = userkey; - this.jobIndex = jobIndex; - setJobIndexIsSet(true); - this.isMathModel = isMathModel; - setIsMathModelIsSet(true); - this.modelName = modelName; - this.originXYZ = originXYZ; - this.extentXYZ = extentXYZ; - this.isTimeVaryingMesh = isTimeVaryingMesh; - setIsTimeVaryingMeshIsSet(true); - this.isLocal = isLocal; - setIsLocalIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public SimulationDataSetRef(SimulationDataSetRef other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetSimId()) { - this.simId = other.simId; - } - if (other.isSetSimName()) { - this.simName = other.simName; - } - if (other.isSetModelId()) { - this.modelId = other.modelId; - } - if (other.isSetUsername()) { - this.username = other.username; - } - if (other.isSetUserkey()) { - this.userkey = other.userkey; - } - this.jobIndex = other.jobIndex; - this.isMathModel = other.isMathModel; - if (other.isSetSimulationContextName()) { - this.simulationContextName = other.simulationContextName; - } - if (other.isSetModelName()) { - this.modelName = other.modelName; - } - if (other.isSetOriginXYZ()) { - java.util.List __this__originXYZ = new java.util.ArrayList(other.originXYZ); - this.originXYZ = __this__originXYZ; - } - if (other.isSetExtentXYZ()) { - java.util.List __this__extentXYZ = new java.util.ArrayList(other.extentXYZ); - this.extentXYZ = __this__extentXYZ; - } - this.isTimeVaryingMesh = other.isTimeVaryingMesh; - this.isLocal = other.isLocal; - } - - public SimulationDataSetRef deepCopy() { - return new SimulationDataSetRef(this); - } - - @Override - public void clear() { - this.simId = null; - this.simName = null; - this.modelId = null; - this.username = null; - this.userkey = null; - setJobIndexIsSet(false); - this.jobIndex = 0; - setIsMathModelIsSet(false); - this.isMathModel = false; - this.simulationContextName = null; - this.modelName = null; - this.originXYZ = null; - this.extentXYZ = null; - setIsTimeVaryingMeshIsSet(false); - this.isTimeVaryingMesh = false; - setIsLocalIsSet(false); - this.isLocal = false; - } - - public java.lang.String getSimId() { - return this.simId; - } - - public SimulationDataSetRef setSimId(java.lang.String simId) { - this.simId = simId; - return this; - } - - public void unsetSimId() { - this.simId = null; - } - - /** Returns true if field simId is set (has been assigned a value) and false otherwise */ - public boolean isSetSimId() { - return this.simId != null; - } - - public void setSimIdIsSet(boolean value) { - if (!value) { - this.simId = null; - } - } - - public java.lang.String getSimName() { - return this.simName; - } - - public SimulationDataSetRef setSimName(java.lang.String simName) { - this.simName = simName; - return this; - } - - public void unsetSimName() { - this.simName = null; - } - - /** Returns true if field simName is set (has been assigned a value) and false otherwise */ - public boolean isSetSimName() { - return this.simName != null; - } - - public void setSimNameIsSet(boolean value) { - if (!value) { - this.simName = null; - } - } - - public java.lang.String getModelId() { - return this.modelId; - } - - public SimulationDataSetRef setModelId(java.lang.String modelId) { - this.modelId = modelId; - return this; - } - - public void unsetModelId() { - this.modelId = null; - } - - /** Returns true if field modelId is set (has been assigned a value) and false otherwise */ - public boolean isSetModelId() { - return this.modelId != null; - } - - public void setModelIdIsSet(boolean value) { - if (!value) { - this.modelId = null; - } - } - - public java.lang.String getUsername() { - return this.username; - } - - public SimulationDataSetRef setUsername(java.lang.String username) { - this.username = username; - return this; - } - - public void unsetUsername() { - this.username = null; - } - - /** Returns true if field username is set (has been assigned a value) and false otherwise */ - public boolean isSetUsername() { - return this.username != null; - } - - public void setUsernameIsSet(boolean value) { - if (!value) { - this.username = null; - } - } - - public java.lang.String getUserkey() { - return this.userkey; - } - - public SimulationDataSetRef setUserkey(java.lang.String userkey) { - this.userkey = userkey; - return this; - } - - public void unsetUserkey() { - this.userkey = null; - } - - /** Returns true if field userkey is set (has been assigned a value) and false otherwise */ - public boolean isSetUserkey() { - return this.userkey != null; - } - - public void setUserkeyIsSet(boolean value) { - if (!value) { - this.userkey = null; - } - } - - public int getJobIndex() { - return this.jobIndex; - } - - public SimulationDataSetRef setJobIndex(int jobIndex) { - this.jobIndex = jobIndex; - setJobIndexIsSet(true); - return this; - } - - public void unsetJobIndex() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __JOBINDEX_ISSET_ID); - } - - /** Returns true if field jobIndex is set (has been assigned a value) and false otherwise */ - public boolean isSetJobIndex() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __JOBINDEX_ISSET_ID); - } - - public void setJobIndexIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __JOBINDEX_ISSET_ID, value); - } - - public boolean isIsMathModel() { - return this.isMathModel; - } - - public SimulationDataSetRef setIsMathModel(boolean isMathModel) { - this.isMathModel = isMathModel; - setIsMathModelIsSet(true); - return this; - } - - public void unsetIsMathModel() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISMATHMODEL_ISSET_ID); - } - - /** Returns true if field isMathModel is set (has been assigned a value) and false otherwise */ - public boolean isSetIsMathModel() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISMATHMODEL_ISSET_ID); - } - - public void setIsMathModelIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISMATHMODEL_ISSET_ID, value); - } - - public java.lang.String getSimulationContextName() { - return this.simulationContextName; - } - - public SimulationDataSetRef setSimulationContextName(java.lang.String simulationContextName) { - this.simulationContextName = simulationContextName; - return this; - } - - public void unsetSimulationContextName() { - this.simulationContextName = null; - } - - /** Returns true if field simulationContextName is set (has been assigned a value) and false otherwise */ - public boolean isSetSimulationContextName() { - return this.simulationContextName != null; - } - - public void setSimulationContextNameIsSet(boolean value) { - if (!value) { - this.simulationContextName = null; - } - } - - public java.lang.String getModelName() { - return this.modelName; - } - - public SimulationDataSetRef setModelName(java.lang.String modelName) { - this.modelName = modelName; - return this; - } - - public void unsetModelName() { - this.modelName = null; - } - - /** Returns true if field modelName is set (has been assigned a value) and false otherwise */ - public boolean isSetModelName() { - return this.modelName != null; - } - - public void setModelNameIsSet(boolean value) { - if (!value) { - this.modelName = null; - } - } - - public int getOriginXYZSize() { - return (this.originXYZ == null) ? 0 : this.originXYZ.size(); - } - - public java.util.Iterator getOriginXYZIterator() { - return (this.originXYZ == null) ? null : this.originXYZ.iterator(); - } - - public void addToOriginXYZ(double elem) { - if (this.originXYZ == null) { - this.originXYZ = new java.util.ArrayList(); - } - this.originXYZ.add(elem); - } - - public java.util.List getOriginXYZ() { - return this.originXYZ; - } - - public SimulationDataSetRef setOriginXYZ(java.util.List originXYZ) { - this.originXYZ = originXYZ; - return this; - } - - public void unsetOriginXYZ() { - this.originXYZ = null; - } - - /** Returns true if field originXYZ is set (has been assigned a value) and false otherwise */ - public boolean isSetOriginXYZ() { - return this.originXYZ != null; - } - - public void setOriginXYZIsSet(boolean value) { - if (!value) { - this.originXYZ = null; - } - } - - public int getExtentXYZSize() { - return (this.extentXYZ == null) ? 0 : this.extentXYZ.size(); - } - - public java.util.Iterator getExtentXYZIterator() { - return (this.extentXYZ == null) ? null : this.extentXYZ.iterator(); - } - - public void addToExtentXYZ(double elem) { - if (this.extentXYZ == null) { - this.extentXYZ = new java.util.ArrayList(); - } - this.extentXYZ.add(elem); - } - - public java.util.List getExtentXYZ() { - return this.extentXYZ; - } - - public SimulationDataSetRef setExtentXYZ(java.util.List extentXYZ) { - this.extentXYZ = extentXYZ; - return this; - } - - public void unsetExtentXYZ() { - this.extentXYZ = null; - } - - /** Returns true if field extentXYZ is set (has been assigned a value) and false otherwise */ - public boolean isSetExtentXYZ() { - return this.extentXYZ != null; - } - - public void setExtentXYZIsSet(boolean value) { - if (!value) { - this.extentXYZ = null; - } - } - - public boolean isIsTimeVaryingMesh() { - return this.isTimeVaryingMesh; - } - - public SimulationDataSetRef setIsTimeVaryingMesh(boolean isTimeVaryingMesh) { - this.isTimeVaryingMesh = isTimeVaryingMesh; - setIsTimeVaryingMeshIsSet(true); - return this; - } - - public void unsetIsTimeVaryingMesh() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISTIMEVARYINGMESH_ISSET_ID); - } - - /** Returns true if field isTimeVaryingMesh is set (has been assigned a value) and false otherwise */ - public boolean isSetIsTimeVaryingMesh() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISTIMEVARYINGMESH_ISSET_ID); - } - - public void setIsTimeVaryingMeshIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISTIMEVARYINGMESH_ISSET_ID, value); - } - - public boolean isIsLocal() { - return this.isLocal; - } - - public SimulationDataSetRef setIsLocal(boolean isLocal) { - this.isLocal = isLocal; - setIsLocalIsSet(true); - return this; - } - - public void unsetIsLocal() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISLOCAL_ISSET_ID); - } - - /** Returns true if field isLocal is set (has been assigned a value) and false otherwise */ - public boolean isSetIsLocal() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISLOCAL_ISSET_ID); - } - - public void setIsLocalIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISLOCAL_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, java.lang.Object value) { - switch (field) { - case SIM_ID: - if (value == null) { - unsetSimId(); - } else { - setSimId((java.lang.String)value); - } - break; - - case SIM_NAME: - if (value == null) { - unsetSimName(); - } else { - setSimName((java.lang.String)value); - } - break; - - case MODEL_ID: - if (value == null) { - unsetModelId(); - } else { - setModelId((java.lang.String)value); - } - break; - - case USERNAME: - if (value == null) { - unsetUsername(); - } else { - setUsername((java.lang.String)value); - } - break; - - case USERKEY: - if (value == null) { - unsetUserkey(); - } else { - setUserkey((java.lang.String)value); - } - break; - - case JOB_INDEX: - if (value == null) { - unsetJobIndex(); - } else { - setJobIndex((java.lang.Integer)value); - } - break; - - case IS_MATH_MODEL: - if (value == null) { - unsetIsMathModel(); - } else { - setIsMathModel((java.lang.Boolean)value); - } - break; - - case SIMULATION_CONTEXT_NAME: - if (value == null) { - unsetSimulationContextName(); - } else { - setSimulationContextName((java.lang.String)value); - } - break; - - case MODEL_NAME: - if (value == null) { - unsetModelName(); - } else { - setModelName((java.lang.String)value); - } - break; - - case ORIGIN_XYZ: - if (value == null) { - unsetOriginXYZ(); - } else { - setOriginXYZ((java.util.List)value); - } - break; - - case EXTENT_XYZ: - if (value == null) { - unsetExtentXYZ(); - } else { - setExtentXYZ((java.util.List)value); - } - break; - - case IS_TIME_VARYING_MESH: - if (value == null) { - unsetIsTimeVaryingMesh(); - } else { - setIsTimeVaryingMesh((java.lang.Boolean)value); - } - break; - - case IS_LOCAL: - if (value == null) { - unsetIsLocal(); - } else { - setIsLocal((java.lang.Boolean)value); - } - break; - - } - } - - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SIM_ID: - return getSimId(); - - case SIM_NAME: - return getSimName(); - - case MODEL_ID: - return getModelId(); - - case USERNAME: - return getUsername(); - - case USERKEY: - return getUserkey(); - - case JOB_INDEX: - return getJobIndex(); - - case IS_MATH_MODEL: - return isIsMathModel(); - - case SIMULATION_CONTEXT_NAME: - return getSimulationContextName(); - - case MODEL_NAME: - return getModelName(); - - case ORIGIN_XYZ: - return getOriginXYZ(); - - case EXTENT_XYZ: - return getExtentXYZ(); - - case IS_TIME_VARYING_MESH: - return isIsTimeVaryingMesh(); - - case IS_LOCAL: - return isIsLocal(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SIM_ID: - return isSetSimId(); - case SIM_NAME: - return isSetSimName(); - case MODEL_ID: - return isSetModelId(); - case USERNAME: - return isSetUsername(); - case USERKEY: - return isSetUserkey(); - case JOB_INDEX: - return isSetJobIndex(); - case IS_MATH_MODEL: - return isSetIsMathModel(); - case SIMULATION_CONTEXT_NAME: - return isSetSimulationContextName(); - case MODEL_NAME: - return isSetModelName(); - case ORIGIN_XYZ: - return isSetOriginXYZ(); - case EXTENT_XYZ: - return isSetExtentXYZ(); - case IS_TIME_VARYING_MESH: - return isSetIsTimeVaryingMesh(); - case IS_LOCAL: - return isSetIsLocal(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that == null) - return false; - if (that instanceof SimulationDataSetRef) - return this.equals((SimulationDataSetRef)that); - return false; - } - - public boolean equals(SimulationDataSetRef that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_simId = true && this.isSetSimId(); - boolean that_present_simId = true && that.isSetSimId(); - if (this_present_simId || that_present_simId) { - if (!(this_present_simId && that_present_simId)) - return false; - if (!this.simId.equals(that.simId)) - return false; - } - - boolean this_present_simName = true && this.isSetSimName(); - boolean that_present_simName = true && that.isSetSimName(); - if (this_present_simName || that_present_simName) { - if (!(this_present_simName && that_present_simName)) - return false; - if (!this.simName.equals(that.simName)) - return false; - } - - boolean this_present_modelId = true && this.isSetModelId(); - boolean that_present_modelId = true && that.isSetModelId(); - if (this_present_modelId || that_present_modelId) { - if (!(this_present_modelId && that_present_modelId)) - return false; - if (!this.modelId.equals(that.modelId)) - return false; - } - - boolean this_present_username = true && this.isSetUsername(); - boolean that_present_username = true && that.isSetUsername(); - if (this_present_username || that_present_username) { - if (!(this_present_username && that_present_username)) - return false; - if (!this.username.equals(that.username)) - return false; - } - - boolean this_present_userkey = true && this.isSetUserkey(); - boolean that_present_userkey = true && that.isSetUserkey(); - if (this_present_userkey || that_present_userkey) { - if (!(this_present_userkey && that_present_userkey)) - return false; - if (!this.userkey.equals(that.userkey)) - return false; - } - - boolean this_present_jobIndex = true; - boolean that_present_jobIndex = true; - if (this_present_jobIndex || that_present_jobIndex) { - if (!(this_present_jobIndex && that_present_jobIndex)) - return false; - if (this.jobIndex != that.jobIndex) - return false; - } - - boolean this_present_isMathModel = true; - boolean that_present_isMathModel = true; - if (this_present_isMathModel || that_present_isMathModel) { - if (!(this_present_isMathModel && that_present_isMathModel)) - return false; - if (this.isMathModel != that.isMathModel) - return false; - } - - boolean this_present_simulationContextName = true && this.isSetSimulationContextName(); - boolean that_present_simulationContextName = true && that.isSetSimulationContextName(); - if (this_present_simulationContextName || that_present_simulationContextName) { - if (!(this_present_simulationContextName && that_present_simulationContextName)) - return false; - if (!this.simulationContextName.equals(that.simulationContextName)) - return false; - } - - boolean this_present_modelName = true && this.isSetModelName(); - boolean that_present_modelName = true && that.isSetModelName(); - if (this_present_modelName || that_present_modelName) { - if (!(this_present_modelName && that_present_modelName)) - return false; - if (!this.modelName.equals(that.modelName)) - return false; - } - - boolean this_present_originXYZ = true && this.isSetOriginXYZ(); - boolean that_present_originXYZ = true && that.isSetOriginXYZ(); - if (this_present_originXYZ || that_present_originXYZ) { - if (!(this_present_originXYZ && that_present_originXYZ)) - return false; - if (!this.originXYZ.equals(that.originXYZ)) - return false; - } - - boolean this_present_extentXYZ = true && this.isSetExtentXYZ(); - boolean that_present_extentXYZ = true && that.isSetExtentXYZ(); - if (this_present_extentXYZ || that_present_extentXYZ) { - if (!(this_present_extentXYZ && that_present_extentXYZ)) - return false; - if (!this.extentXYZ.equals(that.extentXYZ)) - return false; - } - - boolean this_present_isTimeVaryingMesh = true; - boolean that_present_isTimeVaryingMesh = true; - if (this_present_isTimeVaryingMesh || that_present_isTimeVaryingMesh) { - if (!(this_present_isTimeVaryingMesh && that_present_isTimeVaryingMesh)) - return false; - if (this.isTimeVaryingMesh != that.isTimeVaryingMesh) - return false; - } - - boolean this_present_isLocal = true; - boolean that_present_isLocal = true; - if (this_present_isLocal || that_present_isLocal) { - if (!(this_present_isLocal && that_present_isLocal)) - return false; - if (this.isLocal != that.isLocal) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSimId()) ? 131071 : 524287); - if (isSetSimId()) - hashCode = hashCode * 8191 + simId.hashCode(); - - hashCode = hashCode * 8191 + ((isSetSimName()) ? 131071 : 524287); - if (isSetSimName()) - hashCode = hashCode * 8191 + simName.hashCode(); - - hashCode = hashCode * 8191 + ((isSetModelId()) ? 131071 : 524287); - if (isSetModelId()) - hashCode = hashCode * 8191 + modelId.hashCode(); - - hashCode = hashCode * 8191 + ((isSetUsername()) ? 131071 : 524287); - if (isSetUsername()) - hashCode = hashCode * 8191 + username.hashCode(); - - hashCode = hashCode * 8191 + ((isSetUserkey()) ? 131071 : 524287); - if (isSetUserkey()) - hashCode = hashCode * 8191 + userkey.hashCode(); - - hashCode = hashCode * 8191 + jobIndex; - - hashCode = hashCode * 8191 + ((isMathModel) ? 131071 : 524287); - - hashCode = hashCode * 8191 + ((isSetSimulationContextName()) ? 131071 : 524287); - if (isSetSimulationContextName()) - hashCode = hashCode * 8191 + simulationContextName.hashCode(); - - hashCode = hashCode * 8191 + ((isSetModelName()) ? 131071 : 524287); - if (isSetModelName()) - hashCode = hashCode * 8191 + modelName.hashCode(); - - hashCode = hashCode * 8191 + ((isSetOriginXYZ()) ? 131071 : 524287); - if (isSetOriginXYZ()) - hashCode = hashCode * 8191 + originXYZ.hashCode(); - - hashCode = hashCode * 8191 + ((isSetExtentXYZ()) ? 131071 : 524287); - if (isSetExtentXYZ()) - hashCode = hashCode * 8191 + extentXYZ.hashCode(); - - hashCode = hashCode * 8191 + ((isTimeVaryingMesh) ? 131071 : 524287); - - hashCode = hashCode * 8191 + ((isLocal) ? 131071 : 524287); - - return hashCode; - } - - @Override - public int compareTo(SimulationDataSetRef other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.valueOf(isSetSimId()).compareTo(other.isSetSimId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSimId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.simId, other.simId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.valueOf(isSetSimName()).compareTo(other.isSetSimName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSimName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.simName, other.simName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.valueOf(isSetModelId()).compareTo(other.isSetModelId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetModelId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.modelId, other.modelId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUsername()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, other.username); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.valueOf(isSetUserkey()).compareTo(other.isSetUserkey()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUserkey()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userkey, other.userkey); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.valueOf(isSetJobIndex()).compareTo(other.isSetJobIndex()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetJobIndex()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobIndex, other.jobIndex); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.valueOf(isSetIsMathModel()).compareTo(other.isSetIsMathModel()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIsMathModel()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isMathModel, other.isMathModel); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.valueOf(isSetSimulationContextName()).compareTo(other.isSetSimulationContextName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSimulationContextName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.simulationContextName, other.simulationContextName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.valueOf(isSetModelName()).compareTo(other.isSetModelName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetModelName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.modelName, other.modelName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.valueOf(isSetOriginXYZ()).compareTo(other.isSetOriginXYZ()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetOriginXYZ()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.originXYZ, other.originXYZ); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.valueOf(isSetExtentXYZ()).compareTo(other.isSetExtentXYZ()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetExtentXYZ()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extentXYZ, other.extentXYZ); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.valueOf(isSetIsTimeVaryingMesh()).compareTo(other.isSetIsTimeVaryingMesh()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIsTimeVaryingMesh()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isTimeVaryingMesh, other.isTimeVaryingMesh); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.valueOf(isSetIsLocal()).compareTo(other.isSetIsLocal()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIsLocal()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isLocal, other.isLocal); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("SimulationDataSetRef("); - boolean first = true; - - sb.append("simId:"); - if (this.simId == null) { - sb.append("null"); - } else { - sb.append(this.simId); - } - first = false; - if (!first) sb.append(", "); - sb.append("simName:"); - if (this.simName == null) { - sb.append("null"); - } else { - sb.append(this.simName); - } - first = false; - if (!first) sb.append(", "); - sb.append("modelId:"); - if (this.modelId == null) { - sb.append("null"); - } else { - sb.append(this.modelId); - } - first = false; - if (!first) sb.append(", "); - sb.append("username:"); - if (this.username == null) { - sb.append("null"); - } else { - sb.append(this.username); - } - first = false; - if (!first) sb.append(", "); - sb.append("userkey:"); - if (this.userkey == null) { - sb.append("null"); - } else { - sb.append(this.userkey); - } - first = false; - if (!first) sb.append(", "); - sb.append("jobIndex:"); - sb.append(this.jobIndex); - first = false; - if (!first) sb.append(", "); - sb.append("isMathModel:"); - sb.append(this.isMathModel); - first = false; - if (isSetSimulationContextName()) { - if (!first) sb.append(", "); - sb.append("simulationContextName:"); - if (this.simulationContextName == null) { - sb.append("null"); - } else { - sb.append(this.simulationContextName); - } - first = false; - } - if (!first) sb.append(", "); - sb.append("modelName:"); - if (this.modelName == null) { - sb.append("null"); - } else { - sb.append(this.modelName); - } - first = false; - if (!first) sb.append(", "); - sb.append("originXYZ:"); - if (this.originXYZ == null) { - sb.append("null"); - } else { - sb.append(this.originXYZ); - } - first = false; - if (!first) sb.append(", "); - sb.append("extentXYZ:"); - if (this.extentXYZ == null) { - sb.append("null"); - } else { - sb.append(this.extentXYZ); - } - first = false; - if (!first) sb.append(", "); - sb.append("isTimeVaryingMesh:"); - sb.append(this.isTimeVaryingMesh); - first = false; - if (!first) sb.append(", "); - sb.append("isLocal:"); - sb.append(this.isLocal); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (simId == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'simId' was not present! Struct: " + toString()); - } - if (simName == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'simName' was not present! Struct: " + toString()); - } - if (modelId == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'modelId' was not present! Struct: " + toString()); - } - if (username == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'username' was not present! Struct: " + toString()); - } - if (userkey == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'userkey' was not present! Struct: " + toString()); - } - // alas, we cannot check 'jobIndex' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'isMathModel' because it's a primitive and you chose the non-beans generator. - if (modelName == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'modelName' was not present! Struct: " + toString()); - } - if (originXYZ == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'originXYZ' was not present! Struct: " + toString()); - } - if (extentXYZ == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'extentXYZ' was not present! Struct: " + toString()); - } - // alas, we cannot check 'isTimeVaryingMesh' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'isLocal' because it's a primitive and you chose the non-beans generator. - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class SimulationDataSetRefStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public SimulationDataSetRefStandardScheme getScheme() { - return new SimulationDataSetRefStandardScheme(); - } - } - - private static class SimulationDataSetRefStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, SimulationDataSetRef struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SIM_ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.simId = iprot.readString(); - struct.setSimIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // SIM_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.simName = iprot.readString(); - struct.setSimNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // MODEL_ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.modelId = iprot.readString(); - struct.setModelIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // USERNAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.username = iprot.readString(); - struct.setUsernameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // USERKEY - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.userkey = iprot.readString(); - struct.setUserkeyIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // JOB_INDEX - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.jobIndex = iprot.readI32(); - struct.setJobIndexIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // IS_MATH_MODEL - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.isMathModel = iprot.readBool(); - struct.setIsMathModelIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // SIMULATION_CONTEXT_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.simulationContextName = iprot.readString(); - struct.setSimulationContextNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 9: // MODEL_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.modelName = iprot.readString(); - struct.setModelNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 10: // ORIGIN_XYZ - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); - struct.originXYZ = new java.util.ArrayList(_list0.size); - double _elem1; - for (int _i2 = 0; _i2 < _list0.size; ++_i2) - { - _elem1 = iprot.readDouble(); - struct.originXYZ.add(_elem1); - } - iprot.readListEnd(); - } - struct.setOriginXYZIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 11: // EXTENT_XYZ - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list3 = iprot.readListBegin(); - struct.extentXYZ = new java.util.ArrayList(_list3.size); - double _elem4; - for (int _i5 = 0; _i5 < _list3.size; ++_i5) - { - _elem4 = iprot.readDouble(); - struct.extentXYZ.add(_elem4); - } - iprot.readListEnd(); - } - struct.setExtentXYZIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 12: // IS_TIME_VARYING_MESH - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.isTimeVaryingMesh = iprot.readBool(); - struct.setIsTimeVaryingMeshIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 13: // IS_LOCAL - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.isLocal = iprot.readBool(); - struct.setIsLocalIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetJobIndex()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'jobIndex' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetIsMathModel()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'isMathModel' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetIsTimeVaryingMesh()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'isTimeVaryingMesh' was not found in serialized data! Struct: " + toString()); - } - if (!struct.isSetIsLocal()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'isLocal' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, SimulationDataSetRef struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.simId != null) { - oprot.writeFieldBegin(SIM_ID_FIELD_DESC); - oprot.writeString(struct.simId); - oprot.writeFieldEnd(); - } - if (struct.simName != null) { - oprot.writeFieldBegin(SIM_NAME_FIELD_DESC); - oprot.writeString(struct.simName); - oprot.writeFieldEnd(); - } - if (struct.modelId != null) { - oprot.writeFieldBegin(MODEL_ID_FIELD_DESC); - oprot.writeString(struct.modelId); - oprot.writeFieldEnd(); - } - if (struct.username != null) { - oprot.writeFieldBegin(USERNAME_FIELD_DESC); - oprot.writeString(struct.username); - oprot.writeFieldEnd(); - } - if (struct.userkey != null) { - oprot.writeFieldBegin(USERKEY_FIELD_DESC); - oprot.writeString(struct.userkey); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(JOB_INDEX_FIELD_DESC); - oprot.writeI32(struct.jobIndex); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(IS_MATH_MODEL_FIELD_DESC); - oprot.writeBool(struct.isMathModel); - oprot.writeFieldEnd(); - if (struct.simulationContextName != null) { - if (struct.isSetSimulationContextName()) { - oprot.writeFieldBegin(SIMULATION_CONTEXT_NAME_FIELD_DESC); - oprot.writeString(struct.simulationContextName); - oprot.writeFieldEnd(); - } - } - if (struct.modelName != null) { - oprot.writeFieldBegin(MODEL_NAME_FIELD_DESC); - oprot.writeString(struct.modelName); - oprot.writeFieldEnd(); - } - if (struct.originXYZ != null) { - oprot.writeFieldBegin(ORIGIN_XYZ_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.DOUBLE, struct.originXYZ.size())); - for (double _iter6 : struct.originXYZ) - { - oprot.writeDouble(_iter6); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.extentXYZ != null) { - oprot.writeFieldBegin(EXTENT_XYZ_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.DOUBLE, struct.extentXYZ.size())); - for (double _iter7 : struct.extentXYZ) - { - oprot.writeDouble(_iter7); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(IS_TIME_VARYING_MESH_FIELD_DESC); - oprot.writeBool(struct.isTimeVaryingMesh); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(IS_LOCAL_FIELD_DESC); - oprot.writeBool(struct.isLocal); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class SimulationDataSetRefTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public SimulationDataSetRefTupleScheme getScheme() { - return new SimulationDataSetRefTupleScheme(); - } - } - - private static class SimulationDataSetRefTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, SimulationDataSetRef struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeString(struct.simId); - oprot.writeString(struct.simName); - oprot.writeString(struct.modelId); - oprot.writeString(struct.username); - oprot.writeString(struct.userkey); - oprot.writeI32(struct.jobIndex); - oprot.writeBool(struct.isMathModel); - oprot.writeString(struct.modelName); - { - oprot.writeI32(struct.originXYZ.size()); - for (double _iter8 : struct.originXYZ) - { - oprot.writeDouble(_iter8); - } - } - { - oprot.writeI32(struct.extentXYZ.size()); - for (double _iter9 : struct.extentXYZ) - { - oprot.writeDouble(_iter9); - } - } - oprot.writeBool(struct.isTimeVaryingMesh); - oprot.writeBool(struct.isLocal); - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSimulationContextName()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSimulationContextName()) { - oprot.writeString(struct.simulationContextName); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, SimulationDataSetRef struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.simId = iprot.readString(); - struct.setSimIdIsSet(true); - struct.simName = iprot.readString(); - struct.setSimNameIsSet(true); - struct.modelId = iprot.readString(); - struct.setModelIdIsSet(true); - struct.username = iprot.readString(); - struct.setUsernameIsSet(true); - struct.userkey = iprot.readString(); - struct.setUserkeyIsSet(true); - struct.jobIndex = iprot.readI32(); - struct.setJobIndexIsSet(true); - struct.isMathModel = iprot.readBool(); - struct.setIsMathModelIsSet(true); - struct.modelName = iprot.readString(); - struct.setModelNameIsSet(true); - { - org.apache.thrift.protocol.TList _list10 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.DOUBLE, iprot.readI32()); - struct.originXYZ = new java.util.ArrayList(_list10.size); - double _elem11; - for (int _i12 = 0; _i12 < _list10.size; ++_i12) - { - _elem11 = iprot.readDouble(); - struct.originXYZ.add(_elem11); - } - } - struct.setOriginXYZIsSet(true); - { - org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.DOUBLE, iprot.readI32()); - struct.extentXYZ = new java.util.ArrayList(_list13.size); - double _elem14; - for (int _i15 = 0; _i15 < _list13.size; ++_i15) - { - _elem14 = iprot.readDouble(); - struct.extentXYZ.add(_elem14); - } - } - struct.setExtentXYZIsSet(true); - struct.isTimeVaryingMesh = iprot.readBool(); - struct.setIsTimeVaryingMeshIsSet(true); - struct.isLocal = iprot.readBool(); - struct.setIsLocalIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.simulationContextName = iprot.readString(); - struct.setSimulationContextNameIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/ThriftDataAccessException.java b/vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/ThriftDataAccessException.java deleted file mode 100644 index d36001db90..0000000000 --- a/vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/ThriftDataAccessException.java +++ /dev/null @@ -1,365 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.10.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package cbit.vcell.client.pyvcellproxy; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)") -public class ThriftDataAccessException extends org.apache.thrift.TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ThriftDataAccessException"); - - private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ThriftDataAccessExceptionStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ThriftDataAccessExceptionTupleSchemeFactory(); - - public java.lang.String message; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - MESSAGE((short)1, "message"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // MESSAGE - return MESSAGE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ThriftDataAccessException.class, metaDataMap); - } - - public ThriftDataAccessException() { - } - - public ThriftDataAccessException( - java.lang.String message) - { - this(); - this.message = message; - } - - /** - * Performs a deep copy on other. - */ - public ThriftDataAccessException(ThriftDataAccessException other) { - if (other.isSetMessage()) { - this.message = other.message; - } - } - - public ThriftDataAccessException deepCopy() { - return new ThriftDataAccessException(this); - } - - @Override - public void clear() { - this.message = null; - } - - public java.lang.String getMessage() { - return this.message; - } - - public ThriftDataAccessException setMessage(java.lang.String message) { - this.message = message; - return this; - } - - public void unsetMessage() { - this.message = null; - } - - /** Returns true if field message is set (has been assigned a value) and false otherwise */ - public boolean isSetMessage() { - return this.message != null; - } - - public void setMessageIsSet(boolean value) { - if (!value) { - this.message = null; - } - } - - public void setFieldValue(_Fields field, java.lang.Object value) { - switch (field) { - case MESSAGE: - if (value == null) { - unsetMessage(); - } else { - setMessage((java.lang.String)value); - } - break; - - } - } - - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case MESSAGE: - return getMessage(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case MESSAGE: - return isSetMessage(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that == null) - return false; - if (that instanceof ThriftDataAccessException) - return this.equals((ThriftDataAccessException)that); - return false; - } - - public boolean equals(ThriftDataAccessException that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_message = true && this.isSetMessage(); - boolean that_present_message = true && that.isSetMessage(); - if (this_present_message || that_present_message) { - if (!(this_present_message && that_present_message)) - return false; - if (!this.message.equals(that.message)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetMessage()) ? 131071 : 524287); - if (isSetMessage()) - hashCode = hashCode * 8191 + message.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(ThriftDataAccessException other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMessage()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("ThriftDataAccessException("); - boolean first = true; - - sb.append("message:"); - if (this.message == null) { - sb.append("null"); - } else { - sb.append(this.message); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (message == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'message' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class ThriftDataAccessExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public ThriftDataAccessExceptionStandardScheme getScheme() { - return new ThriftDataAccessExceptionStandardScheme(); - } - } - - private static class ThriftDataAccessExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, ThriftDataAccessException struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // MESSAGE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.message = iprot.readString(); - struct.setMessageIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, ThriftDataAccessException struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(struct.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class ThriftDataAccessExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public ThriftDataAccessExceptionTupleScheme getScheme() { - return new ThriftDataAccessExceptionTupleScheme(); - } - } - - private static class ThriftDataAccessExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, ThriftDataAccessException struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeString(struct.message); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, ThriftDataAccessException struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.message = iprot.readString(); - struct.setMessageIsSet(true); - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/VCellClientDataService.java b/vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/VCellClientDataService.java deleted file mode 100644 index 698bf05010..0000000000 --- a/vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/VCellClientDataService.java +++ /dev/null @@ -1,14 +0,0 @@ -package cbit.vcell.client.pyvcellproxy; - -import java.io.FileNotFoundException; -import java.util.List; - -import org.vcell.util.DataAccessException; - -import cbit.vcell.simdata.VtkManager; - -public interface VCellClientDataService { - public List getSimsFromOpenModels(); - public VtkManager getVtkManager(SimulationDataSetRef simulationDataSetRef) throws FileNotFoundException, DataAccessException; - public void displayPostProcessingDataInVCell(SimulationDataSetRef simulationDataSetRef) throws NumberFormatException, DataAccessException; -} \ No newline at end of file diff --git a/vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/VCellProxy.java b/vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/VCellProxy.java deleted file mode 100644 index 5fd8d81115..0000000000 --- a/vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/VCellProxy.java +++ /dev/null @@ -1,6171 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.10.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package cbit.vcell.client.pyvcellproxy; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)") -public class VCellProxy { - - public interface Iface { - - public java.lang.String getDataSetFileOfVariableAtTimeIndex(SimulationDataSetRef simulationDataSetRef, VariableInfo varInfo, int timeIndex) throws ThriftDataAccessException, org.apache.thrift.TException; - - public java.util.List getSimsFromOpenModels() throws ThriftDataAccessException, org.apache.thrift.TException; - - public java.util.List getTimePoints(SimulationDataSetRef simulationDataSetRef) throws ThriftDataAccessException, org.apache.thrift.TException; - - public java.util.List getVariableList(SimulationDataSetRef simulationDataSetRef) throws ThriftDataAccessException, org.apache.thrift.TException; - - public PostProcessingData getPostProcessingData(SimulationDataSetRef simulationDataSetRef) throws ThriftDataAccessException, org.apache.thrift.TException; - - public void displayPostProcessingDataInVCell(SimulationDataSetRef simulationDataSetRef) throws ThriftDataAccessException, org.apache.thrift.TException; - - } - - public interface AsyncIface { - - public void getDataSetFileOfVariableAtTimeIndex(SimulationDataSetRef simulationDataSetRef, VariableInfo varInfo, int timeIndex, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void getSimsFromOpenModels(org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException; - - public void getTimePoints(SimulationDataSetRef simulationDataSetRef, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException; - - public void getVariableList(SimulationDataSetRef simulationDataSetRef, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException; - - public void getPostProcessingData(SimulationDataSetRef simulationDataSetRef, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void displayPostProcessingDataInVCell(SimulationDataSetRef simulationDataSetRef, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - } - - public static class Client extends org.apache.thrift.TServiceClient implements Iface { - public static class Factory implements org.apache.thrift.TServiceClientFactory { - public Factory() {} - public Client getClient(org.apache.thrift.protocol.TProtocol prot) { - return new Client(prot); - } - public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { - return new Client(iprot, oprot); - } - } - - public Client(org.apache.thrift.protocol.TProtocol prot) - { - super(prot, prot); - } - - public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { - super(iprot, oprot); - } - - public java.lang.String getDataSetFileOfVariableAtTimeIndex(SimulationDataSetRef simulationDataSetRef, VariableInfo varInfo, int timeIndex) throws ThriftDataAccessException, org.apache.thrift.TException - { - send_getDataSetFileOfVariableAtTimeIndex(simulationDataSetRef, varInfo, timeIndex); - return recv_getDataSetFileOfVariableAtTimeIndex(); - } - - public void send_getDataSetFileOfVariableAtTimeIndex(SimulationDataSetRef simulationDataSetRef, VariableInfo varInfo, int timeIndex) throws org.apache.thrift.TException - { - getDataSetFileOfVariableAtTimeIndex_args args = new getDataSetFileOfVariableAtTimeIndex_args(); - args.setSimulationDataSetRef(simulationDataSetRef); - args.setVarInfo(varInfo); - args.setTimeIndex(timeIndex); - sendBase("getDataSetFileOfVariableAtTimeIndex", args); - } - - public java.lang.String recv_getDataSetFileOfVariableAtTimeIndex() throws ThriftDataAccessException, org.apache.thrift.TException - { - getDataSetFileOfVariableAtTimeIndex_result result = new getDataSetFileOfVariableAtTimeIndex_result(); - receiveBase(result, "getDataSetFileOfVariableAtTimeIndex"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.dataAccessException != null) { - throw result.dataAccessException; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getDataSetFileOfVariableAtTimeIndex failed: unknown result"); - } - - public java.util.List getSimsFromOpenModels() throws ThriftDataAccessException, org.apache.thrift.TException - { - send_getSimsFromOpenModels(); - return recv_getSimsFromOpenModels(); - } - - public void send_getSimsFromOpenModels() throws org.apache.thrift.TException - { - getSimsFromOpenModels_args args = new getSimsFromOpenModels_args(); - sendBase("getSimsFromOpenModels", args); - } - - public java.util.List recv_getSimsFromOpenModels() throws ThriftDataAccessException, org.apache.thrift.TException - { - getSimsFromOpenModels_result result = new getSimsFromOpenModels_result(); - receiveBase(result, "getSimsFromOpenModels"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.dataAccessException != null) { - throw result.dataAccessException; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSimsFromOpenModels failed: unknown result"); - } - - public java.util.List getTimePoints(SimulationDataSetRef simulationDataSetRef) throws ThriftDataAccessException, org.apache.thrift.TException - { - send_getTimePoints(simulationDataSetRef); - return recv_getTimePoints(); - } - - public void send_getTimePoints(SimulationDataSetRef simulationDataSetRef) throws org.apache.thrift.TException - { - getTimePoints_args args = new getTimePoints_args(); - args.setSimulationDataSetRef(simulationDataSetRef); - sendBase("getTimePoints", args); - } - - public java.util.List recv_getTimePoints() throws ThriftDataAccessException, org.apache.thrift.TException - { - getTimePoints_result result = new getTimePoints_result(); - receiveBase(result, "getTimePoints"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.dataAccessException != null) { - throw result.dataAccessException; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTimePoints failed: unknown result"); - } - - public java.util.List getVariableList(SimulationDataSetRef simulationDataSetRef) throws ThriftDataAccessException, org.apache.thrift.TException - { - send_getVariableList(simulationDataSetRef); - return recv_getVariableList(); - } - - public void send_getVariableList(SimulationDataSetRef simulationDataSetRef) throws org.apache.thrift.TException - { - getVariableList_args args = new getVariableList_args(); - args.setSimulationDataSetRef(simulationDataSetRef); - sendBase("getVariableList", args); - } - - public java.util.List recv_getVariableList() throws ThriftDataAccessException, org.apache.thrift.TException - { - getVariableList_result result = new getVariableList_result(); - receiveBase(result, "getVariableList"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.dataAccessException != null) { - throw result.dataAccessException; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getVariableList failed: unknown result"); - } - - public PostProcessingData getPostProcessingData(SimulationDataSetRef simulationDataSetRef) throws ThriftDataAccessException, org.apache.thrift.TException - { - send_getPostProcessingData(simulationDataSetRef); - return recv_getPostProcessingData(); - } - - public void send_getPostProcessingData(SimulationDataSetRef simulationDataSetRef) throws org.apache.thrift.TException - { - getPostProcessingData_args args = new getPostProcessingData_args(); - args.setSimulationDataSetRef(simulationDataSetRef); - sendBase("getPostProcessingData", args); - } - - public PostProcessingData recv_getPostProcessingData() throws ThriftDataAccessException, org.apache.thrift.TException - { - getPostProcessingData_result result = new getPostProcessingData_result(); - receiveBase(result, "getPostProcessingData"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.dataAccessException != null) { - throw result.dataAccessException; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPostProcessingData failed: unknown result"); - } - - public void displayPostProcessingDataInVCell(SimulationDataSetRef simulationDataSetRef) throws ThriftDataAccessException, org.apache.thrift.TException - { - send_displayPostProcessingDataInVCell(simulationDataSetRef); - recv_displayPostProcessingDataInVCell(); - } - - public void send_displayPostProcessingDataInVCell(SimulationDataSetRef simulationDataSetRef) throws org.apache.thrift.TException - { - displayPostProcessingDataInVCell_args args = new displayPostProcessingDataInVCell_args(); - args.setSimulationDataSetRef(simulationDataSetRef); - sendBase("displayPostProcessingDataInVCell", args); - } - - public void recv_displayPostProcessingDataInVCell() throws ThriftDataAccessException, org.apache.thrift.TException - { - displayPostProcessingDataInVCell_result result = new displayPostProcessingDataInVCell_result(); - receiveBase(result, "displayPostProcessingDataInVCell"); - if (result.dataAccessException != null) { - throw result.dataAccessException; - } - return; - } - - } - public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { - public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { - private org.apache.thrift.async.TAsyncClientManager clientManager; - private org.apache.thrift.protocol.TProtocolFactory protocolFactory; - public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { - this.clientManager = clientManager; - this.protocolFactory = protocolFactory; - } - public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { - return new AsyncClient(protocolFactory, clientManager, transport); - } - } - - public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { - super(protocolFactory, clientManager, transport); - } - - public void getDataSetFileOfVariableAtTimeIndex(SimulationDataSetRef simulationDataSetRef, VariableInfo varInfo, int timeIndex, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - getDataSetFileOfVariableAtTimeIndex_call method_call = new getDataSetFileOfVariableAtTimeIndex_call(simulationDataSetRef, varInfo, timeIndex, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class getDataSetFileOfVariableAtTimeIndex_call extends org.apache.thrift.async.TAsyncMethodCall { - private SimulationDataSetRef simulationDataSetRef; - private VariableInfo varInfo; - private int timeIndex; - public getDataSetFileOfVariableAtTimeIndex_call(SimulationDataSetRef simulationDataSetRef, VariableInfo varInfo, int timeIndex, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.simulationDataSetRef = simulationDataSetRef; - this.varInfo = varInfo; - this.timeIndex = timeIndex; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getDataSetFileOfVariableAtTimeIndex", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getDataSetFileOfVariableAtTimeIndex_args args = new getDataSetFileOfVariableAtTimeIndex_args(); - args.setSimulationDataSetRef(simulationDataSetRef); - args.setVarInfo(varInfo); - args.setTimeIndex(timeIndex); - args.write(prot); - prot.writeMessageEnd(); - } - - public java.lang.String getResult() throws ThriftDataAccessException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_getDataSetFileOfVariableAtTimeIndex(); - } - } - - public void getSimsFromOpenModels(org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException { - checkReady(); - getSimsFromOpenModels_call method_call = new getSimsFromOpenModels_call(resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class getSimsFromOpenModels_call extends org.apache.thrift.async.TAsyncMethodCall> { - public getSimsFromOpenModels_call(org.apache.thrift.async.AsyncMethodCallback> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSimsFromOpenModels", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getSimsFromOpenModels_args args = new getSimsFromOpenModels_args(); - args.write(prot); - prot.writeMessageEnd(); - } - - public java.util.List getResult() throws ThriftDataAccessException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_getSimsFromOpenModels(); - } - } - - public void getTimePoints(SimulationDataSetRef simulationDataSetRef, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException { - checkReady(); - getTimePoints_call method_call = new getTimePoints_call(simulationDataSetRef, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class getTimePoints_call extends org.apache.thrift.async.TAsyncMethodCall> { - private SimulationDataSetRef simulationDataSetRef; - public getTimePoints_call(SimulationDataSetRef simulationDataSetRef, org.apache.thrift.async.AsyncMethodCallback> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.simulationDataSetRef = simulationDataSetRef; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getTimePoints", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getTimePoints_args args = new getTimePoints_args(); - args.setSimulationDataSetRef(simulationDataSetRef); - args.write(prot); - prot.writeMessageEnd(); - } - - public java.util.List getResult() throws ThriftDataAccessException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_getTimePoints(); - } - } - - public void getVariableList(SimulationDataSetRef simulationDataSetRef, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException { - checkReady(); - getVariableList_call method_call = new getVariableList_call(simulationDataSetRef, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class getVariableList_call extends org.apache.thrift.async.TAsyncMethodCall> { - private SimulationDataSetRef simulationDataSetRef; - public getVariableList_call(SimulationDataSetRef simulationDataSetRef, org.apache.thrift.async.AsyncMethodCallback> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.simulationDataSetRef = simulationDataSetRef; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getVariableList", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getVariableList_args args = new getVariableList_args(); - args.setSimulationDataSetRef(simulationDataSetRef); - args.write(prot); - prot.writeMessageEnd(); - } - - public java.util.List getResult() throws ThriftDataAccessException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_getVariableList(); - } - } - - public void getPostProcessingData(SimulationDataSetRef simulationDataSetRef, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - getPostProcessingData_call method_call = new getPostProcessingData_call(simulationDataSetRef, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class getPostProcessingData_call extends org.apache.thrift.async.TAsyncMethodCall { - private SimulationDataSetRef simulationDataSetRef; - public getPostProcessingData_call(SimulationDataSetRef simulationDataSetRef, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.simulationDataSetRef = simulationDataSetRef; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPostProcessingData", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getPostProcessingData_args args = new getPostProcessingData_args(); - args.setSimulationDataSetRef(simulationDataSetRef); - args.write(prot); - prot.writeMessageEnd(); - } - - public PostProcessingData getResult() throws ThriftDataAccessException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_getPostProcessingData(); - } - } - - public void displayPostProcessingDataInVCell(SimulationDataSetRef simulationDataSetRef, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - displayPostProcessingDataInVCell_call method_call = new displayPostProcessingDataInVCell_call(simulationDataSetRef, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class displayPostProcessingDataInVCell_call extends org.apache.thrift.async.TAsyncMethodCall { - private SimulationDataSetRef simulationDataSetRef; - public displayPostProcessingDataInVCell_call(SimulationDataSetRef simulationDataSetRef, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.simulationDataSetRef = simulationDataSetRef; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("displayPostProcessingDataInVCell", org.apache.thrift.protocol.TMessageType.CALL, 0)); - displayPostProcessingDataInVCell_args args = new displayPostProcessingDataInVCell_args(); - args.setSimulationDataSetRef(simulationDataSetRef); - args.write(prot); - prot.writeMessageEnd(); - } - - public Void getResult() throws ThriftDataAccessException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return null; - } - } - - } - - public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { - private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(Processor.class.getName()); - public Processor(I iface) { - super(iface, getProcessMap(new java.util.HashMap>())); - } - - protected Processor(I iface, java.util.Map> processMap) { - super(iface, getProcessMap(processMap)); - } - - private static java.util.Map> getProcessMap(java.util.Map> processMap) { - processMap.put("getDataSetFileOfVariableAtTimeIndex", new getDataSetFileOfVariableAtTimeIndex()); - processMap.put("getSimsFromOpenModels", new getSimsFromOpenModels()); - processMap.put("getTimePoints", new getTimePoints()); - processMap.put("getVariableList", new getVariableList()); - processMap.put("getPostProcessingData", new getPostProcessingData()); - processMap.put("displayPostProcessingDataInVCell", new displayPostProcessingDataInVCell()); - return processMap; - } - - public static class getDataSetFileOfVariableAtTimeIndex extends org.apache.thrift.ProcessFunction { - public getDataSetFileOfVariableAtTimeIndex() { - super("getDataSetFileOfVariableAtTimeIndex"); - } - - public getDataSetFileOfVariableAtTimeIndex_args getEmptyArgsInstance() { - return new getDataSetFileOfVariableAtTimeIndex_args(); - } - - protected boolean isOneway() { - return false; - } - - public getDataSetFileOfVariableAtTimeIndex_result getResult(I iface, getDataSetFileOfVariableAtTimeIndex_args args) throws org.apache.thrift.TException { - getDataSetFileOfVariableAtTimeIndex_result result = new getDataSetFileOfVariableAtTimeIndex_result(); - try { - result.success = iface.getDataSetFileOfVariableAtTimeIndex(args.simulationDataSetRef, args.varInfo, args.timeIndex); - } catch (ThriftDataAccessException dataAccessException) { - result.dataAccessException = dataAccessException; - } - return result; - } - } - - public static class getSimsFromOpenModels extends org.apache.thrift.ProcessFunction { - public getSimsFromOpenModels() { - super("getSimsFromOpenModels"); - } - - public getSimsFromOpenModels_args getEmptyArgsInstance() { - return new getSimsFromOpenModels_args(); - } - - protected boolean isOneway() { - return false; - } - - public getSimsFromOpenModels_result getResult(I iface, getSimsFromOpenModels_args args) throws org.apache.thrift.TException { - getSimsFromOpenModels_result result = new getSimsFromOpenModels_result(); - try { - result.success = iface.getSimsFromOpenModels(); - } catch (ThriftDataAccessException dataAccessException) { - result.dataAccessException = dataAccessException; - } - return result; - } - } - - public static class getTimePoints extends org.apache.thrift.ProcessFunction { - public getTimePoints() { - super("getTimePoints"); - } - - public getTimePoints_args getEmptyArgsInstance() { - return new getTimePoints_args(); - } - - protected boolean isOneway() { - return false; - } - - public getTimePoints_result getResult(I iface, getTimePoints_args args) throws org.apache.thrift.TException { - getTimePoints_result result = new getTimePoints_result(); - try { - result.success = iface.getTimePoints(args.simulationDataSetRef); - } catch (ThriftDataAccessException dataAccessException) { - result.dataAccessException = dataAccessException; - } - return result; - } - } - - public static class getVariableList extends org.apache.thrift.ProcessFunction { - public getVariableList() { - super("getVariableList"); - } - - public getVariableList_args getEmptyArgsInstance() { - return new getVariableList_args(); - } - - protected boolean isOneway() { - return false; - } - - public getVariableList_result getResult(I iface, getVariableList_args args) throws org.apache.thrift.TException { - getVariableList_result result = new getVariableList_result(); - try { - result.success = iface.getVariableList(args.simulationDataSetRef); - } catch (ThriftDataAccessException dataAccessException) { - result.dataAccessException = dataAccessException; - } - return result; - } - } - - public static class getPostProcessingData extends org.apache.thrift.ProcessFunction { - public getPostProcessingData() { - super("getPostProcessingData"); - } - - public getPostProcessingData_args getEmptyArgsInstance() { - return new getPostProcessingData_args(); - } - - protected boolean isOneway() { - return false; - } - - public getPostProcessingData_result getResult(I iface, getPostProcessingData_args args) throws org.apache.thrift.TException { - getPostProcessingData_result result = new getPostProcessingData_result(); - try { - result.success = iface.getPostProcessingData(args.simulationDataSetRef); - } catch (ThriftDataAccessException dataAccessException) { - result.dataAccessException = dataAccessException; - } - return result; - } - } - - public static class displayPostProcessingDataInVCell extends org.apache.thrift.ProcessFunction { - public displayPostProcessingDataInVCell() { - super("displayPostProcessingDataInVCell"); - } - - public displayPostProcessingDataInVCell_args getEmptyArgsInstance() { - return new displayPostProcessingDataInVCell_args(); - } - - protected boolean isOneway() { - return false; - } - - public displayPostProcessingDataInVCell_result getResult(I iface, displayPostProcessingDataInVCell_args args) throws org.apache.thrift.TException { - displayPostProcessingDataInVCell_result result = new displayPostProcessingDataInVCell_result(); - try { - iface.displayPostProcessingDataInVCell(args.simulationDataSetRef); - } catch (ThriftDataAccessException dataAccessException) { - result.dataAccessException = dataAccessException; - } - return result; - } - } - - } - - public static class AsyncProcessor extends org.apache.thrift.TBaseAsyncProcessor { - private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(AsyncProcessor.class.getName()); - public AsyncProcessor(I iface) { - super(iface, getProcessMap(new java.util.HashMap>())); - } - - protected AsyncProcessor(I iface, java.util.Map> processMap) { - super(iface, getProcessMap(processMap)); - } - - private static java.util.Map> getProcessMap(java.util.Map> processMap) { - processMap.put("getDataSetFileOfVariableAtTimeIndex", new getDataSetFileOfVariableAtTimeIndex()); - processMap.put("getSimsFromOpenModels", new getSimsFromOpenModels()); - processMap.put("getTimePoints", new getTimePoints()); - processMap.put("getVariableList", new getVariableList()); - processMap.put("getPostProcessingData", new getPostProcessingData()); - processMap.put("displayPostProcessingDataInVCell", new displayPostProcessingDataInVCell()); - return processMap; - } - - public static class getDataSetFileOfVariableAtTimeIndex extends org.apache.thrift.AsyncProcessFunction { - public getDataSetFileOfVariableAtTimeIndex() { - super("getDataSetFileOfVariableAtTimeIndex"); - } - - public getDataSetFileOfVariableAtTimeIndex_args getEmptyArgsInstance() { - return new getDataSetFileOfVariableAtTimeIndex_args(); - } - - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - public void onComplete(java.lang.String o) { - getDataSetFileOfVariableAtTimeIndex_result result = new getDataSetFileOfVariableAtTimeIndex_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - getDataSetFileOfVariableAtTimeIndex_result result = new getDataSetFileOfVariableAtTimeIndex_result(); - if (e instanceof ThriftDataAccessException) { - result.dataAccessException = (ThriftDataAccessException) e; - result.setDataAccessExceptionIsSet(true); - msg = result; - } else if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, getDataSetFileOfVariableAtTimeIndex_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.getDataSetFileOfVariableAtTimeIndex(args.simulationDataSetRef, args.varInfo, args.timeIndex,resultHandler); - } - } - - public static class getSimsFromOpenModels extends org.apache.thrift.AsyncProcessFunction> { - public getSimsFromOpenModels() { - super("getSimsFromOpenModels"); - } - - public getSimsFromOpenModels_args getEmptyArgsInstance() { - return new getSimsFromOpenModels_args(); - } - - public org.apache.thrift.async.AsyncMethodCallback> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback>() { - public void onComplete(java.util.List o) { - getSimsFromOpenModels_result result = new getSimsFromOpenModels_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - getSimsFromOpenModels_result result = new getSimsFromOpenModels_result(); - if (e instanceof ThriftDataAccessException) { - result.dataAccessException = (ThriftDataAccessException) e; - result.setDataAccessExceptionIsSet(true); - msg = result; - } else if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, getSimsFromOpenModels_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException { - iface.getSimsFromOpenModels(resultHandler); - } - } - - public static class getTimePoints extends org.apache.thrift.AsyncProcessFunction> { - public getTimePoints() { - super("getTimePoints"); - } - - public getTimePoints_args getEmptyArgsInstance() { - return new getTimePoints_args(); - } - - public org.apache.thrift.async.AsyncMethodCallback> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback>() { - public void onComplete(java.util.List o) { - getTimePoints_result result = new getTimePoints_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - getTimePoints_result result = new getTimePoints_result(); - if (e instanceof ThriftDataAccessException) { - result.dataAccessException = (ThriftDataAccessException) e; - result.setDataAccessExceptionIsSet(true); - msg = result; - } else if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, getTimePoints_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException { - iface.getTimePoints(args.simulationDataSetRef,resultHandler); - } - } - - public static class getVariableList extends org.apache.thrift.AsyncProcessFunction> { - public getVariableList() { - super("getVariableList"); - } - - public getVariableList_args getEmptyArgsInstance() { - return new getVariableList_args(); - } - - public org.apache.thrift.async.AsyncMethodCallback> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback>() { - public void onComplete(java.util.List o) { - getVariableList_result result = new getVariableList_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - getVariableList_result result = new getVariableList_result(); - if (e instanceof ThriftDataAccessException) { - result.dataAccessException = (ThriftDataAccessException) e; - result.setDataAccessExceptionIsSet(true); - msg = result; - } else if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, getVariableList_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException { - iface.getVariableList(args.simulationDataSetRef,resultHandler); - } - } - - public static class getPostProcessingData extends org.apache.thrift.AsyncProcessFunction { - public getPostProcessingData() { - super("getPostProcessingData"); - } - - public getPostProcessingData_args getEmptyArgsInstance() { - return new getPostProcessingData_args(); - } - - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - public void onComplete(PostProcessingData o) { - getPostProcessingData_result result = new getPostProcessingData_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - getPostProcessingData_result result = new getPostProcessingData_result(); - if (e instanceof ThriftDataAccessException) { - result.dataAccessException = (ThriftDataAccessException) e; - result.setDataAccessExceptionIsSet(true); - msg = result; - } else if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, getPostProcessingData_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.getPostProcessingData(args.simulationDataSetRef,resultHandler); - } - } - - public static class displayPostProcessingDataInVCell extends org.apache.thrift.AsyncProcessFunction { - public displayPostProcessingDataInVCell() { - super("displayPostProcessingDataInVCell"); - } - - public displayPostProcessingDataInVCell_args getEmptyArgsInstance() { - return new displayPostProcessingDataInVCell_args(); - } - - public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback() { - public void onComplete(Void o) { - displayPostProcessingDataInVCell_result result = new displayPostProcessingDataInVCell_result(); - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - displayPostProcessingDataInVCell_result result = new displayPostProcessingDataInVCell_result(); - if (e instanceof ThriftDataAccessException) { - result.dataAccessException = (ThriftDataAccessException) e; - result.setDataAccessExceptionIsSet(true); - msg = result; - } else if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, displayPostProcessingDataInVCell_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - iface.displayPostProcessingDataInVCell(args.simulationDataSetRef,resultHandler); - } - } - - } - - public static class getDataSetFileOfVariableAtTimeIndex_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getDataSetFileOfVariableAtTimeIndex_args"); - - private static final org.apache.thrift.protocol.TField SIMULATION_DATA_SET_REF_FIELD_DESC = new org.apache.thrift.protocol.TField("simulationDataSetRef", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField VAR_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("varInfo", org.apache.thrift.protocol.TType.STRUCT, (short)2); - private static final org.apache.thrift.protocol.TField TIME_INDEX_FIELD_DESC = new org.apache.thrift.protocol.TField("timeIndex", org.apache.thrift.protocol.TType.I32, (short)3); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getDataSetFileOfVariableAtTimeIndex_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getDataSetFileOfVariableAtTimeIndex_argsTupleSchemeFactory(); - - public SimulationDataSetRef simulationDataSetRef; // required - public VariableInfo varInfo; // required - public int timeIndex; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SIMULATION_DATA_SET_REF((short)1, "simulationDataSetRef"), - VAR_INFO((short)2, "varInfo"), - TIME_INDEX((short)3, "timeIndex"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SIMULATION_DATA_SET_REF - return SIMULATION_DATA_SET_REF; - case 2: // VAR_INFO - return VAR_INFO; - case 3: // TIME_INDEX - return TIME_INDEX; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __TIMEINDEX_ISSET_ID = 0; - private byte __isset_bitfield = 0; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SIMULATION_DATA_SET_REF, new org.apache.thrift.meta_data.FieldMetaData("simulationDataSetRef", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SimulationDataSetRef.class))); - tmpMap.put(_Fields.VAR_INFO, new org.apache.thrift.meta_data.FieldMetaData("varInfo", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, VariableInfo.class))); - tmpMap.put(_Fields.TIME_INDEX, new org.apache.thrift.meta_data.FieldMetaData("timeIndex", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32 , "TimeIndex"))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getDataSetFileOfVariableAtTimeIndex_args.class, metaDataMap); - } - - public getDataSetFileOfVariableAtTimeIndex_args() { - } - - public getDataSetFileOfVariableAtTimeIndex_args( - SimulationDataSetRef simulationDataSetRef, - VariableInfo varInfo, - int timeIndex) - { - this(); - this.simulationDataSetRef = simulationDataSetRef; - this.varInfo = varInfo; - this.timeIndex = timeIndex; - setTimeIndexIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public getDataSetFileOfVariableAtTimeIndex_args(getDataSetFileOfVariableAtTimeIndex_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetSimulationDataSetRef()) { - this.simulationDataSetRef = new SimulationDataSetRef(other.simulationDataSetRef); - } - if (other.isSetVarInfo()) { - this.varInfo = new VariableInfo(other.varInfo); - } - this.timeIndex = other.timeIndex; - } - - public getDataSetFileOfVariableAtTimeIndex_args deepCopy() { - return new getDataSetFileOfVariableAtTimeIndex_args(this); - } - - @Override - public void clear() { - this.simulationDataSetRef = null; - this.varInfo = null; - setTimeIndexIsSet(false); - this.timeIndex = 0; - } - - public SimulationDataSetRef getSimulationDataSetRef() { - return this.simulationDataSetRef; - } - - public getDataSetFileOfVariableAtTimeIndex_args setSimulationDataSetRef(SimulationDataSetRef simulationDataSetRef) { - this.simulationDataSetRef = simulationDataSetRef; - return this; - } - - public void unsetSimulationDataSetRef() { - this.simulationDataSetRef = null; - } - - /** Returns true if field simulationDataSetRef is set (has been assigned a value) and false otherwise */ - public boolean isSetSimulationDataSetRef() { - return this.simulationDataSetRef != null; - } - - public void setSimulationDataSetRefIsSet(boolean value) { - if (!value) { - this.simulationDataSetRef = null; - } - } - - public VariableInfo getVarInfo() { - return this.varInfo; - } - - public getDataSetFileOfVariableAtTimeIndex_args setVarInfo(VariableInfo varInfo) { - this.varInfo = varInfo; - return this; - } - - public void unsetVarInfo() { - this.varInfo = null; - } - - /** Returns true if field varInfo is set (has been assigned a value) and false otherwise */ - public boolean isSetVarInfo() { - return this.varInfo != null; - } - - public void setVarInfoIsSet(boolean value) { - if (!value) { - this.varInfo = null; - } - } - - public int getTimeIndex() { - return this.timeIndex; - } - - public getDataSetFileOfVariableAtTimeIndex_args setTimeIndex(int timeIndex) { - this.timeIndex = timeIndex; - setTimeIndexIsSet(true); - return this; - } - - public void unsetTimeIndex() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMEINDEX_ISSET_ID); - } - - /** Returns true if field timeIndex is set (has been assigned a value) and false otherwise */ - public boolean isSetTimeIndex() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMEINDEX_ISSET_ID); - } - - public void setTimeIndexIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMEINDEX_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, java.lang.Object value) { - switch (field) { - case SIMULATION_DATA_SET_REF: - if (value == null) { - unsetSimulationDataSetRef(); - } else { - setSimulationDataSetRef((SimulationDataSetRef)value); - } - break; - - case VAR_INFO: - if (value == null) { - unsetVarInfo(); - } else { - setVarInfo((VariableInfo)value); - } - break; - - case TIME_INDEX: - if (value == null) { - unsetTimeIndex(); - } else { - setTimeIndex((java.lang.Integer)value); - } - break; - - } - } - - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SIMULATION_DATA_SET_REF: - return getSimulationDataSetRef(); - - case VAR_INFO: - return getVarInfo(); - - case TIME_INDEX: - return getTimeIndex(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SIMULATION_DATA_SET_REF: - return isSetSimulationDataSetRef(); - case VAR_INFO: - return isSetVarInfo(); - case TIME_INDEX: - return isSetTimeIndex(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that == null) - return false; - if (that instanceof getDataSetFileOfVariableAtTimeIndex_args) - return this.equals((getDataSetFileOfVariableAtTimeIndex_args)that); - return false; - } - - public boolean equals(getDataSetFileOfVariableAtTimeIndex_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_simulationDataSetRef = true && this.isSetSimulationDataSetRef(); - boolean that_present_simulationDataSetRef = true && that.isSetSimulationDataSetRef(); - if (this_present_simulationDataSetRef || that_present_simulationDataSetRef) { - if (!(this_present_simulationDataSetRef && that_present_simulationDataSetRef)) - return false; - if (!this.simulationDataSetRef.equals(that.simulationDataSetRef)) - return false; - } - - boolean this_present_varInfo = true && this.isSetVarInfo(); - boolean that_present_varInfo = true && that.isSetVarInfo(); - if (this_present_varInfo || that_present_varInfo) { - if (!(this_present_varInfo && that_present_varInfo)) - return false; - if (!this.varInfo.equals(that.varInfo)) - return false; - } - - boolean this_present_timeIndex = true; - boolean that_present_timeIndex = true; - if (this_present_timeIndex || that_present_timeIndex) { - if (!(this_present_timeIndex && that_present_timeIndex)) - return false; - if (this.timeIndex != that.timeIndex) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSimulationDataSetRef()) ? 131071 : 524287); - if (isSetSimulationDataSetRef()) - hashCode = hashCode * 8191 + simulationDataSetRef.hashCode(); - - hashCode = hashCode * 8191 + ((isSetVarInfo()) ? 131071 : 524287); - if (isSetVarInfo()) - hashCode = hashCode * 8191 + varInfo.hashCode(); - - hashCode = hashCode * 8191 + timeIndex; - - return hashCode; - } - - @Override - public int compareTo(getDataSetFileOfVariableAtTimeIndex_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.valueOf(isSetSimulationDataSetRef()).compareTo(other.isSetSimulationDataSetRef()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSimulationDataSetRef()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.simulationDataSetRef, other.simulationDataSetRef); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.valueOf(isSetVarInfo()).compareTo(other.isSetVarInfo()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetVarInfo()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.varInfo, other.varInfo); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.valueOf(isSetTimeIndex()).compareTo(other.isSetTimeIndex()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTimeIndex()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeIndex, other.timeIndex); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("getDataSetFileOfVariableAtTimeIndex_args("); - boolean first = true; - - sb.append("simulationDataSetRef:"); - if (this.simulationDataSetRef == null) { - sb.append("null"); - } else { - sb.append(this.simulationDataSetRef); - } - first = false; - if (!first) sb.append(", "); - sb.append("varInfo:"); - if (this.varInfo == null) { - sb.append("null"); - } else { - sb.append(this.varInfo); - } - first = false; - if (!first) sb.append(", "); - sb.append("timeIndex:"); - sb.append(this.timeIndex); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (simulationDataSetRef != null) { - simulationDataSetRef.validate(); - } - if (varInfo != null) { - varInfo.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getDataSetFileOfVariableAtTimeIndex_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public getDataSetFileOfVariableAtTimeIndex_argsStandardScheme getScheme() { - return new getDataSetFileOfVariableAtTimeIndex_argsStandardScheme(); - } - } - - private static class getDataSetFileOfVariableAtTimeIndex_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getDataSetFileOfVariableAtTimeIndex_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SIMULATION_DATA_SET_REF - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.simulationDataSetRef = new SimulationDataSetRef(); - struct.simulationDataSetRef.read(iprot); - struct.setSimulationDataSetRefIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // VAR_INFO - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.varInfo = new VariableInfo(); - struct.varInfo.read(iprot); - struct.setVarInfoIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // TIME_INDEX - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.timeIndex = iprot.readI32(); - struct.setTimeIndexIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getDataSetFileOfVariableAtTimeIndex_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.simulationDataSetRef != null) { - oprot.writeFieldBegin(SIMULATION_DATA_SET_REF_FIELD_DESC); - struct.simulationDataSetRef.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.varInfo != null) { - oprot.writeFieldBegin(VAR_INFO_FIELD_DESC); - struct.varInfo.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(TIME_INDEX_FIELD_DESC); - oprot.writeI32(struct.timeIndex); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getDataSetFileOfVariableAtTimeIndex_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public getDataSetFileOfVariableAtTimeIndex_argsTupleScheme getScheme() { - return new getDataSetFileOfVariableAtTimeIndex_argsTupleScheme(); - } - } - - private static class getDataSetFileOfVariableAtTimeIndex_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getDataSetFileOfVariableAtTimeIndex_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSimulationDataSetRef()) { - optionals.set(0); - } - if (struct.isSetVarInfo()) { - optionals.set(1); - } - if (struct.isSetTimeIndex()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetSimulationDataSetRef()) { - struct.simulationDataSetRef.write(oprot); - } - if (struct.isSetVarInfo()) { - struct.varInfo.write(oprot); - } - if (struct.isSetTimeIndex()) { - oprot.writeI32(struct.timeIndex); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getDataSetFileOfVariableAtTimeIndex_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.simulationDataSetRef = new SimulationDataSetRef(); - struct.simulationDataSetRef.read(iprot); - struct.setSimulationDataSetRefIsSet(true); - } - if (incoming.get(1)) { - struct.varInfo = new VariableInfo(); - struct.varInfo.read(iprot); - struct.setVarInfoIsSet(true); - } - if (incoming.get(2)) { - struct.timeIndex = iprot.readI32(); - struct.setTimeIndexIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - public static class getDataSetFileOfVariableAtTimeIndex_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getDataSetFileOfVariableAtTimeIndex_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); - private static final org.apache.thrift.protocol.TField DATA_ACCESS_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("dataAccessException", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getDataSetFileOfVariableAtTimeIndex_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getDataSetFileOfVariableAtTimeIndex_resultTupleSchemeFactory(); - - public java.lang.String success; // required - public ThriftDataAccessException dataAccessException; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - DATA_ACCESS_EXCEPTION((short)1, "dataAccessException"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // DATA_ACCESS_EXCEPTION - return DATA_ACCESS_EXCEPTION; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "FilePath"))); - tmpMap.put(_Fields.DATA_ACCESS_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("dataAccessException", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ThriftDataAccessException.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getDataSetFileOfVariableAtTimeIndex_result.class, metaDataMap); - } - - public getDataSetFileOfVariableAtTimeIndex_result() { - } - - public getDataSetFileOfVariableAtTimeIndex_result( - java.lang.String success, - ThriftDataAccessException dataAccessException) - { - this(); - this.success = success; - this.dataAccessException = dataAccessException; - } - - /** - * Performs a deep copy on other. - */ - public getDataSetFileOfVariableAtTimeIndex_result(getDataSetFileOfVariableAtTimeIndex_result other) { - if (other.isSetSuccess()) { - this.success = other.success; - } - if (other.isSetDataAccessException()) { - this.dataAccessException = new ThriftDataAccessException(other.dataAccessException); - } - } - - public getDataSetFileOfVariableAtTimeIndex_result deepCopy() { - return new getDataSetFileOfVariableAtTimeIndex_result(this); - } - - @Override - public void clear() { - this.success = null; - this.dataAccessException = null; - } - - public java.lang.String getSuccess() { - return this.success; - } - - public getDataSetFileOfVariableAtTimeIndex_result setSuccess(java.lang.String success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public ThriftDataAccessException getDataAccessException() { - return this.dataAccessException; - } - - public getDataSetFileOfVariableAtTimeIndex_result setDataAccessException(ThriftDataAccessException dataAccessException) { - this.dataAccessException = dataAccessException; - return this; - } - - public void unsetDataAccessException() { - this.dataAccessException = null; - } - - /** Returns true if field dataAccessException is set (has been assigned a value) and false otherwise */ - public boolean isSetDataAccessException() { - return this.dataAccessException != null; - } - - public void setDataAccessExceptionIsSet(boolean value) { - if (!value) { - this.dataAccessException = null; - } - } - - public void setFieldValue(_Fields field, java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((java.lang.String)value); - } - break; - - case DATA_ACCESS_EXCEPTION: - if (value == null) { - unsetDataAccessException(); - } else { - setDataAccessException((ThriftDataAccessException)value); - } - break; - - } - } - - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case DATA_ACCESS_EXCEPTION: - return getDataAccessException(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case DATA_ACCESS_EXCEPTION: - return isSetDataAccessException(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that == null) - return false; - if (that instanceof getDataSetFileOfVariableAtTimeIndex_result) - return this.equals((getDataSetFileOfVariableAtTimeIndex_result)that); - return false; - } - - public boolean equals(getDataSetFileOfVariableAtTimeIndex_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_dataAccessException = true && this.isSetDataAccessException(); - boolean that_present_dataAccessException = true && that.isSetDataAccessException(); - if (this_present_dataAccessException || that_present_dataAccessException) { - if (!(this_present_dataAccessException && that_present_dataAccessException)) - return false; - if (!this.dataAccessException.equals(that.dataAccessException)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - hashCode = hashCode * 8191 + ((isSetDataAccessException()) ? 131071 : 524287); - if (isSetDataAccessException()) - hashCode = hashCode * 8191 + dataAccessException.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(getDataSetFileOfVariableAtTimeIndex_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.valueOf(isSetDataAccessException()).compareTo(other.isSetDataAccessException()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDataAccessException()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataAccessException, other.dataAccessException); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("getDataSetFileOfVariableAtTimeIndex_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("dataAccessException:"); - if (this.dataAccessException == null) { - sb.append("null"); - } else { - sb.append(this.dataAccessException); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getDataSetFileOfVariableAtTimeIndex_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public getDataSetFileOfVariableAtTimeIndex_resultStandardScheme getScheme() { - return new getDataSetFileOfVariableAtTimeIndex_resultStandardScheme(); - } - } - - private static class getDataSetFileOfVariableAtTimeIndex_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getDataSetFileOfVariableAtTimeIndex_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.success = iprot.readString(); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // DATA_ACCESS_EXCEPTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.dataAccessException = new ThriftDataAccessException(); - struct.dataAccessException.read(iprot); - struct.setDataAccessExceptionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getDataSetFileOfVariableAtTimeIndex_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeString(struct.success); - oprot.writeFieldEnd(); - } - if (struct.dataAccessException != null) { - oprot.writeFieldBegin(DATA_ACCESS_EXCEPTION_FIELD_DESC); - struct.dataAccessException.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getDataSetFileOfVariableAtTimeIndex_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public getDataSetFileOfVariableAtTimeIndex_resultTupleScheme getScheme() { - return new getDataSetFileOfVariableAtTimeIndex_resultTupleScheme(); - } - } - - private static class getDataSetFileOfVariableAtTimeIndex_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getDataSetFileOfVariableAtTimeIndex_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetDataAccessException()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - oprot.writeString(struct.success); - } - if (struct.isSetDataAccessException()) { - struct.dataAccessException.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getDataSetFileOfVariableAtTimeIndex_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = iprot.readString(); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.dataAccessException = new ThriftDataAccessException(); - struct.dataAccessException.read(iprot); - struct.setDataAccessExceptionIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - public static class getSimsFromOpenModels_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSimsFromOpenModels_args"); - - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getSimsFromOpenModels_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getSimsFromOpenModels_argsTupleSchemeFactory(); - - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { -; - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public java.lang.String getFieldName() { - return _fieldName; - } - } - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSimsFromOpenModels_args.class, metaDataMap); - } - - public getSimsFromOpenModels_args() { - } - - /** - * Performs a deep copy on other. - */ - public getSimsFromOpenModels_args(getSimsFromOpenModels_args other) { - } - - public getSimsFromOpenModels_args deepCopy() { - return new getSimsFromOpenModels_args(this); - } - - @Override - public void clear() { - } - - public void setFieldValue(_Fields field, java.lang.Object value) { - switch (field) { - } - } - - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that == null) - return false; - if (that instanceof getSimsFromOpenModels_args) - return this.equals((getSimsFromOpenModels_args)that); - return false; - } - - public boolean equals(getSimsFromOpenModels_args that) { - if (that == null) - return false; - if (this == that) - return true; - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - return hashCode; - } - - @Override - public int compareTo(getSimsFromOpenModels_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("getSimsFromOpenModels_args("); - boolean first = true; - - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getSimsFromOpenModels_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public getSimsFromOpenModels_argsStandardScheme getScheme() { - return new getSimsFromOpenModels_argsStandardScheme(); - } - } - - private static class getSimsFromOpenModels_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getSimsFromOpenModels_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getSimsFromOpenModels_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getSimsFromOpenModels_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public getSimsFromOpenModels_argsTupleScheme getScheme() { - return new getSimsFromOpenModels_argsTupleScheme(); - } - } - - private static class getSimsFromOpenModels_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getSimsFromOpenModels_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getSimsFromOpenModels_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - public static class getSimsFromOpenModels_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSimsFromOpenModels_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); - private static final org.apache.thrift.protocol.TField DATA_ACCESS_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("dataAccessException", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getSimsFromOpenModels_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getSimsFromOpenModels_resultTupleSchemeFactory(); - - public java.util.List success; // required - public ThriftDataAccessException dataAccessException; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - DATA_ACCESS_EXCEPTION((short)1, "dataAccessException"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // DATA_ACCESS_EXCEPTION - return DATA_ACCESS_EXCEPTION; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.LIST , "SimulationDataSetRefList"))); - tmpMap.put(_Fields.DATA_ACCESS_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("dataAccessException", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ThriftDataAccessException.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSimsFromOpenModels_result.class, metaDataMap); - } - - public getSimsFromOpenModels_result() { - } - - public getSimsFromOpenModels_result( - java.util.List success, - ThriftDataAccessException dataAccessException) - { - this(); - this.success = success; - this.dataAccessException = dataAccessException; - } - - /** - * Performs a deep copy on other. - */ - public getSimsFromOpenModels_result(getSimsFromOpenModels_result other) { - if (other.isSetSuccess()) { - java.util.List __this__success = new java.util.ArrayList(other.success.size()); - for (SimulationDataSetRef other_element : other.success) { - __this__success.add(new SimulationDataSetRef(other_element)); - } - this.success = __this__success; - } - if (other.isSetDataAccessException()) { - this.dataAccessException = new ThriftDataAccessException(other.dataAccessException); - } - } - - public getSimsFromOpenModels_result deepCopy() { - return new getSimsFromOpenModels_result(this); - } - - @Override - public void clear() { - this.success = null; - this.dataAccessException = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(SimulationDataSetRef elem) { - if (this.success == null) { - this.success = new java.util.ArrayList(); - } - this.success.add(elem); - } - - public java.util.List getSuccess() { - return this.success; - } - - public getSimsFromOpenModels_result setSuccess(java.util.List success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public ThriftDataAccessException getDataAccessException() { - return this.dataAccessException; - } - - public getSimsFromOpenModels_result setDataAccessException(ThriftDataAccessException dataAccessException) { - this.dataAccessException = dataAccessException; - return this; - } - - public void unsetDataAccessException() { - this.dataAccessException = null; - } - - /** Returns true if field dataAccessException is set (has been assigned a value) and false otherwise */ - public boolean isSetDataAccessException() { - return this.dataAccessException != null; - } - - public void setDataAccessExceptionIsSet(boolean value) { - if (!value) { - this.dataAccessException = null; - } - } - - public void setFieldValue(_Fields field, java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((java.util.List)value); - } - break; - - case DATA_ACCESS_EXCEPTION: - if (value == null) { - unsetDataAccessException(); - } else { - setDataAccessException((ThriftDataAccessException)value); - } - break; - - } - } - - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case DATA_ACCESS_EXCEPTION: - return getDataAccessException(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case DATA_ACCESS_EXCEPTION: - return isSetDataAccessException(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that == null) - return false; - if (that instanceof getSimsFromOpenModels_result) - return this.equals((getSimsFromOpenModels_result)that); - return false; - } - - public boolean equals(getSimsFromOpenModels_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_dataAccessException = true && this.isSetDataAccessException(); - boolean that_present_dataAccessException = true && that.isSetDataAccessException(); - if (this_present_dataAccessException || that_present_dataAccessException) { - if (!(this_present_dataAccessException && that_present_dataAccessException)) - return false; - if (!this.dataAccessException.equals(that.dataAccessException)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - hashCode = hashCode * 8191 + ((isSetDataAccessException()) ? 131071 : 524287); - if (isSetDataAccessException()) - hashCode = hashCode * 8191 + dataAccessException.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(getSimsFromOpenModels_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.valueOf(isSetDataAccessException()).compareTo(other.isSetDataAccessException()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDataAccessException()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataAccessException, other.dataAccessException); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("getSimsFromOpenModels_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("dataAccessException:"); - if (this.dataAccessException == null) { - sb.append("null"); - } else { - sb.append(this.dataAccessException); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getSimsFromOpenModels_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public getSimsFromOpenModels_resultStandardScheme getScheme() { - return new getSimsFromOpenModels_resultStandardScheme(); - } - } - - private static class getSimsFromOpenModels_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getSimsFromOpenModels_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list48 = iprot.readListBegin(); - struct.success = new java.util.ArrayList(_list48.size); - SimulationDataSetRef _elem49; - for (int _i50 = 0; _i50 < _list48.size; ++_i50) - { - _elem49 = new SimulationDataSetRef(); - _elem49.read(iprot); - struct.success.add(_elem49); - } - iprot.readListEnd(); - } - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // DATA_ACCESS_EXCEPTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.dataAccessException = new ThriftDataAccessException(); - struct.dataAccessException.read(iprot); - struct.setDataAccessExceptionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getSimsFromOpenModels_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (SimulationDataSetRef _iter51 : struct.success) - { - _iter51.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.dataAccessException != null) { - oprot.writeFieldBegin(DATA_ACCESS_EXCEPTION_FIELD_DESC); - struct.dataAccessException.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getSimsFromOpenModels_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public getSimsFromOpenModels_resultTupleScheme getScheme() { - return new getSimsFromOpenModels_resultTupleScheme(); - } - } - - private static class getSimsFromOpenModels_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getSimsFromOpenModels_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetDataAccessException()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - { - oprot.writeI32(struct.success.size()); - for (SimulationDataSetRef _iter52 : struct.success) - { - _iter52.write(oprot); - } - } - } - if (struct.isSetDataAccessException()) { - struct.dataAccessException.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getSimsFromOpenModels_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list53 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new java.util.ArrayList(_list53.size); - SimulationDataSetRef _elem54; - for (int _i55 = 0; _i55 < _list53.size; ++_i55) - { - _elem54 = new SimulationDataSetRef(); - _elem54.read(iprot); - struct.success.add(_elem54); - } - } - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.dataAccessException = new ThriftDataAccessException(); - struct.dataAccessException.read(iprot); - struct.setDataAccessExceptionIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - public static class getTimePoints_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTimePoints_args"); - - private static final org.apache.thrift.protocol.TField SIMULATION_DATA_SET_REF_FIELD_DESC = new org.apache.thrift.protocol.TField("simulationDataSetRef", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getTimePoints_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getTimePoints_argsTupleSchemeFactory(); - - public SimulationDataSetRef simulationDataSetRef; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SIMULATION_DATA_SET_REF((short)1, "simulationDataSetRef"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SIMULATION_DATA_SET_REF - return SIMULATION_DATA_SET_REF; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SIMULATION_DATA_SET_REF, new org.apache.thrift.meta_data.FieldMetaData("simulationDataSetRef", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SimulationDataSetRef.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTimePoints_args.class, metaDataMap); - } - - public getTimePoints_args() { - } - - public getTimePoints_args( - SimulationDataSetRef simulationDataSetRef) - { - this(); - this.simulationDataSetRef = simulationDataSetRef; - } - - /** - * Performs a deep copy on other. - */ - public getTimePoints_args(getTimePoints_args other) { - if (other.isSetSimulationDataSetRef()) { - this.simulationDataSetRef = new SimulationDataSetRef(other.simulationDataSetRef); - } - } - - public getTimePoints_args deepCopy() { - return new getTimePoints_args(this); - } - - @Override - public void clear() { - this.simulationDataSetRef = null; - } - - public SimulationDataSetRef getSimulationDataSetRef() { - return this.simulationDataSetRef; - } - - public getTimePoints_args setSimulationDataSetRef(SimulationDataSetRef simulationDataSetRef) { - this.simulationDataSetRef = simulationDataSetRef; - return this; - } - - public void unsetSimulationDataSetRef() { - this.simulationDataSetRef = null; - } - - /** Returns true if field simulationDataSetRef is set (has been assigned a value) and false otherwise */ - public boolean isSetSimulationDataSetRef() { - return this.simulationDataSetRef != null; - } - - public void setSimulationDataSetRefIsSet(boolean value) { - if (!value) { - this.simulationDataSetRef = null; - } - } - - public void setFieldValue(_Fields field, java.lang.Object value) { - switch (field) { - case SIMULATION_DATA_SET_REF: - if (value == null) { - unsetSimulationDataSetRef(); - } else { - setSimulationDataSetRef((SimulationDataSetRef)value); - } - break; - - } - } - - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SIMULATION_DATA_SET_REF: - return getSimulationDataSetRef(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SIMULATION_DATA_SET_REF: - return isSetSimulationDataSetRef(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that == null) - return false; - if (that instanceof getTimePoints_args) - return this.equals((getTimePoints_args)that); - return false; - } - - public boolean equals(getTimePoints_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_simulationDataSetRef = true && this.isSetSimulationDataSetRef(); - boolean that_present_simulationDataSetRef = true && that.isSetSimulationDataSetRef(); - if (this_present_simulationDataSetRef || that_present_simulationDataSetRef) { - if (!(this_present_simulationDataSetRef && that_present_simulationDataSetRef)) - return false; - if (!this.simulationDataSetRef.equals(that.simulationDataSetRef)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSimulationDataSetRef()) ? 131071 : 524287); - if (isSetSimulationDataSetRef()) - hashCode = hashCode * 8191 + simulationDataSetRef.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(getTimePoints_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.valueOf(isSetSimulationDataSetRef()).compareTo(other.isSetSimulationDataSetRef()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSimulationDataSetRef()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.simulationDataSetRef, other.simulationDataSetRef); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("getTimePoints_args("); - boolean first = true; - - sb.append("simulationDataSetRef:"); - if (this.simulationDataSetRef == null) { - sb.append("null"); - } else { - sb.append(this.simulationDataSetRef); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (simulationDataSetRef != null) { - simulationDataSetRef.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getTimePoints_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public getTimePoints_argsStandardScheme getScheme() { - return new getTimePoints_argsStandardScheme(); - } - } - - private static class getTimePoints_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getTimePoints_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SIMULATION_DATA_SET_REF - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.simulationDataSetRef = new SimulationDataSetRef(); - struct.simulationDataSetRef.read(iprot); - struct.setSimulationDataSetRefIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getTimePoints_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.simulationDataSetRef != null) { - oprot.writeFieldBegin(SIMULATION_DATA_SET_REF_FIELD_DESC); - struct.simulationDataSetRef.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getTimePoints_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public getTimePoints_argsTupleScheme getScheme() { - return new getTimePoints_argsTupleScheme(); - } - } - - private static class getTimePoints_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getTimePoints_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSimulationDataSetRef()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSimulationDataSetRef()) { - struct.simulationDataSetRef.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getTimePoints_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.simulationDataSetRef = new SimulationDataSetRef(); - struct.simulationDataSetRef.read(iprot); - struct.setSimulationDataSetRefIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - public static class getTimePoints_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTimePoints_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); - private static final org.apache.thrift.protocol.TField DATA_ACCESS_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("dataAccessException", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getTimePoints_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getTimePoints_resultTupleSchemeFactory(); - - public java.util.List success; // required - public ThriftDataAccessException dataAccessException; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - DATA_ACCESS_EXCEPTION((short)1, "dataAccessException"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // DATA_ACCESS_EXCEPTION - return DATA_ACCESS_EXCEPTION; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.LIST , "TimePoints"))); - tmpMap.put(_Fields.DATA_ACCESS_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("dataAccessException", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ThriftDataAccessException.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTimePoints_result.class, metaDataMap); - } - - public getTimePoints_result() { - } - - public getTimePoints_result( - java.util.List success, - ThriftDataAccessException dataAccessException) - { - this(); - this.success = success; - this.dataAccessException = dataAccessException; - } - - /** - * Performs a deep copy on other. - */ - public getTimePoints_result(getTimePoints_result other) { - if (other.isSetSuccess()) { - java.util.List __this__success = new java.util.ArrayList(other.success.size()); - for (java.lang.Double other_element : other.success) { - __this__success.add(other_element); - } - this.success = __this__success; - } - if (other.isSetDataAccessException()) { - this.dataAccessException = new ThriftDataAccessException(other.dataAccessException); - } - } - - public getTimePoints_result deepCopy() { - return new getTimePoints_result(this); - } - - @Override - public void clear() { - this.success = null; - this.dataAccessException = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(double elem) { - if (this.success == null) { - this.success = new java.util.ArrayList(); - } - this.success.add(elem); - } - - public java.util.List getSuccess() { - return this.success; - } - - public getTimePoints_result setSuccess(java.util.List success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public ThriftDataAccessException getDataAccessException() { - return this.dataAccessException; - } - - public getTimePoints_result setDataAccessException(ThriftDataAccessException dataAccessException) { - this.dataAccessException = dataAccessException; - return this; - } - - public void unsetDataAccessException() { - this.dataAccessException = null; - } - - /** Returns true if field dataAccessException is set (has been assigned a value) and false otherwise */ - public boolean isSetDataAccessException() { - return this.dataAccessException != null; - } - - public void setDataAccessExceptionIsSet(boolean value) { - if (!value) { - this.dataAccessException = null; - } - } - - public void setFieldValue(_Fields field, java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((java.util.List)value); - } - break; - - case DATA_ACCESS_EXCEPTION: - if (value == null) { - unsetDataAccessException(); - } else { - setDataAccessException((ThriftDataAccessException)value); - } - break; - - } - } - - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case DATA_ACCESS_EXCEPTION: - return getDataAccessException(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case DATA_ACCESS_EXCEPTION: - return isSetDataAccessException(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that == null) - return false; - if (that instanceof getTimePoints_result) - return this.equals((getTimePoints_result)that); - return false; - } - - public boolean equals(getTimePoints_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_dataAccessException = true && this.isSetDataAccessException(); - boolean that_present_dataAccessException = true && that.isSetDataAccessException(); - if (this_present_dataAccessException || that_present_dataAccessException) { - if (!(this_present_dataAccessException && that_present_dataAccessException)) - return false; - if (!this.dataAccessException.equals(that.dataAccessException)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - hashCode = hashCode * 8191 + ((isSetDataAccessException()) ? 131071 : 524287); - if (isSetDataAccessException()) - hashCode = hashCode * 8191 + dataAccessException.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(getTimePoints_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.valueOf(isSetDataAccessException()).compareTo(other.isSetDataAccessException()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDataAccessException()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataAccessException, other.dataAccessException); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("getTimePoints_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("dataAccessException:"); - if (this.dataAccessException == null) { - sb.append("null"); - } else { - sb.append(this.dataAccessException); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getTimePoints_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public getTimePoints_resultStandardScheme getScheme() { - return new getTimePoints_resultStandardScheme(); - } - } - - private static class getTimePoints_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getTimePoints_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list56 = iprot.readListBegin(); - struct.success = new java.util.ArrayList(_list56.size); - double _elem57; - for (int _i58 = 0; _i58 < _list56.size; ++_i58) - { - _elem57 = iprot.readDouble(); - struct.success.add(_elem57); - } - iprot.readListEnd(); - } - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // DATA_ACCESS_EXCEPTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.dataAccessException = new ThriftDataAccessException(); - struct.dataAccessException.read(iprot); - struct.setDataAccessExceptionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getTimePoints_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.DOUBLE, struct.success.size())); - for (double _iter59 : struct.success) - { - oprot.writeDouble(_iter59); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.dataAccessException != null) { - oprot.writeFieldBegin(DATA_ACCESS_EXCEPTION_FIELD_DESC); - struct.dataAccessException.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getTimePoints_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public getTimePoints_resultTupleScheme getScheme() { - return new getTimePoints_resultTupleScheme(); - } - } - - private static class getTimePoints_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getTimePoints_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetDataAccessException()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - { - oprot.writeI32(struct.success.size()); - for (double _iter60 : struct.success) - { - oprot.writeDouble(_iter60); - } - } - } - if (struct.isSetDataAccessException()) { - struct.dataAccessException.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getTimePoints_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list61 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.DOUBLE, iprot.readI32()); - struct.success = new java.util.ArrayList(_list61.size); - double _elem62; - for (int _i63 = 0; _i63 < _list61.size; ++_i63) - { - _elem62 = iprot.readDouble(); - struct.success.add(_elem62); - } - } - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.dataAccessException = new ThriftDataAccessException(); - struct.dataAccessException.read(iprot); - struct.setDataAccessExceptionIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - public static class getVariableList_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getVariableList_args"); - - private static final org.apache.thrift.protocol.TField SIMULATION_DATA_SET_REF_FIELD_DESC = new org.apache.thrift.protocol.TField("simulationDataSetRef", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getVariableList_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getVariableList_argsTupleSchemeFactory(); - - public SimulationDataSetRef simulationDataSetRef; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SIMULATION_DATA_SET_REF((short)1, "simulationDataSetRef"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SIMULATION_DATA_SET_REF - return SIMULATION_DATA_SET_REF; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SIMULATION_DATA_SET_REF, new org.apache.thrift.meta_data.FieldMetaData("simulationDataSetRef", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SimulationDataSetRef.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getVariableList_args.class, metaDataMap); - } - - public getVariableList_args() { - } - - public getVariableList_args( - SimulationDataSetRef simulationDataSetRef) - { - this(); - this.simulationDataSetRef = simulationDataSetRef; - } - - /** - * Performs a deep copy on other. - */ - public getVariableList_args(getVariableList_args other) { - if (other.isSetSimulationDataSetRef()) { - this.simulationDataSetRef = new SimulationDataSetRef(other.simulationDataSetRef); - } - } - - public getVariableList_args deepCopy() { - return new getVariableList_args(this); - } - - @Override - public void clear() { - this.simulationDataSetRef = null; - } - - public SimulationDataSetRef getSimulationDataSetRef() { - return this.simulationDataSetRef; - } - - public getVariableList_args setSimulationDataSetRef(SimulationDataSetRef simulationDataSetRef) { - this.simulationDataSetRef = simulationDataSetRef; - return this; - } - - public void unsetSimulationDataSetRef() { - this.simulationDataSetRef = null; - } - - /** Returns true if field simulationDataSetRef is set (has been assigned a value) and false otherwise */ - public boolean isSetSimulationDataSetRef() { - return this.simulationDataSetRef != null; - } - - public void setSimulationDataSetRefIsSet(boolean value) { - if (!value) { - this.simulationDataSetRef = null; - } - } - - public void setFieldValue(_Fields field, java.lang.Object value) { - switch (field) { - case SIMULATION_DATA_SET_REF: - if (value == null) { - unsetSimulationDataSetRef(); - } else { - setSimulationDataSetRef((SimulationDataSetRef)value); - } - break; - - } - } - - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SIMULATION_DATA_SET_REF: - return getSimulationDataSetRef(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SIMULATION_DATA_SET_REF: - return isSetSimulationDataSetRef(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that == null) - return false; - if (that instanceof getVariableList_args) - return this.equals((getVariableList_args)that); - return false; - } - - public boolean equals(getVariableList_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_simulationDataSetRef = true && this.isSetSimulationDataSetRef(); - boolean that_present_simulationDataSetRef = true && that.isSetSimulationDataSetRef(); - if (this_present_simulationDataSetRef || that_present_simulationDataSetRef) { - if (!(this_present_simulationDataSetRef && that_present_simulationDataSetRef)) - return false; - if (!this.simulationDataSetRef.equals(that.simulationDataSetRef)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSimulationDataSetRef()) ? 131071 : 524287); - if (isSetSimulationDataSetRef()) - hashCode = hashCode * 8191 + simulationDataSetRef.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(getVariableList_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.valueOf(isSetSimulationDataSetRef()).compareTo(other.isSetSimulationDataSetRef()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSimulationDataSetRef()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.simulationDataSetRef, other.simulationDataSetRef); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("getVariableList_args("); - boolean first = true; - - sb.append("simulationDataSetRef:"); - if (this.simulationDataSetRef == null) { - sb.append("null"); - } else { - sb.append(this.simulationDataSetRef); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (simulationDataSetRef != null) { - simulationDataSetRef.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getVariableList_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public getVariableList_argsStandardScheme getScheme() { - return new getVariableList_argsStandardScheme(); - } - } - - private static class getVariableList_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getVariableList_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SIMULATION_DATA_SET_REF - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.simulationDataSetRef = new SimulationDataSetRef(); - struct.simulationDataSetRef.read(iprot); - struct.setSimulationDataSetRefIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getVariableList_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.simulationDataSetRef != null) { - oprot.writeFieldBegin(SIMULATION_DATA_SET_REF_FIELD_DESC); - struct.simulationDataSetRef.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getVariableList_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public getVariableList_argsTupleScheme getScheme() { - return new getVariableList_argsTupleScheme(); - } - } - - private static class getVariableList_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getVariableList_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSimulationDataSetRef()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSimulationDataSetRef()) { - struct.simulationDataSetRef.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getVariableList_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.simulationDataSetRef = new SimulationDataSetRef(); - struct.simulationDataSetRef.read(iprot); - struct.setSimulationDataSetRefIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - public static class getVariableList_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getVariableList_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); - private static final org.apache.thrift.protocol.TField DATA_ACCESS_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("dataAccessException", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getVariableList_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getVariableList_resultTupleSchemeFactory(); - - public java.util.List success; // required - public ThriftDataAccessException dataAccessException; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - DATA_ACCESS_EXCEPTION((short)1, "dataAccessException"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // DATA_ACCESS_EXCEPTION - return DATA_ACCESS_EXCEPTION; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.LIST , "VariableList"))); - tmpMap.put(_Fields.DATA_ACCESS_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("dataAccessException", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ThriftDataAccessException.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getVariableList_result.class, metaDataMap); - } - - public getVariableList_result() { - } - - public getVariableList_result( - java.util.List success, - ThriftDataAccessException dataAccessException) - { - this(); - this.success = success; - this.dataAccessException = dataAccessException; - } - - /** - * Performs a deep copy on other. - */ - public getVariableList_result(getVariableList_result other) { - if (other.isSetSuccess()) { - java.util.List __this__success = new java.util.ArrayList(other.success.size()); - for (VariableInfo other_element : other.success) { - __this__success.add(new VariableInfo(other_element)); - } - this.success = __this__success; - } - if (other.isSetDataAccessException()) { - this.dataAccessException = new ThriftDataAccessException(other.dataAccessException); - } - } - - public getVariableList_result deepCopy() { - return new getVariableList_result(this); - } - - @Override - public void clear() { - this.success = null; - this.dataAccessException = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(VariableInfo elem) { - if (this.success == null) { - this.success = new java.util.ArrayList(); - } - this.success.add(elem); - } - - public java.util.List getSuccess() { - return this.success; - } - - public getVariableList_result setSuccess(java.util.List success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public ThriftDataAccessException getDataAccessException() { - return this.dataAccessException; - } - - public getVariableList_result setDataAccessException(ThriftDataAccessException dataAccessException) { - this.dataAccessException = dataAccessException; - return this; - } - - public void unsetDataAccessException() { - this.dataAccessException = null; - } - - /** Returns true if field dataAccessException is set (has been assigned a value) and false otherwise */ - public boolean isSetDataAccessException() { - return this.dataAccessException != null; - } - - public void setDataAccessExceptionIsSet(boolean value) { - if (!value) { - this.dataAccessException = null; - } - } - - public void setFieldValue(_Fields field, java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((java.util.List)value); - } - break; - - case DATA_ACCESS_EXCEPTION: - if (value == null) { - unsetDataAccessException(); - } else { - setDataAccessException((ThriftDataAccessException)value); - } - break; - - } - } - - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case DATA_ACCESS_EXCEPTION: - return getDataAccessException(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case DATA_ACCESS_EXCEPTION: - return isSetDataAccessException(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that == null) - return false; - if (that instanceof getVariableList_result) - return this.equals((getVariableList_result)that); - return false; - } - - public boolean equals(getVariableList_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_dataAccessException = true && this.isSetDataAccessException(); - boolean that_present_dataAccessException = true && that.isSetDataAccessException(); - if (this_present_dataAccessException || that_present_dataAccessException) { - if (!(this_present_dataAccessException && that_present_dataAccessException)) - return false; - if (!this.dataAccessException.equals(that.dataAccessException)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - hashCode = hashCode * 8191 + ((isSetDataAccessException()) ? 131071 : 524287); - if (isSetDataAccessException()) - hashCode = hashCode * 8191 + dataAccessException.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(getVariableList_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.valueOf(isSetDataAccessException()).compareTo(other.isSetDataAccessException()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDataAccessException()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataAccessException, other.dataAccessException); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("getVariableList_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("dataAccessException:"); - if (this.dataAccessException == null) { - sb.append("null"); - } else { - sb.append(this.dataAccessException); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getVariableList_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public getVariableList_resultStandardScheme getScheme() { - return new getVariableList_resultStandardScheme(); - } - } - - private static class getVariableList_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getVariableList_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list64 = iprot.readListBegin(); - struct.success = new java.util.ArrayList(_list64.size); - VariableInfo _elem65; - for (int _i66 = 0; _i66 < _list64.size; ++_i66) - { - _elem65 = new VariableInfo(); - _elem65.read(iprot); - struct.success.add(_elem65); - } - iprot.readListEnd(); - } - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // DATA_ACCESS_EXCEPTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.dataAccessException = new ThriftDataAccessException(); - struct.dataAccessException.read(iprot); - struct.setDataAccessExceptionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getVariableList_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (VariableInfo _iter67 : struct.success) - { - _iter67.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.dataAccessException != null) { - oprot.writeFieldBegin(DATA_ACCESS_EXCEPTION_FIELD_DESC); - struct.dataAccessException.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getVariableList_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public getVariableList_resultTupleScheme getScheme() { - return new getVariableList_resultTupleScheme(); - } - } - - private static class getVariableList_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getVariableList_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetDataAccessException()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - { - oprot.writeI32(struct.success.size()); - for (VariableInfo _iter68 : struct.success) - { - _iter68.write(oprot); - } - } - } - if (struct.isSetDataAccessException()) { - struct.dataAccessException.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getVariableList_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list69 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new java.util.ArrayList(_list69.size); - VariableInfo _elem70; - for (int _i71 = 0; _i71 < _list69.size; ++_i71) - { - _elem70 = new VariableInfo(); - _elem70.read(iprot); - struct.success.add(_elem70); - } - } - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.dataAccessException = new ThriftDataAccessException(); - struct.dataAccessException.read(iprot); - struct.setDataAccessExceptionIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - public static class getPostProcessingData_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPostProcessingData_args"); - - private static final org.apache.thrift.protocol.TField SIMULATION_DATA_SET_REF_FIELD_DESC = new org.apache.thrift.protocol.TField("simulationDataSetRef", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getPostProcessingData_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getPostProcessingData_argsTupleSchemeFactory(); - - public SimulationDataSetRef simulationDataSetRef; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SIMULATION_DATA_SET_REF((short)1, "simulationDataSetRef"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SIMULATION_DATA_SET_REF - return SIMULATION_DATA_SET_REF; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SIMULATION_DATA_SET_REF, new org.apache.thrift.meta_data.FieldMetaData("simulationDataSetRef", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SimulationDataSetRef.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPostProcessingData_args.class, metaDataMap); - } - - public getPostProcessingData_args() { - } - - public getPostProcessingData_args( - SimulationDataSetRef simulationDataSetRef) - { - this(); - this.simulationDataSetRef = simulationDataSetRef; - } - - /** - * Performs a deep copy on other. - */ - public getPostProcessingData_args(getPostProcessingData_args other) { - if (other.isSetSimulationDataSetRef()) { - this.simulationDataSetRef = new SimulationDataSetRef(other.simulationDataSetRef); - } - } - - public getPostProcessingData_args deepCopy() { - return new getPostProcessingData_args(this); - } - - @Override - public void clear() { - this.simulationDataSetRef = null; - } - - public SimulationDataSetRef getSimulationDataSetRef() { - return this.simulationDataSetRef; - } - - public getPostProcessingData_args setSimulationDataSetRef(SimulationDataSetRef simulationDataSetRef) { - this.simulationDataSetRef = simulationDataSetRef; - return this; - } - - public void unsetSimulationDataSetRef() { - this.simulationDataSetRef = null; - } - - /** Returns true if field simulationDataSetRef is set (has been assigned a value) and false otherwise */ - public boolean isSetSimulationDataSetRef() { - return this.simulationDataSetRef != null; - } - - public void setSimulationDataSetRefIsSet(boolean value) { - if (!value) { - this.simulationDataSetRef = null; - } - } - - public void setFieldValue(_Fields field, java.lang.Object value) { - switch (field) { - case SIMULATION_DATA_SET_REF: - if (value == null) { - unsetSimulationDataSetRef(); - } else { - setSimulationDataSetRef((SimulationDataSetRef)value); - } - break; - - } - } - - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SIMULATION_DATA_SET_REF: - return getSimulationDataSetRef(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SIMULATION_DATA_SET_REF: - return isSetSimulationDataSetRef(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that == null) - return false; - if (that instanceof getPostProcessingData_args) - return this.equals((getPostProcessingData_args)that); - return false; - } - - public boolean equals(getPostProcessingData_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_simulationDataSetRef = true && this.isSetSimulationDataSetRef(); - boolean that_present_simulationDataSetRef = true && that.isSetSimulationDataSetRef(); - if (this_present_simulationDataSetRef || that_present_simulationDataSetRef) { - if (!(this_present_simulationDataSetRef && that_present_simulationDataSetRef)) - return false; - if (!this.simulationDataSetRef.equals(that.simulationDataSetRef)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSimulationDataSetRef()) ? 131071 : 524287); - if (isSetSimulationDataSetRef()) - hashCode = hashCode * 8191 + simulationDataSetRef.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(getPostProcessingData_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.valueOf(isSetSimulationDataSetRef()).compareTo(other.isSetSimulationDataSetRef()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSimulationDataSetRef()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.simulationDataSetRef, other.simulationDataSetRef); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("getPostProcessingData_args("); - boolean first = true; - - sb.append("simulationDataSetRef:"); - if (this.simulationDataSetRef == null) { - sb.append("null"); - } else { - sb.append(this.simulationDataSetRef); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (simulationDataSetRef != null) { - simulationDataSetRef.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getPostProcessingData_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public getPostProcessingData_argsStandardScheme getScheme() { - return new getPostProcessingData_argsStandardScheme(); - } - } - - private static class getPostProcessingData_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getPostProcessingData_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SIMULATION_DATA_SET_REF - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.simulationDataSetRef = new SimulationDataSetRef(); - struct.simulationDataSetRef.read(iprot); - struct.setSimulationDataSetRefIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getPostProcessingData_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.simulationDataSetRef != null) { - oprot.writeFieldBegin(SIMULATION_DATA_SET_REF_FIELD_DESC); - struct.simulationDataSetRef.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getPostProcessingData_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public getPostProcessingData_argsTupleScheme getScheme() { - return new getPostProcessingData_argsTupleScheme(); - } - } - - private static class getPostProcessingData_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getPostProcessingData_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSimulationDataSetRef()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSimulationDataSetRef()) { - struct.simulationDataSetRef.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getPostProcessingData_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.simulationDataSetRef = new SimulationDataSetRef(); - struct.simulationDataSetRef.read(iprot); - struct.setSimulationDataSetRefIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - public static class getPostProcessingData_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPostProcessingData_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final org.apache.thrift.protocol.TField DATA_ACCESS_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("dataAccessException", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getPostProcessingData_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getPostProcessingData_resultTupleSchemeFactory(); - - public PostProcessingData success; // required - public ThriftDataAccessException dataAccessException; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - DATA_ACCESS_EXCEPTION((short)1, "dataAccessException"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // DATA_ACCESS_EXCEPTION - return DATA_ACCESS_EXCEPTION; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PostProcessingData.class))); - tmpMap.put(_Fields.DATA_ACCESS_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("dataAccessException", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ThriftDataAccessException.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPostProcessingData_result.class, metaDataMap); - } - - public getPostProcessingData_result() { - } - - public getPostProcessingData_result( - PostProcessingData success, - ThriftDataAccessException dataAccessException) - { - this(); - this.success = success; - this.dataAccessException = dataAccessException; - } - - /** - * Performs a deep copy on other. - */ - public getPostProcessingData_result(getPostProcessingData_result other) { - if (other.isSetSuccess()) { - this.success = new PostProcessingData(other.success); - } - if (other.isSetDataAccessException()) { - this.dataAccessException = new ThriftDataAccessException(other.dataAccessException); - } - } - - public getPostProcessingData_result deepCopy() { - return new getPostProcessingData_result(this); - } - - @Override - public void clear() { - this.success = null; - this.dataAccessException = null; - } - - public PostProcessingData getSuccess() { - return this.success; - } - - public getPostProcessingData_result setSuccess(PostProcessingData success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public ThriftDataAccessException getDataAccessException() { - return this.dataAccessException; - } - - public getPostProcessingData_result setDataAccessException(ThriftDataAccessException dataAccessException) { - this.dataAccessException = dataAccessException; - return this; - } - - public void unsetDataAccessException() { - this.dataAccessException = null; - } - - /** Returns true if field dataAccessException is set (has been assigned a value) and false otherwise */ - public boolean isSetDataAccessException() { - return this.dataAccessException != null; - } - - public void setDataAccessExceptionIsSet(boolean value) { - if (!value) { - this.dataAccessException = null; - } - } - - public void setFieldValue(_Fields field, java.lang.Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((PostProcessingData)value); - } - break; - - case DATA_ACCESS_EXCEPTION: - if (value == null) { - unsetDataAccessException(); - } else { - setDataAccessException((ThriftDataAccessException)value); - } - break; - - } - } - - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case DATA_ACCESS_EXCEPTION: - return getDataAccessException(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case DATA_ACCESS_EXCEPTION: - return isSetDataAccessException(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that == null) - return false; - if (that instanceof getPostProcessingData_result) - return this.equals((getPostProcessingData_result)that); - return false; - } - - public boolean equals(getPostProcessingData_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_dataAccessException = true && this.isSetDataAccessException(); - boolean that_present_dataAccessException = true && that.isSetDataAccessException(); - if (this_present_dataAccessException || that_present_dataAccessException) { - if (!(this_present_dataAccessException && that_present_dataAccessException)) - return false; - if (!this.dataAccessException.equals(that.dataAccessException)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); - if (isSetSuccess()) - hashCode = hashCode * 8191 + success.hashCode(); - - hashCode = hashCode * 8191 + ((isSetDataAccessException()) ? 131071 : 524287); - if (isSetDataAccessException()) - hashCode = hashCode * 8191 + dataAccessException.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(getPostProcessingData_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.valueOf(isSetDataAccessException()).compareTo(other.isSetDataAccessException()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDataAccessException()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataAccessException, other.dataAccessException); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("getPostProcessingData_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("dataAccessException:"); - if (this.dataAccessException == null) { - sb.append("null"); - } else { - sb.append(this.dataAccessException); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getPostProcessingData_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public getPostProcessingData_resultStandardScheme getScheme() { - return new getPostProcessingData_resultStandardScheme(); - } - } - - private static class getPostProcessingData_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getPostProcessingData_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new PostProcessingData(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // DATA_ACCESS_EXCEPTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.dataAccessException = new ThriftDataAccessException(); - struct.dataAccessException.read(iprot); - struct.setDataAccessExceptionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getPostProcessingData_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.dataAccessException != null) { - oprot.writeFieldBegin(DATA_ACCESS_EXCEPTION_FIELD_DESC); - struct.dataAccessException.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getPostProcessingData_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public getPostProcessingData_resultTupleScheme getScheme() { - return new getPostProcessingData_resultTupleScheme(); - } - } - - private static class getPostProcessingData_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getPostProcessingData_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetDataAccessException()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - if (struct.isSetDataAccessException()) { - struct.dataAccessException.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getPostProcessingData_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = new PostProcessingData(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.dataAccessException = new ThriftDataAccessException(); - struct.dataAccessException.read(iprot); - struct.setDataAccessExceptionIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - public static class displayPostProcessingDataInVCell_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("displayPostProcessingDataInVCell_args"); - - private static final org.apache.thrift.protocol.TField SIMULATION_DATA_SET_REF_FIELD_DESC = new org.apache.thrift.protocol.TField("simulationDataSetRef", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new displayPostProcessingDataInVCell_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new displayPostProcessingDataInVCell_argsTupleSchemeFactory(); - - public SimulationDataSetRef simulationDataSetRef; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SIMULATION_DATA_SET_REF((short)1, "simulationDataSetRef"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SIMULATION_DATA_SET_REF - return SIMULATION_DATA_SET_REF; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SIMULATION_DATA_SET_REF, new org.apache.thrift.meta_data.FieldMetaData("simulationDataSetRef", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SimulationDataSetRef.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(displayPostProcessingDataInVCell_args.class, metaDataMap); - } - - public displayPostProcessingDataInVCell_args() { - } - - public displayPostProcessingDataInVCell_args( - SimulationDataSetRef simulationDataSetRef) - { - this(); - this.simulationDataSetRef = simulationDataSetRef; - } - - /** - * Performs a deep copy on other. - */ - public displayPostProcessingDataInVCell_args(displayPostProcessingDataInVCell_args other) { - if (other.isSetSimulationDataSetRef()) { - this.simulationDataSetRef = new SimulationDataSetRef(other.simulationDataSetRef); - } - } - - public displayPostProcessingDataInVCell_args deepCopy() { - return new displayPostProcessingDataInVCell_args(this); - } - - @Override - public void clear() { - this.simulationDataSetRef = null; - } - - public SimulationDataSetRef getSimulationDataSetRef() { - return this.simulationDataSetRef; - } - - public displayPostProcessingDataInVCell_args setSimulationDataSetRef(SimulationDataSetRef simulationDataSetRef) { - this.simulationDataSetRef = simulationDataSetRef; - return this; - } - - public void unsetSimulationDataSetRef() { - this.simulationDataSetRef = null; - } - - /** Returns true if field simulationDataSetRef is set (has been assigned a value) and false otherwise */ - public boolean isSetSimulationDataSetRef() { - return this.simulationDataSetRef != null; - } - - public void setSimulationDataSetRefIsSet(boolean value) { - if (!value) { - this.simulationDataSetRef = null; - } - } - - public void setFieldValue(_Fields field, java.lang.Object value) { - switch (field) { - case SIMULATION_DATA_SET_REF: - if (value == null) { - unsetSimulationDataSetRef(); - } else { - setSimulationDataSetRef((SimulationDataSetRef)value); - } - break; - - } - } - - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SIMULATION_DATA_SET_REF: - return getSimulationDataSetRef(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SIMULATION_DATA_SET_REF: - return isSetSimulationDataSetRef(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that == null) - return false; - if (that instanceof displayPostProcessingDataInVCell_args) - return this.equals((displayPostProcessingDataInVCell_args)that); - return false; - } - - public boolean equals(displayPostProcessingDataInVCell_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_simulationDataSetRef = true && this.isSetSimulationDataSetRef(); - boolean that_present_simulationDataSetRef = true && that.isSetSimulationDataSetRef(); - if (this_present_simulationDataSetRef || that_present_simulationDataSetRef) { - if (!(this_present_simulationDataSetRef && that_present_simulationDataSetRef)) - return false; - if (!this.simulationDataSetRef.equals(that.simulationDataSetRef)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSimulationDataSetRef()) ? 131071 : 524287); - if (isSetSimulationDataSetRef()) - hashCode = hashCode * 8191 + simulationDataSetRef.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(displayPostProcessingDataInVCell_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.valueOf(isSetSimulationDataSetRef()).compareTo(other.isSetSimulationDataSetRef()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSimulationDataSetRef()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.simulationDataSetRef, other.simulationDataSetRef); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("displayPostProcessingDataInVCell_args("); - boolean first = true; - - sb.append("simulationDataSetRef:"); - if (this.simulationDataSetRef == null) { - sb.append("null"); - } else { - sb.append(this.simulationDataSetRef); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (simulationDataSetRef != null) { - simulationDataSetRef.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class displayPostProcessingDataInVCell_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public displayPostProcessingDataInVCell_argsStandardScheme getScheme() { - return new displayPostProcessingDataInVCell_argsStandardScheme(); - } - } - - private static class displayPostProcessingDataInVCell_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, displayPostProcessingDataInVCell_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SIMULATION_DATA_SET_REF - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.simulationDataSetRef = new SimulationDataSetRef(); - struct.simulationDataSetRef.read(iprot); - struct.setSimulationDataSetRefIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, displayPostProcessingDataInVCell_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.simulationDataSetRef != null) { - oprot.writeFieldBegin(SIMULATION_DATA_SET_REF_FIELD_DESC); - struct.simulationDataSetRef.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class displayPostProcessingDataInVCell_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public displayPostProcessingDataInVCell_argsTupleScheme getScheme() { - return new displayPostProcessingDataInVCell_argsTupleScheme(); - } - } - - private static class displayPostProcessingDataInVCell_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, displayPostProcessingDataInVCell_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSimulationDataSetRef()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSimulationDataSetRef()) { - struct.simulationDataSetRef.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, displayPostProcessingDataInVCell_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.simulationDataSetRef = new SimulationDataSetRef(); - struct.simulationDataSetRef.read(iprot); - struct.setSimulationDataSetRefIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - public static class displayPostProcessingDataInVCell_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("displayPostProcessingDataInVCell_result"); - - private static final org.apache.thrift.protocol.TField DATA_ACCESS_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("dataAccessException", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new displayPostProcessingDataInVCell_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new displayPostProcessingDataInVCell_resultTupleSchemeFactory(); - - public ThriftDataAccessException dataAccessException; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DATA_ACCESS_EXCEPTION((short)1, "dataAccessException"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DATA_ACCESS_EXCEPTION - return DATA_ACCESS_EXCEPTION; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.DATA_ACCESS_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("dataAccessException", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ThriftDataAccessException.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(displayPostProcessingDataInVCell_result.class, metaDataMap); - } - - public displayPostProcessingDataInVCell_result() { - } - - public displayPostProcessingDataInVCell_result( - ThriftDataAccessException dataAccessException) - { - this(); - this.dataAccessException = dataAccessException; - } - - /** - * Performs a deep copy on other. - */ - public displayPostProcessingDataInVCell_result(displayPostProcessingDataInVCell_result other) { - if (other.isSetDataAccessException()) { - this.dataAccessException = new ThriftDataAccessException(other.dataAccessException); - } - } - - public displayPostProcessingDataInVCell_result deepCopy() { - return new displayPostProcessingDataInVCell_result(this); - } - - @Override - public void clear() { - this.dataAccessException = null; - } - - public ThriftDataAccessException getDataAccessException() { - return this.dataAccessException; - } - - public displayPostProcessingDataInVCell_result setDataAccessException(ThriftDataAccessException dataAccessException) { - this.dataAccessException = dataAccessException; - return this; - } - - public void unsetDataAccessException() { - this.dataAccessException = null; - } - - /** Returns true if field dataAccessException is set (has been assigned a value) and false otherwise */ - public boolean isSetDataAccessException() { - return this.dataAccessException != null; - } - - public void setDataAccessExceptionIsSet(boolean value) { - if (!value) { - this.dataAccessException = null; - } - } - - public void setFieldValue(_Fields field, java.lang.Object value) { - switch (field) { - case DATA_ACCESS_EXCEPTION: - if (value == null) { - unsetDataAccessException(); - } else { - setDataAccessException((ThriftDataAccessException)value); - } - break; - - } - } - - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case DATA_ACCESS_EXCEPTION: - return getDataAccessException(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case DATA_ACCESS_EXCEPTION: - return isSetDataAccessException(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that == null) - return false; - if (that instanceof displayPostProcessingDataInVCell_result) - return this.equals((displayPostProcessingDataInVCell_result)that); - return false; - } - - public boolean equals(displayPostProcessingDataInVCell_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_dataAccessException = true && this.isSetDataAccessException(); - boolean that_present_dataAccessException = true && that.isSetDataAccessException(); - if (this_present_dataAccessException || that_present_dataAccessException) { - if (!(this_present_dataAccessException && that_present_dataAccessException)) - return false; - if (!this.dataAccessException.equals(that.dataAccessException)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetDataAccessException()) ? 131071 : 524287); - if (isSetDataAccessException()) - hashCode = hashCode * 8191 + dataAccessException.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(displayPostProcessingDataInVCell_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.valueOf(isSetDataAccessException()).compareTo(other.isSetDataAccessException()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDataAccessException()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataAccessException, other.dataAccessException); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("displayPostProcessingDataInVCell_result("); - boolean first = true; - - sb.append("dataAccessException:"); - if (this.dataAccessException == null) { - sb.append("null"); - } else { - sb.append(this.dataAccessException); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class displayPostProcessingDataInVCell_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public displayPostProcessingDataInVCell_resultStandardScheme getScheme() { - return new displayPostProcessingDataInVCell_resultStandardScheme(); - } - } - - private static class displayPostProcessingDataInVCell_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, displayPostProcessingDataInVCell_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // DATA_ACCESS_EXCEPTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.dataAccessException = new ThriftDataAccessException(); - struct.dataAccessException.read(iprot); - struct.setDataAccessExceptionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, displayPostProcessingDataInVCell_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.dataAccessException != null) { - oprot.writeFieldBegin(DATA_ACCESS_EXCEPTION_FIELD_DESC); - struct.dataAccessException.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class displayPostProcessingDataInVCell_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public displayPostProcessingDataInVCell_resultTupleScheme getScheme() { - return new displayPostProcessingDataInVCell_resultTupleScheme(); - } - } - - private static class displayPostProcessingDataInVCell_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, displayPostProcessingDataInVCell_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetDataAccessException()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetDataAccessException()) { - struct.dataAccessException.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, displayPostProcessingDataInVCell_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.dataAccessException = new ThriftDataAccessException(); - struct.dataAccessException.read(iprot); - struct.setDataAccessExceptionIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - -} diff --git a/vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/VCellProxyHandler.java b/vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/VCellProxyHandler.java deleted file mode 100644 index 5ca180d3ed..0000000000 --- a/vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/VCellProxyHandler.java +++ /dev/null @@ -1,283 +0,0 @@ -package cbit.vcell.client.pyvcellproxy; - -import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.ListIterator; - -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import org.apache.thrift.TException; -import org.vcell.util.DataAccessException; -import org.vcell.util.FileUtils; -import org.vcell.vis.io.VtuFileContainer; -import org.vcell.vis.io.VtuVarInfo; -import org.vcell.vis.vtk.VisMeshUtils; - -import cbit.vcell.math.VariableType.VariableDomain; -import cbit.vcell.resource.ResourceUtil; -import cbit.vcell.simdata.VtkManager; - -public class VCellProxyHandler implements VCellProxy.Iface{ - private final static Logger lg = LogManager.getLogger(VCellProxyHandler.class); - - private final VCellClientDataService vcellClientDataService; -//private final VCellClient vcellClient; -private final File localVisDataDir; - -public VCellProxyHandler(VCellClientDataService vcellClientDataService) { - this.vcellClientDataService = vcellClientDataService; - this.localVisDataDir = ResourceUtil.getLocalVisDataDir(); -} - -@Override -public List getSimsFromOpenModels() { - return vcellClientDataService.getSimsFromOpenModels(); -} - -@Override -public List getVariableList(SimulationDataSetRef simulationDataSetRef) throws cbit.vcell.client.pyvcellproxy.ThriftDataAccessException { - try { - VtkManager vtkManager = vcellClientDataService.getVtkManager(simulationDataSetRef); - VtuVarInfo[] vtuVarInfos = vtkManager.getVtuVarInfos(); - ArrayList varInfoList = new ArrayList(); - for (VtuVarInfo vtuVarInfo : vtuVarInfos){ - DomainType variableDomainType = null; - switch (vtuVarInfo.variableDomain){ - case VARIABLEDOMAIN_MEMBRANE:{ - variableDomainType = DomainType.MEMBRANE; - break; - } - case VARIABLEDOMAIN_VOLUME:{ - variableDomainType = DomainType.VOLUME; - break; - } - case VARIABLEDOMAIN_POINT:{ - System.err.println("VCellProxyHandler.getVariableList() skipping Point Variable "+vtuVarInfo.name+" ... implement later."); - continue; // skip point variables now. - } - default:{ - break; - } - } - DataType dataType = null; - switch (vtuVarInfo.dataType){ - case CellData:{ - dataType = DataType.CELLDATA; - break; - } - case PointData:{ - dataType = DataType.POINTDATA; - break; - } - } - String unitsLabel = ""; - if (vtuVarInfo.bMeshVariable){ - continue; // skip "mesh variables" like size, vcRegionArea, etc, globalIndex, etc. - } - VariableInfo variableInfo = new VariableInfo(vtuVarInfo.name, vtuVarInfo.displayName, vtuVarInfo.domainName, variableDomainType, unitsLabel, vtuVarInfo.bMeshVariable, dataType); - variableInfo.setExpressionString(vtuVarInfo.functionExpression); - varInfoList.add(variableInfo); - } - return varInfoList; - } catch (Exception e) { - lg.error("failed to retrieve variable list for data set.", e); - throw new ThriftDataAccessException("failed to retrieve variable list for data set."); - } - -} - - - -private File getEmptyMeshFileLocation(SimulationDataSetRef simulationDataSetRef, String domainName, int timeIndex) throws FileNotFoundException{ - - // - // create the dataset directory if necessary - // - File vtuSimDataFolder = new File(localVisDataDir,simulationDataSetRef.getSimId()); - if (!(vtuSimDataFolder.exists() && vtuSimDataFolder.isDirectory())){ - vtuSimDataFolder.mkdirs(); - } - - // - // compose the specific mesh filename - // - File vtuDataFile = new File(vtuSimDataFolder, simulationDataSetRef.getSimId()+"_"+domainName+"_"+String.format("%06d" , timeIndex)+".vtu"); - return vtuDataFile; -} - -private File getPopulatedMeshFileLocation(SimulationDataSetRef simulationDataSetRef, VariableInfo varInfo, int timeIndex) throws FileNotFoundException{ - - // - // create the dataset directory if necessary - // - File vtuSimDataFolder = new File(localVisDataDir,simulationDataSetRef.getSimId()); - if (!(vtuSimDataFolder.exists() && vtuSimDataFolder.isDirectory())){ - vtuSimDataFolder.mkdirs(); - } - - // - // compose the specific mesh filename - // - String timeIndexStr = String.format("%06d" , timeIndex); - String domainName = varInfo.domainName; - String varName = varInfo.variableVtuName.replace(":", "_"); - File vtuDataFile = new File(vtuSimDataFolder, simulationDataSetRef.getSimId()+"_"+domainName+"_"+varName+"_"+timeIndexStr+".vtu"); - return vtuDataFile; -} - -@Override -public String getDataSetFileOfVariableAtTimeIndex(SimulationDataSetRef simulationDataSetRef, VariableInfo var, int timeIndex) throws ThriftDataAccessException { - try { - if (var.isMeshVar){ - return getEmptyMeshFile(simulationDataSetRef, var.domainName, timeIndex).getAbsolutePath(); - } - File meshFileForVariableAndTime = getPopulatedMeshFileLocation(simulationDataSetRef, var, timeIndex); - if (meshFileForVariableAndTime.exists()){ - return meshFileForVariableAndTime.getAbsolutePath(); - } - - // - // get data from server for this variable, domain, time - // - VtkManager vtkManager = vcellClientDataService.getVtkManager(simulationDataSetRef); - VariableDomain variableDomainType = VariableDomain.VARIABLEDOMAIN_UNKNOWN; - if (var.variableDomainType == DomainType.MEMBRANE){ - variableDomainType = VariableDomain.VARIABLEDOMAIN_MEMBRANE; - }else if (var.variableDomainType == DomainType.VOLUME){ - variableDomainType = VariableDomain.VARIABLEDOMAIN_VOLUME; - } - org.vcell.vis.io.VtuVarInfo.DataType dataType = org.vcell.vis.io.VtuVarInfo.DataType.CellData; - if (var.isSetDataType() && var.dataType == DataType.CELLDATA){ - dataType = org.vcell.vis.io.VtuVarInfo.DataType.CellData; - }else if (var.isSetDataType() && var.dataType == DataType.POINTDATA){ - dataType = org.vcell.vis.io.VtuVarInfo.DataType.PointData; - } - VtuVarInfo vtuVarInfo = new VtuVarInfo(var.getVariableVtuName(),var.getVariableDisplayName(),var.getDomainName(),variableDomainType,var.getExpressionString(),dataType,var.isMeshVar); - List times = getTimePoints(simulationDataSetRef); - double time = (double)times.get(timeIndex); - double[] data = vtkManager.getVtuMeshData(vtuVarInfo, time); - - // - // get empty mesh file for this domain (getEmptyMeshFile() will ensure that the file exists or create it). - // - File emptyMeshFile = getEmptyMeshFile(simulationDataSetRef, var.getDomainName(), timeIndex); - if (var.getDataType()==DataType.CELLDATA){ - VisMeshUtils.writeCellDataToVtu(emptyMeshFile, var.getVariableVtuName(), data, meshFileForVariableAndTime); - }else if (var.getDataType()==DataType.POINTDATA){ - VisMeshUtils.writePointDataToVtu(emptyMeshFile, var.getVariableVtuName(), data, meshFileForVariableAndTime); - } - return meshFileForVariableAndTime.getAbsolutePath(); - } catch (Exception e) { - String msg = "failed to retrieve data file for variable "+var.getVariableVtuName()+" at time index "+timeIndex; - lg.error(msg, e); - throw new ThriftDataAccessException(msg); - } -} - - -private File getEmptyMeshFile(SimulationDataSetRef simulationDataSetRef, String domainName, int timeIndex) throws ThriftDataAccessException { - - if (!simulationDataSetRef.isTimeVaryingMesh){ - timeIndex = 0; - } - - File vtuEmptyMeshFile; - try { - vtuEmptyMeshFile = getEmptyMeshFileLocation(simulationDataSetRef, domainName, timeIndex); - } catch (FileNotFoundException e1) { - lg.error("failed to find data location", e1); - throw new ThriftDataAccessException("failed to find data location: "+e1.getMessage()); - } - - System.out.println("looking for file: "+vtuEmptyMeshFile); - - - // - // if requested mesh file is not found, get files for this timepoint - // - if (!vtuEmptyMeshFile.exists()){ - try { - VtuFileContainer vtuFileContainer = downloadEmptyVtuFileContainer(simulationDataSetRef, timeIndex); - - for (VtuFileContainer.VtuMesh mesh : vtuFileContainer.getVtuMeshes()){ - FileUtils.writeByteArrayToFile(mesh.vtuMeshContents, getEmptyMeshFileLocation(simulationDataSetRef, mesh.domainName, timeIndex)); - } - - if (!vtuEmptyMeshFile.exists()){ - System.out.println("after export, couldn't find requested empty mesh file "+vtuEmptyMeshFile); - throw new ThriftDataAccessException("after export, couldn't find empty requested mesh file "+vtuEmptyMeshFile); - } - System.out.println("vtuData file exists, " + vtuEmptyMeshFile); - - }catch (IOException e){ - lg.error("failed to export entire dataset: "+e.getMessage(), e); - throw new ThriftDataAccessException("failed to export entire dataset: "+e.getMessage()); - } - } - - return vtuEmptyMeshFile; -} - -private VtuFileContainer downloadEmptyVtuFileContainer(SimulationDataSetRef simulationDataSetRef, int timeIndex) throws ThriftDataAccessException { - try { - VtkManager vtkManager = vcellClientDataService.getVtkManager(simulationDataSetRef); - VtuFileContainer vtuFileContainer = vtkManager.getEmptyVtuMeshFiles(timeIndex); - return vtuFileContainer; - }catch (Exception e){ - lg.error("failed to get data for simulation "+simulationDataSetRef, e); - throw new ThriftDataAccessException("failed to get data for simulation "+simulationDataSetRef+": "+e.getMessage()); - } -} - - -@Override -public List getTimePoints(SimulationDataSetRef simulationDataSetRef) throws ThriftDataAccessException { - try { - VtkManager vtkManager = vcellClientDataService.getVtkManager(simulationDataSetRef); - - ArrayList timesList = new ArrayList(); - if (vtkManager != null) { - double[] timesArray = vtkManager.getDataSetTimes(); - for (int i=0; i arrayListOfDoubles){ - ListIterator listIter = arrayListOfDoubles.listIterator(); - double[] doubles = new double[arrayListOfDoubles.size()]; - int i = 0; - while (listIter.hasNext()){ - doubles[i] = listIter.next().doubleValue(); - } - return doubles; -} - -} \ No newline at end of file diff --git a/vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/VCellProxyServer.java b/vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/VCellProxyServer.java deleted file mode 100644 index ce8e32a36b..0000000000 --- a/vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/VCellProxyServer.java +++ /dev/null @@ -1,53 +0,0 @@ -package cbit.vcell.client.pyvcellproxy; - - -import java.net.InetAddress; -import java.net.InetSocketAddress; - -import org.apache.thrift.server.TServer; -import org.apache.thrift.server.TSimpleServer; -import org.apache.thrift.transport.TServerSocket; -import org.apache.thrift.transport.TServerTransport; - - -public class VCellProxyServer { - -/** - * Just fork off a daemon thread - * @param vcellClient - */ -public static void startVCellVisitDataServerThread(VCellClientDataService vcellClient) { - Thread vcellProxyThread = new VCellProxyThread(vcellClient) ; - vcellProxyThread.start(); -} - -/** - * start proxy server in daemon thread - */ -private static class VCellProxyThread extends Thread { - final VCellClientDataService vcellClientDataService; - VCellProxyThread(VCellClientDataService vcc) { - super("vcellProxyThread"); - setDaemon(true); - vcellClientDataService = vcc; - } - @Override - public void run() { - startSimpleVCellProxyServer(new VCellProxy.Processor(new VCellProxyHandler(vcellClientDataService))); - } -} - -private static void startSimpleVCellProxyServer(VCellProxy.Processor processor) { - try { - InetSocketAddress inetSocketAddress = new InetSocketAddress(InetAddress.getLoopbackAddress(), 9090); - TServerTransport serverTransport = new TServerSocket(inetSocketAddress); - TServer vcellProxyServer = new TSimpleServer(new org.apache.thrift.server.TServer.Args(serverTransport).processor(processor)); - - System.out.println("Starting the VCell-VisIt Data Server thread..."); - vcellProxyServer.serve(); - } catch (Exception e) { - e.printStackTrace(); - } - -} -} diff --git a/vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/VariableInfo.java b/vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/VariableInfo.java deleted file mode 100644 index 91357d2e0a..0000000000 --- a/vcell-core/src/main/java/cbit/vcell/client/pyvcellproxy/VariableInfo.java +++ /dev/null @@ -1,1104 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.10.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package cbit.vcell.client.pyvcellproxy; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)") -public class VariableInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("VariableInfo"); - - private static final org.apache.thrift.protocol.TField VARIABLE_VTU_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("variableVtuName", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField VARIABLE_DISPLAY_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("variableDisplayName", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField DOMAIN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("domainName", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField VARIABLE_DOMAIN_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("variableDomainType", org.apache.thrift.protocol.TType.I32, (short)4); - private static final org.apache.thrift.protocol.TField UNITS_LABEL_FIELD_DESC = new org.apache.thrift.protocol.TField("unitsLabel", org.apache.thrift.protocol.TType.STRING, (short)5); - private static final org.apache.thrift.protocol.TField IS_MESH_VAR_FIELD_DESC = new org.apache.thrift.protocol.TField("isMeshVar", org.apache.thrift.protocol.TType.BOOL, (short)6); - private static final org.apache.thrift.protocol.TField EXPRESSION_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("expressionString", org.apache.thrift.protocol.TType.STRING, (short)7); - private static final org.apache.thrift.protocol.TField DATA_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("dataType", org.apache.thrift.protocol.TType.I32, (short)8); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new VariableInfoStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new VariableInfoTupleSchemeFactory(); - - public java.lang.String variableVtuName; // required - public java.lang.String variableDisplayName; // required - public java.lang.String domainName; // required - /** - * - * @see DomainType - */ - public DomainType variableDomainType; // required - public java.lang.String unitsLabel; // required - public boolean isMeshVar; // required - public java.lang.String expressionString; // optional - /** - * - * @see DataType - */ - public DataType dataType; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - VARIABLE_VTU_NAME((short)1, "variableVtuName"), - VARIABLE_DISPLAY_NAME((short)2, "variableDisplayName"), - DOMAIN_NAME((short)3, "domainName"), - /** - * - * @see DomainType - */ - VARIABLE_DOMAIN_TYPE((short)4, "variableDomainType"), - UNITS_LABEL((short)5, "unitsLabel"), - IS_MESH_VAR((short)6, "isMeshVar"), - EXPRESSION_STRING((short)7, "expressionString"), - /** - * - * @see DataType - */ - DATA_TYPE((short)8, "dataType"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // VARIABLE_VTU_NAME - return VARIABLE_VTU_NAME; - case 2: // VARIABLE_DISPLAY_NAME - return VARIABLE_DISPLAY_NAME; - case 3: // DOMAIN_NAME - return DOMAIN_NAME; - case 4: // VARIABLE_DOMAIN_TYPE - return VARIABLE_DOMAIN_TYPE; - case 5: // UNITS_LABEL - return UNITS_LABEL; - case 6: // IS_MESH_VAR - return IS_MESH_VAR; - case 7: // EXPRESSION_STRING - return EXPRESSION_STRING; - case 8: // DATA_TYPE - return DATA_TYPE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __ISMESHVAR_ISSET_ID = 0; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.EXPRESSION_STRING}; - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.VARIABLE_VTU_NAME, new org.apache.thrift.meta_data.FieldMetaData("variableVtuName", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.VARIABLE_DISPLAY_NAME, new org.apache.thrift.meta_data.FieldMetaData("variableDisplayName", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DOMAIN_NAME, new org.apache.thrift.meta_data.FieldMetaData("domainName", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "DomainName"))); - tmpMap.put(_Fields.VARIABLE_DOMAIN_TYPE, new org.apache.thrift.meta_data.FieldMetaData("variableDomainType", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, DomainType.class))); - tmpMap.put(_Fields.UNITS_LABEL, new org.apache.thrift.meta_data.FieldMetaData("unitsLabel", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.IS_MESH_VAR, new org.apache.thrift.meta_data.FieldMetaData("isMeshVar", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.EXPRESSION_STRING, new org.apache.thrift.meta_data.FieldMetaData("expressionString", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DATA_TYPE, new org.apache.thrift.meta_data.FieldMetaData("dataType", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, DataType.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(VariableInfo.class, metaDataMap); - } - - public VariableInfo() { - } - - public VariableInfo( - java.lang.String variableVtuName, - java.lang.String variableDisplayName, - java.lang.String domainName, - DomainType variableDomainType, - java.lang.String unitsLabel, - boolean isMeshVar, - DataType dataType) - { - this(); - this.variableVtuName = variableVtuName; - this.variableDisplayName = variableDisplayName; - this.domainName = domainName; - this.variableDomainType = variableDomainType; - this.unitsLabel = unitsLabel; - this.isMeshVar = isMeshVar; - setIsMeshVarIsSet(true); - this.dataType = dataType; - } - - /** - * Performs a deep copy on other. - */ - public VariableInfo(VariableInfo other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetVariableVtuName()) { - this.variableVtuName = other.variableVtuName; - } - if (other.isSetVariableDisplayName()) { - this.variableDisplayName = other.variableDisplayName; - } - if (other.isSetDomainName()) { - this.domainName = other.domainName; - } - if (other.isSetVariableDomainType()) { - this.variableDomainType = other.variableDomainType; - } - if (other.isSetUnitsLabel()) { - this.unitsLabel = other.unitsLabel; - } - this.isMeshVar = other.isMeshVar; - if (other.isSetExpressionString()) { - this.expressionString = other.expressionString; - } - if (other.isSetDataType()) { - this.dataType = other.dataType; - } - } - - public VariableInfo deepCopy() { - return new VariableInfo(this); - } - - @Override - public void clear() { - this.variableVtuName = null; - this.variableDisplayName = null; - this.domainName = null; - this.variableDomainType = null; - this.unitsLabel = null; - setIsMeshVarIsSet(false); - this.isMeshVar = false; - this.expressionString = null; - this.dataType = null; - } - - public java.lang.String getVariableVtuName() { - return this.variableVtuName; - } - - public VariableInfo setVariableVtuName(java.lang.String variableVtuName) { - this.variableVtuName = variableVtuName; - return this; - } - - public void unsetVariableVtuName() { - this.variableVtuName = null; - } - - /** Returns true if field variableVtuName is set (has been assigned a value) and false otherwise */ - public boolean isSetVariableVtuName() { - return this.variableVtuName != null; - } - - public void setVariableVtuNameIsSet(boolean value) { - if (!value) { - this.variableVtuName = null; - } - } - - public java.lang.String getVariableDisplayName() { - return this.variableDisplayName; - } - - public VariableInfo setVariableDisplayName(java.lang.String variableDisplayName) { - this.variableDisplayName = variableDisplayName; - return this; - } - - public void unsetVariableDisplayName() { - this.variableDisplayName = null; - } - - /** Returns true if field variableDisplayName is set (has been assigned a value) and false otherwise */ - public boolean isSetVariableDisplayName() { - return this.variableDisplayName != null; - } - - public void setVariableDisplayNameIsSet(boolean value) { - if (!value) { - this.variableDisplayName = null; - } - } - - public java.lang.String getDomainName() { - return this.domainName; - } - - public VariableInfo setDomainName(java.lang.String domainName) { - this.domainName = domainName; - return this; - } - - public void unsetDomainName() { - this.domainName = null; - } - - /** Returns true if field domainName is set (has been assigned a value) and false otherwise */ - public boolean isSetDomainName() { - return this.domainName != null; - } - - public void setDomainNameIsSet(boolean value) { - if (!value) { - this.domainName = null; - } - } - - /** - * - * @see DomainType - */ - public DomainType getVariableDomainType() { - return this.variableDomainType; - } - - /** - * - * @see DomainType - */ - public VariableInfo setVariableDomainType(DomainType variableDomainType) { - this.variableDomainType = variableDomainType; - return this; - } - - public void unsetVariableDomainType() { - this.variableDomainType = null; - } - - /** Returns true if field variableDomainType is set (has been assigned a value) and false otherwise */ - public boolean isSetVariableDomainType() { - return this.variableDomainType != null; - } - - public void setVariableDomainTypeIsSet(boolean value) { - if (!value) { - this.variableDomainType = null; - } - } - - public java.lang.String getUnitsLabel() { - return this.unitsLabel; - } - - public VariableInfo setUnitsLabel(java.lang.String unitsLabel) { - this.unitsLabel = unitsLabel; - return this; - } - - public void unsetUnitsLabel() { - this.unitsLabel = null; - } - - /** Returns true if field unitsLabel is set (has been assigned a value) and false otherwise */ - public boolean isSetUnitsLabel() { - return this.unitsLabel != null; - } - - public void setUnitsLabelIsSet(boolean value) { - if (!value) { - this.unitsLabel = null; - } - } - - public boolean isIsMeshVar() { - return this.isMeshVar; - } - - public VariableInfo setIsMeshVar(boolean isMeshVar) { - this.isMeshVar = isMeshVar; - setIsMeshVarIsSet(true); - return this; - } - - public void unsetIsMeshVar() { - __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISMESHVAR_ISSET_ID); - } - - /** Returns true if field isMeshVar is set (has been assigned a value) and false otherwise */ - public boolean isSetIsMeshVar() { - return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISMESHVAR_ISSET_ID); - } - - public void setIsMeshVarIsSet(boolean value) { - __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISMESHVAR_ISSET_ID, value); - } - - public java.lang.String getExpressionString() { - return this.expressionString; - } - - public VariableInfo setExpressionString(java.lang.String expressionString) { - this.expressionString = expressionString; - return this; - } - - public void unsetExpressionString() { - this.expressionString = null; - } - - /** Returns true if field expressionString is set (has been assigned a value) and false otherwise */ - public boolean isSetExpressionString() { - return this.expressionString != null; - } - - public void setExpressionStringIsSet(boolean value) { - if (!value) { - this.expressionString = null; - } - } - - /** - * - * @see DataType - */ - public DataType getDataType() { - return this.dataType; - } - - /** - * - * @see DataType - */ - public VariableInfo setDataType(DataType dataType) { - this.dataType = dataType; - return this; - } - - public void unsetDataType() { - this.dataType = null; - } - - /** Returns true if field dataType is set (has been assigned a value) and false otherwise */ - public boolean isSetDataType() { - return this.dataType != null; - } - - public void setDataTypeIsSet(boolean value) { - if (!value) { - this.dataType = null; - } - } - - public void setFieldValue(_Fields field, java.lang.Object value) { - switch (field) { - case VARIABLE_VTU_NAME: - if (value == null) { - unsetVariableVtuName(); - } else { - setVariableVtuName((java.lang.String)value); - } - break; - - case VARIABLE_DISPLAY_NAME: - if (value == null) { - unsetVariableDisplayName(); - } else { - setVariableDisplayName((java.lang.String)value); - } - break; - - case DOMAIN_NAME: - if (value == null) { - unsetDomainName(); - } else { - setDomainName((java.lang.String)value); - } - break; - - case VARIABLE_DOMAIN_TYPE: - if (value == null) { - unsetVariableDomainType(); - } else { - setVariableDomainType((DomainType)value); - } - break; - - case UNITS_LABEL: - if (value == null) { - unsetUnitsLabel(); - } else { - setUnitsLabel((java.lang.String)value); - } - break; - - case IS_MESH_VAR: - if (value == null) { - unsetIsMeshVar(); - } else { - setIsMeshVar((java.lang.Boolean)value); - } - break; - - case EXPRESSION_STRING: - if (value == null) { - unsetExpressionString(); - } else { - setExpressionString((java.lang.String)value); - } - break; - - case DATA_TYPE: - if (value == null) { - unsetDataType(); - } else { - setDataType((DataType)value); - } - break; - - } - } - - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case VARIABLE_VTU_NAME: - return getVariableVtuName(); - - case VARIABLE_DISPLAY_NAME: - return getVariableDisplayName(); - - case DOMAIN_NAME: - return getDomainName(); - - case VARIABLE_DOMAIN_TYPE: - return getVariableDomainType(); - - case UNITS_LABEL: - return getUnitsLabel(); - - case IS_MESH_VAR: - return isIsMeshVar(); - - case EXPRESSION_STRING: - return getExpressionString(); - - case DATA_TYPE: - return getDataType(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case VARIABLE_VTU_NAME: - return isSetVariableVtuName(); - case VARIABLE_DISPLAY_NAME: - return isSetVariableDisplayName(); - case DOMAIN_NAME: - return isSetDomainName(); - case VARIABLE_DOMAIN_TYPE: - return isSetVariableDomainType(); - case UNITS_LABEL: - return isSetUnitsLabel(); - case IS_MESH_VAR: - return isSetIsMeshVar(); - case EXPRESSION_STRING: - return isSetExpressionString(); - case DATA_TYPE: - return isSetDataType(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that == null) - return false; - if (that instanceof VariableInfo) - return this.equals((VariableInfo)that); - return false; - } - - public boolean equals(VariableInfo that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_variableVtuName = true && this.isSetVariableVtuName(); - boolean that_present_variableVtuName = true && that.isSetVariableVtuName(); - if (this_present_variableVtuName || that_present_variableVtuName) { - if (!(this_present_variableVtuName && that_present_variableVtuName)) - return false; - if (!this.variableVtuName.equals(that.variableVtuName)) - return false; - } - - boolean this_present_variableDisplayName = true && this.isSetVariableDisplayName(); - boolean that_present_variableDisplayName = true && that.isSetVariableDisplayName(); - if (this_present_variableDisplayName || that_present_variableDisplayName) { - if (!(this_present_variableDisplayName && that_present_variableDisplayName)) - return false; - if (!this.variableDisplayName.equals(that.variableDisplayName)) - return false; - } - - boolean this_present_domainName = true && this.isSetDomainName(); - boolean that_present_domainName = true && that.isSetDomainName(); - if (this_present_domainName || that_present_domainName) { - if (!(this_present_domainName && that_present_domainName)) - return false; - if (!this.domainName.equals(that.domainName)) - return false; - } - - boolean this_present_variableDomainType = true && this.isSetVariableDomainType(); - boolean that_present_variableDomainType = true && that.isSetVariableDomainType(); - if (this_present_variableDomainType || that_present_variableDomainType) { - if (!(this_present_variableDomainType && that_present_variableDomainType)) - return false; - if (!this.variableDomainType.equals(that.variableDomainType)) - return false; - } - - boolean this_present_unitsLabel = true && this.isSetUnitsLabel(); - boolean that_present_unitsLabel = true && that.isSetUnitsLabel(); - if (this_present_unitsLabel || that_present_unitsLabel) { - if (!(this_present_unitsLabel && that_present_unitsLabel)) - return false; - if (!this.unitsLabel.equals(that.unitsLabel)) - return false; - } - - boolean this_present_isMeshVar = true; - boolean that_present_isMeshVar = true; - if (this_present_isMeshVar || that_present_isMeshVar) { - if (!(this_present_isMeshVar && that_present_isMeshVar)) - return false; - if (this.isMeshVar != that.isMeshVar) - return false; - } - - boolean this_present_expressionString = true && this.isSetExpressionString(); - boolean that_present_expressionString = true && that.isSetExpressionString(); - if (this_present_expressionString || that_present_expressionString) { - if (!(this_present_expressionString && that_present_expressionString)) - return false; - if (!this.expressionString.equals(that.expressionString)) - return false; - } - - boolean this_present_dataType = true && this.isSetDataType(); - boolean that_present_dataType = true && that.isSetDataType(); - if (this_present_dataType || that_present_dataType) { - if (!(this_present_dataType && that_present_dataType)) - return false; - if (!this.dataType.equals(that.dataType)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetVariableVtuName()) ? 131071 : 524287); - if (isSetVariableVtuName()) - hashCode = hashCode * 8191 + variableVtuName.hashCode(); - - hashCode = hashCode * 8191 + ((isSetVariableDisplayName()) ? 131071 : 524287); - if (isSetVariableDisplayName()) - hashCode = hashCode * 8191 + variableDisplayName.hashCode(); - - hashCode = hashCode * 8191 + ((isSetDomainName()) ? 131071 : 524287); - if (isSetDomainName()) - hashCode = hashCode * 8191 + domainName.hashCode(); - - hashCode = hashCode * 8191 + ((isSetVariableDomainType()) ? 131071 : 524287); - if (isSetVariableDomainType()) - hashCode = hashCode * 8191 + variableDomainType.getValue(); - - hashCode = hashCode * 8191 + ((isSetUnitsLabel()) ? 131071 : 524287); - if (isSetUnitsLabel()) - hashCode = hashCode * 8191 + unitsLabel.hashCode(); - - hashCode = hashCode * 8191 + ((isMeshVar) ? 131071 : 524287); - - hashCode = hashCode * 8191 + ((isSetExpressionString()) ? 131071 : 524287); - if (isSetExpressionString()) - hashCode = hashCode * 8191 + expressionString.hashCode(); - - hashCode = hashCode * 8191 + ((isSetDataType()) ? 131071 : 524287); - if (isSetDataType()) - hashCode = hashCode * 8191 + dataType.getValue(); - - return hashCode; - } - - @Override - public int compareTo(VariableInfo other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.valueOf(isSetVariableVtuName()).compareTo(other.isSetVariableVtuName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetVariableVtuName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.variableVtuName, other.variableVtuName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.valueOf(isSetVariableDisplayName()).compareTo(other.isSetVariableDisplayName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetVariableDisplayName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.variableDisplayName, other.variableDisplayName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.valueOf(isSetDomainName()).compareTo(other.isSetDomainName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDomainName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domainName, other.domainName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.valueOf(isSetVariableDomainType()).compareTo(other.isSetVariableDomainType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetVariableDomainType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.variableDomainType, other.variableDomainType); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.valueOf(isSetUnitsLabel()).compareTo(other.isSetUnitsLabel()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUnitsLabel()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unitsLabel, other.unitsLabel); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.valueOf(isSetIsMeshVar()).compareTo(other.isSetIsMeshVar()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIsMeshVar()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isMeshVar, other.isMeshVar); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.valueOf(isSetExpressionString()).compareTo(other.isSetExpressionString()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetExpressionString()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.expressionString, other.expressionString); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.valueOf(isSetDataType()).compareTo(other.isSetDataType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDataType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataType, other.dataType); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("VariableInfo("); - boolean first = true; - - sb.append("variableVtuName:"); - if (this.variableVtuName == null) { - sb.append("null"); - } else { - sb.append(this.variableVtuName); - } - first = false; - if (!first) sb.append(", "); - sb.append("variableDisplayName:"); - if (this.variableDisplayName == null) { - sb.append("null"); - } else { - sb.append(this.variableDisplayName); - } - first = false; - if (!first) sb.append(", "); - sb.append("domainName:"); - if (this.domainName == null) { - sb.append("null"); - } else { - sb.append(this.domainName); - } - first = false; - if (!first) sb.append(", "); - sb.append("variableDomainType:"); - if (this.variableDomainType == null) { - sb.append("null"); - } else { - sb.append(this.variableDomainType); - } - first = false; - if (!first) sb.append(", "); - sb.append("unitsLabel:"); - if (this.unitsLabel == null) { - sb.append("null"); - } else { - sb.append(this.unitsLabel); - } - first = false; - if (!first) sb.append(", "); - sb.append("isMeshVar:"); - sb.append(this.isMeshVar); - first = false; - if (isSetExpressionString()) { - if (!first) sb.append(", "); - sb.append("expressionString:"); - if (this.expressionString == null) { - sb.append("null"); - } else { - sb.append(this.expressionString); - } - first = false; - } - if (!first) sb.append(", "); - sb.append("dataType:"); - if (this.dataType == null) { - sb.append("null"); - } else { - sb.append(this.dataType); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (variableVtuName == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'variableVtuName' was not present! Struct: " + toString()); - } - if (variableDisplayName == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'variableDisplayName' was not present! Struct: " + toString()); - } - if (domainName == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'domainName' was not present! Struct: " + toString()); - } - if (variableDomainType == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'variableDomainType' was not present! Struct: " + toString()); - } - if (unitsLabel == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'unitsLabel' was not present! Struct: " + toString()); - } - // alas, we cannot check 'isMeshVar' because it's a primitive and you chose the non-beans generator. - if (dataType == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'dataType' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class VariableInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public VariableInfoStandardScheme getScheme() { - return new VariableInfoStandardScheme(); - } - } - - private static class VariableInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, VariableInfo struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // VARIABLE_VTU_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.variableVtuName = iprot.readString(); - struct.setVariableVtuNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // VARIABLE_DISPLAY_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.variableDisplayName = iprot.readString(); - struct.setVariableDisplayNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // DOMAIN_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.domainName = iprot.readString(); - struct.setDomainNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // VARIABLE_DOMAIN_TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.variableDomainType = cbit.vcell.client.pyvcellproxy.DomainType.findByValue(iprot.readI32()); - struct.setVariableDomainTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // UNITS_LABEL - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.unitsLabel = iprot.readString(); - struct.setUnitsLabelIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // IS_MESH_VAR - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.isMeshVar = iprot.readBool(); - struct.setIsMeshVarIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // EXPRESSION_STRING - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.expressionString = iprot.readString(); - struct.setExpressionStringIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // DATA_TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.dataType = cbit.vcell.client.pyvcellproxy.DataType.findByValue(iprot.readI32()); - struct.setDataTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetIsMeshVar()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'isMeshVar' was not found in serialized data! Struct: " + toString()); - } - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, VariableInfo struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.variableVtuName != null) { - oprot.writeFieldBegin(VARIABLE_VTU_NAME_FIELD_DESC); - oprot.writeString(struct.variableVtuName); - oprot.writeFieldEnd(); - } - if (struct.variableDisplayName != null) { - oprot.writeFieldBegin(VARIABLE_DISPLAY_NAME_FIELD_DESC); - oprot.writeString(struct.variableDisplayName); - oprot.writeFieldEnd(); - } - if (struct.domainName != null) { - oprot.writeFieldBegin(DOMAIN_NAME_FIELD_DESC); - oprot.writeString(struct.domainName); - oprot.writeFieldEnd(); - } - if (struct.variableDomainType != null) { - oprot.writeFieldBegin(VARIABLE_DOMAIN_TYPE_FIELD_DESC); - oprot.writeI32(struct.variableDomainType.getValue()); - oprot.writeFieldEnd(); - } - if (struct.unitsLabel != null) { - oprot.writeFieldBegin(UNITS_LABEL_FIELD_DESC); - oprot.writeString(struct.unitsLabel); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(IS_MESH_VAR_FIELD_DESC); - oprot.writeBool(struct.isMeshVar); - oprot.writeFieldEnd(); - if (struct.expressionString != null) { - if (struct.isSetExpressionString()) { - oprot.writeFieldBegin(EXPRESSION_STRING_FIELD_DESC); - oprot.writeString(struct.expressionString); - oprot.writeFieldEnd(); - } - } - if (struct.dataType != null) { - oprot.writeFieldBegin(DATA_TYPE_FIELD_DESC); - oprot.writeI32(struct.dataType.getValue()); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class VariableInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - public VariableInfoTupleScheme getScheme() { - return new VariableInfoTupleScheme(); - } - } - - private static class VariableInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, VariableInfo struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeString(struct.variableVtuName); - oprot.writeString(struct.variableDisplayName); - oprot.writeString(struct.domainName); - oprot.writeI32(struct.variableDomainType.getValue()); - oprot.writeString(struct.unitsLabel); - oprot.writeBool(struct.isMeshVar); - oprot.writeI32(struct.dataType.getValue()); - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetExpressionString()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetExpressionString()) { - oprot.writeString(struct.expressionString); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, VariableInfo struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.variableVtuName = iprot.readString(); - struct.setVariableVtuNameIsSet(true); - struct.variableDisplayName = iprot.readString(); - struct.setVariableDisplayNameIsSet(true); - struct.domainName = iprot.readString(); - struct.setDomainNameIsSet(true); - struct.variableDomainType = cbit.vcell.client.pyvcellproxy.DomainType.findByValue(iprot.readI32()); - struct.setVariableDomainTypeIsSet(true); - struct.unitsLabel = iprot.readString(); - struct.setUnitsLabelIsSet(true); - struct.isMeshVar = iprot.readBool(); - struct.setIsMeshVarIsSet(true); - struct.dataType = cbit.vcell.client.pyvcellproxy.DataType.findByValue(iprot.readI32()); - struct.setDataTypeIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.expressionString = iprot.readString(); - struct.setExpressionStringIsSet(true); - } - } - } - - private static S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } -} - diff --git a/vcell-core/src/main/java/cbit/vcell/resource/ResourceUtil.java b/vcell-core/src/main/java/cbit/vcell/resource/ResourceUtil.java index b183fc3f09..c5cecc6807 100644 --- a/vcell-core/src/main/java/cbit/vcell/resource/ResourceUtil.java +++ b/vcell-core/src/main/java/cbit/vcell/resource/ResourceUtil.java @@ -37,11 +37,6 @@ public class ResourceUtil { public static final String LOCAL_SOLVER_LIB_LINK_SUFFIX = "_link"; private static final String LOCALSOLVERS_DIR = "localsolvers"; - private static final String PYTHONSCRIPTS_DIR = "pythonScripts"; - private static final String VCELL_OPT_DIR = "VCell_Opt"; - private static final String VCELL_VISIT_DIR = "VCell_VisIt"; - private static final String VCELL_VTK_DIR = "VCell_VTK"; - private static final String MANIFEST_FILE_NAME = ".versionManifest.txt"; public enum JavaVersion { SEVENTEEN("17"); @@ -512,31 +507,6 @@ public static String forceUnixPath(String filePath){ return filePath.replace("C:","").replace("D:","").replace("\\","/"); } - private static File getPythonScriptsDir() { - return new File(getVCellInstall(),PYTHONSCRIPTS_DIR); - } - - public static File getVCellOptPythonDir() { - return new File(getPythonScriptsDir(),VCELL_OPT_DIR); - } - - public static File getVCellVTKPythonDir() { - return new File(getPythonScriptsDir(),VCELL_VTK_DIR); - } - - public static File getOptimizationRootDir() - { - if(optimizationRootDir == null) - { - optimizationRootDir = new File(getVcellHome(), "optimization"); - if (!optimizationRootDir.exists()) { - optimizationRootDir.mkdirs(); - } - } - - return optimizationRootDir; - } - private static String getBioformatsJarDownloadURLString(){ return PropertyLoader.getRequiredProperty(PropertyLoader.bioformatsJarDownloadURL); } diff --git a/vcell-core/src/main/java/org/vcell/optimization/CopasiUtils.java b/vcell-core/src/main/java/org/vcell/optimization/CopasiUtils.java index 5faf83b0d4..0dcd0fd507 100644 --- a/vcell-core/src/main/java/org/vcell/optimization/CopasiUtils.java +++ b/vcell-core/src/main/java/org/vcell/optimization/CopasiUtils.java @@ -23,6 +23,7 @@ import org.vcell.optimization.jtd.CopasiOptimizationParameter; import org.vcell.optimization.jtd.ParameterDescription; import org.vcell.sbml.vcell.MathModel_SBMLExporter; +import org.vcell.util.PythonUtils; import javax.xml.stream.XMLStreamException; import java.io.*; @@ -336,7 +337,7 @@ public static OptimizationResultSet optRunToOptimizationResultSet(ParameterEstim public static void callCopasiPython(Path optProblemFile, Path resultsFile, Path reportFile) throws InterruptedException, IOException { //final String pythonExe = pythonExeName; File installDir = PropertyLoader.getRequiredDirectory(PropertyLoader.installationRoot); - File optDir = Paths.get(installDir.getAbsolutePath(),"pythonProject", "vcell-opt").toAbsolutePath().toFile(); + File optDir = Paths.get(installDir.getAbsolutePath(),"pythonCopasiOpt", "vcell-opt").toAbsolutePath().toFile(); // final String pythonExe = "/Users/schaff/Library/Caches/pypoetry/virtualenvs/vcell-opt-XIpjcTyI-py3.9/bin/python"; ProcessBuilder pb = new ProcessBuilder(new String[]{ "poetry","run","python", "-m", "vcell_opt.optService", @@ -345,35 +346,7 @@ public static void callCopasiPython(Path optProblemFile, Path resultsFile, Path String.valueOf(reportFile.toAbsolutePath())}); pb.directory(optDir); System.out.println(pb.command()); - runAndPrintProcessStreams(pb, "", ""); - } - - private static void runAndPrintProcessStreams(ProcessBuilder pb, String outString, String errString) throws InterruptedException, IOException { - // Process printing code goes here - File of = File.createTempFile("temp-", ".out", currentWorkingDir.toFile()); - File ef = File.createTempFile("temp-", ".err", currentWorkingDir.toFile()); - pb.redirectError(ef); - pb.redirectOutput(of); - Process process = pb.start(); - process.waitFor(); - StringBuilder sberr = new StringBuilder(); - StringBuilder sbout = new StringBuilder(); - List lines = com.google.common.io.Files.readLines(ef, StandardCharsets.UTF_8); - lines.forEach(line -> sberr.append(line).append("\n")); - String es = sberr.toString(); - lines = Files.readLines(of, StandardCharsets.UTF_8); - lines.forEach(line -> sbout.append(line).append("\n")); - String os = sbout.toString(); - of.delete(); - ef.delete(); - if (process.exitValue() != 0) { - lg.error(errString); - // don't print here, send the error down to caller who is responsible for dealing with it - throw new RuntimeException(es); - } else { - if (!outString.equals("")) lg.info(outString); - if (!os.equals("")) lg.info(os); - } + PythonUtils.runAndPrintProcessStreams(pb); } public static OptProgressReport readProgressReportFromCSV(File progressReportFile) throws IOException { diff --git a/vcell-core/src/main/java/org/vcell/sbml/OmexPythonUtils.java b/vcell-core/src/main/java/org/vcell/sbml/OmexPythonUtils.java index 315bdb08e9..bc0837bfaf 100644 --- a/vcell-core/src/main/java/org/vcell/sbml/OmexPythonUtils.java +++ b/vcell-core/src/main/java/org/vcell/sbml/OmexPythonUtils.java @@ -5,13 +5,14 @@ import com.google.gson.JsonObject; import com.google.gson.JsonParser; import org.vcell.util.FileUtils; +import org.vcell.util.PythonUtils; import java.io.File; import java.io.IOException; import java.nio.charset.StandardCharsets; import java.nio.file.Path; -import java.nio.file.Paths; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; public class OmexPythonUtils { @@ -49,16 +50,16 @@ public OmexValidationError(OmexValidationErrorType type, String message) { } public String toString() { - return type + ": " + message; + return type + ": " + message; } } public static void validateOmex(Path omexFile) throws OmexValidationException, InterruptedException, IOException { File reportJsonFile = File.createTempFile("validation_report_",".json"); File omexTempDir = Files.createTempDir(); - - int retcode = callCLIPython("validateOmex", omexFile, omexTempDir.toPath(), reportJsonFile.toPath()); - if (retcode != 0){ + try { + callCLIPython("validateOmex", omexFile, omexTempDir.toPath(), reportJsonFile.toPath()); + }catch (Exception e){ throw new RuntimeException("OMEX VALIDATION FAILED"); } String reportString = FileUtils.readFileToString(reportJsonFile); @@ -76,45 +77,14 @@ private static List getErrorsFromReport(JsonObject reportRo return errors; } - private static int callCLIPython(String command, Path omexFile, Path tempDir, Path reportJsonFile) throws InterruptedException, IOException { - File installDir = PropertyLoader.getRequiredDirectory(PropertyLoader.installationRoot); - File cliPythonDir = Paths.get(installDir.getAbsolutePath(), "vcell-cli-utils").toAbsolutePath().toFile(); - ProcessBuilder pb = new ProcessBuilder( - "poetry", "run", "python", - "-m", "vcell_cli_utils.wrapper", + private static void callCLIPython(String command, Path omexFile, Path tempDir, Path reportJsonFile) throws InterruptedException, IOException { + File cliPythonDir = PropertyLoader.getRequiredDirectory(PropertyLoader.cliWorkingDir); + String[] commands = new String[] { command, String.valueOf(omexFile.toAbsolutePath()), String.valueOf(tempDir.toAbsolutePath()), - String.valueOf(reportJsonFile.toAbsolutePath())); - pb.directory(cliPythonDir); - System.out.println(pb.command()); - return runAndPrintProcessStreams(pb, tempDir); - } - - private static int runAndPrintProcessStreams(ProcessBuilder pb, Path tempDir) throws InterruptedException, IOException { - // Process printing code goes here - File of = File.createTempFile("temp-", ".out", tempDir.toFile()); - File ef = File.createTempFile("temp-", ".err", tempDir.toFile()); - pb.redirectError(ef); - pb.redirectOutput(of); - Process process = pb.start(); - process.waitFor(); - StringBuilder sberr = new StringBuilder(); - StringBuilder sbout = new StringBuilder(); - List lines = com.google.common.io.Files.readLines(ef, StandardCharsets.UTF_8); - lines.forEach(line -> sberr.append(line).append("\n")); - String es = sberr.toString(); - lines = Files.readLines(of, StandardCharsets.UTF_8); - lines.forEach(line -> sbout.append(line).append("\n")); - String os = sbout.toString(); - of.delete(); - ef.delete(); - System.out.println("stdout: "+os); - System.err.println("stderr: "+es); - if (process.exitValue() != 0) { - throw new RuntimeException(es); - } - return process.exitValue(); + String.valueOf(reportJsonFile.toAbsolutePath()) }; + PythonUtils.callPoetryModule(cliPythonDir, "vcell_cli_utils.wrapper", commands); } } \ No newline at end of file diff --git a/vcell-core/src/main/java/org/vcell/util/PythonUtils.java b/vcell-core/src/main/java/org/vcell/util/PythonUtils.java new file mode 100644 index 0000000000..53c4699656 --- /dev/null +++ b/vcell-core/src/main/java/org/vcell/util/PythonUtils.java @@ -0,0 +1,56 @@ +package org.vcell.util; + +import com.google.common.io.Files; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import java.io.File; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class PythonUtils { + private final static Logger lg = LogManager.getLogger(PythonUtils.class); + + public static void callPoetryModule(File workingDir, String pythonModule, String[] commands) throws InterruptedException, IOException { + List commandList = new ArrayList<>(Arrays.asList("poetry", "run", "python", "-m", pythonModule)); + commandList.addAll(Arrays.asList(commands)); + ProcessBuilder pb = new ProcessBuilder(commandList); + pb.directory(workingDir); + System.out.println(pb.command()); + runAndPrintProcessStreams(pb); + } + + public static void runAndPrintProcessStreams(ProcessBuilder pb) throws InterruptedException, IOException { + // Process printing code goes here + File of = File.createTempFile("temp-", ".out"); + File ef = File.createTempFile("temp-", ".err"); + try { + pb.redirectError(ef); + pb.redirectOutput(of); + Process process = pb.start(); + process.waitFor(); + StringBuilder sberr = new StringBuilder(); + StringBuilder sbout = new StringBuilder(); + List lines = com.google.common.io.Files.readLines(ef, StandardCharsets.UTF_8); + lines.forEach(line -> sberr.append(line).append("\n")); + String es = sberr.toString(); + lines = Files.readLines(of, StandardCharsets.UTF_8); + lines.forEach(line -> sbout.append(line).append("\n")); + String os = sbout.toString(); + of.delete(); + ef.delete(); + if (process.exitValue() != 0) { + lg.error("Python process failed with exit code " + process.exitValue()+": "+es); + throw new RuntimeException(es); + } else { + if (!os.equals("")) lg.info(os); + } + }finally { + of.delete(); + ef.delete(); + } + } +} diff --git a/vcell-core/src/main/java/org/vcell/vis/mapping/chombo/ChomboVtkFileWriter.java b/vcell-core/src/main/java/org/vcell/vis/mapping/chombo/ChomboVtkFileWriter.java index da76f9458d..099ec0308a 100644 --- a/vcell-core/src/main/java/org/vcell/vis/mapping/chombo/ChomboVtkFileWriter.java +++ b/vcell-core/src/main/java/org/vcell/vis/mapping/chombo/ChomboVtkFileWriter.java @@ -315,7 +315,7 @@ private File getChomboIndexDataFileName(File directory, ChomboFiles chomboFiles, return new File(directory,chomboFiles.getCannonicalFilePrefix(domainName)+".chomboindex"); } - public VtuFileContainer getEmptyVtuMeshFiles(ChomboFiles chomboFiles, File destinationDirectory) throws IOException, MathException, DataAccessException { + public VtuFileContainer getEmptyVtuMeshFiles(ChomboFiles chomboFiles, File destinationDirectory) throws IOException, MathException, DataAccessException, InterruptedException { // // find mesh for each file at time 0 // @@ -366,7 +366,7 @@ public VtuFileContainer getEmptyVtuMeshFiles(ChomboFiles chomboFiles, File desti return vtuFileContainer; } - public File[] writeEmptyMeshFiles(ChomboFiles chomboFiles, File destinationDirectory, ProgressListener progressListener) throws IOException, MathException, DataAccessException { + public File[] writeEmptyMeshFiles(ChomboFiles chomboFiles, File destinationDirectory, ProgressListener progressListener) throws IOException, MathException, DataAccessException, InterruptedException { ArrayList meshFiles = new ArrayList(); int timeIndex = 0; diff --git a/vcell-core/src/main/java/org/vcell/vis/mapping/movingboundary/MovingBoundaryVtkFileWriter.java b/vcell-core/src/main/java/org/vcell/vis/mapping/movingboundary/MovingBoundaryVtkFileWriter.java index de1f9f4ade..91765883c4 100644 --- a/vcell-core/src/main/java/org/vcell/vis/mapping/movingboundary/MovingBoundaryVtkFileWriter.java +++ b/vcell-core/src/main/java/org/vcell/vis/mapping/movingboundary/MovingBoundaryVtkFileWriter.java @@ -139,7 +139,7 @@ public MovingBoundaryIndexData getMovingBoundaryIndexData(MovingBoundarySimFiles } - public VtuFileContainer getEmptyVtuMeshFiles(MovingBoundarySimFiles movingBoundaryFiles, int timeIndex, File destinationDirectory) throws IOException, MathException, DataAccessException { + public VtuFileContainer getEmptyVtuMeshFiles(MovingBoundarySimFiles movingBoundaryFiles, int timeIndex, File destinationDirectory) throws IOException, MathException, DataAccessException, InterruptedException { // // find mesh for each file at time 0 // @@ -177,7 +177,7 @@ public VtuFileContainer getEmptyVtuMeshFiles(MovingBoundarySimFiles movingBounda return vtuFileContainer; } - public File[] writeEmptyMeshFiles(MovingBoundarySimFiles movingBoundaryFiles, int timeIndex, File destinationDirectory, ProgressListener progressListener) throws IOException, MathException, DataAccessException { + public File[] writeEmptyMeshFiles(MovingBoundarySimFiles movingBoundaryFiles, int timeIndex, File destinationDirectory, ProgressListener progressListener) throws IOException, MathException, DataAccessException, InterruptedException { HashMap domainMeshMap = new HashMap(); ArrayList allDomainNames = new ArrayList(); diff --git a/vcell-core/src/main/java/org/vcell/vis/mapping/vcell/CartesianMeshMapping.java b/vcell-core/src/main/java/org/vcell/vis/mapping/vcell/CartesianMeshMapping.java index 1f1811241f..ffe1e6ac33 100644 --- a/vcell-core/src/main/java/org/vcell/vis/mapping/vcell/CartesianMeshMapping.java +++ b/vcell-core/src/main/java/org/vcell/vis/mapping/vcell/CartesianMeshMapping.java @@ -8,12 +8,7 @@ import org.vcell.vis.core.Box3D; import org.vcell.vis.vcell.CartesianMesh; import org.vcell.vis.vcell.MembraneElement; -import org.vcell.vis.vismesh.thrift.FiniteVolumeIndex; -import org.vcell.vis.vismesh.thrift.Vect3D; -import org.vcell.vis.vismesh.thrift.VisMesh; -import org.vcell.vis.vismesh.thrift.VisPoint; -import org.vcell.vis.vismesh.thrift.VisPolygon; -import org.vcell.vis.vismesh.thrift.VisVoxel; +import org.vcell.vis.vismesh.thrift.*; public class CartesianMeshMapping { @@ -29,6 +24,8 @@ public VisMesh fromMeshData(CartesianMesh cartesianMesh, String domainName, bool return fromMesh3DVolume(cartesianMesh, domainName); }else if (dimension==3 && !bVolume){ return fromMesh3DMembrane(cartesianMesh, domainName); + }else if (dimension==2 && !bVolume) { + return fromMesh2DMembrane(cartesianMesh, domainName); }else{ throw new RuntimeException("unsupported: mesh dimension = "+dimension+", volumeDomain ="+bVolume); } @@ -130,129 +127,210 @@ private VisMesh fromMesh2DVolume(CartesianMesh cartesianMesh, String domainName) return visMesh; } + private VisMesh fromMesh2DMembrane(CartesianMesh cartesianMesh, String domainName){ + ISize size = cartesianMesh.getSize(); + int numX = size.getX(); + int dimension = 2; + + Vect3D origin = new Vect3D(cartesianMesh.getOrigin().x,cartesianMesh.getOrigin().y,cartesianMesh.getOrigin().z); + Vect3D extent = new Vect3D(cartesianMesh.getExtent().x,cartesianMesh.getExtent().y,cartesianMesh.getExtent().z); + VisMesh visMesh = new VisMesh(dimension, origin, extent); // invoke VisMesh() constructor + int currPointIndex = 0; + HashMap pointDict = new HashMap(); + List membraneElements = cartesianMesh.getMembraneElements(domainName); + + for (MembraneElement membraneElement : membraneElements){ + // inside + int insideVolumeIndex = membraneElement.getInsideVolumeIndex(); + int insideI = insideVolumeIndex % numX; + int insideJ = insideVolumeIndex / numX; + Box3D insideBox = cartesianMesh.getVolumeElementBox(insideI, insideJ, 0); + // outside + int outsideVolumeIndex = membraneElement.getOutsideVolumeIndex(); + int outsideI = outsideVolumeIndex % numX; + int outsideJ = outsideVolumeIndex / numX; + + VisPoint p1Coord; + VisPoint p2Coord; + double z = insideBox.z_lo; + + if (insideI == outsideI + 1){ + // x- z cross y + double x = insideBox.x_lo; + p1Coord = new VisPoint(x,insideBox.y_lo,z); + p2Coord = new VisPoint(x,insideBox.y_hi,z); + }else if (outsideI == insideI + 1){ + // x+ y cross z + double x = insideBox.x_hi; + p1Coord = new VisPoint(x,insideBox.y_hi,z); + p2Coord = new VisPoint(x,insideBox.y_lo,z); + }else if (insideJ == outsideJ + 1){ + // y- x cross z + double y = insideBox.y_lo; + p1Coord = new VisPoint(insideBox.x_lo,y,z); + p2Coord = new VisPoint(insideBox.x_hi,y,z); + }else if (outsideJ == insideJ + 1){ + // y+ z cross x + double y = insideBox.y_hi; + p1Coord = new VisPoint(insideBox.x_hi,y,z); + p2Coord = new VisPoint(insideBox.x_lo,y,z); + }else{ + throw new RuntimeException("inside/outside volume indices not reconciled in membraneElement "+membraneElement.getMembraneIndex()+" in domain "+domainName); + } + + // + // make sure vertices are added to model without duplicates and get the assigned identifier. + // + String p1Key = toStringKey(p1Coord); + Integer i1 = pointDict.get(p1Key); + if (i1 == null){ + pointDict.put(p1Key,currPointIndex); + i1 = currPointIndex; + visMesh.addToPoints(p1Coord); + currPointIndex++; + } + + String p2Key = toStringKey(p2Coord); + Integer i2 = pointDict.get(p2Key); + if (i2 == null){ + pointDict.put(p2Key,currPointIndex); + i2 = currPointIndex; + visMesh.addToPoints(p2Coord); + currPointIndex++; + } + + VisLine lineSegment = new VisLine(i1, i2); + lineSegment.setFiniteVolumeIndex(new FiniteVolumeIndex(membraneElement.getMembraneIndex(),cartesianMesh.getMembraneRegionIndex(membraneElement.getMembraneIndex()))); + // print('adding a cell at level '+str(currLevel.getLevel())+" from "+str(p1Coord)+" to "+str(p3Coord)) + visMesh.addToVisLines(lineSegment); + + } + return visMesh; + } + private VisMesh fromMesh3DMembrane(CartesianMesh cartesianMesh, String domainName){ - ISize size = cartesianMesh.getSize(); - int numX = size.getX(); - int numY = size.getY(); - int dimension = 3; - - Vect3D origin = new Vect3D(cartesianMesh.getOrigin().x,cartesianMesh.getOrigin().y,cartesianMesh.getOrigin().z); - Vect3D extent = new Vect3D(cartesianMesh.getExtent().x,cartesianMesh.getExtent().y,cartesianMesh.getExtent().z); - VisMesh visMesh = new VisMesh(dimension, origin, extent); // invoke VisMesh() constructor - int currPointIndex = 0; - HashMap pointDict = new HashMap(); - List membraneElements = cartesianMesh.getMembraneElements(domainName); - - for (MembraneElement membraneElement : membraneElements){ - // inside - int insideVolumeIndex = membraneElement.getInsideVolumeIndex(); + ISize size = cartesianMesh.getSize(); + int numX = size.getX(); + int numY = size.getY(); + int dimension = 3; + + Vect3D origin = new Vect3D(cartesianMesh.getOrigin().x,cartesianMesh.getOrigin().y,cartesianMesh.getOrigin().z); + Vect3D extent = new Vect3D(cartesianMesh.getExtent().x,cartesianMesh.getExtent().y,cartesianMesh.getExtent().z); + VisMesh visMesh = new VisMesh(dimension, origin, extent); // invoke VisMesh() constructor + int currPointIndex = 0; + HashMap pointDict = new HashMap(); + List membraneElements = cartesianMesh.getMembraneElements(domainName); + + for (MembraneElement membraneElement : membraneElements){ + // inside + int insideVolumeIndex = membraneElement.getInsideVolumeIndex(); int insideI = insideVolumeIndex % numX; int insideJ = (insideVolumeIndex % (numX*numY))/numX; - int insideK = insideVolumeIndex / (numX*numY); - Box3D insideBox = cartesianMesh.getVolumeElementBox(insideI, insideJ, insideK); - // outside - int outsideVolumeIndex = membraneElement.getOutsideVolumeIndex(); + int insideK = insideVolumeIndex / (numX*numY); + Box3D insideBox = cartesianMesh.getVolumeElementBox(insideI, insideJ, insideK); + // outside + int outsideVolumeIndex = membraneElement.getOutsideVolumeIndex(); int outsideI = outsideVolumeIndex % numX; - int outsideJ = (outsideVolumeIndex % (numX*numY))/numX; - int outsideK = outsideVolumeIndex / (numX*numY); - - VisPoint p1Coord; - VisPoint p2Coord; - VisPoint p3Coord; - VisPoint p4Coord; + int outsideJ = (outsideVolumeIndex % (numX*numY))/numX; + int outsideK = outsideVolumeIndex / (numX*numY); - if (insideI == outsideI + 1){ - // x- z cross y - double x = insideBox.x_lo; - p1Coord = new VisPoint(x,insideBox.y_lo,insideBox.z_lo); - p2Coord = new VisPoint(x,insideBox.y_lo,insideBox.z_hi); - p3Coord = new VisPoint(x,insideBox.y_hi,insideBox.z_hi); - p4Coord = new VisPoint(x,insideBox.y_hi,insideBox.z_lo); - }else if (outsideI == insideI + 1){ - // x+ y cross z - double x = insideBox.x_hi; - p1Coord = new VisPoint(x,insideBox.y_lo,insideBox.z_lo); - p2Coord = new VisPoint(x,insideBox.y_hi,insideBox.z_lo); - p3Coord = new VisPoint(x,insideBox.y_hi,insideBox.z_hi); - p4Coord = new VisPoint(x,insideBox.y_lo,insideBox.z_hi); - }else if (insideJ == outsideJ + 1){ - // y- x cross z - double y = insideBox.y_lo; - p1Coord = new VisPoint(insideBox.x_lo,y,insideBox.z_lo); - p2Coord = new VisPoint(insideBox.x_hi,y,insideBox.z_lo); - p3Coord = new VisPoint(insideBox.x_hi,y,insideBox.z_hi); - p4Coord = new VisPoint(insideBox.x_lo,y,insideBox.z_hi); - }else if (outsideJ == insideJ + 1){ - // y+ z cross x - double y = insideBox.y_hi; - p1Coord = new VisPoint(insideBox.x_lo,y,insideBox.z_lo); - p2Coord = new VisPoint(insideBox.x_lo,y,insideBox.z_hi); - p3Coord = new VisPoint(insideBox.x_hi,y,insideBox.z_hi); - p4Coord = new VisPoint(insideBox.x_hi,y,insideBox.z_lo); - }else if (insideK == outsideK + 1){ - // z- y cross x - double z = insideBox.z_lo; - p1Coord = new VisPoint(insideBox.x_lo,insideBox.y_lo,z); - p2Coord = new VisPoint(insideBox.x_lo,insideBox.y_hi,z); - p3Coord = new VisPoint(insideBox.x_hi,insideBox.y_hi,z); - p4Coord = new VisPoint(insideBox.x_hi,insideBox.y_lo,z); - }else if (outsideK == insideK + 1){ - // z+ x cross y - double z = insideBox.z_hi; - p1Coord = new VisPoint(insideBox.x_lo,insideBox.y_lo,z); - p2Coord = new VisPoint(insideBox.x_hi,insideBox.y_lo,z); - p3Coord = new VisPoint(insideBox.x_hi,insideBox.y_hi,z); - p4Coord = new VisPoint(insideBox.x_lo,insideBox.y_hi,z); - }else{ - throw new RuntimeException("inside/outside volume indices not reconciled in membraneElement "+membraneElement.getMembraneIndex()+" in domain "+domainName); - } + VisPoint p1Coord; + VisPoint p2Coord; + VisPoint p3Coord; + VisPoint p4Coord; - // - // make sure vertices are added to model without duplicates and get the assigned identifier. - // - String p1Key = toStringKey(p1Coord); - Integer i1 = pointDict.get(p1Key); - if (i1 == null){ - pointDict.put(p1Key,currPointIndex); - i1 = currPointIndex; - visMesh.addToPoints(p1Coord); - currPointIndex++; - } + if (insideI == outsideI + 1){ + // x- z cross y + double x = insideBox.x_lo; + p1Coord = new VisPoint(x,insideBox.y_lo,insideBox.z_lo); + p2Coord = new VisPoint(x,insideBox.y_lo,insideBox.z_hi); + p3Coord = new VisPoint(x,insideBox.y_hi,insideBox.z_hi); + p4Coord = new VisPoint(x,insideBox.y_hi,insideBox.z_lo); + }else if (outsideI == insideI + 1){ + // x+ y cross z + double x = insideBox.x_hi; + p1Coord = new VisPoint(x,insideBox.y_lo,insideBox.z_lo); + p2Coord = new VisPoint(x,insideBox.y_hi,insideBox.z_lo); + p3Coord = new VisPoint(x,insideBox.y_hi,insideBox.z_hi); + p4Coord = new VisPoint(x,insideBox.y_lo,insideBox.z_hi); + }else if (insideJ == outsideJ + 1){ + // y- x cross z + double y = insideBox.y_lo; + p1Coord = new VisPoint(insideBox.x_lo,y,insideBox.z_lo); + p2Coord = new VisPoint(insideBox.x_hi,y,insideBox.z_lo); + p3Coord = new VisPoint(insideBox.x_hi,y,insideBox.z_hi); + p4Coord = new VisPoint(insideBox.x_lo,y,insideBox.z_hi); + }else if (outsideJ == insideJ + 1){ + // y+ z cross x + double y = insideBox.y_hi; + p1Coord = new VisPoint(insideBox.x_lo,y,insideBox.z_lo); + p2Coord = new VisPoint(insideBox.x_lo,y,insideBox.z_hi); + p3Coord = new VisPoint(insideBox.x_hi,y,insideBox.z_hi); + p4Coord = new VisPoint(insideBox.x_hi,y,insideBox.z_lo); + }else if (insideK == outsideK + 1){ + // z- y cross x + double z = insideBox.z_lo; + p1Coord = new VisPoint(insideBox.x_lo,insideBox.y_lo,z); + p2Coord = new VisPoint(insideBox.x_lo,insideBox.y_hi,z); + p3Coord = new VisPoint(insideBox.x_hi,insideBox.y_hi,z); + p4Coord = new VisPoint(insideBox.x_hi,insideBox.y_lo,z); + }else if (outsideK == insideK + 1){ + // z+ x cross y + double z = insideBox.z_hi; + p1Coord = new VisPoint(insideBox.x_lo,insideBox.y_lo,z); + p2Coord = new VisPoint(insideBox.x_hi,insideBox.y_lo,z); + p3Coord = new VisPoint(insideBox.x_hi,insideBox.y_hi,z); + p4Coord = new VisPoint(insideBox.x_lo,insideBox.y_hi,z); + }else{ + throw new RuntimeException("inside/outside volume indices not reconciled in membraneElement "+membraneElement.getMembraneIndex()+" in domain "+domainName); + } - String p2Key = toStringKey(p2Coord); - Integer i2 = pointDict.get(p2Key); - if (i2 == null){ - pointDict.put(p2Key,currPointIndex); - i2 = currPointIndex; - visMesh.addToPoints(p2Coord); - currPointIndex++; - } + // + // make sure vertices are added to model without duplicates and get the assigned identifier. + // + String p1Key = toStringKey(p1Coord); + Integer i1 = pointDict.get(p1Key); + if (i1 == null){ + pointDict.put(p1Key,currPointIndex); + i1 = currPointIndex; + visMesh.addToPoints(p1Coord); + currPointIndex++; + } - String p3Key = toStringKey(p3Coord); - Integer i3 = pointDict.get(p3Key); - if (i3 == null){ - pointDict.put(p3Key, currPointIndex); - i3 = currPointIndex; - visMesh.addToPoints(p3Coord); - currPointIndex++; - } + String p2Key = toStringKey(p2Coord); + Integer i2 = pointDict.get(p2Key); + if (i2 == null){ + pointDict.put(p2Key,currPointIndex); + i2 = currPointIndex; + visMesh.addToPoints(p2Coord); + currPointIndex++; + } - String p4Key = toStringKey(p4Coord); - Integer i4 = pointDict.get(p4Key); - if (i4 == null){ - pointDict.put(p4Key,currPointIndex); - i4 = currPointIndex; - visMesh.addToPoints(p4Coord); - currPointIndex++; - } + String p3Key = toStringKey(p3Coord); + Integer i3 = pointDict.get(p3Key); + if (i3 == null){ + pointDict.put(p3Key, currPointIndex); + i3 = currPointIndex; + visMesh.addToPoints(p3Coord); + currPointIndex++; + } - VisPolygon quad = new VisPolygon(Arrays.asList( new Integer[] { i1,i2,i3,i4 } )); - quad.setFiniteVolumeIndex(new FiniteVolumeIndex(membraneElement.getMembraneIndex(),cartesianMesh.getMembraneRegionIndex(membraneElement.getMembraneIndex()))); - // print('adding a cell at level '+str(currLevel.getLevel())+" from "+str(p1Coord)+" to "+str(p3Coord)) - visMesh.addToPolygons(quad); + String p4Key = toStringKey(p4Coord); + Integer i4 = pointDict.get(p4Key); + if (i4 == null){ + pointDict.put(p4Key,currPointIndex); + i4 = currPointIndex; + visMesh.addToPoints(p4Coord); + currPointIndex++; + } - } - return visMesh; + VisPolygon quad = new VisPolygon(Arrays.asList( new Integer[] { i1,i2,i3,i4 } )); + quad.setFiniteVolumeIndex(new FiniteVolumeIndex(membraneElement.getMembraneIndex(),cartesianMesh.getMembraneRegionIndex(membraneElement.getMembraneIndex()))); + // print('adding a cell at level '+str(currLevel.getLevel())+" from "+str(p1Coord)+" to "+str(p3Coord)) + visMesh.addToPolygons(quad); + + } + return visMesh; } private VisMesh fromMesh3DVolume(CartesianMesh cartesianMesh, String domainName){ diff --git a/vcell-core/src/main/java/org/vcell/vis/mapping/vcell/CartesianMeshVtkFileWriter.java b/vcell-core/src/main/java/org/vcell/vis/mapping/vcell/CartesianMeshVtkFileWriter.java index 5196b4c25e..40ed269d06 100644 --- a/vcell-core/src/main/java/org/vcell/vis/mapping/vcell/CartesianMeshVtkFileWriter.java +++ b/vcell-core/src/main/java/org/vcell/vis/mapping/vcell/CartesianMeshVtkFileWriter.java @@ -116,7 +116,7 @@ private File getFiniteVolumeIndexDataFileName(VCellSimFiles vcellFiles, String d public double[] getVtuMeshData(VCellSimFiles vcellFiles, OutputContext outputContext, SimDataBlock simDataBlock, File destinationDirectory, VtuVarInfo var, final double time) throws Exception { // // read the "empty" vtk mesh from a file (create the files if necessary) - // read the indicing arrays from this file to know how to reorder the data into the vtk cell data order. + // read the indexing arrays from this file to know how to reorder the data into the vtk cell data order. // return the vtk cell data // File finiteVolumeIndexDataFile = getFiniteVolumeIndexDataFileName(vcellFiles, var.domainName); @@ -164,7 +164,7 @@ public double[] getVtuMeshData(VCellSimFiles vcellFiles, OutputContext outputCo return vtkData; } - public VtuFileContainer getEmptyVtuMeshFiles(VCellSimFiles vcellFiles, File destinationDirectory) throws IOException, MathException, DataAccessException { + public VtuFileContainer getEmptyVtuMeshFiles(VCellSimFiles vcellFiles, File destinationDirectory) throws IOException, MathException, DataAccessException, InterruptedException { // // read the simplified cartesian mesh // @@ -200,7 +200,7 @@ public VtuFileContainer getEmptyVtuMeshFiles(VCellSimFiles vcellFiles, File dest return vtuFileContainer; } - public File[] writeEmptyMeshFiles(VCellSimFiles vcellFiles, File destinationDirectory, ProgressListener progressListener) throws IOException, MathException { + public File[] writeEmptyMeshFiles(VCellSimFiles vcellFiles, File destinationDirectory, ProgressListener progressListener) throws IOException, MathException, InterruptedException { if (destinationDirectory==null || !destinationDirectory.isDirectory()){ throw new RuntimeException("destinationDirectory '"+destinationDirectory+" not valid"); } diff --git a/vcell-core/src/main/java/org/vcell/vis/vcell/CartesianMesh.java b/vcell-core/src/main/java/org/vcell/vis/vcell/CartesianMesh.java index 823baf20f2..3ca959d516 100644 --- a/vcell-core/src/main/java/org/vcell/vis/vcell/CartesianMesh.java +++ b/vcell-core/src/main/java/org/vcell/vis/vcell/CartesianMesh.java @@ -16,7 +16,7 @@ public class CartesianMesh { private final SubdomainInfo subdomainInfo; private final MembraneElement[] membraneElements; private final ContourElement[] contourElements; - private final MeshRegionInfo meshRegionInfo; + public final MeshRegionInfo meshRegionInfo; private final ISize size; private final Vect3D extent; private final Vect3D origin; diff --git a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/ChomboIndexData.java b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/ChomboIndexData.java index c129bcd4b3..db5f55190a 100644 --- a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/ChomboIndexData.java +++ b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/ChomboIndexData.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.10.0) + * Autogenerated by Thrift Compiler (0.18.1) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -7,7 +7,7 @@ package org.vcell.vis.vismesh.thrift; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.18.1)") public class ChomboIndexData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ChomboIndexData"); @@ -18,9 +18,9 @@ public class ChomboIndexData implements org.apache.thrift.TBase chomboSurfaceIndices; // optional - public java.util.List chomboVolumeIndices; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String domainName; // required + public @org.apache.thrift.annotation.Nullable java.util.List chomboSurfaceIndices; // optional + public @org.apache.thrift.annotation.Nullable java.util.List chomboVolumeIndices; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -39,6 +39,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // DOMAIN_NAME @@ -65,6 +66,7 @@ public static _Fields findByThriftIdOrThrow(int fieldId) { /** * Find the _Fields constant that matches name, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } @@ -77,10 +79,12 @@ public static _Fields findByName(java.lang.String name) { _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } + @Override public java.lang.String getFieldName() { return _fieldName; } @@ -136,6 +140,7 @@ public ChomboIndexData(ChomboIndexData other) { } } + @Override public ChomboIndexData deepCopy() { return new ChomboIndexData(this); } @@ -147,11 +152,12 @@ public void clear() { this.chomboVolumeIndices = null; } + @org.apache.thrift.annotation.Nullable public java.lang.String getDomainName() { return this.domainName; } - public ChomboIndexData setDomainName(java.lang.String domainName) { + public ChomboIndexData setDomainName(@org.apache.thrift.annotation.Nullable java.lang.String domainName) { this.domainName = domainName; return this; } @@ -175,6 +181,7 @@ public int getChomboSurfaceIndicesSize() { return (this.chomboSurfaceIndices == null) ? 0 : this.chomboSurfaceIndices.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator getChomboSurfaceIndicesIterator() { return (this.chomboSurfaceIndices == null) ? null : this.chomboSurfaceIndices.iterator(); } @@ -186,11 +193,12 @@ public void addToChomboSurfaceIndices(ChomboSurfaceIndex elem) { this.chomboSurfaceIndices.add(elem); } + @org.apache.thrift.annotation.Nullable public java.util.List getChomboSurfaceIndices() { return this.chomboSurfaceIndices; } - public ChomboIndexData setChomboSurfaceIndices(java.util.List chomboSurfaceIndices) { + public ChomboIndexData setChomboSurfaceIndices(@org.apache.thrift.annotation.Nullable java.util.List chomboSurfaceIndices) { this.chomboSurfaceIndices = chomboSurfaceIndices; return this; } @@ -214,6 +222,7 @@ public int getChomboVolumeIndicesSize() { return (this.chomboVolumeIndices == null) ? 0 : this.chomboVolumeIndices.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator getChomboVolumeIndicesIterator() { return (this.chomboVolumeIndices == null) ? null : this.chomboVolumeIndices.iterator(); } @@ -225,11 +234,12 @@ public void addToChomboVolumeIndices(ChomboVolumeIndex elem) { this.chomboVolumeIndices.add(elem); } + @org.apache.thrift.annotation.Nullable public java.util.List getChomboVolumeIndices() { return this.chomboVolumeIndices; } - public ChomboIndexData setChomboVolumeIndices(java.util.List chomboVolumeIndices) { + public ChomboIndexData setChomboVolumeIndices(@org.apache.thrift.annotation.Nullable java.util.List chomboVolumeIndices) { this.chomboVolumeIndices = chomboVolumeIndices; return this; } @@ -249,7 +259,8 @@ public void setChomboVolumeIndicesIsSet(boolean value) { } } - public void setFieldValue(_Fields field, java.lang.Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case DOMAIN_NAME: if (value == null) { @@ -278,6 +289,8 @@ public void setFieldValue(_Fields field, java.lang.Object value) { } } + @org.apache.thrift.annotation.Nullable + @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case DOMAIN_NAME: @@ -294,6 +307,7 @@ public java.lang.Object getFieldValue(_Fields field) { } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); @@ -312,8 +326,6 @@ public boolean isSet(_Fields field) { @Override public boolean equals(java.lang.Object that) { - if (that == null) - return false; if (that instanceof ChomboIndexData) return this.equals((ChomboIndexData)that); return false; @@ -382,7 +394,7 @@ public int compareTo(ChomboIndexData other) { int lastComparison = 0; - lastComparison = java.lang.Boolean.valueOf(isSetDomainName()).compareTo(other.isSetDomainName()); + lastComparison = java.lang.Boolean.compare(isSetDomainName(), other.isSetDomainName()); if (lastComparison != 0) { return lastComparison; } @@ -392,7 +404,7 @@ public int compareTo(ChomboIndexData other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(isSetChomboSurfaceIndices()).compareTo(other.isSetChomboSurfaceIndices()); + lastComparison = java.lang.Boolean.compare(isSetChomboSurfaceIndices(), other.isSetChomboSurfaceIndices()); if (lastComparison != 0) { return lastComparison; } @@ -402,7 +414,7 @@ public int compareTo(ChomboIndexData other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(isSetChomboVolumeIndices()).compareTo(other.isSetChomboVolumeIndices()); + lastComparison = java.lang.Boolean.compare(isSetChomboVolumeIndices(), other.isSetChomboVolumeIndices()); if (lastComparison != 0) { return lastComparison; } @@ -415,14 +427,18 @@ public int compareTo(ChomboIndexData other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @@ -488,6 +504,7 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } private static class ChomboIndexDataStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public ChomboIndexDataStandardScheme getScheme() { return new ChomboIndexDataStandardScheme(); } @@ -495,6 +512,7 @@ public ChomboIndexDataStandardScheme getScheme() { private static class ChomboIndexDataStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, ChomboIndexData struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -518,7 +536,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, ChomboIndexData str { org.apache.thrift.protocol.TList _list56 = iprot.readListBegin(); struct.chomboSurfaceIndices = new java.util.ArrayList(_list56.size); - ChomboSurfaceIndex _elem57; + @org.apache.thrift.annotation.Nullable ChomboSurfaceIndex _elem57; for (int _i58 = 0; _i58 < _list56.size; ++_i58) { _elem57 = new ChomboSurfaceIndex(); @@ -537,7 +555,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, ChomboIndexData str { org.apache.thrift.protocol.TList _list59 = iprot.readListBegin(); struct.chomboVolumeIndices = new java.util.ArrayList(_list59.size); - ChomboVolumeIndex _elem60; + @org.apache.thrift.annotation.Nullable ChomboVolumeIndex _elem60; for (int _i61 = 0; _i61 < _list59.size; ++_i61) { _elem60 = new ChomboVolumeIndex(); @@ -562,6 +580,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, ChomboIndexData str struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, ChomboIndexData struct) throws org.apache.thrift.TException { struct.validate(); @@ -606,6 +625,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, ChomboIndexData st } private static class ChomboIndexDataTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public ChomboIndexDataTupleScheme getScheme() { return new ChomboIndexDataTupleScheme(); } @@ -653,9 +673,9 @@ public void read(org.apache.thrift.protocol.TProtocol prot, ChomboIndexData stru java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list66 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + org.apache.thrift.protocol.TList _list66 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.chomboSurfaceIndices = new java.util.ArrayList(_list66.size); - ChomboSurfaceIndex _elem67; + @org.apache.thrift.annotation.Nullable ChomboSurfaceIndex _elem67; for (int _i68 = 0; _i68 < _list66.size; ++_i68) { _elem67 = new ChomboSurfaceIndex(); @@ -667,9 +687,9 @@ public void read(org.apache.thrift.protocol.TProtocol prot, ChomboIndexData stru } if (incoming.get(1)) { { - org.apache.thrift.protocol.TList _list69 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + org.apache.thrift.protocol.TList _list69 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.chomboVolumeIndices = new java.util.ArrayList(_list69.size); - ChomboVolumeIndex _elem70; + @org.apache.thrift.annotation.Nullable ChomboVolumeIndex _elem70; for (int _i71 = 0; _i71 < _list69.size; ++_i71) { _elem70 = new ChomboVolumeIndex(); diff --git a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/ChomboSurfaceIndex.java b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/ChomboSurfaceIndex.java index 612829e19c..74af1c58a7 100644 --- a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/ChomboSurfaceIndex.java +++ b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/ChomboSurfaceIndex.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.10.0) + * Autogenerated by Thrift Compiler (0.18.1) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -7,7 +7,7 @@ package org.vcell.vis.vismesh.thrift; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.18.1)") public class ChomboSurfaceIndex implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ChomboSurfaceIndex"); @@ -33,6 +33,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // INDEX @@ -55,6 +56,7 @@ public static _Fields findByThriftIdOrThrow(int fieldId) { /** * Find the _Fields constant that matches name, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } @@ -67,10 +69,12 @@ public static _Fields findByName(java.lang.String name) { _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } + @Override public java.lang.String getFieldName() { return _fieldName; } @@ -107,6 +111,7 @@ public ChomboSurfaceIndex(ChomboSurfaceIndex other) { this.index = other.index; } + @Override public ChomboSurfaceIndex deepCopy() { return new ChomboSurfaceIndex(this); } @@ -140,7 +145,8 @@ public void setIndexIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __INDEX_ISSET_ID, value); } - public void setFieldValue(_Fields field, java.lang.Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case INDEX: if (value == null) { @@ -153,6 +159,8 @@ public void setFieldValue(_Fields field, java.lang.Object value) { } } + @org.apache.thrift.annotation.Nullable + @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case INDEX: @@ -163,6 +171,7 @@ public java.lang.Object getFieldValue(_Fields field) { } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); @@ -177,8 +186,6 @@ public boolean isSet(_Fields field) { @Override public boolean equals(java.lang.Object that) { - if (that == null) - return false; if (that instanceof ChomboSurfaceIndex) return this.equals((ChomboSurfaceIndex)that); return false; @@ -219,7 +226,7 @@ public int compareTo(ChomboSurfaceIndex other) { int lastComparison = 0; - lastComparison = java.lang.Boolean.valueOf(isSetIndex()).compareTo(other.isSetIndex()); + lastComparison = java.lang.Boolean.compare(isSetIndex(), other.isSetIndex()); if (lastComparison != 0) { return lastComparison; } @@ -232,14 +239,18 @@ public int compareTo(ChomboSurfaceIndex other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @@ -281,6 +292,7 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } private static class ChomboSurfaceIndexStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public ChomboSurfaceIndexStandardScheme getScheme() { return new ChomboSurfaceIndexStandardScheme(); } @@ -288,6 +300,7 @@ public ChomboSurfaceIndexStandardScheme getScheme() { private static class ChomboSurfaceIndexStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, ChomboSurfaceIndex struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -320,6 +333,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, ChomboSurfaceIndex struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, ChomboSurfaceIndex struct) throws org.apache.thrift.TException { struct.validate(); @@ -334,6 +348,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, ChomboSurfaceIndex } private static class ChomboSurfaceIndexTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public ChomboSurfaceIndexTupleScheme getScheme() { return new ChomboSurfaceIndexTupleScheme(); } diff --git a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/ChomboVolumeIndex.java b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/ChomboVolumeIndex.java index 3a5dc98ee0..17aae6e03b 100644 --- a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/ChomboVolumeIndex.java +++ b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/ChomboVolumeIndex.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.10.0) + * Autogenerated by Thrift Compiler (0.18.1) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -7,7 +7,7 @@ package org.vcell.vis.vismesh.thrift; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.18.1)") public class ChomboVolumeIndex implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ChomboVolumeIndex"); @@ -42,6 +42,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // LEVEL @@ -70,6 +71,7 @@ public static _Fields findByThriftIdOrThrow(int fieldId) { /** * Find the _Fields constant that matches name, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } @@ -82,10 +84,12 @@ public static _Fields findByName(java.lang.String name) { _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } + @Override public java.lang.String getFieldName() { return _fieldName; } @@ -143,6 +147,7 @@ public ChomboVolumeIndex(ChomboVolumeIndex other) { this.fraction = other.fraction; } + @Override public ChomboVolumeIndex deepCopy() { return new ChomboVolumeIndex(this); } @@ -251,7 +256,8 @@ public void setFractionIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FRACTION_ISSET_ID, value); } - public void setFieldValue(_Fields field, java.lang.Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case LEVEL: if (value == null) { @@ -288,6 +294,8 @@ public void setFieldValue(_Fields field, java.lang.Object value) { } } + @org.apache.thrift.annotation.Nullable + @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case LEVEL: @@ -307,6 +315,7 @@ public java.lang.Object getFieldValue(_Fields field) { } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); @@ -327,8 +336,6 @@ public boolean isSet(_Fields field) { @Override public boolean equals(java.lang.Object that) { - if (that == null) - return false; if (that instanceof ChomboVolumeIndex) return this.equals((ChomboVolumeIndex)that); return false; @@ -402,7 +409,7 @@ public int compareTo(ChomboVolumeIndex other) { int lastComparison = 0; - lastComparison = java.lang.Boolean.valueOf(isSetLevel()).compareTo(other.isSetLevel()); + lastComparison = java.lang.Boolean.compare(isSetLevel(), other.isSetLevel()); if (lastComparison != 0) { return lastComparison; } @@ -412,7 +419,7 @@ public int compareTo(ChomboVolumeIndex other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(isSetBoxNumber()).compareTo(other.isSetBoxNumber()); + lastComparison = java.lang.Boolean.compare(isSetBoxNumber(), other.isSetBoxNumber()); if (lastComparison != 0) { return lastComparison; } @@ -422,7 +429,7 @@ public int compareTo(ChomboVolumeIndex other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(isSetBoxIndex()).compareTo(other.isSetBoxIndex()); + lastComparison = java.lang.Boolean.compare(isSetBoxIndex(), other.isSetBoxIndex()); if (lastComparison != 0) { return lastComparison; } @@ -432,7 +439,7 @@ public int compareTo(ChomboVolumeIndex other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(isSetFraction()).compareTo(other.isSetFraction()); + lastComparison = java.lang.Boolean.compare(isSetFraction(), other.isSetFraction()); if (lastComparison != 0) { return lastComparison; } @@ -445,14 +452,18 @@ public int compareTo(ChomboVolumeIndex other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @@ -509,6 +520,7 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } private static class ChomboVolumeIndexStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public ChomboVolumeIndexStandardScheme getScheme() { return new ChomboVolumeIndexStandardScheme(); } @@ -516,6 +528,7 @@ public ChomboVolumeIndexStandardScheme getScheme() { private static class ChomboVolumeIndexStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, ChomboVolumeIndex struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -581,6 +594,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, ChomboVolumeIndex s struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, ChomboVolumeIndex struct) throws org.apache.thrift.TException { struct.validate(); @@ -604,6 +618,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, ChomboVolumeIndex } private static class ChomboVolumeIndexTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public ChomboVolumeIndexTupleScheme getScheme() { return new ChomboVolumeIndexTupleScheme(); } diff --git a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/Face.java b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/Face.java index 7cdff63fd0..20a5821af0 100644 --- a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/Face.java +++ b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/Face.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.10.0) + * Autogenerated by Thrift Compiler (0.18.1) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -7,10 +7,7 @@ package org.vcell.vis.vismesh.thrift; -import java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.18.1)") public enum Face implements org.apache.thrift.TEnum { Xm(0), Xp(1), @@ -28,6 +25,7 @@ private Face(int value) { /** * Get the integer value of this enum value, as defined in the Thrift IDL. */ + @Override public int getValue() { return value; } @@ -36,6 +34,7 @@ public int getValue() { * Find a the enum type by its integer value, as defined in the Thrift IDL. * @return null if the value is not found. */ + @org.apache.thrift.annotation.Nullable public static Face findByValue(int value) { switch (value) { case 0: diff --git a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/FiniteVolumeIndex.java b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/FiniteVolumeIndex.java index 52b549ab79..3a116fb95b 100644 --- a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/FiniteVolumeIndex.java +++ b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/FiniteVolumeIndex.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.10.0) + * Autogenerated by Thrift Compiler (0.18.1) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -7,7 +7,7 @@ package org.vcell.vis.vismesh.thrift; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.18.1)") public class FiniteVolumeIndex implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("FiniteVolumeIndex"); @@ -36,6 +36,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // GLOBAL_INDEX @@ -60,6 +61,7 @@ public static _Fields findByThriftIdOrThrow(int fieldId) { /** * Find the _Fields constant that matches name, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } @@ -72,10 +74,12 @@ public static _Fields findByName(java.lang.String name) { _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } + @Override public java.lang.String getFieldName() { return _fieldName; } @@ -119,6 +123,7 @@ public FiniteVolumeIndex(FiniteVolumeIndex other) { this.regionIndex = other.regionIndex; } + @Override public FiniteVolumeIndex deepCopy() { return new FiniteVolumeIndex(this); } @@ -177,7 +182,8 @@ public void setRegionIndexIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __REGIONINDEX_ISSET_ID, value); } - public void setFieldValue(_Fields field, java.lang.Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case GLOBAL_INDEX: if (value == null) { @@ -198,6 +204,8 @@ public void setFieldValue(_Fields field, java.lang.Object value) { } } + @org.apache.thrift.annotation.Nullable + @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case GLOBAL_INDEX: @@ -211,6 +219,7 @@ public java.lang.Object getFieldValue(_Fields field) { } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); @@ -227,8 +236,6 @@ public boolean isSet(_Fields field) { @Override public boolean equals(java.lang.Object that) { - if (that == null) - return false; if (that instanceof FiniteVolumeIndex) return this.equals((FiniteVolumeIndex)that); return false; @@ -280,7 +287,7 @@ public int compareTo(FiniteVolumeIndex other) { int lastComparison = 0; - lastComparison = java.lang.Boolean.valueOf(isSetGlobalIndex()).compareTo(other.isSetGlobalIndex()); + lastComparison = java.lang.Boolean.compare(isSetGlobalIndex(), other.isSetGlobalIndex()); if (lastComparison != 0) { return lastComparison; } @@ -290,7 +297,7 @@ public int compareTo(FiniteVolumeIndex other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(isSetRegionIndex()).compareTo(other.isSetRegionIndex()); + lastComparison = java.lang.Boolean.compare(isSetRegionIndex(), other.isSetRegionIndex()); if (lastComparison != 0) { return lastComparison; } @@ -303,14 +310,18 @@ public int compareTo(FiniteVolumeIndex other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @@ -357,6 +368,7 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } private static class FiniteVolumeIndexStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public FiniteVolumeIndexStandardScheme getScheme() { return new FiniteVolumeIndexStandardScheme(); } @@ -364,6 +376,7 @@ public FiniteVolumeIndexStandardScheme getScheme() { private static class FiniteVolumeIndexStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, FiniteVolumeIndex struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -407,6 +420,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, FiniteVolumeIndex s struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, FiniteVolumeIndex struct) throws org.apache.thrift.TException { struct.validate(); @@ -424,6 +438,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, FiniteVolumeIndex } private static class FiniteVolumeIndexTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public FiniteVolumeIndexTupleScheme getScheme() { return new FiniteVolumeIndexTupleScheme(); } diff --git a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/FiniteVolumeIndexData.java b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/FiniteVolumeIndexData.java index 0df8742dfe..05fdfaf6bb 100644 --- a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/FiniteVolumeIndexData.java +++ b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/FiniteVolumeIndexData.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.10.0) + * Autogenerated by Thrift Compiler (0.18.1) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -7,7 +7,7 @@ package org.vcell.vis.vismesh.thrift; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.18.1)") public class FiniteVolumeIndexData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("FiniteVolumeIndexData"); @@ -17,8 +17,8 @@ public class FiniteVolumeIndexData implements org.apache.thrift.TBase finiteVolumeIndices; // required + public @org.apache.thrift.annotation.Nullable java.lang.String domainName; // required + public @org.apache.thrift.annotation.Nullable java.util.List finiteVolumeIndices; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -36,6 +36,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // DOMAIN_NAME @@ -60,6 +61,7 @@ public static _Fields findByThriftIdOrThrow(int fieldId) { /** * Find the _Fields constant that matches name, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } @@ -72,10 +74,12 @@ public static _Fields findByName(java.lang.String name) { _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } + @Override public java.lang.String getFieldName() { return _fieldName; } @@ -122,6 +126,7 @@ public FiniteVolumeIndexData(FiniteVolumeIndexData other) { } } + @Override public FiniteVolumeIndexData deepCopy() { return new FiniteVolumeIndexData(this); } @@ -132,11 +137,12 @@ public void clear() { this.finiteVolumeIndices = null; } + @org.apache.thrift.annotation.Nullable public java.lang.String getDomainName() { return this.domainName; } - public FiniteVolumeIndexData setDomainName(java.lang.String domainName) { + public FiniteVolumeIndexData setDomainName(@org.apache.thrift.annotation.Nullable java.lang.String domainName) { this.domainName = domainName; return this; } @@ -160,6 +166,7 @@ public int getFiniteVolumeIndicesSize() { return (this.finiteVolumeIndices == null) ? 0 : this.finiteVolumeIndices.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator getFiniteVolumeIndicesIterator() { return (this.finiteVolumeIndices == null) ? null : this.finiteVolumeIndices.iterator(); } @@ -171,11 +178,12 @@ public void addToFiniteVolumeIndices(FiniteVolumeIndex elem) { this.finiteVolumeIndices.add(elem); } + @org.apache.thrift.annotation.Nullable public java.util.List getFiniteVolumeIndices() { return this.finiteVolumeIndices; } - public FiniteVolumeIndexData setFiniteVolumeIndices(java.util.List finiteVolumeIndices) { + public FiniteVolumeIndexData setFiniteVolumeIndices(@org.apache.thrift.annotation.Nullable java.util.List finiteVolumeIndices) { this.finiteVolumeIndices = finiteVolumeIndices; return this; } @@ -195,7 +203,8 @@ public void setFiniteVolumeIndicesIsSet(boolean value) { } } - public void setFieldValue(_Fields field, java.lang.Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case DOMAIN_NAME: if (value == null) { @@ -216,6 +225,8 @@ public void setFieldValue(_Fields field, java.lang.Object value) { } } + @org.apache.thrift.annotation.Nullable + @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case DOMAIN_NAME: @@ -229,6 +240,7 @@ public java.lang.Object getFieldValue(_Fields field) { } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); @@ -245,8 +257,6 @@ public boolean isSet(_Fields field) { @Override public boolean equals(java.lang.Object that) { - if (that == null) - return false; if (that instanceof FiniteVolumeIndexData) return this.equals((FiniteVolumeIndexData)that); return false; @@ -302,7 +312,7 @@ public int compareTo(FiniteVolumeIndexData other) { int lastComparison = 0; - lastComparison = java.lang.Boolean.valueOf(isSetDomainName()).compareTo(other.isSetDomainName()); + lastComparison = java.lang.Boolean.compare(isSetDomainName(), other.isSetDomainName()); if (lastComparison != 0) { return lastComparison; } @@ -312,7 +322,7 @@ public int compareTo(FiniteVolumeIndexData other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(isSetFiniteVolumeIndices()).compareTo(other.isSetFiniteVolumeIndices()); + lastComparison = java.lang.Boolean.compare(isSetFiniteVolumeIndices(), other.isSetFiniteVolumeIndices()); if (lastComparison != 0) { return lastComparison; } @@ -325,14 +335,18 @@ public int compareTo(FiniteVolumeIndexData other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @@ -389,6 +403,7 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } private static class FiniteVolumeIndexDataStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public FiniteVolumeIndexDataStandardScheme getScheme() { return new FiniteVolumeIndexDataStandardScheme(); } @@ -396,6 +411,7 @@ public FiniteVolumeIndexDataStandardScheme getScheme() { private static class FiniteVolumeIndexDataStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, FiniteVolumeIndexData struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -419,7 +435,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, FiniteVolumeIndexDa { org.apache.thrift.protocol.TList _list48 = iprot.readListBegin(); struct.finiteVolumeIndices = new java.util.ArrayList(_list48.size); - FiniteVolumeIndex _elem49; + @org.apache.thrift.annotation.Nullable FiniteVolumeIndex _elem49; for (int _i50 = 0; _i50 < _list48.size; ++_i50) { _elem49 = new FiniteVolumeIndex(); @@ -444,6 +460,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, FiniteVolumeIndexDa struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, FiniteVolumeIndexData struct) throws org.apache.thrift.TException { struct.validate(); @@ -472,6 +489,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, FiniteVolumeIndexD } private static class FiniteVolumeIndexDataTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public FiniteVolumeIndexDataTupleScheme getScheme() { return new FiniteVolumeIndexDataTupleScheme(); } @@ -498,9 +516,9 @@ public void read(org.apache.thrift.protocol.TProtocol prot, FiniteVolumeIndexDat struct.domainName = iprot.readString(); struct.setDomainNameIsSet(true); { - org.apache.thrift.protocol.TList _list53 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + org.apache.thrift.protocol.TList _list53 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.finiteVolumeIndices = new java.util.ArrayList(_list53.size); - FiniteVolumeIndex _elem54; + @org.apache.thrift.annotation.Nullable FiniteVolumeIndex _elem54; for (int _i55 = 0; _i55 < _list53.size; ++_i55) { _elem54 = new FiniteVolumeIndex(); diff --git a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/MovingBoundaryIndexData.java b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/MovingBoundaryIndexData.java index a0f234e1df..02a0efc313 100644 --- a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/MovingBoundaryIndexData.java +++ b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/MovingBoundaryIndexData.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.10.0) + * Autogenerated by Thrift Compiler (0.18.1) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -7,7 +7,7 @@ package org.vcell.vis.vismesh.thrift; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.18.1)") public class MovingBoundaryIndexData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("MovingBoundaryIndexData"); @@ -19,10 +19,10 @@ public class MovingBoundaryIndexData implements org.apache.thrift.TBase movingBoundarySurfaceIndices; // optional - public java.util.List movingBoundaryVolumeIndices; // optional + public @org.apache.thrift.annotation.Nullable java.util.List movingBoundarySurfaceIndices; // optional + public @org.apache.thrift.annotation.Nullable java.util.List movingBoundaryVolumeIndices; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -42,6 +42,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // DOMAIN_NAME @@ -70,6 +71,7 @@ public static _Fields findByThriftIdOrThrow(int fieldId) { /** * Find the _Fields constant that matches name, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } @@ -82,10 +84,12 @@ public static _Fields findByName(java.lang.String name) { _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } + @Override public java.lang.String getFieldName() { return _fieldName; } @@ -150,6 +154,7 @@ public MovingBoundaryIndexData(MovingBoundaryIndexData other) { } } + @Override public MovingBoundaryIndexData deepCopy() { return new MovingBoundaryIndexData(this); } @@ -163,11 +168,12 @@ public void clear() { this.movingBoundaryVolumeIndices = null; } + @org.apache.thrift.annotation.Nullable public java.lang.String getDomainName() { return this.domainName; } - public MovingBoundaryIndexData setDomainName(java.lang.String domainName) { + public MovingBoundaryIndexData setDomainName(@org.apache.thrift.annotation.Nullable java.lang.String domainName) { this.domainName = domainName; return this; } @@ -214,6 +220,7 @@ public int getMovingBoundarySurfaceIndicesSize() { return (this.movingBoundarySurfaceIndices == null) ? 0 : this.movingBoundarySurfaceIndices.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator getMovingBoundarySurfaceIndicesIterator() { return (this.movingBoundarySurfaceIndices == null) ? null : this.movingBoundarySurfaceIndices.iterator(); } @@ -225,11 +232,12 @@ public void addToMovingBoundarySurfaceIndices(MovingBoundarySurfaceIndex elem) { this.movingBoundarySurfaceIndices.add(elem); } + @org.apache.thrift.annotation.Nullable public java.util.List getMovingBoundarySurfaceIndices() { return this.movingBoundarySurfaceIndices; } - public MovingBoundaryIndexData setMovingBoundarySurfaceIndices(java.util.List movingBoundarySurfaceIndices) { + public MovingBoundaryIndexData setMovingBoundarySurfaceIndices(@org.apache.thrift.annotation.Nullable java.util.List movingBoundarySurfaceIndices) { this.movingBoundarySurfaceIndices = movingBoundarySurfaceIndices; return this; } @@ -253,6 +261,7 @@ public int getMovingBoundaryVolumeIndicesSize() { return (this.movingBoundaryVolumeIndices == null) ? 0 : this.movingBoundaryVolumeIndices.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator getMovingBoundaryVolumeIndicesIterator() { return (this.movingBoundaryVolumeIndices == null) ? null : this.movingBoundaryVolumeIndices.iterator(); } @@ -264,11 +273,12 @@ public void addToMovingBoundaryVolumeIndices(MovingBoundaryVolumeIndex elem) { this.movingBoundaryVolumeIndices.add(elem); } + @org.apache.thrift.annotation.Nullable public java.util.List getMovingBoundaryVolumeIndices() { return this.movingBoundaryVolumeIndices; } - public MovingBoundaryIndexData setMovingBoundaryVolumeIndices(java.util.List movingBoundaryVolumeIndices) { + public MovingBoundaryIndexData setMovingBoundaryVolumeIndices(@org.apache.thrift.annotation.Nullable java.util.List movingBoundaryVolumeIndices) { this.movingBoundaryVolumeIndices = movingBoundaryVolumeIndices; return this; } @@ -288,7 +298,8 @@ public void setMovingBoundaryVolumeIndicesIsSet(boolean value) { } } - public void setFieldValue(_Fields field, java.lang.Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case DOMAIN_NAME: if (value == null) { @@ -325,6 +336,8 @@ public void setFieldValue(_Fields field, java.lang.Object value) { } } + @org.apache.thrift.annotation.Nullable + @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case DOMAIN_NAME: @@ -344,6 +357,7 @@ public java.lang.Object getFieldValue(_Fields field) { } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); @@ -364,8 +378,6 @@ public boolean isSet(_Fields field) { @Override public boolean equals(java.lang.Object that) { - if (that == null) - return false; if (that instanceof MovingBoundaryIndexData) return this.equals((MovingBoundaryIndexData)that); return false; @@ -445,7 +457,7 @@ public int compareTo(MovingBoundaryIndexData other) { int lastComparison = 0; - lastComparison = java.lang.Boolean.valueOf(isSetDomainName()).compareTo(other.isSetDomainName()); + lastComparison = java.lang.Boolean.compare(isSetDomainName(), other.isSetDomainName()); if (lastComparison != 0) { return lastComparison; } @@ -455,7 +467,7 @@ public int compareTo(MovingBoundaryIndexData other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(isSetTimeIndex()).compareTo(other.isSetTimeIndex()); + lastComparison = java.lang.Boolean.compare(isSetTimeIndex(), other.isSetTimeIndex()); if (lastComparison != 0) { return lastComparison; } @@ -465,7 +477,7 @@ public int compareTo(MovingBoundaryIndexData other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(isSetMovingBoundarySurfaceIndices()).compareTo(other.isSetMovingBoundarySurfaceIndices()); + lastComparison = java.lang.Boolean.compare(isSetMovingBoundarySurfaceIndices(), other.isSetMovingBoundarySurfaceIndices()); if (lastComparison != 0) { return lastComparison; } @@ -475,7 +487,7 @@ public int compareTo(MovingBoundaryIndexData other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(isSetMovingBoundaryVolumeIndices()).compareTo(other.isSetMovingBoundaryVolumeIndices()); + lastComparison = java.lang.Boolean.compare(isSetMovingBoundaryVolumeIndices(), other.isSetMovingBoundaryVolumeIndices()); if (lastComparison != 0) { return lastComparison; } @@ -488,14 +500,18 @@ public int compareTo(MovingBoundaryIndexData other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @@ -568,6 +584,7 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } private static class MovingBoundaryIndexDataStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public MovingBoundaryIndexDataStandardScheme getScheme() { return new MovingBoundaryIndexDataStandardScheme(); } @@ -575,6 +592,7 @@ public MovingBoundaryIndexDataStandardScheme getScheme() { private static class MovingBoundaryIndexDataStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, MovingBoundaryIndexData struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -606,7 +624,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, MovingBoundaryIndex { org.apache.thrift.protocol.TList _list72 = iprot.readListBegin(); struct.movingBoundarySurfaceIndices = new java.util.ArrayList(_list72.size); - MovingBoundarySurfaceIndex _elem73; + @org.apache.thrift.annotation.Nullable MovingBoundarySurfaceIndex _elem73; for (int _i74 = 0; _i74 < _list72.size; ++_i74) { _elem73 = new MovingBoundarySurfaceIndex(); @@ -625,7 +643,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, MovingBoundaryIndex { org.apache.thrift.protocol.TList _list75 = iprot.readListBegin(); struct.movingBoundaryVolumeIndices = new java.util.ArrayList(_list75.size); - MovingBoundaryVolumeIndex _elem76; + @org.apache.thrift.annotation.Nullable MovingBoundaryVolumeIndex _elem76; for (int _i77 = 0; _i77 < _list75.size; ++_i77) { _elem76 = new MovingBoundaryVolumeIndex(); @@ -653,6 +671,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, MovingBoundaryIndex struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, MovingBoundaryIndexData struct) throws org.apache.thrift.TException { struct.validate(); @@ -700,6 +719,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, MovingBoundaryInde } private static class MovingBoundaryIndexDataTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public MovingBoundaryIndexDataTupleScheme getScheme() { return new MovingBoundaryIndexDataTupleScheme(); } @@ -750,9 +770,9 @@ public void read(org.apache.thrift.protocol.TProtocol prot, MovingBoundaryIndexD java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list82 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + org.apache.thrift.protocol.TList _list82 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.movingBoundarySurfaceIndices = new java.util.ArrayList(_list82.size); - MovingBoundarySurfaceIndex _elem83; + @org.apache.thrift.annotation.Nullable MovingBoundarySurfaceIndex _elem83; for (int _i84 = 0; _i84 < _list82.size; ++_i84) { _elem83 = new MovingBoundarySurfaceIndex(); @@ -764,9 +784,9 @@ public void read(org.apache.thrift.protocol.TProtocol prot, MovingBoundaryIndexD } if (incoming.get(1)) { { - org.apache.thrift.protocol.TList _list85 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + org.apache.thrift.protocol.TList _list85 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.movingBoundaryVolumeIndices = new java.util.ArrayList(_list85.size); - MovingBoundaryVolumeIndex _elem86; + @org.apache.thrift.annotation.Nullable MovingBoundaryVolumeIndex _elem86; for (int _i87 = 0; _i87 < _list85.size; ++_i87) { _elem86 = new MovingBoundaryVolumeIndex(); diff --git a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/MovingBoundarySurfaceIndex.java b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/MovingBoundarySurfaceIndex.java index 640726a3c8..3352ced43f 100644 --- a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/MovingBoundarySurfaceIndex.java +++ b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/MovingBoundarySurfaceIndex.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.10.0) + * Autogenerated by Thrift Compiler (0.18.1) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -7,7 +7,7 @@ package org.vcell.vis.vismesh.thrift; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.18.1)") public class MovingBoundarySurfaceIndex implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("MovingBoundarySurfaceIndex"); @@ -33,6 +33,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // INDEX @@ -55,6 +56,7 @@ public static _Fields findByThriftIdOrThrow(int fieldId) { /** * Find the _Fields constant that matches name, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } @@ -67,10 +69,12 @@ public static _Fields findByName(java.lang.String name) { _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } + @Override public java.lang.String getFieldName() { return _fieldName; } @@ -107,6 +111,7 @@ public MovingBoundarySurfaceIndex(MovingBoundarySurfaceIndex other) { this.index = other.index; } + @Override public MovingBoundarySurfaceIndex deepCopy() { return new MovingBoundarySurfaceIndex(this); } @@ -140,7 +145,8 @@ public void setIndexIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __INDEX_ISSET_ID, value); } - public void setFieldValue(_Fields field, java.lang.Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case INDEX: if (value == null) { @@ -153,6 +159,8 @@ public void setFieldValue(_Fields field, java.lang.Object value) { } } + @org.apache.thrift.annotation.Nullable + @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case INDEX: @@ -163,6 +171,7 @@ public java.lang.Object getFieldValue(_Fields field) { } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); @@ -177,8 +186,6 @@ public boolean isSet(_Fields field) { @Override public boolean equals(java.lang.Object that) { - if (that == null) - return false; if (that instanceof MovingBoundarySurfaceIndex) return this.equals((MovingBoundarySurfaceIndex)that); return false; @@ -219,7 +226,7 @@ public int compareTo(MovingBoundarySurfaceIndex other) { int lastComparison = 0; - lastComparison = java.lang.Boolean.valueOf(isSetIndex()).compareTo(other.isSetIndex()); + lastComparison = java.lang.Boolean.compare(isSetIndex(), other.isSetIndex()); if (lastComparison != 0) { return lastComparison; } @@ -232,14 +239,18 @@ public int compareTo(MovingBoundarySurfaceIndex other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @@ -281,6 +292,7 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } private static class MovingBoundarySurfaceIndexStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public MovingBoundarySurfaceIndexStandardScheme getScheme() { return new MovingBoundarySurfaceIndexStandardScheme(); } @@ -288,6 +300,7 @@ public MovingBoundarySurfaceIndexStandardScheme getScheme() { private static class MovingBoundarySurfaceIndexStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, MovingBoundarySurfaceIndex struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -320,6 +333,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, MovingBoundarySurfa struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, MovingBoundarySurfaceIndex struct) throws org.apache.thrift.TException { struct.validate(); @@ -334,6 +348,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, MovingBoundarySurf } private static class MovingBoundarySurfaceIndexTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public MovingBoundarySurfaceIndexTupleScheme getScheme() { return new MovingBoundarySurfaceIndexTupleScheme(); } diff --git a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/MovingBoundaryVolumeIndex.java b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/MovingBoundaryVolumeIndex.java index 795407e04f..831571199c 100644 --- a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/MovingBoundaryVolumeIndex.java +++ b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/MovingBoundaryVolumeIndex.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.10.0) + * Autogenerated by Thrift Compiler (0.18.1) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -7,7 +7,7 @@ package org.vcell.vis.vismesh.thrift; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.18.1)") public class MovingBoundaryVolumeIndex implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("MovingBoundaryVolumeIndex"); @@ -33,6 +33,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // INDEX @@ -55,6 +56,7 @@ public static _Fields findByThriftIdOrThrow(int fieldId) { /** * Find the _Fields constant that matches name, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } @@ -67,10 +69,12 @@ public static _Fields findByName(java.lang.String name) { _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } + @Override public java.lang.String getFieldName() { return _fieldName; } @@ -107,6 +111,7 @@ public MovingBoundaryVolumeIndex(MovingBoundaryVolumeIndex other) { this.index = other.index; } + @Override public MovingBoundaryVolumeIndex deepCopy() { return new MovingBoundaryVolumeIndex(this); } @@ -140,7 +145,8 @@ public void setIndexIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __INDEX_ISSET_ID, value); } - public void setFieldValue(_Fields field, java.lang.Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case INDEX: if (value == null) { @@ -153,6 +159,8 @@ public void setFieldValue(_Fields field, java.lang.Object value) { } } + @org.apache.thrift.annotation.Nullable + @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case INDEX: @@ -163,6 +171,7 @@ public java.lang.Object getFieldValue(_Fields field) { } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); @@ -177,8 +186,6 @@ public boolean isSet(_Fields field) { @Override public boolean equals(java.lang.Object that) { - if (that == null) - return false; if (that instanceof MovingBoundaryVolumeIndex) return this.equals((MovingBoundaryVolumeIndex)that); return false; @@ -219,7 +226,7 @@ public int compareTo(MovingBoundaryVolumeIndex other) { int lastComparison = 0; - lastComparison = java.lang.Boolean.valueOf(isSetIndex()).compareTo(other.isSetIndex()); + lastComparison = java.lang.Boolean.compare(isSetIndex(), other.isSetIndex()); if (lastComparison != 0) { return lastComparison; } @@ -232,14 +239,18 @@ public int compareTo(MovingBoundaryVolumeIndex other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @@ -281,6 +292,7 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } private static class MovingBoundaryVolumeIndexStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public MovingBoundaryVolumeIndexStandardScheme getScheme() { return new MovingBoundaryVolumeIndexStandardScheme(); } @@ -288,6 +300,7 @@ public MovingBoundaryVolumeIndexStandardScheme getScheme() { private static class MovingBoundaryVolumeIndexStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, MovingBoundaryVolumeIndex struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -320,6 +333,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, MovingBoundaryVolum struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, MovingBoundaryVolumeIndex struct) throws org.apache.thrift.TException { struct.validate(); @@ -334,6 +348,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, MovingBoundaryVolu } private static class MovingBoundaryVolumeIndexTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public MovingBoundaryVolumeIndexTupleScheme getScheme() { return new MovingBoundaryVolumeIndexTupleScheme(); } diff --git a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/PolyhedronFace.java b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/PolyhedronFace.java index 6c2f18c3aa..1702075ec7 100644 --- a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/PolyhedronFace.java +++ b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/PolyhedronFace.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.10.0) + * Autogenerated by Thrift Compiler (0.18.1) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -7,7 +7,7 @@ package org.vcell.vis.vismesh.thrift; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.18.1)") public class PolyhedronFace implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PolyhedronFace"); @@ -16,7 +16,7 @@ public class PolyhedronFace implements org.apache.thrift.TBase vertices; // required + public @org.apache.thrift.annotation.Nullable java.util.List vertices; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -33,6 +33,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // VERTICES @@ -55,6 +56,7 @@ public static _Fields findByThriftIdOrThrow(int fieldId) { /** * Find the _Fields constant that matches name, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } @@ -67,10 +69,12 @@ public static _Fields findByName(java.lang.String name) { _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } + @Override public java.lang.String getFieldName() { return _fieldName; } @@ -109,6 +113,7 @@ public PolyhedronFace(PolyhedronFace other) { } } + @Override public PolyhedronFace deepCopy() { return new PolyhedronFace(this); } @@ -122,6 +127,7 @@ public int getVerticesSize() { return (this.vertices == null) ? 0 : this.vertices.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator getVerticesIterator() { return (this.vertices == null) ? null : this.vertices.iterator(); } @@ -133,11 +139,12 @@ public void addToVertices(int elem) { this.vertices.add(elem); } + @org.apache.thrift.annotation.Nullable public java.util.List getVertices() { return this.vertices; } - public PolyhedronFace setVertices(java.util.List vertices) { + public PolyhedronFace setVertices(@org.apache.thrift.annotation.Nullable java.util.List vertices) { this.vertices = vertices; return this; } @@ -157,7 +164,8 @@ public void setVerticesIsSet(boolean value) { } } - public void setFieldValue(_Fields field, java.lang.Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case VERTICES: if (value == null) { @@ -170,6 +178,8 @@ public void setFieldValue(_Fields field, java.lang.Object value) { } } + @org.apache.thrift.annotation.Nullable + @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case VERTICES: @@ -180,6 +190,7 @@ public java.lang.Object getFieldValue(_Fields field) { } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); @@ -194,8 +205,6 @@ public boolean isSet(_Fields field) { @Override public boolean equals(java.lang.Object that) { - if (that == null) - return false; if (that instanceof PolyhedronFace) return this.equals((PolyhedronFace)that); return false; @@ -238,7 +247,7 @@ public int compareTo(PolyhedronFace other) { int lastComparison = 0; - lastComparison = java.lang.Boolean.valueOf(isSetVertices()).compareTo(other.isSetVertices()); + lastComparison = java.lang.Boolean.compare(isSetVertices(), other.isSetVertices()); if (lastComparison != 0) { return lastComparison; } @@ -251,14 +260,18 @@ public int compareTo(PolyhedronFace other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @@ -304,6 +317,7 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } private static class PolyhedronFaceStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public PolyhedronFaceStandardScheme getScheme() { return new PolyhedronFaceStandardScheme(); } @@ -311,6 +325,7 @@ public PolyhedronFaceStandardScheme getScheme() { private static class PolyhedronFaceStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, PolyhedronFace struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -350,6 +365,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, PolyhedronFace stru struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, PolyhedronFace struct) throws org.apache.thrift.TException { struct.validate(); @@ -373,6 +389,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, PolyhedronFace str } private static class PolyhedronFaceTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public PolyhedronFaceTupleScheme getScheme() { return new PolyhedronFaceTupleScheme(); } @@ -396,7 +413,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, PolyhedronFace stru public void read(org.apache.thrift.protocol.TProtocol prot, PolyhedronFace struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; { - org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32()); + org.apache.thrift.protocol.TList _list13 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); struct.vertices = new java.util.ArrayList(_list13.size); int _elem14; for (int _i15 = 0; _i15 < _list13.size; ++_i15) diff --git a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/Vect3D.java b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/Vect3D.java index 4e087c0877..279111eae9 100644 --- a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/Vect3D.java +++ b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/Vect3D.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.10.0) + * Autogenerated by Thrift Compiler (0.18.1) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -7,7 +7,7 @@ package org.vcell.vis.vismesh.thrift; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.18.1)") public class Vect3D implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Vect3D"); @@ -39,6 +39,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // X @@ -65,6 +66,7 @@ public static _Fields findByThriftIdOrThrow(int fieldId) { /** * Find the _Fields constant that matches name, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } @@ -77,10 +79,12 @@ public static _Fields findByName(java.lang.String name) { _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } + @Override public java.lang.String getFieldName() { return _fieldName; } @@ -131,6 +135,7 @@ public Vect3D(Vect3D other) { this.z = other.z; } + @Override public Vect3D deepCopy() { return new Vect3D(this); } @@ -214,7 +219,8 @@ public void setZIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __Z_ISSET_ID, value); } - public void setFieldValue(_Fields field, java.lang.Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case X: if (value == null) { @@ -243,6 +249,8 @@ public void setFieldValue(_Fields field, java.lang.Object value) { } } + @org.apache.thrift.annotation.Nullable + @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case X: @@ -259,6 +267,7 @@ public java.lang.Object getFieldValue(_Fields field) { } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); @@ -277,8 +286,6 @@ public boolean isSet(_Fields field) { @Override public boolean equals(java.lang.Object that) { - if (that == null) - return false; if (that instanceof Vect3D) return this.equals((Vect3D)that); return false; @@ -341,7 +348,7 @@ public int compareTo(Vect3D other) { int lastComparison = 0; - lastComparison = java.lang.Boolean.valueOf(isSetX()).compareTo(other.isSetX()); + lastComparison = java.lang.Boolean.compare(isSetX(), other.isSetX()); if (lastComparison != 0) { return lastComparison; } @@ -351,7 +358,7 @@ public int compareTo(Vect3D other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(isSetY()).compareTo(other.isSetY()); + lastComparison = java.lang.Boolean.compare(isSetY(), other.isSetY()); if (lastComparison != 0) { return lastComparison; } @@ -361,7 +368,7 @@ public int compareTo(Vect3D other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(isSetZ()).compareTo(other.isSetZ()); + lastComparison = java.lang.Boolean.compare(isSetZ(), other.isSetZ()); if (lastComparison != 0) { return lastComparison; } @@ -374,14 +381,18 @@ public int compareTo(Vect3D other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @@ -433,6 +444,7 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } private static class Vect3DStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public Vect3DStandardScheme getScheme() { return new Vect3DStandardScheme(); } @@ -440,6 +452,7 @@ public Vect3DStandardScheme getScheme() { private static class Vect3DStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, Vect3D struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -494,6 +507,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, Vect3D struct) thro struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, Vect3D struct) throws org.apache.thrift.TException { struct.validate(); @@ -514,6 +528,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, Vect3D struct) thr } private static class Vect3DTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public Vect3DTupleScheme getScheme() { return new Vect3DTupleScheme(); } diff --git a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/VisIrregularPolyhedron.java b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/VisIrregularPolyhedron.java index 5b77038296..05f2bb9a77 100644 --- a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/VisIrregularPolyhedron.java +++ b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/VisIrregularPolyhedron.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.10.0) + * Autogenerated by Thrift Compiler (0.18.1) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -7,7 +7,7 @@ package org.vcell.vis.vismesh.thrift; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.18.1)") public class VisIrregularPolyhedron implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("VisIrregularPolyhedron"); @@ -18,9 +18,9 @@ public class VisIrregularPolyhedron implements org.apache.thrift.TBase polyhedronFaces; // required - public ChomboVolumeIndex chomboVolumeIndex; // optional - public FiniteVolumeIndex finiteVolumeIndex; // optional + public @org.apache.thrift.annotation.Nullable java.util.List polyhedronFaces; // required + public @org.apache.thrift.annotation.Nullable ChomboVolumeIndex chomboVolumeIndex; // optional + public @org.apache.thrift.annotation.Nullable FiniteVolumeIndex finiteVolumeIndex; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -39,6 +39,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // POLYHEDRON_FACES @@ -65,6 +66,7 @@ public static _Fields findByThriftIdOrThrow(int fieldId) { /** * Find the _Fields constant that matches name, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } @@ -77,10 +79,12 @@ public static _Fields findByName(java.lang.String name) { _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } + @Override public java.lang.String getFieldName() { return _fieldName; } @@ -130,6 +134,7 @@ public VisIrregularPolyhedron(VisIrregularPolyhedron other) { } } + @Override public VisIrregularPolyhedron deepCopy() { return new VisIrregularPolyhedron(this); } @@ -145,6 +150,7 @@ public int getPolyhedronFacesSize() { return (this.polyhedronFaces == null) ? 0 : this.polyhedronFaces.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator getPolyhedronFacesIterator() { return (this.polyhedronFaces == null) ? null : this.polyhedronFaces.iterator(); } @@ -156,11 +162,12 @@ public void addToPolyhedronFaces(PolyhedronFace elem) { this.polyhedronFaces.add(elem); } + @org.apache.thrift.annotation.Nullable public java.util.List getPolyhedronFaces() { return this.polyhedronFaces; } - public VisIrregularPolyhedron setPolyhedronFaces(java.util.List polyhedronFaces) { + public VisIrregularPolyhedron setPolyhedronFaces(@org.apache.thrift.annotation.Nullable java.util.List polyhedronFaces) { this.polyhedronFaces = polyhedronFaces; return this; } @@ -180,11 +187,12 @@ public void setPolyhedronFacesIsSet(boolean value) { } } + @org.apache.thrift.annotation.Nullable public ChomboVolumeIndex getChomboVolumeIndex() { return this.chomboVolumeIndex; } - public VisIrregularPolyhedron setChomboVolumeIndex(ChomboVolumeIndex chomboVolumeIndex) { + public VisIrregularPolyhedron setChomboVolumeIndex(@org.apache.thrift.annotation.Nullable ChomboVolumeIndex chomboVolumeIndex) { this.chomboVolumeIndex = chomboVolumeIndex; return this; } @@ -204,11 +212,12 @@ public void setChomboVolumeIndexIsSet(boolean value) { } } + @org.apache.thrift.annotation.Nullable public FiniteVolumeIndex getFiniteVolumeIndex() { return this.finiteVolumeIndex; } - public VisIrregularPolyhedron setFiniteVolumeIndex(FiniteVolumeIndex finiteVolumeIndex) { + public VisIrregularPolyhedron setFiniteVolumeIndex(@org.apache.thrift.annotation.Nullable FiniteVolumeIndex finiteVolumeIndex) { this.finiteVolumeIndex = finiteVolumeIndex; return this; } @@ -228,7 +237,8 @@ public void setFiniteVolumeIndexIsSet(boolean value) { } } - public void setFieldValue(_Fields field, java.lang.Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case POLYHEDRON_FACES: if (value == null) { @@ -257,6 +267,8 @@ public void setFieldValue(_Fields field, java.lang.Object value) { } } + @org.apache.thrift.annotation.Nullable + @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case POLYHEDRON_FACES: @@ -273,6 +285,7 @@ public java.lang.Object getFieldValue(_Fields field) { } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); @@ -291,8 +304,6 @@ public boolean isSet(_Fields field) { @Override public boolean equals(java.lang.Object that) { - if (that == null) - return false; if (that instanceof VisIrregularPolyhedron) return this.equals((VisIrregularPolyhedron)that); return false; @@ -361,7 +372,7 @@ public int compareTo(VisIrregularPolyhedron other) { int lastComparison = 0; - lastComparison = java.lang.Boolean.valueOf(isSetPolyhedronFaces()).compareTo(other.isSetPolyhedronFaces()); + lastComparison = java.lang.Boolean.compare(isSetPolyhedronFaces(), other.isSetPolyhedronFaces()); if (lastComparison != 0) { return lastComparison; } @@ -371,7 +382,7 @@ public int compareTo(VisIrregularPolyhedron other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(isSetChomboVolumeIndex()).compareTo(other.isSetChomboVolumeIndex()); + lastComparison = java.lang.Boolean.compare(isSetChomboVolumeIndex(), other.isSetChomboVolumeIndex()); if (lastComparison != 0) { return lastComparison; } @@ -381,7 +392,7 @@ public int compareTo(VisIrregularPolyhedron other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(isSetFiniteVolumeIndex()).compareTo(other.isSetFiniteVolumeIndex()); + lastComparison = java.lang.Boolean.compare(isSetFiniteVolumeIndex(), other.isSetFiniteVolumeIndex()); if (lastComparison != 0) { return lastComparison; } @@ -394,14 +405,18 @@ public int compareTo(VisIrregularPolyhedron other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @@ -473,6 +488,7 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } private static class VisIrregularPolyhedronStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public VisIrregularPolyhedronStandardScheme getScheme() { return new VisIrregularPolyhedronStandardScheme(); } @@ -480,6 +496,7 @@ public VisIrregularPolyhedronStandardScheme getScheme() { private static class VisIrregularPolyhedronStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, VisIrregularPolyhedron struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -495,7 +512,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, VisIrregularPolyhed { org.apache.thrift.protocol.TList _list16 = iprot.readListBegin(); struct.polyhedronFaces = new java.util.ArrayList(_list16.size); - PolyhedronFace _elem17; + @org.apache.thrift.annotation.Nullable PolyhedronFace _elem17; for (int _i18 = 0; _i18 < _list16.size; ++_i18) { _elem17 = new PolyhedronFace(); @@ -538,6 +555,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, VisIrregularPolyhed struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, VisIrregularPolyhedron struct) throws org.apache.thrift.TException { struct.validate(); @@ -575,6 +593,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, VisIrregularPolyhe } private static class VisIrregularPolyhedronTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public VisIrregularPolyhedronTupleScheme getScheme() { return new VisIrregularPolyhedronTupleScheme(); } @@ -612,9 +631,9 @@ public void write(org.apache.thrift.protocol.TProtocol prot, VisIrregularPolyhed public void read(org.apache.thrift.protocol.TProtocol prot, VisIrregularPolyhedron struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; { - org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + org.apache.thrift.protocol.TList _list21 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.polyhedronFaces = new java.util.ArrayList(_list21.size); - PolyhedronFace _elem22; + @org.apache.thrift.annotation.Nullable PolyhedronFace _elem22; for (int _i23 = 0; _i23 < _list21.size; ++_i23) { _elem22 = new PolyhedronFace(); diff --git a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/VisLine.java b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/VisLine.java index 832ded9bd3..8c2abedf41 100644 --- a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/VisLine.java +++ b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/VisLine.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.10.0) + * Autogenerated by Thrift Compiler (0.18.1) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -7,7 +7,7 @@ package org.vcell.vis.vismesh.thrift; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.18.1)") public class VisLine implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("VisLine"); @@ -22,9 +22,9 @@ public class VisLine implements org.apache.thrift.TBase { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, VisLine struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -687,6 +703,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, VisLine struct) thr struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, VisLine struct) throws org.apache.thrift.TException { struct.validate(); @@ -725,6 +742,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, VisLine struct) th } private static class VisLineTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public VisLineTupleScheme getScheme() { return new VisLineTupleScheme(); } diff --git a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/VisMesh.java b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/VisMesh.java index e94dcffcda..9b177797e3 100644 --- a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/VisMesh.java +++ b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/VisMesh.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.10.0) + * Autogenerated by Thrift Compiler (0.18.1) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -7,7 +7,7 @@ package org.vcell.vis.vismesh.thrift; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.18.1)") public class VisMesh implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("VisMesh"); @@ -27,16 +27,16 @@ public class VisMesh implements org.apache.thrift.TBase points; // optional - public java.util.List polygons; // optional - public java.util.List irregularPolyhedra; // optional - public java.util.List tetrahedra; // optional - public java.util.List visVoxels; // optional - public java.util.List surfaceTriangles; // optional - public java.util.List visLines; // optional - public java.util.List surfacePoints; // optional + public @org.apache.thrift.annotation.Nullable Vect3D origin; // required + public @org.apache.thrift.annotation.Nullable Vect3D extent; // required + public @org.apache.thrift.annotation.Nullable java.util.List points; // optional + public @org.apache.thrift.annotation.Nullable java.util.List polygons; // optional + public @org.apache.thrift.annotation.Nullable java.util.List irregularPolyhedra; // optional + public @org.apache.thrift.annotation.Nullable java.util.List tetrahedra; // optional + public @org.apache.thrift.annotation.Nullable java.util.List visVoxels; // optional + public @org.apache.thrift.annotation.Nullable java.util.List surfaceTriangles; // optional + public @org.apache.thrift.annotation.Nullable java.util.List visLines; // optional + public @org.apache.thrift.annotation.Nullable java.util.List surfacePoints; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -63,6 +63,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // DIMENSION @@ -105,6 +106,7 @@ public static _Fields findByThriftIdOrThrow(int fieldId) { /** * Find the _Fields constant that matches name, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } @@ -117,10 +119,12 @@ public static _Fields findByName(java.lang.String name) { _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } + @Override public java.lang.String getFieldName() { return _fieldName; } @@ -244,6 +248,7 @@ public VisMesh(VisMesh other) { } } + @Override public VisMesh deepCopy() { return new VisMesh(this); } @@ -287,11 +292,12 @@ public void setDimensionIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DIMENSION_ISSET_ID, value); } + @org.apache.thrift.annotation.Nullable public Vect3D getOrigin() { return this.origin; } - public VisMesh setOrigin(Vect3D origin) { + public VisMesh setOrigin(@org.apache.thrift.annotation.Nullable Vect3D origin) { this.origin = origin; return this; } @@ -311,11 +317,12 @@ public void setOriginIsSet(boolean value) { } } + @org.apache.thrift.annotation.Nullable public Vect3D getExtent() { return this.extent; } - public VisMesh setExtent(Vect3D extent) { + public VisMesh setExtent(@org.apache.thrift.annotation.Nullable Vect3D extent) { this.extent = extent; return this; } @@ -339,6 +346,7 @@ public int getPointsSize() { return (this.points == null) ? 0 : this.points.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator getPointsIterator() { return (this.points == null) ? null : this.points.iterator(); } @@ -350,11 +358,12 @@ public void addToPoints(VisPoint elem) { this.points.add(elem); } + @org.apache.thrift.annotation.Nullable public java.util.List getPoints() { return this.points; } - public VisMesh setPoints(java.util.List points) { + public VisMesh setPoints(@org.apache.thrift.annotation.Nullable java.util.List points) { this.points = points; return this; } @@ -378,6 +387,7 @@ public int getPolygonsSize() { return (this.polygons == null) ? 0 : this.polygons.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator getPolygonsIterator() { return (this.polygons == null) ? null : this.polygons.iterator(); } @@ -389,11 +399,12 @@ public void addToPolygons(VisPolygon elem) { this.polygons.add(elem); } + @org.apache.thrift.annotation.Nullable public java.util.List getPolygons() { return this.polygons; } - public VisMesh setPolygons(java.util.List polygons) { + public VisMesh setPolygons(@org.apache.thrift.annotation.Nullable java.util.List polygons) { this.polygons = polygons; return this; } @@ -417,6 +428,7 @@ public int getIrregularPolyhedraSize() { return (this.irregularPolyhedra == null) ? 0 : this.irregularPolyhedra.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator getIrregularPolyhedraIterator() { return (this.irregularPolyhedra == null) ? null : this.irregularPolyhedra.iterator(); } @@ -428,11 +440,12 @@ public void addToIrregularPolyhedra(VisIrregularPolyhedron elem) { this.irregularPolyhedra.add(elem); } + @org.apache.thrift.annotation.Nullable public java.util.List getIrregularPolyhedra() { return this.irregularPolyhedra; } - public VisMesh setIrregularPolyhedra(java.util.List irregularPolyhedra) { + public VisMesh setIrregularPolyhedra(@org.apache.thrift.annotation.Nullable java.util.List irregularPolyhedra) { this.irregularPolyhedra = irregularPolyhedra; return this; } @@ -456,6 +469,7 @@ public int getTetrahedraSize() { return (this.tetrahedra == null) ? 0 : this.tetrahedra.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator getTetrahedraIterator() { return (this.tetrahedra == null) ? null : this.tetrahedra.iterator(); } @@ -467,11 +481,12 @@ public void addToTetrahedra(VisTetrahedron elem) { this.tetrahedra.add(elem); } + @org.apache.thrift.annotation.Nullable public java.util.List getTetrahedra() { return this.tetrahedra; } - public VisMesh setTetrahedra(java.util.List tetrahedra) { + public VisMesh setTetrahedra(@org.apache.thrift.annotation.Nullable java.util.List tetrahedra) { this.tetrahedra = tetrahedra; return this; } @@ -495,6 +510,7 @@ public int getVisVoxelsSize() { return (this.visVoxels == null) ? 0 : this.visVoxels.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator getVisVoxelsIterator() { return (this.visVoxels == null) ? null : this.visVoxels.iterator(); } @@ -506,11 +522,12 @@ public void addToVisVoxels(VisVoxel elem) { this.visVoxels.add(elem); } + @org.apache.thrift.annotation.Nullable public java.util.List getVisVoxels() { return this.visVoxels; } - public VisMesh setVisVoxels(java.util.List visVoxels) { + public VisMesh setVisVoxels(@org.apache.thrift.annotation.Nullable java.util.List visVoxels) { this.visVoxels = visVoxels; return this; } @@ -534,6 +551,7 @@ public int getSurfaceTrianglesSize() { return (this.surfaceTriangles == null) ? 0 : this.surfaceTriangles.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator getSurfaceTrianglesIterator() { return (this.surfaceTriangles == null) ? null : this.surfaceTriangles.iterator(); } @@ -545,11 +563,12 @@ public void addToSurfaceTriangles(VisSurfaceTriangle elem) { this.surfaceTriangles.add(elem); } + @org.apache.thrift.annotation.Nullable public java.util.List getSurfaceTriangles() { return this.surfaceTriangles; } - public VisMesh setSurfaceTriangles(java.util.List surfaceTriangles) { + public VisMesh setSurfaceTriangles(@org.apache.thrift.annotation.Nullable java.util.List surfaceTriangles) { this.surfaceTriangles = surfaceTriangles; return this; } @@ -573,6 +592,7 @@ public int getVisLinesSize() { return (this.visLines == null) ? 0 : this.visLines.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator getVisLinesIterator() { return (this.visLines == null) ? null : this.visLines.iterator(); } @@ -584,11 +604,12 @@ public void addToVisLines(VisLine elem) { this.visLines.add(elem); } + @org.apache.thrift.annotation.Nullable public java.util.List getVisLines() { return this.visLines; } - public VisMesh setVisLines(java.util.List visLines) { + public VisMesh setVisLines(@org.apache.thrift.annotation.Nullable java.util.List visLines) { this.visLines = visLines; return this; } @@ -612,6 +633,7 @@ public int getSurfacePointsSize() { return (this.surfacePoints == null) ? 0 : this.surfacePoints.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator getSurfacePointsIterator() { return (this.surfacePoints == null) ? null : this.surfacePoints.iterator(); } @@ -623,11 +645,12 @@ public void addToSurfacePoints(VisPoint elem) { this.surfacePoints.add(elem); } + @org.apache.thrift.annotation.Nullable public java.util.List getSurfacePoints() { return this.surfacePoints; } - public VisMesh setSurfacePoints(java.util.List surfacePoints) { + public VisMesh setSurfacePoints(@org.apache.thrift.annotation.Nullable java.util.List surfacePoints) { this.surfacePoints = surfacePoints; return this; } @@ -647,7 +670,8 @@ public void setSurfacePointsIsSet(boolean value) { } } - public void setFieldValue(_Fields field, java.lang.Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case DIMENSION: if (value == null) { @@ -740,6 +764,8 @@ public void setFieldValue(_Fields field, java.lang.Object value) { } } + @org.apache.thrift.annotation.Nullable + @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case DIMENSION: @@ -780,6 +806,7 @@ public java.lang.Object getFieldValue(_Fields field) { } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); @@ -814,8 +841,6 @@ public boolean isSet(_Fields field) { @Override public boolean equals(java.lang.Object that) { - if (that == null) - return false; if (that instanceof VisMesh) return this.equals((VisMesh)that); return false; @@ -986,7 +1011,7 @@ public int compareTo(VisMesh other) { int lastComparison = 0; - lastComparison = java.lang.Boolean.valueOf(isSetDimension()).compareTo(other.isSetDimension()); + lastComparison = java.lang.Boolean.compare(isSetDimension(), other.isSetDimension()); if (lastComparison != 0) { return lastComparison; } @@ -996,7 +1021,7 @@ public int compareTo(VisMesh other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(isSetOrigin()).compareTo(other.isSetOrigin()); + lastComparison = java.lang.Boolean.compare(isSetOrigin(), other.isSetOrigin()); if (lastComparison != 0) { return lastComparison; } @@ -1006,7 +1031,7 @@ public int compareTo(VisMesh other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(isSetExtent()).compareTo(other.isSetExtent()); + lastComparison = java.lang.Boolean.compare(isSetExtent(), other.isSetExtent()); if (lastComparison != 0) { return lastComparison; } @@ -1016,7 +1041,7 @@ public int compareTo(VisMesh other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(isSetPoints()).compareTo(other.isSetPoints()); + lastComparison = java.lang.Boolean.compare(isSetPoints(), other.isSetPoints()); if (lastComparison != 0) { return lastComparison; } @@ -1026,7 +1051,7 @@ public int compareTo(VisMesh other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(isSetPolygons()).compareTo(other.isSetPolygons()); + lastComparison = java.lang.Boolean.compare(isSetPolygons(), other.isSetPolygons()); if (lastComparison != 0) { return lastComparison; } @@ -1036,7 +1061,7 @@ public int compareTo(VisMesh other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(isSetIrregularPolyhedra()).compareTo(other.isSetIrregularPolyhedra()); + lastComparison = java.lang.Boolean.compare(isSetIrregularPolyhedra(), other.isSetIrregularPolyhedra()); if (lastComparison != 0) { return lastComparison; } @@ -1046,7 +1071,7 @@ public int compareTo(VisMesh other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(isSetTetrahedra()).compareTo(other.isSetTetrahedra()); + lastComparison = java.lang.Boolean.compare(isSetTetrahedra(), other.isSetTetrahedra()); if (lastComparison != 0) { return lastComparison; } @@ -1056,7 +1081,7 @@ public int compareTo(VisMesh other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(isSetVisVoxels()).compareTo(other.isSetVisVoxels()); + lastComparison = java.lang.Boolean.compare(isSetVisVoxels(), other.isSetVisVoxels()); if (lastComparison != 0) { return lastComparison; } @@ -1066,7 +1091,7 @@ public int compareTo(VisMesh other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(isSetSurfaceTriangles()).compareTo(other.isSetSurfaceTriangles()); + lastComparison = java.lang.Boolean.compare(isSetSurfaceTriangles(), other.isSetSurfaceTriangles()); if (lastComparison != 0) { return lastComparison; } @@ -1076,7 +1101,7 @@ public int compareTo(VisMesh other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(isSetVisLines()).compareTo(other.isSetVisLines()); + lastComparison = java.lang.Boolean.compare(isSetVisLines(), other.isSetVisLines()); if (lastComparison != 0) { return lastComparison; } @@ -1086,7 +1111,7 @@ public int compareTo(VisMesh other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(isSetSurfacePoints()).compareTo(other.isSetSurfacePoints()); + lastComparison = java.lang.Boolean.compare(isSetSurfacePoints(), other.isSetSurfacePoints()); if (lastComparison != 0) { return lastComparison; } @@ -1099,14 +1124,18 @@ public int compareTo(VisMesh other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @@ -1256,6 +1285,7 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } private static class VisMeshStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public VisMeshStandardScheme getScheme() { return new VisMeshStandardScheme(); } @@ -1263,6 +1293,7 @@ public VisMeshStandardScheme getScheme() { private static class VisMeshStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, VisMesh struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -1304,7 +1335,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, VisMesh struct) thr { org.apache.thrift.protocol.TList _list88 = iprot.readListBegin(); struct.points = new java.util.ArrayList(_list88.size); - VisPoint _elem89; + @org.apache.thrift.annotation.Nullable VisPoint _elem89; for (int _i90 = 0; _i90 < _list88.size; ++_i90) { _elem89 = new VisPoint(); @@ -1323,7 +1354,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, VisMesh struct) thr { org.apache.thrift.protocol.TList _list91 = iprot.readListBegin(); struct.polygons = new java.util.ArrayList(_list91.size); - VisPolygon _elem92; + @org.apache.thrift.annotation.Nullable VisPolygon _elem92; for (int _i93 = 0; _i93 < _list91.size; ++_i93) { _elem92 = new VisPolygon(); @@ -1342,7 +1373,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, VisMesh struct) thr { org.apache.thrift.protocol.TList _list94 = iprot.readListBegin(); struct.irregularPolyhedra = new java.util.ArrayList(_list94.size); - VisIrregularPolyhedron _elem95; + @org.apache.thrift.annotation.Nullable VisIrregularPolyhedron _elem95; for (int _i96 = 0; _i96 < _list94.size; ++_i96) { _elem95 = new VisIrregularPolyhedron(); @@ -1361,7 +1392,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, VisMesh struct) thr { org.apache.thrift.protocol.TList _list97 = iprot.readListBegin(); struct.tetrahedra = new java.util.ArrayList(_list97.size); - VisTetrahedron _elem98; + @org.apache.thrift.annotation.Nullable VisTetrahedron _elem98; for (int _i99 = 0; _i99 < _list97.size; ++_i99) { _elem98 = new VisTetrahedron(); @@ -1380,7 +1411,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, VisMesh struct) thr { org.apache.thrift.protocol.TList _list100 = iprot.readListBegin(); struct.visVoxels = new java.util.ArrayList(_list100.size); - VisVoxel _elem101; + @org.apache.thrift.annotation.Nullable VisVoxel _elem101; for (int _i102 = 0; _i102 < _list100.size; ++_i102) { _elem101 = new VisVoxel(); @@ -1399,7 +1430,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, VisMesh struct) thr { org.apache.thrift.protocol.TList _list103 = iprot.readListBegin(); struct.surfaceTriangles = new java.util.ArrayList(_list103.size); - VisSurfaceTriangle _elem104; + @org.apache.thrift.annotation.Nullable VisSurfaceTriangle _elem104; for (int _i105 = 0; _i105 < _list103.size; ++_i105) { _elem104 = new VisSurfaceTriangle(); @@ -1418,7 +1449,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, VisMesh struct) thr { org.apache.thrift.protocol.TList _list106 = iprot.readListBegin(); struct.visLines = new java.util.ArrayList(_list106.size); - VisLine _elem107; + @org.apache.thrift.annotation.Nullable VisLine _elem107; for (int _i108 = 0; _i108 < _list106.size; ++_i108) { _elem107 = new VisLine(); @@ -1437,7 +1468,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, VisMesh struct) thr { org.apache.thrift.protocol.TList _list109 = iprot.readListBegin(); struct.surfacePoints = new java.util.ArrayList(_list109.size); - VisPoint _elem110; + @org.apache.thrift.annotation.Nullable VisPoint _elem110; for (int _i111 = 0; _i111 < _list109.size; ++_i111) { _elem110 = new VisPoint(); @@ -1465,6 +1496,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, VisMesh struct) thr struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, VisMesh struct) throws org.apache.thrift.TException { struct.validate(); @@ -1601,6 +1633,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, VisMesh struct) th } private static class VisMeshTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public VisMeshTupleScheme getScheme() { return new VisMeshTupleScheme(); } @@ -1728,9 +1761,9 @@ public void read(org.apache.thrift.protocol.TProtocol prot, VisMesh struct) thro java.util.BitSet incoming = iprot.readBitSet(8); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list128 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + org.apache.thrift.protocol.TList _list128 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.points = new java.util.ArrayList(_list128.size); - VisPoint _elem129; + @org.apache.thrift.annotation.Nullable VisPoint _elem129; for (int _i130 = 0; _i130 < _list128.size; ++_i130) { _elem129 = new VisPoint(); @@ -1742,9 +1775,9 @@ public void read(org.apache.thrift.protocol.TProtocol prot, VisMesh struct) thro } if (incoming.get(1)) { { - org.apache.thrift.protocol.TList _list131 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + org.apache.thrift.protocol.TList _list131 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.polygons = new java.util.ArrayList(_list131.size); - VisPolygon _elem132; + @org.apache.thrift.annotation.Nullable VisPolygon _elem132; for (int _i133 = 0; _i133 < _list131.size; ++_i133) { _elem132 = new VisPolygon(); @@ -1756,9 +1789,9 @@ public void read(org.apache.thrift.protocol.TProtocol prot, VisMesh struct) thro } if (incoming.get(2)) { { - org.apache.thrift.protocol.TList _list134 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + org.apache.thrift.protocol.TList _list134 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.irregularPolyhedra = new java.util.ArrayList(_list134.size); - VisIrregularPolyhedron _elem135; + @org.apache.thrift.annotation.Nullable VisIrregularPolyhedron _elem135; for (int _i136 = 0; _i136 < _list134.size; ++_i136) { _elem135 = new VisIrregularPolyhedron(); @@ -1770,9 +1803,9 @@ public void read(org.apache.thrift.protocol.TProtocol prot, VisMesh struct) thro } if (incoming.get(3)) { { - org.apache.thrift.protocol.TList _list137 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + org.apache.thrift.protocol.TList _list137 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.tetrahedra = new java.util.ArrayList(_list137.size); - VisTetrahedron _elem138; + @org.apache.thrift.annotation.Nullable VisTetrahedron _elem138; for (int _i139 = 0; _i139 < _list137.size; ++_i139) { _elem138 = new VisTetrahedron(); @@ -1784,9 +1817,9 @@ public void read(org.apache.thrift.protocol.TProtocol prot, VisMesh struct) thro } if (incoming.get(4)) { { - org.apache.thrift.protocol.TList _list140 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + org.apache.thrift.protocol.TList _list140 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.visVoxels = new java.util.ArrayList(_list140.size); - VisVoxel _elem141; + @org.apache.thrift.annotation.Nullable VisVoxel _elem141; for (int _i142 = 0; _i142 < _list140.size; ++_i142) { _elem141 = new VisVoxel(); @@ -1798,9 +1831,9 @@ public void read(org.apache.thrift.protocol.TProtocol prot, VisMesh struct) thro } if (incoming.get(5)) { { - org.apache.thrift.protocol.TList _list143 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + org.apache.thrift.protocol.TList _list143 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.surfaceTriangles = new java.util.ArrayList(_list143.size); - VisSurfaceTriangle _elem144; + @org.apache.thrift.annotation.Nullable VisSurfaceTriangle _elem144; for (int _i145 = 0; _i145 < _list143.size; ++_i145) { _elem144 = new VisSurfaceTriangle(); @@ -1812,9 +1845,9 @@ public void read(org.apache.thrift.protocol.TProtocol prot, VisMesh struct) thro } if (incoming.get(6)) { { - org.apache.thrift.protocol.TList _list146 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + org.apache.thrift.protocol.TList _list146 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.visLines = new java.util.ArrayList(_list146.size); - VisLine _elem147; + @org.apache.thrift.annotation.Nullable VisLine _elem147; for (int _i148 = 0; _i148 < _list146.size; ++_i148) { _elem147 = new VisLine(); @@ -1826,9 +1859,9 @@ public void read(org.apache.thrift.protocol.TProtocol prot, VisMesh struct) thro } if (incoming.get(7)) { { - org.apache.thrift.protocol.TList _list149 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + org.apache.thrift.protocol.TList _list149 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.surfacePoints = new java.util.ArrayList(_list149.size); - VisPoint _elem150; + @org.apache.thrift.annotation.Nullable VisPoint _elem150; for (int _i151 = 0; _i151 < _list149.size; ++_i151) { _elem150 = new VisPoint(); diff --git a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/VisPoint.java b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/VisPoint.java index d3c7153636..41e4ecb1eb 100644 --- a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/VisPoint.java +++ b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/VisPoint.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.10.0) + * Autogenerated by Thrift Compiler (0.18.1) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -7,7 +7,7 @@ package org.vcell.vis.vismesh.thrift; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.18.1)") public class VisPoint implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("VisPoint"); @@ -39,6 +39,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // X @@ -65,6 +66,7 @@ public static _Fields findByThriftIdOrThrow(int fieldId) { /** * Find the _Fields constant that matches name, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } @@ -77,10 +79,12 @@ public static _Fields findByName(java.lang.String name) { _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } + @Override public java.lang.String getFieldName() { return _fieldName; } @@ -131,6 +135,7 @@ public VisPoint(VisPoint other) { this.z = other.z; } + @Override public VisPoint deepCopy() { return new VisPoint(this); } @@ -214,7 +219,8 @@ public void setZIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __Z_ISSET_ID, value); } - public void setFieldValue(_Fields field, java.lang.Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case X: if (value == null) { @@ -243,6 +249,8 @@ public void setFieldValue(_Fields field, java.lang.Object value) { } } + @org.apache.thrift.annotation.Nullable + @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case X: @@ -259,6 +267,7 @@ public java.lang.Object getFieldValue(_Fields field) { } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); @@ -277,8 +286,6 @@ public boolean isSet(_Fields field) { @Override public boolean equals(java.lang.Object that) { - if (that == null) - return false; if (that instanceof VisPoint) return this.equals((VisPoint)that); return false; @@ -341,7 +348,7 @@ public int compareTo(VisPoint other) { int lastComparison = 0; - lastComparison = java.lang.Boolean.valueOf(isSetX()).compareTo(other.isSetX()); + lastComparison = java.lang.Boolean.compare(isSetX(), other.isSetX()); if (lastComparison != 0) { return lastComparison; } @@ -351,7 +358,7 @@ public int compareTo(VisPoint other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(isSetY()).compareTo(other.isSetY()); + lastComparison = java.lang.Boolean.compare(isSetY(), other.isSetY()); if (lastComparison != 0) { return lastComparison; } @@ -361,7 +368,7 @@ public int compareTo(VisPoint other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(isSetZ()).compareTo(other.isSetZ()); + lastComparison = java.lang.Boolean.compare(isSetZ(), other.isSetZ()); if (lastComparison != 0) { return lastComparison; } @@ -374,14 +381,18 @@ public int compareTo(VisPoint other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @@ -433,6 +444,7 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } private static class VisPointStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public VisPointStandardScheme getScheme() { return new VisPointStandardScheme(); } @@ -440,6 +452,7 @@ public VisPointStandardScheme getScheme() { private static class VisPointStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, VisPoint struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -494,6 +507,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, VisPoint struct) th struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, VisPoint struct) throws org.apache.thrift.TException { struct.validate(); @@ -514,6 +528,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, VisPoint struct) t } private static class VisPointTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public VisPointTupleScheme getScheme() { return new VisPointTupleScheme(); } diff --git a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/VisPolygon.java b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/VisPolygon.java index 970b3db1c2..4dfb8ffbc6 100644 --- a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/VisPolygon.java +++ b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/VisPolygon.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.10.0) + * Autogenerated by Thrift Compiler (0.18.1) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -7,7 +7,7 @@ package org.vcell.vis.vismesh.thrift; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.18.1)") public class VisPolygon implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("VisPolygon"); @@ -19,10 +19,10 @@ public class VisPolygon implements org.apache.thrift.TBase pointIndices; // required - public ChomboVolumeIndex chomboVolumeIndex; // optional - public FiniteVolumeIndex finiteVolumeIndex; // optional - public MovingBoundaryVolumeIndex movingBoundaryVolumeIndex; // optional + public @org.apache.thrift.annotation.Nullable java.util.List pointIndices; // required + public @org.apache.thrift.annotation.Nullable ChomboVolumeIndex chomboVolumeIndex; // optional + public @org.apache.thrift.annotation.Nullable FiniteVolumeIndex finiteVolumeIndex; // optional + public @org.apache.thrift.annotation.Nullable MovingBoundaryVolumeIndex movingBoundaryVolumeIndex; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -42,6 +42,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // POINT_INDICES @@ -70,6 +71,7 @@ public static _Fields findByThriftIdOrThrow(int fieldId) { /** * Find the _Fields constant that matches name, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } @@ -82,10 +84,12 @@ public static _Fields findByName(java.lang.String name) { _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } + @Override public java.lang.String getFieldName() { return _fieldName; } @@ -140,6 +144,7 @@ public VisPolygon(VisPolygon other) { } } + @Override public VisPolygon deepCopy() { return new VisPolygon(this); } @@ -156,6 +161,7 @@ public int getPointIndicesSize() { return (this.pointIndices == null) ? 0 : this.pointIndices.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator getPointIndicesIterator() { return (this.pointIndices == null) ? null : this.pointIndices.iterator(); } @@ -167,11 +173,12 @@ public void addToPointIndices(int elem) { this.pointIndices.add(elem); } + @org.apache.thrift.annotation.Nullable public java.util.List getPointIndices() { return this.pointIndices; } - public VisPolygon setPointIndices(java.util.List pointIndices) { + public VisPolygon setPointIndices(@org.apache.thrift.annotation.Nullable java.util.List pointIndices) { this.pointIndices = pointIndices; return this; } @@ -191,11 +198,12 @@ public void setPointIndicesIsSet(boolean value) { } } + @org.apache.thrift.annotation.Nullable public ChomboVolumeIndex getChomboVolumeIndex() { return this.chomboVolumeIndex; } - public VisPolygon setChomboVolumeIndex(ChomboVolumeIndex chomboVolumeIndex) { + public VisPolygon setChomboVolumeIndex(@org.apache.thrift.annotation.Nullable ChomboVolumeIndex chomboVolumeIndex) { this.chomboVolumeIndex = chomboVolumeIndex; return this; } @@ -215,11 +223,12 @@ public void setChomboVolumeIndexIsSet(boolean value) { } } + @org.apache.thrift.annotation.Nullable public FiniteVolumeIndex getFiniteVolumeIndex() { return this.finiteVolumeIndex; } - public VisPolygon setFiniteVolumeIndex(FiniteVolumeIndex finiteVolumeIndex) { + public VisPolygon setFiniteVolumeIndex(@org.apache.thrift.annotation.Nullable FiniteVolumeIndex finiteVolumeIndex) { this.finiteVolumeIndex = finiteVolumeIndex; return this; } @@ -239,11 +248,12 @@ public void setFiniteVolumeIndexIsSet(boolean value) { } } + @org.apache.thrift.annotation.Nullable public MovingBoundaryVolumeIndex getMovingBoundaryVolumeIndex() { return this.movingBoundaryVolumeIndex; } - public VisPolygon setMovingBoundaryVolumeIndex(MovingBoundaryVolumeIndex movingBoundaryVolumeIndex) { + public VisPolygon setMovingBoundaryVolumeIndex(@org.apache.thrift.annotation.Nullable MovingBoundaryVolumeIndex movingBoundaryVolumeIndex) { this.movingBoundaryVolumeIndex = movingBoundaryVolumeIndex; return this; } @@ -263,7 +273,8 @@ public void setMovingBoundaryVolumeIndexIsSet(boolean value) { } } - public void setFieldValue(_Fields field, java.lang.Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case POINT_INDICES: if (value == null) { @@ -300,6 +311,8 @@ public void setFieldValue(_Fields field, java.lang.Object value) { } } + @org.apache.thrift.annotation.Nullable + @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case POINT_INDICES: @@ -319,6 +332,7 @@ public java.lang.Object getFieldValue(_Fields field) { } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); @@ -339,8 +353,6 @@ public boolean isSet(_Fields field) { @Override public boolean equals(java.lang.Object that) { - if (that == null) - return false; if (that instanceof VisPolygon) return this.equals((VisPolygon)that); return false; @@ -422,7 +434,7 @@ public int compareTo(VisPolygon other) { int lastComparison = 0; - lastComparison = java.lang.Boolean.valueOf(isSetPointIndices()).compareTo(other.isSetPointIndices()); + lastComparison = java.lang.Boolean.compare(isSetPointIndices(), other.isSetPointIndices()); if (lastComparison != 0) { return lastComparison; } @@ -432,7 +444,7 @@ public int compareTo(VisPolygon other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(isSetChomboVolumeIndex()).compareTo(other.isSetChomboVolumeIndex()); + lastComparison = java.lang.Boolean.compare(isSetChomboVolumeIndex(), other.isSetChomboVolumeIndex()); if (lastComparison != 0) { return lastComparison; } @@ -442,7 +454,7 @@ public int compareTo(VisPolygon other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(isSetFiniteVolumeIndex()).compareTo(other.isSetFiniteVolumeIndex()); + lastComparison = java.lang.Boolean.compare(isSetFiniteVolumeIndex(), other.isSetFiniteVolumeIndex()); if (lastComparison != 0) { return lastComparison; } @@ -452,7 +464,7 @@ public int compareTo(VisPolygon other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(isSetMovingBoundaryVolumeIndex()).compareTo(other.isSetMovingBoundaryVolumeIndex()); + lastComparison = java.lang.Boolean.compare(isSetMovingBoundaryVolumeIndex(), other.isSetMovingBoundaryVolumeIndex()); if (lastComparison != 0) { return lastComparison; } @@ -465,14 +477,18 @@ public int compareTo(VisPolygon other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @@ -557,6 +573,7 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } private static class VisPolygonStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public VisPolygonStandardScheme getScheme() { return new VisPolygonStandardScheme(); } @@ -564,6 +581,7 @@ public VisPolygonStandardScheme getScheme() { private static class VisPolygonStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, VisPolygon struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -630,6 +648,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, VisPolygon struct) struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, VisPolygon struct) throws org.apache.thrift.TException { struct.validate(); @@ -674,6 +693,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, VisPolygon struct) } private static class VisPolygonTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public VisPolygonTupleScheme getScheme() { return new VisPolygonTupleScheme(); } @@ -717,7 +737,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, VisPolygon struct) public void read(org.apache.thrift.protocol.TProtocol prot, VisPolygon struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; { - org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32()); + org.apache.thrift.protocol.TList _list5 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); struct.pointIndices = new java.util.ArrayList(_list5.size); int _elem6; for (int _i7 = 0; _i7 < _list5.size; ++_i7) diff --git a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/VisSurfaceTriangle.java b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/VisSurfaceTriangle.java index a5fb9b67ea..ef68acbee7 100644 --- a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/VisSurfaceTriangle.java +++ b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/VisSurfaceTriangle.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.10.0) + * Autogenerated by Thrift Compiler (0.18.1) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -7,7 +7,7 @@ package org.vcell.vis.vismesh.thrift; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.18.1)") public class VisSurfaceTriangle implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("VisSurfaceTriangle"); @@ -18,13 +18,13 @@ public class VisSurfaceTriangle implements org.apache.thrift.TBase pointIndices; // required + public @org.apache.thrift.annotation.Nullable java.util.List pointIndices; // required /** * * @see Face */ - public Face face; // required - public ChomboSurfaceIndex chomboSurfaceIndex; // optional + public @org.apache.thrift.annotation.Nullable Face face; // required + public @org.apache.thrift.annotation.Nullable ChomboSurfaceIndex chomboSurfaceIndex; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -47,6 +47,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // POINT_INDICES @@ -73,6 +74,7 @@ public static _Fields findByThriftIdOrThrow(int fieldId) { /** * Find the _Fields constant that matches name, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } @@ -85,10 +87,12 @@ public static _Fields findByName(java.lang.String name) { _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } + @Override public java.lang.String getFieldName() { return _fieldName; } @@ -140,6 +144,7 @@ public VisSurfaceTriangle(VisSurfaceTriangle other) { } } + @Override public VisSurfaceTriangle deepCopy() { return new VisSurfaceTriangle(this); } @@ -155,6 +160,7 @@ public int getPointIndicesSize() { return (this.pointIndices == null) ? 0 : this.pointIndices.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator getPointIndicesIterator() { return (this.pointIndices == null) ? null : this.pointIndices.iterator(); } @@ -166,11 +172,12 @@ public void addToPointIndices(int elem) { this.pointIndices.add(elem); } + @org.apache.thrift.annotation.Nullable public java.util.List getPointIndices() { return this.pointIndices; } - public VisSurfaceTriangle setPointIndices(java.util.List pointIndices) { + public VisSurfaceTriangle setPointIndices(@org.apache.thrift.annotation.Nullable java.util.List pointIndices) { this.pointIndices = pointIndices; return this; } @@ -194,6 +201,7 @@ public void setPointIndicesIsSet(boolean value) { * * @see Face */ + @org.apache.thrift.annotation.Nullable public Face getFace() { return this.face; } @@ -202,7 +210,7 @@ public Face getFace() { * * @see Face */ - public VisSurfaceTriangle setFace(Face face) { + public VisSurfaceTriangle setFace(@org.apache.thrift.annotation.Nullable Face face) { this.face = face; return this; } @@ -222,11 +230,12 @@ public void setFaceIsSet(boolean value) { } } + @org.apache.thrift.annotation.Nullable public ChomboSurfaceIndex getChomboSurfaceIndex() { return this.chomboSurfaceIndex; } - public VisSurfaceTriangle setChomboSurfaceIndex(ChomboSurfaceIndex chomboSurfaceIndex) { + public VisSurfaceTriangle setChomboSurfaceIndex(@org.apache.thrift.annotation.Nullable ChomboSurfaceIndex chomboSurfaceIndex) { this.chomboSurfaceIndex = chomboSurfaceIndex; return this; } @@ -246,7 +255,8 @@ public void setChomboSurfaceIndexIsSet(boolean value) { } } - public void setFieldValue(_Fields field, java.lang.Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case POINT_INDICES: if (value == null) { @@ -275,6 +285,8 @@ public void setFieldValue(_Fields field, java.lang.Object value) { } } + @org.apache.thrift.annotation.Nullable + @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case POINT_INDICES: @@ -291,6 +303,7 @@ public java.lang.Object getFieldValue(_Fields field) { } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); @@ -309,8 +322,6 @@ public boolean isSet(_Fields field) { @Override public boolean equals(java.lang.Object that) { - if (that == null) - return false; if (that instanceof VisSurfaceTriangle) return this.equals((VisSurfaceTriangle)that); return false; @@ -379,7 +390,7 @@ public int compareTo(VisSurfaceTriangle other) { int lastComparison = 0; - lastComparison = java.lang.Boolean.valueOf(isSetPointIndices()).compareTo(other.isSetPointIndices()); + lastComparison = java.lang.Boolean.compare(isSetPointIndices(), other.isSetPointIndices()); if (lastComparison != 0) { return lastComparison; } @@ -389,7 +400,7 @@ public int compareTo(VisSurfaceTriangle other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(isSetFace()).compareTo(other.isSetFace()); + lastComparison = java.lang.Boolean.compare(isSetFace(), other.isSetFace()); if (lastComparison != 0) { return lastComparison; } @@ -399,7 +410,7 @@ public int compareTo(VisSurfaceTriangle other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(isSetChomboSurfaceIndex()).compareTo(other.isSetChomboSurfaceIndex()); + lastComparison = java.lang.Boolean.compare(isSetChomboSurfaceIndex(), other.isSetChomboSurfaceIndex()); if (lastComparison != 0) { return lastComparison; } @@ -412,14 +423,18 @@ public int compareTo(VisSurfaceTriangle other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @@ -489,6 +504,7 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } private static class VisSurfaceTriangleStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public VisSurfaceTriangleStandardScheme getScheme() { return new VisSurfaceTriangleStandardScheme(); } @@ -496,6 +512,7 @@ public VisSurfaceTriangleStandardScheme getScheme() { private static class VisSurfaceTriangleStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, VisSurfaceTriangle struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -552,6 +569,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, VisSurfaceTriangle struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, VisSurfaceTriangle struct) throws org.apache.thrift.TException { struct.validate(); @@ -587,6 +605,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, VisSurfaceTriangle } private static class VisSurfaceTriangleTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public VisSurfaceTriangleTupleScheme getScheme() { return new VisSurfaceTriangleTupleScheme(); } @@ -619,7 +638,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, VisSurfaceTriangle public void read(org.apache.thrift.protocol.TProtocol prot, VisSurfaceTriangle struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; { - org.apache.thrift.protocol.TList _list45 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32()); + org.apache.thrift.protocol.TList _list45 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); struct.pointIndices = new java.util.ArrayList(_list45.size); int _elem46; for (int _i47 = 0; _i47 < _list45.size; ++_i47) diff --git a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/VisTetrahedron.java b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/VisTetrahedron.java index 5968446c65..f746c17b23 100644 --- a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/VisTetrahedron.java +++ b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/VisTetrahedron.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.10.0) + * Autogenerated by Thrift Compiler (0.18.1) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -7,7 +7,7 @@ package org.vcell.vis.vismesh.thrift; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.18.1)") public class VisTetrahedron implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("VisTetrahedron"); @@ -18,9 +18,9 @@ public class VisTetrahedron implements org.apache.thrift.TBase pointIndices; // required - public ChomboVolumeIndex chomboVolumeIndex; // optional - public FiniteVolumeIndex finiteVolumeIndex; // optional + public @org.apache.thrift.annotation.Nullable java.util.List pointIndices; // required + public @org.apache.thrift.annotation.Nullable ChomboVolumeIndex chomboVolumeIndex; // optional + public @org.apache.thrift.annotation.Nullable FiniteVolumeIndex finiteVolumeIndex; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -39,6 +39,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // POINT_INDICES @@ -65,6 +66,7 @@ public static _Fields findByThriftIdOrThrow(int fieldId) { /** * Find the _Fields constant that matches name, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } @@ -77,10 +79,12 @@ public static _Fields findByName(java.lang.String name) { _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } + @Override public java.lang.String getFieldName() { return _fieldName; } @@ -130,6 +134,7 @@ public VisTetrahedron(VisTetrahedron other) { } } + @Override public VisTetrahedron deepCopy() { return new VisTetrahedron(this); } @@ -145,6 +150,7 @@ public int getPointIndicesSize() { return (this.pointIndices == null) ? 0 : this.pointIndices.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator getPointIndicesIterator() { return (this.pointIndices == null) ? null : this.pointIndices.iterator(); } @@ -156,11 +162,12 @@ public void addToPointIndices(int elem) { this.pointIndices.add(elem); } + @org.apache.thrift.annotation.Nullable public java.util.List getPointIndices() { return this.pointIndices; } - public VisTetrahedron setPointIndices(java.util.List pointIndices) { + public VisTetrahedron setPointIndices(@org.apache.thrift.annotation.Nullable java.util.List pointIndices) { this.pointIndices = pointIndices; return this; } @@ -180,11 +187,12 @@ public void setPointIndicesIsSet(boolean value) { } } + @org.apache.thrift.annotation.Nullable public ChomboVolumeIndex getChomboVolumeIndex() { return this.chomboVolumeIndex; } - public VisTetrahedron setChomboVolumeIndex(ChomboVolumeIndex chomboVolumeIndex) { + public VisTetrahedron setChomboVolumeIndex(@org.apache.thrift.annotation.Nullable ChomboVolumeIndex chomboVolumeIndex) { this.chomboVolumeIndex = chomboVolumeIndex; return this; } @@ -204,11 +212,12 @@ public void setChomboVolumeIndexIsSet(boolean value) { } } + @org.apache.thrift.annotation.Nullable public FiniteVolumeIndex getFiniteVolumeIndex() { return this.finiteVolumeIndex; } - public VisTetrahedron setFiniteVolumeIndex(FiniteVolumeIndex finiteVolumeIndex) { + public VisTetrahedron setFiniteVolumeIndex(@org.apache.thrift.annotation.Nullable FiniteVolumeIndex finiteVolumeIndex) { this.finiteVolumeIndex = finiteVolumeIndex; return this; } @@ -228,7 +237,8 @@ public void setFiniteVolumeIndexIsSet(boolean value) { } } - public void setFieldValue(_Fields field, java.lang.Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case POINT_INDICES: if (value == null) { @@ -257,6 +267,8 @@ public void setFieldValue(_Fields field, java.lang.Object value) { } } + @org.apache.thrift.annotation.Nullable + @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case POINT_INDICES: @@ -273,6 +285,7 @@ public java.lang.Object getFieldValue(_Fields field) { } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); @@ -291,8 +304,6 @@ public boolean isSet(_Fields field) { @Override public boolean equals(java.lang.Object that) { - if (that == null) - return false; if (that instanceof VisTetrahedron) return this.equals((VisTetrahedron)that); return false; @@ -361,7 +372,7 @@ public int compareTo(VisTetrahedron other) { int lastComparison = 0; - lastComparison = java.lang.Boolean.valueOf(isSetPointIndices()).compareTo(other.isSetPointIndices()); + lastComparison = java.lang.Boolean.compare(isSetPointIndices(), other.isSetPointIndices()); if (lastComparison != 0) { return lastComparison; } @@ -371,7 +382,7 @@ public int compareTo(VisTetrahedron other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(isSetChomboVolumeIndex()).compareTo(other.isSetChomboVolumeIndex()); + lastComparison = java.lang.Boolean.compare(isSetChomboVolumeIndex(), other.isSetChomboVolumeIndex()); if (lastComparison != 0) { return lastComparison; } @@ -381,7 +392,7 @@ public int compareTo(VisTetrahedron other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(isSetFiniteVolumeIndex()).compareTo(other.isSetFiniteVolumeIndex()); + lastComparison = java.lang.Boolean.compare(isSetFiniteVolumeIndex(), other.isSetFiniteVolumeIndex()); if (lastComparison != 0) { return lastComparison; } @@ -394,14 +405,18 @@ public int compareTo(VisTetrahedron other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @@ -473,6 +488,7 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } private static class VisTetrahedronStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public VisTetrahedronStandardScheme getScheme() { return new VisTetrahedronStandardScheme(); } @@ -480,6 +496,7 @@ public VisTetrahedronStandardScheme getScheme() { private static class VisTetrahedronStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, VisTetrahedron struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -537,6 +554,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, VisTetrahedron stru struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, VisTetrahedron struct) throws org.apache.thrift.TException { struct.validate(); @@ -574,6 +592,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, VisTetrahedron str } private static class VisTetrahedronTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public VisTetrahedronTupleScheme getScheme() { return new VisTetrahedronTupleScheme(); } @@ -611,7 +630,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, VisTetrahedron stru public void read(org.apache.thrift.protocol.TProtocol prot, VisTetrahedron struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; { - org.apache.thrift.protocol.TList _list37 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32()); + org.apache.thrift.protocol.TList _list37 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); struct.pointIndices = new java.util.ArrayList(_list37.size); int _elem38; for (int _i39 = 0; _i39 < _list37.size; ++_i39) diff --git a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/VisVoxel.java b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/VisVoxel.java index e710481a28..530ebf1388 100644 --- a/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/VisVoxel.java +++ b/vcell-core/src/main/java/org/vcell/vis/vismesh/thrift/VisVoxel.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.10.0) + * Autogenerated by Thrift Compiler (0.18.1) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -7,7 +7,7 @@ package org.vcell.vis.vismesh.thrift; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.18.1)") public class VisVoxel implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("VisVoxel"); @@ -19,10 +19,10 @@ public class VisVoxel implements org.apache.thrift.TBase pointIndices; // required - public ChomboVolumeIndex chomboVolumeIndex; // optional - public FiniteVolumeIndex finiteVolumeIndex; // optional - public MovingBoundaryVolumeIndex movingBoundaryVolumeIndex; // optional + public @org.apache.thrift.annotation.Nullable java.util.List pointIndices; // required + public @org.apache.thrift.annotation.Nullable ChomboVolumeIndex chomboVolumeIndex; // optional + public @org.apache.thrift.annotation.Nullable FiniteVolumeIndex finiteVolumeIndex; // optional + public @org.apache.thrift.annotation.Nullable MovingBoundaryVolumeIndex movingBoundaryVolumeIndex; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -42,6 +42,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // POINT_INDICES @@ -70,6 +71,7 @@ public static _Fields findByThriftIdOrThrow(int fieldId) { /** * Find the _Fields constant that matches name, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } @@ -82,10 +84,12 @@ public static _Fields findByName(java.lang.String name) { _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } + @Override public java.lang.String getFieldName() { return _fieldName; } @@ -140,6 +144,7 @@ public VisVoxel(VisVoxel other) { } } + @Override public VisVoxel deepCopy() { return new VisVoxel(this); } @@ -156,6 +161,7 @@ public int getPointIndicesSize() { return (this.pointIndices == null) ? 0 : this.pointIndices.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator getPointIndicesIterator() { return (this.pointIndices == null) ? null : this.pointIndices.iterator(); } @@ -167,11 +173,12 @@ public void addToPointIndices(int elem) { this.pointIndices.add(elem); } + @org.apache.thrift.annotation.Nullable public java.util.List getPointIndices() { return this.pointIndices; } - public VisVoxel setPointIndices(java.util.List pointIndices) { + public VisVoxel setPointIndices(@org.apache.thrift.annotation.Nullable java.util.List pointIndices) { this.pointIndices = pointIndices; return this; } @@ -191,11 +198,12 @@ public void setPointIndicesIsSet(boolean value) { } } + @org.apache.thrift.annotation.Nullable public ChomboVolumeIndex getChomboVolumeIndex() { return this.chomboVolumeIndex; } - public VisVoxel setChomboVolumeIndex(ChomboVolumeIndex chomboVolumeIndex) { + public VisVoxel setChomboVolumeIndex(@org.apache.thrift.annotation.Nullable ChomboVolumeIndex chomboVolumeIndex) { this.chomboVolumeIndex = chomboVolumeIndex; return this; } @@ -215,11 +223,12 @@ public void setChomboVolumeIndexIsSet(boolean value) { } } + @org.apache.thrift.annotation.Nullable public FiniteVolumeIndex getFiniteVolumeIndex() { return this.finiteVolumeIndex; } - public VisVoxel setFiniteVolumeIndex(FiniteVolumeIndex finiteVolumeIndex) { + public VisVoxel setFiniteVolumeIndex(@org.apache.thrift.annotation.Nullable FiniteVolumeIndex finiteVolumeIndex) { this.finiteVolumeIndex = finiteVolumeIndex; return this; } @@ -239,11 +248,12 @@ public void setFiniteVolumeIndexIsSet(boolean value) { } } + @org.apache.thrift.annotation.Nullable public MovingBoundaryVolumeIndex getMovingBoundaryVolumeIndex() { return this.movingBoundaryVolumeIndex; } - public VisVoxel setMovingBoundaryVolumeIndex(MovingBoundaryVolumeIndex movingBoundaryVolumeIndex) { + public VisVoxel setMovingBoundaryVolumeIndex(@org.apache.thrift.annotation.Nullable MovingBoundaryVolumeIndex movingBoundaryVolumeIndex) { this.movingBoundaryVolumeIndex = movingBoundaryVolumeIndex; return this; } @@ -263,7 +273,8 @@ public void setMovingBoundaryVolumeIndexIsSet(boolean value) { } } - public void setFieldValue(_Fields field, java.lang.Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case POINT_INDICES: if (value == null) { @@ -300,6 +311,8 @@ public void setFieldValue(_Fields field, java.lang.Object value) { } } + @org.apache.thrift.annotation.Nullable + @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case POINT_INDICES: @@ -319,6 +332,7 @@ public java.lang.Object getFieldValue(_Fields field) { } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); @@ -339,8 +353,6 @@ public boolean isSet(_Fields field) { @Override public boolean equals(java.lang.Object that) { - if (that == null) - return false; if (that instanceof VisVoxel) return this.equals((VisVoxel)that); return false; @@ -422,7 +434,7 @@ public int compareTo(VisVoxel other) { int lastComparison = 0; - lastComparison = java.lang.Boolean.valueOf(isSetPointIndices()).compareTo(other.isSetPointIndices()); + lastComparison = java.lang.Boolean.compare(isSetPointIndices(), other.isSetPointIndices()); if (lastComparison != 0) { return lastComparison; } @@ -432,7 +444,7 @@ public int compareTo(VisVoxel other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(isSetChomboVolumeIndex()).compareTo(other.isSetChomboVolumeIndex()); + lastComparison = java.lang.Boolean.compare(isSetChomboVolumeIndex(), other.isSetChomboVolumeIndex()); if (lastComparison != 0) { return lastComparison; } @@ -442,7 +454,7 @@ public int compareTo(VisVoxel other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(isSetFiniteVolumeIndex()).compareTo(other.isSetFiniteVolumeIndex()); + lastComparison = java.lang.Boolean.compare(isSetFiniteVolumeIndex(), other.isSetFiniteVolumeIndex()); if (lastComparison != 0) { return lastComparison; } @@ -452,7 +464,7 @@ public int compareTo(VisVoxel other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(isSetMovingBoundaryVolumeIndex()).compareTo(other.isSetMovingBoundaryVolumeIndex()); + lastComparison = java.lang.Boolean.compare(isSetMovingBoundaryVolumeIndex(), other.isSetMovingBoundaryVolumeIndex()); if (lastComparison != 0) { return lastComparison; } @@ -465,14 +477,18 @@ public int compareTo(VisVoxel other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @@ -557,6 +573,7 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } private static class VisVoxelStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public VisVoxelStandardScheme getScheme() { return new VisVoxelStandardScheme(); } @@ -564,6 +581,7 @@ public VisVoxelStandardScheme getScheme() { private static class VisVoxelStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, VisVoxel struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -630,6 +648,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, VisVoxel struct) th struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, VisVoxel struct) throws org.apache.thrift.TException { struct.validate(); @@ -674,6 +693,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, VisVoxel struct) t } private static class VisVoxelTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public VisVoxelTupleScheme getScheme() { return new VisVoxelTupleScheme(); } @@ -717,7 +737,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, VisVoxel struct) th public void read(org.apache.thrift.protocol.TProtocol prot, VisVoxel struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; { - org.apache.thrift.protocol.TList _list29 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32()); + org.apache.thrift.protocol.TList _list29 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32); struct.pointIndices = new java.util.ArrayList(_list29.size); int _elem30; for (int _i31 = 0; _i31 < _list29.size; ++_i31) diff --git a/vcell-core/src/main/java/org/vcell/vis/vtk/VisMeshUtils.java b/vcell-core/src/main/java/org/vcell/vis/vtk/VisMeshUtils.java index ec159bf1e5..4d6459bbfe 100644 --- a/vcell-core/src/main/java/org/vcell/vis/vtk/VisMeshUtils.java +++ b/vcell-core/src/main/java/org/vcell/vis/vtk/VisMeshUtils.java @@ -1,18 +1,12 @@ package org.vcell.vis.vtk; -import java.io.File; -import java.io.FileWriter; -import java.io.IOException; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; -import java.util.List; - -import javax.xml.bind.DatatypeConverter; +import cbit.util.xml.XmlUtil; import org.apache.commons.io.FileUtils; import org.apache.thrift.TDeserializer; import org.apache.thrift.TException; import org.apache.thrift.TSerializer; import org.apache.thrift.protocol.TBinaryProtocol; +import org.apache.thrift.transport.TTransportException; import org.jdom.Document; import org.jdom.Element; import org.jdom.output.Format; @@ -22,50 +16,55 @@ import org.vcell.vis.vismesh.thrift.MovingBoundaryIndexData; import org.vcell.vis.vismesh.thrift.VisMesh; -import cbit.util.xml.XmlUtil; -import cbit.vcell.client.pyvcellproxy.SimulationDataSetRef; +import javax.xml.bind.DatatypeConverter; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.util.List; public class VisMeshUtils { public static ChomboIndexData readChomboIndexData(File chomboIndexDataFile) throws IOException { - TDeserializer deserializer = new TDeserializer(new TBinaryProtocol.Factory()); - byte[] blob = FileUtils.readFileToByteArray(chomboIndexDataFile); - ChomboIndexData chomboIndexData = new ChomboIndexData(); try { + TDeserializer deserializer = new TDeserializer(new TBinaryProtocol.Factory()); + byte[] blob = FileUtils.readFileToByteArray(chomboIndexDataFile); + ChomboIndexData chomboIndexData = new ChomboIndexData(); deserializer.deserialize(chomboIndexData, blob); + return chomboIndexData; } catch (TException e) { throw new IOException("error reading ChomboIndexData from file "+chomboIndexDataFile.getPath()+": "+e.getMessage(),e); } - return chomboIndexData; } public static MovingBoundaryIndexData readMovingBoundaryIndexData(File movingBoundaryIndexDataFile) throws IOException { - TDeserializer deserializer = new TDeserializer(new TBinaryProtocol.Factory()); - byte[] blob = FileUtils.readFileToByteArray(movingBoundaryIndexDataFile); - MovingBoundaryIndexData movingBoundaryIndexData = new MovingBoundaryIndexData(); try { + TDeserializer deserializer = new TDeserializer(new TBinaryProtocol.Factory()); + byte[] blob = FileUtils.readFileToByteArray(movingBoundaryIndexDataFile); + MovingBoundaryIndexData movingBoundaryIndexData = new MovingBoundaryIndexData(); deserializer.deserialize(movingBoundaryIndexData, blob); + return movingBoundaryIndexData; } catch (TException e) { throw new IOException("error reading MovingBoundaryIndexData from file "+movingBoundaryIndexDataFile.getPath()+": "+e.getMessage(),e); } - return movingBoundaryIndexData; } public static FiniteVolumeIndexData readFiniteVolumeIndexData(File finiteVolumeIndexFile) throws IOException { - TDeserializer deserializer = new TDeserializer(new TBinaryProtocol.Factory()); - byte[] blob = FileUtils.readFileToByteArray(finiteVolumeIndexFile); - FiniteVolumeIndexData finiteVolumeIndexData = new FiniteVolumeIndexData(); try { + TDeserializer deserializer = new TDeserializer(new TBinaryProtocol.Factory()); + byte[] blob = FileUtils.readFileToByteArray(finiteVolumeIndexFile); + FiniteVolumeIndexData finiteVolumeIndexData = new FiniteVolumeIndexData(); deserializer.deserialize(finiteVolumeIndexData, blob); + return finiteVolumeIndexData; } catch (TException e) { throw new IOException("error reading FiniteVolumeIndexData from file "+finiteVolumeIndexFile.getPath()+": "+e.getMessage(),e); } - return finiteVolumeIndexData; } static void writeChomboIndexData(File chomboIndexFile, ChomboIndexData chomboIndexData) throws IOException { - TSerializer serializer = new TSerializer(new TBinaryProtocol.Factory()); try { + TSerializer serializer = new TSerializer(new TBinaryProtocol.Factory()); byte[] blob = serializer.serialize(chomboIndexData); FileUtils.writeByteArrayToFile(chomboIndexFile, blob); } catch (TException e) { @@ -73,19 +72,9 @@ static void writeChomboIndexData(File chomboIndexFile, ChomboIndexData chomboInd } } - public static void writeSimulationDataSetRef(File simDataSetRefFile, SimulationDataSetRef simDataSetRef) throws IOException { - TSerializer serializer = new TSerializer(new TBinaryProtocol.Factory()); - try { - byte[] blob = serializer.serialize(simDataSetRef); - FileUtils.writeByteArrayToFile(simDataSetRefFile, blob); - } catch (TException e) { - throw new IOException("error writing SimulationDataSetRef to file "+simDataSetRefFile.getPath()+": "+e.getMessage(),e); - } - } - - static void writeVisMesh(File visMeshFile, VisMesh visMesh) throws IOException { - TSerializer serializer = new TSerializer(new TBinaryProtocol.Factory()); + static void writeVisMesh(File visMeshFile, VisMesh visMesh) throws IOException { try { + TSerializer serializer = new TSerializer(new TBinaryProtocol.Factory()); byte[] blob = serializer.serialize(visMesh); FileUtils.writeByteArrayToFile(visMeshFile, blob); } catch (TException e) { @@ -93,9 +82,9 @@ static void writeVisMesh(File visMeshFile, VisMesh visMesh) throws IOException { } } - static void writeFiniteVolumeIndexData(File finiteVolumeIndexFile, FiniteVolumeIndexData finiteVolumeIndexData) throws IOException { - TSerializer serializer = new TSerializer(new TBinaryProtocol.Factory()); + static void writeFiniteVolumeIndexData(File finiteVolumeIndexFile, FiniteVolumeIndexData finiteVolumeIndexData) throws IOException, TTransportException { try { + TSerializer serializer = new TSerializer(new TBinaryProtocol.Factory()); byte[] blob = serializer.serialize(finiteVolumeIndexData); FileUtils.writeByteArrayToFile(finiteVolumeIndexFile, blob); } catch (TException e) { diff --git a/vcell-core/src/main/java/org/vcell/vis/vtk/VtkService.java b/vcell-core/src/main/java/org/vcell/vis/vtk/VtkService.java index 7f475449a8..ce53a0cd2d 100644 --- a/vcell-core/src/main/java/org/vcell/vis/vtk/VtkService.java +++ b/vcell-core/src/main/java/org/vcell/vis/vtk/VtkService.java @@ -16,13 +16,13 @@ public static VtkService getInstance(){ return new VtkServicePython(); } - public abstract void writeChomboMembraneVtkGridAndIndexData(VisMesh visMesh, String domainName, File vtkFile, File indexFile) throws IOException; + public abstract void writeChomboMembraneVtkGridAndIndexData(VisMesh visMesh, String domainName, File vtkFile, File indexFile) throws IOException, InterruptedException; - public abstract void writeChomboVolumeVtkGridAndIndexData(VisMesh visMesh, String domainName, File vtkFile, File indexFile) throws IOException; + public abstract void writeChomboVolumeVtkGridAndIndexData(VisMesh visMesh, String domainName, File vtkFile, File indexFile) throws IOException, InterruptedException; - public abstract void writeFiniteVolumeSmoothedVtkGridAndIndexData(VisMesh visMesh, String domainName, File vtkFile, File indexFile) throws IOException; + public abstract void writeFiniteVolumeSmoothedVtkGridAndIndexData(VisMesh visMesh, String domainName, File vtkFile, File indexFile) throws IOException, InterruptedException; - public abstract void writeMovingBoundaryVtkGridAndIndexData(VisMesh visMesh, String domainName, File vtkFile, File indexFile) throws IOException; + public abstract void writeMovingBoundaryVtkGridAndIndexData(VisMesh visMesh, String domainName, File vtkFile, File indexFile) throws IOException, InterruptedException; - public abstract void writeComsolVtkGridAndIndexData(VisMesh visMesh, String domainName, File vtkFile, File indexFile) throws IOException; + public abstract void writeComsolVtkGridAndIndexData(VisMesh visMesh, String domainName, File vtkFile, File indexFile) throws IOException, InterruptedException; } diff --git a/vcell-core/src/main/java/org/vcell/vis/vtk/VtkServicePython.java b/vcell-core/src/main/java/org/vcell/vis/vtk/VtkServicePython.java index b4e249408d..91f913022b 100644 --- a/vcell-core/src/main/java/org/vcell/vis/vtk/VtkServicePython.java +++ b/vcell-core/src/main/java/org/vcell/vis/vtk/VtkServicePython.java @@ -1,85 +1,68 @@ package org.vcell.vis.vtk; -import java.io.File; -import java.io.IOException; - -import org.apache.commons.lang3.StringUtils; -import org.vcell.util.exe.Executable2; -import org.vcell.util.exe.ExecutableException; -import org.vcell.util.exe.IExecutable; +import cbit.vcell.resource.PropertyLoader; +import org.vcell.util.PythonUtils; import org.vcell.vis.vismesh.thrift.VisMesh; -import cbit.vcell.resource.PythonSupport; -import cbit.vcell.resource.PropertyLoader; -import cbit.vcell.resource.ResourceUtil; -import cbit.vcell.resource.VCellConfiguration; -import cbit.vcell.resource.PythonSupport.InstallStatus; -import cbit.vcell.resource.PythonSupport.PythonPackage; +import java.io.File; +import java.io.IOException; +import java.nio.file.Path; public class VtkServicePython extends VtkService { + public enum MeshType { + chombovolume, + chombomembrane, + finitevolume, + movingboundary, + comsolvolume; + } + @Override - public void writeChomboMembraneVtkGridAndIndexData(VisMesh visMesh, String domainName, File vtkFile, File indexFile) throws IOException { - writeVtkGridAndIndexData("chombomembrane", visMesh, domainName, vtkFile, indexFile); + public void writeChomboMembraneVtkGridAndIndexData(VisMesh visMesh, String domainName, File vtkFile, File indexFile) throws IOException, InterruptedException { + writeVtkGridAndIndexData(MeshType.chombomembrane, visMesh, domainName, vtkFile, indexFile); } @Override - public void writeChomboVolumeVtkGridAndIndexData(VisMesh visMesh, String domainName, File vtkFile, File indexFile) throws IOException { - writeVtkGridAndIndexData("chombovolume", visMesh, domainName, vtkFile, indexFile); + public void writeChomboVolumeVtkGridAndIndexData(VisMesh visMesh, String domainName, File vtkFile, File indexFile) throws IOException, InterruptedException { + writeVtkGridAndIndexData(MeshType.chombovolume, visMesh, domainName, vtkFile, indexFile); } @Override - public void writeFiniteVolumeSmoothedVtkGridAndIndexData(VisMesh visMesh, String domainName, File vtkFile, File indexFile) throws IOException { - writeVtkGridAndIndexData("finitevolume", visMesh, domainName, vtkFile, indexFile); + public void writeFiniteVolumeSmoothedVtkGridAndIndexData(VisMesh visMesh, String domainName, File vtkFile, File indexFile) throws IOException, InterruptedException { + writeVtkGridAndIndexData(MeshType.finitevolume, visMesh, domainName, vtkFile, indexFile); } @Override - public void writeMovingBoundaryVtkGridAndIndexData(VisMesh visMesh, String domainName, File vtkFile, File indexFile) throws IOException { - writeVtkGridAndIndexData("movingboundary", visMesh, domainName, vtkFile, indexFile); + public void writeMovingBoundaryVtkGridAndIndexData(VisMesh visMesh, String domainName, File vtkFile, File indexFile) throws IOException, InterruptedException { + writeVtkGridAndIndexData(MeshType.movingboundary, visMesh, domainName, vtkFile, indexFile); } @Override - public void writeComsolVtkGridAndIndexData(VisMesh visMesh, String domainName, File vtkFile, File indexFile) throws IOException { - writeVtkGridAndIndexData("comsolvolume", visMesh, domainName, vtkFile, indexFile); + public void writeComsolVtkGridAndIndexData(VisMesh visMesh, String domainName, File vtkFile, File indexFile) throws IOException, InterruptedException { + writeVtkGridAndIndexData(MeshType.comsolvolume, visMesh, domainName, vtkFile, indexFile); } - private void writeVtkGridAndIndexData(String visMeshType, VisMesh visMesh, String domainName, File vtkFile, File indexFile) throws IOException { + private void writeVtkGridAndIndexData(MeshType meshType, VisMesh visMesh, String domainName, File vtkFile, File indexFile) throws IOException, InterruptedException { if (lg.isDebugEnabled()) { lg.debug("writeVtkGridAndIndexData (python) for domain "+domainName); } - File PYTHON = PythonSupport.getPythonExe(); - InstallStatus copasiInstallStatus = PythonSupport.getPythonPackageStatus(PythonPackage.VTK); - if (copasiInstallStatus==InstallStatus.FAILED){ - throw new RuntimeException("failed to install VTK python package, consider re-installing VCell-managed python\n ...see Preferences->Python->Re-install"); - } - if (copasiInstallStatus==InstallStatus.INITIALIZING){ - throw new RuntimeException("VCell is currently installing or verifying the VTK python package ... please try again in a minute"); - } - + String baseFilename = vtkFile.getName().replace(".vtu",".visMesh"); File visMeshFile = new File(vtkFile.getParentFile(), baseFilename); VisMeshUtils.writeVisMesh(visMeshFile, visMesh); - File vtkServiceFile = new File(ResourceUtil.getVCellVTKPythonDir(),"vtkService.py"); - //It's 2015 -- forward slash works for all operating systems - String[] cmd = new String[] { PYTHON.getAbsolutePath(), vtkServiceFile.getAbsolutePath(),visMeshType,domainName,visMeshFile.getAbsolutePath(),vtkFile.getAbsolutePath(),indexFile.getAbsolutePath() }; - IExecutable exe = prepareExecutable(cmd); - try { - exe.start( new int[] { 0 }); - if (exe.getExitValue() != 0){ - throw new RuntimeException("mesh generation script for domain "+domainName+" failed with return code "+exe.getExitValue()+": "+exe.getStderrString()); - } - } catch (ExecutableException e) { - throw new RuntimeException("vtkService.py invocation failed: "+e.getMessage(),e); - } + callVtkPython(meshType, domainName, visMeshFile.toPath(), vtkFile.getParentFile().toPath(), indexFile.toPath()); } - private IExecutable prepareExecutable(String[] cmd) { - if (lg.isInfoEnabled()) { - lg.info("python command string:" + StringUtils.join(cmd," ")); - } - System.out.println("python command string:" + StringUtils.join(cmd," ")); - Executable2 exe = new Executable2(cmd); - return exe; + private void callVtkPython(MeshType meshtype, String domainName, Path visMeshFile, Path vtkFile, Path indexFile) throws IOException, InterruptedException { + File vtkPythonDir = PropertyLoader.getRequiredDirectory(PropertyLoader.vtkPythonDir); + String[] commands = new String[] { + meshtype.name(), + domainName, + String.valueOf(visMeshFile.toAbsolutePath()), + String.valueOf(vtkFile.toAbsolutePath()), + String.valueOf(indexFile.toAbsolutePath()) }; + PythonUtils.callPoetryModule(vtkPythonDir, "vtkService.vtkService", commands); } } diff --git a/vcell-core/src/test/java/org/vcell/vis/vtk/DebugWriteProblem.java b/vcell-core/src/test/java/org/vcell/vis/vtk/DebugWriteProblem.java deleted file mode 100644 index 798fc9533e..0000000000 --- a/vcell-core/src/test/java/org/vcell/vis/vtk/DebugWriteProblem.java +++ /dev/null @@ -1,83 +0,0 @@ -package org.vcell.vis.vtk; - -import java.util.Arrays; -import java.util.List; - -import org.vcell.vis.vismesh.thrift.ChomboVolumeIndex; -import org.vcell.vis.vismesh.thrift.PolyhedronFace; -import org.vcell.vis.vismesh.thrift.Vect3D; -import org.vcell.vis.vismesh.thrift.VisIrregularPolyhedron; -import org.vcell.vis.vismesh.thrift.VisMesh; -import org.vcell.vis.vismesh.thrift.VisPoint; - -public class DebugWriteProblem { - - /** - * @param args - */ - public static void main(String[] args) { - try { - VisMesh visMesh = new VisMesh(3,new Vect3D(0,0,0),new Vect3D(3,1,1)); - VisPoint[] points0 = new VisPoint[] { - new VisPoint(0, 0, 0), - new VisPoint(1, 0, 0), - new VisPoint(0, 1, 0), - new VisPoint(0, 0, 1) - }; - - visMesh.addToPoints(points0[0]); - visMesh.addToPoints(points0[1]); - visMesh.addToPoints(points0[2]); - visMesh.addToPoints(points0[3]); - - List faces0 = Arrays.asList( - new PolyhedronFace(Arrays.asList( 0, 1, 3 )), - new PolyhedronFace(Arrays.asList( 0, 3, 2 )), - new PolyhedronFace(Arrays.asList( 0, 2, 1 )), - new PolyhedronFace(Arrays.asList( 1, 3, 2 )) - ); - - int level = 0; - int boxNumber = 0; - int boxIndex = 0; - int fraction = 0; - - VisIrregularPolyhedron genPolyhedra0 = new VisIrregularPolyhedron(faces0); - genPolyhedra0.setChomboVolumeIndex(new ChomboVolumeIndex(level, boxNumber, boxIndex, fraction)); - - visMesh.addToIrregularPolyhedra(genPolyhedra0); - - -// VisPoint[] points1 = new VisPoint[] { -// new VisPoint(2+0, 0, 0), -// new VisPoint(2+1, 0, 0), -// new VisPoint(2+0, 1, 0), -// new VisPoint(2+0, 0, 1) -// }; -// -// visMesh.addPoint(points1[0]); -// visMesh.addPoint(points1[1]); -// visMesh.addPoint(points1[2]); -// visMesh.addPoint(points1[3]); -// - - -// vtkUnstructuredGrid vtkgrid = VtkGridUtils.getVolumeVtkGrid(visMesh); -// String filenameASCII = "testASCII.vtk"; -// String filenameBinary = "testBinary.vtk"; -// VtkGridUtils.writeXML(vtkgrid, filenameASCII, true); -// VtkGridUtils.writeXML(vtkgrid, filenameBinary, false); -// vtkgrid = VtkGridUtils.read(filenameBinary); -// vtkgrid.BuildLinks(); - - -// SimpleVTKViewer simpleViewer = new SimpleVTKViewer(); -// String[] varNames = visDomain.getVisMeshData().getVarNames(); -// simpleViewer.showGrid(vtkgrid, varNames[0], varNames[1]); - - }catch (Exception e){ - e.printStackTrace(System.out); - } - } - -} diff --git a/vcell-core/src/test/java/org/vcell/vis/vtk/VCellDataTest.java b/vcell-core/src/test/java/org/vcell/vis/vtk/VCellDataTest.java index 6f56947976..7d29ccf48a 100644 --- a/vcell-core/src/test/java/org/vcell/vis/vtk/VCellDataTest.java +++ b/vcell-core/src/test/java/org/vcell/vis/vtk/VCellDataTest.java @@ -1,143 +1,135 @@ package org.vcell.vis.vtk; import java.io.File; -import java.util.ArrayList; +import java.io.IOException; +import java.io.InputStream; +import java.nio.file.Files; +import java.nio.file.StandardCopyOption; +import java.util.Arrays; +import java.util.List; +import cbit.vcell.resource.PropertyLoader; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.experimental.categories.Category; +import org.vcell.test.Fast; import org.vcell.util.document.KeyValue; import org.vcell.vis.io.CartesianMeshFileReader; import org.vcell.vis.io.VCellSimFiles; +import org.vcell.vis.mapping.vcell.CartesianMeshMapping; import org.vcell.vis.mapping.vcell.CartesianMeshVtkFileWriter; import org.vcell.vis.vcell.CartesianMesh; +import org.vcell.vis.vismesh.thrift.*; +@Category(Fast.class) public class VCellDataTest { - /** - * @param args - */ - public static void main(String[] args) { + private String previousPythonDir = null; + + @Before + public void setUp() { + this.previousPythonDir = System.getProperty(PropertyLoader.vtkPythonDir); + System.setProperty(PropertyLoader.vtkPythonDir, "../pythonVtk"); + } + + @After + public void tearDown() { + if (previousPythonDir!=null) { + System.setProperty(PropertyLoader.vtkPythonDir, previousPythonDir); + } + } + + @Test + public void test_3D() throws Exception { + KeyValue simKey = new KeyValue("956955326"); + + File tempdir = Files.createTempDirectory("VCellDataTest_").toFile(); + File meshFile = copyResourceToFile(tempdir, "SimID_" + simKey + "_0_.mesh"); + File meshMetricsFile = copyResourceToFile(tempdir, "SimID_" + simKey + "_0_.meshmetrics"); + File subdomainFile = copyResourceToFile(tempdir, "SimID_" + simKey + "_0_.subdomains"); + File logFile = copyResourceToFile(tempdir, "SimID_" + simKey + "_0_.log"); + File zipFile = copyResourceToFile(tempdir, "SimID_" + simKey + "_0_00.zip"); + File postprocessingFile = copyResourceToFile(tempdir, "SimID_" + simKey + "_0_.hdf5"); + File[] generatedFiles = null; try { - KeyValue simKey = new KeyValue("1661241954"); - String pathPrefix = "C:\\Users\\schaff\\.vcell\\simdata\\user\\"; - - File meshFile = new File(pathPrefix + "SimID_"+simKey+"_0_.mesh"); - File meshMetricsFile = new File(pathPrefix + "SimID_"+simKey+"_0_.meshmetrics"); - File subdomainFile = new File(pathPrefix + "SimID_"+simKey+"_0_.subdomains"); - File logFile = new File(pathPrefix + "SimID_"+simKey+"_0_.log"); - File zipFile = new File(pathPrefix + "SimID_"+simKey+"_0_00.zip"); - File postprocessingFile = new File(pathPrefix + "SimID_"+simKey+"_0_.hdf5"); - - VCellSimFiles vcellFiles = new VCellSimFiles(simKey,0,meshFile,meshMetricsFile,subdomainFile,logFile,postprocessingFile); - vcellFiles.addDataFileEntry(zipFile,new File("SimID_"+simKey+"_0_0000.sim"),0.0); -// vcellFiles.addDataFileEntry(zipFile,new File("SimID_"+simKey+"_0_0001.sim"),0.05); -// vcellFiles.addDataFileEntry(zipFile,new File("SimID_"+simKey+"_0_0002.sim"),0.10); -// vcellFiles.addDataFileEntry(zipFile,new File("SimID_"+simKey+"_0_0003.sim"),0.15); -// vcellFiles.addDataFileEntry(zipFile,new File("SimID_"+simKey+"_0_0004.sim"),0.20); -// vcellFiles.addDataFileEntry(zipFile,new File("SimID_"+simKey+"_0_0005.sim"),0.25); -// vcellFiles.addDataFileEntry(zipFile,new File("SimID_"+simKey+"_0_0006.sim"),0.30); -// vcellFiles.addDataFileEntry(zipFile,new File("SimID_"+simKey+"_0_0007.sim"),0.35); -// vcellFiles.addDataFileEntry(zipFile,new File("SimID_"+simKey+"_0_0008.sim"),0.40); -// vcellFiles.addDataFileEntry(zipFile,new File("SimID_"+simKey+"_0_0009.sim"),0.45); -// vcellFiles.addDataFileEntry(zipFile,new File("SimID_"+simKey+"_0_0010.sim"),0.50); -// vcellFiles.addDataFileEntry(zipFile,new File("SimID_"+simKey+"_0_0011.sim"),0.55); -// vcellFiles.addDataFileEntry(zipFile,new File("SimID_"+simKey+"_0_0012.sim"),0.60); -// vcellFiles.addDataFileEntry(zipFile,new File("SimID_"+simKey+"_0_0013.sim"),0.65); -// vcellFiles.addDataFileEntry(zipFile,new File("SimID_"+simKey+"_0_0014.sim"),0.70); -// vcellFiles.addDataFileEntry(zipFile,new File("SimID_"+simKey+"_0_0015.sim"),0.75); -// vcellFiles.addDataFileEntry(zipFile,new File("SimID_"+simKey+"_0_0016.sim"),0.80); -// vcellFiles.addDataFileEntry(zipFile,new File("SimID_"+simKey+"_0_0017.sim"),0.85); -// vcellFiles.addDataFileEntry(zipFile,new File("SimID_"+simKey+"_0_0018.sim"),0.90); -// vcellFiles.addDataFileEntry(zipFile,new File("SimID_"+simKey+"_0_0019.sim"),0.95); -// vcellFiles.addDataFileEntry(zipFile,new File("SimID_"+simKey+"_0_0020.sim"),1.0); - - + + VCellSimFiles vcellFiles = new VCellSimFiles(simKey, 0, meshFile, meshMetricsFile, subdomainFile, logFile, postprocessingFile); + vcellFiles.addDataFileEntry(zipFile, new File("SimID_" + simKey + "_0_0000.sim"), 0.0); + // process each domain separately (only have to process the mesh once for each one) CartesianMeshVtkFileWriter cartesianMeshVtkFileWriter = new CartesianMeshVtkFileWriter(); - File destinationDirectory = new File("C:\\Developer\\eclipse\\workspace\\VCell_5.3_visfull\\VtkData\\"); - File[] generatedFiles = cartesianMeshVtkFileWriter.writeVtuExportFiles(vcellFiles, destinationDirectory, null); - - boolean bDisplay = true; - - if (bDisplay){ - CartesianMeshFileReader reader = new CartesianMeshFileReader(); - CartesianMesh mesh = reader.readFromFiles(vcellFiles); - ArrayList allDomainNames = new ArrayList(); - allDomainNames.addAll(mesh.getVolumeDomainNames()); - allDomainNames.addAll(mesh.getMembraneDomainNames()); - for (String domain : allDomainNames){ - for (int timeIndex=0;timeIndex faces0 = Arrays.asList( + new PolyhedronFace(Arrays.asList( 0, 1, 3 )), + new PolyhedronFace(Arrays.asList( 0, 3, 2 )), + new PolyhedronFace(Arrays.asList( 0, 2, 1 )), + new PolyhedronFace(Arrays.asList( 1, 3, 2 )) + ); + + int level = 0; + int boxNumber = 0; + int boxIndex = 0; + int fraction = 0; + + VisIrregularPolyhedron genPolyhedra0 = new VisIrregularPolyhedron(faces0); + genPolyhedra0.setChomboVolumeIndex(new ChomboVolumeIndex(level, boxNumber, boxIndex, fraction)); + + visMesh.addToIrregularPolyhedra(genPolyhedra0); + + }catch (Exception e){ + e.printStackTrace(System.out); + } + } } diff --git a/vcell-core/src/test/resources/simdata/MembraneFrap3D/Membrane_Frap.vcml b/vcell-core/src/test/resources/simdata/MembraneFrap3D/Membrane_Frap.vcml new file mode 100644 index 0000000000..96b4f34305 --- /dev/null +++ b/vcell-core/src/test/resources/simdata/MembraneFrap3D/Membrane_Frap.vcml @@ -0,0 +1,313 @@ + + + + + cloned from 'Membrane Frap' owned by user schaff +cloned from 'Membrane Frap' owned by user frm + + cloned from 'unnamed' owned by user schaff +cloned from 'unnamed' owned by user frm +cloned from 'unnamed' owned by user tutorial +cloned from 'unnamed' owned by user susan + + RAN + + + RAN-FITC + + + Light + + + + + + + + + + + + + (Vmax * rf_PM * Laser_PM) + 0.0 + 1.0 + 50.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + cloned from 'unnamed' owned by user schaff +cloned from 'unnamed' owned by user frm +cloned from 'unnamed' owned by user tutorial +cloned from 'unnamed' owned by user susan + + + + + + cloned from '3d image' owned by user schaff +cloned from '3d image' owned by user frm +(copied from Spatial) cloned from 'Spatial' owned by user tutorial +cloned from 'Spatial' owned by user susan + + + + + ((((x - 5.0) ^ 2.0) + ((y - 5.0) ^ 2.0) + ((z - 5.0) ^ 2.0)) < (4.0 ^ 2.0)) + + + 1.0 + + + + + + + + + + + + + + + + + + + + + + 5.0 + 10.0 + + + 5.0 + 10.0 + + + ((t < 0.1) && (x > 5.0)) + 0.0 + + + + + cloned from '3d image_generated' owned by user schaff +cloned from '3d image_generated' owned by user frm + 96485.3321 + 9.64853321E-5 + 1.0E-9 + 6.02214179E11 + 3.141592653589793 + 8314.46261815 + 300.0 + 1.0 + 1000.0 + 0.001660538783162726 + 1.0 + 10.0 + 5.0 + 10.0 + 5.0 + 50.0 + 0.0 + 1.0 + 1.0 + + + (Vmax * rf_PM * Laser_PM) + (AreaPerUnitArea_PM * Laser_PM_init_molecules_um_2) + (K_Laser_PM_total / AreaPerUnitArea_PM) + ((t < 0.1) && (x > 5.0)) + (VolumePerUnitVolume_cyt * vcRegionVolume('subdomain1')) + (VolumePerUnitVolume_ec * vcRegionVolume('subdomain0')) + (AreaPerUnitArea_PM * vcRegionArea('subdomain0_subdomain1_membrane')) + vcRegionArea('subdomain0_subdomain1_membrane') + vcRegionVolume('subdomain0') + vcRegionVolume('subdomain1') + + + + + + + + + + + + + + + + + + + + + + + + + J_bleaching1_mem + r_PM_diffusionRate + r_PM_init_molecules_um_2 + + + - J_bleaching1_mem + rf_PM_diffusionRate + rf_PM_init_molecules_um_2 + + + + + + cloned from '3d image_generated' owned by user schaff +cloned from '3d image_generated' owned by user frm + + + + mesh 101x101x36 elements +timestep 0.01 seconds + + + + + + + 2 + + 1 + + + + + + + + + mesh 101x101x36 elements +timestep 0.01 seconds + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + cloned from '3d image' owned by user schaff +cloned from '3d image' owned by user frm +(copied from Spatial) cloned from 'Spatial' owned by user tutorial +cloned from 'Spatial' owned by user susan + + + + + + + + + cloned from 'Membrane Frap' owned by user schaff +cloned from 'Membrane Frap' owned by user frm + + + + + + + + + + + + RAN + + + RAN-FITC + + + Light + + + cloned from 'Membrane Frap' owned by user schaff +cloned from 'Membrane Frap' owned by user frm + + + + + + + diff --git a/vcell-core/src/test/resources/simdata/MembraneFrap3D/SimID_956955326_0_.functions b/vcell-core/src/test/resources/simdata/MembraneFrap3D/SimID_956955326_0_.functions new file mode 100644 index 0000000000..2fe25617ea --- /dev/null +++ b/vcell-core/src/test/resources/simdata/MembraneFrap3D/SimID_956955326_0_.functions @@ -0,0 +1,14 @@ +##--------------------------------------------- +## /Users/schaff/.vcell/simdata/temp/SimID_956955326_0_.functions +##--------------------------------------------- + +subdomain0_subdomain1_membrane::J_bleaching1_mem; (50.0 * rf_PM * ((t < 0.1) && (x > 5.0))); ; Membrane_VariableType; false +subdomain0_subdomain1_membrane::Laser_PM; ((t < 0.1) && (x > 5.0)); ; Membrane_VariableType; false +subdomain0_subdomain1_membrane::Laser_PM_init_molecules_um_2; ((t < 0.1) && (x > 5.0)); ; Membrane_VariableType; false +subdomain1::Size_cyt; vcRegionVolume('subdomain1'); ; Volume_Region_VariableType; false +subdomain0::Size_ec; vcRegionVolume('subdomain0'); ; Volume_Region_VariableType; false +subdomain0_subdomain1_membrane::Size_PM; vcRegionArea('subdomain0_subdomain1_membrane'); ; Membrane_Region_VariableType; false +subdomain0_subdomain1_membrane::sobj_subdomain11_subdomain00_size; vcRegionArea('subdomain0_subdomain1_membrane'); ; Membrane_Region_VariableType; false +subdomain0::vobj_subdomain00_size; vcRegionVolume('subdomain0'); ; Volume_Region_VariableType; false +subdomain1::vobj_subdomain11_size; vcRegionVolume('subdomain1'); ; Volume_Region_VariableType; false + diff --git a/vcell-core/src/test/resources/simdata/MembraneFrap3D/SimID_956955326_0_.fvinput b/vcell-core/src/test/resources/simdata/MembraneFrap3D/SimID_956955326_0_.fvinput new file mode 100644 index 0000000000..1789396258 --- /dev/null +++ b/vcell-core/src/test/resources/simdata/MembraneFrap3D/SimID_956955326_0_.fvinput @@ -0,0 +1,68 @@ +# Simulation Parameters +SIMULATION_PARAM_BEGIN +SOLVER SUNDIALS_PDE_SOLVER 1.0E-7 1.0E-9 0.1 +DISCONTINUITY_TIMES 1 0.1 +BASE_FILE_NAME /Users/schaff/.vcell/simdata/temp/SimID_956955326_0_ +ENDING_TIME 0.5 +TIME_STEP 0.1 +KEEP_EVERY 1 +SIMULATION_PARAM_END + +# Model description: FEATURE name handle boundary_conditions +MODEL_BEGIN +FEATURE subdomain1 1 flux flux flux flux flux flux +FEATURE subdomain0 0 flux flux flux flux flux flux +MEMBRANE subdomain0_subdomain1_membrane subdomain1 subdomain0 flux flux flux flux flux flux +MODEL_END + +# Mesh file +MESH_BEGIN +VCG_FILE /Users/schaff/.vcell/simdata/temp/SimID_956955326_0_.vcg +MESH_END + +# Variables : type name domain time_dependent_flag advection_flag grad_flag solve_whole_mesh_flag solve_regions +VARIABLE_BEGIN +MEMBRANE_PDE r_PM subdomain0_subdomain1_membrane false +MEMBRANE_PDE rf_PM subdomain0_subdomain1_membrane false +VARIABLE_END + +POST_PROCESSING_BLOCK_BEGIN +POST_PROCESSING_BLOCK_END + +COMPARTMENT_BEGIN subdomain1 + +COMPARTMENT_END + +COMPARTMENT_BEGIN subdomain0 + +COMPARTMENT_END + + +MEMBRANE_BEGIN subdomain0_subdomain1_membrane subdomain1 subdomain0 + +EQUATION_BEGIN r_PM +INITIAL 5.0; +RATE (50.0 * rf_PM * ((t < 0.1) && (x > 5.0))); +DIFFUSION 10.0; +BOUNDARY_XM 0.0; +BOUNDARY_XP 0.0; +BOUNDARY_YM 0.0; +BOUNDARY_YP 0.0; +BOUNDARY_ZM 0.0; +BOUNDARY_ZP 0.0; +EQUATION_END + +EQUATION_BEGIN rf_PM +INITIAL 5.0; +RATE - (50.0 * rf_PM * ((t < 0.1) && (x > 5.0))); +DIFFUSION 10.0; +BOUNDARY_XM 0.0; +BOUNDARY_XP 0.0; +BOUNDARY_YM 0.0; +BOUNDARY_YP 0.0; +BOUNDARY_ZM 0.0; +BOUNDARY_ZP 0.0; +EQUATION_END + +MEMBRANE_END + diff --git a/vcell-core/src/test/resources/simdata/MembraneFrap3D/SimID_956955326_0_.hdf5 b/vcell-core/src/test/resources/simdata/MembraneFrap3D/SimID_956955326_0_.hdf5 new file mode 100644 index 0000000000000000000000000000000000000000..b80468a05fad4c106f1505b1f1ab6b2de4476bd1 GIT binary patch literal 14080 zcmeHNU2IfE6h8MZUDi@UyStbM5!aMJV+7jn_QxN*L!_i6{4A6Z#E0!tSJ-5?i`~0Q zR03&CtbbVLLFA=MpfvoJzW@)Ws|i>F2}XFJPc9~CqCp#jDfWSS=gyhi?uOlK^>!6^ zrs+L*X3m+p-*?ZPnLWAhG%Z~=y?9nJ(Bg2w6e!hi`DGLf)Uy_&jtVU(C6t{gdu4Vb z0sR9g$M!NDKT~hr+QvrEH2L^kq8X%$*qwtn2w6}JG&L^qQ@|S#HTS0h^fOL|KNeU0 z?XlKSJRWY_Og)Mf!WAYcv-xk6jSaK~{nE^T8_;pnSJwm|MyNlq3}pImB_ioW|KY&a zg`=UkR#_ix4+l3zLd|MW4ae1RD{a&Y_vb2BHN7^kTD_F|Fprxa^jkhorXQOQSfC0L zOl907aT4xmlEfP9$P3@MY+66McO_{`(>Lf@pl6-)KB+c+CILG z4(-7CY_hz;MH>L_XnKa46K|>Q!LH;>W06wVwfw^TN;V##a%%1=c--6h5Ywa2NlP!* z2d1%lphGKHXQg;PA|;H8a^%%)f7vse>GS=u(0D9#ynKJ@Ln5}IEcK={qiXw0 zm0no8QLoOZ*JRXj97Es7`uTZ2a~+oedjbhcv>4%l)>w3FpeoQ7jD~bW8pDY8&*MOQ zz`rsOd^OY_+)NeZz9}PL4DSF~{Jhgfb;w7904)GtMW4{?yx(JIdRgX6w1rj88X$AN zXe<(HO+-TRg^B0_#Hy+B;i}#~XQR_42YMwcZ{jr2H=wtB?mJ(#2|hKZ1|wh{zUqKE zKClp9jS0SJxDBktSCbuIVkNNmXC*$b8NT2)OYwR0jL(+?-^*zW(3&);O3(y*Tb=mPv%KED}#m5(*HTdc$4<9|R(cfMC_W+ll&Cqt4 z`xMWd^hSEPr^Ptnv#PiX1_T3w0l|P^Krrw>Vn6~r`z?(7erA4=p98ow&o4Uk@nl)n zM>O(>QtDAg8%bkteE#r&os4a+Hw$y?HDGsY zQEt5^>>e^n$QyaNv0Ov$fi3DC(GQ+3V*BAt$MuuD2piUINV9(a7<)gZ<-Ee=CB^5Z zxp6{eR$In>YULJA%z1Huo49|%7X>p;W-5eGyZ5OF}n0TBm891w9p#DRYr2lAIU zO4hPxB~0LTeBP+%Kae-dA0JRB_!#$HqC`yjVBaPFyLrX@`NvMdhqge*^3KTzf)5_t zjPKkquWQu*=67<2Jw{PX^8?Qx^Ld373`~T9<&GI&7wwrt-v6;YaQXF5$fhp)ido<$ z>xZ9uq5qc(a_HBauiUvRlZ_+sU2{`!l5nr%Vh{OT>5lzz>ei@>G@$(sw7>A~bGyAx zH(A~CVak2Gg6u{6C20TFvF@#p{k%_EocJ__`GXkP}upDjLkM!EQ2_jIYlMV>|b4zzEcf8^BhWi!dJ>$N98*j+)6qJ04EL(((f zpPqeLIeDXbh5x*hc+vh1v_BGk`oO%phsk%!-JWk7#^(2<{o}T~p2N3pC@+3|VdLPX GGV&+Xg + + cloned from '3d image_generated' owned by user schaff +cloned from '3d image_generated' owned by user frm + 96485.3321 + 9.64853321E-5 + 1.0E-9 + 6.02214179E11 + 3.141592653589793 + 8314.46261815 + 300.0 + 1.0 + 1000.0 + 0.001660538783162726 + 1.0 + 10.0 + 5.0 + 10.0 + 5.0 + 50.0 + 0.0 + 1.0 + 1.0 + + + (Vmax * rf_PM * Laser_PM) + (AreaPerUnitArea_PM * Laser_PM_init_molecules_um_2) + (K_Laser_PM_total / AreaPerUnitArea_PM) + ((t < 0.1) && (x > 5.0)) + (VolumePerUnitVolume_cyt * vcRegionVolume('subdomain1')) + (VolumePerUnitVolume_ec * vcRegionVolume('subdomain0')) + (AreaPerUnitArea_PM * vcRegionArea('subdomain0_subdomain1_membrane')) + vcRegionArea('subdomain0_subdomain1_membrane') + vcRegionVolume('subdomain0') + vcRegionVolume('subdomain1') + + + + + + + + + + + + + + + + + + + + + + + + + J_bleaching1_mem + r_PM_diffusionRate + r_PM_init_molecules_um_2 + + + - J_bleaching1_mem + rf_PM_diffusionRate + rf_PM_init_molecules_um_2 + + + + + + cloned from '3d image_generated' owned by user schaff +cloned from '3d image_generated' owned by user frm + + + + mesh 101x101x36 elements +timestep 0.01 seconds + + + + + + + 2 + + 1 + + + + + + + + + + + + + + + ((((x - 5.0) ^ 2.0) + ((y - 5.0) ^ 2.0) + ((z - 5.0) ^ 2.0)) < (4.0 ^ 2.0)) + + + 1.0 + + + + + + + + + \ No newline at end of file