本文整理了Java中org.apache.jena.query.Query.addOrderBy
方法的一些代码示例,展示了Query.addOrderBy
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.addOrderBy
方法的具体详情如下:
包路径:org.apache.jena.query.Query
类名称:Query
方法名:addOrderBy
暂无
代码示例来源:origin: apache/jena
/**
* Add an expression to the order by clause.
* @param expr The expression to add.
* @param order The direction of the ordering.
*/
public void addOrderBy(Expr expr, Order order) {
query.addOrderBy(expr, order == Order.ASCENDING ? Query.ORDER_ASCENDING
: Query.ORDER_DESCENDING);
}
代码示例来源:origin: apache/jena
/**
* Add an order by clause
* @param condition The SortCondition to add to the order by.
*/
public void addOrderBy(SortCondition condition) {
query.addOrderBy(condition);
}
代码示例来源:origin: apache/jena
/**
* Add a var to the order by clause.
* @param var The var to sort by.
* @param order The direction of the ordering.
*/
public void addOrderBy(Var var, Order order) {
query.addOrderBy(var, order == Order.ASCENDING ? Query.ORDER_ASCENDING
: Query.ORDER_DESCENDING);
}
代码示例来源:origin: apache/jena
/**
* Add an expression to the order by clause.
* Sorts in Default order.
* @param expr The expression to add.
*/
public void addOrderBy(Expr expr) {
query.addOrderBy(expr, Query.ORDER_DEFAULT);
}
代码示例来源:origin: org.apache.jena/jena-querybuilder
/**
* Add an expression to the order by clause.
* @param expr The expression to add.
* @param order The direction of the ordering.
*/
public void addOrderBy(Expr expr, Order order) {
query.addOrderBy(expr, order == Order.ASCENDING ? Query.ORDER_ASCENDING
: Query.ORDER_DESCENDING);
}
代码示例来源:origin: apache/jena
/**
* Add a var to the order by clause.
* Sorts in default order
* @param var The var to use for sorting
*/
public void addOrderBy(Var var) {
query.addOrderBy(var, Query.ORDER_DEFAULT);
}
代码示例来源:origin: org.apache.jena/jena-querybuilder
/**
* Add an expression to the order by clause.
* Sorts in Default order.
* @param expr The expression to add.
*/
public void addOrderBy(Expr expr) {
query.addOrderBy(expr, Query.ORDER_DEFAULT);
}
代码示例来源:origin: org.apache.jena/jena-querybuilder
/**
* Add an order by clause
* @param condition The SortCondition to add to the order by.
*/
public void addOrderBy(SortCondition condition) {
query.addOrderBy(condition);
}
代码示例来源:origin: org.apache.jena/jena-querybuilder
/**
* Add a var to the order by clause.
* Sorts in default order
* @param var The var to use for sorting
*/
public void addOrderBy(Var var) {
query.addOrderBy(var, Query.ORDER_DEFAULT);
}
代码示例来源:origin: org.apache.jena/jena-querybuilder
/**
* Add a var to the order by clause.
* @param var The var to sort by.
* @param order The direction of the ordering.
*/
public void addOrderBy(Var var, Order order) {
query.addOrderBy(var, order == Order.ASCENDING ? Query.ORDER_ASCENDING
: Query.ORDER_DESCENDING);
}
代码示例来源:origin: apache/jena
public void addOrderBy(Expr expr, int direction)
{
SortCondition sc = new SortCondition(expr, direction) ;
addOrderBy(sc) ;
}
代码示例来源:origin: apache/jena
@Override
public void visitOrderBy(Query query) {
if (query.hasOrderBy()) {
for (SortCondition sc : query.getOrderBy())
newQuery.addOrderBy(sc);
}
}
代码示例来源:origin: SmartDataAnalytics/jena-sparql-api
@Override
public void visitOrderBy(Query query) {
if ( query.hasOrderBy() ) {
for (SortCondition sc : query.getOrderBy())
newQuery.addOrderBy(sc) ;
}
}
代码示例来源:origin: apache/jena
public void addOrderBy(Node var, int direction)
{
if ( ! var.isVariable() )
throw new QueryException("Not a variable: "+var) ;
SortCondition sc = new SortCondition(var, direction) ;
addOrderBy(sc) ;
}
代码示例来源:origin: SmartDataAnalytics/jena-sparql-api
public static Query createQueryList(OrderedConcept orderedConcept, Long limit, Long offset) {
Concept concept = orderedConcept.getConcept();
Query result = createQueryList(concept, limit, offset);
for(SortCondition sc : orderedConcept.getOrderBy()) {
result.addOrderBy(sc);
}
return result;
}
代码示例来源:origin: SmartDataAnalytics/jena-sparql-api
public static Query createQueryList(OrderedConcept orderedConcept, Range<Long> range) {
Concept concept = orderedConcept.getConcept();
Query result = createQueryList(concept, range);
for(SortCondition sc : orderedConcept.getOrderBy()) {
result.addOrderBy(sc);
}
return result;
}
代码示例来源:origin: apache/jena
public void addOrderBy(String varName, int direction)
{
varName = Var.canonical(varName) ;
SortCondition sc = new SortCondition(new ExprVar(varName), direction) ;
addOrderBy(sc) ;
}
代码示例来源:origin: apache/jena
/**
* Copy all the modifications from the Solution Modifier argument
* @param solutionModifier The solution modifier to copy from.
*/
public void addAll(SolutionModifierHandler solutionModifier) {
List<SortCondition> lst = solutionModifier.query.getOrderBy();
if (lst != null) {
for (SortCondition sc : lst) {
query.addOrderBy(sc);
}
}
query.getGroupBy().addAll(solutionModifier.query.getGroupBy());
query.getHavingExprs().addAll(solutionModifier.query.getHavingExprs());
query.setLimit(solutionModifier.query.getLimit());
query.setOffset(solutionModifier.query.getOffset());
}
代码示例来源:origin: SmartDataAnalytics/jena-sparql-api
@Override
public void visit(OpProject opProject)
{
/*
if(dialect.equals(Dialect.VIRTUOSO)) {
if(opProject.getSubOp() instanceof OpExtend) {
//Set<Var> vars = GetVarsMentioned.getVarsMentioned(opProject.getSubOp());
//OpProject project = new OpProject(opExtend, new ArrayList<Var>(vars));
Query query = MyOpAsQuery.asQuery(opProject);
//System.out.println(query);
ElementSubQuery elt = new ElementSubQuery(query);
ElementGroup g = currentGroup() ;
g.addElement(elt) ;
return;
}
}*/
// Defer adding result vars until the end.
// OpGroup generates dupes otherwise
this.projectVars = opProject.getVars();
opProject.getSubOp().visit(this) ;
}
代码示例来源:origin: org.apache.jena/jena-querybuilder
/**
* Copy all the modifications from the Solution Modifier argument
* @param solutionModifier The solution modifier to copy from.
*/
public void addAll(SolutionModifierHandler solutionModifier) {
List<SortCondition> lst = solutionModifier.query.getOrderBy();
if (lst != null) {
for (SortCondition sc : lst) {
query.addOrderBy(sc);
}
}
query.getGroupBy().addAll(solutionModifier.query.getGroupBy());
query.getHavingExprs().addAll(solutionModifier.query.getHavingExprs());
query.setLimit(solutionModifier.query.getLimit());
query.setOffset(solutionModifier.query.getOffset());
}
内容来源于网络,如有侵权,请联系作者删除!