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)); }
/// <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 }