Esempio n. 1
0
        /// <summary>
        /// Creates the vertexType based on the VertexTypeName.
        ///
        /// The vertexType contains one Outgoing Edge Defintion, the edge
        /// is weighted and can't contain any other attributes.
        /// </summary>
        private void CreateVertexType()
        {
            #region create vertex type

            var vertexTypePreDef = new VertexTypePredefinition(_VertexTypeName);
            var outEdgePreDef    = new OutgoingEdgePredefinition(_EdgeTypeName, vertexTypePreDef);

            #region create edge definition

            // weighted multi-edge
            outEdgePreDef.SetEdgeTypeAsWeighted();
            // set inner edge type to weighted
            outEdgePreDef.SetMultiplicityAsMultiEdge("Weighted");

            vertexTypePreDef.AddOutgoingEdge(outEdgePreDef);

            #endregion

            #region create id definition

            var idPreDefinition = new PropertyPredefinition(GraphMLTokens.VERTEX_ID_NAME, GraphMLTokens.VERTEX_ID_TYPE);

            idPreDefinition.SetDefaultValue(GraphMLTokens.VERTEX_ID_DEF_VAL);

            vertexTypePreDef.AddProperty(idPreDefinition);

            #endregion

            #region create vertex type

            var requestCreateVertexType = new RequestCreateVertexType(vertexTypePreDef);

            _GraphDB.CreateVertexType(_SecurityToken,
                                      _TransactionToken,
                                      requestCreateVertexType,
                                      (stats, vType) => vType);

            #endregion

            #endregion
        }
Esempio n. 2
0
        public TResult CreateVertexType <TResult>(SecurityToken mySecurityToken, Int64 myTransactionToken, RequestCreateVertexType myRequestCreateVertexType, Converter.CreateVertexTypeResultConverter <TResult> myOutputconverter)
        {
            var executedRequest = _requestManager.SynchronExecution(new PipelineableCreateVertexTypeRequest(myRequestCreateVertexType,
                                                                                                            mySecurityToken,
                                                                                                            myTransactionToken));

            return(((PipelineableCreateVertexTypeRequest)executedRequest).GenerateRequestResult(myOutputconverter));
        }
Esempio n. 3
0
 public TResult CreateVertexType <TResult>(sones.Library.Commons.Security.SecurityToken mySecurityToken, Int64 myTransactionToken, RequestCreateVertexType myRequestCreateVertexType, Converter.CreateVertexTypeResultConverter <TResult> myOutputconverter)
 {
     return(_iGraphDB.CreateVertexType <TResult>(mySecurityToken,
                                                 myTransactionToken,
                                                 myRequestCreateVertexType,
                                                 myOutputconverter));
 }
Esempio n. 4
0
 public TResult CreateVertexType <TResult>(SecurityToken mySecurityToken, Int64 myTransactionToken, RequestCreateVertexType myRequestCreateVertexType, Converter.CreateVertexTypeResultConverter <TResult> myOutputconverter)
 {
     throw new NotImplementedException();
 }