本文整理汇总了Java中com.hp.hpl.jena.sparql.algebra.op.OpPath类的典型用法代码示例。如果您正苦于以下问题:Java OpPath类的具体用法?Java OpPath怎么用?Java OpPath使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OpPath类属于com.hp.hpl.jena.sparql.algebra.op包,在下文中一共展示了OpPath类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visit
import com.hp.hpl.jena.sparql.algebra.op.OpPath; //导入依赖的package包/类
/**
* Visitor for the property path
* @author Simon Skilevic
*/
@Override
public void visit(OpPath opPath) {
// Path subject
Node subject = opPath.getTriplePath().getSubject();
// Path object
Node object = opPath.getTriplePath().getObject();
// Property path
Path tPath = opPath.getTriplePath().getPath();
String stringPath = tPath.toString();
ArrayList<String> pathsStr = TransformerHelper.findAllPossiblePathes(stringPath);
int id=0;
for (String path:pathsStr){
BasicPattern pt = TransformerHelper.transformPathToBasicPattern(subject, path, object);
OpBGP opBGP = new OpBGP(pt);
stack.push(new SqlBGP(opBGP, prefixes));
id++;
if (id>1) {
SqlOp rightOp = stack.pop();
SqlOp leftOp = stack.pop();
stack.push(new SQLUnion(null, leftOp, rightOp, prefixes));
}
}
}
示例2: visit
import com.hp.hpl.jena.sparql.algebra.op.OpPath; //导入依赖的package包/类
public void visit(OpPath opPath) {
wrapInCurrentFilter(opPath);
}
示例3: visit
import com.hp.hpl.jena.sparql.algebra.op.OpPath; //导入依赖的package包/类
public void visit(OpPath opPath) {
visit(opPath.getTriplePath().asTriple());
}
示例4: transform
import com.hp.hpl.jena.sparql.algebra.op.OpPath; //导入依赖的package包/类
@Override
public Op transform(OpPath opPath) {
return substitute(opPath);
}
示例5: transform
import com.hp.hpl.jena.sparql.algebra.op.OpPath; //导入依赖的package包/类
@Override
public Op transform(OpPath opPath) {
return (opPath);
}