com.moximedia.ows.wfs
Class FilterAnd

java.lang.Object
  extended bycom.moximedia.ows.wfs.FilterAnd
All Implemented Interfaces:
Filter, java.io.Serializable

public class FilterAnd
extends java.lang.Object
implements Filter, java.io.Serializable

Implementation of OGC Filter encoding specification for "And".

Author:
Doug Cates - Moxi Media Inc.
See Also:
Serialized Form

Constructor Summary
FilterAnd()
          Creates a new FilterAnd object.
FilterAnd(Filter filter1, Filter filter2)
          Creates a new FilterAnd object combining two filters.
FilterAnd(Filter filter1, Filter filter2, boolean isNot)
          Creates a new FilterAnd object combining two filters.
 
Method Summary
 void add(Filter filter)
          Adds a filter to the FilterAnd object.
 FilterAnd and(Filter anotherFilter)
          Combines two filters in an And element.
 int getFilterType()
          Gets an enumerated value indicating the type of filter this is.
 java.lang.String getKvpRequestString()
          Returns the FILTER= string to request features using this filter.
 java.lang.String getKvpRequestString(boolean useOgcNamespaces)
          Returns the FILTER= string to request features using this filter.
 java.lang.String getXmlRequestString()
          Returns the XML WFS request representing this filter.
 java.lang.String getXmlRequestString(boolean useOgcNamespaces)
          Returns the XML WFS request representing this filter.
 boolean isValid()
          Returns an indicator of whether this filter is valid.
 Filter not()
          Negates the filter (encloses it in a not element).
 FilterOr or(Filter anotherFilter)
          Combines two filters in an Or element.
 java.lang.String toString()
          Displays this object as a text string.
 java.lang.String toString(boolean useOgcNamespaces)
          Displays this object as a text string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FilterAnd

public FilterAnd()
Creates a new FilterAnd object.


FilterAnd

public FilterAnd(Filter filter1,
                 Filter filter2)
Creates a new FilterAnd object combining two filters.

Parameters:
filter1 - One of the filters.
filter2 - One of the filters.

FilterAnd

public FilterAnd(Filter filter1,
                 Filter filter2,
                 boolean isNot)
Creates a new FilterAnd object combining two filters. The filter can be negated or enclosed in a <Not> element.

Parameters:
filter1 - One of the filters.
filter2 - One of the filters.
isNot - True if the filter should be negated (enclosed in a <Not> element).
Method Detail

add

public void add(Filter filter)
Adds a filter to the FilterAnd object.

Parameters:
filter - The filter to add.

and

public FilterAnd and(Filter anotherFilter)
Combines two filters in an And element. Don't use this method if one of the objects is FilterFeatureId.

Specified by:
and in interface Filter
Parameters:
anotherFilter - The other filter.
Returns:
The FilterAnd object combining the filters.

isValid

public boolean isValid()
Returns an indicator of whether this filter is valid.

Returns:
True if there are two or more valid filters in this one.

or

public FilterOr or(Filter anotherFilter)
Combines two filters in an Or element. Don't use this method if one of the objects is FilterFeatureId.

Specified by:
or in interface Filter
Returns:
The FilterOr object combining the filters.

not

public Filter not()
Negates the filter (encloses it in a not element).

Specified by:
not in interface Filter
Returns:
The negated filter.

toString

public java.lang.String toString()
Displays this object as a text string.

Specified by:
toString in interface Filter
Returns:
The object as a text string.

toString

public java.lang.String toString(boolean useOgcNamespaces)
Displays this object as a text string.

Specified by:
toString in interface Filter
Parameters:
useOgcNamespaces - True if the string should contain OGC namespaces.
Returns:
The object as a text string.

getKvpRequestString

public java.lang.String getKvpRequestString()
Returns the FILTER= string to request features using this filter.

Specified by:
getKvpRequestString in interface Filter
Returns:
The FILTER= string to request features using this filter.

getKvpRequestString

public java.lang.String getKvpRequestString(boolean useOgcNamespaces)
Returns the FILTER= string to request features using this filter.

Specified by:
getKvpRequestString in interface Filter
Returns:
The FILTER= string to request features using this filter.

getXmlRequestString

public java.lang.String getXmlRequestString()
Returns the XML WFS request representing this filter.

Specified by:
getXmlRequestString in interface Filter
Returns:
The XML WFS request string.

getXmlRequestString

public java.lang.String getXmlRequestString(boolean useOgcNamespaces)
Returns the XML WFS request representing this filter.

Returns:
The XML WFS request string.

getFilterType

public int getFilterType()
Gets an enumerated value indicating the type of filter this is.

Specified by:
getFilterType in interface Filter
Returns:
The filter type;


Internet Mapping Framework for OpenGIS Java Object Model API (v1.3.007)
Copyright © 2005 Moxi Media Inc. and Province of British Columbia. All Rights Reserved.