01: package org.geotools.po.bindings;
02:
03: import org.eclipse.xsd.util.XSDSchemaLocationResolver;
04: import org.geotools.po.ObjectFactory;
05: import org.geotools.xml.BindingConfiguration;
06: import org.geotools.xml.Configuration;
07: import org.picocontainer.MutablePicoContainer;
08:
09: /**
10: * Parser configuration for the http://www.geotools.org/po schema.
11: *
12: * @generated
13: */
14: public class POConfiguration extends Configuration {
15:
16: /**
17: * Creates a new configuration.
18: *
19: * @generated
20: */
21: public POConfiguration() {
22: super ();
23:
24: //TODO: add dependencies here
25: }
26:
27: /**
28: * @return the schema namespace uri: http://www.geotools.org/po.
29: * @generated
30: */
31: public String getNamespaceURI() {
32: return PO.NAMESPACE;
33: }
34:
35: /**
36: * @return the uri to the the po.xsd .
37: * @generated
38: */
39: public String getSchemaFileURL() {
40: return getSchemaLocationResolver().resolveSchemaLocation(null,
41: getNamespaceURI(), "po.xsd");
42: }
43:
44: /**
45: * @return new instanceof {@link POBindingConfiguration%>}.
46: */
47: public BindingConfiguration getBindingConfiguration() {
48: return new POBindingConfiguration();
49: }
50:
51: /**
52: * @return A new instance of {@link POSchemaLocationResolver%>}.
53: */
54: public XSDSchemaLocationResolver getSchemaLocationResolver() {
55: return new POSchemaLocationResolver();
56: }
57:
58: /**
59: * Registers an instance of {@link ObjectFactory}.
60: */
61: protected void configureContext(MutablePicoContainer context) {
62: context.registerComponentImplementation(ObjectFactory.class);
63: }
64:
65: }
|