Class TLcdOGCFilter

java.lang.Object
com.luciad.datamodel.TLcdDataObject
com.luciad.ogc.filter.model.TLcdOGCFilter
All Implemented Interfaces:
ILcdDataObject, ILcdGenericExpression, ILcdCloneable, ILcdDeepCloneable, Cloneable

public class TLcdOGCFilter extends TLcdDataObject implements ILcdGenericExpression
This class represents the <ogc:Filter> element as defined by the OGC in the document OpenGIS Filter Encoding Implementation Specification.
Use TLcdOGCFilterFactory to easily create the most common filter conditions.

Since 2017.0, you should use a "resource IDs" condition instead of specifying object IDs directly in the filter. For OGC Filter 1.1 (for example for WFS 1.1 servers), it will be translated into a filter with objects IDs.

You must never change this filter or its underlying condition once it is in use.

A filter can be evaluated into a predicate, either directly , or using TLcdOGCFilterEvaluator.

See Also:
  • Constructor Details

    • TLcdOGCFilter

      public TLcdOGCFilter()
      Default constructor.
    • TLcdOGCFilter

      public TLcdOGCFilter(String[] aIds)
      Deprecated.
      Since 2017.0, you should use a "resource IDs" condition instead. For WFS 1 servers, it will be translated into a filter with objects IDs.
      Constructs an instance with a given array of object ID's.
      Parameters:
      aIds - an array of object ID's.
    • TLcdOGCFilter

      public TLcdOGCFilter(ILcdOGCCondition aCondition)
      Constructs an instance with a given ILcdOGCCondition. The easiest way to create a condition is by using TLcdOGCFilterFactory.
      Parameters:
      aCondition - the given ILcdOGCCondition.
      See Also:
  • Method Details

    • removeObjectId

      public boolean removeObjectId(String aId)
      Deprecated.
      Since 2017.0, you should use a "resource IDs" condition instead. For WFS 1 servers, it will be translated into a filter with objects IDs.
      Removes an object ID.
      Parameters:
      aId - the object ID to be removed.
      Returns:
      true if the argument was an ID of the list; false otherwise.
    • insertObjectIdAt

      public void insertObjectIdAt(String aId, int aIndex)
      Deprecated.
      Since 2017.0, you should use a "resource IDs" condition instead. For WFS 1 servers, it will be translated into a filter with objects IDs.
      Adds an object ID to this instance at the position given by the index.
      Parameters:
      aId - the object ID to be added.
      aIndex - the index of the position.
    • addFeatureId

      public void addFeatureId(String aId)
      Deprecated.
      Since 2017.0, you should use a "resource IDs" condition instead. For WFS 1 servers, it will be translated into a filter with objects IDs.
      Adds a feature ID to this instance.
      Parameters:
      aId - the feature ID to be added.
    • getFeatureId

      public String getFeatureId(int index)
      Deprecated.
      Since 2017.0, you should use a "resource IDs" condition instead. For WFS 1 servers, it will be translated into a filter with objects IDs.
      Returns the feature ID for a position given by the index.
      Parameters:
      index - the index of the position.
      Returns:
      the feature ID for the given index.
    • getFeatureIdCount

      public int getFeatureIdCount()
      Deprecated.
      Since 2017.0, you should use a "resource IDs" condition instead. For WFS 1 servers, it will be translated into a filter with objects IDs.
      Returns the count of feature ID's for this instance.
      Returns:
      the count of feature ID's for this instance.
    • removeFeatureId

      public boolean removeFeatureId(String aId)
      Deprecated.
      Since 2017.0, you should use a "resource IDs" condition instead. For WFS 1 servers, it will be translated into a filter with objects IDs.
      Removes a feature ID.
      Parameters:
      aId - the feature ID to be removed.
      Returns:
      true if the argument was an ID of the list; false otherwise.
    • insertFeatureIdAt

      public void insertFeatureIdAt(String aId, int aIndex)
      Deprecated.
      Since 2017.0, you should use a "resource IDs" condition instead. For WFS 1 servers, it will be translated into a filter with objects IDs.
      Adds a feature ID to this instance at the position given by the index.
      Parameters:
      aId - the feature ID to be added.
      aIndex - the index of the position.
    • getFeatureIds

      public List<String> getFeatureIds()
      Deprecated.
      Since 2017.0, you should use a "resource IDs" condition instead. For WFS 1 servers, it will be translated into a filter with objects IDs.
    • addObjectId

      public void addObjectId(String aId)
      Deprecated.
      Since 2017.0, you should use a "resource IDs" condition instead. For WFS 1 servers, it will be translated into a filter with objects IDs.
      Adds an object ID to this instance.
      Parameters:
      aId - the object ID to be added.
    • getObjectId

      public String getObjectId(int index)
      Deprecated.
      Since 2017.0, you should use a "resource IDs" condition instead. For WFS 1 servers, it will be translated into a filter with objects IDs.
      Returns the object ID for a position given by the index.
      Parameters:
      index - the index of the position.
      Returns:
      the object ID for the given index.
    • getObjectIdCount

      public int getObjectIdCount()
      Deprecated.
      Since 2017.0, you should use a "resource IDs" condition instead. For WFS 1 servers, it will be translated into a filter with objects IDs.
      Returns the count of object ID's for this instance.
      Returns:
      the count of object ID's for this instance.
    • getCondition

      public ILcdOGCCondition getCondition()
      Returns the ILcdOGCCondition object for this instance.
      Returns:
      the ILcdOGCCondition object for this instance.
    • setCondition

      public void setCondition(ILcdOGCCondition aCondition)
      Sets the ILcdOGCCondition object for this instance.
      Parameters:
      aCondition - the ILcdOGCCondition object for this instance.
    • getObjectIds

      public List<String> getObjectIds()
      Deprecated.
      Since 2017.0, you should use a "resource IDs" condition instead. For WFS 1 servers, it will be translated into a filter with objects IDs.
      Returns the list of object id's.
      Returns:
      A list of id's.
    • asPredicate

      public final ILcdDynamicFilter asPredicate(TLcdOGCFilterContext aFilterContext)
      Convenience method that evaluates this filter into a predicate that can be used to restrict collections of (OGC) features. For more details, refer to TLcdOGCFilterEvaluator.
      Parameters:
      aFilterContext - the context in which to create the filter. The context defines amongst others how a property is retrieved from an (OGC) feature. When creating a filter for filtering the domain objects of an ILcdModel, you might want to use the TLcdOGCFilterContext.forModel(ILcdModel) method to create this context.
      Since:
      2017.1
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class TLcdDataObject