package org.fao.fenix.commons.msd.dto.full;

import com.fasterxml.jackson.annotation.JsonProperty;
import org.fao.fenix.commons.annotations.Description;
import org.fao.fenix.commons.annotations.Format;
import org.fao.fenix.commons.annotations.Label;
import org.fao.fenix.commons.annotations.Order;
import org.fao.fenix.commons.msd.dto.JSONEntity;

import javax.persistence.Embedded;
import java.io.Serializable;
import java.util.Date;
import java.util.Map;

public class SeReleasePolicy extends JSONEntity implements Serializable {

    @JsonProperty
    @Label(en="Release calendar")
    @Description(en= "Policy regarding the release of the resource in accordance with the pre-announced schedule. It also provides information on the availability of the release calendar.")
    @Order(1)
    @Format(Format.FORMAT.string)
    private Map<String, String> releaseCalendar;

    @JsonProperty
    @Label(en="Access to the release calendar")
    @Description(en= "Link or references to the release calendar.")
    @Order(2)
    @Format(Format.FORMAT.string)
    private String releaseCalendarAccess;

    @JsonProperty
    @Label(en="Dissemination periodicity")
    @Description(en= "Frequency of data dissemination (e.g. daily, monthly, quarterly, yearly).")
    @Order(3)
    @Format(Format.FORMAT.string)
    private OjCodeList disseminationPeriodicity;

    @JsonProperty
    @Label(en="Embargo time")
    @Description(en= "Time span between the completion of the production process of statistical data and their publication.")
    @Order(4)
    @Format(Format.FORMAT.string)
    private OjPeriod embargoTime;


    public Map<String, String> getReleaseCalendar() {
        return releaseCalendar;
    }

    public void setReleaseCalendar(Map<String, String> releaseCalendar) {
        this.releaseCalendar = releaseCalendar;
    }

    public String getReleaseCalendarAccess() {
        return releaseCalendarAccess;
    }

    public void setReleaseCalendarAccess(String releaseCalendarAccess) {
        this.releaseCalendarAccess = releaseCalendarAccess;
    }

    public OjCodeList getDisseminationPeriodicity() {
        return disseminationPeriodicity;
    }
    @Embedded
    public void setDisseminationPeriodicity(OjCodeList disseminationPeriodicity) {
        this.disseminationPeriodicity = disseminationPeriodicity;
    }

    public OjPeriod getEmbargoTime() {
        return embargoTime;
    }
    @Embedded
    public void setEmbargoTime(OjPeriod embargoTime) {
        this.embargoTime = embargoTime;
    }
}

@@ -568,34 +568,97 @@
 elease calendar%22
+,fr=%22Calendrier de publication%22,es=%22Calendario de lanzamientos%22
 )%0A
-
     @Description
@@ -993,16 +993,97 @@
 alendar%22
+,fr=%22Acc%C3%A8s au calendrier de publication%22,es=%22Acceso al calendario de publicaci%C3%B3n%22
 )%0A    @D
@@ -1294,16 +1294,73 @@
 odicity%22
+,fr=%22P%C3%A9riodicit%C3%A9 de diffusion%22,es=%22Periodicidad difusi%C3%B3n%22
 )%0A    @D
@@ -1559,32 +1559,32 @@
   @JsonProperty%0A
-
     @Label(en=%22E
@@ -1595,16 +1595,61 @@
 go time%22
+,fr=%22Temps de Embargo%22,es=%22Tiempo de embargo%22
 )%0A    @D

Update SeReleasePolicy.java