Revision 11203 trunk/libraries/libGPE/src-test/org/gvsig/gpe/GPEContentHandlerTest.java

View differences:

GPEContentHandlerTest.java
43 43
 *
44 44
 * $Id$
45 45
 * $Log$
46
 * Revision 1.1  2007-04-12 17:06:42  jorpiell
46
 * Revision 1.2  2007-04-13 13:14:55  jorpiell
47
 * Created the base tests and add some methods to the content handler
48
 *
49
 * Revision 1.1  2007/04/12 17:06:42  jorpiell
47 50
 * First GML writing tests
48 51
 *
49 52
 *
......
52 55
 * @author Jorge Piera LLodr? (jorge.piera@iver.es)
53 56
 */
54 57
public class GPEContentHandlerTest extends GPEContentHandler{
58
	private String tab = "";
55 59
	
60
	public Object startLayer(Object parent, Object bBox, String id,
61
			String name, String description,String srs) {
62
		System.out.print(tab + "Start Layer: " + name + "\n");
63
		tab = tab + "\t";
64
		return null;
65
	}
56 66

  
67
	public void endLayer(Object layer) {
68
		tab = tab.substring(0, tab.length()-1);
69
		System.out.print(tab + "End Layer\n");
70

  
71
	}
72

  
73
	public void addNameToLayer(Object layer,String name){
74
		System.out.print(tab + "Layer name changed: " + name + "\n");
75
	}
76
	
77
	public void addDescriptionToLayer(Object layer,String description){
78
		System.out.print(tab + "Layer description changed: " + description + "\n");
79
	}	
80
	
81
	public Object startElement(Object parent, String name, Object value,
82
			Object type) {
83
		// TODO Ap?ndice de m?todo generado autom?ticamente
84
		return null;
85
	}
86

  
87
	public void endElement(Object element) {
88
		// TODO Ap?ndice de m?todo generado autom?ticamente
89

  
90
	}
91

  
92
	public Object startBbox(double[] x, double[] y, double[] z, String id,
93
			String srs) {
94
		// TODO Ap?ndice de m?todo generado autom?ticamente
95
		return null;
96
	}
97

  
98
	public void endBbox(Object bbox) {
99
		// TODO Ap?ndice de m?todo generado autom?ticamente
100

  
101
	}
102

  
103
	public Object startPoint(double x, double y, double z, String id, String srs) {
104
		System.out.print(tab + "Start Point, SRS:" + srs + "\n");
105
		tab = tab + "\t";
106
		System.out.print(tab + x + "," + y + "," + z + "\n");
107
		tab = tab.substring(0, tab.length()-1);
108
		return null;
109
	}
110

  
111
	public void endPoint(Object point) {
112
		System.out.print(tab + "End Point\n");
113
	}
114

  
115
	public Object startLineString(double[] x, double[] y, double[] z, String id,
116
			String srs) {
117
		System.out.print(tab + "Start LineString, SRS:" + srs + "\n");
118
		tab = tab + "\t";
119
		for (int i=0 ; i<x.length ; i++){
120
			System.out.print(tab + x[i] + "," + y[i] + "," + z[i] + "\n");
121
		}
122
		tab = tab.substring(0, tab.length()-1);
123
		return null;
124
	}
125

  
126
	public void endLineString(Object line) {
127
		System.out.print(tab + "End LineString:\n");
128
	}
129

  
130
	public Object startLinearRing(double[] x, double[] y, double[] z, String id,
131
			String srs) {
132
		// TODO Ap?ndice de m?todo generado autom?ticamente
133
		return null;
134
	}
135

  
136
	public void endLinearRing(Object linearRing) {
137
		// TODO Ap?ndice de m?todo generado autom?ticamente
138

  
139
	}
140

  
141
	public Object startPolygon(double[] x, double[] y, double[] z, String id,
142
			String srs) {
143
		// TODO Ap?ndice de m?todo generado autom?ticamente
144
		return null;
145
	}
146

  
147
	public void endPolygon(Object polygon) {
148
		// TODO Ap?ndice de m?todo generado autom?ticamente
149

  
150
	}
151

  
152
	public void addInnerBoundary(Object polygon, Object linearRing) {
153
		// TODO Ap?ndice de m?todo generado autom?ticamente
154

  
155
	}
156

  
157
	public void addOuterBoundary(Object polygon, Object linearRing) {
158
		// TODO Ap?ndice de m?todo generado autom?ticamente
159

  
160
	}
161

  
162
	public boolean isViewInBox(Object bbox, Object view) {
163
		// TODO Ap?ndice de m?todo generado autom?ticamente
164
		return false;
165
	}
166

  
167
	public boolean isGeometryInBox(Object bbox, Object geometry) {
168
		// TODO Ap?ndice de m?todo generado autom?ticamente
169
		return false;
170
	}
171

  
172
	public void addFeature(Object layer, Object feature) {
173
		// TODO Ap?ndice de m?todo generado autom?ticamente
174

  
175
	}
176

  
177
	public void addBbox(Object item, Object bbox) {
178
		// TODO Ap?ndice de m?todo generado autom?ticamente
179

  
180
	}
181

  
182
	public void addElement(Object feature, Object element) {
183
		// TODO Ap?ndice de m?todo generado autom?ticamente
184

  
185
	}
186

  
187
	public void addGeometry(Object feature, Object geometry) {
188
		// TODO Ap?ndice de m?todo generado autom?ticamente
189

  
190
	}
191

  
192
	public Object startFeature(String name, String id) {
193
		System.out.print(tab + "Start Feature: " + name + "\n");
194
		return null;
195
	}
196
	
197
	public void addNameToFeature(Object feature, String name){
198
		System.out.print(tab + "Feature name changed: " + name + "\n");
199
	}
200
	
201
	public void endFeature(Object feature) {
202
		System.out.print(tab + "End Feature\n");		
203
	}
204
	
57 205
}
206

  

Also available in: Unified diff