org.eclipse.rdf4j.query.algebra.Var.<init>()方法的使用及代码示例

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

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

Var.<init>介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.rdf4j/rdf4j-queryrender

/**
 * @inheritDoc
 */
public QueryBuilder<T> addProjectionStatement(final String theSubj, final String thePred,
    final String theObj)
{
  if (isConstruct()) {
    mProjectionPatterns.add(
        new StatementPattern(new Var(theSubj), new Var(thePred), new Var(theObj)));
  }
  return this;
}

代码示例来源:origin: org.eclipse.rdf4j/rdf4j-queryrender

/**
 * @inheritDoc
 */
public QueryBuilder<T> addProjectionStatement(final String theSubj, final String thePred,
    final Value theObj)
{
  if (isConstruct()) {
    mProjectionPatterns.add(new StatementPattern(new Var(theSubj), new Var(thePred),
        GroupBuilder.valueToVar(theObj)));
  }
  return this;
}

代码示例来源:origin: org.eclipse.rdf4j/rdf4j-queryrender

/**
 * @inheritDoc
 */
public QueryBuilder<T> addProjectionStatement(IRI theSubj, String thePred, String theObj) {
  if (isConstruct()) {
    mProjectionPatterns.add(new StatementPattern(GroupBuilder.valueToVar(theSubj), new Var(thePred),
        new Var(theObj)));
  }
  return this;
}

代码示例来源:origin: org.eclipse.rdf4j/rdf4j-queryrender

/**
 * @inheritDoc
 */
public QueryBuilder<T> addProjectionStatement(String theSubj, IRI thePred, String theObj) {
  if (isConstruct()) {
    mProjectionPatterns.add(new StatementPattern(new Var(theSubj), GroupBuilder.valueToVar(thePred),
        new Var(theObj)));
  }
  return this;
}

代码示例来源:origin: org.eclipse.rdf4j/rdf4j-queryalgebra-evaluation

public Var createAnonVar(String varName) {
    Var var = new Var(varName);
    var.setAnonymous(true);
    return var;
  }
}

代码示例来源:origin: org.eclipse.rdf4j/rdf4j-queryrender

public static Var valueToVar(Value theValue) {
    Var aVar = new Var("var" + cnt++, theValue);
    aVar.setAnonymous(true);

    return aVar;
  }
}

代码示例来源:origin: org.eclipse.rdf4j/rdf4j-client

public static Var valueToVar(Value theValue) {
    Var aVar = new Var("var" + cnt++, theValue);
    aVar.setAnonymous(true);

    return aVar;
  }
}

代码示例来源:origin: org.eclipse.rdf4j/rdf4j-queryrender

/**
 * @inheritDoc
 */
public QueryBuilder<T> addProjectionStatement(String theSubj, IRI thePred, Value theObj) {
  if (isConstruct()) {
    mProjectionPatterns.add(new StatementPattern(new Var(theSubj), GroupBuilder.valueToVar(thePred),
        GroupBuilder.valueToVar(theObj)));
  }
  return this;
}

代码示例来源:origin: org.eclipse.rdf4j/rdf4j-client

/**
 * @inheritDoc
 */
public QueryBuilder<T> addProjectionStatement(final String theSubj, final Value thePred,
    final Value theObj)
{
  if (isConstruct()) {
    mProjectionPatterns.add(new StatementPattern(new Var(theSubj), GroupBuilder.valueToVar(thePred),
        GroupBuilder.valueToVar(theObj)));
  }
  return this;
}

代码示例来源:origin: org.eclipse.rdf4j/rdf4j-client

/**
 * @inheritDoc
 */
public QueryBuilder<T> addProjectionStatement(String theSubj, IRI thePred, Value theObj) {
  if (isConstruct()) {
    mProjectionPatterns.add(new StatementPattern(new Var(theSubj), GroupBuilder.valueToVar(thePred),
        GroupBuilder.valueToVar(theObj)));
  }
  return this;
}

