Package org.geomajas.command.dto

Examples of org.geomajas.command.dto.SearchFeatureRequest


    });
    buttonLayout.addMember(loginButtonLuc);

    // Set up the search command, that will fetch a feature:
    // Searches for ID=1, but we might as well have created a filter on one of the attributes...
    SearchFeatureRequest request = new SearchFeatureRequest();
    request.setBooleanOperator("AND");
    request.setCrs("EPSG:900913"); // Can normally be acquired from the MapModel.
    request.setLayerId("layerBeans");
    request.setMax(1);
    request.setCriteria(new SearchCriterion[] { new SearchCriterion("id", "=", "1") });
    final GwtCommand command = new GwtCommand(SearchFeatureRequest.COMMAND);
    command.setCommandRequest(request);

    // Create a button that executes the search command:
    IButton editFeatureButton = new IButton(I18nProvider.getSampleMessages().attributeSecurityButtonTitle());
View Full Code Here


  public void search() {
    if (layer != null) {
      // First we try to get the list of criteria:
      List<SearchCriterion> criteria = getSearchCriteria();
      if (criteria != null && !criteria.isEmpty()) {
        SearchFeatureRequest request = new SearchFeatureRequest();
        String value = (String) logicalOperatorRadio.getValue();
        if (value.equals(I18nProvider.getSearch().radioOperatorAnd())) {
          request.setBooleanOperator("AND");
        } else {
          request.setBooleanOperator("OR");
        }
        request.setCriteria(criteria.toArray(new SearchCriterion[criteria.size()]));
        request.setCrs(mapModel.getCrs());
        request.setLayerId(layer.getServerLayerId());
        request.setMax(maximumResultSize);
        request.setFilter(layer.getFilter());
        request.setFeatureIncludes(GwtCommandDispatcher.getInstance().getLazyFeatureIncludesSelect());

        GwtCommand command = new GwtCommand(SearchFeatureRequest.COMMAND);
        command.setCommandRequest(request);
        GwtCommandDispatcher.getInstance().execute(command, new CommandCallback() {
View Full Code Here

        }
      }
    }
    if (criteria.size() > 0) {
      Feature first = features.get(0);
      SearchFeatureRequest request = new SearchFeatureRequest();
      request.setBooleanOperator("OR");
      request.setCriteria(criteria.toArray(new SearchCriterion[criteria.size()]));
      request.setCrs(first.getLayer().getMapModel().getCrs());
      request.setLayerId(first.getLayer().getServerLayerId());
      request.setMax(0);
      request.setFilter(first.getLayer().getFilter());
      request.setFeatureIncludes(featureIncludes);

      GwtCommand command = new GwtCommand(SearchFeatureRequest.COMMAND);
      command.setCommandRequest(request);
      GwtCommandDispatcher.getInstance().execute(command, new CommandCallback() {
View Full Code Here

  }

  public void search(String crs, final Layer<?> layer, SearchCriterion[] criteria, final FeatureCallback callback) {
    if (layer instanceof FeaturesSupported) {
      FeaturesSupported fs = (FeaturesSupported) layer;
      SearchFeatureRequest request = new SearchFeatureRequest();
      request.setBooleanOperator("OR");
      request.setCriteria(criteria);
      request.setMax(resultSize);
      request.setLayerId(layer.getServerLayerId());
      request.setCrs(crs);
      request.setFilter(fs.getFilter());
      request.setFeatureIncludes(11);

      Command command = new Command(SearchFeatureRequest.COMMAND);
      command.setCommandRequest(request);
      commandService.execute(command, new CommandCallback() {
View Full Code Here

TOP

Related Classes of org.geomajas.command.dto.SearchFeatureRequest

Copyright © 2018 www.massapicom. 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.