OSID Logo
OSID Specifications
locale package
Version 3.0.0
Release Candidate Preview
Interfaceosid.locale.SpatialUnitConversionSession
Implementsosid.OsidSession
Description

This session defines methods to convert spatial units.

MethodgetSourceSpatialUnitRecordType
Description

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

Returnosid.type.Typethe source spatial unit record type
CompliancemandatoryThis method must be implemented.
MethodgetTargetSpatialUnitRecordType
Description

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

Returnosid.type.Typethe target spatial unit record type
CompliancemandatoryThis 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
CompliancemandatoryThis method must be implemented.
MethodconvertSpatialUnit
Description

Converts a spatial unit.

Parametersosid.mapping.SpatialUnitsourceSpatialUnitthe spatial unit to convert
Returnosid.mapping.SpatialUnitthe resulting spatial unit
ErrorsINVALID_ARGUMENT sourceSpatialUnit.hasType(getSourceSpatialUnitRecordType()) is false
NULL_ARGUMENT sourceSpatialUnit is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodconvertSpatialUnits
Description

Converts spatial units.

Parametersosid.mapping.SpatialUnitListsourceSpatialUnitListthe spatial units to convert
Returnosid.mapping.SpatialUnitListthe resulting spatial units
ErrorsINVALID_ARGUMENT sourceSpatialUnit.hasType(getSourceSpatialUnitRecordType()) is false
NULL_ARGUMENT sourceSpatialUnitList is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.