@Test public void selectorWithoutIndicatorsPattern() { final String expectedValue = "This is the expected value"; final Document document = newRecord(A_VARIABLE_FIELD_NAME, '#', '#', 'a', expectedValue); final VariableFieldExpression expression = new VariableFieldExpression(A_VARIABLE_FIELD_NAME + "a"); expression.xpath = new OXPath(); assertEquals(expectedValue, expression.evaluate(document)); }
@Override public String evaluate(final Document target) { try { final String result = xpath.value(expression, target); return result != null && result.trim().length() > 0 ? result : null; } catch (final Exception exception) { throw new RuntimeException(exception); } }
VariableFieldExpression implements Expression<String, Document> { @Override public String evaluate(final Document target) { try { final String result = xpath.value(expression, target); return result != null && result.trim().length() > 0 ? result : null; } catch (final Exception exception) { throw new RuntimeException(exception); } } }
VariableFieldExpression implements Expression<String, Document> { @Override public String evaluate(final Document target) { try { final String result = xpath.value(expression, target); return result != null && result.trim().length() > 0 ? result : null; } catch (final Exception exception) { throw new RuntimeException(exception); } } VariableFieldExpression(final String specs); }
VariableFieldExpression implements Expression<String, Document> { @Override public String evaluate(final Document target) { try { final String result = xpath.value(expression, target); return result != null && result.trim().length() > 0 ? result : null; } catch (final Exception exception) { throw new RuntimeException(exception); } } VariableFieldExpression(final String specs); @Override String evaluate(final Document target); @Override String specs(); @Override String toString(); }
VariableFieldExpression implements Expression<String, Document> { @Override public String evaluate(final Document target) { try { final String result = xpath.value(expression, target); return result != null && result.trim().length() > 0 ? result : null; } catch (final Exception exception) { throw new RuntimeException(exception); } } VariableFieldExpression(final String specs); @Override String evaluate(final Document target); @Override String specs(); @Override String toString();  }