From e4878b919ae30f3a59378914f1bc2273894c9692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20Sim=C3=A3o?= Date: Thu, 27 Nov 2008 21:11:12 +0000 Subject: [PATCH] git-svn-id: https://svn.coded.pt/svn/SIPRP@803 bb69d46d-e84e-40c8-a05a-06db0d633741 --- trunk/common/src/leaf/ui/icons/rem.png | Bin 0 -> 2149 bytes .../siprp/logic/HigieneSegurancaLogic.java | 124 ++++++++++++++++++ 2 files changed, 124 insertions(+) create mode 100644 trunk/common/src/leaf/ui/icons/rem.png create mode 100644 trunk/common/src/siprp/logic/HigieneSegurancaLogic.java diff --git a/trunk/common/src/leaf/ui/icons/rem.png b/trunk/common/src/leaf/ui/icons/rem.png new file mode 100644 index 0000000000000000000000000000000000000000..450d81fc53f493942634e349a5059e6ffa332d5e GIT binary patch literal 2149 zcmV-r2%7haP)WdKHUATc!{PH%P~GB7YQATcmHFgQ9gIUp-AF)%RoqGHAX000McNliru z)&&<10Vpf20d)WX010qNS#tmY3lRVS3lRZ-WM7d0000DMK}|sb0I`n?{9y$E00+HE zL_t(|+O1bxY!v4iJu^GAyI!xo#s(XMv1z%8i_=gNLeoY{k)j|(5|pS7w2GRCC{lvj zJfu-tQutlXj%vysRwl+JT3^DPj3apsWE^ z8Z~&P#e0Ru3t8T2#}ak|!0@L)-`}11$mIT?q_B72I6mPQ)!7&c-0GpeyLV%7BG(t# z^{vf#{7DJnCLUn|CXEy)2!!k4Tfkr50Ggw8gU|C*Kz7mtwsNf$3o5I(q{p@^0bDv# zMA8q-+yL~a*59FI^h5FsdpodUGri+Jn?x1HXy7W}pn-#Aci;-}^Mk;P-vjR4Gt9{>lEH#S8X9+My)$qTa^Y5z{}a&rvL>sKxP z*&;m4ClnIGw**jqV(r69XV+HTb+1dI@BkBoyz}q?760K$;IIDx4yAA6kR-}H#&PPF z4}uYasUy;}6g>+fTb^#gLwwRv&-`@&@>JnR*#3y*D&6Aai3^_aWCb{N8hGQ+z`NO* zDjI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A=Op4J999` zTG>D@TS0oF temas = provider.getAllRiscoTemas(); + if( temas != null ) + { + for( HsRiscoTema tema : temas ) + { + NodeRiscoTema temaNode = new NodeRiscoTema( tema ); + for( HsRisco risco : tema.getHsRiscoArray() ) + { + NodeRisco riscoNode = new NodeRisco( risco ); + for( HsRiscoMedida rel : risco.getHsRiscoMedidaArray() ) + { + riscoNode.add( new NodeMedida( rel ) ); + } + temaNode.add( riscoNode ); + } + result.add( temaNode ); + } + } + return result; + } + + public static DefaultMutableTreeNode getRiscosTree( Empresas empresa ) + { + DefaultMutableTreeNode result = new DefaultMutableTreeNode(); + for( HsRiscoEmpresa rel : empresa.getHsRiscoEmpresaArray() ) + { + HsRisco risco = rel.getToHsRisco(); + HsRiscoTema tema = risco.getToHsRiscoTema(); + DefaultMutableTreeNode temaNode = TreeTools.findNodeWithUserObject( tema, result ); + if( temaNode == null ) + { + temaNode = new NodeRiscoTema( tema ); + result.add(temaNode); + } + temaNode.add( new NodeRisco( risco ) ); + } + return result; + } + + public static DefaultMutableTreeNode getAreasTree( Empresas empresa ) + { + DefaultMutableTreeNode result = new DefaultMutableTreeNode(); + if( empresa != null ) + { + for( HsArea area : empresa.getHsAreaArray() ) + { + AreaNode areaNode = new AreaNode(area); + for( HsPosto posto : area.getHsPostoArray() ) + { + areaNode.add( new PostoNode( posto ) ); + } + result.add( areaNode ); + } + } + return result; + } + + public static DefaultMutableTreeNode getAreasTree( Estabelecimentos estabelecimento ) + { + DefaultMutableTreeNode result = new DefaultMutableTreeNode(); + if( estabelecimento != null ) + { + List postos = estabelecimento.getHsPostoEstabelecimentoArray(); + for( HsPostoEstabelecimento rel : postos ) + { + HsPosto posto = rel.getToHsPosto(); + HsArea area = posto.getToHsArea(); + DefaultMutableTreeNode areaNode = TreeTools.findNodeWithUserObject( area, result ); + if( areaNode == null ) + { + areaNode = new AreaNode( area ); + result.add( areaNode ); + } + areaNode.add( new PostoNode( posto ) ); + } + } + return result; + } + + public static DefaultMutableTreeNode getPostosTree( Estabelecimentos estabelecimento ) + { + DefaultMutableTreeNode result = new DefaultMutableTreeNode(); + if( estabelecimento != null ) + { + List postos = estabelecimento.getHsPostoEstabelecimentoArray(); + for( HsPostoEstabelecimento rel : postos ) + { + result.add( new PostoNode( rel.getToHsPosto() ) ); + } + } + return result; + } +}