Examples of ColumnInfo


Examples of sql.schema.parser.SchemaParser.ColumnInfo

      throw new RuntimeException("Schema " + _path + " cannot be parsed!\n " + err);
    }
  }

  public boolean contains(String fullSchemaColumnName) {
    final ColumnInfo column = getColumnInfo(fullSchemaColumnName);
    return (column != null);
  }
View Full Code Here

Examples of sql.schema.parser.SchemaParser.ColumnInfo

   * from contains(), so each caller has to be aware that this method might
   * return null
   */
  private ColumnInfo getColumnInfo(String tableSchemaName, String columnName) {
    final TableInfo table = getTableInfo(tableSchemaName);
    final ColumnInfo column = table.getColumnInfos().get(columnName);
    return column;
  }
View Full Code Here

Examples of sql.schema.parser.SchemaParser.ColumnInfo

    final ColumnInfo column = table.getColumnInfos().get(columnName);
    return column;
  }

  public long getNumDistinctValues(String fullSchemaColumnName) {
    final ColumnInfo column = getColumnInfo(fullSchemaColumnName);
    final long distinct = column.getDistinctValues();
    if (distinct == SchemaParser.INVALID)
      throw new RuntimeException(
          "No information about the number of distinct values for column "
              + fullSchemaColumnName
              + "\n Either add required information to schema "
View Full Code Here

Examples of sql.schema.parser.SchemaParser.ColumnInfo

  public Range getRange(String fullSchemaColumnName) {
    // TODO : if we don't have it, we can assume integers from [0,
    // distinctValues]

    final ColumnInfo column = getColumnInfo(fullSchemaColumnName);
    final Object min = column.getMinValue();
    final Object max = column.getMaxValue();
    if (min == null || max == null)
      throw new RuntimeException(
          "No complete information about ranges for column "
              + fullSchemaColumnName
              + "\n Either add required information to schema "
View Full Code Here

Examples of sql.schema.parser.SchemaParser.ColumnInfo

  /*
   * For a field N1.NATIONNAME, fullSchemaColumnName is NATION.NATIONNAME
   */
  public TypeConversion getType(String fullSchemaColumnName) {
    final ColumnInfo column = getColumnInfo(fullSchemaColumnName);
    if (column == null)
      throw new RuntimeException("Column " + fullSchemaColumnName + " does not exist !");
    return column.getType();
  }
View Full Code Here

Examples of uk.ac.starlink.table.ColumnInfo

        boolean hasRaDecColumn = _hasRaDecColumn(starTable);
        VoFieldDesc[] fields;
        if (!hasIdColumn && hasRaDecColumn) {
            // Add a unique id column
            fields = new VoFieldDesc[numCols + 1];
            fields[0] = new VoFieldDesc(new ColumnInfo("Id"));
            fields[0].setIsId(true);
            fields[0].setDescription(GENERATED_ID_DESC);
            for (int i = 0; i < numCols; i++) {
                ColumnInfo colInfo = starTable.getColumnInfo(i);
                fields[i + 1] = new VoFieldDesc(colInfo);
            }
        } else {
            fields = new VoFieldDesc[numCols];
            for (int i = 0; i < numCols; i++) {
                ColumnInfo colInfo = starTable.getColumnInfo(i);
                fields[i] = new VoFieldDesc(colInfo);
            }
        }

        RowSequence rseq = starTable.getRowSequence();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.