/** * Creates a Filter from a given expression. * @param model the Model to create the (blank node) Filter in * @param expression the expression node (not null) * @return a new Filter */ public static IFilter createFilter(SpinProcessor model, INode expression) { IFilter filter = (IFilter)model.CreateResource(SP.ClassFilter).As(typeof(FilterImpl)); filter.AddProperty(SP.PropertyExpression, expression); return(filter); }