com.hp.hpl.jena.query.Query.setQueryResultStar()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(5.3k)|赞(0)|评价(0)|浏览(97)

本文整理了Java中com.hp.hpl.jena.query.Query.setQueryResultStar方法的一些代码示例,展示了Query.setQueryResultStar的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.setQueryResultStar方法的具体详情如下:
包路径:com.hp.hpl.jena.query.Query
类名称:Query
方法名:setQueryResultStar

Query.setQueryResultStar介绍

[英]Set whether the query had SELECT/DESCRIBE Strictly, this just means whether the projection is
[中]设置查询是否已严格选择/描述,这只意味着投影是否正确

代码示例

代码示例来源:origin: com.hp.hpl.jena/arq

private static Query toQuery(Element pattern)
{
  Query query = QueryFactory.make() ;
  query.setQueryPattern(pattern) ;
  query.setQuerySelectType() ;
  query.setQueryResultStar(true) ;
  return query ;
}

代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

private static Query toQuery(Element pattern)
{
  Query query = QueryFactory.make() ;
  query.setQueryPattern(pattern) ;
  query.setQuerySelectType() ;
  query.setQueryResultStar(true) ;
  return query ;
}

代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

Query convert() {
  if (hasRun) {
    return this.query;
  } else {
    try {
      op.visit(this) ;
      
      Collection<Var> vars = this.projectVars;
      query.setQueryResultStar(vars.isEmpty());   // SELECT * unless we are projecting

      Iterator<Var> iter = vars.iterator();
      for (; iter.hasNext();) {
        Var var = iter.next();           
        if (this.varExpression.containsKey(var))
          query.addResultVar(var, this.varExpression.get(var));
        else
          query.addResultVar(var);
      }
      
      ElementGroup eg = this.currentGroup ;                   
      query.setQueryPattern(eg) ;
      query.setQuerySelectType() ;
      query.setResultVars() ;                     // Variables from the group.
      return query ; 
    } finally {
      this.hasRun = true;
    }
  }
}

代码示例来源:origin: com.hp.hpl.jena/arq

public static Query asQuery(Op op)
{
  Query query = QueryFactory.make() ;
  
  Converter v = new Converter(query) ;
  //OpWalker.walk(op, v) ;
  op.visit(v) ;
  
  List<Var> vars = v.projectVars;
  query.setQueryResultStar(vars.isEmpty()); // SELECT * unless we are projecting
  Iterator<Var> iter = vars.iterator();
  for (; iter.hasNext();) {
    Var var = iter.next();
    if (v.varExpression.containsKey(var))
      query.addResultVar(var, v.varExpression.get(var));
    else
      query.addResultVar(var);
  }
  
  ElementGroup eg = v.currentGroup ;
  query.setQueryPattern(eg) ;
  query.setQuerySelectType() ;
  
  query.setResultVars() ; 
  return query ; 
}

代码示例来源:origin: com.hp.hpl.jena/arq

protected Query elementToQuery(Element pattern)
{
  if ( pattern == null )
    return null ;
  Query query = new Query() ;
  query.setQueryPattern(pattern) ;
  query.setQuerySelectType() ;
  query.setQueryResultStar(true) ;
  query.setResultVars() ;
  return query ;
}

代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

protected Query elementToQuery(Element pattern)
{
  if ( pattern == null )
    return null ;
  Query query = new Query() ;
  query.setQueryPattern(pattern) ;
  query.setQuerySelectType() ;
  query.setQueryResultStar(true) ;
  query.setResultVars() ;
  return query ;
}

代码示例来源:origin: com.hp.hpl.jena/arq

query.setQueryResultStar(true) ;

代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

@Override
public Iterator<Triple> execConstructTriples()
{
  if ( ! query.isConstructType() )
    throw new QueryExecException("Attempt to get a CONSTRUCT model from a "+labelForQuery(query)+" query") ;
  // This causes there to be no PROJECT around the pattern.
  // That in turn, exposes the initial bindings.  
  query.setQueryResultStar(true) ;
  startQueryIterator() ;
  
  Template template = query.getConstructTemplate() ;
  return TemplateLib.calcTriples(template.getTriples(), queryIterator);
}

代码示例来源:origin: com.github.ansell.pellet/pellet-query

q.setQueryResultStar( true );

代码示例来源:origin: com.github.ansell.pellet/pellet-query

q.setQueryResultStar( true );

代码示例来源:origin: com.hp.hpl.jena/arq

getQuery().setQueryResultStar(false) ;
 break;
case STAR:
 jj_consume_token(STAR);
 getQuery().setQueryResultStar(true) ;
 break;
default:

代码示例来源:origin: com.hp.hpl.jena/arq

getQuery().setQueryResultStar(false) ;
 break;
case STAR:
 jj_consume_token(STAR);
 getQuery().setQueryResultStar(true) ;
 break;
default:

代码示例来源:origin: com.hp.hpl.jena/arq

getQuery().setQueryResultStar(false) ;
 break;
case STAR:
 jj_consume_token(STAR);
 getQuery().setQueryResultStar(true) ;
 break;
default:

代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

getQuery().setQueryResultStar(false) ;
 break;
case STAR:
 jj_consume_token(STAR);
 getQuery().setQueryResultStar(true) ;
 break;
default:

代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

getQuery().setQueryResultStar(false) ;
 break;
case STAR:
 jj_consume_token(STAR);
 getQuery().setQueryResultStar(true) ;
 break;
default:

代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

getQuery().setQueryResultStar(false) ;
 break;
case STAR:
 jj_consume_token(STAR);
 getQuery().setQueryResultStar(true) ;
 break;
default:

代码示例来源:origin: com.hp.hpl.jena/arq

v = Var();
        getQuery().addResultVar(v) ;
 getQuery().setQueryResultStar(false) ;
  switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  case VAR1:
case STAR:
 jj_consume_token(STAR);
     getQuery().setQueryResultStar(true) ;
 break;
default:

代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

v = Var();
        getQuery().addResultVar(v) ;
 getQuery().setQueryResultStar(false) ;
  switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  case VAR1:
case STAR:
 jj_consume_token(STAR);
     getQuery().setQueryResultStar(true) ;
 break;
default:

代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

jj_consume_token(RPAREN);
   getQuery().addResultVar(v, expr) ;
  getQuery().setQueryResultStar(false) ;
   break;
  default:
case STAR:
 jj_consume_token(STAR);
     getQuery().setQueryResultStar(true) ;
 break;
default:

代码示例来源:origin: com.hp.hpl.jena/arq

jj_consume_token(RPAREN);
   getQuery().addResultVar(v, expr) ;
  getQuery().setQueryResultStar(false) ;
   break;
  default:
case STAR:
 jj_consume_token(STAR);
     getQuery().setQueryResultStar(true) ;
 break;
default:

相关文章