OSID Logo
OSID Specifications
locale package
Version 3.1.0
Interfaceosid.locale.SpatialUnitConversionSession
Implementsosid.OsidSession
Used Byosid.locale.LocaleManager
osid.locale.LocaleProxyManager
Description

This session defines methods to convert spatial units.

MethodgetSourceSpatialUnitRecordType
Description

Gets the source spatial unit record type used in this session.

Returnosid.type.Type the source spatial unit record type
Compliancemandatory This method must be implemented.
MethodgetTargetSpatialUnitRecordType
Description

Gets the target spatial unit record type used in this session.

Returnosid.type.Type the target spatial unit record type
Compliancemandatory This method must be implemented.
MethodcanConvertSpatialUnits
Description

Tests if this user can perform spatial unit conversions. 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 opt not to offer lookup operations.

Returnboolean false if conversion methods are not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodconvertSpatialUnit
Description

Converts a spatial unit.

Parametersosid.mapping.SpatialUnitsourceSpatialUnit the spatial unit to convert
Returnosid.mapping.SpatialUnit the resulting spatial unit
ErrorsINVALID_ARGUMENT sourceSpatialUnit.hasType(getSourceSpatialUnitRecordType()) is false
NULL_ARGUMENT sourceSpatialUnit is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodconvertSpatialUnits
Description

Converts spatial units.

Parametersosid.mapping.SpatialUnitListsourceSpatialUnitList the spatial units to convert
Returnosid.mapping.SpatialUnitList the resulting spatial units
ErrorsINVALID_ARGUMENT sourceSpatialUnit.hasType(getSourceSpatialUnitRecordType()) is false
NULL_ARGUMENT sourceSpatialUnitList is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.