Interface ResourceLocation

All Superinterfaces:
Browsable, Extensible, Identifiable, OsidCompendium, OsidObject, Subjugateable

public interface ResourceLocation extends OsidCompendium

This interface defines a resource at a location.

  • Method Details

    • getResourceId

      Id getResourceId()
      Gets the Id of the resource on the route.
      Returns:
      the resource Id
      Compliance:
      mandatory - This method must be implemented.
    • getResource

      Resource getResource() throws OperationFailedException
      Gets the resource on the route.
      Returns:
      the resource
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • hasLocation

      boolean hasLocation()
      Tests if this resource has a known location.
      Returns:
      true if a location is known, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getLocationId

      Id getLocationId()
      Gets the location Id of the resource.
      Returns:
      the location Id
      Throws:
      IllegalStateException - hasLocation() is false
      Compliance:
      mandatory - This method must be implemented.
    • getLocation

      Location getLocation() throws OperationFailedException
      Gets the location of the resource.
      Returns:
      the location
      Throws:
      IllegalStateException - hasLocation() is false
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • hasCoordinate

      boolean hasCoordinate()
      Tests if this resource has a known coordinate.
      Returns:
      true if a coordinate is known, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCoordinate

      Coordinate getCoordinate()
      Gets the coordinate of the resource.
      Returns:
      the coordinate of the resource
      Throws:
      IllegalStateException - hasCoordinate() is false
      Compliance:
      mandatory - This method must be implemented.
    • getResourceLocationRecord

      ResourceLocationRecord getResourceLocationRecord(Type resourceLocationRecordType) throws OperationFailedException
      Gets the map record corresponding to the given ResourceLocation record Type . This method is used to retrieve an object implementing the requested record. The resourceLocationRecordType may be the Type returned in getRecordTypes() or any of its parents in a Type hierarchy where hasRecordType(resourceLocationRecordType) is true .
      Parameters:
      resourceLocationRecordType - the type of resource location record to retrieve
      Returns:
      the resource location record
      Throws:
      NullArgumentException - resourceLocationRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(resourceLocationRecordType) is false
      Compliance:
      mandatory - This method must be implemented.