Revision 3665 trunk/libraries/libRemoteServices/src/org/gvsig/remoteClient/wms/WMSProtocolHandlerFactory.java

View differences:

WMSProtocolHandlerFactory.java
4 4
import java.io.IOException;
5 5
import java.net.URL;
6 6
import java.util.ArrayList;
7
import java.util.Iterator;
8 7

  
9 8
import org.gvsig.remoteClient.wms.wms_1_1_1.WMSProtocolHandler1_1_1;
10 9

  
......
42 41
     * @throws IllegalAccessException
43 42
     * @throws InstantiationException
44 43
     * 
44
     * @deprecated
45 45
     */
46
    private static WMSProtocolHandler getDriver(String version, Iterator clients) throws InstantiationException, IllegalAccessException {
47
        while (clients.hasNext()) {
48
            WMSProtocolHandler client = (WMSProtocolHandler) ((Class)clients.next()).newInstance();
49
            int ret = version.compareTo(client.getVersion());
46
//    private static WMSProtocolHandler getDriver(String version, Iterator clients) throws InstantiationException, IllegalAccessException {
47
//        while (clients.hasNext()) {
48
//            WMSProtocolHandler client = (WMSProtocolHandler) ((Class)clients.next()).newInstance();
49
//            int ret = version.compareTo(client.getVersion());
50
//
51
//            if (ret >= 0) {
52
//                return client;
53
//            }
54
//        }
55
//        return null;
56
//    }
50 57

  
51
            if (ret >= 0) {
52
                return client;
53
            }
54
        }
55
        return null;
56
    }
57

  
58 58
    /**
59 59
     * Establece la versi?n con la que se comunicar? con el servidor y devuelve
60 60
     * el objeto Capabilities obtenido con dicha versi?n

Also available in: Unified diff