From e3d3700c06545a3c06af41b07d126c0a5889fc59 Mon Sep 17 00:00:00 2001 From: TanyaStere42 Date: Tue, 29 Oct 2024 16:07:49 -0700 Subject: [PATCH 1/2] added individual name to shapefile export --- .../servlet/export/EncounterSearchExportShapefile.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/ecocean/servlet/export/EncounterSearchExportShapefile.java b/src/main/java/org/ecocean/servlet/export/EncounterSearchExportShapefile.java index 929fa5cb18..f08de3e598 100644 --- a/src/main/java/org/ecocean/servlet/export/EncounterSearchExportShapefile.java +++ b/src/main/java/org/ecocean/servlet/export/EncounterSearchExportShapefile.java @@ -89,7 +89,8 @@ public void doPost(HttpServletRequest request, HttpServletResponse response) ("the_geom:Point:srid=4326," + // <- the geometry attribute: Point type "Date:java.util.Date," + // <- a String attribute "Encounter:String," + // a number attribute - "Individual:String," + // a number attribute + "Individual:String," + //a string attribute + "Name:String," + // a number attribute "Sex:String," + // a number attribute "Haplotype:String," + // a number attribute "URL:String," + // a number attribute @@ -138,8 +139,10 @@ public void doPost(HttpServletRequest request, HttpServletResponse response) featureBuilder.set("Date", new java.sql.Date(enc.getDateInMilliseconds())); } featureBuilder.set("Encounter", enc.getCatalogNumber()); - featureBuilder.set("Individual", + featureBuilder.set("Individual", ServletUtilities.handleNullString(enc.getIndividualID())); + featureBuilder.set("Name", + ServletUtilities.handleNullString(enc.getDisplayName())); if (enc.getSex() != null) { featureBuilder.set("Sex", enc.getSex()); } From 41f72c319309913c0c47bf2a8c27e47279d7607e Mon Sep 17 00:00:00 2001 From: TanyaStere42 Date: Tue, 29 Oct 2024 16:08:31 -0700 Subject: [PATCH 2/2] linting correction --- .../servlet/export/EncounterSearchExportShapefile.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/ecocean/servlet/export/EncounterSearchExportShapefile.java b/src/main/java/org/ecocean/servlet/export/EncounterSearchExportShapefile.java index f08de3e598..8cc2365e6b 100644 --- a/src/main/java/org/ecocean/servlet/export/EncounterSearchExportShapefile.java +++ b/src/main/java/org/ecocean/servlet/export/EncounterSearchExportShapefile.java @@ -89,7 +89,7 @@ public void doPost(HttpServletRequest request, HttpServletResponse response) ("the_geom:Point:srid=4326," + // <- the geometry attribute: Point type "Date:java.util.Date," + // <- a String attribute "Encounter:String," + // a number attribute - "Individual:String," + //a string attribute + "Individual:String," + // a string attribute "Name:String," + // a number attribute "Sex:String," + // a number attribute "Haplotype:String," + // a number attribute @@ -139,7 +139,7 @@ public void doPost(HttpServletRequest request, HttpServletResponse response) featureBuilder.set("Date", new java.sql.Date(enc.getDateInMilliseconds())); } featureBuilder.set("Encounter", enc.getCatalogNumber()); - featureBuilder.set("Individual", + featureBuilder.set("Individual", ServletUtilities.handleNullString(enc.getIndividualID())); featureBuilder.set("Name", ServletUtilities.handleNullString(enc.getDisplayName()));