12345678910111213141516171819202122232425262728293031 |
- <%@ page contentType="text/html; charset=UTF-8" language="java"%>
- <%@ page
- import ="com.sysmodel.datamodel.xmlmodel.ModelFactory,
- com.sysmodel.datamodel.xmlmodel.able.SysModel,
- com.sysmodel.datamodel.xmlmodel.impl.MdpClassImpl,
- java.util.*"
- %>
- <%
- SysModel sysmodel = ModelFactory.getSysmodel();
- ArrayList mdpClasses = null;
- String type= request.getParameter("type") == null ? "" : request.getParameter("type");
- if(type.equals("")){
- mdpClasses = sysmodel.getMdpClasses();
- } else {
-
- String action= request.getParameter("action") == null ? "" : request.getParameter("action");
- if(action.equals("all"))
- mdpClasses = sysmodel.getAllChildMdpClassByType(type);
- else
- mdpClasses = sysmodel.getMdpClassByType(type);
- }
- out.print("<root>");
- for (int i = 0; i < mdpClasses.size(); i++) {
- MdpClassImpl mdpClass = (MdpClassImpl) mdpClasses.get(i);
- out.print("<classid>"+mdpClass.getClassid()+"</classid>");
- out.print("<description>"+mdpClass.getDescription()+"</description>");
- }
- out.print("</root>");
- %>
|