Revision 2992

View differences:

trunk/libraries/libRemoteServices/src/org/gvsig/remoteClient/driver/wms/wms1_1_1/WMSDriver1_1_1.java
17 17
*/
18 18
public class WMSDriver1_1_1 extends WMSDriver
19 19
{
20
	public String getCapabilities(GetCapabilitiesRequest req)
20
	public WMSCapabilities getCapabilities(GetCapabilitiesRequest req)
21 21
    throws UnsupportedVersionException, IllegalStateException, IOException
22 22
    {
23
		return "";
23
		return null;
24 24
    }
25 25

  
26 26
	public byte[] getMap(GetMapRequest req)
trunk/libraries/libRemoteServices/src/org/gvsig/remoteClient/driver/wms/WMSDriver.java
56 56
 * Particular cases will be implemented
57 57
 * @author Laura Diaz
58 58
*/
59
public abstract class WMSDriver extends RemoteServiceDriver 
59
public abstract class WMSDriver //extends RemoteServiceDriver 
60 60
{	
61 61
	
62 62
	public abstract WMSCapabilities getCapabilities()
63 63
    throws UnsupportedVersionException, IllegalStateException, IOException;
64 64
    
65
	public abstract String[] getLayerNames();
65
	//The layer names are available from:
66
	//getCapabilitites().getMapComposition().getLayerNames()
67
	//public abstract String[] getLayerNames();
66 68
	
67
    public abstract String getCapabilities(GetCapabilitiesRequest req)
69
    public abstract WMSCapabilities getCapabilities(GetCapabilitiesRequest req)
68 70
        throws UnsupportedVersionException, IllegalStateException, IOException;
69 71

  
70 72
    public abstract byte[] getMap()
......
79 81
    public abstract byte[] getFeatureInfo(GetFeatureInfoRequest req)
80 82
        throws WMSException, IOException, NoSuchFieldException;
81 83

  
82
	public abstract ArrayList getFormats();
84
    
85
	//The formats are available from:
86
	//getCapabilitites().getMapComposition().getFormats()	
87
	//public abstract ArrayList getFormats();
83 88
	            
84 89
}
trunk/libraries/libRemoteServices/src/org/gvsig/remoteClient/driver/wms/wms1_1_0/WMSDriver1_1_0.java
2 2

  
3 3
import java.io.IOException;
4 4

  
5
import org.gvsig.remoteClient.descriptor.WMSCapabilities;
5 6
import org.gvsig.remoteClient.driver.wms.WMSDriver;
6 7
import org.gvsig.remoteClient.exception.UnsupportedVersionException;
7 8
import org.gvsig.remoteClient.exception.WMSException;
......
10 11
import org.gvsig.remoteClient.request.wms.GetMapRequest;
11 12

  
12 13

  
13
public class WMSDriver1_1_0 implements WMSDriver 
14
public class WMSDriver1_1_0 extends WMSDriver 
14 15
{
15
	public String getCapabilities(GetCapabilitiesRequest req)
16
	public WMSCapabilities getCapabilities(GetCapabilitiesRequest req)
16 17
    throws UnsupportedVersionException, IllegalStateException, IOException
17 18
    {
18
		return "";
19
		return null;
19 20
    }
20 21

  
21 22
	public byte[] getMap(GetMapRequest req)
......
29 30
	{
30 31
		return null;
31 32
	}
33

  
34
	public WMSCapabilities getCapabilities() throws UnsupportedVersionException, IllegalStateException, IOException {
35
		// TODO Auto-generated method stub
36
		return null;
37
	}
38

  
39
	public byte[] getMap() throws WMSException, IOException, NoSuchFieldException {
40
		// TODO Auto-generated method stub
41
		return null;
42
	}
43

  
44
	public byte[] getFeatureInfo() throws WMSException, IOException, NoSuchFieldException {
45
		// TODO Auto-generated method stub
46
		return null;
47
	}
32 48
}
trunk/libraries/libRemoteServices/src/org/gvsig/remoteClient/descriptor/MapComposition.java
93 93
    return null;
94 94
  }
95 95

  
96
  public String[] getLayerNames()
97
  {
98
	 String[] names;
99
	 names = (String[])layers.values().toArray();
100
	 
101
	 //TODO: Watch out!!!!! this will not work as long as the values
102
	 // are the layer objects and not the names.
103
	 // Iterate through the Collection and extract the names.?????
104
	 return names;
105
  }
96 106

  
97 107
  /**
98 108
   * checks if there is a layer in the mapComposition with this name
trunk/libraries/libRemoteServices/src/org/gvsig/remoteClient/descriptor/ServiceInformation.java
1 1
package org.gvsig.remoteClient.descriptor;
2 2

  
3
import java.util.ArrayList;
4

  
3 5
/**
4 6
  * Class for storing all the general information of this Service
5 7
  * @author Laura Diaz
......
27 29
  static String m_phone = new String();
28 30
  static String m_fax =  new String();
29 31
  static String m_email = new String();
32
  
33
  private ArrayList formats = null;
30 34

  
35
  // TODO: Add all the supported formats...
31 36
  
32
  // TODO: Add all the supported formats...
37
  public ArrayList getFormats()
38
  {
39
	 return formats;
40
  }
41
  
33 42
 /**
34 43
  * returns the name of this server
35 44
  */
trunk/libraries/libRemoteServices/src/org/gvsig/remoteClient/WMSClient.java
135 135
	 * @return ArrayList
136 136
	 */
137 137
	public ArrayList getFormats(){
138
		return wms.getFormats();
139
		//return null;//wms.getCapabilities().getFormats();
138
		ArrayList formats = null;
139
		try
140
		{
141
			formats = wms.getCapabilities().getServiceInformation().getFormats();
142
			//return null;//wms.getCapabilities().getFormats();
143
		}
144
		catch(Exception e){}
145
		
146
		return formats;
140 147
	}
141 148
	
142 149
	public String[] getLayerNames(){
143
		return wms.getLayerNames();
144
		//return null;
150
		String[] names = null;		
151
		try
152
		{
153
			names = wms.getCapabilities().getMapComposition().getLayerNames(); 
154
		}
155
		catch(Exception e){}
156
		return names;
145 157
	}
146 158
	
147 159
	/**
trunk/libraries/libRemoteServices/.classpath
3 3
	<classpathentry kind="src" path="src"/>
4 4
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
5 5
	<classpathentry combineaccessrules="false" kind="src" path="/FMap 03"/>
6
	<classpathentry sourcepath="/DriverManager/src" kind="lib" path="/FMap 03/lib/driver-manager-1.0.jar"/>
6 7
	<classpathentry kind="output" path="bin"/>
7 8
</classpath>

Also available in: Unified diff