Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/axisOrder/mapaxisorder.csv
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/axisOrder/mapaxisorder.csv	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/axisOrder/mapaxisorder.csv	(revision 21019)
@@ -0,0 +1,1788 @@
+epsg_code
+4326
+4258
+31466
+31467
+31468
+31469
+2166
+2167
+2168
+2036
+2044
+2045
+2065
+2081
+2082
+2083
+2085
+2086
+2091
+2092
+2093
+2096
+2097
+2098
+2105
+2106
+2107
+2108
+2109
+2110
+2111
+2112
+2113
+2114
+2115
+2116
+2117
+2118
+2119
+2120
+2121
+2122
+2123
+2124
+2125
+2126
+2127
+2128
+2129
+2130
+2131
+2132
+2169
+2170
+2171
+2172
+2173
+2174
+2175
+2176
+2177
+2178
+2179
+2180
+2193
+2199
+2200
+2206
+2207
+2208
+2209
+2210
+2211
+2212
+2319
+2320
+2321
+2322
+2323
+2324
+2325
+2326
+2327
+2328
+2329
+2330
+2331
+2332
+2333
+2334
+2335
+2336
+2337
+2338
+2339
+2340
+2341
+2342
+2343
+2344
+2345
+2346
+2347
+2348
+2349
+2350
+2351
+2352
+2353
+2354
+2355
+2356
+2357
+2358
+2359
+2360
+2361
+2362
+2363
+2364
+2365
+2366
+2367
+2368
+2369
+2370
+2371
+2372
+2373
+2374
+2375
+2376
+2377
+2378
+2379
+2380
+2381
+2382
+2383
+2384
+2385
+2386
+2387
+2388
+2389
+2390
+2391
+2392
+2393
+2394
+2395
+2396
+2397
+2398
+2399
+2400
+2401
+2402
+2403
+2404
+2405
+2406
+2407
+2408
+2409
+2410
+2411
+2412
+2413
+2414
+2415
+2416
+2417
+2418
+2419
+2420
+2421
+2422
+2423
+2424
+2425
+2426
+2427
+2428
+2429
+2430
+2431
+2432
+2433
+2434
+2435
+2436
+2437
+2438
+2439
+2440
+2441
+2442
+2443
+2444
+2445
+2446
+2447
+2448
+2449
+2450
+2451
+2452
+2453
+2454
+2455
+2456
+2457
+2458
+2459
+2460
+2461
+2462
+2463
+2464
+2465
+2466
+2467
+2468
+2469
+2470
+2471
+2472
+2473
+2474
+2475
+2476
+2477
+2478
+2479
+2480
+2481
+2482
+2483
+2484
+2485
+2486
+2487
+2488
+2489
+2490
+2491
+2492
+2493
+2494
+2495
+2496
+2497
+2498
+2499
+2500
+2501
+2502
+2503
+2504
+2505
+2506
+2507
+2508
+2509
+2510
+2511
+2512
+2513
+2514
+2515
+2516
+2517
+2518
+2519
+2520
+2521
+2522
+2523
+2524
+2525
+2526
+2527
+2528
+2529
+2530
+2531
+2532
+2533
+2534
+2535
+2536
+2537
+2538
+2539
+2540
+2541
+2542
+2543
+2544
+2545
+2546
+2547
+2548
+2549
+2551
+2552
+2553
+2554
+2555
+2556
+2557
+2558
+2559
+2560
+2561
+2562
+2563
+2564
+2565
+2566
+2567
+2568
+2569
+2570
+2571
+2572
+2573
+2574
+2575
+2576
+2577
+2578
+2579
+2580
+2581
+2582
+2583
+2584
+2585
+2586
+2587
+2588
+2589
+2590
+2591
+2592
+2593
+2594
+2595
+2596
+2597
+2598
+2599
+2600
+2601
+2602
+2603
+2604
+2605
+2606
+2607
+2608
+2609
+2610
+2611
+2612
+2613
+2614
+2615
+2616
+2617
+2618
+2619
+2620
+2621
+2622
+2623
+2624
+2625
+2626
+2627
+2628
+2629
+2630
+2631
+2632
+2633
+2634
+2635
+2636
+2637
+2638
+2639
+2640
+2641
+2642
+2643
+2644
+2645
+2646
+2647
+2648
+2649
+2650
+2651
+2652
+2653
+2654
+2655
+2656
+2657
+2658
+2659
+2660
+2661
+2662
+2663
+2664
+2665
+2666
+2667
+2668
+2669
+2670
+2671
+2672
+2673
+2674
+2675
+2676
+2677
+2678
+2679
+2680
+2681
+2682
+2683
+2684
+2685
+2686
+2687
+2688
+2689
+2690
+2691
+2692
+2693
+2694
+2695
+2696
+2697
+2698
+2699
+2700
+2701
+2702
+2703
+2704
+2705
+2706
+2707
+2708
+2709
+2710
+2711
+2712
+2713
+2714
+2715
+2716
+2717
+2718
+2719
+2720
+2721
+2722
+2723
+2724
+2725
+2726
+2727
+2728
+2729
+2730
+2731
+2732
+2733
+2734
+2735
+2738
+2739
+2740
+2741
+2742
+2743
+2744
+2745
+2746
+2747
+2748
+2749
+2750
+2751
+2752
+2753
+2754
+2755
+2756
+2757
+2758
+2935
+2936
+2937
+2938
+2939
+2940
+2941
+2953
+2963
+3006
+3007
+3008
+3009
+3010
+3011
+3012
+3013
+3014
+3015
+3016
+3017
+3018
+3019
+3020
+3021
+3022
+3023
+3024
+3025
+3026
+3027
+3028
+3029
+3030
+3034
+3035
+3038
+3039
+3040
+3041
+3042
+3043
+3044
+3045
+3046
+3047
+3048
+3049
+3050
+3051
+3058
+3059
+3068
+3114
+3115
+3116
+3117
+3118
+3120
+3126
+3127
+3128
+3129
+3130
+3131
+3132
+3133
+3134
+3135
+3136
+3137
+3138
+3139
+3140
+3146
+3147
+3150
+3151
+3152
+3300
+3301
+3328
+3329
+3330
+3331
+3332
+3333
+3334
+3335
+3346
+3350
+3351
+3352
+3366
+3386
+3387
+3388
+3389
+3390
+3396
+3397
+3398
+3399
+3407
+3414
+3416
+3764
+3788
+3789
+3790
+3791
+3793
+3795
+3796
+3819
+3821
+3823
+3824
+3833
+3834
+3835
+3836
+3837
+3838
+3839
+3840
+3841
+3842
+3843
+3844
+3845
+3846
+3847
+3848
+3849
+3850
+3851
+3852
+3854
+3873
+3874
+3875
+3876
+3877
+3878
+3879
+3880
+3881
+3882
+3883
+3884
+3885
+3888
+3889
+3906
+3907
+3908
+3909
+3910
+3911
+4001
+4002
+4003
+4004
+4005
+4006
+4007
+4008
+4009
+4010
+4011
+4012
+4013
+4014
+4015
+4016
+4017
+4018
+4019
+4020
+4021
+4022
+4023
+4024
+4025
+4026
+4027
+4028
+4029
+4030
+4031
+4032
+4033
+4034
+4035
+4036
+4037
+4038
+4040
+4041
+4042
+4043
+4044
+4045
+4046
+4047
+4052
+4053
+4054
+4055
+4074
+4075
+4080
+4081
+4120
+4121
+4122
+4123
+4124
+4125
+4126
+4127
+4128
+4129
+4130
+4131
+4132
+4133
+4134
+4135
+4136
+4137
+4138
+4139
+4140
+4141
+4142
+4143
+4144
+4145
+4146
+4147
+4148
+4149
+4150
+4151
+4152
+4153
+4154
+4155
+4156
+4157
+4158
+4159
+4160
+4161
+4162
+4163
+4164
+4165
+4166
+4167
+4168
+4169
+4170
+4171
+4172
+4173
+4174
+4175
+4176
+4178
+4179
+4180
+4181
+4182
+4183
+4184
+4185
+4188
+4189
+4190
+4191
+4192
+4193
+4194
+4195
+4196
+4197
+4198
+4199
+4200
+4201
+4202
+4203
+4204
+4205
+4206
+4207
+4208
+4209
+4210
+4211
+4212
+4213
+4214
+4215
+4216
+4218
+4219
+4220
+4221
+4222
+4223
+4224
+4225
+4226
+4227
+4228
+4229
+4230
+4231
+4232
+4233
+4234
+4235
+4236
+4237
+4238
+4239
+4240
+4241
+4242
+4243
+4244
+4245
+4246
+4247
+4248
+4249
+4250
+4251
+4252
+4253
+4254
+4255
+4256
+4257
+4259
+4260
+4261
+4262
+4263
+4264
+4265
+4266
+4267
+4268
+4269
+4270
+4271
+4272
+4273
+4274
+4275
+4276
+4277
+4278
+4279
+4280
+4281
+4282
+4283
+4284
+4285
+4286
+4287
+4288
+4289
+4291
+4292
+4293
+4294
+4295
+4296
+4297
+4298
+4299
+4300
+4301
+4302
+4303
+4304
+4306
+4307
+4308
+4309
+4310
+4311
+4312
+4313
+4314
+4315
+4316
+4317
+4318
+4319
+4322
+4324
+4327
+4329
+4339
+4341
+4343
+4345
+4347
+4349
+4351
+4353
+4355
+4357
+4359
+4361
+4363
+4365
+4367
+4369
+4371
+4373
+4375
+4377
+4379
+4381
+4383
+4386
+4388
+4417
+4434
+4463
+4466
+4469
+4470
+4472
+4475
+4480
+4482
+4483
+4490
+4491
+4492
+4493
+4494
+4495
+4496
+4497
+4498
+4499
+4500
+4501
+4502
+4503
+4504
+4505
+4506
+4507
+4508
+4509
+4510
+4511
+4512
+4513
+4514
+4515
+4516
+4517
+4518
+4519
+4520
+4521
+4522
+4523
+4524
+4525
+4526
+4527
+4528
+4529
+4530
+4531
+4532
+4533
+4534
+4535
+4536
+4537
+4538
+4539
+4540
+4541
+4542
+4543
+4544
+4545
+4546
+4547
+4548
+4549
+4550
+4551
+4552
+4553
+4554
+4555
+4557
+4558
+4568
+4569
+4570
+4571
+4572
+4573
+4574
+4575
+4576
+4577
+4578
+4579
+4580
+4581
+4582
+4583
+4584
+4585
+4586
+4587
+4588
+4589
+4600
+4601
+4602
+4603
+4604
+4605
+4606
+4607
+4608
+4609
+4610
+4611
+4612
+4613
+4614
+4615
+4616
+4617
+4618
+4619
+4620
+4621
+4622
+4623
+4624
+4625
+4626
+4627
+4628
+4629
+4630
+4631
+4632
+4633
+4634
+4635
+4636
+4637
+4638
+4639
+4640
+4641
+4642
+4643
+4644
+4645
+4646
+4652
+4653
+4654
+4655
+4656
+4657
+4658
+4659
+4660
+4661
+4662
+4663
+4664
+4665
+4666
+4667
+4668
+4669
+4670
+4671
+4672
+4673
+4674
+4675
+4676
+4677
+4678
+4679
+4680
+4681
+4682
+4683
+4684
+4685
+4686
+4687
+4688
+4689
+4690
+4691
+4692
+4693
+4694
+4695
+4696
+4697
+4698
+4699
+4700
+4701
+4702
+4703
+4704
+4705
+4706
+4707
+4708
+4709
+4710
+4711
+4712
+4713
+4714
+4715
+4716
+4717
+4718
+4719
+4720
+4721
+4722
+4723
+4724
+4725
+4726
+4727
+4728
+4729
+4730
+4731
+4732
+4733
+4734
+4735
+4736
+4737
+4738
+4739
+4740
+4741
+4742
+4743
+4744
+4745
+4746
+4747
+4748
+4749
+4750
+4751
+4752
+4753
+4754
+4755
+4756
+4757
+4758
+4759
+4760
+4761
+4762
+4763
+4764
+4765
+4766
+4767
+4768
+4769
+4770
+4771
+4772
+4773
+4774
+4775
+4776
+4777
+4778
+4779
+4780
+4781
+4782
+4783
+4784
+4785
+4786
+4787
+4788
+4789
+4790
+4791
+4792
+4793
+4794
+4795
+4796
+4797
+4798
+4799
+4800
+4801
+4802
+4803
+4804
+4805
+4806
+4807
+4808
+4809
+4810
+4811
+4812
+4813
+4814
+4815
+4816
+4817
+4818
+4819
+4820
+4821
+4822
+4823
+4824
+4839
+4855
+4856
+4857
+4858
+4859
+4860
+4861
+4862
+4863
+4864
+4865
+4866
+4867
+4868
+4869
+4870
+4871
+4872
+4873
+4874
+4875
+4876
+4877
+4878
+4879
+4880
+4883
+4885
+4887
+4889
+4891
+4893
+4895
+4898
+4900
+4901
+4902
+4903
+4904
+4907
+4909
+4921
+4923
+4925
+4927
+4929
+4931
+4933
+4935
+4937
+4939
+4941
+4943
+4945
+4947
+4949
+4951
+4953
+4955
+4957
+4959
+4961
+4963
+4965
+4967
+4969
+4971
+4973
+4975
+4977
+4979
+4981
+4983
+4985
+4987
+4989
+4991
+4993
+4995
+4997
+4999
+5012
+5013
+5017
+5048
+5105
+5106
+5107
+5108
+5109
+5110
+5111
+5112
+5113
+5114
+5115
+5116
+5117
+5118
+5119
+5120
+5121
+5122
+5123
+5124
+5125
+5126
+5127
+5128
+5129
+5130
+5132
+5167
+5168
+5169
+5170
+5171
+5172
+5173
+5174
+5175
+5176
+5177
+5178
+5179
+5180
+5181
+5182
+5183
+5184
+5185
+5186
+5187
+5188
+5224
+5228
+5229
+5233
+5245
+5246
+5251
+5252
+5253
+5254
+5255
+5256
+5257
+5258
+5259
+5263
+5264
+5269
+5270
+5271
+5272
+5273
+5274
+5275
+5323
+5324
+5340
+5342
+5343
+5344
+5345
+5346
+5347
+5348
+5349
+5353
+5354
+5359
+5360
+5364
+5365
+5367
+5370
+5371
+5372
+5373
+5380
+5381
+5392
+5393
+5451
+5464
+5467
+5479
+5480
+5481
+5482
+5488
+5489
+5513
+5515
+5518
+5519
+5520
+5524
+5527
+5545
+5546
+5560
+5561
+5562
+5563
+5564
+5565
+5566
+5567
+5568
+5569
+5570
+5571
+5572
+5573
+5574
+5575
+5576
+5577
+5578
+5579
+5580
+5581
+5582
+5583
+5588
+5592
+5593
+5632
+5633
+5634
+5635
+5636
+5637
+5638
+5639
+5651
+5652
+5653
+5681
+5801
+5802
+5803
+5804
+5808
+5809
+5810
+5811
+5812
+5813
+5814
+5815
+5816
+5830
+20004
+20005
+20006
+20007
+20008
+20009
+20010
+20011
+20012
+20013
+20014
+20015
+20016
+20017
+20018
+20019
+20020
+20021
+20022
+20023
+20024
+20025
+20026
+20027
+20028
+20029
+20030
+20031
+20032
+20064
+20065
+20066
+20067
+20068
+20069
+20070
+20071
+20072
+20073
+20074
+20075
+20076
+20077
+20078
+20079
+20080
+20081
+20082
+20083
+20084
+20085
+20086
+20087
+20088
+20089
+20090
+20091
+20092
+21413
+21414
+21415
+21416
+21417
+21418
+21419
+21420
+21421
+21422
+21423
+21453
+21454
+21455
+21456
+21457
+21458
+21459
+21460
+21461
+21462
+21463
+21473
+21474
+21475
+21476
+21477
+21478
+21479
+21480
+21481
+21482
+21483
+21896
+21897
+21898
+21899
+22171
+22172
+22173
+22174
+22175
+22176
+22177
+22181
+22182
+22183
+22184
+22185
+22186
+22187
+22191
+22192
+22193
+22194
+22195
+22196
+22197
+25884
+27205
+27206
+27207
+27208
+27209
+27210
+27211
+27212
+27213
+27214
+27215
+27216
+27217
+27218
+27219
+27220
+27221
+27222
+27223
+27224
+27225
+27226
+27227
+27228
+27229
+27230
+27231
+27232
+27391
+27392
+27393
+27394
+27395
+27396
+27397
+27398
+27492
+28402
+28403
+28404
+28405
+28406
+28407
+28408
+28409
+28410
+28411
+28412
+28413
+28414
+28415
+28416
+28417
+28418
+28419
+28420
+28421
+28422
+28423
+28424
+28425
+28426
+28427
+28428
+28429
+28430
+28431
+28432
+28462
+28463
+28464
+28465
+28466
+28467
+28468
+28469
+28470
+28471
+28472
+28473
+28474
+28475
+28476
+28477
+28478
+28479
+28480
+28481
+28482
+28483
+28484
+28485
+28486
+28487
+28488
+28489
+28490
+28491
+28492
+29701
+29702
+30161
+30162
+30163
+30164
+30165
+30166
+30167
+30168
+30169
+30170
+30171
+30172
+30173
+30174
+30175
+30176
+30177
+30178
+30179
+30800
+31251
+31252
+31253
+31254
+31255
+31256
+31257
+31258
+31259
+31275
+31276
+31277
+31278
+31279
+31281
+31282
+31283
+31284
+31285
+31286
+31287
+31288
+31289
+31290
+31700
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/axisOrder/mapaxisorder.readme
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/axisOrder/mapaxisorder.readme	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/axisOrder/mapaxisorder.readme	(revision 21019)
@@ -0,0 +1,31 @@
+The file mapaxisorder.csv was downloaded from Mapserver github:
+
+https://github.com/mapserver/mapserver/blob/master/mapaxisorder.csv
+
+It contains the EPSG codes of the CRSs not following the XY axis order.
+It was downloaded on 2015-04-22. It should be updated if the original changes
+(in general it should be updated if there is any additions to EPSG registry
+which follow non-XY axis order).
+It does not include any header or license file, so we assume the general
+Mapserver license (MIT), available on
+https://github.com/mapserver/mapserver/blob/master/README
+
+  Copyright (c) 1996-2007 Regents of the University of Minnesota.
+
+  Permission is hereby granted, free of charge, to any person obtaining a copy 
+  of this software and associated documentation files (the "Software"), to deal 
+  in the Software without restriction, including without limitation the rights 
+  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
+  copies of the Software, and to permit persons to whom the Software is furnished
+  to do so, subject to the following conditions:
+
+  The above copyright notice and this permission notice shall be included in all 
+  copies of this Software or works derived from this Software.
+
+  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
+  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
+  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
+  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
+  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
+  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 
+  SOFTWARE.
\ No newline at end of file
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_en.properties
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_en.properties	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_en.properties	(revision 21019)
@@ -0,0 +1,179 @@
+#Translations for language [en]
+#Tue Jan 20 17:39:04 CET 2009
+a_new_view=New view
+abstract=Abstract
+add=Add
+address=Address
+advanced=Advanced
+advanced_settings=Advanced options
+ancho_alto=Width x Height
+anterior=Previous
+apply=Apply
+bands=Bands
+brillo=Brightness
+brillo_y_contraste=Brightness and Contrast
+browse=Browse
+cancel=Cancel
+cannotReproject=Unable to reproject this coordinate system
+cant_reproject_from_any_of=Unable to reproject from any of
+capas=Layers
+city=City
+clear=Clear
+conectar=Connect
+connect_error=Error connecting
+contact_info=Contact info
+contact_organization=Organization
+contact_person=Name
+contact_position=Position
+contraste=Contrast
+coor_geograficas=Geographic coordinates
+could_not_find_web_map_context_file=Could not find web map context file
+countries_of_the_world=Afghanistan;Albania;Algeria;American Samoa;Andorra;Angola;Anguilla;Antarctica;Antigua and Barbuda;Argentina;Armenia;Aruba;Ascension Island;Australia;Austria;Azerbaijan;Bahamas;Bahrain;Bangladesh;Barbados;Belarus;Belgium;Belize;Benin;Bermuda;Bhutan;Bolivia;Bosnia and Herzegovina;Botswana;Bouvet Island;Brazil;British Indian Ocean Territory;Brunei;Bulgaria;Burkina Faso;Burundi;Cambodia;Cameroon;Canada;Cape Verde;Cayman Islands;Central African Republic;Chad;Chile;China;Christmas Island;Cocos (Keeling) Islands;Colombia;Comoros;Congo (DRC);Congo;Cook Islands;Costa Rica;C\u00f4te d\u0092Ivoire;Croatia;Cuba;Cyprus;Czech Republic;Denmark;Djibouti;Dominica;Dominican Republic;Ecuador;Egypt;El Salvador;Equatorial Guinea;Eritrea;Estonia;Ethiopia;Falkland Islands (Islas Malvinas);Faroe Islands;Fiji Islands;Finland;France;French Guiana;French Polynesia;French Southern and Antarctic Lands;Gabon;Gambia, The;Georgia;Germany;Ghana;Gibraltar;Greece;Greenland;Grenada;Guadeloupe;Guam;Guatemala;Guernsey;Guinea;Guinea-Bissau;Guyana;Haiti;Heard Island and McDonald Islands;Honduras;Hong Kong SAR;Hungary;Iceland;India;Indonesia;Iran;Iraq;Ireland;Isle of Man;Israel;Italy;Jamaica;Japan;Jordan;Jersey;Kazakhstan;Kenya;Kiribati;Korea;Kuwait;Kyrgyzstan;Laos;Latvia;Lebanon;Lesotho;Liberia;Libya;Liechtenstein;Lithuania;Luxembourg;Macao SAR;Macedonia, Former Yugoslav Republic of;Madagascar;Malawi;Malaysia;Maldives;Mali;Malta;Marshall Islands;Martinique;Mauritania;Mauritius;Mayotte;Mexico;Micronesia;Moldova;Monaco;Mongolia;Montserrat;Morocco;Mozambique;Myanmar;Namibia;Nauru;Nepal;Netherlands Antilles;Netherlands, The;New Caledonia;New Zealand;Nicaragua;Niger;Nigeria;Niue;Norfolk Island;North Korea;Northern Mariana Islands;Norway;Oman;Pakistan;Palau;Palestinian Authority;Panama;Papua New Guinea;Paraguay;Peru;Philippines;Pitcairn Islands;Poland;Portugal;Puerto Rico;Qatar;Reunion;Romania;Russia;Rwanda;Samoa;San Marino;S\u00e3o Tom\u00e9 and Pr\u00edncipe;Saudi Arabia;Senegal;Serbia and Montenegro;Seychelles;Sierra Leone;Singapore;Slovakia;Slovenia;Solomon Islands;Somalia;South Africa;South Georgia and the South Sandwich Islands;Spain;Sri Lanka;St. Helena;St. Kitts and Nevis;St. Lucia;St. Pierre and Miquelon;St. Vincent and the Grenadines;Sudan;Suriname;Svalbard and Jan Mayen;Swaziland;Sweden;Switzerland;Syria;Taiwan;Tajikistan;Tanzania;Thailand;Timor-Leste;Togo;Tokelau;Tonga;Trinidad and Tobago;Tristan da Cunha;Tunisia;Turkey;Turkmenistan;Turks and Caicos Islands;Tuvalu;Uganda;Ukraine;United Arab Emirates;United Kingdom;United States of America;United States Minor Outlying Islands;Uruguay;Uzbekistan;Vanuatu;Vatican City;Venezuela;Vietnam;Virgin Islands;Virgin Islands, British;Wallis and Futuna;Yemen;Zambia;Zimbabwe
+country=Country
+covered_extension=Covered extension
+created_with=Created with
+defined_by_view_extent=Defined by the view\u0092s extent
+description=Description
+description_URL=Description URL
+dimension=Dimension
+dimensiones=Dimensions
+disagregate_layers=Maintain layer structure
+e-mail=E-mail
+edit_layer_properties_to_fix_them=Edit layer properties to fix them
+eliminar_extremos=Remove edges
+error=Error
+error_writting_file=Error writting file
+estilos=Styles
+export=Export
+export_to_map_context=Export to Map Context
+extents_no_coincidentes=Extent of the selected image does not match with the origin image.
+failed_restoring_online_resource_values=
+fax=Fax
+Fichero=File
+fichero_existe=Selected file already exists as layer band
+file_name=File
+file_version=File version
+fit_WMS_layer=Config WMS Layer
+format=Format
+formato=Format
+formatos=Formats
+georeferenciado=Georeferenced
+height=Height
+html_in_a_new_view=<HTML>Creates a new view into the project. The new view will contain all the layers defined in the file.</HTML>
+html_in_other_view=<HTML>Adds the layers to the selected view in the list.</HTML>
+html_in_the_current_view=<HTML>Adds the layers defined in the file to the current active view.</HTML>
+id=ID
+import=Import
+import_map_context=Import maps from an OGC's Web Map Context file (.cml).
+in=in
+info=Information
+Informacion=Information
+interval=Interval
+invalid_dimension_values=Invalid dimension values
+is_required=is required
+keywords=Keywords
+layer=Layer
+layer_abstract=Abstract
+layer_name=Layer name
+layer_not_queryable=does not accept this kind of query
+layer_title=Layer title
+layers_in_other_view=Layers in other view
+layers_in_the_current_view=Layers in the current view
+lineal_directo=Direct linear
+logo_URL=Logo URL
+m/pixel=metros/pixel
+map_context_file_error=Web Map Context file error
+map_extent=Extent
+map_size_in_pixels=Map size (pixels)
+metadatos=Metadatos
+move_layer_down=Move down
+move_layer_up=Move up
+multiple_value=Multiple value
+must_specify_a_file=You must specify a target file.
+name=Name
+none_selected=None selected
+not_available=Not available
+num_bandas=Band count
+ogc_mapcontext_file=OGC Web Map Context
+ok=Ok
+Ok=Ok
+opacidad=Opacity
+open_layers_as=Open layers as
+options=Options
+origen_de_datos=Data origin
+postcode=Postcode
+previsualizacion=Preview
+problems_encountered_while_importing=Problems encountered while importing
+properties=Properties
+propiedades_raster=Raster properties
+Proyecciones=Projections
+realce=Enhance
+recorte_colas=Tail trimming
+refresh_capabilities=Refresh cache
+refresh_capabilities_tooltip=Mark this check to override local data
+remove=Remove
+seleccionar_srs=Select SRS
+select_formats=Select formats
+select_layers=Select raster layers
+selected_dimensions=Selected dimensions
+selected_layers=Selected layers
+server=Server
+server_abstract=Summary
+server_cant_render_layers=This WMS server can't render these layers together.\nTry making separate requests, one for each layer.
+server_timeout=WMS server time out
+server_title=Title
+server_type=Server Type
+service_info=Service information
+set=Set
+settings=Settings
+settings_editor=Settings editor
+show_layer_names=Show layer names
+si=yes
+siguiente=Next
+single_value=Single value
+state_or_province=State/Province
+style=Style
+tamano=Size\:
+tamPixX=Pixel size X
+tamPixY=Pixel size Y
+telephone=Telephone
+tipo_dato=Data type
+title=Title
+to=To
+transparencia=Transparency
+unknown_response_format=Unkown response format
+unsupported_crs=Unsupported CRS
+unsupported_map_context_version=Uunsupported Web Map Context version.
+unsupported_version=Unsupported version
+use_custom_size=Custom size
+use_full_extent=Use full extent
+use_view_size=View size
+value=Value
+version=Version
+version_conflict=Version conflict
+view=View
+Vista=View
+web_map_context=Web Map Context
+web_map_context_settings=Web Map Context properties
+width=Width
+wms_cant_connect=Cannot connect to WMS
+wms_not_queryable=This server is not queryable
+wms_properties=WMS Properties
+wms_server_error=WMS Server error
+wms_transparency=Transparency
+WMSLayer=WMS Layer
+xmax=Maximum X
+xmin=Minimum X
+ymax=Maximum Y
+ymin=Minimum Y
+remote_service_tiled=You have decided to use the tile cache in this remote service.\n That means that several requests will be done in a maximum size of 
+seleccionar_infobypoint_format=Select text format for info by point
+infoformat=Format of info by point
+WMC_Open=Open WMC
+Export_to=Export to
+host_unreachable=The host is unreachable. Maybe the network is not connected or the host off.
+ip_unknown=IP address unknown 
+network_error=Error with the network connection
+infobypoint_not_available=The information by point will not be available because \n the basic tools of raster are not installed
+Only_needed_for_servers_not_strictly_honouring_the_WMS_standard=Only needed for servers not strictly honouring the WMS standard
+Assume_coordinates_follow_XY_axis_order=Assume coordinates follow XY axis order
\ No newline at end of file

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_en.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_gl.properties
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_gl.properties	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_gl.properties	(revision 21019)
@@ -0,0 +1,167 @@
+#Translations for language [gl]
+#Mon Oct 30 09:38:21 CET 2006
+a_new_view=Nova vista
+abstract=Resumo
+add=Engadir
+address=Enderezo
+advanced=Avanzada
+advanced_settings=Opci\u00f3ns avanzadas
+ancho_alto=Ancho alto
+anterior=Anterior
+apply=Aplicar
+bands=Bandas
+brillo=Brillo
+brillo_y_contraste=Brillo e Contraste
+browse=Examinar
+cancel=Cancelar
+cannotReproject=Non se pode reproxectar este sistema de coordenadas
+cant_reproject_from_any_of=
+capas=Capas
+city=Cidade
+clear=Limpar
+conectar=Conectar
+connect_error=Erro de conexi\u00f3n
+contact_info=Informaci\u00f3n de contacto
+contact_organization=Organizaci\u00f3n
+contact_person=Nome
+contact_position=Cargo
+contraste=Contraste
+coor_geograficas=Coordenadas xeogr\u00e1ficas
+could_not_find_web_map_context_file=
+countries_of_the_world=Acerbaix\u00e1n;Afganist\u00e1n;Albania;Alema\u00f1a;Alxeria;Andorra;Angola;Antiga e Barbuda;Arabia Saud\u00ed;Armenia;Arxentina;Australia;Austria;Bahamas;Bahrein;Bangladesh;Barbados;Belice;B\u00e9lxica;Ben\u00edn;Bermudas;Bielorrusia;Bolivia;Bosnia Hercegovina;Botsuana;Brasil;Brunei;Bulgaria;Burquina Faso;Burundi;But\u00e1n;Cabo Verde;Camboia;Camer\u00fan;Canad\u00e1;Casaquist\u00e1n;Chad;Chequia;Chile;China;Chipre;Cidade do Vaticano;Cimbabue;Colombia;Comores;Congo;Congo, Rep\u00fablica Democr\u00e1tica do;Corea do Norte;Corea do Sur;Costa do Marfil;Costa Rica;Croacia;Cuba;Curdist\u00e1n;Dinamarca;Dominica;Ecuador;Emiratos \u00c1rabes Unidos;Eritrea;Eslovaquia;Eslovenia;Espa\u00f1a;Estados Unidos de Am\u00e9rica;Estonia;Etiop\u00eda;Exipto;Fidxi;Filipinas;Finlandia;Francia;Gab\u00f3n;Gambia;Ghana;Granada;Grecia;Guadalupe;G\u00fciana;Guinea;Guinea Ecuatorial;Guinea-Bissau;Hait\u00ed;Honduras;Hungr\u00eda;Iemen;Illas Marshall;Illas Salom\u00f3n;India;Indonesia;Ir\u00e1n;Iraq;Irlanda;Islandia;Israel;Italia;Laos;Lesoto;Letonia;L\u00edbano;Liberia;Libia;Liechtenstein;Lituania;Luxemburgo;Macedonia, Antiga Rep\u00fablica Iusgolava de;Madagascar;Malaisia;Malaui;Maldivas;Mal\u00ed;Malta;Marrocos;Mauricio;Mauritania;M\u00e9xico;Micronesia, Estados Federados de;Moldavia;M\u00f3naco;Mongolia;Mozambique;Myanmar;Namibia;Nauru;Nepal;Nicaragua;Niue;N\u00edxer;Nixeria;Noruega;Nova Celandia;O Salvador;Om\u00e1n;Pa\u00edses Baixos;Palestina;Panam\u00e1;Pap\u00faa Nova Guinea;Paquist\u00e1n;Paraguai;Per\u00fa;Polonia;Porto Rico;Portugal;Qatar;Quenia;Quirguicist\u00e1n;Quiribati;Quvait;Reino Unido;Rep\u00fablica Centroafricana;Rep\u00fablica Dominicana;Ruanda;Ruman\u00eda;Rusia;Saint Kitts e Nevis;Samoa Occidental;San Mari\u00f1o;San Vicente e Granadinas;Santa Luc\u00eda;Santo Tom\u00e9 e Pr\u00edncipe;Senegal;Serbia e Montenegro;Serra Leona;Seychelles;Singapur;Siria;Somalia;Sri Lanka;Suacilandia;Sud\u00e1frica;Sud\u00e1n;Suecia;Su\u00edza;Surinam;Tailandia;Taiw\u00e1n;Tanzania;Taxiquist\u00e1n;Timor Leste;Togo;Tonga;Toquelau;Trinidade e Tobago;T\u00fanez;Turcomenist\u00e1n;Turqu\u00eda;Tuvalu;Ucra\u00edna;Uganda;Uruguai;Uzbequist\u00e1n;Vanuatu;Venezuela;Vietnam;Xap\u00f3n;Xeorxia;Xibuti;Xordania;Zambia
+country=Pa\u00eds
+covered_extension=Cobertura da extensi\u00f3n
+created_with=Creado con
+defined_by_view_extent=
+description=Descripci\u00f3n
+description_URL=URL descrici\u00f3n
+dimension=Dimensi\u00f3n
+dimensiones=Dimensi\u00f3ns
+disagregate_layers=
+e-mail=Correo electr\u00f3nico
+edit_layer_properties_to_fix_them=
+eliminar_extremos=Eliminar extremos
+error=Erro
+error_writting_file=Erro ao escribir o arquivo
+estilos=Estilos
+export=Exportar
+export_to_map_context=
+extents_no_coincidentes=Extensi\u00f3ns non coincidentes
+fax=Fax
+Fichero=Arquivo
+fichero_existe=Arquivo existe
+file_name=Arquivo
+file_version=Versi\u00f3n do arquivo
+fit_WMS_layer=Axustar capa WMS
+format=Formato
+formato=Formato
+formatos=Formatos
+georeferenciado=
+height=Alto
+html_in_a_new_view=<HTML>Crea unha vista nova no proxecto. A nova vista conter\u00e1 t\u00f3dalas capas definidas polo arquivo.</HTML>
+html_in_other_view=<HTML>Engade as capas na vista que especifique da lista seguinte\:</HTML>
+html_in_the_current_view=<HTML>Engade as capas definidas no arquivo \u00e1 vista activa.</HTML>
+id=ID
+import=Importar
+import_map_context=Importar mapas dende un arquivo Web Map Context de OGC
+in=en
+info=Informaci\u00f3n
+Informacion=Informaci\u00f3n
+interval=Int\u00e9rvalo
+invalid_dimension_values=
+is_required=\u00e9 obligatorio
+keywords=Palabras clave
+layer=Capa
+layer_abstract=Resumo da capa
+layer_name=Nome da capa
+layer_not_queryable=
+layer_title=T\u00edtulo da capa
+layers_in_other_view=Capas na vista que eu escolla
+layers_in_the_current_view=Capas na vista actual
+lineal_directo=Lineal directo
+logo_URL=URL logotipo
+m/pixel=metros/pixel
+map_context_file_error=Erro no arquivo Web Map Context
+map_extent=Extensi\u00f3
+map_size_in_pixels=Tama\u00f1o do mapa (p\u00edxeles)
+metadatos=Metadatos
+move_layer_down=Mover abaixo
+move_layer_up=Mover arriba
+multiple_value=Valor m\u00faltiple
+must_specify_a_file=Debe especificar un arquivo de destino.
+name=Nome
+none_selected=Ning\u00fan seleccionado
+not_available=Non dispo\u00f1ible
+num_bandas=N\u00famero de bandas
+ogc_mapcontext_file=OGC Web Map Context
+ok=Aceptar
+Ok=Aceptar
+opacidad=Opacidade
+open_layers_as=Abrir as capas como
+options=Opci\u00f3ns
+origen_de_datos=Origen de dades
+postcode=C\u00f3digo postal
+previsualizacion=Previsualizaci\u00f3n
+problems_encountered_while_importing=
+properties=Propiedades
+propiedades_raster=Propiedades do raster
+Proyecciones=
+realce=Realce
+recorte_colas=Recorte colas
+refresh_capabilities=Refrescar cach\u00e9
+refresh_capabilities_tooltip=Marque esta casilla para sobreescribir os datos anteriores.
+remove=Quitar
+seleccionar_srs=Seleccionar SRS
+select_formats=Seleccionar formatos
+select_layers=Seleccionar capas
+selected_dimensions=Dimensi\u00f3ns seleccionadas
+selected_layers=Capas seleccionadas
+server=Servidor
+server_abstract=Resumo do servidor
+server_cant_render_layers=Este servidor non pode renderizar estas capas xuntas. \nFaga petici\u00f3ns separadas para cada capa.
+server_timeout=Rematou o tempo de conexi\u00f3n ao servidor
+server_title=T\u00edtulo do servidor
+server_type=Tipo de servidor
+service_info=Informaci\u00f3n do servicio
+set=Establecer
+settings=Axustes
+settings_editor=Editor de axustes
+show_layer_names=Amosar nomes de capas
+si=
+siguiente=Seguinte
+single_value=Valor simple
+state_or_province=Estado/Provincia
+style=Estilo
+tamano=Tama\u00f1o\:
+tamPixX=
+tamPixY=
+telephone=Tel\u00e9fono
+tipo_dato=Tipo dato
+title=T\u00edtulo
+to=Hata
+transparencia=Transparencia
+unknown_response_format=Formato de resposta desco\u00f1ecido
+unsupported_crs=
+unsupported_map_context_version=
+unsupported_version=Versi\u00f3n non soportada
+use_custom_size=Tama\u00f1o personalizado
+use_full_extent=
+use_view_size=Tama\u00f1o da vista
+value=Valor
+version=Versi\u00f3n
+version_conflict=Conflicto de versi\u00f3n
+view=Vista
+Vista=Vista
+web_map_context=Web Map Context
+web_map_context_settings=Propiedades Web Map Context
+width=Ancho
+wms_cant_connect=
+wms_not_queryable=Este servidor non acepta petici\u00f3ns deste tipo
+wms_properties=Propiedades WMS
+wms_server_error=Erro do servidor WMS
+wms_transparency=Transparenza
+WMSLayer=Capa WMS
+xmax=xmax
+xmin=xmin
+ymax=ymax
+ymin=ymin

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_gl.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/config.xml
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/config.xml	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/config.xml	(revision 21019)
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<plugin-config>
+	<depends plugin-name="org.gvsig.raster.mainplugin" />
+	<depends plugin-name="org.gvsig.raster.tilecache.app" optional="true" />
+	<libraries library-dir="lib"/>
+	<resourceBundle name="text"/>
+	<extensions>
+		<extension class-name="org.gvsig.raster.wms.app.wmsclient.WMSClientExtension"
+			description="Support to access WMS"
+			active="true"
+			priority="1">
+		</extension>
+		<extension class-name="org.gvsig.raster.wms.app.wmsclient.wmc.ExportWebMapContextExtension"
+			description="Support for exporting OGC's Web Map Context documents"
+			active="true"
+			priority="10">
+			<menu text="File/Export_to/WMC"
+				name="raster-wms-export-wmc" />
+			<action
+        		name="raster-wms-export-wmc"
+       			label="WMC"
+        		action-command="EXPORT"
+        		tooltip="export_to_map_context"
+        		position="100900400"
+        	/>
+		</extension>
+		<extension class-name="org.gvsig.raster.wms.app.wmsclient.wmc.ImportWebMapContextExtension"
+			description="Support for exporting OGC's Web Map Context documents"
+			active="true"
+			priority="10">
+			<menu text="File/WMC_Open"
+				name="raster-wms-import-wmc" />
+			<action
+        		name="raster-wms-import-wmc"
+       			label="WMC_Open"
+        		action-command="IMPORT"
+        		tooltip="import_map_context"
+        		position="100500000"
+        	/>
+		</extension>
+		<extension class-name="org.gvsig.raster.wms.app.wmsclient.infobypoint.InfoByWMSPointExtension"
+			description="Extensi�n encargada de gestionar la herramienta de info."
+			active="true"
+			priority="10">
+			 <action
+        		name="layer-info-by-wms-point"
+        		label="_point_information"
+        		tooltip="_Show_point_information"
+        		action-command="INFO_BY_PIXEL"
+        		icon="layer-info-by-pixel"
+        		position="0"
+        		/>
+		</extension>
+	</extensions>
+</plugin-config>
\ No newline at end of file

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/config.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_cs.properties
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_cs.properties	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_cs.properties	(revision 21019)
@@ -0,0 +1,167 @@
+#Translations for language [cs]
+#Mon Nov 06 09:04:31 CET 2006
+a_new_view=Nov\u00fd pohled
+abstract=Abstrakt
+add=P\u0159idat
+address=Adre\u00e7a
+advanced=Pokro\u010dil\u00fd
+advanced_settings=Pokro\u010dil\u00e9 nastaven\u00ed
+ancho_alto=\u0160\u00ed\u0159ka X v\u00fd\u0161ka
+anterior=P\u0159edchoz\u00ed
+apply=Pou\u017e\u00edt
+bands=Okraje
+brillo=Jas
+brillo_y_contraste=Jas a kontrats
+browse=Vyhledej
+cancel=Zru\u0161it
+cannotReproject=Nelze znovuzobrazit sou\u0159adnicov\u00fd syst\u00e9m
+cant_reproject_from_any_of=Nen\u00ed mo\u017en\u00e9 zm\u011bn\u00ed projekci pro \u017e\u00e1dn\u00fd z
+capas=Vrstvy
+city=M\u011bsto
+clear=Vy\u010distit
+conectar=Spojit
+connect_error=Chyba spojen\u00ed
+contact_info=Kontaktn\u00ed informace
+contact_organization=Organizace
+contact_person=Jm\u00e9no
+contact_position=C\u00e0rrec
+contraste=Contrast
+coor_geograficas=Geografick\u00e9 sou\u0159adnice
+could_not_find_web_map_context_file=
+countries_of_the_world=Afghanistan;Albania;Algeria;American Samoa;Andorra;Angola;Anguilla;Antarctica;Antigua and Barbuda;Argentina;Armenia;Aruba;Ascension Island;Australia;Austria;Azerbaijan;Bahamas;Bahrain;Bangladesh;Barbados;Belarus;Belgium;Belize;Benin;Bermuda;Bhutan;Bolivia;Bosnia and Herzegovina;Botswana;Bouvet Island;Brazil;British Indian Ocean Territory;Brunei;Bulgaria;Burkina Faso;Burundi;Cambodia;Cameroon;Canada;Cape Verde;Cayman Islands;Central African Republic;Chad;Chile;China;Christmas Island;Cocos (Keeling) Islands;Colombia;Comoros;Congo (DRC);Congo;Cook Islands;Costa Rica;C\u00f4te d\u0092Ivoire;Croatia;Cuba;Cyprus;Czech Republic;Denmark;Djibouti;Dominica;Dominican Republic;Ecuador;Egypt;El Salvador;Equatorial Guinea;Eritrea;Estonia;Ethiopia;Falkland Islands (Islas Malvinas);Faroe Islands;Fiji Islands;Finland;France;French Guiana;French Polynesia;French Southern and Antarctic Lands;Gabon;Gambia, The;Georgia;Germany;Ghana;Gibraltar;Greece;Greenland;Grenada;Guadeloupe;Guam;Guatemala;Guernsey;Guinea;Guinea-Bissau;Guyana;Haiti;Heard Island and McDonald Islands;Honduras;Hong Kong SAR;Hungary;Iceland;India;Indonesia;Iran;Iraq;Ireland;Isle of Man;Israel;Italy;Jamaica;Japan;Jordan;Jersey;Kazakhstan;Kenya;Kiribati;Korea;Kuwait;Kyrgyzstan;Laos;Latvia;Lebanon;Lesotho;Liberia;Libya;Liechtenstein;Lithuania;Luxembourg;Macao SAR;Macedonia, Former Yugoslav Republic of;Madagascar;Malawi;Malaysia;Maldives;Mali;Malta;Marshall Islands;Martinique;Mauritania;Mauritius;Mayotte;Mexico;Micronesia;Moldova;Monaco;Mongolia;Montserrat;Morocco;Mozambique;Myanmar;Namibia;Nauru;Nepal;Netherlands Antilles;Netherlands, The;New Caledonia;New Zealand;Nicaragua;Niger;Nigeria;Niue;Norfolk Island;North Korea;Northern Mariana Islands;Norway;Oman;Pakistan;Palau;Palestinian Authority;Panama;Papua New Guinea;Paraguay;Peru;Philippines;Pitcairn Islands;Poland;Portugal;Puerto Rico;Qatar;Reunion;Romania;Russia;Rwanda;Samoa;San Marino;S\u00e3o Tom\u00e9 and Pr\u00edncipe;Saudi Arabia;Senegal;Serbia and Montenegro;Seychelles;Sierra Leone;Singapore;Slovakia;Slovenia;Solomon Islands;Somalia;South Africa;South Georgia and the South Sandwich Islands;Spain;Sri Lanka;St. Helena;St. Kitts and Nevis;St. Lucia;St. Pierre and Miquelon;St. Vincent and the Grenadines;Sudan;Suriname;Svalbard and Jan Mayen;Swaziland;Sweden;Switzerland;Syria;Taiwan;Tajikistan;Tanzania;Thailand;Timor-Leste;Togo;Tokelau;Tonga;Trinidad and Tobago;Tristan da Cunha;Tunisia;Turkey;Turkmenistan;Turks and Caicos Islands;Tuvalu;Uganda;Ukraine;United Arab Emirates;United Kingdom;United States of America;United States Minor Outlying Islands;Uruguay;Uzbekistan;Vanuatu;Vatican City;Venezuela;Vietnam;Virgin Islands;Virgin Islands, British;Wallis and Futuna;Yemen;Zambia;Zimbabwe
+country=Zem\u011b
+covered_extension=Roz\u0161\u00ed\u0159en\u00ed
+created_with=Vytvo\u0159eno s
+defined_by_view_extent=Definov\u00e1no oblast\u00ed pohledu
+description=Popis
+description_URL=Popis URL
+dimension=Rozm\u011br
+dimensiones=Rozm\u011bry
+disagregate_layers=\u00daprava struktury vrstev
+e-mail=E-mail
+edit_layer_properties_to_fix_them=Edituj vlastnosti vrstvy ....
+eliminar_extremos=Odstranit hrany
+error=Error
+error_writting_file=Chyba p\u0159i z\u00e1pisu souboru
+estilos=Styly
+export=Exportovat
+export_to_map_context=Export do Mapov0ho kontextu
+extents_no_coincidentes=Zvolen\u00e1 hranice nesouhlas\u00ed s p\u016fvodn\u00edm obr\u00e1zkem.
+fax=Fax
+Fichero=Soubor
+fichero_existe=Zvolen\u00fd soubor ji\u017e existuje jako vrstva
+file_name=N\u00e1zev souboru
+file_version=Verze souboru
+fit_WMS_layer=Upravit WMS Vrstvu
+format=Form\u00e1t
+formato=Form\u00e1t
+formatos=Form\u00e1ty
+georeferenciado=Georeferencovan\u00fd
+height=V\u00fd\u0161ka
+html_in_a_new_view=<HTML>Vytvo\u0159\u00ed nov\u00fd pohled do projektu. Tento nov\u00fd pohled bude obsahovat v\u0161echny vrstvy definovan\u00e9 v souboru.</HTML>
+html_in_other_view=<HTML>P\u0159id\u00e1 vrstvy do zvolen\u00e9ho pohledu v seznamu.</HTML>
+html_in_the_current_view=<HTML>P\u0159id\u00e1 vrstvy definovan\u00e9 v souboru do aktu\u00e1ln\u00edho aktivn\u00edho pohledu.</HTML>
+id=ID
+import=Import
+import_map_context=Import map z OGC Web Map Context souboru (.cml).
+in=v
+info=Informace
+Informacion=Informace
+interval=Interval
+invalid_dimension_values=Chybn\u00e9 hodnoty rozm\u011bru
+is_required=\u00e9s obligatori
+keywords=Paraules clau
+layer=Vrstva
+layer_abstract=Abstrakt
+layer_name=N\u00e1zev vrstvy
+layer_not_queryable=
+layer_title=N\u00e1zev vrstvy
+layers_in_other_view=Vrstvy v jin\u00e9m pohledu
+layers_in_the_current_view=Vrstvy v aktu\u00e1ln\u00edm pohledu
+lineal_directo=P\u0159\u00edmo line\u00e1rn\u00ed
+logo_URL=URL logotip
+m/pixel=metros/pixel
+map_context_file_error=Chyba Web Map Context souboru.
+map_extent=Roz\u0161\u00ed\u0159en\u00ed
+map_size_in_pixels=Velikost mapy (v pixelech)
+metadatos=Metadatos
+move_layer_down=Dol\u016f
+move_layer_up=Nahoru
+multiple_value=N\u00e1sobn\u00e1 hodnota
+must_specify_a_file=Mus\u00edte ur\u010dit v\u00fdsledn\u00fd soubor
+name=Jm\u00e9no
+none_selected=Nic nezvoleno
+not_available=Nen\u00ed k dispozici
+num_bandas=Okrajov\u00e9 hodnoty
+ogc_mapcontext_file=OGC Web Map Context
+ok=Budi\u017e
+Ok=Budi\u017e
+opacidad=Stupe\u0148 pr\u016fsvitnosti
+open_layers_as=Otev\u0159\u00ed vrstvu jako
+options=Mo\u017enosti
+origen_de_datos=P\u016fvod dat
+postcode=Po\u0161tovn\u00ed sm\u011brovac\u00ed \u010d\u00edslo
+previsualizacion=Preview
+problems_encountered_while_importing=Nalezen probl\u00e9m b\u011bhem importu
+properties=Vlastnosti
+propiedades_raster=Vlastnosti rastru
+Proyecciones=Projekce
+realce=vylep\u0161en\u00ed
+recorte_colas=O\u0159ez fronty
+refresh_capabilities=Obnovit cache
+refresh_capabilities_tooltip=P\u0159epsat lok\u00e1ln\u00ed data
+remove=Odstranit
+seleccionar_srs=Vybrat SRS
+select_formats=Zvolen\u00e9 form\u00e1ty
+select_layers=Vybrat vrstvu
+selected_dimensions=Zvolen\u00e9 rozm\u011bry
+selected_layers=Zvolen\u00e9 vrstvy
+server=Server
+server_abstract=Shrnut\u00ed
+server_cant_render_layers=Tento WMS nem\u016f\u017ee spojit tyto vrstvy. \nPokuste se odd\u011blit dotazy pro ka\u017edou vrstvu.
+server_timeout=WMS vypr\u0161el \u010dasov\u00fd limit
+server_title=N\u00e1zev
+server_type=Typ serveru
+service_info=Informace o serveru
+set=Nastavit
+settings=Nastaven\u00ed
+settings_editor=Editor nastaven\u00ed
+show_layer_names=Zobraz jm\u00e9na
+si=ano
+siguiente=Dal\u0161\u00ed
+single_value=Jedna hodnota
+state_or_province=Estat/Prov\u00edncia
+style=Styl
+tamano=Velikost\:
+tamPixX=Velikost pixlu X
+tamPixY=Velikost pixlu Y  
+telephone=Tel\u00e8fon
+tipo_dato=Datov\u00fd typ
+title=N\u00e1zev
+to=Do
+transparencia=Pr\u016fhlednost
+unknown_response_format=Nezn\u00e1m\u00fd form\u00e1t odpov\u011bdi
+unsupported_crs=Nepodporovan\u00fd CRS
+unsupported_map_context_version=Nepodporovan\u00e1 verze kontextu Webov\u00e9 mapy
+unsupported_version=Nepodporovan\u00e1 verze
+use_custom_size=Voliteln\u00e1 velikost
+use_full_extent=Po\u017e\u00edj zobrazen\u00ed v\u0161eho
+use_view_size=Velikost pohledu
+value=Hodnota
+version=Versi\u00f3
+version_conflict=Konflikt verz\u00ed
+view=Pohled
+Vista=Pohled
+web_map_context=Kontext webov\u00e9 mapy
+web_map_context_settings=Nastaven\u00ed kontextu webov\u00e9 mapy
+width=Ampl\u00e0ria
+wms_cant_connect=Nelze se spojit s WMS
+wms_not_queryable=Server neum\u00ed vyhled\u00e1vat
+wms_properties=WMS vlastnosti
+wms_server_error=Chyba WMS
+wms_transparency=Pr\u016fhlednost
+WMSLayer=WMS vrstva
+xmax=maximum X
+xmin=minimum X
+ymax=maximum Y
+ymin=minimum Y

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_cs.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/images/forward.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/images/forward.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/images/icon-layer-wms.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/images/icon-layer-wms.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/images/icoLayer.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/images/icoLayer.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/images/fastbackward.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/images/fastbackward.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/images/backward.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/images/backward.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/images/aplication-preferences-uparrow.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/images/aplication-preferences-uparrow.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/images/aplication-preferences-downarrow.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/images/aplication-preferences-downarrow.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/images/fastforward.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/images/fastforward.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_fr.properties
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_fr.properties	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_fr.properties	(revision 21019)
@@ -0,0 +1,167 @@
+#Translations for language [fr]
+#Mon Oct 30 09:38:21 CET 2006
+a_new_view=
+abstract=R\u00e9sum\u00e9
+add=Ajouter
+address=Adre\u00e7a
+advanced=
+advanced_settings=
+ancho_alto=Largeur X hauteur
+anterior=Pr\u00e9c\u00e9dent
+apply=Appliquer
+bands=Bandes
+brillo=Luminosit\u00e9
+brillo_y_contraste=Luminosit\u00e9 et contrate
+browse=
+cancel=Annuler
+cannotReproject=No es pot reprojectar aquest sistema de refer\u00e8ncia
+cant_reproject_from_any_of=
+capas=Couches g\u00e9ographiques
+city=
+clear=Effacer
+conectar=Connecter
+connect_error=
+contact_info=
+contact_organization=Organitzaci\u00f3
+contact_person=Nom
+contact_position=C\u00e0rrec
+contraste=Contraste
+coor_geograficas=Coordonn\u00e9es g\u00e9ographiques
+could_not_find_web_map_context_file=
+countries_of_the_world=Afghanistan;Albania;Algeria;American Samoa;Andorra;Angola;Anguilla;Antarctica;Antigua and Barbuda;Argentina;Armenia;Aruba;Ascension Island;Australia;Austria;Azerbaijan;Bahamas;Bahrain;Bangladesh;Barbados;Belarus;Belgium;Belize;Benin;Bermuda;Bhutan;Bolivia;Bosnia and Herzegovina;Botswana;Bouvet Island;Brazil;British Indian Ocean Territory;Brunei;Bulgaria;Burkina Faso;Burundi;Cambodia;Cameroon;Canada;Cape Verde;Cayman Islands;Central African Republic;Chad;Chile;China;Christmas Island;Cocos (Keeling) Islands;Colombia;Comoros;Congo (DRC);Congo;Cook Islands;Costa Rica;C\u00f4te d\u0092Ivoire;Croatia;Cuba;Cyprus;Czech Republic;Denmark;Djibouti;Dominica;Dominican Republic;Ecuador;Egypt;El Salvador;Equatorial Guinea;Eritrea;Estonia;Ethiopia;Falkland Islands (Islas Malvinas);Faroe Islands;Fiji Islands;Finland;France;French Guiana;French Polynesia;French Southern and Antarctic Lands;Gabon;Gambia, The;Georgia;Germany;Ghana;Gibraltar;Greece;Greenland;Grenada;Guadeloupe;Guam;Guatemala;Guernsey;Guinea;Guinea-Bissau;Guyana;Haiti;Heard Island and McDonald Islands;Honduras;Hong Kong SAR;Hungary;Iceland;India;Indonesia;Iran;Iraq;Ireland;Isle of Man;Israel;Italy;Jamaica;Japan;Jordan;Jersey;Kazakhstan;Kenya;Kiribati;Korea;Kuwait;Kyrgyzstan;Laos;Latvia;Lebanon;Lesotho;Liberia;Libya;Liechtenstein;Lithuania;Luxembourg;Macao SAR;Macedonia, Former Yugoslav Republic of;Madagascar;Malawi;Malaysia;Maldives;Mali;Malta;Marshall Islands;Martinique;Mauritania;Mauritius;Mayotte;Mexico;Micronesia;Moldova;Monaco;Mongolia;Montserrat;Morocco;Mozambique;Myanmar;Namibia;Nauru;Nepal;Netherlands Antilles;Netherlands, The;New Caledonia;New Zealand;Nicaragua;Niger;Nigeria;Niue;Norfolk Island;North Korea;Northern Mariana Islands;Norway;Oman;Pakistan;Palau;Palestinian Authority;Panama;Papua New Guinea;Paraguay;Peru;Philippines;Pitcairn Islands;Poland;Portugal;Puerto Rico;Qatar;Reunion;Romania;Russia;Rwanda;Samoa;San Marino;S\u00e3o Tom\u00e9 and Pr\u00edncipe;Saudi Arabia;Senegal;Serbia and Montenegro;Seychelles;Sierra Leone;Singapore;Slovakia;Slovenia;Solomon Islands;Somalia;South Africa;South Georgia and the South Sandwich Islands;Spain;Sri Lanka;St. Helena;St. Kitts and Nevis;St. Lucia;St. Pierre and Miquelon;St. Vincent and the Grenadines;Sudan;Suriname;Svalbard and Jan Mayen;Swaziland;Sweden;Switzerland;Syria;Taiwan;Tajikistan;Tanzania;Thailand;Timor-Leste;Togo;Tokelau;Tonga;Trinidad and Tobago;Tristan da Cunha;Tunisia;Turkey;Turkmenistan;Turks and Caicos Islands;Tuvalu;Uganda;Ukraine;United Arab Emirates;United Kingdom;United States of America;United States Minor Outlying Islands;Uruguay;Uzbekistan;Vanuatu;Vatican City;Venezuela;Vietnam;Virgin Islands;Virgin Islands, British;Wallis and Futuna;Yemen;Zambia;Zimbabwe
+country=
+covered_extension=
+created_with=Creat amb
+defined_by_view_extent=
+description=Description
+description_URL=
+dimension=Dimension
+dimensiones=Dimensions
+disagregate_layers=
+e-mail=E-mail
+edit_layer_properties_to_fix_them=
+eliminar_extremos=Eliminer les extr\u00eames
+error=Error
+error_writting_file=
+estilos=Styles
+export=Exporter
+export_to_map_context=
+extents_no_coincidentes=Les dimmensions de l'image selectionn\u00e9e ne co\u00efncident pas avec celles de l'image d'origine.
+fax=Fax
+Fichero=Fichier
+fichero_existe=Le fichier selectionn\u00e9 existe d\u00e9j\u00e0
+file_name=Nom de fichier 
+file_version=
+fit_WMS_layer=Ajuster \u00e0 la couche WMS
+format=Format
+formato=Format
+formatos=Formats
+georeferenciado=
+height=Hauteur
+html_in_a_new_view=<HTML>Crea una vista nova al projecte. La nova vista contindr\u00e0 totes les capes definides pel fitxer.</HTML>
+html_in_other_view=<HTML>Afegeix les capes a la vista que especifique de les de la llista seg\u00fcent.</HTML>
+html_in_the_current_view=<HTML>Afegeix les capes definides pel fitxer a la actual vista activa.</HTML>
+id=ID
+import=Importer
+import_map_context=Importer des cartes depuis un fichier Web Map Context de l'OGC.
+in=\u00e0 l'int\u00e9rieur
+info=Information
+Informacion=
+interval=Intervalle
+invalid_dimension_values=
+is_required=\u00e9s obligatori
+keywords=Paraules clau
+layer=Couche
+layer_abstract=R\u00e9sum\u00e9
+layer_name=Nom de la couche
+layer_not_queryable=
+layer_title=Titre de la couche
+layers_in_other_view=Capes la vista que jo trie
+layers_in_the_current_view=
+lineal_directo=Lin\u00e9aire direct
+logo_URL=URL logotip
+m/pixel=metros/pixel
+map_context_file_error=
+map_extent=Extension
+map_size_in_pixels=Tamany del mapa (p\u00edxels)
+metadatos=Metadatos
+move_layer_down=Moure avall
+move_layer_up=Moure amunt
+multiple_value=Valeur multiple
+must_specify_a_file=
+name=Nom
+none_selected=Aucune selection
+not_available=No disponible
+num_bandas=Nombre de bandes
+ogc_mapcontext_file=OGC Web Map Context
+ok=Accepter
+Ok=Accepter
+opacidad=Opacit\u00e9
+open_layers_as=
+options=Options
+origen_de_datos=Origine des donn\u00e9es
+postcode=
+previsualizacion=Pr\u00e9visualisation.
+problems_encountered_while_importing=
+properties=Propri\u00e9t\u00e9s
+propiedades_raster=Propri\u00e9t\u00e9s du raster
+Proyecciones=
+realce=R\u00e9heussement
+recorte_colas=Couper les r\u00e9sidus
+refresh_capabilities=Refrescar mem\u00f2ria cau
+refresh_capabilities_tooltip=Marque esta casella per a sobreescriure les dades anteriores.
+remove=Quitter
+seleccionar_srs=S\u00e9lectionner SRS
+select_formats=S\u00e9lection des formats
+select_layers=S\u00e9lectionner des couches
+selected_dimensions=S\u00e9lectionner une dimension
+selected_layers=Couches s\u00e9lectionn\u00e9es
+server=Serveur
+server_abstract=R\u00e9sum\u00e9
+server_cant_render_layers=Aquest servidor WMS no pot renderitzar aquestes dues capes conjuntament.\nSepareles en dues cosultes diferents.
+server_timeout=WMS d\u00e9lais d\u00e9pass\u00e9
+server_title=Titre
+server_type=Type de server
+service_info=Information sur le service
+set=Etablir
+settings=
+settings_editor=
+show_layer_names=
+si=
+siguiente=Suivant
+single_value=Valeur unique
+state_or_province=
+style=Style
+tamano=Taille\:
+tamPixX=
+tamPixY=
+telephone=Tel\u00e8fon
+tipo_dato=Type de donn\u00e9e
+title=Titre
+to=Jusqu'\u00e0
+transparencia=Transparence
+unknown_response_format=
+unsupported_crs=
+unsupported_map_context_version=
+unsupported_version=Versi\u00f3 no suportada
+use_custom_size=
+use_full_extent=
+use_view_size=
+value=Valeur
+version=Versi\u00f3
+version_conflict=Conflicte de versi\u00f3
+view=Vue
+Vista=Vue
+web_map_context=Web Map Context
+web_map_context_settings=
+width=Largeur
+wms_cant_connect=Cannot connect to WMS
+wms_not_queryable=Aquest servidor no accepta peticions d\u0092aquest tipus
+wms_properties=Propri\u00e9t\u00e9s WMS
+wms_server_error=Error del servidor WMS
+wms_transparency=Transparence
+WMSLayer=Couche WMS
+xmax=X minimum
+xmin=X minimum
+ymax=Y minimum
+ymin=Y minimum

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_fr.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_eu.properties
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_eu.properties	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_eu.properties	(revision 21019)
@@ -0,0 +1,167 @@
+#Translations for language [eu]
+#Mon Oct 30 09:38:21 CET 2006
+a_new_view=Bista berria
+abstract=Laburpena
+add=Gehitu
+address=Helbidea
+advanced=Aurreratua
+advanced_settings=Aukera aurreratuak
+ancho_alto=Zabalera altuera
+anterior=Aurrekoa
+apply=Aplikatu
+bands=Bandak
+brillo=Distira
+brillo_y_contraste=Distira eta kontrastea
+browse=Aztertu
+cancel=Utzi
+cannotReproject=Koordenatu sistema hau ezin da berriro proiektatu
+cant_reproject_from_any_of=
+capas=Geruzak
+city=Herria
+clear=Garbitu
+conectar=Konektatu
+connect_error=Konexio-errorea
+contact_info=Harremanetarako informazioa
+contact_organization=Antolaketa
+contact_person=Izena
+contact_position=Kargua
+contraste=Kontrastea
+coor_geograficas=Koordenatu geografikoak
+could_not_find_web_map_context_file=
+countries_of_the_world=Afganistan;Albania;Aljeria;Ameriketako Samoa;Andorra;Angola;Anguilla;Antartika;Antigua eta Barbuda;Argentina;Armenia;Aruba;Ascension uhartea;Australia;Austria;Azerbaijan;Bahamak;Bahrain;Bangladesh;Barbados;Bielorrusia;Belgika;Belize;Benin;Bermuda;Bhutan;Bolivia;Bosnia-Herzegovina;Botswana;Bouvet uhartea;Brazil;Indiako ozeanoko Britainiar Lurraldea;Brunei;Bulgaria;Burkina Faso;Burundi;Kanbodia;Kamerun;Kanada;Cabo Verde;Cayman uharteak;Afrika Erdiko Errepublika;Txad;Txile;Txina;Christmas uhartea;Kokoen uhartea(Keeling);Kolonbia;Komoreak;Kongo (KED);Kongo;Cook uharteak;Costa Rica;Boli Kosta;Kroazia;Kuba;Zipre;Txekiar Errepublika;Danimarka;Djibouti;Dominika;Dominikar Errepublika;Ekuador;Egipto;El Salvador;Ekuatore Ginea;Eritrea;Estonia;Etiopia;Falkland uharteak;Faroe uharteak;Fiji;Finlandia;Frantzia;Guyana Frantsesa;Polinesia Frantsesa;Hegoaldeko eta Antartikoko Frantziako lurraldea;Gabon;Gambia;Georgia;Alemania;Ghana;Gibraltar;Grezia;Groenlandia;Grenada;Guadalupe;Guam;Guatemala;Guernesey;Ginea;Ginea-Bissau;Guyana;Haiti;Heard uhartea eta McDonald uharteak;Honduras;Hong Kong SAR;Hungaria;Islandia;India;Indonesia;Iran;Irak;Irlanda;Man uhartea;Israel;Italia;Jamaika;Japonia;Jordania;Jersey;Kazakhstan;Kenya;Kiribati;Korea;Kuwait;Kirgizistan;Laos;Latvia;Libano;Lesotho;Liberia;Libia;Liechtenstein;Lituania;Luxenburgo;Macau SAR;Mazedonia;Madagaskar;Malawi;Malaysia;Maldivak;Mali;Malta;Marshall uharteak;Martinika;Mauritania;Maurizio;Mayotte;Mexiko;Mikronesia;Moldavia;Monako;Mongolia;Montserrat;Maroko;Mozambike;Myanmar;Namibia;Nauru;Nepal;Holandarren Antillak;Herbehereak;Kaledonia Berria;Zeelanda Berria;Nikaragua;Niger;Nigeria;Niue;Norfolk uhartea;Ipar Korea;Mariana uharteak;Norvegia;Oman;Pakistan;Palau;Palestinako Agintea;Panama;Papua Ginea Berria;Paraguai;Peru;Filipinak;Pitcairn uharteak;Polonia;Portugal;Puerto Rico;Qatar;Reunion;Errumania;Errusia;Ruanda;Samoa;San Marino;Santo Tome eta Principe;Saudi Arabia;Senegal;Serbia eta Montenegro;Seychelleak;Sierra Leona;Singapur;Eslovakia;Eslovenia;Solomon uharteak;Somalia;Hegoafrika;South Georgia eta hegoaldeko Sandwich uharteak;Espainia;Sri Lanka;Santa Helena;St. Kitts eta Nevis;St. Luzia;Sain-Pierre eta Mikelune;Saint Vincent eta Grenadinak;Sudan;Surinam;Svalbard eta Jan Mayen;Swazilandia;Suedia;Suitza;Siria;Taiwan;Tadjikistan;Tanzania;Thailandia;Timor-Leste;Togo;Tokelau;Tonga;Trinidad eta Tobago;Tristan da Cunha;Tunisia;Turkia;Turkmenistan;Turk eta Caiko uharteak;Tuvalu;Uganda;Ukraina;Arabiar Emirerri Batuak;Britainia Handia;Ameriketako Estatu Batuak;Estatu Batuetako Garrantzia Txikiko Uharte Periferikoak;Uruguai;Uzbekistan;Vanuatu;Vatikano Hiria;Venezuela;Vietnam;Birjina uharteak;Birjina uharteak,Britainia;Wallis eta Futuna;Yemen;Zambia;Zimbabwe
+country=Herrialdea
+covered_extension=Hedaduraren estaldura
+created_with=Honekin sortua\:
+defined_by_view_extent=
+description=Deskripzioa
+description_URL=URL deskribapena
+dimension=Neurria
+dimensiones=Neurriak
+disagregate_layers=Geruzen egitura mantendu
+e-mail=e-posta
+edit_layer_properties_to_fix_them=
+eliminar_extremos=Ezabatu muturrak
+error=Errorea
+error_writting_file=Errorea fitxategia idaztean
+estilos=Estiloak
+export=Esportatu
+export_to_map_context=
+extents_no_coincidentes=Hedadurak ez datoz bat
+fax=Faxa
+Fichero=Fitxategia
+fichero_existe=Fitxategia badago
+file_name=Fitxategia
+file_version=Fitxategiaren bertsioa
+fit_WMS_layer=Doitu WMS geruza
+format=Formatua
+formato=Formatua
+formatos=Formatuak
+georeferenciado=
+height=Altuera
+html_in_a_new_view=Sortu bista berria proiektuan. Bista berrian fitxategiak zehaztutako geruza guztiak jasoko dira.
+html_in_other_view=Gehitu geruzak zerrenda honetan zehaztutako bistan\:
+html_in_the_current_view=<HTML>Fitxategian zehaztutako geruzak aktibo dagoen bistan gehitzen ditu.</HTML>
+id=ID
+import=Inportatu
+import_map_context=Inportatu mapak OGC Web Map Context fitxategi batetik
+in=hemen\:
+info=Informazioa
+Informacion=Informazioa
+interval=Tartea
+invalid_dimension_values=
+is_required=nahitaezkoa da
+keywords=Gako-hitzak
+layer=Geruza
+layer_abstract=Laburpena
+layer_name=Geruzaren izena
+layer_not_queryable=
+layer_title=Geruzaren izenburua
+layers_in_other_view=Geruzak nik aukeratutako bistan
+layers_in_the_current_view=Oraingo bistako geruzak
+lineal_directo=Zuzeneko lineala
+logo_URL=URL logotipoa
+m/pixel=metros/pixel
+map_context_file_error=Errorea Web Map Context fitxategian
+map_extent=Luzapena
+map_size_in_pixels=Maparen tamaina (pixelak)
+metadatos=Metadatos
+move_layer_down=Behera mugitu
+move_layer_up=Gora mugitu
+multiple_value=Balio anizkoitzak
+must_specify_a_file=Xede fitxategi bat zehaztu behar duzu.
+name=Izena
+none_selected=Ez da bat ere ez hautatu
+not_available=Ez dago erabilgarri
+num_bandas=Banda kopurua
+ogc_mapcontext_file=OGC Web Map Context
+ok=Ados
+Ok=Ados
+opacidad=Opakotasuna
+open_layers_as=Zabaldu geruzak honela\:
+options=Aukerak
+origen_de_datos=Datu-iturburua
+postcode=Posta kodea
+previsualizacion=Aurrebista
+problems_encountered_while_importing=
+properties=Ezaugarriak
+propiedades_raster=Raster-aren ezaugarriak
+Proyecciones=
+realce=Irtengunea
+recorte_colas=Ilarak ebaki
+refresh_capabilities=Eguneratu aurrememoria
+refresh_capabilities_tooltip=Markatu lauki hau aurreko datuen gainean idazteko
+remove=Kendu
+seleccionar_srs=Hautatu SRS
+select_formats=Hautatu formatuak
+select_layers=Hautatu geruzak
+selected_dimensions=Hautatutako dimentsioak
+selected_layers=Hautatutako geruzak
+server=Zerbitzaria
+server_abstract=Aurkibidea
+server_cant_render_layers=Zerbitzari honek ezin ditu geruza horiek batera errendatu. Saia zaitez geruza bakoitzerako eskari bat egiten
+server_timeout=Server timeout
+server_title=Zerbitzariaren izenburua
+server_type=Zerbitzari mota
+service_info=Zerbitzuari buruzko argibideak
+set=Ezarri
+settings=Doikuntzak
+settings_editor=Doikuntza-editorea
+show_layer_names=Erakutsi geruzen izenak
+si=
+siguiente=Hurrengoa
+single_value=Balio bakuna
+state_or_province=Estatua/Probintzia
+style=Estiloa
+tamano=Tamaina\:
+tamPixX=
+tamPixY=
+telephone=Telefonoa
+tipo_dato=Datu mota
+title=Izenburua
+to=Honaino
+transparencia=Gardentasuna
+unknown_response_format=Erantzunaren formatua ezezaguna da
+unsupported_crs=
+unsupported_map_context_version=Web Map Context fitxategiaren bertsioa ezin da jasan
+unsupported_version=Ezin da bertsio hori jasan
+use_custom_size=Tamaina pertsonalizatua
+use_full_extent=
+use_view_size=Bistaren tamaina
+value=Balioa
+version=Bertsioa
+version_conflict=Bertsio-gatazka
+view=Bista
+Vista=Bista
+web_map_context=Web Map Context
+web_map_context_settings=Web Map Context fitxategiaren ezaugarriak
+width=Zabalera
+wms_cant_connect=Ezin izan da WMSrekin konexioa egin
+wms_not_queryable=Zerbitzari honek ez ditu era horretako eskariak onartzen
+wms_properties=WMS ezaugarriak
+wms_server_error=WMS zerbitzariaren errorea
+wms_transparency=Gardentasuna
+WMSLayer=WMS geruza
+xmax=xmax
+xmin=xmin
+ymax=ymax
+ymin=ymin

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_eu.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_it.properties
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_it.properties	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_it.properties	(revision 21019)
@@ -0,0 +1,167 @@
+#Translations for language [it]
+#Tue Nov 07 12:30:01 CET 2006
+a_new_view=Nuova Vista
+abstract=Riassunto
+add=Aggiungi
+address=Indirizzo
+advanced=Avanzata
+advanced_settings=Opzioni avanzate
+ancho_alto=Larghezza X Altezza
+anterior=Precedente
+apply=Applica
+bands=Bande
+brillo=Luminosit\u00e1
+brillo_y_contraste=Luminosit\u00e0 e Contrasto
+browse=Sfoglia
+cancel=Cancella
+cannotReproject=Non \u00e9 possibile proiettare in questo sistema di coordinate
+cant_reproject_from_any_of=Impossibile riproiettare da nessuno dei
+capas=Layers
+city=Citt\u00e0
+clear=Pulisci
+conectar=Connetti
+connect_error=Errore di connessione
+contact_info=Riferimenti di contatto
+contact_organization=Organizzazione
+contact_person=Nome
+contact_position=Cargo
+contraste=Contrasto
+coor_geograficas=Coordinate geografiche
+could_not_find_web_map_context_file=
+countries_of_the_world=Afghanistan;Albania;Algeria;American Samoa;Andorra;Angola;Anguilla;Antarctica;Antigua and Barbuda;Argentina;Armenia;Aruba;Ascension Island;Australia;Austria;Azerbaijan;Bahamas;Bahrain;Bangladesh;Barbados;Belarus;Belgium;Belize;Benin;Bermuda;Bhutan;Bolivia;Bosnia and Herzegovina;Botswana;Bouvet Island;Brazil;British Indian Ocean Territory;Brunei;Bulgaria;Burkina Faso;Burundi;Cambodia;Cameroon;Canada;Cape Verde;Cayman Islands;Central African Republic;Chad;Chile;China;Christmas Island;Cocos (Keeling) Islands;Colombia;Comoros;Congo (DRC);Congo;Cook Islands;Costa Rica;C\u00f4te d\u0092Ivoire;Croatia;Cuba;Cyprus;Czech Republic;Denmark;Djibouti;Dominica;Dominican Republic;Ecuador;Egypt;El Salvador;Equatorial Guinea;Eritrea;Estonia;Ethiopia;Falkland Islands (Islas Malvinas);Faroe Islands;Fiji Islands;Finland;France;French Guiana;French Polynesia;French Southern and Antarctic Lands;Gabon;Gambia, The;Georgia;Germany;Ghana;Gibraltar;Greece;Greenland;Grenada;Guadeloupe;Guam;Guatemala;Guernsey;Guinea;Guinea-Bissau;Guyana;Haiti;Heard Island and McDonald Islands;Honduras;Hong Kong SAR;Hungary;Iceland;India;Indonesia;Iran;Iraq;Ireland;Isle of Man;Israel;Italy;Jamaica;Japan;Jordan;Jersey;Kazakhstan;Kenya;Kiribati;Korea;Kuwait;Kyrgyzstan;Laos;Latvia;Lebanon;Lesotho;Liberia;Libya;Liechtenstein;Lithuania;Luxembourg;Macao SAR;Macedonia, Former Yugoslav Republic of;Madagascar;Malawi;Malaysia;Maldives;Mali;Malta;Marshall Islands;Martinique;Mauritania;Mauritius;Mayotte;Mexico;Micronesia;Moldova;Monaco;Mongolia;Montserrat;Morocco;Mozambique;Myanmar;Namibia;Nauru;Nepal;Netherlands Antilles;Netherlands, The;New Caledonia;New Zealand;Nicaragua;Niger;Nigeria;Niue;Norfolk Island;North Korea;Northern Mariana Islands;Norway;Oman;Pakistan;Palau;Palestinian Authority;Panama;Papua New Guinea;Paraguay;Peru;Philippines;Pitcairn Islands;Poland;Portugal;Puerto Rico;Qatar;Reunion;Romania;Russia;Rwanda;Samoa;San Marino;S\u00e3o Tom\u00e9 and Pr\u00edncipe;Saudi Arabia;Senegal;Serbia and Montenegro;Seychelles;Sierra Leone;Singapore;Slovakia;Slovenia;Solomon Islands;Somalia;South Africa;South Georgia and the South Sandwich Islands;Spain;Sri Lanka;St. Helena;St. Kitts and Nevis;St. Lucia;St. Pierre and Miquelon;St. Vincent and the Grenadines;Sudan;Suriname;Svalbard and Jan Mayen;Swaziland;Sweden;Switzerland;Syria;Taiwan;Tajikistan;Tanzania;Thailand;Timor-Leste;Togo;Tokelau;Tonga;Trinidad and Tobago;Tristan da Cunha;Tunisia;Turkey;Turkmenistan;Turks and Caicos Islands;Tuvalu;Uganda;Ukraine;United Arab Emirates;United Kingdom;United States of America;United States Minor Outlying Islands;Uruguay;Uzbekistan;Vanuatu;Vatican City;Venezuela;Vietnam;Virgin Islands;Virgin Islands, British;Wallis and Futuna;Yemen;Zambia;Zimbabwe
+country=Paese
+covered_extension=Copertura dell'estenzione
+created_with=Creato con
+defined_by_view_extent=Utilizza estensione della vista
+description=Descrizione
+description_URL=URL descrittiva
+dimension=Dimensione
+dimensiones=Dimensioni
+disagregate_layers=Conserva la struttura dei layers
+e-mail=E-mail
+edit_layer_properties_to_fix_them=Modificare le propriet\u00e0 del layer per correggerle
+eliminar_extremos=Elimina gli estremi
+error=Errore
+error_writting_file=Errore nella scrittura del file
+estilos=Stili
+export=Esporta
+export_to_map_context=Esporta in Map Context
+extents_no_coincidentes=L'estensione della immagine selezionata non coincide con la immagine di origine.
+fax=Fax
+Fichero=File
+fichero_existe=Il file selezionato esiste gi\u00e1 come banda del layer
+file_name=File
+file_version=Versione del file
+fit_WMS_layer=Adatta layer WMS
+format=Formato
+formato=Formato
+formatos=Formati
+georeferenciado=Georeferenziando
+height=Altezza
+html_in_a_new_view=<HTML>Crea una vista nuova nel progetto. La nuova vista conterr\u00e1 tutti i Layers definiti defini dal file.</HTML>
+html_in_other_view=<HTML>Aggiunge i layer nella vista specificata nella lista seguente\:</HTML>
+html_in_the_current_view=<HTML>Aggiunge i Layers nel file alla vista attiva.</HTML>
+id=ID
+import=Importa
+import_map_context=Importa mappe da un file Web Map Context OGC (.cml).
+in=in
+info=Informazione
+Informacion=Informazione
+interval=Intervallo
+invalid_dimension_values=Valori di dimensione errati
+is_required=\u00e9 obligatorio
+keywords=Parole chiavi
+layer=Layer
+layer_abstract=Riassunto del Layer
+layer_name=Nome del layer
+layer_not_queryable=
+layer_title=Titolo del layer
+layers_in_other_view=Layers in altra vista
+layers_in_the_current_view=Layers nella vista attuale
+lineal_directo=Lineare diretto
+logo_URL=URL logotipo
+m/pixel=metri/pixel
+map_context_file_error=Errore nel file Web Map Context
+map_extent=Estensione
+map_size_in_pixels=Dimensione della mappa (pixels)
+metadatos=Metadati
+move_layer_down=Muovi in basso
+move_layer_up=Muovi in alto
+multiple_value=Valore multiplo
+must_specify_a_file=Specificare un file di output.
+name=Nome
+none_selected=Nessuna selezione
+not_available=Non disponible
+num_bandas=Numero delle bande
+ogc_mapcontext_file=OGC Web Map Context
+ok=Accetta
+Ok=Accetta
+opacidad=Opacit\u00e1
+open_layers_as=Apri layer come
+options=Opzioni
+origen_de_datos=Origine dei dati
+postcode=Codice postale
+previsualizacion=Anteprima
+problems_encountered_while_importing=Riscontrati problemi nell'importazione
+properties=Propriet\u00e1
+propiedades_raster=Propriet\u00e1 del raster
+Proyecciones=Proiezioni
+realce=Ottimizzazione
+recorte_colas=Ritaglio degli estremi
+refresh_capabilities=Aggiorna cache
+refresh_capabilities_tooltip=Marcare la casella per sovrascrivere i dati precedenti.
+remove=Rimuovi
+seleccionar_srs=Selezionare SRS
+select_formats=Seleziona formati
+select_layers=Seleziona Layers
+selected_dimensions=Dimensioni selezionate
+selected_layers=Layers selezionati
+server=Server
+server_abstract=Sommario del Server
+server_cant_render_layers=Il server non \u00e9 in grado di rappresentare i layers contemporaneamente.\nSepararli in diverse viste per ciascun Layer.
+server_timeout=Tempo massimo di attesa di risposta WMS terminato
+server_title=Nome del Server
+server_type=Tipo di Server
+service_info=Informazione del servizio
+set=Stabilisci
+settings=Impostazioni
+settings_editor=Editor di impostazioni
+show_layer_names=Mostra i nomi dei layers
+si=si
+siguiente=Successivo
+single_value=Valore unico
+state_or_province=Stato/Provincia
+style=Stile
+tamano=Dimensione\:
+tamPixX=Dimensione pixel X
+tamPixY=Dimensione pixel Y
+telephone=Telefono
+tipo_dato=Tipo di Dato
+title=Titolo
+to=A\:
+transparencia=Transparenza
+unknown_response_format=Formato di risposta sconosciuto
+unsupported_crs=CRS non supportato
+unsupported_map_context_version=Versione di Web Map Context non supportata
+unsupported_version=Versione non supportata
+use_custom_size=Dimensione personalizzata
+use_full_extent=Usa estensione totale
+use_view_size=Dimensione della vista
+value=Valore
+version=Versione
+version_conflict=Conflitto di versione
+view=Vista
+Vista=Vista
+web_map_context=Web Map Context
+web_map_context_settings=Propriet\u00e0 Web Map Context
+width=Larghezza
+wms_cant_connect=Non \u00e9 stato possibile realizzare la connessione con il WMS
+wms_not_queryable=Il server non accetta query di questo tipo
+wms_properties=Propriet\u00e1 WMS
+wms_server_error=Errore del Server WMS
+wms_transparency=Transparenza
+WMSLayer=WMS layer
+xmax=X massima
+xmin=X minima
+ymax=Y massima
+ymin=Y minima

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_it.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/plugin-persistence.def
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/plugin-persistence.def	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/plugin-persistence.def	(revision 21019)
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<!--
+Definitions of plugin persistence org.gvsig.editing.
+ -->
+<definitions>
+  <version>1.0.0</version>
+  <classes>
+    <class name="org.gvsig.raster.wms.app.wmsclient">
+      <description>Persistence definition for the WMS client plugin</description>
+      <fields>
+        <field name="servers" type="object" classOfValue="org.gvsig.andami.persistence.serverData.ServerDataPersistence" mandatory="false">
+          <description>List of WMS servers</description>
+        </field>
+      </fields>
+    </class>
+  </classes>
+</definitions>
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text.properties
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text.properties	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text.properties	(revision 21019)
@@ -0,0 +1,180 @@
+#Translations for language [es]
+#Mon Oct 30 09:38:21 CET 2006
+a_new_view=Vista nueva
+abstract=Resumen
+add=A\u00f1adir
+address=Direcci\u00f3n
+advanced=Avanzada
+advanced_settings=Opciones avanzadas
+ancho_alto=Ancho x Alto
+anterior=Anterior
+apply=Aplicar
+bands=Bandas
+brillo=Brillo
+brillo_y_contraste=Brillo y Contraste
+browse=Examinar
+cancel=Cancelar
+cannotReproject=No se puede reproyectar este sistema de coordenadas
+cant_reproject_from_any_of=No se puede reproyectar desde ning\u00fan
+capas=Capas
+city=Ciudad
+clear=Limpiar
+conectar=Conectar
+connect_error=Error de conexi\u00f3n
+contact_info=Informaci\u00f3n de contacto
+contact_organization=Organizaci\u00f3n
+contact_person=Nombre
+contact_position=Cargo
+contraste=Contraste
+coor_geograficas=Coordenadas geogr\u00e1ficas
+could_not_find_web_map_context_file=No se pudo encontrar el aarchivo web map context
+countries_of_the_world=Afghanistan;Albania;Algeria;American Samoa;Andorra;Angola;Anguilla;Antarctica;Antigua and Barbuda;Argentina;Armenia;Aruba;Ascension Island;Australia;Austria;Azerbaijan;Bahamas;Bahrain;Bangladesh;Barbados;Belarus;Belgium;Belize;Benin;Bermuda;Bhutan;Bolivia;Bosnia and Herzegovina;Botswana;Bouvet Island;Brazil;British Indian Ocean Territory;Brunei;Bulgaria;Burkina Faso;Burundi;Cambodia;Cameroon;Canada;Cape Verde;Cayman Islands;Central African Republic;Chad;Chile;China;Christmas Island;Cocos (Keeling) Islands;Colombia;Comoros;Congo (DRC);Congo;Cook Islands;Costa Rica;C\u00f4te d\u0092Ivoire;Croatia;Cuba;Cyprus;Czech Republic;Denmark;Djibouti;Dominica;Dominican Republic;Ecuador;Egypt;El Salvador;Equatorial Guinea;Eritrea;Estonia;Ethiopia;Falkland Islands (Islas Malvinas);Faroe Islands;Fiji Islands;Finland;France;French Guiana;French Polynesia;French Southern and Antarctic Lands;Gabon;Gambia, The;Georgia;Germany;Ghana;Gibraltar;Greece;Greenland;Grenada;Guadeloupe;Guam;Guatemala;Guernsey;Guinea;Guinea-Bissau;Guyana;Haiti;Heard Island and McDonald Islands;Honduras;Hong Kong SAR;Hungary;Iceland;India;Indonesia;Iran;Iraq;Ireland;Isle of Man;Israel;Italy;Jamaica;Japan;Jordan;Jersey;Kazakhstan;Kenya;Kiribati;Korea;Kuwait;Kyrgyzstan;Laos;Latvia;Lebanon;Lesotho;Liberia;Libya;Liechtenstein;Lithuania;Luxembourg;Macao SAR;Macedonia, Former Yugoslav Republic of;Madagascar;Malawi;Malaysia;Maldives;Mali;Malta;Marshall Islands;Martinique;Mauritania;Mauritius;Mayotte;Mexico;Micronesia;Moldova;Monaco;Mongolia;Montserrat;Morocco;Mozambique;Myanmar;Namibia;Nauru;Nepal;Netherlands Antilles;Netherlands, The;New Caledonia;New Zealand;Nicaragua;Niger;Nigeria;Niue;Norfolk Island;North Korea;Northern Mariana Islands;Norway;Oman;Pakistan;Palau;Palestinian Authority;Panama;Papua New Guinea;Paraguay;Peru;Philippines;Pitcairn Islands;Poland;Portugal;Puerto Rico;Qatar;Reunion;Romania;Russia;Rwanda;Samoa;San Marino;S\u00e3o Tom\u00e9 and Pr\u00edncipe;Saudi Arabia;Senegal;Serbia and Montenegro;Seychelles;Sierra Leone;Singapore;Slovakia;Slovenia;Solomon Islands;Somalia;South Africa;South Georgia and the South Sandwich Islands;Spain;Sri Lanka;St. Helena;St. Kitts and Nevis;St. Lucia;St. Pierre and Miquelon;St. Vincent and the Grenadines;Sudan;Suriname;Svalbard and Jan Mayen;Swaziland;Sweden;Switzerland;Syria;Taiwan;Tajikistan;Tanzania;Thailand;Timor-Leste;Togo;Tokelau;Tonga;Trinidad and Tobago;Tristan da Cunha;Tunisia;Turkey;Turkmenistan;Turks and Caicos Islands;Tuvalu;Uganda;Ukraine;United Arab Emirates;United Kingdom;United States of America;United States Minor Outlying Islands;Uruguay;Uzbekistan;Vanuatu;Vatican City;Venezuela;Vietnam;Virgin Islands;Virgin Islands, British;Wallis and Futuna;Yemen;Zambia;Zimbabwe
+country=Pa\u00eds
+covered_extension=Cobertura de la extensi\u00f3n
+created_with=Creado con
+defined_by_view_extent=Usar extensi\u00f3n de la vista
+description=Descripci\u00f3n
+description_URL=URL descripci\u00f3n
+dimension=Dimensi\u00f3n
+dimensiones=Dimensiones
+disagregate_layers=Conservar estructura de capas
+e-mail=Correo electr\u00f3nico
+edit_layer_properties_to_fix_them=Editar las propiedades de la capa para corregirlas
+eliminar_extremos=Eliminar extremos
+error=Error
+error_writting_file=Error escribiendo el archivo
+estilos=Estilos
+export=Exportar
+export_to_map_context=Exportar a Map Context
+extents_no_coincidentes=Extensiones no coincidentes
+fax=Fax
+Fichero=Archivo
+fichero_existe=Fichero existe
+file_name=Archivo
+file_version=Versi\u00f3n del fichero
+fit_WMS_layer=Ajustar capa WMS
+format=Formato
+formato=Formato
+formatos=Formatos
+georeferenciado=Georeferenciado
+height=Alto
+html_in_a_new_view=<HTML>Crea una vista nueva en el proyecto. La nueva vista contendr\u00e1 todas las capas definidas por el fichero.</HTML>
+html_in_other_view=<HTML>A\u00f1ade las capas en la vista que especifique de la lista siguiente\:</HTML>
+html_in_the_current_view=<HTML>A\u00f1ade las capas definidas en el fichero a la vista activa.</HTML>
+id=ID
+import=Importar
+import_map_context=Importar mapas desde un fichero Web Map Context de OGC
+in=en
+info=Informaci\u00f3n
+Informacion=Informaci\u00f3n
+interval=Intervalo
+invalid_dimension_values=Valores de dimensi\u00f3n inv\u00e1lidos
+is_required=es obligatorio
+keywords=Palabras clave
+layer=Capa
+layer_abstract=Resumen de la capa
+layer_name=Nombre de la capa
+layer_not_queryable=no acepta este tipo de peticiones
+layer_title=T\u00edtulo de la capa
+layers_in_other_view=Capas en la vista que yo elija
+layers_in_the_current_view=Capas en la vista actual
+lineal_directo=Lineal directo
+logo_URL=URL logotipo
+m/pixel=metros/pixel
+map_context_file_error=Error en el archivo Web Map Context
+map_extent=Extensi\u00f3n
+map_size_in_pixels=Tama\u00f1o del mapa (px)
+metadatos=Metadatos
+move_layer_down=Mover abajo
+move_layer_up=Mover arriba
+multiple_value=Valor m\u00faltiple
+must_specify_a_file=Debe especificar un fichero de destino.
+name=Nombre
+none_selected=Ninguno seleccionado
+not_available=No disponible
+num_bandas=N\u00famero de bandas
+ogc_mapcontext_file=OGC Web Map Context
+ok=Aceptar
+Ok=Aceptar
+opacidad=Opacidad
+open_layers_as=Abrir las capas como
+options=Opciones
+origen_de_datos=Origen de datos
+postcode=C\u00f3digo postal
+previsualizacion=Previsualizaci\u00f3n
+problems_encountered_while_importing=Se encontraron problemas al importar
+properties=Propiedades
+propiedades_raster=Propiedades del r\u00e1ster
+Proyecciones=Proyecciones
+realce=Realce
+recorte_colas=Recorte de colas
+refresh_capabilities=Refrescar cach\u00e9
+tile_cache=Uso de cach\u00e9 de teselas local
+tile_cache_tooltip=Marque esta casilla para usar la cach\u00e9 de teselas de almacenamiento local.
+refresh_capabilities_tooltip=Marque esta casilla para sobreescribir los datos anteriores.
+remove=Quitar
+seleccionar_srs=Seleccionar SRS
+select_formats=Seleccionar formatos
+select_layers=Seleccionar capas raster
+selected_dimensions=Dimensiones seleccionadas
+selected_layers=Capas seleccionadas
+server=Servidor
+server_abstract=Resumen del servidor
+server_cant_render_layers=Este servidor no puede renderizar estas capas juntas.\nPruebe a hacer peticiones separadas para cada capa.
+server_timeout=Alcanzado m\u00e1ximo tiempo de espera de respuesta
+server_title=T\u00edtulo del servidor
+server_type=Tipo de servidor
+service_info=Informaci\u00f3n del servicio
+set=Establecer
+settings=Ajustes
+settings_editor=Editor de ajustes
+show_layer_names=Mostrar nombres de capas
+si=s\u00ed
+siguiente=Siguiente
+single_value=Valor simple
+state_or_province=Estado/Provincia
+style=Estilo
+tamano=Tama\u00f1o\:
+tamPixX=Tama\u00f1o pixel X
+tamPixY=Tama\u00f1o pixel Y
+telephone=Tel\u00e9fono
+tipo_dato=Tipo dato
+title=T\u00edtulo
+to=Hasta
+transparencia=Transparencia
+unknown_response_format=Formato de respuesta desconocido
+unsupported_crs=CRS no soportado
+unsupported_map_context_version=Versi\u00f3n de Web Map Context no soportada
+unsupported_version=Versi\u00f3n no soportada
+use_custom_size=Tama\u00f1o personalizado
+use_full_extent=Usar extensi\u00f3n total
+use_view_size=Tama\u00f1o de la vista
+value=Valor
+version=Versi\u00f3n
+version_conflict=Conflicto de versi\u00f3n
+view=Vista
+Vista=Vista
+web_map_context=Web Map Context
+web_map_context_settings=Propiedades Web Map Context
+width=Ancho
+wms_cant_connect=No ha sido posible realizar la conexi\u00f3n con el WMS
+wms_not_queryable=Este servidor no acepta peticiones de este tipo
+wms_properties=Propiedades WMS
+wms_server_error=Error del servidor WMS
+wms_transparency=Transparencia
+WMSLayer=Capa WMS
+xmax=xmax
+xmin=xmin
+ymax=ymax
+ymin=ymin
+remote_service_tiled=Has seleccionado la opci�n usar la cach� de teselas en este servicio remoto.\n Esto significa que se har�n sucesivas peticiones de un tama�o m�ximo de
+seleccionar_infobypoint_format=Seleccionar formato de texto para informaci�n por punto
+infoformat=Formato de la informaci�n por punto
+WMC_Open=Abrir WMC
+Export_to=Exportar a
+host_unreachable=No se puede conectar con el servidor. Tal vez la red est� desconectada o el servidor apagado.
+ip_unknown=Direcci�n IP desconocida
+network_error=Error en la conexi�n a red
+infobypoint_not_available=La herramienta de informaci�n por punto en WMS no estar� disponible \n debido a que las herramientas b�sicas de r�ster no est�n instaladas.
+Only_needed_for_servers_not_strictly_honouring_the_WMS_standard<_1_3_0=Necesario �nicamente en conexiones a servidores que no siguen estrictamente el est�ndar WMS
+Assume_coordinates_follow_XY_axis_order=Asumir que las coordenadas siguen el orden de ejes XY
\ No newline at end of file

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_zh.properties
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_zh.properties	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_zh.properties	(revision 21019)
@@ -0,0 +1,167 @@
+#Translations for language [en]
+#Fri Nov 03 13:14:56 CET 2006
+a_new_view=\u65b0\u5efa\u89c6\u56fe
+abstract=\u7b80\u4ecb
+add=\u6dfb\u52a0
+address=\u5730\u5740
+advanced=\u9ad8\u7ea7
+advanced_settings=\u9ad8\u7ea7\u9009\u9879
+ancho_alto=\u5bbd x \u9ad8
+anterior=\u540e\u9000
+apply=\u5e94\u7528
+bands=\u6ce2\u6bb5
+brillo=\u4eae\u5ea6
+brillo_y_contraste=\u4eae\u5ea6\u4e0e\u5bf9\u6bd4\u5ea6
+browse=\u6d4f\u89c8
+cancel=\u53d6\u6d88
+cannotReproject=\u65e0\u6cd5\u5c06\u6b64\u5750\u6807\u7cfb\u7edf\u91cd\u65b0\u6295\u5f71
+cant_reproject_from_any_of=\u65e0\u6cd5\u4ece\u4efb\u4f55...\u91cd\u65b0\u6295\u5f71
+capas=\u56fe\u5c42
+city=\u57ce\u5e02
+clear=\u6e05\u9664
+conectar=\u8fde\u63a5
+connect_error=\u8fde\u63a5\u51fa\u9519
+contact_info=\u8054\u7cfb\u4eba\u8d44\u6599
+contact_organization=\u7ec4\u7ec7
+contact_person=\u8054\u7cfb\u4eba
+contact_position=\u804c\u4f4d
+contraste=\u5bf9\u6bd4\u5ea6
+coor_geograficas=\u5730\u7406\u5750\u6807
+could_not_find_web_map_context_file=\u65e0\u6cd5\u627e\u5230 web map context \u6587\u4ef6
+countries_of_the_world=\u963f\u5bcc\u6c57;\u963f\u5c14\u5df4\u5c3c\u4e9a;\u963f\u5c14\u53ca\u5229\u4e9a;\u8428\u6469\u4e9a;\u5b89\u9053\u5c14;\u5b89\u54e5\u62c9;\u5b89\u572d\u62c9;\u5357\u6781\u6d32;\u5b89\u5730\u5361\u53ca\u5df4\u5e03\u8fbe;\u963f\u6839\u5ef7;\u4e9a\u7f8e\u5c3c\u4e9a;\u963f\u5362\u5df4;\u4e9a\u68ee\u6b23\u5c9b;\u6fb3\u5927\u5229\u4e9a;\u5965\u5730\u5229;\u4e9a\u585e\u62dc\u7136;\u5df4\u54c8\u9a6c;\u5df4\u6797;\u5b5f\u52a0\u62c9;\u5df4\u8d1d\u591a;\u767d\u4fc4\u7f57\u65af;\u6bd4\u5229\u65f6;\u8d1d\u91cc\u65af;\u8d1d\u5357;\u767e\u6155\u8fbe;\u4e0d\u4e39;\u73bb\u5229\u7ef4\u4e9a;\u6ce2\u58eb\u5c3c\u4e9a\u548c\u8d6b\u829d\u683c\u7ef4\u7eb3;\u6ce2\u672d\u90a3;\u5e03\u97e6\u5c9b;\u5df4\u897f;\u82f1\u5c5e\u5370\u5ea6\u6d0b\u9886\u571f;\u6c76\u83b1;\u4fdd\u52a0\u5229\u4e9a;\u5e03\u57fa\u7eb3\u6cd5\u7d22;\u84b2\u9686\u5730;\u67ec\u57d4\u5be8;\u5580\u9ea6\u9686;\u52a0\u62ff\u5927;\u7ef4\u5fb7\u89d2;\u5f00\u66fc\u7fa4\u5c9b;\u4e2d\u975e\u5171\u548c\u56fd;\u67e5\u5fb7;\u667a\u5229;\u4e2d\u56fd;\u5723\u8bde\u5c9b;\u79d1\u79d1\u65af(\u57fa\u6797)\u7fa4\u5c9b;\u54e5\u4f26\u6bd4\u4e9a;\u79d1\u6469\u7f57;\u521a\u679c (DRC);\u521a\u679c;\u79d1\u514b\u7fa4\u5c9b;\u54e5\u65af\u5927\u9ece\u52a0;\u79d1\u7279\u8fea\u74e6;\u514b\u7f57\u5730\u4e9a;\u53e4\u5df4;\u585e\u666e\u52d2\u65af;\u6377\u514b\u5171\u548c\u56fd;\u4e39\u9ea6;\u5409\u5e03\u5730;\u591a\u7c73\u5c3c\u514b;\u591a\u7c73\u5c3c\u514b\u5171\u548c\u56fd;\u5384\u74dc\u591a\u5c14;\u57c3\u53ca;\u8428\u5c14\u74e6\u591a;\u8d64\u9053\u51e0\u5185\u4e9a;\u57c3\u7acb\u7279\u91cc\u4e9a;\u7231\u6c99\u5c3c\u4e9a;\u8863\u7d22\u6bd4\u4e9a;\u798f\u514b\u5170\u7fa4\u5c9b (\u9a6c\u5c14\u7ef4\u7eb3\u65af\u7fa4\u5c9b);\u6cd5\u7f57\u7fa4\u5c9b;\u6590\u6d4e\u7fa4\u5c9b;\u82ac\u5170;\u6cd5\u56fd;\u6cd5\u5c5e\u572d\u4e9a\u90a3;\u6cd5\u5c5e\u6ce2\u5229\u5c3c\u897f\u4e9a;\u6cd5\u56fd\u5357\u90e8\u548c\u5357\u6781\u571f\u5730;\u52a0\u5f6d;\u5188\u6bd4\u4e9a;\u4e54\u6cbb\u4e9a\u5dde;\u5fb7\u56fd;\u8fe6\u7eb3;\u76f4\u5e03\u7f57\u9640;\u5e0c\u814a;\u683c\u6797\u5170;\u683c\u745e\u7eb3\u8fbe;\u54e5\u5fb7\u666e\u6d1b;\u5173\u5c9b;\u74dc\u5730\u9a6c\u62c9;\u6839\u897f\u5c9b;\u51e0\u5185\u4e9a;\u51e0\u5185\u4e9a\u6bd4\u7d22;\u76d6\u4e9a\u7eb3;\u6d77\u5730;\u542c\u8bf4\u5c9b\u53ca\u9ea6\u5f53\u52b3\u7fa4\u5c9b;\u5b8f\u90fd\u62c9\u65af;\u9999\u6e2f\u7279\u533a;\u5308\u7259\u5229;\u51b0\u5c9b;\u5370\u5ea6;\u5370\u5ea6\u5c3c\u897f\u4e9a;\u4f0a\u6717;\u4f0a\u62c9\u514b;\u7231\u5c14\u5170;\u9a6c\u6069;\u4ee5\u8272\u5217;\u610f\u5927\u5229;\u7259\u4e70\u52a0;\u65e5\u672c;\u7ea6\u65e6;\u6cfd\u897f;\u54c8\u8428\u514b\u65af\u5766;\u80af\u4e9a;\u5409\u91cc\u5df4\u65af;\u97e9\u56fd;\u79d1\u5a01\u7279;\u5409\u5c14\u5409\u65af\u65af\u5766;\u5bee\u56fd;\u62c9\u8131\u7ef4\u4e9a;\u9ece\u5df4\u5ae9;\u8d56\u7d22\u6258;\u8d56\u6bd4\u745e\u4e9a;\u5229\u6bd4\u4e9a;\u5217\u652f\u6566\u65af\u767b;\u7acb\u9676\u5b9b;\u5362\u68ee\u5821\u00b7;\u6fb3\u95e8\u7279\u522b\u884c\u653f\u533a;\u524d\u5357\u65af\u62c9\u592b\u7684\u9a6c\u5176\u987f;\u9a6c\u8fbe\u52a0\u65af\u52a0;\u9a6c\u62c9\u5a01;\u9a6c\u6765\u897f\u4e9a;\u9a6c\u5c14\u5730\u592b;\u9a6c\u5229;\u9a6c\u5c14\u4ed6;\u9a6c\u7ecd\u5c14\u7fa4\u5c9b;\u9a6c\u4e01\u5c3c\u514b\u5c9b;\u8305\u5229\u5854\u5c3c\u4e9a;\u6a21\u91cc\u897f\u65af;\u6885\u7ea6\u7279;\u58a8\u897f\u54e5;\u9ea6\u514b\u7f57\u5c3c\u897f\u4e9a;\u6469\u5c14\u591a\u74e6;\u6469\u7eb3\u54e5;\u8499\u53e4;\u8499\u7279\u8272\u62c9\u7279\u5c9b;\u6469\u6d1b\u54e5;\u83ab\u4e09\u6bd4\u514b;\u7f05\u7538;\u90a3\u7c73\u6bd4\u4e9a;\u8bfa\u9c81;\u5c3c\u6cca\u5c14;\u8377\u5c5e\u5b89\u5730\u5217\u65af\u7fa4\u5c9b;\u8377\u5170;\u65b0\u5580\u91cc\u591a\u5c3c\u4e9a\u5c9b;\u65b0\u897f\u5170;\u5c3c\u52a0\u62c9\u74dc;\u5c3c\u65e5;\u5c3c\u65e5\u5229\u4e9a;\u5c3c\u4e4c\u4e9a\u5c9b;\u8bfa\u798f\u514b\u5c9b;\u5317\u97e9;\u5317\u9a6c\u91cc\u4e9a\u7eb3\u7fa4\u5c9b;\u632a\u5a01;\u963f\u66fc;\u5df4\u57fa\u65af\u5766;\u5e15\u52b3;\u5df4\u52d2\u65af\u5766\u5f53\u5c40;\u5df4\u62ff\u9a6c;\u5df4\u5e03\u4e9a\u65b0\u51e0\u5185\u4e9a;\u5df4\u62c9\u572d;\u79d8\u9c81;\u83f2\u5f8b\u5bbe;\u76ae\u7279\u51ef\u6069\u7fa4\u5c9b;\u6ce2\u5170;\u8461\u8404\u7259;\u6ce2\u591a\u9ece\u5404;\u5361\u8fbe;\u7f57\u9a6c\u5c3c\u4e9a;\u82cf\u8054;\u5362\u5b89\u8fbe;\u8428\u6469\u4e9a;\u5723\u9a6c\u5229\u8bfa;\u5723\u591a\u7f8e\u548c\u666e\u6797\u897f\u6bd4;\u6c99\u7279\u963f\u62c9\u4f2f;\u585e\u5185\u52a0\u5c14;\u585e\u5c14\u7ef4\u4e9a\u548c\u9ed1\u5c71;\u585e\u5e2d\u5c14;\u72ee\u5b50\u5c71;\u65b0\u52a0\u5761;\u65af\u6d1b\u4f10\u514b;\u65af\u62c9\u7ef4\u5c3c\u4e9a;\u6240\u7f57\u95e8\u7fa4\u5c9b;\u7d22\u9a6c\u5229\u4e9a;\u5357\u975e;\u5357\u4e54\u6cbb\u4e9a\u5c9b\u548c\u5357\u6851\u5a01\u5947\u5c9b;\u897f\u73ed\u7259;\u65af\u91cc\u5170\u5361;\u5723\u8d6b\u52d2\u62ff\u5c9b;\u6851\u7279\u57fa\u8328\u548c\u5c3c\u7ef4\u65af;\u6851\u7279\u9732\u897f\u4e9a;\u6851\u7279\u76ae\u57c3\u5c14;\u6851\u7279\u6587\u68ee\u53ca\u683c\u745e;\u82cf\u4e39;\u82cf\u91cc\u5357;\u65af\u74e6\u5c14\u5df4\u7fa4\u5c9b\u548c\u626c\u9a6c\u5ef6;Swaziland;\u53f2\u74e6\u6d4e\u5170;\u745e\u58eb;\u53d9\u5229\u4e9a;\u53f0\u6e7e;\u5854\u5409\u514b\u65af\u5766;\u5766\u5c1a\u5c3c\u4e9a;\u6cf0\u56fd;\u4e1c\u5e1d\u6c76;\u591a\u54e5;\u6258\u5ba2\u52b3\u7fa4\u5c9b;\u4e1c\u52a0\u738b\u56fd;\u5343\u91cc\u8fbe\u5171\u548c\u56fd;\u7279\u91cc\u65af\u5766;\u7a81\u5c3c\u897f\u4e9a;\u571f\u8033\u5176;\u571f\u5e93\u66fc\u65af\u5766;\u7279\u514b\u65af\u548c\u51ef\u79d1\u65af\u7fa4\u5c9b;\u5410\u74e6\u9c81;\u4e4c\u5e72\u8fbe;\u4e4c\u514b\u5170;\u963f\u62c9\u4f2f\u8054\u5408\u914b\u957f\u56fd;\u82f1\u56fd;\u7f8e\u56fd;\u7f8e\u56fd\u5c0f\u79bb\u5c9b;\u4e4c\u62c9\u572d;\u4e4c\u5179\u522b\u514b\u65af\u5766;\u4e07\u90a3\u675c;\u68b5\u8482\u5188\u5e02;\u59d4\u5185\u745e\u62c9;\u8d8a\u5357;\u7ef4\u5c14\u4eac\u7fa4\u5c9b;\u82f1\u5c5e\u7ef4\u5c14\u4eac\u7fa4\u5c9b;\u74e6\u5229\u65af;\u53f6\u95e8\u5171\u548c\u56fd;\u5c1a\u6bd4\u4e9a;\u8f9b\u5df4\u5a01
+country=\u56fd\u5bb6
+covered_extension=\u6269\u5c55\u4fdd\u9669
+created_with=\u4e0e...\u521b\u5efa
+defined_by_view_extent=\u4f7f\u7528\u89c6\u56fe\u7684\u6269\u5c55\u540d
+description=\u63cf\u8ff0
+description_URL=\u94fe\u63a5\u8bf4\u660e
+dimension=\u5c3a\u5bf8
+dimensiones=\u5c3a\u5bf8
+disagregate_layers=\u4fdd\u6301\u56fe\u5c42\u7ed3\u6784
+e-mail=\u7535\u5b50\u90ae\u4ef6
+edit_layer_properties_to_fix_them=\u4e3a\u4fee\u6539\u56fe\u5c42\u800c\u7f16\u8f91\u5c5e\u6027
+eliminar_extremos=\u64a4\u9664\u8fb9\u7f18
+error=\u9519\u8bef
+error_writting_file=\u7f16\u5199\u6587\u4ef6\u65f6\u51fa\u9519
+estilos=\u98ce\u683c
+export=\u8f93\u51fa
+export_to_map_context=\u8f93\u51fa\u6210 Map Context
+extents_no_coincidentes=\u6269\u5c55\u540d\u4e0d\u4e00\u81f4\u3002
+fax=\u4f20\u771f\u53f7\u7801
+Fichero=\u6587\u4ef6
+fichero_existe=\u6587\u4ef6\u5df2\u5b58\u5728
+file_name=\u6587\u4ef6
+file_version=\u6587\u4ef6\u7248\u672c
+fit_WMS_layer=WMS \u56fe\u5c42\u9009\u9879
+format=\u683c\u5f0f
+formato=\u683c\u5f0f
+formatos=\u683c\u5f0f
+georeferenciado=\u7a7a\u95f4\u53c2\u8003
+height=\u9ad8\u5ea6
+html_in_a_new_view=<HTML>\u5728\u9879\u76ee\u4e2d\u521b\u5efa\u4e00\u4e2a\u65b0\u89c6\u56fe\u3002\u65b0\u89c6\u56fe\u5c06\u4f1a\u5305\u542b\u6240\u6709\u6587\u4ef6\u9650\u5b9a\u7684\u56fe\u5c42\u3002</HTML>
+html_in_other_view=<HTML>\u5728\u5217\u8868\u5df2\u9009\u5b9a\u7684\u89c6\u56fe\u4e2d\u6dfb\u52a0\u56fe\u5c42\u3002</HTML>
+html_in_the_current_view=<HTML>\u5c06\u6587\u4ef6\u9650\u5b9a\u7684\u56fe\u5c42\u6dfb\u52a0\u5230\u6d3b\u52a8\u89c6\u56fe\u4e2d\u3002</HTML>
+id=ID
+import=\u8f93\u5165
+import_map_context=\u4ece OGC \u7684 Web Map Context \u6587\u4ef6\u4e2d\u8f93\u5165\u5730\u56fe (.cml)\u3002
+in=\u5728
+info=\u4fe1\u606f
+Informacion=\u4fe1\u606f
+interval=\u95f4\u9694
+invalid_dimension_values=\u5c3a\u5bf8\u65e0\u6548
+is_required=\u662f\u5fc5\u987b\u7684
+keywords=\u5173\u952e\u5b57
+layer=\u56fe\u5c42
+layer_abstract=\u56fe\u5c42\u7b80\u4ecb
+layer_name=\u56fe\u5c42\u540d
+layer_not_queryable=\u4e0d\u63a5\u53d7\u8fd9\u79cd\u67e5\u8be2
+layer_title=\u56fe\u5c42\u6807\u9898
+layers_in_other_view=\u56fe\u5c42\u5728\u81ea\u9009\u89c6\u56fe\u91cc
+layers_in_the_current_view=\u56fe\u5c42\u5728\u73b0\u5728\u7684\u89c6\u56fe\u91cc
+lineal_directo=\u76f4\u63a5\u7ebf\u65b9\u6cd5
+logo_URL=\u94fe\u63a5\u6807\u5fd7
+m/pixel=\u7c73/\u50cf\u7d20
+map_context_file_error=Web Map Context \u6587\u4ef6\u51fa\u9519
+map_extent=\u6269\u5c55
+map_size_in_pixels=\u5730\u56fe\u5927\u5c0f (\u50cf\u7d20)
+metadatos=\u5143\u6570\u636e
+move_layer_down=\u79fb\u4e0b
+move_layer_up=\u79fb\u4e0a
+multiple_value=\u591a\u6570\u503c
+must_specify_a_file=\u60a8\u5fc5\u987b\u6307\u5b9a\u76ee\u6807\u6863\u6848\u3002
+name=\u540d\u79f0
+none_selected=\u672a\u9009\u5b9a
+not_available=\u65e0\u6cd5\u5229\u7528
+num_bandas=\u6ce2\u6bb5\u6570
+ogc_mapcontext_file=OGC Web Map Context
+ok=\u786e\u5b9a
+Ok=\u786e\u5b9a
+opacidad=\u4e0d\u900f\u660e\u5ea6
+open_layers_as=\u56fe\u5c42\u6253\u5f00\u4e3a
+options=\u9009\u9879
+origen_de_datos=\u6570\u636e\u6765\u6e90
+postcode=\u90ae\u653f\u7f16\u7801
+previsualizacion=\u9884\u89c8
+problems_encountered_while_importing=\u8f93\u5165\u65f6\u51fa\u9519
+properties=\u5c5e\u6027
+propiedades_raster=Raster \u5c5e\u6027
+Proyecciones=\u6295\u5f71
+realce=\u589e\u5f3a
+recorte_colas=\u4fee\u526a\u5c3e\u90e8
+refresh_capabilities=\u5237\u65b0\u7f13\u5b58
+refresh_capabilities_tooltip=\u5982\u679c\u60a8\u8981\u66ff\u6362\u5df2\u5b58\u6570\u636e\uff0c\u8bf7\u70b9\u51fb\u8fd9\u4e00\u683c\u3002
+remove=\u64a4\u9664
+seleccionar_srs=SRS \u9009\u62e9 
+select_formats=\u9009\u62e9\u683c\u5f0f
+select_layers=\u9009\u62e9 Raster \u56fe\u5c42
+selected_dimensions=\u5df2\u9009\u5b9a\u5c3a\u5bf8
+selected_layers=\u5df2\u9009\u5b9a\u56fe\u5c42
+server=\u670d\u52a1\u5668
+server_abstract=\u670d\u52a1\u5668\u7b80\u4ecb
+server_cant_render_layers=\u8fd9\u4e2aWMS\u670d\u52a1\u5668\u65e0\u6cd5\u5448\u73b0\u8fd9\u4e9b\u96c6\u5728\u4e00\u8d77\u7684\u56fe\u5c42\u3002\n\u60a8\u53ef\u4ee5\u8bd5\u4e00\u8bd5\u5c06\u6bcf\u4e00\u5c42\u5355\u72ec\u67e5\u8be2\u3002
+server_timeout=WMS \u670d\u52a1\u5668\u8d85\u65f6
+server_title=\u670d\u52a1\u5668\u6807\u9898
+server_type=\u670d\u52a1\u5668\u7c7b\u578b
+service_info=\u670d\u52a1\u4fe1\u606f
+set=\u8bbe\u7f6e
+settings=\u9009\u9879
+settings_editor=\u7f16\u8f91\u5668\u8bbe\u7f6e
+show_layer_names=\u663e\u793a\u56fe\u5c42\u540d
+si=\u662f
+siguiente=\u7ee7\u7eed
+single_value=\u5355\u503c
+state_or_province=\u56fd\u5bb6/\u7701\u4efd
+style=\u98ce\u683c
+tamano=\u5927\u5c0f\:
+tamPixX=X\u8f74\u50cf\u7d20\u5927\u5c0f
+tamPixY=Y\u8f74\u50cf\u7d20\u5927\u5c0f
+telephone=\u7535\u8bdd\u53f7\u7801
+tipo_dato=\u6570\u636e\u7c7b\u578b
+title=\u6807\u9898
+to=\u5230
+transparencia=\u900f\u660e\u5ea6
+unknown_response_format=\u672a\u77e5\u54cd\u5e94\u683c\u5f0f
+unsupported_crs=\u4e0d\u652f\u6301\u7684CRS 
+unsupported_map_context_version=\u4e0d\u652f\u6301\u7684 Web Map Context \u7248\u672c\u3002
+unsupported_version=\u4e0d\u652f\u6301\u7684\u7248\u672c
+use_custom_size=\u81ea\u5b9a\u5927\u5c0f
+use_full_extent=\u5145\u5206\u5229\u7528
+use_view_size=\u89c6\u56fe\u5927\u5c0f
+value=\u6570\u636e
+version=\u7248\u672c
+version_conflict=\u7248\u672c\u51b2\u7a81
+view=\u89c6\u56fe
+Vista=\u89c6\u56fe
+web_map_context=Web Map Context
+web_map_context_settings=Web Map Context \u5c5e\u6027
+width=\u5bbd\u5ea6
+wms_cant_connect=\u65e0\u6cd5\u4e0e WMS \u8fde\u63a5
+wms_not_queryable=\u8fd9\u4e2a\u670d\u52a1\u5668\u4e0d\u63a5\u53d7\u6b64\u7c7b\u67e5\u8be2
+wms_properties=WMS \u5c5e\u6027
+wms_server_error=WMS \u670d\u52a1\u5668\u51fa\u9519
+wms_transparency=\u900f\u660e\u5ea6
+WMSLayer=WMS \u56fe\u5c42
+xmax=X\u8f74\u6700\u5927\u503c
+xmin=X\u8f74\u6700\u5c0f\u503c
+ymax=Y\u8f74\u6700\u5927\u503c
+ymin=Y\u8f74\u6700\u5c0f\u503c

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_zh.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_ca.properties
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_ca.properties	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_ca.properties	(revision 21019)
@@ -0,0 +1,167 @@
+#Translations for language [ca]
+#Mon Oct 30 09:38:21 CET 2006
+a_new_view=Vista nova
+abstract=Resum
+add=Afegir
+address=Adre\u00e7a
+advanced=Avan\u00e7ada
+advanced_settings=Opcions avan\u00e7ades
+ancho_alto=Amplada al\u00e7ada
+anterior=Anterior
+apply=Aplicar
+bands=Bandes
+brillo=Brillantor
+brillo_y_contraste=Brillantor i contrast
+browse=Examinar
+cancel=Cancel\u00b7lar
+cannotReproject=No es pot reprojectar este sistema de coordenades
+cant_reproject_from_any_of=
+capas=Capes
+city=Ciutat
+clear=Netejar
+conectar=Connectar
+connect_error=Error de connexi\u00f3
+contact_info=Informaci\u00f3 de contacte
+contact_organization=Organitzaci\u00f3
+contact_person=Nom
+contact_position=C\u00e0rrec
+contraste=Contrast
+coor_geograficas=Coordenades geogr\u00e0fiques
+could_not_find_web_map_context_file=
+countries_of_the_world=Afghanistan;Albania;Algeria;American Samoa;Andorra;Angola;Anguilla;Antarctica;Antigua and Barbuda;Argentina;Armenia;Aruba;Ascension Island;Australia;Austria;Azerbaijan;Bahamas;Bahrain;Bangladesh;Barbados;Belarus;Belgium;Belize;Benin;Bermuda;Bhutan;Bolivia;Bosnia and Herzegovina;Botswana;Bouvet Island;Brazil;British Indian Ocean Territory;Brunei;Bulgaria;Burkina Faso;Burundi;Cambodia;Cameroon;Canada;Cape Verde;Cayman Islands;Central African Republic;Chad;Chile;China;Christmas Island;Cocos (Keeling) Islands;Colombia;Comoros;Congo (DRC);Congo;Cook Islands;Costa Rica;C\u00f4te d\u0092Ivoire;Croatia;Cuba;Cyprus;Czech Republic;Denmark;Djibouti;Dominica;Dominican Republic;Ecuador;Egypt;El Salvador;Equatorial Guinea;Eritrea;Estonia;Ethiopia;Falkland Islands (Islas Malvinas);Faroe Islands;Fiji Islands;Finland;France;French Guiana;French Polynesia;French Southern and Antarctic Lands;Gabon;Gambia, The;Georgia;Germany;Ghana;Gibraltar;Greece;Greenland;Grenada;Guadeloupe;Guam;Guatemala;Guernsey;Guinea;Guinea-Bissau;Guyana;Haiti;Heard Island and McDonald Islands;Honduras;Hong Kong SAR;Hungary;Iceland;India;Indonesia;Iran;Iraq;Ireland;Isle of Man;Israel;Italy;Jamaica;Japan;Jordan;Jersey;Kazakhstan;Kenya;Kiribati;Korea;Kuwait;Kyrgyzstan;Laos;Latvia;Lebanon;Lesotho;Liberia;Libya;Liechtenstein;Lithuania;Luxembourg;Macao SAR;Macedonia, Former Yugoslav Republic of;Madagascar;Malawi;Malaysia;Maldives;Mali;Malta;Marshall Islands;Martinique;Mauritania;Mauritius;Mayotte;Mexico;Micronesia;Moldova;Monaco;Mongolia;Montserrat;Morocco;Mozambique;Myanmar;Namibia;Nauru;Nepal;Netherlands Antilles;Netherlands, The;New Caledonia;New Zealand;Nicaragua;Niger;Nigeria;Niue;Norfolk Island;North Korea;Northern Mariana Islands;Norway;Oman;Pakistan;Palau;Palestinian Authority;Panama;Papua New Guinea;Paraguay;Peru;Philippines;Pitcairn Islands;Poland;Portugal;Puerto Rico;Qatar;Reunion;Romania;Russia;Rwanda;Samoa;San Marino;S\u00e3o Tom\u00e9 and Pr\u00edncipe;Saudi Arabia;Senegal;Serbia and Montenegro;Seychelles;Sierra Leone;Singapore;Slovakia;Slovenia;Solomon Islands;Somalia;South Africa;South Georgia and the South Sandwich Islands;Spain;Sri Lanka;St. Helena;St. Kitts and Nevis;St. Lucia;St. Pierre and Miquelon;St. Vincent and the Grenadines;Sudan;Suriname;Svalbard and Jan Mayen;Swaziland;Sweden;Switzerland;Syria;Taiwan;Tajikistan;Tanzania;Thailand;Timor-Leste;Togo;Tokelau;Tonga;Trinidad and Tobago;Tristan da Cunha;Tunisia;Turkey;Turkmenistan;Turks and Caicos Islands;Tuvalu;Uganda;Ukraine;United Arab Emirates;United Kingdom;United States of America;United States Minor Outlying Islands;Uruguay;Uzbekistan;Vanuatu;Vatican City;Venezuela;Vietnam;Virgin Islands;Virgin Islands, British;Wallis and Futuna;Yemen;Zambia;Zimbabwe
+country=Pa\u00eds
+covered_extension=Cobertura de l'extensi\u00f3
+created_with=Creat amb
+defined_by_view_extent=Extensi\u00f3 de la vista
+description=Descripci\u00f3
+description_URL=URL descripci\u00f3
+dimension=Dimensi\u00f3
+dimensiones=Dimensions
+disagregate_layers=Conservar estructura de capes
+e-mail=Correu electr\u00f2nic
+edit_layer_properties_to_fix_them=
+eliminar_extremos=Eliminar extrems
+error=Error
+error_writting_file=Error en escriure el fitxer
+estilos=Estils
+export=Exportar
+export_to_map_context=
+extents_no_coincidentes=Extensions no coincidents
+fax=Fax
+Fichero=Fitxer
+fichero_existe=Hi ha fitxer
+file_name=Fitxer
+file_version=Versi\u00f3 del fitxer
+fit_WMS_layer=Ajustar capa WMS
+format=Format
+formato=Format
+formatos=Formats
+georeferenciado=
+height=Al\u00e7ada
+html_in_a_new_view=<HTML>Crea una vista nova en el projecte. La nova vista contindr\u00e0 totes les capes definides pel fitxer.</HTML>
+html_in_other_view=<HTML>Afig les capes en la vista que especifique de la llista seg\u00fcent\:</HTML>
+html_in_the_current_view=<HTML>Afig les capes definides en el fitxer a la vista activa.</HTML>
+id=ID
+import=Importar
+import_map_context=Importar mapes des d'un fitxer Web Map Context d'OGC
+in=en
+info=Informaci\u00f3
+Informacion=Informaci\u00f3
+interval=Interval
+invalid_dimension_values=
+is_required=\u00e9s obligatori
+keywords=Paraules clau
+layer=Capa
+layer_abstract=Resum de la capa
+layer_name=Nom de la capa
+layer_not_queryable=
+layer_title=T\u00edtol de la capa
+layers_in_other_view=Capes en la llista que jo elegisca
+layers_in_the_current_view=Capes en la vista actual
+lineal_directo=Lineal directe
+logo_URL=URL logotip
+m/pixel=metros/pixel
+map_context_file_error=Error en el fitxer Web Map Context
+map_extent=Extensi\u00f3
+map_size_in_pixels=Dimensi\u00f3 del mapa (p\u00edxels)
+metadatos=Metadatos
+move_layer_down=Moure amunt
+move_layer_up=Moure avall
+multiple_value=Valor m\u00faltiple
+must_specify_a_file=Ha d'especificar un fitxer de dest\u00ed
+name=Nom
+none_selected=Cap seleccionat
+not_available=No disponible
+num_bandas=Nombre de bandes
+ogc_mapcontext_file=OGC Web Map Context
+ok=D'acord
+Ok=D'acord
+opacidad=Opacitat
+open_layers_as=Obrir les capes com a
+options=Opcions
+origen_de_datos=Origen de dades
+postcode=Codi postal
+previsualizacion=Previsualitzaci\u00f3
+problems_encountered_while_importing=
+properties=Propietats
+propiedades_raster=Propietats del raster
+Proyecciones=
+realce=Relleu
+recorte_colas=Retall de cues
+refresh_capabilities=Refrescar la mem\u00f2ria cau
+refresh_capabilities_tooltip=Marque esta casella per a sobreescriure les dades anteriors.
+remove=Llevar
+seleccionar_srs=Seleccioneu SRS
+select_formats=Seleccionar formats
+select_layers=Seleccionar capes
+selected_dimensions=Dimensions seleccionades
+selected_layers=Capes seleccionades
+server=Servidor
+server_abstract=Resum del servidor
+server_cant_render_layers=Este servidor no pot representar estes capes juntes. Prove a fer peticions separades per a cada capa.
+server_timeout=Temps de connexi\u00f3 excedit
+server_title=T\u00edtol del servidor
+server_type=Tipus de servidor
+service_info=Informaci\u00f3 del servici
+set=Establir
+settings=Ajustaments
+settings_editor=Editor d'ajustaments
+show_layer_names=Mostrar noms de capes
+si=
+siguiente=Seg\u00fcent
+single_value=Valor simple
+state_or_province=Estat/Prov\u00edncia
+style=Estil
+tamano=Dimensi\u00f3\:
+tamPixX=
+tamPixY=
+telephone=Tel\u00e8fon
+tipo_dato=Tipus de dada
+title=T\u00edtol
+to=Fins a
+transparencia=Transpar\u00e8ncia
+unknown_response_format=Format de resposta desconeguda
+unsupported_crs=
+unsupported_map_context_version=Versi\u00f3 de Web Map Context no suportada
+unsupported_version=Versi\u00f3 no suportada
+use_custom_size=Dimensi\u00f3 personalitzada
+use_full_extent=Extensi\u00f3 total
+use_view_size=Dimensi\u00f3 de la vista
+value=Valor
+version=Versi\u00f3
+version_conflict=Conflicte de versi\u00f3
+view=Vista
+Vista=Vista
+web_map_context=Web Map Context
+web_map_context_settings=Propietats Web Map Context
+width=Amplada
+wms_cant_connect=No es pot realitzar la connexi\u00f3 amb WMS
+wms_not_queryable=Este servidor no accepta peticions d'este tipus
+wms_properties=Propietats WMS
+wms_server_error=Error del servidor WMS
+wms_transparency=Transpar\u00e8ncia
+WMSLayer=Capa WMS
+xmax=X m\u00e0xima
+xmin=X m\u00ednima
+ymax=Y m\u00e0xima
+ymin=Y m\u00ednima

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_ca.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_pt.properties
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_pt.properties	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_pt.properties	(revision 21019)
@@ -0,0 +1,167 @@
+#Translations for language [pt]
+#Mon Oct 30 09:38:21 CET 2006
+a_new_view=
+abstract=Resumo
+add=Adicionar
+address=Adre\u00e7a
+advanced=
+advanced_settings=
+ancho_alto=Largura X altura
+anterior=Anterior
+apply=Aplicar
+bands=Bandas
+brillo=Brightness
+brillo_y_contraste=
+browse=
+cancel=Cancelar
+cannotReproject=N\u00e3o se pode reprojectar este sistema de coordenadas
+cant_reproject_from_any_of=
+capas=Capas
+city=
+clear=Limpar
+conectar=Conectar
+connect_error=Erro ao conectar
+contact_info=
+contact_organization=Organitzaci\u00f3
+contact_person=Nome
+contact_position=C\u00e0rrec
+contraste=Contrast
+coor_geograficas=Coordenadas geogr\u00e1ficas
+could_not_find_web_map_context_file=
+countries_of_the_world=Afghanistan;Albania;Algeria;American Samoa;Andorra;Angola;Anguilla;Antarctica;Antigua and Barbuda;Argentina;Armenia;Aruba;Ascension Island;Australia;Austria;Azerbaijan;Bahamas;Bahrain;Bangladesh;Barbados;Belarus;Belgium;Belize;Benin;Bermuda;Bhutan;Bolivia;Bosnia and Herzegovina;Botswana;Bouvet Island;Brazil;British Indian Ocean Territory;Brunei;Bulgaria;Burkina Faso;Burundi;Cambodia;Cameroon;Canada;Cape Verde;Cayman Islands;Central African Republic;Chad;Chile;China;Christmas Island;Cocos (Keeling) Islands;Colombia;Comoros;Congo (DRC);Congo;Cook Islands;Costa Rica;C\u00f4te d\u0092Ivoire;Croatia;Cuba;Cyprus;Czech Republic;Denmark;Djibouti;Dominica;Dominican Republic;Ecuador;Egypt;El Salvador;Equatorial Guinea;Eritrea;Estonia;Ethiopia;Falkland Islands (Islas Malvinas);Faroe Islands;Fiji Islands;Finland;France;French Guiana;French Polynesia;French Southern and Antarctic Lands;Gabon;Gambia, The;Georgia;Germany;Ghana;Gibraltar;Greece;Greenland;Grenada;Guadeloupe;Guam;Guatemala;Guernsey;Guinea;Guinea-Bissau;Guyana;Haiti;Heard Island and McDonald Islands;Honduras;Hong Kong SAR;Hungary;Iceland;India;Indonesia;Iran;Iraq;Ireland;Isle of Man;Israel;Italy;Jamaica;Japan;Jordan;Jersey;Kazakhstan;Kenya;Kiribati;Korea;Kuwait;Kyrgyzstan;Laos;Latvia;Lebanon;Lesotho;Liberia;Libya;Liechtenstein;Lithuania;Luxembourg;Macao SAR;Macedonia, Former Yugoslav Republic of;Madagascar;Malawi;Malaysia;Maldives;Mali;Malta;Marshall Islands;Martinique;Mauritania;Mauritius;Mayotte;Mexico;Micronesia;Moldova;Monaco;Mongolia;Montserrat;Morocco;Mozambique;Myanmar;Namibia;Nauru;Nepal;Netherlands Antilles;Netherlands, The;New Caledonia;New Zealand;Nicaragua;Niger;Nigeria;Niue;Norfolk Island;North Korea;Northern Mariana Islands;Norway;Oman;Pakistan;Palau;Palestinian Authority;Panama;Papua New Guinea;Paraguay;Peru;Philippines;Pitcairn Islands;Poland;Portugal;Puerto Rico;Qatar;Reunion;Romania;Russia;Rwanda;Samoa;San Marino;S\u00e3o Tom\u00e9 and Pr\u00edncipe;Saudi Arabia;Senegal;Serbia and Montenegro;Seychelles;Sierra Leone;Singapore;Slovakia;Slovenia;Solomon Islands;Somalia;South Africa;South Georgia and the South Sandwich Islands;Spain;Sri Lanka;St. Helena;St. Kitts and Nevis;St. Lucia;St. Pierre and Miquelon;St. Vincent and the Grenadines;Sudan;Suriname;Svalbard and Jan Mayen;Swaziland;Sweden;Switzerland;Syria;Taiwan;Tajikistan;Tanzania;Thailand;Timor-Leste;Togo;Tokelau;Tonga;Trinidad and Tobago;Tristan da Cunha;Tunisia;Turkey;Turkmenistan;Turks and Caicos Islands;Tuvalu;Uganda;Ukraine;United Arab Emirates;United Kingdom;United States of America;United States Minor Outlying Islands;Uruguay;Uzbekistan;Vanuatu;Vatican City;Venezuela;Vietnam;Virgin Islands;Virgin Islands, British;Wallis and Futuna;Yemen;Zambia;Zimbabwe
+country=
+covered_extension=Extens\u00e3o
+created_with=
+defined_by_view_extent=
+description=Descri\u00e7\u00e3o
+description_URL=
+dimension=Dimens\u00e3o
+dimensiones=Dimens\u00f5es
+disagregate_layers=
+e-mail=E-mail
+edit_layer_properties_to_fix_them=
+eliminar_extremos=Remover extremos
+error=Error
+error_writting_file=
+estilos=Estilos
+export=Exportar
+export_to_map_context=
+extents_no_coincidentes=A extens\u00e3o da imagem seleccionada n\u00e3o coincide com a imagem de origem.
+fax=Fax
+Fichero=Ficheiro
+fichero_existe=O ficheiro seleccionado j\u00e1 existe como banda da capa
+file_name=
+file_version=
+fit_WMS_layer=
+format=Formato
+formato=Formato
+formatos=Formatos
+georeferenciado=
+height=
+html_in_a_new_view=<HTML>Crea una vista nova al projecte. La nova vista contindr\u00e0 totes les capes definides pel fitxer.</HTML>
+html_in_other_view=
+html_in_the_current_view=<HTML>Afegeix les capes definides pel fitxer a la actual vista activa.</HTML>
+id=ID
+import=
+import_map_context=
+in=em
+info=Informa\u00e7\u00e3o
+Informacion=Informa\u00e7\u00e3o
+interval=Intervalo
+invalid_dimension_values=
+is_required=\u00e9s obligatori
+keywords=Paraules clau
+layer=Capa
+layer_abstract=Resumo
+layer_name=Nome da capa
+layer_not_queryable=
+layer_title=Titulo da capa
+layers_in_other_view=
+layers_in_the_current_view=
+lineal_directo=Lineal direito
+logo_URL=URL logotip
+m/pixel=metros/pixel
+map_context_file_error=
+map_extent=Extens\u00e3o
+map_size_in_pixels=Tamany del mapa (p\u00edxels)
+metadatos=Metadatos
+move_layer_down=Mover para baixo
+move_layer_up=Mover para cima
+multiple_value=Valor m\u00faltiplo
+must_specify_a_file=
+name=Nome
+none_selected=Nenhum seleccionado
+not_available=N\u00e3o dispon\u00edvel
+num_bandas=N\u00famero de bandas
+ogc_mapcontext_file=OGC Web Map Context
+ok=Aceitar
+Ok=Aceitar
+opacidad=Opacidade
+open_layers_as=
+options=Op\u00e7\u00f5es
+origen_de_datos=Origem de dados
+postcode=
+previsualizacion=
+problems_encountered_while_importing=
+properties=Propriedades
+propiedades_raster=Propiedades da cobertura
+Proyecciones=
+realce=Realce
+recorte_colas=Recorte de filas
+refresh_capabilities=Actualizar cache
+refresh_capabilities_tooltip=Marque esta op\u00e7\u00e3o para reescrever os dados anteriores.
+remove=Remover
+seleccionar_srs=Seleccionar SRS
+select_formats=Seleccionar formatos
+select_layers=Seleccionar capas
+selected_dimensions=Dimens\u00f5es seleccionadas
+selected_layers=Capas seleccionadas
+server=Servidor
+server_abstract=Sumario
+server_cant_render_layers=Este servidor n\u00e3o pode "renderizar" estas capas juntas. Tenta fazer peti\u00e7\u00f5es separadas para cada capa.
+server_timeout=Alcan\u00e7ado m\u00e1ximo tempo de espera de resposta do WMS
+server_title=Titulo
+server_type=Tipo de servidor
+service_info=Informa\u00e7\u00e3o do servi\u00e7o
+set=Establecer
+settings=
+settings_editor=Editor de ajustes
+show_layer_names=Mostrar nomes
+si=
+siguiente=Seguinte
+single_value=Valor simples
+state_or_province=
+style=Estilo
+tamano=Tamanho\:
+tamPixX=
+tamPixY=
+telephone=Tel\u00e8fon
+tipo_dato=Tipo de dado
+title=T\u00edtulo
+to=At\u00e9
+transparencia=Transpar\u00eancia
+unknown_response_format=
+unsupported_crs=
+unsupported_map_context_version=
+unsupported_version=Versi\u00f3 no suportada
+use_custom_size=
+use_full_extent=
+use_view_size=
+value=Valor
+version=Versi\u00f3
+version_conflict=Conflito de vers\u00f5es
+view=Vis\u00e3o
+Vista=Vista
+web_map_context=
+web_map_context_settings=
+width=Ampl\u00e0ria
+wms_cant_connect=N\u00e3o foi poss\u00edvel realizar a conex\u00e3o com WMS
+wms_not_queryable=Este servidor n\u00e3o aceita peti\u00e7\u00f5es deste tipo
+wms_properties=Propriedades WMS
+wms_server_error=Erro do servidor WMS
+wms_transparency=Transpar\u00eancia
+WMSLayer=Capa WMS
+xmax=X m\u00e1xima
+xmin=X m\u00ednima
+ymax=Y m\u00e1xima
+ymin=Y m\u00ednima

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_pt.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/servers.properties
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/servers.properties	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/servers.properties	(revision 21019)
@@ -0,0 +1,2 @@
+server[0]=http://neowms.sci.gsfc.nasa.gov/wms/wms
+server[1]=http://www2.demis.nl/worldmap/wms.asp
\ No newline at end of file

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/servers.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_de.properties
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_de.properties	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_de.properties	(revision 21019)
@@ -0,0 +1,168 @@
+#Translations for language [de]
+#Wed Oct 08 17:54:43 CEST 2008
+a_new_view=Neue Ansicht
+abstract=Zusammenfassung
+add=Hinzuf\u00fcgen
+address=Adresse
+advanced=Erweitert
+advanced_settings=Erweiterte Optionen
+ancho_alto=Breite x H\u00f6he
+anterior=Zur\u00fcck
+apply=Anwenden
+bands=Kan\u00e4le
+brillo=Helligkeit
+brillo_y_contraste=Helligkeit und Kontrast
+browse=Durchsuchen
+cancel=Abbrechen
+cannotReproject=Koordinatensystem kann nicht umprojiziert werden
+cant_reproject_from_any_of=Neu Projektion nicht m\u00f6glich von 
+capas=Layer
+city=Ort
+clear=L\u00f6schen
+conectar=Verbinden
+connect_error=Verbindungsfehler
+contact_info=Kontaktinformationen
+contact_organization=Organisation
+contact_person=Name
+contact_position=Position
+contraste=Kontrast
+coor_geograficas=Geografische Koordinaten
+could_not_find_web_map_context_file=Es konnte kein Web Map Context gefunden werden
+countries_of_the_world=Afghanistan;Albania;Algeria;American Samoa;Andorra;Angola;Anguilla;Antarctica;Antigua and Barbuda;Argentina;Armenia;Aruba;Ascension Island;Australia;Austria;Azerbaijan;Bahamas;Bahrain;Bangladesh;Barbados;Belarus;Belgium;Belize;Benin;Bermuda;Bhutan;Bolivia;Bosnia and Herzegovina;Botswana;Bouvet Island;Brazil;British Indian Ocean Territory;Brunei;Bulgaria;Burkina Faso;Burundi;Cambodia;Cameroon;Canada;Cape Verde;Cayman Islands;Central African Republic;Chad;Chile;China;Christmas Island;Cocos (Keeling) Islands;Colombia;Comoros;Congo (DRC);Congo;Cook Islands;Costa Rica;C\u00f4te d\u0092Ivoire;Croatia;Cuba;Cyprus;Czech Republic;Denmark;Djibouti;Dominica;Dominican Republic;Ecuador;Egypt;El Salvador;Equatorial Guinea;Eritrea;Estonia;Ethiopia;Falkland Islands (Islas Malvinas);Faroe Islands;Fiji Islands;Finland;France;French Guiana;French Polynesia;French Southern and Antarctic Lands;Gabon;Gambia, The;Georgia;Germany;Ghana;Gibraltar;Greece;Greenland;Grenada;Guadeloupe;Guam;Guatemala;Guernsey;Guinea;Guinea-Bissau;Guyana;Haiti;Heard Island and McDonald Islands;Honduras;Hong Kong SAR;Hungary;Iceland;India;Indonesia;Iran;Iraq;Ireland;Isle of Man;Israel;Italy;Jamaica;Japan;Jordan;Jersey;Kazakhstan;Kenya;Kiribati;Korea;Kuwait;Kyrgyzstan;Laos;Latvia;Lebanon;Lesotho;Liberia;Libya;Liechtenstein;Lithuania;Luxembourg;Macao SAR;Macedonia, Former Yugoslav Republic of;Madagascar;Malawi;Malaysia;Maldives;Mali;Malta;Marshall Islands;Martinique;Mauritania;Mauritius;Mayotte;Mexico;Micronesia;Moldova;Monaco;Mongolia;Montserrat;Morocco;Mozambique;Myanmar;Namibia;Nauru;Nepal;Netherlands Antilles;Netherlands, The;New Caledonia;New Zealand;Nicaragua;Niger;Nigeria;Niue;Norfolk Island;North Korea;Northern Mariana Islands;Norway;Oman;Pakistan;Palau;Palestinian Authority;Panama;Papua New Guinea;Paraguay;Peru;Philippines;Pitcairn Islands;Poland;Portugal;Puerto Rico;Qatar;Reunion;Romania;Russia;Rwanda;Samoa;San Marino;S\u00e3o Tom\u00e9 and Pr\u00edncipe;Saudi Arabia;Senegal;Serbia and Montenegro;Seychelles;Sierra Leone;Singapore;Slovakia;Slovenia;Solomon Islands;Somalia;South Africa;South Georgia and the South Sandwich Islands;Spain;Sri Lanka;St. Helena;St. Kitts and Nevis;St. Lucia;St. Pierre and Miquelon;St. Vincent and the Grenadines;Sudan;Suriname;Svalbard and Jan Mayen;Swaziland;Sweden;Switzerland;Syria;Taiwan;Tajikistan;Tanzania;Thailand;Timor-Leste;Togo;Tokelau;Tonga;Trinidad and Tobago;Tristan da Cunha;Tunisia;Turkey;Turkmenistan;Turks and Caicos Islands;Tuvalu;Uganda;Ukraine;United Arab Emirates;United Kingdom;United States of America;United States Minor Outlying Islands;Uruguay;Uzbekistan;Vanuatu;Vatican City;Venezuela;Vietnam;Virgin Islands;Virgin Islands, British;Wallis and Futuna;Yemen;Zambia;Zimbabwe
+country=Land
+covered_extension=Bedeckter Bereich
+created_with=Erstellt mit
+defined_by_view_extent=\u00dcber den Ausschnitt der Ansicht definiert
+description=Beschreibung
+description_URL=URL Bechreibung
+dimension=Dimension
+dimensiones=Dimensionen
+disagregate_layers=Layer Struktur beibehalten
+e-mail=E-mail
+edit_layer_properties_to_fix_them=Zur Fehlerkorrektur Ebenen Eigenschaften neu eingeben
+eliminar_extremos=Eckpunkte l\u00f6schen
+error=Fehler
+error_writting_file=Fehler beim Schreiben der Datei
+estilos=Styles
+export=Exportieren
+export_to_map_context=Als Map Context exportieren
+extents_no_coincidentes=Ausma\u00dfe des ausgew\u00e4hlten Bildes stimmen nicht mit dem Originalbild \u00fcberein.
+failed_restoring_online_resource_values=
+fax=Fax
+Fichero=Datei
+fichero_existe=Die ausgew\u00e4hlte Datei besteht bereits als Layer
+file_name=Datei
+file_version=Datei Version
+fit_WMS_layer=WMS-Layer konfigurieren
+format=Format
+formato=Format
+formatos=Formate
+georeferenciado=Georeferenziert
+height=H\u00f6he
+html_in_a_new_view=<HTML> Erstellt eine neue Ansicht f\u00fcr das Projekt. Die neue Ansicht  wird alle in der Datei definierten Ebenen enthalten. <HTML>
+html_in_other_view=<HTML> Layer zur Ansicht aus folgender Liste hinzuf\u00fcgen\:</html>
+html_in_the_current_view=<HTML> F\u00fcgt die in der Datei definierten Layer zur aktuellen Ansicht</HTML>
+id=ID
+import=Importieren
+import_map_context=Karten aus einem OGC Web Map Context (.cml) importieren
+in=in
+info=Information
+Informacion=Information
+interval=Intervall
+invalid_dimension_values=Ung\u00fcltige Dimensionswerte
+is_required=ist erforderlich
+keywords=Schl\u00fcsselw\u00f6rter
+layer=Layer
+layer_abstract=Kurzfassung
+layer_name=Layer-Name
+layer_not_queryable=Diese Art von Abfrage wird nicht akzeptiert
+layer_title=Layer-Titel
+layers_in_other_view=Layer in anderen Ansichten
+layers_in_the_current_view=Layer in der aktuellen Ansicht
+lineal_directo=Direkt- Lineal
+logo_URL=Logo URL
+m/pixel=Meter/Pixel
+map_context_file_error=Web Map Context Error
+map_extent=Ausdehnung
+map_size_in_pixels=Kartengr\u00f6\u00dfe (Pixel)
+metadatos=Metadaten
+move_layer_down=Nach unten
+move_layer_up=Nach oben
+multiple_value=Mehrfachwert
+must_specify_a_file=Eine Zieldatei muss angegeben werden.
+name=Name
+none_selected=Nichts ausgew\u00e4hlt
+not_available=Nicht verf\u00fcgbar
+num_bandas=Kanalzahl
+ogc_mapcontext_file=OGC Web Map Context
+ok=Ok
+Ok=OK
+opacidad=Undurchsichtigkeit
+open_layers_as=\u00d6ffne Layer als
+options=Optionen
+origen_de_datos=Datenquelle
+postcode=Postleitzahl
+previsualizacion=Vorschau
+problems_encountered_while_importing=Beim Importieren ist ein Problem aufgetreten
+properties=Eigenschaften
+propiedades_raster=Eigenschaften des Rasterbildes
+Proyecciones=Projektionen
+realce=Optimierung\n
+recorte_colas=Zuschnitt der Randbereiche
+refresh_capabilities=Cache auffrischen
+refresh_capabilities_tooltip=H\u00e4kchen setzen um lokale Daten zu \u00fcberschreiben
+remove=Entfernen
+seleccionar_srs=W\u00e4hle SRS
+select_formats=Formate ausw\u00e4hlen
+select_layers=Rasterlayer ausw\u00e4hlen
+selected_dimensions=Gew\u00e4hlte Dimension
+selected_layers=Ausgew\u00e4hlte Layer
+server=Server
+server_abstract=Zusammenfassung
+server_cant_render_layers=Dieser WMS-Server kann diese Layer nicht gemeinsam rendern.\nVersuchen Sie separate Anfragen auszuf\u00fchren, f\u00fcr jeden Layer eine.
+server_timeout=WMS server time out
+server_title=Titel
+server_type=Server-Typ
+service_info=Service- Info
+set=Set
+settings=Einstellungen
+settings_editor=Einstellungs- Editor
+show_layer_names=Layernamen anzeigen
+si=ja
+siguiente=Weiter
+single_value=Einzelwert
+state_or_province=Staat/Land
+style=Stil
+tamano=Gr\u00f6\u00dfe\:
+tamPixX=Pixel Gr\u00f6\u00dfe X
+tamPixY=Pixel Gr\u00f6\u00dfe Y
+telephone=Telefon
+tipo_dato=Datentyp
+title=Titel
+to=Bis
+transparencia=Transparenz
+unknown_response_format=Unbekanntes Antwortformat
+unsupported_crs=Nicht unterst\u00fctztes CRS
+unsupported_map_context_version=Nicht unterst\u00fctzte Web Map Context Version
+unsupported_version=Nicht unterst\u00fctzte Version
+use_custom_size=Benutzerdefinierte Gr\u00f6\u00dfe
+use_full_extent=Volle Ausdehnung benutzen
+use_view_size=Gr\u00f6\u00dfe der Ansicht
+value=Wert
+version=Version
+version_conflict=Versionskonflikt
+view=Ansicht
+Vista=Ansicht
+web_map_context=Web Map Context
+web_map_context_settings=Web Map Context Eigenschaften
+width=Breite
+wms_cant_connect=Kann nicht zu WMS-Server verbinden
+wms_not_queryable=Dieser Server kann nicht abgefragt werden
+wms_properties=WMS Eigenschaften
+wms_server_error=Fehler des WMS-Servers
+wms_transparency=Transparenz
+WMSLayer=WMS Layer
+xmax=Maximaler X-Wert
+xmin=Minimaler X-Wert
+ymax=Maximaler Y-Wert
+ymin=Minimaler Y-Wert

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/resources-plugin/text_de.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/assembly/gvsig-plugin-package.xml
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/assembly/gvsig-plugin-package.xml	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/assembly/gvsig-plugin-package.xml	(revision 21019)
@@ -0,0 +1,37 @@
+<assembly>
+    <id>gvsig-plugin-package</id>
+    <formats>
+        <format>zip</format>
+    </formats>
+    <baseDirectory>${project.artifactId}</baseDirectory>
+    <includeBaseDirectory>true</includeBaseDirectory>
+    <files>
+        <file>
+            <source>target/${project.artifactId}-${project.version}.jar</source>
+            <outputDirectory>lib</outputDirectory>
+        </file>
+        <file>
+            <source>target/package.info</source>
+        </file>
+    </files>
+
+    <fileSets>
+        <fileSet>
+            <directory>src/main/resources-plugin</directory>
+            <outputDirectory>.</outputDirectory>
+        </fileSet>
+    </fileSets>
+
+
+    <dependencySets>
+        <dependencySet>
+            <useProjectArtifact>false</useProjectArtifact>
+            <useTransitiveDependencies>false</useTransitiveDependencies>
+            <outputDirectory>lib</outputDirectory>
+            <includes> 
+                <include>org.gvsig:org.gvsig.raster.wms.remoteclient:jar</include>
+                <include>org.gvsig:org.gvsig.raster.wms.io:jar</include>
+            </includes>
+        </dependencySet>
+    </dependencySets>
+</assembly>

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/assembly/gvsig-plugin-package.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/layer/FLyrWMS.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/layer/FLyrWMS.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/layer/FLyrWMS.java	(revision 21019)
@@ -0,0 +1,1146 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+* MA  02110-1301, USA.
+*
+*/
+
+package org.gvsig.raster.wms.app.wmsclient.layer;
+
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.Image;
+import java.awt.Point;
+import java.awt.Rectangle;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.NoninvertibleTransformException;
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+import java.awt.image.BufferedImage;
+import java.lang.ref.WeakReference;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+import java.util.prefs.Preferences;
+
+import javax.print.attribute.PrintRequestAttributeSet;
+import javax.swing.JOptionPane;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+
+import org.gvsig.andami.PluginServices;
+import org.gvsig.fmap.dal.DALLocator;
+import org.gvsig.fmap.dal.DataManager;
+import org.gvsig.fmap.dal.DataParameters;
+import org.gvsig.fmap.dal.DataStore;
+import org.gvsig.fmap.dal.DataStoreParameters;
+import org.gvsig.fmap.dal.coverage.RasterLocator;
+import org.gvsig.fmap.dal.coverage.RasterManager;
+import org.gvsig.fmap.dal.coverage.datastruct.Extent;
+import org.gvsig.fmap.dal.coverage.datastruct.ViewPortData;
+import org.gvsig.fmap.dal.coverage.exception.FilePaletteException;
+import org.gvsig.fmap.dal.coverage.exception.InfoByPointException;
+import org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException;
+import org.gvsig.fmap.dal.coverage.exception.QueryException;
+import org.gvsig.fmap.dal.coverage.exception.RasterDriverException;
+import org.gvsig.fmap.dal.coverage.grid.RasterFilter;
+import org.gvsig.fmap.dal.coverage.store.RasterDataStore;
+import org.gvsig.fmap.dal.coverage.store.parameter.RasterDataParameters;
+import org.gvsig.fmap.dal.coverage.store.parameter.RemoteStoreParameters;
+import org.gvsig.fmap.dal.coverage.store.parameter.TileDataParameters;
+import org.gvsig.fmap.dal.coverage.store.props.ColorInterpretation;
+import org.gvsig.fmap.dal.exception.DataException;
+import org.gvsig.fmap.dal.exception.InitializeException;
+import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException;
+import org.gvsig.fmap.dal.exception.ReadException;
+import org.gvsig.fmap.dal.exception.ValidateDataParametersException;
+import org.gvsig.fmap.dal.spi.DataManagerProviderServices;
+import org.gvsig.fmap.geom.Geometry.SUBTYPES;
+import org.gvsig.fmap.geom.GeometryLocator;
+import org.gvsig.fmap.geom.GeometryManager;
+import org.gvsig.fmap.geom.exception.CreateEnvelopeException;
+import org.gvsig.fmap.geom.primitive.Envelope;
+import org.gvsig.fmap.mapcontext.ViewPort;
+import org.gvsig.fmap.mapcontext.exceptions.LoadLayerException;
+import org.gvsig.fmap.mapcontext.exceptions.UnsupportedVersionLayerException;
+import org.gvsig.fmap.mapcontext.layers.FLayer;
+import org.gvsig.fmap.mapcontext.layers.Tiling;
+import org.gvsig.fmap.mapcontext.layers.operations.ComposedLayer;
+import org.gvsig.fmap.mapcontext.rendering.legend.ILegend;
+import org.gvsig.gui.beans.Messages;
+import org.gvsig.raster.fmap.layers.DefaultFLyrRaster;
+import org.gvsig.raster.fmap.layers.IRasterLayerActions;
+import org.gvsig.raster.fmap.layers.NotAvailableStateException;
+import org.gvsig.raster.fmap.legend.ImageLegend;
+import org.gvsig.raster.util.CancelTaskImpl;
+import org.gvsig.raster.wms.app.wmsclient.wmc.WebMapContextTags;
+import org.gvsig.raster.wms.app.wmsclient.wmc.XmlBuilder;
+import org.gvsig.raster.wms.io.RemoteWMSStyle;
+import org.gvsig.raster.wms.io.WMSDataParameters;
+import org.gvsig.raster.wms.io.WMSLayerNode;
+import org.gvsig.raster.wms.io.WMSServerExplorer;
+import org.gvsig.raster.wms.io.WMSServerExplorerParameters;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.dynobject.DynObjectSet;
+import org.gvsig.tools.dynobject.DynStruct;
+import org.gvsig.tools.persistence.PersistenceManager;
+import org.gvsig.tools.task.Cancellable;
+import org.gvsig.tools.task.SimpleTaskStatus;
+import org.gvsig.tools.task.TaskStatusManager;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+
+/**
+ * FMap's WMS Layer class.
+ *
+ * Las capas WMS son tileadas para descargarlas del servidor. Esto quiere decir que
+ * est�n formadas por multiples ficheros raster. Por esto la fuente de datos raster (IRasterDatasource)
+ * de la capa FLyrWMS es un objeto de tipo CompositeDataset. Este objeto est� compuesto por un array
+ * bidimensional de MultiRasterDataset. Cada uno de los MultiRasterDataset corresponde con un tile
+ * salvado en disco. Estos MultiRasterDataset se crean cada vez que se repinta ya que en WMS a cada
+ * zoom varian los ficheros fuente. La secuencia de creaci�n de un CompositeDataset ser�a la siguiente:
+ * <UL>
+ * <LI>Se hace una petici�n de dibujado por parte del usuario llamando al m�todo draw de FLyrWMS</LI>
+ * <LI>Se tilea la petici�n</LI>
+ * <LI>Cada tile se dibuja abriendo una FLyerRaster para ese tile</LI>
+ * <LI>Si es el primer dibujado se guarda una referencia en la capa WMS a las propiedades de renderizado, orden de bandas,
+ * transparencia, filtros aplicados, ...</LI>
+ * <LI>Si no es el primer dibujado se asignan las propiedades de renderizado cuya referencia se guarda en la capa WMS</LI>
+ * <LI>Se guarda el MultiRasterDataset de cada tile</LI>
+ * <LI>Al acabar todos los tiles creamos un CompositeDataset con los MultiRasterDataset de todos los tiles</LI>
+ * <LI>Asignamos a la capa la referencia de las propiedades de renderizado que tenemos almacenadas. De esta forma si hay
+ * alguna modificaci�n desde el cuadro de propiedades ser� efectiva sobre los tiles que se dibujan.</LI>
+ * </UL>
+ *
+ *
+ * @author Jaume Dominguez Faus
+ *
+ */
+@SuppressWarnings("deprecation")
+public class FLyrWMS extends DefaultFLyrRaster {
+	public static final String           PERSISTENT_NAME           = "FLyrWMS_Persistent";
+	public static final String           PERSISTENT_DESCRIPTION    = "FLyrWMS Persistent Definition";
+
+	private static final GeometryManager geomManager               = GeometryLocator.getGeometryManager();
+	private static final Logger          logger                    = LoggerFactory.getLogger(FLyrWMS.class);
+	private boolean 					 mustSplitRequest          = false;
+	private final int 					 maxTileDrawWidth          = 1023;
+	private final int 					 maxTileDrawHeight         = 1023;
+	private final int 					 maxTilePrintWidth         = 1023;
+	private final int 					 maxTilePrintHeight        = 1023;
+	private List<WeakReference<Thread>>	 disableUpdateDrawVersion;
+	//private Envelope					 fullEnvelope              = null;
+	private boolean						 firstLoad                 = false;
+	private RasterManager                rManager                  = RasterLocator.getManager();
+	//private WMSServerExplorer            explorer                  = null;
+	private boolean                      deleteCache               = false;
+
+	public FLyrWMS() {
+		super();
+		this.updateDrawVersion();
+		try {
+			enableAwake();
+		} catch (NotAvailableStateException e) {
+			logger.error("Fallo el estado de open. Closed=" + isClosed() + " Awake=" + isAwake(), this, e);
+		}
+	}
+
+   public FLyrWMS(DataStoreParameters dataStoreParameters) throws Exception {
+        this();
+        //Create the explorer and connect
+        DataManager dataManager = DALLocator.getDataManager();
+        WMSServerExplorerParameters explorerParams = (WMSServerExplorerParameters)
+               dataManager.createServerExplorerParameters(WMSServerExplorer.NAME);
+        explorerParams.setHost(((URI)dataStoreParameters.getDynValue("uri")).toString());
+        WMSServerExplorer wmsServerExplorer =
+            (WMSServerExplorer) dataManager.openServerExplorer(WMSServerExplorer.NAME, explorerParams);
+        wmsServerExplorer.connect(null, ((RemoteStoreParameters)dataStoreParameters).isDeletingCache());
+
+        //Set the parameters
+        setParameters((WMSDataParameters)dataStoreParameters);
+        setExplorer(wmsServerExplorer);
+    }
+
+	public static DataStore createDataStore(String host, IProjection srs) throws InitializeException {
+		DataManagerProviderServices dataman = (DataManagerProviderServices) DALLocator.getDataManager();
+		RasterDataParameters params = null;
+		try {
+			params = (RasterDataParameters)dataman.createServerExplorerParameters(WMSServerExplorer.NAME);
+		} catch (InitializeException e) {
+			return null;
+		} catch (ProviderNotRegisteredException e) {
+			return null;
+		}
+		try {
+            params.setURI(new URI(host));
+        } catch (URISyntaxException e1) {
+            throw new InitializeException("Can't create URI from "+host, e1);
+        }
+		params.setSRS(srs);
+
+		try {
+			return dataman.openStore(params.getDataStoreName(), params);
+		} catch (ValidateDataParametersException e) {
+			throw new InitializeException(e);
+		} catch (ProviderNotRegisteredException e) {
+			throw new InitializeException(e);
+		}
+	}
+
+	public void setDataStore(DataStore dataStore) throws LoadLayerException {
+		this.dataStore = (RasterDataStore) dataStore;
+		try {
+			this.dataStore.isOpen();
+			if(!isOpen())
+				enableOpen();
+		} catch (NotAvailableStateException e) {
+			logger.error("Fallo el estado de open. Closed=" + isClosed() + " Awake=" + isAwake(), this, e);
+		}
+		setProjection(this.dataStore.getProjection());
+	}
+
+	/**
+	 * It choose the best format to load different maps if the server
+	 * supports it. This format could be png, because it supports
+	 * transparency.
+	 * @param formats
+	 * Arraywith all the formats supported by the server
+	 * @return
+	 */
+	@SuppressWarnings("unused")
+	private String getGreatFormat(Vector<String> formats){
+		for (int i = 0 ; i < formats.size() ; i++){
+			String format = (String) formats.get(i);
+			if (format.equals("image/jpg")){
+				return format;
+			}
+			if (format.equals("image/jpeg")){
+				return format;
+			}
+		}
+		return (String)formats.get(0);
+	}
+
+	public static void registerPersistent() {
+		PersistenceManager manager = ToolsLocator.getPersistenceManager();
+		DynStruct definition = manager.getDefinition("FLyrWMS_Persistent");
+		if( definition == null ) {
+			if (manager.getDefinition(DefaultFLyrRaster.class) == null) {
+				DefaultFLyrRaster.registerPersistence();
+			}
+
+			definition = manager.addDefinition(
+					FLyrWMS.class,
+					"FLyrWMS_Persistent",
+					"FLyrWMS Persistent Definition",
+					null,
+					null
+			);
+
+			definition.extend(PersistenceManager.PERSISTENCE_NAMESPACE, DefaultFLyrRaster.PERSISTENT_NAME);
+		}
+
+		DefaultFLyrRaster.registerPersistence(definition);
+	}
+
+	public void draw(BufferedImage image, Graphics2D g, ViewPort viewPort,
+			Cancellable cancel, double scale) throws ReadException {
+		TaskStatusManager manager = ToolsLocator.getTaskStatusManager();
+		SimpleTaskStatus taskStatus = new RasterTaskStatus("Drawing " + getName() + "...", cancel);
+		manager.add(taskStatus);
+		taskStatus.setAutoremove(true);
+		splitRequestCalculation(viewPort.getImageWidth(), viewPort.getImageHeight());
+
+		if(!firstLoad) {
+			try {
+				initFilters();
+				try {
+					if(!isOpen())
+						enableOpen();
+				} catch (NotAvailableStateException e) {
+					throw new ReadException("Fallo el estado de open. Closed=" + isClosed() + " Awake=" + isAwake(), e);
+				}
+			} catch (FilePaletteException e) {
+				logger.error(e.getMessage(), this, e);
+			}
+			firstLoad = true;
+		}
+
+		enableStopped();
+
+		if(recalcLevel) {
+			double pixelSize = viewPort.getEnvelope().getLength(0) / (double)viewPort.getImageWidth();
+			zoomLevel = dataStore.getNearestLevel(pixelSize);
+		}
+		recalcLevel = true;
+
+		if (isWithinScale(scale)) {
+
+			if(mustSplitRequest) {
+				Point2D p = viewPort.getOffset();
+				Rectangle r = new Rectangle((int) p.getX(), (int) p.getY(), viewPort.getImageWidth(), viewPort.getImageHeight());
+				Tiling tiles = new Tiling(maxTileDrawWidth, maxTileDrawHeight, r);
+				tiles.setAffineTransform((AffineTransform) viewPort.getAffineTransform().clone());
+
+				for (int tileNr = 0; tileNr < tiles.getNumTiles(); tileNr++) {
+					// drawing part
+					try {
+						ViewPort vp = tiles.getTileViewPort(viewPort, tileNr);
+						drawTile(g, vp, taskStatus, scale);
+					} catch (LoadLayerException e) {
+						throw new ReadException(e.getMessage(), e);
+					} catch (NoninvertibleTransformException e) {
+						throw new ReadException(e.getMessage(), e);
+					}
+				}
+			} else {
+				try {
+					drawTile(g, viewPort, taskStatus, scale);
+				} catch (LoadLayerException e) {
+					setAvailable(false);
+					logger.error("Server error:" + e.getMessage(), e);
+				}
+			}
+		}
+		disableStopped();
+	}
+
+
+	/**
+	 * This is the method used to draw a tile in a WMS mosaic layer.
+	 * @throws LoadLayerException
+	 * @throws ReadDriverException
+	 * @return true when a tile has been painted
+	 */
+	private void drawTile(Graphics2D g, ViewPort vp, SimpleTaskStatus taskStatus, double scale) throws LoadLayerException, ReadException {
+		// Compute the query geometry
+		// 1. Check if it is within borders
+		Envelope layerEnv = getFullEnvelope();
+		Envelope vpEnv = vp.getAdjustedEnvelope();
+		if (!vpEnv.intersects(layerEnv)) {
+			return;
+		}
+		try {
+			Rectangle2D vpRect = getRectable2DFromEnvelope(vpEnv);
+			Rectangle2D layerRect = getRectable2DFromEnvelope(layerEnv);
+			// 2. Intersect layer and viewport extents to get the area of interest
+			Rectangle2D requestedRect = new Rectangle2D.Double();
+			Rectangle2D.intersect(layerRect, vpRect, requestedRect);
+
+			// 3. Compute image size in pixels from the requested Extent
+			double scalex = vp.getAffineTransform().getScaleX();
+			double scaley = vp.getAffineTransform().getScaleY();
+			int wImg = (int) Math.ceil(Math.abs(requestedRect.getWidth() * scalex));
+			int hImg = (int) Math.ceil(Math.abs(requestedRect.getHeight() * scaley));
+			if ((wImg <= 0) || (hImg <= 0)) {
+				return;
+			}
+
+			// 4. compute exactly the requested extent (from the rounded image size)
+			// ensuring we are still within the layer extent
+			double worldWidth = Math.abs((double)wImg/scalex);
+			double worldHeigh = Math.abs((double)hImg/scaley);
+			double worldX;
+			if (requestedRect.getX()+worldWidth>layerEnv.getMaximum(0)) {
+				// we've got outside of layer extent due to rounding
+				worldX = layerEnv.getMaximum(0)-worldWidth;
+			}
+			else {
+				worldX = requestedRect.getX();
+			}
+			double worldY;
+			if (requestedRect.getY()+worldHeigh>layerEnv.getMaximum(1)) {  // FIXME: test with different CRSs
+				worldY = layerEnv.getMaximum(1)-worldHeigh;
+			}
+			else {
+				worldY = requestedRect.getMinY();
+			}
+
+			requestedRect.setRect(worldX, worldY, worldWidth, worldHeigh);
+			Envelope requestedEnvelope = geomManager.createEnvelope(requestedRect.getMinX(),
+					requestedRect.getMinY(),
+					requestedRect.getMaxX(),
+					requestedRect.getMaxY(),
+					SUBTYPES.GEOM2D);
+			Extent requestedExtent = rManager.getDataStructFactory().createExtent(
+					requestedEnvelope.getMinimum(0),
+					requestedEnvelope.getMaximum(1),
+					requestedEnvelope.getMaximum(0),
+					requestedEnvelope.getMinimum(1));
+
+			// 5. compute the new AffineTransform (ViewPort class can do it for us
+			// if we provide the image size, extent and offset)
+			ViewPort auxVp = (ViewPort) vp.clone();
+			Dimension sz = new Dimension(wImg, hImg);
+			auxVp.setImageSize(sz);
+			auxVp.setEnvelope(requestedEnvelope);
+
+
+			// 6. compute tile offeset. It is the sum of the original viewport offset
+			// plus the offset introduced by intersecting layer and viewport extents
+			double offsetX = vp.getOffset().getX();
+			if (requestedEnvelope.getMinimum(0)-vpEnv.getMinimum(0)>0) {
+				offsetX = offsetX + (requestedEnvelope.getMinimum(0)-vpEnv.getMinimum(0))*auxVp.getAffineTransform().getScaleX();
+			}
+			double offsetY = vp.getOffset().getY(); // FIXME: test with different CRSs
+			if (requestedEnvelope.getMaximum(1)-vpEnv.getMaximum(1)<0) {
+				offsetY = offsetY + (requestedEnvelope.getMaximum(1)-vpEnv.getMaximum(1))*auxVp.getAffineTransform().getScaleY();
+			}
+
+			// 7. Compute again the AffineTransform considering also the offset
+			auxVp.setOffset(new Point2D.Double(offsetX, offsetY));
+			auxVp.refreshExtent(); // necessary after updating the offset
+
+			ViewPortData vpData = rManager.getDataStructFactory().createViewPortData(auxVp.getProjection(), requestedExtent, sz);
+			vpData.setMat(auxVp.getAffineTransform());
+			vpData.setDPI((int)auxVp.getDPI());
+			getParameters().setExtent(requestedRect);
+			if(getParameters().isSizeFixed()) {
+				getParameters().setWidth((int)getParameters().getFixedSize().getWidth());
+				getParameters().setHeight((int)getParameters().getFixedSize().getHeight());
+			} else {
+				getParameters().setWidth(wImg);
+				getParameters().setHeight(hImg);
+			}
+			if(getDataStore().getParameters() instanceof WMSDataParameters) {
+				getRender().draw(g, vpData, taskStatus);
+			} else {
+				Extent vpExtent = rManager.getDataStructFactory().createExtent(
+						vpEnv.getMinimum(0),
+						vpEnv.getMaximum(1),
+						vpEnv.getMaximum(0),
+						vpEnv.getMinimum(1));
+				ViewPortData vp2 = rManager.getDataStructFactory().createViewPortData(vp.getProjection(), vpExtent, vp.getImageSize() );
+				vp2.setMat(vp.getAffineTransform());
+				vp2.setDPI((int)vp.getDPI());
+				getParameters().setExtent(vpExtent.toRectangle2D());
+				getRender().drawTiledService(g, vp2, vp.getImageSize(), taskStatus);
+			}
+		} catch (ProcessInterruptedException e) {
+		} catch (CloneNotSupportedException e) {
+			drawingError(e);
+		}
+		catch (QueryException e) {
+			drawingError(e);
+		} catch (CreateEnvelopeException e) {
+			drawingError(e);
+		} finally {
+			taskStatus.terminate();
+		}
+	}
+
+	private void drawingError(Exception e) {
+		setAvailable(false);
+		JOptionPane.showMessageDialog(null, "Problems drawing this layer:" + e.getMessage(), Messages.getText("Error"), JOptionPane.ERROR_MESSAGE);
+		logger.info("Problems drawing this layer:" + e.getMessage(), e);
+	}
+
+	/**
+	 * @see com.iver.cit.gvsig.fmap.layers.FLayer#print(java.awt.Graphics2D,
+	 * 		com.iver.cit.gvsig.fmap.ViewPort,
+	 * 		com.iver.cit.gvsig.fmap.operations.Cancellable)
+	 */
+	public void print(Graphics2D g, ViewPort viewPort, Cancellable cancel, double scale, PrintRequestAttributeSet properties)
+	throws ReadException {
+		TaskStatusManager manager = ToolsLocator.getTaskStatusManager();
+		SimpleTaskStatus taskStatus = new RasterTaskStatus("Printing " + getName() + "...", cancel);
+		manager.add(taskStatus);
+		taskStatus.setAutoremove(true);
+		splitRequestCalculation(viewPort.getImageWidth(), viewPort.getImageHeight());
+
+		if (isVisible() && isWithinScale(scale)){
+			if (!mustSplitRequest) {
+				draw(null, g, viewPort, cancel,scale);
+			} else {
+				Tiling tiles = new Tiling(maxTilePrintWidth, maxTilePrintHeight, g.getClipBounds());
+				tiles.setAffineTransform((AffineTransform) viewPort.getAffineTransform().clone());
+				for (int tileNr = 0; tileNr < tiles.getNumTiles(); tileNr++) {
+					// Parte que dibuja
+					try {
+						ViewPort vp = tiles.getTileViewPort(viewPort, tileNr);
+						drawTile(g, vp, taskStatus, scale);
+					} catch (NoninvertibleTransformException e) {
+						throw new ReadException(e.getMessage(), e);
+					} catch (LoadLayerException e) {
+						throw new ReadException(e.getMessage(), e);
+					}
+				}
+			}
+		}
+		taskStatus.terminate();
+	}
+
+	public void _print(Graphics2D g, ViewPort viewPort, Cancellable cancel,
+			double scale) throws ReadException {
+		draw(null, g, viewPort, cancel,scale);
+	}
+
+	public HashMap<String, Object> getProperties() {
+		HashMap<String, Object> info = new HashMap<String, Object>();
+		String[] layerNames = getParameters().getLayerQuery().split(",");
+		Vector<WMSLayerNode> layers = new Vector<WMSLayerNode>(layerNames.length);
+		try {
+			//explorer.connect(null);
+			for (int i = 0; i < layerNames.length; i++) {
+				layers.add(i, getExplorer().getLayer(layerNames[i]));
+			}
+			info.put("name", getName());
+			info.put("selectedLayers", layers);
+			info.put("host", getParameters().getURI());
+			info.put("srs", getParameters().getSRSCode());
+			info.put("format", getParameters().getFormat());
+			info.put("infoformat", getParameters().getInfoFormat());
+			info.put("wmsTransparency", new Boolean(getParameters().isWmsTransparent()));
+			info.put("styles", getParameters().getStyles());
+			info.put("dimensions", getParameters().getDimensions());
+			info.put("fixedSize", getParameters().getFixedSize());
+			return info;
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+
+	/**
+	 * Creates the part of a OGC's MapContext document that would describe this
+	 * layer(s).
+	 * @param version, The desired version of the resulting document. (1.1.0)
+	 * @return String containing the xml.
+	 * @throws UnsupportedVersionLayerException
+	 */
+	@SuppressWarnings({ "unchecked", "rawtypes" })
+	public String toMapContext(String mapContextVersion) {
+		XmlBuilder xml = new XmlBuilder();
+
+		String query = getParameters().getLayerQuery();
+		String[] layerNames = query.split(",");
+		List<RemoteWMSStyle> styleList = getParameters().getStyles();
+		for (int i = 0; i < layerNames.length; i++) {
+			WMSLayerNode layer = getExplorer().getLayer(layerNames[i]);
+			HashMap xmlAttrs = new HashMap();
+
+			// <Layer>
+			xmlAttrs.put(WebMapContextTags.HIDDEN, !isVisible() + "");
+			xmlAttrs.put(WebMapContextTags.QUERYABLE, getExplorer().isQueryable() + "");
+			xml.openTag(WebMapContextTags.LAYER, xmlAttrs);
+			xmlAttrs.clear();
+			if (mapContextVersion.equals("1.1.0") || mapContextVersion.equals("1.0.0")) {
+				// <Server>
+				xmlAttrs.put(WebMapContextTags.SERVICE, WebMapContextTags.WMS);
+				xmlAttrs.put(WebMapContextTags.VERSION, getExplorer().getVersion());
+				xmlAttrs.put(WebMapContextTags.SERVER_TITLE, getExplorer().getServiceTitle());
+				xml.openTag(WebMapContextTags.SERVER, xmlAttrs);
+				xmlAttrs.clear();
+
+				// <OnlineResource>
+				xmlAttrs.put(WebMapContextTags.XLINK_TYPE, "simple");
+				xmlAttrs.put(WebMapContextTags.XLINK_HREF, getParameters().getURI().toString());
+				xml.writeTag(WebMapContextTags.ONLINE_RESOURCE, xmlAttrs);
+				xmlAttrs.clear();
+				// </OnlineResource>
+
+				xml.closeTag();
+				// </Server>
+
+				// <Name>
+				xml.writeTag(WebMapContextTags.NAME, layer.getName().trim());
+				// </Name>
+
+				// <Title>
+				xml.writeTag(WebMapContextTags.TITLE, layer.getTitle().trim());
+				//?xml.writeTag(WebMapContextTags.TITLE, getName().trim());
+				// </Title>
+
+				// <Abstract>
+				if (layer.getAbstract() != null) {
+					xml.writeTag(WebMapContextTags.ABSTRACT, layer.getAbstract());
+					// </Abstract>
+				}
+
+				// <SRS> (a list of available SRS for the enclosing layer)
+				String[] strings = (String[]) layer.getAllSrs().toArray(new String[0]);
+				String mySRS = strings[0];
+				for (int j = 1; j < strings.length; j++) {
+					mySRS += ","+strings[j];
+				}
+				xml.writeTag(WebMapContextTags.SRS, mySRS);
+				// </SRS>
+
+				// <FormatList>
+				xml.openTag(WebMapContextTags.FORMAT_LIST);
+				strings = getExplorer().getFormats();
+				for (int j = 0; j < strings.length; j++) {
+					// <Format>
+					String str = strings[j].trim();
+					if (str.equals(getParameters().getFormat())) {
+						xml.writeTag(WebMapContextTags.FORMAT, str, WebMapContextTags.CURRENT, "1");
+					} else {
+						xml.writeTag(WebMapContextTags.FORMAT, str);
+						// </Format>
+					}
+				}
+				xml.closeTag();
+				// </FormatList>
+
+				// <StyleList>
+				xml.openTag(WebMapContextTags.STYLE_LIST);
+
+				if (layer.getStyles().size() > 0) {
+					for (int j = 0; j < layer.getStyles().size(); j++) {
+						// <Style>
+						RemoteWMSStyle st = layer.getStyles().get(j);
+						if (st.getName().equals(styleList.get(i).getName())) {
+							xmlAttrs.put(WebMapContextTags.CURRENT, "1");
+						}
+						xml.openTag(WebMapContextTags.STYLE, xmlAttrs);
+						xmlAttrs.clear();
+
+						// <Name>
+						xml.writeTag(WebMapContextTags.NAME, st.getName());
+						// </Name>
+
+						// <Title>
+						xml.writeTag(WebMapContextTags.TITLE, st.getTitle());
+						// </Title>
+
+						// <LegendURL width="180" format="image/gif" height="50">
+						// <OnlineResource xlink:type="simple" xlink:href="http://globe.digitalearth.gov/globe/en/icons/colorbars/NATIONAL.gif"/>
+						// </OnlineResource>
+						// </LegendURL>
+						xml.closeTag();
+						// </Style>
+
+					}
+
+				} else {
+					// Create fake style (for compatibility issues)
+					xmlAttrs.put(WebMapContextTags.CURRENT, "1");
+					// <Style>
+					xml.openTag(WebMapContextTags.STYLE, xmlAttrs);
+					xmlAttrs.clear();
+					// <Name>
+					xml.writeTag(WebMapContextTags.NAME, "default");
+					// </Name>
+
+					// <Title>
+					xml.writeTag(WebMapContextTags.TITLE, "default");
+					xml.closeTag();
+				}
+				// </StyleList>
+				xml.closeTag();
+				if (mapContextVersion.compareTo("1.0.0") > 0) {
+					// <DimensionList>
+					xml.openTag(WebMapContextTags.DIMENSION_LIST);
+					// <Dimension>
+					// </Dimension>
+					xml.closeTag();
+					// </DimensionList>
+				}
+			} else {
+				xml.writeTag("ERROR", PluginServices.getText(this, "unsupported_map_context_version"));
+			}
+			// </Layer>
+			xml.closeTag();
+		}
+		return xml.getXML();
+	}
+
+	public String getTocImageIcon() {
+		return "icon-layer-wms";
+	}
+
+	public int[] getTileSize() {
+		int[] size = {maxTileDrawWidth, maxTileDrawHeight};
+		return size;
+	}
+
+	public boolean isTiled() {
+		return mustSplitRequest;
+	}
+
+	private void splitRequestCalculation(int width, int height) {
+            RasterDataStore store = this.getDataStore();
+            if( store == null ) {
+                String msg = "Can't get RasterDataStore associated to this layer ("+this.toString()+").";
+                logger.warn(msg);
+                throw new RuntimeException(msg);
+            }
+            mustSplitRequest = (!store.isTiled() && (width > maxTileDrawWidth || height > maxTileDrawHeight));
+	}
+
+	public ComposedLayer newComposedLayer() {
+		Preferences prefs = Preferences.userRoot().node("gvsig.wms");
+
+		/*
+		 * from java.util.prefs import Preferences
+		 * prefs = Preferences.userRoot().node("gvsig.wms")
+		 * prefs.put("useComposedLayer","true")
+		 */
+
+		String str = prefs.get("useComposedLayer","false");
+		Boolean useComposedLayer = Boolean.TRUE; // por defecto ya se usan
+		try {
+			useComposedLayer = Boolean.valueOf(str);
+		} catch (Exception e) {
+
+		}
+		if (useComposedLayer.booleanValue()) {
+			return new ComposedLayerWMS();
+		} else {
+			return null;
+		}
+	}
+
+	/*
+	 * Checks if can make a single petition for the two layers to the server
+	 * @see com.iver.cit.gvsig.fmap.layers.ComposedLayerWMS#canAdd(com.iver.cit.gvsig.fmap.layers.FLayer)
+	 */
+	boolean isComposedLayerCompatible(FLayer layer) {
+		FLyrWMS aLayer;
+
+		if (!(layer instanceof FLyrWMS)) {
+			return false;
+		}
+		aLayer = (FLyrWMS)layer;
+		if (!getParameters().getURI().equals(aLayer.getParameters().getURI())) {
+			return false;
+		}
+
+		WMSDataParameters p = getWMSParameters(getDataStore().getParameters());
+
+		if (!p.getFormat().equals(aLayer.getParameters().getFormat())) {
+			return false;
+		}
+		if (!p.getSRS().equals(aLayer.getParameters().getSRS())) {
+			return false;
+		}
+		if (p.getInfoLayerQuery() != null) {
+			if (!p.getInfoLayerQuery().equals(aLayer.getParameters().getInfoLayerQuery())) {
+				return false;
+			}
+		}else if (p.getInfoLayerQuery() != null) {
+			return false;
+		}
+
+
+		// isFixedSize es privado
+		if ((getParameters().getFixedSize() != null) &&
+				(aLayer.getParameters().getFixedSize() != null)) {
+			if (getParameters().getFixedSize().equals(aLayer.getParameters().getFixedSize())) {
+				return false;
+			}
+		} else if ((getParameters().getFixedSize() != null) != (aLayer.getParameters().getFixedSize() != null)) {
+			return false;
+		}
+
+		// time elevation (dimensions)
+		if ((p.getDimensions() != null) &&
+				(aLayer.getParameters().getDimensions() != null)) {
+			if (p.getDimensions().size() != aLayer.getParameters().getDimensions().size()) {
+				return false;
+			} else {
+				Iterator<String> iter = p.getDimensions().iterator();
+				while (iter.hasNext()) {
+					if (!aLayer.getParameters().getDimensions().contains(iter.next())) {
+						return false;
+					}
+				}
+			}
+
+		} else if ((p.getDimensions() != null) != (aLayer.getParameters().getDimensions() != null)) {
+			return false;
+		}
+
+		return true;
+	}
+
+	public boolean isActionEnabled(int action) {
+		switch (action) {
+		case IRasterLayerActions.ZOOM_PIXEL_RESOLUTION:
+		case IRasterLayerActions.FLYRASTER_BAR_TOOLS:
+		case IRasterLayerActions.BANDS_FILE_LIST:
+		case IRasterLayerActions.COLOR_TABLE:
+		case IRasterLayerActions.GEOLOCATION:
+		case IRasterLayerActions.PANSHARPENING:
+		case IRasterLayerActions.SAVE_COLORINTERP:
+		case IRasterLayerActions.SAVEAS:
+		case IRasterLayerActions.BANDS_RGB:
+		case IRasterLayerActions.ENHANCED:
+		case IRasterLayerActions.STATS:
+		case IRasterLayerActions.NODATA:
+			return false;
+		case IRasterLayerActions.REMOTE_ACTIONS:
+			return true;
+		}
+
+		return super.isActionEnabled(action);
+	}
+
+	public ILegend getLegend() {
+		if(getDataStore() != null) {
+			Image img = getDataStore().getImageLegend();
+			if(img != null)
+				return new ImageLegend(img);
+		}
+		return null;
+	}
+
+	public boolean isRemote() {
+		return true;
+	}
+
+	public boolean overviewsSupport() {
+		return false;
+	}
+
+	protected void updateDrawVersion() {
+		if (this.disableUpdateDrawVersion != null){
+
+			Thread curThread = Thread.currentThread();
+
+			Thread aThread;
+
+			Iterator<WeakReference<Thread>> iter = this.disableUpdateDrawVersion.iterator();
+			while (iter.hasNext()){
+				aThread = (Thread) ((WeakReference<?>)iter.next()).get();
+				if (aThread == null){
+					iter.remove();
+				} else if(aThread.equals(curThread)){
+					return;
+				}
+			}
+		}
+		//		Exception ex = new Exception();
+		//		ex.printStackTrace();
+		super.updateDrawVersion();
+	}
+
+	protected void disableUpdateDrawVersion() {
+		if (this.disableUpdateDrawVersion == null) {
+			this.disableUpdateDrawVersion = new ArrayList<WeakReference<Thread>>();
+		}
+		this.disableUpdateDrawVersion.add(new WeakReference<Thread>(Thread.currentThread()));
+	}
+
+	protected void enableUpdateDrawVersion() {
+		if (this.disableUpdateDrawVersion == null){
+			return;
+		}
+		Thread curThread = Thread.currentThread();
+		Thread aThread;
+
+		Iterator<WeakReference<Thread>> iter = this.disableUpdateDrawVersion.iterator();
+		while (iter.hasNext()) {
+			aThread = (Thread) ((WeakReference<?>)iter.next()).get();
+			if (aThread == null) {
+				iter.remove();
+			} else if(aThread.equals(curThread)) {
+				iter.remove();
+				break;
+			}
+		}
+
+	}
+
+	private Rectangle2D.Double getRectable2DFromEnvelope(Envelope env) {
+		return new Rectangle2D.Double(env.getMinimum(0), env.getMinimum(1), env
+				.getLength(0), env.getLength(1));
+	}
+
+	/*private Envelope getEnvelopeFromRectable2D(Rectangle2D rect) {
+		try {
+			return geomManager.createEnvelope(rect.getMinX(), rect.getMinY(),
+					rect.getMaxX(), rect.getMaxY(),
+					SUBTYPES.GEOM2D);
+		} catch (CreateEnvelopeException e) {
+			logger.error("Error creating the envelope", e);
+		}
+		return null;
+	}*/
+
+	@Override
+	public String getFileFormat() {
+		return "WMS";
+	}
+
+	@Override
+	public FLayer getFileLayer() throws RasterDriverException {
+		/*if(getDataStore() instanceof DefaultRemoteRasterStore) {
+			RemoteRasterProvider prov = (RemoteRasterProvider)((DefaultRemoteRasterStore)getDataStore()).getProvider(0);
+			File file = null;
+
+			if(getParameters().isSizeFixed()) {
+				file = prov.getFileLayer();
+			} else {
+				file = prov.getLastRequest();
+			}
+
+			if(file == null)
+				return null;
+
+			try {
+				return DefaultFLyrRaster.createLayer("tmp", file);
+			} catch (LoadLayerException e) {
+				throw new RasterDriverException(e.getMessage(), e);
+			}
+		}*/
+		return null;
+	}
+
+	/**
+	 * Devuelve el envelope en la proyeccion de la vista
+	 */
+	public Envelope getFullEnvelope() {
+		Extent e1 = getDataStore().getExtent();
+		Envelope rAux = null;
+		try {
+			rAux = geomManager.createEnvelope(e1.getMin().getX(), e1.getMin().getY(), e1.getMax().getX(), e1.getMax().getY(), SUBTYPES.GEOM2D);
+		} catch (CreateEnvelopeException exc) {
+			logger.error("Error creating the envelope", exc);
+		}
+
+		// Esto es para cuando se crea una capa nueva con el fullExtent de ancho
+		// y alto 0.
+		if (rAux == null || rAux.getMaximum(0) - rAux.getMinimum(0) == 0
+				&& rAux.getMaximum(1) - rAux.getMinimum(1) == 0) {
+			try {
+				rAux = geomManager.createEnvelope(0, 0, 100, 100, SUBTYPES.GEOM2D);
+			} catch (CreateEnvelopeException e) {
+				logger.error("Error creating the envelope", e);
+			}
+		}
+		// Si existe reproyecci�n, reproyectar el extent
+		ICoordTrans ct = getCoordTrans();
+		if (ct != null) {
+			Point2D pt1 = new Point2D.Double(rAux.getMinimum(0), rAux
+					.getMinimum(1));
+			Point2D pt2 = new Point2D.Double(rAux.getMaximum(0), rAux
+					.getMaximum(1));
+			pt1 = ct.convert(pt1, null);
+			pt2 = ct.convert(pt2, null);
+			try {
+				rAux = geomManager.createEnvelope(pt1.getX(), pt1.getY(), pt2
+						.getX(), pt2.getY(), SUBTYPES.GEOM2D);
+			} catch (CreateEnvelopeException e) {
+				logger.error("Error creating the envelope", e);
+			}// new
+			// Rectangle2D.Double();
+		}
+		return rAux;
+
+	}
+
+	public Extent getFullRasterExtent() {
+		return getExtentFromEnvelope(getFullEnvelope());
+	}
+
+	public DynObjectSet getInfo(org.gvsig.fmap.geom.primitive.Point p, double tolerance) throws LoadLayerException, DataException {
+		Point p1 = new Point((int)p.getX(), (int)p.getY());
+		return getInfo(p1, tolerance, null, false);
+	}
+
+	@Override
+	public DynObjectSet getInfo(Point p, double tolerance, Cancellable cancel,
+			boolean fast) throws LoadLayerException, DataException {
+
+		//try {
+		ViewPort viewPort = getMapContext().getViewPort();
+
+		getParameters().setExtent(this.getRectable2DFromEnvelope(viewPort.getAdjustedEnvelope()));
+		if(getParameters().isSizeFixed()) {
+			getParameters().setWidth((int)getParameters().getFixedSize().getWidth());
+			getParameters().setHeight((int)getParameters().getFixedSize().getHeight());
+		} else {
+			getParameters().setWidth(viewPort.getImageWidth());
+			getParameters().setHeight(viewPort.getImageHeight());
+		}
+
+		CancelTaskImpl cancellable = new CancelTaskImpl(cancel);
+		getParameters().setCancellable(cancellable);
+
+		String fInfo;
+		try {
+			//Point2D pt = new Point2D.Double();
+			//try {
+				//viewPort.getAffineTransform().transform(p, pt);
+			/*} catch (NoninvertibleTransformException e) {
+				return null;
+			}*/
+
+			Extent bbox = getExtentFromEnvelope(viewPort.getAdjustedEnvelope());
+			fInfo = getDataStore().getInfoByPoint(p.getX(),
+					p.getY(),
+					bbox,
+					viewPort.getImageWidth(),
+					viewPort.getImageHeight(),
+					cancellable);
+		} catch (InfoByPointException e) {
+			throw new LoadLayerException("Error in getInfoByPoint", e);
+		}
+		return new DynObjectSetWMSInfo(fInfo, getParameters().getInfoFormat());
+	}
+
+	private Extent getExtentFromEnvelope(Envelope env) {
+		double minx = env.getMinimum(0);
+		double miny = env.getMinimum(1);
+		double maxx = env.getMaximum(0);
+		double maxy = env.getMaximum(1);
+		Point2D ul = new Point2D.Double(minx, maxy);
+		Point2D ur = new Point2D.Double(maxx, maxy);
+		Point2D ll = new Point2D.Double(minx, miny);
+		Point2D lr = new Point2D.Double(maxx, miny);
+		return rManager.getDataStructFactory().createExtent(ul, lr, ur, ll);
+	}
+
+    /**
+     * Sets the data store parameters
+     * @param params
+     * @throws InitializeException
+     */
+    public void setParameters(DataStoreParameters params) throws InitializeException {
+    	if(params instanceof TileDataParameters) {
+			((TileDataParameters)params).deleteCache(deleteCache);
+		}
+
+    	DataManagerProviderServices dataman = (DataManagerProviderServices) DALLocator.getDataManager();
+		try {
+			DataStore dStore = dataman.openStore(params.getDataStoreName(), params);
+			this.setDataStore(dStore);
+
+			if(params instanceof WMSDataParameters) {
+				this.setName(((WMSDataParameters)params).getURI().getPath());
+			}
+
+			if(params instanceof TileDataParameters) {
+				DataParameters p = ((TileDataParameters) params).getDataParameters();
+				if(p instanceof WMSDataParameters) {
+					this.setName(((WMSDataParameters) p).getURI().getPath());
+				}
+			}
+		} catch (ValidateDataParametersException e) {
+			throw new InitializeException(e);
+		} catch (ProviderNotRegisteredException e) {
+			throw new InitializeException(e);
+		} catch (LoadLayerException e) {
+			throw new InitializeException(e);
+		}
+    }
+
+	public WMSDataParameters getParameters() {
+		return getWMSParameters(getDataStore().getParameters());
+    }
+
+    /**
+     * Gets <code>WMSDataParameters</code>
+     * @param parameters
+     * @return
+     */
+    private WMSDataParameters getWMSParameters(DataStoreParameters parameters) {
+    	WMSDataParameters params = null;
+    	if(parameters instanceof WMSDataParameters) {
+			params = (WMSDataParameters) parameters;
+		}
+
+		if(parameters instanceof TileDataParameters) {
+			DataParameters p = ((TileDataParameters) parameters).getDataParameters();
+			if(p instanceof WMSDataParameters) {
+				params = (WMSDataParameters) p;
+			}
+		}
+		return params;
+    }
+
+    /**
+	 * Assigns the flag to delete this layer from the cache
+	 * @param selected
+	 */
+	public void deleteCache(boolean deleteCache) {
+		this.deleteCache = deleteCache;
+	}
+
+    /**
+     * Sets the explorer
+     * @param explorer
+     */
+    public void setExplorer(WMSServerExplorer explorer) {
+    	if(getDataStore() != null)
+    		getDataStore().setExplorer(explorer);
+    }
+
+    /**
+     * Gets the explorer
+     * @return
+     */
+    public WMSServerExplorer getExplorer() {
+    	try {
+			return (WMSServerExplorer)getDataStore().getExplorer();
+		} catch (ValidateDataParametersException e) {
+			logger.debug("Error getting the explorer", e);
+		} catch (DataException e) {
+			logger.debug("Error getting the explorer", e);
+		}
+    	return null;
+    }
+
+	public FLayer cloneLayer() throws Exception {
+		RasterDataStore  ds = dataStore.cloneDataStore();
+		FLyrWMS newLayer = new FLyrWMS();
+		newLayer.setName(getName());
+		newLayer.setOpenRasterStore(ds);
+		//newLayer.firstLoad = firstLoad;
+		newLayer.setExplorer(getExplorer());
+
+		List<RasterFilter> filters = getRender().getFilterList().getStatusCloned();
+
+		//Hacemos una copia de las bandas a renderizar
+		ColorInterpretation ci = getRender().getRenderColorInterpretation();
+		if(ci != null) {
+			newLayer.getRender().setRenderColorInterpretation(ci.cloneColorInterpretation());
+		}
+
+		//Asignamos el entorno
+		if(newLayer.getRender().getFilterList() == null)
+			newLayer.getRender().setFilterList(RasterLocator.getManager().createEmptyFilterList(getRender().getFilterList().getInitDataType()));
+		newLayer.getRender().getFilterList().setEnv(getRender().getFilterList().getEnv());
+		newLayer.getRender().getFilterList().setStatus(filters);
+
+		// Asignamos los valores noData del original
+		newLayer.setNoDataValue(getNoDataValue());
+		if(dataStore.getNoDataValue().isDefined())
+			newLayer.setNoDataTransparent(true);
+		newLayer.enableOpen();
+
+		return newLayer;
+	}
+
+	@Override
+	public boolean isInside(Point2D p) {
+		// Don't call the data store isInside method, as the data store
+		// parameters change for every WMS tile that is drawn, so it does not
+		// return sensible results.
+		return rManager.getRasterUtils().isInside(p, getDataStore().getExtent());
+	}
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/layer/FLyrWMS.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/layer/ComposedLayerWMS.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/layer/ComposedLayerWMS.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/layer/ComposedLayerWMS.java	(revision 21019)
@@ -0,0 +1,106 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.raster.wms.app.wmsclient.layer;
+
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.util.List;
+
+import org.gvsig.compat.print.PrintAttributes;
+import org.gvsig.fmap.dal.exception.ReadException;
+import org.gvsig.fmap.mapcontext.ViewPort;
+import org.gvsig.fmap.mapcontext.layers.FLayer;
+import org.gvsig.fmap.mapcontext.layers.operations.ComposedLayer;
+import org.gvsig.raster.wms.io.RemoteWMSStyle;
+import org.gvsig.tools.task.Cancellable;
+
+
+/**
+ * Group WMS layers to make a single request to the
+ * server for all layers.
+ *
+ * It is posible only if almost all params are the same. For this
+ * comparasion, ComposedLayerWMS uses the method
+ * {@link org.gvsig.wms.fmap.layers.FLyrWMS#isComposedLayerCompatible(com.iver.cit.gvsig.fmap.layers.FLayer)}
+ *
+ *
+ * @see com.iver.cit.gvsig.fmap.layers.layerOperations.ComposedLayer
+ * @see org.gvsig.wms.fmap.layers.FLyrWMS
+ */
+public class ComposedLayerWMS extends ComposedLayer {
+	private FLyrWMS layer=null;
+
+	/* (non-Javadoc)
+	 * @see com.iver.cit.gvsig.fmap.layers.layerOperations.ComposedLayer#canAdd(com.iver.cit.gvsig.fmap.layers.FLayer)
+	 */
+	public boolean canAdd(FLayer layer) {
+		if (this.layer != null) {
+			return this.layer.isComposedLayerCompatible(layer);
+		}
+		return false;
+	}
+
+	public void doAdd(FLayer layer) throws Exception {
+		FLyrWMS aLayer = (FLyrWMS)layer;
+		if (this.layer == null) {
+			this.layer = new FLyrWMS();
+			//this.layer.setXMLEntity(aLayer.getXMLEntity());
+                        this.layer.setDataStore(aLayer.getDataStore());
+			return;
+		}
+		this.layer.getParameters().setLayerQuery( this.layer.getParameters().getLayerQuery() + ","+ aLayer.getParameters().getLayerQuery());
+		List<RemoteWMSStyle> aStyles = aLayer.getParameters().getStyles();
+
+		if (aStyles != null) {
+			List<RemoteWMSStyle> myStyles = this.layer.getParameters().getStyles();
+			if (myStyles == null) {
+				this.layer.getParameters().setStyles(aStyles);
+			} else {
+				myStyles.addAll(aStyles);
+				this.layer.getParameters().setStyles(myStyles);
+			}
+		}
+
+		//revisar el fullextend para ajustarlo a todas las capas
+		this.layer.getFullEnvelope().add(aLayer.getFullEnvelope());
+
+	}
+
+
+	@Override
+	protected void doDraw(BufferedImage image, Graphics2D g, ViewPort viewPort,
+			Cancellable cancel, double scale)
+			throws ReadException {
+		this.layer.draw(image, g, viewPort, cancel, scale);
+
+	}
+
+	@Override
+	protected void doPrint(Graphics2D g, ViewPort viewPort,
+			Cancellable cancel,
+			double scale,
+			PrintAttributes properties) throws ReadException {
+		this.layer.print(g, viewPort, cancel, scale, properties);
+
+	}
+
+}

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/layer/ComposedLayerWMS.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/layer/DynObjectIteratorWMSInfo.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/layer/DynObjectIteratorWMSInfo.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/layer/DynObjectIteratorWMSInfo.java	(revision 21019)
@@ -0,0 +1,92 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.raster.wms.app.wmsclient.layer;
+
+import java.util.ArrayList;
+
+import org.gvsig.fmap.dal.feature.Feature;
+import org.gvsig.tools.dispose.DisposableIterator;
+import org.gvsig.tools.dynobject.DynObject;
+import org.gvsig.tools.dynobject.DynObjectSet;
+
+/**
+ * {@link DynObject} implementation to facade a iterator of a WMTSInfo
+ * and allow to be used as a {@link DynObjectSet} iterator.
+ * 
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ * @version $Id$
+ * 
+ */
+public class DynObjectIteratorWMSInfo implements DisposableIterator {
+
+    private ArrayList<Object> infoList = new ArrayList<Object>();
+    private int               index    = -1;
+
+    /**
+     * Creates a new DynObjects iterator facade over a feature iterator.
+     * Each WMTSInfo will be returned through a new or reused
+     * {@link DynObjectWMTSInfo} which allows the {@link Feature} to be
+     * used like a DynObject.
+     * 
+     * @param featureIterator
+     *            to facade
+     * @param featureFacade
+     *            if not null this object will be reused as the facade for the
+     *            Feature objects of the feature iterator
+     */
+    public DynObjectIteratorWMSInfo(Object info) {
+        this.infoList.add(info);
+        index = 0;
+    }
+    
+    public void addObject(Object info) {
+    	this.infoList.add(info);
+    	if(index == -1)
+    		index = 0;
+    }
+
+    public synchronized void dispose() {
+    	this.infoList.clear();
+    	index = -1;
+    }
+
+    public synchronized boolean hasNext() {
+        return (infoList.size() == 0 || index >= infoList.size()) ? false : true;
+    }
+
+    public synchronized Object next() {
+        Object o = infoList.get(index);
+        index ++;
+        return o;
+    }
+
+    public synchronized void remove() {
+    	if(index < infoList.size() && index >= 0) {
+    		index --;
+    		infoList.remove(index);
+    	}
+    }
+    
+    public long getSize() {
+        return infoList.size();
+    }
+}

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/layer/DynObjectIteratorWMSInfo.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/layer/DynObjectSetWMSInfo.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/layer/DynObjectSetWMSInfo.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/layer/DynObjectSetWMSInfo.java	(revision 21019)
@@ -0,0 +1,137 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.raster.wms.app.wmsclient.layer;
+
+import org.gvsig.fmap.dal.feature.FeatureSet;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.dispose.DisposableIterator;
+import org.gvsig.tools.dynobject.DynClass;
+import org.gvsig.tools.dynobject.DynObject;
+import org.gvsig.tools.dynobject.DynObjectManager;
+import org.gvsig.tools.dynobject.DynObjectSet;
+import org.gvsig.tools.exception.BaseException;
+import org.gvsig.tools.observer.Observable;
+import org.gvsig.tools.observer.Observer;
+import org.gvsig.tools.observer.impl.BaseWeakReferencingObservable;
+import org.gvsig.tools.visitor.Visitor;
+
+/**
+ * {@link DynObject} implementation to facade of a {@link FeatureSet} and allow
+ * to be used as a {@link DynObjectSet}.
+ * 
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ * @version $Id$
+ */
+public class DynObjectSetWMSInfo extends BaseWeakReferencingObservable
+    implements DynObjectSet, Observer {
+	//public static final int             TYPE_TEXT = 0;
+	//public static final int             TYPE_HTML = 1;
+	//public static final int             TYPE_XML  = 2;
+	private DynObjectIteratorWMSInfo    ite       = null;
+	private DynObject                   dynObject = null;
+	private String                      type      = "text/plain";
+	
+	public static void registerDynClass() {
+		DynObjectManager manager = ToolsLocator.getDynObjectManager();
+    	DynClass dynClass = manager.add("WMSInfoByPoint", "WMS InfoByPoint");
+    	dynClass.setNamespace("InfoByPoint");
+    	dynClass.addDynFieldString("info");
+	}
+	
+    /**
+     * Creates a new facade over a given info, with fast dynobject
+     * iteration.
+     */
+    public DynObjectSetWMSInfo(String txt, String type) {
+    	DynObjectManager manager = ToolsLocator.getDynObjectManager();
+    	dynObject = manager.createDynObject("WMSInfoByPoint");
+    	dynObject.setDynValue("info", txt);
+    	ite = new DynObjectIteratorWMSInfo(dynObject);
+    	this.type = type;
+    	/*if(type == TYPE_HTML)
+    		this.type = "text/html";
+    	if(type == TYPE_XML)
+    		this.type = "text/xml";
+    	if(type == TYPE_TEXT)
+    		this.type = "text/plain";*/
+    }
+
+    public String getTypeInfo() {
+    	return this.type;
+    }
+    
+    public String getInfoElement() {
+    	return (String)dynObject.getDynValue("info");
+    }
+    
+    public void dispose() {
+
+    }
+
+    public void accept(final Visitor visitor, long firstValueIndex) throws BaseException {
+    	while(ite.hasNext()) {
+    		visitor.visit(ite.next());
+    	}
+    }
+
+    public void accept(final Visitor visitor) throws BaseException {
+    	while(ite.hasNext()) {
+    		visitor.visit(ite.next());
+    	}
+    }
+
+    public long getSize() throws BaseException {
+       return ite.getSize();
+    }
+
+    public DisposableIterator iterator(long index) throws BaseException {
+        return iterator();
+    }
+
+    public DisposableIterator iterator() throws BaseException {
+    	return ite;
+    }
+
+    public boolean isEmpty() throws BaseException {
+    	return (getSize() == 0);
+    }
+
+    public boolean isDeleteEnabled() {
+    	return true;
+    }
+
+    public void delete(DynObject dynObject) throws BaseException {
+
+    }
+
+    public boolean isUpdateEnabled() {
+    	return true;
+    }
+
+    public void update(DynObject dynObject) throws BaseException {
+    	System.out.println();
+    }
+
+    public void update(Observable observable, Object notification) {
+    	System.out.println();
+    }
+}

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/layer/DynObjectSetWMSInfo.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/exception/WMSDriverExceptionType.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/exception/WMSDriverExceptionType.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/exception/WMSDriverExceptionType.java	(revision 21019)
@@ -0,0 +1,55 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.raster.wms.app.wmsclient.exception;
+
+import org.gvsig.remoteclient.wms.WMSStatus;
+import org.gvsig.utils.ExceptionDescription;
+
+
+public class WMSDriverExceptionType extends ExceptionDescription {
+
+	WMSStatus status;
+	
+	public WMSDriverExceptionType(){
+		super(65, "Error al acceder a un servicio WMS");
+		
+	}
+	
+	public String getHtmlErrorMessage() {
+		String message = "<p><b>Error en una petici�n a servidor WMS</b></p>";
+		message += "Informaci�n adicional:<br>";
+		message += "Direcci�n: " + status.getOnlineResource();
+		message += "<br> Formato: "+status.getFormat();
+		return message;
+	}
+
+	public WMSStatus getWmsStatus() {
+		return status;
+	}
+
+	public void setWmsStatus(WMSStatus wmsStatus) {
+		this.status = wmsStatus;
+	}
+
+
+}
+

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/exception/WMSDriverExceptionType.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/infobypoint/BrowserControl.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/infobypoint/BrowserControl.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/infobypoint/BrowserControl.java	(revision 21019)
@@ -0,0 +1,236 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+/*
+ * Created on 18-oct-2004
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Generation - Code and Comments
+ */
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.raster.wms.app.wmsclient.infobypoint;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+ 
+/**
+* <p>A simple, static class to display a URL in the system browser.<br></p>
+*
+* <p>Under <b>Unix</b> systems, it will open one of the browser set through the
+* <b>setBrowserCommand(String)</b>. The argument of this method
+* must be a fully qualified command or one of the commands returned
+* by <b>getSupportedBrowsers()</b>.<br>By default, the browser is Firefox,
+* which is included in the list of supported browsers.<br></p>
+*
+* <p>Under <b>Windows</b>, this will bring up the default browser under windows,
+* usually either Netscape or Microsoft IE.  The default browser is
+* determined by the OS so no config is necessary.<br>This has been tested under Windows 95/98/NT/XP.</p>
+* <p>Notice that <b>you must include</b> the url type -- either "http://" or  "file://".</p>
+*
+* <p>Under <b>Mac</b>, the usability of this class is pending of test. So probably it does not work</p>
+* Examples:
+* BrowserControl.displayURL("http://www.javaworld.com")
+* BrowserControl.displayURL("file://c:\\docs\\index.html")
+* BrowserContorl.displayURL("file:///user/joe/index.html");
+*
+* @author jaume dominguez faus - jaume.dominguez@iver.es
+*/
+public class BrowserControl
+{
+	private static Logger logger = LoggerFactory.getLogger(BrowserControl.class.getName());
+	 // Used to identify the windows platform.
+    private static final String WIN_ID = "Windows";
+    // The default system browser under windows.
+    private static final String WIN_PATH = "rundll32";
+    // The flag to display a url.
+    private static final String WIN_FLAG = "url.dll,FileProtocolHandler";
+    
+	public static final String OPERA = "Opera";
+	public static final String NETSCAPE = "Netscape";
+	public static final String MOZILLA = "Mozilla";
+	public static final String GALEON = "Galeon";
+	public static final String EPIPHANY = "Epiphany";
+	public static final String FIREFOX = "Firefox";
+	public static final String CHROME = "google-chrome";
+	public static final String KONQUEROR = "Konqueror";
+	private String browserCommand = null;
+	private List<String> supportedBrowsers;
+	//public Preferences fPrefs = Preferences.userRoot().node( "gvsig.wcs-wizard" );
+	
+	public BrowserControl() {
+		browserCommand = FIREFOX;//fPrefs.get("DefaultBrowser", FIREFOX);
+	}
+	
+	private boolean throwBrowser(String browser, String url) {
+		String url1 = url.replace("'", "\'");
+		String url2 = "'" + url.replace("'", "\'") + "'";
+		int exitCode = -1;
+		String cmd = null;
+		Process p = null;
+		
+		try {
+			cmd = browser.toLowerCase() + " " + url1;
+			logger.info("Trying..." + cmd);
+			p = exec(cmd);
+			exitCode = p.waitFor();
+		} catch (IOException e) {
+			exitCode = -1;
+		} catch (InterruptedException e) {
+			logger.info("Error bringing up browser, cmd='" + cmd + "'");
+		}
+		
+		try {
+			if (exitCode != 0) {
+				cmd = browser.toLowerCase() + " "  + url2;
+				logger.info("Trying..." + cmd);
+				p = exec(cmd);
+				exitCode = p.waitFor();
+			}
+		} catch (IOException e) {
+			exitCode = -1;
+		} catch(InterruptedException x) {
+			logger.info("Error bringing up browser, cmd='" + cmd + "'");
+		} 
+		
+		if(exitCode != 0)
+			return false;
+		return true;
+	}
+
+    /**
+     * Display a file in the system browser.  If you want to display a
+     * file, you must include the absolute path name.
+     *
+     * @param url the file's url (the url must start with either "http://" or  "file://").
+     */
+    public void displayURL(String url) {
+        boolean windows = isWindowsPlatform();
+        String cmd = null;
+        try {
+        	if (windows) {
+        		// cmd = 'rundll32 url.dll,FileProtocolHandler http://...'
+        		cmd = WIN_PATH + " " + WIN_FLAG + " " + url;
+        		Runtime.getRuntime().exec(cmd);
+        	} else {
+        		if(throwBrowser(browserCommand, url)) {
+        			return;
+        		} else {
+        			int i = 0;
+        			boolean throwed = false;
+        			while(i < getSupportedBrowsers().size() && ! throwed) {
+        				throwed = throwBrowser(getSupportedBrowsers().get(i), url);
+        				i++;
+        			}
+        		}
+        	}
+        } catch(IOException x) {
+            // couldn't exec browser
+        	logger.warn("Could not invoke browser, command=" + cmd);
+        	logger.info("Caught: " + x);
+        }
+
+    }
+    
+    private Process exec(String cmd) throws IOException {
+    	logger.info(cmd);
+		return Runtime.getRuntime().exec(cmd);
+    }
+
+    /**
+     * Try to determine whether this application is running under Windows
+     * or some other platform by examing the "os.name" property.
+     *
+     * @return true if this application is running under a Windows OS
+     */
+    public static boolean isWindowsPlatform()
+    {
+        String os = System.getProperty("os.name");
+        if ( os != null && os.startsWith(WIN_ID))
+            return true;
+        else
+            return false;
+    }
+
+
+    
+    /**
+     * Returns a list of supported browsers.
+     * @return
+     */
+    public List<String> getSupportedBrowsers() {
+    	if (supportedBrowsers == null) {
+    		supportedBrowsers = new ArrayList<String>();
+    		supportedBrowsers.add(CHROME);
+    		supportedBrowsers.add(FIREFOX);
+    		supportedBrowsers.add(KONQUEROR);
+    		supportedBrowsers.add(EPIPHANY);
+    		supportedBrowsers.add(MOZILLA);
+    		supportedBrowsers.add(NETSCAPE);
+    		supportedBrowsers.add(OPERA);
+    	}
+    	return supportedBrowsers;
+    }
+}

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/infobypoint/BrowserControl.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/infobypoint/InfoByWMSPointExtension.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/infobypoint/InfoByWMSPointExtension.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/infobypoint/InfoByWMSPointExtension.java	(revision 21019)
@@ -0,0 +1,142 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+package org.gvsig.raster.wms.app.wmsclient.infobypoint;
+
+import java.awt.Component;
+import java.util.Observable;
+import java.util.Observer;
+
+import javax.swing.JOptionPane;
+
+import org.gvsig.andami.PluginServices;
+import org.gvsig.andami.PluginsLocator;
+import org.gvsig.andami.actioninfo.ActionInfoManager;
+import org.gvsig.andami.plugins.Extension;
+import org.gvsig.andami.ui.mdiManager.IWindow;
+import org.gvsig.app.project.documents.view.ViewDocument;
+import org.gvsig.app.project.documents.view.gui.AbstractViewPanel;
+import org.gvsig.app.project.documents.view.toolListeners.StatusBarListener;
+import org.gvsig.fmap.mapcontext.MapContext;
+import org.gvsig.fmap.mapcontext.layers.FLayers;
+import org.gvsig.fmap.mapcontrol.MapControl;
+import org.gvsig.fmap.mapcontrol.tools.CompoundBehavior;
+import org.gvsig.fmap.mapcontrol.tools.Behavior.Behavior;
+import org.gvsig.fmap.mapcontrol.tools.Behavior.MouseMovementBehavior;
+import org.gvsig.fmap.mapcontrol.tools.Behavior.PointBehavior;
+import org.gvsig.raster.fmap.layers.FLyrRaster;
+import org.gvsig.raster.swing.RasterSwingLibrary;
+import org.gvsig.raster.swing.infobypoint.InfoByPointDataModel;
+import org.gvsig.raster.wms.app.wmsclient.infobypoint.viewtool.InfoByPixelPointViewTool;
+import org.gvsig.raster.wms.app.wmsclient.infobypoint.viewtool.PixelInspectorViewTool;
+import org.gvsig.raster.wms.app.wmsclient.layer.FLyrWMS;
+
+/**
+ * Plugin for the information by point of a raster layer
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class InfoByWMSPointExtension extends Extension  {
+	private InfoByPixelPointViewTool     lastTool      = null;
+	public static Behavior               oldBehavior   = null;
+
+	public void execute(String actionCommand) {
+		if(actionCommand.compareTo("INFO_BY_PIXEL") == 0) {
+			MapControl mapCtrl = getMapControl();
+			StatusBarListener sbl = new StatusBarListener(mapCtrl);
+			
+			IWindow[] wList = PluginServices.getMDIManager().getAllWindows();
+			for (int i = 0; i < wList.length; i++) {
+				if(wList[i] instanceof MainInfoByPointDialog) {
+					JOptionPane.showMessageDialog(
+							(Component)wList[i], 
+							PluginServices.getText(this, "open_window"), 
+							PluginServices.getText(this, "Information"), 
+							JOptionPane.INFORMATION_MESSAGE);
+					mapCtrl.addBehavior("infoByRasterPoint", 
+							new Behavior[]{new PointBehavior(lastTool),
+							new MouseMovementBehavior(sbl)});
+					mapCtrl.setTool("infoByRasterPoint");
+					return;
+				}
+			}
+			MainInfoByPointDialog dialog = new MainInfoByPointDialog();
+			InfoByPointDataModel model = dialog.getInfoByPointDataModel();
+			((Observable)model).addObserver((Observer)dialog.getMainPanel());
+			
+			lastTool = new InfoByPixelPointViewTool(mapCtrl, model, dialog);
+			mapCtrl.addBehavior("infoByRasterPoint", 
+					new Behavior[]{new PointBehavior(lastTool),
+					new MouseMovementBehavior(sbl)});
+			mapCtrl.setTool("infoByRasterPoint");
+			oldBehavior = CompoundBehavior.getAllControlsBehavior();
+			CompoundBehavior.setAllControlsBehavior(new PixelInspectorViewTool(mapCtrl, model, dialog.getPixelInspector()));
+			
+			model.notifyObservers();
+			PluginServices.getMDIManager().addWindow(dialog);
+		}
+	}
+	
+	private MapControl getMapControl() {
+		IWindow theView = PluginServices.getMDIManager().getActiveWindow();
+		if(!(theView instanceof AbstractViewPanel)) {
+			JOptionPane.showMessageDialog((Component)PluginServices.getMainFrame(), PluginServices.getText(this.getClass(), "window_not_valid"));
+			return null;
+		}
+		return ((AbstractViewPanel)theView).getMapControl();
+	}
+	
+	@SuppressWarnings("deprecation")
+	public boolean isEnabled() {
+		org.gvsig.andami.ui.mdiManager.IWindow f = PluginServices.getMDIManager().getActiveWindow();
+		if (f == null)
+			return false;
+		if (f instanceof AbstractViewPanel) {
+			AbstractViewPanel vista = (AbstractViewPanel) f;
+			ViewDocument model = vista.getModel();
+			MapContext mapa = model.getMapContext();
+			FLayers layers = mapa.getLayers();
+                        for (Object layer : layers.getActives()) {
+                             if (layer instanceof FLyrWMS) {
+                                    return true;
+                            }
+                        }
+                }
+		return false;
+        }
+	
+	public boolean isVisible() {
+		return isEnabled();
+	}
+
+	public void initialize() {
+	}
+	
+	@Override
+	public void postInitialize() {
+		super.postInitialize();
+		try {
+			ActionInfoManager manager = PluginsLocator.getActionInfoManager();
+			manager.redirect("layer-info-by-raster-point", "layer-info-by-wms-point");
+		} catch (IllegalArgumentException e) {
+			RasterSwingLibrary.messageBoxError("infobypoint_not_available", null);
+		}
+	}
+}

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/infobypoint/InfoByWMSPointExtension.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/infobypoint/MainInfoByPointDialog.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/infobypoint/MainInfoByPointDialog.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/infobypoint/MainInfoByPointDialog.java	(revision 21019)
@@ -0,0 +1,319 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+* MA  02110-1301, USA.
+*
+*/
+package org.gvsig.raster.wms.app.wmsclient.infobypoint;
+
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.Dimension;
+import java.util.HashMap;
+
+import javax.swing.ImageIcon;
+import javax.swing.JEditorPane;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.event.HyperlinkEvent;
+import javax.swing.event.HyperlinkListener;
+import javax.swing.text.Document;
+import javax.swing.text.html.HTMLEditorKit;
+import javax.swing.text.html.StyleSheet;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeModel;
+import javax.swing.tree.TreePath;
+
+import org.gvsig.andami.IconThemeHelper;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.andami.ui.mdiManager.IWindow;
+import org.gvsig.andami.ui.mdiManager.WindowInfo;
+import org.gvsig.app.project.documents.view.info.gui.XMLItem;
+import org.gvsig.fmap.mapcontext.layers.FLayer;
+import org.gvsig.fmap.mapcontrol.tools.CompoundBehavior;
+import org.gvsig.raster.swing.RasterSwingLocator;
+import org.gvsig.raster.swing.infobypoint.InfoByPointDataModel;
+import org.gvsig.raster.swing.infobypoint.MainInfoByPointPanel;
+import org.gvsig.raster.swing.pixelinspector.PixelInspector;
+import org.gvsig.utils.xmlViewer.TextXMLContent;
+import org.gvsig.utils.xmlViewer.XMLContent;
+import org.gvsig.utils.xmlViewer.XMLViewer;
+import org.slf4j.LoggerFactory;
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
+
+/**
+ * Dialog for the information by point of a raster layer
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class MainInfoByPointDialog extends JPanel implements IWindow, HyperlinkListener {
+	private static final long               serialVersionUID   = 1L;
+	private MainInfoByPointPanel            mainPanel          = null;
+	private JScrollPane                     scroll             = null;
+	private JPanel                          wmsInfo            = null;
+	private JEditorPane                     jeditor            = null;
+	private XMLViewer                       dlgXML             = null;
+	private XMLItem                         item               = null;
+	private XMLContent                      xmlContent         = null;
+
+	public class StringXMLItem extends TextXMLContent implements XMLItem {
+		FLayer layer;
+
+		public StringXMLItem(String text, FLayer lyr) {
+			super(text);
+			this.layer = lyr;
+		}
+
+		public FLayer getLayer(){
+			return this.layer;
+		}
+
+		public void parse(ContentHandler handler) throws SAXException {
+			setContentHandler(new FilterContentHandler(handler));
+			parse();
+		}
+
+		private class FilterContentHandler implements ContentHandler {
+
+			private ContentHandler handler;
+
+			public FilterContentHandler(ContentHandler handler) {
+				this.handler = handler;
+			}
+
+			public void setDocumentLocator(Locator arg0) {
+			}
+
+			public void startDocument() throws SAXException {
+			}
+
+			public void endDocument() throws SAXException {
+			}
+
+			public void startPrefixMapping(String arg0, String arg1)
+					throws SAXException {
+			}
+
+			public void endPrefixMapping(String arg0) throws SAXException {
+			}
+
+			public void startElement(String arg0, String arg1, String arg2,
+					Attributes arg3) throws SAXException {
+				handler.startElement(arg0, arg1, arg2, arg3);
+			}
+
+			public void endElement(String arg0, String arg1, String arg2)
+					throws SAXException {
+				handler.endElement(arg0, arg1, arg2);
+			}
+
+			public void characters(char[] arg0, int arg1, int arg2)
+					throws SAXException {
+				handler.characters(arg0, arg1, arg2);
+			}
+
+			public void ignorableWhitespace(char[] arg0, int arg1, int arg2)
+					throws SAXException {
+			}
+
+			public void processingInstruction(String arg0, String arg1)
+					throws SAXException {
+			}
+
+			public void skippedEntity(String arg0) throws SAXException {
+			}
+		}
+	}
+
+	public MainInfoByPointDialog() {
+		setLayout(new BorderLayout());
+		add((Component)getMainPanel(), BorderLayout.WEST);
+		add((Component)getWMSInfoPanel(), BorderLayout.CENTER);
+	}
+
+	public MainInfoByPointPanel getMainPanel() {
+		if(mainPanel == null) {
+			HashMap<String, String> translations = new HashMap<String, String>();
+			translations.put("info", PluginServices.getText(this, "info"));
+			translations.put("view", PluginServices.getText(this, "view"));
+			translations.put("layer_list", PluginServices.getText(this, "layer_list"));
+			translations.put("band_values", PluginServices.getText(this, "band_values"));
+			translations.put("pixel_point", PluginServices.getText(this, "pixel_point"));
+			translations.put("view_point", PluginServices.getText(this, "view_point"));
+			translations.put("world_point", PluginServices.getText(this, "world_point"));
+			translations.put("bands", PluginServices.getText(this, "bands"));
+			translations.put("colors", PluginServices.getText(this, "colors"));
+			translations.put("coords", PluginServices.getText(this, "coords"));
+			translations.put("lat", PluginServices.getText(this, "lat"));
+			translations.put("long", PluginServices.getText(this, "long"));
+			translations.put("red", PluginServices.getText(this, "red"));
+			translations.put("green", PluginServices.getText(this, "green"));
+			translations.put("blue", PluginServices.getText(this, "blue"));
+			HashMap<String, ImageIcon> icons = new HashMap<String, ImageIcon>();
+			icons.put("forward-icon", IconThemeHelper.getImageIcon("forward-icon"));
+			icons.put("backward-icon", IconThemeHelper.getImageIcon("backward-icon"));
+			mainPanel = RasterSwingLocator.getSwingManager().createInfoByPointPanel(
+					translations, icons, null);
+			((JPanel)mainPanel).setPreferredSize(new Dimension(230, 0));
+		}
+		return mainPanel;
+	}
+
+	private JPanel getWMSInfoPanel() {
+		if(wmsInfo == null) {
+			wmsInfo = new JPanel();
+			wmsInfo.setLayout(new BorderLayout());
+			jeditor = new JEditorPane();
+			scroll = new JScrollPane(jeditor);
+			jeditor.addHyperlinkListener(this);
+			jeditor.setEditable(false);
+			wmsInfo.add(scroll, BorderLayout.CENTER);
+		}
+		return wmsInfo;
+	}
+
+	private JPanel getWMSXMLInfoPanel(String text) throws SAXException {
+		if(wmsInfo == null) {
+			wmsInfo = new JPanel();
+			wmsInfo.setLayout(new BorderLayout());
+			dlgXML = new XMLViewer();
+			scroll = new JScrollPane(dlgXML);
+			item = new StringXMLItem(text, null);
+			xmlContent = new XMLContent() {
+				private ContentHandler handler;
+
+				public void setContentHandler(ContentHandler arg0) {
+					handler = arg0;
+				}
+
+				public void parse() throws SAXException {
+					handler.startDocument();
+					item.parse( handler);
+					handler.endDocument();
+				}
+			};
+			dlgXML.setNamesColumn(new String[0]);
+			dlgXML.setModel(xmlContent);
+			dlgXML.getXmlTree().setRootVisible(false);
+			DefaultTreeModel treeModel = (DefaultTreeModel)dlgXML.getXmlTree().getModel();
+			DefaultMutableTreeNode root = (DefaultMutableTreeNode) dlgXML.getXmlTree().getModel().getRoot();
+			DefaultMutableTreeNode n = root.getFirstLeaf();
+			TreePath path = new TreePath(treeModel.getPathToRoot(n));
+			dlgXML.getXmlTree().expandPath(path);
+			//dlgXML.getXmlTree().setSelectionPath(path);
+
+			wmsInfo.add(scroll, BorderLayout.CENTER);
+		}
+		return wmsInfo;
+	}
+
+	public void setWMSInfoText(String text, String type) {
+		if(type.equals("text/html")) {
+			if(jeditor == null) {
+				wmsInfo = null;
+				dlgXML = null;
+				remove(1);
+				add((Component)getWMSInfoPanel(), BorderLayout.CENTER);
+			}
+			HTMLEditorKit kit = new HTMLEditorKit();
+			jeditor.setEditorKit(kit);
+
+			text = removeLabelBlock(text, "style");
+			text = removeLabelBlock(text, "meta");
+
+			StyleSheet s = kit.getStyleSheet();
+			s.addRule("body {font-family:verdana; margin: 15px; }");
+			s.addRule("caption {background-color:#FBFFE1;font-style:normal;color:black}");
+			s.addRule("th {background-color:#D6D6D6;color:white;}");
+			s.addRule("td {background-color:#FEEDD6;color:black;}");
+			Document doc = kit.createDefaultDocument();
+			jeditor.setDocument(doc);
+			jeditor.setContentType(type);
+			jeditor.setText(text);
+		} else if(type.equals("text/xml")) {
+			try {
+				if(dlgXML == null) {
+					wmsInfo = null;
+					jeditor = null;
+					remove(1);
+					add((Component)getWMSXMLInfoPanel(text), BorderLayout.CENTER);
+				} else {
+					item = new StringXMLItem(text, null);
+					dlgXML.setModel(xmlContent);
+				}
+			} catch (SAXException e) {
+				LoggerFactory.getLogger(MainInfoByPointDialog.class).debug("", e);
+			}
+		} else { //if(type.equals("text/plain")) {
+            if(jeditor == null) {
+                wmsInfo = null;
+                dlgXML = null;
+                remove(1);
+                add((Component)getWMSInfoPanel(), BorderLayout.CENTER);
+            }
+            jeditor.setText(text);
+		}
+	}
+
+	/**
+	 * Removes a label from the text
+	 * @param text
+	 * @param label
+	 * @return
+	 */
+	private String removeLabelBlock(String text, String label) {
+		if(text.contains("<" + label) && text.contains("/" + label + ">")) {
+			int initIndex = text.indexOf("<" + label);
+			int endIndex = text.indexOf("/" + label + ">");
+			return text.substring(0, initIndex) + text.substring(endIndex + 7, text.length());
+		}
+		return text;
+	}
+
+	public WindowInfo getWindowInfo() {
+		WindowInfo m_viewinfo = new WindowInfo(WindowInfo.MODELESSDIALOG | WindowInfo.RESIZABLE);
+		m_viewinfo.setTitle(PluginServices.getText(this, "WMS InfoByPoint"));
+		m_viewinfo.setHeight(380);
+		m_viewinfo.setWidth(700);
+		return m_viewinfo;
+	}
+
+	public void windowClosed() {
+		CompoundBehavior.setAllControlsBehavior(InfoByWMSPointExtension.oldBehavior);
+	}
+
+	public Object getWindowProfile() {
+		return WindowInfo.PROPERTIES_PROFILE;
+	}
+
+	public InfoByPointDataModel getInfoByPointDataModel() {
+		return getMainPanel().getInfoByPointDataModel();
+	}
+
+	public PixelInspector getPixelInspector() {
+		return getMainPanel().getPixelInspectorPanel();
+	}
+
+	public void hyperlinkUpdate(HyperlinkEvent e) {
+		if(e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
+			new BrowserControl().displayURL(e.getURL().toString());
+		}
+	}
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/infobypoint/MainInfoByPointDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/infobypoint/viewtool/InfoByPixelPointViewTool.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/infobypoint/viewtool/InfoByPixelPointViewTool.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/infobypoint/viewtool/InfoByPixelPointViewTool.java	(revision 21019)
@@ -0,0 +1,232 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+* MA  02110-1301, USA.
+*
+*/
+package org.gvsig.raster.wms.app.wmsclient.infobypoint.viewtool;
+
+import java.awt.Image;
+import java.awt.Point;
+import java.awt.geom.Point2D;
+import java.awt.image.BufferedImage;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.gvsig.andami.IconThemeHelper;
+import org.gvsig.fmap.dal.coverage.RasterLocator;
+import org.gvsig.fmap.dal.coverage.RasterManager;
+import org.gvsig.fmap.dal.coverage.dataset.Buffer;
+import org.gvsig.fmap.dal.coverage.store.RasterDataStore;
+import org.gvsig.fmap.dal.coverage.util.ColorConversion;
+import org.gvsig.fmap.dal.exception.DataException;
+import org.gvsig.fmap.mapcontext.ViewPort;
+import org.gvsig.fmap.mapcontext.exceptions.LoadLayerException;
+import org.gvsig.fmap.mapcontext.layers.FLayer;
+import org.gvsig.fmap.mapcontext.layers.FLayers;
+import org.gvsig.fmap.mapcontrol.MapControl;
+import org.gvsig.fmap.mapcontrol.tools.BehaviorException;
+import org.gvsig.fmap.mapcontrol.tools.Events.PointEvent;
+import org.gvsig.fmap.mapcontrol.tools.Listeners.PointListener;
+import org.gvsig.raster.swing.infobypoint.InfoByPointDataModel;
+import org.gvsig.raster.wms.app.wmsclient.infobypoint.MainInfoByPointDialog;
+import org.gvsig.raster.wms.app.wmsclient.layer.DynObjectSetWMSInfo;
+import org.gvsig.raster.wms.app.wmsclient.layer.FLyrWMS;
+import org.gvsig.tools.exception.BaseException;
+import org.gvsig.tools.visitor.VisitCanceledException;
+import org.gvsig.tools.visitor.Visitor;
+
+/**
+ * Extensi?n de la clase SelectImageListenerImple de FMap. Esta clase permite
+ * capturar el evento de la selecci?n de un punto RGB sobre la vista
+ *
+ * 22/02/2008
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class InfoByPixelPointViewTool implements PointListener {
+	private RasterManager            rManager            = RasterLocator.getManager();
+	private InfoByPointDataModel     model               = null;
+	private ColorConversion          conv                = null;
+	private ViewPort                 viewPort            = null;
+	private FLayers                  layers              = null;
+	private List<String>             list                = null;
+	private MainInfoByPointDialog    dialog              = null;
+
+	/**
+	 * Reference to the <code>MapControl</code> object that uses.
+	 */
+	protected MapControl mapCtrl;
+
+	/**
+	 * World equivalent coordinates of the point 2D
+	 */
+	protected Point2D wcPoint = null;
+
+	/**
+	 * Contructor
+	 * @param mapCtrl
+	 */
+	public InfoByPixelPointViewTool(
+			MapControl mapCtrl,
+			InfoByPointDataModel model,
+			MainInfoByPointDialog dialog) {
+		this.mapCtrl = mapCtrl;
+		this.model = model;
+		this.dialog = dialog;
+		conv = rManager.getColorConversion();
+		viewPort = mapCtrl.getViewPort();
+		layers = mapCtrl.getMapContext().getLayers();
+		list = new ArrayList<String>();
+	}
+
+	@SuppressWarnings("deprecation")
+	public void point(PointEvent event) {
+		Point2D point2D = event.getPoint();
+
+		BufferedImage image = mapCtrl.getImage();
+		int value = image.getRGB((int) point2D.getX(), (int) point2D.getY());
+		int r = (value >> 16) & 0xff;
+		int g = (value >> 8) & 0xff;
+		int b = value & 0xff;
+
+		double[] cmyk = conv.RGBtoCMYK(r & 0xff, g & 0xff, b & 0xff, 1D);
+
+		double[] hsl = conv.RGBtoHSL(r & 0xff, g & 0xff, b & 0xff);
+		hsl[0] = (int)(255.0 * hsl[0] / 360.0 + 0.5);
+		hsl[2] = (int) (hsl[2] * 255. + 0.5);
+		hsl[1] = (int) (hsl[1] * 255. + 0.5);
+
+		Point2D mapPoint = viewPort.toMapPoint(point2D);
+
+		model.setARGB(r, g, b);
+		model.setCMYK(cmyk);
+		model.setHSL(hsl[0], hsl[1], hsl[2]);
+		model.setViewPoint(point2D.getX(), point2D.getY());
+		model.setWorldPoint(mapPoint.getX(), mapPoint.getY());
+
+		//Raster dependent
+
+		list.clear();
+		FLyrWMS selected = null;
+              
+                for (FLayer lyr : layers.getVisibles()) {
+			if(lyr instanceof FLyrWMS) {
+				FLyrWMS raster = (FLyrWMS)lyr;
+				if(raster.isInside(mapPoint)) {
+					list.add(raster.getName());
+					if(raster.isActive())
+						selected = raster;
+				}
+			}
+		}
+
+		if(selected != null) {
+			Point2D rasterPoint = selected.getDataStore().worldToRaster(mapPoint);
+			model.setNumberOfBands(selected.getDataStore().getBandCount());
+			model.setBandValues(getBandValues(selected.getDataStore(), rasterPoint));
+			model.setPixelPoint(rasterPoint.getX(), rasterPoint.getY());
+
+			Point p = new Point();
+			p.setLocation(point2D.getX(), point2D.getY());
+			try {
+			    DynObjectSetWMSInfo dos = (DynObjectSetWMSInfo)selected.getInfo(p, 0D, null, true);
+			    String txt = dos.getInfoElement();
+			    if(dos.getTypeInfo().compareTo("text/plain") == 0)
+			        dialog.setWMSInfoText(txt, dos.getTypeInfo());
+			    else if(dos.getTypeInfo().compareTo("text/html") == 0) {
+			        int beginIndex = txt.indexOf("<html");
+			        if(beginIndex > 0)
+			            txt = txt.substring(beginIndex, txt.length());
+			        dialog.setWMSInfoText(txt, "text/html");
+			    } else if(dos.getTypeInfo().endsWith("vnd.ogc.gml") || dos.getTypeInfo().compareTo("text/xml") == 0) {
+			        dialog.setWMSInfoText(txt, "text/xml");
+			    }else
+			        dialog.setWMSInfoText(txt, "text/html");
+
+			} catch (LoadLayerException e) {
+			    e.printStackTrace();
+			} catch (DataException e) {
+			    e.printStackTrace();
+			}
+		} else {
+			list.clear();
+			list.add("...");
+			model.setNumberOfBands(0);
+			model.setBandValues(new double[]{Double.NaN});
+			model.setPixelPoint(-1, -1);
+		}
+		model.setLayerList(list);
+
+		model.notifyObservers();
+	}
+
+	/**
+	 * Loads the values of a pixel point
+	 * @param dataStore
+	 * @param pxPoint
+	 * @return
+	 */
+	private double[] getBandValues(RasterDataStore dataStore, Point2D pxPoint) {
+		double[] res = new double[dataStore.getBandCount()];
+		int pos = 0;
+		try {
+			if(dataStore.getDataType()[0] >= 0 && dataStore.getDataType()[0] <= 3) {
+				for(int i = 0; i < dataStore.getBandCount(); i++) {
+					int val = ((Integer)dataStore.getData((int)pxPoint.getX(), (int)pxPoint.getY(), i)).intValue();
+					if(dataStore.getDataType()[0] == Buffer.TYPE_BYTE)
+						res[pos] = (val & 0x000000ff);
+					else
+						res[pos] = val;
+					pos ++;
+				}
+			}
+
+			if(dataStore.getDataType()[0] == 4) {
+				for(int i = 0; i < dataStore.getBandCount(); i++) {
+					res[pos] = ((Float)dataStore.getData((int)pxPoint.getX(), (int)pxPoint.getY(), i)).doubleValue() ;
+					pos ++;
+				}
+			}
+			if(dataStore.getDataType()[0] == 5) {
+				for(int i = 0; i < dataStore.getBandCount(); i++) {
+					res[pos] = ((Double)dataStore.getData((int)pxPoint.getX(), (int)pxPoint.getY(), i)).doubleValue();
+					pos ++;
+				}
+			}
+			return res;
+		} catch (Exception e) {
+			for (int i = 0; i < dataStore.getBandCount(); i++) {
+				res[i] = Double.NaN;
+			}
+		}
+		return res;
+	}
+
+	public void pointDoubleClick(PointEvent event) throws BehaviorException {
+	}
+
+	public boolean cancelDrawing() {
+		return true;
+	}
+
+	public Image getImageCursor() {
+		return IconThemeHelper.getImage("zoom-pixel-cursor");
+	}
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/infobypoint/viewtool/InfoByPixelPointViewTool.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/infobypoint/viewtool/PixelInspectorViewTool.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/infobypoint/viewtool/PixelInspectorViewTool.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/infobypoint/viewtool/PixelInspectorViewTool.java	(revision 21019)
@@ -0,0 +1,146 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+package org.gvsig.raster.wms.app.wmsclient.infobypoint.viewtool;
+
+import java.awt.event.MouseEvent;
+import java.awt.geom.Point2D;
+import java.awt.image.BufferedImage;
+
+import org.gvsig.fmap.dal.coverage.RasterLocator;
+import org.gvsig.fmap.dal.coverage.RasterManager;
+import org.gvsig.fmap.dal.coverage.util.ColorConversion;
+import org.gvsig.fmap.mapcontext.ViewPort;
+import org.gvsig.fmap.mapcontext.layers.FLayer;
+import org.gvsig.fmap.mapcontrol.MapControl;
+import org.gvsig.fmap.mapcontrol.tools.BehaviorException;
+import org.gvsig.fmap.mapcontrol.tools.Behavior.Behavior;
+import org.gvsig.fmap.mapcontrol.tools.Listeners.ToolListener;
+import org.gvsig.raster.fmap.layers.FLyrRaster;
+import org.gvsig.raster.swing.infobypoint.InfoByPointDataModel;
+import org.gvsig.raster.swing.pixelinspector.PixelInspector;
+
+
+/**
+ * Behavior to be added to the MapControl. With this behavior will be
+ * possible to manage the mouse event on the view 
+ * 
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class PixelInspectorViewTool extends Behavior {
+	private RasterManager            rManager            = RasterLocator.getManager();
+	private InfoByPointDataModel     model               = null;
+	private ColorConversion          conv                = null;
+	private ViewPort                 viewPort            = null;
+	private MapControl               mapCtrl             = null;
+	private PixelInspector           observer            = null;
+	
+	/**
+	 * Constructor. Asigna el dialogo
+	 * @param dialog
+	 */
+	public PixelInspectorViewTool(MapControl mapCtrl, InfoByPointDataModel model, PixelInspector observer) {
+		this.mapCtrl = mapCtrl;
+		this.model = model;
+		this.observer = observer;
+		conv = rManager.getColorConversion();
+		viewPort = mapCtrl.getViewPort();
+	}
+	
+	public FLyrRaster getLayer(Point2D p) {
+		FLyrRaster raster = null;
+		for (int i = mapCtrl.getMapContext().getLayers().getLayersCount() - 1; i >= 0; i--) {
+			FLayer lyr = mapCtrl.getMapContext().getLayers().getLayer(i);
+			if(lyr instanceof FLyrRaster) {
+				raster = (FLyrRaster)lyr;
+				if(raster.isInside(p))
+					return raster;
+			}
+		}
+		return null;
+	}
+	
+	/*
+	 *  (non-Javadoc)
+	 * @see com.iver.cit.gvsig.fmap.tools.Behavior.IBehavior#getListener()
+	 */
+	public ToolListener getListener() {
+		return null;
+	}
+	
+	/*
+	 *  (non-Javadoc)
+	 * @see com.iver.cit.gvsig.fmap.tools.Behavior.IBehavior#mouseMoved(java.awt.event.MouseEvent)
+	 */
+	@SuppressWarnings("deprecation")
+	public void mouseMoved(MouseEvent e) throws BehaviorException {
+		Point2D point2D = new Point2D.Double(e.getX(), e.getY());
+		BufferedImage image = mapCtrl.getImage();
+		
+		//Actualiza los datos del panel
+		if(e.getX() >= image.getWidth() || e.getY() >= image.getHeight())
+			return;
+		int value = image.getRGB((int) point2D.getX(), (int) point2D.getY());
+		int r = (value >> 16) & 0xff;
+		int g = (value >> 8) & 0xff;
+		int b = value & 0xff;
+		
+		double[] cmyk = conv.RGBtoCMYK(r & 0xff, g & 0xff, b & 0xff, 1D);
+		
+		double[] hsl = conv.RGBtoHSL(r & 0xff, g & 0xff, b & 0xff);
+		hsl[0] = (int)(255.0 * hsl[0] / 360.0 + 0.5);
+		hsl[2] = (int) (hsl[2] * 255. + 0.5);
+		hsl[1] = (int) (hsl[1] * 255. + 0.5);
+		
+		Point2D mapPoint = viewPort.toMapPoint(point2D);
+		
+		model.setARGB(r, g, b);
+		model.setCMYK(cmyk);
+		model.setHSL(hsl[0], hsl[1], hsl[2]);
+		model.setViewPoint(point2D.getX(), point2D.getY());
+		model.setWorldPoint(mapPoint.getX(), mapPoint.getY());
+		
+		//Raster dependent
+		FLyrRaster raster = getLayer(mapPoint);
+		if(raster != null && raster.getDataStore() != null) {
+			Point2D rasterPoint = raster.getDataStore().worldToRaster(mapPoint);
+			model.setNumberOfBands(raster.getDataStore().getBandCount());
+			model.setPixelPoint(rasterPoint.getX(), rasterPoint.getY());
+		} /*else {
+			model.setNumberOfBands(0);
+			model.setBandValues(new double[]{Double.NaN});
+			model.setPixelPoint(-1, -1);
+		}*/
+		
+		model.notifyObservers();
+		
+		//Actualiza el inspector
+		observer.setClear(false);
+		observer.setDataBuffer(image);
+		int pX = ((observer.getWidth() / observer.getScale()) >> 1) - e.getX();
+		int pY = ((observer.getHeight() / observer.getScale()) >> 1) - e.getY();
+		observer.setViewCoordinates((int)e.getPoint().getX(), (int)e.getPoint().getY());
+		observer.setPosX(pX);
+		observer.setPosY(pY);
+		observer.repaint();
+	}
+
+}

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/infobypoint/viewtool/PixelInspectorViewTool.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/WMSClientExtension.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/WMSClientExtension.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/WMSClientExtension.java	(revision 21019)
@@ -0,0 +1,83 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+ 
+package org.gvsig.raster.wms.app.wmsclient;
+
+import org.gvsig.andami.IconThemeHelper;
+import org.gvsig.andami.plugins.Extension;
+import org.gvsig.app.extension.AddLayer;
+import org.gvsig.raster.wms.app.wmsclient.gui.toc.WMSPropsTocMenuEntry;
+import org.gvsig.raster.wms.app.wmsclient.gui.wizard.WMSWizard;
+import org.gvsig.raster.wms.app.wmsclient.layer.DynObjectSetWMSInfo;
+import org.gvsig.raster.wms.app.wmsclient.layer.FLyrWMS;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.extensionpoint.ExtensionPoint;
+
+
+/**
+ * Extension for adding WMS support to gvSIG.
+ *
+ * @author jaume dominguez faus - jaume.dominguez@iver.es
+ */
+public class WMSClientExtension extends Extension {
+
+    public void initialize() {
+    	
+    	// Adds an entry to the TOC's floating menu to those layers defined in this extension
+		ExtensionPoint exPoint = ToolsLocator.getExtensionPointManager().add(
+				"View_TocActions");
+
+		exPoint.append("WMSProperties", "", new WMSPropsTocMenuEntry());
+
+        // Adds a new tab to the "add layer" wizard for WMS layer creation
+    	AddLayer.addWizard(WMSWizard.class);
+
+    	ToolsLocator.getExtensionPointManager().add("CatalogLayers").append(
+				"OGC:WMS", "", FLyrWMS.class);
+    	initilizeIcons();
+    	DynObjectSetWMSInfo.registerDynClass();
+    }
+    
+	public void postInitialize() {
+		FLyrWMS.registerPersistent();
+	}
+
+    public void execute(String actionCommand) {
+    	// no commands, no code.
+    }
+
+    public boolean isEnabled() {
+    	// may return whatever
+        return false;
+    }
+
+    public boolean isVisible() {
+    	// may return whatever
+        return false;
+    }
+
+    void initilizeIcons(){
+		IconThemeHelper.registerIcon(null, "aplication-preferences-uparrow", this);
+		IconThemeHelper.registerIcon(null, "aplication-preferences-downarrow", this);
+		IconThemeHelper.registerIcon(null, "icon-layer-wms", this);
+    }
+}

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/WMSClientExtension.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/toc/WMSPropsTocMenuEntry.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/toc/WMSPropsTocMenuEntry.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/toc/WMSPropsTocMenuEntry.java	(revision 21019)
@@ -0,0 +1,56 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+ 
+package org.gvsig.raster.wms.app.wmsclient.gui.toc;
+
+import org.gvsig.andami.PluginServices;
+import org.gvsig.app.project.documents.view.toc.AbstractTocContextMenuAction;
+import org.gvsig.app.project.documents.view.toc.ITocItem;
+import org.gvsig.fmap.mapcontext.layers.FLayer;
+import org.gvsig.raster.wms.app.wmsclient.gui.dialog.WMSPropsDialog;
+import org.gvsig.raster.wms.app.wmsclient.layer.FLyrWMS;
+
+
+public class WMSPropsTocMenuEntry extends AbstractTocContextMenuAction {
+
+	public void execute(ITocItem item, FLayer[] selectedItems) {
+		WMSPropsDialog dialog = new WMSPropsDialog(selectedItems[0]);
+		PluginServices.getMDIManager().addWindow(dialog);
+	}
+
+	public String getText() {
+		return PluginServices.getText(this, "wms_properties");
+	}
+
+	public boolean isEnabled(ITocItem item, FLayer[] selectedItems) {
+		return selectedItems.length == 1 && selectedItems[0].isAvailable();
+	}
+
+	public boolean isVisible(ITocItem item, FLayer[] selectedItems) {
+		if (selectedItems.length != 1) {
+			return false;
+		}
+		return selectedItems[0] instanceof FLyrWMS;
+
+	}
+
+}

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/toc/WMSPropsTocMenuEntry.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/dialog/WMSPropsDialog.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/dialog/WMSPropsDialog.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/dialog/WMSPropsDialog.java	(revision 21019)
@@ -0,0 +1,445 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+ 
+package org.gvsig.raster.wms.app.wmsclient.gui.dialog;
+
+import java.awt.Dimension;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Vector;
+
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.tree.TreePath;
+
+import org.gvsig.andami.PluginServices;
+import org.gvsig.andami.ui.mdiManager.IWindow;
+import org.gvsig.andami.ui.mdiManager.WindowInfo;
+import org.gvsig.app.gui.wizards.WizardListener;
+import org.gvsig.app.gui.wizards.WizardListenerSupport;
+import org.gvsig.fmap.dal.coverage.exception.ConnectException;
+import org.gvsig.fmap.dal.exception.InitializeException;
+import org.gvsig.fmap.mapcontext.MapContext;
+import org.gvsig.fmap.mapcontext.exceptions.ConnectionErrorLayerException;
+import org.gvsig.fmap.mapcontext.exceptions.DriverLayerException;
+import org.gvsig.fmap.mapcontext.exceptions.LegendLayerException;
+import org.gvsig.fmap.mapcontext.exceptions.LoadLayerException;
+import org.gvsig.fmap.mapcontext.exceptions.NameLayerException;
+import org.gvsig.fmap.mapcontext.exceptions.ProjectionLayerException;
+import org.gvsig.fmap.mapcontext.exceptions.TypeLayerException;
+import org.gvsig.fmap.mapcontext.exceptions.URLLayerException;
+import org.gvsig.fmap.mapcontext.exceptions.UnsupportedVersionLayerException;
+import org.gvsig.fmap.mapcontext.layers.FLayer;
+import org.gvsig.fmap.mapcontext.layers.FLayers;
+import org.gvsig.fmap.mapcontrol.MapControl;
+import org.gvsig.raster.fmap.layers.FLyrRaster;
+import org.gvsig.raster.swing.RasterSwingLibrary;
+import org.gvsig.raster.util.CancelTaskImpl;
+import org.gvsig.raster.wms.app.wmsclient.gui.panel.WMSParamsPanel;
+import org.gvsig.raster.wms.app.wmsclient.gui.wizard.LayerTreeModel;
+import org.gvsig.raster.wms.app.wmsclient.layer.FLyrWMS;
+import org.gvsig.raster.wms.io.RemoteWMSStyle;
+import org.gvsig.raster.wms.io.WMSLayerNode;
+import org.gvsig.raster.wms.io.WMSServerExplorer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * The TOC WMS properties panel container.
+ *
+ * @author jaume - 
+ *
+ */
+public class WMSPropsDialog extends JPanel implements IWindow {
+
+	private static final long         serialVersionUID    = 1L;
+	private Logger                   logger              = LoggerFactory.getLogger(WMSPropsDialog.class);
+	JDialog                           dlg                 = null;  
+	private JPanel                    buttonsPanel        = null;
+	private FLyrRaster                fLayer              = null;
+	boolean                           applied             = false;;
+	private WindowInfo                m_ViewInfo          = null;
+
+	private JButton                   btnApply            = null;
+	private JButton                   btnOk               = null;
+	private JButton                   btnCancel           = null;
+	private WMSParamsPanel            wmsParamsTabbedPane;
+    private CommandListener           m_actionListener;
+    private WMSServerExplorer         explorer            = null;
+
+    public WMSPropsDialog(FLayer layer) {
+		super();
+		if(layer instanceof FLyrRaster)
+			initialize((FLyrRaster)layer);
+	}
+
+
+	private void initialize(FLyrRaster layer) {
+		setLayout(null);
+
+        setFLayer(layer);
+        wmsParamsTabbedPane = getParamsPanel(((FLyrWMS) layer).getProperties());
+        wmsParamsTabbedPane.addWizardListener(new WizardListener(){
+			public void wizardStateChanged(boolean finishable) {
+				getBtnOk().setEnabled(finishable);
+				getBtnApply().setEnabled(finishable);
+			}
+
+			public void error(Exception e) {
+			}
+
+        })  ;
+        wmsParamsTabbedPane.disableDisagregatedLayers();
+        this.add(wmsParamsTabbedPane);
+        this.add(getButtonsPanel(), null);
+
+	}
+
+
+	public void setFLayer(FLyrRaster f) {
+		fLayer = f;
+	}
+
+	/**
+	 * With getParamsPanel we have access to the map config TabbedPane.
+	 * If this panel doesn't exist yet (which can occur when an existing project is
+	 * recovered) it is been automatically constructed by connecting to the server,
+	 * reloading the necessary data, filling up the content and setting the selected
+	 * values that were selected when the projet was saved.
+	 *
+	 *
+	 * Since a connection to the server is needed when rebuiliding the panel, this
+	 * causes a delay for the panel's showing up or a nullPointer error if there is
+	 * no path to the server.
+	 *
+	 *
+	 * Con getParamsPanel tenemos acceso a juego de pesta�as de configuraci�n
+	 * del mapa. Si este panel todav�a no existe (como puede ser cuando
+	 * recuperamos un proyecto guardado) �ste se crea autom�ticamente conectando
+	 * al servidor, recuperando los datos necesarios, rellenando el contenido y
+	 * dejando seleccionados los valores que estaban seleccionados cuando se
+	 * guarda el proyecto.
+	 *
+	 *
+	 * Como para reconstruirse requiere una conexi�n con el servidor esto causa
+	 * un retardo en la aparici�n en el toc o un error de nullPointer si no
+	 * hay conexi�n hasta el servidor.
+	 *
+	 *
+	 * @return WMSParamsPanel
+	 */
+	@SuppressWarnings({ "unchecked" })
+	public WMSParamsPanel getParamsPanel(HashMap info) {
+	    if (info != null) {
+	    	try {
+	    		if(explorer == null) {
+					explorer = ((FLyrWMS)fLayer).getExplorer();
+					
+					try {
+			    		explorer.connect(new CancelTaskImpl(), true);
+					} catch (ConnectException e) {
+						RasterSwingLibrary.messageBoxError("The connection cannot be established", this, e);
+						return null;
+					} 
+	    		}
+	    	} catch (Exception e) {
+	    		explorer = null;
+	    		JOptionPane.showMessageDialog(null, "error_comunicacion_servidor", "Error", JOptionPane.ERROR_MESSAGE);
+	    	}
+	    	try {
+	        	
+                // name
+	            WMSParamsPanel toc = new WMSParamsPanel();
+	            toc.setLayerName((String)info.get("name"));
+	            toc.setWizardData(explorer);
+
+	            toc.setVisible(true);
+	            toc.setListenerSupport(new WizardListenerSupport());
+
+	            WMSLayerNode[] selectedLayers = (WMSLayerNode[]) ((Vector) info.get("selectedLayers")).toArray(new WMSLayerNode[0]);
+	            for (int i = 0; i < selectedLayers.length; i++) {
+	            	toc.getJustTreeLayer().clearSelection();
+	            	//  Se a�ade a la lista de layers seleccionados
+	            	TreePath path = new TreePath(((LayerTreeModel)toc.getJustTreeLayer()
+	            						.getModel()).getNodeByName(selectedLayers[i].getName()));
+	            	toc.getJustTreeLayer().addSelectionPath(path);
+	            	toc.addLayer();
+                }
+
+                // srs
+                String srs = (String) info.get("srs");
+                int index = toc.getSRSIndex( srs );
+	            if (index != -1) {
+					toc.getLstSRSs().setSelectedIndex(index);
+				}
+
+                // format
+	            String format = (String) info.get("format");
+	            index = toc.getFormatIndex(format);
+	            if (index != -1) {
+					toc.getLstFormats().setSelectedIndex(index);
+				}
+	            
+	            //info format
+	            String infoFormat = (String) info.get("infoformat");
+	            index = toc.getInfoFormatIndex(infoFormat);
+	            if (index != -1) {
+					toc.getLstInfoFormats().setSelectedIndex(index);
+				}
+
+	            // transparency
+                toc.setTransparent(((Boolean) info.get("wmsTransparency")).booleanValue());
+
+                // styles
+                List<RemoteWMSStyle> l = (List<RemoteWMSStyle>) info.get("styles");
+                if (l != null && l.size() > 0) {
+					toc.setStyleSelections(l);
+				}
+
+                // dimensions
+                Vector v = (Vector) info.get("dimensions");
+                if (v != null) {
+					toc.setDimensions(v);
+				}
+
+                // fixed sizes
+                Dimension sz = (Dimension) info.get("fixedSize");
+                if (sz != null) {
+					toc.setFixedSize(sz);
+				}
+                toc.refreshInfo();
+                applied = false;
+	            return toc;
+	        } catch (Exception e) {
+	        	JOptionPane.showMessageDialog(null, "error_comunicacion_servidor", "Error", JOptionPane.ERROR_MESSAGE);
+	        }
+	    }
+	    return null;
+	}
+
+
+	public JPanel getButtonsPanel() {
+		if (buttonsPanel == null) {
+			m_actionListener = new CommandListener(this);
+			buttonsPanel = new JPanel();
+	        buttonsPanel.setBounds(5, wmsParamsTabbedPane.getHeight(), 471, 40);
+			buttonsPanel.setLayout(null);
+			buttonsPanel.setName("buttonPanel");
+
+	        buttonsPanel.add(getBtnOk(), null);
+	        buttonsPanel.add(getBtnApply(), null);
+	        buttonsPanel.add(getBtnCancel(), null);
+		}
+		return buttonsPanel;
+	}
+
+	public JButton getBtnOk() {
+		if (btnOk == null) {
+	        btnOk = new JButton("ok");
+	        btnOk.setText(PluginServices.getText(this,"ok"));
+	        btnOk.setActionCommand("OK");
+	        btnOk.addActionListener(m_actionListener);
+	        btnOk.setBounds(367, 9, 90, 25);
+		}
+		return btnOk;
+	}
+
+	public JButton getBtnApply() {
+		if (btnApply == null) {
+	        btnApply = new JButton("apply");
+	        btnApply.setText(PluginServices.getText(this,"apply"));
+	        btnApply.setEnabled(false);
+	        btnApply.setActionCommand("APPLY");
+	        btnApply.addActionListener(m_actionListener);
+	        btnApply.setBounds(267, 9, 90, 25);
+		}
+		return btnApply;
+	}
+
+	public JButton getBtnCancel() {
+		if (btnCancel == null) {
+	        btnCancel = new JButton("cancel");
+	        btnCancel.setText(PluginServices.getText(this,"cancel"));
+	        btnCancel.setActionCommand("CANCEL");
+	        btnCancel.addActionListener(m_actionListener);
+	        btnCancel.setBounds(137, 9, 90, 25);
+		}
+		return btnCancel;
+	}
+
+    private class CommandListener implements ActionListener {
+
+        /**
+         * Creates a new ComandosListener object.
+         *
+         * @param lg DOCUMENT ME!
+         */
+        public CommandListener(WMSPropsDialog tp) {
+            //m_tp = tp;
+        }
+
+		@SuppressWarnings({ "unchecked" })
+		public void actionPerformed(ActionEvent e) {
+            if (e.getActionCommand() == "CANCEL") {
+				close();
+			} else {
+            	/*try {
+					((FLyrWMS) fLayer).setFullExtent(wmsParamsTabbedPane.getLayersRectangle());
+				} catch (ProjectionLayerException ex) {
+					ex.printStackTrace();
+			        JOptionPane.showMessageDialog((Component)PluginServices.getMainFrame(), ex.getMessage());
+			        return;
+				}*/
+				((FLyrWMS) fLayer).getParameters().setFormat(wmsParamsTabbedPane.getFormat());
+				((FLyrWMS) fLayer).getParameters().setInfoFormat(wmsParamsTabbedPane.getInfoFormat());
+                try {
+                if (!wmsParamsTabbedPane.getDisagregatedLayers()) {
+					((FLyrWMS) fLayer).getParameters().setLayerQuery(wmsParamsTabbedPane.getLayersQuery());
+				}
+                ((FLyrWMS) fLayer).getParameters().setInfoLayerQuery(wmsParamsTabbedPane.getQueryableLayerQuery());
+                ((FLyrWMS) fLayer).getParameters().setSRS(wmsParamsTabbedPane.getSRS());
+                ((FLyrWMS) fLayer).getParameters().setName(wmsParamsTabbedPane.getLayerName());
+                ((FLyrWMS) fLayer).getParameters().setWmsTransparency(wmsParamsTabbedPane.getTransparency());
+                ((FLyrWMS) fLayer).getParameters().setStyles(wmsParamsTabbedPane.getStyles());
+                ((FLyrWMS) fLayer).getParameters().setDimensions(wmsParamsTabbedPane.getDimensions());
+                ((FLyrWMS) fLayer).getParameters().setFixedSize(wmsParamsTabbedPane.getFixedSize());
+
+            	//fLayer = wmsParamsTabbedPane.getLayer();
+            	FLayers parent = ((FLayer)fLayer).getParentLayer();
+
+                if (e.getActionCommand() == "APPLY"){
+                	MapControl mapCtrl = null;
+                	
+                	IWindow[] w = PluginServices.getMDIManager().getAllWindows();
+                	for (int i = 0; i < w.length; i++) {
+						if (w[i] instanceof org.gvsig.app.project.documents.view.gui.AbstractViewPanel) {
+							MapContext mapContext = ((org.gvsig.app.project.documents.view.gui.AbstractViewPanel)w[i]).getMapControl().getMapContext();
+							if(mapContext == fLayer.getMapContext())
+								mapCtrl = ((org.gvsig.app.project.documents.view.gui.AbstractViewPanel)w[i]).getMapControl();
+						}
+					} 
+
+                    if (parent != null) {
+                    	if ( wmsParamsTabbedPane.getLayer() instanceof FLayers){
+							mapCtrl.getMapContext().getLayers().
+							replaceLayer(parent.getName(),mergeFLayers(parent,(FLayers)wmsParamsTabbedPane.getLayer()));
+                    	}
+                    }
+                    else {
+                    	mapCtrl.getMapContext().getLayers().replaceLayer(fLayer.getName(), wmsParamsTabbedPane.getLayer());
+                    }
+                    //mapCtrl.getMapContext().getLayers().addLayer( fLayer );
+                    mapCtrl.getMapContext().invalidate();
+                    applied = true;
+                    getBtnApply().setEnabled(!applied);
+                }
+                if (e.getActionCommand() == "OK") {
+                    if (!applied) {
+
+                        org.gvsig.app.project.documents.view.gui.AbstractViewPanel vista = (org.gvsig.app.project.documents.view.gui.AbstractViewPanel) PluginServices.getMDIManager().getActiveWindow();
+                        MapControl mapCtrl = vista.getMapControl();
+
+                        if (parent != null){
+                        	if ( wmsParamsTabbedPane.getLayer() instanceof FLayers){
+                        		mapCtrl.getMapContext().getLayers().
+                        		replaceLayer(parent.getName(),mergeFLayers(parent,(FLayers)wmsParamsTabbedPane.getLayer()));
+                        	}
+                        }
+                        else {
+                        	mapCtrl.getMapContext().getLayers().replaceLayer(fLayer.getName(), wmsParamsTabbedPane.getLayer());
+                        }                        mapCtrl.getMapContext().invalidate();
+                    }
+                    close();
+                }
+                } catch (ConnectionErrorLayerException e1) {
+                	logger.info("", e1);
+    			} catch (DriverLayerException e1) {
+    				logger.info("", e1);
+    			} catch (LegendLayerException e1) {
+    				logger.info("", e1);
+    			} catch (NameLayerException e1) {
+    				logger.info("", e1);
+    			} catch (ProjectionLayerException e1) {
+    				logger.info("", e1);
+    			} catch (TypeLayerException e1) {
+    				logger.info("", e1);
+    			} catch (UnsupportedVersionLayerException e1) {
+    				logger.info("", e1);
+    			} catch (URLLayerException e1) {
+    				logger.info("", e1);
+    			} catch (LoadLayerException e1) {
+    				logger.info("", e1);
+    			} catch (InitializeException e1) {
+					logger.info("", e1);
+				}
+            }
+		}
+    }
+    /**
+     * Merge two FLayers in one
+     * @param group1
+     * @param group2
+     * @return
+     */
+    private FLayers mergeFLayers(FLayers group1, FLayers group2)
+    {
+    	//FLayers agrupation = new FLayers(group1.getFMap(), group1.getParentLayer());
+    	FLayer layer;
+    	for(int i = 0; i < group2.getLayersCount(); i++)
+    	{
+    		layer = group2.getLayer( i );
+    		if(group1.getLayer( layer.getName()) == null ){
+    			group1.addLayer( layer );
+    		}
+    	}
+
+    	return group1;
+    }
+
+
+
+	public WindowInfo getWindowInfo() {
+		if (m_ViewInfo==null){
+			m_ViewInfo=new WindowInfo(WindowInfo.MODALDIALOG);
+			m_ViewInfo.setTitle(PluginServices.getText(this,"fit_WMS_layer"));
+	        m_ViewInfo.setWidth(wmsParamsTabbedPane.getWidth()+10);
+	        m_ViewInfo.setHeight(wmsParamsTabbedPane.getHeight()+40);
+
+		}
+		return m_ViewInfo;
+	}
+
+	public void close() {
+		PluginServices.getMDIManager().closeWindow(this);
+	}
+
+
+	public Object getWindowProfile() {
+		return WindowInfo.DIALOG_PROFILE;
+	}
+
+}  //  @jve:decl-index=0:visual-constraint="10,10"

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/dialog/WMSPropsDialog.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/WebMapContextFileChooserAccessory.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/WebMapContextFileChooserAccessory.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/WebMapContextFileChooserAccessory.java	(revision 21019)
@@ -0,0 +1,155 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+ 
+package org.gvsig.raster.wms.app.wmsclient.gui.panel;
+
+import java.awt.Dimension;
+import java.util.List;
+
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+
+import org.gvsig.andami.PluginServices;
+import org.gvsig.app.project.ProjectManager;
+import org.gvsig.app.project.documents.Document;
+import org.gvsig.app.project.documents.view.DefaultViewDocument;
+import org.gvsig.app.project.documents.view.ViewManager;
+import org.gvsig.app.project.documents.view.gui.AbstractViewPanel;
+
+
+public class WebMapContextFileChooserAccessory extends JPanel {
+	public static int NEW_VIEW = -1;
+	public static int CURRENT_VIEW = -1;
+	public static int USERS_VIEW_SELECTION = -1;
+
+	private JComboBox cmbMode = null;
+	private JComboBox cmbViews = null;
+	private JLabel lblExplain = null;
+	private String currentView = null;
+
+	public WebMapContextFileChooserAccessory(String currentViewName) {
+		super();
+		currentView = currentViewName;
+		initialize();
+	}
+
+	private void initialize() {
+		lblExplain = new JLabel();
+		lblExplain.setBounds(25, 52, 268, 55);
+		lblExplain.setText(PluginServices.getText(this, "html_in_a_new_view"));
+		setLayout(null);
+		setSize(315, 240);
+		setPreferredSize(new Dimension(315, 72));
+		this.add(getCmbViews(), null);
+		this.add(lblExplain, null);
+		setBorder(javax.swing.BorderFactory.createTitledBorder(
+				  null, PluginServices.getText(this, "open_layers_as"),
+				  javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
+				  javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));
+		this.add(getCmbMode(), null);
+	}
+
+	/**
+	 * This method initializes cmbBoxMode
+	 *
+	 * @return javax.swing.JComboBox
+	 */
+	private JComboBox getCmbMode() {
+		if (cmbMode == null) {
+			cmbMode = new JComboBox();
+			cmbMode.setBounds(25, 26, 268, 20);
+			cmbMode.removeAllItems();
+			cmbMode.addItemListener(new java.awt.event.ItemListener() {
+				public void itemStateChanged(java.awt.event.ItemEvent e) {
+					cmbViews.setVisible(false);
+
+					if (cmbMode.getSelectedIndex() == NEW_VIEW) {
+						lblExplain.setText(PluginServices.getText(this, "html_in_a_new_view"));
+					} else if (cmbMode.getSelectedIndex() == CURRENT_VIEW) {
+						lblExplain.setText(PluginServices.getText(this, "html_in_the_current_view"));
+					} else if (cmbMode.getSelectedIndex() == USERS_VIEW_SELECTION) {
+						lblExplain.setText(PluginServices.getText(this, "html_in_other_view"));
+						cmbViews.setVisible(true);
+					}
+				}
+			});
+			cmbMode.addItem(PluginServices.getText(this, "a_new_view"));
+			if (currentView!=null) {
+				cmbMode.addItem(PluginServices.getText(this, "layers_in_the_current_view")+": "+currentView);
+				CURRENT_VIEW = cmbMode.getItemCount()-1;
+				cmbMode.setSelectedIndex(CURRENT_VIEW);
+			}
+			if (getCmbViews().getItemCount()>0) {
+				cmbMode.addItem(PluginServices.getText(this, "layers_in_other_view"));
+				USERS_VIEW_SELECTION = cmbMode.getItemCount() -1;
+			}
+		}
+
+		return cmbMode;
+	}
+
+	public void setCurrentView(AbstractViewPanel v) {
+		currentView = v.getName();
+	}
+
+	public DefaultViewDocument getSelectedView() {
+		String viewName = null;
+		if (getCmbMode().getSelectedIndex() == NEW_VIEW)
+			return null;
+		else if (getCmbMode().getSelectedIndex() == CURRENT_VIEW)
+			viewName = currentView;
+		else if (getCmbMode().getSelectedIndex() == USERS_VIEW_SELECTION)
+			viewName = (String) getCmbViews().getSelectedItem();
+		return (DefaultViewDocument) ProjectManager.getInstance().getCurrentProject().getDocument(viewName, ViewManager.TYPENAME);
+//		ProjectExtension pe = (ProjectExtension) PluginServices.getExtension(ProjectExtension.class);
+//		return (ProjectView) pe.getProject().getProjectDocumentByName(viewName, ProjectViewFactory.registerName);
+	}
+
+	public int getOption() {
+		return cmbMode.getSelectedIndex();
+	}
+
+	/**
+	 * This method initializes cmbViews
+	 *
+	 * @return javax.swing.JComboBox
+	 */
+	private JComboBox getCmbViews() {
+		if (cmbViews == null) {
+			cmbViews = new JComboBox();
+			cmbViews.setBounds(25, 114, 266, 20);
+			List<Document> views = ProjectManager.getInstance().getCurrentProject().getDocuments( ViewManager.TYPENAME);
+			for (Document v : views) {
+				cmbViews.addItem(v.getName());
+			}
+			
+//			ProjectExtension pe = (ProjectExtension) PluginServices.getExtension(ProjectExtension.class);
+//			ArrayList views = pe.getProject().getDocumentsByType(ProjectViewFactory.registerName);
+//			for (int i = 0; i < views.size(); i++) {
+//				ProjectView v = (ProjectView)views.get(i);
+//				cmbViews.addItem(v.getName());
+//			}
+		}
+		return cmbViews;
+	}
+}  //  @jve:decl-index=0:visual-constraint="10,0"

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/WebMapContextFileChooserAccessory.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/StyleTree.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/StyleTree.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/StyleTree.java	(revision 21019)
@@ -0,0 +1,342 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+ 
+package org.gvsig.raster.wms.app.wmsclient.gui.panel;
+
+import java.awt.Color;
+import java.awt.Component;
+import java.util.ArrayList;
+import java.util.Vector;
+
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.JTree;
+import javax.swing.event.TreeModelListener;
+import javax.swing.tree.DefaultTreeCellRenderer;
+import javax.swing.tree.TreeModel;
+import javax.swing.tree.TreePath;
+
+import org.gvsig.fmap.dal.coverage.RasterLocator;
+import org.gvsig.raster.wms.io.RemoteWMSStyle;
+import org.gvsig.raster.wms.io.WMSLayerNode;
+
+
+/**
+ * This class holds a visual tree that handles the selection of the styles in the
+ * selected layers. It encapsulates any gui interface handling the mouse selection.
+ * <p>
+ * It has a method getStylesSelection that returns the current selection in a 
+ * bi-dimensional string array containing the layer name and the selected style name.
+ * </p>
+ * <p>
+ * Keep in mind that although it's similar to LayersTree it is not the same.
+ * It does not use the same instances of the WMSLayerNode that LayerTreeModel
+ * because it allows to repeat layers. So, each layer is a completely new 
+ * WMSLayerNode containing same properties but not the same parent (which is always
+ * the tree root) and each style is a completely new FMapStyle containing same
+ * properties but its parent is one of the layers of the StylesTree and not one
+ * of those of the Layers tree.
+ * </p>
+ * 
+ * @author jaume dominguez faus
+ *
+ */
+public class StyleTree extends JTree {
+	public boolean showLayerNames = false;
+    public StyleTree(){
+        super();
+        initialize();
+    }
+    
+    private void initialize(){
+        setToggleClickCount(1);
+        setRowHeight(22);
+        
+        setCellRenderer(new DefaultTreeCellRenderer() {
+            public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) {
+                if (leaf) {
+                    JPanel leafComponent = new JPanel();
+                    leafComponent.setBackground(Color.WHITE);
+                    JRadioButton leafRadioButton = new JRadioButton("", ((StyleTreeModel) getModel()).isSelected((RemoteWMSStyle) value));//selected);
+                    leafRadioButton.setBackground(Color.WHITE);
+                    leafComponent.add(leafRadioButton);
+                    leafComponent.add(new JLabel(((RemoteWMSStyle) value).getTitle()));
+                    return leafComponent;
+                } else {
+                	super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus);
+                	if (value instanceof WMSLayerNode) {
+                		WMSLayerNode layer = (WMSLayerNode) value;
+                		if (!showLayerNames) {
+                			if (layer.getName() != null || layer.getName() == "") {
+                				String text = layer.toString();
+                				text = text.substring(text.indexOf(']')+2, text.length());
+                				setText(text);
+                			}
+                		}
+                	}
+            		return this;
+                }
+            }});
+        addMouseListener(new java.awt.event.MouseAdapter() { 
+            public void mouseClicked(java.awt.event.MouseEvent e) {
+                ((StyleTreeModel)getModel()).setSelectedLeaf(getSelectionPath());
+                clearSelection();
+                repaint();
+            }
+        });
+    }
+    
+    /**
+     * Expands this tree.
+     *
+     */
+    public void expandAll(){
+        int row = 0; 
+        while (row < getRowCount()) {
+          expandRow(row);
+          row++;
+          }
+    }
+    /**
+     * Returns a Vector of Strings containing the style titles.
+     */
+    public Vector getStyleSelectionTitles(){
+        if (getModel() instanceof StyleTreeModel)
+            return ((StyleTreeModel)getModel()).getStyleSelectionTitles();
+        else
+            return null;
+    }
+    
+    /**
+     * Sets the selected styles in the StylesTree. The argument styleNames is
+     * a Vector with exactly the same amount of strings than the amount of
+     * themes (layers) contained by the tree. A blank or null string will
+     * leave the default style for that layer, but this element <b>must exist</b>
+     * in the array in any case.
+     * 
+     * @param styleNames, Vector containing the style names. 
+     * The styles order <b>must match</b> with the layer order. 
+     */
+    public void initSelections(Vector styleNames){
+    	if (styleNames!=null) {
+    		StyleTreeModel model = (StyleTreeModel) getModel();
+    		model.setStylesSelection(styleNames);
+    	}
+    }
+	
+}
+
+class StyleTreeModel implements TreeModel {
+	private WMSLayerNode root;
+	private ArrayList<WMSLayerNode> layers = new ArrayList<WMSLayerNode>();
+
+	public StyleTreeModel(WMSLayerNode root){
+        this.root = root;
+        
+    }
+	
+	/**
+	 * Will return true if this style is selected.
+	 * @param style
+	 * @return
+	 */
+	public boolean isSelected(RemoteWMSStyle style) {
+		return style.getParent().getSelectedStyle().equals(style);
+	}
+
+	/**
+	 * Gets the names of the selected styles into a Vector using the same order
+	 * as they was represented in the StylesTree.
+	 * @return
+	 */
+	public Vector<String> getStyleSelectionTitles() {
+		Vector<String> v = new Vector<String>();
+		for (int i = 0; i < layers.size(); i++) {
+			WMSLayerNode layer = (WMSLayerNode) layers.get(i);
+			RemoteWMSStyle sty = layer.getSelectedStyle();
+			if (sty == null) 
+				v.add("");
+			else 
+				v.add(sty.getTitle());
+		}
+		return v;
+	}
+
+	/**
+	 * Sets the selected styles in the StylesTree. The argument styleNames is
+	 * a Vector with exactly the same amount of strings than the amount of
+	 * themes (layers) contained by the tree. A blank or null string will
+	 * leave the default style for that layer, but this element <b>must exist</b>
+	 * in the array in any case.
+	 * 
+	 * @param styleNames, Vector containing the style names. 
+	 * The styles order <b>must match</b> with the layer order. 
+	 */
+	public void setStylesSelection(Vector styleNames) {
+		for (int i = 0; i < layers.size(); i++) {
+			WMSLayerNode layer = (WMSLayerNode) layers.get(i);
+			for (int j = 0; j < layer.getStyles().size(); j++) {
+				RemoteWMSStyle sty = (RemoteWMSStyle) layer.getStyles().get(j);
+				if ( sty.getName().equals((String) styleNames.get(i))) {
+					layer.setSelectedStyleByIndex(j);
+				}
+			}
+		}
+	}
+	
+	/**
+	 * Adds a new branch to this tree. It must be a layer node.
+	 * @param node
+	 * @return <b>True</b>, if the added branch actually defines any style.
+	 *         <b>False</b>, if the layer has no styles.
+	 */
+	@SuppressWarnings("unchecked")
+	public boolean addLayerBranch(WMSLayerNode node) {
+		layers.add(node);
+		if (node.getStyles()==null || node.getStyles().size()==0){
+			return false;
+		}
+		for (int i = 0; i < node.getStyles().size(); i++) {
+			((RemoteWMSStyle) node.getStyles().get(i)).setParent(node);
+		}
+		((WMSLayerNode)getRoot()).getChildren().add(node);
+		return true;
+	}
+	
+	/**
+     * Sets a leaf (an style) selected.
+     * @param selectionPath to this leaf.
+     */
+	protected void setSelectedLeaf(TreePath selectionPath) {
+		if (selectionPath!=null){
+			Object[] objects = selectionPath.getPath();
+			Object item = objects[objects.length-1];
+			if (isLeaf(item)){
+				RemoteWMSStyle style = (RemoteWMSStyle) item;
+				WMSLayerNode layer = style.getParent() ;
+				for (int i = 0; i < layer.getStyles().size(); i++) {
+					RemoteWMSStyle sty = (RemoteWMSStyle) layer.getStyles().get(i);
+					if (sty.getName().equals(style.getName())) {
+						layer.setSelectedStyleByIndex(i);
+						return;
+					}
+				}
+			}
+		}
+	}
+
+
+	/*
+	 *  (non-Javadoc)
+	 * @see javax.swing.tree.TreeModel#getRoot()
+	 */
+	public Object getRoot() {
+		if (root == null) {
+            root = new WMSLayerNode();
+            root.setParent(null);
+        }
+        return root;
+	}
+
+	/*
+	 *  (non-Javadoc)
+	 * @see javax.swing.tree.TreeModel#getChildCount(java.lang.Object)
+	 */
+	public int getChildCount(Object parent) {
+        int count=0;
+        
+        if (parent == root)
+            count = ((WMSLayerNode) parent).getChildren().size();
+        else
+            count = ((WMSLayerNode) parent).getStyles().size();
+        return count;
+    }
+
+	/*
+	 *  (non-Javadoc)
+	 * @see javax.swing.tree.TreeModel#isLeaf(java.lang.Object)
+	 */
+	public boolean isLeaf(Object node) {
+		return (node instanceof RemoteWMSStyle);
+	}
+
+	/*
+	 *  (non-Javadoc)
+	 * @see javax.swing.tree.TreeModel#addTreeModelListener(javax.swing.event.TreeModelListener)
+	 */
+	public void addTreeModelListener(TreeModelListener l) {
+	}
+
+	/*
+	 *  (non-Javadoc)
+	 * @see javax.swing.tree.TreeModel#removeTreeModelListener(javax.swing.event.TreeModelListener)
+	 */
+	public void removeTreeModelListener(TreeModelListener l) {
+	}
+
+	/*
+	 *  (non-Javadoc)
+	 * @see javax.swing.tree.TreeModel#getChild(java.lang.Object, int)
+	 */
+	public Object getChild(Object parent, int index) {
+		if (parent instanceof RemoteWMSStyle)
+            return null;
+        if (parent == root)
+            return ((WMSLayerNode) parent).getChildren().get(index);
+        
+        return ((WMSLayerNode) parent).getStyles().get(index);
+	}
+
+	/*
+	 *  (non-Javadoc)
+	 * @see javax.swing.tree.TreeModel#getIndexOfChild(java.lang.Object, java.lang.Object)
+	 */
+	public int getIndexOfChild(Object parent, Object child) {
+		if (parent instanceof RemoteWMSStyle) { 
+            return -1;   
+        }
+         
+		WMSLayerNode l = (WMSLayerNode)parent;
+        if (l.getParent() == null){
+            for (int i = 0; i < l.getChildren().size(); i++) {
+                if (l.getChildren().get(i).equals(child)){
+                   return i;
+                }
+            }
+        } else {
+            for (int i = 0; i < l.getStyles().size(); i++) {
+                if (l.getChildren().get(i).equals(child)){
+                    return i;
+                }
+            }
+        }
+        return -1;
+	}
+
+	/*
+	 *  (non-Javadoc)
+	 * @see javax.swing.tree.TreeModel#valueForPathChanged(javax.swing.tree.TreePath, java.lang.Object)
+	 */
+	public void valueForPathChanged(TreePath path, Object newValue) {
+	}
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/StyleTree.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/WebMapContextSettingsPanel.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/WebMapContextSettingsPanel.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/WebMapContextSettingsPanel.java	(revision 21019)
@@ -0,0 +1,1241 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+ 
+package org.gvsig.raster.wms.app.wmsclient.gui.panel;
+
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.geom.Rectangle2D;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.prefs.Preferences;
+
+import javax.swing.ButtonGroup;
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
+import javax.swing.JTextField;
+import javax.swing.SwingConstants;
+import javax.swing.filechooser.FileFilter;
+
+import org.gvsig.andami.PluginServices;
+import org.gvsig.andami.messages.NotificationManager;
+import org.gvsig.andami.ui.mdiManager.SingletonWindow;
+import org.gvsig.andami.ui.mdiManager.WindowInfo;
+import org.gvsig.app.project.documents.view.DefaultViewDocument;
+import org.gvsig.app.project.documents.view.ViewManager;
+import org.gvsig.fmap.dal.exception.ReadException;
+import org.gvsig.fmap.geom.primitive.Envelope;
+import org.gvsig.fmap.mapcontext.MapContext;
+import org.gvsig.gui.beans.swing.JFileChooser;
+import org.gvsig.i18n.Messages;
+import org.gvsig.raster.wms.app.wmsclient.wmc.ExportWebMapContextExtension;
+import org.gvsig.raster.wms.app.wmsclient.wmc.ImportWebMapContextExtension;
+import org.gvsig.raster.wms.app.wmsclient.wmc.WebMapContext;
+import org.gvsig.raster.wms.app.wmsclient.wmc.WebMapContextTags;
+
+/**
+ * A graphical form to fill up the customizable information of a destinantion
+ * Web Map Context file.
+ *
+ * @author jaume dominguez faus - jaume.dominguez@iver.es
+ *
+ */
+public class WebMapContextSettingsPanel extends JPanel implements SingletonWindow {
+	private static final long serialVersionUID = 1L;
+	public static Preferences fPrefs = Preferences.userRoot().node( "gvsig.mapcontext-settingspanel" );
+	private JPanel simplePanel = null;
+	private JPanel advancedPanel = null;
+	private JPanel buttonsPanel = null;
+	private JComboBox cmbVersion = null;
+	private JLabel lblTitle = null;
+	private JButton btnBrowseFileSystem = null;
+	private JTextField txtTitle = null;
+	private JLabel lblVersion = null;
+	private JLabel lblId = null;
+	private JTextField txtId = null;
+	private JLabel lblFile = null;
+	private JTextField txtFile = null;
+	private JButton btnAdvanced = null;
+	private JButton btnOk = null;
+	private JButton btnCancel = null;
+	private JLabel lblAbstract = null;
+	private JLabel lblLogoURL = null;
+	private JLabel lblDescriptionURL = null;
+	private JTextArea txtAbstract = null;
+	private JScrollPane scrlAbstract = null;
+	private JTextField txtLogoURL = null;
+	private JTextField txtDescriptionURL = null;
+	private JPanel pnlMapSize = null;
+	private JRadioButton rdBtnUseViewSize = null;
+	private JRadioButton rdBtnCustomSize = null;
+	private JLabel lblWidth = null;
+	private JLabel lblHeight = null;
+	private JTextField txtWidth = null;
+	private JTextField txtHeight = null;
+	private JPanel pnlContactInfo = null;
+	private JTextField txtKeyWords = null;
+	private JLabel lblKeyWords = null;
+	private JLabel lblContactPerson = null;
+	private JTextField txtContactPerson = null;
+	private JLabel lblContactOrganization = null;
+	private JTextField txtOrganization = null;
+	private JLabel lblContactPosition = null;
+	private JTextField txtContactPosition = null;
+	private JLabel lblAddress = null;
+	private JTextField txtAddress = null;
+	private JLabel lblCity = null;
+	private JTextField txtCity = null;
+	private JLabel lblStateProvince = null;
+	private JTextField txtStateOrProvince = null;
+	private JLabel lblPostCode = null;
+	private JTextField txtPostCode = null;
+	private JLabel lblCountry = null;
+	private JComboBox cmbCountries = null;
+	private JLabel lblPhone = null;
+	private JTextField txtTelephone = null;
+	private JLabel lblFax = null;
+	private JTextField txtFax = null;
+	private JLabel lblEMail = null;
+	private JTextField txtEMail = null;
+	private boolean first = true;
+	private boolean advanced = fPrefs.getBoolean("advanced-panel", false);
+	private WindowInfo m_viewInfo;
+	private String strAdvanced = Messages.getText("advanced");
+	private File targetFile;
+	private WebMapContext wmc;
+	private DefaultViewDocument[] exportableViews;
+	private JLabel lblView = null;
+	private JComboBox cmbViews = null;
+	private String lastWidth, lastHeight;
+	private int defaultWidth = 500;
+	private int defaultHeight = 450;
+	private JLabel lblExtent = null;
+	private JRadioButton rdBtnCurrentViewExtent = null;
+	private JRadioButton rdBtnFullExtent = null;
+	private static String lastPath = null;
+
+	protected boolean useFullExtent = fPrefs.getBoolean("use_full_extent", false);
+
+	public WebMapContextSettingsPanel(DefaultViewDocument[] views) {
+		super();
+		exportableViews = views;
+		initialize();
+	}
+
+	/**
+	 * This method initializes this
+	 *
+	 * @return void
+	 */
+	private void initialize() {
+		this.setLayout(null);
+
+		switchPanels();
+	}
+
+	private void switchPanels() {
+		this.removeAll();
+		Dimension sz;
+		this.add(getSimplePanel(), java.awt.BorderLayout.NORTH);
+		if (advanced) {
+			this.add(getAdvancedPanel(), java.awt.BorderLayout.CENTER);
+			sz = new Dimension(535, 640);
+			btnAdvanced.setText(strAdvanced+"  <<");
+
+		} else {
+			sz = new Dimension(535, 260);
+			btnAdvanced.setText(strAdvanced+"  >>");
+
+		}
+
+		this.setSize(sz);
+
+
+		this.add(getButtonsPanel(), java.awt.BorderLayout.SOUTH);
+		fPrefs.putBoolean("advanced-panel", advanced);
+		if (!first) {
+			PluginServices.getMDIManager().changeWindowInfo(this, getWindowInfo());
+
+			PluginServices.getMDIManager().closeWindow(this);
+			PluginServices.getMDIManager().addWindow(this);
+		}
+		first = false;
+	}
+
+	public WindowInfo getWindowInfo() {
+
+		m_viewInfo = new WindowInfo(WindowInfo.ICONIFIABLE);
+		m_viewInfo.setTitle(Messages.getText("web_map_context_settings"));
+		m_viewInfo.setWidth(this.getWidth()+8);
+		m_viewInfo.setHeight(getHeight());
+		return m_viewInfo;
+	}
+
+	/**
+	 * This method initializes simplePanel
+	 *
+	 * @return javax.swing.JPanel
+	 */
+	private JPanel getSimplePanel() {
+		if (simplePanel == null) {
+			ButtonGroup group = new ButtonGroup();
+			lblExtent = new JLabel();
+			lblExtent.setBounds(9, 146, 79, 20);
+			lblExtent.setHorizontalTextPosition(SwingConstants.RIGHT);
+			lblExtent.setHorizontalAlignment(SwingConstants.RIGHT);
+			lblExtent.setText(Messages.getText("map_extent")+":");
+			lblView = new JLabel();
+			lblView.setBounds(9, 24, 79, 20);
+			lblView.setHorizontalTextPosition(SwingConstants.RIGHT);
+			lblView.setHorizontalAlignment(SwingConstants.RIGHT);
+			lblView.setText(Messages.getText(ViewManager.TYPENAME)+":");
+			lblTitle = new JLabel();
+			lblTitle.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+			lblTitle.setBounds(9, 48, 79, 20);
+			lblTitle.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
+			lblTitle.setText(Messages.getText("title")+":");
+			lblId = new JLabel();
+			lblId.setBounds(9, 72, 79, 20);
+			lblId.setHorizontalTextPosition(SwingConstants.RIGHT);
+			lblId.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+			lblId.setText(Messages.getText("id")+":");
+			lblVersion = new JLabel();
+			lblVersion.setBounds(9, 120, 79, 20);
+			lblVersion.setHorizontalTextPosition(SwingConstants.RIGHT);
+			lblVersion.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+			lblVersion.setText(Messages.getText("version")+":");
+			lblFile = new JLabel();
+			lblFile.setBounds(9, 96, 79, 20);
+			lblFile.setHorizontalTextPosition(SwingConstants.RIGHT);
+			lblFile.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+			lblFile.setText(Messages.getText("file_name")+":");
+			simplePanel = new JPanel();
+			simplePanel.setLayout(null);
+			simplePanel.setBorder(javax.swing.BorderFactory.createTitledBorder(
+					  null, Messages.getText("options"),
+					  javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
+					  javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));
+			simplePanel.setBounds(new java.awt.Rectangle(0,0,535,196));
+			simplePanel.add(lblView, null);
+			simplePanel.add(getCmbViews(), null);
+			simplePanel.add(getTxtTitle(), null);
+			simplePanel.add(lblTitle, null);
+			simplePanel.add(getBtnBrowseFileSystem(), null);
+			simplePanel.add(lblVersion, null);
+			simplePanel.add(lblId, null);
+			simplePanel.add(getTxtId(), null);
+			simplePanel.add(lblFile, null);
+			simplePanel.add(getTxtFile(), null);
+			simplePanel.add(getBtnAdvanced(), null);
+			simplePanel.add(getCmbVersion(), null);
+			simplePanel.add(lblExtent, null);
+			simplePanel.add(getRdBtnCurrentViewExtent(), null);
+			simplePanel.add(getRdBtnFullExtent(), null);
+			group.add(getRdBtnCurrentViewExtent());
+			group.add(getRdBtnFullExtent());
+		}
+		return simplePanel;
+	}
+
+	/**
+	 * This method initializes advancedPanel
+	 *
+	 * @return javax.swing.JPanel
+	 */
+	private JPanel getAdvancedPanel() {
+		if (advancedPanel == null) {
+			lblKeyWords = new JLabel();
+			lblKeyWords.setBounds(10, 79, 99, 20);
+			lblKeyWords.setHorizontalTextPosition(SwingConstants.RIGHT);
+			lblKeyWords.setHorizontalAlignment(SwingConstants.RIGHT);
+			lblKeyWords.setText(Messages.getText("keywords")+":");
+			lblDescriptionURL = new JLabel();
+			lblDescriptionURL.setBounds(10, 104, 99, 20);
+			lblDescriptionURL.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
+			lblDescriptionURL.setText(Messages.getText("description_URL")+":");
+			lblDescriptionURL.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+			lblLogoURL = new JLabel();
+			lblLogoURL.setBounds(10, 130, 99, 20);
+			lblLogoURL.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
+			lblLogoURL.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+			lblLogoURL.setText(Messages.getText( "logo_URL")+":");
+			lblAbstract = new JLabel();
+			lblAbstract.setText(Messages.getText("abstract")+":");
+			lblAbstract.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
+			lblAbstract.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+			lblAbstract.setBounds(10, 27, 99, 20);
+			advancedPanel = new JPanel();
+			advancedPanel.setLayout(null);
+			advancedPanel.setBounds(0, 194, 535, 386);
+			advancedPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(
+					  null, Messages.getText("advanced_settings"),
+					  javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
+					  javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));
+			advancedPanel.add(lblAbstract, null);
+			advancedPanel.add(lblKeyWords, null);
+			advancedPanel.add(lblLogoURL, null);
+			advancedPanel.add(lblDescriptionURL, null);
+			advancedPanel.add(getScrlAbstract(), null);
+			advancedPanel.add(getTxtLogoURL(), null);
+			advancedPanel.add(getTxtDescriptionURL(), null);
+			advancedPanel.add(getPnlMapSize(), null);
+			advancedPanel.add(getPnlContactInfo(), null);
+			advancedPanel.add(getTxtKeyWords(), null);
+		}
+		return advancedPanel;
+	}
+
+	/**
+	 * This method initializes buttonsPanel
+	 *
+	 * @return javax.swing.JPanel
+	 */
+	private JPanel getButtonsPanel() {
+		if (buttonsPanel == null) {
+			FlowLayout flowLayout = new FlowLayout();
+			flowLayout.setAlignment(java.awt.FlowLayout.RIGHT);
+			flowLayout.setVgap(1);
+			buttonsPanel = new JPanel();
+			buttonsPanel.setLayout(flowLayout);
+			buttonsPanel.add(getBtnOk(), null);
+			buttonsPanel.add(getBtnCancel(), null);
+		}
+		buttonsPanel.setBounds(0, this.getHeight()-60, 535, 38);
+
+		return buttonsPanel;
+	}
+
+	/**
+	 * This method initializes cmbVersion
+	 *
+	 * @return javax.swing.JComboBox
+	 */
+	private JComboBox getCmbVersion() {
+		if (cmbVersion == null) {
+			cmbVersion = new JComboBox();
+			cmbVersion.setSize(89, 20);
+			cmbVersion.setLocation(91, 120);
+			for (int i = 0; i < WebMapContext.exportVersions.size(); i++) {
+				cmbVersion.addItem(WebMapContext.exportVersions.get(i));
+			}
+
+		}
+		return cmbVersion;
+	}
+
+
+
+	/**
+	 * This method initializes btnBrowseFileSystem
+	 *
+	 * @return javax.swing.JButton
+	 */
+	private JButton getBtnBrowseFileSystem() {
+		if (btnBrowseFileSystem == null) {
+			btnBrowseFileSystem = new JButton();
+			btnBrowseFileSystem.setBounds(403, 95, 120, 22);
+			btnBrowseFileSystem.addActionListener(new java.awt.event.ActionListener() {
+
+				public void actionPerformed(java.awt.event.ActionEvent e) {
+					JFileChooser fc = new JFileChooser(ImportWebMapContextExtension.WMC_FILECHOOSER_ID, lastPath);
+					fc.setFileFilter(new FileFilter() {
+						public boolean accept(File f) {
+							return f.isDirectory() || f.getAbsolutePath().toLowerCase().endsWith(WebMapContext.FILE_EXTENSION);
+						}
+
+						public String getDescription() {
+							return Messages.getText("ogc_mapcontext_file")+" (*.cml)";
+						}
+					});
+					if (fc.showOpenDialog((Component) PluginServices.getMainFrame()) == JFileChooser.APPROVE_OPTION){
+
+						String fileName = fc.getSelectedFile().getAbsolutePath();
+						if (!fileName.toLowerCase().endsWith(WebMapContext.FILE_EXTENSION)) {
+							fileName += WebMapContext.FILE_EXTENSION;
+						}
+						targetFile = new File(fileName);
+						getTxtFile().setText(fileName);
+						lastPath  = fileName.substring(0, fileName.lastIndexOf(File.separatorChar));
+					}
+
+					fc = null;
+				}
+			});
+			btnBrowseFileSystem.setText(Messages.getText("browse"));
+		}
+		return btnBrowseFileSystem;
+	}
+
+	/**
+	 * This method initializes txtTitle
+	 *
+	 * @return javax.swing.JTextField
+	 */
+	private JTextField getTxtTitle() {
+		if (txtTitle == null) {
+			txtTitle = new JTextField();
+			txtTitle.setBounds(91, 48, 432, 20);
+			txtTitle.setName(Messages.getText("title"));
+		}
+		return txtTitle;
+	}
+
+	/**
+	 * This method initializes jTextField
+	 *
+	 * @return javax.swing.JTextField
+	 */
+	private JTextField getTxtId() {
+		if (txtId == null) {
+			txtId = new JTextField();
+			txtId.setBounds(91, 72, 432, 20);
+			txtId.setName(Messages.getText("id"));
+		}
+		return txtId;
+	}
+
+	/**
+	 * This method initializes txtFile
+	 *
+	 * @return javax.swing.JTextField
+	 */
+	private JTextField getTxtFile() {
+		if (txtFile == null) {
+			txtFile = new JTextField();
+			txtFile.setBounds(91, 96, 308, 20);
+		}
+		return txtFile;
+	}
+
+	/**
+	 * This method initializes btnAdvanced
+	 *
+	 * @return javax.swing.JButton
+	 */
+	private JButton getBtnAdvanced() {
+		if (btnAdvanced == null) {
+			btnAdvanced = new JButton();
+//			btnAdvanced.setBounds(403, 160, 120, 25);
+			btnAdvanced.setLocation(403, 160);
+			btnAdvanced.addActionListener(new java.awt.event.ActionListener() {
+				public void actionPerformed(java.awt.event.ActionEvent e) {
+					advanced = !advanced;
+					switchPanels();
+				}
+			});
+		}
+		return btnAdvanced;
+	}
+
+	/**
+	 * This method initializes btnAceptar
+	 *
+	 * @return javax.swing.JButton
+	 */
+	private JButton getBtnOk() {
+		if (btnOk == null) {
+			btnOk = new JButton();
+			btnOk.setText(Messages.getText("Ok"));
+			btnOk.addActionListener(new java.awt.event.ActionListener() {
+				public void actionPerformed(java.awt.event.ActionEvent e) {
+					execute("OK");
+				}
+			});
+		}
+		return btnOk;
+	}
+
+	/**
+	 * This method initializes btnCancel
+	 *
+	 * @return javax.swing.JButton
+	 */
+	private JButton getBtnCancel() {
+		if (btnCancel == null) {
+			btnCancel = new JButton();
+			btnCancel.setText(Messages.getText("cancel"));
+			btnCancel.addActionListener(new java.awt.event.ActionListener() {
+				public void actionPerformed(java.awt.event.ActionEvent e) {
+					execute("CANCEL");
+				}
+			});
+		}
+		return btnCancel;
+	}
+
+	/**
+	 * This method initializes txtAbstract
+	 *
+	 * @return javax.swing.JTextArea
+	 */
+	private JTextArea getTxtAbstract() {
+		if (txtAbstract == null) {
+			txtAbstract = new JTextArea();
+		}
+		return txtAbstract;
+	}
+
+	/**
+	 * This method initializes scrlAbstract
+	 *
+	 * @return javax.swing.JScrollPane
+	 */
+	private JScrollPane getScrlAbstract() {
+		if (scrlAbstract == null) {
+			scrlAbstract = new JScrollPane();
+			scrlAbstract.setBounds(115, 27, 232, 48);
+			scrlAbstract.setViewportView(getTxtAbstract());
+		}
+		return scrlAbstract;
+	}
+
+	/**
+	 * This method initializes txtLogoURL
+	 *
+	 * @return javax.swing.JTextField
+	 */
+	private JTextField getTxtLogoURL() {
+		if (txtLogoURL == null) {
+			txtLogoURL = new JTextField();
+			txtLogoURL.setBounds(115, 130, 407, 20);
+		}
+		return txtLogoURL;
+	}
+
+	/**
+	 * This method initializes jTextField
+	 *
+	 * @return javax.swing.JTextField
+	 */
+	private JTextField getTxtDescriptionURL() {
+		if (txtDescriptionURL == null) {
+			txtDescriptionURL = new JTextField();
+			txtDescriptionURL.setBounds(115, 104, 232, 20);
+		}
+		return txtDescriptionURL;
+	}
+
+	/**
+	 * This method initializes pnlMapSize
+	 *
+	 * @return javax.swing.JPanel
+	 */
+	private JPanel getPnlMapSize() {
+		if (pnlMapSize == null) {
+			ButtonGroup group = new ButtonGroup();
+			lblHeight = new JLabel();
+			lblHeight.setText(Messages.getText("height"));
+			lblHeight.setBounds(11, 79, 52, 20);
+			lblHeight.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
+			lblHeight.setEnabled(false);
+			lblHeight.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+			lblWidth = new JLabel();
+			lblWidth.setText(Messages.getText("width"));
+			lblWidth.setBounds(11, 56, 52, 20);
+			lblWidth.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+			lblWidth.setEnabled(false);
+			lblWidth.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
+			pnlMapSize = new JPanel();
+			pnlMapSize.setLayout(null);
+			pnlMapSize.setBounds(351, 19, 179, 108);
+			pnlMapSize.setBorder(javax.swing.BorderFactory.createTitledBorder(
+					  null, Messages.getText("map_size_in_pixels"),
+					  javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
+					  javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));
+			pnlMapSize.add(getRdBtnUseViewSize(), null);
+			pnlMapSize.add(getRdBtnCustomSize(), null);
+			pnlMapSize.add(lblWidth, null);
+			pnlMapSize.add(lblHeight, null);
+			pnlMapSize.add(getTxtWidth(), null);
+			pnlMapSize.add(getTxtHeight(), null);
+			group.add(getRdBtnUseViewSize());
+			group.add(getRdBtnCustomSize());
+
+		}
+		return pnlMapSize;
+	}
+
+	/**
+	 * This method initializes rdBtnUseViewSize
+	 *
+	 * @return javax.swing.JRadioButton
+	 */
+	private JRadioButton getRdBtnUseViewSize() {
+		if (rdBtnUseViewSize == null) {
+			rdBtnUseViewSize = new JRadioButton();
+			rdBtnUseViewSize.setBounds(8, 16, 142, 20);
+			rdBtnUseViewSize.setText(Messages.getText("use_view_size"));
+			rdBtnUseViewSize.addItemListener(new java.awt.event.ItemListener() {
+				public void itemStateChanged(java.awt.event.ItemEvent e) {
+					boolean b = !getRdBtnUseViewSize().isSelected();
+
+					getTxtWidth().setEnabled(b);
+					getTxtHeight().setEnabled(b);
+				}
+			});
+			rdBtnUseViewSize.setSelected(true);
+		}
+		return rdBtnUseViewSize;
+	}
+
+	/**
+	 * This method initializes jRadioButton
+	 *
+	 * @return javax.swing.JRadioButton
+	 */
+	private JRadioButton getRdBtnCustomSize() {
+		if (rdBtnCustomSize == null) {
+			rdBtnCustomSize = new JRadioButton();
+			rdBtnCustomSize.setBounds(8, 34, 142, 20);
+			rdBtnCustomSize.setText(Messages.getText("use_custom_size"));
+		}
+		return rdBtnCustomSize;
+	}
+
+	/**
+	 * This method initializes txtWidth
+	 *
+	 * @return javax.swing.JTextField
+	 */
+	private JTextField getTxtWidth() {
+		if (txtWidth == null) {
+			txtWidth = new JTextField();
+			txtWidth.setBounds(66, 56, 105, 20);
+			txtWidth.setEnabled(false);
+			txtWidth.addKeyListener(new java.awt.event.KeyAdapter() {
+				public void keyTyped(java.awt.event.KeyEvent e) {
+					try {
+						String text = getTxtWidth().getText();
+						Integer.parseInt(text);
+						lastWidth = text;
+					} catch (Exception ex) {
+						getTxtWidth().setText(lastWidth);
+					}
+				}
+			});
+			Dimension sz = exportableViews[getCmbViews()
+				                            .getSelectedIndex()]
+				                            .getMapContext()
+				                            .getViewPort()
+				                            .getImageSize();
+			lastWidth = (sz != null)? (int) sz.getWidth()+"": defaultWidth+"";
+
+			txtWidth.setText(lastWidth);
+		}
+		return txtWidth;
+	}
+
+	/**
+	 * This method initializes jTextField
+	 *
+	 * @return javax.swing.JTextField
+	 */
+	private JTextField getTxtHeight() {
+		if (txtHeight == null) {
+			txtHeight = new JTextField();
+			txtHeight.setBounds(66, 79, 105, 20);
+			txtHeight.setEnabled(false);
+			txtHeight.addKeyListener(new java.awt.event.KeyAdapter() {
+				public void keyTyped(java.awt.event.KeyEvent e) {
+					try {
+						String text = getTxtHeight().getText();
+						Integer.parseInt(text);
+						lastHeight = text;
+					} catch (Exception ex) {
+						getTxtHeight().setText(lastHeight);
+					}
+				}
+			});
+			Dimension sz = exportableViews[getCmbViews()
+				                            .getSelectedIndex()]
+				                            .getMapContext()
+				                            .getViewPort()
+				                            .getImageSize();
+			lastHeight = (sz != null)? (int) sz.getHeight()+"": defaultHeight+"";
+			txtHeight.setText(lastHeight);
+		}
+		return txtHeight;
+	}
+
+	/**
+	 * This method initializes pnlContactInfo
+	 *
+	 * @return javax.swing.JPanel
+	 */
+	private JPanel getPnlContactInfo() {
+		if (pnlContactInfo == null) {
+			lblEMail = new JLabel();
+			lblEMail.setBounds(7, 193, 98, 20);
+			lblEMail.setHorizontalTextPosition(SwingConstants.RIGHT);
+			lblEMail.setHorizontalAlignment(SwingConstants.RIGHT);
+			lblEMail.setText(Messages.getText("e-mail")+":");
+			lblFax = new JLabel();
+			lblFax.setBounds(274, 168, 57, 20);
+			lblFax.setHorizontalTextPosition(SwingConstants.RIGHT);
+			lblFax.setHorizontalAlignment(SwingConstants.RIGHT);
+			lblFax.setText(Messages.getText("fax")+":");
+			lblPostCode = new JLabel();
+			lblPostCode.setBounds(7, 143, 98, 20);
+			lblPostCode.setHorizontalTextPosition(SwingConstants.RIGHT);
+			lblPostCode.setHorizontalAlignment(SwingConstants.RIGHT);
+			lblPostCode.setText(Messages.getText("postcode")+":");
+			lblPhone = new JLabel();
+			lblPhone.setBounds(7, 168, 98, 20);
+			lblPhone.setHorizontalTextPosition(SwingConstants.RIGHT);
+			lblPhone.setHorizontalAlignment(SwingConstants.RIGHT);
+			lblPhone.setText(Messages.getText("telephone")+":");
+			lblCountry = new JLabel();
+			lblCountry.setBounds(274, 143, 57, 20);
+			lblCountry.setText(Messages.getText("country")+":");
+			lblCountry.setHorizontalTextPosition(SwingConstants.RIGHT);
+			lblCountry.setHorizontalAlignment(SwingConstants.RIGHT);
+			lblStateProvince = new JLabel();
+			lblStateProvince.setBounds(252, 119, 111, 20);
+			lblStateProvince.setText(Messages.getText("state_or_province")+":");
+			lblStateProvince.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+			lblStateProvince.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
+
+			lblCity = new JLabel();
+			lblCity.setBounds(7, 119, 98, 20);
+			lblCity.setText(Messages.getText("city")+":");
+			lblCity.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+			lblCity.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
+			lblContactPosition = new JLabel();
+			lblContactPosition.setBounds(6, 69, 99, 20);
+			lblContactPosition.setHorizontalTextPosition(SwingConstants.RIGHT);
+			lblContactPosition.setHorizontalAlignment(SwingConstants.RIGHT);
+			lblContactPosition.setText(Messages.getText("contact_position"));
+			lblContactOrganization = new JLabel();
+			lblContactOrganization.setBounds(6, 44, 99, 20);
+			lblContactOrganization.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
+			lblContactOrganization.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+			lblContactOrganization.setText(Messages.getText("contact_organization")+":");
+			lblAddress = new JLabel();
+			lblAddress.setBounds(6, 94, 99, 20);
+			lblAddress.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+			lblAddress.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
+			lblAddress.setText(Messages.getText("address"));
+
+			lblContactPerson = new JLabel();
+			lblContactPerson.setText(Messages.getText("contact_person")+":");
+			lblContactPerson.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+			lblContactPerson.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
+			lblContactPerson.setBounds(6, 19, 99, 20);
+			pnlContactInfo = new JPanel();
+			pnlContactInfo.setLayout(null);
+			pnlContactInfo.setBorder(javax.swing.BorderFactory.createTitledBorder(
+					  null, Messages.getText("contact_info"),
+					  javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
+					  javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));
+			pnlContactInfo.setLocation(4, 158);
+			pnlContactInfo.setSize(527, 223);
+			pnlContactInfo.add(lblContactPerson, null);
+			pnlContactInfo.add(getTxtContactPerson(), null);
+			pnlContactInfo.add(lblContactOrganization, null);
+			pnlContactInfo.add(getTxtOrganization(), null);
+			pnlContactInfo.add(lblContactPosition, null);
+			pnlContactInfo.add(getTxtContactPosition(), null);
+			pnlContactInfo.add(lblAddress, null);
+			pnlContactInfo.add(getTxtAddress(), null);
+			pnlContactInfo.add(lblCity, null);
+			pnlContactInfo.add(getTxtCity(), null);
+			pnlContactInfo.add(lblStateProvince, null);
+			pnlContactInfo.add(getCmbCountries(), null);
+			pnlContactInfo.add(getTxtStateOrProvince(), null);
+			pnlContactInfo.add(lblPostCode, null);
+			pnlContactInfo.add(getTxtPostCode(), null);
+			pnlContactInfo.add(lblCountry, null);
+			pnlContactInfo.add(lblPhone, null);
+			pnlContactInfo.add(getTxtTelephone(), null);
+			pnlContactInfo.add(lblFax, null);
+			pnlContactInfo.add(getTxtFax(), null);
+			pnlContactInfo.add(lblEMail, null);
+			pnlContactInfo.add(getTxtEMail(), null);
+		}
+		return pnlContactInfo;
+	}
+
+	/**
+	 * This method initializes jTextField1
+	 *
+	 * @return javax.swing.JTextField
+	 */
+	private JTextField getTxtKeyWords() {
+		if (txtKeyWords == null) {
+			txtKeyWords = new JTextField();
+			txtKeyWords.setBounds(115, 79, 232, 20);
+		}
+		return txtKeyWords;
+	}
+
+	/**
+	 * This method initializes jTextField1
+	 *
+	 * @return javax.swing.JTextField
+	 */
+	private JTextField getTxtContactPerson() {
+		if (txtContactPerson == null) {
+			txtContactPerson = new JTextField();
+			txtContactPerson.setBounds(111, 19, 407, 20);
+		}
+		return txtContactPerson;
+	}
+
+	/**
+	 * This method initializes jTextField2
+	 *
+	 * @return javax.swing.JTextField
+	 */
+	private JTextField getTxtOrganization() {
+		if (txtOrganization == null) {
+			txtOrganization = new JTextField();
+			txtOrganization.setBounds(111, 44, 407, 20);
+		}
+		return txtOrganization;
+	}
+
+	/**
+	 * This method initializes jTextField
+	 *
+	 * @return javax.swing.JTextField
+	 */
+	private JTextField getTxtContactPosition() {
+		if (txtContactPosition == null) {
+			txtContactPosition = new JTextField();
+			txtContactPosition.setBounds(111, 69, 407, 20);
+		}
+		return txtContactPosition;
+	}
+
+	/**
+	 * This method initializes txtAddress
+	 *
+	 * @return javax.swing.JTextField
+	 */
+	private JTextField getTxtAddress() {
+		if (txtAddress == null) {
+			txtAddress = new JTextField();
+			txtAddress.setBounds(111, 94, 407, 20);
+		}
+		return txtAddress;
+	}
+
+	/**
+	 * This method initializes txtCity
+	 *
+	 * @return javax.swing.JTextField
+	 */
+	private JTextField getTxtCity() {
+		if (txtCity == null) {
+			txtCity = new JTextField();
+			txtCity.setBounds(111, 119, 135, 20);
+		}
+		return txtCity;
+	}
+
+	/**
+	 * This method initializes txtStateOrProvince
+	 *
+	 * @return javax.swing.JTextField
+	 */
+	private JTextField getTxtStateOrProvince() {
+		if (txtStateOrProvince == null) {
+			txtStateOrProvince = new JTextField();
+			txtStateOrProvince.setBounds(368, 119, 150, 20);
+		}
+		return txtStateOrProvince;
+	}
+
+	/**
+	 * This method initializes txtPostCode
+	 *
+	 * @return javax.swing.JTextField
+	 */
+	private JTextField getTxtPostCode() {
+		if (txtPostCode == null) {
+			txtPostCode = new JTextField();
+			txtPostCode.setBounds(111, 143, 159, 20);
+		}
+		return txtPostCode;
+	}
+
+	/**
+	 * This method initializes cmbCountries
+	 *
+	 * @return javax.swing.JComboBox
+	 */
+	private JComboBox getCmbCountries() {
+		if (cmbCountries == null) {
+			cmbCountries = new JComboBox();
+			cmbCountries.setBounds(336, 143, 182, 20);
+			String[] countries = Messages.getText("countries_of_the_world").split(";");
+			for (int i = 0; i < countries.length; i++) {
+				cmbCountries.addItem(countries[i]);
+			}
+		}
+		return cmbCountries;
+	}
+
+	/**
+	 * This method initializes txtTelephone
+	 *
+	 * @return javax.swing.JTextField
+	 */
+	private JTextField getTxtTelephone() {
+		if (txtTelephone == null) {
+			txtTelephone = new JTextField();
+			txtTelephone.setBounds(111, 168, 159, 20);
+		}
+		return txtTelephone;
+	}
+
+	/**
+	 * This method initializes txtFax
+	 *
+	 * @return javax.swing.JTextField
+	 */
+	private JTextField getTxtFax() {
+		if (txtFax == null) {
+			txtFax = new JTextField();
+			txtFax.setBounds(336, 168, 182, 20);
+		}
+		return txtFax;
+	}
+
+	/**
+	 * This method initializes txtEMail
+	 *
+	 * @return javax.swing.JTextField
+	 */
+	private JTextField getTxtEMail() {
+		if (txtEMail == null) {
+			txtEMail = new JTextField();
+			txtEMail.setBounds(111, 193, 407, 20);
+		}
+		return txtEMail;
+	}
+
+	public Object getWindowModel() {
+		return Messages.getText("web_map_context_settings");
+	}
+
+	@SuppressWarnings({ "deprecation", "unchecked" })
+	private void execute(String actionCommand) {
+		if ("OK".equals(actionCommand)) {
+			String str = getTxtFile().getText();
+			if (str==null || str.equals("")) {
+				JOptionPane.showMessageDialog(this, Messages.getText("must_specify_a_file"), Messages.getText("error"), JOptionPane.ERROR_MESSAGE);
+				return;
+			}
+			DefaultViewDocument theView = exportableViews[getCmbViews().getSelectedIndex()];
+			MapContext mc = theView.getMapContext();
+			wmc = new WebMapContext();
+
+			// Version
+			wmc.fileVersion = (String) getCmbVersion().getSelectedItem();
+
+			// Web Map Context size
+			if (advanced) {
+				if (getRdBtnUseViewSize().isSelected()) {
+					// View's size
+					Dimension sz = null;
+					if (mc.getViewPort().getImageSize()!=null) {
+						sz = new Dimension(mc.getViewPort().getImageSize());
+					}
+					if (sz == null || (int) sz.getHeight()==0 || (int) sz.getWidth()==0) {
+						// View's size is not initialized, will use default size.
+						sz = new Dimension(defaultWidth, defaultHeight);
+					}
+					wmc.windowSize = sz;
+				} else {
+					// User defined size
+					try {
+					wmc.windowSize = new Dimension(Integer.parseInt(getTxtWidth().getText()),
+												   Integer.parseInt(getTxtHeight().getText()));
+					} catch (Exception e) {
+						JOptionPane.showMessageDialog(this, Messages.getText("invalid_dimension_values"), PluginServices.getText(this, "error"), JOptionPane.ERROR_MESSAGE);
+						return;
+					}
+				}
+			}
+			// SRS
+			wmc.srs = mc.getProjection().getAbrev();
+
+			// Bounding Box
+			if (useFullExtent) {
+				try {
+					wmc.bBox = this.getRectable2DFromEnvelope(mc
+							.getFullEnvelope());
+				} catch (ReadException e) {
+					NotificationManager.addError(e);
+					return;
+				}
+			} else {
+				wmc.bBox = this.getRectable2DFromEnvelope(mc.getViewPort()
+						.getAdjustedExtent());
+			}
+
+			// Title
+			str = getTxtTitle().getText();
+			if (str!=null && !str.equals("")) {
+				wmc.title = str;
+			} else {
+				JOptionPane.showMessageDialog(this, getTxtTitle().getName() + " " + Messages.getText("is_required"), Messages.getText("error"), JOptionPane.ERROR_MESSAGE);
+				return;
+			}
+
+			// ID
+			str = getTxtId().getText();
+			if (str!=null && !str.equals("")) {
+				wmc.id = str;
+			} else {
+				JOptionPane.showMessageDialog(this, getTxtId().getName() + " " + Messages.getText("is_required"), Messages.getText("error"), JOptionPane.ERROR_MESSAGE);
+				return;
+			}
+
+			wmc.xmlns = WebMapContextTags.XMLNS_VALUE;
+			wmc.xmlns_xlink = WebMapContextTags.XMLNS_XLINK_VALUE;
+			wmc.xmlns_xsi = WebMapContextTags.XMLNS_XSI_VALUE;
+			wmc.xsi_schemaLocation = WebMapContextTags.XSI_SCHEMA_LOCATION_VALUE;
+
+			// Abstract
+			str = getTxtAbstract().getText();
+			if (str!=null && !str.equals("")) {
+				wmc._abstract = str;
+			}
+
+			// Keyword list
+			str = getTxtKeyWords().getText();
+			if (str!=null && !str.equals("")) {
+				String[] ss = str.split("[, ;:]+"); // sequence of spaces, commas, colons or semicolons will be treated as word separator
+				for (int i = 0; i < ss.length; i++) {
+					if (wmc.keywordList==null) {
+						wmc.keywordList = new ArrayList();
+					}
+					wmc.keywordList.add(ss[i]);
+				}
+			}
+
+			// Logo URL
+			str = getTxtLogoURL().getText();
+			if (str!=null && !str.equals("")) {
+				wmc.logoURL = str;
+			}
+
+			wmc.logoURLSize = null;			// yet skiped
+			wmc.logoURLFormat = null;		// yet skiped
+			wmc.descriptionURLFormat = null;// yet skiped
+
+			// Description URL
+			str = getTxtLogoURL().getText();
+			if (str!=null && !str.equals("")) {
+				wmc.descriptionURL = str;
+			}
+
+			// Contact Person
+			str = getTxtContactPerson().getText();
+			if (str!=null && !str.equals("")) {
+				wmc.contactPerson = str;
+				wmc.contactInfo = true;
+			}
+
+			// Contact Organization
+			str = getTxtOrganization().getText();
+			if (str!=null && !str.equals("")) {
+				wmc.contactOrganization = str;
+				wmc.contactInfo = true;
+			}
+
+			// Contact Position
+			str = getTxtContactPosition().getText();
+			if (str!=null && !str.equals("")) {
+				wmc.contactPosition = str;
+				wmc.contactInfo = true;
+			}
+
+			// Address
+			str = getTxtAddress().getText();
+			if (str!=null && !str.equals("")) {
+				wmc.address = str;
+				wmc.contactInfo = true;
+			}
+
+			// City
+			str = getTxtCity().getText();
+			if (str!=null && !str.equals("")) {
+				wmc.city = str;
+				wmc.contactInfo = true;
+			}
+
+			// State/Province
+			str = getTxtStateOrProvince().getText();
+			if (str!=null && !str.equals("")) {
+				wmc.stateOrProvince = str;
+				wmc.contactInfo = true;
+			}
+
+			// Postcode
+			str = getTxtPostCode().getText();
+			if (str!=null && !str.equals("")) {
+				wmc.postCode = str;
+			}
+
+			// Country
+			str = (String) getCmbCountries().getSelectedItem();
+			if (str!=null && !str.equals("")) {
+				wmc.country = str;
+			}
+
+			// Telephone
+			str = getTxtTelephone().getText();
+			if (str!=null && !str.equals("")) {
+				wmc.telephone = str;
+				wmc.contactInfo = true;
+			}
+
+			// Fax
+			str = getTxtFax().getText();
+			if (str!=null && !str.equals("")) {
+				wmc.fax = str;
+				wmc.contactInfo = true;
+			}
+
+			// e-mail
+			str = getTxtEMail().getText();
+			if (str!=null && !str.equals("")) {
+				wmc.email = str;
+				wmc.contactInfo = true;
+			}
+
+			ExportWebMapContextExtension exp = (ExportWebMapContextExtension)
+			PluginServices.
+			getExtension(ExportWebMapContextExtension.class);
+			exp.execute("DO_EXPORT");
+			PluginServices.getMDIManager().closeWindow(this);
+		} else if ("CANCEL".equals(actionCommand)) {
+			PluginServices.getMDIManager().closeWindow(this);
+		}
+	}
+
+	public String getXML() {
+		return wmc.toXML(exportableViews[getCmbViews().getSelectedIndex()]);
+	}
+
+	public File getTargetFile() {
+		if (targetFile == null) {
+			String fileName = getTxtFile().getText();
+			if (fileName != null) {
+				targetFile = new File(fileName);
+			}
+		}
+		return targetFile;
+	}
+
+	/**
+	 * This method initializes cmbViews
+	 *
+	 * @return javax.swing.JComboBox
+	 */
+	private JComboBox getCmbViews() {
+		if (cmbViews == null) {
+			cmbViews = new JComboBox();
+			cmbViews.setBounds(91, 24, 432, 21);
+			cmbViews.addItemListener(new java.awt.event.ItemListener() {
+				public void itemStateChanged(java.awt.event.ItemEvent e) {
+					DefaultViewDocument theView = exportableViews[getCmbViews().getSelectedIndex()];
+					Dimension sz = theView.getMapContext().
+										   getViewPort().
+										   getImageSize();
+					if (sz == null || (int) sz.getHeight()==0 || (int) sz.getWidth()==0) {
+						sz = new Dimension(defaultWidth, defaultHeight);
+					}
+
+					getTxtWidth().setText((int) sz.getWidth()+"");
+					getTxtHeight().setText((int) sz.getHeight()+"");
+					getTxtTitle().setText(theView.getName());
+				}
+			});
+			for (int i = 0; i < exportableViews.length; i++) {
+				cmbViews.addItem(exportableViews[i].getName());
+			}
+		}
+		return cmbViews;
+	}
+
+	/**
+	 * This method initializes rdCurrentViewExtent
+	 *
+	 * @return javax.swing.JRadioButton
+	 */
+	private JRadioButton getRdBtnCurrentViewExtent() {
+		if (rdBtnCurrentViewExtent == null) {
+			rdBtnCurrentViewExtent = new JRadioButton();
+			rdBtnCurrentViewExtent.setBounds(91, 146, 270, 20);
+			rdBtnCurrentViewExtent.setText(Messages.getText("defined_by_view_extent"));
+			rdBtnCurrentViewExtent.addItemListener(new java.awt.event.ItemListener() {
+				public void itemStateChanged(java.awt.event.ItemEvent e) {
+					fPrefs.putBoolean("use_full_extent", !getRdBtnFullExtent().isSelected());
+				}
+			});
+			rdBtnCurrentViewExtent.setSelected(!useFullExtent);
+		}
+		return rdBtnCurrentViewExtent;
+	}
+
+	/**
+	 * This method initializes rdBtnFullExtent
+	 *
+	 * @return javax.swing.JRadioButton
+	 */
+	private JRadioButton getRdBtnFullExtent() {
+		if (rdBtnFullExtent == null) {
+			rdBtnFullExtent = new JRadioButton();
+			rdBtnFullExtent.setBounds(91, 164, 270, 20);
+			rdBtnFullExtent.setText(Messages.getText("use_full_extent"));
+			rdBtnFullExtent.addItemListener(new java.awt.event.ItemListener() {
+				public void itemStateChanged(java.awt.event.ItemEvent e) {
+					boolean b = getRdBtnFullExtent().isSelected();
+					fPrefs.putBoolean("use_full_extent", b);
+					useFullExtent = b;
+				}
+			});
+			rdBtnFullExtent.setSelected(useFullExtent);
+		}
+		return rdBtnFullExtent;
+	}
+
+	public Object getWindowProfile() {
+		return WindowInfo.PROPERTIES_PROFILE;
+	}
+
+	private Rectangle2D.Double getRectable2DFromEnvelope(Envelope env) {
+		return new Rectangle2D.Double(env.getMinimum(0), env.getMinimum(1), env
+				.getLength(0), env.getLength(1));
+	}
+}

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/WebMapContextSettingsPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/StylesPanel.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/StylesPanel.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/StylesPanel.java	(revision 21019)
@@ -0,0 +1,80 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+ 
+package org.gvsig.raster.wms.app.wmsclient.gui.panel;
+
+import javax.swing.JScrollPane;
+
+import org.gvsig.gui.beans.DefaultBean;
+
+
+/**
+ * This is the Styles tab of the WMS wizard.
+ *
+ * @author jaume dominguez faus - jaume.dominguez@iver.es
+ *
+ */
+class StylesPanel extends DefaultBean{
+    private JScrollPane jScrollPane = null;
+    private StyleTree treeStyles = null;
+    private WMSParamsPanel parent;
+
+    public StylesPanel(WMSParamsPanel parent){
+        super();
+        setLayout(null);
+        add(getJScrollPane(), null);
+        this.parent = parent;
+    }
+    /**
+     * This method initializes jScrollPane3
+     *
+     * @return javax.swing.JScrollPane
+     */
+    private JScrollPane getJScrollPane() {
+        if (jScrollPane == null) {
+            jScrollPane = new JScrollPane();
+            jScrollPane.setBounds(7, 10, 483, 367);
+            jScrollPane.setViewportView(getStyleTree());
+        }
+        return jScrollPane;
+    }
+
+    /**
+     * This method initializes treeStyles
+     *
+     * @return javax.swing.JTree
+     */
+    public StyleTree getStyleTree() {
+        if (treeStyles == null) {
+            treeStyles = new StyleTree();
+            treeStyles.addMouseListener(new java.awt.event.MouseAdapter() {
+            	public void mouseClicked(java.awt.event.MouseEvent e) {
+
+            		StyleTreeModel model = (StyleTreeModel) treeStyles.getModel();
+            		//callValueChanged(model.getStylesSelection(/*parent.selectedLayersToArray()*/));
+            		callValueChanged(null);
+            	}
+            });
+        }
+        return treeStyles;
+    }
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/StylesPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/DimensionPanel.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/DimensionPanel.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/DimensionPanel.java	(revision 21019)
@@ -0,0 +1,755 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+ 
+package org.gvsig.raster.wms.app.wmsclient.gui.panel;
+
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.Vector;
+
+import javax.swing.ButtonGroup;
+import javax.swing.JButton;
+import javax.swing.JEditorPane;
+import javax.swing.JLabel;
+import javax.swing.JList;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.JScrollPane;
+import javax.swing.JTextField;
+
+import org.gvsig.andami.PluginServices;
+import org.gvsig.gui.beans.DefaultBean;
+import org.gvsig.gui.beans.Pager;
+import org.gvsig.gui.beans.listeners.BeanListener;
+import org.gvsig.raster.wms.io.time.RemoteTimeDimension;
+
+
+/**
+ * This is the Dimensions tab of the WMS wizard.
+ *
+ * @author jaume
+ *
+ */
+public class DimensionPanel extends DefaultBean {
+	private static final long serialVersionUID = 1L;
+	static private final int SINGLE_VALUE = 0;
+	static private final int MULTIPLE_VALUE = 1;
+	static private final int INTERVAL = 2;
+	private final String bgColor0 = "\"#FEEDD6\""; // light salmon
+	private final String bgColor2 = "\"#F2FEFF\""; // light blue
+	private Pager pager = null;
+	private JPanel valueEditionPanel = null;
+	private JRadioButton rdBtnSingle = null;
+	private JRadioButton rdBtnMultiple = null;
+	private JRadioButton rdBtnInterval = null;
+	private JButton btnAdd = null;
+	private JTextField txt = null;
+	private JScrollPane scrlDimension = null;
+	private JList lstDimensions = null;
+	private JPanel editionPanel = null;
+	private JScrollPane scrDimInfo = null;
+	private JEditorPane infoEditor = null;
+	private JPanel valuePanel = null;
+	private JButton btnSet = null;
+	private JButton btnClear = null;
+	private JLabel lblValue = null;
+	private JLabel lblValueText = null;
+	private int currentSelectedValue;
+	private int mode;
+	private boolean incomplete = true;
+	private boolean userEdits = false;
+	private RemoteTimeDimension[] dim;
+	private RemoteTimeDimension currentDimension;
+	private Hashtable<String, Value> settings = new Hashtable<String, Value>();
+
+	/**
+	 * Will contain the settings for a getMap query which are just text. Since
+	 * only one Dimension definition expression is allowed the key for this hash
+	 * map is the dimension name.
+	 *
+	 * <b>key:</b> dimension name as string <br>
+	 * <b>value:</b> dimension value as string
+	 */
+	private Vector<Integer> indices = new Vector<Integer>();
+
+	/**
+	 * This is the default constructor
+	 */
+	public DimensionPanel() {
+		super();
+		initialize();
+	}
+
+	/**
+	 * This method initializes this
+	 *
+	 * @return void
+	 */
+	private void initialize() {
+		this.setLayout(null);
+		this.setSize(475, 427);
+		this.setBorder(javax.swing.BorderFactory.createTitledBorder(null,
+				PluginServices.getText(this, "dimension"),
+				javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
+				javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));
+		this.add(getValuePanel(), null);
+		this.add(getEditionPanel(), null);
+	}
+
+	/**
+	 * This method initializes jPanel
+	 *
+	 * @return javax.swing.JPanel
+	 */
+	private Pager getJPanel() {
+		if (pager == null) {
+			pager = new Pager(Pager.HORIZONTAL);
+			pager.setBounds(5, 20, 240, 50);
+			pager.addListener(new BeanListener() {
+				public void beanValueChanged(Object value) {
+					currentSelectedValue = ((Integer) value).intValue();
+					lblValueText.setText(currentDimension
+							.valueAt(currentSelectedValue));
+				}
+			});
+		}
+		return pager;
+	}
+
+	/**
+	 * This method initializes jPanel1
+	 *
+	 * @return javax.swing.JPanel
+	 */
+	private JPanel getJPanel1() {
+		if (valueEditionPanel == null) {
+			ButtonGroup group = new ButtonGroup();
+			lblValueText = new JLabel();
+			lblValueText.setBounds(54, 4, 190, 20);
+			lblValueText.setText("");
+			lblValue = new JLabel();
+			lblValue.setBounds(7, 4, 45, 20);
+			lblValue.setText(PluginServices.getText(this, "value") + ":");
+			lblValue.setFont(new java.awt.Font("MS Sans Serif",
+					java.awt.Font.BOLD, 11));
+			valueEditionPanel = new JPanel();
+			valueEditionPanel.setLayout(null);
+			valueEditionPanel.setBounds(228, 12, 245, 214);
+			valueEditionPanel.add(getRdBtnSingleValue(), null);
+			valueEditionPanel.add(getRdBtnMultipleValue(), null);
+			valueEditionPanel.add(getRdBtnInterval(), null);
+			valueEditionPanel.add(getBtnAdd(), null);
+			valueEditionPanel.add(getTxt(), null);
+			valueEditionPanel.add(getBtnSet(), null);
+			valueEditionPanel.add(getBtnClear(), null);
+			valueEditionPanel.add(getJPanel(), null);
+			valueEditionPanel.add(lblValue, null);
+			valueEditionPanel.add(lblValueText, null);
+			group.add(getRdBtnSingleValue());
+			group.add(getRdBtnMultipleValue());
+			group.add(getRdBtnInterval());
+		}
+		return valueEditionPanel;
+	}
+
+	/**
+	 * This method initializes jRadioButton
+	 *
+	 * @return javax.swing.JRadioButton
+	 */
+	private JRadioButton getRdBtnSingleValue() {
+		if (rdBtnSingle == null) {
+			rdBtnSingle = new JRadioButton();
+			rdBtnSingle.setBounds(7, 70, 180, 20);
+			rdBtnSingle.addActionListener(new java.awt.event.ActionListener() {
+				public void actionPerformed(java.awt.event.ActionEvent e) {
+					mode = SINGLE_VALUE;
+					txt.setText("");
+				}
+			});
+			rdBtnSingle.setText(PluginServices.getText(this, "single_value"));
+		}
+		return rdBtnSingle;
+	}
+
+	/**
+	 * This method initializes jRadioButton1
+	 *
+	 * @return javax.swing.JRadioButton
+	 */
+	private JRadioButton getRdBtnMultipleValue() {
+		if (rdBtnMultiple == null) {
+			rdBtnMultiple = new JRadioButton();
+			rdBtnMultiple.setBounds(7, 89, 180, 20);
+			rdBtnMultiple
+					.addActionListener(new java.awt.event.ActionListener() {
+						public void actionPerformed(java.awt.event.ActionEvent e) {
+							mode = MULTIPLE_VALUE;
+							txt.setText("");
+						}
+					});
+			rdBtnMultiple.setText(PluginServices
+					.getText(this, "multiple_value"));
+		}
+		return rdBtnMultiple;
+	}
+
+	/**
+	 * This method initializes jRadioButton2
+	 *
+	 * @return javax.swing.JRadioButton
+	 */
+	private JRadioButton getRdBtnInterval() {
+		if (rdBtnInterval == null) {
+			rdBtnInterval = new JRadioButton();
+			rdBtnInterval.setBounds(7, 108, 180, 20);
+			rdBtnInterval
+					.addActionListener(new java.awt.event.ActionListener() {
+						public void actionPerformed(java.awt.event.ActionEvent e) {
+							mode = INTERVAL;
+							txt.setText("");
+						}
+					});
+			rdBtnInterval.setText(PluginServices.getText(this, "interval"));
+		}
+		return rdBtnInterval;
+	}
+
+	/**
+	 * This method initializes btnAdd
+	 *
+	 * @return javax.swing.JButton
+	 */
+	private JButton getBtnAdd() {
+		if (btnAdd == null) {
+			btnAdd = new JButton();
+			btnAdd.setBounds(7, 130, 110, 20);
+			btnAdd.addActionListener(new java.awt.event.ActionListener() {
+				public void actionPerformed(java.awt.event.ActionEvent e) {
+					execute("add");
+				}
+			});
+			btnAdd.setText(PluginServices.getText(this, "add"));
+		}
+		return btnAdd;
+	}
+
+	private boolean execute(String actionCommand) {
+		boolean b = true;
+		if (actionCommand.equals("add")) {
+			if (lblValueText.getText() != null && !lblValueText.equals("")) {
+				Integer newIndex = new Integer(currentSelectedValue);
+				switch (mode) {
+				case SINGLE_VALUE:
+					txt.setText(lblValueText.getText());
+					indices.clear();
+					indices.add(newIndex);
+					break;
+				case MULTIPLE_VALUE:
+					String oldText = txt.getText();
+					if (oldText == null || oldText.equals(""))
+						txt.setText(lblValueText.getText());
+					else
+						txt.setText(oldText + "," + lblValueText.getText());
+					indices.add(newIndex);
+					break;
+				case INTERVAL:
+					if (txt.getText().indexOf("/") == -1) {
+						txt.setText(lblValueText.getText() + "/");
+						indices.add(newIndex);
+						indices.add(newIndex);
+						incomplete = true;
+					} else {
+						if (incomplete) {
+							txt.setText(txt.getText() + lblValueText.getText());
+							indices.set(1, newIndex);
+							incomplete = false;
+						}
+					}
+					break;
+				}
+			}
+		} else if (actionCommand.equals("clear")) {
+			txt.setText("");
+			incomplete = true;
+			userEdits = false;
+			indices.clear();
+			if(currentDimension != null)
+				settings.remove(currentDimension.getName());
+			callValueChanged(getDimensions());
+		} else if (actionCommand.equals("set")) {
+
+			/*
+			 * Two kinds of input data is accepted: - An array of Integer
+			 * representing points which are computed and obtained from the
+			 * application. This ensures that it is a valid value. Depending on
+			 * what is being inserted (single value, interval, or multiple
+			 * values) the array will contain one, two or more Integer.
+			 *  - An user custom expression. The user decides to type-in its own
+			 * expression, and the application assumes that that expression is
+			 * correct and just uses it.
+			 */
+			int type;
+			Object val;
+			if (userEdits) {
+				type = Value.EXPR;
+				val = txt.getText();
+			} else {
+				type = Value.INDEXES;
+				val = (Integer[]) indices.toArray(new Integer[0]);
+			}
+			//settings.put(currentDimension, new Value(type, mode, val));
+			if ((type == Value.EXPR && !((String) val).equals(""))	||
+				(type == Value.INDEXES && ((Integer[]) val).length > 0)){
+				settings.put(currentDimension.getName(), new Value(type, mode, val, currentDimension));
+
+			}
+			callValueChanged(getDimensions());
+		}
+		refreshInfo();
+
+		return b;
+	}
+
+	private void refreshInfo() {
+		String font = "Arial";
+
+		String tableRows = "";
+		boolean switchColor = false;
+		Iterator<String> it = settings.keySet().iterator();
+		while (it.hasNext()) {
+			String name = (String) it.next();
+			Value val = (Value) settings.get(name);
+
+			String dimValue;
+			if (val != null) {
+				if (val.type == Value.INDEXES) {
+					Integer[] ints = val.getIndexes();
+					String separator = val.getMode() == MULTIPLE_VALUE ? "," : "/";
+					String s = "";
+					for (int j = 0; j < ints.length; j++) {
+						s += currentDimension.valueAt(ints[j].intValue());
+						if (j < ints.length - 1)
+							s += separator;
+					}
+					dimValue = s;
+				} else
+					dimValue = val.getExpr();
+			} else
+				dimValue = PluginServices.getText(this, "none_selected");
+
+			RemoteTimeDimension d = val.getOwner();
+			// Handle units and unit symbols
+			String unitSymbol = (d !=null) ? d.getUnitSymbol() : null;
+			String unit = (d !=null) ? d.getUnit() : null;
+			if (unit != null && !unit.equals(""))
+				unit = PluginServices.getText(this, "in") + " " + unit;
+			else
+				unit = "";
+
+			if (unitSymbol != null && !unitSymbol.equals(""))
+				unitSymbol = " (" + unitSymbol + ")";
+			else
+				unitSymbol = "";
+
+			String color = switchColor ? bgColor0 : bgColor2;
+
+			tableRows += "  <tr valign=\"top\" bgcolor="
+					+ color
+					+ ">"
+					+ "    <td width=\"92\" height=\"18\" bgcolor=\"#D6D6D6\" align=\"right\"><font face=\""
+					+ font + "\" size=\"3\">" + "		<b>" + name
+					+ "</b>" + " " + unit + unitSymbol + "</font>" + "	 </td>"
+					+ "    <td width=\"268\"><font face=\"" + font
+					+ "\" size=\"3\">" + dimValue + "</font></td>" + "  </tr>";
+			switchColor = !switchColor;
+		}
+
+		String html = "<html>"
+				+ "<body>"
+				+ "<table align=\"center\" width=\"437\" height=\"156\" border=\"0\" cellpadding=\"4\" cellspacing=\"4\">"
+				+ tableRows + "</table>" + "</body>" + "</html>";
+		getInfoEditor().setContentType("text/html");
+		getInfoEditor().setText(html);
+	}
+
+	/**
+	 * This method initializes txt
+	 *
+	 * @return javax.swing.JTextField
+	 */
+	private JTextField getTxt() {
+		if (txt == null) {
+			txt = new JTextField();
+			txt.setBounds(7, 162, 234, 22);
+			txt.addKeyListener(new java.awt.event.KeyAdapter() {
+				public void keyTyped(java.awt.event.KeyEvent e) {
+					userEdits = true;
+				}
+			});
+		}
+		return txt;
+	}
+
+	/**
+	 * This method initializes scrlDimension
+	 *
+	 * @return javax.swing.JScrollPane
+	 */
+	private JScrollPane getScrlDimension() {
+		if (scrlDimension == null) {
+			scrlDimension = new JScrollPane();
+			scrlDimension.setBounds(5, 17, 220, 209);
+			scrlDimension.setViewportView(getLstDimensions());
+		}
+		return scrlDimension;
+	}
+
+	/**
+	 * This method initializes jList
+	 *
+	 * @return javax.swing.JList
+	 */
+	private JList getLstDimensions() {
+		if (lstDimensions == null) {
+			lstDimensions = new JList();
+			lstDimensions
+					.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
+			lstDimensions
+					.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
+						public void valueChanged(javax.swing.event.ListSelectionEvent e) {
+							try{
+								if (currentDimension != dim[lstDimensions.getSelectedIndex()]) {
+									indices.clear();
+									currentDimension = dim[lstDimensions.getSelectedIndex()];
+								}
+							} catch (ArrayIndexOutOfBoundsException ex) {}
+							refreshEditionPanel();
+						}
+					});
+		}
+		return lstDimensions;
+	}
+
+	protected void refreshEditionPanel() {
+		//Value val = (Value) settings.get(currentDimension);
+		Value val = (Value) settings.get(currentDimension.getName());
+		if (val == null) {
+			lblValueText.setText(currentDimension.valueAt(0));
+			getRdBtnSingleValue().setEnabled(true);
+		} else {
+			int m = val.getMode();
+			String separator;
+
+			if (m == MULTIPLE_VALUE) {
+				getRdBtnMultipleValue().setSelected(true);
+				separator = ",";
+			} else {
+				separator = "/";
+				if (m == SINGLE_VALUE)
+					getRdBtnSingleValue().setSelected(true);
+				else
+					getRdBtnInterval().setSelected(true);
+			}
+
+			// text of VALUE
+			if (val.type == Value.EXPR) {
+				txt.setText(val.getExpr());
+			} else {
+				Integer[] ints = val.getIndexes();
+				String s = "";
+				for (int i = 0; i < ints.length; i++) {
+					s += currentDimension.valueAt(ints[i].intValue());
+					if (i < ints.length - 1)
+						s += separator;
+				}
+				txt.setText(s);
+			}
+		}
+		pager.setItemCount(currentDimension.valueCount());
+		pager.setValue(0, true);
+	}
+
+	/**
+	 * This method initializes editionPanel
+	 *
+	 * @return javax.swing.JPanel
+	 */
+	private JPanel getEditionPanel() {
+		if (editionPanel == null) {
+			editionPanel = new JPanel();
+			editionPanel
+					.setBorder(javax.swing.BorderFactory
+							.createTitledBorder(
+									null,
+									PluginServices.getText(this,
+											"settings_editor"),
+									javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
+									javax.swing.border.TitledBorder.DEFAULT_POSITION,
+									null, null));
+
+			editionPanel.setLayout(null);
+			editionPanel.setBounds(9, 150, 480, 232);
+			editionPanel.add(getJPanel1(), null);
+			editionPanel.add(getScrlDimension(), null);
+
+		}
+		return editionPanel;
+	}
+
+	/**
+	 * This method initializes scrDimInfo
+	 *
+	 * @return javax.swing.JScrollPane
+	 */
+	private JScrollPane getScrDimInfo() {
+		if (scrDimInfo == null) {
+			scrDimInfo = new JScrollPane();
+			scrDimInfo.setBounds(6, 17, 466, 113);
+			scrDimInfo.setViewportView(getInfoEditor());
+		}
+		return scrDimInfo;
+	}
+
+	/**
+	 * This method initializes infoEditor
+	 *
+	 * @return javax.swing.JEditorPane
+	 */
+	private JEditorPane getInfoEditor() {
+		if (infoEditor == null) {
+			infoEditor = new JEditorPane();
+			infoEditor.setEditable(false);
+		}
+		return infoEditor;
+	}
+
+	/**
+	 * This method initializes valuePanel
+	 *
+	 * @return javax.swing.JPanel
+	 */
+	private JPanel getValuePanel() {
+		if (valuePanel == null) {
+
+			valuePanel = new JPanel();
+			valuePanel.setLayout(null);
+			valuePanel.setBounds(8, 17, 480, 137);
+			valuePanel.add(getScrDimInfo(), null);
+			valuePanel.setBorder(javax.swing.BorderFactory.createTitledBorder(
+					null, PluginServices.getText(this, "settings"),
+					javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
+					javax.swing.border.TitledBorder.DEFAULT_POSITION, null,
+					null));
+
+		}
+		return valuePanel;
+	}
+
+	/**
+	 * This method initializes btnSet
+	 *
+	 * @return javax.swing.JButton
+	 */
+	private JButton getBtnSet() {
+		if (btnSet == null) {
+			btnSet = new JButton();
+			btnSet.setBounds(7, 188, 110, 20);
+			btnSet.setText(PluginServices.getText(this, "set"));
+			btnSet.addActionListener(new java.awt.event.ActionListener() {
+				public void actionPerformed(java.awt.event.ActionEvent e) {
+					execute("set");
+				}
+			});
+		}
+		return btnSet;
+	}
+
+	/**
+	 * This method initializes btnClear
+	 *
+	 * @return javax.swing.JButton
+	 */
+	private JButton getBtnClear() {
+		if (btnClear == null) {
+			btnClear = new JButton();
+			btnClear.setBounds(107, 130, 110, 20);
+			btnClear.setText(PluginServices.getText(this, "clear"));
+			btnClear.addActionListener(new java.awt.event.ActionListener() {
+				public void actionPerformed(java.awt.event.ActionEvent e) {
+					execute("clear");
+				}
+			});
+		}
+		return btnClear;
+	}
+
+	public void addDimension(RemoteTimeDimension d) throws IllegalArgumentException {
+		d.compile();
+
+		if (dim == null) {
+			dim = new RemoteTimeDimension[] { d };
+		} else {
+
+			Vector<RemoteTimeDimension> v = new Vector<RemoteTimeDimension>();
+			for (int i = 0; i < dim.length; i++) {
+				v.add(dim[i]);
+			}
+			if (v.contains(d))
+				return;
+			v.add(d);
+			dim = (RemoteTimeDimension[]) v.toArray(new RemoteTimeDimension[0]);
+		}
+		String[] texts = new String[dim.length];
+		for (int i = 0; i < texts.length; i++) {
+			texts[i] = dim[i].getName();
+		}
+		getLstDimensions().setListData(texts);
+		refreshInfo();
+	}
+
+	public Vector<String> getDimensions() {
+		if (settings.isEmpty())
+			return null;
+		Vector<String> v = new Vector<String>();
+		Iterator<String> it = settings.keySet().iterator();
+		while (it.hasNext()) {
+			Object key = it.next();
+			Value val = ((Value) settings.get(key));
+
+			if (val.getType() == Value.EXPR)
+				v.add((String)key + "=" + (String) val.getValue());
+			else {
+				String values = "";
+				String separator = (val.getMode() == MULTIPLE_VALUE) ? ","	: "/";
+				Integer[] indexes = val.getIndexes();
+				for (int j = 0; j < indexes.length; j++) {
+					values += val.getOwner().valueAt(indexes[j].intValue());
+					if (j < indexes.length - 1)
+						values += separator;
+				}
+				v.add((String)key + "=" + values);
+			}
+		}
+		return v;
+	}
+
+	/**
+	 * Sets the value for a Dimension given by the dimension name. The value is
+	 * set as a plain text expressions and the panel will not keep track of what
+	 * position represents this value.
+	 *
+	 * @param name
+	 * @param value
+	 */
+	public void setDimensionValue(String name, String value) {
+		for (int i = 0; dim!=null && i < dim.length; i++) {
+			if (dim[i].getName().equals(name)) {
+				int myMode;
+				if (value.indexOf(",") != -1)
+					myMode = MULTIPLE_VALUE;
+				else if (value.indexOf("/") != -1)
+					myMode = INTERVAL;
+				else
+					myMode = SINGLE_VALUE;
+				Value val = new Value(Value.EXPR, myMode, value, null);
+				//settings.put(dim[i], val);
+				settings.put(name, val);
+			}
+		}
+		refreshInfo();
+	}
+
+	private class Value {
+		public static final int INDEXES = 0;
+		public static final int EXPR = 1;
+		private int type;
+		private int valueMode;
+		private Object value;
+		private RemoteTimeDimension owner;
+
+
+
+		public Value(int type, int mode, Object value, RemoteTimeDimension owner) {
+			this.type = type;
+			this.valueMode = mode;
+			this.owner = owner;
+			this.value = value;
+		}
+
+		/**
+		 * Returns the type of the contained value.<br>
+		 * Possible values are:
+		 * <ol>
+		 * <li> <b>Value.INDEXES</b>, which means that the value is an Integer
+		 * array that should be used to compute the actual value by using the
+		 * method IFMapWMSDimension.valueAt(int i). </li>
+		 * <li> <b>Value.EXPR</b>. If the value type is this, then the value is
+		 * a plain String that can be directly used as much it should represent
+		 * a valid value for the WMS server. </li>
+		 * </ol>
+		 *
+		 * @return int
+		 */
+		public int getType() {
+			return type;
+		}
+
+		/**
+		 * Array of indexes that compose this value expression. Use it only when
+		 * type is INDEXES.
+		 * @return
+		 */
+		public Integer[] getIndexes() {
+			return (Integer[]) value;
+		}
+
+		/**
+		 * Expression of this value, if its type is EXPR
+		 * @return
+		 */
+		public String getExpr() {
+			return (String) value;
+		}
+
+		/**
+		 * The mode of the value.
+		 * @return one of DimensionPanel.SINGLE_VALUE, DimensionPanel.MULTIPLE_VALUE
+		 * 	   or DimensionPanel.INTERVAL
+		 */
+		public int getMode() {
+			return valueMode;
+		}
+
+		public Object getValue() {
+			return value;
+		}
+		/**
+		 * Returns a reference to the IFMapDimension that owns this dimension.
+		 */
+		public RemoteTimeDimension getOwner() {
+			return owner;
+		}
+
+	}
+
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/DimensionPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/LayerList.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/LayerList.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/LayerList.java	(revision 21019)
@@ -0,0 +1,72 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+ 
+package org.gvsig.raster.wms.app.wmsclient.gui.panel;
+
+import java.awt.Component;
+import java.awt.Dimension;
+
+import javax.swing.DefaultListCellRenderer;
+import javax.swing.JList;
+
+import org.gvsig.gui.beans.controls.dnd.JDnDList;
+import org.gvsig.raster.wms.io.WMSLayerNode;
+
+
+/**
+ * Class implementing a JList component adapted to the WMSLayerNode
+ * needs (use it as a JList with drag'n'drop capabilities).
+ * 
+ * @author jaume dominguez faus - jaume.dominguez@iver.es
+ *
+ */
+public class LayerList extends JDnDList {
+	public boolean showLayerNames = false;
+	private int count = 0; 
+	public LayerList() {
+		super();
+		setCellRenderer(new MyRenderer());
+	}
+	
+	private class MyRenderer extends DefaultListCellRenderer {
+		public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
+			super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
+			if (value instanceof WMSLayerNode){
+				WMSLayerNode layer = (WMSLayerNode) value;
+                
+                if (!showLayerNames) {
+                	if (layer.getName() != null || layer.getName() == "") {
+                		String text = layer.toString();
+                		text = text.substring(text.indexOf(']')+2, text.length());
+                		setText(text);
+                	}
+                }
+                
+                Dimension sz  = getPreferredSize();
+                sz.setSize((sz.getWidth()+50) - (50*count), sz.getHeight());
+                setPreferredSize(sz);
+                count++;
+            }  
+			return this;
+		}
+	}
+}

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/LayerList.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/WMSParamsPanel.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/WMSParamsPanel.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/WMSParamsPanel.java	(revision 21019)
@@ -0,0 +1,1862 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+* MA  02110-1301, USA.
+*
+*/
+
+package org.gvsig.raster.wms.app.wmsclient.gui.panel;
+
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.event.FocusAdapter;
+import java.awt.event.FocusEvent;
+import java.awt.event.FocusListener;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.lang.reflect.InvocationTargetException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.AbstractCollection;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.TreeSet;
+import java.util.Vector;
+import java.util.prefs.Preferences;
+
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JList;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTabbedPane;
+import javax.swing.JTextField;
+import javax.swing.tree.TreePath;
+
+import org.gvsig.andami.IconThemeHelper;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.andami.messages.NotificationManager;
+import org.gvsig.app.gui.WizardPanel;
+import org.gvsig.app.gui.wizards.FormatListModel;
+import org.gvsig.app.gui.wizards.WizardListenerSupport;
+import org.gvsig.app.project.documents.view.gui.AbstractViewPanel;
+import org.gvsig.fmap.dal.DALLocator;
+import org.gvsig.fmap.dal.DataManager;
+import org.gvsig.fmap.dal.DataParameters;
+import org.gvsig.fmap.dal.DataServerExplorerParameters;
+import org.gvsig.fmap.dal.DataStoreParameters;
+import org.gvsig.fmap.dal.coverage.exception.RasterDriverException;
+import org.gvsig.fmap.dal.coverage.store.parameter.TileDataParameters;
+import org.gvsig.fmap.dal.exception.InitializeException;
+import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException;
+import org.gvsig.fmap.mapcontext.exceptions.LoadLayerException;
+import org.gvsig.fmap.mapcontext.layers.FLayer;
+import org.gvsig.fmap.mapcontext.layers.FLayers;
+import org.gvsig.gui.beans.controls.dnd.JDnDListModel;
+import org.gvsig.gui.beans.listeners.BeanListener;
+import org.gvsig.raster.wms.app.wmsclient.gui.wizard.LayerTreeModel;
+import org.gvsig.raster.wms.app.wmsclient.gui.wizard.SRSListModel;
+import org.gvsig.raster.wms.app.wmsclient.layer.FLyrWMS;
+import org.gvsig.raster.wms.io.RemoteWMSStyle;
+import org.gvsig.raster.wms.io.WMSDataParameters;
+import org.gvsig.raster.wms.io.WMSLayerNode;
+import org.gvsig.raster.wms.io.WMSServerExplorer;
+import org.gvsig.raster.wms.io.WMSServerExplorerParameters;
+import org.gvsig.raster.wms.io.time.RemoteTimeDimension;
+
+
+/**
+ * This class implements the map option panel.
+ *
+ * It includes a set of Listeners that implement some control rules which
+ * refresh the component values that depends on those selected in the other
+ * components to avoid to choose an invalid set of options. It also includes a
+ * method (isCorrectlyConfigured()) that checks if the current set of values is
+ * enough to correctly launch a GetMap request.
+ *
+ * The information is obtained from a WMSWizardDataSource object.
+ *
+ *
+ * Esta clase implementa el panel de opciones disponibles sobre el mapa
+ *
+ * Incluye una serie de Listeners que implementan unas reglas de control que
+ * refrescan los valores de componentes cuyos valores dependen de aqu�llos
+ * seleccionados en otros componentes para evitar que se escoja una combinaci�n
+ * de opciones err�nea as� como una funci�n (isCorrectlyConfigured()) que
+ * comprueba si la combinaci�n escogida actualmente es suficiente para lanzar
+ * una operaci�n GetMap correctamente.
+ *
+ * La informaci�n obtiene a partir de un objeto WMSWizardDataSource.
+ *
+ * @author jaume - jaume dominguez faus
+ *
+ */
+@SuppressWarnings("unchecked")
+public class WMSParamsPanel extends WizardPanel {
+	private static final long       serialVersionUID       = 1L;
+	private JScrollPane             jScrollPane1           = null;
+	private JScrollPane             jScrollPane2           = null;
+	private JScrollPane             jScrollPane3           = null;
+	private JScrollPane             jScrollPane5           = null;
+	private JButton                 btnAdd                 = null;
+	private JButton                 btnDel                 = null;
+	private JScrollPane             jScrollPane6           = null;
+	private JPanel                  jPanel2                = null;
+	private JPanel                  tabFormats             = null;
+	private JPanel                  jPanel4                = null;
+	private JTextField              jTxtNomCapa            = null;
+	private LayerList               lstSelectedLayers      = null;
+	private ArrayList<TreePath>     selectedPaths          = new ArrayList<TreePath>();
+	private JList                   lstSRSs                = null;
+	private JList                   lstInfoFormats         = null;
+	private LayerTree               treeLayers             = null;
+	private JList                   lstFormats             = null;
+	private WizardListenerSupport   listenerSupport;
+	private JTabbedPane             jTabbedPane            = null;
+	private JPanel                  tabLayers              = null;
+	private JPanel                  jPanelFormats          = null;
+	private JPanel                  jPanelAxisOrder        = null;
+	private JPanel                  jPanelSrsSelection     = null;
+	private JPanel                  jPanelInfoByPointFormat = null;
+	private StylesPanel             tabStyle               = null;
+	private JCheckBox               chkTransparency        = null;
+	private JCheckBox               chkAxisOrder           = null;
+	private InfoPanel               tabInfo                = null;
+	private DimensionPanel          tabDimensions          = null;
+	private int                     dimensionTabIndex;
+	private int                     stylesTabIndex;
+	private String                  oldSRS                 = null;
+	private AbstractCollection      oldDimensions          = null;
+	private Dimension               sizeFixed;
+	private JCheckBox               chkExtendedNames       = null;
+	private JButton                 btnUp                  = null;
+	private JButton                 btnDown                = null;
+	protected WMSServerExplorer     explorer               = null;
+	private boolean                 updating               = fPrefs.getBoolean("refresh_capabilities", false);
+	public static Preferences       fPrefs                 = Preferences.userRoot().node("gvsig.wms-wizard");
+	//private Logger                  log                    = LoggerFactory.getLogger(WMSParamsPanel.class);
+	private JCheckBox               chkDisagregate         = null;
+	private boolean                 lastCached;
+	private String                  groupName              = "WMS Group";
+
+	public WMSParamsPanel() {
+		super();
+		initialize();
+	}
+
+	// TODO: crear nuevo constructor para a�adir los panels que quieras...
+	public WMSParamsPanel(WMSServerExplorer data) {
+		super();
+		setWizardData(data);
+		this.setLayout(null);
+		this.setVisible(false);
+		this.setBounds(0, 0, 510, 427);
+		if (jTabbedPane == null) {
+			jTabbedPane = new JTabbedPane();
+			jTabbedPane.setBounds(4, 4, 502, 415);
+			StylesPanel sp = getTabStyle();
+			DimensionPanel dp = getTabDimensions();
+
+			jTabbedPane.addTab(PluginServices.getText(this, "capas"), null,
+					getTabLayers(), null);
+			jTabbedPane.addTab(PluginServices.getText(this, "estilos"), null,
+					sp, null);
+			stylesTabIndex = jTabbedPane.getTabCount() - 1;
+			jTabbedPane.addTab(PluginServices.getText(this, "dimensiones"),
+					null, dp, null);
+			dimensionTabIndex = jTabbedPane.getTabCount() - 1;
+			jTabbedPane.addTab(PluginServices.getText(this, "formatos"), null,
+					getTabFormats(), null);
+			jTabbedPane.setEnabledAt(dimensionTabIndex, false);
+			jTabbedPane.setEnabledAt(stylesTabIndex, false);
+		}
+		this.add(jTabbedPane, null);
+
+		setListenerSupport(new WizardListenerSupport());
+	}
+
+	/**
+	 * This method initializes panelPage2
+	 *
+	 * @return Panel
+	 */
+	private void initialize() {
+		this.setLayout(null);
+		this.setVisible(false);
+		this.setBounds(0, 0, 510, 427);
+		this.add(getJTabbedPane(), null);
+	}
+
+	public boolean isUpdatingCache() {
+		return updating;
+	}
+
+	public void setUpdatingCache(boolean updating) {
+		this.updating = updating;
+	}
+
+	/**
+	 * This method initializes jPanel2
+	 *
+	 * @return Panel
+	 */
+	private JPanel getJPanel2() {
+		if (jPanel2 == null) {
+			jPanel2 = new JPanel();
+			jPanel2.setLayout(null);
+			jPanel2.setBounds(5, 59, 485, 328);
+			jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(
+					null, PluginServices.getText(this, "select_layers"),
+					javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
+					javax.swing.border.TitledBorder.DEFAULT_POSITION, null,
+					null));
+			jPanel2.add(getChkExtendedNames(), null);
+
+			jPanel2.add(getJScrollPane1(), null);
+			jPanel2.add(getBtnDel(), null);
+			jPanel2.add(getBtnAdd(), null);
+			jPanel2.add(getJScrollPane5(), null);
+			jPanel2.add(getBtnUp(), null);
+			jPanel2.add(getBtnDown(), null);
+			jPanel2.add(getChkDisagregate(), null);
+		}
+
+		return jPanel2;
+	}
+
+	/**
+	 * This method initializes jPanel4
+	 *
+	 * @return Panel
+	 */
+	private JPanel getJPanel4() {
+		if (jPanel4 == null) {
+			jPanel4 = new JPanel();
+			jPanel4.setLayout(null);
+			jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(
+					null, PluginServices.getText(this, "layer_name"),
+					javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
+					javax.swing.border.TitledBorder.DEFAULT_POSITION, null,
+					null));
+			jPanel4.setBounds(5, 8, 485, 49);
+			jPanel4.add(getJTxtNomCapa(), null);
+		}
+
+		return jPanel4;
+	}
+
+	/**
+	 * This method initializes jPanel3
+	 *
+	 * @return Panel
+	 */
+	private JPanel getTabFormats() {
+		if (tabFormats == null) {
+			tabFormats = new JPanel();
+			tabFormats.setLayout(null);
+			tabFormats.add(getJPanelFormats(), null);
+			tabFormats.add(getJPanelSrsSelection(), null);
+			tabFormats.add(getJPanelInfoByPointFormat(), null);
+		}
+
+		return tabFormats;
+	}
+
+	/**
+	 * This method initializes jScrollPane1
+	 *
+	 * @return ScrollPane
+	 */
+	private JScrollPane getJScrollPane1() {
+		if (jScrollPane1 == null) {
+			jScrollPane1 = new JScrollPane();
+			jScrollPane1.setBounds(11, 22, 460, 123);
+			jScrollPane1.setViewportView(getTreeLayers());
+			jScrollPane1.setPreferredSize(new java.awt.Dimension(205, 75));
+		}
+
+		return jScrollPane1;
+	}
+
+	/**
+	 * This method initializes btnDel
+	 *
+	 * @return Button
+	 */
+	private JButton getBtnDel() {
+		if (btnDel == null) {
+			btnDel = new JButton();
+			// btnDel.setPreferredSize(new java.awt.Dimension(23, 23));
+			btnDel.setText(PluginServices.getText(this, "remove"));
+			btnDel.setMargin(new java.awt.Insets(2, 0, 2, 0));
+			btnDel.setBounds(339, 300, 101, 20);
+			btnDel.setEnabled(false);
+			btnDel.addActionListener(new java.awt.event.ActionListener() {
+				public void actionPerformed(java.awt.event.ActionEvent e) {
+					delLayer();
+				}
+			});
+		}
+		return btnDel;
+	}
+
+	/**
+	 * This method initializes btnAdd
+	 *
+	 * @return Button
+	 */
+	private JButton getBtnAdd() {
+		if (btnAdd == null) {
+			btnAdd = new JButton();
+			// btnAdd.setPreferredSize(new java.awt.Dimension(23, 23));
+			btnAdd.setText(PluginServices.getText(this, "add"));
+			btnAdd.setMargin(new java.awt.Insets(2, 0, 2, 0));
+			btnAdd.setBounds(236, 300, 101, 20);
+			btnAdd.setEnabled(false);
+			btnAdd.addActionListener(new java.awt.event.ActionListener() {
+				public void actionPerformed(java.awt.event.ActionEvent e) {
+					addLayer();
+				}
+			});
+		}
+		return btnAdd;
+	}
+
+	/**
+	 * This method initializes jScrollPane5
+	 *
+	 * @return ScrollPane
+	 */
+	private JScrollPane getJScrollPane5() {
+		if (jScrollPane5 == null) {
+			jScrollPane5 = new JScrollPane();
+			jScrollPane5.setBounds(11, 155, 422, 120);
+			jScrollPane5.setViewportView(getLstSelectedLayers());
+			jScrollPane5.setPreferredSize(new java.awt.Dimension(205, 75));
+		}
+
+		return jScrollPane5;
+	}
+
+	/**
+	 * This method initializes jTextField
+	 *
+	 * @return TextField
+	 */
+	private JTextField getJTxtNomCapa() {
+		if (jTxtNomCapa == null) {
+			jTxtNomCapa = new JTextField();
+			jTxtNomCapa.setBounds(10, 19, 460, 20);
+			jTxtNomCapa.setText(PluginServices.getText(this, "WMSLayer"));
+			jTxtNomCapa.addKeyListener(new java.awt.event.KeyAdapter() {
+				public void keyTyped(java.awt.event.KeyEvent e) {
+					fireWizardComplete(isCorrectlyConfigured());
+				}
+			});
+		}
+
+		return jTxtNomCapa;
+	}
+
+	/**
+	 * This method initializes jPanel1
+	 *
+	 * @return Panel
+	 */
+	private JPanel getJPanelFormats() {
+		if (jPanelFormats == null) {
+			jPanelFormats = new JPanel();
+			jPanelFormats.setLayout(null);
+			jPanelFormats.setBorder(javax.swing.BorderFactory.createTitledBorder(
+					null, PluginServices.getText(this, "select_formats"),
+					javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
+					javax.swing.border.TitledBorder.DEFAULT_POSITION, null,
+					null));
+			jPanelFormats.setBounds(5, 10, 485, 145);
+			jPanelFormats.add(getJScrollPaneFormats(), null);
+			jPanelFormats.add(getChkTransparency(), null);
+		}
+		return jPanelFormats;
+	}
+
+	/**
+	 * This method initializes jPanel5
+	 *
+	 * @return Panel
+	 */
+	private JPanel getJPanelSrsSelection() {
+		if (jPanelSrsSelection == null) {
+			jPanelSrsSelection = new JPanel();
+			jPanelSrsSelection.setLayout(null);
+			jPanelSrsSelection.setBorder(javax.swing.BorderFactory.createTitledBorder(
+					null, PluginServices.getText(this, "seleccionar_srs"),
+					javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
+					javax.swing.border.TitledBorder.DEFAULT_POSITION, null,
+					null));
+			jPanelSrsSelection.setBounds(5, 162, 485, 126);
+			jPanelSrsSelection.add(getJScrollPane2(), null);
+		}
+		return jPanelSrsSelection;
+	}
+
+	/**
+	 * This method initializes jPanel6
+	 *
+	 * @return Panel
+	 */
+	private JPanel getJPanelInfoByPointFormat() {
+		if (jPanelInfoByPointFormat == null) {
+			jPanelInfoByPointFormat = new JPanel();
+			jPanelInfoByPointFormat.setLayout(null);
+			jPanelInfoByPointFormat.setBorder(javax.swing.BorderFactory.createTitledBorder(
+					null, PluginServices.getText(this, "seleccionar_infobypoint_format"),
+					javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
+					javax.swing.border.TitledBorder.DEFAULT_POSITION, null,
+					null));
+			jPanelInfoByPointFormat.setBounds(5, 273, 485, 78);
+			jPanelInfoByPointFormat.add(getJScrollPane3(), null);
+		}
+		return jPanelInfoByPointFormat;
+	}
+
+	/**
+	 * This method initializes jScrollPane6
+	 *
+	 * @return ScrollPane
+	 */
+	private JScrollPane getJScrollPaneFormats() {
+		if (jScrollPane6 == null) {
+			jScrollPane6 = new JScrollPane();
+			jScrollPane6.setBounds(5, 23, 470, 85);
+			jScrollPane6.setViewportView(getLstFormats());
+			jScrollPane6.setPreferredSize(new java.awt.Dimension(250, 85));
+		}
+
+		return jScrollPane6;
+	}
+
+
+	/**
+	 * This method initializes chkTrasparency
+	 *
+	 * @return CheckBox
+	 */
+	private JCheckBox getChkTransparency() {
+		if (chkTransparency == null) {
+			chkTransparency = new JCheckBox();
+			chkTransparency.setText(PluginServices.getText(this,
+					"wms_transparency"));
+			chkTransparency.setSelected(true);
+			chkTransparency.addItemListener(new java.awt.event.ItemListener() {
+				public void itemStateChanged(java.awt.event.ItemEvent e) {
+					fireWizardComplete(isCorrectlyConfigured());
+				}
+			});
+			chkTransparency.setBounds(15, 115, 421, 21);
+			chkTransparency.setVisible(true);
+		}
+		return chkTransparency;
+	}
+
+	/**
+	 * This method initializes jScrollPane2
+	 *
+	 * @return ScrollPane
+	 */
+	private JScrollPane getJScrollPane2() {
+		if (jScrollPane2 == null) {
+			jScrollPane2 = new JScrollPane();
+			jScrollPane2.setBounds(5, 23, 470, 91);
+			jScrollPane2.setViewportView(getLstSRSs());
+			jScrollPane2.setPreferredSize(new java.awt.Dimension(250, 91));
+		}
+
+		return jScrollPane2;
+	}
+
+	/**
+	 * This method initializes jScrollPane3
+	 *
+	 * @return ScrollPane
+	 */
+	private JScrollPane getJScrollPane3() {
+		if (jScrollPane3 == null) {
+			jScrollPane3 = new JScrollPane();
+			jScrollPane3.setBounds(5, 23, 470, 45);
+			jScrollPane3.setViewportView(getLstInfoFormats());
+			jScrollPane3.setPreferredSize(new java.awt.Dimension(250, 120));
+		}
+
+		return jScrollPane3;
+	}
+
+	/**
+	 * Gets the available layers in WMS maintaining the tree structure
+	 *
+	 * @return
+	 */
+	public LayerTree getLayerStructure() {
+		return treeLayers;
+	}
+
+	/**
+	 * This method initializes treeLayers
+	 *
+	 * @return Tree
+	 */
+	private LayerTree getTreeLayers() {
+		if (treeLayers == null) {
+			treeLayers = new LayerTree();
+			treeLayers.setRootVisible(true);
+			treeLayers.addMouseListener(new java.awt.event.MouseAdapter() {
+				public void mouseClicked(java.awt.event.MouseEvent e) {
+					if (e.getClickCount() == 2) {
+						addLayer();
+					}
+				}
+			});
+			treeLayers
+					.addTreeSelectionListener(new javax.swing.event.TreeSelectionListener() {
+						public void valueChanged(
+								javax.swing.event.TreeSelectionEvent e) {
+
+							boolean isGetMapable = false;
+							TreePath[] selecciones = getTreeLayers()
+									.getSelectionPaths();
+							if (selecciones != null) {
+								for (int i = 0; i < selecciones.length
+										&& !isGetMapable; i++) {
+									WMSLayerNode layer = ((WMSLayerNode) selecciones[i]
+											.getLastPathComponent());
+									isGetMapable = layer.getChildren().size() == 0
+											|| layer.getName() != null;
+								}
+
+							}
+							getBtnAdd().setEnabled(isGetMapable);
+							fireWizardComplete(isCorrectlyConfigured());
+						}
+					});
+		}
+
+		return treeLayers;
+	}
+
+	/**
+	 * This method checks for the options selected within the configuration
+	 * dialog are correct and enough to perform a GetMap request.
+	 *
+	 * @return true if you're done, false if not.
+	 */
+	public boolean isCorrectlyConfigured() {
+
+		boolean b;
+		this.repaint();
+		boolean infoFormatOk = ((getLstInfoFormats().getModel().getSize()!= 0 &&
+								getLstInfoFormats().getSelectedIndex() != -1) ||
+								getLstInfoFormats().getModel().getSize() == 0);
+		if ((getLstSRSs().getSelectedIndex() != -1)
+				&& (getLstFormats().getSelectedIndex() != -1)
+				&& infoFormatOk
+				&& (getLstSelectedLayers().getModel().getSize() > 0)) {
+			b = true;
+		} else {
+			b = false;
+		}
+
+		// Enable or disable del button.
+		int[] selectedIndices = getLstSelectedLayers().getSelectedIndices();
+
+		getBtnDel().setEnabled(selectedIndices != null && selectedIndices.length > 0);
+
+		return b;
+	}
+
+	public WMSLayerNode[] selectedLayersToArray() {
+		JDnDListModel modelo = ((JDnDListModel) lstSelectedLayers.getModel());
+		ArrayList elements = modelo.getElements();
+		WMSLayerNode[] layers = (WMSLayerNode[]) elements
+				.toArray(new WMSLayerNode[0]);
+		return layers;
+	}
+
+	/**
+	 * DOCUMENT ME!
+	 */
+	private void delLayer() {
+		int[] indices = lstSelectedLayers.getSelectedIndices();
+
+		try {
+			ArrayList removeList = new ArrayList();
+			WMSLayerNode[] infos = selectedLayersToArray();
+			JDnDListModel modelo = ((JDnDListModel) lstSelectedLayers
+					.getModel());
+			for (int i = 0; i < indices.length; i++) {
+				removeList.add(infos[indices[i]]);
+			}
+			modelo.delIndices(indices);
+			lstSelectedLayers.clearSelection();
+			fireWizardComplete(isCorrectlyConfigured());
+
+			// delete from selectedPaths as well
+			WMSLayerNode elemento = null;
+			WMSLayerNode last = null;
+			TreePath path = null;
+			for (int i = removeList.size() - 1; i >= 0; i--) {
+				elemento = (WMSLayerNode) removeList.get(i);
+				for (int j = 0; j < selectedPaths.size(); j++) {
+					path = (TreePath) selectedPaths.get(j);
+					last = (WMSLayerNode) path.getLastPathComponent();
+					if (last.getTitle().compareTo(elemento.getTitle()) == 0) {
+						selectedPaths.remove(path);
+					}
+				}
+			}
+
+			refreshData();
+			refreshInfo();
+		} catch (ArrayIndexOutOfBoundsException ex) {
+			// if you reach this, please, tell me how you did it.
+			ex.printStackTrace();
+		}
+	}
+
+	/**
+	 * Fires a notification to this wizard listeners telling them if the
+	 * configuration is fair enough to send a GetMap request.
+	 *
+	 * @param b
+	 */
+	private void fireWizardComplete(boolean b) {
+		listenerSupport.callStateChanged(b);
+		callStateChanged(b);
+	}
+
+	/**
+	 * Refreshes the content shown by this.
+	 */
+	public void refreshData() {
+		JDnDListModel model = (JDnDListModel) lstSelectedLayers.getModel();
+		if(model.getSize() > 1)
+			setLayerName(groupName);
+		else if(model.getSize() == 1)
+			setLayerName(model.getElementAt(0).toString());
+		else
+			setLayerName(PluginServices.getText(this, "WMSLayer"));
+		refreshSRS();
+		getLstSelectedLayers().repaint();
+		refreshStyleTree();
+		refreshDimensions();
+
+	}
+
+	/**
+	 * Refreshes the info tab
+	 *
+	 */
+	public void refreshInfo() {
+		getTabInfo().refresh(explorer, selectedLayersVector(),
+				getStyleTitles(), getFormat(), getInfoFormat(), getSRS(), getDimensions());
+	}
+
+	private void refreshDimensions() {
+		int size = getLstSelectedLayers().getModel().getSize();
+		boolean enable = false;
+		for (int i = 0; i < size; i++) {
+			WMSLayerNode node = (WMSLayerNode) getLstSelectedLayers()
+					.getModel().getElementAt(i);
+			if (node.getDimensions() == null) {
+				continue;
+			}
+
+			for (int j = 0; j < node.getDimensions().size(); j++) {
+				RemoteTimeDimension dim = (RemoteTimeDimension) node
+						.getDimensions().get(j);
+
+				try {
+					getTabDimensions().addDimension(dim);
+					enable = true;
+				} catch (IllegalArgumentException e) {
+					NotificationManager.addWarning(
+							"Unrecognized dimension expression: "
+									+ dim.getExpression() + " (for "
+									+ dim.getName() + " in layer '"
+									+ node.getName() + "')", null);
+				}
+			}
+		}
+		jTabbedPane.setEnabledAt(dimensionTabIndex, enable);
+
+	}
+
+	/**
+	 *
+	 */
+	private void refreshStyleTree() {
+
+		int size = getLstSelectedLayers().getModel().getSize();
+		WMSLayerNode styleRoot = new WMSLayerNode();
+		styleRoot.setTitle(PluginServices.getText(this, "selected_layers"));
+
+		StyleTreeModel model = new StyleTreeModel(styleRoot);
+		jTabbedPane.setEnabledAt(stylesTabIndex, false);
+		for (int i = 0; i < size; i++) {
+			WMSLayerNode node = (WMSLayerNode) getLstSelectedLayers()
+					.getModel().getElementAt(i);
+			// If any of the layers defines styles, the tab will be enabled.
+			if (model.addLayerBranch(node)) {
+				jTabbedPane.setEnabledAt(stylesTabIndex, true);
+			}
+		}
+
+		getStyleTree().setModel(model);
+		getStyleTree().expandAll();
+		getStyleTree().repaint();
+	}
+
+	/**
+	 * Takes the array of selected layers and a vector containing the style
+	 * names and set them as selected in the styles panel
+	 *
+	 * @param selectedLayers
+	 * @param styles
+	 */
+	public void setStyleSelections(List<RemoteWMSStyle> styles) {
+
+		WMSLayerNode[] layers = selectedLayersToArray();
+		int length = layers.length;
+		for (int i = 0; i < length; i++) {
+			String styleName = styles.get(i).getName();
+			layers[length - i - 1].setSelectedStyleByName(styleName);
+		}
+	}
+
+	/**
+	 * Gets the currently shown style tree.
+	 *
+	 * @return
+	 */
+	private StyleTree getStyleTree() {
+		return getTabStyle().getStyleTree();
+	}
+
+	/**
+	 * Method called when pressing the Add layer button or when double-clicking
+	 * on a layer from the server's layer tree.
+	 */
+	public void addLayer() {
+		boolean alguno = false;
+
+		TreePath[] selecciones = getTreeLayers().getSelectionPaths();
+		if (selecciones == null) {
+			return;
+		}
+		for (int i = 0; i < selecciones.length; i++) {
+			selectedPaths.add(selecciones[i]);
+			WMSLayerNode nodo = (WMSLayerNode) selecciones[i]
+					.getLastPathComponent();
+			if (nodo.getName() == null || nodo.getName().equals("")) {
+				continue;
+			}
+			if (nodo.isSizeFixed()) {
+				if (sizeFixed == null) {
+					sizeFixed = nodo.getFixedSize();
+				} else if ((sizeFixed.getHeight() != nodo.getFixedSize()
+						.getHeight())
+						|| (sizeFixed.getWidth() != nodo.getFixedSize()
+								.getWidth())) {
+					JOptionPane.showMessageDialog((Component) PluginServices
+							.getMainFrame(), PluginServices.getText(this,
+							"server_cant_render_layers"));
+					continue;
+				}
+			}
+			// s'afegeix a la llista de capes seleccionades
+			JDnDListModel modelo = (JDnDListModel) lstSelectedLayers.getModel();
+
+			try {
+				if (modelo.addElement(modelo.getSize(), nodo.clone())) {
+					alguno = true;
+				}
+			} catch (CloneNotSupportedException e) {
+			}
+		}
+
+		if (alguno) {
+			refreshData();
+		}
+		refreshInfo();
+	}
+
+	/**
+	 * This method initializes lstSelectedLayers
+	 *
+	 * @return List
+	 */
+	public LayerList getLstSelectedLayers() {
+		if (lstSelectedLayers == null) {
+			lstSelectedLayers = new LayerList();
+			lstSelectedLayers.setModel(new JDnDListModel());
+			lstSelectedLayers
+					.setSelectionMode(javax.swing.ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
+			lstSelectedLayers
+					.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
+						public void valueChanged(
+								javax.swing.event.ListSelectionEvent e) {
+							fireWizardComplete(isCorrectlyConfigured());
+						}
+					});
+			lstSelectedLayers.addMouseListener(new MouseAdapter() {
+				public void mouseReleased(MouseEvent e) {
+					refreshData();
+				}
+			});
+		}
+
+		return lstSelectedLayers;
+	}
+
+	/**
+	 * This method initializes lstSRSs
+	 *
+	 * @return JList
+	 */
+	public JList getLstSRSs() {
+		if (lstSRSs == null) {
+			lstSRSs = new JList();
+			lstSRSs.setModel(new SRSListModel());
+			lstSRSs.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
+			lstSRSs.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
+				public void valueChanged(javax.swing.event.ListSelectionEvent e) {
+					int i = lstSRSs.getSelectedIndex();
+					if (i != -1) {
+						oldSRS = (String) lstSRSs.getModel().getElementAt(i);
+					}
+					fireWizardComplete(isCorrectlyConfigured());
+				}
+			});
+		}
+		return lstSRSs;
+	}
+
+	/**
+	 * This method initializes lstSRSs
+	 *
+	 * @return JList
+	 */
+	public JList getLstInfoFormats() {
+		if (lstInfoFormats == null) {
+			lstInfoFormats = new JList();
+			lstInfoFormats.setModel(new SRSListModel());
+			lstInfoFormats.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
+			lstInfoFormats.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
+				public void valueChanged(javax.swing.event.ListSelectionEvent e) {
+					fireWizardComplete(isCorrectlyConfigured());
+				}
+			});
+		}
+
+		return lstInfoFormats;
+	}
+
+	/**
+	 * This method initializes lstFormats
+	 *
+	 * @return List
+	 */
+	public JList getLstFormats() {
+		if (lstFormats == null) {
+			lstFormats = new JList();
+			lstFormats.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
+			lstFormats.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
+				public void valueChanged(javax.swing.event.ListSelectionEvent e) {
+					fireWizardComplete(isCorrectlyConfigured());
+				}
+			});
+		}
+
+		return lstFormats;
+	}
+
+	/**
+	 * Refreshes the SRS list
+	 */
+	private void refreshSRS() {
+		ArrayList<?> elements = ((JDnDListModel) lstSelectedLayers.getModel()).getElements();
+		WMSLayerNode[] layers = (WMSLayerNode[]) elements.toArray(new WMSLayerNode[0]);
+
+		SRSListModel model = new SRSListModel();
+
+		if (layers.length == 0) {
+			lstSRSs.setModel(model);// new DefaultListModel());
+			sizeFixed = null;
+		} else {
+			TreeSet srsSet = new TreeSet();
+			srsSet.addAll(layers[0].getAllSrs());
+			model.setAll(srsSet);
+			for (int i = 1; i < layers.length; i++) {
+				model.setAll(model.intersect(layers[i].getAllSrs()));
+			}
+			lstSRSs.setModel(model);
+		}
+		int srsIndex = getSRSIndex(oldSRS);
+		if (srsIndex != -1) {
+			getLstSRSs().setSelectedIndex(srsIndex);
+		}
+
+	}
+
+	public void setListenerSupport(WizardListenerSupport support) {
+		listenerSupport = support;
+	}
+
+	public void setWizardData(WMSServerExplorer data) {
+		this.explorer = data;
+		((JDnDListModel) getLstSelectedLayers().getModel()).clear();
+		getLstSelectedLayers().repaint();
+
+		getLstFormats().setModel(
+				new FormatListModel(this.explorer.getFormats()));
+		getLstInfoFormats().setModel(
+				new FormatListModel(this.explorer.getInfoFormats()));
+		getTreeLayers()
+				.setModel(new LayerTreeModel(this.explorer.getLayerTree()));
+		refreshInfo();
+	}
+
+	private Vector getStyleTitles() {
+		return getTabStyle().getStyleTree().getStyleSelectionTitles();
+	}
+
+	/**
+	 * @return
+	 */
+	private Vector selectedLayersVector() {
+		JDnDListModel mod = (JDnDListModel) getLstSelectedLayers().getModel();
+		Vector lyrs = new Vector();
+		for (int i = 0; i < mod.getSize(); i++) {
+			lyrs.add(mod.getElementAt(i));
+		}
+		return lyrs;
+	}
+
+	public String getFormat() {
+		return (String) getLstFormats().getSelectedValue();
+	}
+
+	public String getInfoFormat() {
+		return (String) getLstInfoFormats().getSelectedValue();
+	}
+
+	public String getLayersQuery() {
+		ArrayList<?> elements = ((JDnDListModel) getLstSelectedLayers().getModel()).getElements();
+		WMSLayerNode[] layers = (WMSLayerNode[]) elements.toArray(new WMSLayerNode[0]);
+
+		// Nombre separado por comas de las capas
+		String layersQuery = layers[layers.length - 1].getName();
+
+		for (int i = layers.length - 2; i >= 0; i--) {
+			layersQuery += ("," + layers[i].getName());
+		}
+
+		return layersQuery;
+
+	}
+
+	/**
+	 * Returns the current selected SRS.
+	 *
+	 * @return
+	 */
+	public String getSRS() {
+		return (String) getLstSRSs().getSelectedValue();
+	}
+
+	/**
+	 * Returns the name of the layer that the user has typed-in
+	 *
+	 * @return
+	 */
+	public String getLayerName() {
+		return getJTxtNomCapa().getText();
+	}
+
+	public void setLayerName(String name) {
+		getJTxtNomCapa().setText(name);
+	}
+
+	/*
+	 * Comento est� metodo pq el extent completo debe proporcionarlo el provider. Eliminar
+	 * por completo en futuras versiones si todo funciona bien 16/12/2013
+	 * public Rectangle2D getLayersRectangle() throws ProjectionLayerException {
+		ArrayList<?> elements = ((JDnDListModel) getLstSelectedLayers().getModel()).getElements();
+		WMSLayerNode[] layers = (WMSLayerNode[]) elements.toArray(new WMSLayerNode[0]);
+		String[] layerNames = new String[layers.length];
+		for (int i = 0; i < layerNames.length; i++) {
+			layerNames[i] = layers[i].getName();
+		}
+		return explorer.getBoundingBox(layerNames, getSRS());
+	}*/
+
+	public TreePath[] getSelectedLayers() {
+		return getTreeLayers().getSelectionPaths();
+	}
+
+	public Hashtable getOnlineResources() {
+		return explorer.getOnlineResources();
+	}
+
+	/**
+	 * The piece of the GetMap request that has the layer names.
+	 *
+	 * @return
+	 */
+	public String getQueryableLayerQuery() {
+		ArrayList<?> elements = ((JDnDListModel) getLstSelectedLayers().getModel()).getElements();
+		WMSLayerNode[] layers = (WMSLayerNode[]) elements.toArray(new WMSLayerNode[0]);
+		// Nombre separado por comas de las capas
+		String layersQuery = "";
+		int i;
+
+		for (i = 0; i < layers.length; i++) {
+			if (layers[i].isQueryable()) {
+				layersQuery = layers[i].getName();
+
+				break;
+			}
+		}
+
+		for (int j = i + 1; j < layers.length; j++) {
+			if (layers[j].isQueryable()) {
+				layersQuery += ("," + layers[j].getName());
+			}
+		}
+
+		return layersQuery;
+	}
+
+	/**
+	 * Returns the index of the CRS within the CRS list.
+	 *
+	 * Devuelve la posicion que ocupa el CRS en la lista de CRS
+	 *
+	 * @param crs
+	 * @return The CRS's index if it exists, -1 if it not exists.
+	 */
+	public int getSRSIndex(String crs) {
+		for (int i = 0; i < getLstSRSs().getModel().getSize(); i++) {
+			if (crs != null
+					&& crs.equals(getLstSRSs().getModel().getElementAt(i))) {
+				return i;
+			}
+		}
+		return -1;
+	}
+
+	/**
+	 * Returns the index of the format within the formats list.
+	 *
+	 * Devuelve la posicion que ocupa el formato en la lista de formatos
+	 *
+	 * @param format
+	 *
+	 * @return The format's index if it exists, -1 if it not exists.
+	 */
+	public int getFormatIndex(String format) {
+		for (int i = 0; i < getLstFormats().getModel().getSize(); i++) {
+			if (format != null
+					&& format
+							.equals(getLstFormats().getModel().getElementAt(i))) {
+				return i;
+			}
+		}
+		return -1;
+	}
+
+	/**
+	 * Returns the index of the format within the formats list.
+	 *
+	 * Devuelve la posicion que ocupa el formato en la lista de formatos
+	 *
+	 * @param format
+	 *
+	 * @return The format's index if it exists, -1 if it not exists.
+	 */
+	public int getInfoFormatIndex(String infoformat) {
+		for (int i = 0; i < getLstInfoFormats().getModel().getSize(); i++) {
+			if (infoformat != null
+					&& infoformat.equals(getLstInfoFormats().getModel().getElementAt(i))) {
+				return i;
+			}
+		}
+		return -1;
+	}
+
+	/**
+	 * This method initializes jTabbedPane
+	 *
+	 * @return TabbedPane
+	 */
+	public JTabbedPane getJTabbedPane() {
+		if (jTabbedPane == null) {
+			jTabbedPane = new JTabbedPane();
+			jTabbedPane.setBounds(4, 4, 502, 415);
+			InfoPanel ip = getTabInfo();
+			ip.addFocusListener(new FocusListener() {
+				public void focusGained(FocusEvent e) {
+					refreshInfo();
+				}
+
+				public void focusLost(FocusEvent e) {
+				}
+			});
+
+			StylesPanel sp = getTabStyle();
+			DimensionPanel dp = getTabDimensions();
+
+			jTabbedPane.addTab(PluginServices.getText(this, "info"), null, ip,
+					null);
+			jTabbedPane.addTab(PluginServices.getText(this, "capas"), null,
+					getTabLayers(), null);
+			jTabbedPane.addTab(PluginServices.getText(this, "estilos"), null,
+					sp, null);
+			stylesTabIndex = jTabbedPane.getTabCount() - 1;
+			jTabbedPane.addTab(PluginServices.getText(this, "dimensiones"),
+					null, dp, null);
+			dimensionTabIndex = jTabbedPane.getTabCount() - 1;
+			jTabbedPane.addTab(PluginServices.getText(this, "formatos"), null,
+					getTabFormats(), null);
+			jTabbedPane.setEnabledAt(dimensionTabIndex, false);
+			jTabbedPane.setEnabledAt(stylesTabIndex, false);
+		}
+		return jTabbedPane;
+	}
+
+	/**
+	 * This method initializes jPanel
+	 *
+	 * @return Panel
+	 */
+	private JPanel getTabLayers() {
+		if (tabLayers == null) {
+			tabLayers = new JPanel();
+			tabLayers.setLayout(null);
+			tabLayers.add(getJPanel4(), null);
+			tabLayers.add(getJPanel2(), null);
+		}
+		return tabLayers;
+	}
+
+	/**
+	 * This method initializes jPanel6
+	 *
+	 * @return Panel
+	 */
+	private StylesPanel getTabStyle() {
+		if (tabStyle == null) {
+			tabStyle = new StylesPanel(this);
+			tabStyle.setEnabled(false);
+			tabStyle.addListener(new BeanListener() {
+				public void beanValueChanged(Object value) {
+					fireWizardComplete(isCorrectlyConfigured());
+				};
+			});
+			tabStyle.addFocusListener(new FocusAdapter() {
+				public void focusGained(FocusEvent e) {
+					refreshStyleTree();
+				}
+			});
+		}
+		return tabStyle;
+	}
+
+	/**
+	 * Sets the focus to the tab next to the current one.
+	 *
+	 * Enfoca a la solapa siguiente a la actualmente enfocada del TabbedPane
+	 *
+	 */
+	public void avanzaTab() {
+		int currentPage = currentPage();
+		int nPages = getNumTabs();
+		if (nPages - 1 > currentPage) {
+			getJTabbedPane().setSelectedIndex(nextEnabledPage());
+		}
+	}
+
+	/**
+	 * Sets the focus to the tab previous to the current one.
+	 *
+	 * Enfoca a la solapa anterior a la actualmente enfocada del TabbedPane
+	 *
+	 */
+	public void retrocedeTab() {
+		this.getJTabbedPane().setSelectedIndex(previousEnabledPage());
+
+	}
+
+	/**
+	 * Returns the index of the current tab.
+	 *
+	 * Devuelve el �ndice de la p�gina actual del wizard.
+	 *
+	 * @return
+	 */
+	public int currentPage() {
+		return getJTabbedPane().getSelectedIndex();
+	}
+
+	/**
+	 * Returns the tab amount that the WMSParamsPanel currently have
+	 *
+	 * Devuelve el numero de solapas que tiene actualmente el WMSParamsPanel
+	 *
+	 * @return int
+	 */
+	public int getNumTabs() {
+		return getJTabbedPane().getTabCount();
+	}
+
+	/**
+	 * <p>
+	 * Returns the index of the previous enabled tab.
+	 * </p>
+	 * <p>
+	 * Devuelve el �ndice de la anterior p�gina habilitada del wizard o -1
+	 * si no hay ninguna.
+	 * </p>
+	 *
+	 * @return The index, or -1 if there is no one.
+	 */
+	public int previousEnabledPage() {
+		int currentPage = currentPage();
+		int j = 0;
+		if (currentPage == 0) {
+			j = -1;
+		}
+		for (int i = currentPage - 1; i > -1; i--) {
+			if (getJTabbedPane().isEnabledAt(i)) {
+				j = i;
+				break;
+			}
+		}
+		return j;
+	}
+
+	/**
+	 * <p>
+	 * Returns the previous of the previous enabled tab.
+	 * </p>
+	 * <p>
+	 * Devuelve el �ndice de la siguiente p�gina habilitada del wizard o -1
+	 * si no hay ninguna.
+	 * </p>
+	 *
+	 * @return The index, or -1 if there is no one.
+	 */
+	public int nextEnabledPage() {
+		int currentPage = currentPage();
+		int nPages = getNumTabs();
+		if (currentPage == nPages) {
+			return -1;
+		}
+		for (int i = currentPage + 1; i < nPages; i++) {
+			if (getJTabbedPane().isEnabledAt(i)) {
+				return i;
+			}
+		}
+		return -1;
+	}
+
+	/**
+	 * Selects/deselects the transparency checkbox.
+	 *
+	 * @param b
+	 */
+	public void setTransparent(boolean b) {
+		getChkTransparency().setSelected(b);
+	}
+
+
+	/**
+	 * Returns true if the WMS protocol version in use is
+	 * >= 1.3.0, and false otherwise.
+	 * @return
+	 */
+	private boolean checkAxisVersion() {
+		try {
+			if (explorer!=null && explorer.getVersion()!=null) {
+				String version = explorer.getVersion();
+				String[] parts = version.split("\\.");
+				if (parts.length>=2) {
+					int major = Integer.parseInt(parts[0]);
+					int minor = Integer.parseInt(parts[1]);
+					if ((major==1 && minor <3) || major < 1) {
+						return false;
+					}
+				}
+				else if (parts.length>0) {
+					int major = Integer.parseInt(parts[0]);
+					if (major<2) {
+						return false;
+					}
+				}
+			}
+		}
+		catch (NumberFormatException ex) {}
+		return true;
+	}
+
+	/**
+	 * Returns a vector of strings containing the styles selected for the
+	 * layers. A blank style is correct and means that default style will be
+	 * used.
+	 *
+	 * @return Vector
+	 */
+	public Vector<RemoteWMSStyle> getStyles() {
+		WMSLayerNode[] layers = selectedLayersToArray();
+		Vector<RemoteWMSStyle> v = new Vector<RemoteWMSStyle>(layers.length);
+		int posInsertion = 0;
+
+		for (int i = layers.length - 1; i >= 0; i--) {
+			RemoteWMSStyle sty = layers[i].getSelectedStyle();
+			if(sty != null)
+				v.add(posInsertion, sty);
+			else {
+				RemoteWMSStyle s = new RemoteWMSStyle();
+//				s.name = "default";
+				//in specification it's said default should be required like this
+				s.name = "";
+				v.add(posInsertion, s);
+			}
+			posInsertion ++;
+		}
+		return v;
+	}
+
+	public Vector<RemoteWMSStyle> getLayerStyle(String layerName) {
+		Vector<RemoteWMSStyle> v = new Vector<RemoteWMSStyle>();
+		WMSLayerNode[] layers = selectedLayersToArray();
+		for (int i = 0; i < layers.length; i++) {
+			if (layers[i].getName().equalsIgnoreCase(layerName)) {
+				RemoteWMSStyle sty = layers[i].getSelectedStyle();
+				v.add(sty);
+				return v;
+			}
+		}
+		return v;
+	}
+
+	/**
+	 * This method initializes tabInfo
+	 *
+	 * @return Panel
+	 */
+	private InfoPanel getTabInfo() {
+		if (tabInfo == null) {
+			tabInfo = new InfoPanel();
+
+		}
+		return tabInfo;
+	}
+
+	public void setDimensions(Vector dimensions) {
+		for (int i = 0; i < dimensions.size(); i++) {
+			String st = (String) dimensions.get(i);
+			if (st.split("=").length == 2) {
+				String[] s = st.split("=");
+				getTabDimensions().setDimensionValue(s[0], s[1]);
+			}
+		}
+
+	}
+
+	/**
+	 * This method initializes tabDimension
+	 *
+	 * @return Panel
+	 */
+	private DimensionPanel getTabDimensions() {
+		if (tabDimensions == null) {
+			tabDimensions = new DimensionPanel();
+			tabDimensions.setEnabled(false);
+			tabDimensions.addListener(new BeanListener() {
+				public void beanValueChanged(Object value) {
+					Vector myDimensions = (Vector) value;
+					if (value != null
+							&& (oldDimensions == null || !(oldDimensions.size() == myDimensions
+									.size() && oldDimensions
+									.containsAll(myDimensions)))) {
+						oldDimensions = myDimensions;
+					}
+					fireWizardComplete(isCorrectlyConfigured());
+				}
+			});
+
+		}
+		return tabDimensions;
+	}
+
+	/**
+	 * @return
+	 */
+	public boolean getTransparency() {
+		return getChkTransparency().isSelected();
+	}
+
+	/**
+	 * @return
+	 */
+	public Vector<String> getDimensions() {
+		return getTabDimensions().getDimensions();
+	}
+
+	public void initWizard() {
+	}
+
+	public void execute() {
+	}
+
+	// Gets all the layers available in the WMS Server
+	protected FLayer getAllSubTree(WMSLayerNode node) throws LoadLayerException {
+		if (node.getChildren().size() > 0) {
+			FLayers l = null;
+			if (this.getMapCtrl() == null) {
+				org.gvsig.app.project.documents.view.gui.AbstractViewPanel v = (org.gvsig.app.project.documents.view.gui.AbstractViewPanel) PluginServices
+						.getMDIManager().getActiveWindow();
+				l = new FLayers();
+				l.setMapContext(v.getMapControl().getMapContext());
+			} else {
+				l = new FLayers();
+				l.setMapContext(this.getMapCtrl().getMapContext());
+			}
+
+			l.setName(node.getTitle());
+			l.setVisible(false);
+			for (int i = 0; i < node.getChildren().size(); i++) {
+				FLayer lyr = getAllSubTree((WMSLayerNode) node.getChildren()
+						.get(i));
+				if (lyr != null) {
+					l.addLayer(lyr);
+				}
+			}
+			return l;
+		} else {
+			DataStoreParameters parameters = explorer.getStoredParameters();
+			WMSDataParameters par = null;
+			if(parameters instanceof WMSDataParameters) {
+				par = (WMSDataParameters) parameters;
+			}
+			if(parameters instanceof TileDataParameters) {
+				DataParameters p = ((TileDataParameters) parameters).getDataParameters();
+				if(p instanceof WMSDataParameters)
+					par = (WMSDataParameters) p;
+			}
+			par.setFormat(getFormat());
+			par.setInfoFormat(getInfoFormat());
+			par.setLayerQuery(node.getName());
+			par.setInfoLayerQuery(getQueryableLayerQuery());
+			par.setSRS(getSRS());
+			par.setWmsTransparency(getTransparency());
+			par.setStyles(getLayerStyle(node.getName()));
+			par.setDimensions(getDimensions());
+			par.setOnlineResources(getOnlineResources());
+			par.setFixedSize(getFixedSize());
+			par.setQueryable(explorer.isQueryable());
+			par.setName(node.getTitle());
+			try {
+                par.setURI(new URI(explorer.getHost()));
+            } catch (URISyntaxException e1) {
+                throw new LoadLayerException("Can't create URI from "+explorer.getHost(), e1);
+            }
+			par.deleteCache(updating);
+			par.setXyAxisOrder(getXYAxisorder());
+
+			FLyrWMS layer = new FLyrWMS();
+			try {
+				layer.setParameters(parameters);
+				layer.setExplorer(explorer);
+				//layer.setFullExtent(getLayersRectangle());
+			} catch (InitializeException e) {
+				throw new LoadLayerException("Error initializating layer", e);
+			}
+			layer.setVisible(false);
+			return layer;
+		}
+	}
+
+	// Gets all the layers available in the WMS Server
+	public FLayer getAllLayers() throws LoadLayerException {
+		LayerTree layerTree = getLayerStructure();
+		return getAllSubTree((WMSLayerNode) layerTree.getModel().getRoot());
+	}
+
+	// changed by Laura:
+	// To delegate getLayer to ParamsPanel from WMSWizard and WMSProps
+	// public FLayer getLayer() { return null; }
+	public FLayer getLayer(boolean cached) throws InitializeException {
+		lastCached = cached;
+		if (getDisagregatedLayers()) {
+			return getLayerTree();
+		} else {
+			return getLayerPlain(cached);
+		}
+	}
+
+	public FLayer getLayer() throws InitializeException {
+		return getLayer(lastCached);
+	}
+
+	/**
+	 * If user does not select the chekbox Disagregate layers, will get the
+	 * layer tree in WMS
+	 *
+	 * @return
+	 * @throws LoadLayerException
+	 */
+	protected FLayer getLayerTree() throws InitializeException {
+		LayerTree layerTree = getLayerStructure();
+		TreePath[] selection = (TreePath[]) getSelectedPaths().toArray(new TreePath[0]);
+		if (selection != null) {
+			return getSubTree((WMSLayerNode) layerTree.getModel().getRoot(), selection);
+		}
+		return null;
+	}
+
+	protected boolean nodeSelected(TreePath[] selection, WMSLayerNode node) {
+		for (int i = 0; i < selection.length; i++) {
+			Object[] components = selection[i].getPath();
+			for (int j = 0; j < components.length; j++) {
+				if (components[j] instanceof WMSLayerNode) {
+					if (((WMSLayerNode) components[j]).getTitle().compareTo(
+							node.getTitle()) == 0) {
+						return true;
+					}
+				}
+			}
+		}
+		return false;
+	}
+
+	protected FLayer getSubTree(WMSLayerNode node, TreePath[] selection) throws InitializeException {
+		if (node.getChildren().size() > 0) {
+			FLayers l = null;
+			if (this.getMapCtrl() == null) {
+				AbstractViewPanel v =
+						(AbstractViewPanel) PluginServices.getMDIManager().getActiveWindow();
+				l = new FLayers();
+				l.setMapContext(v.getMapControl().getMapContext());
+			} else {
+				l = new FLayers();
+				l.setMapContext(this.getMapCtrl().getMapContext());
+			}
+
+			l.setName(node.getTitle());
+			for (int i = 0; i < node.getChildren().size(); i++) {
+				if (nodeSelected(selection, (WMSLayerNode) (node.getChildren().get(i)))) {
+					FLayer lyr = getSubTree((WMSLayerNode) node.getChildren().get(i), selection);
+					if (lyr != null) {
+						l.addLayer(lyr);
+					}
+				}
+			}
+			return l;
+		} else {
+			if (nodeSelected(selection, node)) {
+
+				DataStoreParameters parameters = explorer.getStoredParameters();
+				WMSDataParameters par = null;
+				if(parameters instanceof WMSDataParameters) {
+					par = (WMSDataParameters) parameters;
+				}
+				if(parameters instanceof TileDataParameters) {
+					DataParameters p = ((TileDataParameters) parameters).getDataParameters();
+					if(p instanceof WMSDataParameters)
+						par = (WMSDataParameters) p;
+				}
+				par.setFormat(getFormat());
+				par.setInfoFormat(getInfoFormat());
+				par.setLayerQuery(node.getName());
+				par.setInfoLayerQuery(getQueryableLayerQuery());
+				par.setSRS(getSRS());
+				par.setWmsTransparency(getTransparency());
+				par.setStyles(getLayerStyle(node.getName()));
+				par.setDimensions(getDimensions());
+				par.setOnlineResources(explorer.getOnlineResources());
+				par.setFixedSize(getFixedSize());
+				par.setQueryable(node.isQueryable());
+				par.setName(node.getTitle());
+	            try {
+	                par.setURI(new URI(explorer.getHost()));
+	            } catch (URISyntaxException e1) {
+	                throw new InitializeException("Can't create URI from "+explorer.getHost(), e1);
+	            }
+				par.deleteCache(updating);
+				par.setXyAxisOrder(getXYAxisorder());
+
+				FLyrWMS layer = new FLyrWMS();
+				layer.setParameters(parameters);
+				layer.setName(node.getName());
+				layer.setExplorer(explorer);
+				return layer;
+
+			} else {
+				return null;
+			}
+		}
+	}
+
+	private boolean getXYAxisorder() {
+		DataServerExplorerParameters dsExplParams = explorer.getParameters();
+		if (dsExplParams instanceof WMSServerExplorerParameters) {
+			return ((WMSServerExplorerParameters)dsExplParams).isXyAxisOrder();
+		}
+		return false;
+
+	}
+
+	/**
+	 * If user selects the chekbox Disagregate layers, will get the selected
+	 * layers rendered in one the tree structure in WMS will be lost.
+	 *
+	 * @return
+	 */
+	protected FLayer getLayerPlain(boolean cached) throws InitializeException {
+		WMSDataParameters par = (WMSDataParameters)explorer.getStoredParameters();
+		DataStoreParameters parameters = par;
+
+		if(cached) {
+			DataManager manager = DALLocator.getDataManager();
+			TileDataParameters tileParams = null;
+			try {
+				tileParams = (TileDataParameters) manager.createStoreParameters("Tile Store");
+			} catch (ProviderNotRegisteredException e) {
+				throw new InitializeException(e.getMessage(), e);
+			}
+			tileParams.setDataParameters(par);
+			parameters = tileParams;
+		}
+
+		par.setFormat(getFormat());
+		par.setInfoFormat(getInfoFormat());
+		par.setLayerQuery(getLayersQuery());
+		par.setInfoLayerQuery(getQueryableLayerQuery());
+		par.setSRS(getSRS());
+		par.setWmsTransparency(getTransparency());
+		par.setStyles(getStyles());
+		par.setDimensions(getDimensions());
+		par.setOnlineResources(explorer.getOnlineResources());
+		par.setFixedSize(getFixedSize());
+		par.setQueryable(explorer.isQueryable());
+		par.setName(getLayerName());
+        try {
+            par.setURI(new URI(explorer.getHost()));
+        } catch (URISyntaxException e1) {
+            throw new InitializeException("Can't create URI from "+explorer.getHost(), e1);
+        }		par.deleteCache(updating);
+		par.setXyAxisOrder(getXYAxisorder());
+
+		FLyrWMS layer = new FLyrWMS();
+		layer.setParameters(parameters);
+		layer.setExplorer(explorer);
+		layer.setName(getLayerName());
+		return layer;
+	}
+
+	/**
+	 * Gets the <code>RasterDriverException</code> message. The message
+	 * of this exception is returned by the server
+	 * @param e
+	 * @return
+	 */
+	private String getDriverExceptionMessage(InitializeException e) {
+		Throwable ex = e;
+		final int MAX_DEEP = 10;
+		int deep = 0;
+		while(deep < MAX_DEEP) {
+			Throwable t = null;
+			if(ex instanceof RasterDriverException) {
+				return ex.getMessage();
+			} else if(ex instanceof InitializeException) {
+				t = ex.getCause();
+			} else if(ex instanceof InvocationTargetException) {
+				t = ((InvocationTargetException)ex).getTargetException();
+			}
+			if(t == null)
+				return null;
+			else
+				ex = t;
+			deep++;
+		}
+		return null;
+	}
+
+	public Dimension getFixedSize() {
+		return sizeFixed;
+	}
+
+	/**
+	 * This method initializes chkExtendedNames
+	 *
+	 * @return CheckBox
+	 */
+	private JCheckBox getChkExtendedNames() {
+		if (chkExtendedNames == null) {
+			chkExtendedNames = new JCheckBox();
+			chkExtendedNames.setText(PluginServices.getText(this,
+					"show_layer_names"));
+			chkExtendedNames.addItemListener(new java.awt.event.ItemListener() {
+				public void itemStateChanged(java.awt.event.ItemEvent e) {
+					boolean b = chkExtendedNames.isSelected();
+					getTreeLayers().showLayerNames = b;
+					getTreeLayers().repaint();
+					getLstSelectedLayers().showLayerNames = b;
+					getLstSelectedLayers().repaint();
+					getStyleTree().showLayerNames = b;
+				}
+			});
+			chkExtendedNames
+					.addActionListener(new java.awt.event.ActionListener() {
+						public void actionPerformed(java.awt.event.ActionEvent e) {
+							fPrefs.putBoolean("show_layer_names",
+									chkExtendedNames.isSelected());
+						}
+					});
+			chkExtendedNames.setBounds(19, 300, 212, 20);
+			chkExtendedNames.setSelected(fPrefs.getBoolean("show_layer_names",
+					false));
+
+		}
+		return chkExtendedNames;
+	}
+
+	/**
+	 * This method initializes btnUp
+	 *
+	 * @return Button
+	 */
+	private JButton getBtnUp() {
+		if (btnUp == null) {
+			btnUp = new JButton();
+			btnUp.setBounds(438, 184, 30, 30);
+			btnUp.setToolTipText(PluginServices.getText(this, "move_layer_up"));
+			btnUp.addActionListener(new java.awt.event.ActionListener() {
+				public void actionPerformed(java.awt.event.ActionEvent e) {
+					LayerList list = getLstSelectedLayers();
+					int[] selectedIndices = list.getSelectedIndices();
+					int index = list.getSelectedIndex();
+					if (selectedIndices != null && selectedIndices.length == 1
+							&& index > 0) {
+						JDnDListModel m = (JDnDListModel) list.getModel();
+						m.itemsMoved(index - 1, new int[] { index });
+						list.setSelectedIndex(index - 1);
+					}
+				}
+			});
+			btnUp.setIcon(IconThemeHelper.getImageIcon("aplication-preferences-uparrow"));
+		}
+		return btnUp;
+	}
+
+	/**
+	 * This method initializes btnDown
+	 *
+	 * @return Button
+	 */
+	private JButton getBtnDown() {
+		if (btnDown == null) {
+			btnDown = new JButton();
+			btnDown.setBounds(438, 215, 30, 30);
+			btnDown.setToolTipText(PluginServices.getText(this,
+					"move_layer_down"));
+			btnDown.addActionListener(new java.awt.event.ActionListener() {
+				public void actionPerformed(java.awt.event.ActionEvent e) {
+					LayerList list = getLstSelectedLayers();
+					int[] selectedIndices = list.getSelectedIndices();
+					int index = list.getSelectedIndex();
+					if (selectedIndices != null
+							&& selectedIndices.length == 1
+							&& index < getLstSelectedLayers().getModel()
+									.getSize() - 1) {
+						JDnDListModel m = (JDnDListModel) list.getModel();
+						m.itemsMoved(index + 1, new int[] { index });
+						list.setSelectedIndex(index + 1);
+					}
+				}
+			});
+			btnDown.setIcon(IconThemeHelper.getImageIcon("aplication-preferences-downarrow"));
+		}
+		return btnDown;
+	}
+
+	public void setFixedSize(Dimension sz) {
+		sizeFixed = sz;
+	}
+
+	public ArrayList<TreePath> getSelectedPaths() {
+		return selectedPaths;
+	}
+
+	public LayerTree getJustTreeLayer() {
+		return treeLayers;
+	}
+
+	/**
+	 * This method initializes chkDisagregate
+	 *
+	 * @return CheckBox
+	 */
+	private JCheckBox getChkDisagregate() {
+		if (chkDisagregate == null) {
+
+			chkDisagregate = new JCheckBox();
+			chkDisagregate.setBounds(new java.awt.Rectangle(19,276,269,20));
+			chkDisagregate.setText(PluginServices.getText(this,
+					"disagregate_layers"));
+			chkDisagregate.setSelected(false);
+
+		}
+		return chkDisagregate;
+	}
+
+	public boolean getDisagregatedLayers() {
+		return chkDisagregate.isSelected();
+	}
+
+	public void disableDisagregatedLayers() {
+		chkDisagregate.setEnabled(false);
+	}
+
+	@Override
+	public DataStoreParameters[] getParameters() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	@Override
+	public void close() {
+		// Nothing to do
+	}
+
+	public WMSServerExplorer getExplorer() {
+		return explorer;
+	}
+} // @jve:decl-index=0:visual-constraint="10,10"

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/WMSParamsPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/InfoPanel.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/InfoPanel.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/InfoPanel.java	(revision 21019)
@@ -0,0 +1,243 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+ 
+package org.gvsig.raster.wms.app.wmsclient.gui.panel;
+
+import java.util.Vector;
+
+import javax.swing.JEditorPane;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+
+import org.gvsig.andami.PluginServices;
+import org.gvsig.raster.wms.io.WMSLayerNode;
+import org.gvsig.raster.wms.io.WMSServerExplorer;
+
+
+/**
+ * Service Information Panel
+ */
+
+class InfoPanel extends JPanel {
+	private static final long serialVersionUID = 1L;
+	private final String bgColor0 = "\"#FEEDD6\""; // light salmon
+    private final String bgColor1 = "\"#EAEAEA\""; // light grey
+    //private final String bgColor2 = "\"#F2FEFF\""; // light blue
+    private final String bgColor3 = "\"#FBFFE1\""; // light yellow
+
+    private final String service_title       = PluginServices.getText(this, "service_info");
+    private final String server              = PluginServices.getText(this, "server");
+    private final String server_type         = PluginServices.getText(this, "server_type");
+    private final String server_abstract     = PluginServices.getText(this, "server_abstract");
+    private final String server_title        = PluginServices.getText(this, "server_title");
+    private final String layers_title        = PluginServices.getText(this, "selected_layers");
+    private final String layer_title         = PluginServices.getText(this, "layer_title");
+    private final String layer_abstract      = PluginServices.getText(this, "layer_abstract");
+    private final String selected_dimensions = PluginServices.getText(this, "selected_dimensions");
+    private final String style               = PluginServices.getText(this, "style");
+    private final String format_title        = PluginServices.getText(this, "format");
+    private final String infoformat_title    = PluginServices.getText(this, "infoformat");
+    private final String srs_title           = "SRS";
+    private final String properties			 = PluginServices.getText(this, "properties");
+    private final String layer_name			 = PluginServices.getText(this, "name");
+	private JEditorPane editor = null;
+
+
+    /**
+     * Creates a new instance of InfoPanel with double buffer and null layout
+     *
+     */
+	public InfoPanel() {
+		super();
+        setLayout(null);
+        JScrollPane src = new JScrollPane();
+        src.setBounds(5, 5, 485, 375);
+        add(src, null);
+        src.setViewportView(getEditor());
+	}
+
+    /**
+     * This method initializes tblInfo
+     *
+     * @return javax.swing.JTable
+     */
+    private JEditorPane getEditor() {
+        if (editor == null) {
+            editor = new JEditorPane();
+            editor.setEditable(false);
+        }
+        return editor;
+    }
+
+
+    /**
+     * Fills the text pane with a data table describing the service and the
+     * selected settings.
+     *
+     * @param dataSource
+     */
+    @SuppressWarnings("unchecked")
+	public void refresh(WMSServerExplorer dataSource, 
+			Vector layers, 
+			Vector styles, 
+			String format, 
+			String infoFormat, 
+			String srs, 
+			Vector dimensions) {
+
+        String server_text = dataSource.getHost();
+        String server_type_text = dataSource.getServerType();
+        String server_title_text = dataSource.getTitle();
+        String server_abstract_text = dataSource.getAbstract();
+        String font = "Arial";
+
+        if (server_text == null)
+            server_text = "-";
+        if (server_type_text == null)
+            server_type_text = "-";
+        if (server_title_text == null)
+            server_title_text = "-";
+        if (server_abstract_text == null)
+            server_abstract_text = "-";
+
+        if (format == null)
+            format = PluginServices.getText(this, "none_selected");
+        if (srs == null)
+            srs = PluginServices.getText(this, "none_selected");
+
+        String layers_html = "";
+        for (int i = 0; i < layers.size(); i++) {
+        	WMSLayerNode layer = (WMSLayerNode) layers.get(i);
+            String layer_name_text = layer.getName();
+            String style_title = (styles==null) ? PluginServices.getText(this, "not_available") : (String) styles.get(i);//((FMapWMSStyle) selectedStyles.get(i)).title;
+            String layer_abstract_text = layer.getAbstract();
+            String layer_title_text = layer.getTitle();
+
+            if (layer_name_text ==null)
+            	layer_name_text = "-";
+            if (style_title==null)
+            	style_title = "-";
+            if (layer_abstract_text==null)
+            	layer_abstract_text = "-";
+            if (layer_title_text == null)
+            	layer_title_text = "-";
+            String layer_html =
+            	"  <tr valign=\"top\">" +
+                "     <td bgcolor=\"#D6D6D6\" align=\"right\"><font face=\"Arial\" size=\"3\" align=\"right\"><b>"+layer_name+"</b></font></td>" +
+                "     <td bgcolor="+bgColor0+"><font face=\"Arial\" size=\"3\">"+layer_name_text+"</font></td>" +
+                "  </tr>" +
+                "  <tr valign=\"top\">" +
+                "     <td width=\"119\" height=\"18\" bgcolor=\"#D6D6D6\" align=\"right\"><font face=\"Arial\" size=\"3\"><b>"+layer_title+"</b></font></td>" +
+                "     <td width=\"322\" height=\"18\" bgcolor="+bgColor1+"><font face=\"Arial\" size=\"3\">"+layer_title_text+"</font></td>" +
+                "  </tr>" +
+                "  <tr valign=\"top\">" +
+                "     <td bgcolor=\"#D6D6D6\" align=\"right\"><font face=\"Arial\" size=\"3\" align=\"right\"><b>"+layer_abstract+"</b></font></td>" +
+                "     <td bgcolor="+bgColor0+"><font face=\"Arial\" size=\"3\">"+layer_abstract_text+"</font></td>" +
+                "  </tr>" +
+                "  <tr valign=\"top\">" +
+                "     <td bgcolor=\"#D6D6D6\" align=\"right\"><font face=\"Arial\" size=\"3\" align=\"right\"><b>"+style+"</b></font></td>" +
+                "     <td bgcolor="+bgColor1+"><font face=\"Arial\" size=\"3\">"+style_title+"</font></td>" +
+                "  </tr>" +
+                "  <tr>" +
+                "  </tr>";
+            layers_html += layer_html;
+        }
+        if (!layers_html.equals(""))
+            layers_html =
+                "  <tr valign=\"top\" bgcolor=\"#FFFFFF\">" +
+                "    <td width=\"92\" height=\"18\" bgcolor="+bgColor3+" colspan=\"2\"><font face=\""+font+"\" size=\"4\"><b>"+layers_title+"</font></b></td>" +
+                "  </tr>" + layers_html;
+        String dimension_html = "";
+        if (dimensions != null) {
+        	boolean swap = false;
+        	for (int i = 0; i < dimensions.size(); i++) {
+        		String color = swap ? bgColor0 : bgColor1;
+        		String[] dimension = ((String) dimensions.get(i)).split("=");
+        		dimension_html +=
+        			"  <tr valign=\"top\" bgcolor=" + color + ">" +
+        			"    <td width=\"120\" height=\"18\" bgcolor=\"#D6D6D6\" align=\"right\"><b>" + dimension[0] + "</b></td>" +
+        			"    <td width=\"322\" height=\"18\">" + dimension[1] + "</td>" +
+        			"  </tr>";
+        		swap = !swap;
+        	}
+        }
+        if (!dimension_html.equals(""))
+        	dimension_html =
+        		"  <tr valign=\"top\">" +
+        		"    <td width=\"92\" height=\"18\" bgcolor=" + bgColor3 + " colspan=\"2\"><font face=\"" + font + "\" size=\"4\"><b>" + selected_dimensions + "</font></b></td>" +
+        		"  </tr>" + dimension_html;
+
+        String format_html =
+        	"  <tr valign=\"top\" bgcolor=\"#FFFFFF\">" +
+            "    <td width=\"92\" height=\"18\" bgcolor=" + bgColor3 + " colspan=\"2\"><font face=\"" + font + "\" size=\"4\"><b>" + properties + "</font></b></td>" +
+            "  </tr>" +
+            "  <tr valign=\"top\" bgcolor=" + bgColor0 + ">" +
+            "    <td height=\"18\" bgcolor=\"#D6D6D6\" align=\"right\"><font face=\"" + font + "\" size=\"3\"><b>" + format_title + "</b></font></td>" +
+            "    <td><font face=\"" + font + "\" size=\"3\"><font face=\"" + font + "\" size=\"3\">" + format + "</font></td>" +
+            "  </tr>" +
+            "  <tr valign=\"top\" bgcolor=" + bgColor1 + ">" +
+            "    <td height=\"18\" bgcolor=\"#D6D6D6\" align=\"right\"><font face=\"" + font + "\" size=\"3\"><b>" + srs_title + "</font></b></td>" +
+            "    <td><font face=\"" + font + "\" size=\"3\">" + srs + "</font></td>" +
+            "  </tr>" +
+            "  <tr valign=\"top\" bgcolor=" + bgColor0 + ">" +
+            "    <td height=\"18\" bgcolor=\"#D6D6D6\" align=\"right\"><font face=\"" + font + "\" size=\"3\"><b>" + infoformat_title + "</font></b></td>" +
+            "    <td><font face=\"" + font + "\" size=\"3\">" + infoFormat + "</font></td>" +
+            "  </tr>";
+
+        String html =
+
+            "<html>" +
+            "<body>" +
+            "<table align=\"center\" width=\"437\" height=\"156\" border=\"0\" cellpadding=\"4\" cellspacing=\"4\">" +
+            "  <tr valign=\"top\" bgcolor=\"#FFFFFF\">" +
+            "    <td width=\"92\" height=\"18\" bgcolor=" + bgColor3 + " colspan=\"2\"><font face=\"" + font + "\" size=\"4\"><b>"+service_title+"</font></b></td>" +
+            "  </tr>" +
+            "  <tr valign=\"top\" bgcolor=" + bgColor0 + ">" +
+            "    <td width=\"92\" height=\"18\" bgcolor=\"#D6D6D6\" align=\"right\"><font face=\"" + font + "\" size=\"3\"><b>"+server+"</font></b></td>" +
+            "    <td width=\"268\"><font face=\"" + font + "\" size=\"3\">" + server_text + "</font></td>" +
+            "  </tr>" +
+            "  <tr valign=\"top\" bgcolor=" + bgColor1 + ">" +
+            "    <td height=\"18\" bgcolor=\"#D6D6D6\" align=\"right\"><font face=\"" + font + "\" size=\"3\"><b>" + server_type + "</b></font></td>" +
+            "    <td><font face=\"" + font + "\" size=\"3\">" + server_type_text + "</font></td>" +
+            "  </tr>" +
+            "  <tr valign=\"top\" bgcolor=" + bgColor0 + ">" +
+            "    <td height=\"18\" bgcolor=\"#D6D6D6\" align=\"right\"><font face=\"" + font + "\" size=\"3\"><b>" + server_title + "</b></font></td>" +
+            "    <td><font face=\"" + font+  "\" size=\"3\"><font face=\"" + font + "\" size=\"3\">" + server_title_text + "</font></td>" +
+            "  </tr>" +
+            "  <tr valign=\"top\" bgcolor=" + bgColor1 + ">" +
+            "    <td height=\"18\" bgcolor=\"#D6D6D6\" align=\"right\"><font face=\"" + font + "\" size=\"3\"><b>" +  server_abstract + "</font></b></td>" +
+            "    <td><font face=\"" + font + "\" size=\"3\">" + server_abstract_text + "</font></td>" +
+            "  </tr>" +
+
+            "  <tr>" +
+            "  </tr>" +
+            layers_html +
+            dimension_html +
+            format_html +
+            "</table>" +
+            "</body>" +
+            "</html>";
+
+        getEditor().setContentType("text/html");
+        getEditor().setText(html);
+    }
+}

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/InfoPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/LayerTree.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/LayerTree.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/LayerTree.java	(revision 21019)
@@ -0,0 +1,148 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+ 
+package org.gvsig.raster.wms.app.wmsclient.gui.panel;
+
+import java.awt.Component;
+
+import javax.swing.JToolTip;
+import javax.swing.JTree;
+import javax.swing.ToolTipManager;
+import javax.swing.tree.DefaultTreeCellRenderer;
+
+import org.gvsig.andami.PluginServices;
+import org.gvsig.gui.beans.controls.MultiLineToolTip;
+import org.gvsig.raster.wms.io.WMSLayerNode;
+
+
+/**
+ * LayerTree extends the standard JTree class to allow use custom tooltips.
+ * It is just JTree containing RemoteLayerNode at its nodes.
+ * 
+ * @author jaume
+ *
+ */
+public class LayerTree extends JTree {
+	public boolean showLayerNames = false;
+	private int count = 0;
+	public LayerTree(){
+        super();
+        ToolTipManager.sharedInstance().registerComponent(this);
+        ToolTipManager.sharedInstance().setDismissDelay(60*1000);
+        setCellRenderer(new MyRenderer());
+    }
+
+    /**
+     * Layer tree specific renderer allowing to show multiple line
+     * tooltips 
+     * @author jaume
+     *
+     */
+    private class MyRenderer extends DefaultTreeCellRenderer {
+       
+        
+       public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) {
+            super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);
+            if (value instanceof WMSLayerNode){
+            	WMSLayerNode layer = (WMSLayerNode) value;
+                
+                String myLatLonTxt = layer.getLatLonBox();
+                if (myLatLonTxt == null)
+                    myLatLonTxt = "-";
+                
+                String myAbstract = layer.getAbstract();
+                
+                if (myAbstract == null)
+                    myAbstract = "-";
+                else 
+                    myAbstract = format(myAbstract.trim(), 100);
+                
+                String text =
+                    PluginServices.getText(this, "abstract") + ":\n" + myAbstract +
+                    "\n\n" +
+                    PluginServices.getText(this, "covered_extension") + ":\n" + myLatLonTxt;
+                
+                setToolTipText(text);
+                
+                if (!showLayerNames) {
+                	if (layer.getName() != null || layer.getName() == "") {
+                		text = layer.toString();
+                		text = text.substring(text.indexOf(']')+2, text.length());
+                		setText(text);
+                	}
+                }
+                
+//                Dimension sz  = getPreferredSize();
+//                sz.setSize((sz.getWidth()+50) - (3*count), sz.getHeight());
+//                setPreferredSize(sz);
+//                count++;
+                
+            } else {
+                setToolTipText(null);
+            }
+            return this;
+        }
+    }
+    
+    
+    /**
+     * Cuts the message text to force its lines to be shorter or equal to 
+     * lineLength.
+     * @param message, the message.
+     * @param lineLength, the max line length in number of characters.
+     * @return the formated message.
+     */
+    public static String format(String message, int lineLength){
+        if (message.length() <= lineLength) return message;
+        String[] lines = message.split("\n");
+        String theMessage = "";
+        for (int i = 0; i < lines.length; i++) {
+            String line = lines[i].trim();
+            if (line.length()<lineLength)
+                theMessage += line+"\n";
+            else {
+                String[] chunks = line.split(" ");
+                String newLine = "";
+                for (int j = 0; j < chunks.length; j++) {
+                    int currentLength = newLine.length();
+                    chunks[j] = chunks[j].trim();
+                    if (chunks[j].length()==0)
+                        continue;
+                    if ((currentLength + chunks[j].length() + " ".length()) <= lineLength)
+                        newLine += chunks[j] + " ";
+                    else {
+                        newLine += "\n"+chunks[j]+" ";
+                        theMessage += newLine;
+                        newLine = "";
+                    }
+                }
+            }
+        }
+        return theMessage;
+    }
+    
+    public JToolTip createToolTip() {
+    	MultiLineToolTip tip = new MultiLineToolTip();
+    	tip.setComponent(this);
+    	return tip;
+    }
+}

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/LayerTree.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/wizard/SRSListModel.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/wizard/SRSListModel.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/wizard/SRSListModel.java	(revision 21019)
@@ -0,0 +1,155 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+ 
+package org.gvsig.raster.wms.app.wmsclient.gui.wizard;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.TreeSet;
+
+import javax.swing.AbstractListModel;
+
+
+/**
+ * DOCUMENT ME!
+ *
+ * @author Fernando Gonz�lez Cort�s
+ */
+public class SRSListModel extends AbstractListModel {
+	ArrayList srs = new ArrayList();
+	
+	public int getSize() {
+		return srs.size();
+	}
+
+	public Object getElementAt(int index) {
+		return srs.get(index);
+	}
+	
+	public void setAll(Collection c) {
+		
+		srs.clear();
+		srs.addAll(c);
+	}
+	
+	public Collection intersect(Collection c) {
+		TreeSet resul = new TreeSet();
+    	for (int i = 0; i < srs.size(); i++) {
+			if (c.contains(srs.get(i)))
+				resul.add(srs.get(i));
+		}
+    	return resul;	
+	}
+	/*ArrayList comunes = new ArrayList();
+	
+    private HashSet srsSet = new HashSet();
+	private HashMap cuenta = new HashMap();
+	private ArrayList nombresSRS = new ArrayList();
+
+    /**
+     * DOCUMENT ME!
+     *
+     * @param srs DOCUMENT ME!
+     * /
+    public void add(String srs) {
+    	System.out.println("A�adiendo " + srs);
+        if (!srsSet.add(srs)) {
+            Integer i = (Integer) cuenta.get(srs);
+            cuenta.put(srs, new Integer(i.intValue() + 1));
+            System.out.println("Ya hab�a, llevamos " + i.intValue() + 1);
+        } else {
+			nombresSRS.add(srs);
+            cuenta.put(srs, new Integer(1));
+			fireContentsChanged(this, nombresSRS.size()-1,nombresSRS.size()-1);
+        }
+    }
+
+    /**
+     * DOCUMENT ME!
+     *
+     * @param srs DOCUMENT ME!
+     * /
+    public void del(String srs) {
+    	System.out.println("Eliminando SRS: "+ srs);
+        Integer i = (Integer) cuenta.get(srs);
+
+        if (i == null) {
+        	System.out.println("Eliminando un elemento que no estaba");
+            return;
+        }
+
+        int nuevo = i.intValue() - 1;
+
+		System.out.println("quedan " + nuevo);
+		
+        if (nuevo == 0) {
+            cuenta.remove(srs);
+            srsSet.remove(srs);
+            nombresSRS.remove(srs);
+			fireContentsChanged(this, 0,nombresSRS.size()-1);
+        } else {
+            cuenta.put(srs, new Integer(nuevo));
+        }
+    }
+
+    /**
+     * DOCUMENT ME!
+     *
+     * @return
+     * /
+    public Iterator iterator() {
+        return srsSet.iterator();
+    }
+
+    /**
+     * DOCUMENT ME!
+     *
+     * @return
+     * /
+    public int size() {
+        return srsSet.size();
+    }
+
+	/**
+	 * @see javax.swing.ListModel#getSize()
+	 * /
+	public int getSize() {
+		return nombresSRS.size();
+	}
+
+	/**
+	 * @see javax.swing.ListModel#getElementAt(int)
+	 * /
+	public Object getElementAt(int index) {
+		return nombresSRS.get(index);
+	}
+	
+	public ArrayList intersect(Collection col) {
+    	ArrayList resul = new ArrayList();
+    	for (int i = 0; i < nombresSRS.size(); i++) {
+			if (col.contains(nombresSRS.get(i)))
+				resul.add(nombresSRS.get(i));
+		}
+    	return resul;
+    }
+    */
+}

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/wizard/SRSListModel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/wizard/WMSWizard.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/wizard/WMSWizard.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/wizard/WMSWizard.java	(revision 21019)
@@ -0,0 +1,774 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+* MA  02110-1301, USA.
+*
+*/
+
+package org.gvsig.raster.wms.app.wmsclient.gui.wizard;
+
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.GridLayout;
+import java.awt.Insets;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Hashtable;
+import java.util.Properties;
+import java.util.Vector;
+import java.util.prefs.Preferences;
+
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.tree.TreePath;
+
+import org.apache.commons.io.IOUtils;
+import org.cresques.cts.IProjection;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.andami.PluginsLocator;
+import org.gvsig.andami.PluginsManager;
+import org.gvsig.andami.persistence.serverData.ServerDataPersistence;
+import org.gvsig.andami.ui.mdiManager.IWindow;
+import org.gvsig.app.gui.WizardPanel;
+import org.gvsig.app.gui.wizards.WizardListener;
+import org.gvsig.app.gui.wizards.WizardListenerSupport;
+import org.gvsig.app.project.documents.view.gui.AbstractViewPanel;
+import org.gvsig.compat.net.ICancellable;
+import org.gvsig.fmap.dal.DALLocator;
+import org.gvsig.fmap.dal.DataManager;
+import org.gvsig.fmap.dal.DataParameters;
+import org.gvsig.fmap.dal.DataStoreParameters;
+import org.gvsig.fmap.dal.coverage.exception.ConnectException;
+import org.gvsig.fmap.dal.coverage.exception.RemoteServiceException;
+import org.gvsig.fmap.dal.coverage.store.parameter.TileDataParameters;
+import org.gvsig.fmap.dal.exception.InitializeException;
+import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException;
+import org.gvsig.fmap.dal.exception.ValidateDataParametersException;
+import org.gvsig.fmap.mapcontext.exceptions.LoadLayerException;
+import org.gvsig.fmap.mapcontext.layers.FLayer;
+import org.gvsig.gui.beans.Messages;
+import org.gvsig.raster.cache.tile.TileCacheLibrary;
+import org.gvsig.raster.util.CancelTaskImpl;
+import org.gvsig.raster.wms.app.wmsclient.WMSClientExtension;
+import org.gvsig.raster.wms.app.wmsclient.gui.panel.WMSParamsPanel;
+import org.gvsig.raster.wms.io.RemoteWMSStyle;
+import org.gvsig.raster.wms.io.WMSDataParameters;
+import org.gvsig.raster.wms.io.WMSLayerNode;
+import org.gvsig.raster.wms.io.WMSServerExplorer;
+import org.gvsig.raster.wms.io.WMSServerExplorerParameters;
+import org.gvsig.tools.dynobject.DynObject;
+import org.gvsig.utils.swing.jcomboServer.ServerData;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+
+/**
+ * The WMS properties container panel.
+ *
+ * @author gvSIG Team
+ */
+public class WMSWizard extends WizardPanel implements ActionListener {
+	private static final long             serialVersionUID       = 1L;
+	private static Logger                 logger                 = LoggerFactory.getLogger(WMSWizard.class);
+	private String                        serversPropsFilename       = "servers.properties";
+
+	protected int                         page                   = 0;
+	protected boolean                     connected              = false;
+	private ComboServerController         cmbHost                = null;
+	protected WizardListenerSupport       listenerSupport        = null;
+	protected WMSParamsPanel              wmsParamsPanel         = null;
+	private boolean                       usingTileCache         = fPrefs.getBoolean("tile_cache", false);
+	private static Preferences            fPrefs                 = Preferences.userRoot().node( "gvsig.wms-wizard" );
+	protected int                         firstPage              = 0;
+	private IProjection                   proj                   = null;
+	private ICancellable                  cancel                 = null;
+	private WMSDataParameters             storeParams            = null;
+	private WMSServerExplorer             explorer               = null;
+
+  private WMSWizardView view = null;
+  
+    private PluginServices plugin = null;
+
+
+//	public WMSWizard (WMSParamsPanel params) {
+//		super();
+//		firstPage = 1;
+//		page = firstPage;
+//		this.wmsParamsPanel = params;
+//		this.explorer = wmsParamsPanel.getExplorer();
+//    this.view = new WMSWizardView();
+//
+//		setTabName("WMS");
+////		lblServerType = new JLabel();
+////		lblServerType.setBounds(20, 444, 100, 20);
+////		lblServerType.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+////		lblServerType.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
+////		lblServerType.setFont(new java.awt.Font("Arial", java.awt.Font.PLAIN, 11));
+//		this.view.lblServerType.setText(PluginServices.getText(this, "server_type")+":");
+////		lblServerTypeValue = new JLabel();
+////		lblServerTypeValue.setBounds(128, 444, 148, 20);
+////		lblServerTypeValue.setFont(new java.awt.Font("Arial", java.awt.Font.BOLD, 11));
+//		this.view.lblServerTypeValue.setText("-");
+//		this.setSize(510, 468);
+//		this.setLayout(null);
+//		this.setPreferredSize(new java.awt.Dimension(750, 420));
+//		this.setVisible(true);
+//
+//		wmsParamsPanel.setListenerSupport(this.getWizardListenerSupport());
+//		wmsParamsPanel.setBounds(0, 5, 510, 428);
+//		wmsParamsPanel.getJTabbedPane().addMouseListener(
+//				new java.awt.event.MouseAdapter() {
+//					public void mouseClicked(java.awt.event.MouseEvent e) {
+//						page = wmsParamsPanel.currentPage() + 1;
+//						activarVisualizarBotones();
+//					}
+//				});
+//		this.add(wmsParamsPanel, null);
+//		this.add(lblServerType, null);
+//		this.add(lblServerTypeValue, null);
+//		getWMSParamsPanel().setVisible(true);
+//
+//		connected = true;
+//	}
+
+	/**
+	 * This is the default constructor
+	 */
+	public WMSWizard() {
+		super();
+		firstPage = 0;
+		page = firstPage;
+		initialize();
+
+		IWindow[] windows = PluginServices.getMDIManager().getAllWindows();
+		for (int i = 0; i < windows.length; i++) {
+			if(windows[i] instanceof AbstractViewPanel)
+				proj = ((AbstractViewPanel)windows[i]).getProjection();
+		}
+		cancel = new CancelTaskImpl();
+	}
+  
+	/**
+	 * This method initializes this
+	 */
+	private void initialize() {
+    this.view = new WMSWizardView();
+    
+    PluginsManager pluginsManager = PluginsLocator.getManager();
+    this.plugin = pluginsManager.getPlugin(WMSClientExtension.class);
+
+
+		setTabName("WMS");
+
+		this.view.lblServerType.setText(PluginServices.getText(this, "server_type")+":");
+		this.view.lblServerTypeValue.setText("-");
+
+    this.view.btnConnect.setText(PluginServices.getText(this, "conectar"));
+    this.view.btnConnect.addActionListener(this);
+    
+    this.view.btnCancel.setText(PluginServices.getText(this, "cancel"));
+    this.view.btnCancel.addActionListener(this);
+    
+  	this.view.jLabel1.setText(PluginServices.getText(this, "name") + ":");
+
+    this.view.btnSiguiente.setText(PluginServices.getText(this, "siguiente"));
+    this.view.btnSiguiente.addActionListener(new java.awt.event.ActionListener() {
+      public void actionPerformed(java.awt.event.ActionEvent e) {
+        if(page == firstPage && getChkTileCache().isSelected()) {
+          messageBoxInfo("remote_service_tiled", TileCacheLibrary.ALTERNATIVE_TILESIZE + "", this);
+        }
+        if (page > firstPage) {
+          // si page es mayor que cero, vamos enfocando las
+          // sucesivas SOLAPAS del WMSParamsPanel
+          getWMSParamsPanel().avanzaTab();
+          page = getWMSParamsPanel().currentPage();
+        }
+        page++;
+        getPanelPage1().setVisible(false);
+        getWMSParamsPanel().setVisible(true);
+        activarVisualizarBotones();
+      }
+    });
+    this.view.btnAnterior.setText(PluginServices.getText(this, "anterior"));
+    this.view.btnAnterior.addActionListener(new java.awt.event.ActionListener() {
+      public void actionPerformed(java.awt.event.ActionEvent e) {
+        page --;
+        if (page > firstPage) {
+          // Tenemos que retroceder en el wmsParamsPanel
+          getWMSParamsPanel().retrocedeTab();
+          page = getWMSParamsPanel().currentPage() + 1;
+          activarVisualizarBotones();
+          view.btnCancel.setEnabled(true);
+          view.btnConnect.setEnabled(true);
+        } else if (page==firstPage){
+          activarVisualizarBotones();
+          page = firstPage +1;
+          //wmsParamsPanel.limpiaWizard();
+          getLblTitle().setText("-");
+          getTxtAbstract().setText("");
+          getWMSParamsPanel().retrocedeTab();
+          getPanelPage1().setVisible(true);
+          getWMSParamsPanel().setVisible(false);
+          getBtnSiguiente().setEnabled(false);
+          connected = false;
+        }
+        getWizardListenerSupport().callStateChanged(getWMSParamsPanel().isCorrectlyConfigured());
+      }
+    });
+    
+    this.view.chkCaching.setText(PluginServices.getText(this, "refresh_capabilities"));
+    this.view.chkCaching.setToolTipText(PluginServices.getText(this, "refresh_capabilities_tooltip"));
+    this.view.chkCaching.setSelected(getWMSParamsPanel().isUpdatingCache());
+    this.view.chkCaching.addItemListener(new java.awt.event.ItemListener() {
+      public void itemStateChanged(java.awt.event.ItemEvent e) {
+        getWMSParamsPanel().setUpdatingCache(view.chkCaching.isSelected());
+      }
+    });
+    this.view.chkCaching.addActionListener(new java.awt.event.ActionListener() {
+      public void actionPerformed(java.awt.event.ActionEvent e) {
+        fPrefs.putBoolean("refresh_capabilities", view.chkCaching.isSelected());
+      }
+    });
+    
+    this.view.chkTileCache.setText(PluginServices.getText(this, "tile_cache"));
+    this.view.chkTileCache.setToolTipText(PluginServices.getText(this, "tile_cache_tooltip"));
+    this.view.chkTileCache.setSelected(usingTileCache);
+    this.view.chkTileCache.addItemListener(new java.awt.event.ItemListener() {
+      public void itemStateChanged(java.awt.event.ItemEvent e) {
+        usingTileCache = view.chkTileCache.isSelected();
+      }
+    });
+    this.view.chkTileCache.addActionListener(new java.awt.event.ActionListener() {
+      public void actionPerformed(java.awt.event.ActionEvent e) {
+        fPrefs.putBoolean("tile_cache", view.chkTileCache.isSelected());
+      }
+    });
+
+    this.view.chkAxisOrder.setText(PluginServices.getText(this,
+            "Assume_coordinates_follow_XY_axis_order"));
+    this.view.chkAxisOrder.setToolTipText(PluginServices.getText(this,
+        "Only_needed_for_servers_not_strictly_honouring_the_WMS_standard"));
+    
+    cmbHost = new ComboServerController(this.view.cmbHost);
+    cmbHost.setModel(new DefaultComboBoxModel());
+    cmbHost.setServerList(getServerDataPersistence().getArrayOfServerData());
+
+    this.setPreferredSize(new Dimension(750, 420));
+		this.setLayout(new BorderLayout());
+
+    JPanel panelPages = new JPanel();
+    panelPages.setLayout(new GridBagLayout());
+    panelPages.add(this.view.createpanelPage1(), new GridBagConstraints(0,0,1,1,1,1,GridBagConstraints.CENTER,GridBagConstraints.BOTH,new Insets(0,0,0,0), 0,0));
+    panelPages.add(getWMSParamsPanel(), new GridBagConstraints(1,0,1,1,1,1,GridBagConstraints.CENTER,GridBagConstraints.BOTH,new Insets(0,0,0,0), 0,0));
+    this.add(panelPages, BorderLayout.CENTER);
+    this.add(this.view.createpnlSiguineteAnterior(), BorderLayout.SOUTH);
+    this.getWMSParamsPanel().setVisible(false);
+		activarVisualizarBotones();
+	}
+
+
+	protected WMSParamsPanel getWMSParamsPanel() {
+		if (wmsParamsPanel == null){
+			wmsParamsPanel = new WMSParamsPanel();
+			wmsParamsPanel.setListenerSupport(this.getWizardListenerSupport());
+			wmsParamsPanel.getJTabbedPane().addMouseListener(
+					new java.awt.event.MouseAdapter() {
+						public void mouseClicked(java.awt.event.MouseEvent e) {
+							page = wmsParamsPanel.currentPage() + 1;
+							activarVisualizarBotones();
+						}
+					});
+		}
+		return wmsParamsPanel;
+	}
+
+	/**
+	 * This method checks for the options selected within the configuration
+	 * dialog are correct.
+	 *
+	 * @return true if you're done, false if not.
+	 */
+	public boolean areSettingsValid() {
+		return getWMSParamsPanel().isCorrectlyConfigured();
+	}
+
+	/**
+	 * Thread to connect to a WMS server
+	 * @author Nacho Brodin (nachobrodin@gmail.com)
+	 */
+	public class ConnectThread extends Thread {
+		private ICancellable             cancel      = null;
+		private WMSServerExplorer        explorer    = null;
+		private WMSWizard                wizard      = null;
+
+		public ConnectThread(ICancellable cancel, WMSServerExplorer explorer, WMSWizard wizard) {
+			this.cancel = cancel;
+			this.explorer = explorer;
+			this.wizard = wizard;
+		}
+
+	    public void run() {
+	    	if(!checkHostAndNetwork())
+	    		return;
+
+	    	getBtnConnect().setEnabled(false);
+	    	try {
+	    		explorer.connect(cancel, getWMSParamsPanel().isUpdatingCache());
+	    		saveServerListFromComboBox();
+	    	} catch (ConnectException e) {
+	    		String msg = e.getMessage() + " : " + getIOExceptionMessage(e);
+	    		if(msg != null) {
+	    			LoggerFactory.getLogger(getClass()).info(msg, e);
+	    			JOptionPane.showMessageDialog(getWMSParamsPanel(), msg, Messages.getText("Error"), JOptionPane.ERROR_MESSAGE);
+	    		} else
+	    			LoggerFactory.getLogger(getClass()).info("RemoteServiceException", e);
+	    		return;
+	    	} finally {
+	    		((CancelTaskImpl)cancel).setCanceled(false);
+	    	}
+
+			DataStoreParameters parameters = explorer.getStoredParameters();
+			if(parameters instanceof WMSDataParameters) {
+				storeParams = (WMSDataParameters) parameters;
+			}
+
+			if(parameters instanceof TileDataParameters) {
+				DataParameters p = ((TileDataParameters) parameters).getDataParameters();
+				if(p instanceof WMSDataParameters)
+					storeParams = (WMSDataParameters) p;
+			}
+
+			wizard.rellenarControles();
+	    }
+
+	    /**
+		 * Gets the <code>IOException</code> message. The message
+		 * of this exception is returned by the server
+		 * @param e
+		 * @return
+		 */
+		private String getIOExceptionMessage(Exception e) {
+			Throwable ex = e;
+			final int MAX_DEEP = 10;
+			int deep = 0;
+			while(deep < MAX_DEEP) {
+				Throwable t = null;
+				if(ex instanceof IOException) {
+					return ex.getMessage();
+				} else if(ex instanceof RemoteServiceException) {
+					t = ex.getCause();
+				}
+				if(t == null)
+					return null;
+				else
+					ex = t;
+				deep++;
+			}
+			return null;
+		}
+	}
+
+	/**
+	 * Checks if the network and host are reachable
+	 * @return true if both are reachable and false if they are not
+	 */
+	private boolean checkHostAndNetwork() {
+		if(!explorer.isHostReachable()) {
+			JOptionPane.showMessageDialog(null, Messages.getText("host_unreachable"), Messages.getText("Error"), JOptionPane.ERROR_MESSAGE);
+			return false;
+		}
+		return true;
+	}
+
+	/**
+	 * DOCUMENT ME!
+	 */
+	private void rellenarControles() {
+		try {
+			//String host = cmbHost.getModel().getSelectedItem().toString();
+
+			this.view.lblTitle.setText(explorer.getTitle());
+			this.view.lblServerTypeValue.setText(explorer.getServerType());
+			this.view.txtAbstract.setText(explorer.getAbstract());
+
+			getWMSParamsPanel().setWizardData(explorer);
+			connected = true;
+			activarVisualizarBotones();
+		} catch (Exception e) {
+			if (e.getMessage()==null) {
+				this.view.txtAbstract.setText(PluginServices.getText(this,"error"));
+			} else {
+				this.view.txtAbstract.setText(e.getMessage());
+			}
+			getWizardListenerSupport().callError(e);
+			getBtnSiguiente().setEnabled(false);
+			getBtnAnterior().setEnabled(true);
+		} finally {
+			getBtnCancel().setEnabled(false);
+		}
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		if(e.getSource() == getBtnConnect()) {
+			getBtnCancel().setEnabled(true);
+			getTxtAbstract().setText("Trying to connect...");
+			String host = this.view.cmbHost.getModel().getSelectedItem().toString();
+			try {
+				DataManager datamanager = DALLocator.getDataManager();
+				WMSServerExplorerParameters explorerParams = (WMSServerExplorerParameters) datamanager.createServerExplorerParameters(WMSServerExplorer.NAME);
+				explorerParams.setXyAxisOrder(getChkAxisOrder().isSelected());
+
+				explorerParams.setHost(host);
+				explorer = (WMSServerExplorer) datamanager.createServerExplorer(explorerParams);
+
+				((CancelTaskImpl)cancel).setCanceled(false);
+				new ConnectThread(cancel, explorer, this).start();
+
+			} catch (InitializeException e1) {
+				getTxtAbstract().setText("Error creating WMS layer");
+			} catch (ProviderNotRegisteredException e1) {
+				getTxtAbstract().setText("Provider not registered. I cannot connect.");
+			} catch (ValidateDataParametersException e1) {
+				getTxtAbstract().setText("Parameters not valid. I cannot connect.");
+			}
+		}
+
+		if(e.getSource() == getBtnCancel()) {
+			getTxtAbstract().setText("Cancelled...");
+			((CancelTaskImpl)cancel).setCanceled(true);
+			getBtnCancel().setEnabled(false);
+			getBtnConnect().setEnabled(true);
+		}
+	}
+
+	/**
+	 * DOCUMENT ME!
+	 */
+	protected void activarVisualizarBotones() {
+		if (page == firstPage) {
+			getBtnAnterior().setEnabled(false);
+			getBtnSiguiente().setVisible(true);
+
+			if (connected) {
+				getBtnSiguiente().setEnabled(true);
+			} else {
+				getBtnSiguiente().setEnabled(false);
+			}
+		} else if (page < getWMSParamsPanel().getNumTabs()) {
+			getBtnSiguiente().setEnabled(true);
+			getBtnSiguiente().setVisible(true);
+			getBtnAnterior().setEnabled(true);
+			getBtnAnterior().setVisible(true);
+			if (getWMSParamsPanel().nextEnabledPage() == -1){
+				getBtnSiguiente().setEnabled(false);
+			}
+			getWizardListenerSupport().callStateChanged(getWMSParamsPanel().isCorrectlyConfigured());
+		} else if (page == getWMSParamsPanel().getNumTabs()) {
+			getBtnSiguiente().setVisible(true);
+			getBtnSiguiente().setEnabled(false);
+			getWizardListenerSupport().callStateChanged(getWMSParamsPanel().isCorrectlyConfigured());
+		}
+	}
+
+	private ComboServerController getTxtHost() {
+		return cmbHost;
+	}
+
+	/**
+	 * Gets the list of servers that have been persisted or added in the properties file
+	 * @return
+	 */
+	private ServerDataPersistence getServerDataPersistence() {
+        DynObject pluginProperties = this.plugin.getPluginProperties();
+        ServerDataPersistence servers =  (ServerDataPersistence) pluginProperties.getDynValue("servers");
+
+        if( servers == null || servers.isEmpty() ) {
+            if( servers == null ) {
+                servers = new ServerDataPersistence(ServerData.SERVER_TYPE_WMS);
+                pluginProperties.setDynValue("servers", servers);
+            }
+            //Lee los servidores del properties y los mezcla con los que hay en la persistencia
+            Properties prop = new Properties();
+            File propFile = new File(this.plugin.getPluginDirectory(),serversPropsFilename);
+            FileInputStream fis = null;
+            try {
+                    fis = new FileInputStream(propFile);
+                    prop.load(fis);
+            } catch (FileNotFoundException e) {
+                    logger.info("Properties file '"+propFile.getAbsolutePath()+"' not found", e);
+            } catch (IOException e) {
+                    logger.info("Error reading properties file '"+propFile.getAbsolutePath()+"'.", e);
+            } finally {
+                IOUtils.closeQuietly(fis);
+            }
+
+            for (int i = 0; i < prop.size(); i++) {
+                Object value = prop.get("server[" + i + "]");
+                servers.addServerData(new ServerData(value.toString(), ServerData.SERVER_TYPE_WMS));
+            }
+
+        }
+        return servers;
+    }
+
+	/**
+	 * Saves the list of server reading from the <code>ComboBox</code>
+	 */
+	private void saveServerListFromComboBox() {
+        ServerDataPersistence persistence = getServerDataPersistence();
+        String urlSelected = getTxtHost().getModel().getSelectedItem().toString();
+
+        boolean isSelectedInModel = false;
+        for ( int i = 0; i < getTxtHost().getItemCount(); i++ ) {
+            String url = getTxtHost().getItemAt(i).toString();
+            persistence.addServerData(new ServerData(url, ServerData.SERVER_TYPE_WMS));
+            if(url.equals(urlSelected)) {
+                isSelectedInModel = true;
+            }
+        }
+        if ( !isSelectedInModel ) {
+            persistence.addServerData(new ServerData(urlSelected, ServerData.SERVER_TYPE_WMS));
+        }
+    }
+
+	private JButton getBtnConnect() {
+		return this.view.btnConnect;
+	}
+
+	private JButton getBtnCancel() {
+		return this.view.btnCancel;
+	}
+
+	private javax.swing.JLabel getJLabel1() {
+		return this.view.jLabel1;
+	}
+
+	private javax.swing.JLabel getLblTitle() {
+		return this.view.lblTitle;
+	}
+
+	private javax.swing.JTextArea getTxtAbstract() {
+		return this.view.txtAbstract;
+	}
+
+	private JPanel getPanelPage1() {
+		return this.view.panelPage1;
+	}
+
+	private javax.swing.JButton getBtnSiguiente() {
+		return this.view.btnSiguiente;
+	}
+
+	/**
+	 * Shows an information dialog with a text and a accept button
+	 * @param msg Message to show in
+   * @param fixedText
+	 * @param parentWindow Parent window
+	 */
+	public static void messageBoxInfo(String msg, String fixedText, Object parentWindow){
+		String string = PluginServices.getText(parentWindow, "accept");
+		Object[] options = {string};
+		JOptionPane.showOptionDialog((Component)PluginServices.getMainFrame(),
+					"<html>" + PluginServices.getText(parentWindow, msg).replaceAll("\n", "<br>") + " " + fixedText + "</html>",
+					PluginServices.getText(parentWindow, "confirmacion"),
+					JOptionPane.OK_OPTION,
+					JOptionPane.INFORMATION_MESSAGE,
+					null,
+					options,
+					string);
+	}
+
+	private javax.swing.JButton getBtnAnterior() {
+		return this.view.btnAnterior;
+	}
+
+	private WizardListenerSupport getWizardListenerSupport() {
+		if(listenerSupport == null)
+			listenerSupport = new WizardListenerSupport();
+		return listenerSupport;
+	}
+
+	public void addWizardListener(WizardListener listener) {
+		getWizardListenerSupport().addWizardListener(listener);
+		getWizardListenerSupport().callStateChanged(false);
+	}
+
+	public void removeWizardListener(WizardListener listener) {
+		getWizardListenerSupport().removeWizardListener(listener);
+	}
+
+	public String getSRS() {
+		return getWMSParamsPanel().getSRS();
+	}
+
+	public String getFormat() {
+		return getWMSParamsPanel().getFormat();
+	}
+
+	public String getInfoFormat() {
+		return getWMSParamsPanel().getInfoFormat();
+	}
+
+	public TreePath[] getSelectedLayers() {
+		return getWMSParamsPanel().getSelectedLayers();
+	}
+
+	/**
+	 * Devuelve el host que est� escrito en el cuadro de texto del host o null
+	 * en caso de que no haya nada escrito o est� mal escrito
+	 *
+	 * @return URL del host
+	 */
+	public URL getHost() {
+		try {
+			if ((this.view.cmbHost == null)|| (this.view.cmbHost.getModel().getSelectedItem() == null)) {
+				return new URL(explorer.getHost());
+			} else {
+				return new URL(this.view.cmbHost.getModel().getSelectedItem().toString());
+			}
+		} catch (MalformedURLException e) {
+			return null;
+		}
+	}
+
+	public String getLayerName() {
+		return getWMSParamsPanel().getLayerName();
+	}
+
+
+	public void initWizard() {
+	}
+
+	public void execute() {
+		try {
+			FLayer layer = this.getLayer();
+			if(layer == null)
+				return;
+			this.getMapCtrl().getMapContext().getLayers().addLayer(layer);
+		} catch (InitializeException e) {
+			LoggerFactory.getLogger(getClass()).info(PluginServices.getText(this, "The layer cannot be added"), e);
+		}
+
+	}
+
+	protected String getLayersQuery() {
+		return getWMSParamsPanel().getLayersQuery();
+	}
+
+	//gets all the layers available in the WMS
+	public FLayer getAllLayers() throws LoadLayerException {
+		return getWMSParamsPanel().getAllLayers();
+	}
+
+	public synchronized FLayer getLayer() throws InitializeException {
+		return getWMSParamsPanel().getLayer(getChkTileCache().isSelected());
+	}
+
+    protected boolean nodeSelected(TreePath[] selection, WMSLayerNode node) {
+		for (int i = 0; i < selection.length; i++) {
+			Object[] components = selection[i].getPath();
+			for (int j = 0; j < components.length ;j++) {
+				if (components[j] instanceof WMSLayerNode) {
+					if (((WMSLayerNode)components[j]).getTitle().compareTo(node.getTitle()) == 0){
+						return true;
+					}
+				}
+			}
+		}
+		return false;
+    }
+
+
+	protected boolean isQueryable() {
+		return explorer.isQueryable();
+	}
+
+	protected Dimension getFixedSize() {
+		return getWMSParamsPanel().getFixedSize();
+	}
+
+	private Hashtable getOnlineResources() {
+		return getWMSParamsPanel().getOnlineResources();
+	}
+
+	/**
+	 * @return
+	 */
+	protected Vector<RemoteWMSStyle> getStyles() {
+		return getWMSParamsPanel().getStyles();
+	}
+
+	protected Vector getDimensions() {
+		return getWMSParamsPanel().getDimensions();
+	}
+
+	/**
+	 * @return
+	 */
+	protected boolean getTransparency() {
+		return getWMSParamsPanel().getTransparency();
+	}
+
+	public String getQueryableLayerQuery() {
+		return getWMSParamsPanel().getQueryableLayerQuery();
+	}
+
+	private JCheckBox getChkCaching() {
+		return this.view.chkCaching;
+	}
+
+	private JCheckBox getChkTileCache() {
+		return this.view.chkTileCache;
+	}
+
+	/**
+	 * This method initializes chkAxisOrder, to decide if the
+	 * parser should assume coordinates follow XY axis order
+	 *
+	 * @see WMSDataParameters#isXyAxisOrder()
+	 * @see WMSDataParameters#setXyAxisOrder(boolean)
+	 * @return CheckBox
+	 */
+	private JCheckBox getChkAxisOrder() {
+		return this.view.chkAxisOrder;
+	}
+
+	@Override
+	public DataStoreParameters[] getParameters() {
+		return null;
+	}
+
+	@Override
+	public void close() {
+		// Nothing to do
+	}
+}

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/wizard/WMSWizard.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/wizard/ComboServerController.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/wizard/ComboServerController.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/wizard/ComboServerController.java	(revision 21019)
@@ -0,0 +1,187 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2020 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+package org.gvsig.raster.wms.app.wmsclient.gui.wizard;
+
+import javax.swing.ComboBoxModel;
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.JComboBox;
+import org.gvsig.utils.swing.jcomboServer.ServerData;
+
+/**
+ * This class is a controller for a JComboBox component. It contains ServerData 
+ * objects and it is able to show them in last access order.
+ * It has methods to add ServerData objects and to retrieve them.
+ *
+ * @author gvSIG Team
+ * @deprecated usar org.gvsig.utils.swing.jcomboServer.ComboServerController
+ */
+public class ComboServerController {
+
+  private final JComboBox combo;
+
+  public ComboServerController(JComboBox combo) {
+    this.combo = combo;
+  }
+
+  public ComboServerController(JComboBox combo, ServerData[] servers) {
+    this.combo = combo;
+    this.combo.setModel(new DefaultComboBoxModel(setLastAccessOrder(servers)));
+  }
+
+  public JComboBox getCombo() {
+    return this.combo;
+  }
+  
+  /**
+   * This method returns the selected server
+   *
+   * @return A Server
+   */
+  public ServerData getSelectedServer() {
+    try {
+      return (ServerData) this.combo.getSelectedItem();
+    } catch (ClassCastException e) {
+      return new ServerData((String) this.combo.getSelectedItem(), "", "");
+    }
+  }
+
+  /**
+   * This method adds a new Server in order
+   *
+   *
+   * @param server New Server
+   */
+  public void addServer(ServerData server) {
+    ServerData[] servers = getAllServers();
+    ServerData[] newServers = new ServerData[servers.length + 1];
+    System.arraycopy(servers, 0, newServers, 0, servers.length);
+    newServers[servers.length] = server;
+    newServers = setLastAccessOrder(newServers);
+    setServerList(newServers);
+  }
+
+  /**
+   * This method returns an array with all the servers that the combo contains
+   *
+   *
+   * @return An array of servers
+   */
+  public ServerData[] getAllServers() {
+    ServerData[] servers = new ServerData[this.combo.getItemCount()];
+    for (int i = 0; i < this.combo.getItemCount(); i++) {
+      servers[i] = (ServerData) this.combo.getItemAt(i);
+    }
+    return servers;
+  }
+
+  /**
+   * It adds a server list
+   *
+   *
+   * @param servers Array with servers
+   */
+  public void setServerList(ServerData[] servers) {
+    this.combo.removeAllItems();
+    servers = setLastAccessOrder(servers);
+    for (int i = 0; i < servers.length; i++) {
+      try {
+        if (!(servers[i].getServerAddress().equals(""))) {
+          this.combo.addItem(servers[i]);
+        }
+      } catch (java.lang.NullPointerException e) {
+        //Server is null
+      }
+    }
+  }
+
+  /**
+   * This method order all the servers in the combo
+   *
+   */
+  public void setServersOrder() {
+    ServerData[] servers = getAllServers();
+    servers = setLastAccessOrder(servers);
+    setServerList(servers);
+  }
+
+  /**
+   * This static method ordered an array of servers by last access
+   *
+   *
+   * @return A new array
+   * @param servers Array of servers
+   */
+  private static ServerData[] setLastAccessOrder(ServerData[] servers) {
+    ServerData[] orderedServerData = new ServerData[servers.length];
+
+    for (int i = 0; i < servers.length; i++) {
+      int pos = getServerPosition(servers, i);
+      orderedServerData[pos] = servers[i];
+    }
+    return orderedServerData;
+  }
+
+  /**
+   * This static function return the ordered position of a server. The algorithm
+   * to order can be changed.
+   *
+   *
+   * @return Number with the new position
+   * @param servers Array that contains all the servers
+   * @param serverPos Server position
+   */
+  private static int getServerPosition(ServerData[] servers, int serverPos) {
+    int pos = 0;
+    for (int i = 0; i < servers.length; i++) {
+      if (!(servers[serverPos].getServerAddress().equals(servers[i].getServerAddress()))) {
+        if (servers[serverPos].getLastAccess().before(servers[i].getLastAccess())) {
+          pos++;
+        }
+        if (servers[serverPos].getLastAccess().equals(servers[i].getLastAccess())) {
+          if (serverPos < i) {
+            pos++;
+          }
+        }
+
+      }
+    }
+    return pos;
+  }
+
+  public void setModel(ComboBoxModel model) {
+    this.combo.setModel(model);
+  }
+
+  public ComboBoxModel getModel() {
+    return this.combo.getModel();
+  }
+
+  public int getItemCount() {
+    return this.combo.getItemCount();
+  }
+
+  public Object getItemAt(int i) {
+    return this.combo.getItemAt(i);
+  }
+}
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/wizard/LayerTreeModel.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/wizard/LayerTreeModel.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/wizard/LayerTreeModel.java	(revision 21019)
@@ -0,0 +1,148 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+ 
+package org.gvsig.raster.wms.app.wmsclient.gui.wizard;
+
+import java.util.List;
+
+import javax.swing.event.TreeModelListener;
+import javax.swing.tree.TreeModel;
+import javax.swing.tree.TreePath;
+
+import org.gvsig.raster.wms.io.WMSLayerNode;
+
+
+
+
+public class LayerTreeModel implements TreeModel {
+
+	WMSLayerNode root;
+
+	public LayerTreeModel(WMSLayerNode root){
+		this.root = root;
+	}
+
+	public Object getRoot() {
+		return root;
+	}
+
+	public int getChildCount(Object parent) {
+		return ((WMSLayerNode)parent).getChildren().size();
+	}
+
+    public boolean isLeaf(Object node) {
+		return ((WMSLayerNode)node).getChildren().size() == 0;
+	}
+
+	public void addTreeModelListener(TreeModelListener l) {
+	}
+
+	public void removeTreeModelListener(TreeModelListener l) {
+	}
+
+	public Object getChild(Object parent, int index) {
+		return (WMSLayerNode)((WMSLayerNode)parent).getChildren().get(index);
+	}
+
+	public int getIndexOfChild(Object parent, Object child) {
+        WMSLayerNode pare = (WMSLayerNode) parent;
+		for (int i = 0; i < pare.getChildren().size(); i++)
+			if (child == pare.getChildren().get(i)) return i;
+		return -1;
+	}
+
+	public void valueForPathChanged(TreePath path, Object newValue) {
+	}
+
+    /**
+     * @param node, the tree's desired node.
+     * @return Returns the name of the node.
+     */
+    public String getName(Object node) {
+        return ((WMSLayerNode) node).getName();
+    }
+    
+    /**
+     * @param node, the tree's desired node.
+     * @return Returns the queryable.
+     */
+    public boolean isQueryable(Object node) {
+        return ((WMSLayerNode) node).isQueryable();
+    }
+    
+    /**
+     * @param node, the tree's desired node.
+     * @return Returns the srs.
+     */
+    public List<String> getSrs(Object node) {
+        return ((WMSLayerNode) node).getAllSrs();
+    }
+    /**
+     * @param node, the tree's desired node.
+     * @return Returns the title.
+     */
+    public String getTitle(Object node) {
+        return ((WMSLayerNode) node).getTitle();
+    }
+    /**
+     * @param node, the tree's desired node.
+     * @return Returns the transparency.
+     */
+    public boolean hasTransparency(Object node) {
+        return ((WMSLayerNode) node).isTransparent();
+    }
+    
+    public String toString(){
+        return getTitle(this);
+    }
+    
+    /**
+     * Searches in the tree for the first (and must be the unique) RemoteLayerNode with
+     * the name specified by name.
+     * @param name
+     * @return
+     */
+    public Object getNodeByName(String name) {
+    	return getNodeByName(root, name);
+    }
+    
+    /**
+     * Service method.
+     * @param node
+     * @param name
+     * @return
+     */
+    private Object getNodeByName(WMSLayerNode node, String name) {
+    	WMSLayerNode n = node;
+    	if (n.getName()!= null && n.getName().equals(name)) {
+    		return n;
+    	} else {
+    		for (int i = 0; i < getChildCount(n); i++) {
+    			WMSLayerNode n1 = (WMSLayerNode) n.getChildren().get(i);
+    			Object obj = getNodeByName(n1, name);
+    			if (obj!= null)
+    				return obj;
+			}
+    	}
+    	return null;
+    }
+}

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/wizard/LayerTreeModel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/wizard/WMSWizardView.xml
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/wizard/WMSWizardView.xml	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/wizard/WMSWizardView.xml	(revision 21019)
@@ -0,0 +1,1479 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<object classname="com.jeta.forms.store.memento.FormPackage">
+ <at name="fileversion">
+  <object classname="com.jeta.forms.store.memento.FormsVersion2">
+   <at name="major">2</at>
+   <at name="minor">0</at>
+   <at name="sub">0</at>
+  </object>
+ </at>
+ <at name="form">
+  <object classname="com.jeta.forms.store.memento.FormMemento">
+   <super classname="com.jeta.forms.store.memento.ComponentMemento">
+    <at name="cellconstraints">
+     <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+      <at name="column">1</at>
+      <at name="row">1</at>
+      <at name="colspan">1</at>
+      <at name="rowspan">1</at>
+      <at name="halign">default</at>
+      <at name="valign">default</at>
+      <at name="insets" object="insets">0,0,0,0</at>
+     </object>
+    </at>
+    <at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
+   </super>
+   <at name="id">/home/jjdelcerro/datos/devel/org.gvsig.raster-2015/org.gvsig.raster.wms/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/wizard/WMSWizardView.xml</at>
+   <at name="rowspecs">FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE</at>
+   <at name="colspecs">FILL:DEFAULT:GROW(1.0)</at>
+   <at name="components">
+    <object classname="java.util.LinkedList">
+     <item >
+      <at name="value">
+       <object classname="com.jeta.forms.store.memento.FormMemento">
+        <super classname="com.jeta.forms.store.memento.ComponentMemento">
+         <at name="cellconstraints">
+          <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+           <at name="column">1</at>
+           <at name="row">1</at>
+           <at name="colspan">1</at>
+           <at name="rowspan">1</at>
+           <at name="halign">default</at>
+           <at name="valign">default</at>
+           <at name="insets" object="insets">0,0,0,0</at>
+          </object>
+         </at>
+         <at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
+        </super>
+        <at name="id">embedded.747250041</at>
+        <at name="rowspecs">CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0)</at>
+        <at name="colspecs">FILL:4DLU:NONE,FILL:MIN(12DLU;DEFAULT):GROW(1.0),FILL:4DLU:NONE</at>
+        <at name="components">
+         <object classname="java.util.LinkedList">
+          <item >
+           <at name="value">
+            <object classname="com.jeta.forms.store.memento.BeanMemento">
+             <super classname="com.jeta.forms.store.memento.ComponentMemento">
+              <at name="cellconstraints">
+               <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                <at name="column">2</at>
+                <at name="row">2</at>
+                <at name="colspan">1</at>
+                <at name="rowspan">1</at>
+                <at name="halign">default</at>
+                <at name="valign">default</at>
+                <at name="insets" object="insets">0,0,0,0</at>
+               </object>
+              </at>
+              <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+             </super>
+             <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+             <at name="beanclass">com.jeta.forms.components.separator.TitledSeparator</at>
+             <at name="beanproperties">
+              <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+               <at name="classname">com.jeta.forms.components.separator.TitledSeparator</at>
+               <at name="properties">
+                <object classname="com.jeta.forms.store.support.PropertyMap">
+                 <at name="border">
+                  <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                   <at name="borders">
+                    <object classname="java.util.LinkedList">
+                     <item >
+                      <at name="value">
+                       <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                        <super classname="com.jeta.forms.store.properties.BorderProperty">
+                         <at name="name">border</at>
+                        </super>
+                       </object>
+                      </at>
+                     </item>
+                    </object>
+                   </at>
+                  </object>
+                 </at>
+                 <at name="width">798</at>
+                 <at name="name"/>
+                 <at name="text">Servidor</at>
+                 <at name="height">15</at>
+                </object>
+               </at>
+              </object>
+             </at>
+            </object>
+           </at>
+          </item>
+          <item >
+           <at name="value">
+            <object classname="com.jeta.forms.store.memento.BeanMemento">
+             <super classname="com.jeta.forms.store.memento.ComponentMemento">
+              <at name="cellconstraints">
+               <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                <at name="column">2</at>
+                <at name="row">4</at>
+                <at name="colspan">1</at>
+                <at name="rowspan">1</at>
+                <at name="halign">default</at>
+                <at name="valign">default</at>
+                <at name="insets" object="insets">0,0,0,0</at>
+               </object>
+              </at>
+              <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+             </super>
+             <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+             <at name="beanclass">javax.swing.JComboBox</at>
+             <at name="beanproperties">
+              <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+               <at name="classname">javax.swing.JComboBox</at>
+               <at name="properties">
+                <object classname="com.jeta.forms.store.support.PropertyMap">
+                 <at name="border">
+                  <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                   <at name="borders">
+                    <object classname="java.util.LinkedList">
+                     <item >
+                      <at name="value">
+                       <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                        <super classname="com.jeta.forms.store.properties.BorderProperty">
+                         <at name="name">border</at>
+                        </super>
+                       </object>
+                      </at>
+                     </item>
+                    </object>
+                   </at>
+                  </object>
+                 </at>
+                 <at name="componentCount">3</at>
+                 <at name="editable">true</at>
+                 <at name="requestFocusEnabled">false</at>
+                 <at name="name">cmbHost</at>
+                 <at name="width">798</at>
+                 <at name="items">
+                  <object classname="com.jeta.forms.store.properties.ItemsProperty">
+                   <at name="name">items</at>
+                   <at name="items">
+                    <object classname="java.util.LinkedList"/>
+                   </at>
+                  </object>
+                 </at>
+                 <at name="height">24</at>
+                </object>
+               </at>
+              </object>
+             </at>
+            </object>
+           </at>
+          </item>
+          <item >
+           <at name="value">
+            <object classname="com.jeta.forms.store.memento.BeanMemento">
+             <super classname="com.jeta.forms.store.memento.ComponentMemento">
+              <at name="cellconstraints">
+               <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                <at name="column">2</at>
+                <at name="row">7</at>
+                <at name="colspan">1</at>
+                <at name="rowspan">1</at>
+                <at name="halign">default</at>
+                <at name="valign">default</at>
+                <at name="insets" object="insets">0,0,0,0</at>
+               </object>
+              </at>
+              <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+             </super>
+             <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+             <at name="beanclass">javax.swing.JCheckBox</at>
+             <at name="beanproperties">
+              <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+               <at name="classname">javax.swing.JCheckBox</at>
+               <at name="properties">
+                <object classname="com.jeta.forms.store.support.PropertyMap">
+                 <at name="border">
+                  <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                   <at name="borders">
+                    <object classname="java.util.LinkedList">
+                     <item >
+                      <at name="value">
+                       <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                        <super classname="com.jeta.forms.store.properties.BorderProperty">
+                         <at name="name">border</at>
+                        </super>
+                       </object>
+                      </at>
+                     </item>
+                    </object>
+                   </at>
+                  </object>
+                 </at>
+                 <at name="actionCommand">Refrescar cache</at>
+                 <at name="name">chkCaching</at>
+                 <at name="width">798</at>
+                 <at name="text">Refrescar cache</at>
+                 <at name="height">17</at>
+                </object>
+               </at>
+              </object>
+             </at>
+            </object>
+           </at>
+          </item>
+          <item >
+           <at name="value">
+            <object classname="com.jeta.forms.store.memento.BeanMemento">
+             <super classname="com.jeta.forms.store.memento.ComponentMemento">
+              <at name="cellconstraints">
+               <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                <at name="column">2</at>
+                <at name="row">9</at>
+                <at name="colspan">1</at>
+                <at name="rowspan">1</at>
+                <at name="halign">default</at>
+                <at name="valign">default</at>
+                <at name="insets" object="insets">0,0,0,0</at>
+               </object>
+              </at>
+              <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+             </super>
+             <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+             <at name="beanclass">javax.swing.JCheckBox</at>
+             <at name="beanproperties">
+              <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+               <at name="classname">javax.swing.JCheckBox</at>
+               <at name="properties">
+                <object classname="com.jeta.forms.store.support.PropertyMap">
+                 <at name="border">
+                  <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                   <at name="borders">
+                    <object classname="java.util.LinkedList">
+                     <item >
+                      <at name="value">
+                       <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                        <super classname="com.jeta.forms.store.properties.BorderProperty">
+                         <at name="name">border</at>
+                        </super>
+                       </object>
+                      </at>
+                     </item>
+                    </object>
+                   </at>
+                  </object>
+                 </at>
+                 <at name="actionCommand">Uso de cache de teselas local</at>
+                 <at name="name">chkTileCache</at>
+                 <at name="width">798</at>
+                 <at name="text">Uso de cache de teselas local</at>
+                 <at name="height">17</at>
+                </object>
+               </at>
+              </object>
+             </at>
+            </object>
+           </at>
+          </item>
+          <item >
+           <at name="value">
+            <object classname="com.jeta.forms.store.memento.BeanMemento">
+             <super classname="com.jeta.forms.store.memento.ComponentMemento">
+              <at name="cellconstraints">
+               <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                <at name="column">2</at>
+                <at name="row">11</at>
+                <at name="colspan">1</at>
+                <at name="rowspan">1</at>
+                <at name="halign">default</at>
+                <at name="valign">default</at>
+                <at name="insets" object="insets">0,0,0,0</at>
+               </object>
+              </at>
+              <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+             </super>
+             <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+             <at name="beanclass">javax.swing.JCheckBox</at>
+             <at name="beanproperties">
+              <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+               <at name="classname">javax.swing.JCheckBox</at>
+               <at name="properties">
+                <object classname="com.jeta.forms.store.support.PropertyMap">
+                 <at name="border">
+                  <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                   <at name="borders">
+                    <object classname="java.util.LinkedList">
+                     <item >
+                      <at name="value">
+                       <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                        <super classname="com.jeta.forms.store.properties.BorderProperty">
+                         <at name="name">border</at>
+                        </super>
+                       </object>
+                      </at>
+                     </item>
+                    </object>
+                   </at>
+                  </object>
+                 </at>
+                 <at name="actionCommand">Asumir que las coordenadas siguen el orden de ejes XY</at>
+                 <at name="name">chkAxisOrder</at>
+                 <at name="width">798</at>
+                 <at name="text">Asumir que las coordenadas siguen el orden de ejes XY</at>
+                 <at name="height">17</at>
+                </object>
+               </at>
+              </object>
+             </at>
+            </object>
+           </at>
+          </item>
+          <item >
+           <at name="value">
+            <object classname="com.jeta.forms.store.memento.BeanMemento">
+             <super classname="com.jeta.forms.store.memento.ComponentMemento">
+              <at name="cellconstraints">
+               <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                <at name="column">2</at>
+                <at name="row">13</at>
+                <at name="colspan">1</at>
+                <at name="rowspan">1</at>
+                <at name="halign">default</at>
+                <at name="valign">default</at>
+                <at name="insets" object="insets">0,0,0,0</at>
+               </object>
+              </at>
+              <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+             </super>
+             <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+             <at name="beanclass">com.jeta.forms.components.separator.TitledSeparator</at>
+             <at name="beanproperties">
+              <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+               <at name="classname">com.jeta.forms.components.separator.TitledSeparator</at>
+               <at name="properties">
+                <object classname="com.jeta.forms.store.support.PropertyMap">
+                 <at name="border">
+                  <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                   <at name="borders">
+                    <object classname="java.util.LinkedList">
+                     <item >
+                      <at name="value">
+                       <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                        <super classname="com.jeta.forms.store.properties.BorderProperty">
+                         <at name="name">border</at>
+                        </super>
+                       </object>
+                      </at>
+                     </item>
+                    </object>
+                   </at>
+                  </object>
+                 </at>
+                 <at name="width">798</at>
+                 <at name="name"/>
+                 <at name="text">Descripcion</at>
+                 <at name="height">15</at>
+                </object>
+               </at>
+              </object>
+             </at>
+            </object>
+           </at>
+          </item>
+          <item >
+           <at name="value">
+            <object classname="com.jeta.forms.store.memento.BeanMemento">
+             <super classname="com.jeta.forms.store.memento.ComponentMemento">
+              <at name="cellconstraints">
+               <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                <at name="column">2</at>
+                <at name="row">17</at>
+                <at name="colspan">1</at>
+                <at name="rowspan">1</at>
+                <at name="halign">default</at>
+                <at name="valign">default</at>
+                <at name="insets" object="insets">0,0,0,0</at>
+               </object>
+              </at>
+              <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+             </super>
+             <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+             <at name="beanclass">javax.swing.JTextArea</at>
+             <at name="beanproperties">
+              <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+               <at name="classname">javax.swing.JTextArea</at>
+               <at name="properties">
+                <object classname="com.jeta.forms.store.support.PropertyMap">
+                 <at name="border">
+                  <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                   <at name="borders">
+                    <object classname="java.util.LinkedList">
+                     <item >
+                      <at name="value">
+                       <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                        <super classname="com.jeta.forms.store.properties.BorderProperty">
+                         <at name="name">border</at>
+                        </super>
+                       </object>
+                      </at>
+                     </item>
+                    </object>
+                   </at>
+                  </object>
+                 </at>
+                 <at name="scrollableTracksViewportHeight">true</at>
+                 <at name="scrollableTracksViewportWidth">true</at>
+                 <at name="name">txtAbstract</at>
+                 <at name="width">795</at>
+                 <at name="scollBars">
+                  <object classname="com.jeta.forms.store.properties.ScrollBarsProperty">
+                   <at name="name">scollBars</at>
+                   <at name="verticalpolicy">20</at>
+                   <at name="horizontalpolicy">30</at>
+                   <at name="border">
+                    <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                     <super classname="com.jeta.forms.store.properties.BorderProperty">
+                      <at name="name">border</at>
+                     </super>
+                     <at name="borders">
+                      <object classname="java.util.LinkedList">
+                       <item >
+                        <at name="value">
+                         <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                          <super classname="com.jeta.forms.store.properties.BorderProperty">
+                           <at name="name">border</at>
+                          </super>
+                         </object>
+                        </at>
+                       </item>
+                      </object>
+                     </at>
+                    </object>
+                   </at>
+                  </object>
+                 </at>
+                 <at name="height">170</at>
+                </object>
+               </at>
+              </object>
+             </at>
+            </object>
+           </at>
+          </item>
+          <item >
+           <at name="value">
+            <object classname="com.jeta.forms.store.memento.FormMemento">
+             <super classname="com.jeta.forms.store.memento.ComponentMemento">
+              <at name="cellconstraints">
+               <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                <at name="column">2</at>
+                <at name="row">6</at>
+                <at name="colspan">1</at>
+                <at name="rowspan">1</at>
+                <at name="halign">default</at>
+                <at name="valign">default</at>
+                <at name="insets" object="insets">0,0,0,0</at>
+               </object>
+              </at>
+              <at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
+             </super>
+             <at name="id">embedded.899100268</at>
+             <at name="rowspecs">CENTER:DEFAULT:NONE</at>
+             <at name="colspecs">FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE</at>
+             <at name="components">
+              <object classname="java.util.LinkedList">
+               <item >
+                <at name="value">
+                 <object classname="com.jeta.forms.store.memento.BeanMemento">
+                  <super classname="com.jeta.forms.store.memento.ComponentMemento">
+                   <at name="cellconstraints">
+                    <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                     <at name="column">5</at>
+                     <at name="row">1</at>
+                     <at name="colspan">1</at>
+                     <at name="rowspan">1</at>
+                     <at name="halign">default</at>
+                     <at name="valign">default</at>
+                     <at name="insets" object="insets">0,0,0,0</at>
+                    </object>
+                   </at>
+                   <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+                  </super>
+                  <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+                  <at name="beanclass">javax.swing.JButton</at>
+                  <at name="beanproperties">
+                   <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+                    <at name="classname">javax.swing.JButton</at>
+                    <at name="properties">
+                     <object classname="com.jeta.forms.store.support.PropertyMap">
+                      <at name="border">
+                       <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                        <super classname="com.jeta.forms.store.properties.BorderProperty">
+                         <at name="name">border</at>
+                        </super>
+                        <at name="borders">
+                         <object classname="java.util.LinkedList">
+                          <item >
+                           <at name="value">
+                            <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                             <super classname="com.jeta.forms.store.properties.BorderProperty">
+                              <at name="name">border</at>
+                             </super>
+                            </object>
+                           </at>
+                          </item>
+                         </object>
+                        </at>
+                       </object>
+                      </at>
+                      <at name="actionCommand">Cancelar</at>
+                      <at name="name">btnCancel</at>
+                      <at name="width">96</at>
+                      <at name="text">Cancelar</at>
+                      <at name="height">25</at>
+                     </object>
+                    </at>
+                   </object>
+                  </at>
+                 </object>
+                </at>
+               </item>
+               <item >
+                <at name="value">
+                 <object classname="com.jeta.forms.store.memento.BeanMemento">
+                  <super classname="com.jeta.forms.store.memento.ComponentMemento">
+                   <at name="cellconstraints">
+                    <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                     <at name="column">3</at>
+                     <at name="row">1</at>
+                     <at name="colspan">1</at>
+                     <at name="rowspan">1</at>
+                     <at name="halign">default</at>
+                     <at name="valign">default</at>
+                     <at name="insets" object="insets">0,0,0,0</at>
+                    </object>
+                   </at>
+                   <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+                  </super>
+                  <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+                  <at name="beanclass">javax.swing.JButton</at>
+                  <at name="beanproperties">
+                   <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+                    <at name="classname">javax.swing.JButton</at>
+                    <at name="properties">
+                     <object classname="com.jeta.forms.store.support.PropertyMap">
+                      <at name="border">
+                       <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                        <super classname="com.jeta.forms.store.properties.BorderProperty">
+                         <at name="name">border</at>
+                        </super>
+                        <at name="borders">
+                         <object classname="java.util.LinkedList">
+                          <item >
+                           <at name="value">
+                            <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                             <super classname="com.jeta.forms.store.properties.BorderProperty">
+                              <at name="name">border</at>
+                             </super>
+                            </object>
+                           </at>
+                          </item>
+                         </object>
+                        </at>
+                       </object>
+                      </at>
+                      <at name="actionCommand">Conectar</at>
+                      <at name="name">btnConnect</at>
+                      <at name="width">98</at>
+                      <at name="text">Conectar</at>
+                      <at name="height">25</at>
+                     </object>
+                    </at>
+                   </object>
+                  </at>
+                 </object>
+                </at>
+               </item>
+              </object>
+             </at>
+             <at name="properties">
+              <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+               <at name="classname">com.jeta.forms.gui.form.GridView</at>
+               <at name="properties">
+                <object classname="com.jeta.forms.store.support.PropertyMap">
+                 <at name="border">
+                  <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                   <at name="borders">
+                    <object classname="java.util.LinkedList"/>
+                   </at>
+                  </object>
+                 </at>
+                 <at name="name"/>
+                 <at name="fill">
+                  <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+                   <at name="name">fill</at>
+                  </object>
+                 </at>
+                 <at name="scollBars">
+                  <object classname="com.jeta.forms.store.properties.ScrollBarsProperty">
+                   <at name="name">scollBars</at>
+                   <at name="verticalpolicy">21</at>
+                   <at name="horizontalpolicy">31</at>
+                   <at name="border">
+                    <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                     <super classname="com.jeta.forms.store.properties.BorderProperty">
+                      <at name="name">border</at>
+                     </super>
+                     <at name="borders">
+                      <object classname="java.util.LinkedList">
+                       <item >
+                        <at name="value">
+                         <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                          <super classname="com.jeta.forms.store.properties.BorderProperty">
+                           <at name="name">border</at>
+                          </super>
+                         </object>
+                        </at>
+                       </item>
+                      </object>
+                     </at>
+                    </object>
+                   </at>
+                  </object>
+                 </at>
+                </object>
+               </at>
+              </object>
+             </at>
+             <at name="cellpainters">
+              <object classname="com.jeta.forms.store.support.Matrix">
+               <at name="rows">
+                <object classname="[Ljava.lang.Object;" size="1">
+                 <at name="item" index="0">
+                  <object classname="[Ljava.lang.Object;" size="5"/>
+                 </at>
+                </object>
+               </at>
+              </object>
+             </at>
+             <at name="rowgroups">
+              <object classname="com.jeta.forms.store.memento.FormGroupSet">
+               <at name="groups">
+                <object classname="java.util.HashMap"/>
+               </at>
+              </object>
+             </at>
+             <at name="colgroups">
+              <object classname="com.jeta.forms.store.memento.FormGroupSet">
+               <at name="groups">
+                <object classname="java.util.HashMap"/>
+               </at>
+              </object>
+             </at>
+            </object>
+           </at>
+          </item>
+          <item >
+           <at name="value">
+            <object classname="com.jeta.forms.store.memento.FormMemento">
+             <super classname="com.jeta.forms.store.memento.ComponentMemento">
+              <at name="cellconstraints">
+               <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                <at name="column">2</at>
+                <at name="row">15</at>
+                <at name="colspan">1</at>
+                <at name="rowspan">1</at>
+                <at name="halign">default</at>
+                <at name="valign">default</at>
+                <at name="insets" object="insets">0,0,0,0</at>
+               </object>
+              </at>
+              <at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
+             </super>
+             <at name="id">embedded.401279141</at>
+             <at name="rowspecs">CENTER:DEFAULT:NONE</at>
+             <at name="colspecs">FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0)</at>
+             <at name="components">
+              <object classname="java.util.LinkedList">
+               <item >
+                <at name="value">
+                 <object classname="com.jeta.forms.store.memento.BeanMemento">
+                  <super classname="com.jeta.forms.store.memento.ComponentMemento">
+                   <at name="cellconstraints">
+                    <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                     <at name="column">1</at>
+                     <at name="row">1</at>
+                     <at name="colspan">1</at>
+                     <at name="rowspan">1</at>
+                     <at name="halign">default</at>
+                     <at name="valign">default</at>
+                     <at name="insets" object="insets">0,0,0,0</at>
+                    </object>
+                   </at>
+                   <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+                  </super>
+                  <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+                  <at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
+                  <at name="beanproperties">
+                   <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+                    <at name="classname">com.jeta.forms.components.label.JETALabel</at>
+                    <at name="properties">
+                     <object classname="com.jeta.forms.store.support.PropertyMap">
+                      <at name="border">
+                       <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                        <super classname="com.jeta.forms.store.properties.BorderProperty">
+                         <at name="name">border</at>
+                        </super>
+                        <at name="borders">
+                         <object classname="java.util.LinkedList">
+                          <item >
+                           <at name="value">
+                            <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                             <super classname="com.jeta.forms.store.properties.BorderProperty">
+                              <at name="name">border</at>
+                             </super>
+                            </object>
+                           </at>
+                          </item>
+                         </object>
+                        </at>
+                       </object>
+                      </at>
+                      <at name="name">jLabel1</at>
+                      <at name="width">60</at>
+                      <at name="text">Nombre:</at>
+                      <at name="fill">
+                       <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+                        <at name="name">fill</at>
+                       </object>
+                      </at>
+                      <at name="height">15</at>
+                     </object>
+                    </at>
+                   </object>
+                  </at>
+                 </object>
+                </at>
+               </item>
+               <item >
+                <at name="value">
+                 <object classname="com.jeta.forms.store.memento.BeanMemento">
+                  <super classname="com.jeta.forms.store.memento.ComponentMemento">
+                   <at name="cellconstraints">
+                    <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                     <at name="column">3</at>
+                     <at name="row">1</at>
+                     <at name="colspan">1</at>
+                     <at name="rowspan">1</at>
+                     <at name="halign">default</at>
+                     <at name="valign">default</at>
+                     <at name="insets" object="insets">0,0,0,0</at>
+                    </object>
+                   </at>
+                   <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+                  </super>
+                  <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+                  <at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
+                  <at name="beanproperties">
+                   <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+                    <at name="classname">com.jeta.forms.components.label.JETALabel</at>
+                    <at name="properties">
+                     <object classname="com.jeta.forms.store.support.PropertyMap">
+                      <at name="border">
+                       <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                        <super classname="com.jeta.forms.store.properties.BorderProperty">
+                         <at name="name">border</at>
+                        </super>
+                        <at name="borders">
+                         <object classname="java.util.LinkedList">
+                          <item >
+                           <at name="value">
+                            <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                             <super classname="com.jeta.forms.store.properties.BorderProperty">
+                              <at name="name">border</at>
+                             </super>
+                            </object>
+                           </at>
+                          </item>
+                         </object>
+                        </at>
+                       </object>
+                      </at>
+                      <at name="name">lblTitle</at>
+                      <at name="width">720</at>
+                      <at name="text">-</at>
+                      <at name="fill">
+                       <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+                        <at name="name">fill</at>
+                       </object>
+                      </at>
+                      <at name="height">15</at>
+                     </object>
+                    </at>
+                   </object>
+                  </at>
+                 </object>
+                </at>
+               </item>
+              </object>
+             </at>
+             <at name="properties">
+              <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+               <at name="classname">com.jeta.forms.gui.form.GridView</at>
+               <at name="properties">
+                <object classname="com.jeta.forms.store.support.PropertyMap">
+                 <at name="border">
+                  <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                   <at name="borders">
+                    <object classname="java.util.LinkedList"/>
+                   </at>
+                  </object>
+                 </at>
+                 <at name="name"/>
+                 <at name="fill">
+                  <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+                   <at name="name">fill</at>
+                  </object>
+                 </at>
+                 <at name="scollBars">
+                  <object classname="com.jeta.forms.store.properties.ScrollBarsProperty">
+                   <at name="name">scollBars</at>
+                   <at name="verticalpolicy">21</at>
+                   <at name="horizontalpolicy">31</at>
+                   <at name="border">
+                    <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                     <super classname="com.jeta.forms.store.properties.BorderProperty">
+                      <at name="name">border</at>
+                     </super>
+                     <at name="borders">
+                      <object classname="java.util.LinkedList">
+                       <item >
+                        <at name="value">
+                         <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                          <super classname="com.jeta.forms.store.properties.BorderProperty">
+                           <at name="name">border</at>
+                          </super>
+                         </object>
+                        </at>
+                       </item>
+                      </object>
+                     </at>
+                    </object>
+                   </at>
+                  </object>
+                 </at>
+                </object>
+               </at>
+              </object>
+             </at>
+             <at name="cellpainters">
+              <object classname="com.jeta.forms.store.support.Matrix">
+               <at name="rows">
+                <object classname="[Ljava.lang.Object;" size="1">
+                 <at name="item" index="0">
+                  <object classname="[Ljava.lang.Object;" size="3"/>
+                 </at>
+                </object>
+               </at>
+              </object>
+             </at>
+             <at name="rowgroups">
+              <object classname="com.jeta.forms.store.memento.FormGroupSet">
+               <at name="groups">
+                <object classname="java.util.HashMap"/>
+               </at>
+              </object>
+             </at>
+             <at name="colgroups">
+              <object classname="com.jeta.forms.store.memento.FormGroupSet">
+               <at name="groups">
+                <object classname="java.util.HashMap"/>
+               </at>
+              </object>
+             </at>
+            </object>
+           </at>
+          </item>
+         </object>
+        </at>
+        <at name="properties">
+         <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+          <at name="classname">com.jeta.forms.gui.form.GridView</at>
+          <at name="properties">
+           <object classname="com.jeta.forms.store.support.PropertyMap">
+            <at name="border">
+             <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+              <super classname="com.jeta.forms.store.properties.BorderProperty">
+               <at name="name">border</at>
+              </super>
+              <at name="borders">
+               <object classname="java.util.LinkedList"/>
+              </at>
+             </object>
+            </at>
+            <at name="name">panelPage1</at>
+            <at name="fill">
+             <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+              <at name="name">fill</at>
+             </object>
+            </at>
+            <at name="scollBars">
+             <object classname="com.jeta.forms.store.properties.ScrollBarsProperty">
+              <at name="name">scollBars</at>
+              <at name="verticalpolicy">21</at>
+              <at name="horizontalpolicy">31</at>
+              <at name="border">
+               <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                <super classname="com.jeta.forms.store.properties.BorderProperty">
+                 <at name="name">border</at>
+                </super>
+                <at name="borders">
+                 <object classname="java.util.LinkedList">
+                  <item >
+                   <at name="value">
+                    <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                     <super classname="com.jeta.forms.store.properties.BorderProperty">
+                      <at name="name">border</at>
+                     </super>
+                    </object>
+                   </at>
+                  </item>
+                 </object>
+                </at>
+               </object>
+              </at>
+             </object>
+            </at>
+           </object>
+          </at>
+         </object>
+        </at>
+        <at name="cellpainters">
+         <object classname="com.jeta.forms.store.support.Matrix">
+          <at name="rows">
+           <object classname="[Ljava.lang.Object;" size="17">
+            <at name="item" index="0">
+             <object classname="[Ljava.lang.Object;" size="3"/>
+            </at>
+            <at name="item" index="1">
+             <object classname="[Ljava.lang.Object;" size="3"/>
+            </at>
+            <at name="item" index="2">
+             <object classname="[Ljava.lang.Object;" size="3"/>
+            </at>
+            <at name="item" index="3">
+             <object classname="[Ljava.lang.Object;" size="3"/>
+            </at>
+            <at name="item" index="4">
+             <object classname="[Ljava.lang.Object;" size="3"/>
+            </at>
+            <at name="item" index="5">
+             <object classname="[Ljava.lang.Object;" size="3"/>
+            </at>
+            <at name="item" index="6">
+             <object classname="[Ljava.lang.Object;" size="3"/>
+            </at>
+            <at name="item" index="7">
+             <object classname="[Ljava.lang.Object;" size="3"/>
+            </at>
+            <at name="item" index="8">
+             <object classname="[Ljava.lang.Object;" size="3"/>
+            </at>
+            <at name="item" index="9">
+             <object classname="[Ljava.lang.Object;" size="3"/>
+            </at>
+            <at name="item" index="10">
+             <object classname="[Ljava.lang.Object;" size="3"/>
+            </at>
+            <at name="item" index="11">
+             <object classname="[Ljava.lang.Object;" size="3"/>
+            </at>
+            <at name="item" index="12">
+             <object classname="[Ljava.lang.Object;" size="3"/>
+            </at>
+            <at name="item" index="13">
+             <object classname="[Ljava.lang.Object;" size="3"/>
+            </at>
+            <at name="item" index="14">
+             <object classname="[Ljava.lang.Object;" size="3"/>
+            </at>
+            <at name="item" index="15">
+             <object classname="[Ljava.lang.Object;" size="3"/>
+            </at>
+            <at name="item" index="16">
+             <object classname="[Ljava.lang.Object;" size="3"/>
+            </at>
+           </object>
+          </at>
+         </object>
+        </at>
+        <at name="rowgroups">
+         <object classname="com.jeta.forms.store.memento.FormGroupSet">
+          <at name="groups">
+           <object classname="java.util.HashMap"/>
+          </at>
+         </object>
+        </at>
+        <at name="colgroups">
+         <object classname="com.jeta.forms.store.memento.FormGroupSet">
+          <at name="groups">
+           <object classname="java.util.HashMap"/>
+          </at>
+         </object>
+        </at>
+       </object>
+      </at>
+     </item>
+     <item >
+      <at name="value">
+       <object classname="com.jeta.forms.store.memento.FormMemento">
+        <super classname="com.jeta.forms.store.memento.ComponentMemento">
+         <at name="cellconstraints">
+          <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+           <at name="column">1</at>
+           <at name="row">3</at>
+           <at name="colspan">1</at>
+           <at name="rowspan">1</at>
+           <at name="halign">default</at>
+           <at name="valign">default</at>
+           <at name="insets" object="insets">0,0,0,0</at>
+          </object>
+         </at>
+         <at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
+        </super>
+        <at name="id">embedded.847013499</at>
+        <at name="rowspecs">CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE</at>
+        <at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE</at>
+        <at name="components">
+         <object classname="java.util.LinkedList">
+          <item >
+           <at name="value">
+            <object classname="com.jeta.forms.store.memento.BeanMemento">
+             <super classname="com.jeta.forms.store.memento.ComponentMemento">
+              <at name="cellconstraints">
+               <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                <at name="column">2</at>
+                <at name="row">2</at>
+                <at name="colspan">1</at>
+                <at name="rowspan">1</at>
+                <at name="halign">default</at>
+                <at name="valign">default</at>
+                <at name="insets" object="insets">0,0,0,0</at>
+               </object>
+              </at>
+              <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+             </super>
+             <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+             <at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
+             <at name="beanproperties">
+              <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+               <at name="classname">com.jeta.forms.components.label.JETALabel</at>
+               <at name="properties">
+                <object classname="com.jeta.forms.store.support.PropertyMap">
+                 <at name="border">
+                  <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                   <at name="borders">
+                    <object classname="java.util.LinkedList">
+                     <item >
+                      <at name="value">
+                       <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                        <super classname="com.jeta.forms.store.properties.BorderProperty">
+                         <at name="name">border</at>
+                        </super>
+                       </object>
+                      </at>
+                     </item>
+                    </object>
+                   </at>
+                  </object>
+                 </at>
+                 <at name="name">lblServerType</at>
+                 <at name="width">114</at>
+                 <at name="text">Tipo de servidor</at>
+                 <at name="fill">
+                  <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+                   <at name="name">fill</at>
+                  </object>
+                 </at>
+                 <at name="height">15</at>
+                </object>
+               </at>
+              </object>
+             </at>
+            </object>
+           </at>
+          </item>
+          <item >
+           <at name="value">
+            <object classname="com.jeta.forms.store.memento.BeanMemento">
+             <super classname="com.jeta.forms.store.memento.ComponentMemento">
+              <at name="cellconstraints">
+               <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                <at name="column">4</at>
+                <at name="row">2</at>
+                <at name="colspan">1</at>
+                <at name="rowspan">1</at>
+                <at name="halign">default</at>
+                <at name="valign">default</at>
+                <at name="insets" object="insets">0,0,0,0</at>
+               </object>
+              </at>
+              <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+             </super>
+             <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+             <at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
+             <at name="beanproperties">
+              <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+               <at name="classname">com.jeta.forms.components.label.JETALabel</at>
+               <at name="properties">
+                <object classname="com.jeta.forms.store.support.PropertyMap">
+                 <at name="border">
+                  <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                   <at name="borders">
+                    <object classname="java.util.LinkedList">
+                     <item >
+                      <at name="value">
+                       <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                        <super classname="com.jeta.forms.store.properties.BorderProperty">
+                         <at name="name">border</at>
+                        </super>
+                       </object>
+                      </at>
+                     </item>
+                    </object>
+                   </at>
+                  </object>
+                 </at>
+                 <at name="name">lblServerTypeValue</at>
+                 <at name="width">451</at>
+                 <at name="text">-</at>
+                 <at name="fill">
+                  <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+                   <at name="name">fill</at>
+                  </object>
+                 </at>
+                 <at name="height">15</at>
+                </object>
+               </at>
+              </object>
+             </at>
+            </object>
+           </at>
+          </item>
+          <item >
+           <at name="value">
+            <object classname="com.jeta.forms.store.memento.BeanMemento">
+             <super classname="com.jeta.forms.store.memento.ComponentMemento">
+              <at name="cellconstraints">
+               <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                <at name="column">8</at>
+                <at name="row">2</at>
+                <at name="colspan">1</at>
+                <at name="rowspan">1</at>
+                <at name="halign">default</at>
+                <at name="valign">default</at>
+                <at name="insets" object="insets">0,0,0,0</at>
+               </object>
+              </at>
+              <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+             </super>
+             <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+             <at name="beanclass">javax.swing.JButton</at>
+             <at name="beanproperties">
+              <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+               <at name="classname">javax.swing.JButton</at>
+               <at name="properties">
+                <object classname="com.jeta.forms.store.support.PropertyMap">
+                 <at name="border">
+                  <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                   <at name="borders">
+                    <object classname="java.util.LinkedList">
+                     <item >
+                      <at name="value">
+                       <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                        <super classname="com.jeta.forms.store.properties.BorderProperty">
+                         <at name="name">border</at>
+                        </super>
+                       </object>
+                      </at>
+                     </item>
+                    </object>
+                   </at>
+                  </object>
+                 </at>
+                 <at name="actionCommand">Siguiente</at>
+                 <at name="name">btnSiguiente</at>
+                 <at name="width">102</at>
+                 <at name="text">Siguiente</at>
+                 <at name="height">25</at>
+                </object>
+               </at>
+              </object>
+             </at>
+            </object>
+           </at>
+          </item>
+          <item >
+           <at name="value">
+            <object classname="com.jeta.forms.store.memento.BeanMemento">
+             <super classname="com.jeta.forms.store.memento.ComponentMemento">
+              <at name="cellconstraints">
+               <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                <at name="column">6</at>
+                <at name="row">2</at>
+                <at name="colspan">1</at>
+                <at name="rowspan">1</at>
+                <at name="halign">default</at>
+                <at name="valign">default</at>
+                <at name="insets" object="insets">0,0,0,0</at>
+               </object>
+              </at>
+              <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+             </super>
+             <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+             <at name="beanclass">javax.swing.JButton</at>
+             <at name="beanproperties">
+              <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+               <at name="classname">javax.swing.JButton</at>
+               <at name="properties">
+                <object classname="com.jeta.forms.store.support.PropertyMap">
+                 <at name="border">
+                  <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                   <at name="borders">
+                    <object classname="java.util.LinkedList">
+                     <item >
+                      <at name="value">
+                       <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                        <super classname="com.jeta.forms.store.properties.BorderProperty">
+                         <at name="name">border</at>
+                        </super>
+                       </object>
+                      </at>
+                     </item>
+                    </object>
+                   </at>
+                  </object>
+                 </at>
+                 <at name="actionCommand">Anterior</at>
+                 <at name="name">btnAnterior</at>
+                 <at name="width">92</at>
+                 <at name="text">Anterior</at>
+                 <at name="height">25</at>
+                </object>
+               </at>
+              </object>
+             </at>
+            </object>
+           </at>
+          </item>
+         </object>
+        </at>
+        <at name="properties">
+         <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+          <at name="classname">com.jeta.forms.gui.form.GridView</at>
+          <at name="properties">
+           <object classname="com.jeta.forms.store.support.PropertyMap">
+            <at name="border">
+             <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+              <super classname="com.jeta.forms.store.properties.BorderProperty">
+               <at name="name">border</at>
+              </super>
+              <at name="borders">
+               <object classname="java.util.LinkedList"/>
+              </at>
+             </object>
+            </at>
+            <at name="name">pnlSiguineteAnterior</at>
+            <at name="fill">
+             <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+              <at name="name">fill</at>
+             </object>
+            </at>
+            <at name="scollBars">
+             <object classname="com.jeta.forms.store.properties.ScrollBarsProperty">
+              <at name="name">scollBars</at>
+              <at name="verticalpolicy">21</at>
+              <at name="horizontalpolicy">31</at>
+              <at name="border">
+               <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                <super classname="com.jeta.forms.store.properties.BorderProperty">
+                 <at name="name">border</at>
+                </super>
+                <at name="borders">
+                 <object classname="java.util.LinkedList">
+                  <item >
+                   <at name="value">
+                    <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                     <super classname="com.jeta.forms.store.properties.BorderProperty">
+                      <at name="name">border</at>
+                     </super>
+                    </object>
+                   </at>
+                  </item>
+                 </object>
+                </at>
+               </object>
+              </at>
+             </object>
+            </at>
+           </object>
+          </at>
+         </object>
+        </at>
+        <at name="cellpainters">
+         <object classname="com.jeta.forms.store.support.Matrix">
+          <at name="rows">
+           <object classname="[Ljava.lang.Object;" size="3">
+            <at name="item" index="0">
+             <object classname="[Ljava.lang.Object;" size="9"/>
+            </at>
+            <at name="item" index="1">
+             <object classname="[Ljava.lang.Object;" size="9"/>
+            </at>
+            <at name="item" index="2">
+             <object classname="[Ljava.lang.Object;" size="9"/>
+            </at>
+           </object>
+          </at>
+         </object>
+        </at>
+        <at name="rowgroups">
+         <object classname="com.jeta.forms.store.memento.FormGroupSet">
+          <at name="groups">
+           <object classname="java.util.HashMap"/>
+          </at>
+         </object>
+        </at>
+        <at name="colgroups">
+         <object classname="com.jeta.forms.store.memento.FormGroupSet">
+          <at name="groups">
+           <object classname="java.util.HashMap"/>
+          </at>
+         </object>
+        </at>
+       </object>
+      </at>
+     </item>
+    </object>
+   </at>
+   <at name="properties">
+    <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+     <at name="classname">com.jeta.forms.gui.form.GridView</at>
+     <at name="properties">
+      <object classname="com.jeta.forms.store.support.PropertyMap">
+       <at name="border">
+        <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+         <super classname="com.jeta.forms.store.properties.BorderProperty">
+          <at name="name">border</at>
+         </super>
+         <at name="borders">
+          <object classname="java.util.LinkedList"/>
+         </at>
+        </object>
+       </at>
+       <at name="name"/>
+       <at name="fill">
+        <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+         <at name="name">fill</at>
+        </object>
+       </at>
+       <at name="scollBars">
+        <object classname="com.jeta.forms.store.properties.ScrollBarsProperty">
+         <at name="name">scollBars</at>
+         <at name="verticalpolicy">21</at>
+         <at name="horizontalpolicy">31</at>
+         <at name="border">
+          <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+           <super classname="com.jeta.forms.store.properties.BorderProperty">
+            <at name="name">border</at>
+           </super>
+           <at name="borders">
+            <object classname="java.util.LinkedList">
+             <item >
+              <at name="value">
+               <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                <super classname="com.jeta.forms.store.properties.BorderProperty">
+                 <at name="name">border</at>
+                </super>
+               </object>
+              </at>
+             </item>
+            </object>
+           </at>
+          </object>
+         </at>
+        </object>
+       </at>
+      </object>
+     </at>
+    </object>
+   </at>
+   <at name="cellpainters">
+    <object classname="com.jeta.forms.store.support.Matrix">
+     <at name="rows">
+      <object classname="[Ljava.lang.Object;" size="3">
+       <at name="item" index="0">
+        <object classname="[Ljava.lang.Object;" size="1"/>
+       </at>
+       <at name="item" index="1">
+        <object classname="[Ljava.lang.Object;" size="1"/>
+       </at>
+       <at name="item" index="2">
+        <object classname="[Ljava.lang.Object;" size="1"/>
+       </at>
+      </object>
+     </at>
+    </object>
+   </at>
+   <at name="rowgroups">
+    <object classname="com.jeta.forms.store.memento.FormGroupSet">
+     <at name="groups">
+      <object classname="java.util.HashMap"/>
+     </at>
+    </object>
+   </at>
+   <at name="colgroups">
+    <object classname="com.jeta.forms.store.memento.FormGroupSet">
+     <at name="groups">
+      <object classname="java.util.HashMap"/>
+     </at>
+    </object>
+   </at>
+  </object>
+ </at>
+</object>
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/wizard/WMSWizardView.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/wizard/WMSWizardView.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/wizard/WMSWizardView.java	(revision 21019)
@@ -0,0 +1,268 @@
+package org.gvsig.raster.wms.app.wmsclient.gui.wizard;
+
+import com.jeta.forms.components.separator.TitledSeparator;
+import com.jeta.open.i18n.I18NUtils;
+import com.jgoodies.forms.layout.CellConstraints;
+import com.jgoodies.forms.layout.FormLayout;
+import java.awt.BorderLayout;
+import java.awt.ComponentOrientation;
+import java.awt.Container;
+import java.awt.Dimension;
+import javax.swing.Box;
+import javax.swing.ImageIcon;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JComboBox;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
+
+
+public class WMSWizardView extends JPanel
+{
+   JPanel panelPage1 = new JPanel();
+   JComboBox cmbHost = new JComboBox();
+   JCheckBox chkCaching = new JCheckBox();
+   JCheckBox chkTileCache = new JCheckBox();
+   JCheckBox chkAxisOrder = new JCheckBox();
+   JTextArea txtAbstract = new JTextArea();
+   JButton btnCancel = new JButton();
+   JButton btnConnect = new JButton();
+   JLabel jLabel1 = new JLabel();
+   JLabel lblTitle = new JLabel();
+   JPanel pnlSiguineteAnterior = new JPanel();
+   JLabel lblServerType = new JLabel();
+   JLabel lblServerTypeValue = new JLabel();
+   JButton btnSiguiente = new JButton();
+   JButton btnAnterior = new JButton();
+
+   /**
+    * Default constructor
+    */
+   public WMSWizardView()
+   {
+      initializePanel();
+   }
+
+   /**
+    * Adds fill components to empty cells in the first row and first column of the grid.
+    * This ensures that the grid spacing will be the same as shown in the designer.
+    * @param cols an array of column indices in the first row where fill components should be added.
+    * @param rows an array of row indices in the first column where fill components should be added.
+    */
+   void addFillComponents( Container panel, int[] cols, int[] rows )
+   {
+      Dimension filler = new Dimension(10,10);
+
+      boolean filled_cell_11 = false;
+      CellConstraints cc = new CellConstraints();
+      if ( cols.length > 0 && rows.length > 0 )
+      {
+         if ( cols[0] == 1 && rows[0] == 1 )
+         {
+            /** add a rigid area  */
+            panel.add( Box.createRigidArea( filler ), cc.xy(1,1) );
+            filled_cell_11 = true;
+         }
+      }
+
+      for( int index = 0; index < cols.length; index++ )
+      {
+         if ( cols[index] == 1 && filled_cell_11 )
+         {
+            continue;
+         }
+         panel.add( Box.createRigidArea( filler ), cc.xy(cols[index],1) );
+      }
+
+      for( int index = 0; index < rows.length; index++ )
+      {
+         if ( rows[index] == 1 && filled_cell_11 )
+         {
+            continue;
+         }
+         panel.add( Box.createRigidArea( filler ), cc.xy(1,rows[index]) );
+      }
+
+   }
+
+   /**
+    * Helper method to load an image file from the CLASSPATH
+    * @param imageName the package and name of the file to load relative to the CLASSPATH
+    * @return an ImageIcon instance with the specified image file
+    * @throws IllegalArgumentException if the image resource cannot be loaded.
+    */
+   public ImageIcon loadImage( String imageName )
+   {
+      try
+      {
+         ClassLoader classloader = getClass().getClassLoader();
+         java.net.URL url = classloader.getResource( imageName );
+         if ( url != null )
+         {
+            ImageIcon icon = new ImageIcon( url );
+            return icon;
+         }
+      }
+      catch( Exception e )
+      {
+         e.printStackTrace();
+      }
+      throw new IllegalArgumentException( "Unable to load image: " + imageName );
+   }
+
+   /**
+    * Method for recalculating the component orientation for 
+    * right-to-left Locales.
+    * @param orientation the component orientation to be applied
+    */
+   public void applyComponentOrientation( ComponentOrientation orientation )
+   {
+      // Not yet implemented...
+      // I18NUtils.applyComponentOrientation(this, orientation);
+      super.applyComponentOrientation(orientation);
+   }
+
+   public JPanel createPanel()
+   {
+      JPanel jpanel1 = new JPanel();
+      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0)","FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE");
+      CellConstraints cc = new CellConstraints();
+      jpanel1.setLayout(formlayout1);
+
+      jpanel1.add(createpanelPage1(),cc.xy(1,1));
+      jpanel1.add(createpnlSiguineteAnterior(),cc.xy(1,3));
+      addFillComponents(jpanel1,new int[]{ 1 },new int[]{ 1,2,3 });
+      return jpanel1;
+   }
+
+   public JPanel createpanelPage1()
+   {
+      panelPage1.setName("panelPage1");
+      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:MIN(12DLU;DEFAULT):GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0)");
+      CellConstraints cc = new CellConstraints();
+      panelPage1.setLayout(formlayout1);
+
+      TitledSeparator titledseparator1 = new TitledSeparator();
+      titledseparator1.setText("Servidor");
+      panelPage1.add(titledseparator1,cc.xy(2,2));
+
+      cmbHost.setEditable(true);
+      cmbHost.setName("cmbHost");
+      cmbHost.setRequestFocusEnabled(false);
+      panelPage1.add(cmbHost,cc.xy(2,4));
+
+      chkCaching.setActionCommand("Refrescar cache");
+      chkCaching.setName("chkCaching");
+      chkCaching.setText("Refrescar cache");
+      panelPage1.add(chkCaching,cc.xy(2,7));
+
+      chkTileCache.setActionCommand("Uso de cache de teselas local");
+      chkTileCache.setName("chkTileCache");
+      chkTileCache.setText("Uso de cache de teselas local");
+      panelPage1.add(chkTileCache,cc.xy(2,9));
+
+      chkAxisOrder.setActionCommand("Asumir que las coordenadas siguen el orden de ejes XY");
+      chkAxisOrder.setName("chkAxisOrder");
+      chkAxisOrder.setText("Asumir que las coordenadas siguen el orden de ejes XY");
+      panelPage1.add(chkAxisOrder,cc.xy(2,11));
+
+      TitledSeparator titledseparator2 = new TitledSeparator();
+      titledseparator2.setText("Descripcion");
+      panelPage1.add(titledseparator2,cc.xy(2,13));
+
+      txtAbstract.setName("txtAbstract");
+      JScrollPane jscrollpane1 = new JScrollPane();
+      jscrollpane1.setViewportView(txtAbstract);
+      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
+      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
+      panelPage1.add(jscrollpane1,cc.xy(2,17));
+
+      panelPage1.add(createPanel1(),cc.xy(2,6));
+      panelPage1.add(createPanel2(),cc.xy(2,15));
+      addFillComponents(panelPage1,new int[]{ 1,2,3 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17 });
+      return panelPage1;
+   }
+
+   public JPanel createPanel1()
+   {
+      JPanel jpanel1 = new JPanel();
+      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE");
+      CellConstraints cc = new CellConstraints();
+      jpanel1.setLayout(formlayout1);
+
+      btnCancel.setActionCommand("Cancelar");
+      btnCancel.setName("btnCancel");
+      btnCancel.setText("Cancelar");
+      jpanel1.add(btnCancel,cc.xy(5,1));
+
+      btnConnect.setActionCommand("Conectar");
+      btnConnect.setName("btnConnect");
+      btnConnect.setText("Conectar");
+      jpanel1.add(btnConnect,cc.xy(3,1));
+
+      addFillComponents(jpanel1,new int[]{ 1,2,4 },new int[]{ 1 });
+      return jpanel1;
+   }
+
+   public JPanel createPanel2()
+   {
+      JPanel jpanel1 = new JPanel();
+      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0)","CENTER:DEFAULT:NONE");
+      CellConstraints cc = new CellConstraints();
+      jpanel1.setLayout(formlayout1);
+
+      jLabel1.setName("jLabel1");
+      jLabel1.setText("Nombre:");
+      jpanel1.add(jLabel1,cc.xy(1,1));
+
+      lblTitle.setName("lblTitle");
+      lblTitle.setText("-");
+      jpanel1.add(lblTitle,cc.xy(3,1));
+
+      addFillComponents(jpanel1,new int[]{ 2 },new int[0]);
+      return jpanel1;
+   }
+
+   public JPanel createpnlSiguineteAnterior()
+   {
+      pnlSiguineteAnterior.setName("pnlSiguineteAnterior");
+      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE");
+      CellConstraints cc = new CellConstraints();
+      pnlSiguineteAnterior.setLayout(formlayout1);
+
+      lblServerType.setName("lblServerType");
+      lblServerType.setText("Tipo de servidor");
+      pnlSiguineteAnterior.add(lblServerType,cc.xy(2,2));
+
+      lblServerTypeValue.setName("lblServerTypeValue");
+      lblServerTypeValue.setText("-");
+      pnlSiguineteAnterior.add(lblServerTypeValue,cc.xy(4,2));
+
+      btnSiguiente.setActionCommand("Siguiente");
+      btnSiguiente.setName("btnSiguiente");
+      btnSiguiente.setText("Siguiente");
+      pnlSiguineteAnterior.add(btnSiguiente,cc.xy(8,2));
+
+      btnAnterior.setActionCommand("Anterior");
+      btnAnterior.setName("btnAnterior");
+      btnAnterior.setText("Anterior");
+      pnlSiguineteAnterior.add(btnAnterior,cc.xy(6,2));
+
+      addFillComponents(pnlSiguineteAnterior,new int[]{ 1,2,3,4,5,6,7,8,9 },new int[]{ 1,2,3 });
+      return pnlSiguineteAnterior;
+   }
+
+   /**
+    * Initializer
+    */
+   protected void initializePanel()
+   {
+      setLayout(new BorderLayout());
+      add(createPanel(), BorderLayout.CENTER);
+   }
+
+
+}
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/wmc/XmlBuilder.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/wmc/XmlBuilder.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/wmc/XmlBuilder.java	(revision 21019)
@@ -0,0 +1,623 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+ 
+package org.gvsig.raster.wms.app.wmsclient.wmc;
+
+import java.util.HashMap;
+import java.util.Stack;
+
+/**
+ * Title:         XmlBuilder
+ * Description:   Util class to build xml
+ * @author laura
+ */
+public class XmlBuilder
+{
+  // Default size of the XML document to be generated. Used to set the initial
+  // capacity of m_xml.
+  private static final int DEF_XMLDOC_SIZE = 256;
+
+  // Pad unit.
+  private static final String PAD = "  ";
+
+  
+  // Number of pre-defined pad strings, one for each pad
+  // level (0..NUM_PADSTRINGS-1). Should at least be set to 10 for performance.
+  private static final int NUM_PADSTRINGS = 20;
+
+  // Byte representation of '\n'.
+  private static final byte[] NEWLINE_BYTES = "\n".getBytes();
+
+
+  // Array of pad strings, each preceded by a '\n' character.
+  private static String s_padStrings[];
+
+  // XML-encoded newline character.
+  private static String s_newlineXmlEnc;
+
+
+  // XML document being built.
+  private StringBuffer m_xml = new StringBuffer(DEF_XMLDOC_SIZE);
+
+  // Scratch buffer exclusively used to encode strings.
+  private StringBuffer m_encodeBuf = new StringBuffer(40);
+
+  // Current pad string.
+  private String m_pad = "";
+
+  // If set, indentation will be added to the XML document.
+  private boolean m_autoPad;
+
+  // Stack of strings. The string at the top is the tag name of the current
+  // XML block. The string immediately below the top is the tag name of the
+  // XML block that immediately encloses the current XML block.
+  protected Stack<String> m_openElements = new Stack<String>();
+
+  // Current pad level (0, 1, 2, ...).
+  private int m_padLevel = 0;
+
+  private String encoding = "UTF-8";
+
+  /*
+   * Create the pad strings.
+   */
+  static
+  {
+    s_padStrings = new String[NUM_PADSTRINGS];
+    String pad = "";
+
+    for (int i = 0; i < NUM_PADSTRINGS; i++)
+    {
+      s_padStrings[i] = "\n" + pad;
+      pad += PAD;
+    }
+
+    StringBuffer tmp = new StringBuffer();
+
+    for (int i = 0; i < NEWLINE_BYTES.length; i++)
+    {
+      tmp.append("&#");
+      tmp.append(NEWLINE_BYTES[i]);
+      tmp.append(";");
+    }
+
+    s_newlineXmlEnc = tmp.toString();
+  }
+
+
+  /**
+  * Constructor. The XML document to be generated will automatically be
+  * indented.
+  */
+  public XmlBuilder()
+  {
+    this(true);
+  }
+
+  /**
+  * Constructor.
+  *
+  * @param  autoPad  if set, the XML document to be generated will
+  *                  automatically be indented.
+  */
+  public XmlBuilder(boolean autoPad)
+  {
+    m_autoPad = autoPad;
+    m_padLevel = 0;
+    m_pad = s_padStrings[m_padLevel];
+  }
+
+  /**
+   * Reset this XmlBuilder.
+   */
+  public void reset()
+  {
+    m_padLevel = 0;
+    m_pad = s_padStrings[m_padLevel];
+    m_xml.setLength(0);
+  }
+
+  /**
+  * Adds raw data to the xml.
+  */
+  public void writeRaw(String raw)
+  {
+    m_xml.append(raw);
+  }
+
+  /**
+  * Adds a comment to the xml.
+  */
+  public void writeComment(String comment)
+  {
+    if (m_autoPad)
+    {
+      m_xml.append(m_pad);
+    }
+
+    m_xml.append("<!-- ");
+    encode(comment, m_xml);
+    m_xml.append(" -->\n");
+  }
+
+  /**
+   * Writes the XML document header.
+   */
+  public void writeHeader()
+  {
+	// XML document header.
+	final String HEADER = "<?xml version=\"1.0\" encoding=\""+encoding+"\"?>\n";
+
+    m_xml.append(HEADER);
+  }
+  
+  /**
+   * Sets the encoding used in the XML. By default UTF-8 is used.
+   * @param encoding
+   */
+  public void setEncoding(String encoding) {
+	  this.encoding  = encoding;
+  }
+  
+  /**
+  * Adds a opening and closing tag with charcter data.
+  */
+  public void writeTag(String name, String data)
+  {
+    name = encode(name);
+
+    if (m_autoPad)
+    {
+      m_xml.append(m_pad);
+    }
+
+    m_xml.append("<");
+    m_xml.append(name);
+    m_xml.append(">");
+    encode(data, m_xml);
+    m_xml.append("</");
+    m_xml.append(name);
+    m_xml.append(">");
+  }
+
+  /**
+  * Adds a opening and closing tag with attributes.
+  */
+  public void writeTag(String name, HashMap<Object, String> attributes)
+  {
+    if (m_autoPad)
+    {
+      m_xml.append(m_pad);
+    }
+
+    m_xml.append("<");
+    encode(name, m_xml);
+    m_xml.append(" ");
+
+    Object elems[] = attributes.keySet().toArray();
+    
+    for (int i = 0; i < elems.length; i++)
+    {
+      String nm = (String)elems[i];
+      String val = (String)attributes.get(nm);
+
+      encode(nm, m_xml);
+      m_xml.append("=\"");
+      encode(val, m_xml);
+      m_xml.append("\" ");
+    }
+
+    m_xml.append("/>");
+  }
+
+  /**
+  * Adds a opening and closing tag with an attribute and character data.
+  */
+  public void writeTag(String name, String attr1Name, String attr1Value
+  	, String attr2Name, String attr2Value)
+  {
+    if (m_autoPad)
+    {
+      m_xml.append(m_pad);
+    }
+
+    m_xml.append("<");
+    encode(name, m_xml);
+    m_xml.append(" ");
+
+    encode(attr1Name, m_xml);
+    m_xml.append("=\"");
+    encode(attr1Value, m_xml);
+    m_xml.append("\" ");
+
+    encode(attr2Name, m_xml);
+    m_xml.append("=\"");
+    encode(attr2Value, m_xml);
+    m_xml.append("\" ");
+
+    m_xml.append("/>");
+  }
+
+  /**
+  * Adds a opening and closing tag with an attribute and character data.
+  */
+  public void writeTag(String name, String data, String attrName, String attrValue)
+  {
+    name = encode(name);
+
+    if (m_autoPad)
+    {
+      m_xml.append(m_pad);
+    }
+
+    m_xml.append("<");
+    m_xml.append(name);
+    m_xml.append(" ");
+
+    encode(attrName, m_xml);
+    m_xml.append("=\"");
+    encode(attrValue, m_xml);
+    m_xml.append("\" ");
+
+    m_xml.append(">");
+    encode(data, m_xml);
+    m_xml.append("</");
+    m_xml.append(name);
+    m_xml.append(">");
+  }
+
+  /**
+  * Adds a opening and closing tag with two attributes and character data.
+  */
+  public void writeTag(String name, String data, String attr1Name, String attr1Value
+                      , String attr2Name, String attr2Value)
+  {
+    name = encode(name);
+
+    if (m_autoPad)
+    {
+      m_xml.append(m_pad);
+    }
+
+    m_xml.append("<");
+    m_xml.append(name);
+    m_xml.append(" ");
+
+    encode(attr1Name, m_xml);
+    m_xml.append("=\"");
+    encode(attr1Value, m_xml);
+    m_xml.append("\" ");
+
+    encode(attr2Name, m_xml);
+    m_xml.append("=\"");
+    encode(attr2Value, m_xml);
+    m_xml.append("\" ");
+
+    m_xml.append(">");
+    encode(data, m_xml);
+    m_xml.append("</");
+    m_xml.append(name);
+    m_xml.append(">");
+  }
+
+  /**
+  * Adds a opening and closing tag with attributes and character data.
+  */
+  public void writeTag(String name, String data, HashMap<Object, String> attributes)
+  {
+    name = encode(name);
+
+    if (m_autoPad)
+    {
+      m_xml.append(m_pad);
+    }
+
+    m_xml.append("<");
+    m_xml.append(name);
+    m_xml.append(" ");
+
+    Object elems[] = attributes.keySet().toArray();
+    
+    for (int i = 0; i < elems.length; i++)
+    {
+      String nm = (String)elems[i];
+      String val = (String)attributes.get(nm);
+
+      encode(nm, m_xml);
+      m_xml.append("=\"");
+      encode(val, m_xml);
+      m_xml.append("\" ");
+    }
+
+    m_xml.append(">");
+    encode(data, m_xml);
+    m_xml.append("</");
+    m_xml.append(name);
+    m_xml.append(">");
+  }
+
+  /**
+  * Writes an opening tag
+  */
+  public void openTag(String name)
+  {
+    name = encode(name);
+
+    m_openElements.push(name);              // must be encoded!
+
+    if (m_autoPad)
+    {
+      m_xml.append(m_pad);
+    }
+
+    m_xml.append("<");
+    m_xml.append(name);
+    m_xml.append(">");
+
+    if (m_autoPad)
+    {
+      m_padLevel++;
+
+      if (m_padLevel < NUM_PADSTRINGS)
+      {
+        m_pad = s_padStrings[m_padLevel];
+      }
+      else                                  // really deep nesting level
+      {
+        m_pad += PAD;
+      }
+    }
+  }
+
+  /**
+  * Writes an opening tag with one attribute.
+  */
+  public void openTag(String name, String attrName, String attrValue)
+  {
+    name = encode(name);
+
+    m_openElements.push(name);              // must be encoded!
+
+    if (m_autoPad)
+    {
+      m_xml.append(m_pad);
+    }
+
+    m_xml.append("<");
+    m_xml.append(name);
+    m_xml.append(" ");
+
+    encode(attrName, m_xml);
+    m_xml.append("=\"");
+    encode(attrValue, m_xml);
+    m_xml.append("\" ");
+
+    m_xml.append(">");
+
+    if (m_autoPad)
+    {
+      m_padLevel++;
+
+      if (m_padLevel < NUM_PADSTRINGS)
+      {
+        m_pad = s_padStrings[m_padLevel];
+      }
+      else                                  // really deep nesting level
+      {
+        m_pad += PAD;
+      }
+    }
+  }
+
+  /**
+  * Writes an opening tag with two attributes.
+  */
+  public void openTag(String name, String attr1Name, String attr1Value
+                      , String attr2Name, String attr2Value)
+  {
+    name = encode(name);
+
+    m_openElements.push(name);              // must be encoded!
+
+    if (m_autoPad)
+    {
+      m_xml.append(m_pad);
+    }
+
+    m_xml.append("<");
+    m_xml.append(name);
+    m_xml.append(" ");
+
+    encode(attr1Name, m_xml);
+    m_xml.append("=\"");
+    encode(attr1Value, m_xml);
+    m_xml.append("\" ");
+
+    encode(attr2Name, m_xml);
+    m_xml.append("=\"");
+    encode(attr2Value, m_xml);
+    m_xml.append("\" ");
+
+    m_xml.append(">");
+
+    if (m_autoPad)
+    {
+      m_padLevel++;
+
+      if (m_padLevel < NUM_PADSTRINGS)
+      {
+        m_pad = s_padStrings[m_padLevel];
+      }
+      else                                  // really deep nesting level
+      {
+        m_pad += PAD;
+      }
+    }
+  }
+
+  /**
+  * Writes an opening tag with attributes.
+  */
+  public void openTag(String name, HashMap<Object, String> attributes)
+  {
+    name = encode(name);
+
+    m_openElements.push(name);              // must be encoded!
+
+    if (m_autoPad)
+    {
+      m_xml.append(m_pad);
+    }
+
+    m_xml.append("<");
+    m_xml.append(name);
+    m_xml.append(" ");
+
+    Object elems[] = attributes.keySet().toArray();
+    
+    for (int i = 0; i < elems.length; i++)
+    {
+      String nm = (String)elems[i];
+      String val = (String)attributes.get(nm);
+
+      encode(nm, m_xml);
+      m_xml.append("=\"");
+      encode(val, m_xml);
+      m_xml.append("\" ");
+    }
+
+    m_xml.append(">");
+
+    if (m_autoPad)
+    {
+      m_padLevel++;
+
+      if (m_padLevel < NUM_PADSTRINGS)
+      {
+        m_pad = s_padStrings[m_padLevel];
+      }
+      else                                  // really deep nesting level
+      {
+        m_pad += PAD;
+      }
+    }
+  }
+
+  /**
+  * Closes an open tag.
+  */
+  public void closeTag()
+  {
+    if (m_autoPad)
+    {
+      if (m_padLevel > 0)
+      {
+        m_padLevel--;
+      }
+
+      if (m_padLevel < NUM_PADSTRINGS)
+      {
+        m_pad = s_padStrings[m_padLevel];
+      }
+      else                                  // really deep nesting level
+      {
+        int len = m_pad.length() - PAD.length();
+        if (len > 0)
+        {
+          m_pad = m_pad.substring(0, len);
+        }
+      }
+
+      m_xml.append(m_pad);
+    }
+
+	String name = (String)m_openElements.pop();      // already encoded
+
+    m_xml.append("</");
+    m_xml.append(name);
+    m_xml.append(">");
+  }
+
+  /**
+  * Get the xml.
+  */
+  public String getXML()
+  {
+    return m_xml.toString();
+  }
+
+  /**
+   * Encodes the funny characters (e.g., '&', '<', '\"') in an XML
+   * string.
+   *
+   * @param  src  XML string to encode.
+   * @return the encoded string.
+   */
+  private String encode(String src)
+  {
+    m_encodeBuf.setLength(0);			// clear old contents
+    encode(src, m_encodeBuf);
+    return m_encodeBuf.toString();
+  }
+
+  /**
+   * Encodes the funny characters (e.g., '&', '<', '\"') in an XML
+   * string.
+   *
+   * @param  src  XML string to encode.
+   * @param  dst  string buffer to write the encoded XML string to.
+   */
+  private static final void encode(String src, StringBuffer dst)
+  {
+    int n = src.length();
+  	
+    for (int i = 0; i < n; i++)
+    {
+      char c = src.charAt(i);
+
+      switch(c)
+      {
+      case '&':
+        dst.append("&amp;");
+        break;
+      case '<':
+        dst.append("&lt;");
+        break;
+      case '>':
+        dst.append("&gt;");
+        break;
+      case '\'':
+        dst.append("&apos;");
+        break;
+      case '\"':
+        dst.append("&quot;");
+        break;
+      case '\n':
+        dst.append(s_newlineXmlEnc);
+        break;
+      default:
+        dst.append(c); 
+      }
+    }
+  }
+}
+

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/wmc/XmlBuilder.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/wmc/ImportWebMapContextExtension.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/wmc/ImportWebMapContextExtension.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/wmc/ImportWebMapContextExtension.java	(revision 21019)
@@ -0,0 +1,228 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+* MA  02110-1301, USA.
+*
+*/
+
+package org.gvsig.raster.wms.app.wmsclient.wmc;
+
+import java.awt.Component;
+import java.awt.geom.Rectangle2D;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.util.Date;
+
+import javax.swing.JOptionPane;
+import javax.swing.filechooser.FileFilter;
+
+import org.gvsig.andami.PluginServices;
+import org.gvsig.andami.messages.NotificationManager;
+import org.gvsig.andami.plugins.Extension;
+import org.gvsig.andami.ui.mdiManager.IWindow;
+import org.gvsig.app.project.Project;
+import org.gvsig.app.project.ProjectManager;
+import org.gvsig.app.project.documents.view.DefaultViewDocument;
+import org.gvsig.app.project.documents.view.ViewManager;
+import org.gvsig.app.project.documents.view.gui.AbstractViewPanel;
+import org.gvsig.app.project.documents.view.gui.DefaultViewPanel;
+import org.gvsig.fmap.dal.DALLocator;
+import org.gvsig.fmap.dal.DataManager;
+import org.gvsig.fmap.dal.coverage.exception.ImportMapContextException;
+import org.gvsig.fmap.geom.Geometry;
+import org.gvsig.fmap.geom.GeometryLocator;
+import org.gvsig.fmap.geom.primitive.Envelope;
+import org.gvsig.fmap.mapcontext.exceptions.UnsupportedVersionLayerException;
+import org.gvsig.gui.beans.swing.JFileChooser;
+import org.gvsig.raster.wms.app.wmsclient.gui.panel.WebMapContextFileChooserAccessory;
+import org.gvsig.raster.wms.app.wmsclient.layer.FLyrWMS;
+import org.gvsig.raster.wms.io.WMSDataParameters;
+import org.gvsig.raster.wms.io.WMSServerExplorer;
+import org.gvsig.raster.wms.io.WMSServerExplorerParameters;
+
+
+public class ImportWebMapContextExtension extends Extension {
+
+	public static final String WMC_FILECHOOSER_ID = "WMC_FILECHOOSER_ID";
+	private String lastPath = null;
+
+	public void initialize() {
+		String[] arguments = PluginServices.getArguments();
+		if (arguments[arguments.length-1].toLowerCase().endsWith(".cml")) {
+			File wmcFile = new File(arguments[arguments.length-1]);
+			if (!wmcFile.exists()) {
+				NotificationManager.addError(PluginServices.getText(this, "could_not_find_web_map_context_file"), new FileNotFoundException());
+				return;
+			}
+
+			readMapContextFile(wmcFile, null);
+		}
+	}
+
+	@SuppressWarnings("deprecation")
+	public void execute(String actionCommand) {
+		if (actionCommand.equals("IMPORT")) {
+			JFileChooser fc = new JFileChooser(WMC_FILECHOOSER_ID, lastPath);
+			fc.setFileFilter(new FileFilter() {
+				public boolean accept(File f) {
+					return f.isDirectory() || f.getAbsolutePath().toLowerCase().endsWith(WebMapContext.FILE_EXTENSION);
+				}
+
+				public String getDescription() {
+					return PluginServices.getText(this, "ogc_mapcontext_file")+" (*.cml)";
+				}
+			});
+			IWindow v = PluginServices.getMDIManager().getActiveWindow();
+
+			// If the current active view is a gvSIG's view, we'll keep its name to
+			// show it at the JFileChooser's accessory.
+			String currentViewName;
+			if (v instanceof AbstractViewPanel) {
+				currentViewName = ((AbstractViewPanel) v).getModel().getName();
+			} else {
+				currentViewName = null;
+			}
+
+			// Create an accessory for the Web Map Context's file chooser.
+			WebMapContextFileChooserAccessory acc = new WebMapContextFileChooserAccessory(currentViewName);
+
+			// Add the accessory to the file chooser
+			fc.setAccessory(acc);
+
+			// Nothing else than Web Map Context files allowed
+			fc.setAcceptAllFileFilterUsed(false);
+
+			if (fc.showOpenDialog((Component) PluginServices.getMainFrame()) == JFileChooser.APPROVE_OPTION){
+				File f = fc.getSelectedFile();
+				readMapContextFile(f, acc.getSelectedView());
+				String fileName = f.getAbsolutePath();
+				lastPath  = fileName.substring(0, fileName.lastIndexOf(File.separatorChar));
+
+			}
+			fc = null;
+		}
+	}
+
+	/**
+	 * Reads a WebMapContext (.cml) file and loads its layers into the destination
+	 * view.
+	 * @param wmcFile
+	 * @param dstView
+	 */
+	@SuppressWarnings("unchecked")
+	private void readMapContextFile(File wmcFile, DefaultViewDocument dstView) {
+		WebMapContext wmc = new WebMapContext();
+		try {
+			wmc.readFile(wmcFile);
+		} catch (UnsupportedVersionLayerException e) {
+			JOptionPane.showMessageDialog(
+					(Component) PluginServices.getMainFrame(),
+					e.getMessage(),
+					PluginServices.getText(this, "unsupported_version"),
+					JOptionPane.ERROR_MESSAGE);
+			return;
+		} catch (ImportMapContextException e) {
+			if (e.isCritical()) {
+				// import impossible: show message and quit
+				JOptionPane.showMessageDialog(
+						(Component) PluginServices.getMainFrame(),
+						e.getMessage(),
+						PluginServices.getText(this, "problems_encountered_while_importing"),
+						JOptionPane.ERROR_MESSAGE);
+				return;
+			} else {
+				JOptionPane.showMessageDialog(
+						(Component) PluginServices.getMainFrame(),
+						e.getMessage() + "\n\n" +
+						PluginServices.getText(this, "edit_layer_properties_to_fix_them"),
+						PluginServices.getText(this, "problems_encountered_while_importing"),
+						JOptionPane.ERROR_MESSAGE);
+			}
+		}
+
+		if (dstView == null) {
+			// Since the destination view is null, a new one will be added to
+			// the project.
+//			dstView = ProjectFactory.createView(null);
+			dstView = (DefaultViewDocument) ProjectManager.getInstance().createDocument(ViewManager.TYPENAME);
+
+			dstView.setName(wmc.title);
+			dstView.setComment("Created from WebMapContext file: " + wmcFile.getName());
+
+//			ProjectExtension pe = (ProjectExtension) PluginServices.getExtension(ProjectExtension.class);
+//			Project theProject = pe.getProject();
+			final Project theProject = ProjectManager.getInstance().getCurrentProject();
+
+			theProject.add(dstView);
+
+			// show the view in a new window
+			AbstractViewPanel v = null;
+			v = new DefaultViewPanel(dstView);
+			PluginServices.getMDIManager().addWindow(v);
+		}
+
+		for (int i = 0; i < wmc.layerList.size(); i++) {
+			// WMS layers
+			if (wmc.layerList.get(i) instanceof FLyrWMS) {
+				FLyrWMS layer = wmc.layerList.get(i);
+				WMSDataParameters params = wmc.paramsList.get(i);
+
+				DataManager datamanager = DALLocator.getDataManager();
+
+				/*
+				 * will connect to get the online resources defined by
+				 * server, because WMC only defines the original URL for
+				 * the server but not for the operations.
+				 */
+				try {
+					WMSServerExplorerParameters explorerParams = (WMSServerExplorerParameters) datamanager.createServerExplorerParameters(WMSServerExplorer.NAME);
+					explorerParams.setHost(params.getURI().getPath());
+
+					WMSServerExplorer explorer = (WMSServerExplorer) datamanager.createServerExplorer(explorerParams);
+
+					layer.setExplorer(explorer);
+					params.setOverrideHost(false);
+					explorer.connect(null, true);
+
+					params.setOnlineResources(explorer.getOnlineResources());
+					layer.setParameters(params);
+
+					Rectangle2D rec = wmc.bBox;
+					Envelope envelope = GeometryLocator.getGeometryManager().createEnvelope(rec.getX(),rec.getY(),rec.getMaxX(),rec.getMaxY(), Geometry.SUBTYPES.GEOM2D);
+					dstView.getMapContext().getViewPort().setEnvelope(envelope);
+				} catch (Exception e) {
+					NotificationManager.addInfo(PluginServices.getText(this, "connect_error")+"\n"+
+							PluginServices.getText(this, "failed_restoring_online_resource_values")+
+					" ["+new Date(System.currentTimeMillis()).toString()+"]",
+					e);
+				}
+
+				dstView.getMapContext().getLayers().addLayer(layer);
+			}
+		}
+	}
+
+	public boolean isEnabled() {
+		return true;
+	}
+
+	public boolean isVisible() {
+		return true;
+	}
+
+}

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/wmc/ImportWebMapContextExtension.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/wmc/ExportWebMapContextExtension.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/wmc/ExportWebMapContextExtension.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/wmc/ExportWebMapContextExtension.java	(revision 21019)
@@ -0,0 +1,208 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+ 
+package org.gvsig.raster.wms.app.wmsclient.wmc;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.gvsig.andami.PluginServices;
+import org.gvsig.andami.messages.NotificationManager;
+import org.gvsig.andami.plugins.Extension;
+import org.gvsig.andami.plugins.IExtension;
+import org.gvsig.andami.ui.mdiManager.IWindow;
+import org.gvsig.app.project.Project;
+import org.gvsig.app.project.ProjectManager;
+import org.gvsig.app.project.documents.Document;
+import org.gvsig.app.project.documents.view.DefaultViewDocument;
+import org.gvsig.app.project.documents.view.ViewManager;
+import org.gvsig.app.project.documents.view.gui.AbstractViewPanel;
+import org.gvsig.fmap.mapcontext.layers.FLayer;
+import org.gvsig.fmap.mapcontext.layers.FLayers;
+import org.gvsig.raster.wms.app.wmsclient.gui.panel.WebMapContextSettingsPanel;
+import org.gvsig.raster.wms.app.wmsclient.layer.FLyrWMS;
+
+
+/**
+ * Extension to export a view with WMS layers to a OGC's Web Map Context XML
+ * file
+ *
+ * @author jaume dom�nguez faus - jaume.dominguez@iver.es
+ * @author laura d�az s�nchez - laura.diaz@iver.es
+ */
+public class ExportWebMapContextExtension extends Extension {
+	private static ArrayList<String>   supportedVersions;
+	private AbstractViewPanel          viewToExport;
+	private WebMapContextSettingsPanel mc;
+	private static IExtension          thisExtension;
+
+	{
+		supportedVersions = new ArrayList<String>();
+		supportedVersions.add("1.1.0");
+	}
+
+	public void initialize() {
+		thisExtension = PluginServices
+				.getExtension(ExportWebMapContextExtension.class);
+	}
+
+	public void execute(String actionCommand) {
+		if (actionCommand.equals("EXPORT")) {
+			// Here we collect the info
+			DefaultViewDocument[] views = getExportableViews();
+			if (views.length <= 0) {
+				return;
+			}
+			mc = new WebMapContextSettingsPanel(views);
+			PluginServices.getMDIManager().addWindow(mc);
+
+		} else if (actionCommand.equals("DO_EXPORT")) {
+			// Here the target file is produced (called from the WebMapContextSettingsPanel)
+			String xml = mc.getXML();
+			File f = mc.getTargetFile();
+			if (xml != null) {
+				createFile(f, xml);
+			}
+
+		}
+	}
+
+	/**
+	 * Takes a File object and its XML contents and stores it as a regular
+	 * file in the file system.
+	 * @param f
+	 * @param xml
+	 */
+	public static void createFile(File f, String xml) {
+		if (xml != null) {
+			try {
+				if (!f.exists()) {
+					f.createNewFile();
+				}
+				BufferedWriter bw = new BufferedWriter(new FileWriter(f));
+				bw.write(xml);
+				bw.close();
+				bw = null;
+			} catch (IOException e) {
+				NotificationManager.addError(PluginServices.getText(
+						thisExtension, "error_writting_file"), e);
+			}
+		}
+	}
+
+	public boolean isEnabled() {
+		return true;
+	}
+
+	public boolean isVisible() {
+		// Will be visible if the current project has, at least, one FLyrWMS.
+//		Project project = ((ProjectExtension) PluginServices.getExtension(ProjectExtension.class)).getProject();
+		final Project project = ProjectManager.getInstance().getCurrentProject();
+
+		if (project == null) {
+			return false;
+		}
+		IWindow f = PluginServices.getMDIManager().getActiveWindow();
+		if (f instanceof AbstractViewPanel) {
+			AbstractViewPanel v = (AbstractViewPanel) f;
+			if (v != null && v  instanceof AbstractViewPanel) {
+				// Check if the active contains WMS layers. If so, this view
+				// will be the one to be exported.
+				FLayers lyrs = v.getMapControl().getMapContext().getLayers();
+				for (int i = 0; i < lyrs.getLayersCount(); i++) {
+					FLayer lyr = lyrs.getLayer(i);
+					if (WebMapContext.containsExportableLayers(lyr)) {
+						viewToExport = v;
+						return true;
+					}
+				}
+			}
+		}
+
+		// Since the active view does not contain WMS layers then will
+		// see what about the others. In this case, no view is set to be
+		// the exported one.
+		viewToExport = null;
+		List<Document> views = project.getDocuments(ViewManager.TYPENAME);
+		for (int i = 0; i < views.size(); i++) {
+			DefaultViewDocument v = ((DefaultViewDocument) views.get(i));
+			if (v != null) {
+				FLayers lyrs = v.getMapContext().getLayers();
+				for (int j = 0; j < lyrs.getLayersCount(); j++) {
+					FLayer lyr = lyrs.getLayer(j);
+					if (WebMapContext.containsExportableLayers(lyr)) {
+						return true;
+					}
+				}
+			}
+		}
+		return false;
+	}
+
+	/**
+	 * <p>
+	 * Searches the views in the current project that can be exported to a
+	 * WebMapContext file (with ".cml" extension) and return them in a
+	 * ProjectView array.<br>
+	 * </p>
+	 * <p>
+	 * A view is exportable to WebMapContext if it contains at least one FLyrWMS
+	 * and in a near future, any other OGC layer such as WebCoverageService, WFS, and so on. Only
+	 * these layers will be exported. Other kind of layers are ignored since they
+	 * are out of the OGC premises.
+	 * </p>
+	 * @return
+	 */
+	@SuppressWarnings({ "unchecked", "deprecation" })
+	private DefaultViewDocument[] getExportableViews() {
+//		Project project = ((ProjectExtension) PluginServices.getExtension(ProjectExtension.class)).getProject();
+//		ArrayList views = project.getDocumentsByType(ProjectViewFactory.registerName);
+		final Project project = ProjectManager.getInstance().getCurrentProject();
+
+		List<Document> views = project.getDocuments(ViewManager.TYPENAME);
+
+		List exportableViews = new ArrayList();
+		if (viewToExport!=null) {
+			exportableViews.add(viewToExport.getModel());
+		}
+
+		for (int i = 0; i < views.size(); i++) {
+			DefaultViewDocument v = ((DefaultViewDocument) views.get(i));
+			if (v != null) {
+				FLayers lyrs = v.getMapContext().getLayers();
+				for (int j = 0; j < lyrs.getLayersCount(); j++) {
+					FLayer lyr = lyrs.getLayer(j);
+					if (lyr instanceof FLyrWMS && !exportableViews.contains(v)) {
+						exportableViews.add(v);
+						break;
+					}
+				}
+			}
+		}
+		return (DefaultViewDocument[]) exportableViews.toArray(new DefaultViewDocument[0]);
+	}
+
+}

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/wmc/ExportWebMapContextExtension.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/wmc/WebMapContextTags.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/wmc/WebMapContextTags.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/wmc/WebMapContextTags.java	(revision 21019)
@@ -0,0 +1,97 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+ 
+package org.gvsig.raster.wms.app.wmsclient.wmc;
+
+/**
+ * WebMapContextTags is a class with only static public fields containing the
+ * String constants of the WebMapContext XML document.
+ * @author jaume dominguez faus - jaume.dominguez@iver.es
+ *
+ */
+public class WebMapContextTags {
+	private WebMapContextTags() {};
+	
+	public static final String VIEW_CONTEXT = "ViewContext";
+	public static final String VIEW_CONTEXT_0_1_4 = "WMS_Viewer_Context";
+	public static final String VERSION = "version";
+	public static final String ID = "id";
+	public static final String XMLNS = "xmlns";
+	public static final String XMLNS_XLINK = "xmlns:xlink";
+	public static final String XMLNS_XLINK_VALUE = "http://www.w3.org/1999/xlink";
+	public static final String XMLNS_VALUE = "http://www.opengis.net/context"; // "http://www.opengeospatial.net/context"
+	public static final String XMLNS_XSI = "xmlns:xsi"; 
+	public static final String XMLNS_XSI_VALUE = "http://www.w3.org/2001/XMLSchema-instance";
+	public static final String XSI_SCHEMA_LOCATION = "xsi:schemaLocation";
+	public static final String XSI_SCHEMA_LOCATION_VALUE = "http://www.opengeospatial.net/context context.xsd";
+	public static final String GENERAL = "General";
+	public static final String WIDTH = "width";
+	public static final String HEIGHT = "height";
+	public static final String WINDOW = "Window";
+	public static final String SRS = "SRS";
+	public static final String X_MIN = "minx";
+	public static final String Y_MIN = "miny";
+	public static final String X_MAX = "maxx";
+	public static final String Y_MAX = "maxy";
+	public static final String BOUNDING_BOX = "BoundingBox";
+	public static final String TITLE = "Title";
+	public static final String LAYER_LIST = "LayerList";
+	public static final String LAYER = "Layer";
+	public static final String QUERYABLE = "queryable";
+	public static final String HIDDEN = "hidden";
+	public static final String SERVICE = "service";
+	public static final String WMS = "WMS";
+	public static final String SERVER_TITLE = "title";
+	public static final String SERVER = "Server";
+	public static final String XLINK_TYPE = "xlink:type";
+	public static final String XLINK_HREF = "xlink:href";
+	public static final String ONLINE_RESOURCE = "OnlineResource";
+	public static final String NAME = "Name";
+	public static final String ABSTRACT = "Abstract";
+	public static final String FORMAT_LIST = "FormatList";
+	public static final String CURRENT = "current";
+	public static final String FORMAT = "Format";
+	public static final String STYLE_LIST = "StyleList";
+	public static final String STYLE = "Style";
+	public static final String KEYWORD_LIST = "KeywordList";
+	public static final String KEYWORD = "Keyword";
+	public static final String LOGO_URL = "LogoURL";
+	public static final String DESCRIPTION_URL = "DescriptionURL";
+	public static final String CONTACT_INFORMATION = "ContactInformation";
+	public static final String CONTACT_PERSON_PRIMARY = "ContactPersonPrimary";
+	public static final String CONTACT_PERSON = "ContactPerson";
+	public static final String CONTACT_ORGANIZATION = "ContactOrganization";
+	public static final String CONTACT_POSITION = "ContactPosition";
+	public static final String CONTACT_ADDRESS = "ContactAddress";
+	public static final String ADDRESS_TYPE = "AddressType";
+	public static final String ADDRESS = "Address";
+	public static final String CITY = "City";
+	public static final String STATE_OR_PROVINCE = "StateOrProvince";
+	public static final String POSTCODE = "PostCode";
+	public static final String COUNTRY = "Country";
+	public static final String CONTACT_VOICE_TELEPHONE = "ContactVoiceTelephone";
+	public static final String CONTACT_FACSIMILE_TELEPHONE = "ContactFacsimileTelephone";
+	public static final String CONTACT_ELECTRONIC_MAIL_ADDRESS = "ContactElectronicMailAddress";
+	public static final String DIMENSION_LIST = "DimensionList";
+	public static final String LEGEND_URL = "LegendURL";
+	
+}

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/wmc/WebMapContextTags.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/wmc/WebMapContext.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/wmc/WebMapContext.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/wmc/WebMapContext.java	(revision 21019)
@@ -0,0 +1,1010 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+* MA  02110-1301, USA.
+*
+*/
+
+package org.gvsig.raster.wms.app.wmsclient.wmc;
+
+import java.awt.Dimension;
+import java.awt.geom.Rectangle2D;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Vector;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+
+import org.gvsig.app.ApplicationLocator;
+import org.gvsig.app.project.documents.view.DefaultViewDocument;
+import org.gvsig.fmap.crs.CRSFactory;
+import org.gvsig.fmap.dal.coverage.exception.ImportMapContextException;
+import org.gvsig.fmap.mapcontext.exceptions.UnsupportedVersionLayerException;
+import org.gvsig.fmap.mapcontext.layers.FLayer;
+import org.gvsig.fmap.mapcontext.layers.FLayers;
+import org.gvsig.i18n.Messages;
+import org.gvsig.raster.wms.app.wmsclient.layer.FLyrWMS;
+import org.gvsig.raster.wms.io.RemoteWMSStyle;
+import org.gvsig.raster.wms.io.WMSDataParameters;
+import org.gvsig.raster.wms.io.WMSDataParametersImpl;
+
+import org.kxml2.io.KXmlParser;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.xmlpull.v1.XmlPullParserException;
+
+
+/**
+ * Class that loads and produces WebMapContext files and holds its attributes.
+ *
+ * You can create a blank WebMapContext instance using the default constructor
+ * or an already initialized instance by specifying a source file. In the last
+ * case the file will be readed and the values loaded an holded by the instance.
+ *
+ * You can get the equivalent WebMapContext XML document by calling the method
+ * getXML() supplying the ProjectView that you want to export and depending on
+ * the value of the fileVersion field (currently you can use "1.1.0" (default),
+ * "1.0.0" or "0.4.1" to specify the destination document version.
+ *
+ * @author jaume dominguez faus - jaume.dominguez@iver.es
+ */
+public class WebMapContext {
+	public final static String FILE_EXTENSION = ".cml";
+	private Logger  log = LoggerFactory.getLogger(WebMapContext.class);
+	static final ArrayList<String> supportedVersions = new ArrayList<String>();
+	static public final ArrayList<String> exportVersions    = new ArrayList<String>();
+	static private HashSet supportedLayers = new HashSet();
+	private File mapContextFile;
+	private String encoding = "UTF-8";
+	private String WMC_START_TAG;
+
+	// MapContext stuff
+	public String fileVersion = null;
+	public Dimension windowSize = null;
+	public String srs = null;
+	public Rectangle2D bBox = null;
+	public String title = null;
+	public String id = null;
+	public String xmlns = null;
+	public String xmlns_xlink = null;
+	public String xmlns_xsi = null;;
+	public String xsi_schemaLocation = null;
+	public String _abstract = null;
+	public List<String> keywordList = null;
+	public Dimension logoURLSize = null;
+	public String logoURLFormat = null;
+	public String logoURL = null;
+	public String descriptionURLFormat = null;
+	public String descriptionURL = null;
+	public boolean contactInfo = false;
+	public String contactPerson = null;
+	public String contactOrganization = null;
+	public String contactPosition = null;
+	public String address = null;
+	public String city = null;
+	public String stateOrProvince = null;
+	public String postCode = null;
+	public String country = null;
+	public String telephone = null;
+	public String fax = null;
+	public String email = null;
+
+	private StringBuffer errorMessages;
+
+	List<FLyrWMS>            layerList  = null;
+	List<WMSDataParameters>  paramsList = null;
+
+	Hashtable<Object, String[]>  srsList = null;
+
+	/**
+	 * key: server URL (URL)
+	 * value: server title (String)
+	 */
+	Hashtable<String, String> serverTitles = null;
+
+	/**
+	 * key: layer FLyrWMS
+	 * value: layer abstract (String)
+	 */
+	Hashtable layerAbstracts = null;
+
+	/**
+	 * key: layer FLyrWMS
+	 * value: layer formats (String[])
+	 */
+	Hashtable layerFormats = null;
+
+	/**
+	 * key: layer FLyrWMS
+	 * value: styles (FMapWMSStyle[])
+	 */
+	Hashtable layerStyles = null;
+
+
+	static {
+		supportedVersions.add("1.1.0");
+		supportedVersions.add("1.0.0");
+		supportedVersions.add("0.1.4");
+	}
+
+	static {
+		exportVersions.add("1.1.0");
+		exportVersions.add("1.0.0");
+		exportVersions.add("0.1.4");
+	}
+
+	static {
+		supportedLayers.add(FLyrWMS.class);
+	}
+
+
+	/**
+	 * Initializes the WebMapContext properties from the values in the WebMapContext (.cml)
+	 * file passed in the argument.
+	 * @param file
+	 * @throws UnsupportedVersionLayerException
+	 * @throws ImportMapContextException
+	 */
+	public void readFile(File file) throws UnsupportedVersionLayerException, ImportMapContextException {
+		this.mapContextFile = file;
+		errorMessages = new StringBuffer();
+		if (getVersion() != null) {
+			if (supportedVersions.contains(getVersion())) {
+				WMC_START_TAG = WebMapContextTags.VIEW_CONTEXT;
+				if (getVersion().equals("0.1.4")) {
+					WMC_START_TAG = WebMapContextTags.VIEW_CONTEXT_0_1_4;
+					parse1_1_0(file);
+				} else if (getVersion().equals("1.1.0")) {
+					parse1_1_0(file);
+				} else if (getVersion().equals("1.0.0")) {
+					parse1_1_0(file);
+				} else {
+					parseDefaultVersion(file);
+				}
+
+				// Once parsed, check errors
+				if (errorMessages.length() > 0) {
+					throw new ImportMapContextException(errorMessages.toString(), false);
+				}
+			} else {
+				throw new UnsupportedVersionLayerException(file.getName(), null);
+			}
+		}
+	}
+
+
+	/**
+	 * If no version was recognized then will parse the default one which is supposed
+	 * to be the best available.
+	 * @param file
+	 * @throws ImportMapContextException
+	 */
+	private void parseDefaultVersion(File file) throws ImportMapContextException {
+		parse1_1_0(file);
+	}
+
+	/**
+	 * Reads the header of the Weg Map Context file and determines which version
+	 * it belongs to.
+	 * @return String.
+	 */
+	private String getVersion() {
+		if (fileVersion == null) {
+			String v = null;
+			try {
+				FileReader fr = new FileReader(mapContextFile);
+				KXmlParser parser = new KXmlParser();
+				parser.setInput(fr);
+				parser.nextTag();
+	    		if ( parser.getEventType() != KXmlParser.END_DOCUMENT )	{
+	    			if ((parser.getName().compareTo(WebMapContextTags.VIEW_CONTEXT) == 0) ||
+	    				 parser.getName().compareTo(WebMapContextTags.VIEW_CONTEXT_0_1_4) == 0) {
+	    				v = parser.getAttributeValue("", WebMapContextTags.VERSION);
+	    			}
+	    		}
+			} catch (FileNotFoundException fnfEx) {
+			} catch (XmlPullParserException xmlEx) {
+				xmlEx.printStackTrace();
+			} catch (IOException e) {
+			}
+			fileVersion = v;
+		}
+		return fileVersion;
+	}
+
+	private void readEnconding(File file) {
+		FileReader fr = null;
+		try {
+			fr = new FileReader(file);
+    		BufferedReader br = new BufferedReader(fr);
+    		char[] buffer = new char[100];
+    		br.read(buffer);
+    		StringBuffer st = new StringBuffer(new String(buffer));
+    		String searchText = "encoding=\"";
+    		int index = st.indexOf(searchText);
+    		if (index>-1) {
+    			st.delete(0, index+searchText.length());
+    			encoding = st.substring(0, st.indexOf("\""));
+    		}
+    		br.close();
+    		fr.close();
+    	} catch(FileNotFoundException ex)	{
+    		log.info("Error reading the encoding", ex);
+    	} catch (IOException e) {
+    		log.info("Error reading the encoding", e);
+		}
+	}
+
+	/**
+	 * Reads a Web Map Context version 1.1.0. As far as v1.0.0 is a subset of
+	 * v1.1.0 it can be used to read files belonging to 1.0.0 as well.
+	 * @param file, the web map context file.
+	 */
+	private void parse1_1_0(File file) throws ImportMapContextException {
+		try {
+			readEnconding(file);
+
+			KXmlParser parser = new KXmlParser();
+			parser.setInput(new FileInputStream(file), encoding);
+			int tag = parser.nextTag();
+			if ( parser.getEventType() != KXmlParser.END_DOCUMENT ) {
+				parser.require(KXmlParser.START_TAG, null, WMC_START_TAG);
+				while(tag != KXmlParser.END_DOCUMENT) {
+					switch(tag) {
+						case KXmlParser.START_TAG:
+							if (parser.getName().compareTo(WMC_START_TAG) == 0) {
+								id = parser.getAttributeValue("", WebMapContextTags.ID);
+								xmlns = parser.getAttributeValue("", WebMapContextTags.XMLNS);
+								xmlns_xlink = parser.getAttributeValue("", WebMapContextTags.XMLNS_XLINK);
+								xmlns_xsi = parser.getAttributeValue("", WebMapContextTags.XMLNS_XSI);
+								xsi_schemaLocation = parser.getAttributeValue("", WebMapContextTags.XSI_SCHEMA_LOCATION) ;
+							} else if (parser.getName().compareTo(WebMapContextTags.GENERAL) == 0) {
+								parseGeneral1_1_0(parser);
+							} else if (parser.getName().compareTo(WebMapContextTags.LAYER_LIST) == 0) {
+								int layerListTag = parser.nextTag();
+								boolean bLayerListEnd = false;
+								layerList = new ArrayList<FLyrWMS>();
+								paramsList = new ArrayList<WMSDataParameters>();
+								while (!bLayerListEnd) {
+									switch(layerListTag) {
+									case KXmlParser.START_TAG:
+										if (parser.getName().compareTo(WebMapContextTags.LAYER) == 0) {
+											FLyrWMS layer = new FLyrWMS();
+											WMSDataParameters dataParameters = new WMSDataParametersImpl();
+											dataParameters.setSRS(srs);
+											parseLayer1_1_0(parser, layer, dataParameters);
+											// will use the mapcontext's bounding box as layer's fullextent
+											IProjection proj =  CRSFactory.getCRS(srs);
+											if (proj == null) {
+												// non supported srs, and cannot continue
+												String msg = Messages.getText("unsupported_crs") + " (" + srs + ")";
+												throw new ImportMapContextException(msg, true);
+											}
+											/*String[] availableSRS = dataParameters.getSRSCode().split(",");
+											ICoordTrans ct = null;
+											String mySRS = null;
+											for (int i = 0; i < availableSRS.length; i++) {
+												mySRS = availableSRS[i];
+												IProjection dstProj = CRSFactory.getCRS(mySRS);
+												if (dstProj != null) {
+													try{
+															ct = proj.getCT(dstProj);
+														} catch(Exception e) {
+															ct = null;
+														} catch (Error e) {
+															ct = null;
+														}
+													if (mySRS.equals(srs)) {
+														break;
+													}
+												}
+											}
+
+											if (ct != null) {
+												dataParameters.setSRS(mySRS);
+											} else {
+												// can't reproject
+												errorMessages.append("[").
+														      append(Messages.getText("layer")).
+														      append(" ").
+														      append(layer.getName()).
+														      append("] ").
+															  append(Messages.getText("cant_reproject_from_any_of")).
+															  append(" [").append(dataParameters.getSRSCode()).append("] ").
+															  append(Messages.getText("to")).
+															  append(srs).
+															  append("\n");
+												dataParameters.setSRS(srs);
+											}*/
+
+											dataParameters.setWmsTransparency(true);
+											layerList.add(layer);
+											paramsList.add(dataParameters);
+										} else {
+											log.info("Unrecognized "+ parser.getName());
+										}
+										break;
+									case KXmlParser.END_TAG:
+										if (parser.getName().compareTo(WebMapContextTags.LAYER_LIST) == 0) {
+											bLayerListEnd = true;
+										}
+										break;
+									case KXmlParser.TEXT:
+										break;
+									}
+									layerListTag = parser.next();
+								}
+							} else if (parser.getName().compareTo(WebMapContextTags.DIMENSION_LIST) == 0) {
+								log.info("WebMapContext's Dimension not yet implemented");
+							} else {
+								log.info("Unrecognized " + parser.getName());
+							}
+							break;
+						case KXmlParser.END_TAG:
+							break;
+						case KXmlParser.TEXT:
+							break;
+					}
+					tag = parser.next();
+				}
+				parser.require(KXmlParser.END_DOCUMENT, null, null);
+			}
+		} catch (ImportMapContextException e){
+			throw e;
+		} catch (Exception e) {
+			log.debug(Messages.getText("map_context_file_error"), e);
+		}
+	}
+
+	/**
+	 * Parses the General tag of a web map context 1.1.0 (and 1.0.0) file
+	 * @param parser
+	 * @throws XmlPullParserException
+	 * @throws IOException
+	 */
+	private void parseGeneral1_1_0(KXmlParser parser) throws XmlPullParserException, IOException {
+		boolean end = false;
+    	int tag = parser.next();
+    	while (!end) {
+    		switch(tag) {
+        		case KXmlParser.START_TAG:
+        			if (parser.getName().compareTo(WebMapContextTags.WINDOW) == 0) {
+        				if (windowSize == null) {
+							windowSize = new Dimension();
+						}
+						windowSize.setSize(Integer.parseInt(parser.getAttributeValue("", WebMapContextTags.WIDTH)),
+										   Integer.parseInt(parser.getAttributeValue("", WebMapContextTags.HEIGHT)));
+        			} else if (parser.getName().compareTo(WebMapContextTags.BOUNDING_BOX) == 0) {
+        				srs = parser.getAttributeValue("", WebMapContextTags.SRS);
+        				double minx = Double.parseDouble(parser.getAttributeValue("", WebMapContextTags.X_MIN));
+        				double miny = Double.parseDouble(parser.getAttributeValue("", WebMapContextTags.Y_MIN));
+        				double maxx = Double.parseDouble(parser.getAttributeValue("", WebMapContextTags.X_MAX));
+        				double maxy = Double.parseDouble(parser.getAttributeValue("", WebMapContextTags.Y_MAX));
+        				bBox = new Rectangle2D.Double(minx, miny, maxx-minx, maxy-miny);
+            		} else if (parser.getName().compareTo(WebMapContextTags.TITLE) == 0) {
+        				title = parser.nextText();
+        			} else if (parser.getName().compareTo(WebMapContextTags.ABSTRACT) == 0) {
+        				_abstract = parser.nextText();
+        			} else if (parser.getName().compareTo(WebMapContextTags.KEYWORD_LIST) == 0) {
+        				keywordList = new ArrayList<String>();
+        				boolean keywordEnd = false;
+        		    	int keywordTag = parser.next();
+        		    	while (!keywordEnd) {
+        		    		switch(keywordTag) {
+        		        		case KXmlParser.START_TAG:
+        		        			if (parser.getName().compareTo(WebMapContextTags.KEYWORD) == 0) {
+        		        				keywordList.add(parser.nextText());
+        		        			} else {
+        		                    	System.out.println("Unrecognized "+parser.getName());
+        							}
+        							break;
+        		         		case KXmlParser.END_TAG:
+        		        			if (parser.getName().compareTo(WebMapContextTags.KEYWORD_LIST) == 0) {
+										keywordEnd = true;
+									}
+        		        			break;
+        		        		case KXmlParser.TEXT:
+        		        			if (parser.getName()!=null) {
+										System.out.println("[TAG]["+parser.getName()+"]\n[TEXT]["+parser.getText().trim()+"]");
+									}
+        		        			break;
+        		    		}
+        		    		keywordTag = parser.next();
+        		    	}
+        			} else if (parser.getName().compareTo(WebMapContextTags.LOGO_URL) == 0) {
+        				logoURLSize = new Dimension(Integer.parseInt(parser.getAttributeValue("", WebMapContextTags.WIDTH)),
+        											Integer.parseInt(parser.getAttributeValue("", WebMapContextTags.HEIGHT)));
+        				logoURLFormat = parser.getAttributeValue("", WebMapContextTags.FORMAT.toLowerCase());
+        				parser.nextTag();
+        				if (parser.getName().compareTo(WebMapContextTags.ONLINE_RESOURCE) == 0) {
+        					logoURL = parser.getAttributeValue("", WebMapContextTags.XLINK_HREF);
+        				} else {
+                        	System.out.println("Unrecognized "+parser.getName());
+    					}
+        			} else if (parser.getName().compareTo(WebMapContextTags.DESCRIPTION_URL) == 0) {
+        				descriptionURLFormat = parser.getAttributeValue("", WebMapContextTags.FORMAT.toLowerCase());
+        				parser.nextTag();
+        				if (parser.getName().compareTo(WebMapContextTags.ONLINE_RESOURCE) == 0) {
+        					descriptionURL = parser.getAttributeValue("", WebMapContextTags.XLINK_HREF);
+        				} else {
+                        	System.out.println("Unrecognized "+parser.getName());
+    					}
+        			} else if (parser.getName().compareTo(WebMapContextTags.CONTACT_INFORMATION) == 0) {
+        				boolean contactInfoEnd = false;
+        		    	int contactInfoTag = parser.next();
+        		    	while (!contactInfoEnd) {
+        		    		switch(contactInfoTag) {
+        		        		case KXmlParser.START_TAG:
+        		        			if (parser.getName().compareTo(WebMapContextTags.CONTACT_PERSON) == 0) {
+        		        				contactPerson = parser.nextText();
+        		        			} else if (parser.getName().compareTo(WebMapContextTags.CONTACT_ORGANIZATION) == 0) {
+        		        				contactOrganization = parser.nextText();
+        		        			} else if (parser.getName().compareTo(WebMapContextTags.CONTACT_POSITION) == 0) {
+        		        				contactPosition = parser.nextText();
+        		        			} else if (parser.getName().compareTo(WebMapContextTags.ADDRESS) == 0) {
+        		        				address = parser.nextText();
+        		        			} else if (parser.getName().compareTo(WebMapContextTags.CITY) == 0) {
+        		        				city = parser.nextText();
+        		        			} else if (parser.getName().compareTo(WebMapContextTags.STATE_OR_PROVINCE) == 0) {
+        		        				stateOrProvince = parser.nextText();
+        		        			} else if (parser.getName().compareTo(WebMapContextTags.POSTCODE) == 0) {
+        		        				postCode = parser.nextText();
+        		        			} else if (parser.getName().compareTo(WebMapContextTags.COUNTRY) == 0) {
+        		        				country = parser.nextText();
+        		        			} else if (parser.getName().compareTo(WebMapContextTags.CONTACT_VOICE_TELEPHONE) == 0) {
+        		        				telephone = parser.nextText();
+        		        			} else if (parser.getName().compareTo(WebMapContextTags.CONTACT_FACSIMILE_TELEPHONE) == 0) {
+        		        				fax = parser.nextText();
+        		        			} else if (parser.getName().compareTo(WebMapContextTags.CONTACT_ELECTRONIC_MAIL_ADDRESS) == 0) {
+        		        				email = parser.nextText();
+        		        			} else if (parser.getName().compareTo(WebMapContextTags.CONTACT_PERSON_PRIMARY) == 0) {
+        		        				// DO NOTHING
+        		        			} else if (parser.getName().compareTo(WebMapContextTags.CONTACT_ADDRESS) == 0) {
+        		        				// DO NOTHING
+        		        			} else {
+        		                    	System.out.println("Unrecognized "+parser.getName());
+        							}
+        		        			break;
+        		         		case KXmlParser.END_TAG:
+        		        			if (parser.getName().compareTo(WebMapContextTags.CONTACT_INFORMATION) == 0) {
+										contactInfoEnd = true;
+									}
+        		        			break;
+        		        		case KXmlParser.TEXT:
+        		        			if (parser.getName()!=null) {
+										System.out.println("[TAG]["+parser.getName()+"]\n[TEXT]["+parser.getText().trim()+"]");
+									}
+        		        			break;
+        		    		}
+        		    		contactInfoTag = parser.next();
+        		    	}
+        		    } else {
+                    	System.out.println("Unrecognized "+parser.getName());
+					}
+					break;
+         		case KXmlParser.END_TAG:
+        			if (parser.getName().compareTo(WebMapContextTags.GENERAL) == 0) {
+						end = true;
+					}
+        			break;
+        		case KXmlParser.TEXT:
+        			if (parser.getName()!=null) {
+						System.out.println("[TAG]["+parser.getName()+"]\n[TEXT]["+parser.getText().trim()+"]");
+					}
+        			break;
+    		}
+    		tag = parser.next();
+    	}
+	}
+
+	@SuppressWarnings("unchecked")
+	private void parseLayer1_1_0(KXmlParser parser, FLyrWMS layer, WMSDataParameters dataParameters) throws XmlPullParserException, IOException {
+		boolean end = false;
+
+		String queryable = parser.getAttributeValue("", WebMapContextTags.QUERYABLE);
+		dataParameters.setQueryable(queryable!=null && (queryable.equals("1") || queryable.toLowerCase().equals("true")));
+		List<RemoteWMSStyle> styles = new ArrayList<RemoteWMSStyle>();
+
+		String hidden = parser.getAttributeValue("", WebMapContextTags.HIDDEN);
+		layer.setVisible(hidden == null || !hidden.equals("1") || !hidden.toLowerCase().equals("true"));
+    	int tag = parser.next();
+    	while (!end) {
+    		switch(tag) {
+        		case KXmlParser.START_TAG:
+        			if (parser.getName().compareTo(WebMapContextTags.SERVER) == 0) {
+        				String serverTitle = parser.getAttributeValue("", WebMapContextTags.TITLE.toLowerCase());
+        				parser.nextTag();
+        				if (parser.getName().compareTo(WebMapContextTags.ONLINE_RESOURCE) == 0) {
+        				    URI uri;
+                            String uriStr = parser.getAttributeValue("", WebMapContextTags.XLINK_HREF);
+                            try {
+                                uri = new URI(uriStr);
+                            } catch (URISyntaxException e) {
+                                throw new IOException("Can't create URI from "+uriStr, e);
+                            }
+
+        					dataParameters.setURI(uri);
+        					if (serverTitles == null) {
+								serverTitles = new Hashtable<String, String>();
+							}
+            				serverTitles.put(uriStr, serverTitle);
+        				}
+        			} else if (parser.getName().compareTo(WebMapContextTags.TITLE) == 0) {
+        				layer.setName(parser.nextText());
+        			} else if (parser.getName().compareTo(WebMapContextTags.NAME) == 0) {
+        				dataParameters.setLayerQuery(parser.nextText());
+        			/* //TODO This case would handle nested layer definitions.
+        			 *
+        			 } else if (parser.getName().compareTo(WebMapContextTags.LAYER) == 0) {
+        				FLyrWMS sonLayer = parseLayer1_1_0(parser);
+        				String q = layer.getLayerQuery();
+        				if (q == null) q = "";
+        				else q += ",";
+        				layer.setLayerQuery( q + sonLayer.getLayerQuery());
+        			 *
+        			 */
+        			} else if (parser.getName().compareTo(WebMapContextTags.ABSTRACT) == 0) {
+        				if (layerAbstracts == null) {
+							layerAbstracts = new Hashtable();
+						}
+        				layerAbstracts.put(layer, parser.nextText());
+        			} else if (parser.getName().compareTo(WebMapContextTags.SRS) == 0) {
+        				String[] srss = parseEPSGList(parser.nextText());
+        				if (srsList == null) {
+        					srsList = new Hashtable<Object, String[]>();
+						}
+        				srsList.put(layer, srss);
+        			} else if (parser.getName().compareTo(WebMapContextTags.FORMAT_LIST) == 0) {
+        				int formatsTag = parser.nextTag();
+        				boolean bFormatsEnd = false;
+        				ArrayList formats = new ArrayList();
+        				while (!bFormatsEnd) {
+        					switch (formatsTag) {
+        					case KXmlParser.START_TAG:
+        						if (parser.getName().compareTo(WebMapContextTags.FORMAT) == 0) {
+        							String current = parser.getAttributeValue("", WebMapContextTags.CURRENT);
+        							String format = parser.nextText();
+        							if (current!=null && current.equals("1")) {
+        								dataParameters.setFormat(format);
+									}
+        							formats.add(format);
+        						} else {
+        							log.info("Unrecognized " + parser.getName());
+        						}
+        						break;
+        					case KXmlParser.END_TAG:
+        						if (parser.getName().compareTo(WebMapContextTags.FORMAT_LIST) == 0) {
+									bFormatsEnd = true;
+								}
+        						break;
+        					case KXmlParser.TEXT:
+        						if (parser.getName()!=null) {
+        							log.info("[TAG]["+parser.getName()+"]\n[TEXT]["+parser.getText().trim()+"]");
+								}
+        						break;
+        					}
+        					formatsTag = parser.next();
+        				}
+        				if (layerFormats == null) {
+							layerFormats = new Hashtable();
+						}
+        				layerFormats.put(layer, formats.toArray(new String[0]));
+
+        			} else if (parser.getName().compareTo(WebMapContextTags.STYLE_LIST) == 0) {
+        				int stylesTag = parser.nextTag();
+        				boolean bStylesEnd = false;
+        				while (!bStylesEnd) {
+        					switch (stylesTag) {
+        					case KXmlParser.START_TAG:
+        						if (parser.getName().compareTo(WebMapContextTags.STYLE) == 0) {
+        							String current = parser.getAttributeValue("", WebMapContextTags.CURRENT);
+        							RemoteWMSStyle style = parseStyle1_1_0(parser);
+
+        							if (current!=null && current.equals("1") && !style.getName().equals("default")) {
+        								style.setName("default");
+        							}
+        							styles.add(style);
+        						} else {
+        							System.out.println("Unrecognized "+parser.getName());
+        						}
+        						break;
+        					case KXmlParser.END_TAG:
+        						if (parser.getName().compareTo(WebMapContextTags.STYLE_LIST) == 0) {
+									bStylesEnd = true;
+								}
+        						break;
+        					case KXmlParser.TEXT:
+        						if (parser.getName()!=null) {
+									System.out.println("[TAG]["+parser.getName()+"]\n[TEXT]["+parser.getText().trim()+"]");
+								}
+        						break;
+        					}
+        					stylesTag = parser.next();
+        				}
+        				if (layerStyles == null) {
+							layerStyles = new Hashtable();
+						}
+
+        				layerStyles.put(layer, styles.toArray(new RemoteWMSStyle[0]));
+        			} else {
+        				log.info("Unrecognized " + parser.getName());
+        			}
+        			break;
+        		case KXmlParser.END_TAG:
+        			if (parser.getName().compareTo(WebMapContextTags.LAYER) == 0) {
+						end = true;
+					}
+        			break;
+        		case KXmlParser.TEXT:
+        			if (parser.getName()!=null) {
+						System.out.println("[TAG]["+parser.getName()+"]\n[TEXT]["+parser.getText().trim()+"]");
+					}
+        			break;
+    		}
+    		tag = parser.next();
+    	}
+    	dataParameters.setStyles(styles);
+	}
+
+	private String[] parseEPSGList(String nextText) {
+		String[] epsglist = nextText.split(",");
+		return epsglist;//Arrays.asList(epsglist);
+	}
+
+
+	private RemoteWMSStyle parseStyle1_1_0(KXmlParser parser) throws XmlPullParserException, IOException {
+		boolean end = false;
+		String styleName = null;
+		String styleAbstract = null;
+		String styleTitle = null;
+		int legendWidth = -1;
+		int legendHeight = -1;
+		String legendType = null;
+		String legendHref = null;
+
+    	int tag = parser.next();
+    	while (!end) {
+    		switch(tag) {
+        		case KXmlParser.START_TAG:
+        			if (parser.getName().compareTo(WebMapContextTags.NAME) == 0) {
+        				styleName = parser.nextText();
+        			} else if (parser.getName().compareTo(WebMapContextTags.ABSTRACT) == 0) {
+        				styleAbstract = parser.nextText();
+        			} else if (parser.getName().compareTo(WebMapContextTags.TITLE) == 0) {
+        				styleTitle = parser.nextText();
+        			} else if (parser.getName().compareTo(WebMapContextTags.LEGEND_URL) == 0){
+        				legendWidth = Integer.parseInt(parser.getAttributeValue("", WebMapContextTags.WIDTH));
+        				legendHeight = Integer.parseInt(parser.getAttributeValue("", WebMapContextTags.HEIGHT));
+        				parser.nextTag();
+        				if (parser.getName().compareTo(WebMapContextTags.ONLINE_RESOURCE) == 0 ) {
+							legendType = parser.getAttributeValue("", WebMapContextTags.XLINK_TYPE);
+							legendHref = parser.getAttributeValue("", WebMapContextTags.XLINK_HREF);
+        				}
+        			} else {
+                    	System.out.println("Unrecognized "+parser.getName());
+					}
+        			break;
+         		case KXmlParser.END_TAG:
+        			if (parser.getName().compareTo(WebMapContextTags.STYLE) == 0) {
+						end = true;
+					}
+        			break;
+        		case KXmlParser.TEXT:
+        			if (parser.getName()!=null) {
+						System.out.println("[TAG]["+parser.getName()+"]\n[TEXT]["+parser.getText().trim()+"]");
+					}
+        			break;
+    		}
+    		tag = parser.next();
+    	}
+
+    	RemoteWMSStyle sty = new RemoteWMSStyle();
+    	sty.setName(styleName);
+    	sty.setTitle(styleTitle);
+    	sty.setStyleAbstract(styleAbstract);
+    	sty.setLegendWidth(legendWidth);
+    	sty.setLegendHeight(legendHeight);
+    	sty.setType(legendType);
+    	sty.setHref(legendHref);
+    	sty.setParent(null);
+    	return sty;
+	}
+
+	/**
+	 * Creates the Web Map Context (WMC) XML according on the version 1.1.0. Since Web
+	 * WMC 1.0.0 is a subset of WMC 1.1.0 and this method does not produce tags for
+	 * unset values, it can be used to produce WMC 1.0.0, or even to produce
+	 * the deprecated (but still alive) WMC 0.1.4.
+	 * @param v
+	 * @return
+	 */
+	private String createMapContext1_1_0(DefaultViewDocument v) {
+		ArrayList layersToExport = getExportableLayers(v);
+
+		XmlBuilder xml = new XmlBuilder();
+		HashMap<Object, String> xmlAttrs = new HashMap<Object, String>();
+		xml.setEncoding("ISO-8859-1"); // TODO make it customizable???
+		xml.writeHeader();
+
+		// <ViewContext>
+		String viewContextTag;
+		if (fileVersion.equals("0.1.4")) {
+			viewContextTag = WebMapContextTags.VIEW_CONTEXT_0_1_4;
+		} else {
+			viewContextTag = WebMapContextTags.VIEW_CONTEXT;
+		}
+
+		xml.writeRaw("<!-- " + Messages.getText("created_with") + " gvSIG " + ApplicationLocator.getManager().getVersion() + " -->");
+
+		xmlAttrs.put(WebMapContextTags.VERSION, fileVersion);
+		xmlAttrs.put(WebMapContextTags.ID, id);
+		xmlAttrs.put(WebMapContextTags.XMLNS, WebMapContextTags.XMLNS_VALUE);
+		xmlAttrs.put(WebMapContextTags.XMLNS_XLINK, WebMapContextTags.XMLNS_XLINK_VALUE);
+		xmlAttrs.put(WebMapContextTags.XMLNS_XSI, WebMapContextTags.XMLNS_XSI_VALUE);
+		xmlAttrs.put(WebMapContextTags.XSI_SCHEMA_LOCATION, WebMapContextTags.XSI_SCHEMA_LOCATION_VALUE);
+		xml.openTag(viewContextTag,  xmlAttrs);
+		xmlAttrs.clear();
+
+		// <General>
+		xml.openTag(WebMapContextTags.GENERAL);
+
+		// <Window>
+		if (windowSize!=null) {
+			xmlAttrs.put(WebMapContextTags.WIDTH, ((int) windowSize.getWidth())+"");
+			xmlAttrs.put(WebMapContextTags.HEIGHT, ((int) windowSize.getHeight())+"");
+			xml.writeTag(WebMapContextTags.WINDOW, xmlAttrs);
+			xmlAttrs.clear();
+		}
+		// </Window>
+
+		// <BoundingBox>
+		xmlAttrs.put(WebMapContextTags.SRS, v.getProjection().getAbrev());
+		xmlAttrs.put(WebMapContextTags.X_MIN, bBox.getMinX()+"");
+		xmlAttrs.put(WebMapContextTags.Y_MIN, bBox.getMinY()+"");
+		xmlAttrs.put(WebMapContextTags.X_MAX, bBox.getMaxX()+"");
+		xmlAttrs.put(WebMapContextTags.Y_MAX, bBox.getMaxY()+"");
+		xml.writeTag(WebMapContextTags.BOUNDING_BOX, xmlAttrs);
+		xmlAttrs.clear();
+		// </BoundingBox>
+
+		// <Title>
+		xml.writeTag(WebMapContextTags.TITLE, title.trim());
+		// </Title>
+
+		// <Abstract>
+		if (_abstract != null) {
+			xml.writeTag(WebMapContextTags.ABSTRACT, _abstract.trim());
+			// </Abstract>
+		}
+
+		// <LogoURL>
+		if (logoURL != null) {
+			xml.writeTag(WebMapContextTags.LOGO_URL, logoURL.trim());
+			// </LogoURL>
+		}
+
+		// <DescriptionURL>
+		if (descriptionURL != null) {
+			xml.writeTag(WebMapContextTags.DESCRIPTION_URL, descriptionURL.trim());
+			// </DescriptionURL>
+		}
+
+		if (contactInfo) {
+
+			// <ContactInformation>
+			xml.openTag(WebMapContextTags.CONTACT_INFORMATION);
+			if (contactPerson != null || contactOrganization != null) {
+
+				// <ContactPersonPrimary>
+				xml.openTag(WebMapContextTags.CONTACT_PERSON_PRIMARY);
+
+				// <ContactPerson>
+				if (contactPerson != null) {
+					xml.writeTag(WebMapContextTags.CONTACT_PERSON, contactPerson.trim());
+					// </ContactPerson>
+				}
+
+				// <ContactOrganization>
+				if (contactOrganization != null) {
+					xml.writeTag(WebMapContextTags.CONTACT_ORGANIZATION, contactOrganization.trim());
+					// </ContactOrganization>
+				}
+
+				xml.closeTag();
+				// </ContactPersonPrimary>
+			}
+			xml.closeTag();
+			// </ContactInformation>
+
+			// <ContactPosition>
+			if (contactPosition != null) {
+				xml.writeTag(WebMapContextTags.CONTACT_POSITION, contactPosition.trim());
+				// </ContactPosition>
+			}
+
+			// <ContactAddress>
+			if (address != null || city != null || stateOrProvince != null || postCode != null || country != null) {
+				xml.openTag(WebMapContextTags.CONTACT_ADDRESS);
+
+				// <AddressType>
+				xml.writeTag(WebMapContextTags.ADDRESS_TYPE, "Postal");
+				// </AddressType>
+
+				// <Address>
+				if (address != null) {
+					xml.writeTag(WebMapContextTags.ADDRESS, address.trim());
+					// </Address>
+				}
+
+				// <City>
+				if (city != null) {
+					xml.writeTag(WebMapContextTags.CITY, city.trim());
+					// </City>
+				}
+
+				// <StateOrProvince>
+				if (stateOrProvince != null) {
+					xml.writeTag(WebMapContextTags.STATE_OR_PROVINCE, stateOrProvince.trim());
+					// </StateOrProvince>
+				}
+
+				// <PostCode>
+				if (postCode != null) {
+					xml.writeTag(WebMapContextTags.POSTCODE, postCode.trim());
+					// </PostCode>
+				}
+
+				// <Country>
+				if (country != null) {
+					xml.writeTag(WebMapContextTags.COUNTRY, country.trim());
+				}
+				// </Country>
+				xml.closeTag();
+			}
+			// </ContactAddress>
+
+			// <ContactVoiceTelephone>
+			if (telephone != null) {
+				xml.writeTag(WebMapContextTags.CONTACT_VOICE_TELEPHONE, telephone.trim());
+				// </ContactVoiceTelephone>
+			}
+
+			// <ContactFacsimileTelephone>
+			if (fax != null) {
+				xml.writeTag(WebMapContextTags.CONTACT_FACSIMILE_TELEPHONE, fax.trim());
+				// </ContactFacsimileTelephone>
+			}
+
+			// <ContactElectronicMailAddress>
+			if (email != null) {
+				xml.writeTag(WebMapContextTags.CONTACT_ELECTRONIC_MAIL_ADDRESS, email.trim());
+				// </ContactElectronicMailAddress>
+			}
+		}
+		// <KeywordList>
+		xml.openTag(WebMapContextTags.KEYWORD_LIST);
+		if (keywordList != null) {
+			for (int i = 0; i < keywordList.size(); i++) {
+				xml.writeTag(WebMapContextTags.KEYWORD, ((String) keywordList.get(i)).trim());
+			}
+		} else {
+			xml.writeTag(WebMapContextTags.KEYWORD, "");
+		}
+		xml.closeTag();
+
+		// </KeywordList>
+		xml.closeTag();
+		// </General>
+
+		// <LayerList>
+		xml.openTag(WebMapContextTags.LAYER_LIST);
+		for (int i = 0; i < layersToExport.size(); i++) {
+			xml.writeRaw(((FLyrWMS) layersToExport.get(i)).toMapContext(fileVersion));
+		}
+		xml.closeTag();
+		// </LayerList>
+		xml.closeTag();
+		// </ViewContext>
+
+		return xml.getXML();
+	}
+
+	/**
+	 * Exports the ProjectView passed as parameter to Web Map Context XML compliant
+	 * with the defined specifications for the version set in the fileVersion field.
+	 * @param DefaultViewDocument to be exported
+	 * @return String containing the XML
+	 */
+	public String toXML(DefaultViewDocument v) {
+		if (fileVersion.equals("1.1.0") ||
+				fileVersion.equals("1.0.0") ||
+				fileVersion.equals("0.1.4")) {
+			return createMapContext1_1_0(v);
+		}
+		return null;
+	}
+
+
+	public static ArrayList getExportableLayers(DefaultViewDocument v) {
+		ArrayList list = new ArrayList();
+		FLayers lyrs = v.getMapContext().getLayers();
+		list.addAll(_getExportableLayers(lyrs));
+		return list;
+	}
+
+	private static ArrayList _getExportableLayers(FLayer lyr) {
+		ArrayList list = new ArrayList();
+		if (checkType(lyr)) {
+			list.add(lyr);
+		} else {
+			if (lyr instanceof FLayers) {
+				FLayers lyrs = (FLayers) lyr;
+				for (int i = 0; i < lyrs.getLayersCount(); i++) {
+					list.addAll(_getExportableLayers(lyrs.getLayer(i)));
+				}
+			}
+		}
+		return list;
+	}
+
+	/**
+	 * Checks if the layer is supported by the WebMapContext
+	 * @param lyr
+	 * @return
+	 */
+	private static boolean checkType(FLayer lyr) {
+		return supportedLayers.contains(lyr.getClass());
+	}
+
+	/**
+	 * Searches in the layer tree of the TOC for an ocurrence of any
+	 * exportable layer and returns true if so, or false otherwise.
+	 * @param layer
+	 * @return
+	 */
+	public static boolean containsExportableLayers(FLayer layer) {
+		if (checkType(layer)) {
+			return true;
+		}
+
+		if (layer instanceof FLayers) {
+			FLayers layers = (FLayers) layer;
+			for (int i = 0; i < layers.getLayersCount(); i++) {
+				FLayer lyr = layers.getLayer(i);
+				if (containsExportableLayers(lyr)) {
+					return true;
+				}
+
+			}
+		}
+		return false;
+	}
+}

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/wmc/WebMapContext.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/pom.xml
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/pom.xml	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/pom.xml	(revision 21019)
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>org.gvsig.raster.wms.app.wmsclient</artifactId>
+    <packaging>jar</packaging>
+    <name>${project.artifactId}</name>
+    <description>Web Map Service support</description>
+	
+    <parent>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.raster.wms</artifactId>
+        <version>2.2.231</version>
+    </parent>
+	
+    <dependencies>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.raster.swing.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.raster.swing.impl</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.raster.wms.io</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.raster.wms.remoteclient</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.remoteclient</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.app.mainplugin</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.raster.lib.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.raster.fmap</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.control</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.utils</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.ui</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.symbology.lib.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.metadata.lib.basic.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.raster.cache.lib.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+		
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.mapcontext.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.mapcontext.impl</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.projection.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.projection.cresques.impl</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.compat.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.compat.se</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal.impl</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal.spi</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.geometry.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+    <!--
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.geometry.generalpath</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.geometry.operation</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+    -->
+    </dependencies>
+	
+    <properties>
+        <gvsig.package.info.name>Formats: WMS support</gvsig.package.info.name>
+        <gvsig.package.info.state>final</gvsig.package.info.state>
+        <gvsig.package.info.dependencies>required: org.gvsig.raster.tilecache.app -ge 2, required: org.gvsig.raster.mainplugin -ge 2</gvsig.package.info.dependencies>
+        <gvsig.package.info.poolURL>https://devel.gvsig.org/download/projects/Raster/pool</gvsig.package.info.poolURL>
+        <gvsig.package.info.categories>OGC,Remote Services,Raster</gvsig.package.info.categories>
+        <gvsig.package.info.official>true</gvsig.package.info.official>
+    </properties>
+</project>

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/buildNumber.properties
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/buildNumber.properties	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/buildNumber.properties	(revision 21019)
@@ -0,0 +1,2 @@
+#Sun Jul 09 18:31:47 CEST 2023
+buildNumber=287

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient/buildNumber.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.app.wmsclient
___________________________________________________________________
Added: svn:ignore
   + target

.settings

.project

.classpath


Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 21019)
@@ -0,0 +1 @@
+org.gvsig.raster.wms.io.DefaultWMSIOLibrary
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/resources/org/gvsig/raster/wms/io/i18n/text.properties
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/resources/org/gvsig/raster/wms/io/i18n/text.properties	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/resources/org/gvsig/raster/wms/io/i18n/text.properties	(revision 21019)
@@ -0,0 +1,2 @@
+error_connecting=Error conectando con el servidor
+malformed_url=URL mal formada

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/resources/org/gvsig/raster/wms/io/i18n/text.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/resources/org/gvsig/raster/wms/io/i18n/text_en.properties
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/resources/org/gvsig/raster/wms/io/i18n/text_en.properties	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/resources/org/gvsig/raster/wms/io/i18n/text_en.properties	(revision 21019)
@@ -0,0 +1,2 @@
+error_connecting=Error connecting with the server
+malformed_url=Malformed URL
\ No newline at end of file

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/resources/org/gvsig/raster/wms/io/i18n/text_en.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/DefaultWMSIOLibrary.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/DefaultWMSIOLibrary.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/DefaultWMSIOLibrary.java	(revision 21019)
@@ -0,0 +1,61 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.raster.wms.io;
+
+import org.gvsig.i18n.Messages;
+import org.gvsig.raster.wms.io.time.DefaultDimension;
+import org.gvsig.raster.wms.io.time.TimeDimension;
+import org.gvsig.tools.library.AbstractLibrary;
+import org.gvsig.tools.library.LibraryException;
+/**
+ *
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class DefaultWMSIOLibrary extends AbstractLibrary {
+
+	/*public DefaultWMSIOLibrary() {
+		super(DefaultWMSIOLibrary.class,Library.TYPE.IMPL);
+		require(ToolsLibrary.class);
+		require(DALLibrary.class);
+		require(DALFileLibrary.class);
+	}*/
+
+	@Override
+	protected void doInitialize() throws LibraryException {
+		//RasterLibrary.wakeUp();
+		WMSLayerNode.registerPersistent();
+		RemoteWMSStyle.registerPersistent();
+		DefaultDimension.registerPersistent();
+		TimeDimension.registerPersistent();
+
+		Messages.addResourceFamily("org.gvsig.raster.wms.io.i18n.text",
+				DefaultWMSIOLibrary.class.getClassLoader(),
+				DefaultWMSIOLibrary.class.getClass().getName());
+	}
+
+	@Override
+	protected void doPostInitialize() throws LibraryException {
+		WMSServerExplorerParameters.registerDynClass();
+		WMSDataParametersImpl.registerDynClass();
+		WMSProvider.register();
+	}
+}

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/DefaultWMSIOLibrary.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/WMSLayerNode.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/WMSLayerNode.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/WMSLayerNode.java	(revision 21019)
@@ -0,0 +1,391 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.raster.wms.io;
+
+import java.awt.Dimension;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.gvsig.raster.wms.io.time.DefaultDimension;
+import org.gvsig.raster.wms.io.time.RemoteTimeDimension;
+import org.gvsig.raster.wms.io.time.TimeDimension;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.dynobject.DynStruct;
+import org.gvsig.tools.persistence.PersistenceManager;
+import org.gvsig.tools.persistence.Persistent;
+import org.gvsig.tools.persistence.PersistentState;
+import org.gvsig.tools.persistence.exception.PersistenceException;
+
+/**
+ * Class defining the node of the layer tree of a common WMS service.
+ * @author jaume
+ */
+@SuppressWarnings("unchecked")
+public class WMSLayerNode implements Persistent {
+    private String                         _name              = null;
+    private String                         _title             = null;
+	private List<String>                   srs                = null;
+    private boolean                        queryable;
+    private boolean                        transparency;
+    private String                         lAbstract          = null;
+    private String                         latLonBox          = null;
+    private int                            selectedStyleIndex = 0;
+    private List<RemoteWMSStyle>           styles             = new ArrayList<RemoteWMSStyle>();
+    private List<RemoteTimeDimension>      dimensions         = null;
+    private List<String>                   keywords           = null;
+    private List<WMSLayerNode>             children           = new ArrayList<WMSLayerNode>();
+    private WMSLayerNode                   _parent            = null;
+	private Dimension                      fixedSize          = null;
+	
+	public void loadFromState(PersistentState state) throws PersistenceException {
+		this._name = state.getString("_name");
+		this._title = state.getString("_title");
+		this.srs = state.getList("srs");
+		this.queryable = state.getBoolean("queryable");
+		this.transparency = state.getBoolean("transparency");
+		this.lAbstract = state.getString("lAbstract");
+		this.latLonBox = state.getString("latLonBox");
+		this.selectedStyleIndex = state.getInt("selectedStyleIndex");
+		this.styles = state.getList("styles");
+		this.dimensions = state.getList("dimensions");
+		this.keywords = state.getList("keywords");
+		this.children = state.getList("children");
+		this._parent = (WMSLayerNode)state.get("_parent");
+		this.fixedSize = (Dimension)state.get("fixedSize");
+	}
+	
+	public void saveToState(PersistentState state) throws PersistenceException {
+		state.set("_name", _name);
+		state.set("_title", _title);
+		state.set("srs", srs);
+		state.set("queryable", queryable);
+		state.set("transparency", transparency);
+		state.set("lAbstract", lAbstract);
+		state.set("latLonBox", latLonBox);
+		state.set("selectedStyleIndex", selectedStyleIndex);
+		state.set("styles", styles);
+		state.set("dimensions", dimensions);
+		state.set("keywords", keywords);
+		state.set("children", children);
+		state.set("_parent", _parent);
+		state.set("fixedSize", fixedSize);
+	}	
+    
+    public static void registerPersistent() {
+		PersistenceManager manager = ToolsLocator.getPersistenceManager();
+		DynStruct definition = manager.getDefinition("WMSLayerNode_Persistent");
+		if( definition == null ) {
+			definition = manager.addDefinition(
+					WMSLayerNode.class,
+					"WMSLayerNode_Persistent",
+					"WMSLayerNode Persistence",
+					null, 
+					null
+			);
+		}
+
+		definition.addDynFieldString("_name").setMandatory(false);
+		definition.addDynFieldString("_title").setMandatory(false);
+		definition.addDynFieldList("srs").setClassOfItems(String.class).setMandatory(false);
+		definition.addDynFieldBoolean("queryable").setMandatory(false);
+		definition.addDynFieldBoolean("transparency").setMandatory(false);
+		definition.addDynFieldString("lAbstract").setMandatory(false);
+		definition.addDynFieldString("latLonBox").setMandatory(false);		
+		definition.addDynFieldInt("selectedStyleIndex").setMandatory(false);
+		definition.addDynFieldList("styles").setClassOfItems(RemoteWMSStyle.class).setMandatory(false);
+		definition.addDynFieldList("dimensions").setClassOfItems(RemoteTimeDimension.class).setMandatory(false);
+		definition.addDynFieldList("keywords").setClassOfItems(String.class).setMandatory(false);
+		definition.addDynFieldList("children").setClassOfItems(WMSLayerNode.class).setMandatory(false);
+		definition.addDynFieldObject("_parent").setClassOfValue(WMSLayerNode.class).setMandatory(false);
+		definition.addDynFieldObject("fixedSize").setClassOfValue(Dimension.class).setMandatory(false);
+	}
+
+	/**
+     * @return Returns the name.
+     */
+    public String getName() {
+        return _name;
+    }
+
+    public List<WMSLayerNode> getChildren() {
+        return children;
+    }
+
+    /**
+     * @param name The name to set.
+     */
+    public void setName(String name) {
+        this._name = name;
+    }
+
+    /**
+     * @return Returns the namedStyles.
+     */
+    public List<RemoteWMSStyle> getStyles() {
+        return styles;
+    }
+
+    public List<String> getKeywords() {
+    	return keywords;
+    }
+   
+    /**
+     * @return Returns the queryable.
+     */
+    public boolean isQueryable() {
+        return queryable;
+    }
+
+    /**
+     * @param queryable The queryable to set.
+     */
+    public void setQueryable(boolean queryable) {
+        this.queryable = queryable;
+    }
+    
+    /**
+     * @return Returns the srs.
+     */
+    public List<String> getAllSrs() {
+        if ((srs.size() == 0) && _parent!=null)
+            return _parent.getAllSrs();
+        return srs;
+    }
+
+    /**
+     * @param srs The srs to set.
+     */
+    public void setSrs(List<String> srs) {
+        this.srs = srs;
+    }
+
+    /**
+     * @return Returns the title.
+     */
+    public String getTitle() {
+        return _title;
+    }
+
+    public void setTitle(String title) {
+        this._title = title.trim();
+    }
+
+    /**
+     * @return Returns the transparency.
+     */
+    public boolean isTransparent() {
+        return transparency;
+    }
+
+    /**
+     * @param transparency The transparency to set.
+     */
+    public void setTransparency(boolean transparency) {
+        this.transparency = transparency;
+    }
+
+    /**
+     * Sets the list of sons of this layer.
+     * @param children
+     */
+    public void setChildren(List<WMSLayerNode> children) {
+        this.children = children;
+    }
+
+    public WMSLayerNode getParent() {
+        return _parent;
+    }
+    
+    public void setParent(WMSLayerNode parentNode) {
+        this._parent = parentNode;
+    }
+
+    public List<RemoteTimeDimension> getDimensions() {
+        return dimensions;
+    }
+
+    /**
+     * Gets the layer abstract.
+     *
+     * @return Returns the abstract.
+     */
+    public String getAbstract() {
+        return lAbstract;
+    }
+
+    /**
+     * Sets the layer abstract.
+     *
+     * @param abstract The abstract to set.
+     */
+    public void setAbstract(String _abstract) {
+        lAbstract = _abstract;
+    }
+
+    /**
+     * @param name
+     * @param units
+     * @param unitSymbol
+     * @param dimensionExpression
+     */
+    public void addDimension(String name, String units, String unitSymbol, String dimExpression) {
+    	if (dimensions == null)
+    		dimensions = new ArrayList<RemoteTimeDimension>();
+    	if (name.equalsIgnoreCase("time")) {
+    		try {
+    			dimensions.add(new TimeDimension(units, unitSymbol,
+    					dimExpression));
+    		} catch (IllegalArgumentException e) {
+    			// The TIME class does not yet support this kind of time so it
+    			// will be treated as a DefaultDimension
+    			dimensions.add(new DefaultDimension(name.toUpperCase(),
+    					units, unitSymbol, dimExpression));
+    		}
+    	} else if (name.equalsIgnoreCase("sequence")) {
+    		// TODO Not yet implemented
+    		return;
+    	} else {
+    		dimensions.add(new DefaultDimension(name.toUpperCase(), units,
+    				unitSymbol, dimExpression));
+    	}
+
+    }
+
+    
+    public void setLatLonBox(String _latLonBox) {
+        latLonBox = _latLonBox;
+    }
+
+    public String getLatLonBox() {
+        return latLonBox;
+    }
+
+    /**
+     * When a server cannot renderize images but just server them in constant size and
+     * BBox, the layer must have this value set in order to correctly work.
+     *
+     * @param fixedWidth - the constant value for the image width
+     * @param fixedHeight - the constant value for the image height
+     */
+    public void setFixedSize(int fixedWidth, int fixedHeight) {
+		fixedSize = new Dimension(fixedWidth, fixedHeight);
+	}
+
+	public Dimension getFixedSize() {
+		return fixedSize;
+	}
+
+	public boolean isSizeFixed() {
+		return fixedSize            != null &&
+		       fixedSize.getWidth()  > 0    &&
+		       fixedSize.getHeight() > 0;
+	}
+
+    /**
+     *
+     * @param _name
+     * @param _title
+     * @param _abstract
+     */
+    public void addStyle(org.gvsig.remoteclient.wms.WMSStyle style) {
+    	if (style.getName().equalsIgnoreCase("default"))
+    		selectedStyleIndex = styles.size();
+        if (styles == null)
+            styles = new ArrayList<RemoteWMSStyle>();
+        styles.add(new RemoteWMSStyle(style, this));
+
+    }
+
+    public RemoteWMSStyle getSelectedStyle() {
+    	if (styles == null || selectedStyleIndex > styles.size() - 1 || selectedStyleIndex == -1)
+    		return null;
+    	return (RemoteWMSStyle) styles.get(selectedStyleIndex);
+    }
+
+    public void setSelectedStyleByIndex(int index) {
+		selectedStyleIndex = index;
+	}
+
+	public void setSelectedStyleByName(String styName) {
+		if (styName == null || styName.equals(""))
+			setSelectedStyleByIndex(-1);
+		for (int i = 0; i < styles.size(); i++) {
+			RemoteWMSStyle sty = (RemoteWMSStyle) styles.get(i);
+			if (sty.name.equalsIgnoreCase(styName)) {
+				setSelectedStyleByIndex(i);
+				return;
+			}
+
+		}
+		setSelectedStyleByIndex(-1);
+	}
+
+	public void addKeyword(String keyword) {
+		if (keywords == null)
+			keywords = new ArrayList<String>();
+		keywords.add(keyword);
+	}
+
+    public String toString(){
+    	String str;
+    	if (getName()==null)
+    		str = getTitle();
+    	else
+    		str = "["+getName()+"] "+getTitle();
+        return str;
+    }
+
+    public Object clone() throws CloneNotSupportedException {
+        WMSLayerNode clone       = new WMSLayerNode();
+        clone._name              = this._name;
+        clone.queryable          = this.queryable;
+        clone.srs                = this.srs;
+        clone._title             = this._title;
+        clone.transparency       = this.transparency;
+        clone.styles             = new ArrayList<RemoteWMSStyle>();
+        clone.lAbstract          = this.lAbstract;
+        clone.latLonBox          = this.latLonBox;
+        clone.selectedStyleIndex = this.selectedStyleIndex;
+
+        if (keywords != null) {
+        	clone.keywords = new ArrayList<String>(keywords.size());
+        	for (int i = 0; i < keywords.size(); i++) {
+				clone.keywords.add((String) keywords.get(i));
+			}
+        }
+        if (styles != null)
+        	for (int i=0; i<styles.size(); i++){
+        		RemoteWMSStyle sty = (RemoteWMSStyle) this.styles.get(i).clone();
+        		((RemoteWMSStyle)sty).parent = this;
+        		clone.styles.add(sty);
+        	}
+
+        if (dimensions!=null)
+        	for (int i = 0; i < dimensions.size(); i++) {
+        		clone.dimensions = new ArrayList<RemoteTimeDimension>();
+        		clone.dimensions.add((RemoteTimeDimension) this.dimensions.get(i));
+        	}
+
+        return clone;
+    }
+
+}

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/WMSLayerNode.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/WMSServerExplorer.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/WMSServerExplorer.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/WMSServerExplorer.java	(revision 21019)
@@ -0,0 +1,362 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+* MA  02110-1301, USA.
+*
+*/
+
+/*
+* AUTHORS (In addition to CIT):
+* 2009 IVER T.I   {{Task}}
+*/
+
+package org.gvsig.raster.wms.io;
+
+import java.awt.geom.Rectangle2D;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Vector;
+
+import org.gvsig.compat.net.ICancellable;
+import org.gvsig.fmap.dal.DALLocator;
+import org.gvsig.fmap.dal.DataManager;
+import org.gvsig.fmap.dal.DataServerExplorerParameters;
+import org.gvsig.fmap.dal.DataStoreParameters;
+import org.gvsig.fmap.dal.NewDataStoreParameters;
+import org.gvsig.fmap.dal.coverage.exception.ConnectException;
+import org.gvsig.fmap.dal.coverage.exception.RemoteServiceException;
+import org.gvsig.fmap.dal.coverage.store.RasterDataServerExplorer;
+import org.gvsig.fmap.dal.exception.DataException;
+import org.gvsig.fmap.dal.exception.InitializeException;
+import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException;
+import org.gvsig.fmap.dal.spi.AbstractDataServerExplorer;
+import org.gvsig.fmap.dal.spi.DataServerExplorerProvider;
+import org.gvsig.fmap.dal.spi.DataServerExplorerProviderServices;
+import org.gvsig.i18n.Messages;
+import org.gvsig.remoteclient.utils.Utilities;
+import org.gvsig.tools.task.Cancellable;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Explorer for a WMS server
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class WMSServerExplorer extends AbstractDataServerExplorer implements RasterDataServerExplorer, DataServerExplorerProvider {
+	public static final String          NAME                     = WMSProvider.NAME;
+	private WMSConnector                connector                = null;
+//	private WMSServerExplorerParameters parameters               = null;
+	private Logger                      log                      = LoggerFactory.getLogger(WMSServerExplorer.class);
+
+	public WMSServerExplorer(
+			WMSServerExplorerParameters parameters,
+			DataServerExplorerProviderServices services)
+			throws InitializeException {
+                super(parameters, services);
+//		this.parameters = parameters;
+	}
+
+	/**
+	 * Gets the provider's name
+	 * @return
+	 */
+	public String getDataStoreProviderName() {
+		return WMSProvider.NAME;
+	}
+
+	public String getDescription() {
+		return WMSProvider.DESCRIPTION;
+	}
+
+	public boolean add(String provider, NewDataStoreParameters parameters,
+			boolean overwrite) throws DataException {
+		return false;
+	}
+
+	public boolean canAdd() {
+		return false;
+	}
+
+	public boolean canAdd(String storeName) throws DataException {
+		return false;
+	}
+
+	public NewDataStoreParameters getAddParameters(String storeName)
+			throws DataException {
+		return null;
+	}
+
+	public List<String> getDataStoreProviderNames() {
+		return null;
+	}
+
+	public WMSServerExplorerParameters getParameters() {
+		return (WMSServerExplorerParameters) super.getParameters();
+	}
+
+	public List<DataStoreParameters> list() throws DataException {
+		return null;
+	}
+
+	public List<DataStoreParameters> list(int mode) throws DataException {
+		return null;
+	}
+
+	public void remove(DataStoreParameters parameters) throws DataException {
+
+	}
+
+	public String getProviderName() {
+		return null;
+	}
+
+	//**********************************************
+	//Connector
+	//**********************************************
+
+	public DataStoreParameters getStoredParameters() {
+		DataManager manager = DALLocator.getDataManager();
+		WMSDataParameters params = null;
+		try {
+			params = (WMSDataParameters) manager.createStoreParameters(this.getDataStoreProviderName());
+			params.setURI(new URI(getParameters().getHost()));
+
+			/*if(WMSProvider.TILED) {
+				TileDataParameters tileParams = (TileDataParameters) manager.createStoreParameters("Tile Store");
+				tileParams.setDataParameters(params);
+				return tileParams;
+			} */
+		} catch (InitializeException e) {
+			log.debug("Error initializating parameters", e);
+		} catch (ProviderNotRegisteredException e) {
+			log.debug("Error getting parameters", e);
+		} catch (URISyntaxException e) {
+            log.debug("Can't create URI from "+getParameters().getHost(), e);
+        }
+
+		return params;
+	}
+
+	public void connect(ICancellable cancellable) throws ConnectException {
+		connect(cancellable, false);
+	}
+
+	/**
+	 * Connects to the server and throws a getCapabilities. This loads
+	 * the basic information to make requests.
+	 * @throws RemoteServiceException
+	 */
+	public void connect(ICancellable cancellable, boolean updateCache) throws ConnectException {
+		URL url = null;
+
+		try {
+			url = new URL(getParameters().getHost());
+		} catch (Exception e) {
+			throw new ConnectException(Messages.getText("malformed_url"), e);
+		}
+        try {
+        	connector = WMSProvider.getConnectorFromURL(url, updateCache);
+        	if (!connector.connect(this.getParameters(), updateCache, cancellable))
+        		throw new ConnectException(Messages.getText("error_connecting"));
+        } catch (IOException e) {
+			throw new ConnectException(Messages.getText("error_connecting"), e);
+		}
+
+	}
+
+	/**
+	 * Checks if the network and host are reachable
+	 * @param timeout for the host
+	 * @return true if both are reachable and false if they are not
+	 */
+	public boolean isHostReachable(int timeout) {
+		URL url = null;
+		try {
+			url = new URL(getParameters().getHost());
+			File file = Utilities.downloadFile(url, "checkhost.dat", null);
+		} catch (Exception e) {
+			return false;
+		}
+
+		return true;
+	}
+
+	/**
+	 * Checks if the network and host are reachable
+	 * @return true if both are reachable and false if they are not
+	 */
+	public boolean isHostReachable() {
+		int timeout = 10000;
+		return isHostReachable(timeout);
+	}
+
+	/**
+	 * Returns true if this provider is connected to the server
+	 * @return
+	 */
+	public boolean isConnected() {
+		if(connector != null)
+			return true;
+		return false;
+	}
+
+	/**
+	 * Gets the description of this service
+	 * @return
+	 */
+	public String getAbstract() {
+		if(connector != null)
+			return connector.getAbstract();
+		return null;
+	}
+
+	/**
+	 * Gets the list of raster formats supported by the server
+	 * @return
+	 */
+	@SuppressWarnings("unchecked")
+	public String[] getFormats() {
+		if(connector != null) {
+			Vector f = connector.getFormats();
+			ArrayList formatos = new ArrayList();
+			for (int i = 0; i < f.size(); i++) {
+				formatos.add(f.elementAt(i));
+			}
+			return (String[]) formatos.toArray(new String[0]);
+		}
+		return null;
+	}
+
+	/**
+	 * Gets the list of raster information formats supported by the server
+	 * @return
+	 */
+	@SuppressWarnings("unchecked")
+	public String[] getInfoFormats() {
+		if(connector != null) {
+			Vector f = connector.getInfoFormats();
+			ArrayList formatos = new ArrayList();
+			for (int i = 0; i < f.size(); i++) {
+				formatos.add(f.elementAt(i));
+			}
+			return (String[]) formatos.toArray(new String[0]);
+		}
+		return null;
+	}
+
+	/**
+	 * Gets a tree of nodes which represents the server information
+	 * @return
+	 */
+	public WMSLayerNode getLayerTree() {
+		if(connector != null) {
+			return connector.getLayersTree();
+		}
+		return null;
+	}
+
+	/**
+	 * Gets the server title
+	 * @return
+	 */
+	public String getServerType() {
+		if (getVersion() == null)
+			return "WMS";
+        return "WMS "+ getVersion();
+	}
+
+	/**
+	 * Gets the online resources
+	 * @return
+	 */
+	public Hashtable getOnlineResources() {
+		if(connector != null) {
+			return connector.getOnlineResources();
+		}
+		return null;
+	}
+
+	/**
+	 * Gets the protocol supported by the server
+	 * @return
+	 */
+	public String getVersion() {
+		if(connector != null) {
+			return (connector.getVersion() == null) ? "" : connector.getVersion();
+		}
+		return null;
+	}
+
+    public Rectangle2D getLayersExtent(String[] layerName, String srs) {
+    	return connector.getLayersExtent(layerName, srs);
+    }
+
+    /**
+	 * Gets a layer using its name
+	 * @param layerName
+	 * @return
+	 */
+    public WMSLayerNode getLayer(String layerName) {
+    	return connector.getLayer(layerName);
+    }
+
+    /**
+	 * Gets the host URI
+	 * @return
+	 */
+	public String getHost() {
+		return getParameters().getHost();
+	}
+
+	public Rectangle2D getBoundingBox(String[] layerNames, String srs) {
+		return connector.getLayersExtent(layerNames, srs);
+    }
+
+	public boolean isQueryable() {
+    	return connector.isQueryable();
+    }
+
+	/**
+	 * Gets the title
+	 * @return
+	 */
+	public String getTitle() {
+		return null;
+	}
+
+    /**
+     * @return The title of the service offered by the WMS server.
+     */
+    public String getServiceTitle() {
+		return connector.getServiceTitle();
+    }
+
+	public DataServerExplorerProviderServices getServerExplorerProviderServices() {
+		return null;
+	}
+}

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/WMSServerExplorer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/downloader/WMSTileServer.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/downloader/WMSTileServer.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/downloader/WMSTileServer.java	(revision 21019)
@@ -0,0 +1,131 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.raster.wms.io.downloader;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.fmap.dal.coverage.RasterLibrary;
+import org.gvsig.fmap.dal.coverage.datastruct.Extent;
+import org.gvsig.fmap.dal.coverage.exception.RemoteServiceException;
+import org.gvsig.fmap.dal.coverage.store.RasterDataStore;
+import org.gvsig.raster.cache.tile.TileCacheLibrary;
+import org.gvsig.raster.cache.tile.TileCacheLocator;
+import org.gvsig.raster.cache.tile.TileCacheManager;
+import org.gvsig.raster.cache.tile.provider.CacheStruct;
+import org.gvsig.raster.cache.tile.provider.Downloader;
+import org.gvsig.raster.cache.tile.provider.TileServer;
+import org.gvsig.raster.impl.provider.RasterProvider;
+import org.gvsig.raster.wms.io.WMSProvider;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+* Data server for the tile cache in a WMSProvider
+* @author Nacho Brodin (nachobrodin@gmail.com)
+*/
+public class WMSTileServer implements TileServer {
+	private static Logger              logger               = LoggerFactory.getLogger(WMSTileServer.class);
+	private CacheStruct                struct               = null;
+	private Downloader                 downloader           = null;
+	private RasterDataStore            store                = null;
+	private String                     suffix               = ".tif";
+
+	public WMSTileServer(RasterDataStore store) {
+		this.store = store;
+		this.suffix = ((RasterProvider)store.getProvider()).getFileSuffix();
+	}
+
+	public Downloader getDownloader() {
+		if(downloader == null ||
+		   ((TileDownloaderForWMS)downloader).getTileSize()[0] != TileCacheLibrary.ALTERNATIVE_TILESIZE ||
+		   ((TileDownloaderForWMS)downloader).getTileSize()[1] != TileCacheLibrary.ALTERNATIVE_TILESIZE) {
+			try {
+				downloader = new TileDownloaderForWMS(
+						store,
+						TileCacheLibrary.ALTERNATIVE_TILESIZE,
+						TileCacheLibrary.ALTERNATIVE_TILESIZE);
+			} catch (RemoteServiceException e) {
+				return null;
+			}
+		}
+		return downloader;
+	}
+
+	public CacheStruct getStruct() {
+		if(struct == null) {
+			TileCacheManager  manager = TileCacheLocator.getManager();
+
+			int coordinates = CacheStruct.FLAT;
+			if(store.getProjection() != null)
+				coordinates = (store.getProjection() != null && store.getProjection().isProjected()) ? CacheStruct.FLAT : CacheStruct.GEOGRAFIC;
+			else {
+				Extent e = store.getExtent();
+				if(e.getULX() >= -180 && e.getULX() <= 180 && e.getLRX() >= -180 && e.getLRX() <= 180 &&
+					e.getULY() >= -90 && e.getULY() <= 90 && e.getLRY() >= -90 && e.getLRY() <= 90) {
+					coordinates = CacheStruct.GEOGRAFIC;
+				}
+			}
+
+			String epsg = null;
+			IProjection proj = store.getProjection();
+			if(proj != null)
+				epsg = proj.getAbrev();
+
+			struct = manager.createCacheStructure(coordinates,
+					TileCacheLibrary.DEFAULT_LEVELS,
+					store.getExtent().toRectangle2D(),
+					Double.POSITIVE_INFINITY,//provider.getCellSize(),
+					TileCacheLibrary.ALTERNATIVE_TILESIZE,
+					TileCacheLibrary.ALTERNATIVE_TILESIZE,
+					((RasterProvider)store.getProvider()).getURIOfFirstProvider().getPath(),
+					((WMSProvider)store.getProvider()).getParameters().getLayerQuery(),
+					TileCacheLibrary.DEFAULT_STRUCTURE,
+					RasterLibrary.pathTileCache,
+					getFileSuffix(),
+					epsg,
+					0);
+		}
+		return struct;
+	}
+
+	public void setStruct(CacheStruct struct) {
+		if(struct != null) {
+			this.struct = struct;
+			if(struct.getTileSizeByLevel(0) != null) {
+				try {
+					downloader = new TileDownloaderForWMS(store,
+							struct.getTileSizeByLevel(0)[0],
+							struct.getTileSizeByLevel(0)[1]);
+				} catch (RemoteServiceException ex) {
+					logger.error("Constructing TileDownloaderForWCS: " + ex.getMessage());
+				}
+			}
+		}
+	}
+
+	public String getFileSuffix() {
+		return suffix;
+	}
+
+	public void setFileSuffix(String extension) {
+		this.suffix = extension;
+	}
+}

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/downloader/WMSTileServer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/downloader/TileDownloaderForWMS.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/downloader/TileDownloaderForWMS.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/downloader/TileDownloaderForWMS.java	(revision 21019)
@@ -0,0 +1,142 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.raster.wms.io.downloader;
+
+import java.awt.geom.Rectangle2D;
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+import java.util.Vector;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.fmap.dal.coverage.RasterLocator;
+import org.gvsig.fmap.dal.coverage.dataset.Buffer;
+import org.gvsig.fmap.dal.coverage.datastruct.Extent;
+import org.gvsig.fmap.dal.coverage.exception.NotSupportedExtensionException;
+import org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException;
+import org.gvsig.fmap.dal.coverage.exception.QueryException;
+import org.gvsig.fmap.dal.coverage.exception.RasterDriverException;
+import org.gvsig.fmap.dal.coverage.exception.RemoteServiceException;
+import org.gvsig.fmap.dal.coverage.store.RasterDataStore;
+import org.gvsig.fmap.dal.coverage.store.RasterQuery;
+import org.gvsig.fmap.dal.exception.InitializeException;
+import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException;
+import org.gvsig.raster.cache.tile.Tile;
+import org.gvsig.raster.cache.tile.exception.TileGettingException;
+import org.gvsig.raster.impl.DefaultRasterManager;
+import org.gvsig.raster.impl.provider.RasterProvider;
+import org.gvsig.raster.impl.provider.tile.BaseTileDownloader;
+import org.gvsig.raster.util.DefaultProviderServices;
+import org.gvsig.raster.wms.io.RemoteWMSStyle;
+import org.gvsig.raster.wms.io.WMSConnector;
+import org.gvsig.raster.wms.io.WMSDataParameters;
+import org.gvsig.raster.wms.io.WMSProvider;
+import org.gvsig.remoteclient.utils.Utilities;
+import org.gvsig.remoteclient.wms.WMSStatus;
+import org.gvsig.tools.locator.LocatorException;
+
+/** 
+ * Tile getter 
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class TileDownloaderForWMS extends BaseTileDownloader {
+	private WMSConnector             connector  = null;
+	private Extent                   lyrExtent  = null;
+
+	
+	
+	public TileDownloaderForWMS(RasterDataStore store,
+			int tilePxWidth,
+			int tilePxHeight) throws RemoteServiceException {
+		super(store, tilePxWidth, tilePxHeight);
+		this.connector = ((WMSProvider)store.getProvider()).getConnector();
+		lyrExtent = store.getExtent();
+	}
+	
+	public synchronized Tile downloadTile(Tile tile) throws TileGettingException {
+		try {
+			Rectangle2D r = new Rectangle2D.Double(tile.getExtent().getMinX(), 
+					tile.getExtent().getMinY() - tile.getExtent().getHeight(), 
+					tile.getExtent().getWidth(), 
+					tile.getExtent().getHeight());
+			//Extent tileExtent = RasterLocator.getManager().getDataStructFactory().createExtent(r);
+			WMSDataParameters p = (WMSDataParameters)store.getParameters();
+			WMSStatus wmsStatus = new WMSStatus();
+			wmsStatus.setLayerNames(Utilities.createVector(p.getLayerQuery(), ","));
+			wmsStatus.setSrs(p.getSRSCode());
+			wmsStatus.setFormat(p.getFormat());
+			List<RemoteWMSStyle> listStyles = p.getStyles();
+			Vector<?> v = listStyles != null ? new Vector<RemoteWMSStyle>(listStyles) : null;
+			wmsStatus.setStyles(v);
+			wmsStatus.setDimensions(p.getDimensions());
+			wmsStatus.setTransparency(p.isWmsTransparent());
+			wmsStatus.setOnlineResource((String) p.getOnlineResource().get("GetMap"));
+			wmsStatus.setExtent(r);
+			wmsStatus.setHeight(tile.getHeightPx());
+			wmsStatus.setWidth(tile.getWidthPx());
+			wmsStatus.setXyAxisOrder(p.isXyAxisOrder());
+
+			IProjection proj = (IProjection)p.getSRS();
+			if(proj != null)
+				wmsStatus.setProjected(proj.isProjected());
+			connector.getMap(wmsStatus, tile.getCancelled(), tile.getFile());
+
+			//Si borramos el rmf no se puede leer la etiqueta Alpha. En caso de que se modifique jgdal para
+			//poder guardar esta etiqueta deberiamos borrar el rmf para ahorrar ficheros
+			//File rmf = new File(tile.getFile().getAbsolutePath() + ".rmf");
+			//if(rmf.exists())
+				//rmf.delete();
+		} catch (RemoteServiceException e) {
+			throw new TileGettingException(e);
+		} 
+		readTileFromDisk(tile);
+		return tile;
+	}
+	
+	@SuppressWarnings("unused")
+	private void fuseFiles(Extent dstExtent, int dstWidth, int dstHeight, File src, File dst, double pixelSize) 
+		throws RasterDriverException, ProcessInterruptedException, ProviderNotRegisteredException, InitializeException, LocatorException, NotSupportedExtensionException, IOException, QueryException {
+		RasterProvider provider = DefaultProviderServices.loadProvider(src);
+		
+		RasterQuery q = RasterLocator.getManager().createQuery();
+		Buffer bufInput = store.query(q);
+		
+		Buffer bufDst = DefaultRasterManager.getInstance().createMemoryBuffer(provider.getDataType()[0], dstWidth, dstHeight, provider.getBandCount(), true);
+		String extension = RasterLocator.getManager().getFileUtils().getExtensionFromFileName(src.getAbsolutePath());
+		RasterLocator.getManager().getRasterUtils().copyToBuffer(
+				bufDst, 
+				dstExtent, 
+				bufInput, 
+				lyrExtent, 
+				pixelSize, 
+				provider.getColorInterpretation().hasAlphaBand());
+		RasterLocator.getManager().getProviderServices().exportBufferToFile(
+				bufDst, 
+				provider.getCellSize(), 
+				extension, 
+				provider.getColorInterpretation().hasAlphaBand(), 
+				dst, 
+				dstExtent, 
+				provider.getColorInterpretation());
+	}
+	
+}

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/downloader/TileDownloaderForWMS.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/package.html
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/package.html	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/package.html	(revision 21019)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<title>org.gvsig.raster.wms.io package documentation</title>
+</head>
+<body>
+
+	<p>WMS provider</p>
+
+</body>
+</html>
\ No newline at end of file

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/package.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/time/TimeDimension.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/time/TimeDimension.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/time/TimeDimension.java	(revision 21019)
@@ -0,0 +1,475 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.raster.wms.io.time;
+
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.GregorianCalendar;
+import java.util.List;
+
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.dynobject.DynStruct;
+import org.gvsig.tools.persistence.PersistenceManager;
+import org.gvsig.tools.persistence.PersistentState;
+import org.gvsig.tools.persistence.exception.PersistenceException;
+
+/**
+ * Class for WMS TIME dimension from a WMS. It allows you to handle the correct
+ * values for this kind of dimension.
+ * <br>
+ * <p>
+ * At the moment this class was written the WMS TIME dimension is defined as the
+ * ISO8601 standard for expressing times.
+ * </p>
+ * <br>
+ * <p>
+ * As far as this class implements IFMapWMSDimension it uses the same interface
+ * and documentation.
+ * </p>
+ *
+ * @author jaume dominguez faus - jaume.dominguez@iver.es
+ */
+public class TimeDimension implements RemoteTimeDimension {
+	static private final byte   YEAR_FORMAT           = 1;
+	static private final byte   YEAR_TO_MONTH_FORMAT  = 2;
+	static private final byte   YEAR_TO_DAY_FORMAT    = 3;
+	static private final byte   FULL_FORMAT           = 4;
+
+    static private final long   millisXsec            = 1000;
+    static private final long   millisXminute         = 60 * millisXsec;
+    static private final long   millisXhour           = 60 * millisXminute;
+    static private final long   millisXday            = 24 * millisXhour;
+    static private final long   millisXmonth          = 30 * millisXday;
+    //(1 year = 365 days 6 hours 9 minutes 9,7 seconds)
+    static private final long   millisXyear           = (365*millisXday) + (6*millisXhour) + (9*millisXminute) + 9700;
+
+    static private final String digit                 = "[0-9]";
+    static private final String nonZeroDigit          = "[1-9]";
+    static private final String seconds               = "([0-5]" + digit + "((\\.|,)" + digit + digit+ "?" + digit + "?" + ")?)";
+    static private final String minutes               = "([0-5]" + digit + ")";
+    static private final String hours                 = "(0" + digit + "|1" + digit + "|2[0-3])";
+    static private final String time                  = hours + ":" + minutes + "(:" + seconds + ")?";
+    static private final String days                  = "(0?" + nonZeroDigit + "|1" + digit + "|2" + digit + "|30|31)";
+    static private final String months                = "(0?" + nonZeroDigit + "|10|11|12)";
+    static private final String year                  = "(" + digit + digit + ")";
+    static private final String century               = "(" + digit + digit + ")";
+    static private final String floatingPointNumber   = "(" + digit + "+(\\." + digit + "+)?)";
+
+    private String              unit;
+	private String              unitSymbol;
+	private List<GregorianCalendar>   
+	                            valueList;
+	private boolean             compiled;
+	private boolean             isGeologic;
+	private String              expression;
+	private int                 type;
+	private byte                format               = 0;
+
+    static private final String regexDateExtendedForBCE1 = "B?"+century+year;
+    static private final String regexDateExtendedForBCE2 = "B?"+century+year+"-"+months;
+    static private final String regexDateExtendedForBCE3 = "B?"+century+year+"-"+months+"-"+days;
+    static private final String regexDateExtendedForBCE4 = "B?"+century+year+"-"+months+"-"+days+"(T| )"+time+"Z";
+    // Note: in WMS 1.1.0 the suffix Z is optional
+
+    static private final String regexDateExtendedForBCE =
+        "(" +  regexDateExtendedForBCE1  + "|"
+            +  regexDateExtendedForBCE2  + "|"
+            +  regexDateExtendedForBCE3  + "|"
+            +  regexDateExtendedForBCE4  +      ")";
+
+    static private final String periodMagnitude = "(Y|M|D)";
+    static private final String p1 = "(("+digit+")+"+periodMagnitude+")";
+
+    static private final String timeMagnitude = "(H|M|S)";
+    static private final String p2 = "("+floatingPointNumber+timeMagnitude+")";
+    static private final String regexPeriod = "P(("+p1+"+"+"(T"+p2+")*)|("+p1+"*"+"(T"+p2+")+))";
+
+    static private final String regexIntervalTimeDimension =
+        "("+regexDateExtendedForBCE+")/("+regexDateExtendedForBCE+")/("+regexPeriod+")";
+
+    static private final String geologicDatasets = "(K|M|G)";
+    static private final String regexDateForGeologicDatasets = geologicDatasets+floatingPointNumber;
+
+	@SuppressWarnings("unchecked")
+	public void loadFromState(PersistentState state) throws PersistenceException {
+		this.unit = state.getString("unit");
+		this.unitSymbol = state.getString("unitSymbol");
+		
+		List<String> list = (List<String>)state.getList("valueList");
+		valueList = convertStringListToGregorianCalendarList(list);
+		
+		this.compiled = state.getBoolean("compiled");
+		this.isGeologic = state.getBoolean("isGeologic");
+		this.expression = state.getString("expression");
+		this.type = state.getInt("type");
+		this.format = (byte)state.getInt("format");
+	}
+	
+	public void saveToState(PersistentState state) throws PersistenceException {
+		state.set("unit", unit);
+		state.set("unitSymbol", unitSymbol);
+		state.set("valueList", convertGregorianCalendarListToStringList(valueList));
+		state.set("compiled", compiled);
+		state.set("isGeologic", isGeologic);
+		state.set("expression", expression);
+		state.set("type", type);
+		state.set("format", format);
+	}	
+	
+	private List<String> convertGregorianCalendarListToStringList(List<GregorianCalendar> gList) {
+		List<String> l = new ArrayList<String>();
+		for (int i = 0; i < gList.size(); i++) {
+			l.add(toString(gList.get(i)));
+		}
+		return l;
+	}
+	
+	private List<GregorianCalendar> convertStringListToGregorianCalendarList(List<String> sList) {
+		List<GregorianCalendar> l = new ArrayList<GregorianCalendar>();
+		for (int i = 0; i < sList.size(); i++) {
+			l.add(valueOf(sList.get(i)));
+		}
+		return l;
+	}
+	
+	public static void registerPersistent() {
+		PersistenceManager manager = ToolsLocator.getPersistenceManager();
+		DynStruct definition = manager.getDefinition("TimeDimension_Persistent");
+		if( definition == null ) {
+			definition = manager.addDefinition(
+					TimeDimension.class,
+					"TimeDimension_Persistent",
+					"TimeDimension Persistence",
+					null, 
+					null
+			);
+		}
+		
+		definition.addDynFieldString("unit").setMandatory(false);
+		definition.addDynFieldString("unitSymbol").setMandatory(false);
+		definition.addDynFieldList("valueList").setClassOfItems(String.class).setMandatory(false);
+		definition.addDynFieldBoolean("compiled").setMandatory(false);
+		definition.addDynFieldBoolean("isGeologic").setMandatory(false);
+		definition.addDynFieldString("expression").setMandatory(false);
+		definition.addDynFieldInt("type").setMandatory(false);
+		definition.addDynFieldInt("format").setMandatory(false);
+	}
+	
+	public TimeDimension() {}
+	
+    /**
+     * Creates a new instance of TimeDimension.
+     * @param units
+     * @param unitSymbol
+     * @param expression
+     */
+    public TimeDimension(String _units, String _unitSymbol, String _dimensionExpression) {
+        this.unit = _units;
+        this.unitSymbol = _unitSymbol;
+        setExpression(_dimensionExpression);
+    }
+
+	public String getName() {
+        return "TIME";
+    }
+
+    public String getUnit() {
+        return unit;
+    }
+
+    public String getUnitSymbol() {
+        return unitSymbol;
+    }
+
+	public String getLowLimit() {
+		return valueAt(0);
+	}
+
+	public String getHighLimit() {
+		return valueAt(valueList.size() - 1);
+	}
+
+
+	public String getResolution() {
+		return null;
+	}
+
+	public boolean isValidValue(String value) {
+		return (value.matches(regexDateForGeologicDatasets) || value.matches(regexDateExtendedForBCE));
+	}
+
+	public GregorianCalendar valueOf(String value) throws IllegalArgumentException {
+		if (compiled) {
+    		String myValue = value.toUpperCase();
+    		if (isValidValue(myValue)) {
+    			GregorianCalendar val = null;
+    			if (!isGeologic){
+    				// This is a normal date
+    				int myYear;
+    				int myMonth;
+    				int myDay;
+    				int myHour;
+    				int myMinute;
+    				float mySecond;
+    				String[] s = myValue.split("-");
+    				myYear = (s[0].charAt(0)=='B') ? -Integer.parseInt(s[0].substring(1, 5)) : Integer.parseInt(s[0].substring(0, 4));
+    				myMonth = (s.length>1) ? Integer.parseInt(s[1])-1 : 0;
+    				if (myValue.matches(regexDateExtendedForBCE4)){
+    					if (s[2].endsWith("Z"))
+    						s[2] = s[2].substring(0,s[2].length()-1);
+    					s = (s[2].indexOf('T')!=-1) ? s[2].split("T") : s[2].split(" ");
+    					myDay = Integer.parseInt(s[0]);
+
+    					// Go with the time
+    					s = s[1].split(":");
+    					myHour = Integer.parseInt(s[0]);
+    					myMinute = (s.length>1) ? Integer.parseInt(s[1]) : 0;
+    					mySecond = (s.length>2) ? Float.parseFloat(s[2]) : 0;
+    				} else {
+    					myDay = (s.length>2) ? Integer.parseInt(s[2]) : 1;
+
+    					myHour = 0;
+    					myMinute = 0;
+    					mySecond = 0;
+    				}
+    				GregorianCalendar cal = new GregorianCalendar(myYear, myMonth, myDay, myHour, myMinute, (int)mySecond);
+    				val = cal;
+    			} else{
+    				// this is a geological date >:-(
+    			}
+    			return val;
+    		} else throw new IllegalArgumentException(myValue);
+    	}
+    	return null;
+	}
+
+	public String valueAt(int pos) throws ArrayIndexOutOfBoundsException {
+		return toString((GregorianCalendar) valueList.get(pos));
+	}
+
+	public int valueCount() {
+		return valueList.size();
+	}
+
+	public String getExpression() {
+		return expression;
+	}
+
+	public void setExpression(String expr) {
+		this.expression = expr;
+	}
+
+	public int getType() {
+		return type;
+	}
+
+	public void compile() throws IllegalArgumentException {
+		compiled = true;
+		valueList = new ArrayList<GregorianCalendar>();
+		String[] items = expression.split(",");
+		for (int i = 0; i < items.length; i++) {
+			// Each iteration is a value of a comma-separated list
+			// which can be a single date or even an expression defining
+			// an interval.
+			items[i] = items[i].trim();
+			if (items[i].matches(regexDateExtendedForBCE1)) {
+				upgradeFormat(YEAR_FORMAT);
+				valueList.add(valueOf(items[i]));
+			} else if (items[i].matches(regexDateExtendedForBCE2)) {
+				upgradeFormat(YEAR_TO_MONTH_FORMAT);
+				valueList.add(valueOf(items[i]));
+			} else if (items[i].matches(regexDateExtendedForBCE3)) {
+				upgradeFormat(YEAR_TO_DAY_FORMAT);
+				valueList.add(valueOf(items[i]));
+			} else if (items[i].matches(regexDateExtendedForBCE4)) {
+				upgradeFormat(FULL_FORMAT);
+				valueList.add(valueOf(items[i]));
+			} else if (items[i].matches(regexIntervalTimeDimension)) {
+				// Analyze and transform this interval expression to a list
+				// of values.
+
+				// min value
+				String[] s = items[i].split("/");
+				if (s[0].matches(regexDateExtendedForBCE1)) {
+					upgradeFormat(YEAR_FORMAT);
+				} else if (s[0].matches(regexDateExtendedForBCE2)) {
+					upgradeFormat(YEAR_TO_MONTH_FORMAT);
+				} else if (s[0].matches(regexDateExtendedForBCE3)) {
+					upgradeFormat(YEAR_TO_DAY_FORMAT);
+				} else if (s[0].matches(regexDateExtendedForBCE4)) {
+					upgradeFormat(FULL_FORMAT);
+				}
+				GregorianCalendar minValue = valueOf(s[0]);
+
+				// max value
+				if (s[0].matches(regexDateExtendedForBCE1)) {
+					upgradeFormat(YEAR_FORMAT);
+				} else if (s[1].matches(regexDateExtendedForBCE2)) {
+					upgradeFormat(YEAR_TO_MONTH_FORMAT);
+				} else if (s[1].matches(regexDateExtendedForBCE3)) {
+					upgradeFormat(YEAR_TO_DAY_FORMAT);
+				} else if (s[1].matches(regexDateExtendedForBCE4)) {
+					upgradeFormat(FULL_FORMAT);
+				}
+				GregorianCalendar maxValue = valueOf(s[1]);
+
+				String period = s[2];
+
+				if (period == null) {
+					valueList.add(minValue);
+					valueList.add(maxValue);
+					continue;
+				}
+
+				long x1 = ((GregorianCalendar) maxValue).getTimeInMillis();
+				long x0 = ((GregorianCalendar) minValue).getTimeInMillis();
+				long distance = x1-x0;
+				long step = 0;
+
+				boolean isTimeField = false;
+				String val = "";
+
+				for (int j = 0; j < period.length(); j++) {
+					if (period.charAt(j) == 'P')
+						continue;
+					if (period.charAt(j) == 'T') {
+						isTimeField = true;
+						continue;
+					}
+					switch (period.charAt(j)) {
+					case 'Y':
+						step += Integer.parseInt(val) * millisXyear;
+						val = "";
+						break;
+					case 'M':
+						if (isTimeField)
+							step += Integer.parseInt(val) * millisXminute;
+						else
+							step += Integer.parseInt(val) * millisXmonth;
+						val = "";
+						break;
+					case 'D':
+						step += Integer.parseInt(val) * millisXday;
+						val = "";
+						break;
+					case 'H':
+						step += Integer.parseInt(val) * millisXhour;
+						val = "";
+						break;
+					case 'S':
+						step += Integer.parseInt(val) * 1000;
+						val = "";
+						break;
+					default:
+						val += period.charAt(j);
+						break;
+					}
+				}
+				// Now that we know the earliest and the latest date and the period
+				// between two dates, I'm going to populate the list of values
+				// considering these values.
+				int valueCount = (int)(distance/step) + 1; // + 1 for the initial point
+				valueList.add(minValue);
+				for (int pos = 1; pos < valueCount; pos++) {
+					long newTime = ((GregorianCalendar) minValue).getTimeInMillis();
+	    			newTime += (step*pos);
+	    			GregorianCalendar cal = new GregorianCalendar();
+	    			cal.setTimeInMillis(newTime);
+	    			if (cal.after(maxValue) || cal.before(minValue))
+	    				continue;
+
+	    			valueList.add(cal);
+				}
+				valueList.add(maxValue);
+			} else {
+				compiled = false;
+				throw new IllegalArgumentException();
+			}
+		}
+    }
+
+	/**
+	 * Prints a GregorianCalendar value in WMS1.1.1 format.
+	 * @param cal
+	 * @return
+	 */
+	private String toString(GregorianCalendar cal) {
+		int iYear   = cal.get(Calendar.YEAR);
+		int iMonth  = cal.get(Calendar.MONTH) + 1;
+		int iDay    = cal.get(Calendar.DAY_OF_MONTH);
+		int iHour   = cal.get(Calendar.HOUR_OF_DAY);
+		int iMinute = cal.get(Calendar.MINUTE);
+		int iSecond = cal.get(Calendar.SECOND);
+		String myYear;
+		if (iYear<10)
+			myYear = "200"+iYear;
+		else if (iYear<100)
+			myYear = "20"+iYear;
+		else if (iYear<1000)
+			myYear = "2"+iYear;
+		else
+			myYear = ""+iYear;
+		String myMonth       = (iMonth<10) ? "0"+iMonth  : ""+iMonth;
+		String myDay         = (iDay<10)   ? "0"+iDay    : ""+iDay;
+		String myHour        = (iHour<10)  ? "0"+iHour   : ""+iHour;
+		String myMinute      = (iMinute<10)? "0"+iMinute : ""+iMinute;
+		String mySecond      = (iSecond<10)? "0"+iSecond : ""+iSecond;
+		int myMilliSecond = cal.get(Calendar.MILLISECOND);
+
+
+		String s = null;
+		if (format == YEAR_FORMAT)
+			s = myYear+"";
+		else if (format == YEAR_TO_MONTH_FORMAT)
+			s = myYear+"-"+myMonth;
+		else if (format == YEAR_TO_DAY_FORMAT)
+			s = myYear+"-"+myMonth+"-"+myDay;
+		else if (format == FULL_FORMAT)
+			s = myYear+"-"+myMonth+"-"+myDay+"T"+myHour+":"+myMinute+":"+mySecond+"."+(myMilliSecond/10)+"Z";
+		if (iYear<0)
+			s = "B"+s;
+		return s;
+	}
+
+	private void upgradeFormat(byte sFormat) {
+		switch (sFormat) {
+		case YEAR_FORMAT:
+			if (format < YEAR_FORMAT)
+				format = YEAR_FORMAT;
+			break;
+		case YEAR_TO_MONTH_FORMAT:
+			if (format < YEAR_TO_MONTH_FORMAT)
+				format = YEAR_TO_MONTH_FORMAT;
+			break;
+		case YEAR_TO_DAY_FORMAT:
+			if (format < YEAR_TO_DAY_FORMAT)
+				format = YEAR_TO_DAY_FORMAT;
+			break;
+		case FULL_FORMAT:
+			if (format < FULL_FORMAT)
+				format = FULL_FORMAT;
+			break;
+		}
+	}
+}
+
+

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/time/TimeDimension.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/time/DefaultDimension.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/time/DefaultDimension.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/time/DefaultDimension.java	(revision 21019)
@@ -0,0 +1,269 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.raster.wms.io.time;
+
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.dynobject.DynStruct;
+import org.gvsig.tools.persistence.PersistenceManager;
+import org.gvsig.tools.persistence.PersistentState;
+import org.gvsig.tools.persistence.exception.PersistenceException;
+
+
+/**
+ * This class instances a regular WMS dimension. It handles single, multiple and
+ * interval values and uses them as they were a point, a list or a regularly
+ * split line, respectivelly.<br>
+ * <p>
+ * As far as it implements RemoteTimeDimension it uses the same interface and
+ * documentation.
+ * </p>
+ * @author jaume dominguez faus (jaume.dominguez@iver.es)
+ *
+ */
+public class DefaultDimension implements RemoteTimeDimension {
+	static private final String digit = "[0-9]";
+    static private final String nonZeroDigit = "[1-9]";
+    static private final String letter = "[_$%a-zA-Z]";
+    static private final String word = letter+"("+letter+"|"+digit+")+"; // TODO Should be * instead of + ??
+    static private final String floatingPointNumber = "("+digit+"+(\\."+digit+"+)?)";
+    static private final String integerNumber = nonZeroDigit+digit+"+";
+    static private final String dimensionItem = "("+floatingPointNumber+"|"+word+")";
+    /**
+     * regular expression for matching dimensions.
+     */
+    static private final String regexpDefaultDimensionExpression =
+    	"("+floatingPointNumber+"/"+floatingPointNumber+"/"+floatingPointNumber+"|"+
+    	    dimensionItem+"(,"+dimensionItem+")*)";
+    
+	private String name;
+    private String unit;
+    private String unitSymbol;
+    private String expression;
+    private String period;
+    private Object minValue;
+    private Object maxValue;
+	private int type;
+	private boolean compiled = false;
+	
+	public void loadFromState(PersistentState state) throws PersistenceException {
+		this.name = state.getString("name");
+		this.unit = state.getString("unit");
+		this.unitSymbol = state.getString("unitSymbol");
+		this.expression = state.getString("expression");
+		this.period = state.getString("period");
+		this.minValue = state.getString("minValue");
+		this.maxValue = state.getString("maxValue");
+		this.type = state.getInt("type");
+		this.compiled = state.getBoolean("compiled");
+	}
+	
+	public void saveToState(PersistentState state) throws PersistenceException {
+		state.set("name", name);
+		state.set("unit", unit);
+		state.set("unitSymbol", unitSymbol);
+		state.set("expression", expression);
+		state.set("period", period);
+		state.set("minValue", minValue);
+		state.set("maxValue", maxValue);
+		state.set("type", type);
+		state.set("compiled", compiled);
+	}	
+	
+	public static void registerPersistent() {
+		PersistenceManager manager = ToolsLocator.getPersistenceManager();
+		DynStruct definition = manager.getDefinition("DefaultDimension_Persistent");
+		if( definition == null ) {
+			definition = manager.addDefinition(
+					DefaultDimension.class,
+					"DefaultDimension_Persistent",
+					"DefaultDimension Persistence",
+					null, 
+					null
+			);
+		}
+
+		definition.addDynFieldString("name").setMandatory(false);
+		definition.addDynFieldString("unit").setMandatory(false);
+		definition.addDynFieldString("unitSymbol").setMandatory(false);
+		definition.addDynFieldString("expression").setMandatory(false);
+		definition.addDynFieldString("period").setMandatory(false);
+		definition.addDynFieldString("minValue").setMandatory(false);
+		definition.addDynFieldString("maxValue").setMandatory(false);
+		definition.addDynFieldInt("type").setMandatory(false);
+		definition.addDynFieldBoolean("compiled").setMandatory(false);
+	}
+	
+	public DefaultDimension() {}
+	 
+    /**
+     * Creates a new instance of DefaultDimension.
+     * @param _name
+     * @param _units
+     * @param _unitSymbol
+     * @param _dimensionExpression
+     */
+    public DefaultDimension(String _name, String _units, String _unitSymbol, String _dimensionExpression) {
+    	this.name = _name;
+    	this.unit = _units;
+    	this.unitSymbol = _unitSymbol;
+    	setExpression(_dimensionExpression);
+    }
+    
+    public String getName() {
+		return name;
+	}
+
+	public String getUnit() {
+		return unit;
+	}
+
+	public String getUnitSymbol() {
+		return unitSymbol;
+	}
+
+	public String getLowLimit() {
+		return (String) minValue;
+	}
+
+	public String getHighLimit() {
+		return (String) maxValue;
+	}
+
+	public String getResolution() {
+		if (type == INTERVAL) {
+    		String[] s = expression.split("/");
+    		return (s.length == 1) ? s[3] : null;
+    	} else return null;
+	}
+
+	public boolean isValidValue(String value) {
+		return value.matches(word) || value.matches(floatingPointNumber);
+	}
+
+	public Object valueOf(String value) throws IllegalArgumentException {
+		if (compiled) {
+			if (value.matches(word)) {
+				return (String) value;
+			} else if (value.matches(integerNumber)){
+				return new Integer(value);
+			}
+			else if (value.matches(floatingPointNumber)) {
+				return new Float(value);
+			}
+		}
+		return null;
+	}
+
+	public String valueAt(int pos) throws ArrayIndexOutOfBoundsException {
+		if (compiled) {
+			if (pos<0 || pos>valueCount())
+				throw new ArrayIndexOutOfBoundsException(pos+"(must be >= 0 and <="+valueCount()+")");
+			
+			if (type == SINGLE_VALUE)
+				return expression;
+			
+			if (type == MULTIPLE_VALUE)
+				return expression.split(",")[pos];
+			
+			if (type == INTERVAL) {
+				double minPos = Double.parseDouble((String) minValue);
+				double maxPos = Double.parseDouble((String) maxValue);
+				double step = Double.parseDouble(period);
+				double newPos = minPos + (step*pos);
+				if (newPos < minPos)
+					return minPos+"";
+				
+				if (newPos > maxPos)
+					return maxPos+"";
+				return newPos+"";
+			}
+		}
+        return null;
+	}
+
+	public int valueCount() {
+		if (compiled) {
+			if (type == MULTIPLE_VALUE) {
+				return expression.split(",").length;
+			} else if (type == INTERVAL) {
+				int count;
+				double min = Double.parseDouble((String) minValue);
+				double max = Double.parseDouble((String) maxValue);
+				double step = Double.parseDouble(period);
+				double distance = max - min;
+				count = (int) (distance/step);
+				return count;
+			} else {
+				return 1;
+			}
+		}
+		return -1;
+	}
+
+	public String getExpression() {
+		return expression;
+	}
+
+	public void setExpression(String expr) {
+		expression = expr.toUpperCase();
+        
+	}
+
+	public int getType() {
+		return type;
+	}
+
+	public void compile() throws IllegalArgumentException {
+		if (expression.matches(regexpDefaultDimensionExpression)){
+
+        } else {
+            //System.err.println("Invalid dimension expression: "+expr+" (for "+this.getName()+")");
+            throw new IllegalArgumentException();
+        }
+		
+
+        String separator;
+        if (expression.indexOf("/")!=-1) {
+        	separator = "/";
+        	type = INTERVAL;
+        } else if (expression.indexOf(",")!=-1) {
+        	separator = ",";
+        	type = MULTIPLE_VALUE;
+        } else {
+        	separator = ",";
+        	type = SINGLE_VALUE;
+        }
+        compiled = true;
+        String[] s = expression.split(separator);
+        minValue = valueOf(s[0]);
+        if (type == INTERVAL) {
+        	maxValue = (s.length>1) ? valueOf(s[1]) : valueOf(s[0]);
+        	period = (s.length>2) ? s[2] : null;
+        } else if (type == MULTIPLE_VALUE) {
+        	maxValue = valueOf(s[s.length-1]);
+        } else {
+        	maxValue = valueOf(s[0]);
+        }
+        
+	}
+
+}

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/time/DefaultDimension.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/time/RemoteTimeDimension.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/time/RemoteTimeDimension.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/time/RemoteTimeDimension.java	(revision 21019)
@@ -0,0 +1,154 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.raster.wms.io.time;
+
+import org.gvsig.tools.persistence.Persistent;
+
+
+/**
+ * 
+ * @author jaume
+ *
+ */
+public interface RemoteTimeDimension extends Persistent {
+	public static int SINGLE_VALUE = 0;
+	public static int MULTIPLE_VALUE = 1;
+	public static int INTERVAL = 2;
+    /**
+     * Return the dimension's name. This value is the value that will be used in
+     * a GetMap request.
+     * 
+     * @return String containing the name of this dimension.
+     */
+    public String getName();
+    /**
+     * Return the unit used by this dimension.
+     * @return
+     */
+    public String getUnit();
+    /**
+     * Returns the unit symbol (i.e. 'm', 's', or 'l' for meters, seconds, or liters respectively) 
+     * @return
+     */
+    public String getUnitSymbol();
+    
+    
+    /**
+     * This method returns the <b>lowest</b> value of this dimension if this dimension is
+     * specified as an interval or as a set of values, or the value specified if it
+     * was a single value. 
+     * @return String containing the coded value.
+     */
+    public String getLowLimit();
+
+    /**
+     * This method returns the <b>highest</b> value of this dimension if this dimension is
+     * specified as an interval or as a set of values, or the value specified if it
+     * was a single value. 
+     * @return String containing the coded value.
+     */
+    public String getHighLimit();
+    
+    /**
+     * This method returns the resolution supported by this dimension. This
+     * means the step lenght between two consecutive points along the
+     * dimension's axis. 
+     * @return String containing the coded value, or null if no value for resolution.
+     * @deprecated
+     */
+    public String getResolution();
+    
+    /**
+     * Checks if the value represented as string is a valid value by checking
+     * if the dimensions supports it. It should be true if one of the following is
+     * true:
+     * <p>
+     * <ol> 
+     * <li>
+     *  The dimension <b>supports nearest values</b> and <b>the value is greather
+     *  or  equal than the low limit</b> and <b>less or equal than the high limit</b>.  
+     *  </li>
+     *  <li>
+     *  The value matches in one of the points defined by the low and high limits, and
+     *  the resolution value.
+     *  </li>
+     * </ol>
+     * </p>
+     * @param value
+     * @return
+     */
+    public boolean isValidValue(String value);
+    
+    /**
+     * Return the value of the String passed in the dimension's unit-natural type.
+     * @param value
+     * @return
+     */
+    public Object valueOf(String value) throws IllegalArgumentException;
+    
+    /**
+     * Returns the value that would be at the position passed as argument.
+     * @param pos
+     * @return
+     * @throws ArrayIndexOutOfBoundsException
+     */
+    public String valueAt(int pos) throws ArrayIndexOutOfBoundsException;
+    
+    /**
+     * The amount of positions that this dimension contains. 
+     * @return -1 if the dimension is not recognized, the amount otherwise
+     */
+    public int valueCount();
+    
+    /**
+     * Returns the expression describing this WMS Dimension
+     */
+    public String getExpression();
+    
+    /**
+     * Sets the expression describing this WMS Dimension
+     * @throws IllegalArgumentException
+     */
+    public void setExpression(String expr);
+    
+    /**
+	 * Returns the type of the dimension expression.<br>
+	 * Possible values are:
+	 * <ol>
+	 * 	<li>
+	 * 		<b>IFMapWMSDimension.SINGLE_VALUE</b>
+	 * 		<b>IFMapWMSDimension.MULTIPLE_VALUE</b>
+	 * 		<b>IFMapWMSDimension.INTERVAL</b>
+	 * 	</li>
+	 * </ol>
+	 * @return int
+	 */
+    public int getType();
+    
+    /**
+     * Analyzes and establishes the starting values for this dimension. No operation of this
+     * dimension can be called before the dimension has been compiled.
+     * 
+     * @throws IllegalArgumentException
+     */
+    public void compile() throws IllegalArgumentException;
+}

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/time/RemoteTimeDimension.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/WMSConnector.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/WMSConnector.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/WMSConnector.java	(revision 21019)
@@ -0,0 +1,486 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.raster.wms.io;
+
+import java.awt.geom.Rectangle2D;
+import java.io.BufferedOutputStream;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.net.ConnectException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.security.KeyManagementException;
+import java.security.NoSuchAlgorithmException;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.TreeMap;
+import java.util.Vector;
+import java.util.prefs.Preferences;
+
+import javax.management.RuntimeErrorException;
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.X509TrustManager;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+import org.gvsig.compat.net.ICancellable;
+import org.gvsig.fmap.crs.CRSFactory;
+import org.gvsig.fmap.dal.DataParameters;
+import org.gvsig.fmap.dal.DataServerExplorerParameters;
+import org.gvsig.fmap.dal.DataStoreParameters;
+import org.gvsig.fmap.dal.coverage.exception.RemoteServiceException;
+import org.gvsig.remoteclient.exceptions.ServerErrorException;
+import org.gvsig.remoteclient.utils.BoundaryBox;
+import org.gvsig.remoteclient.utils.Utilities;
+import org.gvsig.remoteclient.wms.WMSClient;
+import org.gvsig.remoteclient.wms.WMSDimension;
+import org.gvsig.remoteclient.wms.WMSLayer;
+import org.gvsig.remoteclient.wms.WMSStatus;
+import org.gvsig.remoteclient.wms.WMSStyle;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public class WMSConnector  {
+	private WMSClient                     client;
+    private WMSLayerNode                  fmapRootLayer;
+    private TreeMap<String, WMSLayerNode> layers = new TreeMap<String, WMSLayerNode>();
+    private Logger                        log    = LoggerFactory.getLogger(WMSConnector.class);
+
+    public WMSConnector(URL url) throws ConnectException, IOException {
+    	client = new WMSClient(url.toString());
+    }
+
+    public String[] getLayerNames() {
+    	return client.getLayerNames();
+    }
+    
+    public String[] getLayerTitles() {
+    	return client.getLayerTitles();
+    }
+    
+	public void getCapabilities(URL server) throws RemoteServiceException {
+//		try {
+//			client.connect();
+//		} catch (Exception e) {
+//			throw new WMSException(e);
+//		}
+	}
+
+    public File getMap(WMSStatus status, ICancellable cancel) throws RemoteServiceException {
+        try {
+			return client.getMap(status, cancel);
+        } catch (org.gvsig.remoteclient.exceptions.WMSException e) {
+            throw new RemoteServiceException(e.getMessage());
+        } catch (ServerErrorException e) {
+            throw new RemoteServiceException("WMS Unexpected server error." + e.getMessage(), e);
+        }
+    }
+    
+    /**
+     * 
+     * @param status
+     * @param cancel
+     * @param file
+     * @throws RemoteServiceException
+     */
+    public void getMap(WMSStatus status, ICancellable cancel, File file) throws RemoteServiceException {
+        try {
+			URL url = client.getGetMapURL(status, cancel);
+			downloadFile(url, file, cancel);
+			String exceptionMessage = client.getExceptionMessage(file);
+			if(exceptionMessage != null)
+				throw new RemoteServiceException(exceptionMessage);
+		} catch(IOException e) {
+			throw new RemoteServiceException("WMS: error downloading the file. File:" + file.getAbsolutePath() + "...." + e.getMessage());
+		} catch (ServerErrorException e) {
+            throw new RemoteServiceException("WMS Unexpected server error."+e.getMessage());
+        }  catch (org.gvsig.remoteclient.exceptions.WMSException e) {
+            throw new RemoteServiceException(e.getMessage());
+        }
+    }
+
+    
+    public void downloadFile(URL url, File dstFile, ICancellable cancel) throws IOException {
+		Preferences prefs = Preferences.userRoot().node( "gvsig.downloader" );
+		// by default 1 minute (60000 milliseconds.
+		int timeout = prefs.getInt("timeout", 60000);
+
+		DataOutputStream dos;
+		DataInputStream is;
+		OutputStreamWriter os = null;
+		HttpURLConnection connection = null;
+		//If the used protocol is HTTPS
+		if (url.getProtocol().equals("https")) {
+			try {
+				disableHttsValidation();
+			} catch (KeyManagementException e) {
+				e.printStackTrace();
+			} catch (NoSuchAlgorithmException e) {
+				e.printStackTrace();
+			}
+		}
+		connection = (HttpURLConnection)url.openConnection();
+		connection.setConnectTimeout(timeout);
+		is = new DataInputStream(url.openStream());
+
+		dos = new DataOutputStream( new BufferedOutputStream(new FileOutputStream(dstFile)));
+		byte[] buffer = new byte[1024 * 4];
+
+
+		long readed = 0;
+		for (int i = is.read(buffer); i > 0; i = is.read(buffer)){
+			dos.write(buffer, 0, i);
+			readed += i;
+			if(cancel != null && cancel.isCanceled())
+				return;
+		}
+		if(os != null) {
+			os.close();
+		}
+		dos.close();
+		is.close();
+		is = null;
+		dos = null;
+	}
+
+	/**
+	 * This method disables the Https certificate validation.
+	 * @throws KeyManagementException
+	 * @throws NoSuchAlgorithmException
+	 */
+	private void disableHttsValidation() throws KeyManagementException, NoSuchAlgorithmException{
+		// Create a trust manager that does not validate certificate chains
+		TrustManager[] trustAllCerts = new TrustManager[] {
+				new X509TrustManager() {
+					public java.security.cert.X509Certificate[] getAcceptedIssuers() {
+						return null;
+					}
+					public void checkClientTrusted(
+							java.security.cert.X509Certificate[] certs, String authType) {
+					}
+					public void checkServerTrusted(
+							java.security.cert.X509Certificate[] certs, String authType) {
+					}
+				}
+		};
+
+		// Install the all-trusting trust manager
+		SSLContext sc = SSLContext.getInstance("SSL");
+		sc.init(null, trustAllCerts, new java.security.SecureRandom());
+		HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
+	}
+
+    /**
+     * Gets the legend graphic of one layer
+     */
+    public File getLegendGraphic(WMSStatus status, String layerName, ICancellable cancel) throws RemoteServiceException {
+        try {
+        	File f = client.getLegendGraphic(status, layerName, cancel);
+			return f;
+        } catch (org.gvsig.remoteclient.exceptions.WMSException e) {
+            //throw new RemoteServiceException(e.getMessage());
+        } catch (ServerErrorException e) {
+            throw new RemoteServiceException("WMS Unexpected server error."+e.getMessage());
+        }
+        return null;
+    }
+
+	/**
+	 * Devuelve WMSClient a partir de su URL.
+	 *
+	 * @param url URL.
+	 *
+	 * @return WMSClient.
+	 * @throws IOException
+	 * @throws ConnectException
+	 *
+	 * @throws UnsupportedVersionException
+	 * @throws IOException
+	 */
+
+
+    /**
+     * Establishes the connection.
+     * @param override, if true the previous downloaded data will be overridden
+     * @return <b>true</b> if the connection was successful, or <b>false</b> if it was no possible
+     * to establish the connection for any reason such as version negotiation.
+     */
+    public boolean connect(boolean override, ICancellable cancel) {
+    	if (override) {
+    		fmapRootLayer = null;
+    		layers.clear();
+    	}
+		return client.connect(override, cancel);
+    }
+    
+    /**
+     * Establishes the connection.
+     * @param override, if true the previous downloaded data will be overridden
+     * @return <b>true</b> if the connection was successful, or <b>false</b> if it was no possible
+     * to establish the connection for any reason such as version negotiation.
+     */
+    public boolean connect(DataServerExplorerParameters p, boolean override, ICancellable cancel) {
+    	if (override) {
+    		fmapRootLayer = null;
+    		layers.clear();
+    	}
+    	WMSStatus status = new WMSStatus();
+    	if (p!=null && p instanceof WMSServerExplorerParameters) {
+    		status.setXyAxisOrder(((WMSServerExplorerParameters) p).isXyAxisOrder());
+    	}
+
+		return client.connect(status, override, cancel);
+    }
+
+    /**
+     * 
+     * @param cancel
+     * @return
+     * @deprecated Use {@link #connect(WMSServerExplorerParameters, boolean, ICancellable)}
+     * instead
+     */
+    public boolean connect(ICancellable cancel) {
+    	return client.connect(false, cancel);
+    }
+
+    /**
+     * @return the version of this client.
+     */
+    public String getVersion() {
+    	return client.getVersion();
+    }
+
+    /**
+     * @return The title of the service offered by the WMS server.
+     */
+    public String getServiceTitle() {
+		return client.getServiceInformation().title;
+    }
+
+    /**
+     * Returns a Hash table containing the values for each online resource.
+     * Using as key a String with name of the WMS request and the value returned
+     * by the hash is another string containing the corresponding Url
+     * @return HashTable
+     */
+	public Hashtable getOnlineResources() {
+    	return client.getServiceInformation().getSupportedOperationsByName();
+    }
+
+    /**
+     * @return <b>Vector</b> containing strings with the formats supported by this server.
+     */
+    public Vector getFormats() {
+    	return client.getFormats();
+    }
+    
+    /**
+     * @return <b>Vector</b> containing strings with the information formats supported by this server.
+     */
+    public Vector getInfoFormats() {
+    	return client.getInfoFormats();
+    }
+
+    /**
+     * @return <b>Boolean</b> returns if the WMS is queryable (suppports GetFeatureInfo)
+     */
+    public boolean isQueryable() {
+        return client.isQueryable();
+    }
+    /**
+     * @return <b>Boolean</b> returns if the WMS supports getLegendGraphic operation (suppports GetFeatureInfo)
+     */
+    public boolean hasLegendGraphic() {
+        return client.hasLegendGraphic();
+    }
+    /**
+     * @return A tree containing the info of all layers available on this server.
+     */
+    public WMSLayerNode getLayersTree() {
+        if (fmapRootLayer == null){
+            WMSLayer clientRoot;
+            if (client.getLayersRoot() == null) {
+            	client.connect(false, null);
+            }
+            clientRoot = client.getLayersRoot();
+
+
+            fmapRootLayer = parseTree(clientRoot, null);
+        }
+        return fmapRootLayer;
+    }
+
+    /**
+     * Parses the client's layer node and translates it to a fmap's layer node
+     * @param WMSLayer
+     * @return WMSLayerNode
+     */
+    @SuppressWarnings("unchecked")
+	private WMSLayerNode parseTree(WMSLayer node, WMSLayerNode parentNode) {
+
+        WMSLayerNode myNode = new WMSLayerNode();
+
+        // Name
+        myNode.setName(node.getName());
+
+        // Title
+        myNode.setTitle(node.getTitle());
+
+        // Transparency
+        myNode.setTransparency(node.hasTransparency());
+
+	// CRS
+
+//        for (int i = 0; i < node.getAllSrs().size(); i++) {
+//        	String srs = (String)node.getAllSrs().get(i);
+//        	if(node.getBbox(srs) == null) {
+//        		IProjection projSrc = CRSFactory.getCRS("EPSG:4326");
+//        		try {
+//        			IProjection projDst = CRSFactory.getCRS(srs);
+//        			if(projDst != null) {
+//        				try {
+//        					ICoordTrans t = projSrc.getCT(projDst);
+//        					Rectangle2D r = t.convert(getRectangleFromBoundaryBox(node.getLatLonBox()));
+//        					BoundaryBox bbox = getBoundaryBoxFromRectangle(r);
+//        					bbox.setSrs(srs);
+//        					node.addBBox(bbox);
+//        				} catch (Exception e) {
+//        					log.info("I cannot get the transformation between EPSG:4326 and " + srs, e);
+//        				}
+//        			}
+//        		} catch (Exception e1) {
+//        			log.info("I cannot get " + srs, e1);
+//        			node.removeSrs(srs);
+//        		}
+//        	}
+//		}
+        myNode.setSrs(node.getAllSrs());
+
+        // Queryable
+
+        myNode.setQueryable(node.isQueryable() && client.getServiceInformation().isQueryable());
+
+        // Parent layer
+        myNode.setParent(parentNode);
+
+        // Abstract
+        myNode.setAbstract(node.getAbstract());
+
+        // Fixed Size
+        myNode.setFixedSize(node.getfixedWidth(), node.getfixedHeight());
+
+        // LatLonBox
+        if (node.getLatLonBox()!=null)
+            myNode.setLatLonBox(node.getLatLonBox().toString());
+
+        // Keywords
+        ArrayList keywords = node.getKeywords();
+        for (int i = 0; i < keywords.size(); i++) {
+        	myNode.addKeyword((String) keywords.get(i));
+		}
+
+        // Styles
+        ArrayList styles = node.getStyles();
+        for (int i = 0; i < styles.size(); i++) {
+            WMSStyle style = (WMSStyle) styles.get(i);
+            myNode.addStyle(style);
+        }
+
+        // Dimensions
+        ArrayList dimensions = node.getDimensions();
+        for (int i = 0; i < dimensions.size(); i++) {
+            WMSDimension d = (WMSDimension) dimensions.get(i);
+            myNode.addDimension(d.getName(), d.getUnits(), d.getUnitSymbol(), d.getDimensionExpression());
+        }
+
+        // Children
+        int children = node.getChildren().size();
+        myNode.setChildren(new ArrayList());
+        for (int i = 0; i < children; i++) {
+            myNode.getChildren().add(parseTree((WMSLayer)node.getChildren().get(i), myNode));
+        }
+
+        if (myNode.getName()!=null)
+            layers.put(myNode.getName(), myNode);
+
+        return myNode;
+    }
+    
+    public Rectangle2D getRectangleFromBoundaryBox(BoundaryBox bbox) {
+    	return new Rectangle2D.Double(bbox.getXmin(),
+    			bbox.getYmin(),
+    			Math.abs(bbox.getXmax() - bbox.getXmin()),
+    			Math.abs(bbox.getYmax() - bbox.getYmin()));
+    }
+    
+    public BoundaryBox getBoundaryBoxFromRectangle(Rectangle2D r) {
+    	BoundaryBox bbox = new BoundaryBox();
+    	bbox.setXmin(r.getMinX());
+    	bbox.setXmax(r.getMaxX());
+    	bbox.setYmin(r.getMinY());
+    	bbox.setYmax(r.getMaxY());
+    	return bbox;
+    }
+
+    public String getAbstract() {
+    	return client.getServiceInformation().abstr;
+    }
+
+    public Rectangle2D getLayersExtent(String[] layerName, String srs) {
+    	return client.getLayersExtent(layerName, srs);
+    }
+
+    public WMSLayerNode getLayer(String layerName) {
+        if (getLayers().get(layerName) != null) {
+            return (WMSLayerNode)layers.get(layerName);
+        }
+        return null;
+    }
+
+	private TreeMap getLayers() {
+        if (fmapRootLayer == null){
+            fmapRootLayer = getLayersTree();
+        }
+        return layers;
+    }
+
+    public String getFeatureInfo(WMSStatus _wmsStatus, int i, int j, int max_value, ICancellable cancellable) throws RemoteServiceException {
+        try {
+            return client.getFeatureInfo(_wmsStatus, i, j, max_value, cancellable);
+        } catch (org.gvsig.remoteclient.exceptions.WMSException e) {
+            throw new RemoteServiceException();
+		}
+    }
+
+    public String getHost(){
+    	return client.getHost();
+    }
+   
+}

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/WMSConnector.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/WMSProvider.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/WMSProvider.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/WMSProvider.java	(revision 21019)
@@ -0,0 +1,1209 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.raster.wms.io;
+
+import java.awt.Image;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.NoninvertibleTransformException;
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+import java.io.File;
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Vector;
+
+import javax.swing.ImageIcon;
+
+import org.apache.commons.io.FilenameUtils;
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+
+import org.gvsig.compat.net.ICancellable;
+import org.gvsig.fmap.crs.CRSFactory;
+import org.gvsig.fmap.dal.DALLocator;
+import org.gvsig.fmap.dal.DataStore;
+import org.gvsig.fmap.dal.DataStoreParameters;
+import org.gvsig.fmap.dal.coverage.RasterLocator;
+import org.gvsig.fmap.dal.coverage.dataset.Buffer;
+import org.gvsig.fmap.dal.coverage.datastruct.BandList;
+import org.gvsig.fmap.dal.coverage.datastruct.Extent;
+import org.gvsig.fmap.dal.coverage.exception.BandAccessException;
+import org.gvsig.fmap.dal.coverage.exception.BandNotFoundInListException;
+import org.gvsig.fmap.dal.coverage.exception.FileNotOpenException;
+import org.gvsig.fmap.dal.coverage.exception.InfoByPointException;
+import org.gvsig.fmap.dal.coverage.exception.InvalidSetViewException;
+import org.gvsig.fmap.dal.coverage.exception.InvalidSourceException;
+import org.gvsig.fmap.dal.coverage.exception.NotSupportedExtensionException;
+import org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException;
+import org.gvsig.fmap.dal.coverage.exception.QueryException;
+import org.gvsig.fmap.dal.coverage.exception.RasterDriverException;
+import org.gvsig.fmap.dal.coverage.exception.RemoteServiceException;
+import org.gvsig.fmap.dal.coverage.store.RasterQuery;
+import org.gvsig.fmap.dal.coverage.store.props.ColorInterpretation;
+import org.gvsig.fmap.dal.coverage.store.props.HistogramComputer;
+import org.gvsig.fmap.dal.coverage.store.props.Transparency;
+import org.gvsig.fmap.dal.exception.InitializeException;
+import org.gvsig.fmap.dal.exception.OpenException;
+import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException;
+import org.gvsig.fmap.dal.spi.DataManagerProviderServices;
+import org.gvsig.fmap.dal.spi.DataStoreProviderServices;
+import org.gvsig.metadata.MetadataLocator;
+import org.gvsig.raster.cache.tile.provider.TileServer;
+import org.gvsig.raster.impl.buffer.SpiRasterQuery;
+import org.gvsig.raster.impl.datastruct.BandListImpl;
+import org.gvsig.raster.impl.datastruct.DatasetBandImpl;
+import org.gvsig.raster.impl.datastruct.ExtentImpl;
+import org.gvsig.raster.impl.provider.AbstractRasterProvider;
+import org.gvsig.raster.impl.provider.RasterProvider;
+import org.gvsig.raster.impl.provider.RemoteRasterProvider;
+import org.gvsig.raster.impl.store.DefaultRasterStore;
+import org.gvsig.raster.impl.store.DefaultStoreFactory;
+import org.gvsig.raster.impl.store.properties.DataStoreColorInterpretation;
+import org.gvsig.raster.impl.store.properties.DataStoreTransparency;
+import org.gvsig.raster.impl.store.properties.RemoteStoreHistogram;
+import org.gvsig.raster.util.DefaultProviderServices;
+import org.gvsig.raster.wms.io.downloader.WMSTileServer;
+import org.gvsig.remoteclient.utils.Utilities;
+import org.gvsig.remoteclient.wms.WMSStatus;
+import org.gvsig.tools.ToolsLocator;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+/**
+ * Clase que representa al driver de acceso a datos de wms.
+ *
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class WMSProvider extends AbstractRasterProvider implements RemoteRasterProvider {
+	public static String                NAME                     = "Wms Store";
+	public static String                DESCRIPTION              = "Wms Raster file";
+	public static final String          METADATA_DEFINITION_NAME = "WmsStore";
+	private static final Logger         logger                    = LoggerFactory.getLogger(WMSProvider.class);
+	private static final int            FIXED_SIZE               = 800;
+	private Extent                      viewRequest              = null;
+	private static Hashtable<String, WMSConnector>
+	                                    drivers                  = new Hashtable<String, WMSConnector> ();
+	private boolean                     open                     = false;
+	private DataStoreTransparency       fileTransparency         = null;
+	private final int					minTilePrintWidth        = 12;
+	private final int					minTilePrintHeight       = 12;
+	//The out size depends on the last request
+	private int                         lastWidthRequest         = 0;
+	private int                         lastHeightRequest        = 0;
+	//Only for fixed size. Complete extent and FIXED_SIZE in long side
+	private File                        fileLayerPixelSize       = null;
+	private File                        lastRequest              = null;
+	private AbstractRasterProvider       lastRequestProvider      = null;
+
+	public static void register() {
+		DataManagerProviderServices dataman = (DataManagerProviderServices) DALLocator.getDataManager();
+		if (dataman != null && !dataman.getStoreProviders().contains(NAME)) {
+			dataman.registerStoreProvider(NAME,
+					WMSProvider.class, WMSDataParametersImpl.class);
+		}
+
+		if (!dataman.getExplorerProviders().contains(WMSServerExplorer.NAME)) {
+			dataman.registerExplorerProvider(WMSServerExplorer.NAME, WMSServerExplorer.class, WMSServerExplorerParameters.class);
+		}
+		dataman.registerStoreFactory(NAME, DefaultStoreFactory.class);
+	}
+
+	public WMSProvider() throws NotSupportedExtensionException {
+		super();
+	}
+
+	public void registerTileProviderFormats(Class<RasterProvider> c) {
+
+	}
+
+	/**
+	 * Constructor. Abre el dataset.
+	 * @throws OpenException
+	 * @throws NotSupportedExtensionException
+     * @deprecated use {@link #WMSProvider(URI)}, this constructor will be removed in gvSIG 2.5
+	 */
+    public WMSProvider(String params) throws InitializeException, OpenException {
+        super(params);
+        logger.info("Deprecated use of WMSProvider constructor");
+        if (params instanceof String) {
+            WMSDataParameters p = new WMSDataParametersImpl();
+            try {
+                p.setURI(new URI((String) params));
+            } catch (URISyntaxException e) {
+                throw new OpenException("Can't create URI from" + (String) params, e);
+            }
+            super.init(
+                p,
+                null,
+                ToolsLocator.getDynObjectManager().createDynObject(
+                    MetadataLocator.getMetadataManager().getDefinition(DataStore.METADATA_DEFINITION_NAME)));
+            init(p, null);
+        }
+    }
+
+    public WMSProvider(URI uri) throws InitializeException {
+        super(uri);
+        WMSDataParameters p = new WMSDataParametersImpl();
+        p.setURI(uri);
+        super.init(
+            p,
+            null,
+            ToolsLocator.getDynObjectManager().createDynObject(
+                MetadataLocator.getMetadataManager().getDefinition(DataStore.METADATA_DEFINITION_NAME)));
+        init(p, null);
+    }
+
+    /**
+     * Constructor. Abre el dataset.
+     * @param fName Nombre del fichero
+     * @throws OpenException
+     * @throws NotSupportedExtensionException
+     * @deprecated use {@link #WMSProvider(URI)}, this constructor will be removed in gvSIG 2.5
+     */
+	public WMSProvider(WMSDataParameters params,
+			DataStoreProviderServices storeServices) throws InitializeException {
+		super(params, storeServices, ToolsLocator.getDynObjectManager()
+				.createDynObject(
+						MetadataLocator.getMetadataManager().getDefinition(
+								DataStore.METADATA_DEFINITION_NAME)));
+		init(params, storeServices);
+	}
+
+	/**
+	 * Gets the connector from the URL
+	 * @return
+	 * @throws RemoteServiceException
+	 */
+	public WMSConnector getConnector() throws RemoteServiceException {
+		WMSDataParameters p = (WMSDataParameters)parameters;
+		URL url = null;
+		try {
+			url =p.getURI().toURL();
+		} catch (Exception e) {
+			throw new RemoteServiceException("Malformed URL",e);
+		}
+		try {
+			return WMSProvider.getConnectorFromURL(url, false);
+		} catch (IOException e) {
+			throw new RemoteServiceException("Error getting the connector",e);
+		}
+	}
+
+	/**
+	 * Crea las referencias al fichero y carga
+	 * las estructuras con la informaci�n y los metadatos.
+	 * @param proj Proyecci�n
+	 * @param param Parametros de carga
+	 * @throws NotSupportedExtensionException
+	 */
+	public void init (DataStoreParameters params,
+			DataStoreProviderServices storeServices) throws InitializeException {
+		setParam(storeServices, params);
+		setDataType(new int[]{Buffer.TYPE_BYTE, Buffer.TYPE_BYTE, Buffer.TYPE_BYTE});
+		bandCount = 3;
+		open = true;
+		try {
+			loadInitialInfo();
+		} catch (RasterDriverException e) {
+			throw new InitializeException(e.getMessage(), e);
+		}
+	}
+
+	/**
+	 * When a WMS provider is opened the information of data type, number of bands and transparency
+	 * is not available. Only after the first time a raster has been downloaded it can be know.
+	 * @param newDataType
+	 * @param buf
+	 * @param bandList
+	 * @return
+	 * @throws RasterDriverException
+	 */
+	private void loadInitialInfo() throws RasterDriverException {
+		WMSDataParametersImpl p = (WMSDataParametersImpl)parameters;
+		Extent ext = getExtent();
+		Rectangle2D bBox = ext.toRectangle2D();
+		int w = 0;
+		int h = 0;
+		if(ext.width() > ext.height()) {
+			w = 200;
+			h = (int)((ext.height() * w) / ext.width());
+		} else {
+			h = 200;
+			w = (int)((ext.width() * h) / ext.height());
+		}
+		p.setWidth(w);
+		p.setHeight(h);
+		p.setExtent(bBox);
+		if(p.getSRSCode() != null) {
+			try {
+				IProjection proj = CRSFactory.getCRS(p.getSRSCode());
+				setProjection(proj, false);
+			} catch (Exception e) {
+			}
+		}
+		WMSStatus wmsStatus = loadWMSStatus(bBox);
+
+		lastRequest = downloadFile(wmsStatus, ext.getULX(), ext.getULY(), ext.getLRX(), ext.getLRY(), w, h);
+		AbstractRasterProvider driver;
+		try {
+			driver = DefaultProviderServices.loadProvider(lastRequest);
+			setDataType(driver.getDataType());
+			bandCount = driver.getBandCount();
+			if(bandCount > 3) {
+				getColorInterpretation().setColorInterpValue(3, DataStoreColorInterpretation.ALPHA_BAND);
+				getTransparency().setTransparencyBand(3);
+			}
+			setColorTable(driver.getColorTable());
+			driver.close();
+		} catch (ProviderNotRegisteredException e) {
+			throw new RasterDriverException("", e);
+		} catch (InitializeException e) {
+			throw new RasterDriverException("", e);
+		}
+	}
+
+	public static final WMSConnector getConnectorFromURL(URL url, boolean updating) throws IOException {
+		WMSConnector drv = null;
+		if(!updating) {
+			drv = (WMSConnector) drivers.get(url.toString());
+		} else {
+			if(drivers.get(url.toString()) != null)
+				drivers.remove(url.toString());
+		}
+
+		if (drv == null) {
+			drv = new WMSConnector(url);
+			drivers.put(url.toString(), drv);
+		}
+
+		return drv;
+	}
+
+	/**
+	 * Obtiene el objeto que contiene que contiene la interpretaci�n de
+	 * color por banda
+	 * @return
+	 */
+	public ColorInterpretation getColorInterpretation() {
+		if(super.getColorInterpretation() == null) {
+			ColorInterpretation colorInterpretation = new DataStoreColorInterpretation(getBandCount());
+			if(getBandCount() == 1 || getBandCount() == 2)
+				colorInterpretation = DataStoreColorInterpretation.createGrayInterpretation();
+			if(getBandCount() == 3)
+				colorInterpretation = DataStoreColorInterpretation.createRGBInterpretation();
+			if(getBandCount() == 4)
+				colorInterpretation = DataStoreColorInterpretation.createRGBAInterpretation();
+			setColorInterpretation(colorInterpretation);
+		}
+		return super.getColorInterpretation();
+	}
+
+	public AffineTransform getAffineTransform() {
+		WMSDataParameters p = (WMSDataParameters)parameters;
+		if(p.isSizeFixed()) {
+			Extent e = getExtent(); // FIXME: it should also be taken from parameters instead of from the full layer extent
+			double psX = e.width() / (p.getWidth() - 1);
+			double psY = -(e.height() / (p.getHeight() - 1));
+			ownTransformation = new AffineTransform(
+					psX ,
+					0,
+					0,
+					psY,
+					e.getULX() - (psX / 2),
+					e.getULY() - (psY / 2));
+		} else {
+			Rectangle2D bbox = p.getExtent();
+			double psX = bbox.getWidth() / p.getWidth();
+			double psY = -(bbox.getHeight() / p.getHeight());
+			ownTransformation = new AffineTransform(
+					psX,
+					0,
+					0,
+					psY,
+					bbox.getX(),
+					(bbox.getY()+bbox.getHeight())); // FIXME: check for other CRSs such as 4326
+		}
+		externalTransformation = (AffineTransform) ownTransformation.clone();
+		return ownTransformation;
+	}
+
+	/**
+	 * Calcula el extent en coordenadas del mundo real
+	 * @return Extent
+	 */
+	public Extent getExtent() {
+		WMSDataParameters p = (WMSDataParameters)parameters;
+		Vector<?> layerNames = Utilities.createVector(p.getLayerQuery(), ",");
+
+		String[] ln = new String[layerNames.size()];
+		for (int i = 0; i < ln.length; i++) {
+			ln[i] = (String)layerNames.get(i);
+		}
+		Rectangle2D r = null;
+		try {
+			r = getConnector().getLayersExtent(ln, p.getSRSCode());
+			if (r == null) {
+				String latLonID = "EPSG:4326";
+				r = getConnector().getLayersExtent(ln, latLonID);
+				if (r == null) {
+					r = getConnector().getLayersExtent(ln, "CRS:84");
+				}
+
+				IProjection reqProj = CRSFactory.getCRS(p.getSRSCode());
+				IProjection latLonProj = CRSFactory.getCRS(latLonID);
+				if ((reqProj != null) && (latLonProj != null)) {
+					ICoordTrans ct = latLonProj.getCT(reqProj);
+					Rectangle2D reprojectedRect = ct.convert(r);
+					r = reprojectedRect;
+				}
+			}
+		} catch (RemoteServiceException e) {
+		}
+		if(r == null)
+			return null;
+		return new ExtentImpl(r.getMinX(), r.getMaxY(), r.getMaxX(), r.getMinY());
+	}
+
+	public Rectangle2D getLayerExtent(String layerName, String srs) throws RemoteServiceException {
+		return getConnector().getLayersExtent(new String[]{layerName}, srs);
+	}
+
+	public RasterProvider load() {
+		return this;
+	}
+
+	public boolean isOpen() {
+		return open;
+	}
+
+	public void close() {
+		open = false;
+	}
+
+	public Transparency getTransparency() {
+		if(fileTransparency == null)
+			fileTransparency = new DataStoreTransparency(getColorInterpretation());
+		return fileTransparency;
+	}
+
+	public URI translateURI(URI uri) {
+		return uri;
+	}
+
+	public void setView(Extent e) {
+		viewRequest = e;
+	}
+
+	public Extent getView() {
+		return viewRequest;
+	}
+
+	public double getWidth() {
+		WMSDataParameters p = (WMSDataParameters)parameters;
+		return p.getWidth();
+	}
+
+	public double getHeight() {
+		WMSDataParameters p = (WMSDataParameters)parameters;
+		return p.getHeight();
+	}
+
+	/**
+	 * Gets WMS parameters
+	 * @return
+	 */
+	public WMSDataParameters getParameters() {
+		return (WMSDataParameters)parameters;
+	}
+
+	public Object readCompleteLine(int line, int band)
+		throws InvalidSetViewException, FileNotOpenException, RasterDriverException {
+		return null;
+	}
+
+	/**
+	 * When the remote layer has fixed size this method downloads the file and return its reference.
+	 * File layer has in the long side FIXED_SIZE pixels and the bounding box is complete. This file could be
+	 * useful to build an histogram or calculate statistics. This represents a sample of data.
+	 * @return
+	 * @throws RasterDriverException
+	 */
+	public File getFileLayer() throws RasterDriverException {
+		if(fileLayerPixelSize != null)
+			return fileLayerPixelSize;
+
+		WMSDataParameters p = (WMSDataParameters)parameters;
+		Extent e = getExtent();
+		Rectangle2D bBox = new Rectangle2D.Double(e.getULX(), e.getLRY(), e.width(), e.height());
+		WMSStatus wmsStatus = loadWMSStatus(bBox);
+
+		if(!p.isSizeFixed()) {
+			int w = 0;
+			int h = 0;
+			if(e.width() > e.height()) {
+				w = FIXED_SIZE;
+				h = (int)((e.height() * FIXED_SIZE) / e.width());
+			} else {
+				h = FIXED_SIZE;
+				w = (int)((e.width() * FIXED_SIZE) / e.height());
+			}
+			wmsStatus.setWidth(w);
+			wmsStatus.setHeight(h);
+			fileLayerPixelSize = downloadFile(wmsStatus, e.getULX(), e.getULY(), e.getLRX(), e.getLRY(), w, h);
+		} else {
+			fileLayerPixelSize = downloadFile(wmsStatus, e.getULX(), e.getULY(), e.getLRX(), e.getLRY(),
+					p.getFixedSize().width, p.getFixedSize().height);
+		}
+		return fileLayerPixelSize;
+	}
+
+	/**
+	 * Reads a complete block of data and returns an tridimensional array of the right type. This function is useful
+	 * to read a file very fast without setting a view. In a WMS service when the size is fixed then it will read the
+	 * entire image but when the source hasn't pixel size it will read a sample of data. This set of data will have
+	 * the size defined in FIXED_SIZE.
+	 *
+	 * @param pos Posici�n donde se empieza  a leer
+	 * @param blockHeight Altura m�xima del bloque leido
+	 * @return Object que es un array tridimendional del tipo de datos del raster. (Bandas X Filas X Columnas)
+	 * @throws InvalidSetViewException
+	 * @throws FileNotOpenException
+	 * @throws RasterDriverException
+	 */
+	public Object readBlock(int pos, int blockHeight, double scale)
+	throws InvalidSetViewException, FileNotOpenException, RasterDriverException, ProcessInterruptedException {
+		File lastFile = getFileLayer();
+		BandList bandList = new BandListImpl();
+		for (int i = 0; i < 3; i++) {
+			try {
+				bandList.addBand(new DatasetBandImpl(lastFile.getPath(), pos, Buffer.TYPE_BYTE, 3));
+			} catch (BandNotFoundInListException e1) {
+			}
+		}
+		bandList.setDrawableBands(new int[]{0, 1, 2});
+
+		try {
+			lastRequestProvider = openLastRequest();
+			return lastRequestProvider.readBlock(pos, blockHeight, scale);
+		} catch (ProviderNotRegisteredException exc) {
+			throw new RasterDriverException("Error building GdalDriver", exc);
+		} catch (InitializeException exc) {
+			throw new RasterDriverException("Error building GdalDriver", exc);
+		}
+	}
+
+	public double getLastRequestHeight() throws RasterDriverException {
+		if(lastRequestProvider == null) {
+			try {
+				lastRequestProvider = openLastRequest();
+			} catch (ProviderNotRegisteredException e) {
+				throw new RasterDriverException("Error building GdalDriver", e);
+			} catch (InitializeException e) {
+				throw new RasterDriverException("Error building GdalDriver", e);
+			}
+		}
+		return lastRequestProvider.getHeight();
+	}
+
+	public double getLastRequestWidth() throws RasterDriverException {
+		if(lastRequestProvider == null) {
+			try {
+				lastRequestProvider = openLastRequest();
+			} catch (ProviderNotRegisteredException e) {
+				throw new RasterDriverException("Error building GdalDriver", e);
+			} catch (InitializeException e) {
+				throw new RasterDriverException("Error building GdalDriver", e);
+			}
+		}
+		return lastRequestProvider.getWidth();
+	}
+
+	public File getLastRequest() {
+		return lastRequest;
+	}
+
+	public Buffer getBufferLastRequest() throws ProcessInterruptedException, RasterDriverException {
+		try {
+			lastRequestProvider = openLastRequest();
+			return getDownloadedRaster(lastRequestProvider);
+		} catch (ProviderNotRegisteredException e) {
+			throw new RasterDriverException("Error building GdalDriver", e);
+		} catch (InitializeException e) {
+			throw new RasterDriverException("Error building GdalDriver", e);
+		} catch (QueryException e) {
+			throw new RasterDriverException("Error building GdalDriver", e);
+		}
+	}
+
+	/**
+	 * Opens the last request downloaded
+	 * @return
+	 * @throws ProviderNotRegisteredException
+	 * @throws InitializeException
+	 * @throws RasterDriverException
+	 */
+	private AbstractRasterProvider openLastRequest() throws ProviderNotRegisteredException, InitializeException, RasterDriverException {
+		if(lastRequestProvider != null)
+			lastRequestProvider.close();
+		File lastFile = getFileLayer();
+		lastRequestProvider = DefaultProviderServices.loadProvider(new File(lastFile.getPath()));
+		setColorTable(lastRequestProvider.getColorTable());
+		return lastRequestProvider;
+	}
+
+	public Object getData(int x, int y, int band)
+		throws InvalidSetViewException, FileNotOpenException, RasterDriverException {
+		return null;
+	}
+
+	/**
+	 * Gets the georeferencing file name form a raster file
+	 * @param file
+	 * a raster file
+	 * @return
+	 * a georeferencing file
+	 */
+	private String getWorldFile(String file){
+		String worldFile = file;
+		int index = file.lastIndexOf(".");
+		if (index > 0){
+			worldFile = file.substring(0, index) + getExtensionWorldFile();
+		}
+		return worldFile;
+	}
+
+	/**
+	 * Obtiene la extensi�n del fichero de georreferenciaci�n
+	 * @return String con la extensi�n del fichero de georreferenciaci�n dependiendo
+	 * del valor del formato obtenido del servidor. Por defecto asignaremos un .wld
+	 */
+	private String getExtensionWorldFile() {
+		WMSDataParameters p = (WMSDataParameters)parameters;
+		String extWorldFile = ".wld";
+		if(p.getFormat().equals("image/tif") || p.getFormat().equals("image/tiff")) {
+			extWorldFile = ".tfw";
+		}
+		return extWorldFile;
+	}
+
+	public WMSStatus loadWMSStatus(Rectangle2D bBox) {
+		WMSDataParameters p = (WMSDataParameters)parameters;
+		WMSStatus wmsStatus = new WMSStatus();
+		wmsStatus.setLayerNames(Utilities.createVector(p.getLayerQuery(), ","));
+		wmsStatus.setSrs(p.getSRSCode());
+		wmsStatus.setFormat(p.getFormat());
+		wmsStatus.setInfoFormat(p.getInfoFormat());
+		List<RemoteWMSStyle> listStyles = p.getStyles();
+		Vector<?> v = listStyles != null ? new Vector<RemoteWMSStyle>(listStyles) : null;
+		wmsStatus.setStyles(v);
+		wmsStatus.setDimensions(p.getDimensions());
+		wmsStatus.setTransparency(p.isWmsTransparent());
+		wmsStatus.setOnlineResource((String) p.getOnlineResource().get("GetMap"));
+		if(p.isSizeFixed()) {
+			wmsStatus.setExtent(getExtent().toRectangle2D());
+		} else
+			wmsStatus.setExtent(bBox);
+		wmsStatus.setHeight(p.getHeight());
+		wmsStatus.setWidth(p.getWidth());
+		wmsStatus.setXyAxisOrder(p.isXyAxisOrder());
+		IProjection proj = getProjection();
+		if(proj != null)
+			wmsStatus.setProjected(proj.isProjected());
+		return wmsStatus;
+	}
+
+	/**
+	 * This function downloads the file and creates the georeferencing file
+	 * @param wmsStatus
+	 * @param ulx
+	 * @param uly
+	 * @param lrx
+	 * @param lry
+	 * @param w
+	 * @param h
+	 * @return
+	 * @throws RasterDriverException
+	 */
+	private File downloadFile(WMSStatus wmsStatus, double ulx, double uly, double lrx, double lry, int w, int h) throws RasterDriverException {
+		WMSDataParameters p = (WMSDataParameters)parameters;
+		try {
+			lastRequest = getConnector().getMap(wmsStatus, ((WMSDataParameters)parameters).getCancellable());
+		} catch (RemoteServiceException e) {
+			throw new RasterDriverException(e.getMessage(), e);
+		}
+
+		if(lastRequest == null)
+			return null;
+
+		String nameWorldFile = getWorldFile(lastRequest.getPath());
+		try {
+			if(p.isSizeFixed()) {
+				Extent e = getExtent();
+				fileUtil.createWorldFile(nameWorldFile, e, p.getWidth(), p.getHeight());
+			} else {
+				fileUtil.createWorldFile(nameWorldFile, new ExtentImpl(ulx, uly, lrx, lry), w, h);
+			}
+		} catch (IOException e) {
+			throw new RasterDriverException("Error creating world file", e);
+		}
+
+		return lastRequest;
+	}
+
+	@Override
+	public void loadBuffer(SpiRasterQuery q)
+			throws ProcessInterruptedException, RasterDriverException {
+		Extent bbox = q.getRequestBoundingBox();
+		lastWidthRequest = q.getBufWidth();
+		lastHeightRequest = q.getBufHeight();
+		WMSStatus wmsStatus = loadWMSStatus(bbox.toRectangle2D());
+
+		lastRequest = downloadFile(wmsStatus,
+				bbox.getULX(),
+				bbox.getULY(),
+				bbox.getLRX(),
+				bbox.getLRY(),
+				q.getBufWidth(),
+				q.getBufHeight());
+
+		if (lastRequest == null) {
+			return;
+		}
+
+		Buffer b = null;
+		try {
+			b = getDownloadedRaster(lastRequest);
+		} catch (QueryException e) {
+			throw new RasterDriverException("Error building GdalDriver", e);
+		} catch (ProviderNotRegisteredException e) {
+			throw new RasterDriverException("Error building GdalDriver", e);
+		} catch (InitializeException e) {
+			throw new RasterDriverException("Error building GdalDriver", e);
+		}
+		q.setBufferResult(b);
+	}
+
+	private Buffer getDownloadedRaster(File f) throws ProcessInterruptedException, QueryException, ProviderNotRegisteredException, InitializeException {
+		AbstractRasterProvider provider = DefaultProviderServices.loadProvider(new File(f.getPath()));
+		setColorTable(provider.getColorTable());
+		return getDownloadedRaster(provider);
+	}
+
+	private Buffer getDownloadedRaster(AbstractRasterProvider provider) throws ProcessInterruptedException, QueryException, ProviderNotRegisteredException, InitializeException {
+		DefaultRasterStore store = new DefaultRasterStore();
+		store.setProvider(provider);
+
+		RasterQuery q = RasterLocator.getManager().createQuery();
+		q.setAreaOfInterest();
+		if(getColorInterpretation() != null)
+			q.setDrawableBands(getColorInterpretation().buildRenderBands());
+		if(store.getBandCount() > 3)
+			q.forceARGBRequest();
+		else
+			q.forceRGBRequest();
+
+		Buffer buf = store.query(q);
+
+		store.close();
+		return buf;
+	}
+
+	/**
+	 * Assigns the list of bands RGB and read a window of data
+	 * @param rasterBuf
+	 * @param bandList
+	 * @param lastFile
+	 * @param ulx
+	 * @param uly
+	 * @param lrx
+	 * @param lry
+	 * @return
+	 * @throws RasterDriverException
+	 * @throws ProcessInterruptedException
+	 */
+	/*public Buffer getBuffer(Buffer rasterBuf, BandList bandList, File lastFile,
+			double ulx, double uly, double lrx, double lry) throws RasterDriverException, ProcessInterruptedException {
+		try {
+			//El nombre de fichero que ha puesto en el bandList es el del servidor y no el del fichero en disco
+			String serverName = bandList.getBand(0).getFileName();
+			for (int i = 0; i < bandList.getBandCount(); i++) {
+				bandList.getBand(i).setFileName(lastFile.getPath());
+			}
+
+			AbstractRasterProvider driver = DefaultProviderServices.loadProvider(new File(lastFile.getPath()));
+			setColorTable(driver.getColorTable());
+
+			DefaultRasterQuery q = (DefaultRasterQuery)RasterLocator.getManager().createQuery();
+			q.setAreaOfInterest(new ExtentImpl(ulx, uly, lrx, lry));
+			q.setBandList(bandList);
+			q.setBuffer(rasterBuf);
+			Buffer buf = driver.getDataSet(q);
+
+			for (int i = 0; i < bandList.getBandCount(); i++) {
+				bandList.getBand(i).setFileName(serverName);
+			}
+
+			return buf;
+		} catch (ProviderNotRegisteredException e) {
+			throw new RasterDriverException("Error building GdalDriver", e);
+		} catch (InitializeException e) {
+			throw new RasterDriverException("Error building GdalDriver", e);
+		}
+	}*/
+
+	/*public void getWindow(Extent ex, int bufWidth, int bufHeight,
+			BandList bandList, TileListener listener, TaskStatus status) throws ProcessInterruptedException, RasterDriverException {
+
+		Buffer raster = DefaultRasterManager.getInstance().createBuffer(getDataType()[0], bufWidth, bufHeight, 3, true);
+		getWindow(ex, bufWidth, bufHeight, bandList, raster, true, null);
+		raster.setDataExtent(ex.toRectangle2D());
+
+		TileCacheManager m = TileCacheLocator.getManager();
+		org.gvsig.raster.cache.tile.Tile t = m.createTile(-1, 0, 0);
+		t.setData(new Object[]{raster});
+		t.setUl(new Point2D.Double(ex.getULX(), ex.getULY()));
+		t.setLr(new Point2D.Double(ex.getLRX(), ex.getLRY()));
+		t.setDownloaderParams("AffineTransform", getAffineTransform());
+		t.setDownloaderParams("Tiling", new Boolean(false));
+		try {
+			listener.tileReady(t);
+		} catch (TileGettingException e) {
+			throw new RasterDriverException("Error throwing a tile", e);
+		}
+
+		//listener.nextBuffer(raster, null, new ExtentImpl(minX, minY, maxX, maxY), getAffineTransform(), null, false);
+		listener.endReading();
+	}*/
+
+	/*public Buffer getWindow(Extent ex, BandList bandList, Buffer rasterBuf, TaskStatus status)
+		throws ProcessInterruptedException, RasterDriverException {
+		Rectangle2D bBox = ex.toRectangle2D();
+		lastWidthRequest = rasterBuf.getWidth();
+		lastHeightRequest = rasterBuf.getHeight();
+		WMSStatus wmsStatus = loadWMSStatus(bBox);
+
+		lastRequest = downloadFile(wmsStatus, ex.getULX(), ex.getULY(), ex.getLRX(), ex.getLRY(), rasterBuf.getWidth(), rasterBuf.getHeight());
+
+		if (lastRequest == null) {
+			return rasterBuf;
+		}
+
+		try {
+			//El nombre de fichero que ha puesto en el bandList es el del servidor y no el del fichero en disco
+			String serverName = bandList.getBand(0).getFileName();
+			for (int i = 0; i < bandList.getBandCount(); i++) {
+				bandList.getBand(i).setFileName(lastRequest.getPath());
+			}
+
+			AbstractRasterProvider driver = DefaultProviderServices.loadProvider(new File(lastRequest.getPath()));
+			setColorTable(driver.getColorTable());
+
+			DefaultRasterQuery q = (DefaultRasterQuery)RasterLocator.getManager().createQuery();
+			q.setAreaOfInterest(ex);
+			q.setBandList(bandList);
+			q.setBuffer(rasterBuf);
+			Buffer buf = driver.getDataSet(q);
+
+			for (int i = 0; i < bandList.getBandCount(); i++) {
+				bandList.getBand(i).setFileName(serverName);
+			}
+			driver.close();
+			return buf;
+		} catch (ProviderNotRegisteredException e) {
+			throw new RasterDriverException("Error building GdalDriver", e);
+		} catch (InitializeException e) {
+			throw new RasterDriverException("Error building GdalDriver", e);
+		}
+	}*/
+
+	/*public Buffer getWindow(double ulx, double uly, double w, double h,
+			BandList bandList, Buffer rasterBuf, boolean adjustToExtent, TaskStatus status) throws ProcessInterruptedException, RasterDriverException {
+		Rectangle2D bBox = new Rectangle2D.Double(ulx, uly, w, h);
+		lastWidthRequest = rasterBuf.getWidth();
+		lastHeightRequest = rasterBuf.getHeight();
+		WMSStatus wmsStatus = loadWMSStatus(bBox);
+
+		lastRequest = downloadFile(wmsStatus, ulx, uly, ulx + w, uly - h, rasterBuf.getWidth(), rasterBuf.getHeight());
+
+		if (lastRequest == null) {
+			return rasterBuf;
+		}
+
+		try {
+			//El nombre de fichero que ha puesto en el bandList es el del servidor y no el del fichero en disco
+			String serverName = bandList.getBand(0).getFileName();
+			for (int i = 0; i < bandList.getBandCount(); i++) {
+				bandList.getBand(i).setFileName(lastRequest.getPath());
+			}
+
+			AbstractRasterProvider driver = DefaultProviderServices.loadProvider(new File(lastRequest.getPath()));
+			setColorTable(driver.getColorTable());
+
+			DefaultRasterQuery q = (DefaultRasterQuery)RasterLocator.getManager().createQuery();
+			q.setAreaOfInterest(ulx, uly, w, h);
+			q.setBandList(bandList);
+			q.setBuffer(rasterBuf);
+			q.setAdjustToExtent(adjustToExtent);
+
+			Buffer buf = driver.getDataSet(q);
+
+			for (int i = 0; i < bandList.getBandCount(); i++) {
+				bandList.getBand(i).setFileName(serverName);
+			}
+
+			return buf;
+		} catch (ProviderNotRegisteredException e) {
+			throw new RasterDriverException("Error building GdalDriver", e);
+		} catch (InitializeException e) {
+			throw new RasterDriverException("Error building GdalDriver", e);
+		}
+	}*/
+
+	/*public Buffer getWindow(Extent extent, int bufWidth, int bufHeight,
+			BandList bandList, Buffer rasterBuf, boolean adjustToExtent, TaskStatus status) throws ProcessInterruptedException, RasterDriverException {
+		Rectangle2D bBox = extent.toRectangle2D();//new Rectangle2D.Double(ulx, lry, Math.abs(lrx - ulx), Math.abs(lry - uly));
+		lastWidthRequest = rasterBuf.getWidth();
+		lastHeightRequest = rasterBuf.getHeight();
+		WMSStatus wmsStatus = loadWMSStatus(bBox);
+		lastRequest = downloadFile(wmsStatus, extent.getULX(), extent.getULY(), extent.getLRX(), extent.getLRY(), rasterBuf.getWidth(), rasterBuf.getHeight());
+
+		if (lastRequest == null) {
+			return rasterBuf;
+		}
+
+		try {
+			//El nombre de fichero que ha puesto en el bandList es el del servidor y no el del fichero en disco
+			String serverName = bandList.getBand(0).getFileName();
+			for (int i = 0; i < bandList.getBandCount(); i++) {
+				bandList.getBand(i).setFileName(lastRequest.getPath());
+			}
+
+			AbstractRasterProvider driver = DefaultProviderServices.loadProvider(new File(lastRequest.getPath()));
+			setColorTable(driver.getColorTable());
+
+			DefaultRasterQuery q = (DefaultRasterQuery)RasterLocator.getManager().createQuery();
+			q.setAreaOfInterest(extent, bufWidth, bufHeight);
+			q.setBandList(bandList);
+			q.setBuffer(rasterBuf);
+			q.setAdjustToExtent(adjustToExtent);
+			Buffer buf = driver.getDataSet(q);
+
+			for (int i = 0; i < bandList.getBandCount(); i++) {
+				bandList.getBand(i).setFileName(serverName);
+			}
+
+			return buf;
+		} catch (ProviderNotRegisteredException e) {
+			throw new RasterDriverException("Error building GdalDriver", e);
+		} catch (InitializeException e) {
+			throw new RasterDriverException("Error building GdalDriver", e);
+		}
+	}*/
+
+//	public Buffer getWindow(int x, int y,
+//			BandList bandList, Buffer rasterBuf) throws ProcessInterruptedException, RasterDriverException {
+//		int w = rasterBuf.getWidth();
+//		int h = rasterBuf.getHeight();
+//		Point2D p1 = rasterToWorld(new Point2D.Double(x, y));
+//		Point2D p2 = rasterToWorld(new Point2D.Double(x + w, y + h));
+//		lastWidthRequest = rasterBuf.getWidth();
+//		lastHeightRequest = rasterBuf.getHeight();
+//		Rectangle2D bBox = new Rectangle2D.Double(p1.getX(), p1.getY(), Math.abs(p1.getX() - p1.getX()), Math.abs(p1.getY() - p2.getY()));
+//		WMSStatus wmsStatus = loadWMSStatus(bBox);
+//
+//		lastRequest = downloadFile(wmsStatus, p1.getX(), p1.getY(), p2.getX(), p2.getY(), rasterBuf.getWidth(), rasterBuf.getHeight());
+//
+//		if (lastRequest == null) {
+//			return rasterBuf;
+//		}
+//
+//		AbstractRasterProvider driver = null;
+//		try {
+//			//El nombre de fichero que ha puesto en el bandList es el del servidor y no el del fichero en disco
+//			String serverName = bandList.getBand(0).getFileName();
+//			for (int i = 0; i < bandList.getBandCount(); i++) {
+//				bandList.getBand(i).setFileName(lastRequest.getPath());
+//			}
+//
+//			driver = DefaultProviderServices.loadProvider(new File(lastRequest.getPath()));
+//			Buffer buf = driver.getWindow(0, 0, w, h, bandList, rasterBuf);
+//
+//			for (int i = 0; i < bandList.getBandCount(); i++) {
+//				bandList.getBand(i).setFileName(serverName);
+//			}
+//
+//			return buf;
+//		} catch (ProviderNotRegisteredException e) {
+//			throw new RasterDriverException("Error building GdalDriver", e);
+//		} catch (InitializeException e) {
+//			throw new RasterDriverException("Error building GdalDriver", e);
+//		}
+//	}
+
+	/*public Buffer getWindow(int x, int y, int w, int h,
+			BandList bandList, Buffer rasterBuf, TaskStatus status) throws ProcessInterruptedException, RasterDriverException {
+		Point2D p1 = rasterToWorld(new Point2D.Double(x, y));
+		Point2D p2 = rasterToWorld(new Point2D.Double(x + w, y + h));
+		lastWidthRequest = rasterBuf.getWidth();
+		lastHeightRequest = rasterBuf.getHeight();
+		Rectangle2D bBox = new Rectangle2D.Double(p1.getX(), p1.getY(), Math.abs(p1.getX() - p1.getX()), Math.abs(p1.getY() - p2.getY()));
+		WMSStatus wmsStatus = loadWMSStatus(bBox);
+
+		lastRequest = downloadFile(wmsStatus, p1.getX(), p1.getY(), p2.getX(), p2.getY(), rasterBuf.getWidth(), rasterBuf.getHeight());
+
+		if (lastRequest == null) {
+			return rasterBuf;
+		}
+
+		AbstractRasterProvider driver = null;
+		try {
+			//El nombre de fichero que ha puesto en el bandList es el del servidor y no el del fichero en disco
+			String serverName = bandList.getBand(0).getFileName();
+			for (int i = 0; i < bandList.getBandCount(); i++) {
+				bandList.getBand(i).setFileName(lastRequest.getPath());
+			}
+
+			driver = DefaultProviderServices.loadProvider(new File(lastRequest.getPath()));
+			setColorTable(driver.getColorTable());
+
+			DefaultRasterQuery q = (DefaultRasterQuery)RasterLocator.getManager().createQuery();
+			q.setAreaOfInterest(0, 0, w, h);
+			q.setBandList(bandList);
+			q.setBuffer(rasterBuf);
+			Buffer buf = driver.getDataSet(q);
+
+			for (int i = 0; i < bandList.getBandCount(); i++) {
+				bandList.getBand(i).setFileName(serverName);
+			}
+
+			return buf;
+		} catch (ProviderNotRegisteredException e) {
+			throw new RasterDriverException("Error building GdalDriver", e);
+		} catch (InitializeException e) {
+			throw new RasterDriverException("Error building GdalDriver", e);
+		}
+	}*/
+
+	public Image getImageLegend() {
+		try {
+			WMSStatus wmsStatus = loadWMSStatus(getExtent().toRectangle2D());
+			wmsStatus.setOnlineResource((String) getParameters().getOnlineResource().get("GetCapabilities"));
+			File file = getConnector().getLegendGraphic(wmsStatus, getParameters().getLayerQuery(), null);
+			Image img = null;
+			if ((file != null) && (file.length() > 0)) {
+				img = new ImageIcon(file.getAbsolutePath()).getImage();
+			}
+			return img;
+		} catch (Exception e) {
+			logger.info("Problems in GetLegendGraphic", e);
+		}
+		return null;
+	}
+
+	public int getBlockSize() {
+		return 0;
+	}
+
+	public void setAffineTransform(AffineTransform t){
+
+	}
+
+	public int getOverviewCount(int band) throws BandAccessException, RasterDriverException {
+		return 0;
+	}
+
+	public int getOverviewWidth(int band, int overview) throws BandAccessException, RasterDriverException {
+		return 0;
+	}
+
+	public int getOverviewHeight(int band, int overview) throws BandAccessException, RasterDriverException {
+		return 0;
+	}
+
+	public boolean isOverviewsSupported() {
+		return false;
+	}
+
+	public boolean isReproyectable() {
+		return false;
+	}
+
+	public String getProviderName() {
+		return NAME;
+	}
+
+	public String getName() {
+		return this.getParameters().getName();
+	}
+
+	public String getFullName() {
+		return getURI().getPath();
+	}
+
+	/**
+	 * Convierte un punto desde coordenadas pixel a coordenadas del mundo.
+	 * @param pt Punto a transformar
+	 * @return punto transformado en coordenadas del mundo
+	 */
+	public Point2D rasterToWorld(Point2D pt) {
+		Point2D p = new Point2D.Double();
+		getAffineTransform().transform(pt, p);
+		return p;
+	}
+
+	/**
+	 * Convierte un punto desde del mundo a coordenadas pixel.
+	 * @param pt Punto a transformar
+	 * @return punto transformado en coordenadas pixel
+	 */
+	public Point2D worldToRaster(Point2D pt) {
+		Point2D p = new Point2D.Double();
+		try {
+			getAffineTransform().inverseTransform(pt, p);
+		} catch (NoninvertibleTransformException e) {
+			return pt;
+		}
+		return p;
+	}
+
+	public void setStatus(RasterProvider provider) {
+		if(provider instanceof WMSProvider) {
+		}
+	}
+
+	/**
+	 * ASigna el par�metro de inicializaci�n del driver.
+	 */
+	public void setParam(DataStoreProviderServices storeServices, DataStoreParameters param) {
+		if(param instanceof WMSDataParameters)
+			this.uri = ((WMSDataParameters)param).getURI();
+		this.param = param;
+	}
+
+
+
+	public String getInfoByPoint(int x, int y, Extent bbox, int w, int h, ICancellable cancellable) throws InfoByPointException {
+		WMSDataParameters p = (WMSDataParameters)parameters;
+		WMSStatus wmsStatus = new WMSStatus();
+		wmsStatus.setLayerNames(Utilities.createVector(p.getLayerQuery(), ","));
+		wmsStatus.setSrs(p.getSRSCode());
+		wmsStatus.setFormat(p.getFormat());
+		wmsStatus.setInfoFormat(p.getInfoFormat());
+		List<RemoteWMSStyle> listStyles = p.getStyles();
+		Vector<?> v = listStyles != null ? new Vector<RemoteWMSStyle>(listStyles) : null;
+		wmsStatus.setStyles(v);
+		wmsStatus.setDimensions(p.getDimensions());
+		wmsStatus.setTransparency(p.isWmsTransparent());
+		wmsStatus.setOnlineResource((String) p.getOnlineResource().get("GetMap"));
+		wmsStatus.setExtent(bbox.toRectangle2D());
+		wmsStatus.setHeight(h);
+		wmsStatus.setWidth(w);
+		wmsStatus.setXyAxisOrder(p.isXyAxisOrder());
+
+		try {
+			return getConnector().getFeatureInfo(wmsStatus, x, y, Integer.MAX_VALUE, cancellable);
+		} catch (RemoteServiceException e) {
+			throw new InfoByPointException("Error in getFeatureInfo", e);
+		}
+	}
+
+	/**
+	 * Gets the suffix of the downloaded image
+	 * @return
+	 */
+	public String getFileSuffix() {
+		WMSDataParameters p = (WMSDataParameters)parameters;
+		String format = p.getFormat();
+		if (format == null){
+			return "xml";
+		}
+		if (format.indexOf("png") >= 0){
+	        return "png";
+		}
+	    if (format.indexOf("xml") >= 0){
+	        return "xml";
+	    }
+	    if (format.indexOf("gif") >= 0){
+	        return "gif";
+	    }
+	    if (format.indexOf("tif") >= 0){
+	        return "tif";
+	    }
+	    if (format.indexOf("bmp") >= 0){
+	        return "bmp";
+	    }
+	    if (format.indexOf("jpg") >= 0
+	        || format.indexOf("jpeg") >= 0){
+	        return "jpg";
+	    }
+		return "xml";
+	}
+
+	public TileServer getTileServer() {
+		if(tileServer == null) {
+			DefaultRasterStore store = new DefaultRasterStore();
+			store.setProvider(this);
+			tileServer = new WMSTileServer(store);
+		}
+		return tileServer;
+	}
+
+	public boolean isRasterEnclosed() {
+		WMSDataParameters p = (WMSDataParameters)parameters;
+		if(p.isSizeFixed()) {
+			return false;
+		}
+		return true;
+	}
+
+	public File getRMFFile() {
+		if(lastRequest != null)
+		    return new File(FilenameUtils.removeExtension(lastRequest.getAbsolutePath()) + ".rmf");
+		return null;
+	}
+
+	public HistogramComputer getHistogramComputer() {
+		if (histogram == null)
+			histogram = new RemoteStoreHistogram(this);
+		return histogram;
+	}
+
+    /* (non-Javadoc)
+     * @see org.gvsig.raster.impl.provider.RasterProvider#addFile(java.io.File)
+     */
+    @Override
+    public void addFile(File file) throws InvalidSourceException {
+        //do nothing
+    }
+
+    /* (non-Javadoc)
+     * @see org.gvsig.raster.impl.provider.RasterProvider#removeFile(java.io.File)
+     */
+    @Override
+    public void removeFile(File file) {
+        //do nothing
+    }
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/WMSProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/WMSServerExplorerParameters.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/WMSServerExplorerParameters.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/WMSServerExplorerParameters.java	(revision 21019)
@@ -0,0 +1,227 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+* MA  02110-1301, USA.
+*
+*/
+
+/*
+* AUTHORS (In addition to CIT):
+* 2009 IVER T.I   {{Task}}
+*/
+
+package org.gvsig.raster.wms.io;
+
+import org.apache.commons.lang3.StringUtils;
+import org.gvsig.fmap.dal.DataServerExplorerParameters;
+import org.gvsig.fmap.dal.spi.AbstractDataServerExplorerParameters;
+import org.gvsig.raster.impl.store.AbstractRasterDataParameters;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.dynobject.DelegatedDynObject;
+import org.gvsig.tools.dynobject.DynClass;
+import org.gvsig.tools.dynobject.DynStruct;
+import org.gvsig.tools.persistence.PersistenceManager;
+import org.gvsig.tools.persistence.PersistentState;
+import org.gvsig.tools.persistence.exception.PersistenceException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Parameters for the WMS provider
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class WMSServerExplorerParameters extends AbstractDataServerExplorerParameters implements DataServerExplorerParameters {
+	protected static final String  FIELD_HOST          = "host";
+	protected static DynClass      DYNCLASS            = null;
+	private DelegatedDynObject     delegatedDynObject  = null;
+	private static final String    FIELD_XYAXISORDER   = "xyaxisorder";
+    private static final String    OLD_FIELD_AXISORDER   = "axisorder";
+
+    @SuppressWarnings("unused")
+    private static final Logger logger = LoggerFactory.getLogger(WMSServerExplorerParameters.class);
+
+	/**
+	 *
+	 */
+	public WMSServerExplorerParameters() {
+		super();
+		initialize();
+	}
+
+	protected void initialize() {
+		this.delegatedDynObject = (DelegatedDynObject) ToolsLocator
+				.getDynObjectManager().createDynObject(
+						registerDynClass());
+	}
+
+	/**
+	 * @return the dynstruct
+	 */
+	public static DynStruct registerDynClass() {
+		PersistenceManager manager = ToolsLocator.getPersistenceManager();
+		DynStruct definition = manager.getDefinition("WMSServerExplorerParameters_Persistent");
+		if( definition == null ) {
+			definition = manager.addDefinition(
+					WMSServerExplorerParameters.class,
+					"WMSServerExplorerParameters_Persistent",
+					"WMS Explorer DataParameters Persistency",
+					null,
+					null
+			);
+		}
+
+		AbstractRasterDataParameters.registerDynClass(definition);
+
+		definition.addDynFieldBoolean(FIELD_XYAXISORDER)
+		.setDescription("Longitude first in axis order")
+		.setMandatory(false).setDefaultFieldValue(new Boolean(false));
+
+		definition.addDynFieldString(FIELD_HOST)
+		.setDescription("Uniform Resource Identifier (File name or URL)")
+		.setMandatory(false);
+		return definition;
+	}
+
+	protected DelegatedDynObject getDelegatedDynObject() {
+		return delegatedDynObject;
+	}
+
+	/**
+	 * Gets the assigned host
+	 * @return the value of host field
+	 */
+	public String getHost() {
+		return (String) this.getDynValue(FIELD_HOST);
+	}
+
+	/**
+	 * Assign the host to this explorer
+	 * @param host
+	 */
+	public void setHost(String host) {
+		this.setDynValue(FIELD_HOST, host);
+	}
+
+	/**
+	 * @return the provider name
+	 */
+	public String getDataStoreName() {
+		return WMSProvider.NAME;
+	}
+
+    /**
+     * @return the provider description
+     */
+	public String getDescription() {
+		return WMSProvider.DESCRIPTION;
+	}
+
+	public String getExplorerName() {
+		return WMSServerExplorer.NAME;
+	}
+
+	/**
+	 * <p>Gets the behaviour of the WMS client with regards the axis order</p>
+	 *
+	 * <p>Returns <code>true</code> if the WMS parser should assume that the
+	 * order of the coordinates follows the XY axis order
+	 * (the first coordinate corresponds to the horizontal X
+	 * axis, while the second  coordinate corresponds to the
+	 * vertical Y axis), regardless the protocol version and CRS in use.</p>
+	 *
+	 * <p>Returns <code>false</code> if the WMS parser should decide the
+	 * axis order based on the protocol version and the coordinate
+	 * reference system (CRS) in use. In particular, if protocol
+	 * version is >= 1.3.0, then the WMS parser assumes
+	 * the axis order defined in the official EPSG registry for the
+	 * CRS in use. For versions < 1.3.0, the XY axis order is assumed.</p>
+	 *
+	 * <p>The default value is <code>false</code></p>.
+	 * @see #setXyAxisOrder(boolean)
+	 * @return true if axis order is x-y
+	 */
+	public boolean isXyAxisOrder() {
+		if (hasDynValue(FIELD_XYAXISORDER)) {
+			Object obj = getDynValue(FIELD_XYAXISORDER);
+			if(obj instanceof Boolean) {
+				Boolean b = (Boolean)getDynValue(FIELD_XYAXISORDER);
+				if(b != null)
+					return ((Boolean)b).booleanValue();
+			}
+			if(obj instanceof String) {
+				String b = (String)getDynValue(FIELD_XYAXISORDER);
+				if(b != null)
+					return new Boolean(((String)b));
+			}
+		}
+		return false;
+	}
+
+	/**
+	 * <p>Sets the behaviour of the WMS client with regards the axis order.<p>
+	 *
+	 * <p>If set to <code>true</code>, then the XY axis order
+	 * is assumed for all the WMS
+	 * protocol versions and coordinate reference systems.</p>
+	 *
+	 * <p>If set to <code>false</code>
+	 * then the WMS parser will decide the axis order based on
+	 * the protocol version and the coordinate reference system (CRS)
+	 * in use. In particular, if protocol
+	 * version is >= 1.3.0, then the WMS parser assumes
+	 * the axis order defined in the official EPSG registry for the
+	 * CRS in use. For versions < 1.3.0, the XY axis order is assumed.</p>
+	 *
+	 *
+	 * @param assumeXY
+	 * @see #isXyAxisOrder()
+	 */
+	public void setXyAxisOrder(boolean assumeXY) {
+		this.setDynValue(FIELD_XYAXISORDER, new Boolean(assumeXY));
+	}
+
+
+    public void loadFromState(PersistentState state) throws PersistenceException {
+        super.loadFromState(state);
+
+        // Entre la 2.1 y la 2.2 cambi� la clave de la propiedad axisorder a xyaxisorder
+        // El siguiente bloque try catch es para mantener compatibilidad con los proyectos de ambas versiones
+        try {
+            setDynValue(FIELD_XYAXISORDER, state.get(OLD_FIELD_AXISORDER));
+        } catch(Throwable t){
+            //do nothing;
+        }
+    }
+
+
+    public void setDynValue(String name, Object value) {
+        if (OLD_FIELD_AXISORDER.equalsIgnoreCase(name)) {
+            super.setDynValue(FIELD_XYAXISORDER, value);
+        } else {
+            super.setDynValue(name, value);
+        }
+    }
+
+    @Override
+    public boolean isTheSameServerExplorer(DataServerExplorerParameters params) {
+        if(!(params instanceof WMSServerExplorerParameters)){
+            return false;
+        }
+        return StringUtils.equals(this.getHost(), ((WMSServerExplorerParameters)params).getHost());
+    }
+}

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/WMSServerExplorerParameters.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/RemoteWMSStyle.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/RemoteWMSStyle.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/RemoteWMSStyle.java	(revision 21019)
@@ -0,0 +1,213 @@
+package org.gvsig.raster.wms.io;
+
+import java.lang.reflect.Field;
+
+import org.gvsig.remoteclient.wms.WMSStyle;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.dynobject.DynStruct;
+import org.gvsig.tools.persistence.PersistenceManager;
+import org.gvsig.tools.persistence.Persistent;
+import org.gvsig.tools.persistence.PersistentState;
+import org.gvsig.tools.persistence.exception.PersistenceException;
+
+/**
+ * Just a C-struct-like class.
+ * @author jaume
+ *
+ */
+public class RemoteWMSStyle implements Persistent {
+	/*
+	 * Please! ensure that the fields are double, int, or Object
+	 * or otherwise add the corresponding entry in the clone() method.
+	 */
+    public String name;
+    public String title;
+    public String styleAbstract;
+    public String format;
+    public String type;
+    public String href;
+    public WMSLayerNode parent;
+    public int legendHeight;
+    public int legendWidth;
+    
+	public void loadFromState(PersistentState state) throws PersistenceException {
+		this.name = state.getString("name");
+		this.title = state.getString("title");
+		this.styleAbstract = state.getString("styleAbstract");
+		this.format = state.getString("format");
+		this.type = state.getString("type");
+		this.href = state.getString("href");
+		this.parent = (WMSLayerNode)state.get("parent");
+		this.legendHeight = state.getInt("legendHeight");
+		this.legendWidth = state.getInt("legendWidth");
+	}
+
+	public void saveToState(PersistentState state) throws PersistenceException {
+		state.set("parent", parent);	
+		state.set("name", name);	
+		state.set("title", title);	
+		state.set("styleAbstract", styleAbstract);	
+		state.set("format", format);	
+		state.set("type", type);	
+		state.set("href", href);
+		state.set("legendHeight", legendHeight);
+		state.set("legendWidth", legendWidth);
+	}	
+    
+    public static void registerPersistent() {
+		PersistenceManager manager = ToolsLocator.getPersistenceManager();
+		DynStruct definition = manager.getDefinition("RemoteWMSStyle_Persistent");
+		if( definition == null ) {
+			definition = manager.addDefinition(
+					RemoteWMSStyle.class,
+					"RemoteWMSStyle_Persistent",
+					"RemoteWMSStyle Persistence",
+					null, 
+					null
+			);
+		}
+
+		definition.addDynFieldInt("legendHeight").setMandatory(false);
+		definition.addDynFieldInt("legendWidth").setMandatory(false);
+		definition.addDynFieldObject("parent").setClassOfValue(WMSLayerNode.class).setMandatory(false);
+		definition.addDynFieldString("name").setMandatory(false);		
+		definition.addDynFieldString("title").setMandatory(false);
+		definition.addDynFieldString("styleAbstract").setMandatory(false);
+		definition.addDynFieldString("format").setMandatory(false);
+		definition.addDynFieldString("type").setMandatory(false);
+		definition.addDynFieldString("href").setMandatory(false);
+	}
+    
+    /*
+	 * Please! ensure that the fields are double, int, or Object
+	 * or otherwise add the corresponding entry in the clone() method.
+	 */
+
+    /**
+     * Creates a new instance of FMapWMSStyle
+     * @param uri
+     * @param title
+     * @param styleAbstract
+     * @param parent
+     */
+    public RemoteWMSStyle(WMSStyle style, WMSLayerNode parent){
+
+        this.name = style.getName();
+        this.title = style.getTitle();
+        this.styleAbstract = style.getAbstract();
+        this.legendWidth = style.getLegendURLWidth();
+        this.legendHeight = style.getLegendURLHeight();
+        this.format = style.getLegendURLFormat();
+        this.href = style.getLegendURLOnlineResourceHRef();
+        this.type = style.getLegendURLOnlineResourceType();
+        this.parent = parent;
+    }
+
+    public RemoteWMSStyle() {
+		// TODO Auto-generated constructor stub
+	}
+
+	public String toString(){
+        return name;
+    }
+
+    public Object clone() throws CloneNotSupportedException {
+    	RemoteWMSStyle clone = new RemoteWMSStyle();
+        Field[] fields = RemoteWMSStyle.class.getFields();
+        for (int i = 0; i < fields.length; i++) {
+        	try {
+        		Class<?> clazz = getClass();
+        		String fieldName = fields[i].getName();
+        		// int entry
+				if (fields[i].getType().equals(Integer.class)) {
+					clazz.getField(fieldName).
+					setInt(clone, clazz.getField(fieldName)
+								.getInt(this));
+				// double entry
+				} else if (fields[i].getType().equals(Double.class)) {
+					clazz.getField(fieldName).
+					setDouble(clone, clazz.getField(fieldName)
+							.getDouble(this));
+				// any object entry
+				} else {
+					clazz.getField(fieldName).
+					set(clone, clazz.getField(fieldName)
+							.get(this));
+				}
+			} catch (Exception e) {
+				throw new CloneNotSupportedException("Reflect error when cloning " +
+						"'"+fields[i].getName()+"' field " +
+						"(FMapWMSStyle)");
+			}
+		}
+        return clone;
+    }
+
+	public String getName() {
+		return name;
+	}
+
+	public String getTitle() {
+		return title;
+	}
+
+	public String getStyleAbstract() {
+		return styleAbstract;
+	}
+
+	public String getFormat() {
+		return format;
+	}
+
+	public String getType() {
+		return type;
+	}
+
+	public String getHref() {
+		return href;
+	}
+
+	public WMSLayerNode getParent() {
+		return parent;
+	}
+
+	public int getLegendHeight() {
+		return legendHeight;
+	}
+
+	public int getLegendWidth() {
+		return legendWidth;
+	}
+	
+	public void setParent(WMSLayerNode node) {
+		this.parent = node;
+	}
+	
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public void setTitle(String title) {
+		this.title = title;
+	}
+
+	public void setStyleAbstract(String sa) {
+		this.styleAbstract = sa;
+	}
+
+	public void setType(String type) {
+		this.type = type;
+	}
+
+	public void setHref(String href) {
+		this.href = href;
+	}
+
+	public void setLegendHeight(int lHeight) {
+		this.legendHeight = lHeight;
+	}
+
+	public void setLegendWidth(int lWidth) {
+		this.legendWidth = lWidth;
+	}
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/RemoteWMSStyle.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/WMSDataParameters.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/WMSDataParameters.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/WMSDataParameters.java	(revision 21019)
@@ -0,0 +1,195 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+* MA  02110-1301, USA.
+*
+*/
+package org.gvsig.raster.wms.io;
+
+import java.awt.Dimension;
+import java.awt.geom.Rectangle2D;
+import java.net.URI;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+
+import org.gvsig.compat.net.ICancellable;
+import org.gvsig.fmap.dal.coverage.store.parameter.RemoteStoreParameters;
+
+/**
+ * Parameters for the WMS provider
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public interface WMSDataParameters extends RemoteStoreParameters {
+
+	public void setLayerQuery(String string);
+
+	public void setInfoLayerQuery(String string);
+
+	/**
+	 * Sets the info by point format
+	 */
+	public void setInfoFormat(String format);
+
+	/**
+	 * Gets the info by point format
+	 * @return
+	 */
+	public String getInfoFormat();
+
+	public void setFormat(String string);
+
+	public void setSRS(String string);
+
+	public void setWmsTransparency(boolean boolean1);
+
+	public void setURI(URI uri);
+
+	public void setStyles(List<RemoteWMSStyle> styles);
+
+	/**
+	 * Sets the dimension vector that is a list of key-value pairs containing
+	 * the name of the dimension and the value for it
+	 * @param dimensions
+	 */
+	public void setDimensions(Vector<String> dimensions);
+
+	/**
+	 * Sets the set of URLs that should be accessed for each operation performed
+	 * to the server.
+	 *
+	 * @param onlineResources
+	 */
+	public void setOnlineResources(Map<String, String> onlineResources);
+
+	public void setQueryable(boolean boolean1);
+
+	public void setFixedSize(Dimension dimension);
+
+	public URI getURI();
+
+	public String getInfoLayerQuery();
+
+	public String getLayerQuery();
+
+	public String getFormat();
+
+	public String getSRSCode();
+
+	/**
+	 * @return Returns the wmsTransparency.
+	 */
+	public boolean isWmsTransparent();
+
+	public List<RemoteWMSStyle> getStyles();
+
+	public Vector<String> getDimensions();
+
+	/**
+	 * Gets the URL that should be accessed for an operation performed
+	 * to the server.
+	 *
+	 * @param onlineResources
+	 */
+	public String getOnlineResource(String operation);
+
+	/**
+	 * Gets the online resource map
+	 *
+	 * @param onlineResources
+	 */
+	public Map<String,String> getOnlineResource();
+
+	/**
+	 * If it is true, this layer accepts GetFeatureInfo operations. This WMS operations
+	 * maps to FMap's infoByPoint(p) operation.
+	 */
+	public boolean isQueryable();
+
+	public Dimension getFixedSize();
+
+	/**
+	 * Sets the bounding box of the request
+	 */
+	public void setExtent(Rectangle2D bBox);
+
+	/**
+	 * Gets the bounding box of the request
+	 * @return
+	 */
+	public Rectangle2D getExtent();
+
+	public void setCancellable(ICancellable cancel);
+
+	public Object getSRS();
+
+	public void setOverrideHost(boolean b);
+
+	public void setName(String title);
+
+        public String getName();
+
+	public int getWidth();
+
+	public int getHeight();
+
+	public ICancellable getCancellable();
+
+	/**
+	 * <p>Gets the behaviour of the parser with regards the axis order</p>
+	 *
+	 * <p>Returns <code>true</code> if the WMS parser should assume that the
+	 * order of the coordinates follows the XY axis order
+	 * (the first coordinate corresponds to the horizontal X
+	 * axis, while the second  coordinate corresponds to the
+	 * vertical Y axis), regardless the protocol version and CRS in use.</p>
+	 *
+	 * <p>Returns <code>false</code> if the WMS parser should decide the
+	 * axis order based on the protocol version and the coordinate
+	 * reference system (CRS) in use. In particular, if protocol
+	 * version is >= 1.3.0, then the WMS parser assumes
+	 * the axis order defined in the official EPSG registry for the
+	 * CRS in use. For versions < 1.3.0, the XY axis order is assumed.</p>
+	 *
+	 * <p>The default value is <code>false</code></p>.
+	 * @see #setXyAxisOrder(boolean)
+	 * @return
+	 */
+	public boolean isXyAxisOrder();
+
+	/**
+	 * <p>Sets the behaviour of the parser with regards the axis order.<p>
+	 *
+	 * <p>If set to <code>true</code>, then the XY axis order
+	 * is assumed for all the WMS
+	 * protocol versions and coordinate reference systems.</p>
+	 *
+	 * <p>If set to <code>false</code>
+	 * then the WMS parser will decide the axis order based on
+	 * the protocol version and the coordinate reference system (CRS)
+	 * in use. In particular, if protocol
+	 * version is >= 1.3.0, then the WMS parser assumes
+	 * the axis order defined in the official EPSG registry for the
+	 * CRS in use. For versions < 1.3.0, the XY axis order is assumed.</p>
+	 *
+	 *
+	 * @param assumeXY
+	 * @see #isXyAxisOrder()
+	 */
+	public void setXyAxisOrder(boolean assumeXY);
+}

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/WMSDataParameters.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/WMSDataParametersImpl.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/WMSDataParametersImpl.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/WMSDataParametersImpl.java	(revision 21019)
@@ -0,0 +1,520 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+* MA  02110-1301, USA.
+*
+*/
+
+package org.gvsig.raster.wms.io;
+
+import java.awt.Dimension;
+import java.awt.geom.Rectangle2D;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+
+import org.gvsig.compat.net.ICancellable;
+import org.gvsig.fmap.crs.CRSFactory;
+import org.gvsig.fmap.dal.DataStoreParameters;
+import org.gvsig.fmap.dal.coverage.store.RasterDataServerExplorer;
+import org.gvsig.fmap.dal.coverage.store.parameter.RasterDataParameters;
+import org.gvsig.raster.impl.store.AbstractRasterDataParameters;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.dynobject.DelegatedDynObject;
+import org.gvsig.tools.dynobject.DynClass;
+import org.gvsig.tools.dynobject.DynStruct;
+import org.gvsig.tools.persistence.PersistenceManager;
+
+/**
+ * Parameters for the WMS provider
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class WMSDataParametersImpl extends AbstractRasterDataParameters implements WMSDataParameters {
+	private static final String      FIELD_FORMAT          = "format";
+	private static final String      FIELD_INFOFORMAT      = "infoformat";
+	private static final String      FIELD_LAYERQUERY      = "layer_query";
+	private static final String      FIELD_NAME            = "name";
+	private static final String      FIELD_SRSSTR          = "srsstr";
+	private static final String      FIELD_TRANSPARENCY    = "transparency";
+	private static final String      FIELD_INFOLAYERQUERY  = "infolayerquery";
+	private static final String      FIELD_QUERYABLE       = "queryable";
+	private static final String      FIELD_OVERRIDE        = "override";
+	private static final String      FIELD_STYLES          = "styles";
+	private static final String      FIELD_DIMENSIONS      = "dimensions";
+	private static final String      FIELD_ONLINERESOURC   = "onlineresources";
+	private static final String      FIELD_FIXEDSIZE       = "fixedsize";
+	private static final String      FIELD_EXTENT          = "extent";
+	private static final String      FIELD_WIDTH           = "width";
+	private static final String      FIELD_HEIGHT          = "height";
+	private static final String      FIELD_DELETECACHE     = "deletecache";
+	private static final String      FIELD_ASSUMEXYAXISORDER = "assumeXY";
+	
+	private DelegatedDynObject       delegatedDynObject    = null;
+	protected static DynClass        DYNCLASS              = null;
+	private ICancellable             cancel                = null;
+	
+	public WMSDataParametersImpl() {
+		super();
+		initialize();
+	}
+	
+	protected void initialize() {
+		this.delegatedDynObject = (DelegatedDynObject) ToolsLocator
+				.getDynObjectManager().createDynObject(registerDynClass());
+	}
+	
+	public static DynStruct registerDynClass() {
+		PersistenceManager manager = ToolsLocator.getPersistenceManager();
+		DynStruct definition = manager.getDefinition("WMSDataParameters_Persistent");
+		if( definition == null ) {
+			definition = manager.addDefinition(
+					WMSDataParametersImpl.class,
+					"WMSDataParameters_Persistent",
+					"WMS DataParameters Persistency",
+					null, 
+					null
+			);
+		}
+
+		AbstractRasterDataParameters.registerDynClass(definition);
+		
+		definition.addDynFieldObject(FIELD_EXTENT)
+		.setDescription("Bounding box")
+		.setClassOfValue(Rectangle2D.class)
+		.setMandatory(false);
+		
+		definition.addDynFieldInt(FIELD_WIDTH)
+		.setDescription("Width")
+		.setMandatory(false);
+		
+		definition.addDynFieldInt(FIELD_HEIGHT)
+		.setDescription("Height")
+		.setMandatory(false);
+		
+		definition.addDynFieldString(FIELD_FORMAT)
+		.setDescription("Format")
+		.setMandatory(false);
+		
+		definition.addDynFieldString(FIELD_INFOFORMAT)
+		.setDescription("Info by point format")
+		.setMandatory(false);
+		
+		definition.addDynFieldString(FIELD_LAYERQUERY)
+		.setDescription("Layer Query")
+		.setMandatory(false);
+		
+		definition.addDynFieldString(FIELD_NAME)
+		.setDescription("Name")
+		.setMandatory(false);			
+		
+		definition.addDynFieldString(FIELD_SRSSTR)
+		.setDescription("String that represents the SRS")
+		.setMandatory(false);
+		
+		definition.addDynFieldBoolean(FIELD_TRANSPARENCY)
+		.setDescription("Transparency")
+		.setMandatory(false);
+		
+		definition.addDynFieldString(FIELD_INFOLAYERQUERY)
+		.setDescription("InfoLayerQuery")
+		.setMandatory(false);
+		
+		definition.addDynFieldBoolean(FIELD_QUERYABLE)
+		.setDescription("Queryable")
+		.setMandatory(false);
+		
+		definition.addDynFieldBoolean(FIELD_OVERRIDE)
+		.setDescription("Override a host capabilities")
+		.setMandatory(false);
+		
+		definition.addDynFieldList(FIELD_STYLES)
+		.setDescription("Styles")
+		.setClassOfItems(RemoteWMSStyle.class)
+		.setMandatory(false);
+		
+		definition.addDynFieldList(FIELD_DIMENSIONS)
+		.setDescription("Dimensions")
+		.setClassOfItems(String.class)
+		.setMandatory(false);
+		
+		definition.addDynFieldMap(FIELD_ONLINERESOURC)
+		.setDescription("online resources")
+		.setClassOfItems(String.class)
+		.setMandatory(false);
+		
+		definition.addDynFieldObject(FIELD_FIXEDSIZE)
+		.setDescription("Fixed size")
+		.setClassOfValue(Dimension.class)
+		.setMandatory(false);
+		
+		definition.addDynFieldBoolean(FIELD_DELETECACHE)
+		.setDescription("Flag to delete cache the next request")
+		.setMandatory(false);
+
+		definition.addDynFieldBoolean(FIELD_ASSUMEXYAXISORDER)
+		.setDescription("Flag to decide the axis order behaviour")
+		.setMandatory(false);
+
+		return definition;
+	}
+	
+	/**
+	 * Gets the format
+	 * @return
+	 */
+	public String getFormat() {
+		return (String) this.getDynValue(FIELD_FORMAT);
+	}
+
+	/**
+	 * Sets the format
+	 * @param format
+	 */
+	public void setFormat(String format) {
+		this.setDynValue(FIELD_FORMAT, format);
+	}
+	
+	/**
+	 * Gets the info by point format
+	 * @return
+	 */
+	public String getInfoFormat() {
+		String o = (String) this.getDynValue(FIELD_INFOFORMAT);
+		if(o == null)
+			return "text/plain";
+		return o;
+	}
+
+	/**
+	 * Sets the info by point format
+	 */
+	public void setInfoFormat(String format) {
+		this.setDynValue(FIELD_INFOFORMAT, format);
+	}
+	
+	public String getLayerQuery() {
+		return (String) this.getDynValue(FIELD_LAYERQUERY);
+	}
+
+	public void setLayerQuery(String layerQuery) {
+		this.setDynValue(FIELD_LAYERQUERY, layerQuery);
+	}
+	
+	/**
+	 * Devuelve el SRS.
+	 * @return SRS.
+	 */
+	public String getSRSCode() {
+		return (String) this.getDynValue(FIELD_SRSSTR);
+	}
+	
+	/**
+	 * Inserta el SRS.
+	 * @param m_srs SRS.
+	 */
+	public void setSRS(String m_srs) {
+		this.setDynValue(FIELD_SRSSTR, m_srs);
+		if(m_srs.equals("CRS:84"))
+			m_srs = "EPSG:4326";
+		setSRS(CRSFactory.getCRS(m_srs));
+	}
+	
+	public void setSRSID(String srsid) {
+		if (srsid == null) {
+			setDynValue(FIELD_SRSSTR, null);
+		} else {
+			setDynValue(FIELD_SRSSTR, CRSFactory.getCRS(srsid));
+		}
+	}
+	
+	public String getName() {
+		return (String) this.getDynValue(FIELD_NAME);
+	}
+
+	public void setName(String name) {
+		this.setDynValue(FIELD_NAME, name);
+	}
+	
+	public boolean isWmsTransparent() {
+		Boolean b = (Boolean)getDynValue(FIELD_TRANSPARENCY);
+		if(b != null)
+			return ((Boolean)b).booleanValue();
+		return false;
+	}
+
+	/**
+	 * @param wmsTransparency The wmsTransparency to set.
+	 */
+	public void setWmsTransparency(boolean wmsTransparency) {
+		this.setDynValue(FIELD_TRANSPARENCY, new Boolean(wmsTransparency));
+	}
+	
+	public String getInfoLayerQuery() {
+		return (String) this.getDynValue(FIELD_INFOLAYERQUERY);
+	}
+
+	public void setInfoLayerQuery(String infoLayerQuery) {
+		this.setDynValue(FIELD_INFOLAYERQUERY, infoLayerQuery);
+	}
+	
+
+	/**
+	 * If it is true, this layer accepts GetFeatureInfo operations. This WMS operations
+	 * maps to FMap's infoByPoint(p) operation.
+	 * @param b
+	 */
+	public void setQueryable(boolean b) {
+		this.setDynValue(FIELD_QUERYABLE, new Boolean(b));
+	}
+	
+	public void setCancellable(ICancellable cancel) {
+		this.cancel = cancel;
+	}
+	
+	public ICancellable getCancellable() {
+		return cancel;
+	}
+	
+	public boolean isQueryable() {
+		Boolean b = (Boolean)getDynValue(FIELD_QUERYABLE);
+		if(b != null)
+			return ((Boolean)b).booleanValue();
+		return false;
+	}
+	
+	public boolean isOverridingHost() {
+		Boolean b = (Boolean)getDynValue(FIELD_OVERRIDE);
+		if(b != null)
+			return ((Boolean)b).booleanValue();
+		return false;
+	}
+	
+	public void setOverrideHost(boolean over) {
+		this.setDynValue(FIELD_OVERRIDE, new Boolean(over));;
+	}
+	
+	public void setStyles(List<RemoteWMSStyle> styles) {
+		this.setDynValue(FIELD_STYLES, styles);
+	}
+	
+	/**
+	 * @param styles
+	 */
+	@SuppressWarnings("unchecked")
+	public List<RemoteWMSStyle> getStyles() {
+		return (List<RemoteWMSStyle>) this.getDynValue(FIELD_STYLES);
+	}
+	
+	public void setDimensions(Vector<String> dimensions) {
+		this.setDynValue(FIELD_DIMENSIONS, dimensions);
+	}
+	
+	/**
+	 * Gets the dimension vector that is a list of key-value pairs containing
+	 * the name of the dimension and the value for it
+	 * @return
+	 */
+	@SuppressWarnings("unchecked")
+	public Vector<String> getDimensions() {
+		return (Vector<String>) this.getDynValue(FIELD_DIMENSIONS);
+	}
+
+	public void setOnlineResources(Map<String, String> onlineResources) {
+		this.setDynValue(FIELD_ONLINERESOURC, onlineResources);
+	}
+	
+	public String getOnlineResource(String operation) {
+		return (String) getOnlineResource().get(operation);
+	}
+	
+	@SuppressWarnings("unchecked")
+	public Map<String,String> getOnlineResource() {
+		return (Map<String,String>) this.getDynValue(FIELD_ONLINERESOURC);
+	}
+	
+	/**
+	 * When a server is not fully featured and it only can serve constant map
+	 * sizes this value must be set. It expresses the size in pixels (width, height)
+	 * that the map will be requested.
+	 * @param Dimension sz
+	 */
+	public void setFixedSize(Dimension sz) {
+		this.setDynValue(FIELD_FIXEDSIZE, sz);
+	}
+
+	/**
+	 * Tells whether if this layer must deal with the server with the constant-size
+	 * limitations or not.
+	 * @return boolean.
+	 */
+	public boolean isSizeFixed() {
+		return (getDynValue(FIELD_FIXEDSIZE) != null);
+	}
+	
+	/**
+	 * Gets the value of the fixed size
+	 * @return
+	 */
+	public Dimension getFixedSize() {
+		return (Dimension) this.getDynValue(FIELD_FIXEDSIZE);
+	}
+	
+	/**
+	 * Assigns the extent. 
+	 * When a provider is initialized this will need to know what is the extent before the request.
+	 * 
+	 * @param bBox
+	 */
+	public void setExtent(Rectangle2D bBox) {
+		this.setDynValue(FIELD_EXTENT, bBox);
+	}
+	
+	public void setWidth(int w) {
+		this.setDynValue(FIELD_WIDTH, new Integer(w));
+	}
+	
+	public void setHeight(int h) {
+		this.setDynValue(FIELD_HEIGHT, new Integer(h));
+	}
+	
+	/**
+	 * Gets the bounding box
+	 * @return
+	 */
+	public Rectangle2D getExtent() {
+		return (Rectangle2D)getDynValue(FIELD_EXTENT);
+	}
+	
+	/**
+	 * Gets the width
+	 * @return
+	 */
+	public int getWidth() {
+		Integer b = (Integer)getDynValue(FIELD_WIDTH);
+		if(b != null)
+			return ((Integer)b).intValue();
+		return 0;
+	}
+	
+	/**
+	 * Gets the height
+	 * @return
+	 */
+	public int getHeight() {
+		Integer b = (Integer)getDynValue(FIELD_HEIGHT);
+		if(b != null)
+			return ((Integer)b).intValue();
+		return 0;
+	}
+	
+	
+	//**********************************************
+	
+	public String getDataStoreName() {
+		return WMSProvider.NAME;
+	}
+	
+	public String getDescription() {
+		return WMSProvider.DESCRIPTION;
+	}
+
+	public String getExplorerName() {
+		return WMSServerExplorer.NAME;
+	}
+	
+	public boolean isValid() {
+		return (this.getURI() != null);
+	}
+	
+	protected DelegatedDynObject getDelegatedDynObject() {
+		return delegatedDynObject;
+	}
+	
+	public void deleteCache(boolean deleteCache) {
+		this.setDynValue(FIELD_DELETECACHE, new Boolean(deleteCache));
+	}
+	
+	public boolean isDeletingCache() {
+		return ((Boolean)getDynValue(FIELD_DELETECACHE)).booleanValue();
+	}
+	
+	@SuppressWarnings("unchecked")
+	public WMSDataParameters clone() {
+		WMSDataParametersImpl p = new WMSDataParametersImpl();
+		p.setFormat(getFormat());
+		p.setFixedSize(getFixedSize());
+		p.setHeight(getHeight());
+		p.setWidth(getWidth());
+		p.setExtent(getExtent());
+		p.setURI(getURI());
+		p.setInfoLayerQuery(getInfoLayerQuery());
+		p.setLayerQuery(getLayerQuery());
+		p.setName(getName());
+		p.setOnlineResources((Hashtable<String, String>)this.getDynValue(FIELD_ONLINERESOURC));
+		p.setOverrideHost(isOverridingHost());
+		p.setQueryable(isQueryable());
+		p.setSRS(getSRS());
+		p.setSRS(getSRSCode());
+		p.setStyles(getStyles());
+		p.setWmsTransparency(isWmsTransparent());
+		p.setDimensions(getDimensions());
+		p.setCancellable(getCancellable());
+		p.setXyAxisOrder(isXyAxisOrder());
+		return p;
+	}
+	
+	public void assignFields(RasterDataParameters par, RasterDataServerExplorer explorer) {
+		super.assignFields(par, explorer);
+		WMSDataParametersImpl p = null;
+		if(par instanceof WMSDataParametersImpl)
+			p = (WMSDataParametersImpl)par;
+		else
+			return;
+		setFormat(p.getFormat());
+		setFixedSize(p.getFixedSize());
+		setHeight(p.getHeight());
+		setWidth(p.getWidth());
+		setExtent(p.getExtent());
+		setURI(p.getURI());
+		setInfoLayerQuery(p.getInfoLayerQuery());
+		setLayerQuery(p.getLayerQuery());
+		setName(getName());
+		setOnlineResources((Map<String, String>)p.getDynValue(FIELD_ONLINERESOURC));
+		setOverrideHost(p.isOverridingHost());
+		setQueryable(p.isQueryable());
+		setSRS(p.getSRSCode());
+		setStyles(p.getStyles());
+		setWmsTransparency(p.isWmsTransparent());
+		setDimensions(p.getDimensions());
+		setCancellable(p.getCancellable());
+		setXyAxisOrder(p.isXyAxisOrder());
+	}
+
+	public boolean isXyAxisOrder() {
+		Boolean b = (Boolean)getDynValue(FIELD_ASSUMEXYAXISORDER);
+		if(b != null)
+			return b.booleanValue();
+		return false;
+	}
+
+	public void setXyAxisOrder(boolean assumeXY) {
+		setDynValue(FIELD_ASSUMEXYAXISORDER, assumeXY);
+	}
+
+}

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/WMSDataParametersImpl.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/pom.xml
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/pom.xml	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/pom.xml	(revision 21019)
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>org.gvsig.raster.wms.io</artifactId>
+    <packaging>jar</packaging>
+    <name>org.gvsig.raster.wms.io</name>
+    <parent>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.raster.wms</artifactId>
+        <version>2.2.231</version>
+    </parent>
+    <dependencies>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.raster.cache.lib.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.raster.lib.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.raster.lib.impl</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.metadata.lib.basic.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.remoteclient</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.raster.wms.remoteclient</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.tools.lib</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.i18n</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.projection.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.projection.cresques.impl</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.compat.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.compat.se</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal.impl</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal.file.lib</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal.spi</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.geometry.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+    <!--
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.geometry.generalpath</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.geometry.operation</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+    -->
+    </dependencies>
+</project>

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/resources/META-INF/services/org.gvsig.tools.library.Library
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 21019)
@@ -0,0 +1 @@
+org.gvsig.raster.wms.io.DefaultWMSIOLibrary
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/resources/README.txt
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/resources/README.txt	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/resources/README.txt	(revision 21019)
@@ -0,0 +1,8 @@
+Put into this folder the resources needed by your test classes.
+
+This folder is added to the Tests classpath, so you can load any resources 
+through the ClassLoader.
+
+By default, in this folder you can find an example of log4j configuration,
+prepared to log messages through the console, so logging works when you
+run your tests classes.
\ No newline at end of file

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io/resources/README.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.io
___________________________________________________________________
Added: svn:ignore
   + target

.classpath

.settings

.project


Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/pom.xml
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/pom.xml	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/pom.xml	(revision 21019)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>org.gvsig.raster.wms.remoteclient</artifactId>
+	<packaging>jar</packaging>
+        <name>${project.artifactId}</name>
+	<parent>
+		<groupId>org.gvsig</groupId>
+		<artifactId>org.gvsig.raster.wms</artifactId>
+		<version>2.2.231</version>
+	</parent>
+	<dependencies>
+            <dependency>
+                <groupId>org.gvsig</groupId>
+                <artifactId>org.gvsig.remoteclient</artifactId>
+                <scope>compile</scope>                    
+            </dependency>
+	</dependencies>
+</project>
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/test/java/org/gvsig/remoteclient/wms/wms_1_1_1/WMSProtocolHandler_1_1_1Test.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/test/java/org/gvsig/remoteclient/wms/wms_1_1_1/WMSProtocolHandler_1_1_1Test.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/test/java/org/gvsig/remoteclient/wms/wms_1_1_1/WMSProtocolHandler_1_1_1Test.java	(revision 21019)
@@ -0,0 +1,50 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+package org.gvsig.remoteclient.wms.wms_1_1_1;
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+/**
+ * @author jaume dominguez faus - jaume.dominguez@iver.es
+ */
+public class WMSProtocolHandler_1_1_1Test extends TestCase {
+	WMSProtocolHandler1_1_1 handler1, handler2, handler3, handler4;
+
+	public void setUp() {
+		System.out.println("Setting up test..");
+		handler1 = new WMSProtocolHandler1_1_1();
+	}
+
+
+
+	public void testParsing() {
+		long t1 = System.currentTimeMillis();
+		handler1.parseCapabilities(new File("testdata/wms/wms.xml"));
+		long t2 = System.currentTimeMillis();
+		System.out.println("Test parsing done with apparently no errors in "+ (t2-(float)t1)/1000+" seconds");
+	}
+}
+
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/test/java/org/gvsig/remoteclient/wms/WMSStatusTest.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/test/java/org/gvsig/remoteclient/wms/WMSStatusTest.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/test/java/org/gvsig/remoteclient/wms/WMSStatusTest.java	(revision 21019)
@@ -0,0 +1,187 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+package org.gvsig.remoteclient.wms;
+
+import java.awt.geom.Rectangle2D;
+import java.util.Vector;
+
+import junit.framework.TestCase;
+/**
+ * 
+ * @author jaume
+ *
+ */
+public class WMSStatusTest extends TestCase {
+	WMSStatus st1, st2, st3, st4;
+    protected void setUp() {
+    	st1 = new WMSStatus();
+    	// Layer names
+    	Vector v1 = new Vector();
+    	v1.add("a");
+    	v1.add("b");
+    	v1.add("c");
+    	st1.setLayerNames(v1);
+    	v1.clear();
+    	// Styles
+    	v1.add("s1");
+    	v1.add("s2");
+    	v1.add("s3");
+    	st1.setStyles(v1);
+    	// Transparency
+    	st1.setTransparency(false);
+    	v1.clear();
+    	v1.add("TIME=february");
+    	v1.add("WAVELENGTH=200nm");
+    	st1.setDimensions(v1);
+    	// Extent
+    	Rectangle2D rect1 = new Rectangle2D.Double(1.0, 1.00000001, 5.000000, 6.8);
+    	st1.setExtent(rect1);
+    	// Exception format
+    	st1.setExceptionFormat("bla");
+    	// SRS
+    	st1.setSrs("bla bla");
+    	// Format
+    	st1.setFormat("image/mpeg");
+    	// Width
+    	st1.setWidth(800);
+    	// Height
+    	st1.setHeight(600);
+    	// Online resource
+    	st1.setOnlineResource("alkjf");
+    	
+    	st2 = new WMSStatus();
+    	// Layer names
+        Vector v2 = new Vector();
+    	v2.add("a");
+    	v2.add("b");
+    	v2.add("c");
+    	st2.setLayerNames(v2);
+    	v2.clear();
+    	// Styles
+    	v2.add("s1");
+    	v2.add("s2");
+    	v2.add("s3");
+    	st2.setStyles(v2);
+    	// Transparency
+    	st2.setTransparency(false);
+    	v2.clear();
+    	// Dimensions
+    	v2.add("TIME=february");
+    	v2.add("WAVELENGTH=200nm");
+    	st2.setDimensions(v2);
+    	// Extent
+    	Rectangle2D rect2 = new Rectangle2D.Double(1.0, 1.00000001, 5.000000, 6.8);
+    	st2.setExtent(rect2);
+    	// Exception format
+    	st2.setExceptionFormat("bla");
+    	// SRS
+    	st2.setSrs("bla bla");
+    	// Format
+    	st2.setFormat("image/mpeg");
+    	// Width
+    	st2.setWidth(800);
+    	// Height
+    	st2.setHeight(600);
+    	// Online resource
+    	st2.setOnlineResource("alkjf");
+    	
+    	st3 = new WMSStatus();
+    	// Layer names
+        Vector v3 = new Vector();
+    	v3.add("a");
+    	v3.add("b");
+    	v3.add("c");
+    	st3.setLayerNames(v3);
+    	v3.clear();
+    	// Styles
+    	v3.add("s1");
+    	v3.add("s2");
+    	v3.add("s3");
+    	st3.setStyles(v3);
+    	// Transparency
+    	st3.setTransparency(false);
+    	v3.clear();
+    	// Dimensions
+    	v3.add("TIME=february");
+    	v3.add("WAVELENGTH=200nm");
+    	st3.setDimensions(v3);
+    	// Extent
+    	Rectangle2D rect3 = new Rectangle2D.Double(2.0, 1.00000001, 5.000000, 6.8);
+    	st3.setExtent(rect3);
+    	// Exception format
+    	st3.setExceptionFormat("bla");
+    	// SRS
+    	st3.setSrs("bla bla");
+    	// Format
+    	st3.setFormat("image/mpeg");
+    	// Width
+    	st3.setWidth(800);
+    	// Height
+    	st3.setHeight(600);
+    	// Online resource
+    	st3.setOnlineResource("alkjf");
+        
+    	st4 = new WMSStatus(); 
+        // Layer names
+        Vector v4 = new Vector();
+    	v4.add("a");
+    	v4.add("b");
+    	v4.add("c");
+    	st4.setLayerNames(v4);
+    	v4.clear();
+    	// Styles
+    	v4.add("s1");
+    	v4.add("s2");
+    	v4.add("s3");
+    	st4.setStyles(v4);
+    	// Transparency
+    	st4.setTransparency(false);
+    	v4.clear();
+    	// Dimensions
+    	v4.add("TIME=february");
+    	v4.add("WAVELENGTH=200nm");
+    	st4.setDimensions(v4);
+    	// Extent
+    	Rectangle2D rect4 = new Rectangle2D.Double(2.0, 1.00000001, 5.000000, 6.8);
+    	st4.setExtent(rect3);
+    	// Exception format
+    	st4.setExceptionFormat("bla");
+    	// SRS
+    	st4.setSrs("bla bla");
+    	// Format
+    	st4.setFormat("image/mpeg");
+    	// Width
+    	st4.setWidth(800);
+    	// Height
+    	st4.setHeight(600);
+    	// Online resource
+    	st4.setOnlineResource("alkjfa");
+    }
+
+    public void testEquality() {
+    	assertTrue(st1.equals(st2));
+    	assertFalse(st1.equals(st3)); // (distinct extent)
+    	assertFalse(st3.equals(st4)); // (distinct online resources)
+    }
+}
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/test/java/org/gvsig/remoteclient/AllTests.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/test/java/org/gvsig/remoteclient/AllTests.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/test/java/org/gvsig/remoteclient/AllTests.java	(revision 21019)
@@ -0,0 +1,48 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+package org.gvsig.remoteclient;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.gvsig.remoteclient.wms.WMSStatusTest;
+import org.gvsig.remoteclient.wms.wms_1_1_1.WMSProtocolHandler_1_1_1Test;
+
+public class AllTests {
+//
+//	public static Test suite() {
+//		TestSuite suite = new TestSuite("Test for org.gvsig.remoteClient");
+//		//$JUnit-BEGIN$
+//		suite.addTestSuite(Test.class);
+//		
+//		//commented until there is a way to simulate the needed servers.
+//		//suite.addTestSuite(URLRetrieveTest.class);
+//		suite.addTestSuite(WMSProtocolHandler_1_1_1Test.class);
+//		suite.addTestSuite(WMSStatusTest.class);
+//		
+//		//$JUnit-END$
+//		return suite;
+//	}
+//
+}
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/test/resources/wms/wms.xml
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/test/resources/wms/wms.xml	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/test/resources/wms/wms.xml	(revision 21019)
@@ -0,0 +1,165 @@
+<?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
+<!--
+
+    gvSIG. Desktop Geographic Information System.
+
+    Copyright (C) 2007-2013 gvSIG Association.
+
+    This program is free software; you can redistribute it and/or
+    modify it under the terms of the GNU General Public License
+    as published by the Free Software Foundation; either version 3
+    of the License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+    MA  02110-1301, USA.
+
+    For any additional information, do not hesitate to contact us
+    at info AT gvsig.com, or visit our website www.gvsig.com.
+
+-->
+<!DOCTYPE WMT_MS_Capabilities SYSTEM "http://schemas.opengis.net/wms/1.1.1/WMS_MS_Capabilities.dtd"
+ [
+ <!ELEMENT VendorSpecificCapabilities EMPTY>
+ ]>  <!-- end of DOCTYPE declaration -->
+
+<WMT_MS_Capabilities version="1.3.0">
+
+<!-- MapServer version 4.10.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PDF OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=JPEG INPUT=SDE INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG -->
+
+<Service>
+  <Name>OGC:WMS</Name>
+  <Title>WMS Server</Title>
+  <Abstract>CHG WMS Server</Abstract>
+        <KeywordList>
+          <Keyword>WMS</Keyword>
+          <Keyword> Servidor de mapas en red</Keyword>
+        </KeywordList>
+  <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://sanlucar:81/cgi-bin/wms?"/>
+  <ContactInformation>
+    <ContactAddress>
+<!-- WARNING: Mandatory metadata '..._addresstype' was missing in this context. -->
+        <Address>Avda. de Portugal s/n</Address>
+        <City>Sevilla</City>
+        <StateOrProvince>Sevilla</StateOrProvince>
+        <PostCode>41004</PostCode>
+        <Country>Spain</Country>
+    </ContactAddress>
+  </ContactInformation>
+</Service>
+
+<Capability>
+  <Request>
+    <GetCapabilities>
+      <Format>application/vnd.ogc.wms_xml</Format>
+      <DCPType>
+        <HTTP>
+          <Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://sanlucar:81/cgi-bin/wms?"/></Get>
+          <Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://sanlucar:81/cgi-bin/wms?"/></Post>
+        </HTTP>
+      </DCPType>
+    </GetCapabilities>
+    <GetMap>
+      <Format>image/jpeg</Format>
+      <Format>image/gif</Format>
+      <Format>image/png</Format>
+      <Format>image/png; mode=24bit</Format>
+      <Format>image/wbmp</Format>
+      <Format>image/tiff</Format>
+      <DCPType>
+        <HTTP>
+          <Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://sanlucar:81/cgi-bin/wms?"/></Get>
+          <Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://sanlucar:81/cgi-bin/wms?"/></Post>
+        </HTTP>
+      </DCPType>
+    </GetMap>
+    <GetFeatureInfo>
+      <Format>text/plain</Format>
+      <Format>application/vnd.ogc.gml</Format>
+      <DCPType>
+        <HTTP>
+          <Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://sanlucar:81/cgi-bin/wms?"/></Get>
+          <Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://sanlucar:81/cgi-bin/wms?"/></Post>
+        </HTTP>
+      </DCPType>
+    </GetFeatureInfo>
+    <DescribeLayer>
+      <Format>text/xml</Format>
+      <DCPType>
+        <HTTP>
+          <Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://sanlucar:81/cgi-bin/wms?"/></Get>
+          <Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://sanlucar:81/cgi-bin/wms?"/></Post>
+        </HTTP>
+      </DCPType>
+    </DescribeLayer>
+    <GetLegendGraphic>
+      <Format>image/jpeg</Format>
+      <Format>image/gif</Format>
+      <Format>image/png</Format>
+      <Format>image/png; mode=24bit</Format>
+      <Format>image/wbmp</Format>
+      <DCPType>
+        <HTTP>
+          <Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://sanlucar:81/cgi-bin/wms?"/></Get>
+          <Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://sanlucar:81/cgi-bin/wms?"/></Post>
+        </HTTP>
+      </DCPType>
+    </GetLegendGraphic>
+    <GetStyles>
+      <Format>text/xml</Format>
+      <DCPType>
+        <HTTP>
+          <Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://sanlucar:81/cgi-bin/wms?"/></Get>
+          <Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://sanlucar:81/cgi-bin/wms?"/></Post>
+        </HTTP>
+      </DCPType>
+    </GetStyles>
+  </Request>
+  <Exception>
+    <Format>application/vnd.ogc.se_xml</Format>
+    <Format>application/vnd.ogc.se_inimage</Format>
+    <Format>application/vnd.ogc.se_blank</Format>
+  </Exception>
+  <VendorSpecificCapabilities />
+  <UserDefinedSymbolization SupportSLD="1" UserLayer="0" UserStyle="1" RemoteWFS="0"/>
+  <Layer>
+    <Name>CHG</Name>
+    <Title>WMS Server</Title>
+    <SRS>epsg:23030</SRS>
+    <LatLonBoundingBox minx="-6.84474" miny="36.6506" maxx="-2.09263" maxy="38.5449" />
+    <BoundingBox SRS="EPSG:23030"
+                minx="164590" miny="4.06274e+006" maxx="579080" maxy="4.26635e+006" />
+    <Layer queryable="0" opaque="0" cascaded="0">
+        <Name>time_idx</Name>
+        <Title>TIME INDEX</Title>
+        <SRS>EPSG:23030</SRS>
+        <LatLonBoundingBox minx="-6.8471" miny="36.682" maxx="-2.16907" maxy="38.75" />
+        <BoundingBox SRS="EPSG:23030"
+                    minx="165338" miny="4.0662e+006" maxx="572211" maxy="4.2891e+006" />
+        <Dimension name="time" units="ISO8601"/>
+        <Extent name="time" nearestValue="0">2004-01-01/2004-12-1/15D</Extent>
+    </Layer>
+    <Layer>
+      <Name>NDVI</Name>
+      <Title>NDVI</Title>
+      <Abstract>NDVI</Abstract>
+      <Layer queryable="0" opaque="0" cascaded="0">
+        <Name>NDVI</Name>
+        <Title>NDVI</Title>
+        <SRS>EPSG:23030</SRS>
+        <LatLonBoundingBox minx="-6.8471" miny="36.682" maxx="-2.16907" maxy="38.75" />
+        <BoundingBox SRS="EPSG:23030"
+                    minx="165338" miny="4.0662e+006" maxx="572211" maxy="4.2891e+006" />
+        <Dimension name="time" units="ISO8601"/>
+        <Extent name="time" default="2004-01-01" nearestValue="0">2004-01-01/2004-12-1/15D</Extent>
+      </Layer>
+    </Layer>
+  </Layer>
+</Capability>
+</WMT_MS_Capabilities>
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/test/resources/wms/wms
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/test/resources/wms/wms	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/test/resources/wms/wms	(revision 21019)
@@ -0,0 +1,140 @@
+<?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
+<!DOCTYPE WMT_MS_Capabilities SYSTEM "http://schemas.opengis.net/wms/1.1.1/WMS_MS_Capabilities.dtd"
+ [
+ <!ELEMENT VendorSpecificCapabilities EMPTY>
+ ]>  <!-- end of DOCTYPE declaration -->
+
+<WMT_MS_Capabilities version="1.1.1">
+
+<!-- MapServer version 4.10.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PDF OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=JPEG INPUT=SDE INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG -->
+
+<Service>
+  <Name>OGC:WMS</Name>
+  <Title>WMS Server</Title>
+  <Abstract>CHG WMS Server</Abstract>
+        <KeywordList>
+          <Keyword>WMS</Keyword>
+          <Keyword> Servidor de mapas en red</Keyword>
+        </KeywordList>
+  <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://sanlucar:81/cgi-bin/wms?"/>
+  <ContactInformation>
+    <ContactAddress>
+<!-- WARNING: Mandatory metadata '..._addresstype' was missing in this context. -->
+        <Address>Avda. de Portugal s/n</Address>
+        <City>Sevilla</City>
+        <StateOrProvince>Sevilla</StateOrProvince>
+        <PostCode>41004</PostCode>
+        <Country>Spain</Country>
+    </ContactAddress>
+  </ContactInformation>
+</Service>
+
+<Capability>
+  <Request>
+    <GetCapabilities>
+      <Format>application/vnd.ogc.wms_xml</Format>
+      <DCPType>
+        <HTTP>
+          <Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://sanlucar:81/cgi-bin/wms?"/></Get>
+          <Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://sanlucar:81/cgi-bin/wms?"/></Post>
+        </HTTP>
+      </DCPType>
+    </GetCapabilities>
+    <GetMap>
+      <Format>image/jpeg</Format>
+      <Format>image/gif</Format>
+      <Format>image/png</Format>
+      <Format>image/png; mode=24bit</Format>
+      <Format>image/wbmp</Format>
+      <Format>image/tiff</Format>
+      <DCPType>
+        <HTTP>
+          <Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://sanlucar:81/cgi-bin/wms?"/></Get>
+          <Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://sanlucar:81/cgi-bin/wms?"/></Post>
+        </HTTP>
+      </DCPType>
+    </GetMap>
+    <GetFeatureInfo>
+      <Format>text/plain</Format>
+      <Format>application/vnd.ogc.gml</Format>
+      <DCPType>
+        <HTTP>
+          <Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://sanlucar:81/cgi-bin/wms?"/></Get>
+          <Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://sanlucar:81/cgi-bin/wms?"/></Post>
+        </HTTP>
+      </DCPType>
+    </GetFeatureInfo>
+    <DescribeLayer>
+      <Format>text/xml</Format>
+      <DCPType>
+        <HTTP>
+          <Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://sanlucar:81/cgi-bin/wms?"/></Get>
+          <Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://sanlucar:81/cgi-bin/wms?"/></Post>
+        </HTTP>
+      </DCPType>
+    </DescribeLayer>
+    <GetLegendGraphic>
+      <Format>image/jpeg</Format>
+      <Format>image/gif</Format>
+      <Format>image/png</Format>
+      <Format>image/png; mode=24bit</Format>
+      <Format>image/wbmp</Format>
+      <DCPType>
+        <HTTP>
+          <Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://sanlucar:81/cgi-bin/wms?"/></Get>
+          <Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://sanlucar:81/cgi-bin/wms?"/></Post>
+        </HTTP>
+      </DCPType>
+    </GetLegendGraphic>
+    <GetStyles>
+      <Format>text/xml</Format>
+      <DCPType>
+        <HTTP>
+          <Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://sanlucar:81/cgi-bin/wms?"/></Get>
+          <Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://sanlucar:81/cgi-bin/wms?"/></Post>
+        </HTTP>
+      </DCPType>
+    </GetStyles>
+  </Request>
+  <Exception>
+    <Format>application/vnd.ogc.se_xml</Format>
+    <Format>application/vnd.ogc.se_inimage</Format>
+    <Format>application/vnd.ogc.se_blank</Format>
+  </Exception>
+  <VendorSpecificCapabilities />
+  <UserDefinedSymbolization SupportSLD="1" UserLayer="0" UserStyle="1" RemoteWFS="0"/>
+  <Layer>
+    <Name>CHG</Name>
+    <Title>WMS Server</Title>
+    <SRS>epsg:23030</SRS>
+    <LatLonBoundingBox minx="-6.84474" miny="36.6506" maxx="-2.09263" maxy="38.5449" />
+    <BoundingBox SRS="EPSG:23030"
+                minx="164590" miny="4.06274e+006" maxx="579080" maxy="4.26635e+006" />
+    <Layer queryable="0" opaque="0" cascaded="0">
+        <Name>time_idx</Name>
+        <Title>TIME INDEX</Title>
+        <SRS>EPSG:23030</SRS>
+        <LatLonBoundingBox minx="-6.8471" miny="36.682" maxx="-2.16907" maxy="38.75" />
+        <BoundingBox SRS="EPSG:23030"
+                    minx="165338" miny="4.0662e+006" maxx="572211" maxy="4.2891e+006" />
+        <Dimension name="time" units="ISO8601"/>
+        <Extent name="time" nearestValue="0">2004-01-01/2004-12-1/15D</Extent>
+    </Layer>
+    <Layer>
+      <Name>NDVI</Name>
+      <Title>NDVI</Title>
+      <Abstract>NDVI</Abstract>
+      <Layer queryable="0" opaque="0" cascaded="0">
+        <Name>NDVI</Name>
+        <Title>NDVI</Title>
+        <SRS>EPSG:23030</SRS>
+        <LatLonBoundingBox minx="-6.8471" miny="36.682" maxx="-2.16907" maxy="38.75" />
+        <BoundingBox SRS="EPSG:23030"
+                    minx="165338" miny="4.0662e+006" maxx="572211" maxy="4.2891e+006" />
+        <Dimension name="time" units="ISO8601"/>
+        <Extent name="time" default="2004-01-01" nearestValue="0">2004-01-01/2004-12-1/15D</Extent>
+      </Layer>
+    </Layer>
+  </Layer>
+</Capability>
+</WMT_MS_Capabilities>
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/request/WMSGetLegendGraphicRequest.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/request/WMSGetLegendGraphicRequest.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/request/WMSGetLegendGraphicRequest.java	(revision 21019)
@@ -0,0 +1,89 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+package org.gvsig.remoteclient.wms.request;
+
+import org.gvsig.remoteclient.utils.CapabilitiesTags;
+import org.gvsig.remoteclient.wms.WMSProtocolHandler;
+import org.gvsig.remoteclient.wms.WMSStatus;
+
+/**
+ * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
+ */
+public abstract class WMSGetLegendGraphicRequest extends WMSRequest {
+	protected String layerName = null;	
+	
+	public WMSGetLegendGraphicRequest(WMSStatus status, WMSProtocolHandler protocolHandler, String layerName) {
+		super(status, protocolHandler);	
+		this.layerName = layerName;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.remoteClient.wfs.requests.WFSRequest#getHttpPostRequest(java.lang.String)
+	 */
+	protected String getHttpPostRequest(String onlineResource) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.remoteClient.wfs.requests.WFSRequest#getOperationCode()
+	 */
+	protected String getOperationName() {
+		return CapabilitiesTags.GETLEGENDGRAPHIC;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.remoteClient.wfs.requests.WFSRequest#getTempFilePrefix()
+	 */
+	protected String getTempFilePrefix() {
+		String format = status.getFormat();
+		if (format == null){
+			return "wms_getLegendGraphic.xml";
+		}
+		if (format.indexOf("png") >= 0){
+	        return "wms_getLegendGraphic.png";
+		}	
+	    if (format.indexOf("xml") >= 0){
+	        return "wms_getLegendGraphic.xml";
+	    }	
+	    if (format.indexOf("gif") >= 0){
+	        return "wms_getLegendGraphic.gif";
+	    }
+	    if (format.indexOf("tif") >= 0){
+	        return "wms_getLegendGraphic.tif";
+	    }
+	    if (format.indexOf("bmp") >= 0){
+	        return "wms_getLegendGraphic.bmp";
+	    }
+	    if (format.indexOf("jpg") >= 0
+	        || format.indexOf("jpeg") >= 0){
+	        return "wms_getLegendGraphic.jpg";			 
+	    }
+		return "wms_getLegendGraphic.xml";
+	}
+}
+
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/request/WMSGetMapRequest.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/request/WMSGetMapRequest.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/request/WMSGetMapRequest.java	(revision 21019)
@@ -0,0 +1,89 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+ 
+package org.gvsig.remoteclient.wms.request;
+
+import org.gvsig.remoteclient.utils.CapabilitiesTags;
+import org.gvsig.remoteclient.wms.WMSProtocolHandler;
+import org.gvsig.remoteclient.wms.WMSStatus;
+
+/**
+ * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
+ */
+public abstract class WMSGetMapRequest extends WMSRequest {
+		
+	public WMSGetMapRequest(WMSStatus status, WMSProtocolHandler protocolHandler) {
+		super(status, protocolHandler);		
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.remoteClient.wfs.requests.WFSRequest#getHttpPostRequest(java.lang.String)
+	 */
+	protected String getHttpPostRequest(String onlineResource) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.remoteClient.wfs.requests.WFSRequest#getOperationCode()
+	 */
+	protected String getOperationName() {
+		return CapabilitiesTags.GETMAP;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.remoteClient.wfs.requests.WFSRequest#getTempFilePrefix()
+	 */
+	protected String getTempFilePrefix() {
+		String format = status.getFormat();
+		if (format == null){
+			return "wms_getMap.xml";
+		}
+		if (format.indexOf("png") >= 0){
+	        return "wms_getMap.png";
+		}	
+	    if (format.indexOf("xml") >= 0){
+	        return "wms_getMap.xml";
+	    }	
+	    if (format.indexOf("gif") >= 0){
+	        return "wms_getMap.gif";
+	    }
+	    if (format.indexOf("tif") >= 0){
+	        return "wms_getMap.tif";
+	    }
+	    if (format.indexOf("bmp") >= 0){
+	        return "wms_getMap.bmp";
+	    }
+	    if (format.indexOf("jpg") >= 0
+	        || format.indexOf("jpeg") >= 0){
+	        return "wms_getMap.jpg";			 
+	    }
+		return "wms_getMap.xml";
+	}
+}
+
+
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/request/WMSRequest.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/request/WMSRequest.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/request/WMSRequest.java	(revision 21019)
@@ -0,0 +1,90 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+
+/**
+ * This class sends a WMS request and returns the
+ * reply in a local File. It tries if the server
+ * supports both HTTP Get and Post requests.
+ * @author Jorge Piera LLodr? (jorge.piera@iver.es)
+ */
+package org.gvsig.remoteclient.wms.request;
+
+import java.util.Vector;
+
+import org.gvsig.remoteclient.ogc.request.OGCRequest;
+import org.gvsig.remoteclient.utils.Utilities;
+import org.gvsig.remoteclient.wms.WMSProtocolHandler;
+import org.gvsig.remoteclient.wms.WMSStatus;
+
+/**
+ * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
+ */
+public abstract class WMSRequest extends OGCRequest{
+	protected WMSStatus status = null;
+	
+	public WMSRequest(WMSStatus status,
+			WMSProtocolHandler protocolHandler) {
+		super(status, protocolHandler);
+		this.status = status;
+	}
+	
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.remoteClient.wfs.requests.WFSRequest#getSchemaLocation()
+	 */
+	protected String getSchemaLocation() {
+		return null;
+	}
+	
+	/**
+     * Gets the part of the OGC request that share GetMap and GetFeatureInfo
+     * @return String request
+     */
+    protected String getPartialQuery(WMSStatus status)
+    {
+        StringBuffer req = new StringBuffer();
+        req.append("LAYERS=" + Utilities.Vector2CS(status.getLayerNames()))
+           .append("&SRS=" + status.getSrs())
+           .append("&BBOX=" + status.getExtent().getMinX()+ "," )
+           .append(status.getExtent().getMinY()+ ",")
+           .append(status.getExtent().getMaxX()+ ",")
+           .append(status.getExtent().getMaxY())
+           .append("&WIDTH=" + status.getWidth())
+           .append("&HEIGHT=" + status.getHeight())
+           .append("&FORMAT=" + status.getFormat())
+           .append("&STYLES=");
+        Vector v = status.getStyles();
+        if (v!=null && v.size()>0)
+        	req.append(Utilities.Vector2CS(v));
+        v = status.getDimensions();
+        if (v!=null && v.size()>0)
+            req.append("&" + Utilities.Vector2URLParamString(v));
+        if (status.getTransparency()) {
+            req.append("&TRANSPARENT=TRUE");
+        }
+        return req.toString();
+    }
+	
+}
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/request/WMSGetFeatureInfoRequest.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/request/WMSGetFeatureInfoRequest.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/request/WMSGetFeatureInfoRequest.java	(revision 21019)
@@ -0,0 +1,70 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+ 
+package org.gvsig.remoteclient.wms.request;
+
+import org.gvsig.remoteclient.utils.CapabilitiesTags;
+import org.gvsig.remoteclient.wms.WMSProtocolHandler;
+import org.gvsig.remoteclient.wms.WMSStatus;
+
+/**
+ * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
+ */
+public abstract class WMSGetFeatureInfoRequest extends WMSRequest {
+	protected int x;
+	protected int y;
+	
+	public WMSGetFeatureInfoRequest(WMSStatus status, WMSProtocolHandler protocolHandler, int x, int y) {
+		super(status, protocolHandler);	
+		this.x = x;
+		this.y = y;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.remoteClient.wfs.requests.WFSRequest#getHttpPostRequest(java.lang.String)
+	 */
+	protected String getHttpPostRequest(String onlineResource) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.remoteClient.wfs.requests.WFSRequest#getOperationCode()
+	 */
+	protected String getOperationName() {
+		return CapabilitiesTags.GETFEATUREINFO;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.remoteClient.wfs.requests.WFSRequest#getTempFilePrefix()
+	 */
+	protected String getTempFilePrefix() {
+		return "wms_getFeatureInfo.xml";
+	}
+}
+
+
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/request/WMSGetCapabilitiesRequest.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/request/WMSGetCapabilitiesRequest.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/request/WMSGetCapabilitiesRequest.java	(revision 21019)
@@ -0,0 +1,68 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+ 
+package org.gvsig.remoteclient.wms.request;
+
+import org.gvsig.remoteclient.utils.CapabilitiesTags;
+import org.gvsig.remoteclient.wms.WMSProtocolHandler;
+import org.gvsig.remoteclient.wms.WMSStatus;
+
+/**
+ * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
+ */
+public abstract class WMSGetCapabilitiesRequest extends WMSRequest {
+
+	/**
+	 * @param status
+	 * @param protocolHandler
+	 */
+	public WMSGetCapabilitiesRequest(WMSStatus status,
+			WMSProtocolHandler protocolHandler) {
+		super(status, protocolHandler);		
+	}
+
+	/* (non-Javadoc)
+	 * @see org.gvsig.remoteclient.ogc.request.OGCRequest#getHttpPostRequest(java.lang.String)
+	 */
+	protected String getHttpPostRequest(String onlineResource) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.gvsig.remoteclient.ogc.request.OGCRequest#getOperationName()
+	 */
+	protected String getOperationName() {
+		return CapabilitiesTags.GETCAPABILITIES;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.gvsig.remoteclient.ogc.request.OGCRequest#getTempFilePrefix()
+	 */	
+	protected String getTempFilePrefix() {
+		return "wms_getCapabilities.xml";
+	}
+
+}
+
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/WMSStatus.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/WMSStatus.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/WMSStatus.java	(revision 21019)
@@ -0,0 +1,338 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+
+package org.gvsig.remoteclient.wms;
+
+import java.awt.geom.Rectangle2D;
+import java.util.Vector;
+
+/**
+ * Describes the status of a WMSclient, so it adds to the Remote client status
+ * a list of layers, a list of layer styles, the extent of the map.
+ * Provides the functionality to modify these lists.
+ * 
+ */
+public class WMSStatus extends org.gvsig.remoteclient.RemoteClientStatus {
+	// list of layer to be retrieved by the WMS
+    private Vector      layers;
+    // List of layer styles
+    private Vector      styles;
+    private Vector      dimensions;
+    // extent required by the WMS client
+    private Rectangle2D extent;
+    private boolean     transparency;
+	private String      onlineResource;
+	private boolean     projectedCoordinates = false;
+	private boolean     xyAxisOrder = false;
+	
+    public WMSStatus() {
+    	layers = new Vector();
+    	styles = new Vector();    	    	
+    }
+    
+    // sets the list of layers required by the WMS client
+    public void setLayerNames(Vector _layers) {        
+        layers = _layers;
+    } 
+
+/**
+ * <p>Retrieves the layer list required by the WMS client</p>
+ * 
+ * 
+ * @return Vector, the list of layers
+ */
+    public Vector getLayerNames() {        
+        return layers;
+    } 
+
+/**
+ * <p> Adds a layer to the list of layers required by the WMS client</p>
+ * 
+ * 
+ * @param _layerName, name of the layer to be added. 
+ */
+    public void addLayerName(String _layerName) {        
+        layers.add(_layerName);
+    } 
+
+/**
+ * <p>removes a layer from the layer list</p>
+ * 
+ * 
+ * @param _layerName 
+ * @return true if the layer name has been deleted from the list
+ */
+    public boolean removeLayerName(String _layerName) {
+    	return layers.remove(_layerName);       
+    } 
+
+/**
+ * <p>gets the styles list required by the WMS client</p>
+ * 
+ * 
+ * @return Vector with the list of layer styles
+ */
+    public Vector getStyles() {        
+        return styles;
+    } 
+
+/**
+ * <p>sets the styles list required by the WMS client</p>
+ * 
+ * 
+ * @param _styles, list to be set as the required styles.
+ */
+    public void setStyles(Vector _styles) {        
+        styles = _styles;
+    }
+    
+    /**
+     * <p>sets the styles list required by the WMS client</p>
+     * 
+     * 
+     * @param _styles, list to be set as the required styles.
+     */
+    public void setDimensions(Vector _dimensions) {        
+        
+        dimensions = _dimensions;
+    } 
+
+/**
+ * <p>Adds a style name to the styles list required by the WMS client</p>
+ * 
+ * 
+ * @param _name, style name to be added
+ */
+    public void addStyleName(String _name) {        
+        styles.add( _name);
+    } 
+
+/**
+ * <p>Removes a style from the list of styles required by the WMS client</p>
+ * 
+ * 
+ * @param _name, style name to be removed
+ */
+    public boolean removeStyleName(String _name) {        
+        return styles.remove(_name);
+    } 
+/**
+ * <p>Gets the extent defined by the map</p>
+ */
+    public Rectangle2D getExtent() {        
+        return extent;
+    } 
+/**
+ * <p>Sets the extent defined by the map</p>
+ */
+    public void setExtent(Rectangle2D extent) {        
+        this.extent = extent;
+    } 
+ 
+   
+
+    /**
+     * @return
+     */
+    public boolean getTransparency() {
+        return transparency;
+    }
+
+    /**
+     * @param wmsTransparency
+     */
+    public void setTransparency(boolean wmsTransparency) {
+        transparency = wmsTransparency;
+    }
+
+    /**
+     * @return
+     */
+    public Vector getDimensions() {
+        return dimensions;
+    }
+    
+    public boolean equals(Object obj){
+        if (!(obj instanceof WMSStatus))
+            return false;
+        WMSStatus s = (WMSStatus) obj;
+        
+        // Compare layer names
+        if (!(( s.getLayerNames()==null && this.getLayerNames()==null) ||
+                s.getLayerNames().equals(this.getLayerNames())))
+        	return false;
+        
+        // Compare extent
+        if (!(( s.getExtent()==null && this.getExtent()==null) ||
+                s.getExtent().equals(this.getExtent())))
+        	return false;
+        
+        // Compare height
+        if ( s.getHeight() != this.getHeight())
+        	return false;
+        	
+        // Compare width
+        if ( s.getWidth()  != this.getWidth())
+        	return false;
+        
+        // Compare styles
+        if (!(( s.getStyles()==null && this.getStyles()==null) ||
+                s.getStyles().equals(this.getStyles())))
+        	return false;
+        
+        // Compare dimensions
+        if (!(( s.getDimensions()==null && this.getDimensions()==null) ||
+                s.getDimensions().equals(this.getDimensions())))
+        	return false;
+        
+        // Compare transparencies
+        if ( s.getTransparency() != this.getTransparency())
+        	return false;
+
+		// Compare srs
+        if (!(( s.getSrs()==null && this.getSrs()==null) || 
+        		s.getSrs().equals(this.getSrs())))
+        	return false;
+        
+        // Compare exception formats
+        if (!(( s.getExceptionFormat()==null && this.getExceptionFormat()==null) ||
+        		s.getExceptionFormat().equals(this.getExceptionFormat())))
+        	return false;
+        
+        // Compare formats
+        if (!(( s.getFormat()==null && this.getFormat()==null) ||
+        		s.getFormat().equals(this.getFormat())))
+        	return false;
+        
+        // Compare online resources
+        if (!(( s.getOnlineResource()==null && this.getOnlineResource()==null) ||
+        		s.getOnlineResource().equals(this.getOnlineResource())))
+        	return false;
+        
+        return true;
+    }
+    
+    public Object clone() {
+    	WMSStatus newObject = new WMSStatus();
+    	Vector v = this.getLayerNames();
+    	if (v != null)
+    		newObject.setLayerNames((Vector)v.clone());
+    	Rectangle2D r = this.getExtent();
+    	if (r != null)
+    		newObject.setExtent((Rectangle2D)r.clone());
+        newObject.setHeight(this.getHeight());
+        newObject.setWidth(this.getWidth());
+        v = this.getStyles();
+        if (v != null)
+        	newObject.setStyles((Vector)v.clone());
+        v = this.getDimensions();
+        if (v != null)
+        	newObject.setDimensions((Vector)v.clone());
+        newObject.setTransparency(this.getTransparency());
+        newObject.setSrs(this.getSrs());
+        newObject.setExceptionFormat(this.getExceptionFormat());
+        newObject.setFormat(this.getFormat());
+        newObject.setOnlineResource(this.getOnlineResource());
+        newObject.setProjected(isProjected());
+        newObject.setXyAxisOrder(isXyAxisOrder());
+    	return newObject;
+    }
+
+    /**
+     * Returns the URL that the server specified for a WMS request if any was described in
+     * its capabilities document. 
+     * @param operationName, a String containing the name of the operation (case-independent)
+     * @return <b>String</b> containing the URL for this operationName or <B>null</B> if none was
+     *                specified.
+     */
+	public String getOnlineResource() {
+		return onlineResource;
+	}
+	
+	/**
+	 * Sets the string literal containing the URL of an online resource for a specific
+	 * WMS request.
+	 * @param operationName, String telling to which request correspond the address
+	 * @param url, String containing the URL for the given WMS request
+	 */
+	public void setOnlineResource(String url) {
+		onlineResource = url;
+	}
+	
+	public boolean isProjected() {
+		return projectedCoordinates;
+	}
+	
+	public void setProjected(boolean projected) {
+		this.projectedCoordinates = projected;
+	}
+	
+	/**
+	 * <p>Gets the behaviour of the WMS client with regards the axis order</p>
+	 * 
+	 * <p>Returns <code>true</code> if the WMS parser should assume that the
+	 * order of the coordinates follows the XY axis order
+	 * (the first coordinate corresponds to the horizontal X
+	 * axis, while the second  coordinate corresponds to the
+	 * vertical Y axis), regardless the protocol version and CRS in use.</p>
+	 * 
+	 * <p>Returns <code>false</code> if the WMS parser should decide the
+	 * axis order based on the protocol version and the coordinate
+	 * reference system (CRS) in use. In particular, if protocol
+	 * version is >= 1.3.0, then the WMS parser assumes
+	 * the axis order defined in the official EPSG registry for the
+	 * CRS in use. For versions < 1.3.0, the XY axis order is assumed.</p>
+	 * 
+	 * <p>The default value is <code>false</code></p>.
+	 * @see #setXyAxisOrder(boolean)
+	 * @return
+	 */
+	public boolean isXyAxisOrder() {
+		return this.xyAxisOrder;
+	}
+
+	/**
+	 * <p>Sets the behaviour of the WMS client with regards the axis order.<p>
+	 * 
+	 * <p>If set to <code>true</code>, then the XY axis order
+	 * is assumed for all the WMS
+	 * protocol versions and coordinate reference systems.</p>
+	 * 
+	 * <p>If set to <code>false</code>
+	 * then the WMS parser will decide the axis order based on
+	 * the protocol version and the coordinate reference system (CRS)
+	 * in use. In particular, if protocol
+	 * version is >= 1.3.0, then the WMS parser assumes
+	 * the axis order defined in the official EPSG registry for the
+	 * CRS in use. For versions < 1.3.0, the XY axis order is assumed.</p>
+	 * 
+	 * 
+	 * @param assumeXY
+	 * @see #isXyAxisOrder()
+	 */
+	public void setXyAxisOrder(boolean assumeXY) {
+		this.xyAxisOrder = assumeXY;
+	}
+
+}
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/WMSDimension.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/WMSDimension.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/WMSDimension.java	(revision 21019)
@@ -0,0 +1,155 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+
+package org.gvsig.remoteclient.wms;
+
+import java.io.IOException;
+
+import org.kxml2.io.KXmlParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import org.gvsig.remoteclient.utils.CapabilitiesTags;
+
+/**
+ * <p></p>
+ * 
+ */
+public class WMSDimension {
+    
+    private String name;
+    private String units;
+    private String unitSymbol;
+    /**
+     * Declares what value would be used along this dimension if a Web
+     * request omits a value for this dimension.
+     */
+    private String dimDefaultValue;
+    /**
+     * Indicates that the request may include multiple values or
+     * (if it is null or zero) have to include <b>only<b/> single 
+     * value for this dimension. 
+     */
+    private String multipleValues;
+    /**
+     * Indicates that the server will round off inexact dimension values
+     * to the nearest valid value, or (if it is null or zero) it will not.
+     */
+    private String nearestValues;
+    /**
+     * Indicates that temporal data are normally kept current and that the
+     * request parameter TIME <b>may</b> include the keyword 'current' 
+     * instead of an ending value. 
+     */
+    private String current;
+    /**
+     * cotains the expression for this dimension's extent.
+     */
+    private String extentExpression;
+    private String extDefaultValue;
+
+    private String dimensionExpression;
+   
+    public String getName() {        
+        return name;
+    } 
+ 
+    public String getUnits() {        
+        return units;
+    }
+  
+    public String getUnitSymbol() {        
+        return unitSymbol;
+    } 
+    
+    /**
+     * Tells that the temporal data are normally kept current and that
+     * the request parameter TIME may include the keyword 'current'
+     * instead of an ending value.
+     *
+     * @return <b>true</b> if the server does keep the data, <b>false</b> else.
+     */
+    public boolean allowsCurrentTime() {
+        return (current!=null && !current.equals("0"));
+    }
+    
+    
+    /**
+     * Gets the value that would be used along this dimension if a Web
+     * request omits a value for the dimension.
+     * 
+     * @return Returns the defaultValue.
+     */
+    public String getDimDefaultValue() {
+        return dimDefaultValue;
+    }
+    
+    /**
+     * Returns the extent expression as it was written in the Capabilities 
+     * document.
+     * @return String
+     */
+    public String getExtentExpression() {
+        return extentExpression;
+    }
+    /**
+     * @return Returns the multipleValues.
+     */
+    public boolean allowsMultipleValues() {
+        return (multipleValues!=null && !multipleValues.equals("0"));
+    }   
+    
+    
+    /**
+     * @return Returns the dimensionExpression.
+     */
+    public String getDimensionExpression() {
+        return dimensionExpression;
+    }
+    
+    public void setDimensionExpression(String exp) {
+        dimensionExpression = exp;
+    }
+
+    /**
+     * @return Returns the nearestValues.
+     */
+    public boolean allowsNearestValues() {
+        return (nearestValues!=null && !nearestValues.equals("0"));
+    }
+    
+
+    /**
+     * Parses the DIMENSION tag in the WMS capabilities, filling the WMSDimension object
+     * and loading the data into memory to be easily accesed
+     */
+    public void parse(KXmlParser parser) throws IOException, XmlPullParserException{
+        parser.require(KXmlParser.START_TAG, null, CapabilitiesTags.DIMENSION);
+        name                = parser.getAttributeValue("", CapabilitiesTags.DIMENSION_NAME);
+        units               = parser.getAttributeValue("", CapabilitiesTags.DIMENSION_UNITS);
+        unitSymbol          = parser.getAttributeValue("", CapabilitiesTags.DIMENSION_UNIT_SYMBOL);
+        dimDefaultValue     = parser.getAttributeValue("", CapabilitiesTags.DEFAULT);
+        dimensionExpression = parser.nextText(); 
+    }
+    
+}
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/WMSServiceInformation.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/WMSServiceInformation.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/WMSServiceInformation.java	(revision 21019)
@@ -0,0 +1,148 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+ 
+package org.gvsig.remoteclient.wms;
+
+import java.util.Vector;
+
+import org.gvsig.remoteclient.ogc.OGCClientOperation;
+import org.gvsig.remoteclient.ogc.OGCServiceInformation;
+import org.gvsig.remoteclient.utils.CapabilitiesTags;
+
+/**
+ * Class that represents the description of the WMS metadata.
+ * The first part of the capabilities will return the service information
+ * from the WMS, this class will hold this information.
+ * 
+ * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
+ */
+public class WMSServiceInformation extends OGCServiceInformation{
+	/*public String map_online_resource = null;
+    public String feature_online_resource = null;*/
+    public String version;
+    public String name;
+    public String scope;
+    public String title;
+    public String abstr;
+    public String keywords;
+    public String fees;
+    public String operationsInfo;
+    public String personname;
+    public String organization;
+    public String function;
+    public String addresstype;
+    public String address;
+    public String place;
+    public String province;
+    public String postcode;
+    public String country;
+    public String phone;
+    public String fax;
+    public String email;
+    public Vector formats;
+    public Vector infoformats;
+
+    public WMSServiceInformation()
+    {
+        version = new String();
+        name = new String();
+        scope = new String();
+        title = new String();
+        abstr = new String();
+        keywords = new String();
+        fees = new String();
+        operationsInfo = new String();
+        personname = new String();
+        organization = new String();
+        function = new String();
+        addresstype = new String();
+        address = new String();
+        place = new String();
+        province = new String();
+        postcode = new String();
+        country = new String();
+        phone = new String();
+        fax = new String();
+        email = new String();
+        formats = new Vector(); 
+        infoformats = new Vector();
+    }
+    
+    public boolean isQueryable()
+    {
+    	if (getOnlineResource(CapabilitiesTags.GETFEATUREINFO) != null)    	
+    		return true;
+    	else
+    		return false;
+    }
+    
+    public boolean hasLegendGraphic()
+    {
+    	if (getOnlineResource(CapabilitiesTags.GETLEGENDGRAPHIC) != null) 
+    		return true;
+    	else
+    		return false;
+    }
+    
+    public void clear() {
+    	version = new String();
+        name = new String();
+        scope = new String();
+        title = new String();
+        abstr = new String();
+        keywords = new String();
+        fees = new String();
+        operationsInfo = new String();
+        personname = new String();
+        organization = new String();
+        function = new String();
+        addresstype = new String();
+        address = new String();
+        place = new String();
+        province = new String();
+        postcode = new String();
+        country = new String();
+        phone = new String();
+        fax = new String();
+        email = new String();
+        formats = new Vector();  
+        infoformats = new Vector();
+    }      
+    
+	/* (non-Javadoc)
+	 * @see org.gvsig.remoteClient.ogc.OGCServiceInformation#createOperation(java.lang.String)
+	 */	
+	public OGCClientOperation createOperation(String name) {
+		return new WMSOperation(name); 
+	}
+
+	/* (non-Javadoc)
+	 * @see org.gvsig.remoteClient.ogc.OGCServiceInformation#createOperation(java.lang.String, java.lang.String)
+	 */	
+	public OGCClientOperation createOperation(String name, String onlineResource) {
+		return new WMSOperation(name, onlineResource);
+	}	
+
+ }
+
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/WMSEventListener.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/WMSEventListener.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/WMSEventListener.java	(revision 21019)
@@ -0,0 +1,42 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+
+package org.gvsig.remoteclient.wms;
+/**
+ * Interface for monitoring events from the WMSClient.
+ * @author jaume dominguez faus - jaume.dominguez@iver.es
+ *
+ */
+public interface WMSEventListener {
+	public static final int CAPABILITIES = 1;
+	public static final int MAP = 2;
+	public static final int FEATURE_INFO = 2;
+	public static final int FINISHED = -1;
+	public static final int STARTED = -2;
+	public static final int TRANSFERRING = -3;
+	public static final int FAILED = -4;
+	public static final int CANCELLED = -5;
+	
+	public abstract void newEvent(int idRequest, int eventType);
+}
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/WMSExtent.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/WMSExtent.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/WMSExtent.java	(revision 21019)
@@ -0,0 +1,108 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+package org.gvsig.remoteclient.wms;
+
+import java.io.IOException;
+
+import org.kxml2.io.KXmlParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import org.gvsig.remoteclient.utils.CapabilitiesTags;
+
+public class WMSExtent {
+	    
+    private String name; 
+    /**
+     * Indicates that the server will round off inexact dimension values
+     * to the nearest valid value, or (if it is null or zero) it will not.
+     */
+    private String nearestValue; 
+    /**
+     * Indicates that temporal data are normally kept current and that the
+     * request parameter TIME <b>may</b> include the keyword 'current' 
+     * instead of an ending value. 
+     */
+    private String current;
+    
+    /**
+     * cotains the expression for this dimension's extent.
+     */
+    private String extentExpression;
+    private String extDefaultValue;
+
+    public String getName() {        
+        return name;
+    } 
+    
+    /**
+     * Tells that the temporal data are normally kept current and that
+     * the request parameter TIME may include the keyword 'current'
+     * instead of an ending value.
+     *
+     * @return <b>true</b> if the server does keep the data, <b>false</b> else.
+     */
+    public boolean allowsCurrentTime() {
+        return (current!=null && !current.equals("0"));
+    }
+    
+    /**
+     * Gets the value that would be used along this dimension if a Web
+     * request omits a value for the dimension.
+     * 
+     * @return Returns the defaultValue.
+     */
+    public String getDefaultValue() {
+        return extDefaultValue;
+    }
+    
+    /**
+     * Returns the extent expression as it was written in the Capabilities 
+     * document.
+     * @return String
+     */
+    public String getExtentExpression() {
+        return extentExpression;
+    }
+       
+
+    /**
+     * @return Returns the nearestValues.
+     */
+    public boolean allowsNearestValue() {
+        return (nearestValue!=null && !nearestValue.equals("0"));
+    }	 
+
+	   /**
+	 * Parses the EXTENT tag in the WMS capabilities, filling the Extend fills of the
+	 * WMSDimension object and loading the data into memory to be easily accesed.
+	 */
+	public void parse(KXmlParser parser) throws IOException, XmlPullParserException{
+	    parser.require(KXmlParser.START_TAG, null, CapabilitiesTags.EXTENT);
+	    name			 = parser.getAttributeValue("", CapabilitiesTags.DIMENSION_NAME);
+	    extDefaultValue  = parser.getAttributeValue("", CapabilitiesTags.DEFAULT);
+	    nearestValue    = parser.getAttributeValue("", CapabilitiesTags.EXTENT_NEAREST_VALUE);
+	    current          = parser.getAttributeValue("", CapabilitiesTags.EXTENT_CURRENT);
+	    extentExpression = parser.nextText();
+	}	
+}
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/WMSProtocolHandlerFactory.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/WMSProtocolHandlerFactory.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/WMSProtocolHandlerFactory.java	(revision 21019)
@@ -0,0 +1,273 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+
+package org.gvsig.remoteclient.wms;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.StringReader;
+import java.net.ConnectException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Iterator;
+import org.apache.commons.io.FileUtils;
+
+import org.gvsig.remoteclient.utils.CapabilitiesTags;
+import org.gvsig.remoteclient.utils.Utilities;
+import org.kxml2.io.KXmlParser;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.xmlpull.v1.XmlPullParserException;
+
+public class WMSProtocolHandlerFactory {
+    
+    private static final Logger logger = LoggerFactory.getLogger(WMSProtocolHandlerFactory.class);
+    public org.gvsig.remoteclient.wms.WMSProtocolHandler wMSProtocolHandler;
+
+    private static ArrayList supportedVersions = new ArrayList();
+
+    static {
+        /*
+         * Se meten en el array versions las distintas versiones
+         * del protocolo en orden descendente
+         */
+    	//versions.add(WMSProtocolHandler1_3_0.class);
+        //versions.add(WMSProtocolHandler1_1_1.class);
+    	supportedVersions.add("1.3.0");
+    	supportedVersions.add("1.1.1");
+    	supportedVersions.add("1.1.0");
+     }
+
+    /**
+     * M�todo que dada una respuesta de getCapabilities y un iterador sobre una
+     * coleccion de WMSClient's ordenada descendentemente devuelve el cliente
+     * cuya version es igual o inmediatamente inferior
+     *
+     * @param caps Capabilities con la respuesta del servidor
+     * @param clients Iterador de conjunto ordenado descendientemente
+     *
+     * @return cliente cuya version es igual o inmediatamente inferior
+     * @throws IllegalAccessException
+     * @throws InstantiationException
+     *
+     */
+    private static String getDriverVersion(String version, Iterator clients) throws InstantiationException, IllegalAccessException {
+        while (clients.hasNext()) {
+            String clientVersion = (String)clients.next();
+            int ret = version.compareTo(clientVersion);
+
+            if (ret >= 0) {
+                return clientVersion;
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Establece la versi�n con la que se comunicar� con el servidor y devuelve
+     * el objeto Capabilities obtenido con dicha versi�n
+     *
+     * @param host maquina con la que se negocia
+     *
+     * @return instancia de un cliente capaz de negociar con el host que se
+     *         pasa como par�metro
+     */
+     public static WMSProtocolHandler negotiate(String host) throws ConnectException, IOException {
+
+        if (supportedVersions.size() == 0)
+        {
+        	return null;
+        }
+
+        try
+        {
+        	String highestVersionSupportedByServer  = getSuitableWMSVersion(host,"");
+        	if (supportedVersions.contains(highestVersionSupportedByServer))
+        	{
+        		//we support the highest version supported by the server
+        		// this is the best case
+        		return createVersionDriver(highestVersionSupportedByServer);
+        	}
+
+
+        else
+        	{
+        		// in case we dont support the highest version from the server
+        		// we start the negotiation process in which we have to get the higest version
+        		// the WMS supports and we are able to read.
+        		Iterator iVersion = supportedVersions.iterator();
+        		String wmsVersion;
+        		String gvSIGVersion;
+
+        		while (iVersion.hasNext()) {
+		                gvSIGVersion = (String)iVersion.next();
+		                wmsVersion = getSuitableWMSVersion(host,gvSIGVersion);
+		                //TODO:
+		                //compare with the version returned by the WMS!!!!!
+		                // send GetCapabilities and read the version to compare.
+		                int res = wmsVersion.compareTo(gvSIGVersion);
+
+		                if (res == 0) { //Si es la misma que nuestra version
+		                    return createVersionDriver(gvSIGVersion);
+		                } else if (res > 0) { //Si es mayor que nuestra version
+		                    throw new Exception("Server Version too high: " + wmsVersion);
+		                } else { //Si es menor que nuestra version
+		                         //Obtenemos la primera version menor o igual que tengamos
+		                    String lowerVersion = WMSProtocolHandlerFactory.getDriverVersion(wmsVersion, iVersion);
+
+		                    if (lowerVersion == null) { //Si no hay ninguna
+		                        throw new Exception("Lowest server version is " + wmsVersion);
+		                    } else {
+		                        if (lowerVersion.equals(wmsVersion)) {
+		                            return createVersionDriver(lowerVersion);
+		                        } else { //Si hay una version menor que la que retorno el servidor
+		                            //iV = lower;
+		                        }
+		                    }
+		                }
+        		}
+        	}//case we had to start the negotiation process.
+	        return null; // if it did not find any suitable version.
+        }
+        catch(ConnectException conEx)
+        {
+        	throw conEx;
+        }
+        catch(IOException ioEx)
+        {
+        	throw ioEx;
+        }
+        catch(Exception e)
+        {
+                logger.warn("Can't determine server version",e);
+          	return null;
+        }
+    }
+
+     /**
+      * Sends a GetCapabilities to the WMS server to get the version
+      * if the version parameter is null, the WMS will return the highest version supported
+      * if not it will return the lower highest version than the one requested.
+      * @param host
+      * @param version
+      * @return suitable version supported by the server
+      */
+     private static String getSuitableWMSVersion(String host, String _version) throws ConnectException, IOException
+     {
+         int sizes[] = new int[] { 1024, 1024*10, 1024*50, 1024*100 };
+         XmlPullParserException  xmlEx = null;
+         for( int i=0; i<sizes.length; i++ ) {
+             String version;
+             try {
+                 version = getSuitableWMSVersion(host, _version, sizes[i]);
+                 return version;
+             } catch (XmlPullParserException ex) {
+                 xmlEx = ex;
+                 // Try with other size
+             }
+         }
+         logger.warn("Can't determine server version",xmlEx);
+         return "";
+     }
+     
+    private static String readFromUrl(String url_s, int size) throws IOException {
+            URL url = new URL(url_s);
+            Utilities.removeURL(url);
+            File f = Utilities.downloadFile(url, "wms_capabilities.xml", null);
+            return FileUtils.readFileToString(f);
+    }
+    
+    private static String getSuitableWMSVersion(String host, String _version, int size) throws ConnectException, IOException, XmlPullParserException {
+        String request = WMSProtocolHandler.buildCapabilitiesSuitableVersionRequest(host, _version);
+        String version = new String();
+        StringReader reader = null;
+        try {
+            String string = readFromUrl(request, size);
+            
+            // patch for ArcIMS + WMS connector > 9.0 bug
+            int a = string.toLowerCase().indexOf("<?xml");
+            if ( a != -1 ) {
+                string = string.substring(a, string.length());
+            }
+            // end patch
+
+            reader = new StringReader(string);
+            KXmlParser kxmlParser = null;
+            kxmlParser = new KXmlParser();
+            kxmlParser.setInput(reader);
+            kxmlParser.nextTag();
+            if ( kxmlParser.getEventType() != KXmlParser.END_DOCUMENT ) {
+                if ( (kxmlParser.getName().compareTo(CapabilitiesTags.CAPABILITIES_ROOT1_1_0) == 0)
+                        || (kxmlParser.getName().compareTo(CapabilitiesTags.CAPABILITIES_ROOT1_1_1) == 0)
+                        || (kxmlParser.getName().compareTo(CapabilitiesTags.CAPABILITIES_ROOT1_3_0) == 0) ) {
+                    version = kxmlParser.getAttributeValue("", CapabilitiesTags.VERSION);
+                }
+            }
+            // do not forget to close the Stream.
+            reader.close();
+            reader = null;
+            return version;
+        } catch (ConnectException conEx) {
+            throw new ConnectException(conEx.getMessage());
+        } catch (IOException ioEx) {
+            throw new IOException(ioEx.getMessage());
+        } catch (XmlPullParserException xmlEx) {
+            throw xmlEx;
+//                    logger.warn("Can't determine server version",xmlEx);
+//                    return "";
+        } finally {
+            if ( reader != null ) {
+                try {
+                    reader.close();
+                } catch (Exception ex) {
+                    logger.warn("Can't close reader", ex);
+                }
+            }
+        }
+    }
+
+     /**
+      * It creates an instance of a WMSDriver class.
+      *
+      * @param String, with the version of the driver to be created
+      * @return WMSDriver.
+      */
+       private static WMSProtocolHandler createVersionDriver(String version)
+       {
+         try
+         {
+           Class driver;
+           version = version.replace('.', '_');
+           driver = Class.forName("org.gvsig.remoteclient.wms.wms_"+version+".WMSProtocolHandler" + version);
+           return (WMSProtocolHandler)driver.newInstance();
+         }
+         catch (Exception e)
+         {
+                logger.warn("Can't create WMS protocol handler for version '"+version+"'.",e);
+           //throw new Exception("WMSDriverFactory. Unknown driver version " + e);
+        	 return null;
+         }
+       }
+
+ }
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/WMSLayer.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/WMSLayer.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/WMSLayer.java	(revision 21019)
@@ -0,0 +1,561 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+package org.gvsig.remoteclient.wms;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.TreeMap;
+import java.util.Vector;
+
+import org.kxml2.io.KXmlParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import org.gvsig.remoteclient.utils.BoundaryBox;
+import org.gvsig.remoteclient.utils.CapabilitiesTags;
+
+/**
+ * <p>Abstract class that defines an WMSLayer.</p>
+ *
+ */
+public abstract class WMSLayer implements org.gvsig.remoteclient.ILayer {
+
+    protected ArrayList children;
+    protected WMSLayer parent;
+
+    /**
+     * <p>Layer Abstract field in the capabilities document </p>
+     */
+    private String layerAbstract;
+
+    /**
+     * <p>Themes provided by the WMS for the layer</p>
+     */
+    public ArrayList styles = new ArrayList();
+
+    /**
+     * <p>Layer name</p>
+     */
+    private String name;
+
+    /**
+     * <p>Layer title</p>
+     */
+    private String title;
+
+    private ArrayList keywordList = new ArrayList();
+    /**
+     * <p>CRS list of this layer (Tag CRS)</p>
+     */
+    protected Vector srs = new Vector();
+
+    /**
+     * <p>Bounding box por CRS (Tag BoundingBox)</p>
+     */
+    private Hashtable bBoxes  = new Hashtable();
+
+    /**
+     * <p>extents that defines the bbox for the LatLon projection
+     * It can be included in the bBoxes vector as well, because it is the most used, we keep it separeted too, according
+     *  with the OGC WMSCapabilities specifications...
+     */
+    private org.gvsig.remoteclient.utils.BoundaryBox latLonBbox;
+
+    /**
+     * <p>min scale for the layer to be visible</p>
+     */
+    private double scaleMin;
+
+    /**
+     * <p>max scale for the layer to be visible</p>
+     */
+    private double scaleMax;
+
+    /**
+     * <p>Dimensions defined for the layer in the capabilities doc</p>
+     */
+    protected java.util.ArrayList dimensions = new ArrayList();
+
+    /**
+     * Tells if this layer accepts getFeatureInfo requests.
+     */
+    private boolean queryable = false;
+
+    /**
+     * Tells if this layer is opaque.
+     */
+    private boolean opaque = false;
+    /**
+     * when set to true, noSubsets indicates that the server is not able to make a map
+     * of a geographic area other than the layer's bounding box.
+     */
+    private boolean m_noSubSets = false;
+
+    /**
+     * when present and non-zero fixedWidth and fixedHeight indicate that the server is not
+     * able to produce a map of the layer at a width and height different from the fixed sizes indicated.
+     */
+    private int fixedWidth = 0;
+    private int fixedHeight = 0;
+
+    /**
+     * Tells if this layer can be served with transparency.
+     */
+    private boolean transparency;
+
+    /**
+     * <p>Parses the LAYER tag in the WMS capabilities, filling the WMSLayer object
+     * loading the data in memory to be easily accesed</p>
+     *
+     */
+    public abstract void parse(KXmlParser parser, TreeMap layerTreeMap)
+    throws IOException, XmlPullParserException;
+
+    //public abstract ArrayList getAllDimensions();
+
+    /**
+     * add a new keyword to the keywordList.
+     * @param key
+     */
+    protected void addkeyword(String key) {
+    	keywordList.add(key);
+    }
+    
+    public ArrayList getKeywords() {
+    	return keywordList;
+    }
+    
+    /**
+     * <p>Adds a style to the styles vector</p>
+     * @param _style
+     */
+    public void addStyle(org.gvsig.remoteclient.wms.WMSStyle _style) {
+        styles.add( _style );    
+    }
+
+    /**
+     * <p>Gets the style vector</p>
+     * @return
+     */
+    public ArrayList getStyles() {
+    	ArrayList list = new ArrayList();
+    	if (styles != null)
+    		list.addAll(styles);
+    	if (this.getParent()!= null) {
+    		//return getAllStyles(this);
+    		if(this.getParent().getStyles() != null)
+    			list.addAll(this.getParent().getStyles());
+    	}
+        return list;
+    }
+
+    public ArrayList getAllStyles(WMSLayer layer) {
+    	if (layer.getParent()!= null) {
+    		ArrayList list = getAllStyles(layer.getParent());
+    		for(int i = 0; i < this.styles.size(); i++) {
+    			list.add(styles.get(i));
+    		}
+    		return list;
+    	} else {
+    		return styles;
+    	}
+    }
+    
+    /**
+     * <p>Adds a bbox to the Bboxes vector</p>
+     * @param bbox
+     */
+    public void addBBox(BoundaryBox bbox) {
+        bBoxes.put(bbox.getSrs(), bbox);
+    }
+
+    /**
+     * <p>returns the bbox with that id in the Bboxes vector</p>
+     * @param id
+     */
+    public BoundaryBox getBbox(String id) {
+    	//Si hay una bounding box definida para esa capa y ese crs, se usa esa
+    	BoundaryBox b = (BoundaryBox) bBoxes.get(id);
+    	if(b != null)
+    		return b;
+    	
+    	if ((id.compareToIgnoreCase( CapabilitiesTags.EPSG_4326 )==0)
+    		||(id.compareToIgnoreCase( CapabilitiesTags.CRS_84)==0)) {
+    		if (latLonBbox != null)
+    		return (BoundaryBox)latLonBbox;
+    	}
+        
+        if (parent!=null)
+            return parent.getBbox(id);
+        return null;
+    }
+
+    /**
+     * <p>Gets the bBoxes vector</p>
+     * @return
+     */
+    public Hashtable getBboxes() {
+        return bBoxes;
+    }
+
+
+    //Methods to manipulate the box that defines the layer extent in LatLon SRS.
+    public BoundaryBox getLatLonBox() {
+        return latLonBbox;
+    }
+    
+    public void setLatLonBox(BoundaryBox box) {
+        latLonBbox = box;
+    }
+    
+    /**
+     * <p>adds a new srs to the srs vector</p>
+     */
+    public void addSrs(String srs) {
+    	if (!this.srs.contains(srs))
+    		this.srs.add(srs);
+    }
+    
+    public void removeSrs(String srs) {
+   		this.srs.remove(srs);
+    }
+
+    public Vector getAllSrs() {
+        Vector mySRSs = (Vector) this.srs.clone();
+        if (parent!=null)
+            mySRSs.addAll(parent.getAllSrs());
+        return mySRSs;
+    }
+
+    /**
+     * <p>gets the maximum scale for this layer</p>
+     * @return
+     */
+    public double getScaleMax() {
+        return scaleMax;
+    }
+
+    /**
+     * <p>gets the minimum scale for this layer</p>
+     * @return
+     */
+    public double getScaleMin() {
+        return scaleMin;
+    }
+
+    /**
+     * <p>sets the minimum scale for this layer to be visible.</p>
+     *
+     * @param scale
+     */
+    public void setScaleMin(double scale) {
+        scaleMin = scale;
+    }
+
+    /**
+     * <p>sets the maximum scale for this layer to be visible</p>
+     * @param scale
+     */
+    public void setScaleMax(double scale) {
+        scaleMax = scale;
+    }
+
+    /**
+     * <p> gets the dimension vector defined in this layer</p>
+     * @return
+     */
+    public abstract ArrayList getDimensions();
+
+    public WMSDimension getDimension(String name) {
+    	for(int i = 0; i < dimensions.size(); i++ ) {
+    		if(((WMSDimension)dimensions.get(i)).getName().compareTo(name) == 0) {
+    			return (WMSDimension)dimensions.get(i);
+    		}
+    	}
+    	return null;
+    }
+
+    /**
+     * <p>Adds a dimension to the dimension vector </p>
+     * @param dimension
+     */
+    public void addDimension(org.gvsig.remoteclient.wms.WMSDimension dimension) {
+        dimensions.add(dimension);
+    }
+
+    /**
+     * <p>Gets layer name</p>
+     * @return
+     */
+    public String getName() {
+        return this.name;
+    }
+
+    /**
+     * <p>Sets layer name</p>
+     * @param _name
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * <p>Gets layer title</p>
+     * @return
+     */
+    public String getTitle() {
+        return title;
+    }
+
+    /**
+     * <p>Sets the layer title</p>
+     * @param _title
+     */
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    /**
+     * <p>Gets the layer abstract</p>
+     * @return
+     */
+    public String getAbstract() {
+        return layerAbstract;
+    }
+
+    /**
+     * <p>Sets the layer abstract</p>
+     * @param m_abstract
+     */
+    public void setAbstract(String _abstract) {
+        layerAbstract = _abstract;
+    }
+
+
+    public ArrayList getChildren() {
+        return children;
+    }
+
+
+    public void setChildren(ArrayList children) {
+        this.children = children;
+    }
+
+
+    public WMSLayer getParent() {
+        return parent;
+    }
+
+
+    public void setParent(WMSLayer parent) {
+        this.parent = parent;
+    }
+
+    public String toString(){
+        return this.getTitle();
+    }
+
+
+    /**
+     * Tells if this layer accepts getFeatureInfo requests.
+     */
+    public boolean isQueryable() {
+        return queryable;
+    }
+
+
+    /**
+     * @param queryable The queryable to set.
+     */
+    public void setQueryable(boolean queryable) {
+        this.queryable = queryable;
+    }
+
+    /**
+     * Tells if this layer is opaque.
+     */
+    public boolean isOpaque() {
+        return opaque;
+    }
+    /**
+     * @param opaque.
+     */
+    public void setOpaque(boolean opaque) {
+        this.opaque = opaque;
+    }
+
+    /**
+     * Tells if this layer is subsettable
+     */
+    public boolean noSubSets() {
+        return this.m_noSubSets;
+    }
+    /**
+     * @param set layer nosubsets attribute.
+     */
+    public void setNoSubSets(boolean _noSubSets) {
+        m_noSubSets = _noSubSets;
+    }
+
+    public void setfixedWidth(int w) {
+        fixedWidth = w;
+    }
+
+    public int getfixedWidth() {
+        return fixedWidth;
+    }
+
+    public void setfixedHeight(int h) {
+        fixedHeight = h;
+    }
+
+    public int getfixedHeight() {
+        return fixedHeight;
+    }
+
+    /**
+     * @return <b>true</b> if this layer can be served with transparency, otherwise <b>false</b>
+     */
+    public boolean hasTransparency() {
+        return transparency;
+    }
+
+    //Methods to parse tags that are common to several versions of WMS.
+    //In case there is a version which has different implemantation of one of this tags
+    // the subclass can overwrite this method
+
+    /**
+     * Parses the keywordlist from the capabilities and fills this list in the WMSLayer.
+     * @param parser
+     */
+    protected void parseKeywordList(KXmlParser parser)  throws IOException, XmlPullParserException {
+    	int currentTag;
+    	boolean end = false;
+    	String value;
+
+    	parser.require(KXmlParser.START_TAG, null, CapabilitiesTags.KEYWORDLIST);
+    	currentTag = parser.nextTag();
+
+        while (!end) {
+			 switch(currentTag) {
+				case KXmlParser.START_TAG:
+					if (parser.getName().compareTo(CapabilitiesTags.KEYWORD) == 0) {
+						value = parser.nextText();
+						if ((value != null) && (value.length() > 0 ))
+							addkeyword(value);
+					}
+					break;
+				case KXmlParser.END_TAG:
+					if (parser.getName().compareTo(CapabilitiesTags.KEYWORDLIST) == 0)
+						end = true;
+					break;
+				case KXmlParser.TEXT:
+					break;
+			 }
+			 if (!end) {
+				 currentTag = parser.next();
+			 }
+    	}
+    	parser.require(KXmlParser.END_TAG, null, CapabilitiesTags.KEYWORDLIST);
+    }
+
+    /**
+     * Reads and parses the layer attributes
+     * Maybe this method should be moved to the WMSLayer. Until now the attributes are teh same for all versions.
+     * @param parser
+     */
+    protected void readLayerAttributes(KXmlParser parser) {
+    	String value = new String();
+
+        //First of all set whether the layer is Queryable reading the attribute.
+        value = parser.getAttributeValue("", CapabilitiesTags.QUERYABLE);
+        if (value != null) {
+            if (value.compareTo("0") == 0)
+                setQueryable(false);
+            else
+                setQueryable(true);
+        }
+        value = parser.getAttributeValue("", CapabilitiesTags.OPAQUE);
+        if (value != null) {
+            if (value.compareTo("0") == 0)
+                setOpaque(false);
+            else
+                setOpaque(true);
+        }
+        value = parser.getAttributeValue("", CapabilitiesTags.NOSUBSETS);
+        if (value != null) {
+            if (value.compareTo("0") == 0)
+                setNoSubSets(false);
+            else
+            	setNoSubSets(true);
+        }
+        value = parser.getAttributeValue("", CapabilitiesTags.FIXEDWIDTH);
+        if (value != null) {
+        	setfixedWidth(Integer.parseInt(value));
+        }
+        value = parser.getAttributeValue("", CapabilitiesTags.FIXEDHEIGHT);
+        if (value != null) {
+        	setfixedHeight(Integer.parseInt(value));
+        }
+    }
+
+
+    /**
+     * <p>Inner class describing the MetadataURL tag in OGC specifications in WMS</p>
+     *
+     */
+    protected class MetadataURL {
+    	public MetadataURL() {
+    		type = new String();
+    		format = new String();
+    		onlineResource_xlink = new String();
+    		onlineResource_type = new String();
+    		onlineResource_href = new String();
+    	}
+        public String type;
+        public String format;
+        public String onlineResource_xlink;
+        public String onlineResource_type;
+        public String onlineResource_href;
+     }
+
+    /**
+     * <p>Inner class describing the DataURL tag in OGC specifications in WMS</p>
+     *
+     */
+    protected class DataURL {
+    	public DataURL() {
+    		type = new String();
+    		format = new String();
+    		onlineResource_xlink = new String();
+    		onlineResource_type = new String();
+    		onlineResource_href = new String();
+    	}
+        public String type;
+        public String format;
+        public String onlineResource_xlink;
+        public String onlineResource_type;
+        public String onlineResource_href;
+     }
+}
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/WMSClient.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/WMSClient.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/WMSClient.java	(revision 21019)
@@ -0,0 +1,350 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+
+package org.gvsig.remoteclient.wms;
+
+import java.awt.geom.Rectangle2D;
+import java.io.File;
+import java.io.IOException;
+import java.net.ConnectException;
+import java.net.URL;
+import java.util.TreeMap;
+import java.util.Vector;
+import org.apache.commons.lang3.StringUtils;
+
+import org.gvsig.compat.net.ICancellable;
+import org.gvsig.remoteclient.exceptions.ServerErrorException;
+import org.gvsig.remoteclient.exceptions.WMSException;
+import org.gvsig.remoteclient.utils.BoundaryBox;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * <p>Represents the class the with the necessary logic to connect to a OGCWMS and interpretate the data </p>
+ * 
+ */
+public class WMSClient extends org.gvsig.remoteclient.RasterClient {
+    
+    private static final Logger logger = LoggerFactory.getLogger(WMSClient.class);
+    private org.gvsig.remoteclient.wms.WMSProtocolHandler handler;
+//    private TreeMap layers = new TreeMap();
+//    private WMSLayer rootLayer;
+    
+    /**
+     * @return Returns the rootLayer.
+     */
+    public WMSLayer getRootLayer() {
+        return handler.rootLayer;
+    }
+
+    /**
+     * Constructor.
+     * the parameter host, indicates the WMS host to connect.
+     * */
+    public WMSClient(String host) throws ConnectException, IOException 
+    {
+    	setHost(host);
+        try {        	
+        	handler = WMSProtocolHandlerFactory.negotiate(host);
+        	handler.setHost(host);        
+        } catch(ConnectException conE) {
+                logger.warn("Can't create WMS protocol handler for host '"+host+"'.",conE);
+        	throw conE; 
+        } catch(IOException ioE) {
+                logger.warn("Can't create WMS protocol handler for host '"+host+"'.",ioE);
+        	throw ioE; 
+        } catch(Exception e) {
+                logger.warn("Can't create WMS protocol handler for host '"+host+"'.",e);
+        }
+    }
+    
+    public String getVersion()
+    {
+        return handler.getVersion();
+    }
+    /**
+     * <p>One of the three interfaces that OGC WMS defines. Request a map.</p> 
+     * @throws ServerErrorException 
+     */
+    public File getMap(WMSStatus status, ICancellable cancel) throws WMSException, ServerErrorException{   
+        return handler.getMap(status, cancel);
+    } 
+    
+    /**
+     * <p>Gets the GetMap URL. The final client should download the file</p> 
+     * @throws ServerErrorException 
+     */
+    public URL getGetMapURL(WMSStatus status, ICancellable cancel) throws WMSException, ServerErrorException{   
+       return handler.getMapURL(status, cancel);
+    } 
+    
+    /**
+     * Returns the exception message if the file is a XML instead of a image.
+     * @param file
+     * @return
+     * @throws IOException 
+     */
+    public String getExceptionMessage(File file) throws IOException {
+    	return handler.getExceptionMessage(file);
+    }
+    
+    /**
+     * <p>One of the three interfaces defined by OGC WMS, it gets the service capabilities</p>
+     * @param override, if true the previous downloaded data will be overridden
+     */
+    public void getCapabilities(WMSStatus status, boolean override, ICancellable cancel) {        
+        handler.getCapabilities(status, override, cancel);
+    } 
+    
+    /**
+     * <p>One of the three interfaces defined by the OGC WMS, it gets the information about a feature requested</p>
+     * @return 
+     */
+    public String getFeatureInfo(WMSStatus status, int x, int y, int featureCount, ICancellable cancel) throws WMSException{        
+        return handler.getFeatureInfo(status, x, y, featureCount, cancel);
+    } 
+    
+    /**
+     * <p>One of the three interfaces defined by the OGC WMS, it gets legend of a layer</p>
+     * @return 
+     */
+    public File getLegendGraphic(WMSStatus status, String layerName, ICancellable cancel) throws WMSException, ServerErrorException{        
+        return handler.getLegendGraphic(status, layerName, cancel);
+    } 
+    
+    /**
+     * <p> Reads from the WMS Capabilities, the layers available in the service</p>
+     * @return a TreeMap with the available layers in the WMS 
+     */
+    public TreeMap getLayers() {        
+        return handler.layers;
+    } 
+    
+    /**
+     * <p>Reads from the WMS Capabilities the number if layers available in the service</p>
+     * @return, number of layers available
+     */
+    public int getNumberOfLayers() {        
+        if (handler.layers != null)
+        {
+            return handler.layers.size();
+        }
+        return 0;
+    } 
+    
+    /**
+     * <p>Gets the WMSLayer with this name</p>
+     * 
+     * @param _name, layer name
+     * @return the layer with this name
+     */
+    public WMSLayer getLayer(String _name) {        
+        if (handler.layers.get(_name) != null)
+        {
+            return (WMSLayer)handler.layers.get(_name);
+        }
+        
+        return null;
+    } 
+    
+    public String[] getLayerNames()
+    {    	
+        WMSLayer[] lyrs;
+        
+        lyrs = (WMSLayer[])handler.layers.values().toArray(new WMSLayer[0]);
+        
+        String[] names = new String[lyrs.length];
+        
+        for(int i = 0; i<lyrs.length; i++)
+        {
+            names[i] = ((WMSLayer)lyrs[i]).getName();
+        }
+        return names;
+    }
+    
+    public String[] getLayerTitles()
+    {    	
+        WMSLayer[] lyrs;
+        
+        lyrs = (WMSLayer[])handler.layers.values().toArray(new WMSLayer[0]);
+        
+        String[] titles = new String[lyrs.length];
+        
+        for(int i = 0; i<lyrs.length; i++)
+        {
+            titles[i] = ((WMSLayer)lyrs[i]).getTitle();
+        }
+        return titles;
+    }
+    /**
+     * <p>Gets the image formats available in the Service to retrieve the maps</p>
+     * @return a vector with all the available formats
+     */
+    public Vector getFormats() {        
+        return ((WMSServiceInformation)handler.getServiceInformation()).formats;         
+    } 
+    
+    /**
+     * <p>Gets the information by point formats available in the Service</p>
+     * @return a vector with all the available formats
+     */
+    public Vector getInfoFormats() {        
+        return ((WMSServiceInformation)handler.getServiceInformation()).infoformats;
+    } 
+    
+    public boolean isQueryable()
+    {
+    	return ((WMSServiceInformation)handler.getServiceInformation()).isQueryable();  
+    }
+    public boolean hasLegendGraphic()
+    {
+    	return ((WMSServiceInformation)handler.getServiceInformation()).hasLegendGraphic();  
+    }
+    
+    public void close() {        
+        // your code here
+    } 
+    
+    
+    /**
+     * Returns the max extent that envolves the requested layers
+     * */
+    public Rectangle2D getLayersExtent(String[]layerNames, String srs) {
+        try {
+        	if (layerNames == null) {
+        		return null;
+        	}
+        	
+            BoundaryBox bbox = null;
+            WMSLayer layer = getLayer(layerNames[0]);
+            
+            bbox = layer.getBbox(srs);
+            if (bbox == null) {
+            	return null;
+            }
+            double xmin = bbox.getXmin();
+            double xmax = bbox.getXmax();
+            double ymin = bbox.getYmin();
+            double ymax = bbox.getYmax();
+            
+            for(int i = 1; i < layerNames.length; i++) {
+                layer = getLayer(layerNames[i]);
+                bbox = layer.getBbox(srs);
+                if (bbox == null) return null;
+                if (bbox.getXmin() < xmin) {
+                    xmin = bbox.getXmin();
+                }
+                if (bbox.getYmin() < ymin) {
+                    ymin = bbox.getYmin();
+                }
+                if (bbox.getXmax() > xmax) {
+                    xmax = bbox.getXmax();
+                }
+                if (bbox.getYmax() > ymax) {
+                    ymax = bbox.getYmax();
+                }
+            }	
+            
+            Rectangle2D extent = new Rectangle2D.Double(xmin, ymin, Math.abs(xmax-xmin), Math.abs(ymax-ymin));
+            return extent;
+        } catch(Exception e) {
+            String msg = null;
+            try {
+                msg = "Can't get layers extent, layers='"+StringUtils.join(layerNames, ",")+"', srs='"+srs+"'.";
+            } catch(Exception ex) {
+                msg = "Can't get layers extent.";
+            }
+            logger.warn(msg,e);
+            return null;
+        }
+    }
+    
+    
+    /**
+     * Gets the Service information included in the Capabilities
+     * */    
+    public WMSServiceInformation getServiceInformation()
+    {
+        return ((WMSServiceInformation)handler.getServiceInformation());
+    }
+    
+    
+    /**
+     * <p>Checks the connection to the remote WMS and requests its capabilities.</p>
+     * @param override, if true the previous downloaded data will be overridden
+     * 
+     * @deprecated Use {@link #connect(WMSStatus, boolean, ICancellable)} instead,
+     * as the WMSStatus is necessary when connecting in order to correct
+     * call the getCapabilities method.
+     */
+    public boolean connect(boolean override, ICancellable cancel) 
+    {
+    	return connect(null, override, cancel);
+    }
+    
+    /**
+     * <p>Checks the connection to the remote WMS and requests its capabilities.</p>
+     * <p>This method should probably be moved to RemoteClient interface, as the
+     * same problem will probably happen for other protocols</p>
+     * 
+     * @param override, if true the previous downloaded data will be overridden
+     */
+    public boolean connect(WMSStatus status, boolean override, ICancellable cancel) 
+    {
+        String host = getHost();
+        try {            
+            if (handler == null)
+            {
+                if (host.trim().length() > 0)
+                {					
+                    //TODO: Implement correctly the negotiate algorithm
+                    handler = WMSProtocolHandlerFactory.negotiate(host);
+                    //handler = new WMSProtocolHandler1_1_1();
+                    handler.setHost(host);
+                }
+                else
+                {
+                    //must to specify host first!!!!
+                    return false;
+                }                
+            }
+            getCapabilities(status, override, cancel);
+            return true;
+            
+        } catch (Exception e) {
+            logger.warn("Can't connect to host '"+host+"'.",e);
+            return false;
+        }
+    }
+    
+    //TODO Check this out: Always 1 layer at first level...
+    public WMSLayer getLayersRoot() {
+        return handler.rootLayer;
+    }
+
+	public boolean connect(ICancellable cancel) {
+		return connect(false, cancel);
+	}
+}
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_0/WMSProtocolHandler1_1_0.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_0/WMSProtocolHandler1_1_0.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_0/WMSProtocolHandler1_1_0.java	(revision 21019)
@@ -0,0 +1,327 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+
+package org.gvsig.remoteclient.wms.wms_1_1_0;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.TreeMap;
+
+import org.kxml2.io.KXmlParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import org.gvsig.remoteclient.utils.CapabilitiesTags;
+import org.gvsig.remoteclient.utils.EncodingXMLParser;
+import org.gvsig.remoteclient.utils.ExceptionTags;
+import org.gvsig.remoteclient.wms.WMSServiceInformation;
+import org.gvsig.remoteclient.wms.WMSStatus;
+import org.gvsig.remoteclient.wms.request.WMSGetCapabilitiesRequest;
+import org.gvsig.remoteclient.wms.request.WMSGetFeatureInfoRequest;
+import org.gvsig.remoteclient.wms.request.WMSGetLegendGraphicRequest;
+import org.gvsig.remoteclient.wms.request.WMSGetMapRequest;
+import org.gvsig.remoteclient.wms.wms_1_1_0.request.WMSGetCapabilitiesRequest1_1_0;
+import org.gvsig.remoteclient.wms.wms_1_1_0.request.WMSGetFeatureInfoRequest1_1_0;
+import org.gvsig.remoteclient.wms.wms_1_1_0.request.WMSGetLegendGraphicRequest1_1_0;
+import org.gvsig.remoteclient.wms.wms_1_1_0.request.WMSGetMapRequest1_1_0;
+import org.gvsig.remoteclient.wms.wms_1_3_0.WMSProtocolHandler1_3_0;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * <p>
+ * Describes the handler to comunicate to a WMS 1.1.0
+ * </p>
+ */
+public class WMSProtocolHandler1_1_0 extends org.gvsig.remoteclient.wms.WMSProtocolHandler
+{
+    
+        private static final Logger logger = LoggerFactory.getLogger(WMSProtocolHandler1_1_0.class);
+	private WMSLayer1_1_0 fakeRootLayer;
+    
+	public WMSProtocolHandler1_1_0()
+	{
+		this.version = "1.1.0";
+		this.name = "WMS1.1.0";
+		this.serviceInfo = new WMSServiceInformation(); 
+		this.layers = new TreeMap();
+	}
+    
+//------------------------------------------------------------------------------
+// Parsing methods....    
+//------------------------------------------------------------------------------    
+
+
+	public boolean parseCapabilities(File f)
+    {       
+    	rootLayer = null;
+    	int tag;
+    	EncodingXMLParser kxmlParser = null;
+    	kxmlParser = new EncodingXMLParser();
+    	try
+    	{
+    		kxmlParser.setInput(f);
+    		kxmlParser.nextTag();
+    		if ( kxmlParser.getEventType() != KXmlParser.END_DOCUMENT ) 
+    		{    		
+    			kxmlParser.require(KXmlParser.START_TAG, null, CapabilitiesTags.CAPABILITIES_ROOT1_1_1);    			
+    			tag = kxmlParser.nextTag();
+				 while(tag != KXmlParser.END_DOCUMENT)
+				 {
+                     switch(tag)
+					 {
+                         
+						case KXmlParser.START_TAG:
+							if (kxmlParser.getName().compareTo(CapabilitiesTags.SERVICE )==0)
+							{
+								parseServiceTag(kxmlParser);
+							}	
+							else if (kxmlParser.getName().compareTo(CapabilitiesTags.CAPABILITY)==0)
+							{
+								parseCapabilityTag(kxmlParser);
+							}
+							break;
+						case KXmlParser.END_TAG:							
+							break;
+						case KXmlParser.TEXT:
+												
+						break;
+					 }
+    				 tag = kxmlParser.next();
+    			 }
+
+    			kxmlParser.require(KXmlParser.END_DOCUMENT, null, null);
+    		}
+    	}
+    	catch(XmlPullParserException parser_ex){
+                logger.warn("Error parsing capabilites.",parser_ex);
+    		return false;
+    	}
+   		catch (IOException ioe) {			
+                        logger.warn("Error parsing capabilites.",ioe);
+   			return false;
+		} finally {
+            return true;
+        }
+    } 
+    
+    /**
+     * <p>Parses the Service Information </p>
+     */    
+    private void parseServiceTag(KXmlParser parser) throws IOException, XmlPullParserException 
+    {
+    	int currentTag;
+    	boolean end = false;
+    	
+    	parser.require(KXmlParser.START_TAG, null, CapabilitiesTags.SERVICE);
+    	currentTag = parser.next();
+    	
+    	while (!end) 
+    	{
+			 switch(currentTag)
+			 {
+				case KXmlParser.START_TAG:
+					if (parser.getName().compareTo(CapabilitiesTags.NAME)==0)
+					{
+						serviceInfo.name = parser.nextText(); 
+					}	
+					else if (parser.getName().compareTo(CapabilitiesTags.TITLE)==0)
+					{
+						serviceInfo.title = parser.nextText(); 
+					}
+					else if (parser.getName().compareTo(CapabilitiesTags.ABSTRACT)==0)
+					{
+						serviceInfo.abstr = parser.nextText(); 
+					}
+					else if (parser.getName().compareTo(CapabilitiesTags.ONLINERESOURCE)==0)
+					{
+				    	String value = null;
+				        value = parser.getAttributeValue("", CapabilitiesTags.XLINK_HREF);
+				        if (value != null){
+				        	serviceInfo.online_resource = value;
+				        }
+					}					
+					else if ((parser.getName().compareTo(CapabilitiesTags.KEYWORDLIST)==0) ||
+							(parser.getName().compareTo(CapabilitiesTags.CONTACTINFORMATION)==0))
+					{
+						parser.skipSubTree();
+					}					
+					break;
+				case KXmlParser.END_TAG:
+					if (parser.getName().compareTo(CapabilitiesTags.SERVICE) == 0)
+						end = true;
+					break;
+				case KXmlParser.TEXT:					
+				break;
+			 }
+             if (!end)
+                 currentTag = parser.next();
+    	}
+    	parser.require(KXmlParser.END_TAG, null, CapabilitiesTags.SERVICE);
+    }
+    
+    /**
+     * <p>Parses the Capability Tag </p>
+     */    
+    private void parseCapabilityTag(KXmlParser parser) throws IOException, XmlPullParserException
+    { 	
+    	int currentTag;
+    	boolean end = false;
+    	
+    	parser.require(KXmlParser.START_TAG, null, CapabilitiesTags.CAPABILITY);
+    	currentTag = parser.next();
+    	
+    	while (!end) 
+    	{
+			 switch(currentTag)
+			 {
+				case KXmlParser.START_TAG:
+					if (parser.getName().compareTo(CapabilitiesTags.REQUEST)==0)
+					{
+						parseRequestTag(parser); 
+					}	
+					else if (parser.getName().compareTo(CapabilitiesTags.EXCEPTION)==0)
+					{
+						// TODO:
+						// add the exception formats supported.
+					}
+					else if (parser.getName().compareTo(CapabilitiesTags.LAYER)==0)
+					{
+						WMSLayer1_1_0 lyr = new WMSLayer1_1_0();
+                        if (rootLayer == null)
+                            rootLayer = lyr;
+                        else {
+                            // Handles when there is no general root layer, will use
+                            // a fake non-queryable one.
+                            if (!rootLayer.equals(getFakeRootLayer())){
+                                WMSLayer1_1_0 aux = (WMSLayer1_1_0) rootLayer;
+                                rootLayer  = getFakeRootLayer();
+                                rootLayer.getChildren().add(aux);
+                            }
+                            rootLayer.getChildren().add(lyr);
+                        }
+						lyr.parse(parser, layers);
+						
+                        if (lyr.getName()!=null)
+						    layers.put(lyr.getName(), lyr); 													
+					}
+					else if ((parser.getName().compareTo(CapabilitiesTags.VENDORSPECIFICCAPABILITIES)==0) ||
+							(parser.getName().compareTo(CapabilitiesTags.USERDEFINEDSYMBOLIZATION )==0))
+                            
+					{
+						parser.skipSubTree();
+					}					
+					break;
+				case KXmlParser.END_TAG:
+					if (parser.getName().compareTo(CapabilitiesTags.CAPABILITY) == 0)
+						end = true;
+					break;
+				case KXmlParser.TEXT:					
+				break;
+			 }
+			 if (!end)
+			 currentTag = parser.next();
+    	}
+    	//parser.require(KXmlParser.END_TAG, null, CapabilitiesTags.CAPABILITY);    	
+    }   
+    
+    
+    private WMSLayer1_1_0 getFakeRootLayer(){
+        if (fakeRootLayer == null){
+            fakeRootLayer = new WMSLayer1_1_0();
+            fakeRootLayer.setTitle(serviceInfo.title);
+            fakeRootLayer.setQueryable(false);
+            fakeRootLayer.setName(null);
+        }
+        return fakeRootLayer;
+    }
+    
+    protected String parseException(byte[] data) {
+        ArrayList errors = new ArrayList();
+        KXmlParser kxmlParser = new KXmlParser();
+        
+        try
+        {
+            kxmlParser.setInput(new ByteArrayInputStream(data), encoding);        
+            kxmlParser.nextTag();
+            int tag;
+            if ( kxmlParser.getEventType() != KXmlParser.END_DOCUMENT ) 
+            { 
+                kxmlParser.require(KXmlParser.START_TAG, null, ExceptionTags.EXCEPTION_ROOT);             
+                tag = kxmlParser.nextTag();
+                 while(tag != KXmlParser.END_DOCUMENT)
+                 {
+                     switch(tag)
+                     {
+                        case KXmlParser.START_TAG:
+                            if (kxmlParser.getName().compareTo(ExceptionTags.SERVICE_EXCEPTION)==0){
+                                String errorCode = kxmlParser.getAttributeValue("", ExceptionTags.CODE);
+                                errorCode = (errorCode != null) ? "["+errorCode+"] " : "";
+                                String errorMessage = kxmlParser.nextText();
+                                errors.add(errorCode+errorMessage);
+                            }
+                            break;
+                        case KXmlParser.END_TAG:                            
+                            break;
+                        
+                     }
+                     tag = kxmlParser.nextTag();
+                 }
+                 //kxmlParser.require(KXmlParser.END_DOCUMENT, null, null);
+            }
+        }
+        catch(XmlPullParserException parser_ex){
+            logger.warn("",parser_ex);
+        }
+        catch (IOException ioe) {           
+            logger.warn("",ioe);
+        }
+        String message = errors.size()>0? "" : null;
+        for (int i = 0; i < errors.size(); i++) {
+            message += (String) errors.get(i)+"\n";
+        }
+        return message;
+    }
+
+	protected WMSGetFeatureInfoRequest createGetFeatureInfoRequest(
+			WMSStatus status, int x, int y) {
+		return new WMSGetFeatureInfoRequest1_1_0(status, this, x, y);
+	}
+
+	protected WMSGetMapRequest createGetMapRequest(WMSStatus status) {
+		return new WMSGetMapRequest1_1_0(status, this);
+	}
+
+	protected WMSGetLegendGraphicRequest createGetLegendGraphicRequest(
+			WMSStatus status, String layerName) {
+		return new WMSGetLegendGraphicRequest1_1_0(status, this, layerName);
+	}
+
+	protected WMSGetCapabilitiesRequest createGetCapabilitiesRequest(
+			WMSStatus status) {
+		return new WMSGetCapabilitiesRequest1_1_0(status, this);
+	}
+    
+  }
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_0/WMSStyle1_1_0.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_0/WMSStyle1_1_0.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_0/WMSStyle1_1_0.java	(revision 21019)
@@ -0,0 +1,88 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+
+package org.gvsig.remoteclient.wms.wms_1_1_0;
+
+import java.io.IOException;
+
+import org.kxml2.io.KXmlParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import org.gvsig.remoteclient.utils.CapabilitiesTags;
+
+/**
+ * <p>Represents the layer style defined by the OGC Specifications for WMS 1.1.0</p>
+ * 
+ */
+public class WMSStyle1_1_0 extends org.gvsig.remoteclient.wms.WMSStyle {
+
+/**
+ * <p>URL pointing to the legend for a layer with this style</p>
+ */
+
+/**
+ * <p>Parses the STYLE TAG according with the OGC Specifications for the WMS 1.1.1</p>
+ */
+    public void parse(KXmlParser parser) throws IOException, XmlPullParserException
+    {        
+    	int currentTag;
+    	boolean end = false;
+    	
+    	parser.require(KXmlParser.START_TAG, null, CapabilitiesTags.STYLE);
+    	currentTag = parser.nextTag();
+    	
+    	while (!end) 
+    	{
+			 switch(currentTag)
+			 {
+				case KXmlParser.START_TAG:
+					if (parser.getName().compareTo(CapabilitiesTags.NAME)==0)
+					{						
+						setName(parser.nextText());						
+					}	
+					else if (parser.getName().compareTo(CapabilitiesTags.TITLE)==0)
+					{
+						setTitle(parser.nextText());
+					}
+					else if (parser.getName().compareTo(CapabilitiesTags.ABSTRACT)==0)
+					{
+						setAbstract(parser.nextText());
+					}	
+					else if (parser.getName().compareTo(CapabilitiesTags.LEGENDURL)==0)
+					break;
+				case KXmlParser.END_TAG:
+					if (parser.getName().compareTo(CapabilitiesTags.STYLE) == 0)
+						end = true;
+					break;
+				case KXmlParser.TEXT:					
+					break;
+			 }
+			 if (!end)
+			 {
+				 currentTag = parser.next();
+			 }
+    	}
+    	parser.require(KXmlParser.END_TAG, null, CapabilitiesTags.STYLE);
+    } 
+ }
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_0/request/WMSGetLegendGraphicRequest1_1_0.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_0/request/WMSGetLegendGraphicRequest1_1_0.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_0/request/WMSGetLegendGraphicRequest1_1_0.java	(revision 21019)
@@ -0,0 +1,58 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+ 
+package org.gvsig.remoteclient.wms.wms_1_1_0.request;
+
+import org.gvsig.compat.CompatLocator;
+import org.gvsig.compat.lang.StringUtils;
+import org.gvsig.remoteclient.wms.WMSProtocolHandler;
+import org.gvsig.remoteclient.wms.WMSStatus;
+import org.gvsig.remoteclient.wms.request.WMSGetLegendGraphicRequest;
+
+/**
+ * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
+ */
+public class WMSGetLegendGraphicRequest1_1_0 extends WMSGetLegendGraphicRequest{
+
+    private static final StringUtils stringUtils = CompatLocator.getStringUtils();
+    
+	public WMSGetLegendGraphicRequest1_1_0(WMSStatus status,
+			WMSProtocolHandler protocolHandler, String layerName) {
+		super(status, protocolHandler, layerName);		
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.remoteClient.ogc.request.OGCRequest#getHttpGetRequest(java.lang.String)
+	 */
+	protected String getHttpGetRequest(String onlineResource) {
+		StringBuffer req = new StringBuffer();
+		req.append(onlineResource);
+		req.append("REQUEST=GetLegendGraphic&SERVICE=WMS&VERSION=").append(protocolHandler.getVersion());
+        req.append("&LAYER=" + layerName).append("&TRANSPARENT=TRUE").append("&FORMAT=image/png");
+		return req.toString();
+	}
+
+}
+
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_0/request/WMSGetMapRequest1_1_0.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_0/request/WMSGetMapRequest1_1_0.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_0/request/WMSGetMapRequest1_1_0.java	(revision 21019)
@@ -0,0 +1,67 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+ 
+package org.gvsig.remoteclient.wms.wms_1_1_0.request;
+
+import org.gvsig.compat.CompatLocator;
+import org.gvsig.compat.lang.StringUtils;
+import org.gvsig.remoteclient.utils.CapabilitiesTags;
+import org.gvsig.remoteclient.wms.WMSProtocolHandler;
+import org.gvsig.remoteclient.wms.WMSStatus;
+import org.gvsig.remoteclient.wms.request.WMSGetMapRequest;
+
+/**
+ * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
+ */
+public class WMSGetMapRequest1_1_0 extends WMSGetMapRequest{
+    
+    private static final StringUtils stringUtils = CompatLocator.getStringUtils();
+    
+	public WMSGetMapRequest1_1_0(WMSStatus status,
+			WMSProtocolHandler protocolHandler) {
+		super(status, protocolHandler);		
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.remoteClient.ogc.request.OGCRequest#getHttpGetRequest(java.lang.String)
+	 */
+	protected String getHttpGetRequest(String onlineResource) {
+		StringBuffer req = new StringBuffer();
+		req.append(onlineResource);
+		req.append("REQUEST=GetMap&SERVICE=WMS&VERSION=").append(protocolHandler.getVersion()).append("&");
+		req.append(getPartialQuery(status));
+        req.append("&EXCEPTIONS=" + getExceptionsFormat());      
+		return req.toString();
+	}
+	
+	/**
+	 * @return the exceptions format
+	 */
+	protected String getExceptionsFormat(){
+		return CapabilitiesTags.EXCEPTIONS_1_1_x;
+	}
+
+}
+
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_0/request/WMSGetFeatureInfoRequest1_1_0.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_0/request/WMSGetFeatureInfoRequest1_1_0.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_0/request/WMSGetFeatureInfoRequest1_1_0.java	(revision 21019)
@@ -0,0 +1,74 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+ 
+package org.gvsig.remoteclient.wms.wms_1_1_0.request;
+
+import org.gvsig.compat.CompatLocator;
+import org.gvsig.compat.lang.StringUtils;
+import org.gvsig.remoteclient.utils.CapabilitiesTags;
+import org.gvsig.remoteclient.utils.Utilities;
+import org.gvsig.remoteclient.wms.WMSProtocolHandler;
+import org.gvsig.remoteclient.wms.WMSStatus;
+import org.gvsig.remoteclient.wms.request.WMSGetFeatureInfoRequest;
+
+/**
+ * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
+ */
+public class WMSGetFeatureInfoRequest1_1_0 extends WMSGetFeatureInfoRequest{
+    
+    private static final StringUtils stringUtils = CompatLocator.getStringUtils();
+	
+    public WMSGetFeatureInfoRequest1_1_0(WMSStatus status,
+			WMSProtocolHandler protocolHandler, int x, int y) {
+		super(status, protocolHandler, x, y);		
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.remoteClient.ogc.request.OGCRequest#getHttpGetRequest(java.lang.String)
+	 */
+	protected String getHttpGetRequest(String onlineResource) {
+		StringBuffer req = new StringBuffer();
+		req.append(onlineResource);
+		req.append("REQUEST=GetFeatureInfo&SERVICE=WMS&");
+		req.append("QUERY_LAYERS=").append(Utilities.Vector2CS(status.getLayerNames()));
+		//req.append("&VERSION=").append(protocolHandler.getVersion()).append("&INFO_FORMAT=application/vnd.ogc.gml&");
+		req.append("&VERSION=").append(protocolHandler.getVersion()).append("&INFO_FORMAT=" + status.getInfoFormat() + "&");
+		req.append(getPartialQuery(status)).append("&x="+ x + "&y=" + y);
+		//this parameter sets the max number of features per layer to be returned.
+		//we set it to avoid the bug in mapserver that takes this number like max number of total features.
+		req.append("&FEATURE_COUNT=10000");
+		req.append("&EXCEPTIONS=" + getExceptionsFormat());  
+		return req.toString();
+	}
+	
+	/**
+	 * @return the exceptions format
+	 */
+	protected String getExceptionsFormat(){
+		return CapabilitiesTags.EXCEPTIONS_1_1_x;
+	}
+
+}
+
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_0/request/WMSGetCapabilitiesRequest1_1_0.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_0/request/WMSGetCapabilitiesRequest1_1_0.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_0/request/WMSGetCapabilitiesRequest1_1_0.java	(revision 21019)
@@ -0,0 +1,66 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+ 
+package org.gvsig.remoteclient.wms.wms_1_1_0.request;
+
+import org.gvsig.remoteclient.utils.CapabilitiesTags;
+import org.gvsig.remoteclient.wms.WMSProtocolHandler;
+import org.gvsig.remoteclient.wms.WMSStatus;
+import org.gvsig.remoteclient.wms.request.WMSGetCapabilitiesRequest;
+
+/**
+ * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
+ */
+public class WMSGetCapabilitiesRequest1_1_0 extends WMSGetCapabilitiesRequest{
+
+	/**
+	 * @param status
+	 * @param protocolHandler
+	 */
+	public WMSGetCapabilitiesRequest1_1_0(WMSStatus status,
+			WMSProtocolHandler protocolHandler) {
+		super(status, protocolHandler);		
+	}
+
+	/* (non-Javadoc)
+	 * @see org.gvsig.remoteclient.ogc.request.OGCRequest#getHttpGetRequest(java.lang.String)
+	 */
+	protected String getHttpGetRequest(String onlineResource) {
+		StringBuffer req = new StringBuffer();
+		req.append(onlineResource);
+		req.append("REQUEST=GetCapabilities&SERVICE=WMS&");
+		req.append("VERSION=").append(protocolHandler.getVersion());
+		req.append("&EXCEPTIONS=" + getExceptionsFormat()); 
+		return req.toString();
+	}
+	
+	/**
+	 * @return the exceptions format
+	 */
+	protected String getExceptionsFormat(){
+		return CapabilitiesTags.EXCEPTIONS_1_1_x;
+	}
+
+}
+
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_0/WMSLayer1_1_0.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_0/WMSLayer1_1_0.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_0/WMSLayer1_1_0.java	(revision 21019)
@@ -0,0 +1,286 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+
+package org.gvsig.remoteclient.wms.wms_1_1_0;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.TreeMap;
+
+import org.kxml2.io.KXmlParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import org.gvsig.compat.CompatLocator;
+import org.gvsig.compat.lang.StringUtils;
+import org.gvsig.remoteclient.utils.BoundaryBox;
+import org.gvsig.remoteclient.utils.CapabilitiesTags;
+import org.gvsig.remoteclient.utils.Utilities;
+import org.gvsig.remoteclient.wms.WMSDimension;
+import org.gvsig.remoteclient.wms.WMSExtent;
+
+
+/**
+ * <p>WMS Layer for WMS 1.1.0</p>
+ * 
+ */
+public class WMSLayer1_1_0 extends org.gvsig.remoteclient.wms.WMSLayer {
+    private static final StringUtils stringUtils = CompatLocator.getStringUtils();
+    
+    /**
+     * <p>Extents defined for the layer in the capabilities doc</p>
+     */
+    private java.util.ArrayList extents = new ArrayList();
+    
+    /**
+     * <p> gets the extent vector defined in this layer</p>
+     * @return 
+     */
+    public ArrayList getExtents() {        
+        return extents;
+    } 
+    
+    public WMSExtent getExtent(String name)
+    {
+    	for(int i = 0; i < extents.size(); i++ ){
+    		if(((WMSExtent)extents.get(i)).getName().compareTo(name)==0)
+    		{
+    			return (WMSExtent)extents.get(i);
+    		}
+    	}
+    	return null;
+    }
+    
+    /**
+     * <p>Adds an extent to the extent vector </p>
+     * @param extent 
+     */
+    public void addExtent(org.gvsig.remoteclient.wms.WMSExtent extent) {        
+        extents.add(extent);
+    }   
+    
+    public ArrayList getDimensions()
+    {   
+        WMSDimension dimension;
+        WMSExtent extent;
+    	for(int i = 0; i < dimensions.size(); i++)
+    	{
+    		dimension = (WMSDimension)dimensions.get(i);
+    		extent = getExtent(dimension.getName()); 
+    		if(extent != null)
+    		{    			
+    			((WMSDimension)dimensions.get(i)).setDimensionExpression( extent.getExtentExpression());    			
+    		}
+    	}    	
+    	
+        WMSDimension pDimension;
+        WMSDimension myDimension;    
+        ArrayList myDimensions = (ArrayList) this.dimensions.clone();        
+        ArrayList pDimensions;        
+        if (parent!=null)
+        {
+        	pDimensions = parent.getDimensions();
+        	for (int i= 0; i < pDimensions.size(); i++){
+        		pDimension = (WMSDimension)pDimensions.get(i);
+        		myDimension = getDimension(pDimension.getName());
+        		if (myDimension != null){
+        			pDimensions.remove(pDimension);
+        		}
+        	}
+        	myDimensions.addAll(pDimensions);
+        }
+        return myDimensions;
+    }
+    
+    public WMSLayer1_1_0()
+    {
+        children = new ArrayList();
+    }
+    /**
+     * <p>Parses the contents of the parser(WMSCapabilities)
+     * to extract the information about an WMSLayer</p>
+     * 
+     */
+    public void parse(KXmlParser parser, TreeMap layerTreeMap)
+    throws IOException, XmlPullParserException
+    {
+        int currentTag;
+        boolean end = false;
+        String value;
+        BoundaryBox bbox;
+        parser.require(KXmlParser.START_TAG, null, CapabilitiesTags.LAYER);
+        
+        //First of all set whether the layer is Queryable reading the attribute.
+        value = parser.getAttributeValue("", CapabilitiesTags.QUERYABLE);
+        if (value != null)
+        {
+            if (value.compareTo("0")==0)
+                setQueryable(false);
+            else
+                setQueryable(true);
+        }
+        
+        currentTag = parser.nextTag();
+        
+        while (!end) 
+        {
+            switch(currentTag)
+            {
+                case KXmlParser.START_TAG:
+                    if (parser.getName().compareTo(CapabilitiesTags.LAYER)==0)
+                    {	
+                        WMSLayer1_1_0 lyr = new WMSLayer1_1_0();						
+                        //parser.next(); 
+                        lyr.parse(parser, layerTreeMap);
+                        lyr.setParent(this);
+                        this.children.add(lyr);
+                        // Jaume
+                        if (lyr.getName()!=null)
+                            layerTreeMap.put(lyr.getName(), lyr);
+                    }
+                    else if (parser.getName().compareTo(CapabilitiesTags.ATTRIBUTION)==0){
+                        // TODO comprobar que esto se necesite o se deseche
+                        parser.skipSubTree();
+                    }
+                    else if (parser.getName().compareTo(CapabilitiesTags.NAME)==0)
+                    {		
+                        value = parser.nextText();
+                        if (value != null) setName(value);						
+                    }	
+                    else if (parser.getName().compareTo(CapabilitiesTags.TITLE)==0)
+                    {
+                        value = parser.nextText();
+                        if (value != null) setTitle(value);
+                    }
+                    else if (parser.getName().compareTo(CapabilitiesTags.ABSTRACT)==0)
+                    {
+                        value = parser.nextText();
+                        if (value != null) setAbstract(value);
+                    }
+                    else if (parser.getName().compareTo(CapabilitiesTags.SRS)==0)
+                    {
+                        value = parser.nextText();
+                        if (value != null){
+                            String[] mySRSs = stringUtils.split(value, " ");
+                            for (int i = 0; i < mySRSs.length; i++) {
+                                addSrs(mySRSs[i]);    
+                            }
+                            
+                        }
+                    }					
+                    else if (parser.getName().compareTo(CapabilitiesTags.BOUNDINGBOX)==0)
+                    {
+                        bbox = new BoundaryBox();
+                        value = parser.getAttributeValue("",CapabilitiesTags.SRS);
+                        if (value != null)
+                            bbox.setSrs(value);
+                        value = parser.getAttributeValue("",CapabilitiesTags.MINX);
+                        if ((value != null) && (Utilities.isNumber(value)))
+                            bbox.setXmin(Double.parseDouble(value));	
+                        value = parser.getAttributeValue("",CapabilitiesTags.MINY);
+                        if ((value != null) && (Utilities.isNumber(value)))
+                            bbox.setYmin(Double.parseDouble(value));	
+                        value = parser.getAttributeValue("",CapabilitiesTags.MAXX);
+                        if ((value != null) && (Utilities.isNumber(value)))
+                            bbox.setXmax(Double.parseDouble(value));	
+                        value = parser.getAttributeValue("",CapabilitiesTags.MAXY);
+                        if ((value != null) && (Utilities.isNumber(value)))
+                            bbox.setYmax(Double.parseDouble(value));	
+                        addBBox(bbox);
+                        addSrs(bbox.getSrs());
+                    }	
+                    else if (parser.getName().compareTo(CapabilitiesTags.LATLONBOUNDINGBOX)==0)
+                    {
+                        bbox = new BoundaryBox();
+                        bbox.setSrs(CapabilitiesTags.EPSG_4326);
+                        value = parser.getAttributeValue("",CapabilitiesTags.MINX);
+                        if ((value != null) && (Utilities.isNumber(value)))
+                            bbox.setXmin(Double.parseDouble(value));	
+                        value = parser.getAttributeValue("",CapabilitiesTags.MINY);
+                        if ((value != null) && (Utilities.isNumber(value)))
+                            bbox.setYmin(Double.parseDouble(value));	
+                        value = parser.getAttributeValue("",CapabilitiesTags.MAXX);
+                        if ((value != null) && (Utilities.isNumber(value)))
+                            bbox.setXmax(Double.parseDouble(value));	
+                        value = parser.getAttributeValue("",CapabilitiesTags.MAXY);
+                        if ((value != null) && (Utilities.isNumber(value)))
+                            bbox.setYmax(Double.parseDouble(value));	
+                        addBBox(bbox);
+                        setLatLonBox(bbox);
+                        //addSrs(bbox.getSrs());
+                    }						
+                    else if (parser.getName().compareTo(CapabilitiesTags.SCALEHINT)==0)
+                    {
+                        value = parser.getAttributeValue("",CapabilitiesTags.MIN);
+                        if ((value != null) && (Utilities.isNumber(value)))
+                            setScaleMin(Double.parseDouble(value));
+                        value = parser.getAttributeValue("",CapabilitiesTags.MAX);
+                        if ((value != null) && (Utilities.isNumber(value)))
+                            setScaleMax(Double.parseDouble(value));																	
+                    }						
+                    else if (parser.getName().compareTo(CapabilitiesTags.STYLE)==0)
+                    {
+                        WMSStyle1_1_0 style = new WMSStyle1_1_0();
+                        style.parse(parser);
+                        if ((style != null) && (style.getName() != null))
+                        {
+                            styles.add(style);
+                        }
+                    }
+                    else if (parser.getName().compareTo(CapabilitiesTags.DIMENSION)==0)
+                    {
+                        WMSDimension dim = new WMSDimension();
+                        dim.parse(parser);
+                        if ((dim != null) && (dim.getName() != null))
+                        {
+                            addDimension(dim);
+                        }
+                    }
+                    else if (parser.getName().compareTo(CapabilitiesTags.EXTENT)==0)
+                    {                    	
+                        WMSExtent extent = new WMSExtent();
+                        extent.parse(parser);
+                        if ((extent != null) && (extent.getName() != null))
+                        {
+                            addExtent(extent);
+                            
+                        }
+                    }                      
+                    break;
+                case KXmlParser.END_TAG:
+                    if (parser.getName().compareTo(CapabilitiesTags.LAYER) == 0)
+                        end = true;
+                    break;
+                case KXmlParser.TEXT:					
+                    break;
+            }
+            if (!end)
+            	currentTag = parser.next();
+        }
+        parser.require(KXmlParser.END_TAG, null, CapabilitiesTags.LAYER);
+    }      
+    
+    public String toString(){
+        return super.toString();
+    }
+}
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/WMSProtocolHandler.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/WMSProtocolHandler.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/WMSProtocolHandler.java	(revision 21019)
@@ -0,0 +1,788 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+package org.gvsig.remoteclient.wms;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.net.URLConnection;
+import java.nio.ByteBuffer;
+import java.nio.channels.FileChannel;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.StringTokenizer;
+import java.util.TreeMap;
+
+import org.gvsig.compat.net.ICancellable;
+import org.gvsig.remoteclient.exceptions.ServerErrorException;
+import org.gvsig.remoteclient.exceptions.WMSException;
+import org.gvsig.remoteclient.ogc.OGCProtocolHandler;
+import org.gvsig.remoteclient.ogc.OGCServiceInformation;
+import org.gvsig.remoteclient.utils.CapabilitiesTags;
+import org.gvsig.remoteclient.utils.ExceptionTags;
+import org.gvsig.remoteclient.utils.Utilities;
+import org.gvsig.remoteclient.wms.request.WMSGetCapabilitiesRequest;
+import org.gvsig.remoteclient.wms.request.WMSGetFeatureInfoRequest;
+import org.gvsig.remoteclient.wms.request.WMSGetLegendGraphicRequest;
+import org.gvsig.remoteclient.wms.request.WMSGetMapRequest;
+import org.kxml2.io.KXmlParser;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.xmlpull.v1.XmlPullParserException;
+
+/**
+ * <p> Abstract class that represents handlers to comunicate via WMS protocol.
+ * </p>
+ *
+ */
+public abstract class WMSProtocolHandler extends OGCProtocolHandler {
+    
+    private static final Logger logger = LoggerFactory.getLogger(WMSProtocolHandler.class);
+	/**
+	 * Encoding used to parse different xml documents.
+	 */
+	protected String encoding = "UTF-8";
+    /**
+     * WMS metadata
+     */
+    protected WMSServiceInformation serviceInfo;
+    public TreeMap layers;
+    public WMSLayer rootLayer;
+
+    /**
+     * returns the alfanumeric information of the layers at the specified point.
+     * the diference between the other getfeatureInfo method is that this will
+     * be implemented by each specific version because the XML from the server will be
+     * parsed and presented by a well known structure.
+     */
+
+    public String getName() {
+    	return name;
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.gvsig.remoteClient.ogc.OGCProtocolHandler#getServiceInformation()
+     */
+    public OGCServiceInformation getServiceInformation() {
+        return serviceInfo;
+    }
+
+    /**
+	 * <p>Builds a GetCapabilities request that is sent to the WMS
+	 * the response will be parse to extract the data needed by the
+	 * WMS client</p>
+	 * @param override, if true the previous downloaded data will be overridden
+	 */
+    public void getCapabilities(WMSStatus status, boolean override, ICancellable cancel) {
+    	URL request = null;
+		try {
+			request = new URL(buildCapabilitiesRequest(status));
+		} catch(Exception e) {
+                    logger.warn("Can't get capabilities, error building url.",e);
+		}
+		try {
+			if (override)
+				Utilities.removeURL(request);
+			File f = Utilities.downloadFile(request,"wms_capabilities.xml", cancel);
+			if (f == null)
+				return;
+			clear();
+			parseCapabilities(f);
+	    } catch(Exception e) {
+                    logger.warn("Can't get capabilities.",e);
+		}
+    }
+
+    private void clear() {
+		layers.clear();
+		serviceInfo.clear();
+	}
+
+	/**
+     * <p>It will send a GetFeatureInfo request to the WMS
+     * Parsing the response and redirecting the info to the WMS client</p>
+     * TODO: return a stored file instead a String.
+     */
+    public String getFeatureInfo(WMSStatus status, int x, int y, int featureCount, ICancellable cancel)
+    {
+    	StringBuffer output = new StringBuffer();
+    	String outputFormat = new String();
+    	String ServiceException = "ServiceExceptionReport";
+    	StringBuffer sb = new StringBuffer();
+    	sb.append("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>");
+		try
+		{
+			WMSGetFeatureInfoRequest request = createGetFeatureInfoRequest(status, x, y);
+			URL url = request.getURL();
+	    	outputFormat = url.openConnection().getContentType();
+	    	File f = request.sendRequest(cancel);
+			if (f == null){
+				return "";
+			}
+
+			FileReader fReader = new FileReader(f);
+			char[] buffer = new char[1024*256];
+			for (int i = fReader.read(buffer); i>0; i = fReader.read(buffer))
+		    {
+		    	String str = new String(buffer,0,i);
+		    	output.append(str);
+		    }
+		    if ( (outputFormat == null) || (outputFormat.indexOf("xml") != -1)
+		    		||output.toString().toLowerCase().startsWith("<?xml")
+		    		||(outputFormat.indexOf("gml") != -1))
+		    {
+		    	int tag;
+		    	KXmlParser kxmlParser = null;
+		    	kxmlParser = new KXmlParser();
+		    	//kxmlParser.setInput(new StringReader(output.toString()));
+		    	kxmlParser.setInput(new FileReader(f));
+
+		    	tag = kxmlParser.nextTag();
+		    	if (kxmlParser.getName().compareTo(ServiceException)==0)
+				{
+		    		sb.append("<INFO>").append(parseException( output.toString().getBytes())).append("</INFO>");
+		    		return sb.toString();
+				}
+				else if (kxmlParser.getName().compareToIgnoreCase("ERROR")==0)
+				{
+					return output.toString();
+				}
+				else
+				{
+					return output.toString();
+				}
+	    	}
+	    	else
+	    	{  		
+	    		//Para que funcione con el GetFeatureInfo Viewer generico hay que devolver:
+	    		 return output.toString();
+	    	}
+		}
+    	catch(XmlPullParserException parserEx)
+    	{
+    		if (output.toString().toLowerCase().indexOf("xml") != -1)
+    		{
+    			return output.toString().trim();
+    		}
+    		else
+    		{
+    	   		sb.append("<INFO>").append("Info format not supported").append("</INFO>");
+        		return sb.toString();
+    		}
+    	}
+    	catch(Exception e)
+    	{
+                logger.warn("Can't get information by point.",e);
+    		sb.append("<INFO>").append("Info format not supported").append("</INFO>");
+    		return sb.toString();
+
+    	}
+    }
+    /**
+     * <p>Builds a GetMap request that is sent to the WMS
+     * the response (image) will be redirect to the
+     * WMS client</p>
+     */
+    public byte[] _getMap(WMSStatus status) throws ServerErrorException, WMSException
+    {
+    	try
+		{
+			//TODO:
+			//pass this buildXXXRequest to the WMSProtocolHandlerXXX: The request can depend on the WMS version.
+			WMSGetMapRequest request = createGetMapRequest(status);
+			URL url = request.getURL();
+			
+			URLConnection conn = url.openConnection();
+                        logger.info(request.toString());
+            String type = conn.getContentType();
+
+
+	    	byte[] imageBytes = null;
+	    	byte[] buffer = new byte[1024*256];
+            InputStream is = conn.getInputStream();
+	    	int readed = 0;
+
+	    	for (int i = is.read(buffer); i>0; i = is.read(buffer)){
+                // Creates a new buffer to contain the previous readed bytes and the next bunch of bytes
+	    		byte[] buffered = new byte[readed+i];
+	    		for (int j = 0; j < buffered.length; j++) {
+	    			if (j<readed){
+                        // puts the previously downloaded bytes into the image buffer
+	    				buffered[j] = imageBytes[j];
+	    			}
+	    			else {
+                        // appends the recently downloaded bytes to the image buffer.
+	    				buffered[j] = buffer[j-readed];
+	    			}
+				}
+	    		imageBytes = (byte[]) buffered.clone();
+	    		readed += i;
+	    	}
+
+	    	if ((type !=null && !type.subSequence(0,5).equals("image"))
+	    		||(Utilities.isTextData(imageBytes)))
+	    	{
+               	WMSException wmsEx = null;
+
+            	String exceptionMessage = parseException(imageBytes);
+                if (exceptionMessage==null)
+                {
+                 	String error = new String(imageBytes);
+                	int pos = error.indexOf("<?xml");
+                	if (pos!= -1)
+                	{
+                		String xml = error.substring(pos,error.length());
+                		exceptionMessage = parseException(xml.getBytes());
+                        if (exceptionMessage == null)
+                        	exceptionMessage = new String(imageBytes);
+                	}
+                }
+             	wmsEx = new WMSException(exceptionMessage);
+            	wmsEx.setWMSMessage(new String(imageBytes));
+                throw wmsEx;
+            }
+			return imageBytes;
+		}
+		catch(IOException e)
+		{
+                    logger.warn("Can't build map request.",e);
+                    throw new ServerErrorException();
+		}
+    }
+
+    public File getLegendGraphic_old(WMSStatus status, String layerName, ICancellable cancel) throws ServerErrorException, WMSException
+    {
+    	try
+		{
+			WMSGetLegendGraphicRequest request = createGetLegendGraphicRequest(status, layerName);
+			File f = request.sendRequest(cancel);
+	    	if (f== null)
+	    		return null;
+            if (Utilities.isTextFile(f)) {
+	    		
+                byte[] data = fileToBytes(f);
+
+	    		WMSException wmsEx = null;
+
+            	String exceptionMessage = parseException(data);
+                if (exceptionMessage==null)
+                {
+                 	String error = new String(data);
+                	int pos = error.indexOf("<?xml");
+                	if (pos!= -1)
+                	{
+                		String xml = error.substring(pos,error.length());
+                		exceptionMessage = parseException(xml.getBytes());
+                	}
+                    if (exceptionMessage == null)
+                    	exceptionMessage = new String(data);
+
+                }
+             	wmsEx = new WMSException(exceptionMessage);
+            	wmsEx.setWMSMessage(new String(data));
+            	downloader.removeURL(request);
+                throw wmsEx;
+            }
+			return f;
+		}
+		catch(IOException e)
+		{
+			logger.warn("Can't get legend graphics.",e);
+                        throw new ServerErrorException();
+		}
+    }
+    
+    public File getLegendGraphic(WMSStatus status, String layerName, ICancellable cancel) 
+    	throws ServerErrorException, WMSException {
+    	URL request = null;
+		try {
+			status.setOnlineResource(status.getOnlineResource().replaceAll(" ", "%20"));
+			request = new URL(buildGetLegendGraphicRequest(status, layerName));
+                        logger.info(request.toString());
+            File f = Utilities.downloadFile(request, "wmsGetLegendGraphic", cancel);
+	    	if (f== null)
+	    		return null;
+            if (Utilities.isTextFile(f)) {
+	    		FileInputStream fis = new FileInputStream(f);
+	    		FileChannel fc = fis.getChannel();
+	    		byte[] data = new byte[(int)fc.size()];
+	    		ByteBuffer bb = ByteBuffer.wrap(data);
+	    		fc.read(bb);
+
+	    		WMSException wmsEx = null;
+
+            	String exceptionMessage = parseException(data);
+                if (exceptionMessage == null) {
+                 	String error = new String(data);
+                	int pos = error.indexOf("<?xml");
+                	if (pos!= -1) {
+                		String xml = error.substring(pos,error.length());
+                		exceptionMessage = parseException(xml.getBytes());
+                	}
+                    if (exceptionMessage == null)
+                    	exceptionMessage = new String(data);
+
+                }
+             	wmsEx = new WMSException(exceptionMessage);
+            	wmsEx.setWMSMessage(new String(data));
+            	Utilities.removeURL(request);
+                throw wmsEx;
+            }
+			return f;
+		} catch(IOException e) {
+                        logger.warn("Can't get legend graphics",e);
+                        throw new ServerErrorException();
+		}
+    }
+    
+    /**
+     * @return string that represents the url for getting the wms legend
+     * If the layer has the object layer-->style-->legendurl that url will be returned 
+     * otherwise builds the getLegendGraphic according to the OGC WMS Specifications
+     * 
+     */
+    private String buildGetLegendGraphicRequest(WMSStatus status, String layerName) {
+    	//TODO: deal with more than one layer    	
+    	WMSLayer lyr = (WMSLayer) this.layers.get(layerName);
+    	WMSStyle sty =null;
+    	if (lyr != null){
+    		Iterator it = lyr.getStyles().iterator();
+    		while (it.hasNext()){
+    			sty = (WMSStyle) it.next();
+    			if (sty.getName().equals(status.getStyles().get(0).toString())){    				
+    				return sty.getLegendURLOnlineResourceHRef().replaceAll(" ", "%20");
+    			}
+    		}
+    	}
+    	//TODO: pass by parameter the legend output format?
+		StringBuffer req = new StringBuffer();
+		String symbol = null;
+		String onlineResource = null;
+
+		if (status.getOnlineResource() == null)
+			onlineResource = getHost();
+		else
+			onlineResource = status.getOnlineResource();
+		symbol = getSymbol(onlineResource);
+
+		req.append(onlineResource + symbol + "REQUEST=GetLegendGraphic&SERVICE=WMS&VERSION=").append(getVersion());
+        req.append("&LAYER=" + layerName).append("&TRANSPARENT=TRUE").append("&FORMAT=image/png");
+        String aux = req.toString().replaceAll(" ", "%20");
+        logger.info("GetLegendGraphic url:" + aux);
+		return aux;
+    }
+    
+    public URL getMapURL(WMSStatus status, ICancellable cancel) throws ServerErrorException, WMSException {
+    	try {
+			WMSGetMapRequest request = createGetMapRequest(status);
+			return request.getURL();
+		} catch(IOException e) {
+                    logger.warn("Can't get map URL",e);
+                    throw new ServerErrorException();
+		}
+    }
+    
+    /**
+     * Returns the exception message if the file is a XML instead of a image.
+     * @param file3
+     * @return
+     * @throws IOException 
+     */
+    public String getExceptionMessage(File f) throws IOException {
+    	if (f == null)
+    		return null;
+    	
+        if (Utilities.isTextFile(f)) {
+            byte[] data = fileToBytes(f);
+
+        	String exceptionMessage = parseException(data);
+            if (exceptionMessage == null) {
+             	String error = new String(data);
+            	int pos = error.indexOf("<?xml");
+            	if (pos!= -1) {
+            		String xml = error.substring(pos,error.length());
+            		exceptionMessage = parseException(xml.getBytes());
+            	}
+                if (exceptionMessage == null)
+                	exceptionMessage = new String(data);
+            }
+         	return exceptionMessage;
+        }
+        return null;
+    }
+
+    public File getMap(WMSStatus status, ICancellable cancel) throws ServerErrorException, WMSException {
+    	try {
+			WMSGetMapRequest request = createGetMapRequest(status);
+			File f = request.sendRequest(cancel);
+			
+			if (f== null)
+	    		return null;
+            if (Utilities.isTextFile(f)) {
+                byte[] data = fileToBytes(f);
+
+	    		WMSException wmsEx = null;
+
+            	String exceptionMessage = parseException(data);
+                if (exceptionMessage==null) {
+                 	String error = new String(data);
+                	int pos = error.indexOf("<?xml");
+                	if (pos!= -1) {
+                		String xml = error.substring(pos,error.length());
+                		exceptionMessage = parseException(xml.getBytes());
+//                        if (exceptionMessage == null)
+//                        	exceptionMessage = new String(data);
+                	}
+                    if (exceptionMessage == null)
+                    	exceptionMessage = new String(data);
+
+                }
+             	wmsEx = new WMSException(exceptionMessage);
+            	wmsEx.setWMSMessage(new String(data));
+
+            	// Since it is an error file, It must be deleted from the cache
+            	downloader.removeURL(request);
+                throw wmsEx;
+            }
+			return f;
+		} catch(IOException e) {
+            throw new ServerErrorException(e.getMessage(), e);
+		}
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.gvsig.remoteClient.wms.WMSProtocolHandler#parseException(byte[])
+     */
+    protected String parseException(byte[] data) {
+        ArrayList errors = new ArrayList();
+        KXmlParser kxmlParser = new KXmlParser();
+        try
+        {
+            kxmlParser.setInput(new ByteArrayInputStream(data), encoding);
+            kxmlParser.nextTag();
+            int tag;
+            if ( kxmlParser.getEventType() != KXmlParser.END_DOCUMENT )
+            {
+                kxmlParser.require(KXmlParser.START_TAG, null, ExceptionTags.EXCEPTION_ROOT);
+                tag = kxmlParser.nextTag();
+                 while(tag != KXmlParser.END_DOCUMENT)
+                 {
+                     switch(tag)
+                     {
+                        case KXmlParser.START_TAG:
+                            if (kxmlParser.getName().compareTo(ExceptionTags.SERVICE_EXCEPTION)==0){
+                                String errorCode = kxmlParser.getAttributeValue("", ExceptionTags.CODE);
+                                errorCode = (errorCode != null) ? "["+errorCode+"] " : "";
+                                String errorMessage = kxmlParser.nextText();
+                                errors.add(errorCode+errorMessage);
+                            }
+                            break;
+                        case KXmlParser.END_TAG:
+                            break;
+
+                     }
+                     tag = kxmlParser.nextTag();
+                 }
+                 //kxmlParser.require(KXmlParser.END_DOCUMENT, null, null);
+            }
+        }
+        catch(XmlPullParserException parser_ex){
+            logger.warn("",parser_ex);
+        }
+        catch (IOException ioe) {
+            logger.warn("",ioe);
+        }
+        String message = errors.size()>0? "" : null;
+        for (int i = 0; i < errors.size(); i++) {
+            message += (String) errors.get(i)+"\n";
+        }
+        return message;
+    }
+    /**
+     * Builds the GetCapabilitiesRequest according to the OGC WMS Specifications
+     * without a VERSION, to get the highest version than a WMS supports.
+     */
+    public static String buildCapabilitiesSuitableVersionRequest(String _host, String _version)
+    {
+		int index = _host.indexOf('?');
+		
+		if (index > -1) {
+			String host = _host.substring(0, index + 1);
+			String query = _host.substring(index + 1, _host.length());
+			
+			StringTokenizer tokens = new StringTokenizer(query, "&");
+			String newQuery = "", token;
+
+			// If there is a field or a value with spaces, (and then it's on different tokens) -> unify them
+			while (tokens.hasMoreTokens()) {
+				token = tokens.nextToken().trim();
+
+				if (token.toUpperCase().compareTo("REQUEST=GETCAPABILITIES") == 0)
+					continue;
+
+				if (token.toUpperCase().compareTo("SERVICE=WMS") == 0)
+					continue;
+
+				if ((_version != null) && (_version.length() > 0)) {
+    				if (token.toUpperCase().compareTo("VERSION=" + _version) == 0)
+    					continue;
+				}
+
+				if (token.toUpperCase().compareTo("EXCEPTIONS=XML") == 0)
+					continue;
+
+				newQuery += token + "&";
+			}
+
+        	_host = host + newQuery;
+		}
+		else {
+			_host += "?";
+		}
+
+    	if ((_version != null) && (_version.compareTo("") != 0))
+    		_host += "REQUEST=GetCapabilities&SERVICE=WMS&VERSION=" + _version;
+    	else
+    		_host += "REQUEST=GetCapabilities&SERVICE=WMS";
+
+    	return _host;
+    }
+
+    /**
+     * Builds the GetCapabilitiesRequest according to the OGC WMS Specifications
+     * @param WMSStatus
+     */
+    private String buildCapabilitiesRequest(WMSStatus status)
+    {
+		StringBuffer req = new StringBuffer();
+		String symbol = null;
+
+		String onlineResource;
+		if (status == null || status.getOnlineResource() == null)
+			onlineResource = getHost();
+		else
+			onlineResource = status.getOnlineResource();
+		symbol = getSymbol(onlineResource);
+
+		req.append(onlineResource).append(symbol);
+		if(req.toString().toLowerCase().lastIndexOf("request=getcapabilities") == -1 ){
+			req.append("REQUEST=GetCapabilities");
+		}
+		if(req.toString().toLowerCase().lastIndexOf("&service=wms") == -1){
+			req.append("&SERVICE=WMS");
+		}
+		if(req.toString().toLowerCase().lastIndexOf("&version=") == -1){
+			req.append("&VERSION=").append(getVersion());
+		}
+		return req.toString();
+    }  
+   
+     public void close() {
+        // your code here
+    } 
+     
+     /**
+ 	 * @param status
+ 	 * The WMS status
+ 	 * @param protocolHandler
+ 	 * The handler to parse the requests
+ 	 * @return an object to send the GetMap requests
+ 	 */
+ 	protected abstract WMSGetMapRequest createGetMapRequest(WMSStatus status);
+ 	
+ 	protected abstract WMSGetFeatureInfoRequest createGetFeatureInfoRequest(WMSStatus status, int x, int y);
+ 	
+ 	protected abstract WMSGetLegendGraphicRequest createGetLegendGraphicRequest(WMSStatus status, String layerName);
+
+ 	protected abstract WMSGetCapabilitiesRequest createGetCapabilitiesRequest(WMSStatus status);
+ 	
+ 	/**
+     * <p>Parses the Request tag </p>
+     */ 
+    protected void parseRequestTag(KXmlParser parser) throws IOException, XmlPullParserException
+    {	
+    	int currentTag;
+    	boolean end = false;
+    	
+    	parser.require(KXmlParser.START_TAG, null, CapabilitiesTags.REQUEST);
+    	currentTag = parser.next();
+    	
+    	while (!end) 
+    	{
+			 switch(currentTag)
+			 {
+				case KXmlParser.START_TAG:
+					if (parser.getName().compareTo(CapabilitiesTags.GETCAPABILITIES)==0)
+					{
+						parserDcpType(parser, CapabilitiesTags.GETCAPABILITIES);
+					}	
+					else if (parser.getName().compareTo(CapabilitiesTags.GETMAP)==0)
+					{	
+						parseGetMapTag(parser);						
+					}
+					else if (parser.getName().compareTo(CapabilitiesTags.GETFEATUREINFO)==0)
+					{
+						parseGetFeatureInfoTag(parser);
+					}		
+					else if (parser.getName().compareTo(CapabilitiesTags.DESCRIBELAYER)==0)
+					{
+						parserDcpType(parser, CapabilitiesTags.DESCRIBELAYER);
+					}	
+					else if (parser.getName().compareTo(CapabilitiesTags.GETLEGENDGRAPHIC)==0)
+					{
+						parseGetLegendGraphicTag(parser);
+					}					
+					break;
+				case KXmlParser.END_TAG:
+					if (parser.getName().compareTo(CapabilitiesTags.REQUEST) == 0)
+						end = true;
+					break;
+				case KXmlParser.TEXT:					
+				break;
+			 }
+			 if(!end)
+				 currentTag = parser.next();
+    	}
+    	// TODO: does not get such a tag when arrives here!!!!!!
+    	//parser.require(KXmlParser.END_TAG, null, CapabilitiesTags.REQUEST);    	
+    }   
+ 	 /**
+     * <p>Parses the GetMap tag </p>
+     */ 
+    protected void parseGetMapTag(KXmlParser parser) throws IOException, XmlPullParserException
+    {	
+    	int currentTag;
+    	boolean end = false;
+    	
+    	parser.require(KXmlParser.START_TAG, null, CapabilitiesTags.GETMAP);
+    	currentTag = parser.next();
+    	
+    	while (!end) 
+    	{
+			 switch(currentTag)
+			 {
+				case KXmlParser.START_TAG:
+					if (parser.getName().compareTo(CapabilitiesTags.FORMAT)==0)
+					{
+						serviceInfo.formats.add(parser.nextText());
+					}	
+					else if (parser.getName().compareTo(CapabilitiesTags.DCPTYPE)==0)
+					{		
+						parserDcpType(parser, CapabilitiesTags.GETMAP);						
+					}			
+					break;
+				case KXmlParser.END_TAG:
+					if (parser.getName().compareTo(CapabilitiesTags.GETMAP) == 0)
+						end = true;
+					break;
+				case KXmlParser.TEXT:					
+				break;
+			 }
+			 if(!end)
+				 currentTag = parser.next();
+    	}	
+    }    
+    
+    /**
+     * <p>Parses the GetFeatureInfo tag </p>
+     */ 
+    protected void parseGetFeatureInfoTag(KXmlParser parser) throws IOException, XmlPullParserException
+    {	
+    	int currentTag;
+    	boolean end = false;
+    	
+    	parser.require(KXmlParser.START_TAG, null, CapabilitiesTags.GETFEATUREINFO);
+    	currentTag = parser.next();
+    	
+    	while (!end) 
+    	{
+			 switch(currentTag)
+			 {
+				case KXmlParser.START_TAG:
+					if (parser.getName().compareTo(CapabilitiesTags.FORMAT)==0)
+					{
+						serviceInfo.infoformats.add(parser.nextText());
+					}	
+					else if (parser.getName().compareTo(CapabilitiesTags.DCPTYPE)==0)
+					{			
+						parserDcpType(parser, CapabilitiesTags.GETFEATUREINFO);		
+					}			
+					break;
+				case KXmlParser.END_TAG:
+					if (parser.getName().compareTo(CapabilitiesTags.GETFEATUREINFO) == 0)
+						end = true;
+					break;
+				case KXmlParser.TEXT:					
+				break;
+			 }
+			 if(!end)
+				 currentTag = parser.next();
+    	}	
+    }     
+ 
+    /**
+     * <p>Parses the GetLegendGraphic tag </p>
+     */ 
+    protected void parseGetLegendGraphicTag(KXmlParser parser) throws IOException, XmlPullParserException
+    {	
+    	int currentTag;
+    	boolean end = false;
+    	
+    	parser.require(KXmlParser.START_TAG, null, CapabilitiesTags.GETLEGENDGRAPHIC);
+    	currentTag = parser.next();
+    	
+    	while (!end) 
+    	{
+			 switch(currentTag)
+			 {
+				case KXmlParser.START_TAG:
+					if (parser.getName().compareTo(CapabilitiesTags.FORMAT)==0)
+					{
+						//TODO:
+						// add the supported formats by the GetLegendGraphic request
+						//serviceInfo.formats.add(parser.nextText());
+					}	
+					else if (parser.getName().compareTo(CapabilitiesTags.DCPTYPE)==0)
+					{			
+						parserDcpType(parser, CapabilitiesTags.GETLEGENDGRAPHIC);		
+					}			
+					break;
+				case KXmlParser.END_TAG:
+					if (parser.getName().compareTo(CapabilitiesTags.GETLEGENDGRAPHIC) == 0)
+						end = true;
+					break;
+				case KXmlParser.TEXT:					
+				break;
+			 }
+			 if(!end)
+				 currentTag = parser.next();
+    	}	
+    }
+ }
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_1/WMSProtocolHandler1_1_1.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_1/WMSProtocolHandler1_1_1.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_1/WMSProtocolHandler1_1_1.java	(revision 21019)
@@ -0,0 +1,375 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+
+package org.gvsig.remoteclient.wms.wms_1_1_1;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.TreeMap;
+
+import org.kxml2.io.KXmlParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import org.gvsig.remoteclient.utils.CapabilitiesTags;
+import org.gvsig.remoteclient.utils.EncodingXMLParser;
+import org.gvsig.remoteclient.utils.ExceptionTags;
+import org.gvsig.remoteclient.wms.WMSProtocolHandler;
+import org.gvsig.remoteclient.wms.WMSServiceInformation;
+import org.gvsig.remoteclient.wms.WMSStatus;
+import org.gvsig.remoteclient.wms.request.WMSGetCapabilitiesRequest;
+import org.gvsig.remoteclient.wms.request.WMSGetFeatureInfoRequest;
+import org.gvsig.remoteclient.wms.request.WMSGetLegendGraphicRequest;
+import org.gvsig.remoteclient.wms.request.WMSGetMapRequest;
+import org.gvsig.remoteclient.wms.wms_1_1_1.request.WMSGetCapabilitiesRequest1_1_1;
+import org.gvsig.remoteclient.wms.wms_1_1_1.request.WMSGetFeatureInfoRequest1_1_1;
+import org.gvsig.remoteclient.wms.wms_1_1_1.request.WMSGetLegendGraphicRequest1_1_1;
+import org.gvsig.remoteclient.wms.wms_1_1_1.request.WMSGetMapRequest1_1_1;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * <p>
+ * Describes the handler to comunicate to a WMS 1.1.1
+ * </p>
+ */
+public class WMSProtocolHandler1_1_1 extends WMSProtocolHandler {
+    
+    private static final Logger logger = LoggerFactory.getLogger(WMSProtocolHandler1_1_1.class);
+    
+	private WMSLayer1_1_1 fakeRootLayer;
+
+	public WMSProtocolHandler1_1_1()
+	{
+		this.version = "1.1.1";
+		this.name = "WMS1.1.1";
+		this.serviceInfo = new WMSServiceInformation();
+		this.layers = new TreeMap();
+	}
+
+//------------------------------------------------------------------------------
+// Parsing methods....
+//------------------------------------------------------------------------------
+
+    public boolean parseCapabilities(File f)
+    {
+    	rootLayer = null;
+    	rootLayer = null;
+    	int tag;
+    	EncodingXMLParser kxmlParser = null;
+    	kxmlParser = new EncodingXMLParser();
+    	try
+    	{
+//    		FileReader reader = new FileReader(f);
+//    		BufferedReader br = new BufferedReader(reader);
+//
+//    		 // patch for ArcIMS + WMS connector > 9.0 bug
+//    		char[] buffer = new char[(int) f.length()];
+//    		br.read(buffer);
+//    		String string = new String(buffer);
+//    		int a = string.toLowerCase().indexOf("<?xml");
+//            if (a !=-1) {
+//            	string = string.substring(a, string.length());
+//            	kxmlParser.setInput(string);
+//            } else
+            	// end patch
+            	kxmlParser.setInput(f);
+
+			kxmlParser.nextTag();
+    		if ( kxmlParser.getEventType() != KXmlParser.END_DOCUMENT )
+    		{
+    			kxmlParser.require(KXmlParser.START_TAG, null, CapabilitiesTags.CAPABILITIES_ROOT1_1_1);
+    			tag = kxmlParser.nextTag();
+				 while(tag != KXmlParser.END_DOCUMENT)
+				 {
+                     switch(tag)
+					 {
+
+						case KXmlParser.START_TAG:
+							if (kxmlParser.getName().compareTo(CapabilitiesTags.SERVICE )==0)
+							{
+								parseServiceTag(kxmlParser);
+							}
+							else if (kxmlParser.getName().compareTo(CapabilitiesTags.CAPABILITY)==0)
+							{
+								parseCapabilityTag(kxmlParser);
+							}
+							break;
+						case KXmlParser.END_TAG:
+							break;
+						case KXmlParser.TEXT:
+							//System.out.println("[TEXT]["+kxmlParser.getText()+"]");
+						break;
+					 }
+    				 tag = kxmlParser.next();
+    			 }
+    			kxmlParser.require(KXmlParser.END_DOCUMENT, null, null);
+    		}
+    	}
+    	catch(XmlPullParserException parser_ex){
+                logger.warn("Error parsing capabilites.",parser_ex);
+    		return false;
+    	}
+   		catch (IOException ioe) {
+                        logger.warn("Error parsing capabilites.",ioe);
+   			return false;
+		} finally {
+			return true;
+        }
+   		// In the parsing process the layer has been filled
+    }
+
+    /**
+     * <p>Parses the Service Information </p>
+     */
+    private void parseServiceTag(KXmlParser parser) throws IOException, XmlPullParserException
+    {
+    	int currentTag;
+    	boolean end = false;
+
+    	parser.require(KXmlParser.START_TAG, null, CapabilitiesTags.SERVICE);
+    	currentTag = parser.next();
+
+    	while (!end)
+    	{
+			 switch(currentTag)
+			 {
+				case KXmlParser.START_TAG:
+					if (parser.getName().compareTo(CapabilitiesTags.NAME)==0)
+					{
+						serviceInfo.name = parser.nextText();
+					}
+					else if (parser.getName().compareTo(CapabilitiesTags.TITLE)==0)
+					{
+						serviceInfo.title = parser.nextText();
+					}
+					else if (parser.getName().compareTo(CapabilitiesTags.ABSTRACT)==0)
+					{
+						serviceInfo.abstr = parser.nextText();
+					}
+					else if (parser.getName().compareTo(CapabilitiesTags.ONLINERESOURCE)==0)
+					{
+				    	String value = new String();
+				        value = parser.getAttributeValue("", CapabilitiesTags.XLINK_HREF);
+				        if (value != null){
+				        	serviceInfo.online_resource = value;
+				        }
+					}
+					else if ((parser.getName().compareTo(CapabilitiesTags.KEYWORDLIST)==0) ||
+							(parser.getName().compareTo(CapabilitiesTags.CONTACTINFORMATION)==0))
+					{
+						parser.skipSubTree();
+					}
+					break;
+				case KXmlParser.END_TAG:
+					if (parser.getName().compareTo(CapabilitiesTags.SERVICE) == 0)
+						end = true;
+					break;
+				case KXmlParser.TEXT:
+				break;
+			 }
+             if (!end)
+                 currentTag = parser.next();
+    	}
+    	parser.require(KXmlParser.END_TAG, null, CapabilitiesTags.SERVICE);
+    }
+    /**
+     * <p>Parses the Capability Tag </p>
+     */
+    private void parseCapabilityTag(KXmlParser parser) throws IOException, XmlPullParserException
+    {
+    	int currentTag;
+    	boolean end = false;
+
+    	parser.require(KXmlParser.START_TAG, null, CapabilitiesTags.CAPABILITY);
+    	currentTag = parser.next();
+
+    	while (!end)
+    	{
+			 switch(currentTag)
+			 {
+				case KXmlParser.START_TAG:
+					if (parser.getName().compareTo(CapabilitiesTags.REQUEST)==0)
+					{
+						parseRequestTag(parser);
+					}
+					else if (parser.getName().compareTo(CapabilitiesTags.EXCEPTION)==0)
+					{
+						//TODO:
+						//Add to serviceInfo the supported formats for the exceptions????
+					}
+					else if (parser.getName().compareTo(CapabilitiesTags.LAYER)==0)
+					{
+						WMSLayer1_1_1 lyr = new WMSLayer1_1_1();
+						lyr.parse(parser, layers);
+
+                        if (rootLayer == null)
+                            rootLayer = lyr;
+                        else {
+                            // Handles when there is no general root layer, will use
+                            // a fake non-queryable one.
+                            if (!rootLayer.equals(getFakeRootLayer())){
+                                WMSLayer1_1_1 aux = (WMSLayer1_1_1) rootLayer;
+                                rootLayer  = getFakeRootLayer();
+                                rootLayer.getChildren().add(aux);
+                            }
+                            rootLayer.getChildren().add(lyr);
+                        }
+
+                        if (lyr.getName()!=null)
+						    layers.put(lyr.getName(), lyr);
+
+//                        Collection layerCollection = layers.values();
+//                        Iterator iter = layerCollection.iterator();
+//                        while (iter.hasNext())
+//                        {
+//                        	WMSLayer1_1_1 layer = (WMSLayer1_1_1)iter.next();
+//    						//Add all the SRS that the layer supports to the WMSProtocolHandler if they dont exist already
+//    						for (i=0;i<layer.getAllSrs().size();i++)
+//    						{
+////    						    if (!layer.srs.contains(layer.getAllSrs().elementAt(i)))
+////    						    {
+////    						        this.srs.add(layer.getAllSrs().elementAt(i));
+////    						    }
+//    						}
+//                        }
+					}
+					else if ((parser.getName().compareTo(CapabilitiesTags.VENDORSPECIFICCAPABILITIES)==0) ||
+							(parser.getName().compareTo(CapabilitiesTags.USERDEFINEDSYMBOLIZATION )==0))
+
+					{
+						parser.skipSubTree();
+					}
+					break;
+				case KXmlParser.END_TAG:
+					if (parser.getName().compareTo(CapabilitiesTags.CAPABILITY) == 0)
+						end = true;
+					break;
+				case KXmlParser.TEXT:
+				break;
+			 }
+			 if (!end)
+				 currentTag = parser.next();
+    	}
+    	//parser.require(KXmlParser.END_TAG, null, CapabilitiesTags.CAPABILITY);
+    }    
+
+    private WMSLayer1_1_1 getFakeRootLayer(){
+        if (fakeRootLayer == null){
+            fakeRootLayer = new WMSLayer1_1_1();
+            fakeRootLayer.setTitle(serviceInfo.title);
+            fakeRootLayer.setQueryable(false);
+            fakeRootLayer.setName(null);
+        }
+        return fakeRootLayer;
+    }
+    /* (non-Javadoc)
+     * @see org.gvsig.remoteClient.wms.WMSProtocolHandler#parseException(byte[])
+     */
+    protected String parseException(byte[] data) {
+        ArrayList errors = new ArrayList();
+        KXmlParser kxmlParser = new KXmlParser();
+        try
+        {
+            kxmlParser.setInput(new ByteArrayInputStream(data), encoding);
+            int tag;
+
+            boolean end = false;
+            tag = kxmlParser.nextTag();
+
+            //Comentar temporalmente para subsanar el hecho de que SimonCit me devuelve las capabilities en un GetLegendGraphic!!!
+            kxmlParser.require(KXmlParser.START_TAG, null, ExceptionTags.EXCEPTION_ROOT);
+
+            while (!end)
+            {
+                switch(tag)
+                {
+                    case KXmlParser.START_TAG:
+                            if (kxmlParser.getName().compareTo(ExceptionTags.SERVICE_EXCEPTION)==0){
+                                String errorCode = kxmlParser.getAttributeValue("", ExceptionTags.CODE);
+                                errorCode = (errorCode != null) ? "["+errorCode+"] " : "";
+                                String errorMessage = kxmlParser.nextText();
+                                errors.add(errorCode+errorMessage);
+                            }
+                            break;
+                    case KXmlParser.END_TAG:
+                            if (kxmlParser.getName().compareTo(ExceptionTags.EXCEPTION_ROOT) == 0)
+                                end = true;
+                            break;
+                     }
+                	if (!end)
+                	{
+                		tag = kxmlParser.nextTag();
+                	}
+                 }
+        	}
+        catch(XmlPullParserException parser_ex){
+            logger.warn("",parser_ex);
+        }
+        catch (IOException ioe) {
+            logger.warn("",ioe);
+        }
+        String message = errors.size()>0? "" : null;
+        for (int i = 0; i < errors.size(); i++) {
+            message += (String) errors.get(i)+"\n";
+        }
+        return message;
+    }
+    
+    /*
+     * (non-Javadoc)
+     * @see org.gvsig.remoteClient.wms.WMSProtocolHandler#createGetFeatureInfoRequest(org.gvsig.remoteClient.wms.WMSStatus, int, int)
+     */
+	protected WMSGetFeatureInfoRequest createGetFeatureInfoRequest(
+			WMSStatus status, int x, int y) {
+		return new WMSGetFeatureInfoRequest1_1_1(status, this, x, y);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.remoteClient.wms.WMSProtocolHandler#createGetMapRequest(org.gvsig.remoteClient.wms.WMSStatus)
+	 */
+	protected WMSGetMapRequest createGetMapRequest(WMSStatus status) {
+		return new WMSGetMapRequest1_1_1(status, this);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.remoteClient.wms.WMSProtocolHandler#createGetLegendGraphicRequest(org.gvsig.remoteClient.wms.WMSStatus, java.lang.String)
+	 */
+	protected WMSGetLegendGraphicRequest createGetLegendGraphicRequest(
+			WMSStatus status, String layerName) {
+		return new WMSGetLegendGraphicRequest1_1_1(status, this, layerName);
+	}
+	
+
+	/* (non-Javadoc)
+	 * @see org.gvsig.remoteclient.wms.WMSProtocolHandler#createGetCapabilitiesRequest(org.gvsig.remoteclient.wms.WMSStatus)
+	 */	
+	protected WMSGetCapabilitiesRequest createGetCapabilitiesRequest(
+			WMSStatus status) {
+		return new WMSGetCapabilitiesRequest1_1_1(status, this);
+	}
+  }
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_1/WMSStyle1_1_1.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_1/WMSStyle1_1_1.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_1/WMSStyle1_1_1.java	(revision 21019)
@@ -0,0 +1,87 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+
+package org.gvsig.remoteclient.wms.wms_1_1_1;
+
+import java.io.IOException;
+
+import org.kxml2.io.KXmlParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import org.gvsig.remoteclient.utils.CapabilitiesTags;
+
+/**
+ * <p>Represents the layer style defined by the OGC Specifications for WMS 1.1.1</p>
+ * 
+ */
+public class WMSStyle1_1_1 extends org.gvsig.remoteclient.wms.WMSStyle {
+
+/**
+ * <p>Parses the STYLE TAG according with the OGC Specifications for the WMS 1.1.1</p>
+ */
+    public void parse(KXmlParser parser) throws IOException, XmlPullParserException
+    {        
+    	int currentTag;
+    	boolean end = false;
+    	
+    	parser.require(KXmlParser.START_TAG, null, CapabilitiesTags.STYLE);
+    	currentTag = parser.nextTag();
+    	
+    	while (!end) 
+    	{
+			 switch(currentTag)
+			 {
+				case KXmlParser.START_TAG:
+					if (parser.getName().compareTo(CapabilitiesTags.NAME)==0)
+					{						
+						setName(parser.nextText());						
+					}	
+					else if (parser.getName().compareTo(CapabilitiesTags.TITLE)==0)
+					{
+						setTitle(parser.nextText());
+					}
+					else if (parser.getName().compareTo(CapabilitiesTags.ABSTRACT)==0)
+					{
+						setAbstract(parser.nextText());
+					}	
+					else if (parser.getName().compareTo(CapabilitiesTags.LEGENDURL)==0)
+					{
+						parseLegendURL(parser);
+					}
+					break;
+				case KXmlParser.END_TAG:
+					if (parser.getName().compareTo(CapabilitiesTags.STYLE) == 0)
+						end = true;
+					break;
+				case KXmlParser.TEXT:					
+					break;
+			 }
+			 if (!end)
+			 {
+				 currentTag = parser.nextTag();
+			 }
+    	}
+    	parser.require(KXmlParser.END_TAG, null, CapabilitiesTags.STYLE);
+    } 
+ }
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_1/request/WMSGetLegendGraphicRequest1_1_1.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_1/request/WMSGetLegendGraphicRequest1_1_1.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_1/request/WMSGetLegendGraphicRequest1_1_1.java	(revision 21019)
@@ -0,0 +1,43 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+ 
+package org.gvsig.remoteclient.wms.wms_1_1_1.request;
+
+import org.gvsig.remoteclient.wms.WMSProtocolHandler;
+import org.gvsig.remoteclient.wms.WMSStatus;
+import org.gvsig.remoteclient.wms.wms_1_1_0.request.WMSGetLegendGraphicRequest1_1_0;
+
+/**
+ * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
+ */
+public class WMSGetLegendGraphicRequest1_1_1 extends WMSGetLegendGraphicRequest1_1_0 {
+
+	public WMSGetLegendGraphicRequest1_1_1(WMSStatus status,
+			WMSProtocolHandler protocolHandler, String layerName) {
+		super(status, protocolHandler, layerName);		
+	}
+
+
+}
+
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_1/request/WMSGetMapRequest1_1_1.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_1/request/WMSGetMapRequest1_1_1.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_1/request/WMSGetMapRequest1_1_1.java	(revision 21019)
@@ -0,0 +1,42 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+ 
+package org.gvsig.remoteclient.wms.wms_1_1_1.request;
+
+import org.gvsig.remoteclient.wms.WMSProtocolHandler;
+import org.gvsig.remoteclient.wms.WMSStatus;
+import org.gvsig.remoteclient.wms.wms_1_1_0.request.WMSGetMapRequest1_1_0;
+
+/**
+ * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
+ */
+public class WMSGetMapRequest1_1_1 extends WMSGetMapRequest1_1_0{
+
+	public WMSGetMapRequest1_1_1(WMSStatus status,
+			WMSProtocolHandler protocolHandler) {
+		super(status, protocolHandler);		
+	}
+
+}
+
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_1/request/WMSGetFeatureInfoRequest1_1_1.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_1/request/WMSGetFeatureInfoRequest1_1_1.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_1/request/WMSGetFeatureInfoRequest1_1_1.java	(revision 21019)
@@ -0,0 +1,43 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+ 
+package org.gvsig.remoteclient.wms.wms_1_1_1.request;
+
+import org.gvsig.remoteclient.wms.WMSProtocolHandler;
+import org.gvsig.remoteclient.wms.WMSStatus;
+import org.gvsig.remoteclient.wms.wms_1_1_0.request.WMSGetFeatureInfoRequest1_1_0;
+
+/**
+ * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
+ */
+public class WMSGetFeatureInfoRequest1_1_1 extends WMSGetFeatureInfoRequest1_1_0{
+
+	public WMSGetFeatureInfoRequest1_1_1(WMSStatus status,
+			WMSProtocolHandler protocolHandler, int x, int y) {
+		super(status, protocolHandler, x, y);		
+	}
+
+
+}
+
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_1/request/WMSGetCapabilitiesRequest1_1_1.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_1/request/WMSGetCapabilitiesRequest1_1_1.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_1/request/WMSGetCapabilitiesRequest1_1_1.java	(revision 21019)
@@ -0,0 +1,46 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+ 
+package org.gvsig.remoteclient.wms.wms_1_1_1.request;
+
+import org.gvsig.remoteclient.wms.WMSProtocolHandler;
+import org.gvsig.remoteclient.wms.WMSStatus;
+import org.gvsig.remoteclient.wms.wms_1_1_0.request.WMSGetCapabilitiesRequest1_1_0;
+
+/**
+ * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
+ */
+public class WMSGetCapabilitiesRequest1_1_1 extends WMSGetCapabilitiesRequest1_1_0{
+
+	/**
+	 * @param status
+	 * @param protocolHandler
+	 */
+	public WMSGetCapabilitiesRequest1_1_1(WMSStatus status,
+			WMSProtocolHandler protocolHandler) {
+		super(status, protocolHandler);		
+	}
+
+}
+
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_1/WMSLayer1_1_1.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_1/WMSLayer1_1_1.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_1_1/WMSLayer1_1_1.java	(revision 21019)
@@ -0,0 +1,281 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+
+package org.gvsig.remoteclient.wms.wms_1_1_1;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.TreeMap;
+
+import org.kxml2.io.KXmlParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import org.gvsig.compat.CompatLocator;
+import org.gvsig.compat.lang.StringUtils;
+import org.gvsig.remoteclient.utils.BoundaryBox;
+import org.gvsig.remoteclient.utils.CapabilitiesTags;
+import org.gvsig.remoteclient.utils.Utilities;
+import org.gvsig.remoteclient.wms.WMSDimension;
+import org.gvsig.remoteclient.wms.WMSExtent;
+
+
+/**
+ * <p>WMS Layer for WMS 1.1.1</p>
+ * 
+ */
+public class WMSLayer1_1_1 extends org.gvsig.remoteclient.wms.WMSLayer {
+    
+    private static final StringUtils stringUtils = CompatLocator.getStringUtils();
+    
+	 /**
+     * <p>Extents defined for the layer in the capabilities doc</p>
+     */
+    private java.util.ArrayList extents = new ArrayList();
+    
+    /**
+     * <p> gets the extent vector defined in this layer</p>
+     * @return 
+     */
+    public ArrayList getExtents() {        
+        return extents;
+    } 
+    
+    public WMSExtent getExtent(String name)
+    {
+    	for(int i = 0; i < extents.size(); i++ ){
+    		if(((WMSExtent)extents.get(i)).getName().compareTo(name)==0)
+    		{
+    			return (WMSExtent)extents.get(i);
+    		}
+    	}
+    	return null;
+    }
+    
+    public ArrayList getDimensions()
+    {   
+        WMSDimension dimension;
+        WMSExtent extent;
+    	for(int i = 0; i < dimensions.size(); i++)
+    	{
+    		dimension = (WMSDimension)dimensions.get(i);
+    		extent = getExtent(dimension.getName()); 
+    		if(extent != null)
+    		{    			
+    			((WMSDimension)dimensions.get(i)).setDimensionExpression( extent.getExtentExpression());    			
+    		}
+    	}    	
+    	
+        WMSDimension pDimension;
+        WMSDimension myDimension;    
+        ArrayList myDimensions = (ArrayList) this.dimensions.clone();        
+        ArrayList pDimensions;        
+        if (parent!=null)
+        {
+        	pDimensions = parent.getDimensions();
+        	for (int i= 0; i < pDimensions.size(); i++){
+        		pDimension = (WMSDimension)pDimensions.get(i);
+        		myDimension = getDimension(pDimension.getName());
+        		if (myDimension != null){
+        			pDimensions.remove(pDimension);
+        		}
+        	}
+        	myDimensions.addAll(pDimensions);
+        }
+        return myDimensions;
+    }
+    
+    /**
+     * <p>Adds an extent to the extent vector </p>
+     * @param extent 
+     */
+    public void addExtent(org.gvsig.remoteclient.wms.WMSExtent extent) {        
+        extents.add(extent);
+    }   
+    
+    public WMSLayer1_1_1()
+    {
+        children = new ArrayList();
+    }
+    /**
+     * <p>Parses the contents of the parser(WMSCapabilities)
+     * to extract the information about an WMSLayer</p>
+     * 
+     */
+    public void parse(KXmlParser parser, TreeMap layerTreeMap)
+    throws IOException, XmlPullParserException
+    {
+        int currentTag;
+        boolean end = false;
+        String value;
+        BoundaryBox bbox;
+        parser.require(KXmlParser.START_TAG, null, CapabilitiesTags.LAYER);
+       
+        readLayerAttributes(parser);
+        currentTag = parser.nextTag();
+        
+        while (!end) 
+        {
+            switch(currentTag)
+            {
+                case KXmlParser.START_TAG:
+                    if (parser.getName().compareTo(CapabilitiesTags.LAYER)==0)
+                    {	
+                        WMSLayer1_1_1 lyr = new WMSLayer1_1_1();						
+                        //parser.next(); 
+                        lyr.parse(parser, layerTreeMap);
+                        lyr.setParent(this);                       
+                        this.children.add(lyr);
+                        // Jaume
+                        if (lyr.getName()!=null)
+                            layerTreeMap.put(lyr.getName(), lyr);
+                    }
+                    else if (parser.getName().compareTo(CapabilitiesTags.ATTRIBUTION)==0){
+                        // TODO comprobar que esto se necesite o se deseche
+                        parser.skipSubTree();
+                    }
+                    else if (parser.getName().compareTo(CapabilitiesTags.NAME)==0)
+                    {		
+                        value = parser.nextText();
+                        if (value != null) setName(value);						
+                    }	
+                    else if (parser.getName().compareTo(CapabilitiesTags.TITLE)==0)
+                    {
+                        value = parser.nextText();
+                        if (value != null) setTitle(value);
+                    }
+                    else if (parser.getName().compareTo(CapabilitiesTags.ABSTRACT)==0)
+                    {
+                        value = parser.nextText();
+                        if (value != null) setAbstract(value);
+                    }
+                    else if (parser.getName().compareTo(CapabilitiesTags.SRS)==0)
+                    {
+                        value = parser.nextText();
+                        if (value != null){
+                            String[] mySRSs = stringUtils.split(value, " ");
+                            for (int i = 0; i < mySRSs.length; i++) {
+                                addSrs(mySRSs[i]);    
+                            }                            
+                        }
+                    }					
+                    else if (parser.getName().compareTo(CapabilitiesTags.BOUNDINGBOX)==0)
+                    {
+                        bbox = new BoundaryBox();
+                        value = parser.getAttributeValue("",CapabilitiesTags.SRS);
+                        if (value != null)
+                            bbox.setSrs(value);
+                        value = parser.getAttributeValue("",CapabilitiesTags.MINX);
+                        if ((value != null) && (Utilities.isNumber(value)))
+                            bbox.setXmin(Double.parseDouble(value));	
+                        value = parser.getAttributeValue("",CapabilitiesTags.MINY);
+                        if ((value != null) && (Utilities.isNumber(value)))
+                            bbox.setYmin(Double.parseDouble(value));	
+                        value = parser.getAttributeValue("",CapabilitiesTags.MAXX);
+                        if ((value != null) && (Utilities.isNumber(value)))
+                            bbox.setXmax(Double.parseDouble(value));	
+                        value = parser.getAttributeValue("",CapabilitiesTags.MAXY);
+                        if ((value != null) && (Utilities.isNumber(value)))
+                            bbox.setYmax(Double.parseDouble(value));	
+                        addBBox(bbox);
+                        addSrs(bbox.getSrs());
+                    }	
+                    else if (parser.getName().compareTo(CapabilitiesTags.LATLONBOUNDINGBOX)==0)
+                    {
+                        bbox = new BoundaryBox();
+                        bbox.setSrs(CapabilitiesTags.EPSG_4326);
+                        value = parser.getAttributeValue("",CapabilitiesTags.MINX);
+                        if ((value != null) && (Utilities.isNumber(value)))
+                            bbox.setXmin(Double.parseDouble(value));	
+                        value = parser.getAttributeValue("",CapabilitiesTags.MINY);
+                        if ((value != null) && (Utilities.isNumber(value)))
+                            bbox.setYmin(Double.parseDouble(value));	
+                        value = parser.getAttributeValue("",CapabilitiesTags.MAXX);
+                        if ((value != null) && (Utilities.isNumber(value)))
+                            bbox.setXmax(Double.parseDouble(value));	
+                        value = parser.getAttributeValue("",CapabilitiesTags.MAXY);
+                        if ((value != null) && (Utilities.isNumber(value)))
+                            bbox.setYmax(Double.parseDouble(value));
+                        addBBox(bbox);
+                        setLatLonBox(bbox);
+                        //addSrs(bbox.getSrs());
+                    }						
+                    else if (parser.getName().compareTo(CapabilitiesTags.SCALEHINT)==0)
+                    {
+                        value = parser.getAttributeValue("",CapabilitiesTags.MIN);
+                        if ((value != null) && (Utilities.isNumber(value)))
+                            setScaleMin(Double.parseDouble(value));
+                        value = parser.getAttributeValue("",CapabilitiesTags.MAX);
+                        if ((value != null) && (Utilities.isNumber(value)))
+                            setScaleMax(Double.parseDouble(value));																	
+                    }						
+                    else if (parser.getName().compareTo(CapabilitiesTags.STYLE)==0)
+                    {
+                        WMSStyle1_1_1 style = new WMSStyle1_1_1();
+                        style.parse(parser);
+                        if ((style != null) && (style.getName() != null))
+                        {
+                            styles.add(style);
+                        }
+                    }
+                    else if (parser.getName().compareTo(CapabilitiesTags.DIMENSION)==0)
+                    {
+                        WMSDimension dim = new WMSDimension();
+                        dim.parse(parser);
+                        if ((dim != null) && (dim.getName() != null))
+                        {
+                            addDimension(dim);
+                        }
+                    }
+                    else if (parser.getName().compareTo(CapabilitiesTags.EXTENT)==0)
+                    {                    	
+                        WMSExtent extent = new WMSExtent();
+                        extent.parse(parser);
+                        if ((extent != null) && (extent.getName() != null))
+                        {
+                            addExtent(extent);
+                            
+                        }
+                    }                      
+                    else if (parser.getName().compareTo(CapabilitiesTags.KEYWORDLIST)==0)
+                    {
+                    	parseKeywordList(parser);
+                    }                    
+                    break;
+                case KXmlParser.END_TAG:
+                    if (parser.getName().compareTo(CapabilitiesTags.LAYER) == 0)
+                        end = true;
+                    break;
+                case KXmlParser.TEXT:					
+                    break;
+            }
+            if (!end)
+            	currentTag = parser.next();
+        }
+        parser.require(KXmlParser.END_TAG, null, CapabilitiesTags.LAYER);
+    }      
+    
+    public String toString(){
+        return super.toString();
+    }
+}
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/WMSOperation.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/WMSOperation.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/WMSOperation.java	(revision 21019)
@@ -0,0 +1,62 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+
+package org.gvsig.remoteclient.wms;
+
+import java.util.Hashtable;
+
+import org.gvsig.remoteclient.ogc.OGCClientOperation;
+import org.gvsig.remoteclient.utils.CapabilitiesTags;
+
+/**
+ * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
+ */
+public class WMSOperation extends OGCClientOperation{ 
+	protected static Hashtable operations = new Hashtable();
+
+	static{
+		operations.put(CapabilitiesTags.GETCAPABILITIES, new WMSOperation(CapabilitiesTags.GETCAPABILITIES));
+		operations.put(CapabilitiesTags.GETFEATUREINFO, new WMSOperation(CapabilitiesTags.GETFEATUREINFO));
+		operations.put(CapabilitiesTags.GETLEGENDGRAPHIC, new WMSOperation(CapabilitiesTags.GETLEGENDGRAPHIC));
+		operations.put(CapabilitiesTags.GETMAP, new WMSOperation(CapabilitiesTags.GETMAP));
+		operations.put(CapabilitiesTags.DESCRIBELAYER, new WMSOperation(CapabilitiesTags.DESCRIBELAYER));
+	}
+	
+	public WMSOperation(String operationName) {
+		super(operationName);		
+	}
+
+	public WMSOperation(String operationName, String onlineResource) {
+		super(operationName, onlineResource);		
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.remoteClient.OGCClientOperation#getOperations()
+	 */
+	public Hashtable getOperations() {
+		return operations;
+	}
+}
+
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/WMSStyle.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/WMSStyle.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/WMSStyle.java	(revision 21019)
@@ -0,0 +1,263 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+
+package org.gvsig.remoteclient.wms;
+
+import java.io.IOException;
+
+import org.kxml2.io.KXmlParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import org.gvsig.remoteclient.utils.CapabilitiesTags;
+
+/**
+ * <p>Defines a OGC style. Theme that describes the appeareance of certain layer.</p>
+ *
+ */
+public abstract class WMSStyle {
+
+	//style name, defined in the WMS capabilities
+	private String name;
+	//style title, defined in the WMS capabilities
+	private String title;
+	// style abstract, defined in the WMS capabilities
+    private String styleAbstract;
+
+    private org.gvsig.remoteclient.wms.WMSStyle.LegendURL legendURL;
+
+    /**
+     * <p>Parses the STYLE tag in the WMS capabilities, filling the WMSStyle object
+     * loading the data in memory to be easily accesed</p>
+     *
+     */
+    public abstract void parse(KXmlParser parser) throws IOException, XmlPullParserException;
+
+    /**
+     * Parses the legendURL tag.
+     * @param parser
+     * @throws IOException
+     * @throws XmlPullParserException
+     */
+    protected void parseLegendURL(KXmlParser parser) throws IOException, XmlPullParserException
+    {
+    	int currentTag;
+    	boolean end = false;
+
+    	parser.require(KXmlParser.START_TAG, null, CapabilitiesTags.LEGENDURL);
+
+    	String value = new String();
+    	legendURL = new LegendURL();
+
+    	//First of all set whether the layer is Queryable reading the attribute.
+    	value = parser.getAttributeValue("", CapabilitiesTags.WIDTH);
+    	if (value != null)
+    	{
+    		legendURL.width = Integer.parseInt( value );
+    	}
+    	value = parser.getAttributeValue("", CapabilitiesTags.HEIGHT);
+    	if (value != null)
+    	{
+    		legendURL.height = Integer.parseInt( value );
+    	}
+    	currentTag = parser.nextTag();
+
+    	while (!end)
+    	{
+    		switch(currentTag)
+    		{
+    		case KXmlParser.START_TAG:
+    			if (parser.getName().compareTo(CapabilitiesTags.FORMAT)==0)
+    			{
+    				legendURL.format = parser.nextText();
+    			}
+    			else if (parser.getName().compareTo(CapabilitiesTags.ONLINERESOURCE)==0)
+    			{
+    				value = parser.getAttributeValue("", CapabilitiesTags.XLINK_TYPE);
+    				if (value != null)
+    					legendURL.onlineResource_type = value;
+    				value = parser.getAttributeValue("", CapabilitiesTags.XLINK_HREF);
+    				if (value != null)
+    					legendURL.onlineResource_href = value;
+    			}
+    			break;
+    		case KXmlParser.END_TAG:
+    			if (parser.getName().compareTo(CapabilitiesTags.LEGENDURL) == 0)
+    				end = true;
+    			break;
+    		case KXmlParser.TEXT:
+    			break;
+    		}
+    		if (!end)
+    		{
+    			currentTag = parser.next();
+    		}
+    	}
+    	parser.require(KXmlParser.END_TAG, null, CapabilitiesTags.LEGENDURL);
+    }
+
+    /**
+     * gets the LegendURL OnlineResource type
+     */
+    public String getLegendURLOnlineResourceType()
+    {
+    	if (legendURL != null)
+    	{
+    		return legendURL.onlineResource_type;
+    	}
+    	else
+    	{
+    		return null;
+    	}
+    }
+
+    /**
+     * gets the LegendURL OnlineResource href
+     */
+    public String getLegendURLOnlineResourceHRef()
+    {
+    	if (legendURL != null)
+    	{
+    		return legendURL.onlineResource_href;
+    	}
+    	else
+    	{
+    		return null;
+    	}
+    }
+    public String getLegendURLFormat()
+    {
+    	if (legendURL != null)
+    	{
+    		return legendURL.format;
+    	}
+    	else
+    	{
+    		return null;
+    	}
+    }
+    public int getLegendURLWidth()
+    {
+    	if (legendURL != null)
+    	{
+    		return legendURL.width;
+    	}
+    	return 0;
+    }
+    public int getLegendURLHeight()
+    {
+    	if (legendURL != null)
+    	{
+    		return legendURL.height;
+    	}
+    	return 0;
+    }
+
+    /**
+     * sets LegendURL
+     */
+    protected void setLegendURL(LegendURL legendURL)
+    {
+    	this.legendURL = legendURL;
+    }
+
+    /**
+     * <p>gets the style name</p>
+     *
+     * @return style name
+     */
+    public String getName() {
+    	return name;
+    }
+
+    /**
+     * <p>sets the style name.</p>
+     *
+     * @param _name
+     */
+    public void setName(String _name) {
+    	name = _name;
+    }
+
+    /**
+     * <p>gets the style title</p>
+     *
+     *
+     * @return style title
+     */
+    public String getTitle() {
+    	return title;
+    }
+
+    /**
+     * <p>Sets style title</p>
+     *
+     *
+     * @param _title
+     */
+    public void setTitle(String _title) {
+    	title = _title.trim();
+    }
+
+    /**
+     * <p>gets style abstract</p>
+     *
+     *
+     * @return style abstract
+     */
+    public String getAbstract() {
+    	return styleAbstract;
+    }
+
+    /**
+     * <p>sets style abstract</p>
+     *
+     *
+     * @param _abstract, style abstract
+     */
+    public void setAbstract(String _abstract) {
+    	styleAbstract = _abstract;
+    }
+
+    /**
+     * <p>Inner class describing the Legend URL defined for styles in the OGC specifications in WMS</p>
+     *
+     */
+    protected class LegendURL
+    {
+    	public LegendURL()
+    	{
+    		width = 0;
+    		height= 0;
+    		format = new String();
+    		onlineResource_type = new String();
+    		onlineResource_href = new String();
+    	}
+
+    	public int width;
+    	public int height;
+    	public String format;
+    	public String onlineResource_type;
+    	public String onlineResource_href;
+    }
+}
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_3_0/WMSLayer1_3_0.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_3_0/WMSLayer1_3_0.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_3_0/WMSLayer1_3_0.java	(revision 21019)
@@ -0,0 +1,240 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+
+package org.gvsig.remoteclient.wms.wms_1_3_0;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.TreeMap;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.compat.CompatLocator;
+import org.gvsig.compat.lang.StringUtils;
+import org.gvsig.fmap.crs.CRSFactory;
+import org.gvsig.remoteclient.epsg.CrsAxisOrder;
+import org.gvsig.remoteclient.utils.BoundaryBox;
+import org.gvsig.remoteclient.utils.CapabilitiesTags;
+import org.gvsig.remoteclient.utils.Utilities;
+import org.gvsig.remoteclient.wms.WMSDimension;
+import org.kxml2.io.KXmlParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+
+/**
+ * <p>WMS Layer for WMS 1.3.0</p>
+ * 
+ */
+public class WMSLayer1_3_0 extends org.gvsig.remoteclient.wms.WMSLayer {
+    
+    private static final StringUtils stringUtils = CompatLocator.getStringUtils();
+    
+    
+    public ArrayList getDimensions() {   
+        WMSDimension pDimension;
+        WMSDimension myDimension;    
+        ArrayList myDimensions = (ArrayList) this.dimensions.clone();        
+        ArrayList pDimensions;
+        
+        if (parent != null) {
+        	pDimensions = parent.getDimensions();
+        	for (int i= 0; i < pDimensions.size(); i++) {
+        		pDimension = (WMSDimension)pDimensions.get(i);
+        		myDimension = getDimension(pDimension.getName());
+        		if (myDimension != null){
+        			pDimensions.remove(pDimension);
+        		}
+        	}
+        	myDimensions.addAll(pDimensions);
+        }
+        return myDimensions;
+    }
+    
+    public WMSLayer1_3_0() {
+        children = new ArrayList();
+    }
+    /**
+     * <p>Parses the contents of the parser(WMSCapabilities)
+     * to extract the information about an WMSLayer</p>
+     * 
+     */
+    public void parse(KXmlParser parser, TreeMap layerTreeMap) throws IOException, XmlPullParserException {
+        int currentTag;
+        boolean end = false;
+        String value;
+        BoundaryBox bbox;
+        parser.require(KXmlParser.START_TAG, null, CapabilitiesTags.LAYER);
+        
+        readLayerAttributes( parser );
+        
+        currentTag = parser.nextTag();
+        
+        while (!end) {
+        	switch(currentTag) {
+        	case KXmlParser.START_TAG:
+        		if (parser.getName().compareTo(CapabilitiesTags.LAYER) == 0) {	
+        			WMSLayer1_3_0 lyr = new WMSLayer1_3_0();						
+        			//parser.next(); 
+        			lyr.parse(parser, layerTreeMap);
+        			lyr.setParent(this);
+        			this.children.add(lyr);
+        			// Jaume
+        			if (lyr.getName()!=null)
+        				layerTreeMap.put(lyr.getName(), lyr);
+        		} else if (parser.getName().compareTo(CapabilitiesTags.ATTRIBUTION) == 0) {
+        			// TODO comprobar que esto se necesite o se deseche
+        			parser.skipSubTree();
+        		} else if (parser.getName().compareTo(CapabilitiesTags.NAME) == 0) {		
+        			value = parser.nextText();
+        			if (value != null) setName(value);						
+        		} else if (parser.getName().compareTo(CapabilitiesTags.TITLE) == 0) {
+        			value = parser.nextText();
+        			if (value != null) setTitle(value);
+        		} else if (parser.getName().compareTo(CapabilitiesTags.ABSTRACT) == 0) {
+        			value = parser.nextText();
+        			if (value != null) setAbstract(value);
+        		} else if (parser.getName().compareTo(CapabilitiesTags.CRS) == 0) {
+        			value = parser.nextText();
+        			if (value != null) {
+        				String[] mySRSs = stringUtils.split(value, " ");
+        				for (int i = 0; i < mySRSs.length; i++) {
+        					addSrs(mySRSs[i]);    
+        				}                        
+        			}
+        		} else if (parser.getName().compareTo(CapabilitiesTags.BOUNDINGBOX) == 0) {
+        			bbox = new BoundaryBox();
+        			value = parser.getAttributeValue("",CapabilitiesTags.CRS);
+        			if (value != null)
+        				bbox.setSrs(value);
+        			value = parser.getAttributeValue("",CapabilitiesTags.MINX);
+        			if ((value != null) && (Utilities.isNumber(value)))
+        				bbox.setXmin(Double.parseDouble(value));	
+        			value = parser.getAttributeValue("",CapabilitiesTags.MINY);
+        			if ((value != null) && (Utilities.isNumber(value)))
+        				bbox.setYmin(Double.parseDouble(value));	
+        			value = parser.getAttributeValue("",CapabilitiesTags.MAXX);
+        			if ((value != null) && (Utilities.isNumber(value)))
+        				bbox.setXmax(Double.parseDouble(value));	
+        			value = parser.getAttributeValue("",CapabilitiesTags.MAXY);
+        			if ((value != null) && (Utilities.isNumber(value)))
+        				bbox.setYmax(Double.parseDouble(value));	
+
+        			addBBox(bbox);
+        			addSrs(bbox.getSrs());
+        		} else if (parser.getName().compareTo(CapabilitiesTags.EX_GEOGRAPHICBOUNDINGBOX) == 0) {
+        			//minimum bounding rectangle in decimal degrees of the area covered by the layer.
+        			bbox = parseEXGeographicBBTag(parser);	
+        			addBBox(bbox);
+        			setLatLonBox(bbox);
+        			addSrs(bbox.getSrs());
+        		} else if (parser.getName().compareTo(CapabilitiesTags.SCALEHINT) == 0) {
+        			value = parser.getAttributeValue("",CapabilitiesTags.MIN);
+        			if ((value != null) && (Utilities.isNumber(value)))
+        				setScaleMin(Double.parseDouble(value));
+        			value = parser.getAttributeValue("",CapabilitiesTags.MAX);
+        			if ((value != null) && (Utilities.isNumber(value)))
+        				setScaleMax(Double.parseDouble(value));																	
+        		} else if (parser.getName().compareTo(CapabilitiesTags.STYLE) == 0) {
+        			WMSStyle1_3_0 style = new WMSStyle1_3_0();
+        			style.parse(parser);
+        			if ((style != null) && (style.getName() != null)) {
+        				styles.add(style);
+        			}
+        		} else if (parser.getName().compareTo(CapabilitiesTags.DIMENSION) == 0) {
+        			WMSDimension dim = new WMSDimension();
+        			dim.parse(parser);
+        			if ((dim != null) && (dim.getName() != null)) {
+        				addDimension(dim);
+
+        			}
+        		} else if (parser.getName().compareTo(CapabilitiesTags.KEYWORDLIST) == 0) {
+        			parseKeywordList(parser);
+        		}                     
+        		break;
+        	case KXmlParser.END_TAG:
+        		if (parser.getName().compareTo(CapabilitiesTags.LAYER) == 0)
+        			end = true;
+        		break;
+        	case KXmlParser.TEXT:					
+        		break;
+        	}
+        	if (!end)
+        		currentTag = parser.next();
+        }
+        parser.require(KXmlParser.END_TAG, null, CapabilitiesTags.LAYER);
+    }     
+    
+    /**
+     * <p>Parses the EX_GeographicBoundingBox </p>
+     */    
+    private BoundaryBox parseEXGeographicBBTag(KXmlParser parser) throws IOException, XmlPullParserException {
+    	int currentTag;
+    	boolean end = false;
+    	BoundaryBox bbox = new BoundaryBox ();
+    	String value;
+    	
+    	parser.require(KXmlParser.START_TAG, null, CapabilitiesTags.EX_GEOGRAPHICBOUNDINGBOX);
+    	currentTag = parser.next();
+    	
+    	while (!end) {
+			 switch(currentTag) {
+				case KXmlParser.START_TAG:
+					if (parser.getName().compareTo(CapabilitiesTags.WESTBOUNDLONGITUDE) == 0) {
+						value = parser.nextText();	                       
+	                    if ((value != null) && (Utilities.isNumber(value)))
+	                    	bbox.setXmin(Double.parseDouble(value));
+					} else if (parser.getName().compareTo(CapabilitiesTags.EASTBOUNDLONGITUDE) == 0) {
+						value = parser.nextText();	                       
+	                    if ((value != null) && (Utilities.isNumber(value)))
+	                    	bbox.setXmax(Double.parseDouble(value));
+					} else if (parser.getName().compareTo(CapabilitiesTags.NORTHBOUNDLATITUDE) == 0) {
+						value = parser.nextText();	                       
+	                    if ((value != null) && (Utilities.isNumber(value)))
+	                    	bbox.setYmax(Double.parseDouble(value));
+					} else if (parser.getName().compareTo(CapabilitiesTags.SOUTHBOUNDLATITUDE) == 0) {
+						value = parser.nextText();	                       
+	                    if ((value != null) && (Utilities.isNumber(value)))
+	                    	bbox.setYmin(Double.parseDouble(value));
+					}					
+					break;
+				case KXmlParser.END_TAG:
+					if (parser.getName().compareTo(CapabilitiesTags.EX_GEOGRAPHICBOUNDINGBOX) == 0)
+						end = true;
+					break;
+				case KXmlParser.TEXT:					
+					break;
+			 }
+             if (!end)
+                 currentTag = parser.next();
+    	}    	
+    	parser.require(KXmlParser.END_TAG, null, CapabilitiesTags.EX_GEOGRAPHICBOUNDINGBOX);
+    	// it is important to set CRS:84 instead of EPSG:4326 to ensure the bbox axis order is
+    	// correctly understood by the protocol handler
+    	bbox.setSrs("CRS:84");
+    	return bbox;
+    }
+    
+    public String toString() {
+        return super.toString();
+    }
+}
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_3_0/WMSProtocolHandler1_3_0.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_3_0/WMSProtocolHandler1_3_0.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_3_0/WMSProtocolHandler1_3_0.java	(revision 21019)
@@ -0,0 +1,388 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+
+package org.gvsig.remoteclient.wms.wms_1_3_0;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Enumeration;
+import java.util.TreeMap;
+
+import org.kxml2.io.KXmlParser;
+import org.xmlpull.v1.XmlPullParserException;
+import org.gvsig.compat.net.ICancellable;
+import org.gvsig.remoteclient.epsg.CrsAxisOrder;
+import org.gvsig.remoteclient.utils.BoundaryBox;
+import org.gvsig.remoteclient.utils.CapabilitiesTags;
+import org.gvsig.remoteclient.utils.EncodingXMLParser;
+import org.gvsig.remoteclient.utils.ExceptionTags;
+import org.gvsig.remoteclient.wms.WMSLayer;
+import org.gvsig.remoteclient.wms.WMSServiceInformation;
+import org.gvsig.remoteclient.wms.WMSStatus;
+import org.gvsig.remoteclient.wms.request.WMSGetCapabilitiesRequest;
+import org.gvsig.remoteclient.wms.request.WMSGetFeatureInfoRequest;
+import org.gvsig.remoteclient.wms.request.WMSGetLegendGraphicRequest;
+import org.gvsig.remoteclient.wms.request.WMSGetMapRequest;
+import org.gvsig.remoteclient.wms.wms_1_1_1.WMSProtocolHandler1_1_1;
+import org.gvsig.remoteclient.wms.wms_1_3_0.request.WMSGetCapabilitiesRequest1_3_0;
+import org.gvsig.remoteclient.wms.wms_1_3_0.request.WMSGetFeatureInfoRequest1_1_3;
+import org.gvsig.remoteclient.wms.wms_1_3_0.request.WMSGetLegendGraphicRequest1_1_3;
+import org.gvsig.remoteclient.wms.wms_1_3_0.request.WMSGetMapRequest1_1_3;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * <p>
+ * Describes the handler to comunicate to a WMS 1.3.0
+ * </p>
+ */
+public class WMSProtocolHandler1_3_0 extends org.gvsig.remoteclient.wms.WMSProtocolHandler {
+
+        private static final Logger logger = LoggerFactory.getLogger(WMSProtocolHandler1_3_0.class);
+	private WMSLayer1_3_0 fakeRootLayer;
+
+	public WMSProtocolHandler1_3_0()
+	{
+		this.version = "1.3.0";
+		this.name = "WMS1.3.0";
+		this.serviceInfo = new WMSServiceInformation();
+		this.layers = new TreeMap();
+	}
+
+//------------------------------------------------------------------------------
+// Parsing methods....
+//------------------------------------------------------------------------------
+
+	@Override
+	public void getCapabilities(WMSStatus status, boolean override,
+			ICancellable cancel) {
+		super.getCapabilities(status, override, cancel);
+		if (rootLayer!=null && status!=null && !status.isXyAxisOrder()) {
+			/*	WMSLayer parser gets no information about the user preferences regarding
+	 			axis order, so the bboxes should be post-processed here,
+	 			where we get the user preference from the WMSStatus
+			 */
+			processLayer(rootLayer);
+		}
+	}
+
+	/**
+	 * WMSLayer parser gets no information about the user preferences regarding
+	 * axis order, so the bboxes should be should be post-processed here,
+	 * where we get the information from  at the
+	 * protocol hanlder
+	 * @param layer
+	 */
+	protected void processLayer(WMSLayer layer) {
+        if (layer.getBboxes()!=null) {
+            Collection<BoundaryBox> col = (Collection<BoundaryBox>) layer.getBboxes().values();
+            for (BoundaryBox bbox: col) {
+                if (!CrsAxisOrder.isXyAxisOrder(bbox.getSrs())) {
+                    double auxX = bbox.getXmin();
+                    double auxY = bbox.getYmin();
+                    bbox.setXmin(auxY);
+                    bbox.setYmin(auxX);
+                    auxX = bbox.getXmax();
+                    auxY = bbox.getYmax();
+                    bbox.setXmax(auxY);
+                    bbox.setYmax(auxX);
+                }
+            }
+        }
+        ArrayList children = layer.getChildren();
+        if (children!=null) {
+            for (int i=0; i<children.size(); i++) {
+                WMSLayer child = (WMSLayer) children.get(i);
+                processLayer(child);
+            }
+        }
+    }
+
+    public boolean parseCapabilities(File f)
+    {
+    	rootLayer = null;
+
+    	int tag;
+      	EncodingXMLParser kxmlParser = null;
+    	kxmlParser = new EncodingXMLParser();
+    	try
+    	{
+    	   	kxmlParser.setInput(f);
+			kxmlParser.nextTag();
+    		if ( kxmlParser.getEventType() != KXmlParser.END_DOCUMENT )
+    		{
+    			kxmlParser.require(KXmlParser.START_TAG, null, CapabilitiesTags.CAPABILITIES_ROOT1_3_0);
+    			tag = kxmlParser.nextTag();
+				 while(tag != KXmlParser.END_DOCUMENT)
+				 {
+                     switch(tag)
+					 {
+						case KXmlParser.START_TAG:
+							if (kxmlParser.getName().compareTo(CapabilitiesTags.SERVICE )==0)
+							{
+								parseServiceTag(kxmlParser);
+							}
+							else if (kxmlParser.getName().compareTo(CapabilitiesTags.CAPABILITY)==0)
+							{
+								parseCapabilityTag(kxmlParser);
+							}
+							break;
+						case KXmlParser.END_TAG:
+							break;
+						case KXmlParser.TEXT:
+							//System.out.println("[TEXT]["+kxmlParser.getText()+"]");
+						break;
+					 }
+    				 tag = kxmlParser.next();
+    			 }//while !END_DOCUMENT
+    		}
+    	}
+    	catch(XmlPullParserException parser_ex){
+                logger.warn("Error parsing capabilites.",parser_ex);
+    		return false;
+    	}
+   		catch (IOException ioe) {
+                        logger.warn("Error parsing capabilites.",ioe);
+   			return false;
+ 		} finally {
+            return true;
+        }
+   		// In the parsing process the layer has been filled
+    }
+
+    /**
+     * <p>Parses the Service Information </p>
+     */
+    private void parseServiceTag(KXmlParser parser) throws IOException, XmlPullParserException
+    {
+    	int currentTag;
+    	boolean end = false;
+
+    	parser.require(KXmlParser.START_TAG, null, CapabilitiesTags.SERVICE);
+    	currentTag = parser.next();
+
+    	while (!end)
+    	{
+			 switch(currentTag)
+			 {
+				case KXmlParser.START_TAG:
+					if (parser.getName().compareTo(CapabilitiesTags.NAME)==0)
+					{
+						serviceInfo.name = parser.nextText();
+					}
+					else if (parser.getName().compareTo(CapabilitiesTags.TITLE)==0)
+					{
+						serviceInfo.title = parser.nextText();
+					}
+					else if (parser.getName().compareTo(CapabilitiesTags.ABSTRACT)==0)
+					{
+						serviceInfo.abstr = parser.nextText();
+					}
+					else if (parser.getName().compareTo(CapabilitiesTags.ONLINERESOURCE)==0)
+					{
+				    	String value = new String();
+				        value = parser.getAttributeValue("", CapabilitiesTags.XLINK_HREF);
+				        if (value != null){
+				        	serviceInfo.online_resource = value;
+				        }
+					}
+					else if ((parser.getName().compareTo(CapabilitiesTags.KEYWORDLIST)==0) ||
+							(parser.getName().compareTo(CapabilitiesTags.CONTACTINFORMATION)==0))
+					{
+						parser.skipSubTree();
+					}
+					break;
+				case KXmlParser.END_TAG:
+					if (parser.getName().compareTo(CapabilitiesTags.SERVICE) == 0)
+						end = true;
+					break;
+				case KXmlParser.TEXT:
+				break;
+			 }
+             if (!end)
+                 currentTag = parser.next();
+    	}
+    	parser.require(KXmlParser.END_TAG, null, CapabilitiesTags.SERVICE);
+    }
+
+    /**
+     * <p>Parses the Capability Tag </p>
+     */
+    private void parseCapabilityTag(KXmlParser parser) throws IOException, XmlPullParserException
+    {
+    	int currentTag;
+    	boolean end = false;
+
+    	parser.require(KXmlParser.START_TAG, null, CapabilitiesTags.CAPABILITY);
+    	currentTag = parser.next();
+
+    	while (!end)
+    	{
+			 switch(currentTag)
+			 {
+				case KXmlParser.START_TAG:
+					if (parser.getName().compareTo(CapabilitiesTags.REQUEST)==0)
+					{
+						parseRequestTag(parser);
+					}
+					else if (parser.getName().compareTo(CapabilitiesTags.EXCEPTION)==0)
+					{
+						//TODO:
+						//Add to serviceInformation the supported exception formats.
+					}
+					else if (parser.getName().compareTo(CapabilitiesTags.LAYER)==0)
+					{
+						WMSLayer1_3_0 lyr = new WMSLayer1_3_0();
+                        if (rootLayer == null)
+                            rootLayer = lyr;
+                        else {
+                            // Handles when there is no general root layer, will use
+                            // a fake non-queryable one.
+                            if (!rootLayer.equals(getFakeRootLayer())){
+                                WMSLayer1_3_0 aux = (WMSLayer1_3_0) rootLayer;
+                                rootLayer  = getFakeRootLayer();
+                                rootLayer.getChildren().add(aux);
+                            }
+                            rootLayer.getChildren().add(lyr);
+                        }
+						lyr.parse(parser, layers);
+
+                        if (lyr.getName()!=null)
+						    layers.put(lyr.getName(), lyr);
+					}
+					else if ((parser.getName().compareTo(CapabilitiesTags.VENDORSPECIFICCAPABILITIES)==0) ||
+							(parser.getName().compareTo(CapabilitiesTags.USERDEFINEDSYMBOLIZATION )==0))
+					{
+						parser.skipSubTree();
+					}
+					break;
+				case KXmlParser.END_TAG:
+					if (parser.getName().compareTo(CapabilitiesTags.CAPABILITY) == 0)
+						end = true;
+					break;
+				case KXmlParser.TEXT:
+				break;
+			 }
+			 if (!end)
+				 currentTag = parser.next();
+    	}
+    	//parser.require(KXmlParser.END_TAG, null, CapabilitiesTags.CAPABILITY);
+    }
+
+    private WMSLayer1_3_0 getFakeRootLayer(){
+        if (fakeRootLayer == null){
+            fakeRootLayer = new WMSLayer1_3_0();
+            fakeRootLayer.setTitle(serviceInfo.title);
+            fakeRootLayer.setQueryable(false);
+            fakeRootLayer.setName(null);
+        }
+        return fakeRootLayer;
+    }
+    /* (non-Javadoc)
+     * @see org.gvsig.remoteClient.wms.WMSProtocolHandler#parseException(byte[])
+     */
+    protected String parseException(byte[] data) {
+        ArrayList errors = new ArrayList();
+        KXmlParser kxmlParser = new KXmlParser();
+        try
+        {
+            kxmlParser.setInput(new ByteArrayInputStream(data), encoding);
+            kxmlParser.nextTag();
+            int tag;
+            if ( kxmlParser.getEventType() != KXmlParser.END_DOCUMENT )
+            {
+                kxmlParser.require(KXmlParser.START_TAG, null, ExceptionTags.EXCEPTION_ROOT);
+                tag = kxmlParser.nextTag();
+                 while(tag != KXmlParser.END_DOCUMENT)
+                 {
+                     switch(tag)
+                     {
+                        case KXmlParser.START_TAG:
+                            if (kxmlParser.getName().compareTo(ExceptionTags.SERVICE_EXCEPTION)==0){
+                                String errorCode = kxmlParser.getAttributeValue("", ExceptionTags.CODE);
+                                errorCode = (errorCode != null) ? "["+errorCode+"] " : "";
+                                String errorMessage = kxmlParser.nextText();
+                                errors.add(errorCode+errorMessage);
+                            }
+                            break;
+                        case KXmlParser.END_TAG:
+                            break;
+
+                     }
+                     tag = kxmlParser.nextTag();
+                 }
+                 //kxmlParser.require(KXmlParser.END_DOCUMENT, null, null);
+            }
+        }
+        catch(XmlPullParserException parser_ex){
+            logger.warn("",parser_ex);
+        }
+        catch (IOException ioe) {
+            logger.warn("",ioe);
+        }
+        String message = errors.size()>0? "" : null;
+        for (int i = 0; i < errors.size(); i++) {
+            message += (String) errors.get(i)+"\n";
+        }
+        return message;
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.gvsig.remoteClient.wms.WMSProtocolHandler#createGetFeatureInfoRequest(org.gvsig.remoteClient.wms.WMSStatus, int, int)
+     */
+	protected WMSGetFeatureInfoRequest createGetFeatureInfoRequest(
+			WMSStatus status, int x, int y) {
+		return new WMSGetFeatureInfoRequest1_1_3(status, this, x, y);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.remoteClient.wms.WMSProtocolHandler#createGetMapRequest(org.gvsig.remoteClient.wms.WMSStatus)
+	 */
+	protected WMSGetMapRequest createGetMapRequest(WMSStatus status) {
+		return new WMSGetMapRequest1_1_3(status, this);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.remoteClient.wms.WMSProtocolHandler#createGetLegendGraphicRequest(org.gvsig.remoteClient.wms.WMSStatus, java.lang.String)
+	 */
+	protected WMSGetLegendGraphicRequest createGetLegendGraphicRequest(
+			WMSStatus status, String layerName) {
+		return new WMSGetLegendGraphicRequest1_1_3(status, this, layerName);
+	}
+
+
+	/* (non-Javadoc)
+	 * @see org.gvsig.remoteclient.wms.WMSProtocolHandler#createGetCapabilitiesRequest(org.gvsig.remoteclient.wms.WMSStatus)
+	 */
+	protected WMSGetCapabilitiesRequest createGetCapabilitiesRequest(
+			WMSStatus status) {
+		return new WMSGetCapabilitiesRequest1_3_0(status, this);
+	}
+  }
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_3_0/request/WMSGetLegendGraphicRequest1_1_3.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_3_0/request/WMSGetLegendGraphicRequest1_1_3.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_3_0/request/WMSGetLegendGraphicRequest1_1_3.java	(revision 21019)
@@ -0,0 +1,43 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+package org.gvsig.remoteclient.wms.wms_1_3_0.request;
+
+import org.gvsig.remoteclient.wms.WMSProtocolHandler;
+import org.gvsig.remoteclient.wms.WMSStatus;
+import org.gvsig.remoteclient.wms.wms_1_1_0.request.WMSGetLegendGraphicRequest1_1_0;
+
+/**
+ * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
+ */
+public class WMSGetLegendGraphicRequest1_1_3 extends WMSGetLegendGraphicRequest1_1_0{
+
+	public WMSGetLegendGraphicRequest1_1_3(WMSStatus status,
+			WMSProtocolHandler protocolHandler, String layerName) {
+		super(status, protocolHandler, layerName);		
+	}
+
+
+
+}
+
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_3_0/request/WMSGetMapRequest1_1_3.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_3_0/request/WMSGetMapRequest1_1_3.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_3_0/request/WMSGetMapRequest1_1_3.java	(revision 21019)
@@ -0,0 +1,101 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+
+package org.gvsig.remoteclient.wms.wms_1_3_0.request;
+
+import java.util.Vector;
+
+import org.gvsig.remoteclient.epsg.CrsAxisOrder;
+import org.gvsig.remoteclient.utils.BoundaryBox;
+import org.gvsig.remoteclient.utils.CapabilitiesTags;
+import org.gvsig.remoteclient.utils.Utilities;
+import org.gvsig.remoteclient.wms.WMSProtocolHandler;
+import org.gvsig.remoteclient.wms.WMSStatus;
+import org.gvsig.remoteclient.wms.wms_1_1_0.request.WMSGetMapRequest1_1_0;
+
+/**
+ * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
+ */
+public class WMSGetMapRequest1_1_3 extends WMSGetMapRequest1_1_0{
+
+	public WMSGetMapRequest1_1_3(WMSStatus status,
+			WMSProtocolHandler protocolHandler) {
+		super(status, protocolHandler);		
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.remoteclient.wms.request.WMSRequest#getPartialQuery(org.gvsig.remoteclient.wms.WMSStatus)
+	 */
+	protected String getPartialQuery(WMSStatus status){
+		double coord1, coord2, coord3, coord4;
+		String epsgCode = status.getSrs();
+		if (status.isXyAxisOrder() || CrsAxisOrder.isXyAxisOrder(epsgCode)) { 
+			coord1 = status.getExtent().getMinX();
+			coord2 = status.getExtent().getMinY();
+			coord3 = status.getExtent().getMaxX();
+			coord4 = status.getExtent().getMaxY();
+		}
+		else {
+    		// use reverse coordinate order as defined by EPSG registry
+			coord1 = status.getExtent().getMinY();
+			coord2 = status.getExtent().getMinX();
+			coord3 = status.getExtent().getMaxY();
+			coord4 = status.getExtent().getMaxX();
+		}
+		
+		StringBuffer req = new StringBuffer();
+		req.append("LAYERS=" + Utilities.Vector2CS(status.getLayerNames()))
+		.append("&CRS=" + status.getSrs())
+		.append("&BBOX=" + coord1 + "," )
+		.append(coord2 + ",")
+		.append(coord3 + ",")
+		.append(coord4)
+		.append("&WIDTH=" + status.getWidth())
+		.append("&HEIGHT=" + status.getHeight())
+		.append("&FORMAT=" + status.getFormat())
+		.append("&STYLES=");
+		Vector v = status.getStyles();
+		if (v!=null && v.size()>0)
+			req.append(Utilities.Vector2CS(v));
+		v = status.getDimensions();
+		if (v!=null && v.size()>0)
+			req.append("&" + Utilities.Vector2URLParamString(v));
+		if (status.getTransparency()) {
+			req.append("&TRANSPARENT=TRUE");
+		}
+		return req.toString();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.gvsig.remoteclient.wms.wms_1_1_0.request.WMSGetMapRequest1_1_0#getExceptionsFormat()
+	 */
+	protected String getExceptionsFormat() {
+		return CapabilitiesTags.EXCEPTIONS_1_3_0;
+	}
+	
+	
+
+}
+
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_3_0/request/WMSGetFeatureInfoRequest1_1_3.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_3_0/request/WMSGetFeatureInfoRequest1_1_3.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_3_0/request/WMSGetFeatureInfoRequest1_1_3.java	(revision 21019)
@@ -0,0 +1,121 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+ 
+package org.gvsig.remoteclient.wms.wms_1_3_0.request;
+
+import java.util.Vector;
+
+import org.gvsig.compat.CompatLocator;
+import org.gvsig.compat.lang.StringUtils;
+import org.gvsig.remoteclient.epsg.CrsAxisOrder;
+import org.gvsig.remoteclient.utils.CapabilitiesTags;
+import org.gvsig.remoteclient.utils.Utilities;
+import org.gvsig.remoteclient.wms.WMSProtocolHandler;
+import org.gvsig.remoteclient.wms.WMSStatus;
+import org.gvsig.remoteclient.wms.request.WMSGetFeatureInfoRequest;
+
+/**
+ * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
+ */
+public class WMSGetFeatureInfoRequest1_1_3 extends WMSGetFeatureInfoRequest{
+
+    private static final StringUtils stringUtils = CompatLocator.getStringUtils();
+    
+	public WMSGetFeatureInfoRequest1_1_3(WMSStatus status,
+			WMSProtocolHandler protocolHandler, int x, int y) {
+		super(status, protocolHandler, x, y);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.remoteClient.ogc.request.OGCRequest#getHttpGetRequest(java.lang.String)
+	 */
+	protected String getHttpGetRequest(String onlineResource) {
+		StringBuffer req = new StringBuffer();
+		req.append(onlineResource);
+		req.append("REQUEST=GetFeatureInfo&SERVICE=WMS&");
+		req.append("QUERY_LAYERS=").append(Utilities.Vector2CS(status.getLayerNames())); 
+		req.append("&VERSION=").append(protocolHandler.getVersion()).append("&INFO_FORMAT=" + status.getInfoFormat() + "&");
+		req.append(getPartialQuery(status)).append("&I="+ x + "&J=" + y);
+		req.append("&FEATURE_COUNT=10000");
+		req.append("&EXCEPTIONS=" + getExceptionsFormat());
+		return req.toString();
+	}
+	
+	/**
+     * Gets the part of the OGC request that share GetMap and GetFeatureInfo
+     * @return String request
+     */
+    protected String getPartialQuery(WMSStatus status) {
+        StringBuffer req = new StringBuffer();
+		double coord1, coord2, coord3, coord4;
+		String epsgCode = status.getSrs();
+		if (status.isXyAxisOrder() || CrsAxisOrder.isXyAxisOrder(epsgCode)) { 
+			coord1 = status.getExtent().getMinX();
+			coord2 = status.getExtent().getMinY();
+			coord3 = status.getExtent().getMaxX();
+			coord4 = status.getExtent().getMaxY();
+		}
+		else {
+    		// use reverse coordinate order as defined by EPSG registry
+			coord1 = status.getExtent().getMinY();
+			coord2 = status.getExtent().getMinX();
+			coord3 = status.getExtent().getMaxY();
+			coord4 = status.getExtent().getMaxX();
+		}
+		
+		
+        req.append("LAYERS=" + Utilities.Vector2CS(status.getLayerNames()))
+           .append("&CRS=" + status.getSrs())
+           .append("&BBOX=" + coord1 + "," )
+           .append(coord2 + ",")
+           .append(coord3 + ",")
+           .append(coord4)
+           .append("&WIDTH=" + status.getWidth())
+           .append("&HEIGHT=" + status.getHeight())
+           .append("&FORMAT=" + status.getFormat())
+           .append("&STYLES=");
+        Vector v = status.getStyles();
+        if (v!=null && v.size()>0)
+        	req.append(Utilities.Vector2CS(v));
+        v = status.getDimensions();
+        if (v!=null && v.size()>0)
+            req.append("&" + Utilities.Vector2URLParamString(v));
+        if (status.getTransparency()) {
+            req.append("&TRANSPARENT=TRUE");
+        }
+        return req.toString();
+    }
+	
+	/**
+	 * @return the exceptions format
+	 */
+	protected String getExceptionsFormat(){
+		return CapabilitiesTags.EXCEPTIONS_1_3_0;
+	}
+	
+	
+
+}
+
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_3_0/request/WMSGetCapabilitiesRequest1_3_0.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_3_0/request/WMSGetCapabilitiesRequest1_3_0.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_3_0/request/WMSGetCapabilitiesRequest1_3_0.java	(revision 21019)
@@ -0,0 +1,55 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+ 
+package org.gvsig.remoteclient.wms.wms_1_3_0.request;
+
+import org.gvsig.remoteclient.utils.CapabilitiesTags;
+import org.gvsig.remoteclient.wms.WMSProtocolHandler;
+import org.gvsig.remoteclient.wms.WMSStatus;
+import org.gvsig.remoteclient.wms.wms_1_1_0.request.WMSGetCapabilitiesRequest1_1_0;
+
+/**
+ * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
+ */
+public class WMSGetCapabilitiesRequest1_3_0 extends WMSGetCapabilitiesRequest1_1_0{
+
+	/**
+	 * @param status
+	 * @param protocolHandler
+	 */
+	public WMSGetCapabilitiesRequest1_3_0(WMSStatus status,
+			WMSProtocolHandler protocolHandler) {
+		super(status, protocolHandler);		
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.remoteclient.wms.wms_1_1_0.request.WMSGetCapabilitiesRequest1_1_0#getExceptionsFormat()
+	 */
+	protected String getExceptionsFormat(){
+		return CapabilitiesTags.EXCEPTIONS_1_3_0;
+	}	
+
+}
+
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_3_0/WMSStyle1_3_0.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_3_0/WMSStyle1_3_0.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/wms/wms_1_3_0/WMSStyle1_3_0.java	(revision 21019)
@@ -0,0 +1,87 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+
+package org.gvsig.remoteclient.wms.wms_1_3_0;
+
+import java.io.IOException;
+
+import org.kxml2.io.KXmlParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import org.gvsig.remoteclient.utils.CapabilitiesTags;
+
+/**
+ * <p>Represents the layer style defined by the OGC Specifications for WMS 1.3.0</p>
+ * 
+ */
+public class WMSStyle1_3_0 extends org.gvsig.remoteclient.wms.WMSStyle {
+
+/**
+ * <p>Parses the STYLE TAG according with the OGC Specifications for the WMS 1.3.0</p>
+ */
+    public void parse(KXmlParser parser) throws IOException, XmlPullParserException
+    {        
+    	int currentTag;
+    	boolean end = false;
+    	
+    	parser.require(KXmlParser.START_TAG, null, CapabilitiesTags.STYLE);
+    	currentTag = parser.nextTag();
+    	
+    	while (!end) 
+    	{
+			 switch(currentTag)
+			 {
+				case KXmlParser.START_TAG:
+					if (parser.getName().compareTo(CapabilitiesTags.NAME)==0)
+					{						
+						setName(parser.nextText());						
+					}	
+					else if (parser.getName().compareTo(CapabilitiesTags.TITLE)==0)
+					{
+						setTitle(parser.nextText());
+					}
+					else if (parser.getName().compareTo(CapabilitiesTags.ABSTRACT)==0)
+					{
+						setAbstract(parser.nextText());
+					}	
+					else if (parser.getName().compareTo(CapabilitiesTags.LEGENDURL)==0)
+					{
+						parseLegendURL( parser );
+					}
+				case KXmlParser.END_TAG:
+					if (parser.getName().compareTo(CapabilitiesTags.STYLE) == 0)
+						end = true;
+					break;
+				case KXmlParser.TEXT:					
+					break;
+			 }
+			 if (!end)
+			 {
+				 currentTag = parser.nextTag();
+			 }
+    	}
+    	parser.require(KXmlParser.END_TAG, null, CapabilitiesTags.STYLE);
+    } 
+
+ }
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/epsg/CrsAxisOrder.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/epsg/CrsAxisOrder.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/epsg/CrsAxisOrder.java	(revision 21019)
@@ -0,0 +1,94 @@
+package org.gvsig.remoteclient.epsg;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.HashSet;
+
+/**
+ * <p>Utility class to get the axis order of a coordinate reference system (CRS).
+ * It should be generalized and moved to the projection API on some future
+ * version.</p>
+ * 
+ * @author Cesar Martinez Izquierdo
+ *
+ */
+public class CrsAxisOrder {
+	/*
+	 * Set containing the EPSG codes for projections using Y-X axis order.
+	 */
+	private static HashSet<String> yxAxisOrder = null;
+	
+	/**
+	 * Returns a set containing the EPSG codes for projections using Y-X axis
+	 * order.
+	 * 
+	 * @return
+	 */
+	private static HashSet<String> getYxAxisOrder() {
+		if (yxAxisOrder==null) {
+			yxAxisOrder = new HashSet();
+			try {
+				InputStream is = CrsAxisOrder.class.getClassLoader().getResourceAsStream("/axisOrder/mapaxisorder.csv");
+				if (is!=null) {
+					BufferedReader reader = new BufferedReader(new InputStreamReader(is, "ISO-8859-1"));
+					// skip the first line which contains the CSV header
+					String line = reader.readLine();
+					// read the codes
+					while ((line=reader.readLine())!=null) {
+						yxAxisOrder.add(line);
+					}
+				}
+			} catch (IOException e) {
+			}
+		}
+		return yxAxisOrder;
+	}
+	
+	/**
+	 * <p>Returns <code>true</code> if the CRS defined by the
+	 * provided EPSG code follows the XY axis order (i.e.
+	 * the first coordinate corresponds to the horizontal
+	 * axis while the second coordinate corresponds to
+	 * the vertical axis). Returns <false> if the
+	 * EPSG registry defines YX order.</p>
+	 * 
+	 * <p>Note that it will also return true for any unknown CRS</p>.
+	 * 
+	 * @param epsgCode The EPSG code of the CRS to check, as integer.
+	 * @return
+	 */
+	public static boolean isXyAxisOrder(int epsgCode) {
+		if (getYxAxisOrder().contains(Integer.toString(epsgCode))) {
+			return false;
+		}
+		return true;
+	}
+
+	/**
+	 * <p>Returns <code>true</code> if the CRS defined by the
+	 * provided EPSG code follows the XY axis order (i.e.
+	 * the first coordinate corresponds to the horizontal
+	 * axis while the second coordinate corresponds to
+	 * the vertical axis). Returns <false> if the
+	 * EPSG registry defines YX order.</p>
+	 * 
+	 * <p>Note that it will also return true for any unknown CRS</p>.
+	 * 
+	 * @param epsgCode Epsg code as string, for instance "EPSG:4326" or just
+	 * "4326".
+	 * @return
+	 */
+	public static boolean isXyAxisOrder(String epsgCode) {
+		if (epsgCode!=null) {
+			if (epsgCode.toUpperCase().startsWith("EPSG:")) {
+				epsgCode = epsgCode.substring(5);
+			}
+			if (getYxAxisOrder().contains(epsgCode)) {
+				return false;
+			}
+		}
+		return true;
+	}
+}
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/exceptions/WMSException.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/exceptions/WMSException.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/exceptions/WMSException.java	(revision 21019)
@@ -0,0 +1,82 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+package org.gvsig.remoteclient.exceptions;
+
+/**
+ * Excepci�n provocada por el WMS.
+ *
+ * @author Vicente Caballero Navarro
+ */
+public class WMSException extends Exception 
+{	
+	private String wms_message = null;
+	
+	/**
+	 *
+	 */
+	public WMSException() {
+		super();
+	}
+
+	/**
+	 * Crea WMSException.
+	 *
+	 * @param message
+	 */
+	public WMSException(String message) {
+		super(message);
+	}
+
+	/**
+	 * Crea WMSException.
+	 *
+	 * @param message
+	 * @param cause
+	 */
+	public WMSException(String message, Throwable cause) {
+		super(message, cause);
+	}
+
+	/**
+	  * Crea WMSException.
+	 *
+	 * @param cause
+	 */
+	public WMSException(Throwable cause) {
+		super(cause);
+	}
+	
+	public String getWMSMessage()
+	{
+		if (wms_message == null)
+			return "";
+		else
+			return wms_message;
+	}
+	
+	public void setWMSMessage(String mes)
+	{
+		wms_message = mes;
+	}
+}
Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/exceptions/WMSWrongSizeException.java
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/exceptions/WMSWrongSizeException.java	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient/src/main/java/org/gvsig/remoteclient/exceptions/WMSWrongSizeException.java	(revision 21019)
@@ -0,0 +1,158 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+package org.gvsig.remoteclient.exceptions;
+
+/**
+ * La petici�n al servidor era de un tama�o equivocado.
+ * Reconoce execepciones de algunos tipos:<br>
+ * <li>El server http://wms.jpl.nasa.gov/wms.cgi da estos:
+ * <pre>
+    <?xml version='1.0' encoding="UTF-8" standalone="no" ?>
+	<!DOCTYPE ServiceExceptionReport SYSTEM "http://www.digitalearth.gov/wmt/xml/exception_1_1_0.dtd ">
+	<ServiceExceptionReport version="1.1.0">
+	  <ServiceException>
+	    Requested image is too wide, max allowed width is 4096
+	  </ServiceException>
+	</ServiceExceptionReport>
+	
+	<?xml version='1.0' encoding="UTF-8" standalone="no" ?>
+	<!DOCTYPE ServiceExceptionReport SYSTEM "http://www.digitalearth.gov/wmt/xml/exception_1_1_0.dtd ">
+	<ServiceExceptionReport version="1.1.0">
+	  <ServiceException>
+	    Requested image is too tall, max allowed height is 4096
+	  </ServiceException>
+	</ServiceExceptionReport>
+ * </pre>
+ * <li>El server http://www.idee.es/wms/IDEE-Base/IDEE-Base da
+ * <pre>
+ 	<ERROR Operation="GetMap Request" status="ERROR" source="Web Map Server" description="El servidor no ha podido realizar la operacion">
+		<ERROR CODE="El tamano en pixels pedido no es valido."/>
+		<ERROR CODE="Su valor debe ser mayor que 0 y menor que el limite de descarga: anchura = 1500, altura = 1500"/>
+	</ERROR>
+ * </pre>
+ * <li>El server http://ovc.catastro.meh.es/Cartografia/WMS/ServidorWMS.aspx da
+ * <pre>
+ 	<ServiceExceptionReport version="1.1.1">
+-
+	<ServiceException code="InvalidFormat">
+
+Par�metros erroneos:
+prefijo = 
+mapa =  0
+formato = IMAGE/JPEG
+XMin =  1.1578804698593
+YMin =  53.5852110737936
+XMax =  10.3
+YMax =  53.8000038968219
+AnchoPixels =  64
+AltoPixels =  5023
+Transparente = TRUE
+Descripci�n error:
+AltoPixels > 2000
+</ServiceException>
+</ServiceExceptionReport>
+ * </pre>
+ * 
+ * <pre>
+ 	<?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
+<!DOCTYPE ServiceExceptionReport SYSTEM "http://schemas.opengeospatial.net/wms/1.1.1/exception_1_1_1.dtd">
+<ServiceExceptionReport version="1.1.1">
+<ServiceException>
+msWMSLoadGetMapParams(): WMS server error. Image size out of range, WIDTH and HEIGHT must be between 1 and 2048 pixels.
+</ServiceException>
+</ServiceExceptionReport>
+
+ * </pre>
+ * 
+ */
+public class WMSWrongSizeException extends WMSException 
+{	
+	private int height = -1;
+	private int width = -1;
+	
+	/**
+	 *
+	 */
+	public WMSWrongSizeException() {
+		super();
+	}
+
+	/**
+	 * Crea WMSException.
+	 *
+	 * @param message
+	 */
+	public WMSWrongSizeException(String message) {
+		super(message);
+	}
+
+	/**
+	 * Crea WMSException.
+	 *
+	 * @param message
+	 * @param cause
+	 */
+	public WMSWrongSizeException(String message, Throwable cause) {
+		super(message, cause);
+	}
+
+	/**
+	  * Crea WMSException.
+	 *
+	 * @param cause
+	 */
+	public WMSWrongSizeException(Throwable cause) {
+		super(cause);
+	}
+	
+	public int getWidth()
+	{
+		return width; 
+	}
+	public int getHeight()
+	{
+		return height;
+	}
+	public void setWidth(int w)
+	{
+		width =w;
+	}
+	public void setHeight(int h)
+	{
+		height =h;
+	}
+	
+	/**
+	 * Checks if the argument is a WrongSizeError message, in this
+	 * case throws a WMSWrongSizeException
+	 * @param errorMsg El mensaje de error que pasa el server.
+	 * @throws WMSException
+	 */
+	public static void check(String errorMsg) throws WMSException 
+	{
+		//TODO:
+		//check the errorMsg to see if it matches with one of the 
+		// well known string error messages.
+	}
+}

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/org.gvsig.raster.wms.remoteclient
___________________________________________________________________
Added: svn:ignore
   + target


Index: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/pom.xml
===================================================================
--- org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/pom.xml	(revision 0)
+++ org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/pom.xml	(revision 21019)
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>org.gvsig.raster.wms</artifactId>
+	<packaging>pom</packaging>
+	<version>2.2.231</version>
+	<name>${project.artifactId}</name>
+	<description>wms client</description>
+	<inceptionYear>2011</inceptionYear>
+	
+	<parent>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.desktop</artifactId>
+      <version>2.0.425</version>
+  </parent>
+
+        <properties>
+            <!-- El plugin versions:use-latest-versions falla con scope import -->
+            <!-- asi que toca usar el versions:update-properties que si que funciona -->
+            <org.gvsig.raster.version>2.2.248</org.gvsig.raster.version>
+        </properties>
+    
+    <repositories>
+        <repository>
+            <id>gvsig-public-http-repository</id>
+            <name>gvSIG maven public HTTP repository</name>
+            <url>http://devel.gvsig.org/m2repo/j2se</url>
+            <releases>
+                <enabled>true</enabled>
+                <updatePolicy>daily</updatePolicy>
+                <checksumPolicy>warn</checksumPolicy>
+            </releases>
+            <snapshots>
+                <enabled>true</enabled>
+                <updatePolicy>daily</updatePolicy>
+                <checksumPolicy>warn</checksumPolicy>
+            </snapshots>
+        </repository>
+    </repositories>
+    
+    <scm>
+        <connection>scm:svn:https://devel.gvsig.org/svn/gvsig-raster/org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231</connection>
+        <developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-raster/org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231</developerConnection>
+        <url>https://devel.gvsig.org/redmine/projects/gvsig-raster/repository/show/org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231</url>
+    </scm>
+    
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-release-plugin</artifactId>
+                <configuration>
+                    <tagBase>https://devel.gvsig.org/svn/gvsig-raster/org.gvsig.raster.wms/tags/</tagBase>
+                    <goals>deploy</goals>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+    
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.gvsig</groupId>
+                <artifactId>org.gvsig.raster</artifactId>
+                <version>${org.gvsig.raster.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+
+			<dependency>
+				<groupId>org.gvsig</groupId>
+				<artifactId>org.gvsig.raster.wms.io</artifactId>
+				<version>2.2.231</version>
+			</dependency>
+			<dependency>
+				<groupId>org.gvsig</groupId>
+				<artifactId>org.gvsig.raster.wms.remoteclient</artifactId>
+				<version>2.2.231</version>
+			</dependency>
+			<dependency>
+				<groupId>org.gvsig</groupId>
+				<artifactId>org.gvsig.raster.wms.app.wmsclient</artifactId>
+				<version>2.2.231</version>
+			</dependency>
+
+        </dependencies>
+    </dependencyManagement>
+
+    <modules>
+        <module>org.gvsig.raster.wms.remoteclient</module>
+        <module>org.gvsig.raster.wms.io</module>
+        <module>org.gvsig.raster.wms.app.wmsclient</module>
+    </modules>
+</project>
+

Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.raster.wms/tags/org.gvsig.raster.wms-2.2.231
___________________________________________________________________
Added: svn:ignore
   + .project
.settings
.pom.xml.swp


