|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.esri.adf.web.data.GISResource
com.esri.adf.web.wms.data.WMSMapResource
public class WMSMapResource
The WMSMapResource represents a GISResource
for WMS Services.
Field Summary |
---|
Fields inherited from class com.esri.adf.web.data.GISResource |
---|
alias, context, defaultSpatialReference, functionalities, hasFailedFunctionalities, init |
Constructor Summary | |
---|---|
WMSMapResource()
|
Method Summary | |
---|---|
String |
getAlias()
Returns a reader friendly name for this resource. |
String |
getImageFormat(String format)
Convenient method to return the WMS Service specific map image format from the available list of WMS Service supported formats. |
String |
getPassword()
Returns the password to connect authenticated WMS service. |
int |
getSpatialReferenceId()
Returns the user defined spatial reference id. |
String |
getUserName()
Returns the user name to connect authenticated WMS service. |
com.esri.wms.client.Map |
getWmsMap()
|
com.esri.wms.client.ServerConnection |
getWmsServerConnection()
|
String |
getWmsURL()
Returns the WMS Resource Web Access URL String. |
String |
getWmsVersion()
Returns the constant defining the current WMS version. |
void |
init(WebContext webContext)
This method is called by the WebContext to initialize the resource. |
boolean |
isPasswordEncrypted()
Indicates whether the given password is encrypted or not. |
void |
setPassword(String password)
Sets the password to connect the authenticate WMS service. |
void |
setPasswordEncrypted(boolean passwordEncrypted)
Sets to true if the given password is encrpted. |
void |
setSpatialReferenceId(int spatialReferenceId)
Set the spatial reference id if you want this resource to use other than the default spatial reference. |
void |
setUserName(String userName)
Sets the user name to connect the authenticate WMS service. |
void |
setWmsURL(String wmsURL)
Sets the WMS Resource Web Access URL String. |
void |
setWmsVersion(String wmsVersion)
Sets the version of WMS. |
Methods inherited from class com.esri.adf.web.data.GISResource |
---|
activate, addFunctionality, destroy, getDefaultSpatialReference, getFunctionalities, getFunctionality, getWebContext, passivate, setAlias, setFunctionalities |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WMSMapResource()
Method Detail |
---|
public void init(WebContext webContext)
GISResource
This method is called by the WebContext
to initialize the resource. This is typically called when the
context itself is initialized or when users add a new resource to the context by using the
WebContext.addResource(String, GISResource)
method. A GISResource
is usable
only after this method has been called.
This method iterates through all its supported GISFunctionality
s and calls the
GISFunctionality.initFunctionality(GISResource)
on them all.
Sub-classes that want to do custom initialization should override this method and make the super
call
first before doing the custom stuff:
public void init(WebContext context) { super.init(context); myInit(); }
init
in interface WebContextInitialize
init
in class GISResource
webContext
- the WebContext
that maintains a reference to this resourceWebContextInitialize.init(com.esri.adf.web.data.WebContext)
,
GISFunctionality.initFunctionality(GISResource)
,
WebContext.init(WebContext)
,
WebContext.addResource(String, GISResource)
public String getAlias()
GISResource
Returns a reader friendly name for this resource.
It is a good practice for users to explicitly set an alias when the resource is created programmatically or declaratively. Resource providers should provide an auto-generated alias anyway in case users don't explicitly set an alias themselves.
getAlias
in class GISResource
public com.esri.wms.client.ServerConnection getWmsServerConnection()
public com.esri.wms.client.Map getWmsMap()
public String getWmsURL()
public void setWmsURL(String wmsURL)
For Example, this.wmsResource.setWMSURL("http://localhost:8399/arcgis/services/USA/MapServer/WMSServer"); [OR] <managed-bean> <managed-bean-name>resource</managed-bean-name> <managed-bean-class>com.esri.adf.web.wms.data.WMSMapResource</managed-bean-class> <managed-bean-scope>none</managed-bean-scope> <managed-property> <property-name>wmsURL</property-name> <value>http://srinagar:8399/arcgis/services/USAAlbersConic/MapServer/WMSServer</value> </managed-property> <managed-property> <property-name>functionalities</property-name> <map-entries> <map-entry> <key>map</key> <value>#{wmsMap}</value> </map-entry> <map-entry> <key>toc</key> <value>#{wmsToc}</value> </map-entry> <map-entry> <key>overview</key> <value>#{wmsOverview}</value> </map-entry> <map-entry> <key>query</key> <value>#{wmsQuery}</value> </map-entry> </map-entries> </managed-property> <managed-property> <property-name>spatialReferenceId</property-name> <value>102008</value> </managed-property> </managed-bean>
wmsURL
- the URL Stringpublic String getUserName()
public void setUserName(String userName)
userName
- the user namepublic String getPassword()
public void setPassword(String password)
password
- the password to connect the authenticate WMS servicepublic boolean isPasswordEncrypted()
public void setPasswordEncrypted(boolean passwordEncrypted)
passwordEncrypted
- true if password is encrpted; false otherwisepublic String getWmsVersion()
public void setWmsVersion(String wmsVersion)
1. com.esri.wms.client.ServerConnection.SPEC_VER_1_0_0 = "1.0.0" 2. com.esri.wms.client.ServerConnection.SPEC_VER_1_1_0 = "1.1.0" 3. com.esri.wms.client.ServerConnection.SPEC_VER_1_1_1 = "1.1.1" 4. com.esri.wms.client.ServerConnection.SPEC_VER_1_3_0 = "1.3.0"
wmsVersion
- WMS version constantpublic int getSpatialReferenceId()
public void setSpatialReferenceId(int spatialReferenceId)
spatialReferenceId
- the spatial reference idWMSUtil.getWMSSpatialReference(java.util.List, int)
,
Map.getDefaultSpatialReference()
public String getImageFormat(String format)
For example, if the WMS Service supported formats are, image/bmp, image/jpeg, image/tiff, image/png, image/gif and image/svg+xml then specifying "PNG" will return "image/png" Also, unless implicitly declared by server, otherwise "PNG8", "PNG24", "PNG32" will be treated as "image/png" For example, - if the WMS server supports image/png32, specifying "PNG32" will return "image/png32" - if the WMS server supports image/png, specifying "PNG32" will return "image/png"
format
- the user defined format
getWmsServerConnection()
,
ServerConnection.getMapFormats()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |