com.esri.adf.web.ags.data.edit.util
Class EditWebUtil

java.lang.Object
  extended by com.esri.adf.web.ags.data.edit.util.EditWebUtil

public class EditWebUtil
extends Object

A helper class for ADF related functions.


Constructor Summary
EditWebUtil()
           
 
Method Summary
static com.esri.arcgis.carto.IMap getIMap(AGSLocalMapResource resource)
          Gets IMap from a given resource.
static AGSLocalMapResource getLocalMapResource(String resourceID, WebContext wContext)
          Retrieves the AGSLocalMapResource from the web context.
static void logSevereMessage(String message, Throwable e)
          Logs severe message to log system.
static void showVertices(com.esri.arcgis.geodatabase.IFeature feature, WebGraphics graphic, WebSimpleMarkerSymbol sms, WebSpatialReference webref, List<GraphicElement> stock, com.esri.arcgis.server.IServerContext ctx)
          Shows vertices of the selected features.
static com.esri.arcgis.geometry.IEnvelope toEnvelope(com.esri.arcgisws.EnvelopeN ext, com.esri.arcgis.server.IServerContext ctx)
          Converts the WebExtent to an Envelope.
static com.esri.arcgis.geometry.IEnvelope toEnvelope(WebExtent ext, com.esri.arcgis.server.IServerContext ctx)
          Converts the WebExtent to an Envelope.
static com.esri.arcgis.geometry.IGeometry toIGeometry(WebPoint pt, com.esri.arcgis.server.IServerContext ctx)
          Converts a web point to IGeometry.
static com.esri.arcgis.geometry.IGeometry toIGeometry(WebPolygon wPolygon, com.esri.arcgis.server.IServerContext ctx)
          Converts a web polygon to an IGeometry.
static com.esri.arcgis.geometry.IGeometry toIGeometry(WebPolyline wLine, com.esri.arcgis.server.IServerContext ctx)
          Converts a web line to an IGeometry.
static com.esri.arcgis.geometry.ILine toILine(WebPolyline wline, com.esri.arcgis.server.IServerContext ctx)
          Converts a ILine from a web line.
static com.esri.arcgis.geometry.ISpatialReference toISpatialReference(com.esri.arcgisws.SpatialReference sref, com.esri.arcgis.server.IServerContext ctx)
          Converts WebSpatialReference to ISpatialReference.
static com.esri.arcgis.geometry.ISpatialReference toISpatialReference(WebSpatialReference ref, com.esri.arcgis.server.IServerContext ctx)
          Converts WebSpatialReference to ISpatialReference.
static String toLocalMessage(String message)
          Converts the message to a localized message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EditWebUtil

public EditWebUtil()
Method Detail

toEnvelope

public static com.esri.arcgis.geometry.IEnvelope toEnvelope(WebExtent ext,
                                                            com.esri.arcgis.server.IServerContext ctx)
                                                     throws Exception
Converts the WebExtent to an Envelope.

Parameters:
ctx - set to null to use ArcObject.
Throws:
Exception

toISpatialReference

public static com.esri.arcgis.geometry.ISpatialReference toISpatialReference(WebSpatialReference ref,
                                                                             com.esri.arcgis.server.IServerContext ctx)
Converts WebSpatialReference to ISpatialReference.

Parameters:
ref - the WebSpatialReference to convert
Returns:
the converted ISpatialReference.

toIGeometry

public static com.esri.arcgis.geometry.IGeometry toIGeometry(WebPolygon wPolygon,
                                                             com.esri.arcgis.server.IServerContext ctx)
                                                      throws Exception
Converts a web polygon to an IGeometry.

Parameters:
wPolygon - the polygon to convert
Throws:
Exception

toILine

public static com.esri.arcgis.geometry.ILine toILine(WebPolyline wline,
                                                     com.esri.arcgis.server.IServerContext ctx)
                                              throws Exception
Converts a ILine from a web line.

Parameters:
ctx - current resource
wline - source
Returns:
converted ILine
Throws:
Exception

toIGeometry

public static com.esri.arcgis.geometry.IGeometry toIGeometry(WebPolyline wLine,
                                                             com.esri.arcgis.server.IServerContext ctx)
                                                      throws Exception
Converts a web line to an IGeometry.

Parameters:
wLine - the line to convert.
Throws:
Exception

toIGeometry

public static com.esri.arcgis.geometry.IGeometry toIGeometry(WebPoint pt,
                                                             com.esri.arcgis.server.IServerContext ctx)
                                                      throws Exception
Converts a web point to IGeometry.

Parameters:
pt - the point to convert
Throws:
Exception

showVertices

public static void showVertices(com.esri.arcgis.geodatabase.IFeature feature,
                                WebGraphics graphic,
                                WebSimpleMarkerSymbol sms,
                                WebSpatialReference webref,
                                List<GraphicElement> stock,
                                com.esri.arcgis.server.IServerContext ctx)
                         throws Exception
Shows vertices of the selected features.

Parameters:
feature - the selected feature.
graphic - web graphics to draw on.
sms - the marker symbol.
webref - the target spatial reference.
stock - the created vertices points.
Throws:
Exception

toEnvelope

public static com.esri.arcgis.geometry.IEnvelope toEnvelope(com.esri.arcgisws.EnvelopeN ext,
                                                            com.esri.arcgis.server.IServerContext ctx)
                                                     throws Exception
Converts the WebExtent to an Envelope.

Parameters:
ctx - set to null to use ArcObject.
Throws:
Exception

toISpatialReference

public static com.esri.arcgis.geometry.ISpatialReference toISpatialReference(com.esri.arcgisws.SpatialReference sref,
                                                                             com.esri.arcgis.server.IServerContext ctx)
Converts WebSpatialReference to ISpatialReference.

Parameters:
sref - the WebSpatialReference to convert
ctx -
Returns:
the converted ISpatialReference.

logSevereMessage

public static void logSevereMessage(String message,
                                    Throwable e)
Logs severe message to log system.


toLocalMessage

public static String toLocalMessage(String message)
Converts the message to a localized message.

Parameters:
message -
Returns:
the localized message.

getLocalMapResource

public static AGSLocalMapResource getLocalMapResource(String resourceID,
                                                      WebContext wContext)
Retrieves the AGSLocalMapResource from the web context.

Parameters:
resourceID - the resource id, or null.
wContext - the current web context.
Returns:
the resource or null if not any.

getIMap

public static com.esri.arcgis.carto.IMap getIMap(AGSLocalMapResource resource)
                                          throws com.esri.arcgis.interop.AutomationException,
                                                 IOException
Gets IMap from a given resource.

Parameters:
resource - the map resource.
Returns:
the IMap instance.
Throws:
com.esri.arcgis.interop.AutomationException - If the ArcObject component throws an exception.
IOException - If there are interop problems.