2021-04-23 12:15:36 +02:00
|
|
|
|
|
|
|
package eu.dnetlib.dhp.schema.oaf;
|
|
|
|
|
2021-11-09 15:49:36 +01:00
|
|
|
import java.io.Serializable;
|
2021-04-23 12:15:36 +02:00
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import com.google.common.base.Objects;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Represent a measure, must be further described by a system available resource providing name and descriptions.
|
|
|
|
*/
|
2021-11-09 15:49:36 +01:00
|
|
|
public class Measure implements Serializable {
|
2021-04-23 12:15:36 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Unique measure identifier.
|
|
|
|
*/
|
|
|
|
private String id;
|
|
|
|
|
|
|
|
/**
|
2021-08-05 12:04:10 +02:00
|
|
|
* List of units associated with this measure. KeyValue provides a pair to store the label (key) and the value, plus
|
2021-04-23 12:15:36 +02:00
|
|
|
* common provenance information.
|
|
|
|
*/
|
|
|
|
private List<KeyValue> unit;
|
|
|
|
|
|
|
|
public String getId() {
|
|
|
|
return id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setId(String id) {
|
|
|
|
this.id = id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public List<KeyValue> getUnit() {
|
|
|
|
return unit;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setUnit(List<KeyValue> unit) {
|
|
|
|
this.unit = unit;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void mergeFrom(Measure m) {
|
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean equals(Object o) {
|
|
|
|
if (this == o)
|
|
|
|
return true;
|
|
|
|
if (o == null || getClass() != o.getClass())
|
|
|
|
return false;
|
|
|
|
Measure measure = (Measure) o;
|
|
|
|
return Objects.equal(id, measure.id) &&
|
|
|
|
Objects.equal(unit, measure.unit);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int hashCode() {
|
|
|
|
return Objects.hashCode(id, unit);
|
|
|
|
}
|
|
|
|
}
|