예제 #1
0
        public List <ClassParameter> Parse(IEnumerable <XNode> inputNodes)
        {
            var paramaters = new List <ClassParameter>();

            if (inputNodes == null)
            {
                return(paramaters);
            }

            foreach (var inputNode in inputNodes)
            {
                var element = (XElement)inputNode;
                if (!Regex.IsMatch(element.Name.NamespaceName, XmlnsConstant.xslNameSpace))
                {
                    string returnType = XslBuilder.DefineReturnType(null, element);
                    if (XslBuilder.IsBasicReturnType(returnType))
                    {
                        paramaters.Add(new ClassParameter {
                            Type = returnType, Name = element.Name.LocalName
                        });
                    }
                    else
                    {
                        paramaters.Add(new ClassParameter {
                            Type = returnType, Name = element.Name.LocalName, ChildProperties = this.Parse(element.Nodes())
                        });
                    }
                }
                else
                {
                    if (element.Name.LocalName == "value-of")
                    {
                    }
                    else if (element.Name.LocalName == "if")
                    {
                        return(this.Parse(element.Nodes()));
                    }
                    else if (element.Name.LocalName == "choose")
                    {
                        return(this.Parse(element.Nodes()));
                    }
                    else if (element.Name.LocalName == "when")
                    {
                        return(this.Parse(element.Nodes()));
                    }
                    else if (element.Name.LocalName == "otherwise")
                    {
                        return(this.Parse(element.Nodes()));
                    }
                    else if (element.Name.LocalName == "for-each")
                    {
                        return(this.Parse(element.Nodes()));
                    }
                }
            }
            return(paramaters);
        }
예제 #2
0
        public IActivityBuilder Get(ActivityType activityType)
        {
            var jdbcQueryBuilderUtils = new JdbcQueryBuilderUtils();
            var xslBuilder = new XslBuilder(new XpathBuilder());
            var jdbcQueryActivityBuilder = new JdbcQueryActivityBuilder(new DataAccessBuilder(jdbcQueryBuilderUtils), new DataAccessServiceBuilder(jdbcQueryBuilderUtils), new DataAccessInterfacesCommonBuilder(), xslBuilder);
            if (activityType == ActivityType.jdbcQueryActivityType || activityType == ActivityType.jdbcCallActivityType || activityType == ActivityType.jdbcUpdateActivityType)
            {
                return jdbcQueryActivityBuilder;
            }
            if (activityType == ActivityType.assignActivityType)
            {
                return new AssignActivityBuilder(xslBuilder);
            }

            if (activityType == ActivityType.xmlParseActivityType)
            {
                return new XmlParseActivityBuilder(xslBuilder, new XmlParserHelperBuilder());
            }

            if (activityType == ActivityType.mapperActivityType)
            {
                return new MapperActivityBuilder(xslBuilder);
            }

            if (activityType == ActivityType.nullActivityType)
            {
                return new NullActivityBuilder(xslBuilder);
            }

            if (activityType == ActivityType.javaActivityType)
            {
                return new JavaActivityBuilder(xslBuilder);
            }

            if (activityType == ActivityType.writeToLogActivityType)
            {
                return new WriteToLogActivityBuilder(xslBuilder);
            }

            if (activityType == ActivityType.generateErrorActivity)
            {
                return new GenerateErrorActivityBuilder(xslBuilder);
            }

            if (activityType == ActivityType.groupActivityType)
            {
                return new GroupActivityBuilder(xslBuilder);
            }

            return new DefaultActivityBuilder(xslBuilder);
        }
예제 #3
0
 public void SetUp()
 {
     xslBuilder = new XslBuilder (new XpathBuilder());
 }
예제 #4
0
 public JavaActivityBuilder(XslBuilder xslBuilder)
 {
     this.xslBuilder = xslBuilder;
 }
 public GenerateErrorActivityBuilder(XslBuilder xslBuilder)
 {
     this.xslBuilder = xslBuilder;
 }
 public CallProcessActivityBuilder(XslBuilder xslBuilder)
 {
     this.xslBuilder = xslBuilder;
 }
 public WriteToLogActivityBuilder(XslBuilder xslBuilder)
 {
     this.xslBuilder = xslBuilder;
 }
예제 #8
0
 public AssignActivityBuilder(XslBuilder xslBuilder)
 {
     this.xslBuilder = xslBuilder;
 }
예제 #9
0
 public GroupActivityBuilder(XslBuilder xslBuilder)
 {
     this.xslBuilder = xslBuilder;
     this.coreProcessBuilder = new CoreProcessBuilder();
 }
예제 #10
0
 public MapperActivityBuilder(XslBuilder xslBuilder)
 {
     this.xslBuilder = xslBuilder;
 }
예제 #11
0
 public DefaultActivityBuilder(XslBuilder xslbuilder)
 {
 }
예제 #12
0
 public NullActivityBuilder(XslBuilder xslbuilder)
 {
 }
예제 #13
0
 public void SetUp()
 {
     this.xslBuilder = new XslBuilder(new XpathBuilder());
 }