ValidatoreXSD.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.utils.xml;

  21. import java.io.File;
  22. import java.io.InputStream;

  23. import javax.xml.transform.Source;
  24. import javax.xml.validation.Schema;

  25. import org.slf4j.Logger;
  26. import org.w3c.dom.Node;
  27. import org.w3c.dom.ls.LSResourceResolver;

  28. /**
  29.  * ValidatoreXSD
  30.  *
  31.  *
  32.  * @author Poli Andrea (apoli@link.it)
  33.  * @author $Author$
  34.  * @version $Rev$, $Date$
  35.  */
  36. public class ValidatoreXSD extends AbstractValidatoreXSD {

  37.     @Override
  38.     public byte[] getAsByte(Node nodeXML) throws XMLException {
  39.         try{
  40.             return XMLUtils.getInstance().toByteArray(nodeXML);
  41.         }catch(Exception e){
  42.             throw new XMLException(e.getMessage(),e);
  43.         }
  44.     }
  45.    

  46.     public ValidatoreXSD(Logger log, File... file) throws Exception {
  47.         super(log, file);
  48.        
  49.     }

  50.     public ValidatoreXSD(Logger log, File file) throws Exception {
  51.         super(log, file);
  52.        
  53.     }

  54.     public ValidatoreXSD(Logger log, InputStream... inputStream)
  55.             throws Exception {
  56.         super(log, inputStream);
  57.        
  58.     }

  59.     public ValidatoreXSD(Logger log, InputStream inputStream) throws Exception {
  60.         super(log, inputStream);
  61.        
  62.     }

  63.     public ValidatoreXSD(Logger log, LSResourceResolver lsResourceResolver,
  64.             File... file) throws Exception {
  65.         super(log, lsResourceResolver, file);
  66.        
  67.     }

  68.     public ValidatoreXSD(Logger log, LSResourceResolver lsResourceResolver,
  69.             File file) throws Exception {
  70.         super(log, lsResourceResolver, file);
  71.        
  72.     }

  73.     public ValidatoreXSD(Logger log, LSResourceResolver lsResourceResolver,
  74.             InputStream... inputStream) throws Exception {
  75.         super(log, lsResourceResolver, inputStream);
  76.        
  77.     }

  78.     public ValidatoreXSD(Logger log, LSResourceResolver lsResourceResolver,
  79.             InputStream inputStream) throws Exception {
  80.         super(log, lsResourceResolver, inputStream);
  81.        
  82.     }

  83.     public ValidatoreXSD(Logger log, LSResourceResolver lsResourceResolver,
  84.             Node... schema) throws Exception {
  85.         super(log, lsResourceResolver, schema);
  86.        
  87.     }

  88.     public ValidatoreXSD(Logger log, LSResourceResolver lsResourceResolver,
  89.             Node schema) throws Exception {
  90.         super(log, lsResourceResolver, schema);
  91.        
  92.     }

  93.     public ValidatoreXSD(Logger log, LSResourceResolver lsResourceResolver,
  94.             Source... source) throws Exception {
  95.         super(log, lsResourceResolver, source);
  96.        
  97.     }

  98.     public ValidatoreXSD(Logger log, LSResourceResolver lsResourceResolver,
  99.             Source source) throws Exception {
  100.         super(log, lsResourceResolver, source);
  101.        
  102.     }

  103.     public ValidatoreXSD(Logger log, LSResourceResolver lsResourceResolver,
  104.             String... url) throws Exception {
  105.         super(log, lsResourceResolver, url);
  106.        
  107.     }

  108.     public ValidatoreXSD(Logger log, LSResourceResolver lsResourceResolver,
  109.             String url) throws Exception {
  110.         super(log, lsResourceResolver, url);
  111.        
  112.     }

  113.     public ValidatoreXSD(Logger log, Node... schema) throws Exception {
  114.         super(log, schema);
  115.        
  116.     }

  117.     public ValidatoreXSD(Logger log, Node schema) throws Exception {
  118.         super(log, schema);
  119.        
  120.     }

  121.     public ValidatoreXSD(Logger log, Source... source) throws Exception {
  122.         super(log, source);
  123.        
  124.     }

  125.     public ValidatoreXSD(Logger log, Source source) throws Exception {
  126.         super(log, source);
  127.        
  128.     }

  129.     public ValidatoreXSD(Logger log, String schemaFactory, File... file)
  130.             throws Exception {
  131.         super(log, schemaFactory, file);
  132.        
  133.     }

  134.     public ValidatoreXSD(Logger log, String schemaFactory, File file)
  135.             throws Exception {
  136.         super(log, schemaFactory, file);
  137.        
  138.     }

  139.     public ValidatoreXSD(Logger log, String schemaFactory,
  140.             InputStream... inputStream) throws Exception {
  141.         super(log, schemaFactory, inputStream);
  142.        
  143.     }

  144.     public ValidatoreXSD(Logger log, String schemaFactory,
  145.             InputStream inputStream) throws Exception {
  146.         super(log, schemaFactory, inputStream);
  147.        
  148.     }

  149.     public ValidatoreXSD(Logger log, String schemaFactory,
  150.             LSResourceResolver lsResourceResolver, File... file)
  151.             throws Exception {
  152.         super(log, schemaFactory, lsResourceResolver, file);
  153.        
  154.     }

  155.     public ValidatoreXSD(Logger log, String schemaFactory,
  156.             LSResourceResolver lsResourceResolver, File file) throws Exception {
  157.         super(log, schemaFactory, lsResourceResolver, file);
  158.        
  159.     }

  160.     public ValidatoreXSD(Logger log, String schemaFactory,
  161.             LSResourceResolver lsResourceResolver, InputStream... inputStream)
  162.             throws Exception {
  163.         super(log, schemaFactory, lsResourceResolver, inputStream);
  164.        
  165.     }

  166.     public ValidatoreXSD(Logger log, String schemaFactory,
  167.             LSResourceResolver lsResourceResolver, InputStream inputStream)
  168.             throws Exception {
  169.         super(log, schemaFactory, lsResourceResolver, inputStream);
  170.        
  171.     }

  172.     public ValidatoreXSD(Logger log, String schemaFactory,
  173.             LSResourceResolver lsResourceResolver, Node... schema)
  174.             throws Exception {
  175.         super(log, schemaFactory, lsResourceResolver, schema);
  176.        
  177.     }

  178.     public ValidatoreXSD(Logger log, String schemaFactory,
  179.             LSResourceResolver lsResourceResolver, Node schema)
  180.             throws Exception {
  181.         super(log, schemaFactory, lsResourceResolver, schema);
  182.        
  183.     }

  184.     public ValidatoreXSD(Logger log, String schemaFactory,
  185.             LSResourceResolver lsResourceResolver, Source... source)
  186.             throws Exception {
  187.         super(log, schemaFactory, lsResourceResolver, source);
  188.        
  189.     }

  190.     public ValidatoreXSD(Logger log, String schemaFactory,
  191.             LSResourceResolver lsResourceResolver, Source source)
  192.             throws Exception {
  193.         super(log, schemaFactory, lsResourceResolver, source);
  194.        
  195.     }

  196.     public ValidatoreXSD(Logger log, String schemaFactory,
  197.             LSResourceResolver lsResourceResolver, String... url)
  198.             throws Exception {
  199.         super(log, schemaFactory, lsResourceResolver, url);
  200.        
  201.     }

  202.     public ValidatoreXSD(Logger log, String schemaFactory,
  203.             LSResourceResolver lsResourceResolver, String url) throws Exception {
  204.         super(log, schemaFactory, lsResourceResolver, url);
  205.        
  206.     }

  207.     public ValidatoreXSD(Logger log, String schemaFactory, Node... schema)
  208.             throws Exception {
  209.         super(log, schemaFactory, schema);
  210.        
  211.     }

  212.     public ValidatoreXSD(Logger log, String schemaFactory, Node schema)
  213.             throws Exception {
  214.         super(log, schemaFactory, schema);
  215.        
  216.     }

  217.     public ValidatoreXSD(Logger log, String schemaFactory, Source... source)
  218.             throws Exception {
  219.         super(log, schemaFactory, source);
  220.        
  221.     }

  222.     public ValidatoreXSD(Logger log, String schemaFactory, Source source)
  223.             throws Exception {
  224.         super(log, schemaFactory, source);
  225.        
  226.     }

  227.     public ValidatoreXSD(Logger log, String schemaFactory, String... url)
  228.             throws Exception {
  229.         super(log, schemaFactory, url);
  230.        
  231.     }

  232.     public ValidatoreXSD(Logger log, String schemaFactory, String url)
  233.             throws Exception {
  234.         super(log, schemaFactory, url);
  235.        
  236.     }

  237.     public ValidatoreXSD(Logger log, String... url) throws Exception {
  238.         super(log, url);
  239.        
  240.     }

  241.     public ValidatoreXSD(Logger log, String url) throws Exception {
  242.         super(log, url);
  243.        
  244.     }

  245.     public ValidatoreXSD(Schema schema) throws Exception {
  246.         super(schema);
  247.        
  248.     }


  249.     @Override
  250.     public AbstractXMLUtils getXMLUtils() {
  251.         return XMLUtils.getInstance();
  252.     }



  253. }