Class ConfiguredXpathQuery
- java.lang.Object
-
- com.adaptris.core.services.metadata.xpath.XpathQueryImpl
-
- com.adaptris.core.services.metadata.xpath.ConfiguredXpathQueryImpl
-
- com.adaptris.core.services.metadata.xpath.ConfiguredXpathQuery
-
- All Implemented Interfaces:
XpathMetadataQuery
,XpathObjectQuery
,XpathQuery
public class ConfiguredXpathQuery extends ConfiguredXpathQueryImpl implements XpathQuery
XpathQuery implementation that retuns a single text item from the configured xpath.In the adapter configuration file this class is aliased as configured-xpath-query which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.services.metadata.xpath.XpathQueryImpl
logR
-
-
Constructor Summary
Constructors Constructor Description ConfiguredXpathQuery()
ConfiguredXpathQuery(java.lang.String metadataKey, java.lang.String xpath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MetadataElement
resolveXpath(org.w3c.dom.Document doc, XPath xpath, java.lang.String expr)
Executes an Xpath query.-
Methods inherited from class com.adaptris.core.services.metadata.xpath.ConfiguredXpathQueryImpl
createXpathQuery, getXpathQuery, setXpathQuery, verify
-
Methods inherited from class com.adaptris.core.services.metadata.xpath.XpathQueryImpl
allowEmptyResults, asXmlString, getAllowEmptyResults, getAsXmlString, getMetadataKey, setAllowEmptyResults, setAsXmlString, setMetadataKey
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.adaptris.core.services.metadata.xpath.XpathMetadataQuery
createXpathQuery, getMetadataKey, verify
-
-
-
-
Method Detail
-
resolveXpath
public MetadataElement resolveXpath(org.w3c.dom.Document doc, XPath xpath, java.lang.String expr) throws java.lang.Exception
Description copied from interface:XpathQuery
Executes an Xpath query.
- Specified by:
resolveXpath
in interfaceXpathObjectQuery
- Specified by:
resolveXpath
in interfaceXpathQuery
- Parameters:
doc
- The XML documentxpath
- theXPath
object to use to resolve any expressions.expr
- the xpath expression- Returns:
- a
MetadataElement
with the configured key and the extracted text value - Throws:
java.lang.Exception
-
-