代码示例来源:origin: org.eclipse.rdf4j/rdf4j-client

/**
 * @inheritDoc
 */
public QueryBuilder<T> addProjectionStatement(IRI theSubj, IRI thePred, String theObj) {
  if (isConstruct()) {
    mProjectionPatterns.add(new StatementPattern(GroupBuilder.valueToVar(theSubj),
        GroupBuilder.valueToVar(thePred), new Var(theObj)));
  }
  return this;
}

代码示例来源:origin: org.eclipse.rdf4j/rdf4j-queryparser-serql

private Var createConstantVar(Value value) {
  Var var = new Var("-const-" + constantVarID++);
  var.setAnonymous(true);
  var.setValue(value);
  return var;
}

代码示例来源:origin: org.eclipse.rdf4j/rdf4j-client

private Var createConstantVar(Value value) {
  Var var = new Var("-const-" + constantVarID++);
  var.setAnonymous(true);
  var.setValue(value);
  return var;
}

代码示例来源:origin: org.eclipse.rdf4j/rdf4j-client

public GroupBuilder<T, E> filter(String theVar, Compare.CompareOp theOp, Value theValue) {
  Compare aComp = new Compare(new Var(theVar), new ValueConstant(theValue), theOp);
  mGroup.addFilter(aComp);
  return this;
}

代码示例来源:origin: org.eclipse.rdf4j/rdf4j-queryrender

public GroupBuilder<T, E> filter(String theVar, Compare.CompareOp theOp, Value theValue) {
  Compare aComp = new Compare(new Var(theVar), new ValueConstant(theValue), theOp);
  mGroup.addFilter(aComp);
  return this;
}

代码示例来源:origin: org.eclipse.rdf4j/rdf4j-queryparser-sparql

@Override
public Var visit(ASTVar node, Object data)
  throws VisitorException
{
  Var var = new Var(node.getName());
  var.setAnonymous(node.isAnonymous());
  return var;
}

代码示例来源:origin: org.eclipse.rdf4j/rdf4j-client

@Override
public Var visit(ASTVar node, Object data)
  throws VisitorException
{
  Var var = new Var(node.getName());
  var.setAnonymous(node.isAnonymous());
  return var;
}

代码示例来源:origin: de.tudarmstadt.ukp.inception.rdf4j/rdf4j-queryalgebra-evaluation

@Override
public void meet(ArbitraryLengthPath node) {
  final Var pathVar = new Var("_anon_" + UUID.randomUUID().toString().replaceAll("-", "_"));
  pathVar.setAnonymous(true);
  // cardinality of ALP is determined based on the cost of a 
  // single ?s ?p ?o ?c pattern where ?p is unbound, compensating for the fact that
  // the length of the path is unknown but expected to be _at least_ twice that of a normal 
  // statement pattern.
  cardinality = 2.0 * getCardinality(new StatementPattern(node.getSubjectVar(), pathVar,
      node.getObjectVar(), node.getContextVar()));
}

代码示例来源:origin: org.eclipse.rdf4j/rdf4j-client

@Override
public Var visit(ASTVar node, Object data)
  throws VisitorException
{
  Var var = new Var(node.getName());
  var.setAnonymous(node.isAnonymous());
  return var;
}

代码示例来源:origin: apache/incubator-rya

@Test
public void toVar_uri() {
  // Setup the string representation of the variable.
  final String varString = String.format(prependConstant("http://Chipotle%s%s"),TYPE_DELIM,XMLSchema.ANYURI );
  // Convert it to a Var object.
  final Var var = FluoStringConverter.toVar(varString);
  // Ensure it converted to the expected result.
  final Var expected = new Var(prependConstant("http://Chipotle"), VF.createIRI("http://Chipotle"));
  expected.setConstant(true);
  assertEquals(expected, var);
}

相关文章