本文整理了Java中org.openrdf.query.algebra.Extension.addElement()
方法的一些代码示例,展示了Extension.addElement()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Extension.addElement()
方法的具体详情如下:
包路径:org.openrdf.query.algebra.Extension
类名称:Extension
方法名:addElement
暂无
代码示例来源:origin: org.openrdf.sesame/sesame-queryalgebra-model
public void addElements(Iterable<ExtensionElem> elements) {
for (ExtensionElem pe : elements) {
addElement(pe);
}
}
代码示例来源:origin: org.openrdf.sesame/sesame-queryalgebra-model
public void addElements(ExtensionElem... elements) {
for (ExtensionElem pe : elements) {
addElement(pe);
}
}
代码示例来源:origin: org.openrdf.sesame/sesame-queryalgebra-model
@Override
public Extension clone() {
Extension clone = (Extension)super.clone();
clone.elements = new ArrayList<ExtensionElem>(getElements().size());
for (ExtensionElem elem : getElements()) {
clone.addElement(elem.clone());
}
return clone;
}
}
代码示例来源:origin: org.openrdf.sesame/sesame-spin
private void addSourceExpressions(UnaryTupleOperator op, Collection<ProjectionElem> elems) {
Extension ext = null;
for (ProjectionElem projElem : elems) {
ExtensionElem extElem = projElem.getSourceExpression();
if (extElem != null) {
if (ext == null) {
ext = new Extension(op.getArg());
op.setArg(ext);
}
ext.addElement(extElem);
}
}
}
代码示例来源:origin: Quetzal-RDF/quetzal
ex.addElement(new ExtensionElem(expr, name));
代码示例来源:origin: org.openrdf.sesame/sesame-queryalgebra-evaluation
lostVar.setValue(value);
ext.addElement(new ExtensionElem(lostVar, name));
代码示例来源:origin: org.openrdf.sesame/sesame-queryparser-sparql
@Override
public TupleExpr visit(ASTDescribe node, Object data)
throws VisitorException
{
TupleExpr tupleExpr = (TupleExpr)data;
if (tupleExpr == null) {
tupleExpr = new SingletonSet();
}
Extension e = new Extension();
ProjectionElemList projectionElements = new ProjectionElemList();
for (int i = 0; i < node.jjtGetNumChildren(); i++) {
ValueExpr resource = (ValueExpr)node.jjtGetChild(i).jjtAccept(this, null);
if (resource instanceof Var) {
projectionElements.addElement(new ProjectionElem(((Var)resource).getName()));
}
else {
String alias = "_describe_" + UUID.randomUUID().toString().replaceAll("-", "_");
ExtensionElem elem = new ExtensionElem(resource, alias);
e.addElement(elem);
projectionElements.addElement(new ProjectionElem(alias));
}
}
if (!e.getElements().isEmpty()) {
e.setArg(tupleExpr);
tupleExpr = e;
}
Projection p = new Projection(tupleExpr, projectionElements);
return new DescribeOperator(p);
}
代码示例来源:origin: org.openrdf.sesame/sesame-queryalgebra-evaluation
private void renameVar(Var oldVar, Var newVar, Filter filter) {
filter.getArg().visit(new VarRenamer(oldVar, newVar));
// TODO: skip this step if old variable name is not used
// Replace SameTerm-filter with an Extension, the old variable name
// might still be relevant to nodes higher in the tree
Extension extension = new Extension(filter.getArg());
extension.addElement(new ExtensionElem(new Var(newVar.getName()), oldVar.getName()));
filter.replaceWith(extension);
}
代码示例来源:origin: eu.fbk.rdfpro/rdfpro-rules
newArg.addElement(elem.clone());
extension.getElements().remove(elem);
dirty = true;
代码示例来源:origin: org.openrdf.sesame/sesame-sail-rdbms
private void renameVar(Var oldVar, Var newVar, Filter filter) {
filter.getArg().visit(new VarRenamer(oldVar.getName(), newVar.getName()));
// TODO: skip this step if old variable name is not used
// Replace SameTerm-filter with an Extension, the old variable name
// might still be relevant to nodes higher in the tree
Extension extension = new Extension(filter.getArg());
extension.addElement(new ExtensionElem(new Var(newVar.getName()), oldVar.getName()));
filter.replaceWith(extension);
}
代码示例来源:origin: org.openrdf.sesame/sesame-queryparser-serql
if (alias != null) {
extension.addElement(new ExtensionElem(valueExpr, alias));
projElemList.addElement(new ProjectionElem(alias));
代码示例来源:origin: org.openrdf.sesame/sesame-queryparser-sparql
extension.addElement(new ExtensionElem(ve, alias));
代码示例来源:origin: org.openrdf.sesame/sesame-queryparser-sparql
extension.addElement(elem);
代码示例来源:origin: org.openrdf.sesame/sesame-queryparser-sparql
Var anonVar = createAnonVar();
expr.replaceChildNode(operator, anonVar);
anonymousExtension.addElement(new ExtensionElem(operator, anonVar.getName()));
extension.addElement(extElem);
elem.setSourceExpression(extElem);
extension.addElement(extElem);
elem.setSourceExpression(extElem);
代码示例来源:origin: org.openrdf.sesame/sesame-queryparser-sparql
extension.addElement(pe);
代码示例来源:origin: org.openrdf.sesame/sesame-queryparser-sparql
extension.addElement(pe);
内容来源于网络,如有侵权,请联系作者删除!