public void Init(ParsingContext context, ParseTreeNode parseNode)
        {
            var multiplyString = parseNode.ChildNodes[0].Token.Text.ToUpper();
            CollectionType collectionType;

            switch (multiplyString)
            {
                case SonesGQLConstants.LISTOF:

                    collectionType = CollectionType.List;
                    break;

                case SonesGQLConstants.SETOF:

                    collectionType = CollectionType.Set;
                    break;

                case SonesGQLConstants.SETOFUUIDS:

                default:
                    throw new InvalidOperationException(
                                String.Format("The specified command [{0}] is not valid.", multiplyString));
            }

            if (parseNode.ChildNodes[1].AstNode is TupleNode)
            {
                CollectionDefinition = 
                    new CollectionDefinition(collectionType, 
                                            ((TupleNode)parseNode.ChildNodes[1].AstNode).TupleDefinition);
            }
            else
            {
                throw new NotImplementedException("The following node cannot be created.");
            }
        }
 public void Init(ParsingContext context, ParseTreeNode parseNode)
 {
     if (parseNode.ChildNodes[0].AstNode is TupleNode)
     {
         CollectionDefinition = 
             new CollectionDefinition(CollectionType.Set, 
                                     ((TupleNode)parseNode.ChildNodes[0].AstNode).TupleDefinition);
     }
     else
     {
         CollectionDefinition = 
             new CollectionDefinition(CollectionType.Set, 
                                     (EdgeTypeEdgeIDCollectionNode)parseNode.ChildNodes[0].AstNode);
     }
 }
        public void Init(ParsingContext context, ParseTreeNode parseNode)
        {
            var multiplyString = parseNode.ChildNodes[0].Token.Text.ToUpper();
            CollectionType collectionType;

            switch (multiplyString)
            {
                case SonesGQLConstants.LISTOF:

                    collectionType = CollectionType.List;

                    break;

                case SonesGQLConstants.SETOF:

                    collectionType = CollectionType.Set;

                    break;

                case SonesGQLConstants.SETOFUUIDS:

                    collectionType = CollectionType.SetOfUUIDs;

                    break;
                default:

                    throw new NotImplementedException("");
            }

            if (parseNode.ChildNodes[1].AstNode is TupleNode)
            {
                CollectionDefinition = new CollectionDefinition(collectionType, ((TupleNode)parseNode.ChildNodes[1].AstNode).TupleDefinition);
            }
            else
            {
                CollectionDefinition = new CollectionDefinition(collectionType, (VertexTypeVertexIDCollectionNode)parseNode.ChildNodes[1].AstNode);
            }
        }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="myCollectionDefinition"></param>
 /// <param name="iDChainDefinition"></param>
 /// <param name="myAssign">True to assign, False to update</param>
 public AttributeAssignOrUpdateList(CollectionDefinition myCollectionDefinition, IDChainDefinition iDChainDefinition, Boolean myAssign)
 {
     CollectionDefinition = myCollectionDefinition;
     AttributeIDChain = iDChainDefinition;
     Assign = myAssign;
 }
 /// <summary>
 ///
 /// </summary>
 /// <param name="myCollectionDefinition"></param>
 /// <param name="iDChainDefinition"></param>
 /// <param name="myAssign">True to assign, False to update</param>
 public AttributeAssignOrUpdateList(CollectionDefinition myCollectionDefinition, IDChainDefinition iDChainDefinition, Boolean myAssign)
 {
     CollectionDefinition = myCollectionDefinition;
     AttributeIDChain     = iDChainDefinition;
     Assign = myAssign;
 }