本文整理汇总了Java中org.openrdf.query.algebra.GroupElem类的典型用法代码示例。如果您正苦于以下问题:Java GroupElem类的具体用法?Java GroupElem怎么用?Java GroupElem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GroupElem类属于org.openrdf.query.algebra包,在下文中一共展示了GroupElem类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: make
import org.openrdf.query.algebra.GroupElem; //导入依赖的package包/类
/**
* Make an instance of {@link AggregationsEvaluator} based on a {@link Group} node.
*
* @param aggStateStore - The mechanism for storing aggregation state. (not null)
* @param aggNode - Defines which aggregation functions need to be performed.
* @param groupByVars - The names of the binding whose values are used to group aggregation results. (not null)
* @return The evaluator that handles the node's aggregations.
*/
public static AggregationsEvaluator make(final AggregationStateStore aggStateStore, final Group aggNode, final List<String> groupByVars) {
requireNonNull(aggStateStore);
requireNonNull(aggNode);
requireNonNull(groupByVars);
// The aggregations that need to be performed are the Group Elements.
final List<AggregationElement> aggregations = new ArrayList<>();
for(final GroupElem groupElem : aggNode.getGroupElements()) {
// Figure out the type of the aggregation.
final AggregateOperator operator = groupElem.getOperator();
final Optional<AggregationType> type = AggregationType.byOperatorClass( operator.getClass() );
// If the type is one we support, create the AggregationElement.
if(type.isPresent()) {
final String resultBindingName = groupElem.getName();
final AtomicReference<String> aggregatedBindingName = new AtomicReference<>();
groupElem.visitChildren(new QueryModelVisitorBase<RuntimeException>() {
@Override
public void meet(final Var node) {
aggregatedBindingName.set( node.getName() );
}
});
aggregations.add( new AggregationElement(type.get(), aggregatedBindingName.get(), resultBindingName) );
}
}
return new AggregationsEvaluator(aggStateStore, aggregations, groupByVars);
}
开发者ID:apache,项目名称:incubator-rya,代码行数:39,代码来源:AggregationsEvaluator.java
示例2: meet
import org.openrdf.query.algebra.GroupElem; //导入依赖的package包/类
@Override
public void meet(final GroupElem n) {
final ProjectionElem e = new ProjectionElem();
e.setTargetName(n.getName());
e.setSourceName(n.getName());
e.setSourceExpression(new ExtensionElem(n.getOperator(), n.getName()));
meet(e);
}
开发者ID:dkmfbk,项目名称:knowledgestore,代码行数:9,代码来源:SPARQLRenderer.java
示例3: meet
import org.openrdf.query.algebra.GroupElem; //导入依赖的package包/类
@Override
public void meet(GroupElem node) throws RuntimeException {
setSeen(node);
super.meet(node);
}
开发者ID:lszeremeta,项目名称:neo4j-sparql-extension-yars,代码行数:6,代码来源:SeenVisitor.java
示例4: meet
import org.openrdf.query.algebra.GroupElem; //导入依赖的package包/类
@Override
public void meet(GroupElem node) throws RuntimeException {
check(node);
super.meet(node);
}
开发者ID:lszeremeta,项目名称:neo4j-sparql-extension-yars,代码行数:6,代码来源:ConsistencyVisitor.java
示例5: meet
import org.openrdf.query.algebra.GroupElem; //导入依赖的package包/类
@Override
public void meet(GroupElem arg0) throws Exception {
arg0.visitChildren(this);
}
开发者ID:markusstocker,项目名称:emrooz,代码行数:5,代码来源:SparqlQueryModelVisitor.java
示例6: meet
import org.openrdf.query.algebra.GroupElem; //导入依赖的package包/类
@Override
public void meet(GroupElem arg0) throws SparqlParserException
{
// NO-OP
}
开发者ID:obidea,项目名称:semantika,代码行数:6,代码来源:SparqlQueryHandler.java
注:本文中的org.openrdf.query.algebra.GroupElem类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论