Revision 32538 branches/v2_0_0_prep/libraries/org.gvsig.arcims/src/org/gvsig/remoteclient/arcims/ArcImsClient.java
ArcImsClient.java | ||
---|---|---|
44 | 44 |
* Abstract class the with the necessary logic to connect to a ArcIms and |
45 | 45 |
* interpretate the data. |
46 | 46 |
* |
47 |
* @author vsanjaime version 2.0 |
|
48 |
* |
|
47 | 49 |
*/ |
48 | 50 |
public abstract class ArcImsClient extends RasterClient { |
49 | 51 |
|
... | ... | |
64 | 66 |
|
65 | 67 |
/** |
66 | 68 |
* Constructor |
67 |
* @param host
|
|
68 |
* @param service |
|
69 |
* @param serverURL
|
|
70 |
* @param serviceName
|
|
69 | 71 |
* @param serviceType |
70 | 72 |
*/ |
71 |
public ArcImsClient(String host, String service, String serviceType) {
|
|
73 |
public ArcImsClient(String serverURL, String serviceName, String serviceType) {
|
|
72 | 74 |
|
73 |
this.setHost(host); |
|
74 |
this.setServiceName(service); |
|
75 |
|
|
75 |
// add server and service name |
|
76 |
this.setHost(serverURL); |
|
77 |
this.setServiceName(serviceName); |
|
78 |
// instance ArcImsHandler |
|
76 | 79 |
try { |
77 | 80 |
this.handler = ArcImsProtocolHandlerFactory.negotiate(serviceType); |
78 |
this.handler.setHost(host);
|
|
79 |
this.handler.setService(service); |
|
81 |
this.handler.setHost(serverURL);
|
|
82 |
this.handler.setService(serviceName);
|
|
80 | 83 |
this.handler.getServiceInformation().setType(serviceType); |
81 | 84 |
} catch (Exception e) { |
82 | 85 |
logger.error(e.getMessage(), e); |
... | ... | |
91 | 94 |
* |
92 | 95 |
*/ |
93 | 96 |
public void getCapabilities(ArcImsStatus status) throws ArcImsException { |
94 |
|
|
97 |
// get capabilities |
|
95 | 98 |
this.handler.getCapabilities(status); |
99 |
// layers availables |
|
96 | 100 |
this.layers = this.handler.layers; |
97 | 101 |
} |
98 | 102 |
|
... | ... | |
106 | 110 |
*/ |
107 | 111 |
public String getFeatureInfo(ArcImsStatus status, int x, int y, |
108 | 112 |
int featureCount) throws ArcImsException { |
113 |
// get info of the one feature |
|
109 | 114 |
return this.handler.getElementInfo(status, x, y, featureCount); |
110 | 115 |
} |
111 | 116 |
|
... | ... | |
157 | 162 |
* Gets the Service information included in the Capabilities |
158 | 163 |
* */ |
159 | 164 |
public ServiceInformation getServiceInformation() { |
165 |
// return info of the service from capabilities |
|
160 | 166 |
return this.handler.getServiceInformation(); |
161 | 167 |
} |
162 | 168 |
|
Also available in: Unified diff