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

This session defines methods to format and parse coordinates.

MethodgetCoordinateType
Description

Gets the coordinate type used in this session.

Returnosid.type.Typethe coordinate type
CompliancemandatoryThis method must be implemented.
MethodgetCoordinateFormatType
Description

Gets the coordinate format type used in this session.

Returnosid.type.Typethe coordinate format type
CompliancemandatoryThis method must be implemented.
MethodcanFormatCoordinates
Description

Tests if this user can format and parse coordinates. 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 translation methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcoordinateToString
Description

Gets a string representation of a coordinate.

Parametersosid.mapping.Coordinatecoordinatea coordinate value
Returnstringthe display string
ErrorsINVALID_ARGUMENT coodrinate.hasRecordType(getCoordinateRecordType() ) is false
NULL_ARGUMENT coordinate is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodccoordinatesToStrings
Description

Gets a string representation of a list of coordinates.

Parametersosid.mapping.CoordinateListcoordinatesa list of coordinates
Returnstring[]the display strings
ErrorsINVALID_ARGUMENT coodrinate.hasRecordType(getCoordinateRecordType() ) is false
NULL_ARGUMENT coordinates is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodstringToCoordinate
Description

Parses a coordinate.

Parametersstringsa coordinate string
Returnosid.mapping.Coordinatethe display string
ErrorsINVALID_ARGUMENT s is not of getCoordinateFormatType()
NULL_ARGUMENT s is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.