diff --git a/fdp.template b/fdp.template index dfb6ef2..75e9239 100644 --- a/fdp.template +++ b/fdp.template @@ -19,9 +19,9 @@ dct:accessRights ; dct:language ; fdpo:metadataIssued "2023-03-10T07:42:08.000Z"^^xsd:dateTime; - fdpo:metadataModified "%%DATE2%%T13:06:00.000Z"^^xsd:dateTime; + fdpo:metadataModified "%%ISOTIME%%"^^xsd:dateTime; dct:issued "2023-03-10T07:42:08.000Z"^^xsd:dateTime; - dct:modified "%%DATE2%%T13:06:00.000Z"^^xsd:dateTime; + dct:modified "%%ISOTIME%%"^^xsd:dateTime; dcat:contactPoint ; fdpo:metadataCatalog . diff --git a/index.html b/index.html index 092b15b..370f343 100644 --- a/index.html +++ b/index.html @@ -28,9 +28,9 @@ dct:accessRights ; dct:language ; fdpo:metadataIssued "2023-03-10T07:42:08.000Z"^^xsd:dateTime; - fdpo:metadataModified "2024-07-10T13:06:00.000Z"^^xsd:dateTime; + fdpo:metadataModified "2024-08-02T08:05:08.326986185Z"^^xsd:dateTime; dct:issued "2023-03-10T07:42:08.000Z"^^xsd:dateTime; - dct:modified "2024-07-10T13:06:00.000Z"^^xsd:dateTime; + dct:modified "2024-08-02T08:05:08.326986185Z"^^xsd:dateTime; dcat:contactPoint ; fdpo:metadataCatalog . diff --git a/index.ttl b/index.ttl index 092b15b..370f343 100644 --- a/index.ttl +++ b/index.ttl @@ -28,9 +28,9 @@ dct:accessRights ; dct:language ; fdpo:metadataIssued "2023-03-10T07:42:08.000Z"^^xsd:dateTime; - fdpo:metadataModified "2024-07-10T13:06:00.000Z"^^xsd:dateTime; + fdpo:metadataModified "2024-08-02T08:05:08.326986185Z"^^xsd:dateTime; dct:issued "2023-03-10T07:42:08.000Z"^^xsd:dateTime; - dct:modified "2024-07-10T13:06:00.000Z"^^xsd:dateTime; + dct:modified "2024-08-02T08:05:08.326986185Z"^^xsd:dateTime; dcat:contactPoint ; fdpo:metadataCatalog . diff --git a/update.groovy b/update.groovy index 88355f3..f717f6f 100644 --- a/update.groovy +++ b/update.groovy @@ -1,5 +1,20 @@ -date2 = "2024-07-10" +import java.time.LocalDateTime +import java.time.ZoneId +import java.time.format.DateTimeFormatter +import java.util.Calendar + +calendar = Calendar.getInstance(); +year = calendar.get(Calendar.YEAR) +month = calendar.get(Calendar.MONTH) + 1 // January = 0 +day = calendar.get(Calendar.MONTH) +if (day < 10) month += -1 +if (month < 10) month = "0" + month +date2 = "${year}-${month}-10" date = date2.replaceAll("-", "") +localTime = LocalDateTime.now() +isotime = localTime.atZone(ZoneId.systemDefault()).format( + DateTimeFormatter.ISO_INSTANT +) prefixTemplate = new File("prefixes.template").text rdfTemplate = new File("rdf.template").text @@ -14,6 +29,7 @@ catalogTemplate = new File("catalog.template").text .replaceAll("%%DATE%%", date).replaceAll("%%DATE2%%", date2) fdpTemplate = new File("fdp.template").text .replaceAll("%%DATE%%", date).replaceAll("%%DATE2%%", date2) + .replaceAll("%%ISOTIME%%", isotime) datasetFolder = new File("dataset/${date}") if (!datasetFolder.exists()) datasetFolder.mkdir()