diff --git a/config/fix-null-constraints.sql b/config/fix-null-constraints.sql index 275abfe2a9..2d8c34fa0e 100755 --- a/config/fix-null-constraints.sql +++ b/config/fix-null-constraints.sql @@ -8,5 +8,5 @@ ALTER TABLE "ENCOUNTER" ALTER COLUMN "HASSPOTIMAGE" DROP NOT NULL; ALTER TABLE "ENCOUNTER" ALTER COLUMN "HASRIGHTSPOTIMAGE" DROP NOT NULL; ALTER TABLE "ENCOUNTER" ALTER COLUMN "NUMSPOTSLEFT" DROP NOT NULL; ALTER TABLE "ENCOUNTER" ALTER COLUMN "NUMSPOTSRIGHT" DROP NOT NULL; -ALTER TABLE "ENCOUNTER" ALTER COLUMN "OKEXPOSEVIATAPIRLINK" DROP NOT NULL; +ALTER TABLE "ENCOUNTER" ALTER COLUMN "OKEXPOSEVIATAPIRLINK" DROP NOT NULL; -- TODO before merge: does some schema need updating as well? ALTER TABLE "ENCOUNTER" ALTER COLUMN "UNIDENTIFIABLE" DROP NOT NULL; diff --git a/devops/deploy/.dockerfiles/tomcat/commonConfiguration.properties b/devops/deploy/.dockerfiles/tomcat/commonConfiguration.properties index 1a336a9487..2ef8db271c 100644 --- a/devops/deploy/.dockerfiles/tomcat/commonConfiguration.properties +++ b/devops/deploy/.dockerfiles/tomcat/commonConfiguration.properties @@ -124,9 +124,6 @@ allowNicknames=true #library editing isCatalogEditable = true -#TapirLink-related settings -#http://www.mantamatcher.org/tapirlink/admin/configurator.php - #GBIF IPT-related settings #iptURL = http://localhost:8080/ipt-2.0.2 diff --git a/devops/development/.dockerfiles/tomcat/commonConfiguration.properties b/devops/development/.dockerfiles/tomcat/commonConfiguration.properties index 4a37384b95..b6a7c112b4 100644 --- a/devops/development/.dockerfiles/tomcat/commonConfiguration.properties +++ b/devops/development/.dockerfiles/tomcat/commonConfiguration.properties @@ -124,9 +124,6 @@ allowNicknames=true #library editing isCatalogEditable = true -#TapirLink-related settings -#http://www.mantamatcher.org/tapirlink/admin/configurator.php - #GBIF IPT-related settings #iptURL = http://localhost:8080/ipt-2.0.2 diff --git a/src/main/java/org/ecocean/CommonConfiguration.java b/src/main/java/org/ecocean/CommonConfiguration.java index d8541010da..1136c81617 100644 --- a/src/main/java/org/ecocean/CommonConfiguration.java +++ b/src/main/java/org/ecocean/CommonConfiguration.java @@ -502,10 +502,6 @@ public static String getURLToMastheadGraphic(String context) { return getProperty("urlToMastheadGraphic", context); } - public static String getTapirLinkURL(String context) { - return getProperty("tapirLinkURL", context); - } - public static String getIPTURL(String context) { return getProperty("iptURL", context); } @@ -770,22 +766,6 @@ public static boolean showEXIFData(String context) { return showEXIF; } - /** - * This configuration option defines whether a pre-installed TapirLink provider will be used in conjunction with this database to expose - * mark-recapture data to biodiversity frameworks, such as the GBIF. - * - * @return true if a TapirLink provider is used with the framework. False otherwise. - */ - public static boolean useTapirLinkURL(String context) { - initialize(context); - boolean useTapirLink = true; - if ((getProperty("tapirLinkURL", context) != null) && (getProperty("tapirLinkURL", - context).equals("false"))) { - useTapirLink = false; - } - return useTapirLink; - } - public static boolean showMeasurements(String context) { return showCategory("showMeasurements", context); } diff --git a/src/main/java/org/ecocean/Encounter.java b/src/main/java/org/ecocean/Encounter.java index cb8e7128b3..dc46e6eda6 100644 --- a/src/main/java/org/ecocean/Encounter.java +++ b/src/main/java/org/ecocean/Encounter.java @@ -234,9 +234,6 @@ public void setSampleTakenForDiet(Boolean sampleTakenForDiet) { // whether this encounter has a right-side spot image extracted // public boolean hasRightSpotImage = false; - // Indicates whether this record can be exposed via TapirLink - private boolean okExposeViaTapirLink = false; - // whether this encounter has been approved for public display // private boolean approved = true; // integers of the latitude and longitude degrees @@ -1165,7 +1162,6 @@ public void addAdditionalImageName(SinglePhotoVideo file) { /* public void approve() { approved = true; - okExposeViaTapirLink = true; } */ /** @@ -1463,12 +1459,10 @@ public boolean wasRejected() { public void reject() { unidentifiable = true; - //okExposeViaTapirLink=false; } public void reaccept() { unidentifiable = false; - //okExposeViaTapirLink=true; } */ public String getGPSLongitude() { @@ -2075,14 +2069,6 @@ public String getDWCDecimalLongitude() { return null; } - public boolean getOKExposeViaTapirLink() { - return okExposeViaTapirLink; - } - - public void setOKExposeViaTapirLink(boolean ok) { - okExposeViaTapirLink = ok; - } - public void setAlternateID(String newID) { this.otherCatalogNumbers = newID; } diff --git a/src/main/java/org/ecocean/servlet/EncounterSetTapirLinkExposure.java b/src/main/java/org/ecocean/servlet/EncounterSetTapirLinkExposure.java deleted file mode 100644 index 36fc65a92a..0000000000 --- a/src/main/java/org/ecocean/servlet/EncounterSetTapirLinkExposure.java +++ /dev/null @@ -1,139 +0,0 @@ -package org.ecocean.servlet; - -import org.ecocean.CommonConfiguration; -import org.ecocean.Encounter; -import org.ecocean.Shepherd; - -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; - -import java.io.IOException; -import java.io.PrintWriter; -import java.util.List; - -public class EncounterSetTapirLinkExposure extends HttpServlet { - public void init(ServletConfig config) - throws ServletException { - super.init(config); - } - - public void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - doPost(request, response); - } - - public void doPost(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - String context = "context0"; - - context = ServletUtilities.getContext(request); - Shepherd myShepherd = new Shepherd(context); - myShepherd.setAction("EncounterSetTapirLinkExposure.class"); - // set up for response - response.setContentType("text/html"); - PrintWriter out = response.getWriter(); - boolean locked = false, isOwner = true; - String action = request.getParameter("action"); - // System.out.println("Action is: "+action); - if (action != null) { - if ((action.equals("tapirLinkExpose"))) { - if (!(request.getParameter("number") == null)) { - myShepherd.beginDBTransaction(); - Encounter newenc = myShepherd.getEncounter(request.getParameter("number")); - - try { - if (newenc.getOKExposeViaTapirLink()) { - newenc.setOKExposeViaTapirLink(false); - } else { - newenc.setOKExposeViaTapirLink(true); - } - // newenc.addComments("
"+request.getRemoteUser()+" on "+(new java.util.Date()).toString()+"
"+"Approved this
- // encounter for TapirLink exposure.");
- } catch (Exception le) {
- System.out.println("Hit locked exception on action: " + action);
- locked = true;
- le.printStackTrace();
- myShepherd.rollbackDBTransaction();
- // myShepherd.closeDBTransaction();
- }
- if (!locked) {
- myShepherd.commitDBTransaction(action);
- out.println(ServletUtilities.getHeader(request));
- response.setStatus(HttpServletResponse.SC_OK);
- out.println("Success: I have changed encounter " +
- request.getParameter("number") + " TapirLink exposure status.");
- out.println("
Return to encounter #" + request.getParameter("number") + - ".
\n"); - ListView all " + stateName + - " encounters
"); - } - } - out.println( - ""); - - out.println(ServletUtilities.getFooter(context)); - } else { - out.println(ServletUtilities.getHeader(request)); - response.setStatus(HttpServletResponse.SC_BAD_REQUEST); - out.println("Failure: I have NOT changed encounter " + - request.getParameter("number") + - " TapirLink status. This encounter is currently being modified by another user, or an unknown error occurred."); - out.println("Return to encounter #" + request.getParameter("number") + - "
\n"); - ListView all " + stateName + - " encounters
"); - } - } - out.println( - ""); - out.println(ServletUtilities.getFooter(context)); - } - } else { - out.println(ServletUtilities.getHeader(request)); - response.setStatus(HttpServletResponse.SC_BAD_REQUEST); - out.println( - "Error: I don't know which new encounter you're trying to approve."); - out.println(ServletUtilities.getFooter(context)); - } - } else { - out.println(ServletUtilities.getHeader(request)); - response.setStatus(HttpServletResponse.SC_BAD_REQUEST); - out.println( - "I didn't understand your command, or you are not authorized for this action.
"); - out.println("Please try again or login here."); - out.println(ServletUtilities.getFooter(context)); - } - } else { - out.println(ServletUtilities.getHeader(request)); - out.println( - "
I did not receive enough data to process your command. No action was indicated to me.
"); - out.println("Please try again or login here.");
- out.println(ServletUtilities.getFooter(context));
- }
- out.close();
- myShepherd.closeDBTransaction();
- }
-}
diff --git a/src/main/java/org/ecocean/servlet/MassExposeGBIF.java b/src/main/java/org/ecocean/servlet/MassExposeGBIF.java
index 4b7564fdc1..3feafa828f 100644
--- a/src/main/java/org/ecocean/servlet/MassExposeGBIF.java
+++ b/src/main/java/org/ecocean/servlet/MassExposeGBIF.java
@@ -1,3 +1,5 @@
+// TODO before PR: remove this whole file? Or at least post()? Seems like it
+// only does tapir link stuff but I don't have context on the product
package org.ecocean.servlet;
import org.ecocean.CommonConfiguration;
diff --git a/src/main/resources/bundles/commonConfiguration.properties b/src/main/resources/bundles/commonConfiguration.properties
index 0682d6704b..57af48fe86 100755
--- a/src/main/resources/bundles/commonConfiguration.properties
+++ b/src/main/resources/bundles/commonConfiguration.properties
@@ -105,9 +105,6 @@ allowNicknames=true
#library editing
isCatalogEditable = true
-#TapirLink-related settings
-#http://www.mantamatcher.org/tapirlink/admin/configurator.php
-
#GBIF IPT-related settings
#iptURL = http://localhost:8080/ipt-2.0.2
diff --git a/src/main/resources/bundles/de/header.properties b/src/main/resources/bundles/de/header.properties
index 3d40498369..8cc0140a91 100755
--- a/src/main/resources/bundles/de/header.properties
+++ b/src/main/resources/bundles/de/header.properties
@@ -31,7 +31,6 @@ userWiki = Benutzer-Wiki
software = Kunden-Software
grid = Raster
general = Bibliotheksverwaltung
-tapirLink = TapirLink
iptLink = GBIF IPT
photoKeywords = Foto-Schl\u00FCsselw\u00F6rter
adoptions = Adoptionen
diff --git a/src/main/resources/bundles/en/header.properties b/src/main/resources/bundles/en/header.properties
index fa139bd6eb..4ff897db44 100755
--- a/src/main/resources/bundles/en/header.properties
+++ b/src/main/resources/bundles/en/header.properties
@@ -31,7 +31,6 @@ userWiki = User Wiki
software = Client Software
grid = Grid
general = Library Administration
-tapirLink = TapirLink
iptLink = GBIF IPT
photoKeywords = Photo Keywords
adoptions = Adoptions
diff --git a/src/main/resources/bundles/es/header.properties b/src/main/resources/bundles/es/header.properties
index a1da4a8741..a19f44eb58 100755
--- a/src/main/resources/bundles/es/header.properties
+++ b/src/main/resources/bundles/es/header.properties
@@ -31,7 +31,6 @@ userWiki = Wiki Usuario
software = Software Cliente
grid = Cuadr\u00edcula
general = Administraci\u00f3n de Wildbook
-tapirLink = TapirLink
iptLink = GBIF IPT
photoKeywords = Photo Keywords
adoptions = Adopciones
diff --git a/src/main/resources/bundles/fr/header.properties b/src/main/resources/bundles/fr/header.properties
index 99830a43b4..8c926fc7b7 100644
--- a/src/main/resources/bundles/fr/header.properties
+++ b/src/main/resources/bundles/fr/header.properties
@@ -31,7 +31,6 @@ userWiki = Utilisateur Wiki
software = Logiciel client
grid = Grille
general = Administracion de Wildbook
-tapirLink = TapirLink
iptLink = GBIF IPT
photoKeywords = Mots-cl\u00e9s photo
adoptions = Adoptions
diff --git a/src/main/resources/bundles/it/header.properties b/src/main/resources/bundles/it/header.properties
index 09db311836..e2474529a4 100644
--- a/src/main/resources/bundles/it/header.properties
+++ b/src/main/resources/bundles/it/header.properties
@@ -31,7 +31,6 @@ userWiki = Wiki dell'utente
software = Software cliente
grid = Griglia
general = Generale
-tapirLink = TapirLink
iptLink = GBIF IPT
photoKeywords = Parole chiave foto
adoptions = adozioni
diff --git a/src/main/resources/org/ecocean/batch/BatchParser.properties b/src/main/resources/org/ecocean/batch/BatchParser.properties
index d98ce1cdb4..5e76c551fa 100755
--- a/src/main/resources/org/ecocean/batch/BatchParser.properties
+++ b/src/main/resources/org/ecocean/batch/BatchParser.properties
@@ -127,7 +127,6 @@ column.encounter.photographerEmail=Photographer Email
column.encounter.photographerPhone=Photographer Phone
column.encounter.photographerAddress=Photographer Address
column.encounter.interestedResearchers=Interested Researchers
-column.encounter.okExposeViaTapirLink=TapirLink?
# Define required columns.
column.encounter.catalogNumber.required=true
@@ -177,7 +176,6 @@ format.encounter.photographerEmail=string
format.encounter.photographerPhone=string
format.encounter.photographerAddress=string
format.encounter.interestedResearchers=string+
-format.encounter.okExposeViaTapirLink=boolean
#=============
diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml
index 82b8f5729d..582a4ef4bf 100755
--- a/src/main/webapp/WEB-INF/web.xml
+++ b/src/main/webapp/WEB-INF/web.xml
@@ -203,7 +203,6 @@
/appadmin/batch* = authc, roles[admin]
/EncounterSetSubmitterID = authc, roles[researcher]
- /EncounterSetTapirLinkExposure = authc, roles[researcher]
/GenePopExport = authc, roles[researcher]
/individualSearchResultsExport.jsp = authc, roles[researcher]
/encounters/exportSearchResults.jsp = authc, roles[researcher]
@@ -366,7 +365,6 @@
/MediaAssetAttach= authc, roles[researcher]
/EncounterResetDate = authc, roles[researcher]
/IndividualSearchExportCapture = authc, roles[researcher]
- /EncounterSetTapirLinkExposure = authc, roles[researcher]
/EncounterSetLocation = authc, roles[researcher]
/EncounterSetLocationID = authc, roles[researcher]
/CRCExportReport = authc, roles[researcher]
@@ -1228,12 +1226,6 @@