Search in sources :

Example 1 with SpreadsheetMetadataExtractor

use of org.teiid.resource.adapter.google.v4.SpreadsheetMetadataExtractor in project teiid by teiid.

the class SpreadsheetConnectionImpl4 method getSpreadsheetInfo.

@Override
public SpreadsheetInfo getSpreadsheetInfo() {
    SpreadsheetInfo info = spreadsheetInfo.get();
    if (info == null) {
        synchronized (spreadsheetInfo) {
            info = spreadsheetInfo.get();
            if (info == null) {
                SpreadsheetMetadataExtractor metadataExtractor = new SpreadsheetMetadataExtractor(sheetsAPI, googleDataProtocolAPI);
                info = metadataExtractor.extractMetadata(config.getSpreadsheetId());
                spreadsheetInfo.set(info);
            }
        }
    }
    return info;
}
Also used : SpreadsheetMetadataExtractor(org.teiid.resource.adapter.google.v4.SpreadsheetMetadataExtractor) SpreadsheetInfo(org.teiid.translator.google.api.metadata.SpreadsheetInfo)

Aggregations

SpreadsheetMetadataExtractor (org.teiid.resource.adapter.google.v4.SpreadsheetMetadataExtractor)1 SpreadsheetInfo (org.teiid.translator.google.api.metadata.SpreadsheetInfo)1