Package org.s3b.search.query

Examples of org.s3b.search.query.QueryObject


  public List<IndexResource> search(Person user, String query, Boolean isConjunction, MidResource mresource, List<QueryParameterEntry> queryList){
    m2resource = mresource;
    //mresource = m2resource;
    m2resource.person=user;
    if(query != null && !"".equals(query)){
      QueryObject queryObject = ObjectFactory.getInstance().getQueryObject(user, query, isConjunction, queryList);
      ResultObject resultObject = ObjectFactory.getInstance().getRdfResultObject(null,false);
      resultObject = processQuery(queryObject, resultObject, queryList);
      return resultObject.getSortedResults();
    }
    return null;
View Full Code Here


    boolean prec=false;
    boolean prec2=false;
    boolean prec3=false;
    int rescount = ro.getResults().size();
    //logger.info("RESULTS SEMANTIC START: " + rescount);
    QueryObject _qo = qo;
    ResultObject _ro = ro;
    Boolean first = true;
//    if (_qo.getPostedBy() != null) {
//      min = _qo.getPostedBy().getMinResults();
//      max = _qo.getPostedBy().getMaxResults();
View Full Code Here

  /* (non-Javadoc)
   * @see org.s3b.search.query.expansion.QueryExpansion#processQuery(org.s3b.search.service.QueryObject, boolean)
   */
 
  public QueryObject processQuery(boolean expand, boolean precise) {
    QueryObject result = queryObject;
    if(expand){
    //  pointer = WordNetPointerSwitcher.getPointer(); //switch to next pointer before expansion
//      //logger.info("POINTER TYPE IN USE: "+pointer);
    }
   

    for(QueryParameter qp : result.getParameters()){
      if(!(qp.getType().isPersonType() || qp.getType().isTaxonomyType())){
    //  if(!(qp.getType().isPersonType())){
        QueryParameter newqp = processParameter(qp,expand,precise);
      //  if (!expand)result.clearParameters();
        if (newqp != null){
          if (newqp.getType().equals(qp.getType())) { // extend existing QueryParameter of given type with new entries (here: QP.type = Author)
            intersectValues(qp,newqp);
          } else
            result.addParameter(newqp,false);
         
        }
      }
    }
   
    result.reloadParameters();
   
  return result;
  }
View Full Code Here

   * (non-Javadoc)
   *
   * @see org.s3b.search.query.expansion.QueryExpansion#processQuery(org.s3b.search.service.QueryObject, boolean)
   */
  public QueryObject processQuery(boolean expand,boolean generalize) {
    QueryObject result = queryObject;

    for (QueryParameter qp : result.getParameters()) {
      QueryParameter newqp = processParameter(qp, expand);
      if (newqp != null){
        if (newqp.getType().equals(qp.getType())) { // extend existing QueryParameter of given type with new entries (here: QP.type = Author)
          intersectValues(qp,newqp);
        } else
          result.addParameter(newqp,false);
      }
    }
    result.reloadParameters();
    return result;
  }
View Full Code Here

  }
  /* (non-Javadoc)
   * @see org.s3b.search.query.expansion.QueryExpansion#processQuery(org.s3b.search.service.QueryObject, boolean)
   */
  public QueryObject processQuery(boolean expand, boolean precise) {
    QueryObject result = queryObject;

    for (QueryParameter qp : result.getParameters()) {
      if(!qp.getType().isPersonType()){
        QueryParameter newqp = processParameter(qp,expand,precise);
        if (newqp != null){
          if (newqp.getType().equals(qp.getType())) { // extend existing QueryParameter of given type with new entries (here: QP.type = Author)
            intersectValues(qp,newqp);
           
          } else
            result.addParameter(newqp,false);
        }
      }
    }
    result.reloadParameters();
   
   
    return result;
  }
View Full Code Here

TOP

Related Classes of org.s3b.search.query.QueryObject

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.