Oracle Application Server Wireless Java API Reference
B14043-01


oracle.panama.spatial
Class SpatialManager

java.lang.Object
  extended byoracle.panama.spatial.SpatialManager


public class SpatialManager
extends java.lang.Object

This class defines a manager that can generate service objects for geocoding, mapping, routing and YP.

Usage:
Geocoder geocoder = SpatialManager.getGeocoder();
Mapper mapper = SpatialManager.getMapper();
Router router = SpatialManager.getRouter();
YPFinder ypfinder = SpatialManager.getYPFinder();

Prior to using the providers, the server administrator needs to configure them on the server.

This class defines final variables only and is thread-safe.


Constructor Summary
SpatialManager()

Method Summary
static YPBusiness createBusiness(Location location, java.lang.String telephone, java.lang.String description)
This function creates an object of a class implementing YPBusiness.
static Location createLocation(Point geom, java.lang.String companyName, java.lang.String houseNumber, java.lang.String[] intersectingStreetNames, java.lang.String secondLine, java.lang.String cityName, java.lang.String stateName, java.lang.String postalCode, java.lang.String postalCodeExt, java.lang.String countryName)
This function creates an object of a class implementing Location.
static Location createLocation(Point geom, java.lang.String companyName, java.lang.String firstLine, java.lang.String secondLine, java.lang.String lastLine, java.lang.String countryName)
Deprecated. Replaced by createLocation(Point, String, String, String[], String, String, String, String, String, String) to reduce ambiguity of representation.
static Location createLocation(Point geom, java.lang.String companyName, java.lang.String firstLine, java.lang.String secondLine, java.lang.String cityName, java.lang.String stateName, java.lang.String postalCode, java.lang.String postalCodeExt, java.lang.String countryName)
Deprecated. Replaced by createLocation(Point, String, String, String[], String, String, String, String, String, String) to reduce ambiguity of representation.
static Location createLocation(Point geom, java.lang.String matchCode, java.lang.String companyName, java.lang.String firstLine, java.lang.String secondLine, java.lang.String cityName, java.lang.String stateName, java.lang.String postalCode, java.lang.String postalCodeExt, java.lang.String lastLine, java.lang.String countyName, java.lang.String blockNum)
Deprecated. Replaced by createLocation(Point, String, String, String[], String, String, String, String, String, String) to reduce ambiguity of representation.
static Location createLocation(Point geom, java.lang.String matchCode, java.lang.String companyName, java.lang.String firstLine, java.lang.String secondLine, java.lang.String cityName, java.lang.String stateName, java.lang.String postalCode, java.lang.String postalCodeExt, java.lang.String lastLine, java.lang.String countyName, java.lang.String blockNum, java.lang.String countryName)
Deprecated. Replaced by createLocation(Point, String, String, String[], String, String, String, String, String, String) to reduce ambiguity of representation.
static Location createLocation(RMRegion region)
This function creates an object of a class implementing Location.
static Location createLocation(java.lang.String companyName, java.lang.String houseNumber, java.lang.String[] intersectingStreetNames, java.lang.String secondLine, java.lang.String cityName, java.lang.String stateName, java.lang.String postalCode, java.lang.String postalCodeExt, java.lang.String countryName)
This function creates an object of a class implementing Location.
static Location createLocation(java.lang.String companyName, java.lang.String firstLine, java.lang.String secondLine, java.lang.String lastLine, java.lang.String countryName)
Deprecated. Replaced by createLocation(String, String, String[], String, String, String, String, String, String) to reduce ambiguity of representation.
static Location createLocation(java.lang.String companyName, java.lang.String firstLine, java.lang.String secondLine, java.lang.String cityName, java.lang.String stateName, java.lang.String postalCode, java.lang.String postalCodeExt, java.lang.String countryName)
Deprecated. Replaced by createLocation(String, String, String[], String, String, String, String, String, String) to reduce ambiguity of representation.
static Point createPoint()
This function creates an object of a class implementing Point.
static Point createPoint(double longitude, double latitude)
This function creates an object of a class implementing Point.
static Point createPoint(double longitude, double latitude, double radiusInMeters)
This function creates an object of a class implementing Point.
static Point createPoint(double longitude, double latitude, java.lang.String label)
This function creates an object of a class implementing Point.
static Point createPoint(double longitude, double latitude, java.lang.String label, double radiusInMeters)
This function creates an object of a class implementing Point.
static Geocoder getGeocoder()
This returns a Geocoder object.
static Geocoder getGeocoder(java.lang.Class[] providersToAvoid)
This returns a Geocoder object.
static Geocoder getGeocoder(java.lang.String overridingProviderChoice)
This returns a Geocoder object.
static Mapper getMapper()
This returns a Mapper object.
static Mapper getMapper(java.lang.Class[] providersToAvoid)
This returns a Mapper object.
static Mapper getMapper(java.lang.String overridingProviderChoice)
This returns a Mapper object.
static int getNumOfAllGeocodingProviders()
Returns the number of configured geocoding providers
static int getNumOfAllMappingProviders()
Returns the number of configured mapping providers
static int getNumOfAllRoutingProviders()
Returns the number of configured routing providers
static int getNumOfAllTrafficProviders()
Returns the number of configured traffic providers
static int getNumOfAllYPProviders()
Returns the number of configured YP providers
static RegionModel getRegionModel()
Get RegionModel.
static Router getRouter()
This returns a Router object.
static Router getRouter(java.lang.Class[] providersToAvoid)
This returns a Router object.
static Router getRouter(java.lang.String overridingProviderChoice)
This returns a Router object.
static TrafficReporter getTrafficReporter()
This returns a traffic reporter object.
static YPFinder getYPFinder()
This returns a YPFinder object.
static YPFinder getYPFinder(java.lang.Class[] providersToAvoid)
This returns a YPFinder object
static YPFinder getYPFinder(java.lang.String overridingProviderChoice)
This returns a YPFinder object.
static boolean isCovered(java.lang.Class aClass, java.lang.Class[] types)
Returns true if the given class is assignable from the given list of types
static java.util.Iterator listAllGeocodingProviders()
This function returns an Iterator enumerating all geocoding providers in undefined order.
static java.util.Iterator listAllMappingProviders()
This function returns an Iterator enumerating all mapping providers in undefined order.
static java.util.Iterator listAllRoutingProviders()
This function returns an Iterator enumerating all routing providers in undefined order.
static java.util.Iterator listAllTrafficProviders()
static java.util.Iterator listAllYPProviders()
This function returns an Iterator enumerating all YP providers in undefined order.
static void reloadPropertiesAndXMLFiles()
Reloads the configuration settings associated with the Spatial Manager.

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SpatialManager

