Skip to content

Commit

Permalink
Add vcell-web module (bug fix)
Browse files Browse the repository at this point in the history
  • Loading branch information
vcfrmgit committed Aug 5, 2021
1 parent 17e7db8 commit 21695cd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 23 deletions.
27 changes: 15 additions & 12 deletions vcell-web/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.vcell</groupId>
Expand All @@ -10,8 +12,14 @@

<artifactId>vcell-web</artifactId>

<name>Virtual Cell Project</name>
<description>The Virtual Cell client and server</description>
<!-- <name>vcell-web</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
-->
<name>vcell-web</name>
<description>VCell Data Export Web Interface</description>
<url>http://vcell.org/</url>
<inceptionYear>1997</inceptionYear>
<organization>
Expand Down Expand Up @@ -79,12 +87,7 @@
</properties>


<!-- <name>vcell-web</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
-->


<!-- * description: element is missing
* inceptionYear: element is missing
Expand Down Expand Up @@ -119,10 +122,10 @@
</dependency>

<!-- https://mvnrepository.com/artifact/org.hdfgroup/hdf-java -->
<dependency>
<!-- <dependency>
<groupId>org.hdfgroup</groupId>
<artifactId>hdf-java</artifactId>
<version>2.6.1</version>
</dependency>
</dependencies>
--> </dependencies>
</project>
16 changes: 5 additions & 11 deletions vcell-web/src/main/java/org/vcell/web/MainService.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@
import java.net.URLDecoder;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.security.KeyStore;
import java.security.SecureRandom;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
import java.text.DateFormat;
import java.util.ArrayList;
import java.util.Arrays;
Expand All @@ -42,7 +38,6 @@
import org.apache.http.HttpStatus;
import org.apache.http.NameValuePair;
import org.apache.http.client.utils.URLEncodedUtils;
import org.apache.http.entity.ByteArrayEntity;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.bootstrap.HttpServer;
Expand All @@ -52,7 +47,6 @@
import org.apache.http.ssl.SSLContexts;
import org.vcell.db.ConnectionFactory;
import org.vcell.db.DatabaseService;
import org.vcell.db.DatabaseSyntax;
import org.vcell.db.KeyFactory;
import org.vcell.util.ConfigurationException;
import org.vcell.util.DataAccessException;
Expand All @@ -71,8 +65,6 @@
import cbit.vcell.message.messages.MessageConstants;
import cbit.vcell.modeldb.AdminDBTopLevel;
import cbit.vcell.modeldb.DatabaseServerImpl;
import cbit.vcell.modeldb.DbDriver;
import cbit.vcell.modeldb.LocalAdminDbServer;
import cbit.vcell.resource.PropertyLoader;
import cbit.vcell.resource.ResourceUtil;
import cbit.vcell.simdata.Cachetable;
Expand Down Expand Up @@ -351,15 +343,17 @@ public int compare(BioModelInfo o1, BioModelInfo o2) {
if(bioModelContextName != null) {
//dataspaceName.replace("/", "fwdslsh");
int bmContextID = Hdf5Utils.createGroup(bioModelGroupID, bioModelContextName.replace("/", "fwdslsh"));
// ArrayList<IJSimInfo> ijSimInfos = new ArrayList<>();
Hdf5Utils.insertAttribute(bmContextID, "type", bioModelInfo.getBioModelChildSummary().getAppTypes()[i].toString());
Hdf5Utils.insertAttribute(bmContextID, "dim", bioModelInfo.getBioModelChildSummary().getGeometryDimensions()[i]+"");
Hdf5Utils.insertAttribute(bmContextID, "geoName", bioModelInfo.getBioModelChildSummary().getGeometryNames()[i]);
if(bioModelInfo.getBioModelChildSummary().getSimulationNames(bioModelContextName) != null &&
bioModelInfo.getBioModelChildSummary().getSimulationNames(bioModelContextName).length > 0) {
ArrayList<String> simNameArr = new ArrayList<String>();
for(String simName:bioModelInfo.getBioModelChildSummary().getSimulationNames(bioModelContextName)) {
simNameArr.add(simName);
// simNameArr.add((bioModelInfo.getSimID(simName)==null?"null":bioModelInfo.getSimID(simName).toString()));
// simNameArr.add((bioModelInfo.getSimID(simName)==null?"null":bioModelInfo.getSimID(simName).toString()));
}
Hdf5Utils.insertStrings(bmContextID, "sims", new long[] {2,bioModelInfo.getBioModelChildSummary().getSimulationNames(bioModelContextName).length},simNameArr);
Hdf5Utils.insertStrings(bmContextID, "sims", new long[] {bioModelInfo.getBioModelChildSummary().getSimulationNames(bioModelContextName).length,1},simNameArr);
}
H5.H5Gclose(bmContextID);
// IJContextInfo ijContextInfo = new IJContextInfo(bioModelContextName,bioModelInfo.getBioModelChildSummary().getAppTypes()[i],bioModelInfo.getBioModelChildSummary().getGeometryDimensions()[i],bioModelInfo.getBioModelChildSummary().getGeometryNames()[i],ijSimInfos);
Expand Down

0 comments on commit 21695cd

Please sign in to comment.