Package de.fuberlin.wiwiss.d2rq.algebra

Examples of de.fuberlin.wiwiss.d2rq.algebra.ProjectionSpec


      List<ProjectionSpec> projectionSpecs, ConnectedDB database)
  throws SQLException {
    Map<ProjectionSpec,String> result = new HashMap<ProjectionSpec,String>();
    ResultSetMetaData metaData = resultSet.getMetaData();
    for (int i = 0; i < projectionSpecs.size(); i++) {
      ProjectionSpec key = projectionSpecs.get(i);
      int jdbcType = metaData == null ? Integer.MIN_VALUE : metaData.getColumnType(i + 1);
      String name = metaData == null ? "UNKNOWN" : metaData.getColumnTypeName(i + 1);
      result.put(key, database.vendor().getDataType(jdbcType, name.toUpperCase(), -1).value(resultSet, i + 1));
    }
    return new ResultRowMap(result);
View Full Code Here


    List<ProjectionSpec> columns = new ArrayList<ProjectionSpec>(this.projectionsToValues.keySet());
    Collections.sort(columns);
    StringBuffer result = new StringBuffer("{");
    Iterator<ProjectionSpec> it = columns.iterator();
    while (it.hasNext()) {
      ProjectionSpec projection = (ProjectionSpec) it.next();
      result.append(projection.toString());
      result.append(" => '");
      result.append(this.projectionsToValues.get(projection));
      result.append("'");
      if (it.hasNext()) {
        result.append(", ");
View Full Code Here

    Iterator<ProjectionSpec> it = this.selectSpecs.iterator();
    if (!it.hasNext()) {
      result.append("1");
    }
    while (it.hasNext()) {
      ProjectionSpec projection = it.next();
      result.append(projection.toSQL(database, aliases));
      if (it.hasNext()) {
        result.append(", ");
      }
    }
   
View Full Code Here

          logger.debug("no projection spec for " + exprVar + ", assuming constant");
          Node node = typedNodeMaker.makeNode(null);
          result.add(new ConstantEx(NodeValue.makeNode(node).asString(), node));
        }
        while (it.hasNext()) {
          ProjectionSpec projectionSpec = it.next();
         
          if (projectionSpec == null)
            return Collections.emptyList();
         
          if (projectionSpec instanceof Attribute) {
View Full Code Here

      Set<ProjectionSpec> projectionSpecs = nodeMaker.projectionSpecs();
      boolean err = projectionSpecs.isEmpty();
     
      Iterator<ProjectionSpec> projectionIterator = projectionSpecs.iterator();
      while (projectionIterator.hasNext() && !err) {
        ProjectionSpec projection = (ProjectionSpec) projectionIterator.next();
       
        Set<Attribute> reqAttr = projection.requiredAttributes();
        Iterator<Attribute> j = reqAttr.iterator();
        while (j.hasNext() && !err) {
          Attribute a = (Attribute) j.next();
          if (attributes.relationName == null)
            attributes.relationName = a.relationName();
View Full Code Here

TOP

Related Classes of de.fuberlin.wiwiss.d2rq.algebra.ProjectionSpec

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.