@Test public void testResolveXpath_EmptyResults_Allowed_EmptyValues() throws Exception { MultiItemConfiguredXpathQuery query = init(create(), XPATH_EMPTY_NODES); query.setAllowEmptyResults(Boolean.TRUE); Document doc = XmlHelper.createDocument(XML_WITH_EMPTY_NODES); AdaptrisMessage msg = AdaptrisMessageFactory.getDefaultInstance().newMessage(XML_WITH_EMPTY_NODES); MetadataElement result = query.resolveXpath(doc, new XPath(), query.createXpathQuery(msg)); assertEquals("|||91/01|91/01|91/01", result.getValue()); }
@Override public MetadataElement resolveXpath(Document doc, XPath xpath, String expr) throws CoreException { return new MetadataElement(getMetadataKey(), XpathQueryHelper.resolveMultipleTextItems(doc, xpath, expr, allowEmptyResults(), getSeparator())); }
MultiItemConfiguredXpathQuery extends ConfiguredXpathQueryImpl implements XpathQuery { @Override public MetadataElement resolveXpath(Document doc, XPath xpath, String expr) throws CoreException { return new MetadataElement(getMetadataKey(), XpathQueryHelper.resolveMultipleTextItems(doc, xpath, expr, allowEmptyResults(), getSeparator())); } }
MultiItemConfiguredXpathQuery extends ConfiguredXpathQueryImpl implements XpathQuery { @Override public MetadataElement resolveXpath(Document doc, XPath xpath, String expr) throws CoreException { return new MetadataElement(getMetadataKey(), XpathQueryHelper.resolveMultipleTextItems(doc, xpath, expr, allowEmptyResults(), getSeparator())); } MultiItemConfiguredXpathQuery();  MultiItemConfiguredXpathQuery(String metadataKey, String xpath);  MultiItemConfiguredXpathQuery(String metadataKey, String xpath, String separator); }
MultiItemConfiguredXpathQuery extends ConfiguredXpathQueryImpl implements XpathQuery { @Override public MetadataElement resolveXpath(Document doc, XPath xpath, String expr) throws CoreException { return new MetadataElement(getMetadataKey(), XpathQueryHelper.resolveMultipleTextItems(doc, xpath, expr, allowEmptyResults(), getSeparator())); } MultiItemConfiguredXpathQuery();  MultiItemConfiguredXpathQuery(String metadataKey, String xpath);  MultiItemConfiguredXpathQuery(String metadataKey, String xpath, String separator); @Override MetadataElement resolveXpath(Document doc, XPath xpath, String expr); String getSeparator(); void setSeparator(String s); }
MultiItemConfiguredXpathQuery extends ConfiguredXpathQueryImpl implements XpathQuery { @Override public MetadataElement resolveXpath(Document doc, XPath xpath, String expr) throws CoreException { return new MetadataElement(getMetadataKey(), XpathQueryHelper.resolveMultipleTextItems(doc, xpath, expr, allowEmptyResults(), getSeparator())); } MultiItemConfiguredXpathQuery();  MultiItemConfiguredXpathQuery(String metadataKey, String xpath);  MultiItemConfiguredXpathQuery(String metadataKey, String xpath, String separator); @Override MetadataElement resolveXpath(Document doc, XPath xpath, String expr); String getSeparator(); void setSeparator(String s);  }