@ThingworxExtensionApiClass(since={6,6}, canInstantiate=true) public final class TagFilter extends java.lang.Object implements IFilter
Constructor and Description |
---|
TagFilter(java.lang.String fieldName,
TagCollection tags,
boolean inclusive) |
Modifier and Type | Method and 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. |
@ThingworxExtensionApiMethod(since={6,6}) public TagFilter(java.lang.String fieldName, TagCollection tags, boolean inclusive)
@ThingworxExtensionApiMethod(since={6,6}) public void resolveFields(DataShapeDefinition metadata)
resolveFields
in interface IFilter
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String getFieldName()
getFieldName
in interface IFilter
@ThingworxExtensionApiMethod(since={6,6}) public void setFieldName(java.lang.String value)
setFieldName
in interface IFilter
@ThingworxExtensionApiMethod(since={6,6}) public void setFilterExpression(java.lang.String value)
IFilter
setFilterExpression
in interface IFilter
value
- the filter expressionIFilter.getFilterExpression()
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String getFilterExpression()
IFilter
getFilterExpression
in interface IFilter
IFilter.setFilterExpression(String)
@ThingworxExtensionApiMethod(since={6,6}) public boolean evaluateValue(IPrimitiveType iPrimitive)
evaluateValue
in interface IFilter
@ThingworxExtensionApiMethod(since={6,6}) public boolean evaluateFilter(ValueCollection row)
evaluateFilter
in interface IFilter
@ThingworxExtensionApiMethod(since={6,6}) public boolean isInclusive()
@ThingworxExtensionApiMethod(since={6,6}) public TagCollection getTagCollection()
@ThingworxExtensionApiMethod(since={6,6}) public org.json.JSONObject toJSON() throws org.json.JSONException
CommonPropertyNames.PROP_TYPE
: FilterFactory.FILTER_TAGGEDWITH
when
isInclusive()
is true; otherwise FilterFactory.FILTER_NOT_TAGGEDWITH
CommonPropertyNames.PROP_FIELDNAME
: getFieldName()
result
CommonPropertyNames.PROP_TAGS
: getTagCollection()
.toJSON() result