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 org.fao.fenix.commons.msd.dto.type.DocumentType;

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

public class OjCitation extends JSONEntity implements Serializable {

    @JsonProperty
    @Label(en="Kind of document")
    @Description(en="Kind of resource attached to data.")
    @Order(-1)
    @Format(Format.FORMAT.string)
    private DocumentType documentKind;

    @JsonProperty
    @Label(en="Title")
    @Description(en="Title by which the cited resource is known which offers a quick information about its content.")
    @Order(-1)
    @Format(Format.FORMAT.string)
    private Map<String, String> title;

    @JsonProperty
    @Label(en="Date")
    @Description(en="Reference date for the cited document.")
    @Order(-1)
    @Format(Format.FORMAT.string)
    private Date date;

    @JsonProperty
    @Label(en="Contact")
    @Description(en="Name and position information for an individual or organization that is responsible for the resource.")
    @Order(-1)
    @Format(Format.FORMAT.string)
    private OjResponsibleParty documentContact;

    @JsonProperty
    @Label(en="Notes")
    @Description(en="Some additional details about the resource mainly concerning the domain to which the resource refers.")
    @Order(-1)
    @Format(Format.FORMAT.string)
    private Map<String, String> notes;

    @JsonProperty
    @Label(en="Resource hyperlink")
    @Description(en="Web site link allowing the user access to the information resource.")
    @Order(-1)
    @Format(Format.FORMAT.string)
    private String link;

    @JsonProperty
    @Label(en="ISBN code")
    @Description(en="If available, the International Standard Book Number can be reported in order to uniquely identify the resource cited.")
    @Order(-1)
    @Format(Format.FORMAT.string)
    private String isbn;

    @JsonProperty
    @Label(en="ISNN code")
    @Description(en="If available, the International Standard Serial Number (used to identify periodical publications such as reviews and scientific journals) can be reported in order to uniquely identify the resource cited.")
    @Order(-1)
    @Format(Format.FORMAT.string)
    private String issn;


    public DocumentType getDocumentKind() {
        return documentKind;
    }

    public void setDocumentKind(DocumentType documentKind) {
        this.documentKind = documentKind;
    }

    public Map<String, String> getTitle() {
        return title;
    }

    public void setTitle(Map<String, String> title) {
        this.title = title;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public OjResponsibleParty getDocumentContact() {
        return documentContact;
    }
    @Embedded
    public void setDocumentContact(OjResponsibleParty documentContact) {
        this.documentContact = documentContact;
    }

    public Map<String, String> getNotes() {
        return notes;
    }

    public void setNotes(Map<String, String> notes) {
        this.notes = notes;
    }

    public String getLink() {
        return link;
    }

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

    public String getIsbn() {
        return isbn;
    }

    public void setIsbn(String isbn) {
        this.isbn = isbn;
    }

    public String getIssn() {
        return issn;
    }

    public void setIssn(String issn) {
        this.issn = issn;
    }
}

@@ -690,36 +690,35 @@
 a.%22)%0A    @Order(
--
 1)%0A
+
     @Format(Form
@@ -937,34 +937,33 @@
 t.%22)%0A    @Order(
--1
+2
 )%0A    @Format(Fo
@@ -1127,34 +1127,33 @@
 t.%22)%0A    @Order(
--1
+3
 )%0A    @Format(Fo
@@ -1156,38 +1156,36 @@
 t(Format.FORMAT.
-string
+date
 )%0A    private Da
@@ -1365,34 +1365,33 @@
 e.%22)%0A    @Order(
--1
+4
 )%0A    @Format(Fo
@@ -1628,34 +1628,33 @@
 s.%22)%0A    @Order(
--1
+5
 )%0A    @Format(Fo
@@ -1657,38 +1657,40 @@
 t(Format.FORMAT.
-string
+textarea
 )%0A    private Ma
@@ -1863,34 +1863,33 @@
 e.%22)%0A    @Order(
--1
+6
 )%0A    @Format(Fo
@@ -1892,38 +1892,35 @@
 t(Format.FORMAT.
-string
+url
 )%0A    private St
@@ -2121,34 +2121,33 @@
 d.%22)%0A    @Order(
--1
+7
 )%0A    @Format(Fo
@@ -2479,10 +2479,9 @@
 der(
--1
+8
 )%0A  

Update OjCitation.java