diff --git a/server/src/main/java/au/org/aodn/ogcapi/server/core/util/EmailUtils.java b/server/src/main/java/au/org/aodn/ogcapi/server/core/util/EmailUtils.java index 4386410f..b8b8b110 100644 --- a/server/src/main/java/au/org/aodn/ogcapi/server/core/util/EmailUtils.java +++ b/server/src/main/java/au/org/aodn/ogcapi/server/core/util/EmailUtils.java @@ -21,6 +21,7 @@ public class EmailUtils { /** * Read a base64 encoded image from resources + * * @param filename - the filename in /img/ directory * @return base64 encoded image as data URL * @throws IOException if resource not found @@ -93,6 +94,7 @@ public static String generateSubsettingSection( /** * Generate HTML content for bounding box data only (without wrapper) + * * @param multipolygon - the multipolygon object * @param objectMapper - Jackson ObjectMapper for JSON processing * @return HTML string for bbox data rows @@ -293,95 +295,183 @@ private static List>>> extractCoordinates(Object mult * Build the subsetting section header */ private static String buildSubsettingHeader() { - return "" + - "
" + - "" + - "" + + "" + + "" + + "
" + - "" + - "
" + + return "" + + "
" + + "" + + "" + + "" + + "
" + + "" + + "
" + "" + - "" + + "" + + "
" + + "
" + "" + - "
" + - "
" + - "
" + - "

Subsetting for this collection:

" + - "
" + - "
" + - "" + - "
" + - "
" + - "" + - "
" + - "
" + - "" + - "" + - "
" + - "
"; + "
" + + "" + + "" + + "" + + "" + + "
" + + "
" + + "

Subsetting for this collection

" + + "
" + + "
" + + "
" + + "" + + "" + + "" + + "" + + "
" + + "" + + "" + + "" + + "" + + "" + + "" + + ""; } /** * Build bbox wrapper with table structure */ private static String buildBboxWrapper(String bboxContent) { - return "" + - "
" + - "" + - "" + bboxContent + "" + + "
" + - "" + - "
" + + return "
" + + "" + + "" + + "" + + "
" + + "" + + "
" + "" + - "" + bboxContent + "
" + - "
"; + "
" + + "
" + + "" + + "" + + "" + + "" + + "" + + "" + + ""; } /** * Build spacer section between bbox and time range */ private static String buildSpacerSection() { - return "" + - "
" + - "" + + "" + + "" + + "
" + - "" + + return "
" + + "" + + "" + + "" + + "
" + + "" + "
" + - "
" + - "" + - "" + - "
" + - "
"; + "" + + "" + + "" + + "" + + "" + + "" + + "
" + + "" + + "" + + "" + + "" + + "" + + "" + + "
" + + "
" + + "
" + + "
" + + "" + + "" + + "
" + + "
" + + ""; } /** * Build time range wrapper with content */ private static String buildTimeRangeWrapper(String startDate, String endDate) { - return "" + - "
" + - "" + - "" + + "" + + "
" + - "" + - "
" + + return "
" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "
" + + "" + + "
" + "" + - "" + + "" + + "" + + "" + + "
" + + "
" + "" + - "" + - "" + + "" + + "" + + "" + "" + - "" + - "" + + "" + + "
" + - "
" + - "
" + + "" + + "" + + "" + + "" + + "
" + + "
" + - "" + - "
" + + "" + + "" + + "
" + "
" + - "

Time Range

" + + "

Time Range

" + + "" + + "
" + + "
" + + "
" + + "
" + + "
" + "" + - "
" + - "" + + "" + - "
" + + "
" + + "" + + "" + + "
" + "
" + - "

"+startDate+" - "+endDate+"

" + - "
"; + "

" + startDate + " - " + endDate + "

" + + "
" + + "
" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "
" + + "" + + "" + + "" + + "" + + "" + + "" + + ""; } protected static String buildBboxSection(String north, String south, String west, String east, int index) { @@ -390,41 +480,107 @@ protected static String buildBboxSection(String north, String south, String west return "" + "" + "" + - "" + - "" + + "" + + "" + + "" + "" + - "" + - "" + + "" + + "
" + - "
" + - "
" + + "" + + "" + + "" + + "" + + "
" + + "
" + - "" + - "
" + + "" + + "" + + "
" + "
" + - "

" + title + "

" + + "

" + title + "

" + + "" + + "
" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "
" + + "" + + "" + + "" + + "" + "" + - "" + + "

E: " + east + "

" + + "" + + "" + + "" + + "
" + - "" + + "" + - "" + - "" + + "" + + "" + + "" + + "" + + "" + + "" + - "" + - "" + + "" + + "" + + "" + + "" + + "" + + "" + - "" + - "" + + "" + + "" + + "" + + "" + + "" + + "" + - "
" + + "
" + + "" + + "" + + "
" + "
" + - "

N: " + north + "

" + - "
" + - "" + + "" + + "
" + + "

N: " + north + "

" + + "" + + "
" + + "
" + + "
" + + "
" + + "" + + "" + + "
" + "
" + - "

S: " + south + "

" + - "
" + - "" + + "" + + "
" + + "

S: " + south + "

" + + "" + + "
" + + "
" + + "
" + + "
" + + "" + + "" + + "
" + "
" + - "

W: " + west + "

" + - "
" + - "" + + "" + + "
" + + "

W: " + west + "

" + + "" + + "
" + + "
" + + "
" + + "
" + + "" + + "" + + "
" + "
" + - "

E: " + east + "

" + + "" + + "" + + "" + + "" + ""; } } diff --git a/server/src/main/java/au/org/aodn/ogcapi/server/processes/RestServices.java b/server/src/main/java/au/org/aodn/ogcapi/server/processes/RestServices.java index 22faea8a..46c50771 100644 --- a/server/src/main/java/au/org/aodn/ogcapi/server/processes/RestServices.java +++ b/server/src/main/java/au/org/aodn/ogcapi/server/processes/RestServices.java @@ -157,20 +157,17 @@ private String generateStartedEmailContent( // Replace all variables in one chain return template - .replace("{{uuid}}", uuid) + .replace("{{HEADER_IMG}}", EmailUtils.readBase64Image("header.txt")) .replace("{{collectionTitle}}", collectionTitle != null ? collectionTitle : "") - .replace("{{fullMetadataLink}}", fullMetadataLink != null ? fullMetadataLink : "") - .replace("{{suggestedCitation}}", suggestedCitation != null ? suggestedCitation : "") .replace("{{subsettingSection}}", subsettingSection) - .replace("{{HEADER_IMG}}", EmailUtils.readBase64Image("header.txt")) - .replace("{{DOWNLOAD_ICON}}", EmailUtils.readBase64Image("download.txt")) .replace("{{BBOX_IMG}}", EmailUtils.readBase64Image("bbox.txt")) .replace("{{TIME_RANGE_IMG}}", EmailUtils.readBase64Image("time-range.txt")) .replace("{{ATTRIBUTES_IMG}}", EmailUtils.readBase64Image("attributes.txt")) - .replace("{{FACEBOOK_IMG}}", EmailUtils.readBase64Image("facebook.txt")) + .replace("{{fullMetadataLink}}", fullMetadataLink != null ? fullMetadataLink : "") + .replace("{{suggestedCitation}}", suggestedCitation != null ? suggestedCitation : "") .replace("{{INSTAGRAM_IMG}}", EmailUtils.readBase64Image("instagram.txt")) + .replace("{{FACEBOOK_IMG}}", EmailUtils.readBase64Image("facebook.txt")) .replace("{{BLUESKY_IMG}}", EmailUtils.readBase64Image("bluesky.txt")) - .replace("{{CONTACT_IMG}}", EmailUtils.readBase64Image("email.txt")) .replace("{{LINKEDIN_IMG}}", EmailUtils.readBase64Image("linkedin.txt")); } catch (IOException e) { diff --git a/server/src/main/resources/img/download.txt b/server/src/main/resources/img/download.txt deleted file mode 100644 index a2fd9763..00000000 --- a/server/src/main/resources/img/download.txt +++ /dev/null @@ -1 +0,0 @@ -iVBORw0KGgoAAAANSUhEUgAAACwAAAAsBAMAAADsqkcyAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAAtUExURUdwTP///////////////////////////////////////////////////////81e3QIAAAAOdFJOUwBLix7f7oAyxHFCfmCosRnbLAAAALBJREFUKM9jYKAqMBQUXIwpyhz37t0TAwxhtndAkIAhzAQSVhjWwuzb0jJAwm1p2cjBwvIODgKQhDkQwg7IoeoHE0UNWxOYsDNqJPhhU8zAYIpNMdCJcSDRpwXo3ikFCYdj+JILJLwAM+qPvnv3EEs64Xz3bgK29HPuJdZkxV7AQGXAGfcOAzzZwLDvHRbwksEPm/BThndYAUMcdtV92ITfIqILGTQzMCwUxADi1PE7AEkbCZHrk71RAAAAAElFTkSuQmCC diff --git a/server/src/main/resources/job-started-email.html b/server/src/main/resources/job-started-email.html index e5c8cb20..4686c1c8 100644 --- a/server/src/main/resources/job-started-email.html +++ b/server/src/main/resources/job-started-email.html @@ -1,14 +1,13 @@ - AODN Portal Dataset Download + @@ -35,51 +33,36 @@ - @@ -121,12 +105,12 @@ -
AODN Portal Dataset Download
- -
- + +
+
- -
- - - - - - -
- - - -
-
-
- -
+ +
@@ -187,90 +163,259 @@
- -
- + + + + +
+
+ +
+ + + +
+ +
+ - - - -
- - - +
+ +
+ + + + + + +
+
+

Hi,

+

 

+

Your AODN data download request has been received. When your data request is ready, an email will be sent with a link for you to download the data.

+
+
+
+
- -
-
- -
- - - - +
- -
- + +
+
- + + +
- -
+
+ +
- + + +
-

Hi,

 

Your AODN data download request has been received. When your data request is ready, an email will be sent with a link for you to download the data.

 

+
+ + + + +
+ + + + +
+
+

Collection

+
+
+
+
+
+ +
+
+ +
+ + + +
+ +
+ + + +
+ + + + + + +
- +
- -
- + +
+
- -
+ +
- + + +

Collection: {{collectionTitle}}

+ + + + +
+
+

{{collectionTitle}}

+
+
+
- +
- -
+ +
- +
@@ -290,20 +435,96 @@
- +
+ -
+
+ + + - - -
+ +
+ + + + + + +
+ +
+ + + + + + +
+ + + + +
+ + + + +
+
+

Metadata link: {{fullMetadataLink}}

+
+
+
+
+
+ +
+
+ +
- +
@@ -323,19 +544,95 @@
- +
- -
+ +
+ + + + + + +
+ +
+ + + + + + +
+ + + + +
+ + + + +
+
+

Suggested Citation

+
+
+
+
+
+ +
+
+ +
- +
@@ -355,71 +652,203 @@
- +
- -
- + +
+
- + + +
- -
+
+ +
+ + +
- + + + +

Metadata Link: {{fullMetadataLink}}

+ + + + +
+
+

{{suggestedCitation}}

+
+
+
+
+
+ +
+
+ +
+ + + +
+ +
+ + + +
+ + + + + +
- +
- -
- + +
+
-
- -
+
+ +
-
-
-

{{suggestedCitation}}

-
+
+ + + + +
+ + + + +
+
+

Usage Constrains

+
+
+
- +
- -
+ +
- +
@@ -439,96 +868,332 @@
- +
- -
- + +
+
-
- -
+
+ +
-
-

If you require assistance with this service please contact us with info@aodn.org.au.

 

Kind regards,

Australian Ocean Data Network

+
+ + + + +
+ + + + +
+
+

Any users of IMOS data are required to clearly acknowledge the source of the material derived from IMOS in the format: "Data was sourced from Australia's Integrated Marine Observing System (IMOS) - IMOS is enabled by the National Collaborative Research Infrastructure strategy (NCRIS)." If relevant, also credit other organisations involved in collection of this particular datastream (as listed in 'credit' in the metadata record).

+
+
+
- +
- -
- - -
- - - -
- -
- + +
+
-
- - - +
+ +
+ + + + + + +
+ + + + + + +
+
+
+
- -
- + +
+
- + + +
- - + + + +
+ +
+ + + + + + +
+ + + + +
+ + + + +
+
+

If using data from the Ningaloo (TAN100) mooring, please add to the citation - "Department of Jobs, Tourism, Science and Innovation (DJTSI), Western Australian Government". If using data from the Ocean Reference Station 65m (ORS065) mooring, please add to the citation - "Sydney Water Corporation".

+

Data, products and services from IMOS are provided "as is" without any warranty as to fitness for a particular purpose. By using this data you are accepting the license agreement and terms specified above. You accept all risks and responsibility for losses, damages, costs and other consequences resulting directly or indirectly from using this site and any information or material available from it.

+
+
+
+
+
+ +
+ + +
+ + + + + + +
+ +
+ + + + + + +
+ + + + + + +
+
+
+ +
+
+ +
+ + + +
+ +
+ + + + + + +
+
+

The download will be available for 7 days.

+

If you require assistance with this service please contact us with info@aodn.org.au.

+

 

+

Kind regards,

+

Australian Ocean Data Network

+
+
+
+
- -
+ +
+
+ +
+ + + +
+ +
- @@ -536,48 +1201,75 @@
+ + + + + + +
+
+

The Australian Ocean Data Network (AODN) stands at the forefront of marine data management in Australia, providing an essential infrastructure for the discovery, sharing and reuse of comprehensive marine and climate data. Our commitment to making these data freely available underscores our dedication to fostering an informed and engaged public, promoting sustainable environmental practices and driving economic growth through innovation.

+
+
- +
- -
- + +
+
- -
+ +
- - +
- -
+ +
- +
- @@ -587,22 +1279,27 @@
- -
+ +
- - +
- +
@@ -624,23 +1321,28 @@
- -
+ +
- - +
- -
+ +
@@ -661,23 +1363,28 @@
- -
+ +
- - +
- -
+ +
@@ -698,57 +1405,67 @@
- -
+ +
- - +
- +
- -
- + +
+
- +