org.n52.oxf.valueDomains.filter
Class LogicFilter

java.lang.Object
  extended by org.n52.oxf.valueDomains.filter.LogicFilter
All Implemented Interfaces:
IFilter

public class LogicFilter
extends Object
implements IFilter

Class represents a logical filter which is conform to OGC Filter Encoding Specification 1.1.0

Author:
Christoph Stasch

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.n52.oxf.valueDomains.filter.IFilter
IFilter.ComparisonOperators
 
Field Summary
 
Fields inherited from interface org.n52.oxf.valueDomains.filter.IFilter
AND, NOT, OR
 
Constructor Summary
LogicFilter(String filterType)
          Constructor with filterType as parameter
LogicFilter(String filterType, IFilter leftFilter)
          Constructor only useable for NOT Filters
LogicFilter(String filterType, IFilter leftFilter, ArrayList<IFilter> rightFilters)
          Constructor with all parameters, should be used as constructor for AND and OR filters
 
Method Summary
 String getFilterType()
          returns the type of this logical filter
 IFilter getLeftFilter()
           
 ArrayList<IFilter> getRightFilters()
           
 String toXML()
          creates a string representation of the logical filter (without begin and end-tag!)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogicFilter

public LogicFilter(String filterType)
Constructor with filterType as parameter

Parameters:
filterType - one of the three logical filter types

LogicFilter

public LogicFilter(String filterType,
                   IFilter leftFilter,
                   ArrayList<IFilter> rightFilters)
Constructor with all parameters, should be used as constructor for AND and OR filters

Parameters:
filterType - type of this LogicFilter (AND or OR)
leftFilter - firstFilter of the LogicFilter
rightFilters - second and following filters of the logical filter

LogicFilter

public LogicFilter(String filterType,
                   IFilter leftFilter)
Constructor only useable for NOT Filters

Parameters:
filterType - logical filtertype (only NOT!!)
leftFilter - Filter which should be applied of a NOT Filter
Method Detail

getFilterType

public String getFilterType()
returns the type of this logical filter

Specified by:
getFilterType in interface IFilter
Returns:
the type of this logical filter (e.g. NOT)

getLeftFilter

public IFilter getLeftFilter()
Returns:
the first filter of this LogicFilter

getRightFilters

public ArrayList<IFilter> getRightFilters()
Returns:
the second filter and following filters of this LogicFilter as ArrayList

toXML

public String toXML()
creates a string representation of the logical filter (without begin and end-tag!) in xml-format

Specified by:
toXML in interface IFilter
Returns:
logical filter as xml-string


Copyright © 2012-2013 52north.org. All Rights Reserved.