<?xml version="1.0"?>
<filterdescription>
<partset>
	<part name="summary">
            <_title>Summary</_title>
            <input type="optionlist" name="summary-type">
                <option value="contains">
                    <_title>contains</_title>
                    <code>(contains? "summary" ${summary})</code>
                </option>
                <option value="not contains">
                    <_title>does not contain</_title>
                    <code>(not (contains? "summary" ${summary}))</code>
                </option>
            </input>
            <input type="string" name="summary"/>
        </part>

     	 <part name="description">
            <_title>Description</_title>
            <input type="optionlist" name="description-type">
                <option value="contains">
                    <_title>contains</_title>
                    <code>(contains? "description" ${description})</code>
                </option>
                <option value="not contains">
                    <_title>does not contain</_title>
                    <code>(not (contains? "description" ${description}))</code>
                </option>
            </input>
            <input type="string" name="description"/>
        </part>
	<part name="anyfield">
            <_title>Any Field</_title>
            <input type="optionlist" name="anyfield-type">
                <option value="contains">
                    <_title>contains</_title>
                    <code>(contains? "any" ${anyfield})</code>
                </option>
                <option value="not contains">
                    <_title>does not contain</_title>
                    <code>(not (contains? "any" ${anyfield}))</code>
                </option>
            </input>
            <input type="string" name="anyfield"/>
        </part>

    <part name="name5">
     <_title>Classification</_title>
      <input type="optionlist" name="name-type">
       <option value="is">
           <_title>is</_title>
           <code>(contains? "classification" ${classification})</code>
      </option>
       <option value="is not">
           <_title>is not</_title>
           <code>(not(contains? "classification" ${classification}))</code>
      </option>  
     </input>
     <input type="optionlist" name="classification">
      <option value="Public">
          <_title>Public</_title>
      </option>
      <option value="Private">
          <_title>Private</_title>
      </option>
      <option value="Confidential">
          <_title>Confidential</_title>
      </option>
     </input>    
   </part>


	<part name="name2">
	     <_title>Organizer</_title>
	      <input type="optionlist" name="name-type">
   	    <option value="contains">
 	          <_title>contains</_title>
 	          <code>(contains? "organizer" ${name})</code>
 	     </option>
 	     <option value="not contains">
 	        <_title>does not contain</_title>
	          <code>(not (contains? "organizer" ${name}))</code>
 	     </option>
 	    </input>
 	    <input type="string" name="name"/>
 	</part>

	<part name="name3">
  	   <_title>Attendee</_title>
 	     <input type="optionlist" name="name-type">
 	      <option value="contains">
  	         <_title>contains</_title>
 	          <code>(contains? "attendee" ${name})</code>
 	     </option>
 	     <option value="not contains">
	         <_title>does not contain</_title>
 	         <code>(not (contains? "attendee" ${name}))</code>
 	     </option>
 	    </input>
 	    <input type="string" name="name"/>
 	 </part>
 
	<part name="name4">
 	    <_title>Location</_title>
 	     <input type="optionlist" name="name-type">
	       <option value="contains">
 	          <_title>contains</_title>
 	          <code>(contains? "location" ${name})</code>
 	     </option>
 	     <option value="not contains">
 	        <_title>does not contain</_title>
	          <code>(not (contains? "location" ${name}))</code>
 	     </option>
 	    </input>
	     <input type="string" name="name"/>
	   </part>

	<part name="category">
	  <_title>Category</_title>
	   <input type="optionlist" name="category-type">
    		<option value="is">
        	<_title>is</_title>
		<code>(has-categories? ${category})</code>
	    </option>
	    <option value="is not">
	       <_title>is not</_title>
	      <code>(not(has-categories? ${category}))</code>
	     </option>
	    </input>
	   <input type="optionlist" name="category">
		<dynamic func="e_util_get_category_filter_options"/>
	   </input>
    </part>

    <part name="attachments">
            <_title>Attachments</_title>
            <input type="optionlist" name="match-type">
                <option value="exist">
                    <_title>Exist</_title>
                    <code>
                        (has-attachments?)
                    </code>
                </option>
                <option value="not exist">
                    <_title>Do Not Exist</_title>
                    <code>
                        (not(has-attachments?))
                    </code>
                </option>
            </input>
        </part>

	<part name="recurrences">
 	 <_title>Recurrence</_title>
	  <input type="optionlist" name="match-type">
 	  <option value="exist">
 	   <_title>Exist</_title>
 	   <code>
		(has-recurrences?)     
	    </code>
   	</option>
   	<option value="not exist">
  	  <_title>Do Not Exist</_title>
   	 <code>
   	  (not (has-recurrences?))
   	 </code>
  	 </option>
 	 </input>
 	</part>

   <part name="count-occurrences">
      <_title>Occurs</_title>
      <input type="optionlist" name="match-type">
         <option value="less-than">
            <_title>Less Than</_title>
            <code>((or (= (occurrences-count?) (- 1)) (&lt; (occurrences-count?) ${count}))</code>
         </option>
         <option value="exactly">
            <_title>Exactly</_title>
            <code>((or (= (occurrences-count?) (- 1)) (= (occurrences-count?) ${count}))</code>
         </option>
         <option value="more-than">
            <_title>More Than</_title>
            <code>((or (= (occurrences-count?) (- 1)) (&gt; (occurrences-count?) ${count}))</code>
         </option>
      </input>
      <input type="integer" name="count"/>
   </part>
  </partset>

<ruleset>
    <rule grouping="any" source="demand">
      <_title>Summary Contains</_title>
	<partset>
        	<part name="summary">
	          <value name="summary-type" type="option" value="contains"/>
        	  <value name="summary" type="string"/>
        	</part>        
         </partset>

      <sources/>
    </rule>
    
    <rule grouping="any" source="demand">
      <_title>Description Contains</_title>
      <partset>
	        <part name="description">
        	  <value name="description-type" type="option" value="contains"/>
	          <value name="description" type="string"/>
        	</part>        
       </partset>
      <sources/>
    </rule>
    
    <rule grouping="any" source="demand">
      <_title>Any field contains</_title>
	<partset>
 	       <part name="anyfield">
        	  <value name="anyfield-type" type="option" value="contains"/>
	          <value name="anyfield" type="string"/>
        	</part>
        </partset>
      <sources/>
    </rule>
     
  </ruleset>

  </filterdescription>
