Examples of CswSearchCriteria


Examples of com.esri.gpt.server.csw.client.CswSearchCriteria

* @return the csw search criteria
*/
public static CswSearchCriteria marshallGptToCswClientCriteria2(
    SearchCriteria gptSearchCriteria) {
 
  CswSearchCriteria cswClientCriteria = new CswSearchCriteria();
  cswClientCriteria.setSearchText(
      gptSearchCriteria.getSearchFilterKeyword().getSearchText());
  Envelope gptEnvelope =
    gptSearchCriteria.getSearchFilterSpatial().getEnvelope();
  double maxX = 180;
  double maxY = 90;
  double minX = -180;
  double minY = -90;
  if(gptEnvelope != null && !gptEnvelope.isEmpty() &&
      !gptSearchCriteria.getSearchFilterSpatial().getSelectedBounds().equals(
          ISearchFilterSpatialObj.OptionsBounds.anywhere.toString())) {
    if(!gptEnvelope.isValid()) {
      gptEnvelope.setMaxX(maxX);
      gptEnvelope.setMinX(minX);
      gptEnvelope.setMaxY(maxY);
      gptEnvelope.setMinY(minY);
    }
    if(gptEnvelope.getMinX() < minX || gptEnvelope.getMinX() > maxX) {
      gptEnvelope.setMinX(minX);
    }
    if(gptEnvelope.getMaxX() < minX || gptEnvelope.getMaxX() > maxX) {
      gptEnvelope.setMaxX(maxX);
    }
    if(gptEnvelope.getMaxY() < minY || gptEnvelope.getMaxY() > maxY) {
      gptEnvelope.setMaxY(maxY);
    }
    if(gptEnvelope.getMinY() < minY || gptEnvelope.getMinY() > maxY) {
      gptEnvelope.setMinY(minY);
    }
    cswClientCriteria.setEnvelope(new com.esri.gpt.server.csw.client.Envelope(
      gptEnvelope.getMinX(), gptEnvelope.getMinY(),
      gptEnvelope.getMaxX(), gptEnvelope.getMaxY()));
   
  }
  //Work around reset of pagecursor if there are no totalRecordCounts
  int tmp = gptSearchCriteria.getSearchFilterPageCursor().getTotalPageCount();
 
  gptSearchCriteria.getSearchFilterPageCursor()
    .setTotalRecordCount(Integer.MAX_VALUE);
  cswClientCriteria.setStartPosition(
    gptSearchCriteria.getSearchFilterPageCursor().getStartRecord());
  gptSearchCriteria.getSearchFilterPageCursor()
    .setTotalRecordCount(tmp);
 
  cswClientCriteria.setMaxRecords(
      gptSearchCriteria.getSearchFilterPageCursor().getRecordsPerPage()
      );
 
  boolean bDataWithinExtent = gptSearchCriteria.getSearchFilterSpatial().getSelectedBounds().equals(
      ISearchFilterSpatialObj.OptionsBounds.dataWithinExtent.toString());
  boolean bDataIntersectsWithExtent = gptSearchCriteria.getSearchFilterSpatial().getSelectedBounds().equals(
      ISearchFilterSpatialObj.OptionsBounds.useGeogExtent.toString());
  
  cswClientCriteria.setUseGeographicExtent(bDataIntersectsWithExtent || bDataWithinExtent);
  cswClientCriteria.setEnvelopeIntersects(bDataIntersectsWithExtent);
  cswClientCriteria.setEnvelopeContains(bDataWithinExtent);
  return cswClientCriteria;
}
View Full Code Here

Examples of com.esri.gpt.server.csw.client.CswSearchCriteria

* @return the csw search criteria
*/
public CswSearchCriteria marshallGptToCswClientCriteria(
    SearchCriteria gptSearchCriteria) {
 
  CswSearchCriteria cswClientCriteria =
    marshallGptToCswClientCriteria2(gptSearchCriteria);
 
 
  try {
    if (getCswProfile().isSupportsContentTypeQuery()) {

      cswClientCriteria.setLiveDataAndMapsOnly(gptSearchCriteria
          .getSearchFilterContentTypes().getSelectedContentType()
          .equalsIgnoreCase(AimsContentTypes.liveData.toString()));
    }
  } catch (Exception e) {
    LOG.log(Level.WARNING, "error while setting livedata  value to csw client",
View Full Code Here

Examples of com.esri.gpt.server.csw.client.CswSearchCriteria

  } else if (formatRequestToXsl == FORMAT_SEARCH_TO_XSL.DETAILED_GPT_CSW202) {
    internalRequestXml = SearchEngineCSW.transformGptToCswRequest(criteria,
        SearchEngineCSW.SEARCH_OPERATION.doSearch);
  } else {
    // Default use the MINIMAL XML
    CswSearchCriteria cswSearchCriteria = SearchEngineCSW
        .marshallGptToCswClientCriteria2(criteria);
    internalRequestXml = cswSearchCriteria.toXml();
  }

  LOG.finer("Generated internal XML requst input  to request xsl "
      + internalRequestXml);
  internalRequestXml = getRequestxsltobj().transform(internalRequestXml,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.