public class TLcdOGCFilter extends TLcdDataObject implements ILcdGenericExpression
<ogc:Filter>
element as defined by the OGC in
the document OpenGIS Filter Encoding Implementation Specification. 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
.
ILcdOGCCondition
,
TLcdOGCFilterFactory
Constructor and Description |
---|
TLcdOGCFilter()
Default constructor.
|
TLcdOGCFilter(ILcdOGCCondition aCondition)
Constructs an instance with a given
ILcdOGCCondition . |
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. |
Modifier and Type | Method and Description |
---|---|
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. |
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. |
ILcdDynamicFilter |
asPredicate(TLcdOGCFilterContext aFilterContext)
Convenience method that evaluates this filter into a predicate that can be used to restrict collections of (OGC) features.
|
boolean |
equals(Object obj) |
ILcdOGCCondition |
getCondition()
Returns the
ILcdOGCCondition object for this instance. |
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. |
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. |
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. |
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. |
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. |
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. |
int |
hashCode() |
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. |
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. |
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. |
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. |
void |
setCondition(ILcdOGCCondition aCondition)
Sets the
ILcdOGCCondition object for this instance. |
String |
toString() |
clone, clone, getDataType, getValue, getValue, hasValue, hasValue, setValue, setValue
public TLcdOGCFilter()
public TLcdOGCFilter(String[] aIds)
"resource IDs" condition
instead. For WFS 1 servers, it will be translated into a filter with objects IDs.aIds
- an array of object ID's.public TLcdOGCFilter(ILcdOGCCondition aCondition)
ILcdOGCCondition
. The easiest
way to create a condition is by using TLcdOGCFilterFactory
.aCondition
- the given ILcdOGCCondition
.TLcdOGCFilterFactory
public boolean removeObjectId(String aId)
"resource IDs" condition
instead. For WFS 1 servers, it will be translated into a filter with objects IDs.aId
- the object ID to be removed.public void insertObjectIdAt(String aId, int aIndex)
"resource IDs" condition
instead. For WFS 1 servers, it will be translated into a filter with objects IDs.aId
- the object ID to be added.aIndex
- the index of the position.public void addFeatureId(String aId)
"resource IDs" condition
instead. For WFS 1 servers, it will be translated into a filter with objects IDs.aId
- the feature ID to be added.public String getFeatureId(int index)
"resource IDs" condition
instead. For WFS 1 servers, it will be translated into a filter with objects IDs.index
- the index of the position.public int getFeatureIdCount()
"resource IDs" condition
instead. For WFS 1 servers, it will be translated into a filter with objects IDs.public boolean removeFeatureId(String aId)
"resource IDs" condition
instead. For WFS 1 servers, it will be translated into a filter with objects IDs.aId
- the feature ID to be removed.public void insertFeatureIdAt(String aId, int aIndex)
"resource IDs" condition
instead. For WFS 1 servers, it will be translated into a filter with objects IDs.aId
- the feature ID to be added.aIndex
- the index of the position.public List<String> getFeatureIds()
"resource IDs" condition
instead. For WFS 1 servers, it will be translated into a filter with objects IDs.public void addObjectId(String aId)
"resource IDs" condition
instead. For WFS 1 servers, it will be translated into a filter with objects IDs.aId
- the object ID to be added.public String getObjectId(int index)
"resource IDs" condition
instead. For WFS 1 servers, it will be translated into a filter with objects IDs.index
- the index of the position.public int getObjectIdCount()
"resource IDs" condition
instead. For WFS 1 servers, it will be translated into a filter with objects IDs.public ILcdOGCCondition getCondition()
ILcdOGCCondition
object for this instance.ILcdOGCCondition
object for this instance.public void setCondition(ILcdOGCCondition aCondition)
ILcdOGCCondition
object for this instance.aCondition
- the ILcdOGCCondition
object for this instance.public List<String> getObjectIds()
"resource IDs" condition
instead. For WFS 1 servers, it will be translated into a filter with objects IDs.public final ILcdDynamicFilter asPredicate(TLcdOGCFilterContext aFilterContext)
TLcdOGCFilterEvaluator
.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.TLcdOGCFilterEvaluator
public String toString()
toString
in class TLcdDataObject