## DS_C_FILTER_ITEM

An instance of OM class DS_C_FILTER_ITEM is a component of DS_C_FILTER. It is an assertion about the existence or values of a single attribute type in a directory entry.

An instance of this OM class has the OM attributes of its superclasses, OM_C_OBJECT and DS_C_ATTRIBUTE, in addition to the OM attributes listed in the following table.

OM Attributes of DS_C_FILTER_ITEM

OM Attribute | Value Syntax | Value Length | Value Number | Value Initially
DS_FILTER_ ITEM_TYPE | Enum(DS_Filter_ Item_Type | - | 1 | -
DS_FINAL_ SUBSTRING | String(*) | 1 or more | 0 or 1 | -
DS_INITIAL_ SUBSTRING | String(*) | 1 or more | 0 or 1 | -

Note: OM attributes DS_ATTRIBUTE_TYPE and DS_ATTRIBUTE_VALUES are inherited from the superclass DS_C_ATTRIBUTE.

The value of the filter item is undefined in the following cases:

· The DS_ATTRIBUTE_TYPE is not known.

· None of the DS_ATTRIBUTE_VALUES conform to the attribute syntax defined for that attribute type.

· The DS_FILTER_ITEM_TYPE uses a matching rule that is not defined for the attribute syntax.

Access control restrictions can also cause the value to be undefined.

· DS_FILTER_ITEM_TYPE

This attribute identifies the type of filter item and, thus, the nature of the filter. The filter item can adopt any of the following values:

- DS_APPROXIMATE_MATCH, meaning that the filter is TRUE if the directory entry contains at least one value of the specified type that is approximately equal to that specified (the meaning of approximately equal is implementation dependent); otherwise, the filter is FALSE.

Rules for approximate matching are defined locally. For example, an approximate match may take into account spelling variations or employ phonetic comparison rules. In the absence of any such capabilities, a DSA needs to treat an approximate match as a test for equality. DCE GDS supports phonetic comparisons. There must be exactly one value of the OM attribute DS_ATTRIBUTE_VALUES.

- DS_EQUALITY, meaning that the filter is TRUE if the entry contains at least one value of the specified type that is equal to the value specified, according to the equality matching rule in force; otherwise, the filter is FALSE. There must be exactly one value of the OM attribute DS_ATTRIBUTE_VALUES.

- DS_GREATER_OR_EQUAL, meaning that the filter item is TRUE if, and only if, at least one value of the attribute is greater than or equal to the supplied value. There must be exactly one value of the OM attribute DS_ATTRIBUTE_VALUES.

- DS_LESS_OR_EQUAL, meaning that the filter item is TRUE if, and only if, at least one value of the attribute is less than or equal to the supplied value. There must be exactly one value of the OM attribute DS_ATTRIBUTE_VALUES.

- DS_PRESENT, meaning that the filter is TRUE if the entry contains an attribute of the specified type; otherwise, it is FALSE.

Any values of the OM attribute DS_ATTRIBUTE_VALUES are ignored.

- DS_SUBSTRINGS, meaning that the filter is TRUE if the entry contains at least one value of the specified attribute type that contains all of the specified substrings in the given order; otherwise, the filter is FALSE.

Any number of substrings can be given as values of the OM attribute DS_ATTRIBUTE_VALUES. Similarly, no substrings can be specified. There can also be a substring in DS_INITIAL_SUBSTRING or DS_FINAL_SUBSTRING, or both. The substrings do not overlap, but they can be separated from each other or from the ends of the attribute value by zero or more string elements. However, at least one attribute of type DS_ATTRIBUTE_VALUES, DS_INITIAL_SUBSTRING, or DS_FINAL_SUBSTRING must exist.

· DS_FINAL_SUBSTRING

If present, this attribute is the substring that will match the final part of an attribute value in the entry. This attribute can only exist if the DS_FILTER_ITEM_TYPE is equal to DS_SUBSTRINGS.

· DS_INITIAL_SUBSTRING

If present, this attribute is the substring that will match the initial part of an attribute value in the entry.

##