01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2003-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.data;
17:
18: import java.io.IOException;
19:
20: /**
21: * Indicates a FeatureType could not be found.
22: *
23: * @author Jody Garnett, Refractions Research
24: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/main/src/main/java/org/geotools/data/SchemaNotFoundException.java $
25: */
26: public class SchemaNotFoundException extends IOException {
27: private static final long serialVersionUID = 1L;
28:
29: static final String NOT_FOUND = "Feature type could not be found for ";
30: private String typeName;
31:
32: public SchemaNotFoundException(String typeName) {
33: super (NOT_FOUND + typeName);
34: typeName = null;
35: }
36:
37: public SchemaNotFoundException(String typeName, Throwable t) {
38: this (typeName);
39: initCause(t);
40: }
41:
42: /**
43: * Query TypeName that a FeatureType could not be found for.
44: *
45: * @return Unfound type name
46: */
47: String getTypeName() {
48: return typeName;
49: }
50: }
|