/// <summary> /// Transforms the Algebra back into a Graph Pattern /// </summary> /// <returns></returns> public override GraphPattern ToGraphPattern() { GraphPattern gp = new GraphPattern(); PropertyPathPattern pp = new PropertyPathPattern(this.PathStart, new FixedCardinality(this.Path, 0), this.PathEnd); gp.AddTriplePattern(pp); return gp; }
/// <summary> /// Transforms the Algebra into a Graph Pattern /// </summary> /// <returns></returns> public override GraphPattern ToGraphPattern() { GraphPattern gp = new GraphPattern(); PropertyPathPattern pp = new PropertyPathPattern(this.PathStart, new ZeroOrMore(this.Path), this.PathEnd); gp.AddTriplePattern(pp); return gp; }
/// <summary> /// Transforms the Algebra back into a Graph Pattern /// </summary> /// <returns></returns> public GraphPattern ToGraphPattern() { GraphPattern gp = new GraphPattern(); PropertyPathPattern pp; if (this._inverse) { pp = new PropertyPathPattern(this.PathStart, new NegatedSet(Enumerable.Empty<Property>(), this._properties.Select(p => new Property(p))), this.PathEnd); } else { pp = new PropertyPathPattern(this.PathStart, new NegatedSet(this._properties.Select(p => new Property(p)), Enumerable.Empty<Property>()), this.PathEnd); } gp.AddTriplePattern(pp); return gp; }