org.apache.camel.support
Class XMLTokenExpressionIterator
java.lang.Object
org.apache.camel.support.ExpressionSupport
org.apache.camel.support.ExpressionAdapter
org.apache.camel.support.XMLTokenExpressionIterator
- All Implemented Interfaces:
- Expression, Predicate, NamespaceAware
public class XMLTokenExpressionIterator
- extends ExpressionAdapter
- implements NamespaceAware
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
path
protected final String path
mode
protected char mode
nsmap
protected Map<String,String> nsmap
XMLTokenExpressionIterator
public XMLTokenExpressionIterator(String path,
char mode)
setNamespaces
public void setNamespaces(Map<String,String> nsmap)
- Description copied from interface:
NamespaceAware
- Injects the XML Namespaces of prefix -> uri mappings
- Specified by:
setNamespaces in interface NamespaceAware
- Parameters:
nsmap - the XML namespaces with the key of prefixes and the value the URIs
setMode
public void setMode(char mode)
setMode
public void setMode(String mode)
createIterator
protected Iterator<?> createIterator(InputStream in,
String charset)
throws XMLStreamException,
UnsupportedEncodingException
- Throws:
XMLStreamException
UnsupportedEncodingException
createIterator
protected Iterator<?> createIterator(Reader in)
throws XMLStreamException
- Throws:
XMLStreamException
matches
public boolean matches(Exchange exchange)
- Description copied from interface:
Predicate
- Evaluates the predicate on the message exchange and returns true if this
exchange matches the predicate
- Specified by:
matches in interface Predicate- Overrides:
matches in class ExpressionSupport
- Parameters:
exchange - the message exchange
- Returns:
- true if the predicate matches
evaluate
public Object evaluate(Exchange exchange)
- Overrides:
evaluate in class ExpressionSupport
doEvaluate
protected Object doEvaluate(Exchange exchange,
boolean closeStream)
- Strategy to evaluate the exchange
- Parameters:
exchange - the exchangecloseStream - whether to close the stream before returning from this method.
- Returns:
- the evaluated value
Apache Camel