org.eclipse.higgins.idas.api
Interface IFilterAssertion

All Known Subinterfaces:
IFilterAttributeAssertion, IFilterEntityIDAssertion, IFilterEntityTypeAssertion

public interface IFilterAssertion

Represents a filter assertion. Sub-interfaces of this are defined for specific aspects of an IEntity. An assertion is made up of at least a comparator (operator), and often an identifier and assertion value.

TODO Methods here should be get*, not set* to match other interfaces.


Method Summary
 void includeSubtypes(boolean bIncludeSubtypes)
          Calling this the same as calling setID(URI, boolean) and setting the boolean to true.
 void setComparator(String comparator)
          Set the comparison operator (equal, less, greater, beginsWith, etc.)
 void setID(URI id)
           
 void setID(URI id, boolean bIncludeSubtypes)
          Identifies the component to be compared.
For entity attribute assertions, this would be the type of the attribute (see IAttribute#getAttrID())
For entity ID and entity type assertions, the type is not set.
 

Method Detail

setComparator

void setComparator(String comparator)
                   throws IdASException
Set the comparison operator (equal, less, greater, beginsWith, etc.)

Sub-interfaces of this interface define some comparators, other implementations may define more.

TODO (Impl): provide a way in which a consumer can discover allowed/supported comparators. TODO (Arch): some have expressed the belief that this should be represented as an interface rather than a string/URI

Parameters:
comparator - such as IFilterAttributeAssertion.COMP_ATTR_EQ. The format of this string should be that of a URI to ensure uniqueness among comparators.
Throws:
IdASException

setID

void setID(URI id,
           boolean bIncludeSubtypes)
           throws IdASException
Identifies the component to be compared.
For entity attribute assertions, this would be the type of the attribute (see IAttribute#getAttrID())
For entity ID and entity type assertions, the type is not set.

Parameters:
id - The type of the component
bIncludeSubtypes - A value of true means that subtypes of the specified type are also to be included.
Throws:
IdASException

setID

void setID(URI id)
           throws IdASException
Throws:
IdASException

includeSubtypes

void includeSubtypes(boolean bIncludeSubtypes)
                     throws IdASException
Calling this the same as calling setID(URI, boolean) and setting the boolean to true. This method is included for IFilterAssertion sub-interfaces which do not make use of the setID(URI, boolean) method.

Parameters:
bIncludeSubtypes - A value of true means that subtypes of the specified type are also to be included.
Throws:
IdASException