forked from D-Net/dnet-hadoop
Merge pull request 'FIX on the creation of subject based broker enrichments' (#79) from broker into master
This commit is contained in:
commit
de00094ebc
|
@ -16,7 +16,24 @@ public class EnrichMissingSubject extends UpdateMatcher<OaBrokerTypedValue> {
|
||||||
|
|
||||||
public EnrichMissingSubject() {
|
public EnrichMissingSubject() {
|
||||||
super(20,
|
super(20,
|
||||||
s -> Topic.fromPath("ENRICH/MISSING/SUBJECT/" + s.getType()),
|
s -> {
|
||||||
|
switch (s.getType().toLowerCase()) {
|
||||||
|
case "acm":
|
||||||
|
return Topic.ENRICH_MISSING_SUBJECT_ACM;
|
||||||
|
case "arxiv":
|
||||||
|
return Topic.ENRICH_MISSING_SUBJECT_ARXIV;
|
||||||
|
case "ddc":
|
||||||
|
return Topic.ENRICH_MISSING_SUBJECT_DDC;
|
||||||
|
case "jel":
|
||||||
|
return Topic.ENRICH_MISSING_SUBJECT_JEL;
|
||||||
|
case "mesh":
|
||||||
|
return Topic.ENRICH_MISSING_SUBJECT_MESHEUROPMC;
|
||||||
|
case "rvk":
|
||||||
|
return Topic.ENRICH_MISSING_SUBJECT_RVK;
|
||||||
|
default:
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
},
|
||||||
(p, s) -> p.getSubjects().add(s),
|
(p, s) -> p.getSubjects().add(s),
|
||||||
s -> subjectAsString(s));
|
s -> subjectAsString(s));
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,24 @@ public class EnrichMoreSubject extends UpdateMatcher<OaBrokerTypedValue> {
|
||||||
|
|
||||||
public EnrichMoreSubject() {
|
public EnrichMoreSubject() {
|
||||||
super(20,
|
super(20,
|
||||||
s -> Topic.fromPath("ENRICH/MORE/SUBJECT/" + s.getType()),
|
s -> {
|
||||||
|
switch (s.getType().toLowerCase()) {
|
||||||
|
case "acm":
|
||||||
|
return Topic.ENRICH_MORE_SUBJECT_ACM;
|
||||||
|
case "arxiv":
|
||||||
|
return Topic.ENRICH_MORE_SUBJECT_ARXIV;
|
||||||
|
case "ddc":
|
||||||
|
return Topic.ENRICH_MORE_SUBJECT_DDC;
|
||||||
|
case "jel":
|
||||||
|
return Topic.ENRICH_MORE_SUBJECT_JEL;
|
||||||
|
case "mesh":
|
||||||
|
return Topic.ENRICH_MORE_SUBJECT_MESHEUROPMC;
|
||||||
|
case "rvk":
|
||||||
|
return Topic.ENRICH_MORE_SUBJECT_RVK;
|
||||||
|
default:
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
},
|
||||||
(p, s) -> p.getSubjects().add(s),
|
(p, s) -> p.getSubjects().add(s),
|
||||||
s -> subjectAsString(s));
|
s -> subjectAsString(s));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue