org.eclipse.higgins.idas.api
Interface IFilterAttributeAssertion

All Superinterfaces:
IFilterAssertion

public interface IFilterAttributeAssertion
extends IFilterAssertion

Represents a filter assertion about a Entity's Attributes (IHasAttributes.getAttribute(URI) and IHasAttributes.getAttributes()).

This assertion is made up of a comparator (operator), attribute type and assertion value.

The particular type and form of the IAttributeValue used as an assertion is dictated by the comparator and the attribute type. In other words, a particular attribute type will specify the comparators valid for that type, as well as the format of assertion value for each valid comparator. TODO (Doc): Refer to example specifications for this


Field Summary
static String COMP_ATTR_EQ
          Compares true when a tested Entity has a attribute of the specified type which contains at least one value equal to the specified assertion value.
static String COMP_ATTR_GE
          Compares true when a tested Entity has a attribute of the specified type which contains at least one value greater or equal to the specified assertion value.
static String COMP_ATTR_INFERRED_REL_EQ
          This Comparator is used for assertions of type EntityRelationship (and sub-types).
static String COMP_ATTR_LE
          Compares true when a tested Entity has a attribute of the specified type which contains at least one value less or equal to the specified assertion value.
static String COMP_ATTR_PRESENT
          Compares true when the specified attribute type is present in a tested Entity.
static String COMP_ATTR_SUBSTR
          Compares true when a tested Entity has a attribute of the specified type which contains at least one value containing the substring specified by the assertion value.
 
Method Summary
 void setAssertionValue(IAttributeValue assertion)
          Specifies the assertion data to be tested against values of a Entity's attribute.
 void setAttributeFilter(IFilter attributeFilter)
          Adds an (meta) attribute filter to this attribute assertion.
 
Methods inherited from interface org.eclipse.higgins.idas.api.IFilterAssertion
includeSubtypes, setComparator, setID, setID
 

Field Detail

COMP_ATTR_PRESENT

public static final String COMP_ATTR_PRESENT
Compares true when the specified attribute type is present in a tested Entity.

An assertion value is not specified.

Value: "urn:org.eclipse.higgins.idas.api.comparator.attribute.present"

See Also:
Constant Field Values

COMP_ATTR_EQ

public static final String COMP_ATTR_EQ
Compares true when a tested Entity has a attribute of the specified type which contains at least one value equal to the specified assertion value.

Value: "urn:org.eclipse.higgins.idas.api.comparator.attribute.equality"

See Also:
Constant Field Values

COMP_ATTR_GE

public static final String COMP_ATTR_GE
Compares true when a tested Entity has a attribute of the specified type which contains at least one value greater or equal to the specified assertion value.

Value: "urn:org.eclipse.higgins.idas.api.comparator.attribute.greaterOrEqual"

See Also:
Constant Field Values

COMP_ATTR_LE

public static final String COMP_ATTR_LE
Compares true when a tested Entity has a attribute of the specified type which contains at least one value less or equal to the specified assertion value.

Value: "urn:org.eclipse.higgins.idas.api.comparator.attribute.lessOrEqual"

See Also:
Constant Field Values

COMP_ATTR_SUBSTR

public static final String COMP_ATTR_SUBSTR
Compares true when a tested Entity has a attribute of the specified type which contains at least one value containing the substring specified by the assertion value.

TODO: need to handle initial, any, final substrings. Value: "urn:org.eclipse.higgins.idas.api.comparator.attribute.substring"

See Also:
Constant Field Values

COMP_ATTR_INFERRED_REL_EQ

public static final String COMP_ATTR_INFERRED_REL_EQ
This Comparator is used for assertions of type EntityRelationship (and sub-types). Compares true when a tested Entity has the asserted relationship (of the asserted type) whether that relationship is implied or explicit.

For example, if the assertion specified a type of "urn:parentOf" and reference of {"someContext", "urn:Mary"} it could result in a match because either:
An entity has a relationship attribute of type "urn:parentOf" and reference of {"someContext", "urn:Mary"), or
An entity is referenced by the entity "urn:Mary" in the context "someContext" where the referencing relationship attribute is of type "urn:childOf" (assuming the model backing the context provides the proper inferences between parentOf and childOf)

Value: "urn:org.eclipse.higgins.idas.api.comparator.attribute.inferred.relationship.equality"

See Also:
Constant Field Values
Method Detail

setAssertionValue

public void setAssertionValue(IAttributeValue assertion)
                       throws IdASException
Specifies the assertion data to be tested against values of a Entity's attribute. To specify an assertion value nested in a complex type (like a postalAddress.city of "Provo"), one would pass in an IComplexAttrValue with the attribute(s) containing the assertion(s). i.e. the IFilterAttributeAssertion would have a type like "urn:postalAddress" and the assertionValue would be an IComplexAttrValue containing an attribute. That attribute would have a type like "urn:city", and would have an ITypedValue containing the assertion "Provo" This allows multiple parts of a complex value to be asserted such that one may specify a filter like postalAddress.city = "Provo" AND postalAddress.state = "Utah", where both assertions have to match the same postalAddress value.

Throws:
IdASException

setAttributeFilter

public void setAttributeFilter(IFilter attributeFilter)
                        throws IdASException
Adds an (meta) attribute filter to this attribute assertion.

Parameters:
attributeFilter - A filter, specifying meta-attribute data which must match for this assertion to match. This allows one to differentiate between two attributes of the same type where the meta-attribute data differs.
Throws:
IdASException