WIP: pruning out non necessary fields from the internal model
This commit is contained in:
parent
112b5c29ec
commit
57d1b88746
|
@ -17,10 +17,10 @@ public class Measure implements Serializable {
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List of units associated with this measure. KeyValue provides a pair to store the label (key) and the value, plus
|
* List of units associated with this measure. MeasureUnit provides a pair to store the label (key) and the value, plus
|
||||||
* common provenance information.
|
* common provenance information.
|
||||||
*/
|
*/
|
||||||
private List<KeyValue> unit;
|
private List<MeasureUnit> unit;
|
||||||
|
|
||||||
public String getId() {
|
public String getId() {
|
||||||
return id;
|
return id;
|
||||||
|
@ -30,18 +30,14 @@ public class Measure implements Serializable {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<KeyValue> getUnit() {
|
public List<MeasureUnit> getUnit() {
|
||||||
return unit;
|
return unit;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUnit(List<KeyValue> unit) {
|
public void setUnit(List<MeasureUnit> unit) {
|
||||||
this.unit = unit;
|
this.unit = unit;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void mergeFrom(Measure m) {
|
|
||||||
// TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
if (this == o)
|
if (this == o)
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
|
public class MeasureUnit extends KeyValue {
|
||||||
|
|
||||||
|
private DataInfo dataInfo;
|
||||||
|
|
||||||
|
public DataInfo getDataInfo() {
|
||||||
|
return dataInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataInfo(DataInfo dataInfo) {
|
||||||
|
this.dataInfo = dataInfo;
|
||||||
|
}
|
||||||
|
}
|
|
@ -51,7 +51,7 @@ public class Relation extends Oaf implements Serializable {
|
||||||
private String validationDate;
|
private String validationDate;
|
||||||
|
|
||||||
private List<Provenance> provenance;
|
private List<Provenance> provenance;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List of relation specific properties. Values include 'similarityLevel', indicating the similarity score between a
|
* List of relation specific properties. Values include 'similarityLevel', indicating the similarity score between a
|
||||||
* pair of publications.
|
* pair of publications.
|
||||||
|
|
|
@ -47,8 +47,8 @@ class MeasureTest {
|
||||||
Assertions.assertNotNull(mm);
|
Assertions.assertNotNull(mm);
|
||||||
}
|
}
|
||||||
|
|
||||||
private KeyValue unit(String key, String value) {
|
private MeasureUnit unit(String key, String value) {
|
||||||
KeyValue unit = new KeyValue();
|
MeasureUnit unit = new MeasureUnit();
|
||||||
unit.setKey(key);
|
unit.setKey(key);
|
||||||
unit.setValue(value);
|
unit.setValue(value);
|
||||||
return unit;
|
return unit;
|
||||||
|
|
Loading…
Reference in New Issue