public SpatialManager()

Method Detail

createBusiness

public static YPBusiness createBusiness(Location location,
                                        java.lang.String telephone,
                                        java.lang.String description)
This function creates an object of a class implementing YPBusiness.
Parameters:
location - A Location object representing the address and/or location coordinates of the business. This is an essential component of a Location object and should not be null. However, it is not checked whether the value is non-null.
telephone - a String representing the telephone number of the business (may be null)
description - a String representing a description of the business (may be null)
Returns:
an object of a class implementing YPBusiness representing the requested business

createLocation

public static Location createLocation(Point geom,
                                      java.lang.String companyName,
                                      java.lang.String houseNumber,
                                      java.lang.String[] intersectingStreetNames,
                                      java.lang.String secondLine,
                                      java.lang.String cityName,
                                      java.lang.String stateName,
                                      java.lang.String postalCode,
                                      java.lang.String postalCodeExt,
                                      java.lang.String countryName)
This function creates an object of a class implementing Location. The geographic location is geocoded automatically.
Parameters:
geom - a Geometry representing the lat/lon of the location
companyName - a String representing the company name
houseNumber - a String representing the house number
intersectingStreetNames - a String array representing the street names on the intersection (if the address is an intersection); in that case no house number is used; if the address is not an intersection, on the other hand, then only one street name is used (and the house number)
secondLine - a String representing the second address line
cityName - a String representing the city name
stateName - a String representing the state name
postalCode - a String representing the postal code
postalCodeExt - a String representing the postal code extension
countryName - a String representing the country
Returns:
an object of a class implementing Location representing the requested address

createLocation

public static Location createLocation(Point geom,
                                      java.lang.String companyName,
                                      java.lang.String firstLine,
                                      java.lang.String secondLine,
                                      java.lang.String lastLine,
                                      java.lang.String countryName)
Deprecated. Replaced by createLocation(Point, String, String, String[], String, String, String, String, String, String) to reduce ambiguity of representation.
This function creates an object of a class implementing Location.
Parameters:
geom - a Geometry representing the lat/lon of the location
companyName - a String representing the company name
firstLine - a String representing the first address line
secondLine - a String representing the second address line
lastLine - a String representing the last address line
countryName - a String representing the country
Returns:
an object of a class implementing Location representing the requested address

createLocation

public static Location createLocation(Point geom,
                                      java.lang.String companyName,
                                      java.lang.String firstLine,
                                      java.lang.String secondLine,
                                      java.lang.String cityName,
                                      java.lang.String stateName,
                                      java.lang.String postalCode,
                                      java.lang.String postalCodeExt,
                                      java.lang.String countryName)
