Interface SpatialUnitConversionSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface SpatialUnitConversionSession extends OsidSession

This session defines methods to convert spatial units.

  • Method Details

    • getSourceSpatialUnitRecordType

      Type getSourceSpatialUnitRecordType()
      Gets the source spatial unit record type used in this session.
      Returns:
      the source spatial unit record type
      Compliance:
      mandatory - This method must be implemented.
    • getTargetSpatialUnitRecordType

      Type getTargetSpatialUnitRecordType()
      Gets the target spatial unit record type used in this session.
      Returns:
      the target spatial unit record type
      Compliance:
      mandatory - This method must be implemented.
    • canConvertSpatialUnits

      boolean canConvertSpatialUnits()
      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.
      Returns:
      false if conversion methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • convertSpatialUnit

      SpatialUnit convertSpatialUnit(SpatialUnit sourceSpatialUnit) throws OperationFailedException, PermissionDeniedException
      Converts a spatial unit.
      Parameters:
      sourceSpatialUnit - the spatial unit to convert
      Returns:
      the resulting spatial unit
      Throws:
      InvalidArgumentException - sourceSpatialUnit.hasType(getSourceSpatialUnitRecordType()) is false
      NullArgumentException - sourceSpatialUnit is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • convertSpatialUnits

      SpatialUnitList convertSpatialUnits(SpatialUnitList sourceSpatialUnitList) throws OperationFailedException, PermissionDeniedException
      Converts spatial units.
      Parameters:
      sourceSpatialUnitList - the spatial units to convert
      Returns:
      the resulting spatial units
      Throws:
      InvalidArgumentException - sourceSpatialUnit.hasType(getSourceSpatialUnitRecordType()) is false
      NullArgumentException - sourceSpatialUnitList is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.