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.core.statistiche.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.core.statistiche.Statistica;
  25. import org.openspcoop2.core.statistiche.StatisticaMensile;
  26. import org.openspcoop2.core.statistiche.StatisticaContenuti;
  27. import org.openspcoop2.core.statistiche.StatisticaGiornaliera;
  28. import org.openspcoop2.core.statistiche.StatisticaSettimanale;
  29. import org.openspcoop2.core.statistiche.StatisticaOraria;
  30. import org.openspcoop2.core.statistiche.StatisticaInfo;

  31. import java.io.ByteArrayOutputStream;
  32. import java.io.FileOutputStream;
  33. import java.io.OutputStream;
  34. import java.io.File;
  35. import java.lang.reflect.Method;

  36. import javax.xml.bind.JAXBElement;

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


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




  130.     /*
  131.      =================================================================================
  132.      Object: statistica
  133.      =================================================================================
  134.     */
  135.    
  136.     /**
  137.      * Serialize to file system in <var>fileName</var> the object <var>statistica</var> of type {@link org.openspcoop2.core.statistiche.Statistica}
  138.      *
  139.      * @param fileName Xml file to serialize the object <var>statistica</var>
  140.      * @param statistica Object to be serialized in xml file <var>fileName</var>
  141.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  142.      */
  143.     public void write(String fileName,Statistica statistica) throws SerializerException {
  144.         this.objToXml(fileName, Statistica.class, statistica, false);
  145.     }
  146.     /**
  147.      * Serialize to file system in <var>fileName</var> the object <var>statistica</var> of type {@link org.openspcoop2.core.statistiche.Statistica}
  148.      *
  149.      * @param fileName Xml file to serialize the object <var>statistica</var>
  150.      * @param statistica Object to be serialized in xml file <var>fileName</var>
  151.      * @param prettyPrint if true output the XML with indenting
  152.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  153.      */
  154.     public void write(String fileName,Statistica statistica,boolean prettyPrint) throws SerializerException {
  155.         this.objToXml(fileName, Statistica.class, statistica, prettyPrint);
  156.     }
  157.    
  158.     /**
  159.      * Serialize to file system in <var>file</var> the object <var>statistica</var> of type {@link org.openspcoop2.core.statistiche.Statistica}
  160.      *
  161.      * @param file Xml file to serialize the object <var>statistica</var>
  162.      * @param statistica Object to be serialized in xml file <var>fileName</var>
  163.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  164.      */
  165.     public void write(File file,Statistica statistica) throws SerializerException {
  166.         this.objToXml(file, Statistica.class, statistica, false);
  167.     }
  168.     /**
  169.      * Serialize to file system in <var>file</var> the object <var>statistica</var> of type {@link org.openspcoop2.core.statistiche.Statistica}
  170.      *
  171.      * @param file Xml file to serialize the object <var>statistica</var>
  172.      * @param statistica Object to be serialized in xml file <var>fileName</var>
  173.      * @param prettyPrint if true output the XML with indenting
  174.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  175.      */
  176.     public void write(File file,Statistica statistica,boolean prettyPrint) throws SerializerException {
  177.         this.objToXml(file, Statistica.class, statistica, prettyPrint);
  178.     }
  179.    
  180.     /**
  181.      * Serialize to output stream <var>out</var> the object <var>statistica</var> of type {@link org.openspcoop2.core.statistiche.Statistica}
  182.      *
  183.      * @param out OutputStream to serialize the object <var>statistica</var>
  184.      * @param statistica Object to be serialized in xml file <var>fileName</var>
  185.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  186.      */
  187.     public void write(OutputStream out,Statistica statistica) throws SerializerException {
  188.         this.objToXml(out, Statistica.class, statistica, false);
  189.     }
  190.     /**
  191.      * Serialize to output stream <var>out</var> the object <var>statistica</var> of type {@link org.openspcoop2.core.statistiche.Statistica}
  192.      *
  193.      * @param out OutputStream to serialize the object <var>statistica</var>
  194.      * @param statistica Object to be serialized in xml file <var>fileName</var>
  195.      * @param prettyPrint if true output the XML with indenting
  196.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  197.      */
  198.     public void write(OutputStream out,Statistica statistica,boolean prettyPrint) throws SerializerException {
  199.         this.objToXml(out, Statistica.class, statistica, prettyPrint);
  200.     }
  201.            
  202.     /**
  203.      * Serialize to byte array the object <var>statistica</var> of type {@link org.openspcoop2.core.statistiche.Statistica}
  204.      *
  205.      * @param statistica Object to be serialized
  206.      * @return Object to be serialized in byte array
  207.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  208.      */
  209.     public byte[] toByteArray(Statistica statistica) throws SerializerException {
  210.         return this.objToXml(Statistica.class, statistica, false).toByteArray();
  211.     }
  212.     /**
  213.      * Serialize to byte array the object <var>statistica</var> of type {@link org.openspcoop2.core.statistiche.Statistica}
  214.      *
  215.      * @param statistica Object to be serialized
  216.      * @param prettyPrint if true output the XML with indenting
  217.      * @return Object to be serialized in byte array
  218.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  219.      */
  220.     public byte[] toByteArray(Statistica statistica,boolean prettyPrint) throws SerializerException {
  221.         return this.objToXml(Statistica.class, statistica, prettyPrint).toByteArray();
  222.     }
  223.    
  224.     /**
  225.      * Serialize to String the object <var>statistica</var> of type {@link org.openspcoop2.core.statistiche.Statistica}
  226.      *
  227.      * @param statistica Object to be serialized
  228.      * @return Object to be serialized as String
  229.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  230.      */
  231.     public String toString(Statistica statistica) throws SerializerException {
  232.         return this.objToXml(Statistica.class, statistica, false).toString();
  233.     }
  234.     /**
  235.      * Serialize to String the object <var>statistica</var> of type {@link org.openspcoop2.core.statistiche.Statistica}
  236.      *
  237.      * @param statistica Object to be serialized
  238.      * @param prettyPrint if true output the XML with indenting
  239.      * @return Object to be serialized as String
  240.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  241.      */
  242.     public String toString(Statistica statistica,boolean prettyPrint) throws SerializerException {
  243.         return this.objToXml(Statistica.class, statistica, prettyPrint).toString();
  244.     }
  245.    
  246.    
  247.    
  248.     /*
  249.      =================================================================================
  250.      Object: statistica-mensile
  251.      =================================================================================
  252.     */
  253.    
  254.     /**
  255.      * Serialize to file system in <var>fileName</var> the object <var>statisticaMensile</var> of type {@link org.openspcoop2.core.statistiche.StatisticaMensile}
  256.      *
  257.      * @param fileName Xml file to serialize the object <var>statisticaMensile</var>
  258.      * @param statisticaMensile Object to be serialized in xml file <var>fileName</var>
  259.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  260.      */
  261.     public void write(String fileName,StatisticaMensile statisticaMensile) throws SerializerException {
  262.         this.objToXml(fileName, StatisticaMensile.class, statisticaMensile, false);
  263.     }
  264.     /**
  265.      * Serialize to file system in <var>fileName</var> the object <var>statisticaMensile</var> of type {@link org.openspcoop2.core.statistiche.StatisticaMensile}
  266.      *
  267.      * @param fileName Xml file to serialize the object <var>statisticaMensile</var>
  268.      * @param statisticaMensile Object to be serialized in xml file <var>fileName</var>
  269.      * @param prettyPrint if true output the XML with indenting
  270.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  271.      */
  272.     public void write(String fileName,StatisticaMensile statisticaMensile,boolean prettyPrint) throws SerializerException {
  273.         this.objToXml(fileName, StatisticaMensile.class, statisticaMensile, prettyPrint);
  274.     }
  275.    
  276.     /**
  277.      * Serialize to file system in <var>file</var> the object <var>statisticaMensile</var> of type {@link org.openspcoop2.core.statistiche.StatisticaMensile}
  278.      *
  279.      * @param file Xml file to serialize the object <var>statisticaMensile</var>
  280.      * @param statisticaMensile Object to be serialized in xml file <var>fileName</var>
  281.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  282.      */
  283.     public void write(File file,StatisticaMensile statisticaMensile) throws SerializerException {
  284.         this.objToXml(file, StatisticaMensile.class, statisticaMensile, false);
  285.     }
  286.     /**
  287.      * Serialize to file system in <var>file</var> the object <var>statisticaMensile</var> of type {@link org.openspcoop2.core.statistiche.StatisticaMensile}
  288.      *
  289.      * @param file Xml file to serialize the object <var>statisticaMensile</var>
  290.      * @param statisticaMensile Object to be serialized in xml file <var>fileName</var>
  291.      * @param prettyPrint if true output the XML with indenting
  292.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  293.      */
  294.     public void write(File file,StatisticaMensile statisticaMensile,boolean prettyPrint) throws SerializerException {
  295.         this.objToXml(file, StatisticaMensile.class, statisticaMensile, prettyPrint);
  296.     }
  297.    
  298.     /**
  299.      * Serialize to output stream <var>out</var> the object <var>statisticaMensile</var> of type {@link org.openspcoop2.core.statistiche.StatisticaMensile}
  300.      *
  301.      * @param out OutputStream to serialize the object <var>statisticaMensile</var>
  302.      * @param statisticaMensile Object to be serialized in xml file <var>fileName</var>
  303.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  304.      */
  305.     public void write(OutputStream out,StatisticaMensile statisticaMensile) throws SerializerException {
  306.         this.objToXml(out, StatisticaMensile.class, statisticaMensile, false);
  307.     }
  308.     /**
  309.      * Serialize to output stream <var>out</var> the object <var>statisticaMensile</var> of type {@link org.openspcoop2.core.statistiche.StatisticaMensile}
  310.      *
  311.      * @param out OutputStream to serialize the object <var>statisticaMensile</var>
  312.      * @param statisticaMensile Object to be serialized in xml file <var>fileName</var>
  313.      * @param prettyPrint if true output the XML with indenting
  314.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  315.      */
  316.     public void write(OutputStream out,StatisticaMensile statisticaMensile,boolean prettyPrint) throws SerializerException {
  317.         this.objToXml(out, StatisticaMensile.class, statisticaMensile, prettyPrint);
  318.     }
  319.            
  320.     /**
  321.      * Serialize to byte array the object <var>statisticaMensile</var> of type {@link org.openspcoop2.core.statistiche.StatisticaMensile}
  322.      *
  323.      * @param statisticaMensile Object to be serialized
  324.      * @return Object to be serialized in byte array
  325.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  326.      */
  327.     public byte[] toByteArray(StatisticaMensile statisticaMensile) throws SerializerException {
  328.         return this.objToXml(StatisticaMensile.class, statisticaMensile, false).toByteArray();
  329.     }
  330.     /**
  331.      * Serialize to byte array the object <var>statisticaMensile</var> of type {@link org.openspcoop2.core.statistiche.StatisticaMensile}
  332.      *
  333.      * @param statisticaMensile Object to be serialized
  334.      * @param prettyPrint if true output the XML with indenting
  335.      * @return Object to be serialized in byte array
  336.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  337.      */
  338.     public byte[] toByteArray(StatisticaMensile statisticaMensile,boolean prettyPrint) throws SerializerException {
  339.         return this.objToXml(StatisticaMensile.class, statisticaMensile, prettyPrint).toByteArray();
  340.     }
  341.    
  342.     /**
  343.      * Serialize to String the object <var>statisticaMensile</var> of type {@link org.openspcoop2.core.statistiche.StatisticaMensile}
  344.      *
  345.      * @param statisticaMensile Object to be serialized
  346.      * @return Object to be serialized as String
  347.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  348.      */
  349.     public String toString(StatisticaMensile statisticaMensile) throws SerializerException {
  350.         return this.objToXml(StatisticaMensile.class, statisticaMensile, false).toString();
  351.     }
  352.     /**
  353.      * Serialize to String the object <var>statisticaMensile</var> of type {@link org.openspcoop2.core.statistiche.StatisticaMensile}
  354.      *
  355.      * @param statisticaMensile Object to be serialized
  356.      * @param prettyPrint if true output the XML with indenting
  357.      * @return Object to be serialized as String
  358.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  359.      */
  360.     public String toString(StatisticaMensile statisticaMensile,boolean prettyPrint) throws SerializerException {
  361.         return this.objToXml(StatisticaMensile.class, statisticaMensile, prettyPrint).toString();
  362.     }
  363.    
  364.    
  365.    
  366.     /*
  367.      =================================================================================
  368.      Object: statistica-contenuti
  369.      =================================================================================
  370.     */
  371.    
  372.     /**
  373.      * Serialize to file system in <var>fileName</var> the object <var>statisticaContenuti</var> of type {@link org.openspcoop2.core.statistiche.StatisticaContenuti}
  374.      *
  375.      * @param fileName Xml file to serialize the object <var>statisticaContenuti</var>
  376.      * @param statisticaContenuti Object to be serialized in xml file <var>fileName</var>
  377.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  378.      */
  379.     public void write(String fileName,StatisticaContenuti statisticaContenuti) throws SerializerException {
  380.         this.objToXml(fileName, StatisticaContenuti.class, statisticaContenuti, false);
  381.     }
  382.     /**
  383.      * Serialize to file system in <var>fileName</var> the object <var>statisticaContenuti</var> of type {@link org.openspcoop2.core.statistiche.StatisticaContenuti}
  384.      *
  385.      * @param fileName Xml file to serialize the object <var>statisticaContenuti</var>
  386.      * @param statisticaContenuti Object to be serialized in xml file <var>fileName</var>
  387.      * @param prettyPrint if true output the XML with indenting
  388.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  389.      */
  390.     public void write(String fileName,StatisticaContenuti statisticaContenuti,boolean prettyPrint) throws SerializerException {
  391.         this.objToXml(fileName, StatisticaContenuti.class, statisticaContenuti, prettyPrint);
  392.     }
  393.    
  394.     /**
  395.      * Serialize to file system in <var>file</var> the object <var>statisticaContenuti</var> of type {@link org.openspcoop2.core.statistiche.StatisticaContenuti}
  396.      *
  397.      * @param file Xml file to serialize the object <var>statisticaContenuti</var>
  398.      * @param statisticaContenuti Object to be serialized in xml file <var>fileName</var>
  399.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  400.      */
  401.     public void write(File file,StatisticaContenuti statisticaContenuti) throws SerializerException {
  402.         this.objToXml(file, StatisticaContenuti.class, statisticaContenuti, false);
  403.     }
  404.     /**
  405.      * Serialize to file system in <var>file</var> the object <var>statisticaContenuti</var> of type {@link org.openspcoop2.core.statistiche.StatisticaContenuti}
  406.      *
  407.      * @param file Xml file to serialize the object <var>statisticaContenuti</var>
  408.      * @param statisticaContenuti Object to be serialized in xml file <var>fileName</var>
  409.      * @param prettyPrint if true output the XML with indenting
  410.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  411.      */
  412.     public void write(File file,StatisticaContenuti statisticaContenuti,boolean prettyPrint) throws SerializerException {
  413.         this.objToXml(file, StatisticaContenuti.class, statisticaContenuti, prettyPrint);
  414.     }
  415.    
  416.     /**
  417.      * Serialize to output stream <var>out</var> the object <var>statisticaContenuti</var> of type {@link org.openspcoop2.core.statistiche.StatisticaContenuti}
  418.      *
  419.      * @param out OutputStream to serialize the object <var>statisticaContenuti</var>
  420.      * @param statisticaContenuti Object to be serialized in xml file <var>fileName</var>
  421.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  422.      */
  423.     public void write(OutputStream out,StatisticaContenuti statisticaContenuti) throws SerializerException {
  424.         this.objToXml(out, StatisticaContenuti.class, statisticaContenuti, false);
  425.     }
  426.     /**
  427.      * Serialize to output stream <var>out</var> the object <var>statisticaContenuti</var> of type {@link org.openspcoop2.core.statistiche.StatisticaContenuti}
  428.      *
  429.      * @param out OutputStream to serialize the object <var>statisticaContenuti</var>
  430.      * @param statisticaContenuti Object to be serialized in xml file <var>fileName</var>
  431.      * @param prettyPrint if true output the XML with indenting
  432.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  433.      */
  434.     public void write(OutputStream out,StatisticaContenuti statisticaContenuti,boolean prettyPrint) throws SerializerException {
  435.         this.objToXml(out, StatisticaContenuti.class, statisticaContenuti, prettyPrint);
  436.     }
  437.            
  438.     /**
  439.      * Serialize to byte array the object <var>statisticaContenuti</var> of type {@link org.openspcoop2.core.statistiche.StatisticaContenuti}
  440.      *
  441.      * @param statisticaContenuti Object to be serialized
  442.      * @return Object to be serialized in byte array
  443.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  444.      */
  445.     public byte[] toByteArray(StatisticaContenuti statisticaContenuti) throws SerializerException {
  446.         return this.objToXml(StatisticaContenuti.class, statisticaContenuti, false).toByteArray();
  447.     }
  448.     /**
  449.      * Serialize to byte array the object <var>statisticaContenuti</var> of type {@link org.openspcoop2.core.statistiche.StatisticaContenuti}
  450.      *
  451.      * @param statisticaContenuti Object to be serialized
  452.      * @param prettyPrint if true output the XML with indenting
  453.      * @return Object to be serialized in byte array
  454.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  455.      */
  456.     public byte[] toByteArray(StatisticaContenuti statisticaContenuti,boolean prettyPrint) throws SerializerException {
  457.         return this.objToXml(StatisticaContenuti.class, statisticaContenuti, prettyPrint).toByteArray();
  458.     }
  459.    
  460.     /**
  461.      * Serialize to String the object <var>statisticaContenuti</var> of type {@link org.openspcoop2.core.statistiche.StatisticaContenuti}
  462.      *
  463.      * @param statisticaContenuti Object to be serialized
  464.      * @return Object to be serialized as String
  465.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  466.      */
  467.     public String toString(StatisticaContenuti statisticaContenuti) throws SerializerException {
  468.         return this.objToXml(StatisticaContenuti.class, statisticaContenuti, false).toString();
  469.     }
  470.     /**
  471.      * Serialize to String the object <var>statisticaContenuti</var> of type {@link org.openspcoop2.core.statistiche.StatisticaContenuti}
  472.      *
  473.      * @param statisticaContenuti Object to be serialized
  474.      * @param prettyPrint if true output the XML with indenting
  475.      * @return Object to be serialized as String
  476.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  477.      */
  478.     public String toString(StatisticaContenuti statisticaContenuti,boolean prettyPrint) throws SerializerException {
  479.         return this.objToXml(StatisticaContenuti.class, statisticaContenuti, prettyPrint).toString();
  480.     }
  481.    
  482.    
  483.    
  484.     /*
  485.      =================================================================================
  486.      Object: statistica-giornaliera
  487.      =================================================================================
  488.     */
  489.    
  490.     /**
  491.      * Serialize to file system in <var>fileName</var> the object <var>statisticaGiornaliera</var> of type {@link org.openspcoop2.core.statistiche.StatisticaGiornaliera}
  492.      *
  493.      * @param fileName Xml file to serialize the object <var>statisticaGiornaliera</var>
  494.      * @param statisticaGiornaliera Object to be serialized in xml file <var>fileName</var>
  495.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  496.      */
  497.     public void write(String fileName,StatisticaGiornaliera statisticaGiornaliera) throws SerializerException {
  498.         this.objToXml(fileName, StatisticaGiornaliera.class, statisticaGiornaliera, false);
  499.     }
  500.     /**
  501.      * Serialize to file system in <var>fileName</var> the object <var>statisticaGiornaliera</var> of type {@link org.openspcoop2.core.statistiche.StatisticaGiornaliera}
  502.      *
  503.      * @param fileName Xml file to serialize the object <var>statisticaGiornaliera</var>
  504.      * @param statisticaGiornaliera Object to be serialized in xml file <var>fileName</var>
  505.      * @param prettyPrint if true output the XML with indenting
  506.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  507.      */
  508.     public void write(String fileName,StatisticaGiornaliera statisticaGiornaliera,boolean prettyPrint) throws SerializerException {
  509.         this.objToXml(fileName, StatisticaGiornaliera.class, statisticaGiornaliera, prettyPrint);
  510.     }
  511.    
  512.     /**
  513.      * Serialize to file system in <var>file</var> the object <var>statisticaGiornaliera</var> of type {@link org.openspcoop2.core.statistiche.StatisticaGiornaliera}
  514.      *
  515.      * @param file Xml file to serialize the object <var>statisticaGiornaliera</var>
  516.      * @param statisticaGiornaliera Object to be serialized in xml file <var>fileName</var>
  517.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  518.      */
  519.     public void write(File file,StatisticaGiornaliera statisticaGiornaliera) throws SerializerException {
  520.         this.objToXml(file, StatisticaGiornaliera.class, statisticaGiornaliera, false);
  521.     }
  522.     /**
  523.      * Serialize to file system in <var>file</var> the object <var>statisticaGiornaliera</var> of type {@link org.openspcoop2.core.statistiche.StatisticaGiornaliera}
  524.      *
  525.      * @param file Xml file to serialize the object <var>statisticaGiornaliera</var>
  526.      * @param statisticaGiornaliera Object to be serialized in xml file <var>fileName</var>
  527.      * @param prettyPrint if true output the XML with indenting
  528.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  529.      */
  530.     public void write(File file,StatisticaGiornaliera statisticaGiornaliera,boolean prettyPrint) throws SerializerException {
  531.         this.objToXml(file, StatisticaGiornaliera.class, statisticaGiornaliera, prettyPrint);
  532.     }
  533.    
  534.     /**
  535.      * Serialize to output stream <var>out</var> the object <var>statisticaGiornaliera</var> of type {@link org.openspcoop2.core.statistiche.StatisticaGiornaliera}
  536.      *
  537.      * @param out OutputStream to serialize the object <var>statisticaGiornaliera</var>
  538.      * @param statisticaGiornaliera Object to be serialized in xml file <var>fileName</var>
  539.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  540.      */
  541.     public void write(OutputStream out,StatisticaGiornaliera statisticaGiornaliera) throws SerializerException {
  542.         this.objToXml(out, StatisticaGiornaliera.class, statisticaGiornaliera, false);
  543.     }
  544.     /**
  545.      * Serialize to output stream <var>out</var> the object <var>statisticaGiornaliera</var> of type {@link org.openspcoop2.core.statistiche.StatisticaGiornaliera}
  546.      *
  547.      * @param out OutputStream to serialize the object <var>statisticaGiornaliera</var>
  548.      * @param statisticaGiornaliera Object to be serialized in xml file <var>fileName</var>
  549.      * @param prettyPrint if true output the XML with indenting
  550.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  551.      */
  552.     public void write(OutputStream out,StatisticaGiornaliera statisticaGiornaliera,boolean prettyPrint) throws SerializerException {
  553.         this.objToXml(out, StatisticaGiornaliera.class, statisticaGiornaliera, prettyPrint);
  554.     }
  555.            
  556.     /**
  557.      * Serialize to byte array the object <var>statisticaGiornaliera</var> of type {@link org.openspcoop2.core.statistiche.StatisticaGiornaliera}
  558.      *
  559.      * @param statisticaGiornaliera Object to be serialized
  560.      * @return Object to be serialized in byte array
  561.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  562.      */
  563.     public byte[] toByteArray(StatisticaGiornaliera statisticaGiornaliera) throws SerializerException {
  564.         return this.objToXml(StatisticaGiornaliera.class, statisticaGiornaliera, false).toByteArray();
  565.     }
  566.     /**
  567.      * Serialize to byte array the object <var>statisticaGiornaliera</var> of type {@link org.openspcoop2.core.statistiche.StatisticaGiornaliera}
  568.      *
  569.      * @param statisticaGiornaliera Object to be serialized
  570.      * @param prettyPrint if true output the XML with indenting
  571.      * @return Object to be serialized in byte array
  572.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  573.      */
  574.     public byte[] toByteArray(StatisticaGiornaliera statisticaGiornaliera,boolean prettyPrint) throws SerializerException {
  575.         return this.objToXml(StatisticaGiornaliera.class, statisticaGiornaliera, prettyPrint).toByteArray();
  576.     }
  577.    
  578.     /**
  579.      * Serialize to String the object <var>statisticaGiornaliera</var> of type {@link org.openspcoop2.core.statistiche.StatisticaGiornaliera}
  580.      *
  581.      * @param statisticaGiornaliera Object to be serialized
  582.      * @return Object to be serialized as String
  583.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  584.      */
  585.     public String toString(StatisticaGiornaliera statisticaGiornaliera) throws SerializerException {
  586.         return this.objToXml(StatisticaGiornaliera.class, statisticaGiornaliera, false).toString();
  587.     }
  588.     /**
  589.      * Serialize to String the object <var>statisticaGiornaliera</var> of type {@link org.openspcoop2.core.statistiche.StatisticaGiornaliera}
  590.      *
  591.      * @param statisticaGiornaliera Object to be serialized
  592.      * @param prettyPrint if true output the XML with indenting
  593.      * @return Object to be serialized as String
  594.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  595.      */
  596.     public String toString(StatisticaGiornaliera statisticaGiornaliera,boolean prettyPrint) throws SerializerException {
  597.         return this.objToXml(StatisticaGiornaliera.class, statisticaGiornaliera, prettyPrint).toString();
  598.     }
  599.    
  600.    
  601.    
  602.     /*
  603.      =================================================================================
  604.      Object: statistica-settimanale
  605.      =================================================================================
  606.     */
  607.    
  608.     /**
  609.      * Serialize to file system in <var>fileName</var> the object <var>statisticaSettimanale</var> of type {@link org.openspcoop2.core.statistiche.StatisticaSettimanale}
  610.      *
  611.      * @param fileName Xml file to serialize the object <var>statisticaSettimanale</var>
  612.      * @param statisticaSettimanale Object to be serialized in xml file <var>fileName</var>
  613.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  614.      */
  615.     public void write(String fileName,StatisticaSettimanale statisticaSettimanale) throws SerializerException {
  616.         this.objToXml(fileName, StatisticaSettimanale.class, statisticaSettimanale, false);
  617.     }
  618.     /**
  619.      * Serialize to file system in <var>fileName</var> the object <var>statisticaSettimanale</var> of type {@link org.openspcoop2.core.statistiche.StatisticaSettimanale}
  620.      *
  621.      * @param fileName Xml file to serialize the object <var>statisticaSettimanale</var>
  622.      * @param statisticaSettimanale Object to be serialized in xml file <var>fileName</var>
  623.      * @param prettyPrint if true output the XML with indenting
  624.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  625.      */
  626.     public void write(String fileName,StatisticaSettimanale statisticaSettimanale,boolean prettyPrint) throws SerializerException {
  627.         this.objToXml(fileName, StatisticaSettimanale.class, statisticaSettimanale, prettyPrint);
  628.     }
  629.    
  630.     /**
  631.      * Serialize to file system in <var>file</var> the object <var>statisticaSettimanale</var> of type {@link org.openspcoop2.core.statistiche.StatisticaSettimanale}
  632.      *
  633.      * @param file Xml file to serialize the object <var>statisticaSettimanale</var>
  634.      * @param statisticaSettimanale Object to be serialized in xml file <var>fileName</var>
  635.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  636.      */
  637.     public void write(File file,StatisticaSettimanale statisticaSettimanale) throws SerializerException {
  638.         this.objToXml(file, StatisticaSettimanale.class, statisticaSettimanale, false);
  639.     }
  640.     /**
  641.      * Serialize to file system in <var>file</var> the object <var>statisticaSettimanale</var> of type {@link org.openspcoop2.core.statistiche.StatisticaSettimanale}
  642.      *
  643.      * @param file Xml file to serialize the object <var>statisticaSettimanale</var>
  644.      * @param statisticaSettimanale Object to be serialized in xml file <var>fileName</var>
  645.      * @param prettyPrint if true output the XML with indenting
  646.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  647.      */
  648.     public void write(File file,StatisticaSettimanale statisticaSettimanale,boolean prettyPrint) throws SerializerException {
  649.         this.objToXml(file, StatisticaSettimanale.class, statisticaSettimanale, prettyPrint);
  650.     }
  651.    
  652.     /**
  653.      * Serialize to output stream <var>out</var> the object <var>statisticaSettimanale</var> of type {@link org.openspcoop2.core.statistiche.StatisticaSettimanale}
  654.      *
  655.      * @param out OutputStream to serialize the object <var>statisticaSettimanale</var>
  656.      * @param statisticaSettimanale Object to be serialized in xml file <var>fileName</var>
  657.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  658.      */
  659.     public void write(OutputStream out,StatisticaSettimanale statisticaSettimanale) throws SerializerException {
  660.         this.objToXml(out, StatisticaSettimanale.class, statisticaSettimanale, false);
  661.     }
  662.     /**
  663.      * Serialize to output stream <var>out</var> the object <var>statisticaSettimanale</var> of type {@link org.openspcoop2.core.statistiche.StatisticaSettimanale}
  664.      *
  665.      * @param out OutputStream to serialize the object <var>statisticaSettimanale</var>
  666.      * @param statisticaSettimanale Object to be serialized in xml file <var>fileName</var>
  667.      * @param prettyPrint if true output the XML with indenting
  668.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  669.      */
  670.     public void write(OutputStream out,StatisticaSettimanale statisticaSettimanale,boolean prettyPrint) throws SerializerException {
  671.         this.objToXml(out, StatisticaSettimanale.class, statisticaSettimanale, prettyPrint);
  672.     }
  673.            
  674.     /**
  675.      * Serialize to byte array the object <var>statisticaSettimanale</var> of type {@link org.openspcoop2.core.statistiche.StatisticaSettimanale}
  676.      *
  677.      * @param statisticaSettimanale Object to be serialized
  678.      * @return Object to be serialized in byte array
  679.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  680.      */
  681.     public byte[] toByteArray(StatisticaSettimanale statisticaSettimanale) throws SerializerException {
  682.         return this.objToXml(StatisticaSettimanale.class, statisticaSettimanale, false).toByteArray();
  683.     }
  684.     /**
  685.      * Serialize to byte array the object <var>statisticaSettimanale</var> of type {@link org.openspcoop2.core.statistiche.StatisticaSettimanale}
  686.      *
  687.      * @param statisticaSettimanale Object to be serialized
  688.      * @param prettyPrint if true output the XML with indenting
  689.      * @return Object to be serialized in byte array
  690.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  691.      */
  692.     public byte[] toByteArray(StatisticaSettimanale statisticaSettimanale,boolean prettyPrint) throws SerializerException {
  693.         return this.objToXml(StatisticaSettimanale.class, statisticaSettimanale, prettyPrint).toByteArray();
  694.     }
  695.    
  696.     /**
  697.      * Serialize to String the object <var>statisticaSettimanale</var> of type {@link org.openspcoop2.core.statistiche.StatisticaSettimanale}
  698.      *
  699.      * @param statisticaSettimanale Object to be serialized
  700.      * @return Object to be serialized as String
  701.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  702.      */
  703.     public String toString(StatisticaSettimanale statisticaSettimanale) throws SerializerException {
  704.         return this.objToXml(StatisticaSettimanale.class, statisticaSettimanale, false).toString();
  705.     }
  706.     /**
  707.      * Serialize to String the object <var>statisticaSettimanale</var> of type {@link org.openspcoop2.core.statistiche.StatisticaSettimanale}
  708.      *
  709.      * @param statisticaSettimanale Object to be serialized
  710.      * @param prettyPrint if true output the XML with indenting
  711.      * @return Object to be serialized as String
  712.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  713.      */
  714.     public String toString(StatisticaSettimanale statisticaSettimanale,boolean prettyPrint) throws SerializerException {
  715.         return this.objToXml(StatisticaSettimanale.class, statisticaSettimanale, prettyPrint).toString();
  716.     }
  717.    
  718.    
  719.    
  720.     /*
  721.      =================================================================================
  722.      Object: statistica-oraria
  723.      =================================================================================
  724.     */
  725.    
  726.     /**
  727.      * Serialize to file system in <var>fileName</var> the object <var>statisticaOraria</var> of type {@link org.openspcoop2.core.statistiche.StatisticaOraria}
  728.      *
  729.      * @param fileName Xml file to serialize the object <var>statisticaOraria</var>
  730.      * @param statisticaOraria Object to be serialized in xml file <var>fileName</var>
  731.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  732.      */
  733.     public void write(String fileName,StatisticaOraria statisticaOraria) throws SerializerException {
  734.         this.objToXml(fileName, StatisticaOraria.class, statisticaOraria, false);
  735.     }
  736.     /**
  737.      * Serialize to file system in <var>fileName</var> the object <var>statisticaOraria</var> of type {@link org.openspcoop2.core.statistiche.StatisticaOraria}
  738.      *
  739.      * @param fileName Xml file to serialize the object <var>statisticaOraria</var>
  740.      * @param statisticaOraria Object to be serialized in xml file <var>fileName</var>
  741.      * @param prettyPrint if true output the XML with indenting
  742.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  743.      */
  744.     public void write(String fileName,StatisticaOraria statisticaOraria,boolean prettyPrint) throws SerializerException {
  745.         this.objToXml(fileName, StatisticaOraria.class, statisticaOraria, prettyPrint);
  746.     }
  747.    
  748.     /**
  749.      * Serialize to file system in <var>file</var> the object <var>statisticaOraria</var> of type {@link org.openspcoop2.core.statistiche.StatisticaOraria}
  750.      *
  751.      * @param file Xml file to serialize the object <var>statisticaOraria</var>
  752.      * @param statisticaOraria Object to be serialized in xml file <var>fileName</var>
  753.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  754.      */
  755.     public void write(File file,StatisticaOraria statisticaOraria) throws SerializerException {
  756.         this.objToXml(file, StatisticaOraria.class, statisticaOraria, false);
  757.     }
  758.     /**
  759.      * Serialize to file system in <var>file</var> the object <var>statisticaOraria</var> of type {@link org.openspcoop2.core.statistiche.StatisticaOraria}
  760.      *
  761.      * @param file Xml file to serialize the object <var>statisticaOraria</var>
  762.      * @param statisticaOraria Object to be serialized in xml file <var>fileName</var>
  763.      * @param prettyPrint if true output the XML with indenting
  764.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  765.      */
  766.     public void write(File file,StatisticaOraria statisticaOraria,boolean prettyPrint) throws SerializerException {
  767.         this.objToXml(file, StatisticaOraria.class, statisticaOraria, prettyPrint);
  768.     }
  769.    
  770.     /**
  771.      * Serialize to output stream <var>out</var> the object <var>statisticaOraria</var> of type {@link org.openspcoop2.core.statistiche.StatisticaOraria}
  772.      *
  773.      * @param out OutputStream to serialize the object <var>statisticaOraria</var>
  774.      * @param statisticaOraria Object to be serialized in xml file <var>fileName</var>
  775.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  776.      */
  777.     public void write(OutputStream out,StatisticaOraria statisticaOraria) throws SerializerException {
  778.         this.objToXml(out, StatisticaOraria.class, statisticaOraria, false);
  779.     }
  780.     /**
  781.      * Serialize to output stream <var>out</var> the object <var>statisticaOraria</var> of type {@link org.openspcoop2.core.statistiche.StatisticaOraria}
  782.      *
  783.      * @param out OutputStream to serialize the object <var>statisticaOraria</var>
  784.      * @param statisticaOraria Object to be serialized in xml file <var>fileName</var>
  785.      * @param prettyPrint if true output the XML with indenting
  786.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  787.      */
  788.     public void write(OutputStream out,StatisticaOraria statisticaOraria,boolean prettyPrint) throws SerializerException {
  789.         this.objToXml(out, StatisticaOraria.class, statisticaOraria, prettyPrint);
  790.     }
  791.            
  792.     /**
  793.      * Serialize to byte array the object <var>statisticaOraria</var> of type {@link org.openspcoop2.core.statistiche.StatisticaOraria}
  794.      *
  795.      * @param statisticaOraria Object to be serialized
  796.      * @return Object to be serialized in byte array
  797.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  798.      */
  799.     public byte[] toByteArray(StatisticaOraria statisticaOraria) throws SerializerException {
  800.         return this.objToXml(StatisticaOraria.class, statisticaOraria, false).toByteArray();
  801.     }
  802.     /**
  803.      * Serialize to byte array the object <var>statisticaOraria</var> of type {@link org.openspcoop2.core.statistiche.StatisticaOraria}
  804.      *
  805.      * @param statisticaOraria Object to be serialized
  806.      * @param prettyPrint if true output the XML with indenting
  807.      * @return Object to be serialized in byte array
  808.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  809.      */
  810.     public byte[] toByteArray(StatisticaOraria statisticaOraria,boolean prettyPrint) throws SerializerException {
  811.         return this.objToXml(StatisticaOraria.class, statisticaOraria, prettyPrint).toByteArray();
  812.     }
  813.    
  814.     /**
  815.      * Serialize to String the object <var>statisticaOraria</var> of type {@link org.openspcoop2.core.statistiche.StatisticaOraria}
  816.      *
  817.      * @param statisticaOraria Object to be serialized
  818.      * @return Object to be serialized as String
  819.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  820.      */
  821.     public String toString(StatisticaOraria statisticaOraria) throws SerializerException {
  822.         return this.objToXml(StatisticaOraria.class, statisticaOraria, false).toString();
  823.     }
  824.     /**
  825.      * Serialize to String the object <var>statisticaOraria</var> of type {@link org.openspcoop2.core.statistiche.StatisticaOraria}
  826.      *
  827.      * @param statisticaOraria Object to be serialized
  828.      * @param prettyPrint if true output the XML with indenting
  829.      * @return Object to be serialized as String
  830.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  831.      */
  832.     public String toString(StatisticaOraria statisticaOraria,boolean prettyPrint) throws SerializerException {
  833.         return this.objToXml(StatisticaOraria.class, statisticaOraria, prettyPrint).toString();
  834.     }
  835.    
  836.    
  837.    
  838.     /*
  839.      =================================================================================
  840.      Object: statistica-info
  841.      =================================================================================
  842.     */
  843.    
  844.     /**
  845.      * Serialize to file system in <var>fileName</var> the object <var>statisticaInfo</var> of type {@link org.openspcoop2.core.statistiche.StatisticaInfo}
  846.      *
  847.      * @param fileName Xml file to serialize the object <var>statisticaInfo</var>
  848.      * @param statisticaInfo Object to be serialized in xml file <var>fileName</var>
  849.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  850.      */
  851.     public void write(String fileName,StatisticaInfo statisticaInfo) throws SerializerException {
  852.         this.objToXml(fileName, StatisticaInfo.class, statisticaInfo, false);
  853.     }
  854.     /**
  855.      * Serialize to file system in <var>fileName</var> the object <var>statisticaInfo</var> of type {@link org.openspcoop2.core.statistiche.StatisticaInfo}
  856.      *
  857.      * @param fileName Xml file to serialize the object <var>statisticaInfo</var>
  858.      * @param statisticaInfo Object to be serialized in xml file <var>fileName</var>
  859.      * @param prettyPrint if true output the XML with indenting
  860.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  861.      */
  862.     public void write(String fileName,StatisticaInfo statisticaInfo,boolean prettyPrint) throws SerializerException {
  863.         this.objToXml(fileName, StatisticaInfo.class, statisticaInfo, prettyPrint);
  864.     }
  865.    
  866.     /**
  867.      * Serialize to file system in <var>file</var> the object <var>statisticaInfo</var> of type {@link org.openspcoop2.core.statistiche.StatisticaInfo}
  868.      *
  869.      * @param file Xml file to serialize the object <var>statisticaInfo</var>
  870.      * @param statisticaInfo Object to be serialized in xml file <var>fileName</var>
  871.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  872.      */
  873.     public void write(File file,StatisticaInfo statisticaInfo) throws SerializerException {
  874.         this.objToXml(file, StatisticaInfo.class, statisticaInfo, false);
  875.     }
  876.     /**
  877.      * Serialize to file system in <var>file</var> the object <var>statisticaInfo</var> of type {@link org.openspcoop2.core.statistiche.StatisticaInfo}
  878.      *
  879.      * @param file Xml file to serialize the object <var>statisticaInfo</var>
  880.      * @param statisticaInfo Object to be serialized in xml file <var>fileName</var>
  881.      * @param prettyPrint if true output the XML with indenting
  882.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  883.      */
  884.     public void write(File file,StatisticaInfo statisticaInfo,boolean prettyPrint) throws SerializerException {
  885.         this.objToXml(file, StatisticaInfo.class, statisticaInfo, prettyPrint);
  886.     }
  887.    
  888.     /**
  889.      * Serialize to output stream <var>out</var> the object <var>statisticaInfo</var> of type {@link org.openspcoop2.core.statistiche.StatisticaInfo}
  890.      *
  891.      * @param out OutputStream to serialize the object <var>statisticaInfo</var>
  892.      * @param statisticaInfo Object to be serialized in xml file <var>fileName</var>
  893.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  894.      */
  895.     public void write(OutputStream out,StatisticaInfo statisticaInfo) throws SerializerException {
  896.         this.objToXml(out, StatisticaInfo.class, statisticaInfo, false);
  897.     }
  898.     /**
  899.      * Serialize to output stream <var>out</var> the object <var>statisticaInfo</var> of type {@link org.openspcoop2.core.statistiche.StatisticaInfo}
  900.      *
  901.      * @param out OutputStream to serialize the object <var>statisticaInfo</var>
  902.      * @param statisticaInfo Object to be serialized in xml file <var>fileName</var>
  903.      * @param prettyPrint if true output the XML with indenting
  904.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  905.      */
  906.     public void write(OutputStream out,StatisticaInfo statisticaInfo,boolean prettyPrint) throws SerializerException {
  907.         this.objToXml(out, StatisticaInfo.class, statisticaInfo, prettyPrint);
  908.     }
  909.            
  910.     /**
  911.      * Serialize to byte array the object <var>statisticaInfo</var> of type {@link org.openspcoop2.core.statistiche.StatisticaInfo}
  912.      *
  913.      * @param statisticaInfo Object to be serialized
  914.      * @return Object to be serialized in byte array
  915.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  916.      */
  917.     public byte[] toByteArray(StatisticaInfo statisticaInfo) throws SerializerException {
  918.         return this.objToXml(StatisticaInfo.class, statisticaInfo, false).toByteArray();
  919.     }
  920.     /**
  921.      * Serialize to byte array the object <var>statisticaInfo</var> of type {@link org.openspcoop2.core.statistiche.StatisticaInfo}
  922.      *
  923.      * @param statisticaInfo Object to be serialized
  924.      * @param prettyPrint if true output the XML with indenting
  925.      * @return Object to be serialized in byte array
  926.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  927.      */
  928.     public byte[] toByteArray(StatisticaInfo statisticaInfo,boolean prettyPrint) throws SerializerException {
  929.         return this.objToXml(StatisticaInfo.class, statisticaInfo, prettyPrint).toByteArray();
  930.     }
  931.    
  932.     /**
  933.      * Serialize to String the object <var>statisticaInfo</var> of type {@link org.openspcoop2.core.statistiche.StatisticaInfo}
  934.      *
  935.      * @param statisticaInfo Object to be serialized
  936.      * @return Object to be serialized as String
  937.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  938.      */
  939.     public String toString(StatisticaInfo statisticaInfo) throws SerializerException {
  940.         return this.objToXml(StatisticaInfo.class, statisticaInfo, false).toString();
  941.     }
  942.     /**
  943.      * Serialize to String the object <var>statisticaInfo</var> of type {@link org.openspcoop2.core.statistiche.StatisticaInfo}
  944.      *
  945.      * @param statisticaInfo Object to be serialized
  946.      * @param prettyPrint if true output the XML with indenting
  947.      * @return Object to be serialized as String
  948.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  949.      */
  950.     public String toString(StatisticaInfo statisticaInfo,boolean prettyPrint) throws SerializerException {
  951.         return this.objToXml(StatisticaInfo.class, statisticaInfo, prettyPrint).toString();
  952.     }
  953.    
  954.    
  955.    

  956. }