/// <summary>Visit an unspecified entity accessor.</summary>
 /// <param name="entityAccessor">Unspecified entity accessor to be visited.</param>
 protected abstract void VisitUnspecifiedEntityAccessor(UnspecifiedEntityAccessor entityAccessor);
        /// <summary>Visit an unspecified entity accessor.</summary>
        /// <param name="entityAccessor">Unspecified entity accessor to be visited.</param>
        protected override void VisitUnspecifiedEntityAccessor(UnspecifiedEntityAccessor entityAccessor)
        {
            _currentEntityAccessor.Push(entityAccessor);
            _commandText.Append("{ ");
            VisitStrongEntityAccessor(entityAccessor.EntityAccessor);
            _commandText.Append("} UNION { ");
            foreach (IQueryComponent component in entityAccessor.Elements)
            {
                _supressedComponents.Add(component);
            }

            VisitStrongEntityAccessor(entityAccessor.EntityAccessor);
            _supressedComponents.Clear();
            _commandText.AppendFormat("GRAPH ?G{0} {{ ", entityAccessor.About.Name);
            foreach (QueryElement element in entityAccessor.Elements)
            {
                VisitComponent(element);
            }

            _commandText.Append("} ");
            _commandText.AppendFormat("GRAPH <{0}> {{ ?G{1} <http://xmlns.com/foaf/0.1/primaryTopic> ", MetaGraphUri, entityAccessor.About.Name);
            VisitComponent(entityAccessor.About);
            _commandText.Append(" . } } ");
            _currentEntityAccessor.Pop();
        }
        private void OverrideEntitySelector(Identifier identifier)
        {
            UnboundConstrain genericConstrain = new UnboundConstrain(identifier, new Identifier(identifier.Name + "P"), new Identifier(identifier.Name + "O"), _mainFromComponent.SourceExpression.FromExpression);
            _mainFromComponent.Elements.Add(genericConstrain);
            _query.Select.Clear();
            _query.Select.Add(genericConstrain);
            UnspecifiedEntityAccessor entityAccessor = new UnspecifiedEntityAccessor(identifier, _mainFromComponent);
            entityAccessor.Elements.Add(genericConstrain);
            _query.Select.Add(entityAccessor);
            int indexOf = -1;
            if ((indexOf = _query.Elements.IndexOf(_mainFromComponent)) != -1)
            {
                _query.Elements.RemoveAt(indexOf);
                _query.Elements.Insert(indexOf, entityAccessor);
            }
            else
            {
                _query.Elements.Add(entityAccessor);
            }

            if (_mainFromComponent.Elements[0] is UnboundConstrain)
            {
                _mainFromComponent.Elements.RemoveAt(0);
            }
        }