本文整理了Java中com.hp.hpl.jena.sparql.core.Var.toString()
方法的一些代码示例,展示了Var.toString()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Var.toString()
方法的具体详情如下:
包路径:com.hp.hpl.jena.sparql.core.Var
类名称:Var
方法名:toString
暂无
代码示例来源:origin: com.hp.hpl.jena/arq
public String asSparqlExpr() { return varNode.toString() ; }
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq
public String asSparqlExpr() { return varNode.toString() ; }
代码示例来源:origin: com.hp.hpl.jena/arq
@Override
public String toString() { return varNode.toString() ; }
}
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq
@Override
public String toString() { return varNode.toString() ; }
}
代码示例来源:origin: com.hp.hpl.jena/arq
public String toPrefixString() { return varNode.toString() ; }
// As an expression (aggregators override this).
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq
public String toPrefixString() { return varNode.toString() ; }
// As an expression (aggregators override this).
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq
/**
* Creates a user defined function definition
* @param uri Function URL
* @param e Expression
* @param argList Arguments
*/
public UserDefinedFunctionDefinition(String uri, Expr e, List<Var> argList) {
this.uri = uri;
this.expr = e;
this.argList = new ArrayList<Var>(argList);
//Verify that all mentioned variables are in the arguments list
Set<Var> mentioned = this.expr.getVarsMentioned();
for (Var v : mentioned) {
if (!argList.contains(v)) throw new ExprBuildException("Cannot use the variable " + v.toString() + " in the expression since it is not included in the argList argument. All variables must be arguments to the function");
}
//If used variables is greater than argument variables this is an error
if (mentioned.size() > this.argList.size()) throw new ExprBuildException("Mismatch between variables used in expression and number of variables in argument list, expected " + this.argList.size() + " but found " + mentioned.size());
//May have more arguments than used, however this only gives warning(s)
if (mentioned.size() < this.argList.size()) {
for (Var v : this.argList) {
if (!mentioned.contains(v) && warnOnUnusedVariable) LOG.warn("Function <" + uri + "> has argument " + v + " which is never used in the expression");
}
}
}
代码示例来源:origin: com.hp.hpl.jena/arq
void appendVarList(Query query, IndentedWriter sb, List<String> vars)
{
boolean first = true ;
for ( String varName : vars )
{
Var var = Var.alloc(varName) ;
if ( ! first )
sb.print(" ") ;
sb.print(var.toString()) ;
first = false ;
}
}
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq
void appendVarList(Query query, IndentedWriter sb, List<String> vars)
{
boolean first = true ;
for ( String varName : vars )
{
Var var = Var.alloc(varName) ;
if ( ! first )
sb.print(" ") ;
sb.print(var.toString()) ;
first = false ;
}
}
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq
private void writeVarList(List<Var> vars)
{
start() ;
boolean first = true ;
for (Var var : vars)
{
if ( ! first )
out.print(" ") ;
first = false ;
out.print(var.toString()) ;
}
finish() ;
}
代码示例来源:origin: com.hp.hpl.jena/arq
private void writeVarList(List<Var> vars)
{
start() ;
boolean first = true ;
for (Var var : vars)
{
if ( ! first )
out.print(" ") ;
first = false ;
out.print(var.toString()) ;
}
finish() ;
}
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq
@Override
protected void details(IndentedWriter out, SerializationContext cxt)
{
out.print(Utils.className(this)) ;
out.print(" ?"+var.toString()+" = "+FmtUtils.stringForNode(node, cxt)) ;
}
}
代码示例来源:origin: fr.inria.eventcloud/eventcloud-core
StringBuilder query = new StringBuilder();
query.append("SELECT ");
query.append(PublishSubscribeConstants.SUBSCRIPTION_ID_VAR.toString());
query.append(" WHERE {\n GRAPH ");
query.append(NodeFmtLib.str(PublishSubscribeConstants.SUBSCRIPTION_NS_NODE));
query.append(NodeFmtLib.str(PublishSubscribeConstants.SUBSCRIPTION_ID_NODE));
query.append(' ');
query.append(PublishSubscribeConstants.SUBSCRIPTION_ID_VAR.toString());
query.append(" .\n }\n}");
代码示例来源:origin: com.hp.hpl.jena/arq
private void writeNamedExprList(VarExprList project)
{
start() ;
boolean first = true ;
for ( Var v : project.getVars() )
{
if ( ! first )
out.print(" ") ;
first = false ;
Expr expr = project.getExpr(v) ;
if ( expr != null )
{
start() ;
out.print(v.toString()) ;
out.print(" ") ;
WriterExpr.output(out, expr, sContext) ;
finish() ;
}
else
out.print(v.toString()) ;
}
finish() ;
}
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq
private void writeNamedExprList(VarExprList project)
{
start() ;
boolean first = true ;
for ( Var v : project.getVars() )
{
if ( ! first )
out.print(" ") ;
first = false ;
Expr expr = project.getExpr(v) ;
if ( expr != null )
{
start() ;
out.print(v.toString()) ;
out.print(" ") ;
String $ = WriterExpr.asString(expr) ;
WriterExpr.output(out, expr, sContext) ;
finish() ;
}
else
out.print(v.toString()) ;
}
finish() ;
}
代码示例来源:origin: com.hp.hpl.jena/arq
sb.print(var.toString()) ;
sb.print(var.toString()) ;
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq
sep = SEP ;
Var var = Var.alloc(v) ;
w.write(var.toString()) ;
vars.add(var) ;
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq
sb.print(var.toString()) ;
sb.print(var.toString()) ;
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq
String str = agg.getAggregator().toPrefixString() ;
start() ;
out.print(v.toString()) ;
out.print(" ") ;
out.print(str) ;
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq
out.print(v.toString()) ;
内容来源于网络,如有侵权,请联系作者删除!