<?xml version="1.0" encoding="UTF-8"?>
<!--
     # Licensed Materials - Property of IBM
     # Copyright IBM Corp. 2015,2016
-->
<operatorModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.ibm.com/xmlns/prod/streams/spl/operator" xmlns:cmn="http://www.ibm.com/xmlns/prod/streams/spl/common" xsi:schemaLocation="http://www.ibm.com/xmlns/prod/streams/spl/operator operatorModel.xsd">
  <cppOperatorModel>
    <context>
      <description>
Looks for a string term in any attribute in the tuple.
# Python
    @spl.filter()
    class ContainsFilter(object):
        &quot;&quot;&quot;
        Looks for a string term in any attribute in the tuple.
        &quot;&quot;&quot;
        def __init__(self, term):
            self.term = term;
    
        def __call__(self, **tuple_):
            for s in tuple_.values():
                if self.term in str(s):
                    return True
            return False

      </description>
      <iconUri size="16">../../opt/.splpy/icons/python-powered16.gif</iconUri>
      <iconUri size="32">../../opt/.splpy/icons/python-powered32.gif</iconUri>
      <metrics>
      </metrics>
      <libraryDependencies>
        <library>
          <cmn:description>SPLPY header</cmn:description>
          <cmn:managedLibrary>
            <cmn:includePath>../../opt/.splpy/include</cmn:includePath>
          </cmn:managedLibrary>
        </library>
        <library>
          <cmn:description>Python libraries.</cmn:description>
          <cmn:managedLibrary>
            <cmn:command>../../opt/.splpy/common/pyversion3.sh</cmn:command>
          </cmn:managedLibrary>
        </library>
      </libraryDependencies>
      <providesSingleThreadedContext>Always</providesSingleThreadedContext>
      <allowCustomLogic>false</allowCustomLogic>
    </context>
    <parameters>
      <allowAny>false</allowAny>
      
 <parameter>
  <name>term</name>
  <description></description>
  <optional>false</optional>
  <rewriteAllowed>true</rewriteAllowed>
  <expressionMode>AttributeFree</expressionMode>
  <type></type>
  <cardinality>1</cardinality>
 </parameter>
    </parameters>
    <inputPorts>
      <inputPortSet>
        <description>

           Tuple attribute values are passed by name to the Python callable using `\*\*kwargs`.
                 
        </description>
        <tupleMutationAllowed>false</tupleMutationAllowed>
        <windowingMode>NonWindowed</windowingMode>
        <windowPunctuationInputMode>Oblivious</windowPunctuationInputMode>
        <cardinality>1</cardinality>
        <optional>false</optional>
      </inputPortSet>
    </inputPorts>
    <outputPorts>
      <outputPortSet>
        <description>
This filter operator is configurable with one or two output ports. This first output port is mandatory.

This filter operator requires that the stream type of this output port matches the stream type of the input port. This output port receives the tuples that match the filter.
        </description>
        <expressionMode>Nonexistent</expressionMode>
        <autoAssignment>true</autoAssignment>
        <completeAssignment>false</completeAssignment>
        <rewriteAllowed>true</rewriteAllowed>
        <windowPunctuationOutputMode>Preserving</windowPunctuationOutputMode>
        <windowPunctuationInputPort>0</windowPunctuationInputPort>
        <tupleMutationAllowed>false</tupleMutationAllowed>
        <cardinality>1</cardinality>
        <optional>false</optional>
      </outputPortSet>
      <outputPortSet>
        <description>
This filter operator is configurable with one or two output ports. This second output port is optional.

This filter operator requires that the stream type of this output port matches the stream type of the input port. This output port, if present, receives the tuples that fail to match the filter.
        </description>
        <expressionMode>Nonexistent</expressionMode>
        <autoAssignment>false</autoAssignment>
        <completeAssignment>false</completeAssignment>
        <rewriteAllowed>true</rewriteAllowed>
        <windowPunctuationOutputMode>Preserving</windowPunctuationOutputMode>
        <windowPunctuationInputPort>0</windowPunctuationInputPort>
        <tupleMutationAllowed>false</tupleMutationAllowed>
        <cardinality>1</cardinality>
        <optional>true</optional>
      </outputPortSet>
    </outputPorts>
  </cppOperatorModel>
</operatorModel>
