Exemple #1
0
        public EdgeViewRegister(string nodeName, string schema, string edgeViewName,
                                Dictionary <string, string> attributeTypeDictionary,
                                Dictionary <Tuple <string, string>, List <Tuple <string, string> > > edgesAttributeMappingDictionary,
                                Dictionary <Tuple <string, string>, int> edgeColumnToColumnId)
        {
            CSharpTemplate = new EdgeViewGraphViewCodeTemplate
            {
                EdgeName          = edgeViewName,
                AttributeTypeDict = attributeTypeDictionary,
                Mapping           = edgesAttributeMappingDictionary,
                ColumnId          = edgeColumnToColumnId
            };

            var edgeDictionary = new List <Tuple <string, int, List <Tuple <string, string> > > >
            {
                new Tuple <string, int, List <Tuple <string, string> > >(edgeViewName, 0, attributeTypeDictionary.Select(x => Tuple.Create(x.Key, x.Value)).ToList())
            };

            ScriptTemplate = new DeployScriptTemplate
            {
                AssemblyName = schema + '_' + nodeName,
                Type         = 1,
                NodeTable    = edgeViewName,
                EdgeList     = edgeDictionary,
                InputCount   = edgesAttributeMappingDictionary.Count,
                UserId       = null
            };

            _exceptionMessage = "Failed to compile EdgeView function";
        }
Exemple #2
0
 public MetaFunctionRegister(string assemblyName)
 {
     CSharpTemplate = new MetaGraphViewCodeTemplate();
     ScriptTemplate = new DeployScriptTemplate
     {
         AssemblyName = assemblyName,
         Type         = 2,
         NodeTable    = null,
         EdgeList     = null,
         InputCount   = 1,
         UserId       = null
     };
     _exceptionMessage = "Failed to compile meta GraphView defined function";
 }
        private static string GenerateRegisterScript(string assemblyName, string path, int type, string nodeTable           = null,
                                                     List <Tuple <string, bool, List <Tuple <string, string> > > > edgeList = null, int inputCount = 1)
        {
            var template = new DeployScriptTemplate
            {
                AssemblyName = assemblyName,
                EdgeList     = edgeList,
                Path         = ObtainHexStringOfAssembly(path),
                InputCount   = inputCount,
                Type         = type,
                NodeTable    = nodeTable
            };

            return(template.TransformText());
        }
Exemple #4
0
 public NodeTableRegister(string assemblyName, string nodeTable,
                          List <Tuple <string, int, List <Tuple <string, string> > > > edgeList, string userId)
 {
     CSharpTemplate = new NodeTableGraphViewCodeTemplate
     {
         EdgeList = edgeList
     };
     ScriptTemplate = new DeployScriptTemplate
     {
         AssemblyName = assemblyName,
         Type         = 0,
         NodeTable    = nodeTable,
         EdgeList     = edgeList,
         InputCount   = 1,
         UserId       = userId
     };
     _exceptionMessage = "Failed to compile nodetable Graph View defined function";
 }
 private static string GenerateRegisterScript(string assemblyName, string path, int type, string nodeTable = null,
     List<Tuple<string, bool, List<Tuple<string, string>>>> edgeList = null,  int inputCount = 1)
 {
     var template = new DeployScriptTemplate
     {
         AssemblyName = assemblyName,
         EdgeList = edgeList,
         Path = ObtainHexStringOfAssembly(path),
         InputCount = inputCount,
         Type = type,
         NodeTable = nodeTable
     };
     return template.TransformText();
 }
        public EdgeViewRegister(string nodeName, string schema, string edgeViewName,
            Dictionary<string, string> attributeTypeDictionary,
            Dictionary<Tuple<string, string>, List<Tuple<string, string>>> edgesAttributeMappingDictionary,
            Dictionary<Tuple<string, string>, int> edgeColumnToColumnId)
        {
            CSharpTemplate = new EdgeViewGraphViewCodeTemplate
            {
                EdgeName = edgeViewName,
                AttributeTypeDict = attributeTypeDictionary,
                Mapping = edgesAttributeMappingDictionary,
                ColumnId = edgeColumnToColumnId
            };

            var edgeDictionary = new List<Tuple<string, int, List<Tuple<string, string>>>>
            {
                new Tuple<string, int, List<Tuple<string, string>>>(edgeViewName, 0, attributeTypeDictionary.Select(x => Tuple.Create(x.Key, x.Value)).ToList())
            };
            ScriptTemplate = new DeployScriptTemplate
            {
                AssemblyName = schema + '_' + nodeName,
                Type = 1,
                NodeTable = edgeViewName,
                EdgeList = edgeDictionary,
                InputCount = edgesAttributeMappingDictionary.Count,
                UserId = null
            };

            _exceptionMessage = "Failed to compile EdgeView function";
        }
 public NodeTableRegister(string assemblyName, string nodeTable,
     List<Tuple<string, int, List<Tuple<string, string>>>> edgeList, string userId)
 {
     CSharpTemplate = new NodeTableGraphViewCodeTemplate
     {
        EdgeList =  edgeList
     };
     ScriptTemplate = new DeployScriptTemplate
     {
         AssemblyName = assemblyName,
         Type = 0,
         NodeTable = nodeTable,
         EdgeList = edgeList,
         InputCount = 1,
         UserId = userId
     };
     _exceptionMessage = "Failed to compile nodetable Graph View defined function";
 }
 public MetaFunctionRegister(string assemblyName)
 {
     CSharpTemplate = new MetaGraphViewCodeTemplate();
     ScriptTemplate = new DeployScriptTemplate
     {
         AssemblyName = assemblyName,
         Type = 2,
         NodeTable = null,
         EdgeList = null,
         InputCount = 1,
         UserId = null
     };
     _exceptionMessage = "Failed to compile meta GraphView defined function";
 }