Project

General

Profile

« Previous | Next » 

Revision 56022

Update for definition of mapping between field and proto element for the selection criteria implementation

View differences:

modules/dnet-openaireplus-workflows/branches/dnet-hadoop/src/main/java/eu/dnetlib/msro/openaireplus/workflows/nodes/bulktag/LoadBulkTaggingConfigurationJobNode.java
28 28

  
29 29
    private boolean enabled;
30 30

  
31
    private String mappingProtoParam;
32

  
33
    private String mapping;
34

  
35
    public String getMappingProtoParam() {
36
        return mappingProtoParam;
37
    }
38

  
39
    public LoadBulkTaggingConfigurationJobNode setMappingProtoParam(String mappingProtoParam) {
40
        this.mappingProtoParam = mappingProtoParam;
41
        return this;
42
    }
43

  
44
    public String getMapping() {
45
        return mapping;
46
    }
47

  
48
    public LoadBulkTaggingConfigurationJobNode setMapping(String mapping) {
49
        this.mapping = mapping;
50
        return this;
51
    }
52

  
31 53
    @Override
32 54
    protected String execute(final NodeToken token) throws Exception {
33 55

  
......
37 59

  
38 60
        token.getEnv().setAttribute(getBulkTaggingConfParam(), CommunityConfigurationFactory.newInstance(xmlConf).toJson());
39 61
        token.getEnv().setAttribute(getEnabledConfParam(),isEnabled());
40

  
62
        token.getEnv().setAttribute(getMappingProtoParam(),getMapping());
41 63
        return Arc.DEFAULT_ARC;
42 64
    }
43 65

  
modules/dnet-openaireplus-workflows/branches/dnet-hadoop/src/main/resources/eu/dnetlib/test/profiles/openaireplus/workflows/bulktag/bulkTagging.xml
27 27
                <PARAMETERS>
28 28
                    <PARAM managedBy="system" name="bulkTaggingConfParam" required="true">tagging.conf</PARAM>
29 29
                    <PARAM managedBy="system" name="enabledConfParam" required="true">tagging.enabled</PARAM>
30
                    <PARAM managedBy="system" name="mappingProtoParam" required="true">mapping.proto</PARAM>
30 31
                    <PARAM managedBy="user" name="enabled" required="true" type="boolean">false</PARAM>
31 32
                </PARAMETERS>
32 33
                <ARCS>
......
45 46
                        'hbase.mapreduce.inputtable' : 'tableName',
46 47
                        'hbase.mapreduce.outputtable' : 'tableName',
47 48
                        'tagging.conf' : 'tagging.conf',
48
                        'tagging.enabled' : 'tagging.enabled'
49
                        'tagging.enabled' : 'tagging.enabled',
50
                        'mapping.proto' : 'mapping.proto'
49 51
                        }
50 52
                    </PARAM>
51 53
                </PARAMETERS>
modules/dnet-openaireplus-workflows/branches/dnet-hadoop/src/main/resources/eu/dnetlib/msro/openaireplus/applicationContext-msro-openaireplus.properties
70 70
dnet.openaire.messageManager.host=localhost
71 71
dnet.openaire.messageManager.username=
72 72
dnet.openaire.messageManager.password=
73

  
74
dnet.openaire.bulktag.mapping = { "author" : "$['entity']['result']['metadata']['author'][*]['fullname']",\
75
  "title" : "$['entity']['result']['metadata']['title'][*]['value']",\
76
  "orcid" : "$['entity']['result']['metadata']['author'][*]['pid'][*][?(@['key']=='ORCID')]['value']",\
77
  "contributor" : "$['entity']['result']['metadata']['contributor'][*]['value']",\
78
  "description" : "$['entity']['result']['metadata']['description'][*]['value']"}
modules/dnet-openaireplus-workflows/branches/dnet-hadoop/src/main/resources/eu/dnetlib/msro/openaireplus/workflows/applicationContext-msro-openaire-nodes.xml
328 328

  
329 329
	<bean id="wfNodeLoadBulkTaggingConfiguration"
330 330
		class="eu.dnetlib.msro.openaireplus.workflows.nodes.bulktag.LoadBulkTaggingConfigurationJobNode"
331
		p:xquery="${dnet.openaire.bulktag.xquery}" scope="prototype" />
331
		p:xquery="${dnet.openaire.bulktag.xquery}"
332
		  p:mapping="${dnet.openaire.bulktag.mapping}"
333
		  scope="prototype" />
332 334

  
333 335
	<!-- Consistency nodes -->
334 336
	<bean id="wfNodeFixRepoMdstoreSizes"

Also available in: Unified diff