org.openrdf.query.BooleanQuery.setIncludeInferred()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(98)

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

BooleanQuery.setIncludeInferred介绍

暂无

代码示例

代码示例来源:origin: org.openrdf.sesame/sesame-repository-sail

@Override
public BooleanQuery prepare(ParsedBooleanQuery askQuery) {
  BooleanQuery query = new SailBooleanQuery(askQuery, con);
  query.setIncludeInferred(includeInferred);
  return query;
}

代码示例来源:origin: org.openrdf.sesame/sesame-sail-spin

@Override
public BooleanQuery prepare(ParsedBooleanQuery askQuery) {
  BooleanQuery query = new SailConnectionBooleanQuery(askQuery, con);
  query.setIncludeInferred(includeInferred);
  return query;
}

代码示例来源:origin: com.mysema.rdf/rdfbean-sesame2

public static BooleanQuery getQuery(RepositoryConnection connection, ParsedBooleanQuery booleanQueryModel,
    boolean includeInferred) {
  try {
    QUERY_HOLDER.set(booleanQueryModel);
    BooleanQuery booleanQuery = connection.prepareBooleanQuery(DirectQuery.DIRECTQUERY, "");
    booleanQuery.setIncludeInferred(includeInferred);
    return booleanQuery;
  } catch (MalformedQueryException e) {
    throw new RepositoryException(e);
  } catch (org.openrdf.repository.RepositoryException e) {
    throw new RepositoryException(e);
  }
}

代码示例来源:origin: com.mysema.rdf/rdfbean-sesame

public static BooleanQuery getQuery(RepositoryConnection connection, BooleanQueryModel booleanQueryModel,
    boolean includeInferred) {
  try {
    QUERY_HOLDER.set(booleanQueryModel);
    BooleanQuery booleanQuery = connection.prepareBooleanQuery(DirectQuery.DIRECTQUERY, "");
    booleanQuery.setIncludeInferred(includeInferred);
    return booleanQuery;
  } catch (StoreException e) {
    throw new RepositoryException(e);
  } catch (MalformedQueryException e) {
    throw new RepositoryException(e);
  }
}

代码示例来源:origin: com.mysema.rdf/rdfbean-sesame3

public static BooleanQuery getQuery(RepositoryConnection connection, BooleanQueryModel booleanQueryModel,
    boolean includeInferred) {
  try {
    QUERY_HOLDER.set(booleanQueryModel);
    BooleanQuery booleanQuery = connection.prepareBooleanQuery(DirectQuery.DIRECTQUERY, "");
    booleanQuery.setIncludeInferred(includeInferred);
    return booleanQuery;
  } catch (StoreException e) {
    throw new RepositoryException(e);
  } catch (MalformedQueryException e) {
    throw new RepositoryException(e);
  }
}

代码示例来源:origin: org.openrdf.elmo/elmo-repository

public boolean evaluate() throws QueryEvaluationException {
  try {
    RepositoryConnection con = getConnection();
    QueryLanguage ql = getQueryLanguage();
    String query = getQuery();
    String baseURI = getBaseURI();
    BooleanQuery qry = con.prepareBooleanQuery(ql, query, baseURI);
    qry.setDataset(getDataset());
    qry.setIncludeInferred(getIncludeInferred());
    BindingSet bindings = getBindings();
    for (String name : bindings.getBindingNames()) {
      qry.setBinding(name, bindings.getValue(name));
    }
    return qry.evaluate();
  } catch (MalformedQueryException e) {
    throw new QueryEvaluationException(e);
  } catch (RepositoryException e) {
    throw new QueryEvaluationException(e);
  }
}

相关文章