97 lines
2.3 KiB
Java
97 lines
2.3 KiB
Java
package eu.dnetlib.openaire.community;
|
|
|
|
import java.util.List;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
|
|
@JsonAutoDetect
|
|
public class CommunityWritableProperties {
|
|
|
|
@ApiModelProperty("community name")
|
|
private String name;
|
|
|
|
@ApiModelProperty("community short name")
|
|
private String shortName;
|
|
|
|
@ApiModelProperty("community description")
|
|
private String description;
|
|
|
|
@ApiModelProperty("http url for the community logo")
|
|
private String logoUrl;
|
|
|
|
@ApiModelProperty("list of subjects (keywords) that characterise this community")
|
|
private List<String> subjects;
|
|
|
|
@ApiModelProperty("status of the community, drives its visibility")
|
|
private CommunityStatus status;
|
|
|
|
@ApiModelProperty("id of the main Zenodo community")
|
|
private String mainZenodoCommunity;
|
|
|
|
|
|
public static CommunityWritableProperties fromDetails(final CommunityDetails details) {
|
|
CommunityWritableProperties p = new CommunityWritableProperties();
|
|
p.setName(details.getName());
|
|
p.setShortName(details.getShortName());
|
|
p.setDescription(details.getDescription());
|
|
p.setLogoUrl(details.getLogoUrl());
|
|
p.setSubjects(details.getSubjects());
|
|
p.setStatus(details.getStatus());
|
|
p.setMainZenodoCommunity(details.getZenodoCommunity());
|
|
return p;
|
|
}
|
|
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
|
|
public void setName(final String name) {
|
|
this.name = name;
|
|
}
|
|
|
|
public String getShortName() {
|
|
return shortName;
|
|
}
|
|
|
|
public void setShortName(final String shortName) {
|
|
this.shortName = shortName;
|
|
}
|
|
|
|
public String getDescription() {
|
|
return description;
|
|
}
|
|
|
|
public void setDescription(final String description) {
|
|
this.description = description;
|
|
}
|
|
|
|
public String getLogoUrl() {
|
|
return logoUrl;
|
|
}
|
|
|
|
public void setLogoUrl(final String logoUrl) {
|
|
this.logoUrl = logoUrl;
|
|
}
|
|
|
|
public List<String> getSubjects() {
|
|
return subjects;
|
|
}
|
|
|
|
public void setSubjects(final List<String> subjects) {
|
|
this.subjects = subjects;
|
|
}
|
|
|
|
public CommunityStatus getStatus() {
|
|
return status;
|
|
}
|
|
|
|
public void setStatus(final CommunityStatus status) {
|
|
this.status = status;
|
|
}
|
|
|
|
public String getMainZenodoCommunity() { return mainZenodoCommunity; }
|
|
|
|
public void setMainZenodoCommunity(String mainZenodoCommunity) { this.mainZenodoCommunity = mainZenodoCommunity; }
|
|
}
|