Search in sources :

Example 6 with FullyQualifiedName

use of org.teiid.util.FullyQualifiedName in project teiid by teiid.

the class GoogleMetadataProcessor method addTable.

/**
 * Adds new table to metadata.
 *
 * @param spreadsheet  Name of the spreadsheet
 * @param worksheet    Name of the worksheet
 * @throws TranslatorException
 */
private void addTable(MetadataFactory mf, Worksheet worksheet) {
    if (worksheet.getColumnCount() == 0) {
        return;
    }
    Table table = mf.addTable(worksheet.getName());
    // $NON-NLS-1$
    table.setProperty(FQN, new FullyQualifiedName("worksheet", worksheet.getName()).toString());
    table.setNameInSource(worksheet.getName());
    if (worksheet.isHeaderEnabled()) {
        table.setSupportsUpdate(true);
    }
    addColumnsToTable(mf, table, worksheet);
}
Also used : Table(org.teiid.metadata.Table) FullyQualifiedName(org.teiid.util.FullyQualifiedName)

Aggregations

FullyQualifiedName (org.teiid.util.FullyQualifiedName)6 Table (org.teiid.metadata.Table)3 BasicDBObject (com.mongodb.BasicDBObject)1 ArrayList (java.util.ArrayList)1 Column (org.teiid.metadata.Column)1 TranslatorException (org.teiid.translator.TranslatorException)1