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 SePrimaryDataCollection extends JSONEntity implements Serializable {

    @JsonProperty
    @Label(en="Data collector")
    @Description(en= "The entity (individual, agency or institution) responsible for administering the questionnaire or interview or compiling the data.")
    @Order(1)
    @Format(Format.FORMAT.string)
    private OjResponsibleParty dataCollector;

    @JsonProperty
    @Label(en="Type of collection")
    @Description(en= "Coded element which specifies the type of data collection method (e.g. census, random sampling, etc.).")
    @Order(2)
    @Format(Format.FORMAT.string)
    private OjCodeList typeOfCollection;

    @JsonProperty
    @Label(en="Sampling procedure")
    @Description(en= "The type of sample design used to select the survey respondents to represent the population. It may refer to information on sample design, sample size, sample frame, sample updating etc.")
    @Order(3)
    @Format(Format.FORMAT.string)
    private Map<String, String> samplingProcedure;

    @JsonProperty
    @Label(en="Data collection")
    @Description(en= "Methods used to gather data from the respondents (e.g. postal survey, CAPI, on-line survey, face-to-face interviews etc.) and description of data collection methods. This metadata element also includes more precise information about the kind of questionnaire (structured, unstructured etc.) and if necessary somenoteworthy aspects of the data collection process.")
    @Order(4)
    @Format(Format.FORMAT.string)
    private Map<String, String> dataCollection;

    @JsonProperty
    @Label(en="Periodicity of data collection")
    @Description(en= "Frequency with which the data are collected from the sources.")
    @Order(5)
    @Format(Format.FORMAT.string)
    private OjCodeList collectionPeriodicity;


    public OjResponsibleParty getDataCollector() {
        return dataCollector;
    }
    @Embedded
    public void setDataCollector(OjResponsibleParty dataCollector) {
        this.dataCollector = dataCollector;
    }

    public OjCodeList getTypeOfCollection() {
        return typeOfCollection;
    }
    @Embedded
    public void setTypeOfCollection(OjCodeList typeOfCollection) {
        this.typeOfCollection = typeOfCollection;
    }

    public Map<String, String> getSamplingProcedure() {
        return samplingProcedure;
    }

    public void setSamplingProcedure(Map<String, String> samplingProcedure) {
        this.samplingProcedure = samplingProcedure;
    }

    public Map<String, String> getDataCollection() {
        return dataCollection;
    }

    public void setDataCollection(Map<String, String> dataCollection) {
        this.dataCollection = dataCollection;
    }

    public OjCodeList getCollectionPeriodicity() {
        return collectionPeriodicity;
    }
    @Embedded
    public void setCollectionPeriodicity(OjCodeList collectionPeriodicity) {
        this.collectionPeriodicity = collectionPeriodicity;
    }
}

@@ -559,18 +559,68 @@
 llector%22
+,fr=%22Collecteur de donn%C3%A9es%22,es=%22Colector de datos%22
 )%0A
-
     @Des
@@ -905,32 +905,79 @@
 e of collection%22
+,fr=%22Type de collection%22,es=%22Tipo de colecci%C3%B3n%22
 )%0A    @Descripti
@@ -1231,16 +1231,80 @@
 ocedure%22
+,fr=%22Proc%C3%A9dure d'%C3%A9chantillonnage%22,es=%22Procedimiento de muestreo%22
 )%0A    @D
@@ -1649,32 +1649,84 @@
 Data collection%22
+,fr=%22Collecte des donn%C3%A9es%22,es=%22Recolecci%C3%B3n de datos%22
 )%0A    @Descripti
@@ -2205,32 +2205,32 @@
   @JsonProperty%0A
-
     @Label(en=%22P
@@ -2259,16 +2259,101 @@
 lection%22
+,fr=%22P%C3%A9riodicit%C3%A9 de la collecte de donn%C3%A9es%22,es=%22Periodicidad de la recogida de datos%22
 )%0A    @D

Update SePrimaryDataCollection.java