Interface DemographicSearchSession

All Superinterfaces:
AutoCloseable, Closeable, DemographicQuerySession, OsidSession, OsidSession

public interface DemographicSearchSession extends DemographicQuerySession

This session provides methods for searching among Demographics . The search query is constructed using the DemographicyQuery .

getDemographicsByQuery() is the basic search method and returns a list of Demographics . A more advanced search may be performed with getDemographicsBySearch() .It accepts a DemographicSearch in addition to the query for the purpose of specifying additional options affecting the entire search, such as bin. getDemographicsBySearch() returns a DemographicSearchResults that can be used to access the resulting DemographicList or be used to perform a search within the result set through DemographicSearch .

This session defines views that offer differing behaviors for searching.

  • federated bin view: searches include demographic in bins of which this bin is an ancestor in the bin hierarchy
  • isolated bin view: searches are restricted to demographic in this bin
Demographics may have a query record indicated by their respective record types. The query record is accessed via the DemographicQuery .
  • Method Details

    • getDemographicSearch

      DemographicSearch getDemographicSearch()
      Gets a demographic search.
      Returns:
      the demographic search
      Compliance:
      mandatory - This method must be implemented.
    • getDemographicSearchOrder

      DemographicSearchOrder getDemographicSearchOrder()
      Gets a demographic search order. The DemographicSearchOrder is supplied to a DemographicSearch to specify the ordering of results.
      Returns:
      the demographic search order
      Compliance:
      mandatory - This method must be implemented.
    • getDemographicsBySearch

      DemographicSearchResults getDemographicsBySearch(DemographicQuery demographicQuery, DemographicSearch demographicSearch) throws OperationFailedException, PermissionDeniedException
      Gets the search results matching the given search query using the given search.
      Parameters:
      demographicQuery - the demographic query
      demographicSearch - the demographic search
      Returns:
      the returned search results
      Throws:
      NullArgumentException - demographicQuery or demographicSearch is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - demographicQuery or demographicSearch is not of this service
      Compliance:
      mandatory - This method must be implemented.
    • getDemographicQueryFromInspector

      DemographicQuery getDemographicQueryFromInspector(DemographicQueryInspector demographicQueryInspector)
      Gets a demographic query from an inspector. The inspector is available from a DemographicSearchResults .
      Parameters:
      demographicQueryInspector - a demographic query inspector
      Returns:
      the demographic query
      Throws:
      NullArgumentException - demographicQueryInspector is null
      UnsupportedException - demographicQueryInspector is not of this service
      Compliance:
      mandatory - This method must be implemented.