|  |  | @ -6,13 +6,24 @@ import java.util.Date; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | import org.jdom.Element; |  |  |  | import org.jdom.Element; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import analiseacidentestrabalho.Acidentado; | 
			
		
	
		
		
			
				
					
					|  |  |  | import analiseacidentestrabalho.AnaliseAcidente; |  |  |  | import analiseacidentestrabalho.AnaliseAcidente; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import analiseacidentestrabalho.Causa; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import analiseacidentestrabalho.Medida; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import analiseacidentestrabalho.Recomendacao; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import analiseacidentestrabalho.Utilizador; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | public class PdfGenerator  |  |  |  | public class PdfGenerator  | 
			
		
	
		
		
			
				
					
					|  |  |  | { |  |  |  | { | 
			
		
	
		
		
			
				
					
					|  |  |  | 	protected final AnaliseAcidente analiseAcidente; |  |  |  | 	protected final AnaliseAcidente analiseAcidente; | 
			
		
	
		
		
			
				
					
					|  |  |  | 	 |  |  |  | 	 | 
			
		
	
		
		
			
				
					
					|  |  |  | 	public PdfGenerator( AnaliseAcidente analiseAcidente ) |  |  |  | 	public PdfGenerator(  | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			Utilizador utilizador,  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			AnaliseAcidente analiseAcidente,  | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			Acidentado acidentado, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			Recomendacao recomendacao, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			Medida medida, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			Causa causa ) | 
			
		
	
		
		
			
				
					
					|  |  |  | 	{ |  |  |  | 	{ | 
			
		
	
		
		
			
				
					
					|  |  |  | 		this.analiseAcidente = analiseAcidente; |  |  |  | 		this.analiseAcidente = analiseAcidente; | 
			
		
	
		
		
			
				
					
					|  |  |  | 	} |  |  |  | 	} | 
			
		
	
	
		
		
			
				
					|  |  | @ -209,8 +220,9 @@ public class PdfGenerator | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element imagensElement = new Element( "Imagens" ); |  |  |  | 		Element imagensElement = new Element( "Imagens" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | //PERGUNTAR
 |  |  |  | //PERGUNTAR
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 		String imagens[] = new String[]{}; |  |  |  | 		String imagens[] = new String[]{}; | 
			
		
	
		
		
			
				
					
					|  |  |  | 		for( String imagem : imagens ) |  |  |  | 		for( int i = 0; i < imagens.length; i++ ) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		{ |  |  |  | 		{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			String imagem = imagens[ i ]; | 
			
		
	
		
		
			
				
					
					|  |  |  | 			Element imagemElement = new Element( "Imagem" ); |  |  |  | 			Element imagemElement = new Element( "Imagem" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 			imagemElement.setText( imagem ); |  |  |  | 			imagemElement.setText( imagem ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 			imagensElement.addContent( imagemElement ); |  |  |  | 			imagensElement.addContent( imagemElement ); | 
			
		
	
	
		
		
			
				
					|  |  | @ -242,8 +254,9 @@ public class PdfGenerator | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element relatoriosOutrasOcorrenciasMesmoPostoElement = new Element( "Relatorios" ); |  |  |  | 		Element relatoriosOutrasOcorrenciasMesmoPostoElement = new Element( "Relatorios" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | //PERGUNTAR
 |  |  |  | //PERGUNTAR
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 		String numerosRelatoriosOutrasOcorrenciasMesmoPosto[] = new String[]{}; |  |  |  | 		String numerosRelatoriosOutrasOcorrenciasMesmoPosto[] = new String[]{}; | 
			
		
	
		
		
			
				
					
					|  |  |  | 		for( String numeroRelatorio : numerosRelatoriosOutrasOcorrenciasMesmoPosto ) |  |  |  | 		for( int r = 0; r < numerosRelatoriosOutrasOcorrenciasMesmoPosto.length; r++ ) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		{ |  |  |  | 		{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			String numeroRelatorio = numerosRelatoriosOutrasOcorrenciasMesmoPosto[ r ]; | 
			
		
	
		
		
			
				
					
					|  |  |  | 			Element relatorioElement = new Element( "Relatorio" ); |  |  |  | 			Element relatorioElement = new Element( "Relatorio" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 			relatorioElement.setText( numeroRelatorio ); |  |  |  | 			relatorioElement.setText( numeroRelatorio ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 			relatoriosOutrasOcorrenciasMesmoPostoElement.addContent( relatorioElement ); |  |  |  | 			relatoriosOutrasOcorrenciasMesmoPostoElement.addContent( relatorioElement ); | 
			
		
	
	
		
		
			
				
					|  |  | @ -270,8 +283,9 @@ public class PdfGenerator | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Element areasLesaoElement = new Element( "Areas" ); |  |  |  | 		Element areasLesaoElement = new Element( "Areas" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | //PERGUNTAR
 |  |  |  | //PERGUNTAR
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 		String areasLesao[][] = new String[][]{}; |  |  |  | 		String areasLesao[][] = new String[][]{}; | 
			
		
	
		
		
			
				
					
					|  |  |  | 		for( String area[] : areasLesao ) |  |  |  | 		for( int a = 0; a < areasLesao.length; a++ ) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 		{ |  |  |  | 		{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			String area[] = areasLesao[ a ]; | 
			
		
	
		
		
			
				
					
					|  |  |  | 			Element areaLesaoElement = new Element( "Area" ); |  |  |  | 			Element areaLesaoElement = new Element( "Area" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 			Element nomeAreaLesaoElement = new Element( "Nome" ); |  |  |  | 			Element nomeAreaLesaoElement = new Element( "Nome" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 			nomeAreaLesaoElement.setText( area[ 0 ] ); |  |  |  | 			nomeAreaLesaoElement.setText( area[ 0 ] ); | 
			
		
	
	
		
		
			
				
					|  |  | @ -298,7 +312,7 @@ public class PdfGenerator | 
			
		
	
		
		
			
				
					
					|  |  |  | 		coeficienteIncapacidadeElement.setText( "" ); |  |  |  | 		coeficienteIncapacidadeElement.setText( "" ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 		incapacidadeElement.addContent( coeficienteIncapacidadeElement ); |  |  |  | 		incapacidadeElement.addContent( coeficienteIncapacidadeElement ); | 
			
		
	
		
		
			
				
					
					|  |  |  | //PERGUNTAR
 |  |  |  | //PERGUNTAR
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 		Date |  |  |  | 		Date dataAvaliacao = new Date(); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | //				<DataAvaliacao>
 |  |  |  | //				<DataAvaliacao>
 | 
			
		
	
		
		
			
				
					
					|  |  |  | //				<DataRevisao>
 |  |  |  | //				<DataRevisao>
 | 
			
		
	
		
		
			
				
					
					|  |  |  | //				<PeriodoIncapacidade>
 |  |  |  | //				<PeriodoIncapacidade>
 | 
			
		
	
	
		
		
			
				
					|  |  | 
 |