Package org.openrdf.sail.rdbms.algebra

Examples of org.openrdf.sail.rdbms.algebra.SelectProjection


   * an implied value.
   */
  private void addProjectionsFromUnion(SelectQuery query, UnionItem union) {
    for (ColumnVar var : union.getSelectColumns()) {
      if (!query.hasSqlSelectVarName(var.getName())) {
        SelectProjection proj = new SelectProjection();
        proj.setVar(var);
        proj.setId(new RefIdColumn(var));
        proj.setStringValue(coalesce(new URIColumn(var), new BNodeColumn(var), new LabelColumn(var),
            new LongLabelColumn(var), new LongURIColumn(var)));
        proj.setDatatype(new DatatypeColumn(var));
        proj.setLanguage(new LanguageColumn(var));
        query.addSqlSelectVar(proj);
      }
    }
  }
View Full Code Here


      }
      else {
        vars.put(var.getName(), var);
      }
      if (!var.isHiddenOrConstant() && value == null) {
        SelectProjection proj = new SelectProjection();
        proj.setVar(var);
        proj.setId(new RefIdColumn(var));
        proj.setStringValue(coalesce(new URIColumn(var), new BNodeColumn(var), new LabelColumn(var),
            new LongLabelColumn(var), new LongURIColumn(var)));
        proj.setDatatype(new DatatypeColumn(var));
        proj.setLanguage(new LanguageColumn(var));
        query.addSqlSelectVar(proj);
      }
    }
    if (contexts.length > 0) {
      RdbmsResource[] ids = vf.asRdbmsResource(contexts);
View Full Code Here

      ProjectionElemList list = node.getProjectionElemList();
      for (ProjectionElem e : list.getElements()) {
        String source = e.getSourceName();
        String target = e.getTargetName();
        bindingVars.put(target, source);
        SelectProjection s = query.getSelectProjection(source);
        if (s != null) {
          selection.add(s);
        }
      }
      query.setBindingVars(bindingVars);
View Full Code Here

      }
      else {
        vars.put(var.getName(), var);
      }
      if (!var.isHidden() && value == null) {
        SelectProjection proj = new SelectProjection();
        proj.setVar(var);
        proj.setId(new RefIdColumn(var));
        proj.setStringValue(coalesce(new URIColumn(var), new BNodeColumn(var), new LabelColumn(var),
            new LongLabelColumn(var), new LongURIColumn(var)));
        proj.setDatatype(new DatatypeColumn(var));
        proj.setLanguage(new LanguageColumn(var));
        query.addSqlSelectVar(proj);
      }
    }
    if (contexts.length > 0) {
      RdbmsResource[] ids = vf.asRdbmsResource(contexts);
View Full Code Here

      ProjectionElemList list = node.getProjectionElemList();
      for (ProjectionElem e : list.getElements()) {
        String source = e.getSourceName();
        String target = e.getTargetName();
        bindingNames.put(source, target);
        SelectProjection s = query.getSelectProjection(source);
        if (s != null) {
          selection.add(s);
        }
      }
      query.setBindingNames(bindingNames);
View Full Code Here

TOP

Related Classes of org.openrdf.sail.rdbms.algebra.SelectProjection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.