package cn.amq.peas;

import java.util.LinkedList;
import java.util.List;
import org.dom4j.Element;
import org.dom4j.Node;
import cn.amq.basis.AmqBasisEvent;
import cn.amq.basis.AmqConst;
import java.util.LinkedList;
//[视频设备联动录像_holder_one]
public class VdLinkageRecordHolder extends AmqBasisEvent {
	private String gjxh;//[告警序号]
	private int gjbh;//[告警编号]
	private String gjlx;//[告警类型]
	private String gjmc;//[告警名称]
	private String gjsj;//[告警时间]
	private int gjjb;//[告警级别]
	private String sbbh;//[设备编号]
	private int tdbh;//[通道编号]
	private int tdlx;//[通道类型]
	private int tddlx;//[通道大类型]
	private int zt;//[状态]
	private String jd;//[经度]
	private String wd;//[纬度]
	public void setGjxh(String gjxh){
		this.gjxh = gjxh;
	}
	public String getGjxh(){
		return gjxh;
	}
	public void setGjbh(int gjbh){
		this.gjbh = gjbh;
	}
	public int getGjbh(){
		return gjbh;
	}
	public void setGjlx(String gjlx){
		this.gjlx = gjlx;
	}
	public String getGjlx(){
		return gjlx;
	}
	public void setGjmc(String gjmc){
		this.gjmc = gjmc;
	}
	public String getGjmc(){
		return gjmc;
	}
	public void setGjsj(String gjsj){
		this.gjsj = gjsj;
	}
	public String getGjsj(){
		return gjsj;
	}
	public void setGjjb(int gjjb){
		this.gjjb = gjjb;
	}
	public int getGjjb(){
		return gjjb;
	}
	public void setSbbh(String sbbh){
		this.sbbh = sbbh;
	}
	public String getSbbh(){
		return sbbh;
	}
	public void setTdbh(int tdbh){
		this.tdbh = tdbh;
	}
	public int getTdbh(){
		return tdbh;
	}
	public void setTdlx(int tdlx){
		this.tdlx = tdlx;
	}
	public int getTdlx(){
		return tdlx;
	}
	public void setTddlx(int tddlx){
		this.tddlx = tddlx;
	}
	public int getTddlx(){
		return tddlx;
	}
	public void setZt(int zt){
		this.zt = zt;
	}
	public int getZt(){
		return zt;
	}
	public void setJd(String jd){
		this.jd = jd;
	}
	public String getJd(){
		return jd;
	}
	public void setWd(String wd){
		this.wd = wd;
	}
	public String getWd(){
		return wd;
	}
	private List<VdLinkageRecordPeas>   list=new LinkedList<VdLinkageRecordPeas>();
	public List<VdLinkageRecordPeas> getList() { 
		return list; 
	} 
	public void setList(List<VdLinkageRecordPeas> list) { 
		this.list = list; 
	} 
	public VdLinkageRecordHolder(){
		msgType=AmqConst.AMQ_MSG_vdLinkageRecord;
	}
	public void writeObjToXml() {
		super.writeObjToXml();
		Element msgElement=this.getOutMsgTypeElement();
 		this.addTextToElement(msgElement, "gjxh",gjxh );//[告警序号]
 		this.addTextToElement(msgElement, "gjbh",gjbh );//[告警编号]
 		this.addTextToElement(msgElement, "gjlx",gjlx );//[告警类型]
 		this.addTextToElement(msgElement, "gjmc",gjmc );//[告警名称]
 		this.addTextToElement(msgElement, "gjsj",gjsj );//[告警时间]
 		this.addTextToElement(msgElement, "gjjb",gjjb );//[告警级别]
 		this.addTextToElement(msgElement, "sbbh",sbbh );//[设备编号]
 		this.addTextToElement(msgElement, "tdbh",tdbh );//[通道编号]
 		this.addTextToElement(msgElement, "tdlx",tdlx );//[通道类型]
 		this.addTextToElement(msgElement, "tddlx",tddlx );//[通道大类型]
 		this.addTextToElement(msgElement, "zt",zt );//[状态]
 		this.addTextToElement(msgElement, "jd",jd );//[经度]
 		this.addTextToElement(msgElement, "wd",wd );//[纬度]
		Element fdListElement=outMsgTypeElement.addElement("liebiao");	
		for(int i=0;i<list.size();i++){
			VdLinkageRecordPeas info=list.get(i);
			Element element=fdListElement.addElement("jidian");
			this.addTextToElement(element,"sbbh", info.getSbbh());
			this.addTextToElement(element,"tdbh", info.getTdbh());
			this.addTextToElement(element,"tdlx", info.getTdlx());
			this.addTextToElement(element,"tddlx", info.getTddlx());
			this.addTextToElement(element,"ylsz", info.getYlsz());
			this.addTextToElement(element,"zlxsz", info.getZlxsz());
			this.addTextToElement(element,"lxlx", info.getLxlx());
		}
	}
	public void readTextToObject(String text) throws Exception {
		super.readTextToObject(text);
 		gjxh = this.readStringByFullPath("/amq/gjxh");//[告警序号]
 		gjbh = this.readIntByFullPath("/amq/gjbh");//[告警编号]
 		gjlx = this.readStringByFullPath("/amq/gjlx");//[告警类型]
 		gjmc = this.readStringByFullPath("/amq/gjmc");//[告警名称]
 		gjsj = this.readStringByFullPath("/amq/gjsj");//[告警时间]
 		gjjb = this.readIntByFullPath("/amq/gjjb");//[告警级别]
 		sbbh = this.readStringByFullPath("/amq/sbbh");//[设备编号]
 		tdbh = this.readIntByFullPath("/amq/tdbh");//[通道编号]
 		tdlx = this.readIntByFullPath("/amq/tdlx");//[通道类型]
 		tddlx = this.readIntByFullPath("/amq/tddlx");//[通道大类型]
 		zt = this.readIntByFullPath("/amq/zt");//[状态]
 		jd = this.readStringByFullPath("/amq/jd");//[经度]
 		wd = this.readStringByFullPath("/amq/wd");//[纬度]
		Node node=this.inDocument.selectSingleNode("/amq/source_type");
		List nodeList=this.inDocument.selectNodes("/amq/liebiao/jidian");
		for(int i=0;i<nodeList.size();i++){
			VdLinkageRecordPeas  info =new VdLinkageRecordPeas();
			Element element=(Element) nodeList.get(i);
			list.add(info);
		}
	}
}
