com.hp.hpl.jena.sparql.core.Var.getVarName()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(5.4k)|赞(0)|评价(0)|浏览(156)

本文整理了Java中com.hp.hpl.jena.sparql.core.Var.getVarName()方法的一些代码示例,展示了Var.getVarName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Var.getVarName()方法的具体详情如下:
包路径:com.hp.hpl.jena.sparql.core.Var
类名称:Var
方法名:getVarName

Var.getVarName介绍

暂无

代码示例

代码示例来源:origin: com.hp.hpl.jena/arq

public void var(Collection<String> acc, Var var)
  {
    acc.add(var.getVarName()) ;
  }
} ;

代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

@Override
  public void var(Collection<String> acc, Var var)
  {
    acc.add(var.getVarName()) ;
  }
} ;

代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

@Override
public String toString()
{ return "(AGG "+
      (var==null?"<>":"?"+var.getVarName())+
      " "+aggregator.toString()+")"; }

代码示例来源:origin: com.hp.hpl.jena/arq

@Override
public String toString()
{ return "(AGG "+
      (var==null?"<>":"?"+var.getVarName())+
      " "+aggregator.toString()+")"; }

代码示例来源:origin: com.hp.hpl.jena/arq

/** Return a list of String names from a collection of variables */ 
  public static List<String> varNames(Collection<Var> vars)
  {
    List<String> x = new ArrayList<String>() ;
    for (Var var : vars)
      x.add(var.getVarName()) ;
    return x ;
  }
}

代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

/** Return a list of String names from a collection of variables */ 
  public static List<String> varNames(Collection<Var> vars)
  {
    List<String> x = new ArrayList<String>() ;
    for (Var var : vars)
      x.add(var.getVarName()) ;
    return x ;
  }
}

代码示例来源:origin: com.hp.hpl.jena/arq

public List<String> getVarNames()
{
  List<String> x = new ArrayList<String>() ;
  x.add(var.getVarName()) ;
  return x ;
}

代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

@Override
public List<String> getVarNames() {
  List<String> x = new ArrayList<String>() ;
  x.add(var.getVarName()) ;
  return x ;
}

代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

/**
 * Creates a simple transform that replaces any occurrence of the given variable with the given expression
 * @param find Variable to find
 * @param replace Expression to replace with
 */
public ExprTransformSubstitute(Var find, Expr replace) {
  if (find == null) throw new IllegalArgumentException("find cannot be null");
  if (replace == null) throw new IllegalArgumentException("replace cannot be null");
  this.replacements.put(find.getVarName(), replace);
}

代码示例来源:origin: com.hp.hpl.jena/arq

public BindingIndex(Binding b)
{
  binding = b ; 
  for ( Iterator<Var> iter = binding.vars() ; iter.hasNext() ; )
  {
    Var var = iter.next() ;
    indexes.add(var.getVarName()) ;
  }
}

代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

@Override
public Iterator<String> varNames()
{ 
  List<String> x = new ArrayList<String>() ;
  for ( Iterator<Var> iter = binding.vars() ; iter.hasNext(); )
  {
    Var v = iter.next();
    x.add(v.getVarName()) ;
  }
  return x.iterator() ;
}

代码示例来源:origin: com.hp.hpl.jena/arq

@Override
public Iterator<String> varNames()
{ 
  List<String> x = new ArrayList<String>() ;
  for ( Iterator<Var> iter = binding.vars() ; iter.hasNext(); )
  {
    Var v = iter.next();
    x.add(v.getVarName()) ;
  }
  return x.iterator() ;
}

代码示例来源:origin: com.hp.hpl.jena/arq

protected void format(StringBuffer sbuff, Var var)
{
  Node node = get(var) ;
  String tmp = FmtUtils.stringForObject(node) ;
  sbuff.append("( ?"+var.getVarName()+" = "+tmp+" )") ;
}

代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

protected void format(StringBuffer sbuff, Var var)
{
  Node node = get(var) ;
  String tmp = FmtUtils.stringForObject(node) ;
  sbuff.append("( ?"+var.getVarName()+" = "+tmp+" )") ;
}

代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

public static void outputVars(IndentedWriter out, List<Var> vars, SerializationContext sContext)
{
  WriterLib.start(out, Tags.tagVars, WriterLib.NoSP) ;
  for ( Var v : vars )
  {
    out.print(" ?") ;
    out.print(v.getVarName()) ;
  }
  WriterLib.finish(out, Tags.tagVars) ;
}

代码示例来源:origin: com.github.ansell.pellet/pellet-query

private ResultBinding convertBinding(Binding binding) {
  ResultBinding pelletBinding = new ResultBindingImpl();
  GraphLoader loader = pellet.getLoader();
  for( Iterator<?> vars = binding.vars(); vars.hasNext(); ) {
    Var var = (Var) vars.next();
    Node value = binding.get( var );
    if( value != null ) {
      ATermAppl pelletVar = ATermUtils.makeVar( var.getVarName() );
      ATermAppl pelletValue = loader.node2term( value );
      pelletBinding.setValue( pelletVar, pelletValue );
    }
  }
  return pelletBinding;
}

代码示例来源:origin: com.hp.hpl.jena/arq

public void visit(ElementBind el)
{
  out.print("BIND(") ;
  FmtExpr v = new FmtExpr(out, context) ;
  v.format(el.getExpr()) ;
  out.print(" AS ") ;
  out.print("?"+el.getVar().getVarName()) ;
  out.print(")") ;
}

代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

@Override
public void visit(ElementAssign el)
{
  out.print("LET (") ;
  out.print("?"+el.getVar().getVarName()) ;
  out.print(" := ") ;
  FmtExprSPARQL v = new FmtExprSPARQL(out, context) ;
  v.format(el.getExpr()) ;
  out.print(")") ;
}

代码示例来源:origin: com.hp.hpl.jena/arq

public void visit(ElementAssign el)
{
  out.print("LET (") ;
  out.print("?"+el.getVar().getVarName()) ;
  out.print(" := ") ;
  FmtExpr v = new FmtExpr(out, context) ;
  v.format(el.getExpr()) ;
  out.print(")") ;
}

代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

@Override
public void visit(ElementBind el)
{
  out.print("BIND(") ;
  FmtExprSPARQL v = new FmtExprSPARQL(out, context) ;
  v.format(el.getExpr()) ;
  out.print(" AS ") ;
  out.print("?"+el.getVar().getVarName()) ;
  out.print(")") ;
}

相关文章