Interface RouteSegmentQuery

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

public interface RouteSegmentQuery extends OsidObjectQuery

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

  • Method Details

    • matchStartingInstructions

      void matchStartingInstructions(String startingInstructions, Type stringMatchType, boolean match)
      Matches the starting instructions for the segment.
      Parameters:
      startingInstructions - the starting instructions
      stringMatchType - the string match type
      match - true if a positive match, false for negative match
      Throws:
      InvalidArgumentException - startingInstructions is not of stringMatchType
      NullArgumentException - startingInstructions is null
      UnsupportedException - supportsStringMatchType(stringMatchType) is false
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyStartingInstructions

      void matchAnyStartingInstructions(boolean match)
      Matches segments that have any starting instructions.
      Parameters:
      match - true to match segments with any starting instructions, false to match segments with no starting instriuctions
      Compliance:
      mandatory - This method must be implemented.
    • clearStartingInstructionsTerms

      void clearStartingInstructionsTerms()
      Clears the starting instruction query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchEndingInstructions

      void matchEndingInstructions(String endingInstructions, Type stringMatchType, boolean match)
      Matches the ending instructions for the segment.
      Parameters:
      endingInstructions - the ending instructions
      stringMatchType - the string match type
      match - true if a positive match, false for negative match
      Throws:
      InvalidArgumentException - endingInstructions is not of stringMatchType
      NullArgumentException - endingInstructions is null
      UnsupportedException - supportsStringMatchType(stringMatchType) is false
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyEndingInstructions

      void matchAnyEndingInstructions(boolean match)
      Matches segments that have any ending instructions.
      Parameters:
      match - true to match segments with any ending instructions, false to match segments with no ending instriuctions
      Compliance:
      mandatory - This method must be implemented.
    • clearEndingInstructionsTerms

      void clearEndingInstructionsTerms()
      Clears the ending instruction query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDistance

      void matchDistance(Distance from, Distance to, boolean match)
      Matches route segments with distances in the specified range.
      Parameters:
      from - starting range
      to - ending range
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - to ie less than from
      NullArgumentException - from or to is null
      Compliance:
      mandatory - This method must be implemented.
    • clearDistanceTerms

      void clearDistanceTerms()
      Clears the distance query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchETA

      void matchETA(Duration from, Duration to, boolean match)
      Matches route segments with estimated ravel times in the specified range.
      Parameters:
      from - starting range
      to - ending range
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - to ie less than from
      NullArgumentException - from or to is null
      Compliance:
      mandatory - This method must be implemented.
    • clearETATerms

      void clearETATerms()
      Clears the ETA 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 route segments containing paths.
      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 route segments that have any path.
      Parameters:
      match - true to match route segments with any path, false to match route segments with no path
      Compliance:
      mandatory - This method must be implemented.
    • clearPathTerms

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

      void matchRouteId(Id pathId, boolean match)
      Sets the path Id for this query to match route segments containing paths.
      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.
    • 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} .
    • clearRouteTerms

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

      RouteSegmentQueryRecord getRouteSegmentQueryRecord(Type routeSegmentRecordType) throws OperationFailedException
      Gets the route segment query record corresponding to the given RouteSegment record Type . Multiple record retrievals produce a nested OR term.
      Parameters:
      routeSegmentRecordType - a route segment record type
      Returns:
      the route segment query record
      Throws:
      NullArgumentException - routeSegmentRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(routeSegmentRecordType) is false
      Compliance:
      mandatory - This method must be implemented.