add method addPid

This commit is contained in:
Miriam Baglioni 2020-04-17 17:13:48 +02:00
parent 5cd092114f
commit 7d9fd75020
1 changed files with 18 additions and 2 deletions

View File

@ -1,8 +1,8 @@
package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
import java.util.List;
import java.util.Objects;
import java.util.*;
import java.util.stream.Collectors;
public class Author implements Serializable {
@ -83,4 +83,20 @@ public class Author implements Serializable {
public int hashCode() {
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);
}
}
}