Examples of Search


Examples of org.owasp.webscarab.plugin.search.Search

        Compare compare = new Compare(framework);
        framework.addPlugin(compare);
        ComparePanel comparePanel = new ComparePanel(compare);
        uif.addPlugin(comparePanel);
       
        Search search = new Search(framework);
        framework.addPlugin(search);
        SearchPanel searchPanel = new SearchPanel(search);
        uif.addPlugin(searchPanel);
       
        Saml saml = new Saml(framework, samlProxy);
View Full Code Here

Examples of org.rstudio.studio.client.workbench.views.source.editors.text.ace.Search

      {
         incrementalSearchPosition_ = null;
      }
     
      // do the search
      Search search = Search.create(searchString,
                                    findType != FindType.Forward,
                                    wrap,
                                    !ignoreCase,
                                    wholeWord,
                                    position,
                                    range,
                                    regex);
  
      try
      {
         Range resultRange = search.find(editor_.getSession());
         if (resultRange == null)
         {
            if (!incremental)
            {
               globalDisplay_.showMessage(GlobalDisplay.MSG_INFO,
View Full Code Here

Examples of org.sakaiproject.entitybus.entityprovider.search.Search

     *
     * @param params the request params from a request (do not include headers)
     * @return a search filter object
     */
    public static Search makeSearchFromRequestParams(Map<String, Object> params) {
        Search search = new Search();
        int page = -1;
        int limit = -1;
        try {
            if (params != null) {
                for (Entry<String, Object> entry : params.entrySet()) {
                    String key = entry.getKey();
                    // filter out certain keys
                    if (getIgnoreSet().contains(key)) {
                        continue; // skip this key
                    }
                    Object value = entry.getValue();
                    if (value == null) {
                        // in theory this should not happen
                        continue;
                    } else if (value.getClass().isArray()) {
                        // use the value as is
                    } else {
                        // get paging values out if possible
                        if ("_limit".equals(key)
                                || "_perpage".equals(key)
                                || "perpage".equals(key)
                                || "count".equals(key)
                                || "itemsPerPage".equals(key)) {
                            try {
                                limit = Integer.valueOf(value.toString()).intValue();
                                search.setLimit(limit);
                            } catch (NumberFormatException e) {
                                System.out.println("WARN Invalid non-number passed in for _limit/_perpage param: " + value + ":" + e);
                            }
                            continue;
                        } else if ("_start".equals(key)
                                || "startIndex".equals(key)) {
                            try {
                                int start = Integer.valueOf(value.toString()).intValue();
                                search.setStart(start);
                            } catch (NumberFormatException e) {
                                System.out.println("WARN Invalid non-number passed in for '_start' param: " + value + ":" + e);
                            }
                            continue;
                        } else if ("_page".equals(key)
                                || "page".equals(key)
                                || "startPage".equals(key)) {
                            try {
                                page = Integer.valueOf(value.toString()).intValue();
                            } catch (NumberFormatException e) {
                                System.out.println("WARN Invalid non-number passed in for '_page' param: " + value + ":" + e);
                            }
                            continue;
                        } else if ("_order".equals(key)
                                || "_sort".equals(key)
                                || "sort".equals(key)) {
                            if (value != null) {
                                String val = value.toString();
                                String[] sortBy = new String[] {val};
                                if (val.indexOf(',') > 0) {
                                    // multiple sort params
                                    sortBy = val.split(",");
                                }
                                try {
                                    for (int i = 0; i < sortBy.length; i++) {
                                        String sortItem = sortBy[i].trim();
                                        if (sortItem.endsWith("_reverse")) {
                                            search.addOrder( new Order(sortItem.substring(0, sortItem.length()-8), false) );
                                        } else if (sortItem.endsWith("_desc")) {
                                            search.addOrder( new Order(sortItem.substring(0, sortItem.length()-5), false) );
                                        } else if (sortItem.endsWith("_asc")) {
                                            search.addOrder( new Order(sortItem.substring(0, sortItem.length()-4)) );
                                        } else {
                                            search.addOrder( new Order(sortItem) );
                                        }
                                    }
                                } catch (RuntimeException e) {
                                    System.out.println("WARN Failed while getting the sort/order param: " + val + ":" + e);
                                }
                            }
                            continue;
                        } else if ("_searchTerms".equals(key)
                                || "searchTerms".equals(key)) {
                            // indicates a space delimited list of search terms
                            if (value != null) {
                                String val = value.toString();
                                String[] terms = val.split(" ");
                                search.addRestriction( new Restriction("searchTerms", terms) );
                            }
                            continue;
                        }
                    }
                    search.addRestriction( new Restriction(key, value) );
                }
            }
        } catch (Exception e) {
            // failed to translate the request to a search, not really much to do here
            System.out.println("WARN Could not translate entity request into search params: " + e.getMessage() + ":" + e);
        }
        // translate page into start/limit
        if (page > 0) {
            if (limit <= -1) {
                limit = 10; // set to a default value
                search.setLimit(limit);
                System.out.println("WARN page is set without a limit per page, setting per page limit to default value of 10");
            }
            search.setStart( (page-1) * limit );
        }
        return search;
    }
View Full Code Here

Examples of org.waveprotocol.box.webclient.search.Search

          @Override
          public void onWaveSelected(WaveId id) {
            ClientEvents.get().fireEvent(new WaveSelectionEvent(WaveRef.of(id)));
          }
        };
    Search search = SimpleSearch.create(RemoteSearchService.create(), waveStore);
    SearchPresenter.create(search, searchPanel, actionHandler, profiles);
  }
View Full Code Here

Examples of org.wijiscommons.ssaf.search.wrapper.Search

          "request-files/javaClient-requestFiles/search_invocation.xml");
     
      Document searchRequestDocument = ClientDomUtils
          .getDocumentFromFile(searchRequestFile);
     
      Search search = new Search();
      search.setAny(searchRequestDocument.getDocumentElement());

      try
      {
        SearchResponse searchReponse = port.search(search);
        if (searchReponse != null)
View Full Code Here

Examples of redis.seek.Search

    @Test
    public void cache() throws InterruptedException {
        addEntry("MLA98251174", 1287278019);
        Seek seek = new Seek();
        Search search = seek.search("84689862");
        search.text("title", "ipod 160");
        Result result = search.run(1, 0, 50, Order.DESC);
        Set<String> keys = jedis.keys("*:" + Seek.QUERIES_RESULT);
        assertEquals(1, result.getTotalCount());
        assertEquals(1, keys.size());
        Thread.sleep(2000);
        keys = jedis.keys("*:" + Seek.QUERIES_RESULT);
View Full Code Here

Examples of rocks.xmpp.extensions.search.model.Search

                            searchMenuItem.setOnAction(new EventHandler<ActionEvent>() {
                                @Override
                                public void handle(ActionEvent actionEvent) {
                                    SearchManager searchManager = xmppSession.getExtensionManager(SearchManager.class);
                                    try {
                                        Search search = new Search("22*", null, null, null);
                                        searchManager.discoverSearchFields(new Jid("search.dev"));
                                        Search result = searchManager.search(search, new Jid("search.dev"));
                                        for (Search.Item item : result.getItems()) {
                                            System.out.println(item.getJid());
                                        }
                                    } catch (XmppException e) {
                                        e.printStackTrace();
                                    }
View Full Code Here

Examples of search.searchtechniques.Search

                    , td.getInputname().getName()
                    ,toCluster.getSize()
                    ,new Graph(toCluster.getNodes()).countTransitions()
                    ));
           
            Search gs = null;         
            if(td.getSearchType().equals("GA")){
                gs = new GeneticAlgorithmSearch();
            }else if(td.getSearchType().equals("RMHC")){
                gs = new RandomMutationHillClimbingSearch();
            }else{
                throw new RuntimeException(String.format("Chosen search type %s is not a valid option", td.getSearchType()));
            }
           

            gs.setPopulationSize(td.getPopsize());
            gs.setChromosomeSize(td.getChromesize());
            gs.setGenerations(td.getNumgens());
            gs.setFitnessFunction(fitnessFunction);
            gs.setInput(toCluster);
            gs.setGeneType(td.getGeneType());
     
      gs.setExperimentName(td.getExperimentName());

      gs.setFitnessBudget(td.getFitnessBudget());

           
            SearchResult sr = null;
            gs.setProgressStatus(monitor);

            gs.setName(td.getInputname().toString());

            sr = gs.start();

     

            td.setResult(sr);
            try {
View Full Code Here

Examples of unify.data.Search

          //Unused
          break;
        case TableModelEvent.UPDATE:
          ArrayList<Search> searches = new ArrayList<Search>();
          searches.addAll(Settings.getInstance().getSearches());
          Search search = searches.get(row);
          String label = search.getLabel();
          String url = search.getLink();
          String value = (String) searchTableModel.getValueAt(row, col);
          if(col==0 && !value.isEmpty()) {
            label = value;
          }
          if(col==1) {
            try {
              new URL(value);
              if(value.contains("#showtitle#")) {
                url = value;
              }
              else {
                JOptionPane.showMessageDialog(frame, value + " must contain the search parameter #showtitle#, please try again.", "Warning: Invalid url", JOptionPane.ERROR_MESSAGE);   
              }
            }
            catch (MalformedURLException exception) {
              //searchTableModel.setValueAt(""+url,row, col);
              JOptionPane.showMessageDialog(frame, value + " is not a valid url, please try again.", "Warning: Invalid url", JOptionPane.ERROR_MESSAGE);
            }

          }
          search.setLabel(label);
          search.setLink(url);
          updatesearchTable(true);
          break;
        case TableModelEvent.DELETE:
          //Unused
          break;
View Full Code Here

Examples of weibo4j.Search

public class SearchSuggestionsApps {

  public static void main(String[] args) {
    Weibo weibo = new Weibo();
    weibo.setToken(args[0]);
    Search search = new Search();
    try {
      search.searchSuggestionsApps(args[1], 10);
    } catch (WeiboException e) {
      e.printStackTrace();
    }

  }
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.