Deprecated. Replaced by createLocation(Point, String, String, String[], String, String, String, String, String, String) to reduce ambiguity of representation.
This function creates an object of a class implementing Location.
Parameters:
geom - a Geometry representing the lat/lon of the location
companyName - a String representing the company name
firstLine - a String representing the first address line
secondLine - a String representing the second address line
cityName - a String representing the city name
stateName - a String representing the state name
postalCode - a String representing the postal code
postalCodeExt - a String representing the postal code extension
countryName - a String representing the country
Returns:
an object of a class implementing Location representing the requested address

createLocation

public static Location createLocation(Point geom,
                                      java.lang.String matchCode,
                                      java.lang.String companyName,
                                      java.lang.String firstLine,
                                      java.lang.String secondLine,
                                      java.lang.String cityName,
                                      java.lang.String stateName,
                                      java.lang.String postalCode,
                                      java.lang.String postalCodeExt,
                                      java.lang.String lastLine,
                                      java.lang.String countyName,
                                      java.lang.String blockNum)
Deprecated. Replaced by createLocation(Point, String, String, String[], String, String, String, String, String, String) to reduce ambiguity of representation.
This function creates an object of a class implementing Location.
Parameters:
geom - a Geometry representing the lat/lon of the location
matchCode - a String representing the match code from geocoding
companyName - a String representing the company name
firstLine - a String representing the first address line
secondLine - a String representing the second address line
cityName - a String representing the city name
stateName - a String representing the state name
postalCode - a String representing the postal code
postalCodeExt - a String representing the postal code extension
lastLine - a String representing the last address line
countyName - a String representing the county name
blockNum - a String representing the block number
Returns:
an object of a class implementing Location representing the requested address

createLocation

public static Location createLocation(Point geom,
                                      java.lang.String matchCode,
                                      java.lang.String companyName,
                                      java.lang.String firstLine,
                                      java.lang.String secondLine,
                                      java.lang.String cityName,
                                      java.lang.String stateName,
                                      java.lang.String postalCode,
                                      java.lang.String postalCodeExt,
                                      java.lang.String lastLine,
                                      java.lang.String countyName,
                                      java.lang.String blockNum,
                                      java.lang.String countryName)
Deprecated. Replaced by createLocation(Point, String, String, String[], String, String, String, String, String, String) to reduce ambiguity of representation.
This function creates an object of a class implementing Location.
Parameters:
geom - a Geometry representing the lat/lon of the location
matchCode - a String representing the match code from geocoding
companyName - a String representing the company name
firstLine - a String representing the first address line
secondLine - a String representing the second address line
cityName - a String representing the city name
stateName - a String representing the state name
postalCode - a String representing the postal code
postalCodeExt - a String representing the postal code extension
lastLine - a String representing the last address line
countyName - a String representing the county name
blockNum - a String representing the block number
countryName - a String representing the country
Returns:
an object of a class implementing Location representing the requested address

createLocation

public static Location createLocation(RMRegion region)
This function creates an object of a class implementing Location. The geographic location is geocoded automatically. This function takes a region and deduces an (incomplete) address from it. The address is incomplete because the region from region model does not specify a street address. Furthermore, not always will even a city, postal code and state be available.
Parameters:
region - a RMRegion object representing a region from region model

createLocation

public static Location createLocation(java.lang.String companyName,
                                      java.lang.String houseNumber,
                                      java.lang.String[] intersectingStreetNames,
                                      java.lang.String secondLine,
                                      java.lang.String cityName,
                                      java.lang.String stateName,
                                      java.lang.String postalCode,
                                      java.lang.String postalCodeExt,
                                      java.lang.String countryName)
This function creates an object of a class implementing Location. The geographic location is geocoded automatically.
Parameters:
companyName - a String representing the company name
houseNumber - a String representing the house number
intersectingStreetNames - a String array representing the street names on the intersection (if the address is an intersection); in that case no house number is used; if the address is not an intersection, on the other hand, then only one street name is used (and the house number)
secondLine - a String representing the second address line
cityName - a String representing the city name
stateName - a String representing the state name
postalCode - a String representing the postal code
postalCodeExt - a String representing the postal code extension
countryName - a String representing the country
Returns:
an object of a class implementing Location representing the requested address

createLocation

public static Location createLocation(java.lang.String companyName,
                                      java.lang.String firstLine,
                                      java.lang.String secondLine,
                                      java.lang.String lastLine,
                                      java.lang.String countryName)
