Package com.browseengine.bobo.api.BrowseSelection

Examples of com.browseengine.bobo.api.BrowseSelection.ValueOperation


 
  public void testSelectionOperation() throws Exception{
    String fakeField = "fake";
    SolrQuery solrQ = new SolrQuery();
   
    ValueOperation op = ValueOperation.ValueOperationAnd;
    BoboRequestBuilder.applySelectionOperation(solrQ, fakeField, op);
    assertEquals(op,BoboRequestBuilder.getSelectionOperation(solrQ, fakeField));
   
    solrQ = new SolrQuery();
        op = ValueOperation.ValueOperationOr;
View Full Code Here


 
  public static BrowseRequestBPO.Selection convert(BrowseSelection sel){
    String name = sel.getFieldName();
    String[] vals = sel.getValues();
    String[] notVals = sel.getNotValues();
    ValueOperation op =sel.getSelectionOperation();
    Properties props = sel.getSelectionProperties();
   
    BrowseRequestBPO.Selection.Builder selBuilder = BrowseRequestBPO.Selection.newBuilder();
    selBuilder.setName(name);
    selBuilder.addAllValues(Arrays.asList(vals));
View Full Code Here

        JSONArray excludes = jsonParams.optJSONArray(RequestConverter2.SELECTIONS_TERMS_EXCLUDES);
        String operator = jsonParams.optString(RequestConverter2.SELECTIONS_TERMS_OPERATOR,  RequestConverter2.SELECTIONS_TERMS_OPERATOR_OR);
        if(facet!= null && (values != null || excludes != null))
        {
          BrowseSelection sel = new BrowseSelection(facet);
          ValueOperation op = ValueOperation.ValueOperationOr;
          if(RequestConverter2.SELECTIONS_TERMS_OPERATOR_AND.equals(operator))
            op = ValueOperation.ValueOperationAnd;

          if(values != null && values.length()>0){
            sel.setValues(formatValues(facet, getStrings(values), facetInfoMap));
View Full Code Here

        }
      }

      String op = conf.getString(PARAM_SELECT_OP, PARAM_SELECT_OP_OR);

      ValueOperation valOp;
      if (PARAM_SELECT_OP_OR.equals(op))
      {
        valOp = ValueOperation.ValueOperationOr;
      }
      else if (PARAM_SELECT_OP_AND.equals(op))
View Full Code Here

TOP

Related Classes of com.browseengine.bobo.api.BrowseSelection.ValueOperation

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.