Revision 47710
Added by Alessia Bardi almost 7 years ago
ApplyClaimRelsJobNode.java | ||
---|---|---|
70 | 70 |
for (Claim claim : claimRels) { |
71 | 71 |
log.debug(claim); |
72 | 72 |
totalClaims++; |
73 |
String sourceId = fullId(claim.getSourceType(), claim.getSource());
|
|
74 |
String targetId = fullId(claim.getTargetType(), claim.getTarget());
|
|
73 |
String sourceId = fullId(getOpenAIREType(claim.getSourceType()), claim.getSource());
|
|
74 |
String targetId = fullId(getOpenAIREType(claim.getTargetType()), claim.getTarget());
|
|
75 | 75 |
String value = getValue(sourceId, targetId, claim.getSemantics(), timestamp); |
76 | 76 |
/* |
77 | 77 |
public void addHBaseColumn(final String clusterName, |
... | ... | |
99 | 99 |
return Arc.DEFAULT_ARC; |
100 | 100 |
} |
101 | 101 |
|
102 |
protected String getOpenAIREType(final String type){ |
|
103 |
switch(type){ |
|
104 |
case "publication": |
|
105 |
case "dataset": |
|
106 |
return "result"; |
|
107 |
default: |
|
108 |
return type; |
|
109 |
} |
|
110 |
} |
|
102 | 111 |
|
112 |
|
|
103 | 113 |
private String getValue(final String sourceId, final String semantics, final String targetId, final long timestamp) throws MSROException{ |
104 | 114 |
log.debug(StringUtils.format("%s -- %s -- %s", sourceId, semantics, targetId)); |
105 | 115 |
String[] relInfo = semantics.split(SEPARATOR); |
Also available in: Unified diff
Fixed ApplyClaimRels job param and mapping datasets and pubs to results