95 lines
2.9 KiB
Java
95 lines
2.9 KiB
Java
package eu.dnetlib.uoamonitorservice.entities;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
import eu.dnetlib.uoamonitorservice.generics.Common;
|
|
import eu.dnetlib.uoamonitorservice.primitives.IndicatorPath;
|
|
import eu.dnetlib.uoamonitorservice.primitives.IndicatorSize;
|
|
import eu.dnetlib.uoamonitorservice.primitives.IndicatorType;
|
|
import eu.dnetlib.uoamonitorservice.primitives.Visibility;
|
|
import org.springframework.data.annotation.CreatedDate;
|
|
import org.springframework.data.annotation.Id;
|
|
import org.springframework.data.annotation.LastModifiedDate;
|
|
|
|
import java.util.Date;
|
|
import java.util.List;
|
|
|
|
public class Indicator extends Common {
|
|
private String additionalDescription;
|
|
private IndicatorType type; //number,chart
|
|
private IndicatorSize width; //small,medium,large
|
|
private IndicatorSize height = IndicatorSize.MEDIUM; //small,medium,large
|
|
private List<String> tags; // this field is not used anywhere now
|
|
private List<IndicatorPath> indicatorPaths;
|
|
|
|
public void copyFromDefault(Indicator defaultIndicator, Visibility visibility) {
|
|
setName(defaultIndicator.getName());
|
|
setDescription(defaultIndicator.getDescription());
|
|
setAdditionalDescription(defaultIndicator.getAdditionalDescription());
|
|
setType(defaultIndicator.getType());
|
|
setWidth(defaultIndicator.getWidth());
|
|
setHeight(defaultIndicator.getHeight());
|
|
setTags(defaultIndicator.getTags());
|
|
setVisibility(visibility);
|
|
setCreationDate(defaultIndicator.getCreationDate());
|
|
setUpdateDate(defaultIndicator.getUpdateDate());
|
|
setDefaultId(defaultIndicator.getId());
|
|
setIndicatorPaths(defaultIndicator.getIndicatorPaths());
|
|
}
|
|
|
|
public String getAdditionalDescription() {
|
|
return additionalDescription;
|
|
}
|
|
|
|
public void setAdditionalDescription(String description) {
|
|
this.additionalDescription = description;
|
|
}
|
|
|
|
public String getType() {
|
|
if(type == null) {
|
|
return null;
|
|
}
|
|
return type.name();
|
|
}
|
|
|
|
public void setType(String type) {
|
|
if(type == null) {
|
|
this.type = null;
|
|
} else {
|
|
IndicatorType indicatorType = IndicatorType.valueOf(type);
|
|
this.type = indicatorType;
|
|
}
|
|
}
|
|
|
|
public IndicatorSize getWidth() {
|
|
return width;
|
|
}
|
|
|
|
public void setWidth(IndicatorSize width) {
|
|
this.width = width;
|
|
}
|
|
|
|
public IndicatorSize getHeight() {
|
|
return height;
|
|
}
|
|
|
|
public void setHeight(IndicatorSize height) {
|
|
this.height = height;
|
|
}
|
|
|
|
public List<String> getTags() {
|
|
return tags;
|
|
}
|
|
|
|
public void setTags(List<String> tags) {
|
|
this.tags = tags;
|
|
}
|
|
|
|
public List<IndicatorPath> getIndicatorPaths() {
|
|
return indicatorPaths;
|
|
}
|
|
|
|
public void setIndicatorPaths(List<IndicatorPath> indicatorPaths) {
|
|
this.indicatorPaths = indicatorPaths;
|
|
}
|
|
}
|