Revision 12418 trunk/libraries/libGPE/src/org/gvsig/gpe/warnings/NotSupportedFeatureWarning.java
NotSupportedFeatureWarning.java | ||
---|---|---|
49 | 49 |
* |
50 | 50 |
* $Id$ |
51 | 51 |
* $Log$ |
52 |
* Revision 1.1 2007-06-28 13:04:33 jorpiell |
|
52 |
* Revision 1.2 2007-06-29 12:19:14 jorpiell |
|
53 |
* The schema validation is made independently of the concrete writer |
|
54 |
* |
|
55 |
* Revision 1.1 2007/06/28 13:04:33 jorpiell |
|
53 | 56 |
* The Qname has been updated to the 1.5 JVM machine. The schema validation is made in the GPEWriterHandlerImplementor class |
54 | 57 |
* |
55 | 58 |
* |
56 | 59 |
*/ |
57 | 60 |
/** |
58 |
* Thrown when |
|
59 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
61 |
* It is thrown when there is an feture that can not |
|
62 |
* be validated using the XML Schema |
|
63 |
* @author Jorge Piera Llodr? (jorge.piera@iver.es) |
|
64 |
* @author Carlos S?nchez Peri??n (sanchez_carper@gva.es) |
|
60 | 65 |
*/ |
61 | 66 |
public class NotSupportedFeatureWarning extends BaseException{ |
62 | 67 |
private static final long serialVersionUID = -907568605199930636L; |
... | ... | |
64 | 69 |
private String xsFeatureType = null; |
65 | 70 |
private String layerName = null; |
66 | 71 |
private String xsLayerType = null; |
72 |
private boolean hasParentSchema = false; |
|
67 | 73 |
|
68 |
|
|
69 |
|
|
70 | 74 |
public NotSupportedFeatureWarning(String featureName, String xsFeatureType, String layerName, String xsLayerType) { |
71 | 75 |
super(); |
72 | 76 |
this.featureName = featureName; |
73 | 77 |
this.xsFeatureType = xsFeatureType; |
74 | 78 |
this.layerName = layerName; |
75 | 79 |
this.xsLayerType = xsLayerType; |
80 |
hasParentSchema = true; |
|
76 | 81 |
initialize(); |
77 | 82 |
} |
83 |
|
|
84 |
public NotSupportedFeatureWarning(String featureName, String xsFeatureType) { |
|
85 |
super(); |
|
86 |
this.featureName = featureName; |
|
87 |
this.xsFeatureType = xsFeatureType; |
|
88 |
hasParentSchema = false; |
|
89 |
initialize(); |
|
90 |
} |
|
78 | 91 |
|
79 | 92 |
/** |
80 | 93 |
* Initialize the properties |
81 | 94 |
*/ |
82 | 95 |
private void initialize() { |
83 | 96 |
messageKey = "gpe_not_supported_feature_warning"; |
84 |
formatString = "The feature '%(featureName)' with a XML schema " + |
|
97 |
if (hasParentSchema){ |
|
98 |
formatString = "The feature '%(featureName)' with a XML schema " + |
|
85 | 99 |
"type '%(xsFeatureType)' is not contained in the parent layer " + |
86 | 100 |
"'%(layerName)' with a XML Schema type '%(xsLayerType)'"; |
101 |
}else{ |
|
102 |
formatString = "The feature '%(featureName)' with a XML schema " + |
|
103 |
"type '%(xsFeatureType)' is not found on the XML schema "; |
|
104 |
} |
|
87 | 105 |
code = serialVersionUID; |
88 | 106 |
} |
89 | 107 |
|
... | ... | |
95 | 113 |
Hashtable hash = new Hashtable(); |
96 | 114 |
hash.put("featureName", featureName); |
97 | 115 |
hash.put("xsFeatureType", xsFeatureType); |
98 |
hash.put("layerName", layerName); |
|
99 |
hash.put("xsLayerType", xsLayerType); |
|
116 |
if (hasParentSchema){ |
|
117 |
hash.put("layerName", layerName); |
|
118 |
hash.put("xsLayerType", xsLayerType); |
|
119 |
} |
|
100 | 120 |
return hash; |
101 | 121 |
} |
102 | 122 |
} |
Also available in: Unified diff