Adding node role (sintoma, diagnóstico, conduta) to Node.
[simdecs.git] / web / bn.xhtml
CommitLineData
8d813ea1
MS
1<?xml version='1.0' encoding='UTF-8' ?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml"
4 xmlns:p="http://primefaces.prime.com.tr/ui"
5 xmlns:h="http://java.sun.com/jsf/html"
6 xmlns:f="http://java.sun.com/jsf/core">
7 <h:head>
8 <title>SimDeCS</title>
9 <h:outputStylesheet name="css/jsfcrud.css"/>
10 </h:head>
11 <h:body>
12 <h:outputLabel> <h1>SimDeCS - Cadastro de Redes Bayesianas</h1> </h:outputLabel>
3f2db471
MS
13 <h:panelGrid>
14 <h:form>
15 <p:fileUpload widgetVar="uploader" height="48" width="48"
16 fileUploadListener="#{fileUploadController.handleFileUpload}"
17 image="/img/bn/browse.png" customUI="true"
18 multiple="true" label="Selecione..." allowTypes="*.xml;" description="Images"
19 update="bayesianNetworkList, nodeList"/>
20 <h:outputLink value="#" title="Upload" onclick="uploader.upload();"
21 style="font-weight:bold;color:#616D7E">Enviar Redes Bayesianas
22 </h:outputLink>
23 </h:form>
24 </h:panelGrid>
8d813ea1
MS
25 <h:panelGroup id="messagePanel" layout="block">
26 <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
27 </h:panelGroup>
7f3a0a9f
MS
28 <p:panel header="Redes Bayesianas" toggleable="true"
29 collapsed="true">
3f2db471
MS
30 <h:form>
31 <br></br>
32 <h:commandLink action="#{bayesianNetworkController.prepareList}" value="Atualizar tabela"/>
33 </h:form>
34 <h:panelGrid columns="2" cellpadding="10">
35 <h:outputText escape="false" value="#{bundle.ListBayesianNetworkEmpty}" rendered="#{bayesianNetworkController.items.rowCount == 0}"/>
36 <h:panelGroup rendered="#{bayesianNetworkController.items.rowCount > 0}">
8d813ea1 37
3f2db471 38 <h:form id="fBayesianNetworkList">
8d813ea1 39
3f2db471 40 <p:dataTable var="bayesianNetwork" value="#{bayesianNetworkController.items}" id="bayesianNetworkList"
8d813ea1 41 paginator="true" rows="10" style="width:100%" paginatorPosition="bottom"
3f2db471
MS
42 rowEditListener="#{bayesianNetworkController.rowEditListener}">
43 <p:column headerText="id">
44 <h:outputText value="#{bayesianNetwork.id}"/>
8d813ea1
MS
45 </p:column>
46
47 <p:column headerText="Nome">
48 <p:cellEditor>
49 <f:facet name="output">
3f2db471 50 <h:outputText value="#{bayesianNetwork.name}"/>
8d813ea1
MS
51 </f:facet>
52 <f:facet name="input">
3f2db471 53 <p:inputText value="#{bayesianNetwork.name}"/>
8d813ea1
MS
54 </f:facet>
55 </p:cellEditor>
3f2db471 56 </p:column>
8d813ea1
MS
57 <p:column headerText="Opções">
58 <p:rowEditor />
3f2db471
MS
59 <h:commandLink action="#{bayesianNetworkController.destroy}" >
60 <h:graphicImage value="/img/bn/remove.png" />
61 </h:commandLink>
8d813ea1 62 </p:column>
8d813ea1 63 </p:dataTable>
3f2db471 64 </h:form>
8d813ea1 65
3f2db471
MS
66 </h:panelGroup>
67 </h:panelGrid>
68 </p:panel>
7f3a0a9f
MS
69
70 <p:panel header="Nodos" toggleable="true" collapsed="true">
3f2db471
MS
71 <h:form>
72 <br></br>
73 <h:commandLink action="#{nodeController.prepareList}" value="Atualizar tabela"/>
74 </h:form>
75 <h:outputText escape="false" value="#{bundle.ListNodeEmpty}" rendered="#{nodeController.items.rowCount == 0}"/>
76 <h:panelGroup rendered="#{nodeController.items.rowCount > 0}">
77 <h:form>
78 <p:dataTable var="node" value="#{nodeController.items}" id="nodeList"
79 paginator="true" rows="10" style="width:100%" paginatorPosition="bottom"
80 rowEditListener="#{nodeController.rowEditListener}">
8d813ea1 81
3f2db471
MS
82 <p:column headerText="id">
83 <h:outputText value="#{node.id}" />
84 </p:column>
8d813ea1 85
3f2db471
MS
86 <p:column headerText="Nome">
87 <p:cellEditor>
88 <f:facet name="output">
89 <h:outputText value="#{node.name}" />
90 </f:facet>
91 <f:facet name="input">
92 <p:inputText value="#{node.name}" style="width:100%"/>
93 </f:facet>
94 </p:cellEditor>
95 </p:column>
96 <p:column headerText="Tempo">
97 <p:cellEditor>
98 <f:facet name="output">
99 <h:outputText value="#{node.time}" />
100 </f:facet>
101 <f:facet name="input">
102 <p:inputText value="#{node.time}" style="width:100%"/>
103 </f:facet>
104 </p:cellEditor>
105 </p:column>
106 <p:column headerText="Custo">
107 <p:cellEditor>
108 <f:facet name="output">
109 <h:outputText value="#{node.cost}" />
110 </f:facet>
111 <f:facet name="input">
112 <p:inputText value="#{node.cost}" style="width:100%"/>
113 </f:facet>
114 </p:cellEditor>
115 </p:column>
7f3a0a9f 116 <p:column headerText="Classificação">
3f2db471
MS
117 <p:cellEditor>
118 <f:facet name="output">
119 <h:outputText value="#{node.nodeType}" />
120 </f:facet>
121 <f:facet name="input">
122 <h:selectOneMenu value="#{node.nodeType}" >
123 <f:selectItems value="#{nodeTypeController.nodeTypes}"
124 var="nodeType"
125 itemLabel="#{nodeType}"
126 itemValue="#{nodeType}" />
127 </h:selectOneMenu>
128 </f:facet>
129 </p:cellEditor>
130 </p:column>
7f3a0a9f
MS
131 <p:column headerText="Tipo">
132 <p:cellEditor>
133 <f:facet name="output">
134 <h:outputText value="#{node.nodeRole}" />
135 </f:facet>
136 <f:facet name="input">
137 <h:selectOneMenu value="#{node.nodeRole}" >
138 <f:selectItems value="#{nodeRoleController.nodeRoles}"
139 var="nodeType"
140 itemLabel="#{nodeRole}"
141 itemValue="#{nodeRole}" />
142 </h:selectOneMenu>
143 </f:facet>
144 </p:cellEditor>
145 </p:column>
3f2db471
MS
146 <p:column headerText="Rede Bayesiana">
147 <h:outputText value="#{node.bayesianNetwork.name}"/>
148 </p:column>
8d813ea1
MS
149
150
3f2db471
MS
151 <p:column headerText="Opções">
152 <p:rowEditor />
153 </p:column>
8d813ea1 154
3f2db471 155 </p:dataTable>
8d813ea1 156 </h:form>
3f2db471 157 </h:panelGroup>
8d813ea1 158
3f2db471 159 </p:panel>
7f3a0a9f 160 <p:panel header="Perguntas" toggleable="true" collapsed="true">
3f2db471
MS
161 <h:form>
162 <br></br>
163 <h:commandLink action="#{questionController.prepareList}" value="Atualizar tabela"/>
164 </h:form>
165 <h:form>
166 <h:outputText escape="false" value="#{bundle.ListQuestionEmpty}" rendered="#{questionController.items.rowCount == 0}"/>
167 <h:panelGroup rendered="#{questionController.items.rowCount > 0}">
168 <p:dataTable var="question" value="#{questionController.items}" id="questionList"
169 paginator="true" rows="10" style="width:100%" paginatorPosition="bottom"
170 rowEditListener="#{questionController.rowEditListener}">
8d813ea1 171
3f2db471
MS
172 <p:column headerText="id">
173 <h:outputText value="#{question.id}" />
174 </p:column>
8d813ea1 175
3f2db471
MS
176 <p:column headerText="Texto">
177 <p:cellEditor>
178 <f:facet name="output">
179 <h:outputText value="#{question.text}" />
180 </f:facet>
181 <f:facet name="input">
182 <p:inputText value="#{question.text}" style="width:100%"/>
183 </f:facet>
184 </p:cellEditor>
185 </p:column>
186 <p:column headerText="Nodo">
187 <h:outputText value="#{question.node.name}"/>
188 </p:column>
189 <p:column headerText="Rede Bayesiana">
190 <h:outputText value="#{question.node.bayesianNetwork.name}"/>
191 </p:column>
8d813ea1
MS
192
193
3f2db471
MS
194 <p:column headerText="Opções">
195 <p:rowEditor />
196 <h:commandLink action="#{bayesianNetworkController.destroy}" >
197 <h:graphicImage value="/img/bn/remove.png" />
198 </h:commandLink>
199 </p:column>
200
201 </p:dataTable>
202 </h:panelGroup>
203 </h:form>
204
205 <h:form>
206 <br></br>
207 <h:commandLink action="/net/question/Create.xhtml" value="Criar nova pergunta"/>
208 </h:form>
209 </p:panel>
7f3a0a9f 210 <p:panel header="Respostas" toggleable="true" collapsed="true">
3f2db471
MS
211 <h:form>
212 <br></br>
213 <h:commandLink action="#{answerController.prepareList}" value="Atualizar tabela"/>
214 </h:form>
215 <h:form>
216 <h:outputText escape="false" value="#{bundle.ListAnswerEmpty}" rendered="#{answerController.items.rowCount == 0}"/>
217 <h:panelGroup rendered="#{answerController.items.rowCount > 0}">
218 <p:dataTable var="answer" value="#{answerController.items}" id="answerList"
219 paginator="true" rows="10" style="width:100%" paginatorPosition="bottom"
220 rowEditListener="#{answerController.rowEditListener}">
221
222 <p:column headerText="id">
223 <h:outputText value="#{answer.id}" />
224 </p:column>
225
226 <p:column headerText="Texto">
227 <p:cellEditor>
228 <f:facet name="output">
229 <h:outputText value="#{answer.text}" />
230 </f:facet>
231 <f:facet name="input">
232 <p:inputText value="#{answer.text}" style="width:100%"/>
233 </f:facet>
234 </p:cellEditor>
235 </p:column>
236 <p:column headerText="Probabilidade">
237 <p:cellEditor>
238 <f:facet name="output">
239 <h:outputText value="#{answer.likelihood}" />
240 </f:facet>
241 <f:facet name="input">
242 <p:inputText value="#{answer.likelihood}" style="width:100%"/>
243 </f:facet>
244 </p:cellEditor>
245 </p:column>
246 <p:column headerText="Pergunta">
247 <h:outputText value="#{answer.question.text}"/>
248 </p:column>
249 <p:column headerText="Nodo">
250 <h:outputText value="#{answer.question.node.name}"/>
251 </p:column>
252 <p:column headerText="Rede Bayesiana">
253 <h:outputText value="#{answer.question.node.bayesianNetwork.name}"/>
254 </p:column>
255
256
257 <p:column headerText="Opções">
258 <p:rowEditor />
259 </p:column>
260 </p:dataTable>
261 </h:panelGroup>
262 </h:form>
263 <h:form>
264 <br></br>
265 <h:commandLink action="/net/answer/Create.xhtml" value="Criar nova resposta"/>
266 </h:form>
267 </p:panel>
8d813ea1
MS
268 </h:body>
269
270
271
272
273</html>
274