Package com.thingworx.types.data.filters
Class TagFilter
- java.lang.Object
-
- com.thingworx.types.data.filters.TagFilter
-
- All Implemented Interfaces:
IFilter
@ThingworxExtensionApiClass(since={6,6}, canInstantiate=true) public final class TagFilter extends java.lang.Object implements IFilter
Filter which applies a tag matching criteria.
-
-
Constructor Summary
Constructors Constructor Description TagFilter(java.lang.String fieldName, TagCollection tags, boolean inclusive)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
evaluateFilter(ValueCollection row)
boolean
evaluateValue(IPrimitiveType iPrimitive)
java.lang.String
getFieldName()
java.lang.String
getFilterExpression()
Gets the filter expression.TagCollection
getTagCollection()
boolean
isInclusive()
void
resolveFields(DataShapeDefinition metadata)
void
setFieldName(java.lang.String value)
void
setFilterExpression(java.lang.String value)
Sets the filter expression.org.json.JSONObject
toJSON()
Produces JSON representation of this filter.
-
-
-
Constructor Detail
-
TagFilter
@ThingworxExtensionApiMethod(since={6,6}) public TagFilter(java.lang.String fieldName, TagCollection tags, boolean inclusive)
-
-
Method Detail
-
resolveFields
@ThingworxExtensionApiMethod(since={6,6}) public void resolveFields(DataShapeDefinition metadata)
- Specified by:
resolveFields
in interfaceIFilter
-
getFieldName
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String getFieldName()
- Specified by:
getFieldName
in interfaceIFilter
-
setFieldName
@ThingworxExtensionApiMethod(since={6,6}) public void setFieldName(java.lang.String value)
- Specified by:
setFieldName
in interfaceIFilter
-
setFilterExpression
@ThingworxExtensionApiMethod(since={6,6}) public void setFilterExpression(java.lang.String value)
Description copied from interface:IFilter
Sets the filter expression.- Specified by:
setFilterExpression
in interfaceIFilter
- Parameters:
value
- the filter expression- See Also:
IFilter.getFilterExpression()
-
getFilterExpression
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String getFilterExpression()
Description copied from interface:IFilter
Gets the filter expression.- Specified by:
getFilterExpression
in interfaceIFilter
- Returns:
- the filter expression
- See Also:
IFilter.setFilterExpression(String)
-
evaluateValue
@ThingworxExtensionApiMethod(since={6,6}) public boolean evaluateValue(IPrimitiveType iPrimitive)
- Specified by:
evaluateValue
in interfaceIFilter
-
evaluateFilter
@ThingworxExtensionApiMethod(since={6,6}) public boolean evaluateFilter(ValueCollection row)
- Specified by:
evaluateFilter
in interfaceIFilter
-
isInclusive
@ThingworxExtensionApiMethod(since={6,6}) public boolean isInclusive()
-
getTagCollection
@ThingworxExtensionApiMethod(since={6,6}) public TagCollection getTagCollection()
-
toJSON
@ThingworxExtensionApiMethod(since={6,6}) public org.json.JSONObject toJSON() throws org.json.JSONException
Produces JSON representation of this filter. Fields are as follows:CommonPropertyNames.PROP_TYPE
:FilterFactory.FILTER_TAGGEDWITH
whenisInclusive()
is true; otherwiseFilterFactory.FILTER_NOT_TAGGEDWITH
CommonPropertyNames.PROP_FIELDNAME
:getFieldName()
resultCommonPropertyNames.PROP_TAGS
:getTagCollection()
.toJSON() result
-
-