SemWeb.LiteralFilter

SemWeb : SemWeb Namespace
LiteralFilter Class

The LiteralFilter represents a filter over literal values.

public abstract class LiteralFilter

#### Remarks

This class is used to filter the results of a Select using the SemWeb.SelectFilter type. This is an abstract base class for filters, which are defined in the SemWeb.Filters namespace.

## Members

See Also: Inherited members from object.

### Protected Constructors

LiteralFilter () This is the protected constructor used by subclasses.

### Methods

static | Create (LiteralFilter.CompType, object) : LiteralFilter Creates a comparison filter.
abstract | Filter (Literal, SelectableSource) : bool Filters a literal value.
static | MatchesFilters (Resource, LiteralFilter[], SelectableSource) : bool Filters a literal value against multiple filters.

## Member Details

### LiteralFilter Constructor

protected LiteralFilter ()

This is the protected constructor used by subclasses.

#### Remarks

None.

### Filter Method

public abstract bool Filter (Literal value, SelectableSource targetModel)

Filters a literal value.

#### Parameters

value
  The literal value to be filtered.
targetModel
  The model over which the literal was selected from.

#### Returns

True if the literal matches the filter; false otherwise.

#### Remarks

None.

### MatchesFilters Method

public static bool MatchesFilters (Resource literal, LiteralFilter[] filters, SelectableSource targetModel)

Filters a literal value against multiple filters.

#### Parameters

literal
  To be added.
filters
  An array of filters to test.
targetModel
  The model over which the literal was selected from.

#### Returns

True if the literal value matches all of the filters; false otherwise.

#### Remarks

None.

### Create Method

public static LiteralFilter Create (LiteralFilter.CompType type, object value)

Creates a comparison filter.

#### Parameters

type
  The type of comparison: less than (or equal), equal, not equal, or greater than (or equal).
value
  The value to compare literals against.

#### Returns

A LiteralFilter that compares literals against value.

#### Remarks

None.