Skip to content

Commit

Permalink
Several fixes and minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
imedina committed Sep 16, 2016
1 parent f3cb35a commit 4914993
Show file tree
Hide file tree
Showing 7 changed files with 506 additions and 494 deletions.
26 changes: 13 additions & 13 deletions bionetdb-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@
<groupId>org.opencb.commons</groupId>
<artifactId>commons-lib</artifactId>
</dependency>
<dependency>
<groupId>org.sbml.libsbml</groupId>
<artifactId>libsbml</artifactId>
<systemPath>${basedir}/app/ext-libs/libsbmlj.jar</systemPath>
</dependency>
<!--<dependency>-->
<!--<groupId>org.sbml.libsbml</groupId>-->
<!--<artifactId>libsbml</artifactId>-->
<!--<systemPath>${basedir}/app/ext-libs/libsbmlj.jar</systemPath>-->
<!--</dependency>-->

<dependency>
<groupId>com.beust</groupId>
Expand Down Expand Up @@ -136,14 +136,14 @@
<arg value="${build.dir}"/>
</exec>

<echo>Copying ext-libs to ${build.dir}/libs</echo>
<exec executable="cp">
<arg value="${app.dir}/ext-libs/libsbml.so.5.11.4"/>
<arg value="${app.dir}/ext-libs/libsbml-static.a"/>
<arg value="${app.dir}/ext-libs/libsbmlj.jar"/>
<arg value="${app.dir}/ext-libs/libsbmlj.so"/>
<arg value="${build.dir}/libs/"/>
</exec>
<!--<echo>Copying ext-libs to ${build.dir}/libs</echo>-->
<!--<exec executable="cp">-->
<!--<arg value="${app.dir}/ext-libs/libsbml.so.5.11.4"/>-->
<!--<arg value="${app.dir}/ext-libs/libsbml-static.a"/>-->
<!--<arg value="${app.dir}/ext-libs/libsbmlj.jar"/>-->
<!--<arg value="${app.dir}/ext-libs/libsbmlj.so"/>-->
<!--<arg value="${build.dir}/libs/"/>-->
<!--</exec>-->
</target>
</configuration>
<goals>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,29 @@ public void execute() {
try {
Path inputPath = Paths.get(loadCommandOptions.input);
FileUtils.checkFile(inputPath);

// ObjectMapper objectMapper = new ObjectMapper();
// ObjectReader objectReader = objectMapper.readerFor(Network.class);
// Network network = objectReader.readValue(inputPath.toFile());


// From biopax
BioPaxParser bioPaxParser = new BioPaxParser("L3");
Network network = bioPaxParser.parse(inputPath);

if (loadCommandOptions.database == null || loadCommandOptions.database.isEmpty()) {
DatabaseConfiguration databaseConfiguration = createDatabaseConfigurationFromCLI("unknown", loadCommandOptions.host,
loadCommandOptions.port, loadCommandOptions.user, loadCommandOptions.password);
configuration.getDatabases().add(databaseConfiguration);
String database = loadCommandOptions.database;;
if (database == null || database.isEmpty()) {
if (configuration.getDatabases() != null && configuration.getDatabases().size() > 0) {
database = configuration.getDatabases().get(0).getId();
} else {
database = "unknown";
DatabaseConfiguration databaseConfiguration = createDatabaseConfigurationFromCLI("unknown",
loadCommandOptions.host, loadCommandOptions.port, loadCommandOptions.user, loadCommandOptions.password);
configuration.getDatabases().add(databaseConfiguration);
}
}

NetworkDBAdaptor networkDBAdaptor = new Neo4JNetworkDBAdaptor("unknown", configuration, true);
NetworkDBAdaptor networkDBAdaptor = new Neo4JNetworkDBAdaptor(database, configuration, true);
networkDBAdaptor.insert(network, null);

} catch (Exception e) {
Expand Down
12 changes: 6 additions & 6 deletions bionetdb-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<dependency>
<groupId>org.neo4j.driver</groupId>
<artifactId>neo4j-java-driver</artifactId>
<version>1.0.4</version>
<version>1.0.5</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
Expand All @@ -47,11 +47,11 @@
<groupId>org.biopax.paxtools</groupId>
<artifactId>paxtools-core</artifactId>
</dependency>
<dependency>
<groupId>org.sbml.libsbml</groupId>
<artifactId>libsbml</artifactId>
<systemPath>${basedir}/../bionetdb-app/app/ext-libs/libsbmlj.jar</systemPath>
</dependency>
<!--<dependency>-->
<!--<groupId>org.sbml.libsbml</groupId>-->
<!--<artifactId>libsbml</artifactId>-->
<!--<systemPath>${basedir}/../bionetdb-app/app/ext-libs/libsbmlj.jar</systemPath>-->
<!--</dependency>-->
<dependency>
<groupId>psidev.psi.mi</groupId>
<artifactId>psimitab</artifactId>
Expand Down
Loading

0 comments on commit 4914993

Please sign in to comment.