Interface LocationQuery

All Superinterfaces:
Extensible, OsidBrowsableQuery, OsidExtensibleQuery, OsidFederateableQuery, OsidIdentifiableQuery, OsidObjectQuery, OsidQuery, Suppliable

public interface LocationQuery extends OsidObjectQuery, OsidFederateableQuery

This is the query for searching locations. Each method match specifies an AND term while multiple invocations of the same method produce a nested OR .

  • Method Details

    • matchCoordinate

      void matchCoordinate(Coordinate coordinate, boolean match)
      Matches locations at the specified Coordinate .
      Parameters:
      coordinate - a coordinate
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - coordinate is null
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyCoordinate

      void matchAnyCoordinate(boolean match)
      Matches locations that have any coordinate assignment.
      Parameters:
      match - true to match locations with any coordinate, false to match locations with no coordinates
      Compliance:
      mandatory - This method must be implemented.
    • clearCoordinateTerms

      void clearCoordinateTerms()
      Clears the coordinate query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchContainedSpatialUnit

      void matchContainedSpatialUnit(SpatialUnit spatialUnit, boolean match)
      Matches locations containing the specified SpatialUnit .
      Parameters:
      spatialUnit - a spatial unit
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - spatialUnit is null
      Compliance:
      mandatory - This method must be implemented.
    • clearContainedSpatialUnitTerms

      void clearContainedSpatialUnitTerms()
      Clears the spatial unit terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchOverlappingSpatialUnit

      void matchOverlappingSpatialUnit(SpatialUnit spatialUnit, boolean match)
      Matches locations overlapping with the specified SpatialUnit .
      Parameters:
      spatialUnit - a spatial unit
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - spatialUnit is null
      Compliance:
      mandatory - This method must be implemented.
    • clearOverlappingSpatialUnitTerms

      void clearOverlappingSpatialUnitTerms()
      Clears the overlapping spatial unit terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchAnySpatialUnit

      void matchAnySpatialUnit(boolean match)
      Matches locations that have any spatial unit assignment.
      Parameters:
      match - true to match locations with any boundary, false to match locations with no boundaries
      Compliance:
      mandatory - This method must be implemented.
    • clearSpatialUnitTerms

      void clearSpatialUnitTerms()
      Clears the spatial unit query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchRouteId

      void matchRouteId(Id routeId, boolean match)
      Sets the route Id for this query to match locations along the given route.
      Parameters:
      routeId - the route Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - routeId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearRouteIdTerms

      void clearRouteIdTerms()
      Clears the route Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsRouteQuery

      boolean supportsRouteQuery()
      Tests if a RouteQuery is available.
      Returns:
      true if a route query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getRouteQuery

      RouteQuery getRouteQuery()
      Gets the query for a route. Multiple retrievals produce a nested OR term.
      Returns:
      the route query
      Throws:
      UnimplementedException - supportsRouteQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsRouteQuery()} is {@code true} .
    • matchAnyRoute

      void matchAnyRoute(boolean match)
      Matches locations that are used on any route.
      Parameters:
      match - true to match locations on any route, false to match locations on no routes
      Compliance:
      mandatory - This method must be implemented.
    • clearRouteTerms

      void clearRouteTerms()
      Clears the route query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchPathId

      void matchPathId(Id pathId, boolean match)
      Sets the path Id for this query to match locations along the given path.
      Parameters:
      pathId - the path Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - pathId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearPathIdTerms

      void clearPathIdTerms()
      Clears the path Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsPathQuery

      boolean supportsPathQuery()
      Tests if a PathQuery is available.
      Returns:
      true if a path query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getPathQuery

      PathQuery getPathQuery()
      Gets the query for a path. Multiple retrievals produce a nested OR term.
      Returns:
      the path query
      Throws:
      UnimplementedException - supportsPathQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsPathQuery()} is {@code true} .
    • matchAnyPath

      void matchAnyPath(boolean match)
      Matches locations that exist along any path.
      Parameters:
      match - true to match locations on any path, false to match locations on no path
      Compliance:
      mandatory - This method must be implemented.
    • clearPathTerms

      void clearPathTerms()
      Clears the path query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchContainingLocationId

      void matchContainingLocationId(Id locationId, boolean match)
      Sets the location Id for this query to match locations contained within the given location.
      Parameters:
      locationId - a location Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - locationId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearContainingLocationIdTerms

      void clearContainingLocationIdTerms()
      Clears the pcontaining location Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsContainingLocationQuery

      boolean supportsContainingLocationQuery()
      Tests if a LocationQuery is available.
      Returns:
      true if a location query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getContainingLocationQuery

      LocationQuery getContainingLocationQuery()
      Gets the query for a parent location. Multiple retrievals produce a nested OR term.
      Returns:
      the location query
      Throws:
      UnimplementedException - supportsContainingLocationQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsContainingLocationQuery()} is {@code true} .
    • matchAnyContainingLocation

      void matchAnyContainingLocation(boolean match)
      Matches locations that have any ancestor.
      Parameters:
      match - true to match locations with any parent location, false to match root locations
      Compliance:
      mandatory - This method must be implemented.
    • clearContainingLocationTerms

      void clearContainingLocationTerms()
      Clears the containing location query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchContainedLocationId

      void matchContainedLocationId(Id locationId, boolean match)
      Sets the location Id for this query to match locations containing the given location.
      Parameters:
      locationId - a location Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - locationId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearContainedLocationIdTerms

      void clearContainedLocationIdTerms()
      Clears the contained location Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsContainedLocationQuery

      boolean supportsContainedLocationQuery()
      Tests if a LocationQuery is available.
      Returns:
      true if a location query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getContainedLocationQuery

      LocationQuery getContainedLocationQuery()
      Gets the query for a contained location. Multiple retrievals produce a nested OR term.
      Returns:
      the location query
      Throws:
      UnimplementedException - supportsContainedLocationQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsContainedLocationQuery()} is {@code true} .
    • matchAnyContainedLocation

      void matchAnyContainedLocation(boolean match)
      Matches locations that have any children.
      Parameters:
      match - true to match locations containing any other location, false to match empty locations
      Compliance:
      mandatory - This method must be implemented.
    • clearContainedLocationTerms

      void clearContainedLocationTerms()
      Clears the contained location query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchMapId

      void matchMapId(Id mapId, boolean match)
      Sets the map Id for this query.
      Parameters:
      mapId - the map Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - mapId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearMapIdTerms

      void clearMapIdTerms()
      Clears the map Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsMapQuery

      boolean supportsMapQuery()
      Tests if a MapQuery is available.
      Returns:
      true if a map query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getMapQuery

      MapQuery getMapQuery()
      Gets the query for a map. Multiple retrievals produce a nested OR term.
      Returns:
      the map query
      Throws:
      UnimplementedException - supportsMapQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsMapQuery()} is {@code true} .
    • clearMapTerms

      void clearMapTerms()
      Clears the map query terms.
      Compliance:
      mandatory - This method must be implemented.
    • getLocationQueryRecord

      LocationQueryRecord getLocationQueryRecord(Type locationRecordType) throws OperationFailedException
      Gets the location query record corresponding to the given Location record Type .Multiple record retrievals produce a nested OR term.
      Parameters:
      locationRecordType - a location record type
      Returns:
      the location query record
      Throws:
      NullArgumentException - locationRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(locationRecordType) is false
      Compliance:
      mandatory - This method must be implemented.