Interface FilterBuilder
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 TypeMethodDescriptionorg.geotools.api.filter.AndCreate a newFilterthat requires that all the providedFilters be satisfied.org.geotools.api.filter.AndallOf(org.geotools.api.filter.Filter... filters) Create a newFilterthat requires that all the providedFilters be satisfied.org.geotools.api.filter.OrCreate a newFilterthat requires at least one of the providedFilters be satisfied.org.geotools.api.filter.OranyOf(org.geotools.api.filter.Filter... filters) Create a newFilterthat requires at least one of the providedFilters be satisfied.Begin creating aFilterthat will call a function with the given name.org.geotools.api.filter.Notnot(org.geotools.api.filter.Filter filter) Create a Filter that matches onMetacards that do not match the providedFilterBegin creating aFilterthat will matchMetacards based on values selected via an XPath selector.
-
Method Details
-
attribute
Begin creating aFilterthat will matchMetacards based onAttributes with the given name.Note Because the Catalog's
Filterprofile uses attribute names and XPath selectors interchangeable, the providedAttributename must not include the forward slash (/) or ampersand (@) characters, which are reserved for XPath selectors (seexpath(String).XPath
Filters will match on allMetacardAttributes that have a format ofAttributeType.AttributeFormat.XMLand match the XPath selector.- Parameters:
attributeName- must not include "/" or "@"- Returns:
XPathBuilderto continue building an XPathFilter
-
function
Begin creating aFilterthat will call a function with the given name. The function can require 0..N arguments.- Parameters:
functionName-- Returns:
ArgumentBuilderto continue and add function argumentsFilter
-
xpath
Begin creating aFilterthat will matchMetacards based on values selected via an XPath selector.Note Because the Catalog's
Filterprofile 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 allMetacardAttributes that have a format ofAttributeType.AttributeFormat.XMLand match the XPath selector.- Parameters:
xPathSelector- must include "/" or "@"- Returns:
XPathBuilderto continue building an XPathFilter
-
allOf
org.geotools.api.filter.And allOf(org.geotools.api.filter.Filter... filters) Create a newFilterthat requires that all the providedFilters be satisfied.- Parameters:
filters- one or moreFilters- Returns:
AndFilter
-
allOf
Create a newFilterthat requires that all the providedFilters be satisfied.- Parameters:
filters-ListofFilters- Returns:
AndFilter
-
anyOf
org.geotools.api.filter.Or anyOf(org.geotools.api.filter.Filter... filters) Create a newFilterthat requires at least one of the providedFilters be satisfied.- Parameters:
filters-ListofFilters- Returns:
AndFilter
-
anyOf
Create a newFilterthat requires at least one of the providedFilters be satisfied.- Parameters:
filters- one or moreFilters- Returns:
AndFilter
-
not
org.geotools.api.filter.Not not(org.geotools.api.filter.Filter filter) Create a Filter that matches onMetacards that do not match the providedFilter- Parameters:
filter- the filter that should not be matched- Returns:
NotFilter
-