Interface OpenSearchParser


public interface OpenSearchParser
An interface to transform a QueryRequest into an OpenSearch URL

This code is experimental. While this interface is functional and tested, it may change or be removed in a future version of the library.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    populateContextual(org.apache.cxf.jaxrs.client.WebClient client, Map<String,String> searchPhraseMap, List<String> parameters)
    Fills in the OpenSearch query URL with the contextual information is contained in the search phrase link Map<String, String>}.
    void
    populateSearchOptions(org.apache.cxf.jaxrs.client.WebClient client, ddf.catalog.operation.QueryRequest queryRequest, ddf.security.Subject subject, List<String> parameters)
    Populates general site information if the QueryRequest parameter is not null.
    void
    populateSpatial(org.apache.cxf.jaxrs.client.WebClient client, org.locationtech.jts.geom.Geometry geometry, BoundingBox boundingBox, org.locationtech.jts.geom.Polygon polygon, PointRadius pointRadius, List<String> parameters)
    Fills in the OpenSearch query URL with polygon geospatial information if one of the spatial search parameters is not null.
    void
    populateTemporal(org.apache.cxf.jaxrs.client.WebClient client, ddf.catalog.impl.filter.TemporalFilter temporal, List<String> parameters)
    Fills in the OpenSearch query URL with temporal information (Start, End, and Name) if the TemporalFilter parameter is not null.
  • Method Details

    • populateSearchOptions

      void populateSearchOptions(org.apache.cxf.jaxrs.client.WebClient client, ddf.catalog.operation.QueryRequest queryRequest, ddf.security.Subject subject, List<String> parameters)
      Populates general site information if the QueryRequest parameter is not null.
      Parameters:
      client - - OpenSearch URL to populate
      queryRequest - - The query request from which to populate the search options
      subject - - The subject associated with the query
      parameters - - the given OpenSearch parameters
    • populateContextual

      void populateContextual(org.apache.cxf.jaxrs.client.WebClient client, Map<String,String> searchPhraseMap, List<String> parameters)
      Fills in the OpenSearch query URL with the contextual information is contained in the search phrase link Map<String, String>}. (Note: Section 2.2 - Query: The OpenSearch specification does not define a syntax for its primary query parameter, searchTerms, but it is generally used to support simple keyword queries.)
      Parameters:
      client - - OpenSearch URL to populate
      searchPhraseMap - - a map of search queries
      parameters - - the given OpenSearch parameters
    • populateTemporal

      void populateTemporal(org.apache.cxf.jaxrs.client.WebClient client, ddf.catalog.impl.filter.TemporalFilter temporal, List<String> parameters)
      Fills in the OpenSearch query URL with temporal information (Start, End, and Name) if the TemporalFilter parameter is not null.
      Parameters:
      client - - OpenSearch URL to populate
      temporal - - the TemporalFilter that contains the temporal information
      parameters - - the given OpenSearch parameters
    • populateSpatial

      void populateSpatial(org.apache.cxf.jaxrs.client.WebClient client, @Nullable org.locationtech.jts.geom.Geometry geometry, @Nullable BoundingBox boundingBox, @Nullable org.locationtech.jts.geom.Polygon polygon, @Nullable PointRadius pointRadius, List<String> parameters)
      Fills in the OpenSearch query URL with polygon geospatial information if one of the spatial search parameters is not null.
      Parameters:
      client - - OpenSearch URL to populate
      parameters - - the given OpenSearch parameters
      Throws:
      IllegalArgumentException - if more than one of the search parameters is not null