本文整理了Java中org.eclipse.rdf4j.query.algebra.Group.getGroupBindingNames()
方法的一些代码示例,展示了Group.getGroupBindingNames()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Group.getGroupBindingNames()
方法的具体详情如下:
包路径:org.eclipse.rdf4j.query.algebra.Group
类名称:Group
方法名:getGroupBindingNames
暂无
代码示例来源:origin: org.eclipse.rdf4j/rdf4j-client
@Override
public Set<String> getBindingNames() {
Set<String> bindingNames = new LinkedHashSet<String>();
bindingNames.addAll(getGroupBindingNames());
bindingNames.addAll(getAggregateBindingNames());
return bindingNames;
}
代码示例来源:origin: eclipse/rdf4j
@Override
public Set<String> getBindingNames() {
Set<String> bindingNames = new LinkedHashSet<>();
bindingNames.addAll(getGroupBindingNames());
bindingNames.addAll(getAggregateBindingNames());
return bindingNames;
}
代码示例来源:origin: org.eclipse.rdf4j/rdf4j-queryalgebra-evaluation
public Key(BindingSet bindingSet) {
this.bindingSet = bindingSet;
int nextHash = 0;
for (String name : group.getGroupBindingNames()) {
Value value = bindingSet.getValue(name);
if (value != null) {
nextHash ^= value.hashCode();
}
}
this.hash = nextHash;
}
代码示例来源:origin: de.tudarmstadt.ukp.inception.rdf4j/rdf4j-queryalgebra-evaluation
public Key(BindingSet bindingSet) {
this.bindingSet = bindingSet;
int nextHash = 0;
for (String name : group.getGroupBindingNames()) {
Value value = bindingSet.getValue(name);
if (value != null) {
nextHash ^= value.hashCode();
}
}
this.hash = nextHash;
}
代码示例来源:origin: org.eclipse.rdf4j/rdf4j-client
@Override
public String getSignature() {
StringBuilder b = new StringBuilder();
b.append(this.getClass().getSimpleName());
b.append(" (");
Set<String> bindingNames = getGroupBindingNames();
int count = 0;
for (String name : bindingNames) {
b.append(name);
count++;
if (count < bindingNames.size()) {
b.append(", ");
}
}
b.append(")");
return b.toString();
}
}
代码示例来源:origin: eclipse/rdf4j
@Override
public String getSignature() {
StringBuilder b = new StringBuilder();
b.append(this.getClass().getSimpleName());
b.append(" (");
Set<String> bindingNames = getGroupBindingNames();
int count = 0;
for (String name : bindingNames) {
b.append(name);
count++;
if (count < bindingNames.size()) {
b.append(", ");
}
}
b.append(")");
return b.toString();
}
}
代码示例来源:origin: eclipse/rdf4j
@Override
public Set<String> getAssuredBindingNames() {
Set<String> bindingNames = new LinkedHashSet<>();
bindingNames.addAll(getGroupBindingNames());
bindingNames.retainAll(getArg().getAssuredBindingNames());
return bindingNames;
}
代码示例来源:origin: org.eclipse.rdf4j/rdf4j-client
@Override
public Set<String> getAssuredBindingNames() {
Set<String> bindingNames = new LinkedHashSet<String>();
bindingNames.addAll(getGroupBindingNames());
bindingNames.retainAll(getArg().getAssuredBindingNames());
return bindingNames;
}
代码示例来源:origin: eclipse/rdf4j
@Override
public boolean equals(Object other) {
if (other instanceof Group && super.equals(other)) {
Group o = (Group)other;
return groupBindings.equals(o.getGroupBindingNames())
&& groupElements.equals(o.getGroupElements());
}
return false;
}
代码示例来源:origin: org.eclipse.rdf4j/rdf4j-client
@Override
public boolean equals(Object other) {
if (other instanceof Group && super.equals(other)) {
Group o = (Group)other;
return groupBindings.equals(o.getGroupBindingNames())
&& groupElements.equals(o.getGroupElements());
}
return false;
}
代码示例来源:origin: apache/incubator-rya
@Override
public void init(final ProcessorContext context) {
this.context = context;
// Sort the group by vars so that they will be written to the state store in the same order every time.
final List<String> groupByVars = Lists.newArrayList(aggNode.getGroupBindingNames());
groupByVars.sort(Comparator.naturalOrder());
// Get a reference to the state store that keeps track of aggregation state.
final KeyValueStore<String, AggregationState> stateStore =
(KeyValueStore<String, AggregationState>) context.getStateStore( stateStoreName );
aggStateStore = new KeyValueAggregationStateStore(stateStore, groupByVars);
// Create the aggregation evaluator.
evaluator = AggregationsEvaluator.make(aggStateStore, aggNode, groupByVars);
}
代码示例来源:origin: org.eclipse.rdf4j/rdf4j-client
@Override
public Group clone() {
Group clone = (Group)super.clone();
clone.groupBindings = new LinkedHashSet<String>(getGroupBindingNames());
clone.groupElements = new ArrayList<GroupElem>(getGroupElements().size());
for (GroupElem ge : getGroupElements()) {
clone.addGroupElement(ge.clone());
}
return clone;
}
代码示例来源:origin: eclipse/rdf4j
@Override
public Group clone() {
Group clone = (Group)super.clone();
clone.groupBindings = new LinkedHashSet<>(getGroupBindingNames());
clone.groupElements = new ArrayList<>(getGroupElements().size());
for (GroupElem ge : getGroupElements()) {
clone.addGroupElement(ge.clone());
}
return clone;
}
代码示例来源:origin: org.eclipse.rdf4j/rdf4j-queryalgebra-evaluation
@Override
public boolean equals(Object other) {
if (other instanceof Key && other.hashCode() == hash) {
BindingSet otherSolution = ((Key)other).bindingSet;
for (String name : group.getGroupBindingNames()) {
Value v1 = bindingSet.getValue(name);
Value v2 = otherSolution.getValue(name);
if (!ObjectUtil.nullEquals(v1, v2)) {
return false;
}
}
return true;
}
return false;
}
}
代码示例来源:origin: de.tudarmstadt.ukp.inception.rdf4j/rdf4j-queryalgebra-evaluation
@Override
public boolean equals(Object other) {
if (other instanceof Key && other.hashCode() == hash) {
BindingSet otherSolution = ((Key)other).bindingSet;
for (String name : group.getGroupBindingNames()) {
Value v1 = bindingSet.getValue(name);
Value v2 = otherSolution.getValue(name);
if (!ObjectUtil.nullEquals(v1, v2)) {
return false;
}
}
return true;
}
return false;
}
}
代码示例来源:origin: org.eclipse.rdf4j/rdf4j-queryalgebra-evaluation
private Iterator<BindingSet> createIterator()
throws QueryEvaluationException
{
Collection<Entry> entries = buildEntries();
Set<BindingSet> bindingSets = createSet("bindingsets");
for (Entry entry : entries) {
QueryBindingSet sol = new QueryBindingSet(parentBindings);
for (String name : group.getGroupBindingNames()) {
BindingSet prototype = entry.getPrototype();
if (prototype != null) {
Value value = prototype.getValue(name);
if (value != null) {
// Potentially overwrites bindings from super
sol.setBinding(name, value);
}
}
}
entry.bindSolution(sol);
bindingSets.add(sol);
}
return bindingSets.iterator();
}
代码示例来源:origin: de.tudarmstadt.ukp.inception.rdf4j/rdf4j-queryalgebra-evaluation
private Iterator<BindingSet> createIterator()
throws QueryEvaluationException
{
Collection<Entry> entries = buildEntries();
Set<BindingSet> bindingSets = createSet("bindingsets");
for (Entry entry : entries) {
QueryBindingSet sol = new QueryBindingSet(parentBindings);
for (String name : group.getGroupBindingNames()) {
BindingSet prototype = entry.getPrototype();
if (prototype != null) {
Value value = prototype.getValue(name);
if (value != null) {
// Potentially overwrites bindings from super
sol.setBinding(name, value);
}
}
}
entry.bindSolution(sol);
bindingSets.add(sol);
}
return bindingSets.iterator();
}
代码示例来源:origin: de.tudarmstadt.ukp.inception.rdf4j/rdf4j-spin
@Override
public void meet(Group node)
throws RDFHandlerException
{
group = node;
Set<String> groupNames = node.getGroupBindingNames();
if (!groupNames.isEmpty()) {
Resource groupByList = valueFactory.createBNode();
handler.handleStatement(
valueFactory.createStatement(subject, SP.GROUP_BY_PROPERTY, groupByList));
ListContext groupByCtx = newList(groupByList);
for (String groupName : groupNames) {
Resource var = getVar(groupName);
listEntry(var);
}
endList(groupByCtx);
}
}
代码示例来源:origin: apache/incubator-rya
if(!group.getGroupBindingNames().isEmpty()) {
groupByVariableOrder = new VariableOrder(group.getGroupBindingNames());
} else {
groupByVariableOrder = new VariableOrder();
内容来源于网络,如有侵权,请联系作者删除!