#108 add reference dto

merge-requests/78/head
Семенова Мария 5 years ago
parent 88ec35faa0
commit 71ec7bb726

@ -0,0 +1,129 @@
package ru.ulstu.paper.model;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
public class ReferenceDto {
public enum ReferenceType {
ARTICLE("Статья"),
BOOK("Книга");
private String typeName;
ReferenceType(String name) {
this.typeName = name;
}
public String getTypeName() {
return typeName;
}
}
public enum FormatStandard {
GOST("ГОСТ"),
SPRINGER("Springer");
private String standardName;
FormatStandard(String name) {
this.standardName = name;
}
public String getStandardName() {
return standardName;
}
}
private String authors;
private String publicationTitle;
private Integer publicationYear;
private String publisher;
private String pages;
private String journalOrCollectionTitle;
private ReferenceType referenceType;
private FormatStandard formatStandard;
@JsonCreator
public ReferenceDto(
@JsonProperty("authors") String authors,
@JsonProperty("publicationTitle") String publicationTitle,
@JsonProperty("publicationYear") Integer publicationYear,
@JsonProperty("publisher") String publisher,
@JsonProperty("pages") String pages,
@JsonProperty("journalOrCollectionTitle") String journalOrCollectionTitle,
@JsonProperty("referenceType") ReferenceType referenceType,
@JsonProperty("formatStandard") FormatStandard formatStandard) {
this.authors = authors;
this.publicationTitle = publicationTitle;
this.publicationYear = publicationYear;
this.publisher = publisher;
this.pages = pages;
this.journalOrCollectionTitle = journalOrCollectionTitle;
this.referenceType = referenceType;
this.formatStandard = formatStandard;
}
public String getAuthors() {
return authors;
}
public void setAuthors(String authors) {
this.authors = authors;
}
public String getPublicationTitle() {
return publicationTitle;
}
public void setPublicationTitle(String publicationTitle) {
this.publicationTitle = publicationTitle;
}
public Integer getPublicationYear() {
return publicationYear;
}
public void setPublicationYear(Integer publicationYear) {
this.publicationYear = publicationYear;
}
public String getPublisher() {
return publisher;
}
public void setPublisher(String publisher) {
this.publisher = publisher;
}
public String getPages() {
return pages;
}
public void setPages(String pages) {
this.pages = pages;
}
public String getJournalOrCollectionTitle() {
return journalOrCollectionTitle;
}
public void setJournalOrCollectionTitle(String journalOrCollectionTitle) {
this.journalOrCollectionTitle = journalOrCollectionTitle;
}
public ReferenceType getReferenceType() {
return referenceType;
}
public void setReferenceType(ReferenceType referenceType) {
this.referenceType = referenceType;
}
public FormatStandard getFormatStandard() {
return formatStandard;
}
public void setFormatStandard(FormatStandard formatStandard) {
this.formatStandard = formatStandard;
}
}
Loading…
Cancel
Save