Project

General

Profile

« Previous | Next » 

Revision 33091

Added by Marek Horst over 9 years ago

#577 renaming origins to matched and ingested

View differences:

modules/icm-iis-collapsers/trunk/src/main/java/eu/dnetlib/iis/collapsers/origins/PMCCitationCollapser.java
16 16
 */
17 17
public class PMCCitationCollapser extends OriginCollapser<CitationEnvelope, Citation> {
18 18

  
19
	private final String ORIGIN_PMC_INGESTION = "pmc_ingestion";
20
	private final String ORIGIN_CERMINE = "cermine";
19
	private final String ORIGIN_INGESTED = "ingested";
20
	private final String ORIGIN_MATCHED = "matched";
21 21
	
22 22
    @Override
23 23
    protected List<Citation> collapseBetweenOrigins(Map<String, List<Citation>> objects) {
......
26 26
        } else if (objects.size()==2) {
27 27
//        	important note: identifying cermine matches by referenceText
28 28
        	Map<String,Citation> cermineCitationsMap = new HashMap<String, Citation>();
29
        	for (Citation currentCermineCitation : objects.get(ORIGIN_CERMINE)) {
29
        	for (Citation currentCermineCitation : objects.get(ORIGIN_MATCHED)) {
30 30
        		if (currentCermineCitation.getEntry()!=null && 
31 31
        				currentCermineCitation.getEntry().getRawText()!=null) {
32 32
        			cermineCitationsMap.put(
......
35 35
        		}
36 36
        	}
37 37
        	List<Citation> results = new ArrayList<Citation>();
38
        	for (Citation currentPmcCitation : objects.get(ORIGIN_PMC_INGESTION)) {
38
        	for (Citation currentPmcCitation : objects.get(ORIGIN_INGESTED)) {
39 39
        		if (currentPmcCitation.getEntry()!=null && 
40 40
        				currentPmcCitation.getEntry().getRawText()!=null) {
41 41
        			Citation merged = merge(currentPmcCitation, 
......
54 54
        } else {
55 55
//        	we need to be strict to conduct collapsing process properly
56 56
        	throw new RuntimeException("only two origins are supported: " + 
57
        			ORIGIN_PMC_INGESTION + " and " + ORIGIN_CERMINE + 
57
        			ORIGIN_INGESTED + " and " + ORIGIN_MATCHED + 
58 58
        			" got: " + objects.keySet());
59 59
        }
60 60
    }
modules/icm-iis-collapsers/trunk/src/main/resources/eu/dnetlib/iis/collapsers/multiple_input_collapser/job.properties
9 9
#schema_input_envelope=eu.dnetlib.iis.metadataextraction.schemas.ExtractedDocumentMetadataEnvelope
10 10

  
11 11
#citation
12
origin_1=pmc_ingestion
12
origin_1=ingested
13 13
input_1=/user/marek.horst/mainworkflows/primary/main/working_dir/transformers_citations_from_ingestpmc/output
14
origin_2=cermine
14
origin_2=matched
15 15
input_2=/user/marek.horst/mainworkflows/primary/main/working_dir/transformers_citations_from_matching/output
16 16
blocking_field=sourceDocumentId
17 17
schema_input=eu.dnetlib.iis.common.citations.schemas.Citation

Also available in: Unified diff