예제 #1
0
        /// <summary>
        /// Converts the Algebra back to a Graph Pattern.
        /// </summary>
        /// <returns></returns>
        public GraphPattern ToGraphPattern()
        {
            GraphPattern p = _pattern.ToGraphPattern();
            GraphPattern f = new GraphPattern();

            f.AddFilter(_filter);
            p.AddGraphPattern(f);
            return(p);
        }
예제 #2
0
        private static void AddTriplePattern(GraphPattern graphPattern, ITriplePattern tp)
        {
            switch (tp.PatternType)
            {
            case TriplePatternType.Match:
            case TriplePatternType.Path:
            case TriplePatternType.PropertyFunction:
            case TriplePatternType.SubQuery:
                graphPattern.AddTriplePattern(tp);
                break;

            case TriplePatternType.LetAssignment:
            case TriplePatternType.BindAssignment:
                graphPattern.AddAssignment((IAssignmentPattern)tp);
                break;

            case TriplePatternType.Filter:
                graphPattern.AddFilter(((IFilterPattern)tp).Filter);
                break;
            }
        }