Xml2JsonFactory.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. /**
  21.  *
  22.  */
  23. package org.openspcoop2.utils.xml2json;

  24. import java.util.Map;

  25. import org.codehaus.jettison.mapped.Configuration;

  26. /**
  27.  * @author Bussu Giovanni (bussu@link.it)
  28.  * @author  $Author$
  29.  * @version $Rev$, $Date$
  30.  *
  31.  */
  32. public class Xml2JsonFactory {
  33.    
  34.     public static IXml2Json getXml2JsonJsonML(){
  35.         return new JsonMLXml2Json();
  36.     }
  37.     public static IXml2Json getXml2JsonBadgerFish() {
  38.         return new BadgerFishXml2Json();
  39.     }
  40.     public static IXml2Json getXml2JsonMapped() {
  41.         return new MappedXml2Json();
  42.     }
  43.     public static IXml2Json getXml2JsonMapped(Configuration configuration) {
  44.         return new MappedXml2Json(configuration);
  45.     }
  46.     public static IXml2Json getXml2JsonMapped(Map<String, String> xmlToJsonNamespaces) {
  47.         return new MappedXml2Json(xmlToJsonNamespaces);
  48.     }

  49.     public static IJson2Xml getJson2XmlJsonML(){
  50.         return new JsonMLJson2Xml();
  51.     }
  52.     public static IJson2Xml getJson2XmlBadgerFish() {
  53.         return new BadgerFishJson2Xml();
  54.     }
  55.     public static IJson2Xml getJson2XmlMapped(Configuration configuration) {
  56.         return new MappedJson2Xml(configuration);
  57.     }
  58.     public static IJson2Xml getJson2XmlMapped(Map<String, String> xmlToJsonNamespaces) {
  59.         return new MappedJson2Xml(xmlToJsonNamespaces);
  60.     }
  61. }