Package com.cognite.client.servicesV1
Class ConnectorServiceV1
- java.lang.Object
-
- com.cognite.client.servicesV1.ConnectorServiceV1
-
- All Implemented Interfaces:
Serializable
public abstract class ConnectorServiceV1 extends Object implements Serializable
The service handles connections to the Cognite REST api.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classConnectorServiceV1.AsyncJobReader<T>Reads items from the Cognite API.static classConnectorServiceV1.Builderstatic classConnectorServiceV1.DownloadFileBinarystatic classConnectorServiceV1.FileBinaryReaderReads file binaries from the Cognite API.static classConnectorServiceV1.FileWriterWrites files (header + binary) to the Cognite API.static classConnectorServiceV1.ItemWriterstatic classConnectorServiceV1.ResultFutureIterator<T>Iterator for paging through requests based on response cursors.static classConnectorServiceV1.SingleRequestItemReader<T>Reads items from the Cognite API.
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.LoggerLOG
-
Constructor Summary
Constructors Constructor Description ConnectorServiceV1()
-
Method Summary
-
-
-
Method Detail
-
of
public static ConnectorServiceV1 of(CogniteClient client)
-
create
public static ConnectorServiceV1 create()
-
getClient
public abstract CogniteClient getClient()
-
readAssets
public ConnectorServiceV1.ResultFutureIterator<String> readAssets(Request queryParameters)
Read assets from Cognite.- Parameters:
queryParameters- The parameters for the assets query.- Returns:
-
readAssetsAggregates
public ItemReader<String> readAssetsAggregates()
Read assets aggregates from Cognite.- Returns:
-
readAssetsById
public ItemReader<String> readAssetsById()
Read assets by id from Cognite.- Returns:
-
writeAssets
public ConnectorServiceV1.ItemWriter writeAssets()
Write Assets to Cognite. Calling this method will return anItemWriter- Returns:
-
updateAssets
public ConnectorServiceV1.ItemWriter updateAssets()
Update Assets in Cognite. Calling this method will return anItemWriter- Returns:
-
deleteAssets
public ConnectorServiceV1.ItemWriter deleteAssets()
Delete Assets in Cognite. Calling this method will return anItemWriter- Returns:
-
readEvents
public ConnectorServiceV1.ResultFutureIterator<String> readEvents(Request queryParameters)
Read events from Cognite.- Parameters:
queryParameters- The parameters for the events query.- Returns:
-
readEventsAggregates
public ItemReader<String> readEventsAggregates()
Read events aggregates from Cognite.- Returns:
-
readEventsById
public ItemReader<String> readEventsById()
Read events by id from Cognite.- Returns:
-
writeEvents
public ConnectorServiceV1.ItemWriter writeEvents()
Write Events to Cognite. Calling this method will return anItemWriter- Returns:
-
updateEvents
public ConnectorServiceV1.ItemWriter updateEvents()
Update Events in Cognite. Calling this method will return anItemWriter- Returns:
-
deleteEvents
public ConnectorServiceV1.ItemWriter deleteEvents()
Delete Events in Cognite. Calling this method will return anItemWriter- Returns:
-
readSequencesHeaders
public ConnectorServiceV1.ResultFutureIterator<String> readSequencesHeaders(Request queryParameters)
Fetch sequences headers from Cognite.- Parameters:
queryParameters- The parameters for the events query.- Returns:
-
readSequencesAggregates
public ItemReader<String> readSequencesAggregates()
Read sequences aggregates from Cognite.- Returns:
-
readSequencesById
public ItemReader<String> readSequencesById()
Read sequences by id from Cognite.- Returns:
-
writeSequencesHeaders
public ConnectorServiceV1.ItemWriter writeSequencesHeaders()
Write sequences headers to Cognite. Calling this method will return anItemWriter- Returns:
-
updateSequencesHeaders
public ConnectorServiceV1.ItemWriter updateSequencesHeaders()
Update sequences headers in Cognite. Calling this method will return anItemWriter- Returns:
-
deleteSequencesHeaders
public ConnectorServiceV1.ItemWriter deleteSequencesHeaders()
Delete sequences headers in Cognite. Calling this method will return anItemWriter- Returns:
-
readSequencesRows
public ConnectorServiceV1.ResultFutureIterator<String> readSequencesRows(Request queryParameters)
Fetch sequences rows / body from Cognite.- Parameters:
queryParameters- The parameters for the events query.- Returns:
-
writeSequencesRows
public ConnectorServiceV1.ItemWriter writeSequencesRows()
Write sequences rows to Cognite. Calling this method will return anItemWriter- Returns:
-
deleteSequencesRows
public ConnectorServiceV1.ItemWriter deleteSequencesRows()
Delete sequences rows in Cognite. Calling this method will return anItemWriter- Returns:
-
readTsHeaders
public ConnectorServiceV1.ResultFutureIterator<String> readTsHeaders(Request queryParameters)
List timeseries headers from Cognite.- Parameters:
queryParameters- The parameters for the TS query.- Returns:
-
readTsAggregates
public ItemReader<String> readTsAggregates()
Read timeseries aggregates from Cognite.- Returns:
-
readTsById
public ItemReader<String> readTsById()
Read time series headers by id from Cognite.- Returns:
-
writeTsHeaders
public ConnectorServiceV1.ItemWriter writeTsHeaders()
Write time series headers to Cognite. Calling this method will return anItemWriter- Returns:
-
updateTsHeaders
public ConnectorServiceV1.ItemWriter updateTsHeaders()
Update time series headers in Cognite. Calling this method will return anItemWriter- Returns:
-
deleteTsHeaders
public ConnectorServiceV1.ItemWriter deleteTsHeaders()
Delete TS headers in Cognite. Calling this method will return anItemWriter- Returns:
-
readTsDatapoints
public ConnectorServiceV1.ResultFutureIterator<String> readTsDatapoints(Request queryParameters)
Fetch timeseries datapoints from Cognite.- Parameters:
queryParameters- The parameters for the events query.- Returns:
-
readTsDatapointsProto
public ConnectorServiceV1.ResultFutureIterator<DataPointListItem> readTsDatapointsProto(Request queryParameters)
Fetch timeseries datapoints from Cognite using protobuf encoding.- Parameters:
queryParameters- The parameters for the events query.- Returns:
-
readTsDatapointsLatest
public ItemReader<String> readTsDatapointsLatest()
Read latest data point from Cognite.- Returns:
-
writeTsDatapoints
public ConnectorServiceV1.ItemWriter writeTsDatapoints()
Write time series headers to Cognite. Calling this method will return anItemWriter- Returns:
-
writeTsDatapointsProto
public ConnectorServiceV1.ItemWriter writeTsDatapointsProto()
Write time series data points to Cognite. Calling this method will return anItemWriter- Returns:
-
deleteDatapoints
public ConnectorServiceV1.ItemWriter deleteDatapoints()
Delete data points in Cognite. Calling this method will return anItemWriter- Returns:
-
read3dModels
public Iterator<CompletableFuture<ResponseItems<String>>> read3dModels(Request queryParameters)
Fetch 3d models from Cognite.- Parameters:
queryParameters- The parameters for the events query.- Returns:
-
readRawRows
public ConnectorServiceV1.ResultFutureIterator<String> readRawRows(Request queryParameters)
Fetch Raw rows from Cognite. This service can handle both single rows and large collection of rows.- Parameters:
queryParameters- The parameters for the raw query.- Returns:
-
readRawRow
public ItemReader<String> readRawRow()
Fetch a single row by row key.- Returns:
-
readCursorsRawRows
public ItemReader<String> readCursorsRawRows()
Read cursors for retrieving events in parallel. The results set is split into n partitions.- Returns:
-
writeRawRows
public ConnectorServiceV1.ItemWriter writeRawRows()
Write rows to Raw in Cognite. Calling this method will return anItemWriter
-
deleteRawRows
public ConnectorServiceV1.ItemWriter deleteRawRows()
Delete Assets in Cognite. Calling this method will return anItemWriter- Returns:
-
readRawDbNames
public ConnectorServiceV1.ResultFutureIterator<String> readRawDbNames(AuthConfig config)
List the Raw database names from Cognite.- Returns:
-
writeRawDbNames
public ConnectorServiceV1.ItemWriter writeRawDbNames()
Create Raw tables in a given database.- Returns:
-
deleteRawDbNames
public ConnectorServiceV1.ItemWriter deleteRawDbNames()
Create Raw tables in a given database.- Returns:
-
readRawTableNames
public ConnectorServiceV1.ResultFutureIterator<String> readRawTableNames(String dbName, AuthConfig config)
List the Raw tables for a given database.- Parameters:
dbName- The name of the database to list tables from.- Returns:
-
writeRawTableNames
public ConnectorServiceV1.ItemWriter writeRawTableNames(String dbName)
Create Raw tables in a given database.- Parameters:
dbName- The name of the database to list tables from.- Returns:
-
deleteRawTableNames
public ConnectorServiceV1.ItemWriter deleteRawTableNames(String dbName)
Delete Raw tables from a given database.- Parameters:
dbName- The name of the database to list tables from.- Returns:
-
readFileHeaders
public ConnectorServiceV1.ResultFutureIterator<String> readFileHeaders(Request queryParameters)
List file headers from Cognite.- Parameters:
queryParameters- The parameters for the file query.- Returns:
-
readFilesAggregates
public ItemReader<String> readFilesAggregates()
Read files aggregates from Cognite.- Returns:
-
readFilesById
public ItemReader<String> readFilesById()
Read files by id from Cognite.- Returns:
-
readFileBinariesByIds
public ConnectorServiceV1.FileBinaryReader readFileBinariesByIds()
Read file binaries from Cognite. Returns anFileBinaryReaderwhich can be used to read file binaries by id.- Returns:
-
writeFileHeaders
public ConnectorServiceV1.ItemWriter writeFileHeaders()
Write files to Cognite. This is a two-step request with 1) post the file metadata / header and 2) post the file binary. This method returns anItemWriterto which you can post the file metadata / header. I.e. it performs step 1), but not step 2). The response from theItemWritercontains a URL reference for the file binary upload.- Returns:
-
writeFileProto
public ConnectorServiceV1.FileWriter writeFileProto()
Write files to Cognite. This method returns anFileWriterto which you can post theFileContainerwith file metadata / header. I.e. this writer allows you to post both the file header and the file binary in a single method call. The response contains the the metadata response item for the file.- Returns:
-
updateFileHeaders
public ConnectorServiceV1.ItemWriter updateFileHeaders()
Update file headers to Cognite. Calling this method will return anItemWriter- Returns:
-
deleteFiles
public ConnectorServiceV1.ItemWriter deleteFiles()
Delete Files (including headers) in Cognite. Calling this method will return anItemWriter- Returns:
-
readLoginStatusByApiKey
public LoginStatus readLoginStatusByApiKey(String host, String apiKey) throws Exception
Get the login status from Cognite.- Parameters:
host-apiKey-- Returns:
- Throws:
Exception
-
readRelationships
public ConnectorServiceV1.ResultFutureIterator<String> readRelationships(Request queryParameters)
Fetch relationships from Cognite.- Parameters:
queryParameters- The parameters for the data sets query.- Returns:
-
readRelationshipsById
public ItemReader<String> readRelationshipsById()
Read relationships by id from Cognite.- Returns:
-
writeRelationships
public ConnectorServiceV1.ItemWriter writeRelationships()
Write relationships to Cognite. Calling this method will return anItemWriter- Returns:
-
deleteRelationships
public ConnectorServiceV1.ItemWriter deleteRelationships()
Delete relationships in Cognite. Calling this method will return anItemWriter- Returns:
-
updateDataSets
public ConnectorServiceV1.ItemWriter updateDataSets()
Update data sets in Cognite. Calling this method will return anItemWriter- Returns:
-
readDataSets
public ConnectorServiceV1.ResultFutureIterator<String> readDataSets(Request queryParameters)
Fetch data sets from Cognite.- Parameters:
queryParameters- The parameters for the data sets query.- Returns:
-
readDataSetsAggregates
public ItemReader<String> readDataSetsAggregates()
Read data sets aggregates from Cognite.- Returns:
-
readDataSetsById
public ItemReader<String> readDataSetsById()
Read data sets by id from Cognite.- Returns:
-
writeDataSets
public ConnectorServiceV1.ItemWriter writeDataSets()
Write data sets to Cognite. Calling this method will return anItemWriter- Returns:
-
readLabels
public ConnectorServiceV1.ResultFutureIterator<String> readLabels(Request queryParameters)
Read labels from Cognite.- Parameters:
queryParameters- The parameters for the data sets query.- Returns:
-
writeLabels
public ConnectorServiceV1.ItemWriter writeLabels()
Write labels to Cognite. Calling this method will return anItemWriter- Returns:
-
deleteLabels
public ConnectorServiceV1.ItemWriter deleteLabels()
Delete labels in Cognite. Calling this method will return anItemWriter- Returns:
-
readSecurityCategories
public ConnectorServiceV1.ResultFutureIterator<String> readSecurityCategories(Request queryParameters)
Read security categories from Cognite.- Parameters:
queryParameters- The parameters for the security categories query.- Returns:
-
writeSecurityCategories
public ConnectorServiceV1.ItemWriter writeSecurityCategories()
Write security categories to Cognite. Calling this method will return anItemWriter- Returns:
-
deleteSecurityCategories
public ConnectorServiceV1.ItemWriter deleteSecurityCategories()
Delete security categories in Cognite. Calling this method will return anItemWriter- Returns:
-
detectAnnotationsPnid
public ItemReader<String> detectAnnotationsPnid()
Detect references to assets and files in a P&ID and annotate the references with bounding boxes. Finds entities in the P&ID that match a list of entity names, for instance asset names. The P&ID must be a single-page PDF file.- Returns:
-
convertPnid
public ItemReader<String> convertPnid()
Convert a single-page P&ID in PDF format to an interactive SVG where the provided annotations are highlighted.- Returns:
-
readEntityMatcherModels
public ItemReader<String> readEntityMatcherModels()
Create a reader for listing entity matcher models.- Returns:
- An
ItemReaderfor reading the models.
-
deleteEntityMatcherModels
public ConnectorServiceV1.ItemWriter deleteEntityMatcherModels()
Create a writer for deleting entity matcher models.- Returns:
- An
ConnectorServiceV1.ItemWriterfor deleting the models
-
entityMatcherPredict
public ItemReader<String> entityMatcherPredict()
Create an entity matcher predict reader.- Returns:
-
-