Revision 16257 branches/v10/extensions/extPublishMapserver/src/org/gvsig/publish/mapserver/model/wms/MapserverWMSLayer.java

View differences:

MapserverWMSLayer.java
80 80
	/*
81 81
	 * Associations
82 82
	 */
83
	CommonOGCMetadata ogcMetadata = null;
84
	LayerWMS111Metadata layerWmsMetadata = null;
85
	MapserverLayer layerMapserver = null;
86

  
83
	private CommonOGCMetadata ogcMetadata = null;
84
	private LayerWMS111Metadata layerWmsMetadata = null;
85
	private MapserverLayer layerMapserver = null;
86
	/**
87
	 * Constructor
88
	 * @param service
89
	 */
87 90
	public MapserverWMSLayer(MapserverWMS service){
88 91
		super(service);
89 92
		ogcMetadata = new CommonOGCMetadata();		
......
158 161
	}
159 162

  
160 163
	/**
161
	 * Overrides the method in order to initialize ocgmetadata
164
	 * Initializes the remote resource name and title with the name and title of the layer
162 165
	 */
163 166
	public void setLayerInfo(ILayerInfo layerInfo) {
164 167

  
165 168
		super.setLayerInfo(layerInfo);
166 169
		getOgcMetadata().setName(getLayerInfo().getName());
170
		getOgcMetadata().setTitle(getLayerInfo().getTitle());
167 171
	}
168 172
	/**
169 173
	 * TODO: I must change the class Mapfile: change ShpLayer, PostgisLayer by MapLayer (not abstract)
......
192 196

  
193 197
		//publish all its childs		
194 198
		super.publish();
195

  
196 199
	}
197
	public void generateShapeLayer(IDataSourceInfo ds){
200
	
201
	private void generateShapeLayer(IDataSourceInfo ds){
198 202
		//get the mapfile
199 203
		ConfigFile mapfile = getMapfile();
200 204
		//get the file   
......
239 243
		//adds the layer into the map
240 244
		mapfile.add(lyr);		
241 245
	}
242
	public void generatePostGISLayer(IDataSourceInfo ds){
246
	private void generatePostGISLayer(IDataSourceInfo ds){
243 247
		//get the mapfile
244 248
		ConfigFile mapfile = getMapfile();		
245 249
		IDataBaseInfo db = (IDataBaseInfo)ds;
......
289 293
		mapfile.add(lyr);		
290 294

  
291 295
	}	
292
	public void generateRasterLayer(IDataSourceInfo ds){
296
	private void generateRasterLayer(IDataSourceInfo ds){
293 297
		//get the mapfile
294 298
		ConfigFile mapfile = getMapfile();
295 299
		//get the raster info
......
420 424
		Color c = pointSymbol.getColor();
421 425
		clase.estilo.styleColor = new RGB(c.getRed(), c.getGreen(), c.getBlue());
422 426
		clase.estilo.size = pointSymbol.getSize();
423
		clase.symbol = pointSymbol.getWellKnowSymbolName();
427
		clase.symbol = pointSymbol.getWellKnowMarkerName();
424 428
		//if it's a image
425 429
		String icon = pointSymbol.getImageIconPath(); 
426 430
		if ( icon !=null){
427 431
			clase.symbol = icon; 
428 432
		}
429 433
	}
430

  
434
	/**
435
	 * In Mapserver is impossible to have a dashed outline 
436
	 * @param fillSymbol
437
	 * @param clase
438
	 */
431 439
	private void generateSymbol(IFillSymbolInfo fillSymbol, MapClass clase) {
432 440
		clase.estilo = new StyleMap();
433 441
		//set outline		
......
437 445
		clase.estilo.width = new Double(linesymbolizer.getLineWitdth()).intValue();		
438 446
		//set fill
439 447
		c = fillSymbol.getColor();
440
		clase.estilo.styleColor = new RGB(c.getRed(), c.getGreen(), c.getBlue());
448
		clase.estilo.styleColor = new RGB(c.getRed(), c.getGreen(), c.getBlue());				
449
		//if it is a well known polygon
450
		clase.symbol = fillSymbol.getWellKnowFillName();
441 451
	}
442 452

  
443 453
	private void generateSymbol(ILineSymbolInfo lineSymbol, MapClass clase) {
444 454
		Color c = lineSymbol.getColor();		
445 455
		clase.estilo = new StyleMap();
446 456
		clase.estilo.width = new Double(lineSymbol.getLineWitdth()).intValue();
447
		clase.estilo.styleColor = new RGB(c.getRed(), c.getGreen(), c.getBlue()); 				
457
		clase.estilo.styleColor = new RGB(c.getRed(), c.getGreen(), c.getBlue());
458
		//if it is a well know line
459
		clase.symbol = lineSymbol.getWellKnowLineName();
448 460
	}
449 461

  
450 462
	/**
451 463
	 * Generates the METADATA object
452 464
	 * @param mapLayer
453 465
	 */
454
	public void generateMetadata(MapLayer mapLayer){
466
	private void generateMetadata(MapLayer mapLayer){
455 467
		//add metadata
456 468
		mapLayer.metadata.wms_name = getOgcMetadata().getName();
457 469
		mapLayer.metadata.wms_title = getOgcMetadata().getTitle();

Also available in: Unified diff