|  |  | @ -1,10 +1,18 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  | package pdf; |  |  |  | package pdf; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import java.io.ByteArrayInputStream; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import java.io.ByteArrayOutputStream; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import java.io.InputStream; | 
			
		
	
		
		
			
				
					
					|  |  |  | import java.sql.Time; |  |  |  | import java.sql.Time; | 
			
		
	
		
		
			
				
					
					|  |  |  | import java.util.Calendar; |  |  |  | import java.util.Calendar; | 
			
		
	
		
		
			
				
					
					|  |  |  | import java.util.Date; |  |  |  | import java.util.Date; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import org.jdom.Document; | 
			
		
	
		
		
			
				
					
					|  |  |  | import org.jdom.Element; |  |  |  | import org.jdom.Element; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import org.jdom.output.XMLOutputter; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import com.evolute.utils.fop.FOPCreator; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import com.evolute.utils.fop.PDFCreator; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | import analiseacidentestrabalho.Acidentado; |  |  |  | import analiseacidentestrabalho.Acidentado; | 
			
		
	
		
		
			
				
					
					|  |  |  | import analiseacidentestrabalho.AnaliseAcidente; |  |  |  | import analiseacidentestrabalho.AnaliseAcidente; | 
			
		
	
	
		
		
			
				
					|  |  | @ -15,23 +23,40 @@ import analiseacidentestrabalho.Utilizador; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | public class PdfGenerator  |  |  |  | public class PdfGenerator  | 
			
		
	
		
		
			
				
					
					|  |  |  | { |  |  |  | { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	protected final Utilizador utilizador; | 
			
		
	
		
		
			
				
					
					|  |  |  | 	protected final AnaliseAcidente analiseAcidente; |  |  |  | 	protected final AnaliseAcidente analiseAcidente; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	protected final Acidentado acidentado; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	protected final Recomendacao recomendacoes[]; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	protected final Medida medidas[]; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	protected final Causa causa; | 
			
		
	
		
		
			
				
					
					|  |  |  | 	 |  |  |  | 	 | 
			
		
	
		
		
			
				
					
					|  |  |  | 	public PdfGenerator(  |  |  |  | 	public PdfGenerator(  | 
			
		
	
		
		
			
				
					
					|  |  |  | 			Utilizador utilizador,  |  |  |  | 			Utilizador utilizador,  | 
			
		
	
		
		
			
				
					
					|  |  |  | 			AnaliseAcidente analiseAcidente,  |  |  |  | 			AnaliseAcidente analiseAcidente,  | 
			
		
	
		
		
			
				
					
					|  |  |  | 			Acidentado acidentado, |  |  |  | 			Acidentado acidentado, | 
			
		
	
		
		
			
				
					
					|  |  |  | 			Recomendacao recomendacao, |  |  |  | 			Recomendacao recomendacoes[], | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 			Medida medida, |  |  |  | 			Medida medidas[], | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 			Causa causa ) |  |  |  | 			Causa causa ) | 
			
		
	
		
		
			
				
					
					|  |  |  | 	{ |  |  |  | 	{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		this.utilizador = utilizador; | 
			
		
	
		
		
			
				
					
					|  |  |  | 		this.analiseAcidente = analiseAcidente; |  |  |  | 		this.analiseAcidente = analiseAcidente; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		this.acidentado = acidentado; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		this.recomendacoes = recomendacoes; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		this.medidas = medidas; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		this.causa = causa; | 
			
		
	
		
		
			
				
					
					|  |  |  | 	} |  |  |  | 	} | 
			
		
	
		
		
			
				
					
					|  |  |  | 	 |  |  |  | 	 | 
			
		
	
		
		
			
				
					
					|  |  |  | 	public byte[] generatePdf() |  |  |  | 	public byte[] generatePdf() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		throws Exception | 
			
		
	
		
		
			
				
					
					|  |  |  | 	{ |  |  |  | 	{ | 
			
		
	
		
		
			
				
					
					|  |  |  | 		return null; |  |  |  | 		Document doc = new Document( createXml() ); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 		 |  |  |  | 		ByteArrayOutputStream baos = new ByteArrayOutputStream(); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		new XMLOutputter().output( doc, baos ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		ByteArrayOutputStream out = new ByteArrayOutputStream(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		InputStream xmlIn = new ByteArrayInputStream( baos.toByteArray() ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		InputStream xslStream = getClass().getClassLoader().getResourceAsStream( "pdf/analise_acidentes_trabalho.xsl" ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		FOPCreator.getFOPCreator().createFOfromXML( xmlIn, xslStream, out ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		return PDFCreator.getPDFCreator().createPdfFromFo( out.toByteArray() ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 	} |  |  |  | 	} | 
			
		
	
		
		
			
				
					
					|  |  |  | 	 |  |  |  | 	 | 
			
		
	
		
		
			
				
					
					|  |  |  | 	protected Element createXml() |  |  |  | 	protected Element createXml() | 
			
		
	
	
		
		
			
				
					|  |  | @ -40,13 +65,16 @@ public class PdfGenerator | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element numeroElement = new Element( "Numero" ); |  |  |  | 		Element numeroElement = new Element( "Numero" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		numeroElement.setText( analiseAcidente.getAnalise_nr() ); |  |  |  | 		numeroElement.setText( analiseAcidente.getAnalise_nr() ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		rootElement.addContent( numeroElement ); |  |  |  | 		rootElement.addContent( numeroElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  | //PERGUNTAR
 |  |  |  | 		Date data = analiseAcidente.getData_acidente();  | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 		Date data = new Date();  |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		rootElement.addContent( createDataElement( "Data", data ) ); |  |  |  | 		rootElement.addContent( createDataElement( "Data", data ) ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		rootElement.addContent( createEntidadeEmpregadoraElement() );  |  |  |  | 		rootElement.addContent( createEntidadeEmpregadoraElement() );  | 
			
		
	
		
		
			
				
					
					|  |  |  | 		rootElement.addContent( createSeguroElement() ); |  |  |  | 		rootElement.addContent( createSeguroElement() ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		rootElement.addContent( createEmpresaSHSTElement() ); |  |  |  | 		rootElement.addContent( createEmpresaSHSTElement() ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		rootElement.addContent( createAcidentadoElement() ); |  |  |  | 		rootElement.addContent( createAcidentadoElement() ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		rootElement.addContent( createAcidenteElement() ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		rootElement.addContent( createRecomendacoesSIPRPElement() ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		rootElement.addContent( createMedidasElement() ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		rootElement.addContent( createTomadaConhecimentoElement() ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		return rootElement; |  |  |  | 		return rootElement; | 
			
		
	
		
		
			
				
					
					|  |  |  | 	} |  |  |  | 	} | 
			
		
	
		
		
			
				
					
					|  |  |  | 	 |  |  |  | 	 | 
			
		
	
	
		
		
			
				
					|  |  | @ -114,50 +142,40 @@ public class PdfGenerator | 
			
		
	
		
		
			
				
					
					|  |  |  | 	{ |  |  |  | 	{ | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element acidentadoElement = new Element( "Acidentado" ); |  |  |  | 		Element acidentadoElement = new Element( "Acidentado" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element nomeElement = new Element( "Nome" ); |  |  |  | 		Element nomeElement = new Element( "Nome" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		nomeElement.setText( analiseAcidente.getNome_acidentado() ); |  |  |  | 		nomeElement.setText( acidentado.getNome() ); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		acidentadoElement.addContent( nomeElement ); |  |  |  | 		acidentadoElement.addContent( nomeElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element estabelecimentoOrigemElement = new Element( "EstabelecimentoOrigem" ); |  |  |  | 		Element estabelecimentoOrigemElement = new Element( "EstabelecimentoOrigem" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element nomeEstabelecimentoOrigemElement = new Element( "Nome" ); |  |  |  | 		Element nomeEstabelecimentoOrigemElement = new Element( "Nome" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | //PERGUNTAR
 |  |  |  | 		nomeEstabelecimentoOrigemElement.setText( acidentado.getEstabelecimento_origem() ); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 		nomeEstabelecimentoOrigemElement.setText( "" ); |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		estabelecimentoOrigemElement.addContent( nomeEstabelecimentoOrigemElement ); |  |  |  | 		estabelecimentoOrigemElement.addContent( nomeEstabelecimentoOrigemElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		acidentadoElement.addContent( estabelecimentoOrigemElement ); |  |  |  | 		acidentadoElement.addContent( estabelecimentoOrigemElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  | //PERGUNTAR
 |  |  |  | 		Date dataNascimento = acidentado.getData_nascimento(); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 		Date dataNascimento = new Date(); |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		acidentadoElement.addContent( createDataElement( "DataNascimento", dataNascimento ) ); |  |  |  | 		acidentadoElement.addContent( createDataElement( "DataNascimento", dataNascimento ) ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element biElement = new Element( "BilheteIdentidade" ); |  |  |  | 		Element biElement = new Element( "BilheteIdentidade" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element numeroBiElement = new Element( "Numero" ); |  |  |  | 		Element numeroBiElement = new Element( "Numero" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | //PERGUNTAR
 |  |  |  | 		numeroBiElement.setText( acidentado.getBilhete_identidade() ); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 		numeroBiElement.setText( "" ); |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		biElement.addContent( numeroBiElement ); |  |  |  | 		biElement.addContent( numeroBiElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		acidentadoElement.addContent( biElement ); |  |  |  | 		acidentadoElement.addContent( biElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element moradaElement = new Element( "Morada" ); |  |  |  | 		Element moradaElement = new Element( "Morada" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | //PERGUNTAR
 |  |  |  | 		moradaElement.setText( acidentado.getMorada() + " " + acidentado.getCod_postal() ); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 		moradaElement.setText( "" ); |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		acidentadoElement.addContent( moradaElement ); |  |  |  | 		acidentadoElement.addContent( moradaElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element telefoneElement = new Element( "Telefone" ); |  |  |  | 		Element telefoneElement = new Element( "Telefone" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | //PERGUNTAR
 |  |  |  | 		telefoneElement.setText( acidentado.getContacto_telefonico() ); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 		telefoneElement.setText( "" ); |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		acidentadoElement.addContent( telefoneElement ); |  |  |  | 		acidentadoElement.addContent( telefoneElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  | //PERGUNTAR
 |  |  |  | 		Date dataAdmissao = acidentado.getData_admissao(); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 		Date dataAdmissao = new Date(); |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		acidentadoElement.addContent( createDataElement( "DataAdmissao", dataAdmissao ) ); |  |  |  | 		acidentadoElement.addContent( createDataElement( "DataAdmissao", dataAdmissao ) ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element funcaoElement = new Element( "Funcao" ); |  |  |  | 		Element funcaoElement = new Element( "Funcao" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | //PERGUNTAR
 |  |  |  | 		funcaoElement.setText( acidentado.getFuncao() ); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 		funcaoElement.setText( "" ); |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		acidentadoElement.addContent( funcaoElement ); |  |  |  | 		acidentadoElement.addContent( funcaoElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element turnoElement = new Element( "Turno" ); |  |  |  | 		Element turnoElement = new Element( "Turno" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | //PERGUNTAR
 |  |  |  | 		turnoElement.setText( acidentado.getTurno() ); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 		turnoElement.setText( "" ); |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		acidentadoElement.addContent( turnoElement ); |  |  |  | 		acidentadoElement.addContent( turnoElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element superiorElement = new Element( "Superior" ); |  |  |  | 		Element superiorElement = new Element( "Superior" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element nomeSuperiorElement = new Element( "Nome" ); |  |  |  | 		Element nomeSuperiorElement = new Element( "Nome" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | //PERGUNTAR
 |  |  |  | 		nomeSuperiorElement.setText( acidentado.getNome_superior_hierarquico() ); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 		nomeSuperiorElement.setText( "" ); |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		superiorElement.addContent( nomeSuperiorElement ); |  |  |  | 		superiorElement.addContent( nomeSuperiorElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element emailSuperiorElement = new Element( "Email" ); |  |  |  | 		Element emailSuperiorElement = new Element( "Email" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | //PERGUNTAR
 |  |  |  | 		emailSuperiorElement.setText( acidentado.getEmail_superior_hierarquico() ); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 		emailSuperiorElement.setText( "" ); |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		superiorElement.addContent( emailSuperiorElement ); |  |  |  | 		superiorElement.addContent( emailSuperiorElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		acidentadoElement.addContent( superiorElement ); |  |  |  | 		acidentadoElement.addContent( superiorElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		return acidentadoElement; |  |  |  | 		return acidentadoElement; | 
			
		
	
	
		
		
			
				
					|  |  | @ -168,54 +186,43 @@ public class PdfGenerator | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element acidenteElement = new Element( "Acidente" ); |  |  |  | 		Element acidenteElement = new Element( "Acidente" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element averiguadorElement = new Element( "Averiguador" ); |  |  |  | 		Element averiguadorElement = new Element( "Averiguador" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element nomeAveriguadorElement = new Element( "Nome" ); |  |  |  | 		Element nomeAveriguadorElement = new Element( "Nome" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | //PERGUNTAR
 |  |  |  | 		nomeAveriguadorElement.setText( analiseAcidente.getAveriguador() ); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 		nomeAveriguadorElement.setText( "" ); |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		averiguadorElement.addContent( nomeAveriguadorElement ); |  |  |  | 		averiguadorElement.addContent( nomeAveriguadorElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		acidenteElement.addContent( averiguadorElement ); |  |  |  | 		acidenteElement.addContent( averiguadorElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  | //PERGUNTAR
 |  |  |  | 		Date dataOcorrencia = analiseAcidente.getData_acidente(); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 		Date dataOcorrencia = new Date(); |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		acidenteElement.addContent( createDataElement( "DataOcorrencia", dataOcorrencia ) ); |  |  |  | 		acidenteElement.addContent( createDataElement( "DataOcorrencia", dataOcorrencia ) ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Time horaOcorrencia = analiseAcidente.getHora_acidente(); |  |  |  | 		Time horaOcorrencia = analiseAcidente.getHora_acidente(); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		acidenteElement.addContent( createHoraElement( "HoraOcorrencia", horaOcorrencia ) ); |  |  |  | 		acidenteElement.addContent( createHoraElement( "HoraOcorrencia", horaOcorrencia ) ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element horasTrabalhadasElement = new Element( "HorasTrabalhadas" ); |  |  |  | 		Element horasTrabalhadasElement = new Element( "HorasTrabalhadas" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | //PERGUNTAR
 |  |  |  | 		horasTrabalhadasElement.setText( "" + analiseAcidente.getHoras_turno() ); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 		horasTrabalhadasElement.setText( "" ); |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		acidenteElement.addContent( horasTrabalhadasElement ); |  |  |  | 		acidenteElement.addContent( horasTrabalhadasElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element localElement = new Element( "Local" ); |  |  |  | 		Element localElement = new Element( "Local" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element seccaoElement = new Element( "Seccao" ); |  |  |  | 		Element seccaoElement = new Element( "Seccao" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | //PERGUNTAR
 |  |  |  | 		seccaoElement.setText( analiseAcidente.getSeccao() ); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 		seccaoElement.setText( "" ); |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		localElement.addContent( seccaoElement ); |  |  |  | 		localElement.addContent( seccaoElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element localEspecificoElement = new Element( "LocalEspecifico" ); |  |  |  | 		Element localEspecificoElement = new Element( "LocalEspecifico" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | //PERGUNTAR
 |  |  |  | 		localEspecificoElement.setText( analiseAcidente.getLocal_trabalho() ); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 		localEspecificoElement.setText( "" ); |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		localElement.addContent( localEspecificoElement ); |  |  |  | 		localElement.addContent( localEspecificoElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		acidenteElement.addContent( localElement ); |  |  |  | 		acidenteElement.addContent( localElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element actividadeElement = new Element( "Actividade" ); |  |  |  | 		Element actividadeElement = new Element( "Actividade" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element descricaoActividadeElement = new Element( "Descricao" ); |  |  |  | 		Element descricaoActividadeElement = new Element( "Descricao" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | //PERGUNTAR
 |  |  |  | 		descricaoActividadeElement.setText( analiseAcidente.getTarefa() ); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 		descricaoActividadeElement.setText( "" ); |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		actividadeElement.addContent( descricaoActividadeElement ); |  |  |  | 		actividadeElement.addContent( descricaoActividadeElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element objectosActividadeElement = new Element( "Objectos" ); |  |  |  | 		Element objectosActividadeElement = new Element( "Objectos" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | //PERGUNTAR
 |  |  |  | 		objectosActividadeElement.setText( analiseAcidente.getSubstancias() ); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 		objectosActividadeElement.setText( "" ); |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		actividadeElement.addContent( objectosActividadeElement ); |  |  |  | 		actividadeElement.addContent( objectosActividadeElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element condicoesActividadeElement = new Element( "Condicoes" ); |  |  |  | 		Element condicoesActividadeElement = new Element( "Condicoes" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | //PERGUNTAR
 |  |  |  | 		condicoesActividadeElement.setText( analiseAcidente.getCondicoes() ); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 		condicoesActividadeElement.setText( "" ); |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		actividadeElement.addContent( condicoesActividadeElement ); |  |  |  | 		actividadeElement.addContent( condicoesActividadeElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		acidenteElement.addContent( actividadeElement ); |  |  |  | 		acidenteElement.addContent( actividadeElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element testemunhasElement = new Element( "Testemunhas" ); |  |  |  | 		Element testemunhasElement = new Element( "Testemunhas" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | //PERGUNTAR
 |  |  |  | 		testemunhasElement.setText( analiseAcidente.getTestemunhas() );  | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 		testemunhasElement.setText( "" );  |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		acidenteElement.addContent( testemunhasElement ); |  |  |  | 		acidenteElement.addContent( testemunhasElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element causasElement = new Element( "Causas" ); |  |  |  | 		Element causasElement = new Element( "Causas" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | //perguntar
 |  |  |  | 		causasElement.setText( causa.getCausa() ); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 		causasElement.setText( "" ); |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		acidenteElement.addContent( causasElement ); |  |  |  | 		acidenteElement.addContent( causasElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element descricaoElement = new Element( "Descricao" ); |  |  |  | 		Element descricaoElement = new Element( "Descricao" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | //PERGUNTAR
 |  |  |  | 		descricaoElement.setText( analiseAcidente.getDescricao() ); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 		descricaoElement.setText( "" ); |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		acidenteElement.addContent( descricaoElement ); |  |  |  | 		acidenteElement.addContent( descricaoElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element imagensElement = new Element( "Imagens" ); |  |  |  | 		Element imagensElement = new Element( "Imagens" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | //PERGUNTAR
 |  |  |  | //PERGUNTAR
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -229,12 +236,10 @@ public class PdfGenerator | 
			
		
	
		
		
			
				
					
					|  |  |  | 		} |  |  |  | 		} | 
			
		
	
		
		
			
				
					
					|  |  |  | 		acidenteElement.addContent( imagensElement ); |  |  |  | 		acidenteElement.addContent( imagensElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element conclusoesElement = new Element( "Conclusoes" ); |  |  |  | 		Element conclusoesElement = new Element( "Conclusoes" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | //PERGUNTAR
 |  |  |  | 		conclusoesElement.setText( analiseAcidente.getConclusoes() ); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 		conclusoesElement.setText( "" ); |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		acidenteElement.addContent( conclusoesElement ); |  |  |  | 		acidenteElement.addContent( conclusoesElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element accoesTomadasElement = new Element( "AccoesTomadas" ); |  |  |  | 		Element accoesTomadasElement = new Element( "AccoesTomadas" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | //PERGUNTAR
 |  |  |  | 		accoesTomadasElement.setText( analiseAcidente.getAccoes() ); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 		accoesTomadasElement.setText( "" ); |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		acidenteElement.addContent( accoesTomadasElement ); |  |  |  | 		acidenteElement.addContent( accoesTomadasElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element formacaoSHSTElement = new Element( "FormacaoSHST" ); |  |  |  | 		Element formacaoSHSTElement = new Element( "FormacaoSHST" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element teveFormacaoSHSTElement = new Element( "TeveFormacao" ); |  |  |  | 		Element teveFormacaoSHSTElement = new Element( "TeveFormacao" ); | 
			
		
	
	
		
		
			
				
					|  |  | @ -313,53 +318,111 @@ public class PdfGenerator | 
			
		
	
		
		
			
				
					
					|  |  |  | 		incapacidadeElement.addContent( coeficienteIncapacidadeElement ); |  |  |  | 		incapacidadeElement.addContent( coeficienteIncapacidadeElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  | //PERGUNTAR
 |  |  |  | //PERGUNTAR
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Date dataAvaliacao = new Date(); |  |  |  | 		Date dataAvaliacao = new Date(); | 
			
		
	
		
		
			
				
					
					|  |  |  | //				<DataAvaliacao>
 |  |  |  | 		incapacidadeElement.addContent( createDataElement( "DataAvaliacao", dataAvaliacao ) ); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | //				<DataRevisao>
 |  |  |  | //PERGUNTAR
 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | //				<PeriodoIncapacidade>
 |  |  |  | 		Date dataRevisao = new Date(); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | //					<Inicio>
 |  |  |  | 		incapacidadeElement.addContent( createDataElement( "DataRevisao", dataRevisao ) ); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | //						<Ano>
 |  |  |  | 		Element periodoIncapacidadeElement = new Element( "PeriodoIncapacidade" ); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | //						<Mes>
 |  |  |  | //PERGUNTAR
 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | //						<Dia>
 |  |  |  | 		Date inicioIncapacidade = new Date(); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | //					<Fim>
 |  |  |  | 		periodoIncapacidadeElement.addContent( createDataElement( "Inicio", inicioIncapacidade ) ); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | //						<Ano>
 |  |  |  | //PERGUNTAR
 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | //						<Mes>
 |  |  |  | 		Date fimIncapacidade = new Date(); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | //						<Dia>
 |  |  |  | 		periodoIncapacidadeElement.addContent( createDataElement( "Fim", fimIncapacidade ) ); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		incapacidadeElement.addContent( periodoIncapacidadeElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		acidenteElement.addContent( incapacidadeElement ); |  |  |  | 		acidenteElement.addContent( incapacidadeElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		return acidenteElement; |  |  |  | 		return acidenteElement; | 
			
		
	
		
		
			
				
					
					|  |  |  | 	} |  |  |  | 	} | 
			
		
	
		
		
			
				
					
					|  |  |  | 	 |  |  |  | 	 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	protected Element createRecomendacoesSIPRPElement() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		Element recomendacoesSIPRPElement = new Element( "RecomendacoesSIPRP" ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		for( int r = 0; r < recomendacoes.length; r++ ) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			Element recomendacaoElement = new Element( "Recomendacao" ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			recomendacaoElement.setText( recomendacoes[ r ].getRecomendacao() ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			recomendacoesSIPRPElement.addContent( recomendacaoElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		return recomendacoesSIPRPElement; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	protected Element createMedidasElement() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		Element medidasElement = new Element( "MedidasAdoptar" ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		for( int m = 0; m < medidas.length; m++ ) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			Element medidaElement = new Element( "Medida" ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			medidaElement.setText( medidas[ m ].getMedida() ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			medidasElement.addContent( medidaElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		return medidasElement; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	protected Element createTomadaConhecimentoElement() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		Element tomadaConhecimentoElement = new Element( "TomadaConhecimento" ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | //PERGUNTAR
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		tomadaConhecimentoElement.addContent( createAssinaturaElement( "DepartamentoSeguranca", "", new Date() ) ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		tomadaConhecimentoElement.addContent( createAssinaturaElement( "TecnicoHST", "", new Date() ) ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		tomadaConhecimentoElement.addContent( createAssinaturaElement( "ResponsavelSeguranca", "", new Date() ) ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		tomadaConhecimentoElement.addContent( createAssinaturaElement( "ResponsavelRH", "", new Date() ) ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		tomadaConhecimentoElement.addContent( createAssinaturaElement( "SuperiorHierarquico", "", new Date() ) ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		tomadaConhecimentoElement.addContent( createAssinaturaElement( "DepartamentoSeguranca", "", new Date() ) ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		return tomadaConhecimentoElement; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	protected Element createAssinaturaElement( String nome, String nomeStr, Date data ) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		Element assinaturaElement = new Element( nome ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		Element nomeElement = new Element( "Nome" ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		nomeElement.setText( nomeStr ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		assinaturaElement.addContent( nomeElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		assinaturaElement.addContent( createDataElement( "Data", data ) ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		return assinaturaElement; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	 | 
			
		
	
		
		
			
				
					
					|  |  |  | 	protected Element createDataElement( String nome, Date data ) |  |  |  | 	protected Element createDataElement( String nome, Date data ) | 
			
		
	
		
		
			
				
					
					|  |  |  | 	{ |  |  |  | 	{ | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element dataElement = new Element( nome ); |  |  |  | 		Element dataElement = new Element( nome ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Calendar cal = Calendar.getInstance(); |  |  |  | 		 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 		cal.setTime( data ); |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		Element anoElement = new Element( "Ano" ); |  |  |  | 		Element anoElement = new Element( "Ano" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		anoElement.setText( "" + cal.get( Calendar.YEAR ) ); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 		dataElement.addContent( anoElement ); |  |  |  | 		dataElement.addContent( anoElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element mesElement = new Element( "Mes" ); |  |  |  | 		Element mesElement = new Element( "Mes" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		int mes = cal.get( Calendar.MONTH ) + 1; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 		mesElement.setText( mes > 9 ? ( "" + mes ) : ( "0" + mes ) ); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 		dataElement.addContent( mesElement ); |  |  |  | 		dataElement.addContent( mesElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element diaElement = new Element( "Dia" ); |  |  |  | 		Element diaElement = new Element( "Dia" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		int dia = cal.get( Calendar.DAY_OF_MONTH ); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 		diaElement.setText( dia > 9 ? ( "" + dia ) : ( "0" + dia ) ); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 		dataElement.addContent( diaElement ); |  |  |  | 		dataElement.addContent( diaElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		if( data != null ) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			Calendar cal = Calendar.getInstance(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			cal.setTime( data ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			anoElement.setText( "" + cal.get( Calendar.YEAR ) ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			int mes = cal.get( Calendar.MONTH ) + 1; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			mesElement.setText( mes > 9 ? ( "" + mes ) : ( "0" + mes ) ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			int dia = cal.get( Calendar.DAY_OF_MONTH ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			diaElement.setText( dia > 9 ? ( "" + dia ) : ( "0" + dia ) ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		 | 
			
		
	
		
		
			
				
					
					|  |  |  | 		return dataElement; |  |  |  | 		return dataElement; | 
			
		
	
		
		
			
				
					
					|  |  |  | 	} |  |  |  | 	} | 
			
		
	
		
		
			
				
					
					|  |  |  | 	 |  |  |  | 	 | 
			
		
	
		
		
			
				
					
					|  |  |  | 	protected Element createHoraElement( String nome, Date hora ) |  |  |  | 	protected Element createHoraElement( String nome, Date hora ) | 
			
		
	
		
		
			
				
					
					|  |  |  | 	{ |  |  |  | 	{ | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element horaElement = new Element( nome ); |  |  |  | 		Element horaElement = new Element( nome ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Calendar cal = Calendar.getInstance(); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 		cal.setTime( hora ); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element horasElement = new Element( "Horas" ); |  |  |  | 		Element horasElement = new Element( "Horas" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		int horas = cal.get( Calendar.HOUR_OF_DAY ); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 		horasElement.setText( horas > 9 ? ( "" + horas ) : ( "0" + horas ) ); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 		horaElement.addContent( horasElement ); |  |  |  | 		horaElement.addContent( horasElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element minutosElement = new Element( "Minutos" ); |  |  |  | 		Element minutosElement = new Element( "Minutos" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		int minutos = cal.get( Calendar.MINUTE ); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 		minutosElement.setText( minutos > 9 ? ( "" + minutos ) : ( "0" + minutos ) ); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 		horaElement.addContent( minutosElement ); |  |  |  | 		horaElement.addContent( minutosElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		if( hora != null ) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			Calendar cal = Calendar.getInstance(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			cal.setTime( hora ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			int horas = cal.get( Calendar.HOUR_OF_DAY ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			horasElement.setText( horas > 9 ? ( "" + horas ) : ( "0" + horas ) ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			int minutos = cal.get( Calendar.MINUTE ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			minutosElement.setText( minutos > 9 ? ( "" + minutos ) : ( "0" + minutos ) ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		} | 
			
		
	
		
		
			
				
					
					|  |  |  | 		return horaElement; |  |  |  | 		return horaElement; | 
			
		
	
		
		
			
				
					
					|  |  |  | 	} |  |  |  | 	} | 
			
		
	
		
		
			
				
					
					|  |  |  | } |  |  |  | } | 
			
		
	
	
		
		
			
				
					|  |  | 
 |