Package org.codice.ddf.opensearch.source
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 TypeMethodDescriptionvoidpopulateContextual(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 Mapinvalid input: '<'String, String>}.voidpopulateSearchOptions(org.apache.cxf.jaxrs.client.WebClient client, ddf.catalog.operation.QueryRequest queryRequest, ddf.security.Subject subject, List<String> parameters) Populates general site information if theQueryRequestparameter is not null.voidpopulateSpatial(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.voidpopulateTemporal(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 theTemporalFilterparameter 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 theQueryRequestparameter is not null.- Parameters:
client- - OpenSearch URL to populatequeryRequest- - The query request from which to populate the search optionssubject- - The subject associated with the queryparameters- - 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 Mapinvalid input: '<'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 populatesearchPhraseMap- - a map of search queriesparameters- - 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 theTemporalFilterparameter is not null.- Parameters:
client- - OpenSearch URL to populatetemporal- - the TemporalFilter that contains the temporal informationparameters- - 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 populateparameters- - the given OpenSearch parameters- Throws:
IllegalArgumentException- if more than one of the search parameters is not null
-