Deprecated. Replaced by createLocation(String, String, String[], String, String, String, String, String, String) to reduce ambiguity of representation.
This function creates an object of a class implementing Location. The geographic location is geocoded automatically.
Parameters:
companyName - a String representing the company name
firstLine - a String representing the first address line
secondLine - a String representing the second address line
lastLine - a String representing the last address line
countryName - a String representing the country
Returns:
an object of a class implementing Location representing the requested address

createLocation

public static Location createLocation(java.lang.String companyName,
                                      java.lang.String firstLine,
                                      java.lang.String secondLine,
                                      java.lang.String cityName,
                                      java.lang.String stateName,
                                      java.lang.String postalCode,
                                      java.lang.String postalCodeExt,
                                      java.lang.String countryName)
Deprecated. Replaced by createLocation(String, String, String[], String, String, String, String, String, String) to reduce ambiguity of representation.
This function creates an object of a class implementing Location. The geographic location is geocoded automatically.
Parameters:
companyName - a String representing the company name
firstLine - a String representing the first address line
secondLine - a String representing the second address line
cityName - a String representing the city name
stateName - a String representing the state name
postalCode - a String representing the postal code
postalCodeExt - a String representing the postal code extension
countryName - a String representing the country
Returns:
an object of a class implementing Location representing the requested address

createPoint

public static Point createPoint()
This function creates an object of a class implementing Point.
Returns:
an object of a class implementing Point representing the requested position

createPoint

public static Point createPoint(double longitude,
                                double latitude)
This function creates an object of a class implementing Point.
Parameters:
longitude - a double representing the longitude of this PointImpl (must not be null)
latitude - a double representing the latitude of this PointImpl (must not be null)
Returns:
an object of a class implementing Point representing the requested position

createPoint

public static Point createPoint(double longitude,
                                double latitude,
                                double radiusInMeters)
This function creates an object of a class implementing Point.
Parameters:
longitude - a double representing the longitude of this PointImpl (must not be null)
latitude - a double representing the latitude of this PointImpl (must not be null)
radiusInMeters - a double representing an optional radius around this point
Returns:
an object of a class implementing Point representing the requested position

createPoint

public static Point createPoint(double longitude,
                                double latitude,
                                java.lang.String label)
This function creates an object of a class implementing Point.
Parameters:
longitude - a double representing the longitude of this PointImpl (must not be null)
latitude - a double representing the latitude of this PointImpl (must not be null)
label - a String representing a label for this PointImpl (may be null)
Returns:
an object of a class implementing Point representing the requested position

createPoint

public static Point createPoint(double longitude,
                                double latitude,
                                java.lang.String label,
                                double radiusInMeters)
This function creates an object of a class implementing Point.
Parameters:
longitude - a double representing the longitude of this PointImpl (must not be null)
latitude - a double representing the latitude of this PointImpl (must not be null)
label - a String representing a label for this PointImpl (may be null)
radiusInMeters - a double representing an optional radius around this point
Returns:
an object of a class implementing Point representing the requested position

getGeocoder

public static Geocoder getGeocoder()
This returns a Geocoder object.
Returns:
a Geocoder object

getGeocoder

public static Geocoder getGeocoder(java.lang.Class[] providersToAvoid)
This returns a Geocoder object.
Parameters:
providersToAvoid - avod the providers in this array
Returns:
a Geocoder object

getGeocoder

public static Geocoder getGeocoder(java.lang.String overridingProviderChoice)
This returns a Geocoder object.
Parameters:
overridingProviderChoice - a String representing the name of the preferred provider
Returns:
a Geocoder object

getMapper

public static Mapper getMapper()
This returns a Mapper object.
Returns:
a Mapper object

getMapper

public static Mapper getMapper(java.lang.Class[] providersToAvoid)
This returns a Mapper object.
Parameters:
providersToAvoid - avod the providers in this array
Returns:
a Mapper object

getMapper

public static Mapper getMapper(java.lang.String overridingProviderChoice)
This returns a Mapper object.
Parameters:
overridingProviderChoice - a String representing the name of the preferred provider
Returns:
a Mapper object

getNumOfAllGeocodingProviders

public static int getNumOfAllGeocodingProviders()
Returns the number of configured geocoding providers
Returns:
the number of configured geocoding providers

getNumOfAllMappingProviders

public static int getNumOfAllMappingProviders()
Returns the number of configured mapping providers
Returns:
the number of configured mapping providers

getNumOfAllRoutingProviders

public static int getNumOfAllRoutingProviders()
Returns the number of configured routing providers
Returns:
the number of configured routing providers

getNumOfAllTrafficProviders

