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.SMIL20;
22: import org.geotools.gml3.bindings.smil.SMIL20BindingConfiguration;
23: import org.geotools.gml3.bindings.smil.SMIL20SchemaLocationResolver;
24: import org.geotools.xml.BindingConfiguration;
25: import org.geotools.xml.Configuration;
26:
27: /**
28: * Parser configuration for SMIL20 schema.
29: *
30: * @author Justin Deoliveira, The Open Planning Project
31: *
32: */
33: public class SMIL20Configuration extends Configuration {
34: /**
35: * @return {@link SMIL20#NAMESPACE}
36: */
37: public String getNamespaceURI() {
38: return SMIL20.NAMESPACE;
39: }
40:
41: /**
42: * @return URL to smil20.xsd file of schema.
43: */
44: public String getSchemaFileURL() {
45: return getSchemaLocationResolver().resolveSchemaLocation(null,
46: getNamespaceURI(), "smil20.xsd");
47: }
48:
49: /**
50: * @return new instance of {@link SMIL20BindingConfiguration}
51: */
52: public BindingConfiguration getBindingConfiguration() {
53: return new SMIL20BindingConfiguration();
54: }
55:
56: /**
57: * @return new instance of {@link SMIL20SchemaLocationResolver}
58: */
59: public XSDSchemaLocationResolver getSchemaLocationResolver() {
60: return new SMIL20SchemaLocationResolver();
61: }
62: }
|