forked from D-Net/dnet-hadoop
add method addPid
This commit is contained in:
parent
5cd092114f
commit
7d9fd75020
|
@ -1,8 +1,8 @@
|
||||||
package eu.dnetlib.dhp.schema.oaf;
|
package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.*;
|
||||||
import java.util.Objects;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
public class Author implements Serializable {
|
public class Author implements Serializable {
|
||||||
|
|
||||||
|
@ -83,4 +83,20 @@ public class Author implements Serializable {
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(fullname, name, surname, rank, pid, affiliation);
|
return Objects.hash(fullname, name, surname, rank, pid, affiliation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void addPid(StructuredProperty pid) {
|
||||||
|
|
||||||
|
if (pid == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if(this.pid == null){
|
||||||
|
this.pid = Arrays.asList(pid);
|
||||||
|
}else{
|
||||||
|
this.pid.add(pid);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue