com.esri.adf.web.ags.data
Class AGSNAFunctionality

java.lang.Object
  extended by com.esri.adf.web.ags.data.AGSNAFunctionality
All Implemented Interfaces:
GISFunctionality, Serializable

public class AGSNAFunctionality
extends Object
implements GISFunctionality, Serializable

Represents the Network Analyst routing capability of the ArcGIS Server.

See Also:
Serialized Form

Field Summary
protected  GraphicElement barrierElement
          Stores the Barrier Geometry and Symbol.
static String FUNCTIONALITY_NAME
          The name used to identify the Network Analyst functionality.
protected  GraphicElement routeElement
          Stores the Route Geometry and Symbol.
protected  GraphicElement stopsElement
          Stores the Stop Geometry and Symbol.
static double ZOOM_TO_FACTOR
          The default zoom to factor.
 
Constructor Summary
AGSNAFunctionality()
           
 
Method Summary
 void addBarrier(WebPoint point)
          Adds the barrier based on the specified point.
 void addStop(String stopName, WebPoint point, String routeName)
          Adds a stop at the specified location to the route layer.
 void addStop(WebPoint point)
          Adds the stop in route network analyst layer based on the specified point
 void addStop(WebPoint point, String routeName)
          Adds the stop in route network analyst layer based on the specified point and route name
 void addStops(ArrayList<? extends WebPoint> routeStops, String routeName)
          Adds the list of stops to the network analyst routing layer.
 void addStops(ArrayList<String> stopNames, ArrayList<? extends WebPoint> routeStops, String routeName)
          Adds the list of stops and stop names to the route layer.
 void clearBarriers()
          Clear the Barrier(s) from the WebGraphics Layer as well as from the route parameter.
 void clearRoute()
          Clear the Route from the WebGraphics Layer.
 void clearStops()
          Clear the Stop(s) from the WebGraphics Layer as well as from the route parameter.
 void destroyFunctionality()
           The cleanup chores (such as releasing held resources) for the functionality must be performed in this method.
 WebTrueTypeMarkerSymbol getBarrierSymbol()
          Returns the default barrier symbol associated with this functionality.
 String getDefaultNALayerName()
          Returns the default network analyst layer name associated with this functionality.
 GISResource getResource()
           Returns the GISResource associated with this functionality.
 com.esri.arcgisws.NAServerRouteParams getRouteParams()
          Returns the associated route parameters with this functionality.
 WebSimpleLineSymbol getRouteSymbol()
          Returns the default route symbol associated with this functionality.
 WebTrueTypeMarkerSymbol getStopSymbol()
          Returns the default stop symbol associated with this functionality.
 void initFunctionality(GISResource resource)
          Initializes an instance of the network analyst functionality for this resource.
 void setBarrierSymbol(WebTrueTypeMarkerSymbol barrierSymbol)
          Sets the default barrier symbol which is used for drawing barrier(s) in the map as a Web Graphics.
 void setDefaultNALayerName(String defaultNALayerName)
          Sets the default network analyst layer name in which the routing analysis should be performed.
 void setRouteSymbol(WebSimpleLineSymbol routeSymbol)
          Sets the default route symbol which is used for drawing route(s) in the map as a Web Graphics.
 void setStopSymbol(WebTrueTypeMarkerSymbol stopSymbol)
          Sets the default stop symbol which is used for drawing stop(s) in the map as a Web Graphics.
 AGSTraversalResult[] solve()
          Perform network routing analysis based on the input solve parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FUNCTIONALITY_NAME

public static final String FUNCTIONALITY_NAME
The name used to identify the Network Analyst functionality.

See Also:
Constant Field Values

ZOOM_TO_FACTOR

public static final double ZOOM_TO_FACTOR
The default zoom to factor. The map will be zoomed in reference to the scale of this result.

See Also:
Constant Field Values

routeElement

protected GraphicElement routeElement
Stores the Route Geometry and Symbol.


stopsElement

protected GraphicElement stopsElement
Stores the Stop Geometry and Symbol.


barrierElement

protected GraphicElement barrierElement
Stores the Barrier Geometry and Symbol.

Constructor Detail

AGSNAFunctionality

public AGSNAFunctionality()
Method Detail

initFunctionality

public void initFunctionality(GISResource resource)
Initializes an instance of the network analyst functionality for this resource.

Specified by:
initFunctionality in interface GISFunctionality
Parameters:
resource - the GISResource that this functionality supports
See Also:
GISResource.init(WebContext)

getResource

public GISResource getResource()
Description copied from interface: GISFunctionality

Returns the GISResource associated with this functionality.

The resource passed to GISFunctionality.initFunctionality(GISResource) is maintained as a class variable and is accessible through this method.

Specified by:
getResource in interface GISFunctionality
Returns:
the GISResource associated with this functionality

destroyFunctionality

public void destroyFunctionality()
Description copied from interface: GISFunctionality

The cleanup chores (such as releasing held resources) for the functionality must be performed in this method. This method is called by the GISResource when the resource itself is being destroyed.

The functionality is no longer usable after this method has been called.

Specified by:
destroyFunctionality in interface GISFunctionality
See Also:
GISResource.destroy()

addStop

public void addStop(WebPoint point)
Adds the stop in route network analyst layer based on the specified point

Parameters:
point - the point geometry in which the stop to be added.

addStop

public void addStop(WebPoint point,
                    String routeName)
Adds the stop in route network analyst layer based on the specified point and route name

Parameters:
point - the point geometry in which the stop to be added.
routeName - the route name.

addStop

public void addStop(String stopName,
                    WebPoint point,
                    String routeName)
Adds a stop at the specified location to the route layer.

Parameters:
stopName - the stop name.
point - the point geometry in which the stop to be added.
routeName - the name of the route.

addStops

public void addStops(ArrayList<? extends WebPoint> routeStops,
                     String routeName)
Adds the list of stops to the network analyst routing layer.

Parameters:
routeStops - the list of WebPoint objects representing stops.
routeName - the route name.

addStops

public void addStops(ArrayList<String> stopNames,
                     ArrayList<? extends WebPoint> routeStops,
                     String routeName)
Adds the list of stops and stop names to the route layer.

Parameters:
stopNames - the string list of stop names.
routeStops - the list of WebPoint objects representing stops.
routeName - the route name.

addBarrier

public void addBarrier(WebPoint point)
Adds the barrier based on the specified point.

Parameters:
point - the point geometry.

clearStops

public void clearStops()
Clear the Stop(s) from the WebGraphics Layer as well as from the route parameter.


clearBarriers

public void clearBarriers()
Clear the Barrier(s) from the WebGraphics Layer as well as from the route parameter.


clearRoute

public void clearRoute()
Clear the Route from the WebGraphics Layer.


solve

public AGSTraversalResult[] solve()
Perform network routing analysis based on the input solve parameters.

Returns:
the traversal result(s).

setStopSymbol

public void setStopSymbol(WebTrueTypeMarkerSymbol stopSymbol)
Sets the default stop symbol which is used for drawing stop(s) in the map as a Web Graphics.

Parameters:
stopSymbol - the default stop symbol.

setBarrierSymbol

public void setBarrierSymbol(WebTrueTypeMarkerSymbol barrierSymbol)
Sets the default barrier symbol which is used for drawing barrier(s) in the map as a Web Graphics.

Parameters:
barrierSymbol - the default barrier symbol.

setRouteSymbol

public void setRouteSymbol(WebSimpleLineSymbol routeSymbol)
Sets the default route symbol which is used for drawing route(s) in the map as a Web Graphics.

Parameters:
routeSymbol - the default route symbol.

setDefaultNALayerName

public void setDefaultNALayerName(String defaultNALayerName)
Sets the default network analyst layer name in which the routing analysis should be performed.

Parameters:
defaultNALayerName - the default network analyst layer name.

getStopSymbol

public WebTrueTypeMarkerSymbol getStopSymbol()
Returns the default stop symbol associated with this functionality.

Returns:
the default stop symbol

getBarrierSymbol

public WebTrueTypeMarkerSymbol getBarrierSymbol()
Returns the default barrier symbol associated with this functionality.

Returns:
the default barrier symbol

getRouteSymbol

public WebSimpleLineSymbol getRouteSymbol()
Returns the default route symbol associated with this functionality.

Returns:
the default route symbol

getDefaultNALayerName

public String getDefaultNALayerName()
Returns the default network analyst layer name associated with this functionality.

Returns:
the network analyst layer name

getRouteParams

public com.esri.arcgisws.NAServerRouteParams getRouteParams()
Returns the associated route parameters with this functionality.

Returns:
the associated route parameters