AbstractSerializer.java

  1. /*
  2.  * GovWay - A customizable API Gateway
  3.  * https://govway.org
  4.  *
  5.  * Copyright (c) 2005-2025 Link.it srl (https://link.it).
  6.  *
  7.  * This program is free software: you can redistribute it and/or modify
  8.  * it under the terms of the GNU General Public License version 3, as published by
  9.  * the Free Software Foundation.
  10.  *
  11.  * This program is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  * GNU General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU General Public License
  17.  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  18.  *
  19.  */
  20. package org.openspcoop2.pdd.monitor.utils.serializer;

  21. import org.openspcoop2.generic_project.exception.SerializerException;
  22. import org.openspcoop2.utils.beans.WriteToSerializerType;
  23. import org.openspcoop2.utils.xml.JaxbUtils;

  24. import org.openspcoop2.pdd.monitor.BustaSoggetto;
  25. import org.openspcoop2.pdd.monitor.Busta;
  26. import org.openspcoop2.pdd.monitor.BustaServizio;
  27. import org.openspcoop2.pdd.monitor.StatoPdd;
  28. import org.openspcoop2.pdd.monitor.Openspcoop2;
  29. import org.openspcoop2.pdd.monitor.Messaggio;
  30. import org.openspcoop2.pdd.monitor.ServizioApplicativoConsegna;
  31. import org.openspcoop2.pdd.monitor.Dettaglio;
  32. import org.openspcoop2.pdd.monitor.Filtro;
  33. import org.openspcoop2.pdd.monitor.Proprieta;

  34. import java.io.ByteArrayOutputStream;
  35. import java.io.FileOutputStream;
  36. import java.io.OutputStream;
  37. import java.io.File;
  38. import java.lang.reflect.Method;

  39. import javax.xml.bind.JAXBElement;

  40. /**    
  41.  * XML Serializer of beans
  42.  *
  43.  * @author Poli Andrea (poli@link.it)
  44.  * @author $Author$
  45.  * @version $Rev$, $Date$
  46.  */
  47. public abstract class AbstractSerializer {


  48.     protected abstract WriteToSerializerType getType();
  49.    
  50.     protected void _objToXml(OutputStream out, Class<?> c, Object object,
  51.             boolean prettyPrint) throws Exception {
  52.         if(object instanceof JAXBElement){
  53.             // solo per il tipo WriteToSerializerType.JAXB
  54.             JaxbUtils.objToXml(out, c, object, prettyPrint);
  55.         }else{
  56.             Method m = c.getMethod("writeTo", OutputStream.class, WriteToSerializerType.class);
  57.             m.invoke(object, out, this.getType());
  58.         }
  59.     }
  60.    
  61.     protected void objToXml(OutputStream out,Class<?> c,Object object,boolean prettyPrint) throws SerializerException{
  62.         try{
  63.             this._objToXml(out, c, object, prettyPrint);
  64.         }catch(Exception e){
  65.             throw new SerializerException(e.getMessage(), e);
  66.         }
  67.         finally{
  68.             try{
  69.                 out.flush();
  70.             }catch(Exception e){
  71.                 // ignore
  72.             }
  73.         }
  74.     }
  75.     protected void objToXml(String fileName,Class<?> c,Object object,boolean prettyPrint) throws SerializerException{
  76.         try{
  77.             this.objToXml(new File(fileName), c, object, prettyPrint);
  78.         }catch(Exception e){
  79.             throw new SerializerException(e.getMessage(), e);
  80.         }
  81.     }
  82.     protected void objToXml(File file,Class<?> c,Object object,boolean prettyPrint) throws SerializerException{
  83.         FileOutputStream fout = null;
  84.         try{
  85.             fout = new FileOutputStream(file);
  86.             this._objToXml(fout, c, object, prettyPrint);
  87.         }catch(Exception e){
  88.             throw new SerializerException(e.getMessage(), e);
  89.         }
  90.         finally{
  91.             try{
  92.                 if(fout!=null){
  93.                     fout.flush();
  94.                 }
  95.             }catch(Exception e){
  96.                 // ignore
  97.             }
  98.             try{
  99.                 if(fout!=null){
  100.                     fout.close();
  101.                 }
  102.             }catch(Exception e){
  103.                 // ignore
  104.             }
  105.         }
  106.     }
  107.     protected ByteArrayOutputStream objToXml(Class<?> c,Object object,boolean prettyPrint) throws SerializerException{
  108.         ByteArrayOutputStream bout = null;
  109.         try{
  110.             bout = new ByteArrayOutputStream();
  111.             this._objToXml(bout, c, object, prettyPrint);
  112.         }catch(Exception e){
  113.             throw new SerializerException(e.getMessage(), e);
  114.         }
  115.         finally{
  116.             try{
  117.                 if(bout!=null){
  118.                     bout.flush();
  119.                 }
  120.             }catch(Exception e){
  121.                 // ignore
  122.             }
  123.             try{
  124.                 if(bout!=null){
  125.                     bout.close();
  126.                 }
  127.             }catch(Exception e){
  128.                 // ignore
  129.             }
  130.         }
  131.         return bout;
  132.     }




  133.     /*
  134.      =================================================================================
  135.      Object: busta-soggetto
  136.      =================================================================================
  137.     */
  138.    
  139.     /**
  140.      * Serialize to file system in <var>fileName</var> the object <var>bustaSoggetto</var> of type {@link org.openspcoop2.pdd.monitor.BustaSoggetto}
  141.      *
  142.      * @param fileName Xml file to serialize the object <var>bustaSoggetto</var>
  143.      * @param bustaSoggetto Object to be serialized in xml file <var>fileName</var>
  144.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  145.      */
  146.     public void write(String fileName,BustaSoggetto bustaSoggetto) throws SerializerException {
  147.         this.objToXml(fileName, BustaSoggetto.class, bustaSoggetto, false);
  148.     }
  149.     /**
  150.      * Serialize to file system in <var>fileName</var> the object <var>bustaSoggetto</var> of type {@link org.openspcoop2.pdd.monitor.BustaSoggetto}
  151.      *
  152.      * @param fileName Xml file to serialize the object <var>bustaSoggetto</var>
  153.      * @param bustaSoggetto Object to be serialized in xml file <var>fileName</var>
  154.      * @param prettyPrint if true output the XML with indenting
  155.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  156.      */
  157.     public void write(String fileName,BustaSoggetto bustaSoggetto,boolean prettyPrint) throws SerializerException {
  158.         this.objToXml(fileName, BustaSoggetto.class, bustaSoggetto, prettyPrint);
  159.     }
  160.    
  161.     /**
  162.      * Serialize to file system in <var>file</var> the object <var>bustaSoggetto</var> of type {@link org.openspcoop2.pdd.monitor.BustaSoggetto}
  163.      *
  164.      * @param file Xml file to serialize the object <var>bustaSoggetto</var>
  165.      * @param bustaSoggetto Object to be serialized in xml file <var>fileName</var>
  166.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  167.      */
  168.     public void write(File file,BustaSoggetto bustaSoggetto) throws SerializerException {
  169.         this.objToXml(file, BustaSoggetto.class, bustaSoggetto, false);
  170.     }
  171.     /**
  172.      * Serialize to file system in <var>file</var> the object <var>bustaSoggetto</var> of type {@link org.openspcoop2.pdd.monitor.BustaSoggetto}
  173.      *
  174.      * @param file Xml file to serialize the object <var>bustaSoggetto</var>
  175.      * @param bustaSoggetto Object to be serialized in xml file <var>fileName</var>
  176.      * @param prettyPrint if true output the XML with indenting
  177.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  178.      */
  179.     public void write(File file,BustaSoggetto bustaSoggetto,boolean prettyPrint) throws SerializerException {
  180.         this.objToXml(file, BustaSoggetto.class, bustaSoggetto, prettyPrint);
  181.     }
  182.    
  183.     /**
  184.      * Serialize to output stream <var>out</var> the object <var>bustaSoggetto</var> of type {@link org.openspcoop2.pdd.monitor.BustaSoggetto}
  185.      *
  186.      * @param out OutputStream to serialize the object <var>bustaSoggetto</var>
  187.      * @param bustaSoggetto Object to be serialized in xml file <var>fileName</var>
  188.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  189.      */
  190.     public void write(OutputStream out,BustaSoggetto bustaSoggetto) throws SerializerException {
  191.         this.objToXml(out, BustaSoggetto.class, bustaSoggetto, false);
  192.     }
  193.     /**
  194.      * Serialize to output stream <var>out</var> the object <var>bustaSoggetto</var> of type {@link org.openspcoop2.pdd.monitor.BustaSoggetto}
  195.      *
  196.      * @param out OutputStream to serialize the object <var>bustaSoggetto</var>
  197.      * @param bustaSoggetto Object to be serialized in xml file <var>fileName</var>
  198.      * @param prettyPrint if true output the XML with indenting
  199.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  200.      */
  201.     public void write(OutputStream out,BustaSoggetto bustaSoggetto,boolean prettyPrint) throws SerializerException {
  202.         this.objToXml(out, BustaSoggetto.class, bustaSoggetto, prettyPrint);
  203.     }
  204.            
  205.     /**
  206.      * Serialize to byte array the object <var>bustaSoggetto</var> of type {@link org.openspcoop2.pdd.monitor.BustaSoggetto}
  207.      *
  208.      * @param bustaSoggetto Object to be serialized
  209.      * @return Object to be serialized in byte array
  210.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  211.      */
  212.     public byte[] toByteArray(BustaSoggetto bustaSoggetto) throws SerializerException {
  213.         return this.objToXml(BustaSoggetto.class, bustaSoggetto, false).toByteArray();
  214.     }
  215.     /**
  216.      * Serialize to byte array the object <var>bustaSoggetto</var> of type {@link org.openspcoop2.pdd.monitor.BustaSoggetto}
  217.      *
  218.      * @param bustaSoggetto Object to be serialized
  219.      * @param prettyPrint if true output the XML with indenting
  220.      * @return Object to be serialized in byte array
  221.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  222.      */
  223.     public byte[] toByteArray(BustaSoggetto bustaSoggetto,boolean prettyPrint) throws SerializerException {
  224.         return this.objToXml(BustaSoggetto.class, bustaSoggetto, prettyPrint).toByteArray();
  225.     }
  226.    
  227.     /**
  228.      * Serialize to String the object <var>bustaSoggetto</var> of type {@link org.openspcoop2.pdd.monitor.BustaSoggetto}
  229.      *
  230.      * @param bustaSoggetto Object to be serialized
  231.      * @return Object to be serialized as String
  232.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  233.      */
  234.     public String toString(BustaSoggetto bustaSoggetto) throws SerializerException {
  235.         return this.objToXml(BustaSoggetto.class, bustaSoggetto, false).toString();
  236.     }
  237.     /**
  238.      * Serialize to String the object <var>bustaSoggetto</var> of type {@link org.openspcoop2.pdd.monitor.BustaSoggetto}
  239.      *
  240.      * @param bustaSoggetto Object to be serialized
  241.      * @param prettyPrint if true output the XML with indenting
  242.      * @return Object to be serialized as String
  243.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  244.      */
  245.     public String toString(BustaSoggetto bustaSoggetto,boolean prettyPrint) throws SerializerException {
  246.         return this.objToXml(BustaSoggetto.class, bustaSoggetto, prettyPrint).toString();
  247.     }
  248.    
  249.    
  250.    
  251.     /*
  252.      =================================================================================
  253.      Object: busta
  254.      =================================================================================
  255.     */
  256.    
  257.     /**
  258.      * Serialize to file system in <var>fileName</var> the object <var>busta</var> of type {@link org.openspcoop2.pdd.monitor.Busta}
  259.      *
  260.      * @param fileName Xml file to serialize the object <var>busta</var>
  261.      * @param busta Object to be serialized in xml file <var>fileName</var>
  262.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  263.      */
  264.     public void write(String fileName,Busta busta) throws SerializerException {
  265.         this.objToXml(fileName, Busta.class, busta, false);
  266.     }
  267.     /**
  268.      * Serialize to file system in <var>fileName</var> the object <var>busta</var> of type {@link org.openspcoop2.pdd.monitor.Busta}
  269.      *
  270.      * @param fileName Xml file to serialize the object <var>busta</var>
  271.      * @param busta Object to be serialized in xml file <var>fileName</var>
  272.      * @param prettyPrint if true output the XML with indenting
  273.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  274.      */
  275.     public void write(String fileName,Busta busta,boolean prettyPrint) throws SerializerException {
  276.         this.objToXml(fileName, Busta.class, busta, prettyPrint);
  277.     }
  278.    
  279.     /**
  280.      * Serialize to file system in <var>file</var> the object <var>busta</var> of type {@link org.openspcoop2.pdd.monitor.Busta}
  281.      *
  282.      * @param file Xml file to serialize the object <var>busta</var>
  283.      * @param busta Object to be serialized in xml file <var>fileName</var>
  284.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  285.      */
  286.     public void write(File file,Busta busta) throws SerializerException {
  287.         this.objToXml(file, Busta.class, busta, false);
  288.     }
  289.     /**
  290.      * Serialize to file system in <var>file</var> the object <var>busta</var> of type {@link org.openspcoop2.pdd.monitor.Busta}
  291.      *
  292.      * @param file Xml file to serialize the object <var>busta</var>
  293.      * @param busta Object to be serialized in xml file <var>fileName</var>
  294.      * @param prettyPrint if true output the XML with indenting
  295.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  296.      */
  297.     public void write(File file,Busta busta,boolean prettyPrint) throws SerializerException {
  298.         this.objToXml(file, Busta.class, busta, prettyPrint);
  299.     }
  300.    
  301.     /**
  302.      * Serialize to output stream <var>out</var> the object <var>busta</var> of type {@link org.openspcoop2.pdd.monitor.Busta}
  303.      *
  304.      * @param out OutputStream to serialize the object <var>busta</var>
  305.      * @param busta Object to be serialized in xml file <var>fileName</var>
  306.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  307.      */
  308.     public void write(OutputStream out,Busta busta) throws SerializerException {
  309.         this.objToXml(out, Busta.class, busta, false);
  310.     }
  311.     /**
  312.      * Serialize to output stream <var>out</var> the object <var>busta</var> of type {@link org.openspcoop2.pdd.monitor.Busta}
  313.      *
  314.      * @param out OutputStream to serialize the object <var>busta</var>
  315.      * @param busta Object to be serialized in xml file <var>fileName</var>
  316.      * @param prettyPrint if true output the XML with indenting
  317.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  318.      */
  319.     public void write(OutputStream out,Busta busta,boolean prettyPrint) throws SerializerException {
  320.         this.objToXml(out, Busta.class, busta, prettyPrint);
  321.     }
  322.            
  323.     /**
  324.      * Serialize to byte array the object <var>busta</var> of type {@link org.openspcoop2.pdd.monitor.Busta}
  325.      *
  326.      * @param busta Object to be serialized
  327.      * @return Object to be serialized in byte array
  328.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  329.      */
  330.     public byte[] toByteArray(Busta busta) throws SerializerException {
  331.         return this.objToXml(Busta.class, busta, false).toByteArray();
  332.     }
  333.     /**
  334.      * Serialize to byte array the object <var>busta</var> of type {@link org.openspcoop2.pdd.monitor.Busta}
  335.      *
  336.      * @param busta Object to be serialized
  337.      * @param prettyPrint if true output the XML with indenting
  338.      * @return Object to be serialized in byte array
  339.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  340.      */
  341.     public byte[] toByteArray(Busta busta,boolean prettyPrint) throws SerializerException {
  342.         return this.objToXml(Busta.class, busta, prettyPrint).toByteArray();
  343.     }
  344.    
  345.     /**
  346.      * Serialize to String the object <var>busta</var> of type {@link org.openspcoop2.pdd.monitor.Busta}
  347.      *
  348.      * @param busta Object to be serialized
  349.      * @return Object to be serialized as String
  350.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  351.      */
  352.     public String toString(Busta busta) throws SerializerException {
  353.         return this.objToXml(Busta.class, busta, false).toString();
  354.     }
  355.     /**
  356.      * Serialize to String the object <var>busta</var> of type {@link org.openspcoop2.pdd.monitor.Busta}
  357.      *
  358.      * @param busta Object to be serialized
  359.      * @param prettyPrint if true output the XML with indenting
  360.      * @return Object to be serialized as String
  361.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  362.      */
  363.     public String toString(Busta busta,boolean prettyPrint) throws SerializerException {
  364.         return this.objToXml(Busta.class, busta, prettyPrint).toString();
  365.     }
  366.    
  367.    
  368.    
  369.     /*
  370.      =================================================================================
  371.      Object: busta-servizio
  372.      =================================================================================
  373.     */
  374.    
  375.     /**
  376.      * Serialize to file system in <var>fileName</var> the object <var>bustaServizio</var> of type {@link org.openspcoop2.pdd.monitor.BustaServizio}
  377.      *
  378.      * @param fileName Xml file to serialize the object <var>bustaServizio</var>
  379.      * @param bustaServizio Object to be serialized in xml file <var>fileName</var>
  380.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  381.      */
  382.     public void write(String fileName,BustaServizio bustaServizio) throws SerializerException {
  383.         this.objToXml(fileName, BustaServizio.class, bustaServizio, false);
  384.     }
  385.     /**
  386.      * Serialize to file system in <var>fileName</var> the object <var>bustaServizio</var> of type {@link org.openspcoop2.pdd.monitor.BustaServizio}
  387.      *
  388.      * @param fileName Xml file to serialize the object <var>bustaServizio</var>
  389.      * @param bustaServizio Object to be serialized in xml file <var>fileName</var>
  390.      * @param prettyPrint if true output the XML with indenting
  391.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  392.      */
  393.     public void write(String fileName,BustaServizio bustaServizio,boolean prettyPrint) throws SerializerException {
  394.         this.objToXml(fileName, BustaServizio.class, bustaServizio, prettyPrint);
  395.     }
  396.    
  397.     /**
  398.      * Serialize to file system in <var>file</var> the object <var>bustaServizio</var> of type {@link org.openspcoop2.pdd.monitor.BustaServizio}
  399.      *
  400.      * @param file Xml file to serialize the object <var>bustaServizio</var>
  401.      * @param bustaServizio Object to be serialized in xml file <var>fileName</var>
  402.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  403.      */
  404.     public void write(File file,BustaServizio bustaServizio) throws SerializerException {
  405.         this.objToXml(file, BustaServizio.class, bustaServizio, false);
  406.     }
  407.     /**
  408.      * Serialize to file system in <var>file</var> the object <var>bustaServizio</var> of type {@link org.openspcoop2.pdd.monitor.BustaServizio}
  409.      *
  410.      * @param file Xml file to serialize the object <var>bustaServizio</var>
  411.      * @param bustaServizio Object to be serialized in xml file <var>fileName</var>
  412.      * @param prettyPrint if true output the XML with indenting
  413.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  414.      */
  415.     public void write(File file,BustaServizio bustaServizio,boolean prettyPrint) throws SerializerException {
  416.         this.objToXml(file, BustaServizio.class, bustaServizio, prettyPrint);
  417.     }
  418.    
  419.     /**
  420.      * Serialize to output stream <var>out</var> the object <var>bustaServizio</var> of type {@link org.openspcoop2.pdd.monitor.BustaServizio}
  421.      *
  422.      * @param out OutputStream to serialize the object <var>bustaServizio</var>
  423.      * @param bustaServizio Object to be serialized in xml file <var>fileName</var>
  424.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  425.      */
  426.     public void write(OutputStream out,BustaServizio bustaServizio) throws SerializerException {
  427.         this.objToXml(out, BustaServizio.class, bustaServizio, false);
  428.     }
  429.     /**
  430.      * Serialize to output stream <var>out</var> the object <var>bustaServizio</var> of type {@link org.openspcoop2.pdd.monitor.BustaServizio}
  431.      *
  432.      * @param out OutputStream to serialize the object <var>bustaServizio</var>
  433.      * @param bustaServizio Object to be serialized in xml file <var>fileName</var>
  434.      * @param prettyPrint if true output the XML with indenting
  435.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  436.      */
  437.     public void write(OutputStream out,BustaServizio bustaServizio,boolean prettyPrint) throws SerializerException {
  438.         this.objToXml(out, BustaServizio.class, bustaServizio, prettyPrint);
  439.     }
  440.            
  441.     /**
  442.      * Serialize to byte array the object <var>bustaServizio</var> of type {@link org.openspcoop2.pdd.monitor.BustaServizio}
  443.      *
  444.      * @param bustaServizio Object to be serialized
  445.      * @return Object to be serialized in byte array
  446.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  447.      */
  448.     public byte[] toByteArray(BustaServizio bustaServizio) throws SerializerException {
  449.         return this.objToXml(BustaServizio.class, bustaServizio, false).toByteArray();
  450.     }
  451.     /**
  452.      * Serialize to byte array the object <var>bustaServizio</var> of type {@link org.openspcoop2.pdd.monitor.BustaServizio}
  453.      *
  454.      * @param bustaServizio Object to be serialized
  455.      * @param prettyPrint if true output the XML with indenting
  456.      * @return Object to be serialized in byte array
  457.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  458.      */
  459.     public byte[] toByteArray(BustaServizio bustaServizio,boolean prettyPrint) throws SerializerException {
  460.         return this.objToXml(BustaServizio.class, bustaServizio, prettyPrint).toByteArray();
  461.     }
  462.    
  463.     /**
  464.      * Serialize to String the object <var>bustaServizio</var> of type {@link org.openspcoop2.pdd.monitor.BustaServizio}
  465.      *
  466.      * @param bustaServizio Object to be serialized
  467.      * @return Object to be serialized as String
  468.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  469.      */
  470.     public String toString(BustaServizio bustaServizio) throws SerializerException {
  471.         return this.objToXml(BustaServizio.class, bustaServizio, false).toString();
  472.     }
  473.     /**
  474.      * Serialize to String the object <var>bustaServizio</var> of type {@link org.openspcoop2.pdd.monitor.BustaServizio}
  475.      *
  476.      * @param bustaServizio Object to be serialized
  477.      * @param prettyPrint if true output the XML with indenting
  478.      * @return Object to be serialized as String
  479.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  480.      */
  481.     public String toString(BustaServizio bustaServizio,boolean prettyPrint) throws SerializerException {
  482.         return this.objToXml(BustaServizio.class, bustaServizio, prettyPrint).toString();
  483.     }
  484.    
  485.    
  486.    
  487.     /*
  488.      =================================================================================
  489.      Object: stato-pdd
  490.      =================================================================================
  491.     */
  492.    
  493.     /**
  494.      * Serialize to file system in <var>fileName</var> the object <var>statoPdd</var> of type {@link org.openspcoop2.pdd.monitor.StatoPdd}
  495.      *
  496.      * @param fileName Xml file to serialize the object <var>statoPdd</var>
  497.      * @param statoPdd Object to be serialized in xml file <var>fileName</var>
  498.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  499.      */
  500.     public void write(String fileName,StatoPdd statoPdd) throws SerializerException {
  501.         this.objToXml(fileName, StatoPdd.class, statoPdd, false);
  502.     }
  503.     /**
  504.      * Serialize to file system in <var>fileName</var> the object <var>statoPdd</var> of type {@link org.openspcoop2.pdd.monitor.StatoPdd}
  505.      *
  506.      * @param fileName Xml file to serialize the object <var>statoPdd</var>
  507.      * @param statoPdd Object to be serialized in xml file <var>fileName</var>
  508.      * @param prettyPrint if true output the XML with indenting
  509.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  510.      */
  511.     public void write(String fileName,StatoPdd statoPdd,boolean prettyPrint) throws SerializerException {
  512.         this.objToXml(fileName, StatoPdd.class, statoPdd, prettyPrint);
  513.     }
  514.    
  515.     /**
  516.      * Serialize to file system in <var>file</var> the object <var>statoPdd</var> of type {@link org.openspcoop2.pdd.monitor.StatoPdd}
  517.      *
  518.      * @param file Xml file to serialize the object <var>statoPdd</var>
  519.      * @param statoPdd Object to be serialized in xml file <var>fileName</var>
  520.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  521.      */
  522.     public void write(File file,StatoPdd statoPdd) throws SerializerException {
  523.         this.objToXml(file, StatoPdd.class, statoPdd, false);
  524.     }
  525.     /**
  526.      * Serialize to file system in <var>file</var> the object <var>statoPdd</var> of type {@link org.openspcoop2.pdd.monitor.StatoPdd}
  527.      *
  528.      * @param file Xml file to serialize the object <var>statoPdd</var>
  529.      * @param statoPdd Object to be serialized in xml file <var>fileName</var>
  530.      * @param prettyPrint if true output the XML with indenting
  531.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  532.      */
  533.     public void write(File file,StatoPdd statoPdd,boolean prettyPrint) throws SerializerException {
  534.         this.objToXml(file, StatoPdd.class, statoPdd, prettyPrint);
  535.     }
  536.    
  537.     /**
  538.      * Serialize to output stream <var>out</var> the object <var>statoPdd</var> of type {@link org.openspcoop2.pdd.monitor.StatoPdd}
  539.      *
  540.      * @param out OutputStream to serialize the object <var>statoPdd</var>
  541.      * @param statoPdd Object to be serialized in xml file <var>fileName</var>
  542.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  543.      */
  544.     public void write(OutputStream out,StatoPdd statoPdd) throws SerializerException {
  545.         this.objToXml(out, StatoPdd.class, statoPdd, false);
  546.     }
  547.     /**
  548.      * Serialize to output stream <var>out</var> the object <var>statoPdd</var> of type {@link org.openspcoop2.pdd.monitor.StatoPdd}
  549.      *
  550.      * @param out OutputStream to serialize the object <var>statoPdd</var>
  551.      * @param statoPdd Object to be serialized in xml file <var>fileName</var>
  552.      * @param prettyPrint if true output the XML with indenting
  553.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  554.      */
  555.     public void write(OutputStream out,StatoPdd statoPdd,boolean prettyPrint) throws SerializerException {
  556.         this.objToXml(out, StatoPdd.class, statoPdd, prettyPrint);
  557.     }
  558.            
  559.     /**
  560.      * Serialize to byte array the object <var>statoPdd</var> of type {@link org.openspcoop2.pdd.monitor.StatoPdd}
  561.      *
  562.      * @param statoPdd Object to be serialized
  563.      * @return Object to be serialized in byte array
  564.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  565.      */
  566.     public byte[] toByteArray(StatoPdd statoPdd) throws SerializerException {
  567.         return this.objToXml(StatoPdd.class, statoPdd, false).toByteArray();
  568.     }
  569.     /**
  570.      * Serialize to byte array the object <var>statoPdd</var> of type {@link org.openspcoop2.pdd.monitor.StatoPdd}
  571.      *
  572.      * @param statoPdd Object to be serialized
  573.      * @param prettyPrint if true output the XML with indenting
  574.      * @return Object to be serialized in byte array
  575.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  576.      */
  577.     public byte[] toByteArray(StatoPdd statoPdd,boolean prettyPrint) throws SerializerException {
  578.         return this.objToXml(StatoPdd.class, statoPdd, prettyPrint).toByteArray();
  579.     }
  580.    
  581.     /**
  582.      * Serialize to String the object <var>statoPdd</var> of type {@link org.openspcoop2.pdd.monitor.StatoPdd}
  583.      *
  584.      * @param statoPdd Object to be serialized
  585.      * @return Object to be serialized as String
  586.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  587.      */
  588.     public String toString(StatoPdd statoPdd) throws SerializerException {
  589.         return this.objToXml(StatoPdd.class, statoPdd, false).toString();
  590.     }
  591.     /**
  592.      * Serialize to String the object <var>statoPdd</var> of type {@link org.openspcoop2.pdd.monitor.StatoPdd}
  593.      *
  594.      * @param statoPdd Object to be serialized
  595.      * @param prettyPrint if true output the XML with indenting
  596.      * @return Object to be serialized as String
  597.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  598.      */
  599.     public String toString(StatoPdd statoPdd,boolean prettyPrint) throws SerializerException {
  600.         return this.objToXml(StatoPdd.class, statoPdd, prettyPrint).toString();
  601.     }
  602.    
  603.    
  604.    
  605.     /*
  606.      =================================================================================
  607.      Object: openspcoop2
  608.      =================================================================================
  609.     */
  610.    
  611.     /**
  612.      * Serialize to file system in <var>fileName</var> the object <var>openspcoop2</var> of type {@link org.openspcoop2.pdd.monitor.Openspcoop2}
  613.      *
  614.      * @param fileName Xml file to serialize the object <var>openspcoop2</var>
  615.      * @param openspcoop2 Object to be serialized in xml file <var>fileName</var>
  616.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  617.      */
  618.     public void write(String fileName,Openspcoop2 openspcoop2) throws SerializerException {
  619.         this.objToXml(fileName, Openspcoop2.class, openspcoop2, false);
  620.     }
  621.     /**
  622.      * Serialize to file system in <var>fileName</var> the object <var>openspcoop2</var> of type {@link org.openspcoop2.pdd.monitor.Openspcoop2}
  623.      *
  624.      * @param fileName Xml file to serialize the object <var>openspcoop2</var>
  625.      * @param openspcoop2 Object to be serialized in xml file <var>fileName</var>
  626.      * @param prettyPrint if true output the XML with indenting
  627.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  628.      */
  629.     public void write(String fileName,Openspcoop2 openspcoop2,boolean prettyPrint) throws SerializerException {
  630.         this.objToXml(fileName, Openspcoop2.class, openspcoop2, prettyPrint);
  631.     }
  632.    
  633.     /**
  634.      * Serialize to file system in <var>file</var> the object <var>openspcoop2</var> of type {@link org.openspcoop2.pdd.monitor.Openspcoop2}
  635.      *
  636.      * @param file Xml file to serialize the object <var>openspcoop2</var>
  637.      * @param openspcoop2 Object to be serialized in xml file <var>fileName</var>
  638.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  639.      */
  640.     public void write(File file,Openspcoop2 openspcoop2) throws SerializerException {
  641.         this.objToXml(file, Openspcoop2.class, openspcoop2, false);
  642.     }
  643.     /**
  644.      * Serialize to file system in <var>file</var> the object <var>openspcoop2</var> of type {@link org.openspcoop2.pdd.monitor.Openspcoop2}
  645.      *
  646.      * @param file Xml file to serialize the object <var>openspcoop2</var>
  647.      * @param openspcoop2 Object to be serialized in xml file <var>fileName</var>
  648.      * @param prettyPrint if true output the XML with indenting
  649.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  650.      */
  651.     public void write(File file,Openspcoop2 openspcoop2,boolean prettyPrint) throws SerializerException {
  652.         this.objToXml(file, Openspcoop2.class, openspcoop2, prettyPrint);
  653.     }
  654.    
  655.     /**
  656.      * Serialize to output stream <var>out</var> the object <var>openspcoop2</var> of type {@link org.openspcoop2.pdd.monitor.Openspcoop2}
  657.      *
  658.      * @param out OutputStream to serialize the object <var>openspcoop2</var>
  659.      * @param openspcoop2 Object to be serialized in xml file <var>fileName</var>
  660.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  661.      */
  662.     public void write(OutputStream out,Openspcoop2 openspcoop2) throws SerializerException {
  663.         this.objToXml(out, Openspcoop2.class, openspcoop2, false);
  664.     }
  665.     /**
  666.      * Serialize to output stream <var>out</var> the object <var>openspcoop2</var> of type {@link org.openspcoop2.pdd.monitor.Openspcoop2}
  667.      *
  668.      * @param out OutputStream to serialize the object <var>openspcoop2</var>
  669.      * @param openspcoop2 Object to be serialized in xml file <var>fileName</var>
  670.      * @param prettyPrint if true output the XML with indenting
  671.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  672.      */
  673.     public void write(OutputStream out,Openspcoop2 openspcoop2,boolean prettyPrint) throws SerializerException {
  674.         this.objToXml(out, Openspcoop2.class, openspcoop2, prettyPrint);
  675.     }
  676.            
  677.     /**
  678.      * Serialize to byte array the object <var>openspcoop2</var> of type {@link org.openspcoop2.pdd.monitor.Openspcoop2}
  679.      *
  680.      * @param openspcoop2 Object to be serialized
  681.      * @return Object to be serialized in byte array
  682.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  683.      */
  684.     public byte[] toByteArray(Openspcoop2 openspcoop2) throws SerializerException {
  685.         return this.objToXml(Openspcoop2.class, openspcoop2, false).toByteArray();
  686.     }
  687.     /**
  688.      * Serialize to byte array the object <var>openspcoop2</var> of type {@link org.openspcoop2.pdd.monitor.Openspcoop2}
  689.      *
  690.      * @param openspcoop2 Object to be serialized
  691.      * @param prettyPrint if true output the XML with indenting
  692.      * @return Object to be serialized in byte array
  693.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  694.      */
  695.     public byte[] toByteArray(Openspcoop2 openspcoop2,boolean prettyPrint) throws SerializerException {
  696.         return this.objToXml(Openspcoop2.class, openspcoop2, prettyPrint).toByteArray();
  697.     }
  698.    
  699.     /**
  700.      * Serialize to String the object <var>openspcoop2</var> of type {@link org.openspcoop2.pdd.monitor.Openspcoop2}
  701.      *
  702.      * @param openspcoop2 Object to be serialized
  703.      * @return Object to be serialized as String
  704.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  705.      */
  706.     public String toString(Openspcoop2 openspcoop2) throws SerializerException {
  707.         return this.objToXml(Openspcoop2.class, openspcoop2, false).toString();
  708.     }
  709.     /**
  710.      * Serialize to String the object <var>openspcoop2</var> of type {@link org.openspcoop2.pdd.monitor.Openspcoop2}
  711.      *
  712.      * @param openspcoop2 Object to be serialized
  713.      * @param prettyPrint if true output the XML with indenting
  714.      * @return Object to be serialized as String
  715.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  716.      */
  717.     public String toString(Openspcoop2 openspcoop2,boolean prettyPrint) throws SerializerException {
  718.         return this.objToXml(Openspcoop2.class, openspcoop2, prettyPrint).toString();
  719.     }
  720.    
  721.    
  722.    
  723.     /*
  724.      =================================================================================
  725.      Object: messaggio
  726.      =================================================================================
  727.     */
  728.    
  729.     /**
  730.      * Serialize to file system in <var>fileName</var> the object <var>messaggio</var> of type {@link org.openspcoop2.pdd.monitor.Messaggio}
  731.      *
  732.      * @param fileName Xml file to serialize the object <var>messaggio</var>
  733.      * @param messaggio Object to be serialized in xml file <var>fileName</var>
  734.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  735.      */
  736.     public void write(String fileName,Messaggio messaggio) throws SerializerException {
  737.         this.objToXml(fileName, Messaggio.class, messaggio, false);
  738.     }
  739.     /**
  740.      * Serialize to file system in <var>fileName</var> the object <var>messaggio</var> of type {@link org.openspcoop2.pdd.monitor.Messaggio}
  741.      *
  742.      * @param fileName Xml file to serialize the object <var>messaggio</var>
  743.      * @param messaggio Object to be serialized in xml file <var>fileName</var>
  744.      * @param prettyPrint if true output the XML with indenting
  745.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  746.      */
  747.     public void write(String fileName,Messaggio messaggio,boolean prettyPrint) throws SerializerException {
  748.         this.objToXml(fileName, Messaggio.class, messaggio, prettyPrint);
  749.     }
  750.    
  751.     /**
  752.      * Serialize to file system in <var>file</var> the object <var>messaggio</var> of type {@link org.openspcoop2.pdd.monitor.Messaggio}
  753.      *
  754.      * @param file Xml file to serialize the object <var>messaggio</var>
  755.      * @param messaggio Object to be serialized in xml file <var>fileName</var>
  756.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  757.      */
  758.     public void write(File file,Messaggio messaggio) throws SerializerException {
  759.         this.objToXml(file, Messaggio.class, messaggio, false);
  760.     }
  761.     /**
  762.      * Serialize to file system in <var>file</var> the object <var>messaggio</var> of type {@link org.openspcoop2.pdd.monitor.Messaggio}
  763.      *
  764.      * @param file Xml file to serialize the object <var>messaggio</var>
  765.      * @param messaggio Object to be serialized in xml file <var>fileName</var>
  766.      * @param prettyPrint if true output the XML with indenting
  767.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  768.      */
  769.     public void write(File file,Messaggio messaggio,boolean prettyPrint) throws SerializerException {
  770.         this.objToXml(file, Messaggio.class, messaggio, prettyPrint);
  771.     }
  772.    
  773.     /**
  774.      * Serialize to output stream <var>out</var> the object <var>messaggio</var> of type {@link org.openspcoop2.pdd.monitor.Messaggio}
  775.      *
  776.      * @param out OutputStream to serialize the object <var>messaggio</var>
  777.      * @param messaggio Object to be serialized in xml file <var>fileName</var>
  778.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  779.      */
  780.     public void write(OutputStream out,Messaggio messaggio) throws SerializerException {
  781.         this.objToXml(out, Messaggio.class, messaggio, false);
  782.     }
  783.     /**
  784.      * Serialize to output stream <var>out</var> the object <var>messaggio</var> of type {@link org.openspcoop2.pdd.monitor.Messaggio}
  785.      *
  786.      * @param out OutputStream to serialize the object <var>messaggio</var>
  787.      * @param messaggio Object to be serialized in xml file <var>fileName</var>
  788.      * @param prettyPrint if true output the XML with indenting
  789.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  790.      */
  791.     public void write(OutputStream out,Messaggio messaggio,boolean prettyPrint) throws SerializerException {
  792.         this.objToXml(out, Messaggio.class, messaggio, prettyPrint);
  793.     }
  794.            
  795.     /**
  796.      * Serialize to byte array the object <var>messaggio</var> of type {@link org.openspcoop2.pdd.monitor.Messaggio}
  797.      *
  798.      * @param messaggio Object to be serialized
  799.      * @return Object to be serialized in byte array
  800.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  801.      */
  802.     public byte[] toByteArray(Messaggio messaggio) throws SerializerException {
  803.         return this.objToXml(Messaggio.class, messaggio, false).toByteArray();
  804.     }
  805.     /**
  806.      * Serialize to byte array the object <var>messaggio</var> of type {@link org.openspcoop2.pdd.monitor.Messaggio}
  807.      *
  808.      * @param messaggio Object to be serialized
  809.      * @param prettyPrint if true output the XML with indenting
  810.      * @return Object to be serialized in byte array
  811.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  812.      */
  813.     public byte[] toByteArray(Messaggio messaggio,boolean prettyPrint) throws SerializerException {
  814.         return this.objToXml(Messaggio.class, messaggio, prettyPrint).toByteArray();
  815.     }
  816.    
  817.     /**
  818.      * Serialize to String the object <var>messaggio</var> of type {@link org.openspcoop2.pdd.monitor.Messaggio}
  819.      *
  820.      * @param messaggio Object to be serialized
  821.      * @return Object to be serialized as String
  822.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  823.      */
  824.     public String toString(Messaggio messaggio) throws SerializerException {
  825.         return this.objToXml(Messaggio.class, messaggio, false).toString();
  826.     }
  827.     /**
  828.      * Serialize to String the object <var>messaggio</var> of type {@link org.openspcoop2.pdd.monitor.Messaggio}
  829.      *
  830.      * @param messaggio Object to be serialized
  831.      * @param prettyPrint if true output the XML with indenting
  832.      * @return Object to be serialized as String
  833.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  834.      */
  835.     public String toString(Messaggio messaggio,boolean prettyPrint) throws SerializerException {
  836.         return this.objToXml(Messaggio.class, messaggio, prettyPrint).toString();
  837.     }
  838.    
  839.    
  840.    
  841.     /*
  842.      =================================================================================
  843.      Object: servizio-applicativo-consegna
  844.      =================================================================================
  845.     */
  846.    
  847.     /**
  848.      * Serialize to file system in <var>fileName</var> the object <var>servizioApplicativoConsegna</var> of type {@link org.openspcoop2.pdd.monitor.ServizioApplicativoConsegna}
  849.      *
  850.      * @param fileName Xml file to serialize the object <var>servizioApplicativoConsegna</var>
  851.      * @param servizioApplicativoConsegna Object to be serialized in xml file <var>fileName</var>
  852.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  853.      */
  854.     public void write(String fileName,ServizioApplicativoConsegna servizioApplicativoConsegna) throws SerializerException {
  855.         this.objToXml(fileName, ServizioApplicativoConsegna.class, servizioApplicativoConsegna, false);
  856.     }
  857.     /**
  858.      * Serialize to file system in <var>fileName</var> the object <var>servizioApplicativoConsegna</var> of type {@link org.openspcoop2.pdd.monitor.ServizioApplicativoConsegna}
  859.      *
  860.      * @param fileName Xml file to serialize the object <var>servizioApplicativoConsegna</var>
  861.      * @param servizioApplicativoConsegna Object to be serialized in xml file <var>fileName</var>
  862.      * @param prettyPrint if true output the XML with indenting
  863.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  864.      */
  865.     public void write(String fileName,ServizioApplicativoConsegna servizioApplicativoConsegna,boolean prettyPrint) throws SerializerException {
  866.         this.objToXml(fileName, ServizioApplicativoConsegna.class, servizioApplicativoConsegna, prettyPrint);
  867.     }
  868.    
  869.     /**
  870.      * Serialize to file system in <var>file</var> the object <var>servizioApplicativoConsegna</var> of type {@link org.openspcoop2.pdd.monitor.ServizioApplicativoConsegna}
  871.      *
  872.      * @param file Xml file to serialize the object <var>servizioApplicativoConsegna</var>
  873.      * @param servizioApplicativoConsegna Object to be serialized in xml file <var>fileName</var>
  874.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  875.      */
  876.     public void write(File file,ServizioApplicativoConsegna servizioApplicativoConsegna) throws SerializerException {
  877.         this.objToXml(file, ServizioApplicativoConsegna.class, servizioApplicativoConsegna, false);
  878.     }
  879.     /**
  880.      * Serialize to file system in <var>file</var> the object <var>servizioApplicativoConsegna</var> of type {@link org.openspcoop2.pdd.monitor.ServizioApplicativoConsegna}
  881.      *
  882.      * @param file Xml file to serialize the object <var>servizioApplicativoConsegna</var>
  883.      * @param servizioApplicativoConsegna Object to be serialized in xml file <var>fileName</var>
  884.      * @param prettyPrint if true output the XML with indenting
  885.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  886.      */
  887.     public void write(File file,ServizioApplicativoConsegna servizioApplicativoConsegna,boolean prettyPrint) throws SerializerException {
  888.         this.objToXml(file, ServizioApplicativoConsegna.class, servizioApplicativoConsegna, prettyPrint);
  889.     }
  890.    
  891.     /**
  892.      * Serialize to output stream <var>out</var> the object <var>servizioApplicativoConsegna</var> of type {@link org.openspcoop2.pdd.monitor.ServizioApplicativoConsegna}
  893.      *
  894.      * @param out OutputStream to serialize the object <var>servizioApplicativoConsegna</var>
  895.      * @param servizioApplicativoConsegna Object to be serialized in xml file <var>fileName</var>
  896.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  897.      */
  898.     public void write(OutputStream out,ServizioApplicativoConsegna servizioApplicativoConsegna) throws SerializerException {
  899.         this.objToXml(out, ServizioApplicativoConsegna.class, servizioApplicativoConsegna, false);
  900.     }
  901.     /**
  902.      * Serialize to output stream <var>out</var> the object <var>servizioApplicativoConsegna</var> of type {@link org.openspcoop2.pdd.monitor.ServizioApplicativoConsegna}
  903.      *
  904.      * @param out OutputStream to serialize the object <var>servizioApplicativoConsegna</var>
  905.      * @param servizioApplicativoConsegna Object to be serialized in xml file <var>fileName</var>
  906.      * @param prettyPrint if true output the XML with indenting
  907.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  908.      */
  909.     public void write(OutputStream out,ServizioApplicativoConsegna servizioApplicativoConsegna,boolean prettyPrint) throws SerializerException {
  910.         this.objToXml(out, ServizioApplicativoConsegna.class, servizioApplicativoConsegna, prettyPrint);
  911.     }
  912.            
  913.     /**
  914.      * Serialize to byte array the object <var>servizioApplicativoConsegna</var> of type {@link org.openspcoop2.pdd.monitor.ServizioApplicativoConsegna}
  915.      *
  916.      * @param servizioApplicativoConsegna Object to be serialized
  917.      * @return Object to be serialized in byte array
  918.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  919.      */
  920.     public byte[] toByteArray(ServizioApplicativoConsegna servizioApplicativoConsegna) throws SerializerException {
  921.         return this.objToXml(ServizioApplicativoConsegna.class, servizioApplicativoConsegna, false).toByteArray();
  922.     }
  923.     /**
  924.      * Serialize to byte array the object <var>servizioApplicativoConsegna</var> of type {@link org.openspcoop2.pdd.monitor.ServizioApplicativoConsegna}
  925.      *
  926.      * @param servizioApplicativoConsegna Object to be serialized
  927.      * @param prettyPrint if true output the XML with indenting
  928.      * @return Object to be serialized in byte array
  929.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  930.      */
  931.     public byte[] toByteArray(ServizioApplicativoConsegna servizioApplicativoConsegna,boolean prettyPrint) throws SerializerException {
  932.         return this.objToXml(ServizioApplicativoConsegna.class, servizioApplicativoConsegna, prettyPrint).toByteArray();
  933.     }
  934.    
  935.     /**
  936.      * Serialize to String the object <var>servizioApplicativoConsegna</var> of type {@link org.openspcoop2.pdd.monitor.ServizioApplicativoConsegna}
  937.      *
  938.      * @param servizioApplicativoConsegna Object to be serialized
  939.      * @return Object to be serialized as String
  940.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  941.      */
  942.     public String toString(ServizioApplicativoConsegna servizioApplicativoConsegna) throws SerializerException {
  943.         return this.objToXml(ServizioApplicativoConsegna.class, servizioApplicativoConsegna, false).toString();
  944.     }
  945.     /**
  946.      * Serialize to String the object <var>servizioApplicativoConsegna</var> of type {@link org.openspcoop2.pdd.monitor.ServizioApplicativoConsegna}
  947.      *
  948.      * @param servizioApplicativoConsegna Object to be serialized
  949.      * @param prettyPrint if true output the XML with indenting
  950.      * @return Object to be serialized as String
  951.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  952.      */
  953.     public String toString(ServizioApplicativoConsegna servizioApplicativoConsegna,boolean prettyPrint) throws SerializerException {
  954.         return this.objToXml(ServizioApplicativoConsegna.class, servizioApplicativoConsegna, prettyPrint).toString();
  955.     }
  956.    
  957.    
  958.    
  959.     /*
  960.      =================================================================================
  961.      Object: dettaglio
  962.      =================================================================================
  963.     */
  964.    
  965.     /**
  966.      * Serialize to file system in <var>fileName</var> the object <var>dettaglio</var> of type {@link org.openspcoop2.pdd.monitor.Dettaglio}
  967.      *
  968.      * @param fileName Xml file to serialize the object <var>dettaglio</var>
  969.      * @param dettaglio Object to be serialized in xml file <var>fileName</var>
  970.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  971.      */
  972.     public void write(String fileName,Dettaglio dettaglio) throws SerializerException {
  973.         this.objToXml(fileName, Dettaglio.class, dettaglio, false);
  974.     }
  975.     /**
  976.      * Serialize to file system in <var>fileName</var> the object <var>dettaglio</var> of type {@link org.openspcoop2.pdd.monitor.Dettaglio}
  977.      *
  978.      * @param fileName Xml file to serialize the object <var>dettaglio</var>
  979.      * @param dettaglio Object to be serialized in xml file <var>fileName</var>
  980.      * @param prettyPrint if true output the XML with indenting
  981.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  982.      */
  983.     public void write(String fileName,Dettaglio dettaglio,boolean prettyPrint) throws SerializerException {
  984.         this.objToXml(fileName, Dettaglio.class, dettaglio, prettyPrint);
  985.     }
  986.    
  987.     /**
  988.      * Serialize to file system in <var>file</var> the object <var>dettaglio</var> of type {@link org.openspcoop2.pdd.monitor.Dettaglio}
  989.      *
  990.      * @param file Xml file to serialize the object <var>dettaglio</var>
  991.      * @param dettaglio Object to be serialized in xml file <var>fileName</var>
  992.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  993.      */
  994.     public void write(File file,Dettaglio dettaglio) throws SerializerException {
  995.         this.objToXml(file, Dettaglio.class, dettaglio, false);
  996.     }
  997.     /**
  998.      * Serialize to file system in <var>file</var> the object <var>dettaglio</var> of type {@link org.openspcoop2.pdd.monitor.Dettaglio}
  999.      *
  1000.      * @param file Xml file to serialize the object <var>dettaglio</var>
  1001.      * @param dettaglio Object to be serialized in xml file <var>fileName</var>
  1002.      * @param prettyPrint if true output the XML with indenting
  1003.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1004.      */
  1005.     public void write(File file,Dettaglio dettaglio,boolean prettyPrint) throws SerializerException {
  1006.         this.objToXml(file, Dettaglio.class, dettaglio, prettyPrint);
  1007.     }
  1008.    
  1009.     /**
  1010.      * Serialize to output stream <var>out</var> the object <var>dettaglio</var> of type {@link org.openspcoop2.pdd.monitor.Dettaglio}
  1011.      *
  1012.      * @param out OutputStream to serialize the object <var>dettaglio</var>
  1013.      * @param dettaglio Object to be serialized in xml file <var>fileName</var>
  1014.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1015.      */
  1016.     public void write(OutputStream out,Dettaglio dettaglio) throws SerializerException {
  1017.         this.objToXml(out, Dettaglio.class, dettaglio, false);
  1018.     }
  1019.     /**
  1020.      * Serialize to output stream <var>out</var> the object <var>dettaglio</var> of type {@link org.openspcoop2.pdd.monitor.Dettaglio}
  1021.      *
  1022.      * @param out OutputStream to serialize the object <var>dettaglio</var>
  1023.      * @param dettaglio Object to be serialized in xml file <var>fileName</var>
  1024.      * @param prettyPrint if true output the XML with indenting
  1025.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1026.      */
  1027.     public void write(OutputStream out,Dettaglio dettaglio,boolean prettyPrint) throws SerializerException {
  1028.         this.objToXml(out, Dettaglio.class, dettaglio, prettyPrint);
  1029.     }
  1030.            
  1031.     /**
  1032.      * Serialize to byte array the object <var>dettaglio</var> of type {@link org.openspcoop2.pdd.monitor.Dettaglio}
  1033.      *
  1034.      * @param dettaglio Object to be serialized
  1035.      * @return Object to be serialized in byte array
  1036.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1037.      */
  1038.     public byte[] toByteArray(Dettaglio dettaglio) throws SerializerException {
  1039.         return this.objToXml(Dettaglio.class, dettaglio, false).toByteArray();
  1040.     }
  1041.     /**
  1042.      * Serialize to byte array the object <var>dettaglio</var> of type {@link org.openspcoop2.pdd.monitor.Dettaglio}
  1043.      *
  1044.      * @param dettaglio Object to be serialized
  1045.      * @param prettyPrint if true output the XML with indenting
  1046.      * @return Object to be serialized in byte array
  1047.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1048.      */
  1049.     public byte[] toByteArray(Dettaglio dettaglio,boolean prettyPrint) throws SerializerException {
  1050.         return this.objToXml(Dettaglio.class, dettaglio, prettyPrint).toByteArray();
  1051.     }
  1052.    
  1053.     /**
  1054.      * Serialize to String the object <var>dettaglio</var> of type {@link org.openspcoop2.pdd.monitor.Dettaglio}
  1055.      *
  1056.      * @param dettaglio Object to be serialized
  1057.      * @return Object to be serialized as String
  1058.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1059.      */
  1060.     public String toString(Dettaglio dettaglio) throws SerializerException {
  1061.         return this.objToXml(Dettaglio.class, dettaglio, false).toString();
  1062.     }
  1063.     /**
  1064.      * Serialize to String the object <var>dettaglio</var> of type {@link org.openspcoop2.pdd.monitor.Dettaglio}
  1065.      *
  1066.      * @param dettaglio Object to be serialized
  1067.      * @param prettyPrint if true output the XML with indenting
  1068.      * @return Object to be serialized as String
  1069.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1070.      */
  1071.     public String toString(Dettaglio dettaglio,boolean prettyPrint) throws SerializerException {
  1072.         return this.objToXml(Dettaglio.class, dettaglio, prettyPrint).toString();
  1073.     }
  1074.    
  1075.    
  1076.    
  1077.     /*
  1078.      =================================================================================
  1079.      Object: filtro
  1080.      =================================================================================
  1081.     */
  1082.    
  1083.     /**
  1084.      * Serialize to file system in <var>fileName</var> the object <var>filtro</var> of type {@link org.openspcoop2.pdd.monitor.Filtro}
  1085.      *
  1086.      * @param fileName Xml file to serialize the object <var>filtro</var>
  1087.      * @param filtro Object to be serialized in xml file <var>fileName</var>
  1088.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1089.      */
  1090.     public void write(String fileName,Filtro filtro) throws SerializerException {
  1091.         this.objToXml(fileName, Filtro.class, filtro, false);
  1092.     }
  1093.     /**
  1094.      * Serialize to file system in <var>fileName</var> the object <var>filtro</var> of type {@link org.openspcoop2.pdd.monitor.Filtro}
  1095.      *
  1096.      * @param fileName Xml file to serialize the object <var>filtro</var>
  1097.      * @param filtro Object to be serialized in xml file <var>fileName</var>
  1098.      * @param prettyPrint if true output the XML with indenting
  1099.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1100.      */
  1101.     public void write(String fileName,Filtro filtro,boolean prettyPrint) throws SerializerException {
  1102.         this.objToXml(fileName, Filtro.class, filtro, prettyPrint);
  1103.     }
  1104.    
  1105.     /**
  1106.      * Serialize to file system in <var>file</var> the object <var>filtro</var> of type {@link org.openspcoop2.pdd.monitor.Filtro}
  1107.      *
  1108.      * @param file Xml file to serialize the object <var>filtro</var>
  1109.      * @param filtro Object to be serialized in xml file <var>fileName</var>
  1110.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1111.      */
  1112.     public void write(File file,Filtro filtro) throws SerializerException {
  1113.         this.objToXml(file, Filtro.class, filtro, false);
  1114.     }
  1115.     /**
  1116.      * Serialize to file system in <var>file</var> the object <var>filtro</var> of type {@link org.openspcoop2.pdd.monitor.Filtro}
  1117.      *
  1118.      * @param file Xml file to serialize the object <var>filtro</var>
  1119.      * @param filtro Object to be serialized in xml file <var>fileName</var>
  1120.      * @param prettyPrint if true output the XML with indenting
  1121.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1122.      */
  1123.     public void write(File file,Filtro filtro,boolean prettyPrint) throws SerializerException {
  1124.         this.objToXml(file, Filtro.class, filtro, prettyPrint);
  1125.     }
  1126.    
  1127.     /**
  1128.      * Serialize to output stream <var>out</var> the object <var>filtro</var> of type {@link org.openspcoop2.pdd.monitor.Filtro}
  1129.      *
  1130.      * @param out OutputStream to serialize the object <var>filtro</var>
  1131.      * @param filtro Object to be serialized in xml file <var>fileName</var>
  1132.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1133.      */
  1134.     public void write(OutputStream out,Filtro filtro) throws SerializerException {
  1135.         this.objToXml(out, Filtro.class, filtro, false);
  1136.     }
  1137.     /**
  1138.      * Serialize to output stream <var>out</var> the object <var>filtro</var> of type {@link org.openspcoop2.pdd.monitor.Filtro}
  1139.      *
  1140.      * @param out OutputStream to serialize the object <var>filtro</var>
  1141.      * @param filtro Object to be serialized in xml file <var>fileName</var>
  1142.      * @param prettyPrint if true output the XML with indenting
  1143.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1144.      */
  1145.     public void write(OutputStream out,Filtro filtro,boolean prettyPrint) throws SerializerException {
  1146.         this.objToXml(out, Filtro.class, filtro, prettyPrint);
  1147.     }
  1148.            
  1149.     /**
  1150.      * Serialize to byte array the object <var>filtro</var> of type {@link org.openspcoop2.pdd.monitor.Filtro}
  1151.      *
  1152.      * @param filtro Object to be serialized
  1153.      * @return Object to be serialized in byte array
  1154.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1155.      */
  1156.     public byte[] toByteArray(Filtro filtro) throws SerializerException {
  1157.         return this.objToXml(Filtro.class, filtro, false).toByteArray();
  1158.     }
  1159.     /**
  1160.      * Serialize to byte array the object <var>filtro</var> of type {@link org.openspcoop2.pdd.monitor.Filtro}
  1161.      *
  1162.      * @param filtro Object to be serialized
  1163.      * @param prettyPrint if true output the XML with indenting
  1164.      * @return Object to be serialized in byte array
  1165.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1166.      */
  1167.     public byte[] toByteArray(Filtro filtro,boolean prettyPrint) throws SerializerException {
  1168.         return this.objToXml(Filtro.class, filtro, prettyPrint).toByteArray();
  1169.     }
  1170.    
  1171.     /**
  1172.      * Serialize to String the object <var>filtro</var> of type {@link org.openspcoop2.pdd.monitor.Filtro}
  1173.      *
  1174.      * @param filtro Object to be serialized
  1175.      * @return Object to be serialized as String
  1176.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1177.      */
  1178.     public String toString(Filtro filtro) throws SerializerException {
  1179.         return this.objToXml(Filtro.class, filtro, false).toString();
  1180.     }
  1181.     /**
  1182.      * Serialize to String the object <var>filtro</var> of type {@link org.openspcoop2.pdd.monitor.Filtro}
  1183.      *
  1184.      * @param filtro Object to be serialized
  1185.      * @param prettyPrint if true output the XML with indenting
  1186.      * @return Object to be serialized as String
  1187.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1188.      */
  1189.     public String toString(Filtro filtro,boolean prettyPrint) throws SerializerException {
  1190.         return this.objToXml(Filtro.class, filtro, prettyPrint).toString();
  1191.     }
  1192.    
  1193.    
  1194.    
  1195.     /*
  1196.      =================================================================================
  1197.      Object: proprieta
  1198.      =================================================================================
  1199.     */
  1200.    
  1201.     /**
  1202.      * Serialize to file system in <var>fileName</var> the object <var>proprieta</var> of type {@link org.openspcoop2.pdd.monitor.Proprieta}
  1203.      *
  1204.      * @param fileName Xml file to serialize the object <var>proprieta</var>
  1205.      * @param proprieta Object to be serialized in xml file <var>fileName</var>
  1206.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1207.      */
  1208.     public void write(String fileName,Proprieta proprieta) throws SerializerException {
  1209.         this.objToXml(fileName, Proprieta.class, proprieta, false);
  1210.     }
  1211.     /**
  1212.      * Serialize to file system in <var>fileName</var> the object <var>proprieta</var> of type {@link org.openspcoop2.pdd.monitor.Proprieta}
  1213.      *
  1214.      * @param fileName Xml file to serialize the object <var>proprieta</var>
  1215.      * @param proprieta Object to be serialized in xml file <var>fileName</var>
  1216.      * @param prettyPrint if true output the XML with indenting
  1217.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1218.      */
  1219.     public void write(String fileName,Proprieta proprieta,boolean prettyPrint) throws SerializerException {
  1220.         this.objToXml(fileName, Proprieta.class, proprieta, prettyPrint);
  1221.     }
  1222.    
  1223.     /**
  1224.      * Serialize to file system in <var>file</var> the object <var>proprieta</var> of type {@link org.openspcoop2.pdd.monitor.Proprieta}
  1225.      *
  1226.      * @param file Xml file to serialize the object <var>proprieta</var>
  1227.      * @param proprieta Object to be serialized in xml file <var>fileName</var>
  1228.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1229.      */
  1230.     public void write(File file,Proprieta proprieta) throws SerializerException {
  1231.         this.objToXml(file, Proprieta.class, proprieta, false);
  1232.     }
  1233.     /**
  1234.      * Serialize to file system in <var>file</var> the object <var>proprieta</var> of type {@link org.openspcoop2.pdd.monitor.Proprieta}
  1235.      *
  1236.      * @param file Xml file to serialize the object <var>proprieta</var>
  1237.      * @param proprieta Object to be serialized in xml file <var>fileName</var>
  1238.      * @param prettyPrint if true output the XML with indenting
  1239.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1240.      */
  1241.     public void write(File file,Proprieta proprieta,boolean prettyPrint) throws SerializerException {
  1242.         this.objToXml(file, Proprieta.class, proprieta, prettyPrint);
  1243.     }
  1244.    
  1245.     /**
  1246.      * Serialize to output stream <var>out</var> the object <var>proprieta</var> of type {@link org.openspcoop2.pdd.monitor.Proprieta}
  1247.      *
  1248.      * @param out OutputStream to serialize the object <var>proprieta</var>
  1249.      * @param proprieta Object to be serialized in xml file <var>fileName</var>
  1250.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1251.      */
  1252.     public void write(OutputStream out,Proprieta proprieta) throws SerializerException {
  1253.         this.objToXml(out, Proprieta.class, proprieta, false);
  1254.     }
  1255.     /**
  1256.      * Serialize to output stream <var>out</var> the object <var>proprieta</var> of type {@link org.openspcoop2.pdd.monitor.Proprieta}
  1257.      *
  1258.      * @param out OutputStream to serialize the object <var>proprieta</var>
  1259.      * @param proprieta Object to be serialized in xml file <var>fileName</var>
  1260.      * @param prettyPrint if true output the XML with indenting
  1261.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1262.      */
  1263.     public void write(OutputStream out,Proprieta proprieta,boolean prettyPrint) throws SerializerException {
  1264.         this.objToXml(out, Proprieta.class, proprieta, prettyPrint);
  1265.     }
  1266.            
  1267.     /**
  1268.      * Serialize to byte array the object <var>proprieta</var> of type {@link org.openspcoop2.pdd.monitor.Proprieta}
  1269.      *
  1270.      * @param proprieta Object to be serialized
  1271.      * @return Object to be serialized in byte array
  1272.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1273.      */
  1274.     public byte[] toByteArray(Proprieta proprieta) throws SerializerException {
  1275.         return this.objToXml(Proprieta.class, proprieta, false).toByteArray();
  1276.     }
  1277.     /**
  1278.      * Serialize to byte array the object <var>proprieta</var> of type {@link org.openspcoop2.pdd.monitor.Proprieta}
  1279.      *
  1280.      * @param proprieta Object to be serialized
  1281.      * @param prettyPrint if true output the XML with indenting
  1282.      * @return Object to be serialized in byte array
  1283.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1284.      */
  1285.     public byte[] toByteArray(Proprieta proprieta,boolean prettyPrint) throws SerializerException {
  1286.         return this.objToXml(Proprieta.class, proprieta, prettyPrint).toByteArray();
  1287.     }
  1288.    
  1289.     /**
  1290.      * Serialize to String the object <var>proprieta</var> of type {@link org.openspcoop2.pdd.monitor.Proprieta}
  1291.      *
  1292.      * @param proprieta Object to be serialized
  1293.      * @return Object to be serialized as String
  1294.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1295.      */
  1296.     public String toString(Proprieta proprieta) throws SerializerException {
  1297.         return this.objToXml(Proprieta.class, proprieta, false).toString();
  1298.     }
  1299.     /**
  1300.      * Serialize to String the object <var>proprieta</var> of type {@link org.openspcoop2.pdd.monitor.Proprieta}
  1301.      *
  1302.      * @param proprieta Object to be serialized
  1303.      * @param prettyPrint if true output the XML with indenting
  1304.      * @return Object to be serialized as String
  1305.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1306.      */
  1307.     public String toString(Proprieta proprieta,boolean prettyPrint) throws SerializerException {
  1308.         return this.objToXml(Proprieta.class, proprieta, prettyPrint).toString();
  1309.     }
  1310.    
  1311.    
  1312.    

  1313. }