Interface FilterBuilder


public interface FilterBuilder
Service interface with which implementations will register in the OSGi Registry for use by components needing to build Filters in an easy way without a dependence on a particular Filter implementation.

This method of creating Filter instances is strongly recommended.

Author:
Michael Menousek
  • Method Summary

    Modifier and Type
    Method
    Description
    org.geotools.api.filter.And
    allOf(List<org.geotools.api.filter.Filter> filters)
    Create a new Filter that requires that all the provided Filters be satisfied.
    org.geotools.api.filter.And
    allOf(org.geotools.api.filter.Filter... filters)
    Create a new Filter that requires that all the provided Filters be satisfied.
    org.geotools.api.filter.Or
    anyOf(List<org.geotools.api.filter.Filter> filters)
    Create a new Filter that requires at least one of the provided Filters be satisfied.
    org.geotools.api.filter.Or
    anyOf(org.geotools.api.filter.Filter... filters)
    Create a new Filter that requires at least one of the provided Filters be satisfied.
    attribute(String attributeName)
    Begin creating a Filter that will match Metacards based on Attributes with the given name.
    function(String functionName)
    Begin creating a Filter that will call a function with the given name.
    org.geotools.api.filter.Not
    not(org.geotools.api.filter.Filter filter)
    Create a Filter that matches on Metacards that do not match the provided Filter
    xpath(String xPathSelector)
    Begin creating a Filter that will match Metacards based on values selected via an XPath selector.
  • Method Details

    • attribute

      AttributeBuilder attribute(String attributeName)
      Begin creating a Filter that will match Metacards based on Attributes with the given name.

      Note Because the Catalog's Filter profile uses attribute names and XPath selectors interchangeable, the provided Attribute name must not include the forward slash (/) or ampersand (@) characters, which are reserved for XPath selectors (see xpath(String).

      XPath Filters will match on all Metacard Attributes that have a format of AttributeType.AttributeFormat.XML and match the XPath selector.

      Parameters:
      attributeName - must not include "/" or "@"
      Returns:
      XPathBuilder to continue building an XPath Filter
    • function

      ArgumentBuilder function(String functionName)
      Begin creating a Filter that will call a function with the given name. The function can require 0..N arguments.
      Parameters:
      functionName -
      Returns:
      ArgumentBuilder to continue and add function arguments Filter
    • xpath

      XPathBuilder xpath(String xPathSelector)
      Begin creating a Filter that will match Metacards based on values selected via an XPath selector.

      Note Because the Catalog's Filter profile uses attribute names and XPath selectors interchangeable, XPath must include either the forward slash (/) or ampersand (@) character to indicate use of XPath.

      XPath Filters will match on all Metacard Attributes that have a format of AttributeType.AttributeFormat.XML and match the XPath selector.

      Parameters:
      xPathSelector - must include "/" or "@"
      Returns:
      XPathBuilder to continue building an XPath Filter
    • allOf

      org.geotools.api.filter.And allOf(org.geotools.api.filter.Filter... filters)
      Create a new Filter that requires that all the provided Filters be satisfied.
      Parameters:
      filters - one or more Filters
      Returns:
      And Filter
    • allOf

      org.geotools.api.filter.And allOf(List<org.geotools.api.filter.Filter> filters)
      Create a new Filter that requires that all the provided Filters be satisfied.
      Parameters:
      filters - List of Filters
      Returns:
      And Filter
    • anyOf

      org.geotools.api.filter.Or anyOf(org.geotools.api.filter.Filter... filters)
      Create a new Filter that requires at least one of the provided Filters be satisfied.
      Parameters:
      filters - List of Filters
      Returns:
      And Filter
    • anyOf

      org.geotools.api.filter.Or anyOf(List<org.geotools.api.filter.Filter> filters)
      Create a new Filter that requires at least one of the provided Filters be satisfied.
      Parameters:
      filters - one or more Filters
      Returns:
      And Filter
    • not

      org.geotools.api.filter.Not not(org.geotools.api.filter.Filter filter)
      Create a Filter that matches on Metacards that do not match the provided Filter
      Parameters:
      filter - the filter that should not be matched
      Returns:
      Not Filter