public static int getNumOfAllTrafficProviders()
Returns the number of configured traffic providers
Returns:
the number of configured traffic providers

getNumOfAllYPProviders

public static int getNumOfAllYPProviders()
Returns the number of configured YP providers
Returns:
the number of configured YP providers

getRegionModel

public static RegionModel getRegionModel()
Get RegionModel.
Returns:
RegionModel object.

getRouter

public static Router getRouter()
This returns a Router object.
Returns:
a Router object

getRouter

public static Router getRouter(java.lang.Class[] providersToAvoid)
This returns a Router object.
Parameters:
providersToAvoid - avod the providers in this array
Returns:
a Router object

getRouter

public static Router getRouter(java.lang.String overridingProviderChoice)
This returns a Router object.
Parameters:
overridingProviderChoice - a String representing the name of the preferred provider
Returns:
a Router object

getTrafficReporter

public static TrafficReporter getTrafficReporter()
This returns a traffic reporter object.
Returns:
a traffic reporter object

getYPFinder

public static YPFinder getYPFinder()
This returns a YPFinder object.
Returns:
a YPFinder object

getYPFinder

public static YPFinder getYPFinder(java.lang.Class[] providersToAvoid)
This returns a YPFinder object
Parameters:
providersToAvoid - avod the providers in this array
Returns:
a YPFinder object

getYPFinder

public static YPFinder getYPFinder(java.lang.String overridingProviderChoice)
This returns a YPFinder object.
Parameters:
overridingProviderChoice - a String representing the name of the preferred provider
Returns:
a YPFinder object

isCovered

public static boolean isCovered(java.lang.Class aClass,
                                java.lang.Class[] types)
Returns true if the given class is assignable from the given list of types
Parameters:
aClass - a class
types - the list of available types
Returns:
true if the given class is assignable from the given list of types

listAllGeocodingProviders

public static java.util.Iterator listAllGeocodingProviders()
This function returns an Iterator enumerating all geocoding providers in undefined order. In contrast to the function selectProvider, this function will simply provide a list. The user is free to query the providers' names or other attributes. He is also free to request services from his chosen provider. But he also assumes tasks otherwise performed by the framework: Whether the provider fails or succeeds - no failover will happen, no statistics of success or performance will be kept. If the provider throws a RuntimeException, the caller has to catch it.
Returns:
an Iterator enumerating all geocoding providers (they all extend the Provider class and implement the Geocoder interface)

listAllMappingProviders

public static java.util.Iterator listAllMappingProviders()
This function returns an Iterator enumerating all mapping providers in undefined order. In contrast to the function selectProvider, this function will simply provide a list. The user is free to query the providers' names or other attributes. He is also free to request services from his chosen provider. But he also assumes tasks otherwise performed by the framework: Whether the provider fails or succeeds - no failover will happen, no statistics of success or performance will be kept. If the provider throws a RuntimeException, the caller has to catch it.
Returns:
an Iterator enumerating all mapping providers (they all extend the Provider class and implement the Mapper interface)

listAllRoutingProviders

public static java.util.Iterator listAllRoutingProviders()
This function returns an Iterator enumerating all routing providers in undefined order. In contrast to the function selectProvider, this function will simply provide a list. The user is free to query the providers' names or other attributes. He is also free to request services from his chosen provider. But he also assumes tasks otherwise performed by the framework: Whether the provider fails or succeeds - no failover will happen, no statistics of success or performance will be kept. If the provider throws a RuntimeException, the caller has to catch it.
Returns:
an Iterator enumerating all routing providers (they all extend the Provider class and implement the Router interface)

listAllTrafficProviders

public static java.util.Iterator listAllTrafficProviders()

listAllYPProviders

public static java.util.Iterator listAllYPProviders()
This function returns an Iterator enumerating all YP providers in undefined order. In contrast to the function selectProvider, this function will simply provide a list. The user is free to query the providers' names or other attributes. He is also free to request services from his chosen provider. But he also assumes tasks otherwise performed by the framework: Whether the provider fails or succeeds - no failover will happen, no statistics of success or performance will be kept. If the provider throws a RuntimeException, the caller has to catch it.
Returns:
an Iterator enumerating all YP providers (they all extend the Provider class and implement the YPFinderSimple interface)

reloadPropertiesAndXMLFiles

public static void reloadPropertiesAndXMLFiles()
Reloads the configuration settings associated with the Spatial Manager. When a list of configured providers has been updated, this method needs to be called before the new list will take effect.

Oracle Application Server Wireless Java API Reference
B14043-01


Copyright © 2004 Oracle Corporation. All Rights Reserved.