AbstractDeserializer.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 it.cnipa.schemas._2003.egovit.exception1_0.utils.serializer;

  21. import org.openspcoop2.generic_project.exception.DeserializerException;

  22. import it.cnipa.schemas._2003.egovit.exception1_0.EccezioneBusta;
  23. import it.cnipa.schemas._2003.egovit.exception1_0.Eccezione;
  24. import it.cnipa.schemas._2003.egovit.exception1_0.EccezioneProcessamento;
  25. import it.cnipa.schemas._2003.egovit.exception1_0.MessaggioDiErroreApplicativo;

  26. import java.io.InputStream;
  27. import java.io.File;

  28. /**    
  29.  * XML Deserializer of beans
  30.  *
  31.  * @author Poli Andrea (poli@link.it)
  32.  * @author $Author$
  33.  * @version $Rev$, $Date$
  34.  */

  35. public abstract class AbstractDeserializer extends org.openspcoop2.generic_project.serializer.AbstractDeserializerBase {



  36.     /*
  37.      =================================================================================
  38.      Object: EccezioneBusta
  39.      =================================================================================
  40.     */
  41.    
  42.     /**
  43.      * Transform the xml in <var>fileName</var> in the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.EccezioneBusta}
  44.      *
  45.      * @param fileName Xml file to use for the reconstruction of the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.EccezioneBusta}
  46.      * @return Object type {@link it.cnipa.schemas._2003.egovit.exception1_0.EccezioneBusta}
  47.      * @throws DeserializerException The exception that is thrown when an error occurs during deserialization
  48.      */
  49.     public EccezioneBusta readEccezioneBusta(String fileName) throws DeserializerException {
  50.         return (EccezioneBusta) this.xmlToObj(fileName, EccezioneBusta.class);
  51.     }
  52.    
  53.     /**
  54.      * Transform the xml in <var>file</var> in the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.EccezioneBusta}
  55.      *
  56.      * @param file Xml file to use for the reconstruction of the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.EccezioneBusta}
  57.      * @return Object type {@link it.cnipa.schemas._2003.egovit.exception1_0.EccezioneBusta}
  58.      * @throws DeserializerException The exception that is thrown when an error occurs during deserialization
  59.      */
  60.     public EccezioneBusta readEccezioneBusta(File file) throws DeserializerException {
  61.         return (EccezioneBusta) this.xmlToObj(file, EccezioneBusta.class);
  62.     }
  63.    
  64.     /**
  65.      * Transform the input stream <var>in</var> in the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.EccezioneBusta}
  66.      *
  67.      * @param in InputStream to use for the reconstruction of the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.EccezioneBusta}
  68.      * @return Object type {@link it.cnipa.schemas._2003.egovit.exception1_0.EccezioneBusta}
  69.      * @throws DeserializerException The exception that is thrown when an error occurs during deserialization
  70.      */
  71.     public EccezioneBusta readEccezioneBusta(InputStream in) throws DeserializerException {
  72.         return (EccezioneBusta) this.xmlToObj(in, EccezioneBusta.class);
  73.     }  
  74.    
  75.     /**
  76.      * Transform the byte array <var>in</var> in the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.EccezioneBusta}
  77.      *
  78.      * @param in Byte array to use for the reconstruction of the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.EccezioneBusta}
  79.      * @return Object type {@link it.cnipa.schemas._2003.egovit.exception1_0.EccezioneBusta}
  80.      * @throws DeserializerException The exception that is thrown when an error occurs during deserialization
  81.      */
  82.     public EccezioneBusta readEccezioneBusta(byte[] in) throws DeserializerException {
  83.         return (EccezioneBusta) this.xmlToObj(in, EccezioneBusta.class);
  84.     }  
  85.    
  86.     /**
  87.      * Transform the String <var>in</var> in the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.EccezioneBusta}
  88.      *
  89.      * @param in String to use for the reconstruction of the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.EccezioneBusta}
  90.      * @return Object type {@link it.cnipa.schemas._2003.egovit.exception1_0.EccezioneBusta}
  91.      * @throws DeserializerException The exception that is thrown when an error occurs during deserialization
  92.      */
  93.     public EccezioneBusta readEccezioneBustaFromString(String in) throws DeserializerException {
  94.         return (EccezioneBusta) this.xmlToObj(in.getBytes(), EccezioneBusta.class);
  95.     }  
  96.    
  97.    
  98.    
  99.     /*
  100.      =================================================================================
  101.      Object: Eccezione
  102.      =================================================================================
  103.     */
  104.    
  105.     /**
  106.      * Transform the xml in <var>fileName</var> in the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.Eccezione}
  107.      *
  108.      * @param fileName Xml file to use for the reconstruction of the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.Eccezione}
  109.      * @return Object type {@link it.cnipa.schemas._2003.egovit.exception1_0.Eccezione}
  110.      * @throws DeserializerException The exception that is thrown when an error occurs during deserialization
  111.      */
  112.     public Eccezione readEccezione(String fileName) throws DeserializerException {
  113.         return (Eccezione) this.xmlToObj(fileName, Eccezione.class);
  114.     }
  115.    
  116.     /**
  117.      * Transform the xml in <var>file</var> in the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.Eccezione}
  118.      *
  119.      * @param file Xml file to use for the reconstruction of the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.Eccezione}
  120.      * @return Object type {@link it.cnipa.schemas._2003.egovit.exception1_0.Eccezione}
  121.      * @throws DeserializerException The exception that is thrown when an error occurs during deserialization
  122.      */
  123.     public Eccezione readEccezione(File file) throws DeserializerException {
  124.         return (Eccezione) this.xmlToObj(file, Eccezione.class);
  125.     }
  126.    
  127.     /**
  128.      * Transform the input stream <var>in</var> in the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.Eccezione}
  129.      *
  130.      * @param in InputStream to use for the reconstruction of the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.Eccezione}
  131.      * @return Object type {@link it.cnipa.schemas._2003.egovit.exception1_0.Eccezione}
  132.      * @throws DeserializerException The exception that is thrown when an error occurs during deserialization
  133.      */
  134.     public Eccezione readEccezione(InputStream in) throws DeserializerException {
  135.         return (Eccezione) this.xmlToObj(in, Eccezione.class);
  136.     }  
  137.    
  138.     /**
  139.      * Transform the byte array <var>in</var> in the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.Eccezione}
  140.      *
  141.      * @param in Byte array to use for the reconstruction of the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.Eccezione}
  142.      * @return Object type {@link it.cnipa.schemas._2003.egovit.exception1_0.Eccezione}
  143.      * @throws DeserializerException The exception that is thrown when an error occurs during deserialization
  144.      */
  145.     public Eccezione readEccezione(byte[] in) throws DeserializerException {
  146.         return (Eccezione) this.xmlToObj(in, Eccezione.class);
  147.     }  
  148.    
  149.     /**
  150.      * Transform the String <var>in</var> in the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.Eccezione}
  151.      *
  152.      * @param in String to use for the reconstruction of the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.Eccezione}
  153.      * @return Object type {@link it.cnipa.schemas._2003.egovit.exception1_0.Eccezione}
  154.      * @throws DeserializerException The exception that is thrown when an error occurs during deserialization
  155.      */
  156.     public Eccezione readEccezioneFromString(String in) throws DeserializerException {
  157.         return (Eccezione) this.xmlToObj(in.getBytes(), Eccezione.class);
  158.     }  
  159.    
  160.    
  161.    
  162.     /*
  163.      =================================================================================
  164.      Object: EccezioneProcessamento
  165.      =================================================================================
  166.     */
  167.    
  168.     /**
  169.      * Transform the xml in <var>fileName</var> in the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.EccezioneProcessamento}
  170.      *
  171.      * @param fileName Xml file to use for the reconstruction of the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.EccezioneProcessamento}
  172.      * @return Object type {@link it.cnipa.schemas._2003.egovit.exception1_0.EccezioneProcessamento}
  173.      * @throws DeserializerException The exception that is thrown when an error occurs during deserialization
  174.      */
  175.     public EccezioneProcessamento readEccezioneProcessamento(String fileName) throws DeserializerException {
  176.         return (EccezioneProcessamento) this.xmlToObj(fileName, EccezioneProcessamento.class);
  177.     }
  178.    
  179.     /**
  180.      * Transform the xml in <var>file</var> in the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.EccezioneProcessamento}
  181.      *
  182.      * @param file Xml file to use for the reconstruction of the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.EccezioneProcessamento}
  183.      * @return Object type {@link it.cnipa.schemas._2003.egovit.exception1_0.EccezioneProcessamento}
  184.      * @throws DeserializerException The exception that is thrown when an error occurs during deserialization
  185.      */
  186.     public EccezioneProcessamento readEccezioneProcessamento(File file) throws DeserializerException {
  187.         return (EccezioneProcessamento) this.xmlToObj(file, EccezioneProcessamento.class);
  188.     }
  189.    
  190.     /**
  191.      * Transform the input stream <var>in</var> in the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.EccezioneProcessamento}
  192.      *
  193.      * @param in InputStream to use for the reconstruction of the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.EccezioneProcessamento}
  194.      * @return Object type {@link it.cnipa.schemas._2003.egovit.exception1_0.EccezioneProcessamento}
  195.      * @throws DeserializerException The exception that is thrown when an error occurs during deserialization
  196.      */
  197.     public EccezioneProcessamento readEccezioneProcessamento(InputStream in) throws DeserializerException {
  198.         return (EccezioneProcessamento) this.xmlToObj(in, EccezioneProcessamento.class);
  199.     }  
  200.    
  201.     /**
  202.      * Transform the byte array <var>in</var> in the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.EccezioneProcessamento}
  203.      *
  204.      * @param in Byte array to use for the reconstruction of the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.EccezioneProcessamento}
  205.      * @return Object type {@link it.cnipa.schemas._2003.egovit.exception1_0.EccezioneProcessamento}
  206.      * @throws DeserializerException The exception that is thrown when an error occurs during deserialization
  207.      */
  208.     public EccezioneProcessamento readEccezioneProcessamento(byte[] in) throws DeserializerException {
  209.         return (EccezioneProcessamento) this.xmlToObj(in, EccezioneProcessamento.class);
  210.     }  
  211.    
  212.     /**
  213.      * Transform the String <var>in</var> in the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.EccezioneProcessamento}
  214.      *
  215.      * @param in String to use for the reconstruction of the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.EccezioneProcessamento}
  216.      * @return Object type {@link it.cnipa.schemas._2003.egovit.exception1_0.EccezioneProcessamento}
  217.      * @throws DeserializerException The exception that is thrown when an error occurs during deserialization
  218.      */
  219.     public EccezioneProcessamento readEccezioneProcessamentoFromString(String in) throws DeserializerException {
  220.         return (EccezioneProcessamento) this.xmlToObj(in.getBytes(), EccezioneProcessamento.class);
  221.     }  
  222.    
  223.    
  224.    
  225.     /*
  226.      =================================================================================
  227.      Object: MessaggioDiErroreApplicativo
  228.      =================================================================================
  229.     */
  230.    
  231.     /**
  232.      * Transform the xml in <var>fileName</var> in the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.MessaggioDiErroreApplicativo}
  233.      *
  234.      * @param fileName Xml file to use for the reconstruction of the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.MessaggioDiErroreApplicativo}
  235.      * @return Object type {@link it.cnipa.schemas._2003.egovit.exception1_0.MessaggioDiErroreApplicativo}
  236.      * @throws DeserializerException The exception that is thrown when an error occurs during deserialization
  237.      */
  238.     public MessaggioDiErroreApplicativo readMessaggioDiErroreApplicativo(String fileName) throws DeserializerException {
  239.         return (MessaggioDiErroreApplicativo) this.xmlToObj(fileName, MessaggioDiErroreApplicativo.class);
  240.     }
  241.    
  242.     /**
  243.      * Transform the xml in <var>file</var> in the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.MessaggioDiErroreApplicativo}
  244.      *
  245.      * @param file Xml file to use for the reconstruction of the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.MessaggioDiErroreApplicativo}
  246.      * @return Object type {@link it.cnipa.schemas._2003.egovit.exception1_0.MessaggioDiErroreApplicativo}
  247.      * @throws DeserializerException The exception that is thrown when an error occurs during deserialization
  248.      */
  249.     public MessaggioDiErroreApplicativo readMessaggioDiErroreApplicativo(File file) throws DeserializerException {
  250.         return (MessaggioDiErroreApplicativo) this.xmlToObj(file, MessaggioDiErroreApplicativo.class);
  251.     }
  252.    
  253.     /**
  254.      * Transform the input stream <var>in</var> in the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.MessaggioDiErroreApplicativo}
  255.      *
  256.      * @param in InputStream to use for the reconstruction of the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.MessaggioDiErroreApplicativo}
  257.      * @return Object type {@link it.cnipa.schemas._2003.egovit.exception1_0.MessaggioDiErroreApplicativo}
  258.      * @throws DeserializerException The exception that is thrown when an error occurs during deserialization
  259.      */
  260.     public MessaggioDiErroreApplicativo readMessaggioDiErroreApplicativo(InputStream in) throws DeserializerException {
  261.         return (MessaggioDiErroreApplicativo) this.xmlToObj(in, MessaggioDiErroreApplicativo.class);
  262.     }  
  263.    
  264.     /**
  265.      * Transform the byte array <var>in</var> in the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.MessaggioDiErroreApplicativo}
  266.      *
  267.      * @param in Byte array to use for the reconstruction of the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.MessaggioDiErroreApplicativo}
  268.      * @return Object type {@link it.cnipa.schemas._2003.egovit.exception1_0.MessaggioDiErroreApplicativo}
  269.      * @throws DeserializerException The exception that is thrown when an error occurs during deserialization
  270.      */
  271.     public MessaggioDiErroreApplicativo readMessaggioDiErroreApplicativo(byte[] in) throws DeserializerException {
  272.         return (MessaggioDiErroreApplicativo) this.xmlToObj(in, MessaggioDiErroreApplicativo.class);
  273.     }  
  274.    
  275.     /**
  276.      * Transform the String <var>in</var> in the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.MessaggioDiErroreApplicativo}
  277.      *
  278.      * @param in String to use for the reconstruction of the object type {@link it.cnipa.schemas._2003.egovit.exception1_0.MessaggioDiErroreApplicativo}
  279.      * @return Object type {@link it.cnipa.schemas._2003.egovit.exception1_0.MessaggioDiErroreApplicativo}
  280.      * @throws DeserializerException The exception that is thrown when an error occurs during deserialization
  281.      */
  282.     public MessaggioDiErroreApplicativo readMessaggioDiErroreApplicativoFromString(String in) throws DeserializerException {
  283.         return (MessaggioDiErroreApplicativo) this.xmlToObj(in.getBytes(), MessaggioDiErroreApplicativo.class);
  284.     }  
  285.    
  286.    
  287.    

  288. }