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(java.lang.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(java.lang.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(java.lang.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(java.lang.Object obj) |
ILcdOGCCondition |
getCondition()
Returns the
ILcdOGCCondition object for this instance. |
java.lang.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. |
java.util.List<java.lang.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. |
java.lang.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. |
java.util.List<java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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. |
java.lang.String |
toString() |
clone, clone, getDataType, getValue, getValue, hasValue, hasValue, setValue, setValue
public TLcdOGCFilter()
public TLcdOGCFilter(java.lang.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(java.lang.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(java.lang.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(java.lang.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 java.lang.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(java.lang.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(java.lang.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 java.util.List<java.lang.String> getFeatureIds()
"resource IDs" condition
instead. For WFS 1 servers, it will be translated into a filter with objects IDs.public void addObjectId(java.lang.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 java.lang.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 java.util.List<java.lang.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 boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class TLcdDataObject