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.Label;
import org.fao.fenix.commons.msd.dto.JSONEntity;

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

public class OjCodeList extends JSONEntity implements Serializable {
    private MeIdentification linkedCodeList;

    @JsonProperty
    @Label(en="")
    @Description(en="")
    private Collection<OjCode> codes;

    @JsonProperty
    @Label(en="")
    @Description(en="")
    private String idCodeList;

    @JsonProperty
    @Label(en="")
    @Description(en="")
    private String version;

    @JsonProperty
    @Label(en="")
    @Description(en="")
    private Map<String, String> extendedName;

    @JsonProperty
    @Label(en="")
    @Description(en="")
    private OjResponsibleParty contactInfo;

    @JsonProperty
    @Label(en="")
    @Description(en="")
    private Collection<OjCitation> codeListResources;

    @JsonProperty
    @Label(en="")
    @Description(en="")
    private String link;


    public String getIdCodeList() {
        return idCodeList;
    }

    public void setIdCodeList(String idCodeList) {
        this.idCodeList = idCodeList;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public Collection<OjCode> getCodes() {
        return codes;
    }
    @Embedded
    public void setCodes(Collection<OjCode> codes) {
        this.codes = codes;
    }

    public Map<String, String> getExtendedName() {
        return extendedName;
    }

    public void setExtendedName(Map<String, String> extendedName) {
        this.extendedName = extendedName;
    }

    public OjResponsibleParty getContactInfo() {
        return contactInfo;
    }
    @Embedded
    public void setContactInfo(OjResponsibleParty contactInfo) {
        this.contactInfo = contactInfo;
    }

    public String getLink() {
        return link;
    }

    public void setLink(String link) {
        this.link = link;
    }

    public MeIdentification getLinkedCodeList() {
        return linkedCodeList;
    }

    public void setLinkedCodeList(MeIdentification linkedCodeList) {
        this.linkedCodeList = linkedCodeList;
    }

    public Collection<OjCitation> getCodeListResources() {
        return codeListResources;
    }
    @Embedded
    public void setCodeListResources(Collection<OjCitation> codeListResources) {
        this.codeListResources = codeListResources;
    }
}

@@ -500,32 +500,39 @@
 %0A    @Label(en=%22
+Code(s)
 %22)%0A    @Descript
@@ -531,32 +531,102 @@
 Description(en=%22
+Code corresponding to the element requested by the field it refers to.
 %22)%0A    private C
@@ -676,32 +676,54 @@
 %0A    @Label(en=%22
+Codelist identi%0Ccation
 %22)%0A    @Descript
@@ -722,32 +722,111 @@
 Description(en=%22
+Codelist identifier. It is an alphanumeric acronyme that identify the codelist.
 %22)%0A    private S
@@ -869,32 +869,55 @@
 %0A    @Label(en=%22
+Version of the codelist
 %22)%0A    @Descript
@@ -916,32 +916,109 @@
 Description(en=%22
+Information about the version and the state of upgrade of the code list used.
 %22)%0A    private S
@@ -1058,32 +1058,45 @@
 %0A    @Label(en=%22
+Extended name
 %22)%0A    @Descript
@@ -1095,32 +1095,58 @@
 Description(en=%22
+Full name of the codelist.
 %22)%0A    private M
@@ -1204,32 +1204,42 @@
 %0A    @Label(en=%22
+Contact(s)
 %22)%0A    @Descript
@@ -1250,113 +1250,421 @@
 en=%22
-%22)%0A    private OjResponsibleParty contactInfo;%0A%0A    @JsonProperty%0A    @Label(en=%22%22)%0A    @Description(en=%22
+Individual/organizational contact points for a code list including information about the person(s)/maintenance agency and how to reach the contact points.%22)%0A    private OjResponsibleParty contactInfo;%0A%0A    @JsonProperty%0A    @Label(en=%22Resource(s) linked to the codelist%22)%0A    @Description(en=%22It allows to attach documents to the codelist or simply to cite a webpage linked to the code list to which it refers to.
 %22)%0A 
@@ -1746,24 +1746,42 @@
  @Label(en=%22
+Codelist hyperlink
 %22)%0A    @Desc
@@ -1792,16 +1792,83 @@
 ion(en=%22
+Web site link allowing the user access to the information resource.
 %22)%0A    p

Update OjCodeList.java