SourceResponse.getRequest
Code IndexAdd Codota to your IDE (free)

Best code snippets using ddf.catalog.operation.SourceResponse.getRequest(Showing top 7 results out of 315)

origin: codice/ddf

@Override
public QueryRequest getRequest() {
 return delegate.getRequest();
}
origin: codice/ddf

 private SourceResponse cloneResponse(SourceResponse sourceResponse) {
  List<Result> clonedResults =
    sourceResponse
      .getResults()
      .stream()
      .map(Result::getMetacard)
      .map(m -> new MetacardImpl(m, m.getMetacardType()))
      .map(ResultImpl::new)
      .collect(Collectors.toList());
  return new QueryResponseImpl(
    sourceResponse.getRequest(),
    clonedResults,
    true,
    sourceResponse.getHits(),
    sourceResponse.getProperties());
 }
}
origin: codice/ddf

private void validateInput(SourceResponse sourceResponse, Map<String, Serializable> arguments) {
 if (null == sourceResponse) {
  throw new IllegalArgumentException("Null source response.");
 } else if (null == arguments) {
  throw new IllegalArgumentException("Null argument map.");
 } else if (null == sourceResponse.getResults()) {
  throw new IllegalArgumentException("Null results list.");
 } else if (!isByIdQuery(arguments)
   && null == arguments.get(CswConstants.RESULT_TYPE_PARAMETER)) {
  // An exception is thrown only if the query isn't by ID (i.e. it's not a GetRecordById
  // request) because GetRecordById does not use the ResultType attribute.
  throw new IllegalArgumentException("Null result type argument.");
 } else if (null == sourceResponse.getRequest()) {
  throw new IllegalArgumentException("Null source response query request.");
 } else if (null == sourceResponse.getRequest().getQuery()) {
  throw new IllegalArgumentException("Null source response query.");
 }
}
origin: codice/ddf

/**
 * Construct from an underlying {@link SourceResponse}
 *
 * @param response
 * @param sourceId
 */
public QueryResponseImpl(SourceResponse response, String sourceId) {
 this(
   response == null ? null : response.getRequest(),
   response == null ? null : response.getResults(),
   response == null ? -1 : response.getHits());
 Set<? extends SourceProcessingDetails> sourceDetails = null;
 if (response != null) {
  sourceDetails = response.getProcessingDetails();
  this.setProperties(response.getProperties());
 } else {
  setProperties(new HashMap<String, Serializable>());
 }
 // Not every response will contain details
 if (sourceDetails != null) {
  for (SourceProcessingDetails detail : sourceDetails) {
   this.details.add(new ProcessingDetailsImpl(detail, sourceId));
  }
 }
}
origin: codice/ddf

 private int getCount(SourceResponse queryResponse) {
  if (queryResponse == null) {
   return ALL_RESULTS_COUNT_VALUE;
  }

  QueryRequest queryRequest = queryResponse.getRequest();

  if (queryRequest == null) {
   return ALL_RESULTS_COUNT_VALUE;
  }

  Serializable countSerializable = queryRequest.getProperties().get("count");

  if (countSerializable == null) {
   return ALL_RESULTS_COUNT_VALUE;
  }

  try {
   return Integer.valueOf((String) countSerializable);
  } catch (NumberFormatException nfe) {
   return ALL_RESULTS_COUNT_VALUE;
  }
 }
}
origin: codice/ddf

recordCollection.setStartPosition(sourceResponse.getRequest().getQuery().getStartIndex());
origin: codice/ddf

if (sourceResponse.getRequest() != null && sourceResponse.getRequest().getQuery() != null) {
 Element itemsPerPage = feed.addExtension(OpenSearchConstants.ITEMS_PER_PAGE);
 Element startIndex = feed.addExtension(OpenSearchConstants.START_INDEX);
 if (sourceResponse.getRequest().getQuery().getPageSize() > -1) {
  itemsPerPage.setText(
    Integer.toString(sourceResponse.getRequest().getQuery().getPageSize()));
 } else {
  if (sourceResponse.getResults() != null) {
 startIndex.setText(Integer.toString(sourceResponse.getRequest().getQuery().getStartIndex()));
ddf.catalog.operationSourceResponsegetRequest

Popular methods of SourceResponse

  • getResults
    Get the Results of the associated QueryRequest
  • getHits
    The total number of hits matching the associated Query for the associated ddf.catalog.source.Source,
  • getProperties
  • getProcessingDetails
    Get any specific details about the execution of the QueryRequest associated with this SourceResponse
  • containsPropertyName
  • getProcessingErrors
  • getPropertyNames
  • getPropertyValue
  • hasProperties

Popular classes and methods

  • getOriginalFilename (MultipartFile)
  • notifyDataSetChanged (ArrayAdapter)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • JFrame (javax.swing)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)