1 /*
2  * JasperReports - Free Java Reporting Library.
3  * Copyright (C) 2001 - 2019 TIBCO Software Inc. All rights reserved.
4  * http://www.jaspersoft.com
5  *
6  * Unless you have purchased a commercial license agreement from Jaspersoft,
7  * the following license terms apply:
8  *
9  * This program is part of JasperReports.
10  *
11  * JasperReports is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License as published by
13  * the Free Software Foundation, either version 3 of the License, or
14  * (at your option) any later version.
15  *
16  * JasperReports is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Lesser General Public License for more details.
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * along with JasperReports. If not, see <http://www.gnu.org/licenses/>.
23  */

24 package net.sf.jasperreports.engine.component;
25
26
27 /**
28  * The default {@link ComponentsXmlParser} implementation.
29  * 
30  * @author Lucian Chirita (lucianc@users.sourceforge.net)
31  */

32 public class DefaultComponentXmlParser implements ComponentsXmlParser
33 {
34
35     private String namespace;
36     private String publicSchemaLocation;
37     private String internalSchemaResource;
38     private XmlDigesterConfigurer digesterConfigurer;
39     
40     @Override
41     public String getNamespace()
42     {
43         return namespace;
44     }
45     
46     /**
47      * Sets the components namespace.
48      * 
49      * @param namespace the components namespace
50      * @see #getNamespace()
51      */

52     public void setNamespace(String namespace)
53     {
54         this.namespace = namespace;
55     }
56     
57     @Override
58     public XmlDigesterConfigurer getDigesterConfigurer()
59     {
60         return digesterConfigurer;
61     }
62     
63     /**
64      * Sets the components digester configurer.
65      * 
66      * @param digesterConfigurer the components digester configurer
67      * @see #getDigesterConfigurer()
68      */

69     public void setDigesterConfigurer(XmlDigesterConfigurer digesterConfigurer)
70     {
71         this.digesterConfigurer = digesterConfigurer;
72     }
73
74     @Override
75     public String getPublicSchemaLocation()
76     {
77         return publicSchemaLocation;
78     }
79
80     /**
81      * Sets the public location of the components XML schema.
82      * 
83      * @param publicSchemaLocation the components XML schema public location
84      * @see #getPublicSchemaLocation()
85      */

86     public void setPublicSchemaLocation(String publicSchemaLocation)
87     {
88         this.publicSchemaLocation = publicSchemaLocation;
89     }
90
91     @Override
92     public String getInternalSchemaResource()
93     {
94         return internalSchemaResource;
95     }
96
97     /**
98      * Sets the internal XML schema resource name. 
99      * 
100      * @param internalSchemaResource the internal XML schema resource name
101      * @see #getInternalSchemaResource()
102      */

103     public void setInternalSchemaResource(String internalSchemaResource)
104     {
105         this.internalSchemaResource = internalSchemaResource;
106     }
107
108 }
109