package siprp.higiene.relatorio.print; import org.jdom.Element; public class TecnicoHSToPrint implements PrintableInterface { protected Integer id; protected String nome; protected String cap; protected String formacao; protected String assinatura; protected boolean superior; public TecnicoHSToPrint( Integer id, String nome, String cap, String formacao, String assinatura, boolean superior ) { super(); this.id = id; this.nome = nome; this.cap = cap; this.formacao = formacao; this.assinatura = assinatura; this.superior = superior; } @Override public Element toJdomElement() throws Exception { Element tecnicoHSElement = new Element( "tecnico" + ( superior ? "-superior" : "" ) + "-hs" ); Element nomeElement = new Element( "nome" ); nomeElement.setText( nome ); tecnicoHSElement.addContent( nomeElement ); Element capElement = new Element( "cap" ); capElement.setText( cap ); tecnicoHSElement.addContent( capElement ); Element formacaoElement = new Element( "formacao" ); formacaoElement.setText( formacao ); tecnicoHSElement.addContent( formacaoElement ); Element assinaturaElement = new Element( "assinatura" ); assinaturaElement.setText( "" + assinatura ); tecnicoHSElement.addContent( assinaturaElement ); return tecnicoHSElement; } }