mapping url downloaded from remote url set in workflow parameters

This commit is contained in:
Enrico Ottonello 2019-10-22 13:45:17 +02:00
parent 4047d32587
commit e968c5faa5
1 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,6 @@
package eu.dnetlib.ariadneplus.workflows.nodes;
import java.net.URL;
import java.time.Duration;
import java.time.Instant;
import java.time.LocalDateTime;
@ -73,7 +74,7 @@ public class X3MTransformAriadnePlusJobNode extends X3MTransformJobNode {
log.info("Mapping profile ids read from node configuration: " + mappingProfileIds);
log.info("Mapping Policy profile id read from node configuration: " + mappingPolicyProfileId);
log.info("Mapping url read from node configuration: " + mappingUrl);
final String[] mappings = getMappingsCode(mappingProfileIds.split(","));
final URL mappingURL = new URL(mappingUrl);
final String policy = getProfileCode(mappingPolicyProfileId);
LocalDateTime now = LocalDateTime.now();
@ -88,7 +89,7 @@ public class X3MTransformAriadnePlusJobNode extends X3MTransformJobNode {
String objIdentifier = extractFromRecord(record, xpathSelectorObjIdentifier);
log.debug("Transforming record objIdentifier: " + objIdentifier);
}
ApplyX3Mapping mappingFunction = new ApplyX3Mapping(mappings, policy, verboseLogging);
ApplyX3Mapping mappingFunction = new ApplyX3Mapping(mappingURL, policy, verboseLogging);
String toTransform = record;
Instant startExtraction = Instant.now();