Interface IDatabaseRegistry
Interface for the main database registry on a sensor hub.
This database registry keeps track of which database contains data for each system registered on the hub.
It also exposes a federated database which provides read-only access to all historical observations available from this hub, along with the corresponding systems, datastreams, command channels and features of interest metadata. The federated database aggregates data from all databases registered with this registry.
With a minimum setup (i.e. no database configured), the federated database gives access to the latest state of all registered systems (e.g. latest system description, latest observations, latest observed FOI) but no historical data will be available.
-
Method Summary
Modifier and TypeMethodDescriptiongetFeatureDatabaseByNum
(int dbNum) Provides direct (potentially read/write) access to the feature database with the specified numbergetObsDatabaseByModuleID
(String moduleID) Provides direct (potentially read/write) access to the database with the specified module IDgetObsDatabaseByNum
(int dbNum) Provides direct (potentially read/write) access to the obs system database with the specified numbergetProcedureDatabaseByNum
(int dbNum) Provides direct (potentially read/write) access to the procedure database with the specified numbervoid
Register a database to be exposed through the federated database.void
unregister
(IDatabase db) Unregister a database and all its mappings
-
Method Details
-
register
Register a database to be exposed through the federated database.
If the database is aISystemDriverDatabase
a mapping is registered with the system UIDs obtained by calling theISystemDriverDatabase.getHandledSystems()
method- Parameters:
db
-
-
unregister
Unregister a database and all its mappings- Parameters:
db
-
-
getAllDatabases
Collection<IDatabase> getAllDatabases()- Returns:
- The list of all databases registered on the hub (read-only)
-
getObsDatabaseByNum
Provides direct (potentially read/write) access to the obs system database with the specified number- Parameters:
dbNum
- Database number (unique on a given hub instance)- Returns:
- The database instance or null if none has been assigned the specified number
-
getObsDatabaseByModuleID
Provides direct (potentially read/write) access to the database with the specified module ID- Parameters:
moduleID
- Id of the database module- Returns:
- The database instance
- Throws:
IllegalArgumentException
- if no database module with the given ID exists
-
getObsSystemDatabases
Collection<IObsSystemDatabase> getObsSystemDatabases()- Returns:
- The list of all obs system databases registered on the hub (read-only)
-
getProcedureDatabases
Collection<IProcedureDatabase> getProcedureDatabases()- Returns:
- The list of all procedure databases registered on the hub (read-only)
-
getProcedureDatabaseByNum
Provides direct (potentially read/write) access to the procedure database with the specified number- Parameters:
dbNum
- Database number (unique on a given hub instance)- Returns:
- The database instance or null if none has been assigned the specified number
-
getFeatureDatabases
Collection<IFeatureDatabase> getFeatureDatabases()- Returns:
- The list of all feature databases registered on the hub (read-only)
-
getFeatureDatabaseByNum
Provides direct (potentially read/write) access to the feature database with the specified number- Parameters:
dbNum
- Database number (unique on a given hub instance)- Returns:
- The database instance or null if none has been assigned the specified number
-
getFederatedDatabase
IFederatedDatabase getFederatedDatabase()- Returns:
- This hub's federated observation database.
See class description for more information about the federated DB
-