|
|
|
|
@ -6,13 +6,24 @@ import java.util.Date;
|
|
|
|
|
|
|
|
|
|
import org.jdom.Element;
|
|
|
|
|
|
|
|
|
|
import analiseacidentestrabalho.Acidentado;
|
|
|
|
|
import analiseacidentestrabalho.AnaliseAcidente;
|
|
|
|
|
import analiseacidentestrabalho.Causa;
|
|
|
|
|
import analiseacidentestrabalho.Medida;
|
|
|
|
|
import analiseacidentestrabalho.Recomendacao;
|
|
|
|
|
import analiseacidentestrabalho.Utilizador;
|
|
|
|
|
|
|
|
|
|
public class PdfGenerator
|
|
|
|
|
{
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
@ -209,8 +220,9 @@ public class PdfGenerator
|
|
|
|
|
Element imagensElement = new Element( "Imagens" );
|
|
|
|
|
//PERGUNTAR
|
|
|
|
|
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" );
|
|
|
|
|
imagemElement.setText( imagem );
|
|
|
|
|
imagensElement.addContent( imagemElement );
|
|
|
|
|
@ -242,8 +254,9 @@ public class PdfGenerator
|
|
|
|
|
Element relatoriosOutrasOcorrenciasMesmoPostoElement = new Element( "Relatorios" );
|
|
|
|
|
//PERGUNTAR
|
|
|
|
|
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" );
|
|
|
|
|
relatorioElement.setText( numeroRelatorio );
|
|
|
|
|
relatoriosOutrasOcorrenciasMesmoPostoElement.addContent( relatorioElement );
|
|
|
|
|
@ -270,8 +283,9 @@ public class PdfGenerator
|
|
|
|
|
Element areasLesaoElement = new Element( "Areas" );
|
|
|
|
|
//PERGUNTAR
|
|
|
|
|
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 nomeAreaLesaoElement = new Element( "Nome" );
|
|
|
|
|
nomeAreaLesaoElement.setText( area[ 0 ] );
|
|
|
|
|
@ -298,7 +312,7 @@ public class PdfGenerator
|
|
|
|
|
coeficienteIncapacidadeElement.setText( "" );
|
|
|
|
|
incapacidadeElement.addContent( coeficienteIncapacidadeElement );
|
|
|
|
|
//PERGUNTAR
|
|
|
|
|
Date
|
|
|
|
|
Date dataAvaliacao = new Date();
|
|
|
|
|
// <DataAvaliacao>
|
|
|
|
|
// <DataRevisao>
|
|
|
|
|
// <PeriodoIncapacidade>
|
|
|
|
|
|