diff --git a/core/src/main/java/org/fao/geonet/kernel/Thesaurus.java b/core/src/main/java/org/fao/geonet/kernel/Thesaurus.java
index 5c5ed93ec5a..d9937ed8958 100644
--- a/core/src/main/java/org/fao/geonet/kernel/Thesaurus.java
+++ b/core/src/main/java/org/fao/geonet/kernel/Thesaurus.java
@@ -99,6 +99,12 @@ public class Thesaurus {
private String date;
+ private String createdDate;
+
+ private String issuedDate;
+
+ private String modifiedDate;
+
private String defaultNamespace;
private String downloadUrl;
@@ -258,6 +264,18 @@ public String getDate() {
return date;
}
+ public String getCreatedDate() {
+ return createdDate;
+ }
+
+ public String getIssuedDate() {
+ return issuedDate;
+ }
+
+ public String getModifiedDate() {
+ return modifiedDate;
+ }
+
@Nonnull
public FileTime getLastModifiedTime() {
FileTime lastModified;
@@ -965,8 +983,17 @@ private void retrieveThesaurusInformation(Path thesaurusFile, String defaultTitl
this.defaultNamespace = DEFAULT_THESAURUS_NAMESPACE;
}
- Element dateEl = Xml.selectElement(thesaurusEl, "skos:ConceptScheme/dcterms:issued|skos:Collection/dc:date", theNSs);
+ Element issuedDateEl = Xml.selectElement(thesaurusEl, "skos:ConceptScheme/dcterms:issued", theNSs);
+ this.issuedDate = issuedDateEl==null? "": issuedDateEl.getText();
+ Element modifiedDateEl = Xml.selectElement(thesaurusEl, "skos:ConceptScheme/dcterms:modified", theNSs);
+ this.modifiedDate = modifiedDateEl==null? "": modifiedDateEl.getText();
+
+ Element createdDateEl = Xml.selectElement(thesaurusEl, "skos:ConceptScheme/dcterms:created", theNSs);
+ this.createdDate = createdDateEl==null? "": createdDateEl.getText();
+
+ // Default date
+ Element dateEl = Xml.selectElement(thesaurusEl, "skos:ConceptScheme/dcterms:issued|skos:Collection/dc:date", theNSs);
Date thesaususDate = parseThesaurusDate(dateEl);
if (thesaususDate == null) {
@@ -1027,6 +1054,8 @@ private Date parseThesaurusDate(Element dateEl) {
dfList.add(new SimpleDateFormat("EEE MMM d HH:mm:ss z yyyy"));
dfList.add(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
dfList.add(new SimpleDateFormat("yyyy-MM-dd"));
+ dfList.add(new SimpleDateFormat("yyyy-MM"));
+ dfList.add(new SimpleDateFormat("yyyy"));
StringBuffer errorMsg = new StringBuffer("Error parsing the thesaurus date value: ");
errorMsg.append(dateVal);
diff --git a/core/src/main/java/org/fao/geonet/kernel/ThesaurusManager.java b/core/src/main/java/org/fao/geonet/kernel/ThesaurusManager.java
index 62d7a83bcfd..a48563dc3d2 100644
--- a/core/src/main/java/org/fao/geonet/kernel/ThesaurusManager.java
+++ b/core/src/main/java/org/fao/geonet/kernel/ThesaurusManager.java
@@ -551,6 +551,18 @@ public Element buildResultfromThTable(ServiceContext context) throws SQLExceptio
String date = currentTh.getDate();
elDate.addContent(date);
+ Element elCreatedDate = new Element("createdDate");
+ String createdDate = currentTh.getCreatedDate();
+ elCreatedDate.addContent(createdDate);
+
+ Element elIssuedDate = new Element("issuedDate");
+ String issuedDate = currentTh.getIssuedDate();
+ elIssuedDate.addContent(issuedDate);
+
+ Element elModifiedDate = new Element("modifiedDate");
+ String modifiedDate = currentTh.getModifiedDate();
+ elModifiedDate.addContent(modifiedDate);
+
Element elUrl = new Element("url");
String url = currentTh.getDownloadUrl();
elUrl.addContent(url);
@@ -568,6 +580,9 @@ public Element buildResultfromThTable(ServiceContext context) throws SQLExceptio
elLoop.addContent(elDublinCoreMultilingual);
elLoop.addContent(elMultilingualDescriptions);
elLoop.addContent(elDate);
+ elLoop.addContent(elCreatedDate);
+ elLoop.addContent(elIssuedDate);
+ elLoop.addContent(elModifiedDate);
elLoop.addContent(elUrl);
elLoop.addContent(elDefaultURI);
elLoop.addContent(elType);
diff --git a/schemas/iso19115-3.2018/src/main/plugin/iso19115-3.2018/convert/thesaurus-transformation.xsl b/schemas/iso19115-3.2018/src/main/plugin/iso19115-3.2018/convert/thesaurus-transformation.xsl
index 69dbdf75dee..bb7004ee347 100644
--- a/schemas/iso19115-3.2018/src/main/plugin/iso19115-3.2018/convert/thesaurus-transformation.xsl
+++ b/schemas/iso19115-3.2018/src/main/plugin/iso19115-3.2018/convert/thesaurus-transformation.xsl
@@ -272,6 +272,12 @@
+
+
+
@@ -299,6 +305,87 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/schemas/iso19139/src/main/plugin/iso19139/convert/thesaurus-transformation.xsl b/schemas/iso19139/src/main/plugin/iso19139/convert/thesaurus-transformation.xsl
index 12e4e850735..8df2248199b 100644
--- a/schemas/iso19139/src/main/plugin/iso19139/convert/thesaurus-transformation.xsl
+++ b/schemas/iso19139/src/main/plugin/iso19139/convert/thesaurus-transformation.xsl
@@ -330,20 +330,81 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
-
+
-
+
-
+
@@ -351,7 +412,7 @@
+ codeListValue="creation"/>