@Test public void runMapping() throws Exception { nInvocations(1, false); }
@Override public Node runMapping(final MetadataRecord metadataRecord) throws MappingException { LOG.trace("Running mapping for record {}", metadataRecord); SimpleBindings bindings = Utils.bindingsFor(recMapping.getFacts(), recMapping.getRecDefTree().getRecDef(), metadataRecord.getRootNode(), recMapping.getRecDefTree().getRecDef().valueOptLookup); try { Node result = (Node) compiledScript.eval(bindings); return Utils.stripEmptyElements(result); } catch (ScriptException e) { throw new RuntimeException(e); } }
BulkMappingRunner extends AbstractMappingRunner { @Override public Node runMapping(final MetadataRecord metadataRecord) throws MappingException { LOG.trace("Running mapping for record {}", metadataRecord); SimpleBindings bindings = Utils.bindingsFor(recMapping.getFacts(), recMapping.getRecDefTree().getRecDef(), metadataRecord.getRootNode(), recMapping.getRecDefTree().getRecDef().valueOptLookup); try { Node result = (Node) compiledScript.eval(bindings); return Utils.stripEmptyElements(result); } catch (ScriptException e) { throw new RuntimeException(e); } } }
BulkMappingRunner extends AbstractMappingRunner { @Override public Node runMapping(final MetadataRecord metadataRecord) throws MappingException { LOG.trace("Running mapping for record {}", metadataRecord); SimpleBindings bindings = Utils.bindingsFor(recMapping.getFacts(), recMapping.getRecDefTree().getRecDef(), metadataRecord.getRootNode(), recMapping.getRecDefTree().getRecDef().valueOptLookup); try { Node result = (Node) compiledScript.eval(bindings); return Utils.stripEmptyElements(result); } catch (ScriptException e) { throw new RuntimeException(e); } } BulkMappingRunner(final RecMapping recMapping, final String generatedCode); }
BulkMappingRunner extends AbstractMappingRunner { @Override public Node runMapping(final MetadataRecord metadataRecord) throws MappingException { LOG.trace("Running mapping for record {}", metadataRecord); SimpleBindings bindings = Utils.bindingsFor(recMapping.getFacts(), recMapping.getRecDefTree().getRecDef(), metadataRecord.getRootNode(), recMapping.getRecDefTree().getRecDef().valueOptLookup); try { Node result = (Node) compiledScript.eval(bindings); return Utils.stripEmptyElements(result); } catch (ScriptException e) { throw new RuntimeException(e); } } BulkMappingRunner(final RecMapping recMapping, final String generatedCode); @Override Node runMapping(final MetadataRecord metadataRecord); }
BulkMappingRunner extends AbstractMappingRunner { @Override public Node runMapping(final MetadataRecord metadataRecord) throws MappingException { LOG.trace("Running mapping for record {}", metadataRecord); SimpleBindings bindings = Utils.bindingsFor(recMapping.getFacts(), recMapping.getRecDefTree().getRecDef(), metadataRecord.getRootNode(), recMapping.getRecDefTree().getRecDef().valueOptLookup); try { Node result = (Node) compiledScript.eval(bindings); return Utils.stripEmptyElements(result); } catch (ScriptException e) { throw new RuntimeException(e); } } BulkMappingRunner(final RecMapping recMapping, final String generatedCode); @Override Node runMapping(final MetadataRecord metadataRecord);  }