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.Map;

public class SeReferencePopulation extends JSONEntity implements Serializable {

    @JsonProperty
    @Label(en="Statistical population")
    @Description(en= "Target statistical population (one or more) the resource refers to.")
    @Order(-1)
    @Format(Format.FORMAT.string)
    private Map<String, String> statisticalPopulation;

    @JsonProperty
    @Label(en="Statistical unit")
    @Description(en= "Simplest unit for which information is sought and for which statistics are ultimately compiled.")
    @Order(-1)
    @Format(Format.FORMAT.string)
    private Map<String, String> statisticalUnit;

    @JsonProperty
    @Label(en="Period of reference")
    @Description(en= "Specific time periods (e.g. a day, a week, a month, a scal year, a calendar year or several calendar years) the statistical variables refer to.")
    @Order(-1)
    @Format(Format.FORMAT.string)
    private OjCodeList referencePeriod;

    @JsonProperty
    @Label(en="Area of reference")
    @Description(en= "Type of geographical units the resource represents or refers to. Note that the spatial resolution must refer to the minimum mapping unit whose bounds are ocially recognized indipendently from the measurement process of the phonomenon taken into account. Examples are: countries, administrative level 2, etc.")
    @Order(-1)
    @Format(Format.FORMAT.string)
    private OjCodeList referenceArea;


    public Map<String, String> getStatisticalPopulation() {
        return statisticalPopulation;
    }

    public void setStatisticalPopulation(Map<String, String> statisticalPopulation) {
        this.statisticalPopulation = statisticalPopulation;
    }

    public Map<String, String> getStatisticalUnit() {
        return statisticalUnit;
    }

    public void setStatisticalUnit(Map<String, String> statisticalUnit) {
        this.statisticalUnit = statisticalUnit;
    }

    public OjCodeList getReferencePeriod() {
        return referencePeriod;
    }
    @Embedded
    public void setReferencePeriod(OjCodeList referencePeriod) {
        this.referencePeriod = referencePeriod;
    }

    public OjCodeList getReferenceArea() {
        return referenceArea;
    }
    @Embedded
    public void setReferenceArea(OjCodeList referenceArea) {
        this.referenceArea = referenceArea;
    }
}

@@ -662,33 +662,32 @@
 o.%22)%0A    @Order(
--
 1)%0A    @Format(F
@@ -938,34 +938,33 @@
 d.%22)%0A    @Order(
--1
+2
 )%0A    @Format(Fo
@@ -1168,9 +1168,10 @@
 , a 
-%0C
+fi
 scal
@@ -1261,34 +1261,33 @@
 o.%22)%0A    @Order(
--1
+3
 )%0A    @Format(Fo
@@ -1581,9 +1581,11 @@
 re o
-%0E
+ffi
 cial
@@ -1750,10 +1750,9 @@
 der(
--1
+4
 )%0A  

Update SeReferencePopulation.java