Skip to content

Commit

Permalink
update for PV3.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mkutmon committed Dec 19, 2024
1 parent a97ec37 commit aefa6b0
Show file tree
Hide file tree
Showing 8 changed files with 145 additions and 135 deletions.
250 changes: 129 additions & 121 deletions org.wikipathways.client/pom.xml
Original file line number Diff line number Diff line change
@@ -1,132 +1,140 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
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>
<groupId>org.wikipathways</groupId>
<artifactId>webservice.api.lib</artifactId>
<version>3.3.0-GPMLRDF-3</version>
<modelVersion>4.0.0</modelVersion>
<groupId>org.wikipathways</groupId>
<artifactId>webservice.api.lib</artifactId>
<version>3.4.0</version>

<name>Java library for WikiPathways webservice</name>
<packaging>bundle</packaging>
<name>Java library for WikiPathways webservice</name>
<packaging>bundle</packaging>
<repositories>
<repository>
<id>springsource</id>
<url>https://artifacts.camunda.com/artifactory/public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.9.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>5.9.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.bridgedb</groupId>
<artifactId>org.bridgedb.bio</artifactId>
<version>3.1.3-java8</version>
</dependency>
<dependency>
<groupId>org.jdom</groupId>
<artifactId>com.springsource.org.jdom</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.13</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<!-- You also need PathVisio Core which is not yet available as
Maven package, but can be install like this:
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.9.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>5.9.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.bridgedb</groupId>
<artifactId>org.bridgedb.bio</artifactId>
<version>3.0.22</version>
</dependency>
<dependency>
<groupId>org.jdom</groupId>
<artifactId>jdom-legacy</artifactId>
<version>1.1.3</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.13</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<!-- You also need PathVisio Core which is not yet available as Maven package, but can be install like this:
git clone https://github.com/egonw/pathvisio-1.git
git clone https://github.com/pathvisio/pathvisio.git
cd pathvisio
git checkout -b patch/bridgedb3.0.21 origin/patch/bridgedb3.0.21
ant clean core.jar
mvn install:install-file -Dfile=modules/org.pathvisio.core.jar -DgroupId=org.pathvisio \
-DartifactId=pathvisio-core -Dversion=3.4.0-bridgedb-3.0.22-1 -Dpackaging=jar
mvn install:install-file -Dfile=modules/org.pathvisio.core.jar
-DgroupId=org.pathvisio \
-DartifactId=pathvisio-core -Dversion=3.4.0 -Dpackaging=jar
-->
<groupId>org.pathvisio</groupId>
<artifactId>pathvisio-core</artifactId>
<version>3.4.0-bridgedb-3.0.22-1</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.14</version>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>10.15.2.0</version>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbyclient</artifactId>
<version>10.15.2.0</version>
</dependency>
</dependencies>
<groupId>org.pathvisio</groupId>
<artifactId>pathvisio-core</artifactId>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.14</version>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>10.15.2.0</version>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbyclient</artifactId>
<version>10.15.2.0</version>
</dependency>
</dependencies>

<build>
<sourceDirectory>src/</sourceDirectory>
<testSourceDirectory>test/</testSourceDirectory>
<resources>
<resource>
<directory>resources/</directory>
</resource>
</resources>
<plugins>
<!-- Generates the OSGi metadata based on the osgi.bnd file. -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>4.2.1</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-Name>org.wikipathways.webservice.api</Bundle-Name>
<Bundle-SymbolicName>org.wikipathways.webservice.api</Bundle-SymbolicName>
<Bundle-Version>3.3.0</Bundle-Version>
<Export-Package>org.pathvisio.wikipathways.webservice,org.wikipathways.client, org.wikipathways.client.utils}</Export-Package>
<Require-Bundle>org.pathvisio.core,org.bridgedb,org.bridgedb.bio,com.springsource.org.jdom,org.apache.commons.codec,org.apache.commons.io,org.apache.commons.logging</Require-Bundle>
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>3.0.0-M5</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
<build>
<sourceDirectory>src/</sourceDirectory>
<testSourceDirectory>test/</testSourceDirectory>
<resources>
<resource>
<directory>resources/</directory>
</resource>
</resources>
<plugins>
<!-- Generates the OSGi metadata based on the osgi.bnd file. -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>4.2.1</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-Name>org.wikipathways.webservice.api</Bundle-Name>
<Bundle-SymbolicName>org.wikipathways.webservice.api</Bundle-SymbolicName>
<Bundle-Version>3.3.0</Bundle-Version>
<Export-Package>org.pathvisio.wikipathways.webservice,org.wikipathways.client,
org.wikipathways.client.utils}</Export-Package>
<Require-Bundle>
org.pathvisio.core,org.bridgedb,org.bridgedb.bio,com.springsource.org.jdom,org.apache.commons.codec,org.apache.commons.io,org.apache.commons.logging</Require-Bundle>
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>3.0.0-M5</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package org.pathvisio.wikipathways.webservice;

import org.jdom.Namespace;
import org.jdom2.Namespace;

/**
* WP namespaces
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.message.BasicNameValuePair;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.input.SAXBuilder;
import org.jdom2.Document;
import org.jdom2.Element;
import org.jdom2.input.SAXBuilder;
import org.wikipathways.client.utils.Utils;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,8 @@
import java.util.TimeZone;

import org.apache.http.HttpHost;
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.impl.client.HttpClients;
import org.bridgedb.DataSource;
import org.bridgedb.Xref;
import org.bridgedb.bio.Organism;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.message.BasicNameValuePair;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.JDOMException;
import org.jdom.input.SAXBuilder;
import org.jdom2.Document;
import org.jdom2.Element;
import org.jdom2.JDOMException;
import org.jdom2.input.SAXBuilder;
import org.pathvisio.wikipathways.webservice.WSCurationTag;
import org.pathvisio.wikipathways.webservice.WSCurationTagHistory;
import org.pathvisio.wikipathways.webservice.WSHistoryRow;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ public void test() throws ConverterException, IOException {

// setting up a new cache will take quite some time!!
// change to existing cache directory if you already have one
WikiPathwaysCache cache = new WikiPathwaysCache(new File("cache"));
File dir = new File("cache");
dir.mkdir();
WikiPathwaysCache cache = new WikiPathwaysCache(dir);
cache.update();

File f = cache.getPathwayGpml("abc");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ public void setUp() throws Exception {

@Test
public void test() throws RemoteException {
String id = "WP4";
String id = "WP1";
Calendar c = Calendar.getInstance();
c.set(2011, 1, 1, 0, 0, 0);

WSPathwayHistory hist = client.getPathwayHistory(id, c.getTime());
assertTrue(hist.getHistory(0).getRevision().equals("40411"));
assertTrue(hist.getHistory(0).getRevision().equals("41296"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class TestLogin {
private WikiPathwaysClient client;

// define username and password in properties file:
// resources/user-properties.txt
// resources/user.properties
UserProperties props;

@Before
Expand All @@ -48,7 +48,9 @@ public void setUp() throws Exception {
public void test() {
try {
String username = props.getProperty("username");
System.out.println(username);
String password = props.getProperty("password");
System.out.println(password);
client.login(username, password);
} catch (RemoteException e) {
fail("Login failed: " + e.getMessage());
Expand Down

0 comments on commit aefa6b0

Please sign in to comment.