forked from Coded/SIPRP
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
879 B
42 lines
879 B
package siprp.higiene.relatorio.print;
|
|
|
|
import java.util.Vector;
|
|
|
|
import org.jdom.Element;
|
|
|
|
|
|
public class PostoToPrint
|
|
implements PrintableInterface
|
|
{
|
|
protected String designacao;
|
|
protected Vector<RiscoToPrint> riscos;
|
|
protected boolean generico;
|
|
|
|
public PostoToPrint( String designacao, Vector<RiscoToPrint> riscos, boolean generico )
|
|
{
|
|
this.designacao = designacao;
|
|
this.riscos = riscos;
|
|
this.generico = generico;
|
|
}
|
|
|
|
@Override
|
|
public Element toJdomElement()
|
|
throws Exception
|
|
{
|
|
Element postoElement = new Element( "posto" );
|
|
Element designacaoElement = new Element( "designacao" );
|
|
designacaoElement.setText( designacao );
|
|
postoElement.addContent( designacaoElement );
|
|
for( RiscoToPrint risco : riscos )
|
|
{
|
|
postoElement.addContent( risco.toJdomElement() );
|
|
}
|
|
return postoElement;
|
|
}
|
|
|
|
public boolean isGenerico()
|
|
{
|
|
return generico;
|
|
}
|
|
}
|