private String getOriginalKey( final ProcessorGraphNode<Object, Object> node, final String mappedKey) { String inputName = mappedKey; if (node.getInputMapper().containsKey(mappedKey)) { inputName = node.getInputMapper().get(mappedKey); } return inputName; }
private String getMappedKey( final ProcessorGraphNode<Object, Object> node, final String requiredInput) { String inputName = requiredInput; if (node.getInputMapper().containsValue(requiredInput)) { inputName = node.getInputMapper().inverse().get(requiredInput); } return inputName; }
private static Set<InputValue> getInputs(final ProcessorGraphNode<Object, Object> node) { final BiMap<String, String> inputMapper = node.getInputMapper(); final Set<InputValue> inputs = Sets.newHashSet(); final Object inputParameter = node.getProcessor().createInputParameter(); if (inputParameter != null) { verifyAllMappingsMatchParameter( inputMapper.values(), inputParameter.getClass(), "One or more of the input mapping values of '" + node + "' do not match an input parameter. The bad mappings are"); final Collection<Field> allProperties = getAllAttributes(inputParameter.getClass()); for (Field field : allProperties) { String name = ProcessorUtils.getInputValueName( node.getProcessor().getInputPrefix(), inputMapper, field.getName()); inputs.add(new InputValue(name, field.getType())); } } return inputs; }