Revision 7437

View differences:

trunk/extensions/extPublish/src/org/gvsig/remoteservices/conf/geoserver/Geoserver.java
25 25
	Rectangle2D extent = null;
26 26
	
27 27
	Geoserver(){
28
		try{
29
			catalogo = new RandomAccessFile("/home/david/catalog.xml","rw");
30
		}catch(FileNotFoundException e){
31
			System.out.println("Fichero catalog.xml no existe.");
32
		}
33
		File catalogo2 = new File("/home/david/catalog2.xml");
34
		File servicios = new File("/home/david/services.xml");
35
		File info = new File("/home/david/info1.xml");
36
		try{
37
			System.out.println("Creando streams.");
38
			if(!servicios.exists()){
39
				System.out.println("Fichero services.xml no existe.");
40
			}
41
			if(!info.exists()){
42
				System.out.println("Fichero info.xml no existe.");
43
			}
44
			salidac = new FileWriter(catalogo2);
45
			salidas = new FileWriter(servicios);
46
			salidai = new FileWriter(info);
47
			
48
		}catch(IOException e){
49
			System.out.println("No se ha podido crear algun stream.");
50
		}
51
		
52 28
	}
53 29
	
54 30
	
......
93 69
	}
94 70
	void close(){
95 71
		try{
96
			
97
			salidac.close();
98
			salidas.close();
99
			salidai.close();
72
			if(salidac!=null){
73
				salidac.close();
74
			}
75
			if(salidas!=null){
76
				salidas.close();
77
			}
78
			if(salidai!=null){
79
				salidai.close();
80
			}
100 81
		}catch(IOException e){
101 82
			System.out.println("Error de cierre.");
102 83
		}	
......
143 124
		id=i;
144 125
		url=u;
145 126
		enabled=e;
127
		try{
128
			catalogo = new RandomAccessFile("/home/david/catalog.xml","rw");
129
		}catch(FileNotFoundException x){
130
			System.out.println("Fichero catalog.xml no existe.");
131
		}
132
		File catalogo2 = new File("/home/david/catalog2.xml");
133
		try{
134
			System.out.println("------------------");
135
			salidac = new FileWriter(catalogo2);
136
		}catch(IOException x){
137
			System.out.println("No se ha podido crear algun stream.");
138
		}
146 139
		
147 140
	}
148 141

  
......
237 230
	
238 231
	Services(){
239 232
		super();
233
		File servicios = new File("/home/david/services.xml");
240 234
		
241 235
		
242 236
	}
......
267 261
			String dy,String sty,String e ,String m,double miny,double maxy,
268 262
			double maxx,double minx){
269 263
		super();	
264
		File info = new File("/home/david/info1.xml");
265
		try{
266
			System.out.println("------------------");
267
			salidai = new FileWriter(info);
268
			
269
		}catch(IOException z){
270
			System.out.println("No se ha podido crear algun stream.");
271
		}
270 272
		datastore= d;
271 273
		name = n;
272 274
		srs = s;
trunk/extensions/extPublish/src/org/gvsig/remoteservices/conf/geoserver/TestGeoserver.java
6 6
				,"file://data/cv300/autopistas.shp","true");
7 7
		g.toXML();
8 8
		g.close();
9
		Info i=new Info("cv300","autopistas","23030","/","8","false",
10
				        "line","false","",37.82,40.61,0.43,-1.55);
11
		i.toXML();
12
		i.close();
9 13
	}
10 14
	
11 15

  

Also available in: Unified diff