01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2002-2006, GeoTools Project Managment Committee (PMC)
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation;
09: * version 2.1 of the License.
10: *
11: * This library 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 GNU
14: * Lesser General Public License for more details.
15: */
16: package org.geotools.gml3.smil;
17:
18: import org.eclipse.xsd.util.XSDSchemaLocationResolver;
19: import java.net.MalformedURLException;
20: import java.net.URL;
21: import org.geotools.gml3.bindings.smil.SMIL20LANG;
22: import org.geotools.gml3.bindings.smil.SMIL20LANGBindingConfiguration;
23: import org.geotools.gml3.bindings.smil.SMIL20SchemaLocationResolver;
24: import org.geotools.xml.BindingConfiguration;
25: import org.geotools.xml.Configuration;
26:
27: public class SMIL20LANGConfiguration extends Configuration {
28: /**
29: * @return {@link SMIL20LANG#NAMESPACE}
30: */
31: public String getNamespaceURI() {
32: return SMIL20LANG.NAMESPACE;
33: }
34:
35: /**
36: * @return URL to smil20-language.xsd file of schema.
37: */
38: public String getSchemaFileURL() {
39: return getSchemaLocationResolver().resolveSchemaLocation(null,
40: getNamespaceURI(), "smil20-language.xsd");
41: }
42:
43: /**
44: * @return A new instance of {@link SMIL20LANGBindingConfiguration}
45: */
46: public BindingConfiguration getBindingConfiguration() {
47: return new SMIL20LANGBindingConfiguration();
48: }
49:
50: /**
51: * @return A new instance of {@link SMIL20SchemaLocationResolver}
52: */
53: public XSDSchemaLocationResolver getSchemaLocationResolver() {
54: return new SMIL20SchemaLocationResolver();
55: }
56: }
|