forked from Coded/SIPRP
git-svn-id: https://svn.coded.pt/svn/SIPRP@973 bb69d46d-e84e-40c8-a05a-06db0d633741
parent
ea1e259805
commit
d6ac7f5291
@ -0,0 +1,43 @@
|
|||||||
|
package siprp.higiene.relatorio.print;
|
||||||
|
|
||||||
|
import java.util.Vector;
|
||||||
|
|
||||||
|
import org.jdom.Element;
|
||||||
|
|
||||||
|
public class NormalizacaoToPrint
|
||||||
|
implements PrintableInterface
|
||||||
|
{
|
||||||
|
protected Vector<String> normasPortuguesas;
|
||||||
|
protected Vector<String> normasInternacionais;
|
||||||
|
|
||||||
|
public NormalizacaoToPrint( Vector<String> normasPortuguesas, Vector<String> normasInternacionais )
|
||||||
|
{
|
||||||
|
super();
|
||||||
|
this.normasPortuguesas = normasPortuguesas;
|
||||||
|
this.normasInternacionais = normasInternacionais;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Element toJdomElement() throws Exception
|
||||||
|
{
|
||||||
|
Element normalizacaoElement = new Element( "normalizacao-aplicavel" );
|
||||||
|
Element portuguesaElement = new Element( "normalizacao-portuguesa" );
|
||||||
|
addNormas( portuguesaElement, normasPortuguesas );
|
||||||
|
normalizacaoElement.addContent( portuguesaElement );
|
||||||
|
Element internacionalElement = new Element( "normalizacao-internacional" );
|
||||||
|
addNormas( internacionalElement, normasInternacionais );
|
||||||
|
normalizacaoElement.addContent( internacionalElement );
|
||||||
|
return normalizacaoElement;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void addNormas( Element element, Vector<String> normas )
|
||||||
|
{
|
||||||
|
for( String norma : normas )
|
||||||
|
{
|
||||||
|
Element normaElement = new Element( "norma" );
|
||||||
|
normaElement.setText( norma );
|
||||||
|
element.addContent( normaElement );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in new issue