internal Interpretation GetNextInterpretation()
        {
            while (_currentConstraintSelector == null || !_currentConstraintSelector.MoveNext())
            {
                if (!_topicSelector.MoveNext())
                {
                    //there are no other interpretations
                    return(null);
                }

                _currentConstraintSelector = _interpretations.GetConstraintSelector(_owner.Graph, _topicSelector.SelectedNodes);
            }

            var interpretation = new Interpretation(_topicSelector.Rules.Concat(_currentConstraintSelector.Rules));

            return(interpretation);
        }
Exemple #2
0
        /// <summary>
        /// Sets new constraint and selector pattern.
        /// </summary>
        /// <returns></returns>
        internal bool Next()
        {
            CurrentInterpretation = null;

            while (!_currentConstraintSelector.MoveNext())
            {
                if (!_topicSelector.MoveNext())
                {
                    //there are no other interpretations
                    return(false);
                }

                _currentConstraintSelector = _interpretations.GetConstraintSelector(_originMapping.Graph, _topicSelector.SelectedNodes);
            }

            CurrentInterpretation = new Interpretation(_topicSelector.Rules.Concat(_currentConstraintSelector.Rules));
            return(true);
        }