模块开发卷宗

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

山东师范大学梦想团队-1-国际蒙医医院蒙语,汉语,英语三语言网站模块开发卷宗2016年11月目录1标题...............................................................................................................................................22模块开发情况表............................................................................................................................23功能说明........................................................................................................................................24设计说明........................................................................................................................................35源代码清单....................................................................................................................................36测试说明......................................................................................................................................887复审的结论..................................................................................................................................91山东师范大学梦想团队-2-1标题系统名称:国际蒙医国际蒙医前台页面主要是html页面的制作,后台代码主要包含十九大模块程序设计:1)选举、注册、注销模块2)首页模块3)导航模块4)索引建立模块5)XML文档解析模块6)XML优化模块7)全文检索模块8)查询过滤模块9)查询扩展模块10)ajax模块11)查询模块12)高级检索模块13)高亮显示模块14)文档预览模块15)流媒体视频播放模块16)视频普通播放模块17)资源下载模块18)MD5加密模块19)后台管理模块2模块开发情况表各个模块都已经顺利完成。3功能说明详见《详细设计说明》。山东师范大学梦想团队-3-4设计说明详见《详细设计说明》。5源代码清单1)选举、注册、注销模块注册和选举程序算法:publicclassSearchServer{publicstaticvoidmain(Stringargs[])throwsJDOMException,IOException{if(System.getSecurityManager()==null){System.setSecurityManager(newRMISecurityManager());}ListenThreadstartListener=newListenThread();startListener.start();InetAddressIP=InetAddress.getLocalHost();Stringip=IP.getHostAddress();StringtheBind=rmi://+ip+/searchsource;Booleanisonline;GetNodePropertyretproperty=newGetNodeProperty();Stringhostip=retproperty.getNodeProperty();CreateXml.createXml(HostIp,Ip);AddXmlChildNode.addXmlChildNode(HostIp,IpChild,hostip,false);try{SearchImplementtheRemote=newSearchImplement();LocateRegistry.createRegistry(1099);Naming.rebind(theBind,theRemote);if(ip.equals(hostip)){CreateXml.createXml(IpAddressList,Ip);AddXmlChildNode.addXmlChildNode(IpAddressList,IpChild,ip,true);CreateXml.createXml(HostIp,Ip);山东师范大学梦想团队-4-AddXmlChildNode.addXmlChildNode(HostIp,IpChild,ip,false);}else{SearchInterfaceremote;try{isonline=SendPacket.sendPacket(hostip);if(!isonline){throw(newException());}remote=(SearchInterface)Naming.lookup(rmi://+hostip+/searchsource);CreateXml.createXml(IpAddressList,Ip);AddXmlChildNode.addXmlChildNode(IpAddressList,IpChild,ip,true);CreateXml.createXml(HostIp,Ip);AddXmlChildNode.addXmlChildNode(HostIp,IpChild,hostip,false);remote.theFirstServer(ip);}catch(Exceptione){System.out.println(主服务器已异常退出服务网络,正在处理,请稍候......);GetAllIpListallip=newGetAllIpList();String[]getalliplist=allip.getAllIpList(AllIpAddressList);inti;for(i=0;igetalliplist.length;i++){try{if(getalliplist[i].equals(ip)){continue;}isonline=SendPacket.sendPacket(getalliplist[i]);if(!isonline){throw(newException());}山东师范大学梦想团队-5-remote=(SearchInterface)Naming.lookup(rmi://+getalliplist[i]+/searchsource);String[]thereturnhost=remote.returnHostIpList();Stringtherealhostip=;try{isonline=SendPacket.sendPacket(thereturnhost[0]);if(!isonline){throw(newException());}remote=(SearchInterface)Naming.lookup(rmi://+thereturnhost[0]+/searchsource);CreateXml.createXml(IpAddressList,Ip);AddXmlChildNode.addXmlChildNode(IpAddressList,IpChild,ip,true);remote.theFirstServer(ip);CreateXml.createXml(HostIp,Ip);AddXmlChildNode.addXmlChildNode(HostIp,IpChild,thereturnhost[0],false);break;}catch(Exceptione1){isonline=SendPacket.sendPacket(getalliplist[i]);if(!isonline){throw(newException());}remote=(SearchInterface)Naming.lookup(rmi://+getalliplist[i]+/searchsource);remote.deleteIp(thereturnhost[0],IpAddressList,true);remote.writeIP(ip,IpAddressList,true);山东师范大学梦想团队-6-String[]thereturnalliplist=remote.returnElectorsIpList();HostIpgetrealhostip=newHostIp();therealhostip=getrealhostip.theRealHostIp(thereturnalliplist);CreateXml.createXml(IpAddressList,Ip);AddXmlChildNode.addXmlChildNode(IpAddressList,IpChild,ip,true);CreateXml.createXml(HostIp,Ip);AddXmlChildNode.addXmlChildNode(HostIp,IpChild,therealhostip,false);for(intj=0;jthereturnalliplist.length;j++){AddXmlChildNode.addXmlChildNode(IpAddressList,IpChild,thereturnalliplist[j],true);try{isonline=SendPacket.sendPacket(thereturnalliplist[j]);if(!isonline){throw(newException());}remote=(SearchInterface)Naming.lookup(rmi://+thereturnalliplist[j]+/searchsource);remote.writeIP(ip,IpAddressList,true);remote.deleteIp(thereturnhost[0],IpAddressList,true);remote.deleteIp(thereturnhost[0],HostIp,false);remote.writeIP(therealhostip,HostIp,true);}catch(Exceptione2){continue;}山东师范大学梦想团队-7-}break;}}catch(Exceptione1){System.out.println(主服务器已异常退出服务网络,试图与+getalliplist[i]+建立连接失败,正在寻找下一可用IP地址,请稍候......);}}System.out.println();System.out.println(寻找到服务网络,正在加入,请稍候!);System.out.println();if(i==getalliplist.length){CreateXml.createXml(IpAddressList,Ip);AddXmlChildNode.addXmlChildNode(IpAddres

1 / 91
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功