[person] fixed issue in creating project identifier for the graph for person->project relations
This commit is contained in:
parent
f1ea9da5bc
commit
250f101779
|
@ -15,6 +15,7 @@ import java.util.stream.Collectors;
|
||||||
|
|
||||||
import org.apache.commons.cli.ParseException;
|
import org.apache.commons.cli.ParseException;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.fs.FSDataOutputStream;
|
import org.apache.hadoop.fs.FSDataOutputStream;
|
||||||
import org.apache.hadoop.fs.FileSystem;
|
import org.apache.hadoop.fs.FileSystem;
|
||||||
|
@ -193,8 +194,8 @@ public class ExtractPerson implements Serializable {
|
||||||
private static Relation getProjectRelation(String project, String orcid, String role) {
|
private static Relation getProjectRelation(String project, String orcid, String role) {
|
||||||
|
|
||||||
String source = PERSON_PREFIX + "::" + IdentifierFactory.md5(orcid);
|
String source = PERSON_PREFIX + "::" + IdentifierFactory.md5(orcid);
|
||||||
String target = PROJECT_ID_PREFIX + project.substring(0, 14)
|
String target = PROJECT_ID_PREFIX + StringUtils.substringBefore(project, "::") + "::"
|
||||||
+ IdentifierFactory.md5(project.substring(15));
|
+ IdentifierFactory.md5(StringUtils.substringAfter(project, "::"));
|
||||||
List<KeyValue> properties = new ArrayList<>();
|
List<KeyValue> properties = new ArrayList<>();
|
||||||
|
|
||||||
Relation relation = OafMapperUtils
|
Relation relation = OafMapperUtils
|
||||||
|
|
Loading…
Reference in New Issue