Package uk.ac.starlink.table

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


    // Returns true if the given table has an id column
    private static boolean _hasIdColumn(StarTable starTable) {
        int n = starTable.getColumnCount();
        for (int i = 0; i < n; i++) {
            ColumnInfo colInfo = starTable.getColumnInfo(i);
            String name = colInfo.getName();
            if (new UcdSupport(colInfo.getUCD()).isId() || "id".equalsIgnoreCase(name)) {
                return true;
            }
        }
        return false;
    }
View Full Code Here

TOP

Related Classes of uk.ac.starlink.table.ColumnInfo

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.