diff --git a/.gitignore b/.gitignore
index 3a2421a4c..bc2de3ae4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,6 @@ resources/geome_secrets.json
.idea/
build/
out/
+*.iml
+*.ipr
+*.iws
diff --git a/JBD_readme.md b/JBD_readme.md
new file mode 100644
index 000000000..d1a2710dc
--- /dev/null
+++ b/JBD_readme.md
@@ -0,0 +1,18 @@
+# JBD Readme
+
+Random notes about working in the LIMS development environmeent
+
+# if we ever get class conflicts of the same class name, some steps to rectify:
+NOTE: I believe this happens when i switch versions of geneious... doesn't seem to happen
+if i stay on a single geneious version or with a single genious API.
+there is probably a more elegant way to proceed here but this is what i've found helpful
+ * clean the Data directory or provide an entirely new one
+ * rm -fr /Library/Application\ Support/Geneious/plugins/com.biomatters.plugins.biocode.BiocodePlugin/
+ * rm -fr ~/.gradle/caches
+ * may have to clean gradle like ./gradlew clean
+
+# Quickly create a plugin, without running time-consuming Tests... Only for development
+# only run from the command line
+```
+./gradlew quickCreatePlugin
+```
diff --git a/PluginVersions.xml b/PluginVersions.xml
index d8c868537..5b1626a13 100644
--- a/PluginVersions.xml
+++ b/PluginVersions.xml
@@ -1,9 +1,10 @@
- 3.0.9
- https://github.com/biocodellc/biocode-lims/releases/download/3.0.9/BiocodePlugin_3_0_9.gplugin
- ==Biocode Plugin 3.0.9 - 6 March 2019==
- * Fix Project search bug
- * Add Genbank Metadata data properties to results list for Geome
+ 3.0.12
+ https://github.com/biocodellc/biocode-lims/releases/download/3.0.12/BiocodePlugin_3_0_12.gplugin
+ ==Biocode Plugin 3.0.12 - 14 May 2019==
+ * Fixes bug in fetching tissues for plates
+ * Fixes "Already connected" exception occuring in Geneious v9
+ * Changed behaviour when creating new extractions that use existing extractions ID's
diff --git a/build.gradle b/build.gradle
index 04937c8da..f3d2603e3 100644
--- a/build.gradle
+++ b/build.gradle
@@ -11,24 +11,22 @@ plugins {
id 'net.saliman.properties' version '1.4.5'
}
-println "Gradle " + GradleVersion.current().getVersion() + ' - ' + GradleVersion.current().getBuildTime() + ' - ' + GradleVersion.current().getRevision() + (GradleVersion.current().isSnapshot() ? " SNAPSHOT" : "")
+//println "Gradle " + GradleVersion.current().getVersion() + ' - ' + GradleVersion.current().getBuildTime() + ' - ' + GradleVersion.current().getRevision() + (GradleVersion.current().isSnapshot() ? " SNAPSHOT" : "")
apply plugin: "java"
apply plugin: "idea"
-version = '3.0.9'
+version = '3.0.12'
defaultTasks 'createPlugin';
-task wrapper(type: Wrapper) {
- gradleVersion = "3.5"
-}
-
ext {
shortName = "BiocodePlugin"
pluginName = "com.biomatters.plugins.biocode." + shortName
- geneiousPublicAPIVersion = "10.0.5"
+ geneiousPublicAPIVersion = "11.1.5"
+ //geneiousPublicAPIVersion = "2019.1.1"
+ //geneiousPublicAPIVersion = "9.0.5"
pluginDistFilename = "${shortName}_" + version.replaceAll("\\.", "_") + ".gplugin"
geneiousFilesName = "GeneiousFiles"
geneiousFilesPath = "$buildDir/$geneiousFilesName"
@@ -46,9 +44,11 @@ repositories {
}
dependencies {
+
compile group: "com.biomatters", name: "geneious.publicapi", version: "$geneiousPublicAPIVersion", configuration: "api", changing: true
compile group: "com.google.guava", name: "guava", version:"15.0"
+ compile group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.1'
compile group: "org.hsqldb", name:"hsqldb", version:"2.3.0"
compile group: "org.jcommon", name:"jcommon", version:"1.0"
compile group: "org.jfree", name:"jfreechart", version:"1.0.15"
@@ -71,7 +71,10 @@ dependencies {
compile group: "commons-beanutils", name:"commons-beanutils", version:"1.9.2"
compile group: "mysql", name:"mysql-connector-java", version:"5.1.6"
-
+ compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.8'
+ compile group: 'commons-httpclient', name: 'commons-httpclient', version: '3.1'
+ compile group: 'org.jsslutils', name: 'jsslutils', version: '1.0.8'
+
testCompile "junit:junit:4.+"
testRuntime group: "com.biomatters", name: "geneious.publicapi", version: "$geneiousPublicAPIVersion", configuration: "runtime"
@@ -165,6 +168,21 @@ sourceSets {
runtimeClasspath += fileTree("$geneiousFiles/lib")
}
}
+task quickCreatePlugin ( dependsOn: assemble, type: Zip) {
+ description "Creates the gplugin to install into Geneious"
+
+ from {
+ configurations.compile.filter {
+ !it.getName().startsWith("GeneiousPublicAPI-") && !it.getName().startsWith("jdom-") && !it.getName().startsWith("jebl-")
+ }
+ }
+ from(libsDir)
+ from(sourceSets.main.resources)
+ into "$pluginName"
+
+ archiveName pluginDistFilename
+}
+
task createPlugin(dependsOn: build, type: Zip) {
description "Creates the gplugin to install into Geneious"
@@ -181,6 +199,8 @@ task createPlugin(dependsOn: build, type: Zip) {
}
task runGeneious(dependsOn: [extractGeneiousRuntimeFiles, assemble], type: JavaExec) {
+ // NOTE, the expectation is that we java java 11 linked here
+ //executable '/usr/bin/java'
main 'com.biomatters.iseek.application.ISeekMain'
classpath sourceSets.main.runtimeClasspath
args 'extraPlugins=' + pluginName
diff --git a/development.md b/development.md
new file mode 100644
index 000000000..37504c255
--- /dev/null
+++ b/development.md
@@ -0,0 +1,67 @@
+## Developers Section
+This section is intended for developers interested in contributing to the Biocode LIMS development.
+
+## Requirements
+* Java Development Kit 1.6+
+* Gradle
+
+### Geneious Plugin
+Run the following command from the root directory to create the gplugin file:
+
+ ./gradlew createPlugin
+
+Drag and drop the gplugin file from the build/distributoin directory into Geneious to install the plugin.
+
+### LIMS Server (Under Development)
+The LIMS Server is packaged as a distributable WAR file that can be deployed on most Java Web Servers. (eg) Jetty
+or Apache Tomcat.
+
+Run the following command from the **biocode-server** directory to create the war file:
+
+ ./gradelw create-war
+
+The war file will be created in the biocode-server directory.
+
+## Development
+The development of this project follows the [Gitflow branching strategy](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow).
+All development is done in the develop branch and merged to master when complete. Thus master only contains released code.
+
+When switching branches it is always a good idea to run a build with
+
+ ./gradlew build-plugin
+
+This will ensure any dependency changes for the new branch are applied and everything compiles.
+
+### Modules
+The project currently contains two modules:
+
+* biocode-lims - The Geneious plugin
+* biocode-server - The unreleased server
+
+In most cases you will only need to make changes to the biocode-lims source code.
+
+
+### Dependency Management
+The plugin uses Apache Ivy for depenedency management and the repository includes everything that is required for its use.
+
+
+### Use of an IDE
+Many modern IDEs come with Apache Ivy integration. If you are using such a feature, please note that the biocode-server
+depends on some Geneious core classes and this is not reflected in the Ivy configuration. The main reason for this is
+ that the required libraries are not provided standalone in any repositories.
+
+In the gradle build, the complete Geneious runtime is downloaded and the required libraries are extracted from it.
+
+## Contributing
+Please contact support@mooreabiocode.org
+
+## Biocode LIMS Server
+The Biocode LIMS server is an extension to the original LIMS that adds security, user management, access control and
+the ability to offload tasks from the Geneious client.
+
+The server needs to be deployed in a compatible Java Web Application server and acts as a middle man between the
+client and the LIMS database. The client communicates with the server using a REST interface. By providing this
+interface rather than a proprietary one, there is the possibility of other future clients outside of the Geneious
+software package.
+
+It is currently in active development and has not been released yet.
diff --git a/doc/labbench_11.0_mysql.sql b/doc/labbench_11.0_mysql.sql
new file mode 100644
index 000000000..6459d0bbe
--- /dev/null
+++ b/doc/labbench_11.0_mysql.sql
@@ -0,0 +1,570 @@
+-- MySQL Administrator dump 1.4
+--
+-- ------------------------------------------------------
+-- Server version 5.0.45-community-nt
+
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8 */;
+
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+
+
+--
+-- You must first create a database and then "use" the database.
+-- CAREFUL!! This script drops tables if they exist within the
+-- database that you specify
+--
+
+--
+-- Definition of table `failure_reason`
+--
+
+DROP TABLE IF EXISTS `failure_reason`;
+CREATE TABLE failure_reason (
+ id INT AUTO_INCREMENT PRIMARY KEY,
+ name varchar(80),
+ description varchar(255)
+) ENGINE=INNODB;
+
+--
+-- Definition of table `assembly`
+--
+
+DROP TABLE IF EXISTS `assembly`;
+CREATE TABLE `assembly` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `extraction_id` varchar(45) NOT NULL,
+ `workflow` int(10) unsigned NOT NULL,
+ `progress` varchar(45) NOT NULL,
+ `consensus` longtext,
+ `params` longtext,
+ `coverage` float,
+ `disagreements` int(10) unsigned,
+ `edits` longtext,
+ `reference_seq_id` int(10) unsigned,
+ `confidence_scores` longtext,
+ `trim_params_fwd` longtext,
+ `trim_params_rev` longtext,
+ `other_processing_fwd` longtext,
+ `other_processing_rev` longtext,
+ `date` timestamp NOT NULL default CURRENT_TIMESTAMP,
+ `submitted` tinyint(1) NOT NULL default '0',
+ `editrecord` longtext,
+ `notes` longtext,
+ `technician` varchar(255),
+ `bin` varchar(255),
+ `ambiguities` int(10),
+ `failure_reason` int,
+ `failure_notes` longtext,
+ PRIMARY KEY (`id`),
+ KEY `FK_assembly_1` (`workflow`),
+ CONSTRAINT `FK_assembly_1` FOREIGN KEY (`workflow`) REFERENCES `workflow` (`id`),
+ KEY `FK_assembly_2` (`failure_reason`),
+ CONSTRAINT `FK_assembly_2` FOREIGN KEY (`failure_reason`) REFERENCES `failure_reason` (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
+
+--
+-- Dumping data for table `assembly`
+--
+
+/*!40000 ALTER TABLE `assembly` DISABLE KEYS */;
+/*!40000 ALTER TABLE `assembly` ENABLE KEYS */;
+
+
+--
+-- Definition of table `cycle`
+--
+
+DROP TABLE IF EXISTS `cycle`;
+CREATE TABLE `cycle` (
+ `id` int(11) NOT NULL auto_increment,
+ `thermocycleId` int(11) default NULL,
+ `repeats` int(11) default NULL,
+ PRIMARY KEY (`id`),
+ KEY `thermocycleId` (`thermocycleId`),
+ CONSTRAINT `thermocycleId` FOREIGN KEY (`thermocycleId`) REFERENCES `thermocycle` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
+) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
+
+--
+-- Dumping data for table `cycle`
+--
+
+/*!40000 ALTER TABLE `cycle` DISABLE KEYS */;
+INSERT INTO `cycle` (`id`,`thermocycleId`,`repeats`) VALUES
+ (7,15,1),
+ (8,15,25),
+ (9,15,1);
+/*!40000 ALTER TABLE `cycle` ENABLE KEYS */;
+
+
+--
+-- Definition of table `cyclesequencing`
+--
+
+DROP TABLE IF EXISTS `cyclesequencing`;
+CREATE TABLE `cyclesequencing` (
+ `id` int(11) NOT NULL auto_increment,
+ `primerName` varchar(64) NOT NULL,
+ `primerSequence` varchar(999) NOT NULL,
+ `notes` longtext NOT NULL,
+ `date` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
+ `workflow` int(10) unsigned default NULL,
+ `thermocycle` int(11) NOT NULL,
+ `plate` int(10) unsigned NOT NULL,
+ `location` int(11) NOT NULL,
+ `extractionId` varchar(45) NOT NULL,
+ `technician` varchar(90) NOT NULL,
+ `cocktail` int(10) unsigned default NULL,
+ `progress` varchar(45) NOT NULL,
+ `cleanupPerformed` tinyint(1) NOT NULL default '0',
+ `cleanupMethod` varchar(99) NOT NULL,
+ `direction` varchar(32) NOT NULL,
+ `gelimage` longblob,
+ PRIMARY KEY (`id`),
+ KEY `cycle_thermocycle` (`thermocycle`),
+ KEY `FK_cyclesequencing_plate` (`plate`),
+ KEY `FK_cyclesequencing_workflow` (`workflow`),
+ KEY `FK_cyclesequencing_cocktail` (`cocktail`),
+ CONSTRAINT `FK_cyclesequencing_cocktail` FOREIGN KEY (`cocktail`) REFERENCES `cyclesequencing_cocktail` (`id`),
+ CONSTRAINT `FK_cyclesequencing_plate` FOREIGN KEY (`plate`) REFERENCES `plate` (`id`),
+ CONSTRAINT `FK_cyclesequencing_workflow` FOREIGN KEY (`workflow`) REFERENCES `workflow` (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
+
+--
+-- Dumping data for table `cyclesequencing`
+--
+
+/*!40000 ALTER TABLE `cyclesequencing` DISABLE KEYS */;
+/*!40000 ALTER TABLE `cyclesequencing` ENABLE KEYS */;
+
+
+--
+-- Definition of table `cyclesequencing_cocktail`
+--
+
+DROP TABLE IF EXISTS `cyclesequencing_cocktail`;
+CREATE TABLE `cyclesequencing_cocktail` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `name` varchar(99) NOT NULL,
+ `ddh2o` double NOT NULL,
+ `buffer` double NOT NULL,
+ `bigDye` double NOT NULL,
+ `notes` longtext NOT NULL,
+ `bufferConc` double NOT NULL,
+ `bigDyeConc` double NOT NULL,
+ `templateConc` double NOT NULL,
+ `primerConc` double NOT NULL,
+ `primerAmount` double NOT NULL,
+ `extraItem` mediumtext NOT NULL,
+ `extraItemAmount` double NOT NULL,
+ `templateAmount` double NOT NULL default '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `cyclesequencing_cocktail`
+--
+
+/*!40000 ALTER TABLE `cyclesequencing_cocktail` DISABLE KEYS */;
+INSERT INTO `cyclesequencing_cocktail` (`id`,`name`,`ddh2o`,`buffer`,`bigDye`,`notes`,`bufferConc`,`bigDyeConc`,`templateConc`,`primerConc`,`primerAmount`,`extraItem`,`extraItemAmount`) VALUES
+ (0,'No Cocktail',0,0,0,' ',0,0,0,0,0,' ',0);
+/*!40000 ALTER TABLE `cyclesequencing_cocktail` ENABLE KEYS */;
+
+
+--
+-- Definition of table `cyclesequencing_thermocycle`
+--
+
+DROP TABLE IF EXISTS `cyclesequencing_thermocycle`;
+CREATE TABLE `cyclesequencing_thermocycle` (
+ `id` int(11) NOT NULL auto_increment,
+ `cycle` int(11) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `cyclesequencing_thermocycle`
+--
+
+/*!40000 ALTER TABLE `cyclesequencing_thermocycle` DISABLE KEYS */;
+INSERT INTO `cyclesequencing_thermocycle` (`id`,`cycle`) VALUES
+ (1,15);
+/*!40000 ALTER TABLE `cyclesequencing_thermocycle` ENABLE KEYS */;
+
+
+--
+-- Definition of table `databaseversion`
+--
+
+DROP TABLE IF EXISTS `databaseversion`;
+CREATE TABLE `databaseversion` (
+ `version` int(10) unsigned NOT NULL,
+ PRIMARY KEY (`version`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `databaseversion`
+--
+
+/*!40000 ALTER TABLE `databaseversion` DISABLE KEYS */;
+INSERT INTO `databaseversion` (`version`) VALUES
+ (11);
+/*!40000 ALTER TABLE `databaseversion` ENABLE KEYS */;
+
+
+--
+-- Definition of table `extraction`
+--
+
+DROP TABLE IF EXISTS `extraction`;
+CREATE TABLE `extraction` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `date` timestamp NOT NULL default CURRENT_TIMESTAMP,
+ `method` varchar(45) NOT NULL,
+ `volume` double NOT NULL,
+ `dilution` double default NULL,
+ `concentrationStored` tinyint(1) NOT NULL default '0',
+ `concentration` double NOT NULL default '0',
+ `parent` varchar(45) NOT NULL,
+ `technician` varchar(90) NOT NULL,
+ `sampleId` varchar(45) NOT NULL,
+ `extractionId` varchar(45) NOT NULL,
+ `control` varchar(45) NOT NULL,
+ `plate` int(10) unsigned NOT NULL,
+ `location` int(10) unsigned NOT NULL,
+ `notes` longtext NOT NULL,
+ `gelimage` longblob,
+ `extractionBarcode` varchar(45) NOT NULL,
+ `previousPlate` varchar(45) NOT NULL,
+ `previousWell` varchar(45) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `ind_extraction_3` (`extractionId`),
+ KEY `FK_extraction_plate` (`plate`)
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
+
+--
+-- Dumping data for table `extraction`
+--
+
+/*!40000 ALTER TABLE `extraction` DISABLE KEYS */;
+/*!40000 ALTER TABLE `extraction` ENABLE KEYS */;
+
+
+--
+-- Definition of table `gelimages`
+--
+
+DROP TABLE IF EXISTS `gelimages`;
+CREATE TABLE `gelimages` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `name` VARCHAR(45) DEFAULT 'Image' NOT NULL,
+ `plate` int(11) NOT NULL default '0',
+ `imageData` longblob,
+ `notes` longtext NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `pcrImage` (`plate`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `gelimages`
+--
+
+/*!40000 ALTER TABLE `gelimages` DISABLE KEYS */;
+/*!40000 ALTER TABLE `gelimages` ENABLE KEYS */;
+
+
+--
+-- Definition of table `pcr`
+--
+
+DROP TABLE IF EXISTS `pcr`;
+CREATE TABLE `pcr` (
+ `id` int(11) NOT NULL auto_increment,
+ `prName` varchar(64) default NULL,
+ `prSequence` varchar(999) default NULL,
+ `date` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
+ `workflow` int(10) unsigned default NULL,
+ `plate` int(10) unsigned NOT NULL,
+ `location` int(11) NOT NULL,
+ `cocktail` int(10) unsigned NOT NULL,
+ `progress` varchar(45) NOT NULL,
+ `extractionId` varchar(45) NOT NULL,
+ `technician` varchar(90) NOT NULL,
+ `thermocycle` int(11) NOT NULL default '-1',
+ `cleanupPerformed` tinyint(1) NOT NULL default '0',
+ `cleanupMethod` varchar(45) NOT NULL,
+ `notes` longtext NOT NULL,
+ `revPrName` varchar(64) NOT NULL,
+ `revPrSequence` varchar(999) NOT NULL,
+ `gelimage` longblob,
+ PRIMARY KEY (`id`),
+ KEY `ind_pcr_plate` (`plate`),
+ KEY `FK_pcr_workflow` (`workflow`),
+ KEY `FK_pcr_cocktail` (`cocktail`),
+ CONSTRAINT `FK_pcr_cocktail` FOREIGN KEY (`cocktail`) REFERENCES `pcr_cocktail` (`id`),
+ CONSTRAINT `FK_pcr_plate` FOREIGN KEY (`plate`) REFERENCES `plate` (`id`),
+ CONSTRAINT `FK_pcr_workflow` FOREIGN KEY (`workflow`) REFERENCES `workflow` (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
+
+--
+-- Dumping data for table `pcr`
+--
+
+/*!40000 ALTER TABLE `pcr` DISABLE KEYS */;
+/*!40000 ALTER TABLE `pcr` ENABLE KEYS */;
+
+
+--
+-- Definition of table `pcr_cocktail`
+--
+
+DROP TABLE IF EXISTS `pcr_cocktail`;
+CREATE TABLE `pcr_cocktail` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `name` varchar(99) NOT NULL,
+ `ddH20` double NOT NULL,
+ `buffer` double NOT NULL,
+ `mg` double NOT NULL,
+ `bsa` double NOT NULL,
+ `dNTP` double NOT NULL,
+ `taq` double NOT NULL,
+ `notes` longtext NOT NULL,
+ `bufferConc` double NOT NULL,
+ `mgConc` double NOT NULL,
+ `dNTPConc` double NOT NULL,
+ `taqConc` double NOT NULL,
+ `templateConc` double NOT NULL,
+ `bsaConc` double NOT NULL,
+ `fwPrAmount` double NOT NULL,
+ `fwPrConc` double NOT NULL,
+ `revPrAmount` double NOT NULL,
+ `revPrConc` double NOT NULL,
+ `extraItem` mediumtext NOT NULL,
+ `extraItemAmount` double NOT NULL,
+ `templateAmount` double NOT NULL default '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `pcr_cocktail`
+--
+
+/*!40000 ALTER TABLE `pcr_cocktail` DISABLE KEYS */;
+INSERT INTO `pcr_cocktail` (`id`,`name`,`ddH20`,`buffer`,`mg`,`bsa`,`dNTP`,`taq`,`notes`,`bufferConc`,`mgConc`,`dNTPConc`,`taqConc`,`templateConc`,`bsaConc`,`fwPrAmount`,`fwPrConc`,`revPrAmount`,`revPrConc`,`extraItem`,`extraItemAmount`) VALUES
+ (0,'No Cocktail',0,0,0,0,0,0,' ',0,0,0,0,0,0,0,0,0,0,' ',0);
+/*!40000 ALTER TABLE `pcr_cocktail` ENABLE KEYS */;
+
+
+--
+-- Definition of table `pcr_thermocycle`
+--
+
+DROP TABLE IF EXISTS `pcr_thermocycle`;
+CREATE TABLE `pcr_thermocycle` (
+ `id` int(11) NOT NULL auto_increment,
+ `cycle` int(11) default NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `pcr_thermocycle`
+--
+
+/*!40000 ALTER TABLE `pcr_thermocycle` DISABLE KEYS */;
+INSERT INTO `pcr_thermocycle` (`id`,`cycle`) VALUES
+ (2,15);
+/*!40000 ALTER TABLE `pcr_thermocycle` ENABLE KEYS */;
+
+
+--
+-- Definition of table `plate`
+--
+
+DROP TABLE IF EXISTS `plate`;
+CREATE TABLE `plate` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `name` varchar(64) NOT NULL default 'plate',
+ `date` date NOT NULL,
+ `size` int(11) NOT NULL,
+ `type` varchar(45) NOT NULL,
+ `thermocycle` int(11) NOT NULL default '-1',
+ PRIMARY KEY USING BTREE (`id`,`name`)
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `plate`
+--
+
+/*!40000 ALTER TABLE `plate` DISABLE KEYS */;
+/*!40000 ALTER TABLE `plate` ENABLE KEYS */;
+
+
+--
+-- Definition of table `state`
+--
+
+DROP TABLE IF EXISTS `state`;
+CREATE TABLE `state` (
+ `id` int(11) NOT NULL auto_increment,
+ `temp` int(11) unsigned NOT NULL,
+ `length` int(11) unsigned NOT NULL,
+ `cycleId` int(11) default NULL,
+ PRIMARY KEY (`id`),
+ KEY `cycleId` (`cycleId`),
+ CONSTRAINT `cycleId` FOREIGN KEY (`cycleId`) REFERENCES `cycle` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
+) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
+
+--
+-- Dumping data for table `state`
+--
+
+/*!40000 ALTER TABLE `state` DISABLE KEYS */;
+INSERT INTO `state` (`id`,`temp`,`length`,`cycleId`) VALUES
+ (15,20,60,7),
+ (16,90,30,8),
+ (17,55,120,8),
+ (18,75,30,8),
+ (19,20,540,9);
+/*!40000 ALTER TABLE `state` ENABLE KEYS */;
+
+
+--
+-- Definition of table `thermocycle`
+--
+
+DROP TABLE IF EXISTS `thermocycle`;
+CREATE TABLE `thermocycle` (
+ `id` int(11) NOT NULL auto_increment,
+ `name` varchar(64) default NULL,
+ `notes` longtext NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `thermocycle`
+--
+
+/*!40000 ALTER TABLE `thermocycle` DISABLE KEYS */;
+INSERT INTO `thermocycle` (`id`,`name`,`notes`) VALUES
+ (15,'Example Thermocycle','An example cycle...');
+/*!40000 ALTER TABLE `thermocycle` ENABLE KEYS */;
+
+
+--
+-- Definition of table `workflow`
+--
+
+DROP TABLE IF EXISTS `workflow`;
+CREATE TABLE `workflow` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `name` varchar(45) NOT NULL default 'workflow',
+ `date` date NOT NULL,
+ `extractionId` int(10) unsigned NOT NULL,
+ `locus` varchar(45) NOT NULL default 'COI',
+ PRIMARY KEY USING BTREE (`id`),
+ UNIQUE KEY `ind_workflow_3` (`name`),
+ KEY `FK_workflow_extraction` (`extractionId`),
+ CONSTRAINT `FK_workflow_extraction` FOREIGN KEY (`extractionId`) REFERENCES `extraction` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `workflow`
+--
+
+/*!40000 ALTER TABLE `workflow` DISABLE KEYS */;
+/*!40000 ALTER TABLE `workflow` ENABLE KEYS */;
+
+--
+-- Definition of table `traces`
+--
+DROP TABLE IF EXISTS `traces`;
+CREATE TABLE `traces` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `reaction` int(11) NOT NULL,
+ `name` varchar(96) NOT NULL,
+ `data` longblob NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `FK_traces_1` (`reaction`),
+ CONSTRAINT `FK_traces_1` FOREIGN KEY (`reaction`) REFERENCES `cyclesequencing` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
+
+
+--
+-- Definition of table `properties`
+--
+CREATE TABLE properties (
+ name VARCHAR(255) PRIMARY KEY,
+ value VARCHAR(255)
+) ENGINE=INNODB;
+
+--
+-- Dumping data for table `properties`
+--
+INSERT INTO properties (name,value) VALUES
+ ('fullDatabaseVersion', '11.0');
+
+--
+-- Definition of table `sequencing_result`
+--
+CREATE TABLE sequencing_result (
+ reaction INT(11) NULL,
+ assembly INT(10) UNSIGNED NULL,
+ PRIMARY KEY (reaction, assembly),
+ FOREIGN KEY(reaction) REFERENCES cyclesequencing(id) ON DELETE CASCADE,
+ FOREIGN KEY(assembly) REFERENCES assembly(id) ON DELETE CASCADE
+) ENGINE=INNODB;
+
+CREATE TABLE gel_quantification (
+ id int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
+ `date` timestamp NOT NULL default CURRENT_TIMESTAMP,
+ extractionId INT(10) UNSIGNED NOT NULL,
+ plate int(10) UNSIGNED NOT NULL,
+ location int(10) UNSIGNED NOT NULL,
+ technician VARCHAR(255),
+ notes LONGTEXT,
+ volume DOUBLE,
+ gelImage longblob,
+ gelBuffer VARCHAR(255),
+ gelConc DOUBLE,
+ stain VARCHAR(255),
+ stainConc VARCHAR(255),
+ stainMethod VARCHAR(255),
+ gelLadder VARCHAR(255),
+ threshold INTEGER,
+ aboveThreshold INTEGER,
+ PRIMARY KEY (id),
+ FOREIGN KEY (extractionId) REFERENCES extraction(id) ON DELETE CASCADE ,
+ FOREIGN KEY (plate) REFERENCES plate(id) ON DELETE CASCADE
+) ENGINE=InnoDB AUTO_INCREMENT=1;
+
+/*!40000 ALTER TABLE `traces` DISABLE KEYS */;
+/*!40000 ALTER TABLE `traces` ENABLE KEYS */;
+
+
+
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+
+CREATE INDEX plate_name ON plate (name);
+CREATE INDEX workflow_date ON workflow (date);
+CREATE INDEX workflow_locus ON workflow (locus);
+CREATE INDEX plate_type ON plate (type);
+CREATE INDEX plate_date ON plate (date);
+CREATE INDEX extraction_extractionBarcode ON extraction (extractionBarcode);
+CREATE INDEX extraction_date ON extraction (date);
+CREATE INDEX assembly_progress ON assembly (progress);
+CREATE INDEX assembly_submitted ON assembly (submitted);
+CREATE INDEX assembly_technician ON assembly (technician);
+CREATE INDEX assembly_date ON assembly (date);
+CREATE INDEX extraction_sampleId ON extraction (sampleId);
diff --git a/doc/release_notes.txt b/doc/release_notes.txt
index f7fb33ff4..c3cf9811b 100644
--- a/doc/release_notes.txt
+++ b/doc/release_notes.txt
@@ -1,3 +1,14 @@
+==Biocode Plugin 3.0.11 - 14 May 2019==
+* Fixes bug in fetching tissues for plates
+* Fixes "Already connected" exception occuring in Geneious v9
+* Changed behaviour when creating new extractions that use existing extractions ID's
+
+==Biocode Plugin 3.0.11 - 5 April 2019==
+* Fixes error in fetching REF assemblies
+
+==Biocode Plugin 3.0.10 - 26 March 2019==
+* Enabled OR queries for Geome
+
==Biocode Plugin 3.0.9 - 6 March 2019==
* Fixed bug where queries on Geome Project were crashing application
* Added genbankCountry, genbankDate, and genbankLatLng to output data properties
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 299769e9a..74aa43d43 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.3-all.zip
diff --git a/readme.md b/readme.md
index 420ecc43c..e852b33e4 100644
--- a/readme.md
+++ b/readme.md
@@ -1,76 +1,13 @@
# Biocode LIMS
-The Biocode LIMS is a Geneious plugin that was developed as part of the [Moorea Biocode Project](http://mooreabiocode.org).
-It comprises everything you need to manage your lab and sequence analysis workflows.
-
-### Biocode LIMS Server
-The Biocode LIMS server is an extension to the original LIMS that adds security, user management, access control and
-the ability to offload tasks from the Geneious client.
-
-The server needs to be deployed in a compatible Java Web Application server and acts as a middle man between the
-client and the LIMS database. The client communicates with the server using a REST interface. By providing this
-interface rather than a proprietary one, there is the possibility of other future clients outside of the Geneious
-software package.
-
-It is currently in active development and has not been released yet.
+
+The Biocode LIMS is a Geneious plugin that comprises everything you need to manage your lab and sequence analysis workflows. For information on how to use the Biocode LIMS and to download the plugin visit our [Wiki Page](https://github.com/biocodellc/biocode-lims/wiki).
## Useful Information
-* Official releases are available from the [official website](https://github.com/biocodellc/biocode-lims/releases)
-* Official wiki at [https://github.com/biocodellc/biocode-lims/](https://github.com/biocodellc/biocode-lims/) for more information
+* Official releases are available from our [releases page](https://github.com/biocodellc/biocode-lims/releases)
+* Official [Wiki Page](https://github.com/biocodellc/biocode-lims/wiki) for more information
including the user guide.
-* Discussion forum at [http://connect.barcodeoflife.net/group/lims](http://connect.barcodeoflife.net/group/lims)
* Support email support@mooreabiocode.org
+* Information for developers on contributing to the Biocode LIMS plugin is on our [development page](https://github.com/biocodellc/biocode-lims/blob/develop/development.md)
-## Requirements
-* Java Development Kit 1.6+
-* Gradle
-
-## Installation
-### Geneious Plugin
-Run the following command from the root directory to create the gplugin file:
-
- ./gradlew createPlugin
-
-Drag and drop the gplugin file from the build/distributoin directory into Geneious to install the plugin.
-
-### LIMS Server (Under Development)
-The LIMS Server is packaged as a distributable WAR file that can be deployed on most Java Web Servers. (eg) Jetty
-or Apache Tomcat.
-
-Run the following command from the **biocode-server** directory to create the war file:
-
- ./gradelw create-war
-
-The war file will be created in the biocode-server directory.
-
-## Development
-The development of this project follows the [Gitflow branching strategy](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow).
-All development is done in the develop branch and merged to master when complete. Thus master only contains released code.
-
-When switching branches it is always a good idea to run a build with
-
- ./gradlew build-plugin
-
-This will ensure any dependency changes for the new branch are applied and everything compiles.
-
-### Modules
-The project currently contains two modules:
-
-* biocode-lims - The Geneious plugin
-* biocode-server - The unreleased server
-
-In most cases you will only need to make changes to the biocode-lims source code.
-
-
-### Dependency Management
-The plugin uses Apache Ivy for depenedency management and the repository includes everything that is required for its use.
-
-
-### Use of an IDE
-Many modern IDEs come with Apache Ivy integration. If you are using such a feature, please note that the biocode-server
-depends on some Geneious core classes and this is not reflected in the Ivy configuration. The main reason for this is
- that the required libraries are not provided standalone in any repositories.
-In the gradle build, the complete Geneious runtime is downloaded and the required libraries are extracted from it.
-## Contributing
-Please contact support@mooreabiocode.org
diff --git a/src/com/biomatters/plugins/biocode/BiocodePlugin.java b/src/com/biomatters/plugins/biocode/BiocodePlugin.java
index 0a641b511..32a955bce 100644
--- a/src/com/biomatters/plugins/biocode/BiocodePlugin.java
+++ b/src/com/biomatters/plugins/biocode/BiocodePlugin.java
@@ -47,7 +47,7 @@ public class BiocodePlugin extends GeneiousPlugin {
}
private static GeneiousActionOptions superBiocodeAction;
- public static final String PLUGIN_VERSION = "3.0.9";
+ public static final String PLUGIN_VERSION = "3.0.12";
public static final String SUPPORT_EMAIL = "support@mooreabiocode.org";
public static GeneiousActionOptions getSuperBiocodeAction() {
diff --git a/src/com/biomatters/plugins/biocode/labbench/BiocodeService.java b/src/com/biomatters/plugins/biocode/labbench/BiocodeService.java
index 9fa78d345..c22f5e669 100644
--- a/src/com/biomatters/plugins/biocode/labbench/BiocodeService.java
+++ b/src/com/biomatters/plugins/biocode/labbench/BiocodeService.java
@@ -302,10 +302,10 @@ public static Map getSearchDownloadOptions(boolean tissues, bool
public static FIMSConnection[] getFimsConnections() {
return new FIMSConnection[] {
new ExcelFimsConnection(),
- new FusionTablesFimsConnection(),
+ //new FusionTablesFimsConnection(),
new MySQLFimsConnection(),
new MooreaFimsConnection(),
- new TAPIRFimsConnection(),
+ //new TAPIRFimsConnection(),
new BiocodeFIMSConnection(),
new geomeFIMSConnection()
};
@@ -721,6 +721,18 @@ public void addDatabaseServiceListener(DatabaseServiceListener listener) {
super.addDatabaseServiceListener(listener);
listener.searchableStatusChanged(isLoggedIn, loggedOutMessage);
}
+
+ /**
+ *
+ * @param urns
+ * @param callback
+ * 11 geneious reports this error having to do with urns: contained
+ * in XML responses and requiring this method. However, JBD is fairly certain nothing
+ * needs to be done with this information.
+ */
+ public void retrieve(URN[] urns, RetrieveCallback callback) {
+ //do nothing
+ }
public void retrieve(Query query, RetrieveCallback callback, URN[] urnsToNotRetrieve) throws DatabaseServiceException {
retrieve(query, callback, urnsToNotRetrieve, false);
diff --git a/src/com/biomatters/plugins/biocode/labbench/fims/MooreaFimsConnection.java b/src/com/biomatters/plugins/biocode/labbench/fims/MooreaFimsConnection.java
index 8acf21a20..1c04f6851 100644
--- a/src/com/biomatters/plugins/biocode/labbench/fims/MooreaFimsConnection.java
+++ b/src/com/biomatters/plugins/biocode/labbench/fims/MooreaFimsConnection.java
@@ -68,7 +68,7 @@ public String getName() {
}
public String getDescription() {
- return "A connection to the Moorea FIMS database";
+ return "Connection to Moorea Biocode (FIMS1) at http://biocode.berkeley.edu/";
}
public PasswordOptions getConnectionOptions() {
diff --git a/src/com/biomatters/plugins/biocode/labbench/fims/TableFimsConnection.java b/src/com/biomatters/plugins/biocode/labbench/fims/TableFimsConnection.java
index 79de59994..4bb8c9d77 100644
--- a/src/com/biomatters/plugins/biocode/labbench/fims/TableFimsConnection.java
+++ b/src/com/biomatters/plugins/biocode/labbench/fims/TableFimsConnection.java
@@ -136,7 +136,7 @@ List getFieldsFromMultipleOptions(TableFimsConnectionOptions opti
public DocumentField getTableCol(String colName) {
if(fields != null) {
for(DocumentField field : fields) {
- if(field.getCode().equals(colName)) {
+ if(field.getCode().equalsIgnoreCase(colName)) {
return field;
}
}
diff --git a/src/com/biomatters/plugins/biocode/labbench/fims/biocode/BiocodeFIMSConnection.java b/src/com/biomatters/plugins/biocode/labbench/fims/biocode/BiocodeFIMSConnection.java
index f39d495f0..5307c9c50 100644
--- a/src/com/biomatters/plugins/biocode/labbench/fims/biocode/BiocodeFIMSConnection.java
+++ b/src/com/biomatters/plugins/biocode/labbench/fims/biocode/BiocodeFIMSConnection.java
@@ -52,7 +52,7 @@ private static boolean serverProbablyDeployed() {
@Override
public String getLabel() {
- return "Biocode FIMS";
+ return "BiSciCol FIMS";
}
@Override
@@ -62,7 +62,7 @@ public String getName() {
@Override
public String getDescription() {
- return "Connection to the new Biocode FIMS (https://github.com/biocodellc/biocode-fims)";
+ return "Connection to BiSciCol (FIMS2) at https://www.biscicol.org/";
}
private Map> cachedSamples = new HashMap>();
diff --git a/src/com/biomatters/plugins/biocode/labbench/fims/geome/geomeFIMSClient.java b/src/com/biomatters/plugins/biocode/labbench/fims/geome/geomeFIMSClient.java
index 2b2d4a582..f7eca8c52 100644
--- a/src/com/biomatters/plugins/biocode/labbench/fims/geome/geomeFIMSClient.java
+++ b/src/com/biomatters/plugins/biocode/labbench/fims/geome/geomeFIMSClient.java
@@ -1,8 +1,10 @@
package com.biomatters.plugins.biocode.labbench.fims.geome;
import com.biomatters.geneious.publicapi.databaseservice.DatabaseServiceException;
-import com.biomatters.plugins.biocode.BiocodePlugin;
import com.biomatters.plugins.biocode.labbench.fims.biocode.*;
+import org.apache.http.conn.ssl.TrustStrategy;
+import org.apache.http.ssl.SSLContexts;
+
import org.codehaus.jackson.JsonNode;
import org.codehaus.jackson.map.ObjectMapper;
import org.glassfish.jersey.client.ClientConfig;
@@ -12,13 +14,11 @@
import org.glassfish.jersey.jackson.JacksonFeature;
import org.glassfish.jersey.message.GZipEncoder;
+import javax.net.ssl.SSLContext;
import javax.ws.rs.NotFoundException;
import javax.ws.rs.ProcessingException;
import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.client.ClientBuilder;
-import javax.ws.rs.client.Entity;
-import javax.ws.rs.client.Invocation;
-import javax.ws.rs.client.WebTarget;
+import javax.ws.rs.client.*;
import javax.ws.rs.core.Form;
import javax.ws.rs.core.GenericType;
import javax.ws.rs.core.MediaType;
@@ -29,11 +29,16 @@
import java.lang.reflect.InvocationTargetException;
import java.net.MalformedURLException;
import java.net.URLEncoder;
+import java.security.KeyManagementException;
+import java.security.KeyStoreException;
+import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.logging.Logger;
+import com.biomatters.plugins.biocode.BiocodePlugin;
+
/**
* @author Matthew Cheung
* Created on 7/02/14 5:51 AM
@@ -52,8 +57,26 @@ public geomeFIMSClient(String hostname, int timeout) {
ClientConfig config = new ClientConfig()
.property(ClientProperties.CONNECT_TIMEOUT, timeout * 1000)
.property(ClientProperties.READ_TIMEOUT, timeout * 1000);
+
+ ClientBuilder builder = ClientBuilder.newBuilder();
+
+ // Create SSL Socket Factory Explicitly for older versions of geneious
+ // This is a work-around where we accept the certificate for all geome connections
+ TrustStrategy acceptingTrustStrategy = (cert, authType) -> true;
+ SSLContext sslContext = null;
+ try {
+ sslContext = SSLContexts.custom().loadTrustMaterial(null, acceptingTrustStrategy).build();
+ } catch (NoSuchAlgorithmException e) {
+ throw new ProcessingException(e.getMessage());
+ } catch (KeyManagementException e) {
+ throw new ProcessingException(e.getMessage());
+ } catch (KeyStoreException e) {
+ throw new ProcessingException(e.getMessage());
+ }
+ builder.sslContext(sslContext);
- target = ClientBuilder.newBuilder().withConfig(config).build().target(hostname)
+ ClientBuilder builderConfig = builder.withConfig(config);
+ target = builderConfig.build().target(hostname)
.register(GZipEncoder.class)
.register(JacksonFeature.class)
.register(new LoggingFilter(Logger.getLogger(BiocodePlugin.class.getName()), true));
@@ -74,7 +97,9 @@ void login(String username, String password) throws IOException, ProcessingExcep
String clientSecret = secrets.get("client_secret").asText();
WebTarget path = target.path("/v1/oauth/accessToken");
- Invocation.Builder request = path.request();
+
+ Invocation.Builder request = path.request().accept(MediaType.APPLICATION_JSON);
+
Form formToPost = new Form()
.param("username", username)
.param("password", password)
@@ -161,7 +186,7 @@ List getProjects(boolean includePublic) throws DatabaseServiceException
Invocation.Builder request = target.path("projects")
.queryParam("includePublic", includePublic)
.request(MediaType.APPLICATION_JSON_TYPE);
-
+
try {
Response response = request.get();
List fromService = getRestServiceResult(new GenericType>() {
diff --git a/src/com/biomatters/plugins/biocode/labbench/fims/geome/geomeFIMSConnection.java b/src/com/biomatters/plugins/biocode/labbench/fims/geome/geomeFIMSConnection.java
index dd72a50ab..e8e94149b 100644
--- a/src/com/biomatters/plugins/biocode/labbench/fims/geome/geomeFIMSConnection.java
+++ b/src/com/biomatters/plugins/biocode/labbench/fims/geome/geomeFIMSConnection.java
@@ -18,9 +18,8 @@
import javax.ws.rs.client.Entity;
import javax.ws.rs.client.Invocation;
-import javax.ws.rs.core.Form;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
+import javax.ws.rs.client.WebTarget;
+import javax.ws.rs.core.*;
import java.lang.ref.SoftReference;
import java.util.*;
import java.util.function.BiConsumer;
@@ -43,7 +42,7 @@ public String getName() {
@Override
public String getDescription() {
- return "Connection to GeOMe (https://geome-db.org/)";
+ return "Connection to GeOMe (FIMS3) at https://geome-db.org/";
}
@Override
@@ -94,9 +93,7 @@ public void _connect(Options options) throws ConnectionException {
}
} catch (Exception e) {
-
- e.printStackTrace();
- throw new ConnectionException("Unable to connect to GeOMe: " + e.getMessage());
+ throw new ConnectionException("Unable to connect to GeOMe: " + e.getStackTrace());
}
}
@@ -242,9 +239,11 @@ private Project getProjectFromQuery(Query query) throws ConnectionException {
if (query instanceof CompoundSearchQuery) {
- if (((CompoundSearchQuery) query).getOperator() != CompoundSearchQuery.Operator.AND) {
- throw new ConnectionException("OR queries with Project unsupported");
- }
+ // JBD: removing the restriction on OR queries from Geome... these DO work.
+ // However, i'm not certain why this restriction was placed here in the first place
+ //if (((CompoundSearchQuery) query).getOperator() != CompoundSearchQuery.Operator.AND) {
+ // throw new ConnectionException("OR queries with Project unsupported");
+ //}
for (Query childQuery : ((CompoundSearchQuery) query).getChildren()) {
if (childQuery instanceof AdvancedSearchQueryTerm) {
Project project = getProjectFromSearchTerm((AdvancedSearchQueryTerm) childQuery);
@@ -392,68 +391,44 @@ private Map> mapResults(String idField, List