org.eclipse.higgins.idas.api
Interface IFilterAttributeAssertion

All Superinterfaces:
IFilterAssertion

public interface IFilterAttributeAssertion
extends IFilterAssertion

Represents a filter assertion about a Digital Subject'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 Digital Subject 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 Digital Subject 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 SubjectRelationship (and sub-types).
static String COMP_ATTR_LE
          Compares true when a tested Digital Subject 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 Digital Subject.
static String COMP_ATTR_SUBSTR
          Compares true when a tested Digital Subject 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 Digital Subject's attribute.
 void setMetadataFilter(IFilter metadataFilter)
          Adds an attribute metadata 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 Digital Subject.

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 Digital Subject 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 Digital Subject 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 Digital Subject 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 Digital Subject 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 SubjectRelationship (and sub-types). Compares true when a tested Digital Subject 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:
A subject has a relationship attribute of type "urn:parentOf" and reference of {"someContext", "urn:Mary"), or
A subject is referenced by the subject "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 Digital Subject'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(ies) containing the assertion(s). i.e. the IFilterAttributeAssertion would have a type like "urn:postalAddress" and the assertionValue would be an IComplexAttrValue containing a 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

setMetadataFilter

public void setMetadataFilter(IFilter metadataFilter)
                       throws IdASException
Adds an attribute metadata filter to this attribute assertion.

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