public interface LocationSpatialSession extends OsidSession
This session defines methods for retrieving locations through spatial queries.
This lookup session defines several views:
Locations
with the LocationAdminSession.
The methods useFederatedMapView()
and
useIsolatedMapView()
behave as a radio group and one should be
selected before invoking any lookup methods.
Locations may have an additional records indicated by their respective
record types. The record may not be accessed through a cast of the
Locations.
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupLocations()
Tests if this user can perform
Location lookups. |
Location |
getLocationByCoordinate(Coordinate coordinate)
Gets the closest bounding location of the given coordinate.
|
LocationList |
getLocationsByCoordinates(CoordinateList coordinates)
Gets the closest bounding locations in the given coordinate list.
|
LocationList |
getLocationsInSpatialUnit(SpatialUnit spatialUnit)
Gets the locations that are included inside the given spatial unit.
|
LocationList |
getLocationsOverlappingSpatialUnit(SpatialUnit spatialUnit)
Gets the locations that are included inside or touch the given spatial
unit.
|
Map |
getMap()
Gets the
Map associated with this session. |
Id |
getMapId()
Gets the
Map Id associated with this
session. |
void |
useComparativeLocationView()
The returns from the lookup methods may omit or translate elements
based on this session, such as authorization, and not result in an
error.
|
void |
useFederatedMapView()
Federates the view for methods in this session.
|
void |
useIsolatedMapView()
Isolates the view for methods in this session.
|
void |
usePlenaryLocationView()
A complete view of the
Location returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getMapId()
Map
Id
associated with this
session. Map Id
associated with this sessionmandatory
- This method must be implemented. Map getMap() throws OperationFailedException, PermissionDeniedException
Map
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canLookupLocations()
Location
lookups. A
return of true does not guarantee successful authorization. A return
of false indicates that it is known all methods in this session will
result in a PERMISSION_DENIED.
This is intended as a
hint to an application that may not offer lookup operations to
unauthorized users. false
if lookup methods are not authorized,
true
otherwisemandatory
- This method must be implemented. void useComparativeLocationView()
mandatory
- This method is must be implemented. void usePlenaryLocationView()
Location
returns is desired.
Methods will return what is requested or result in an error. This view
is used when greater precision is desired at the expense of
interoperability.mandatory
- This method is must be implemented. void useFederatedMapView()
mandatory
- This method is must be implemented. void useIsolatedMapView()
mandatory
- This method is must be implemented. Location getLocationByCoordinate(Coordinate coordinate) throws OperationFailedException, PermissionDeniedException
coordinate
- a coordinate Location
NullArgumentException
- coordinate
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- coordinate not supportedmandatory
- This method must be implemented. LocationList getLocationsByCoordinates(CoordinateList coordinates) throws OperationFailedException, PermissionDeniedException
coordinates
- a coordinate list Locations
NullArgumentException
- coordinates
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- a coordinate is not supportedmandatory
- This method must be implemented. LocationList getLocationsInSpatialUnit(SpatialUnit spatialUnit) throws OperationFailedException, PermissionDeniedException
spatialUnit
- a spatial unit Locations
NullArgumentException
- spatialUnit
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- spatial unit not supportedmandatory
- This method must be implemented. LocationList getLocationsOverlappingSpatialUnit(SpatialUnit spatialUnit) throws OperationFailedException, PermissionDeniedException
spatialUnit
- a spatial unit Locations
NullArgumentException
- spatialUnit
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- spatial unit not supportedmandatory
- This method must be implemented.