Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
136 changes: 86 additions & 50 deletions IRCT-API/pom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<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">
<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>edu.harvard.hms.dbmi.bd2k.irct</groupId>
Expand All @@ -7,6 +8,13 @@
</parent>
<artifactId>IRCT-API</artifactId>
<name>INTER-RESOURCE COMMUNICATION TOOL : API</name>

<properties>
<liquibase.version>3.5.3</liquibase.version>
<maven.compiler.version>1.7</maven.compiler.version>
<mysql-version>5.1.45</mysql-version>
</properties>

<description></description>
<dependencies>
<!-- APACHE HTTP CLIENT -->
Expand Down Expand Up @@ -63,59 +71,87 @@
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</dependency>


</dependencies>
<build>
<sourceDirectory>src/main/java</sourceDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<finalName>IRCT-API</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<downloadSources>true</downloadSources>
<downloadJavadocs>true</downloadJavadocs>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<includeScope>runtime</includeScope>
<outputDirectory>${project.build.directory}/dependency-jars/</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<downloadSources>true</downloadSources>
<downloadJavadocs>true</downloadJavadocs>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${maven.compiler.version}</source>
<target>${maven.compiler.version}</target>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<includeScope>runtime</includeScope>
<outputDirectory>${project.build.directory}/dependency-jars/</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>${liquibase.version}</version>
<configuration>
<propertyFileWillOverride>true</propertyFileWillOverride>
<propertyFile>edu/harvard/hms/dbmi/bd2k/irct/db/liquibase.properties</propertyFile>
<changeLogFile>edu/harvard/hms/dbmi/bd2k/irct/db/changelog-master.xml</changeLogFile>
<promptOnNonLocalDatabase>false</promptOnNonLocalDatabase>
</configuration>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>update</goal>
</goals>
</execution>
</executions>

<!-- specify your own driver -->
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql-version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.MapKeyColumn;
Expand All @@ -31,7 +32,7 @@ public class EventConverterImplementation implements Serializable {
private static final long serialVersionUID = -8700481468758389000L;

@Id
@GeneratedValue
@GeneratedValue(strategy = GenerationType.IDENTITY)
private long id;

private String name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;

import edu.harvard.hms.dbmi.bd2k.irct.model.join.JoinImplementation;
import edu.harvard.hms.dbmi.bd2k.irct.model.resource.Field;
import edu.harvard.hms.dbmi.bd2k.irct.util.converter.JoinImplementationConverter;

Expand All @@ -34,7 +34,7 @@ public class IRCTJoin implements Serializable {
private static final long serialVersionUID = 5173414123049320818L;

@Id
@GeneratedValue
@GeneratedValue(strategy = GenerationType.IDENTITY)
private long id;

private String name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,25 @@
import java.util.HashMap;
import java.util.Map;

import javax.persistence.CollectionTable;
import javax.persistence.Column;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.MapKeyColumn;
import javax.persistence.Transient;

@Entity
//@Entity
public class Join implements Serializable {

private static final long serialVersionUID = 4869490865776072674L;

@Id
@GeneratedValue
// @Id
// @GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

private JoinImplementation joinImplementation;

private IRCTJoin joinType;

@ElementCollection(fetch = FetchType.EAGER)
@MapKeyColumn(name = "name")
@Column(name = "value")
@CollectionTable(name = "where_values", joinColumns = @JoinColumn(name = "where_id"))
// @ElementCollection(fetch = FetchType.EAGER)
// @MapKeyColumn(name = "name")
// @Column(name = "value")
// @CollectionTable(name = "where_values", joinColumns = @JoinColumn(name = "where_id"))
private Map<String, String> stringValues;

@Transient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import javax.json.JsonObjectBuilder;
import javax.persistence.Convert;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Transient;
import java.util.ArrayList;
Expand All @@ -31,7 +32,7 @@ public class Entity {


@Id
@GeneratedValue
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

private String pui;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
Expand All @@ -35,7 +36,7 @@ public class IRCTProcess implements Serializable {
private static final long serialVersionUID = -1805899138692864630L;

@Id
@GeneratedValue
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

@ManyToOne
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import javax.json.JsonObjectBuilder;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
Expand All @@ -21,7 +22,7 @@
public abstract class ClauseAbstract {

@Id
@GeneratedValue
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;

Expand All @@ -30,7 +31,7 @@ public class JoinType implements Serializable {
private static final long serialVersionUID = 7650772906469344618L;

@Id
@GeneratedValue
@GeneratedValue(strategy = GenerationType.IDENTITY)
private long id;

private String name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;

Expand All @@ -36,7 +37,7 @@ public class PredicateType implements Serializable {
private static final long serialVersionUID = -8767223525164395205L;

@Id
@GeneratedValue
@GeneratedValue(strategy = GenerationType.IDENTITY)
private long id;

private String name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import javax.json.Json;
import javax.json.JsonObject;
import javax.json.JsonObjectBuilder;

import javax.persistence.*;
import java.io.Serializable;
import java.util.*;
Expand All @@ -22,12 +23,12 @@
*
*/
@Entity
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
@Inheritance(strategy = InheritanceType.JOINED)
public class Query implements Serializable {
private static final long serialVersionUID = -407606258205399129L;

@Id
@GeneratedValue
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String name;

Expand Down Expand Up @@ -133,6 +134,7 @@ public String toString() {
+ where;
}

@SuppressWarnings("unchecked")
public <T extends ClauseAbstract> List<T> getClausesOfType(
Class<T> clauseType) {
List<T> returns = new ArrayList<T>();
Expand Down Expand Up @@ -218,7 +220,7 @@ public final SubQuery getSubQuery(String id) {
* SubQuery ID
*/
public final void removeSubQuery(Long id) {
this.subQueries.remove(id);
this.subQueries.remove(Long.toString(id));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;

Expand All @@ -36,7 +37,7 @@ public class SelectOperationType implements Serializable {
private static final long serialVersionUID = -2715703805087374126L;

@Id
@GeneratedValue
@GeneratedValue(strategy = GenerationType.IDENTITY)
private long id;

private String name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;

Expand All @@ -38,7 +39,7 @@ public class SortOperationType implements Serializable {
private static final long serialVersionUID = -2715703805087374126L;

@Id
@GeneratedValue
@GeneratedValue(strategy = GenerationType.IDENTITY)
private long id;

private String name;
Expand Down
Loading