Revision 26500
tmp/trunk/servidor/WorkSpace_Servidor/Callejero/unittest/es/logex/callejero/core/CallejeroTest.java | ||
---|---|---|
57 | 57 |
conn = DriverManager.getConnection("jdbc:postgresql://logexvirt1/db_callejero", "callejero","xcvb"); |
58 | 58 |
Callejero callejero = new Callejero(conn); |
59 | 59 |
|
60 |
callejero.getMaxExtent(); |
|
60 |
callejero.getMaxExtent("parcelas");
|
|
61 | 61 |
|
62 | 62 |
} catch (Exception e) {e.printStackTrace();} |
63 | 63 |
finally{try{ |
tmp/trunk/servidor/WorkSpace_Servidor/Callejero/unittest/es/logex/callejero/core/GMLProducerTest.java | ||
---|---|---|
33 | 33 |
double[] cLow = new double[]{705270.05, 4385529.7}; |
34 | 34 |
double[] cHigh = new double[]{706724.02 , 4386435.13}; |
35 | 35 |
BoundingBox box = new BoundingBox(cLow, cHigh, "epsg.xml#23030"); |
36 |
ILayer lay = new Layer("parcelas",box,conn); |
|
36 |
Layer lay = new Layer("parcelas",box,conn); /*Ojo. estamos probando sólo layer, no ILayer*/ |
|
37 |
//TODO: Hacer el test para LayerFile |
|
37 | 38 |
|
38 |
GMLProducer gmlProd = new GMLProducer(); |
|
39 |
GMLProducer gmlProd = new GMLProducer(lay);
|
|
39 | 40 |
System.out.println(this.getClass().getName() + "\n"); |
40 |
System.out.println("Generado el fichero gml = " + gmlProd.toGml(lay)); |
|
41 | 41 |
|
42 |
//System.out.println("Generado el fichero gml = " + gmlProd.toGml()); |
|
43 |
|
|
44 |
throw new Exception("Not implented"); |
|
45 |
|
|
42 | 46 |
} |
43 | 47 |
catch (Throwable ex) { |
44 | 48 |
log.warn("Throwable in running this class [" + this.getClass().getName() + "]"); |
tmp/trunk/servidor/WorkSpace_Servidor/Callejero/conf/callejero.xml | ||
---|---|---|
1 | 1 |
<?xml version="1.0" encoding="UTF-8"?> |
2 | 2 |
<configuracion-callejero> |
3 |
<base-datos> |
|
4 |
<!-- indica si se usan estan propiedades para la conexión a base de datos |
|
5 |
o bien se utiliza jndi y el contexto del servidor de aplicaciones: valores 0 ò 1--> |
|
6 |
<servidoraplicaciones>false</servidoraplicaciones> |
|
7 |
<driver>org.postgresql.Driver</driver> |
|
8 |
<url>org:postgresql://127.0.0.1/</url> |
|
9 |
<basedatos>callejero</basedatos> |
|
10 |
<usuario>postgres</usuario> |
|
11 |
<pass>postgres</pass> |
|
12 |
<!-- usamos pool conexiones? TODO: gestionar pool para postgressql pgpool-ii --> |
|
13 |
<pool>no</pool> |
|
14 |
</base-datos> |
|
3 |
<WPSFiles> |
|
4 |
<folder> /var/www/wps-files/ </folder> |
|
5 |
<host>http://logexvirt2/wps-files/ </host> |
|
6 |
</WPSFiles> |
|
15 | 7 |
<layers> |
16 |
<layer> |
|
17 |
<nombre>parcelas</nombre> |
|
18 |
<activa>si</activa> |
|
19 |
</layer> |
|
20 |
<layer> |
|
21 |
<nombre>tramos</nombre> |
|
22 |
<activa>si</activa> |
|
23 |
</layer> |
|
24 |
<layer> |
|
25 |
<nombre>numpolicias</nombre> |
|
26 |
<activa>si</activa> |
|
27 |
</layer> |
|
28 |
<layer> |
|
29 |
<nombre>rotulospolicias</nombre> |
|
30 |
<activa>si</activa> |
|
31 |
</layer> |
|
32 |
<layer> |
|
33 |
<nombre>textos</nombre> |
|
34 |
<activa>si</activa> |
|
35 |
</layer> |
|
8 |
<name> municipios_geom,manzanas,calles, rotulospolicias, textos</name> |
|
36 | 9 |
</layers> |
37 | 10 |
</configuracion-callejero> |
tmp/trunk/servidor/WorkSpace_Servidor/Callejero/src/es/logex/callejero/core/Callejero.java | ||
---|---|---|
88 | 88 |
ResultSet r= null; |
89 | 89 |
|
90 | 90 |
try { |
91 |
if(log.isDebugEnabled()) |
|
92 |
{ |
|
93 |
log.debug("Executing SQL:" + query); |
|
94 |
} |
|
91 | 95 |
Statement s = conn.createStatement(); |
92 | 96 |
r = s.executeQuery(query); |
93 | 97 |
|
... | ... | |
104 | 108 |
* @return una lista de municipios |
105 | 109 |
*/ |
106 | 110 |
public List<String> getMunicipios() { |
111 |
ResultSet r = null; |
|
107 | 112 |
try{ |
108 | 113 |
if (this.municipios.isEmpty() ) { |
109 | 114 |
log.debug("Municipios vacío. Se llena por primera vez"); |
110 | 115 |
|
111 |
ResultSet r = this.EjecutaSql("select * from municipios");
|
|
116 |
r = this.EjecutaSql("select * from municipios"); |
|
112 | 117 |
while (r.next()) { |
113 | 118 |
municipios.add(r.getString("ine_denomina")); |
114 | 119 |
} |
120 |
|
|
115 | 121 |
log.debug("Añadidos " + r.getRow() + "municipios a Callejero.municipios"); |
116 | 122 |
} |
123 |
|
|
124 |
|
|
117 | 125 |
}catch (Exception e) { |
118 |
log.error("Error en getMunicipios()");
|
|
119 |
log.error(e.getMessage());}
|
|
126 |
log.error(e.getMessage(),e);
|
|
127 |
} |
|
120 | 128 |
finally{ |
121 |
return municipios;} |
|
122 |
} |
|
129 |
if(r!=null) |
|
130 |
{ |
|
131 |
try { |
|
132 |
r.close(); |
|
133 |
} catch (SQLException e) { |
|
134 |
// TODO Auto-generated catch block |
|
135 |
e.printStackTrace(); |
|
136 |
} |
|
137 |
} |
|
138 |
} |
|
139 |
return municipios; |
|
140 |
} |
|
123 | 141 |
|
124 | 142 |
/** |
125 | 143 |
* Dado el nombre de un municipio devuelve los 10 mejores |
... | ... | |
127 | 145 |
* sólo se devuelve el municipio encontrado. |
128 | 146 |
*/ |
129 | 147 |
public List<String> getMunicipiosLV(String municipio){ |
130 |
LevenshteinDistance lv = new LevenshteinDistance();; |
|
131 |
List<String> lista = new ArrayList<String>(); |
|
132 |
|
|
133 |
return lv.getTopX(municipio, getMunicipios(),10); |
|
148 |
ResultSet r = null; |
|
149 |
List<String> retMunis = new ArrayList<String>(); |
|
150 |
try{ |
|
151 |
|
|
152 |
|
|
153 |
r = this.EjecutaSql("select distinct ine_denomina, levenshtein(upper('"+municipio+ |
|
154 |
"'),upper(BUSQUEDA)) from municipios order by levenshtein(upper('"+municipio+ |
|
155 |
"'),upper(BUSQUEDA)) asc LIMIT 10"); |
|
156 |
while (r.next()) { |
|
157 |
retMunis.add(r.getString("ine_denomina")); |
|
158 |
} |
|
159 |
|
|
160 |
}catch (Exception e) { |
|
161 |
log.error(e.getMessage(),e); |
|
162 |
} |
|
163 |
finally{ |
|
164 |
if(r!=null) |
|
165 |
{ |
|
166 |
try { |
|
167 |
r.close(); |
|
168 |
} catch (SQLException e) { |
|
169 |
// TODO Auto-generated catch block |
|
170 |
e.printStackTrace(); |
|
171 |
} |
|
172 |
} |
|
173 |
} |
|
174 |
return retMunis; |
|
175 |
// LevenshteinDistance lv = new LevenshteinDistance();; |
|
176 |
// List<String> lista = new ArrayList<String>(); |
|
177 |
// |
|
178 |
// return lv.getTopX(municipio, getMunicipios(),10); |
|
134 | 179 |
|
135 | 180 |
} |
136 | 181 |
|
... | ... | |
144 | 189 |
} |
145 | 190 |
|
146 | 191 |
/** |
147 |
* Devuelve el extent máximo del callejero. En principio mira en la tabla de parcelas, pero quizás sería más riguroso mirar en todas las tablas
|
|
192 |
* Devuelve el extent máximo de la capa especificada. Quizás debería estar en un package de utils...
|
|
148 | 193 |
* y devolver los máximos... |
149 | 194 |
* @return |
150 | 195 |
* @throws Exception |
151 | 196 |
*/ |
152 |
public Rectangle2D getMaxExtent() throws Exception{
|
|
197 |
public Rectangle2D getMaxExtent(String layerName) throws Exception{
|
|
153 | 198 |
ResultSet r = null; |
154 | 199 |
Statement s = null; |
155 | 200 |
PGbox2d pgBox = null; |
156 | 201 |
|
157 | 202 |
try { |
158 | 203 |
s = conn.createStatement(); |
159 |
r = s.executeQuery("SELECT EXTENT(the_GEOM) as bbox FROM parcelas");
|
|
204 |
r = s.executeQuery("SELECT EXTENT(the_GEOM) as bbox FROM " + layerName);
|
|
160 | 205 |
|
161 | 206 |
if (r.next() ) { |
162 | 207 |
pgBox = (PGbox2d) r.getObject("bbox"); |
163 | 208 |
} |
164 | 209 |
|
165 |
Rectangle2D rec = new Rectangle2D.Double(pgBox.getLLB().x,pgBox.getLLB().y, pgBox.getURT().x, pgBox.getURT().y) ; |
|
210 |
Rectangle2D rec = new Rectangle2D.Double(pgBox.getLLB().x,pgBox.getLLB().y, |
|
211 |
pgBox.getURT().x-pgBox.getLLB().x, pgBox.getURT().y-pgBox.getLLB().y) ; |
|
166 | 212 |
return rec; |
167 | 213 |
|
168 | 214 |
} catch (SQLException e) { |
... | ... | |
170 | 216 |
e.printStackTrace(); |
171 | 217 |
throw e; |
172 | 218 |
} |
173 |
|
|
174 | 219 |
} |
175 |
|
|
176 |
} |
|
220 |
|
|
221 |
public ArrayList<String> getLayerList() { |
|
222 |
ArrayList<String> list = new ArrayList<String>(); |
|
223 |
|
|
224 |
return list; |
|
225 |
} |
|
226 |
} |
|
177 | 227 |
|
tmp/trunk/servidor/WorkSpace_Servidor/Callejero/src/es/logex/callejero/core/GMLProducer.java | ||
---|---|---|
60 | 60 |
private String writerName = "GML writer"; |
61 | 61 |
private GPEErrorHandler errorHandler; |
62 | 62 |
private OutputStream os ; |
63 |
private String crs = null; |
|
64 |
private String outPath = WPSConfiguration.getInstance().getFolder(); |
|
65 |
ILayer layer = null; |
|
66 |
Long i = 0L; |
|
63 | 67 |
|
64 | 68 |
Log log = LogFactory.getLog(this.getClass()); |
69 |
|
|
70 |
public GMLProducer(ILayer _layer){ |
|
65 | 71 |
|
66 |
public GMLProducer(){ |
|
67 |
|
|
68 | 72 |
log.debug("Constructor donde se rellenan los valores del writer"); |
69 | 73 |
|
74 |
this.layer = _layer; |
|
75 |
|
|
70 | 76 |
//GPEDefaults.setProperty(GPEDefaults.DEFAULT_FILE_NAME, outputFileName); |
71 |
GPEDefaults.setProperty(GPEDefaults.XSD_SCHEMA_FILE, schema); |
|
77 |
//GPEDefaults.setProperty(GPEDefaults.XSD_SCHEMA_FILE, schema);
|
|
72 | 78 |
//GPEDefaults.setProperty(GPEDefaults.COORDINATES_SEPARATOR, GPEDefaults.DEFAULT_BLANC_SPACE); |
73 | 79 |
//GPEDefaults.setProperty(GPEDefaults.DECIMAL, ) |
74 | 80 |
|
75 | 81 |
try{ |
76 | 82 |
//Register the writer |
77 |
GPERegister.addGpeWriterHandler(writerName,"Writer de GML hasta la versi�n 2.1",
|
|
78 |
org.gvsig.gpe.gml.writer.GPEGmlWriterHandlerImplementor.class); |
|
79 |
|
|
83 |
GPERegister.addGpeWriterHandler(writerName,"Writer de GML hasta la versión 2.1",
|
|
84 |
org.gvsig.gpe.gml.writer.GPEGmlv2WriterHandlerImplementor.class);
|
|
85 |
|
|
80 | 86 |
//Gets the writer |
81 | 87 |
writer = GPERegister.createWriter(writerName); |
82 | 88 |
errorHandler = new CallejeroGPEErrorHandler(); |
83 | 89 |
writer.setErrorHandler(errorHandler); |
84 | 90 |
//writer.setOutputStream(os); |
85 | 91 |
|
92 |
this.outputFileName =this.outPath + System.currentTimeMillis() + "_"+ layer.getName() + ".gml"; |
|
93 |
writer.setFileName(outputFileName); |
|
94 |
|
|
86 | 95 |
log.debug("Ok. El writer está creado"); |
87 | 96 |
|
88 | 97 |
} catch (Exception e){ |
... | ... | |
91 | 100 |
} |
92 | 101 |
} |
93 | 102 |
|
94 |
/** |
|
95 |
* Genera un archivo gml con tantos featuresMembers como features de la capa . |
|
96 |
*/ |
|
97 |
public File toGml(ILayer layer) { |
|
98 | 103 |
|
99 |
//si no tenemos esquema, que ponga el nombre de la capa.xsd |
|
100 |
if (schema=="") { |
|
101 |
GPEDefaults.setProperty(GPEDefaults.XSD_SCHEMA_FILE, layer.getName() + ".xsd"); |
|
102 |
} |
|
103 |
/*if (outputFileName == "") { |
|
104 |
GPEDefaults.setProperty(GPEDefaults.DEFAULT_FILE_NAME, layer.getName()); |
|
105 |
}*/ |
|
106 | 104 |
|
107 |
writer.initialize(); |
|
108 |
log.debug("Writer inicializado"); |
|
109 |
|
|
110 |
writer.startLayer("1", layer.getName(), layer.getDescription(), layer.getExtent().getCrsBoundingBox(),null); |
|
111 |
log.debug("Capa inicializada"); |
|
112 |
|
|
113 |
BoundingBox box = layer.getExtent(); |
|
114 |
double xb[] = {box.getLowersBoundingBox()[0],box.getUppersBoundingBox()[0]} ; |
|
115 |
double yb[] = {box.getLowersBoundingBox()[1],box.getUppersBoundingBox()[1]} ; |
|
116 |
double[] emptyZ = new double[2]; |
|
117 |
|
|
118 |
writer.startBbox("box" ,xb, yb, emptyZ, box.getCrsBoundingBox()); |
|
119 |
writer.endBbox(); |
|
120 |
log.debug("BoundedBy escrito"); |
|
121 |
|
|
122 |
int i = 0; |
|
123 |
for (Feature f : layer.getListFeature()) { |
|
124 |
i += 1; |
|
125 |
writer.startFeature("f" + i, f.getName(),null); |
|
126 |
log.debug("Start feature"); |
|
127 |
//todos sus atributos |
|
128 |
for (DataElement de : f.getData()) { |
|
129 |
writer.startElement(de.getName(), (Object)de.getValue(), null); |
|
130 |
writer.endElement(); |
|
131 |
//TODO: coger el type cuando se rellena la feature |
|
132 |
} |
|
133 |
log.debug("Escritos los dataElements de la feauture"); |
|
134 |
// la geometría |
|
135 |
GeometryElement ge = f.getGeometryElement(); |
|
136 |
PGgeometry geom = f.getGeometryElement().getGeometry(); |
|
137 |
if (ge != null) { |
|
105 |
public void writeHeadGmlFile() throws Throwable { |
|
106 |
|
|
107 |
try { |
|
108 |
this.crs = layer.getExtent().getCrsBoundingBox(); |
|
109 |
|
|
110 |
// si no tenemos esquema, que ponga el nombre de la capa.xsd |
|
111 |
/*if (schema=="") { |
|
112 |
GPEDefaults.setProperty(GPEDefaults.XSD_SCHEMA_FILE, layer.getName() + ".xsd"); |
|
113 |
}*/ |
|
114 |
/*if (outputFileName == "") { |
|
115 |
GPEDefaults.setProperty(GPEDefaults.DEFAULT_FILE_NAME, layer.getName()); |
|
116 |
}*/ |
|
138 | 117 |
|
139 |
writer.startElement(ge.getName(), null , null); |
|
118 |
writer.initialize(); |
|
119 |
log.debug("Writer inicializado"); |
|
140 | 120 |
|
141 |
switch (geom.getGeoType()) { |
|
142 |
case Geometry.MULTIPOLYGON: |
|
143 |
log.debug("la geometría es Multipoligono"); |
|
144 |
MultiPolygon multip = (MultiPolygon) geom.getGeometry(); |
|
145 |
writer.startMultiPolygon(Integer.toString(i), box.getCrsBoundingBox()); |
|
146 |
|
|
147 |
for (Polygon p : multip.getPolygons() ) { |
|
148 |
///TODO: No seguir si tiene más de un anillo. |
|
149 |
//extraer en arrays las coordenadas |
|
150 |
double[] x = new double[p.numPoints()]; |
|
151 |
double[] y = new double[p.numPoints()]; |
|
152 |
double[] z = new double[p.numPoints()]; |
|
121 |
writer.startLayer("1", layer.getName(), layer.getDescription(),null ,null); |
|
122 |
|
|
123 |
log.debug("Capa inicializada"); |
|
124 |
|
|
125 |
BoundingBox box = layer.getExtent(); |
|
126 |
double xb[] = {box.getLowersBoundingBox()[0],box.getUppersBoundingBox()[0]} ; |
|
127 |
double yb[] = {box.getLowersBoundingBox()[1],box.getUppersBoundingBox()[1]} ; |
|
128 |
double[] emptyZ = new double[2]; |
|
129 |
|
|
130 |
writer.startBbox("box" ,xb, yb, emptyZ, box.getCrsBoundingBox()); |
|
131 |
writer.endBbox(); |
|
132 |
log.debug("BoundedBy escrito"); |
|
133 |
} finally { |
|
134 |
if (errorHandler.getErrorsSize() > 0) { |
|
135 |
throw new Throwable(errorHandler.getErrorAt(0)); |
|
136 |
} |
|
137 |
} |
|
138 |
} |
|
139 |
|
|
140 |
public void writeStartFeature() throws Throwable{ |
|
141 |
try { |
|
142 |
i+=1; |
|
143 |
writer.startFeature("f" + i,layer.getName(),null); |
|
144 |
log.debug("Start feature"); |
|
145 |
} finally { |
|
146 |
if (errorHandler.getErrorsSize() > 0) { |
|
147 |
throw new Throwable(errorHandler.getErrorAt(0)); |
|
148 |
} |
|
149 |
} |
|
150 |
} |
|
151 |
|
|
152 |
public void writeGeomElement(GeometryElement geomElement) throws Throwable{ |
|
153 |
try { |
|
154 |
|
|
155 |
PGgeometry geom = geomElement.getGeometry(); |
|
156 |
if (geomElement != null) { |
|
157 |
|
|
158 |
writer.startElement(geomElement.getName(), null , null); |
|
159 |
|
|
160 |
switch (geom.getGeoType()) { |
|
161 |
case Geometry.MULTIPOLYGON: |
|
162 |
log.debug("la geometría es Multipoligono"); |
|
163 |
MultiPolygon multip = (MultiPolygon) geom.getGeometry(); |
|
164 |
writer.startMultiPolygon(Long.toString(i),null); |
|
153 | 165 |
|
154 |
ConvertUtils.ConvertCoordinatesToXYZ(p, x, y, z); |
|
166 |
for (Polygon p : multip.getPolygons() ) { |
|
167 |
///TODO: No seguir si tiene más de un anillo. |
|
168 |
//extraer en arrays las coordenadas |
|
169 |
double[] x = new double[p.numPoints()]; |
|
170 |
double[] y = new double[p.numPoints()]; |
|
171 |
double[] z = new double[p.numPoints()]; |
|
172 |
|
|
173 |
ConvertUtils.ConvertCoordinatesToXYZ(p, x, y, z); |
|
174 |
|
|
175 |
writer.startPolygon("p" + i, x, y, z,null); |
|
176 |
writer.endPolygon(); |
|
155 | 177 |
|
156 |
writer.startPolygon("p" + i, x, y, z, box.getCrsBoundingBox()); |
|
157 |
writer.endPolygon(); |
|
178 |
} |
|
179 |
writer.endMultiPolygon(); |
|
180 |
writer.endElement(); |
|
181 |
|
|
182 |
break; |
|
158 | 183 |
|
159 |
} |
|
160 |
writer.endMultiPolygon(); |
|
161 |
writer.endElement(); |
|
162 |
writer.endFeature(); |
|
163 |
log.debug("End Feature"); |
|
164 |
break; |
|
184 |
case Geometry.MULTILINESTRING: |
|
185 |
MultiLineString multil = (MultiLineString) geom.getGeometry(); |
|
186 |
writer.startMultiLineString(Long.toString(i),null); |
|
187 |
|
|
188 |
for (LineString ls : multil.getLines()) { |
|
189 |
double[] x = new double[ls.numPoints()]; |
|
190 |
double[] y = new double[ls.numPoints()]; |
|
191 |
double[] z = new double[ls.numPoints()]; |
|
192 |
|
|
193 |
ConvertUtils.ConvertCoordinatesToXYZ(ls, x, y, z); |
|
194 |
|
|
195 |
writer.startLineString("l" + i, x, y, z, null); |
|
196 |
writer.endLineString(); |
|
197 |
} |
|
198 |
writer.endMultiLineString(); |
|
199 |
writer.endElement(); |
|
200 |
|
|
201 |
break; |
|
165 | 202 |
|
166 |
case Geometry.MULTILINESTRING: |
|
167 |
MultiLineString multil = (MultiLineString) geom.getGeometry(); |
|
168 |
writer.startMultiLineString(Integer.toString(i), box.getCrsBoundingBox()); |
|
169 |
|
|
170 |
for (LineString ls : multil.getLines()) { |
|
171 |
double[] x = new double[ls.numPoints()]; |
|
172 |
double[] y = new double[ls.numPoints()]; |
|
173 |
double[] z = new double[ls.numPoints()]; |
|
174 |
|
|
175 |
ConvertUtils.ConvertCoordinatesToXYZ(ls, x, y, z); |
|
176 |
|
|
177 |
writer.startLineString("l" + i, x, y, z, box.getCrsBoundingBox()); |
|
178 |
writer.endLineString(); |
|
179 |
} |
|
180 |
writer.endMultiLineString(); |
|
181 |
writer.endElement(); |
|
182 |
writer.endFeature(); |
|
183 |
break; |
|
203 |
case Geometry.POINT: |
|
204 |
Point p = (Point) geom.getGeometry(); |
|
205 |
|
|
206 |
writer.startPoint("l" + i, p.x, p.y, p.z, null); |
|
207 |
writer.endPoint(); |
|
184 | 208 |
|
185 |
case Geometry.POINT: |
|
186 |
Point p = (Point) geom.getGeometry(); |
|
187 |
|
|
188 |
writer.startPoint("l" + i, p.x, p.y, p.z, box.getCrsBoundingBox()); |
|
189 |
writer.endPoint(); |
|
190 |
|
|
191 |
writer.endElement(); |
|
192 |
writer.endFeature(); |
|
193 |
break; |
|
194 |
|
|
195 |
default: |
|
196 |
break; |
|
209 |
writer.endElement(); |
|
210 |
//writer.endFeature(); |
|
211 |
break; |
|
212 |
|
|
213 |
default: |
|
214 |
break; |
|
215 |
} |
|
197 | 216 |
} |
198 |
} |
|
217 |
} finally { |
|
218 |
if (errorHandler.getErrorsSize() > 0) { |
|
219 |
throw new Throwable(errorHandler.getErrorAt(0)); |
|
220 |
} |
|
221 |
} |
|
222 |
} |
|
223 |
|
|
224 |
public void writeEndFeature() throws Throwable{ |
|
225 |
try { |
|
226 |
writer.endFeature(); |
|
227 |
} finally { |
|
228 |
if (errorHandler.getErrorsSize() > 0) { |
|
229 |
throw new Throwable(errorHandler.getErrorAt(0)); |
|
230 |
} |
|
231 |
} |
|
232 |
} |
|
233 |
|
|
234 |
public void writeDataElement(List<DataElement> listData) throws Throwable{ |
|
235 |
try { |
|
236 |
for (DataElement de : listData) { |
|
237 |
writer.startElement(de.getName(), (Object)de.getValue(), null); |
|
238 |
writer.endElement(); |
|
239 |
} |
|
240 |
} finally { |
|
241 |
if (errorHandler.getErrorsSize() > 0) { |
|
242 |
throw new Throwable(errorHandler.getErrorAt(0)); |
|
243 |
} |
|
244 |
} |
|
245 |
} |
|
246 |
|
|
247 |
public void writeEndGmlFile() throws Throwable{ |
|
248 |
try { |
|
249 |
writer.endLayer(); |
|
250 |
log.debug("End layer"); |
|
251 |
writer.close(); |
|
252 |
log.debug("Cerramos el writer (flush)"); |
|
253 |
} finally { |
|
254 |
if (errorHandler.getErrorsSize() > 0) { |
|
255 |
throw new Throwable(errorHandler.getErrorAt(0)); |
|
256 |
} |
|
257 |
} |
|
258 |
} |
|
259 |
|
|
260 |
public File getFile() { |
|
261 |
return writer.getOutputFile(); |
|
262 |
} |
|
263 |
|
|
264 |
|
|
265 |
|
|
199 | 266 |
|
200 |
|
|
201 |
if (errorHandler.getErrorsSize() > 0) { |
|
202 |
for (int j = 0; j < errorHandler.getErrorsSize(); j++) { |
|
203 |
log.error(errorHandler.getErrorAt(j)); |
|
204 |
} |
|
205 |
} |
|
206 |
|
|
207 |
if (errorHandler.getWarningsSize() > 0) { |
|
208 |
for (int k = 0; k < errorHandler.getErrorsSize(); k++) { |
|
209 |
log.warn(errorHandler.getErrorAt(k)); |
|
210 |
} |
|
211 |
} |
|
212 |
|
|
213 |
} |
|
214 |
|
|
215 |
writer.endLayer(); |
|
216 |
log.debug("End layer"); |
|
217 |
writer.close(); |
|
218 |
log.debug("Cerramos el writer (flush)"); |
|
219 |
|
|
220 |
//return Xml.readXmlDocument(writer.getFileName(),false); |
|
221 |
//return writer.getFileName(); |
|
222 |
//return writer.getOutputStreamFile(); |
|
223 |
return writer.getOutputFile(); |
|
224 |
|
|
225 |
} |
|
226 | 267 |
} |
tmp/trunk/servidor/WorkSpace_Servidor/Callejero/src/es/logex/callejero/core/ILayer.java | ||
---|---|---|
6 | 6 |
|
7 | 7 |
public interface ILayer { |
8 | 8 |
|
9 |
/** |
|
10 |
* @return El boundingbox que contiene las features de la capa. |
|
11 |
*/ |
|
12 | 9 |
public BoundingBox getExtent(); |
13 |
/** |
|
14 |
* @return el nombre de la capa |
|
15 |
*/ |
|
10 |
|
|
11 |
public void setExtent(BoundingBox box); |
|
12 |
|
|
13 |
public String getCrs(); |
|
14 |
|
|
15 |
public void setCrs(String crs); |
|
16 |
|
|
16 | 17 |
public String getName(); |
17 | 18 |
/** |
18 | 19 |
* @return la lista de las features. |
tmp/trunk/servidor/WorkSpace_Servidor/Callejero/src/es/logex/callejero/core/Layer.java | ||
---|---|---|
196 | 196 |
public void setFileName(String fileName) { |
197 | 197 |
this.fileName = fileName; |
198 | 198 |
} |
199 |
|
|
200 |
public String getCrs() { |
|
201 |
return this.box.getCrsBoundingBox(); |
|
202 |
} |
|
203 |
|
|
204 |
public void setCrs(String crs) { |
|
205 |
this.box.setCrsBoundingBox(crs); |
|
206 |
|
|
207 |
} |
|
208 |
|
|
209 |
public void setExtent(BoundingBox box) { |
|
210 |
// TODO Auto-generated method stub |
|
211 |
|
|
212 |
} |
|
213 |
|
|
214 |
|
|
199 | 215 |
} |
tmp/trunk/servidor/WorkSpace_Servidor/Callejero/src/es/logex/callejero/core/Map.java | ||
---|---|---|
59 | 59 |
|
60 | 60 |
public void writeLayers() { |
61 | 61 |
for (ILayer layer : layers){ |
62 |
GMLProducer gmlp = new GMLProducer(); |
|
62 |
GMLProducer gmlp = new GMLProducer(layer);
|
|
63 | 63 |
//TODO: escribir las capas con OutputStream. |
64 | 64 |
//layer.setFileName(gmlp.toGml(layer).); |
65 | 65 |
} |
tmp/trunk/servidor/WorkSpace_Servidor/Callejero/src/es/logex/callejero/modelo/BoundingBox.java | ||
---|---|---|
4 | 4 |
|
5 | 5 |
private double[] lowersBoundingBox; |
6 | 6 |
private double[] uppersBoundingBox; |
7 |
private String crsBoundingBox; |
|
7 |
private String crsBoundingBox; //en formato epsg.xml#XXXXX donde XXXXX=SRID
|
|
8 | 8 |
|
9 | 9 |
public BoundingBox(double[] lowersBoundingBox,double[] uppersBoundingBox,String crsBoundingBox){ |
10 | 10 |
this.crsBoundingBox = crsBoundingBox; |
... | ... | |
50 | 50 |
return "(" + this.lowersBoundingBox[0] + " " + this.lowersBoundingBox[1] + " , " + |
51 | 51 |
this.uppersBoundingBox[0] + " " + this.uppersBoundingBox[1] + ")"; |
52 | 52 |
} |
53 |
|
|
54 |
/*** |
|
55 |
* Devuelve el SRID del bounding box. |
|
56 |
* @throws Exception |
|
57 |
* |
|
58 |
*/ |
|
59 |
public String getSRID() throws Exception { |
|
60 |
int index = this.crsBoundingBox.lastIndexOf("#"); //para formatos epsg.xml# |
|
61 |
if (index > 0 && index < this.crsBoundingBox.length() -1) { |
|
62 |
return this.crsBoundingBox.substring(index +1 , this.crsBoundingBox.length()); |
|
63 |
} else { |
|
64 |
index = this.crsBoundingBox.lastIndexOf(":"); |
|
65 |
if (index > 0 && index < this.crsBoundingBox.length() -1) |
|
66 |
return this.crsBoundingBox.substring(index +1 , this.crsBoundingBox.length()); |
|
67 |
|
|
68 |
} |
|
69 |
throw new Exception("El formato del sistema de referencia no es OGC compliant(ejemplo: epsg.xml#23030)"); |
|
70 |
} |
|
53 | 71 |
} |
tmp/trunk/servidor/WorkSpace_Servidor/Callejero/src/es/logex/utils/Configuracion.java | ||
---|---|---|
1 |
package es.logex.utils; |
|
2 |
|
|
3 |
|
|
4 |
import org.apache.commons.configuration.*; |
|
5 |
import org.apache.commons.lang.*; |
|
6 |
import org.apache.commons.logging.Log; |
|
7 |
import org.apache.commons.logging.LogFactory; |
|
8 |
|
|
9 |
/* logEx. Lógica Extrema s.l.* |
|
10 |
* Copyright (C) 2007 Lógica Extrema and Generalitat Valenciana. |
|
11 |
* |
|
12 |
* This program is free software; you can redistribute it and/or |
|
13 |
* modify it under the terms of the GNU General Public License |
|
14 |
* as published by the Free Software Foundation; either version 2 |
|
15 |
* of the License, or (at your option) any later version. |
|
16 |
* |
|
17 |
* This program is distributed in the hope that it will be useful, |
|
18 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
19 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
20 |
* GNU General Public License for more details. |
|
21 |
* |
|
22 |
* You should have received a copy of the GNU General Public License |
|
23 |
* along with this program; if not, write to the Free Software |
|
24 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
25 |
* |
|
26 |
* For more information, contact: |
|
27 |
* |
|
28 |
* Generalitat Valenciana |
|
29 |
* Conselleria d'Infraestructures i Transport |
|
30 |
* Av. Blasco Ibañez, 50 |
|
31 |
* 46010 VALENCIA |
|
32 |
* SPAIN |
|
33 |
* |
|
34 |
* +34 963862235 |
|
35 |
* gvsig@gva.es |
|
36 |
* www.gvsig.gva.es |
|
37 |
* |
|
38 |
* or |
|
39 |
* |
|
40 |
* Lógica Extrema s.l. |
|
41 |
* Avda. Cortes Valencianas |
|
42 |
* 46015 Valencia |
|
43 |
* Spain |
|
44 |
* |
|
45 |
* logic@logex.es |
|
46 |
*/ |
|
47 |
/** |
|
48 |
* Singleton to holds callejero's configuration |
|
49 |
*/ |
|
50 |
public class Configuracion { |
|
51 |
|
|
52 |
Log log = LogFactory.getLog(this.getClass()); |
|
53 |
|
|
54 |
//Singleton |
|
55 |
private static Configuracion configuracion; |
|
56 |
|
|
57 |
public static Boolean servidoraplicaciones; |
|
58 |
public static String driver; |
|
59 |
public static String url; |
|
60 |
public static String basedatos; |
|
61 |
public static String usuario; |
|
62 |
public static String pass; |
|
63 |
|
|
64 |
private Configuracion(){ |
|
65 |
//leer el fichero de configuración |
|
66 |
try |
|
67 |
{ |
|
68 |
log.debug("Buscando callejero.xml en el directorio raiz."); |
|
69 |
XMLConfiguration config = new XMLConfiguration("conf/callejero.xml"); |
|
70 |
|
|
71 |
this.servidoraplicaciones = config.getBoolean("base-datos.servidoraplicaciones"); |
|
72 |
this.driver = config.getString("base-datos.driver"); |
|
73 |
this.url = config.getString("base-datos.url"); |
|
74 |
this.basedatos = config.getString("base-datos.basedatos"); |
|
75 |
this.usuario = config.getString("base-datos.usuario"); |
|
76 |
this.pass = config.getString("base-datos.pass"); |
|
77 |
|
|
78 |
log.debug("Leida la configuración: \n" + |
|
79 |
"AppServer_si_no:" + this.servidoraplicaciones +"\n" + |
|
80 |
"Driver: " + this.driver +"\n" + |
|
81 |
"Url: " + this.url +"\n" + |
|
82 |
"Base de datos: " + this.basedatos +"\n" + |
|
83 |
"Usuario: " + this.usuario +"\n" + |
|
84 |
"Pass: " + this.pass); |
|
85 |
} |
|
86 |
catch(ConfigurationException cex) |
|
87 |
{ |
|
88 |
log.error("Error leyendo la configuración del callejero", cex); |
|
89 |
cex.printStackTrace(); |
|
90 |
} |
|
91 |
} |
|
92 |
|
|
93 |
//Make the Access method Synchronized to prevent Thread Problems. |
|
94 |
public static synchronized Configuracion getConfiguracion(){ |
|
95 |
if (configuracion == null) { |
|
96 |
configuracion = new Configuracion(); |
|
97 |
} |
|
98 |
return configuracion; |
|
99 |
} |
|
100 |
|
|
101 |
//Override the Object clone method to prevent cloning. |
|
102 |
public Object clone() throws CloneNotSupportedException { |
|
103 |
throw new CloneNotSupportedException(); |
|
104 |
} |
|
105 |
|
|
106 |
} |
|
107 |
|
|
108 |
|
tmp/trunk/servidor/WorkSpace_Servidor/Callejero/src/es/logex/utils/WPSConfiguration.java | ||
---|---|---|
1 |
package es.logex.utils; |
|
2 |
|
|
3 |
|
|
4 |
import java.io.File; |
|
5 |
import java.io.FileInputStream; |
|
6 |
import java.net.URL; |
|
7 |
import java.util.List; |
|
8 |
|
|
9 |
import org.apache.commons.configuration.*; |
|
10 |
import org.apache.commons.logging.Log; |
|
11 |
import org.apache.commons.logging.LogFactory; |
|
12 |
|
|
13 |
/* logEx. Lógica Extrema s.l.* |
|
14 |
* Copyright (C) 2007 Lógica Extrema and Generalitat Valenciana. |
|
15 |
* |
|
16 |
* This program is free software; you can redistribute it and/or |
|
17 |
* modify it under the terms of the GNU General Public License |
|
18 |
* as published by the Free Software Foundation; either version 2 |
|
19 |
* of the License, or (at your option) any later version. |
|
20 |
* |
|
21 |
* This program is distributed in the hope that it will be useful, |
|
22 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
23 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
24 |
* GNU General Public License for more details. |
|
25 |
* |
|
26 |
* You should have received a copy of the GNU General Public License |
|
27 |
* along with this program; if not, write to the Free Software |
|
28 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
29 |
* |
|
30 |
* For more information, contact: |
|
31 |
* |
|
32 |
* Generalitat Valenciana |
|
33 |
* Conselleria d'Infraestructures i Transport |
|
34 |
* Av. Blasco Ibañez, 50 |
|
35 |
* 46010 VALENCIA |
|
36 |
* SPAIN |
|
37 |
* |
|
38 |
* +34 963862235 |
|
39 |
* gvsig@gva.es |
|
40 |
* www.gvsig.gva.es |
|
41 |
* |
|
42 |
* or |
|
43 |
* |
|
44 |
* Lógica Extrema s.l. |
|
45 |
* Avda. Cortes Valencianas |
|
46 |
* 46015 Valencia |
|
47 |
* Spain |
|
48 |
* |
|
49 |
* info@logex.es |
|
50 |
*/ |
|
51 |
/** |
|
52 |
* Singleton to holds callejero's configuration |
|
53 |
*/ |
|
54 |
public class WPSConfiguration { |
|
55 |
|
|
56 |
Log log = LogFactory.getLog(this.getClass()); |
|
57 |
|
|
58 |
//Singleton |
|
59 |
private static WPSConfiguration configuracion; |
|
60 |
|
|
61 |
private static String outPathWPS; |
|
62 |
private static String hostWPSFiles; |
|
63 |
private static List layerList; |
|
64 |
|
|
65 |
private WPSConfiguration(){ |
|
66 |
//leer el fichero de configuración |
|
67 |
try |
|
68 |
{ |
|
69 |
log.debug("Buscando callejero.xml en el directorio raiz."); |
|
70 |
|
|
71 |
//TODO: El fichero de configuración deberá estar en $CATALINA_HOME/commons/classes. Incluir en el build. |
|
72 |
XMLConfiguration config = new XMLConfiguration(getClass().getClassLoader().getResource("callejero.xml").toString()); |
|
73 |
|
|
74 |
outPathWPS = config.getString("WPSFiles.folder" ); |
|
75 |
hostWPSFiles = config.getString("WPSFiles.host" ); |
|
76 |
layerList = config.getList("layers.name"); |
|
77 |
|
|
78 |
log.debug("Leida la configuración: \n" ); |
|
79 |
} |
|
80 |
catch(ConfigurationException cex) |
|
81 |
{ |
|
82 |
log.error("Error leyendo la configuración del callejero", cex); |
|
83 |
cex.printStackTrace(); |
|
84 |
} |
|
85 |
} |
|
86 |
|
|
87 |
//Make the Access method Synchronized to prevent Thread Problems. |
|
88 |
public static synchronized WPSConfiguration getInstance(){ |
|
89 |
if (configuracion == null) { |
|
90 |
configuracion = new WPSConfiguration(); |
|
91 |
} |
|
92 |
return configuracion; |
|
93 |
} |
|
94 |
|
|
95 |
//Override the Object clone method to prevent cloning. |
|
96 |
public Object clone() throws CloneNotSupportedException { |
|
97 |
throw new CloneNotSupportedException(); |
|
98 |
} |
|
99 |
|
|
100 |
public String getFolder() { |
|
101 |
return outPathWPS; |
|
102 |
} |
|
103 |
|
|
104 |
public String getHost() { |
|
105 |
return hostWPSFiles; |
|
106 |
} |
|
107 |
|
|
108 |
public List getLayerList() { |
|
109 |
return layerList; |
|
110 |
} |
|
111 |
} |
|
112 |
|
|
113 |
|
tmp/trunk/servidor/WorkSpace_Servidor/Callejero/build.xml | ||
---|---|---|
4 | 4 |
<property name="build" location="bin"/> |
5 | 5 |
<property name="targetDir" location="dist"/> |
6 | 6 |
<property name="libs" location="lib" /> |
7 |
<property name="conf" location="conf" /> |
|
7 | 8 |
<property name="tomcatLib" location="/usr/share/tomcat5.5/common/lib"/> |
9 |
<property name="tomcatAppConf" location = "/usr/share/tomcat5.5/common/classes"/> |
|
8 | 10 |
<property name="jarName" value="callejeroWPS"/> |
9 | 11 |
<property name="compile-classpath" value="" /> |
10 | 12 |
|
... | ... | |
54 | 56 |
<copy todir="${tomcatLib}"> |
55 | 57 |
<fileset dir="${libs}" includes="*.jar"/> |
56 | 58 |
</copy> |
59 |
|
|
60 |
<!-- Copiar el fichero de configuración callejero.xml al common/classes del tomcat --> |
|
61 |
<copy todir="${tomcatAppConf}"> |
|
62 |
<fileset dir="${conf}" includes="*"/> |
|
63 |
</copy> |
|
64 |
|
|
57 | 65 |
|
58 | 66 |
</target> |
59 | 67 |
|
tmp/trunk/servidor/WorkSpace_Servidor/Callejero/frogs.log | ||
---|---|---|
206 | 206 |
31 oct 2007 18:00:15 : ERROR |
207 | 207 |
- |
208 | 208 |
- es.logex.callejero.core.Map.fillLayers(Map.java:53) |
209 |
14 feb 2008 10:05:14 : ERROR |
|
210 |
- Error inicializando el writer |
|
211 |
- es.logex.callejero.core.GMLProducer.<init>(GMLProducer.java:94) |
|
212 |
14 feb 2008 10:05:14 : ERROR |
|
213 |
- Error registering the class org.gvsig.gpe.gml.writer.GPEGmlWriterHandlerImplementor using the name GML writer into the GPEWriterHandlers list |
|
214 |
- es.logex.callejero.core.GMLProducer.<init>(GMLProducer.java:95) |
|
215 |
14 feb 2008 10:05:14 : WARN |
|
216 |
- Throwable in running this class [es.logex.callejero.core.GMLProducerTest] |
|
217 |
- es.logex.callejero.core.GMLProducerTest.testtoGml(GMLProducerTest.java:45) |
|
218 |
14 feb 2008 10:05:31 : ERROR |
|
219 |
- Error inicializando el writer |
|
220 |
- es.logex.callejero.core.GMLProducer.<init>(GMLProducer.java:94) |
|
221 |
14 feb 2008 10:05:31 : ERROR |
|
222 |
- Error registering the class org.gvsig.gpe.gml.writer.GPEGmlWriterHandlerImplementor using the name GML writer into the GPEWriterHandlers list |
|
223 |
- es.logex.callejero.core.GMLProducer.<init>(GMLProducer.java:95) |
|
224 |
14 feb 2008 10:05:31 : WARN |
|
225 |
- Throwable in running this class [es.logex.callejero.core.GMLProducerTest] |
|
226 |
- es.logex.callejero.core.GMLProducerTest.testtoGml(GMLProducerTest.java:45) |
|
227 |
14 feb 2008 10:06:00 : ERROR |
|
228 |
- Error inicializando el writer |
|
229 |
- es.logex.callejero.core.GMLProducer.<init>(GMLProducer.java:94) |
|
230 |
14 feb 2008 10:06:00 : ERROR |
|
231 |
- Error registering the class org.gvsig.gpe.gml.writer.GPEGmlWriterHandlerImplementor using the name GML writer into the GPEWriterHandlers list |
|
232 |
- es.logex.callejero.core.GMLProducer.<init>(GMLProducer.java:95) |
|
233 |
14 feb 2008 10:06:37 : WARN |
|
234 |
- Throwable in running this class [es.logex.callejero.core.GMLProducerTest] |
|
235 |
- es.logex.callejero.core.GMLProducerTest.testtoGml(GMLProducerTest.java:45) |
|
236 |
14 feb 2008 10:11:58 : ERROR |
|
237 |
- Error inicializando el writer |
|
238 |
- es.logex.callejero.core.GMLProducer.<init>(GMLProducer.java:94) |
|
239 |
14 feb 2008 10:12:00 : ERROR |
|
240 |
- Error registering the class org.gvsig.gpe.gml.writer.GPEGmlWriterHandlerImplementor using the name GML writer into the GPEWriterHandlers list |
|
241 |
- es.logex.callejero.core.GMLProducer.<init>(GMLProducer.java:95) |
|
242 |
14 feb 2008 10:12:26 : WARN |
|
243 |
- Throwable in running this class [es.logex.callejero.core.GMLProducerTest] |
|
244 |
- es.logex.callejero.core.GMLProducerTest.testtoGml(GMLProducerTest.java:45) |
|
245 |
23 mar 2008 23:38:56 : ERROR |
|
246 |
- ERROR: column "ine_denomina" does not exist |
|
247 |
- es.logex.callejero.core.Callejero.EjecutaSql(Callejero.java:95) |
|
248 |
23 mar 2008 23:38:56 : ERROR |
|
249 |
- |
|
250 |
- es.logex.callejero.core.Callejero.getMunicipiosLV(Callejero.java:157) |
|
251 |
java.lang.NullPointerException |
|
252 |
at es.logex.callejero.core.Callejero.getMunicipiosLV(Callejero.java:150) |
|
253 |
at es.logex.callejero.core.CallejeroTest.testgetMunicipioLV(CallejeroTest.java:39) |
|
254 |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) |
|
255 |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) |
|
256 |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) |
|
257 |
at java.lang.reflect.Method.invoke(Method.java:585) |
|
258 |
at junit.framework.TestCase.runTest(TestCase.java:154) |
|
259 |
at junit.framework.TestCase.runBare(TestCase.java:127) |
|
260 |
at junit.framework.TestResult$1.protect(TestResult.java:106) |
|
261 |
at junit.framework.TestResult.runProtected(TestResult.java:124) |
|
262 |
at junit.framework.TestResult.run(TestResult.java:109) |
|
263 |
at junit.framework.TestCase.run(TestCase.java:118) |
|
264 |
at junit.framework.TestSuite.runTest(TestSuite.java:208) |
|
265 |
at junit.framework.TestSuite.run(TestSuite.java:203) |
|
266 |
at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76) |
|
267 |
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38) |
|
268 |
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) |
|
269 |
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) |
|
270 |
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) |
|
271 |
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) |
|
272 |
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) |
|
273 |
23 mar 2008 23:40:20 : ERROR |
|
274 |
- ERROR: column "olivine_denomina" does not exist |
|
275 |
- es.logex.callejero.core.Callejero.EjecutaSql(Callejero.java:95) |
|
276 |
23 mar 2008 23:40:20 : ERROR |
|
277 |
- |
|
278 |
- es.logex.callejero.core.Callejero.getMunicipiosLV(Callejero.java:157) |
|
279 |
java.lang.NullPointerException |
|
280 |
at es.logex.callejero.core.Callejero.getMunicipiosLV(Callejero.java:150) |
|
281 |
at es.logex.callejero.core.CallejeroTest.testgetMunicipioLV(CallejeroTest.java:39) |
|
282 |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) |
|
283 |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) |
|
284 |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) |
|
285 |
at java.lang.reflect.Method.invoke(Method.java:585) |
|
286 |
at junit.framework.TestCase.runTest(TestCase.java:154) |
|
287 |
at junit.framework.TestCase.runBare(TestCase.java:127) |
|
288 |
at junit.framework.TestResult$1.protect(TestResult.java:106) |
|
289 |
at junit.framework.TestResult.runProtected(TestResult.java:124) |
|
290 |
at junit.framework.TestResult.run(TestResult.java:109) |
|
291 |
at junit.framework.TestCase.run(TestCase.java:118) |
|
292 |
at junit.framework.TestSuite.runTest(TestSuite.java:208) |
|
293 |
at junit.framework.TestSuite.run(TestSuite.java:203) |
|
294 |
at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76) |
|
295 |
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38) |
|
296 |
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) |
|
297 |
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) |
|
298 |
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) |
|
299 |
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) |
|
300 |
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) |
|
301 |
23 mar 2008 23:41:06 : ERROR |
|
302 |
- ERROR: column "oliv" does not exist |
|
303 |
- es.logex.callejero.core.Callejero.EjecutaSql(Callejero.java:95) |
|
304 |
23 mar 2008 23:41:06 : ERROR |
|
305 |
- |
|
306 |
- es.logex.callejero.core.Callejero.getMunicipiosLV(Callejero.java:157) |
|
307 |
java.lang.NullPointerException |
|
308 |
at es.logex.callejero.core.Callejero.getMunicipiosLV(Callejero.java:150) |
|
309 |
at es.logex.callejero.core.CallejeroTest.testgetMunicipioLV(CallejeroTest.java:39) |
|
310 |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) |
|
311 |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) |
|
312 |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) |
|
313 |
at java.lang.reflect.Method.invoke(Method.java:585) |
|
314 |
at junit.framework.TestCase.runTest(TestCase.java:154) |
|
315 |
at junit.framework.TestCase.runBare(TestCase.java:127) |
|
316 |
at junit.framework.TestResult$1.protect(TestResult.java:106) |
|
317 |
at junit.framework.TestResult.runProtected(TestResult.java:124) |
|
318 |
at junit.framework.TestResult.run(TestResult.java:109) |
|
319 |
at junit.framework.TestCase.run(TestCase.java:118) |
|
320 |
at junit.framework.TestSuite.runTest(TestSuite.java:208) |
|
321 |
at junit.framework.TestSuite.run(TestSuite.java:203) |
|
322 |
at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76) |
|
323 |
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38) |
|
324 |
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) |
|
325 |
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) |
|
326 |
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) |
|
327 |
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) |
|
328 |
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) |
|
329 |
23 mar 2008 23:50:31 : ERROR |
|
330 |
- ERROR: syntax error at or near "asc" |
|
331 |
- es.logex.callejero.core.Callejero.EjecutaSql(Callejero.java:95) |
|
332 |
23 mar 2008 23:50:31 : ERROR |
|
333 |
- |
|
334 |
- es.logex.callejero.core.Callejero.getMunicipiosLV(Callejero.java:157) |
|
335 |
java.lang.NullPointerException |
|
336 |
at es.logex.callejero.core.Callejero.getMunicipiosLV(Callejero.java:150) |
|
337 |
at es.logex.callejero.core.CallejeroTest.testgetMunicipioLV(CallejeroTest.java:39) |
|
338 |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) |
|
339 |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) |
|
340 |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) |
|
341 |
at java.lang.reflect.Method.invoke(Method.java:585) |
|
342 |
at junit.framework.TestCase.runTest(TestCase.java:154) |
|
343 |
at junit.framework.TestCase.runBare(TestCase.java:127) |
|
344 |
at junit.framework.TestResult$1.protect(TestResult.java:106) |
|
345 |
at junit.framework.TestResult.runProtected(TestResult.java:124) |
|
346 |
at junit.framework.TestResult.run(TestResult.java:109) |
|
347 |
at junit.framework.TestCase.run(TestCase.java:118) |
|
348 |
at junit.framework.TestSuite.runTest(TestSuite.java:208) |
|
349 |
at junit.framework.TestSuite.run(TestSuite.java:203) |
|
350 |
at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76) |
|
351 |
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38) |
|
352 |
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) |
|
353 |
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) |
|
354 |
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) |
|
355 |
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) |
|
356 |
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) |
|
357 |
24 mar 2008 00:07:03 : ERROR |
|
358 |
- ERROR: column "busqueda" does not exist |
|
359 |
- es.logex.callejero.core.Callejero.EjecutaSql(Callejero.java:95) |
|
360 |
24 mar 2008 00:07:03 : ERROR |
|
361 |
- |
|
362 |
- es.logex.callejero.core.Callejero.getMunicipiosLV(Callejero.java:157) |
|
363 |
java.lang.NullPointerException |
|
364 |
at es.logex.callejero.core.Callejero.getMunicipiosLV(Callejero.java:150) |
|
365 |
at es.logex.callejero.core.CallejeroTest.testgetMunicipioLV(CallejeroTest.java:39) |
|
366 |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) |
|
367 |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) |
|
368 |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) |
|
369 |
at java.lang.reflect.Method.invoke(Method.java:585) |
|
370 |
at junit.framework.TestCase.runTest(TestCase.java:154) |
|
371 |
at junit.framework.TestCase.runBare(TestCase.java:127) |
|
372 |
at junit.framework.TestResult$1.protect(TestResult.java:106) |
|
373 |
at junit.framework.TestResult.runProtected(TestResult.java:124) |
|
374 |
at junit.framework.TestResult.run(TestResult.java:109) |
|
375 |
at junit.framework.TestCase.run(TestCase.java:118) |
|
376 |
at junit.framework.TestSuite.runTest(TestSuite.java:208) |
|
377 |
at junit.framework.TestSuite.run(TestSuite.java:203) |
|
378 |
at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76) |
|
379 |
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38) |
|
380 |
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) |
|
381 |
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) |
|
382 |
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) |
|
383 |
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) |
|
384 |
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) |
|
385 |
24 mar 2008 00:07:26 : ERROR |
|
386 |
- ERROR: column "ine_nombre" does not exist |
|
387 |
- es.logex.callejero.core.Callejero.EjecutaSql(Callejero.java:95) |
|
388 |
24 mar 2008 00:07:26 : ERROR |
|
389 |
- |
|
390 |
- es.logex.callejero.core.Callejero.getMunicipiosLV(Callejero.java:157) |
|
391 |
java.lang.NullPointerException |
|
392 |
at es.logex.callejero.core.Callejero.getMunicipiosLV(Callejero.java:150) |
|
393 |
at es.logex.callejero.core.CallejeroTest.testgetMunicipioLV(CallejeroTest.java:39) |
|
394 |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) |
|
395 |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) |
|
396 |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) |
|
397 |
at java.lang.reflect.Method.invoke(Method.java:585) |
|
398 |
at junit.framework.TestCase.runTest(TestCase.java:154) |
|
399 |
at junit.framework.TestCase.runBare(TestCase.java:127) |
|
400 |
at junit.framework.TestResult$1.protect(TestResult.java:106) |
|
401 |
at junit.framework.TestResult.runProtected(TestResult.java:124) |
|
402 |
at junit.framework.TestResult.run(TestResult.java:109) |
|
403 |
at junit.framework.TestCase.run(TestCase.java:118) |
|
404 |
at junit.framework.TestSuite.runTest(TestSuite.java:208) |
|
405 |
at junit.framework.TestSuite.run(TestSuite.java:203) |
|
406 |
at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76) |
|
407 |
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38) |
|
408 |
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) |
|
409 |
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) |
|
410 |
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) |
|
411 |
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) |
|
412 |
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) |
|
413 |
24 mar 2008 00:09:07 : ERROR |
|
414 |
- ERROR: column "ine_nombre" does not exist |
|
415 |
- es.logex.callejero.core.Callejero.EjecutaSql(Callejero.java:99) |
|
416 |
24 mar 2008 00:09:07 : ERROR |
|
417 |
- |
|
418 |
- es.logex.callejero.core.Callejero.getMunicipiosLV(Callejero.java:159) |
|
419 |
java.lang.NullPointerException |
|
420 |
at es.logex.callejero.core.Callejero.getMunicipiosLV(Callejero.java:154) |
|
421 |
at es.logex.callejero.core.CallejeroTest.testgetMunicipioLV(CallejeroTest.java:39) |
|
422 |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) |
|
423 |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) |
|
424 |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) |
|
425 |
at java.lang.reflect.Method.invoke(Method.java:585) |
|
426 |
at junit.framework.TestCase.runTest(TestCase.java:154) |
|
427 |
at junit.framework.TestCase.runBare(TestCase.java:127) |
|
428 |
at junit.framework.TestResult$1.protect(TestResult.java:106) |
|
429 |
at junit.framework.TestResult.runProtected(TestResult.java:124) |
|
430 |
at junit.framework.TestResult.run(TestResult.java:109) |
|
431 |
at junit.framework.TestCase.run(TestCase.java:118) |
|
432 |
at junit.framework.TestSuite.runTest(TestSuite.java:208) |
|
433 |
at junit.framework.TestSuite.run(TestSuite.java:203) |
|
434 |
at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76) |
|
435 |
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38) |
|
436 |
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) |
|
437 |
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) |
|
438 |
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) |
|
439 |
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) |
|
440 |
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) |
tmp/trunk/servidor/WorkSpace_Servidor/Callejero/.classpath | ||
---|---|---|
60 | 60 |
<classpathentry kind="lib" path="/frameworklibs/all/spring-web.jar"/> |
61 | 61 |
<classpathentry kind="lib" path="/frameworklibs/all/spring-webmvc.jar"/> |
62 | 62 |
<classpathentry kind="lib" path="/frameworklibs/all/standard.jar"/> |
63 |
<classpathentry kind="lib" path="/frameworklibs/all/wps-parser-0.4.0-SNAPSHOT.jar"/> |
|
64 | 63 |
<classpathentry kind="lib" path="/frameworklibs/all/wps-plugin-0.4.0-operation-echoing-SNAPSHOT.jar"/> |
65 |
<classpathentry kind="lib" path="/frameworklibs/all/wps-plugin-0.4.0-SNAPSHOT.jar"/> |
|
66 | 64 |
<classpathentry kind="lib" path="/frameworklibs/all/wps-spring-servlet-SNAPSHOT.jar"/> |
67 | 65 |
<classpathentry kind="lib" path="/frameworklibs/all/wsdl4j-1.6.2.jar"/> |
68 | 66 |
<classpathentry kind="lib" path="/frameworklibs/all/xalan.jar"/> |
... | ... | |
74 | 72 |
<classpathentry kind="lib" path="/frameworklibs/all/postgis.jar"/> |
75 | 73 |
<classpathentry kind="lib" path="/frameworklibs/all/postgresql-jdbc3-8.2.jar"/> |
76 | 74 |
<classpathentry combineaccessrules="false" kind="src" path="/ows-parsers"/> |
75 |
<classpathentry kind="lib" path="/frameworklibs/all/wps0_4_0/lib/wps-parser-0.4.0-SNAPSHOT.jar"/> |
|
76 |
<classpathentry kind="lib" path="/frameworklibs/all/wps0_4_0/lib/wps-plugin-0.4.0-SNAPSHOT.jar"/> |
|
77 | 77 |
<classpathentry kind="output" path="bin"/> |
78 | 78 |
</classpath> |
Also available in: Unified diff