/// <summary> /// Default-ctor to build a negation filter on the given filter /// </summary> public RDFBooleanNotFilter(RDFFilter filter) { if (filter != null) { this.Filter = filter; this.FilterID = RDFModelUtilities.CreateHash(this.ToString()); } else { throw new RDFQueryException("Cannot create RDFBooleanNotFilter because \"filter\" parameter is null."); } }
/// <summary> /// Default-ctor to build an "AND" filter on the given filters /// </summary> public RDFBooleanAndFilter(RDFFilter leftFilter, RDFFilter rightFilter) { if (leftFilter != null) { if(rightFilter != null) { this.LeftFilter = leftFilter; this.RightFilter = rightFilter; this.FilterID = RDFModelUtilities.CreateHash(this.ToString()); } else { throw new RDFQueryException("Cannot create RDFBooleanAndFilter because \"rightFilter\" parameter is null."); } } else { throw new RDFQueryException("Cannot create RDFBooleanAndFilter because \"leftFilter\" parameter is null."); } }
private RDFSelectQuery BuildSelectAllQuery(RDFFilter filter = null) { var query = new RDFSelectQuery(); var x = new RDFVariable("x"); var y = new RDFVariable("y"); var z = new RDFVariable("z"); var patternGroup = new RDFPatternGroup("PatternGroup1").AddPattern(new RDFPattern(x, y, z)); if (filter != null) { patternGroup.AddFilter(filter); } query.AddPatternGroup(patternGroup) .AddProjectionVariable(x) .AddProjectionVariable(y) .AddProjectionVariable(z); return(query); }