2021-11-18 11:23:48 +01:00
|
|
|
package eu.dnetlib.dhp.schema.dump.oaf;
|
|
|
|
|
2021-11-18 11:24:32 +01:00
|
|
|
import java.io.Serializable;
|
|
|
|
|
2021-11-18 11:23:48 +01:00
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
2021-11-18 11:24:32 +01:00
|
|
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
|
|
import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema;
|
2021-11-18 11:23:48 +01:00
|
|
|
|
|
|
|
public class Measure implements Serializable {
|
|
|
|
@JsonSchema(description = "The measure (i.e. popularity)")
|
|
|
|
private String key;
|
|
|
|
|
|
|
|
@JsonSchema(description = "The value for that measure")
|
|
|
|
private String value;
|
|
|
|
|
|
|
|
public String getKey() {
|
|
|
|
return key;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setKey(String key) {
|
|
|
|
this.key = key;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getValue() {
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setValue(String value) {
|
|
|
|
this.value = value;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static Measure newInstance(String key, String value) {
|
|
|
|
Measure inst = new Measure();
|
|
|
|
inst.key = key;
|
|
|
|
inst.value = value;
|
|
|
|
return inst;
|
|
|
|
}
|
|
|
|
|
|
|
|
@JsonIgnore
|
|
|
|
public boolean isBlank() {
|
|
|
|
return StringUtils.isBlank(key) && StringUtils.isBlank(value);
|
|
|
|
}
|
|
|
|
|
2021-11-18 11:24:32 +01:00
|
|
|
}
|