public void parse(Element element) {
		model = newModel();
		model.setName(element.getAttribute(ATTR_NAME));
		model.setDisplayName(element.getAttribute(ATTR_DISPLAYNAME));
		model.setLayout(element.getAttribute(ATTR_LAYOUT));
		model.setPreInterceptors(element.getAttribute(ATTR_PREINTERCEPTORS));
		model.setPostInterceptors(element.getAttribute(ATTR_POSTINTERCEPTORS));
		
		List<Element> transitions = XmlHelper.elements(element, NODE_TRANSITION);
		for(Element te : transitions) {
			TransitionModel transition = new TransitionModel();
			transition.setName(te.getAttribute(ATTR_NAME));
			transition.setDisplayName(te.getAttribute(ATTR_DISPLAYNAME));
			transition.setTo(te.getAttribute(ATTR_TO));
			transition.setExpr(te.getAttribute(ATTR_EXPR));
			transition.setG(te.getAttribute(ATTR_G));
			transition.setOffset(te.getAttribute(ATTR_OFFSET));
			transition.setSource(model);
			model.getOutputs().add(transition);
		}
		
		parseNode(model, element);
	}
public void parse(Element element) {
		model = newModel();
		model.setName(element.getAttribute(ATTR_NAME));
		model.setDisplayName(element.getAttribute(ATTR_DISPLAYNAME));
		model.setLayout(element.getAttribute(ATTR_LAYOUT));
		model.setPreInterceptors(element.getAttribute(ATTR_PREINTERCEPTORS));
		model.setPostInterceptors(element.getAttribute(ATTR_POSTINTERCEPTORS));
		
		List<Element> transitions = XmlHelper.elements(element, NODE_TRANSITION);
		for(Element te : transitions) {
			TransitionModel transition = new TransitionModel();
			transition.setName(te.getAttribute(ATTR_NAME));
			transition.setDisplayName(te.getAttribute(ATTR_DISPLAYNAME));
			transition.setTo(te.getAttribute(ATTR_TO));
			transition.setExpr(te.getAttribute(ATTR_EXPR));
			transition.setG(te.getAttribute(ATTR_G));
			transition.setOffset(te.getAttribute(ATTR_OFFSET));
			transition.setSource(model);
			model.getOutputs().add(transition);
		}
		
		parseNode(model, element);
	}
public void parse ( Element element ) { model = newModel ( ) ; model . setName ( element . getAttribute ( ATTR_NAME ) ) ; model . setDisplayName ( element . getAttribute ( ATTR_DISPLAYNAME ) ) ; model . setLayout ( element . getAttribute ( ATTR_LAYOUT ) ) ; model . setPreInterceptors ( element . getAttribute ( ATTR_PREINTERCEPTORS ) ) ; model . setPostInterceptors ( element . getAttribute ( ATTR_POSTINTERCEPTORS ) ) ; List < Element > transitions = XmlHelper . elements ( element , NODE_TRANSITION ) ; for ( Element te : transitions ) { TransitionModel transition = new TransitionModel ( ) ; transition . setName ( te . getAttribute ( ATTR_NAME ) ) ; transition . setDisplayName ( te . getAttribute ( ATTR_DISPLAYNAME ) ) ; transition . setTo ( te . getAttribute ( ATTR_TO ) ) ; transition . setExpr ( te . getAttribute ( ATTR_EXPR ) ) ; transition . setG ( te . getAttribute ( ATTR_G ) ) ; transition . setOffset ( te . getAttribute ( ATTR_OFFSET ) ) ; transition . setSource ( model ) ; model . getOutputs ( ) . add ( transition ) ; } parseNode ( model , element ) ; }
实现NodeParser接口的parse函数
由子类产生各自的模型对象，设置常用的名称属性，并且解析子节点transition，构造TransitionModel模型对象
实现NodeParser接口的parse函数 由子类产生各自的模型对象，设置常用的名称属性，并且解析子节点transition，构造TransitionModel模型对象