01: package org.geotools.po.bindings;
02:
03: import org.eclipse.xsd.XSDSchema;
04: import org.eclipse.xsd.util.XSDSchemaLocationResolver;
05:
06: /**
07: *
08: * @generated
09: */
10: public class POSchemaLocationResolver implements
11: XSDSchemaLocationResolver {
12:
13: /**
14: * <!-- begin-user-doc -->
15: * <!-- end-user-doc -->
16: *
17: * @generated modifiable
18: */
19: public String resolveSchemaLocation(XSDSchema xsdSchema,
20: String namespaceURI, String schemaLocationURI) {
21: if (schemaLocationURI == null)
22: return null;
23:
24: //if no namespace given, assume default for the current schema
25: if ((namespaceURI == null || "".equals(namespaceURI))
26: && xsdSchema != null) {
27: namespaceURI = xsdSchema.getTargetNamespace();
28: }
29:
30: if ("http://www.geotools.org/po".equals(namespaceURI)) {
31: if (schemaLocationURI.endsWith("po.xsd")) {
32: return getClass().getResource("po.xsd").toString();
33: }
34: }
35:
36: return null;
37: }
38:
39: }
|