Class XMLTokenExpressionIterator

java.lang.Object
org.apache.camel.support.ExpressionSupport
org.apache.camel.support.ExpressionAdapter
org.apache.camel.language.xtokenizer.XMLTokenExpressionIterator
All Implemented Interfaces:
org.apache.camel.Expression, org.apache.camel.Predicate, org.apache.camel.spi.NamespaceAware

public class XMLTokenExpressionIterator extends org.apache.camel.support.ExpressionAdapter implements org.apache.camel.spi.NamespaceAware
An XMLTokenizeLanguage based iterator.
  • Field Details

    • path

      protected final String path
    • mode

      protected char mode
    • group

      protected int group
    • source

      protected org.apache.camel.Expression source
    • nsmap

      protected Map<String,String> nsmap
  • Constructor Details

    • XMLTokenExpressionIterator

      public XMLTokenExpressionIterator(String path, char mode)
    • XMLTokenExpressionIterator

      public XMLTokenExpressionIterator(org.apache.camel.Expression source, String path, char mode)
  • Method Details

    • init

      public void init(org.apache.camel.CamelContext context)
      Specified by:
      init in interface org.apache.camel.Expression
      Specified by:
      init in interface org.apache.camel.Predicate
      Overrides:
      init in class org.apache.camel.support.ExpressionAdapter
    • setNamespaces

      public void setNamespaces(Map<String,String> nsmap)
      Specified by:
      setNamespaces in interface org.apache.camel.spi.NamespaceAware
    • getNamespaces

      public Map<String,String> getNamespaces()
      Specified by:
      getNamespaces in interface org.apache.camel.spi.NamespaceAware
    • setMode

      public void setMode(char mode)
    • setMode

      public void setMode(String mode)
    • getGroup

      public int getGroup()
    • setGroup

      public void setGroup(int group)
    • createIterator

      protected Iterator<?> createIterator(InputStream in, String charset) throws XMLStreamException, UnsupportedEncodingException
      Throws:
      XMLStreamException
      UnsupportedEncodingException
    • createIterator

      protected Iterator<?> createIterator(InputStream in) throws XMLStreamException, IOException
      Throws:
      XMLStreamException
      IOException
    • createIterator

      protected Iterator<?> createIterator(Reader in) throws XMLStreamException
      Throws:
      XMLStreamException
    • matches

      public boolean matches(org.apache.camel.Exchange exchange)
      Specified by:
      matches in interface org.apache.camel.Predicate
      Overrides:
      matches in class org.apache.camel.support.ExpressionSupport
    • evaluate

      public Object evaluate(org.apache.camel.Exchange exchange)
      Overrides:
      evaluate in class org.apache.camel.support.ExpressionSupport
    • doEvaluate

      protected Object doEvaluate(org.apache.camel.Exchange exchange, boolean closeStream)
      Strategy to evaluate the exchange
      Parameters:
      exchange - the exchange
      closeStream - whether to close the stream before returning from this method.
      Returns:
      the evaluated value