public class StorageDataProviderFactory extends Object implements ISOSDataProviderFactory, IEventListener
Factory for storage data providers.
This factory is associated to an SOS offering and is persistent throughout the lifetime of the service, so it must be threadsafe.
However, the server will obtain a new data provider instance from this factory for each incoming request so the providers themselves don't need to be threadsafe.
Modifier | Constructor and Description |
---|---|
protected |
StorageDataProviderFactory(SOSServlet service,
StorageDataProviderConfig config) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkEnabled()
Checks if provider and underlying sensor are enabled
|
void |
cleanup()
Called when the provider is removed
|
SOSOfferingCapabilities |
generateCapabilities()
Builds the offering capabilities using the provider configuration
This will connect to source providers to retrieve the necessary metadata
|
AbstractProcess |
generateSensorMLDescription(double time)
Retrieves the SensorML description associated to this data source
|
StorageDataProviderConfig |
getConfig() |
Iterator<AbstractFeature> |
getFoiIterator(IFoiFilter filter)
Retrieves iterator among features of interest matching the filter
|
protected void |
getFoisFromStorage(Set<String> foiIDs) |
protected void |
getFoisSpatialExtentFromStorage() |
ISOSDataProvider |
getNewDataProvider(SOSDataFilter filter)
Instantiates a new data provider
|
protected void |
getObservablePropertiesFromStorage(Set<String> observables) |
protected void |
getObservationTypesFromStorage(Set<String> obsTypes) |
protected TimeExtent |
getTimeExtentFromStorage() |
void |
handleEvent(Event<?> e) |
boolean |
isEnabled()
Allows to check if provider is enabled
|
void |
updateCapabilities()
Update capabilities previously generated by this provider if needed.
|
protected StorageDataProviderFactory(SOSServlet service, StorageDataProviderConfig config) throws SensorHubException
SensorHubException
public SOSOfferingCapabilities generateCapabilities() throws ServiceException
ISOSDataProviderFactory
generateCapabilities
in interface ISOSDataProviderFactory
ServiceException
public void updateCapabilities() throws ServiceException
ISOSDataProviderFactory
ISOSDataProviderFactory.generateCapabilities()
updateCapabilities
in interface ISOSDataProviderFactory
ServiceException
protected TimeExtent getTimeExtentFromStorage()
protected void getFoisSpatialExtentFromStorage()
protected void getObservablePropertiesFromStorage(Set<String> observables)
public AbstractProcess generateSensorMLDescription(double time)
ISOSDataProviderFactory
generateSensorMLDescription
in interface ISOSDataProviderFactory
time
- Time at which the description should be validpublic ISOSDataProvider getNewDataProvider(SOSDataFilter filter) throws Exception
ISOSDataProviderFactory
getNewDataProvider
in interface ISOSDataProviderFactory
Exception
public Iterator<AbstractFeature> getFoiIterator(IFoiFilter filter) throws Exception
ISOSDataProviderFactory
getFoiIterator
in interface ISOSDataProviderFactory
filter
- feature filtering criteriasException
protected void checkEnabled() throws ServiceException
SensorException
ServiceException
public void handleEvent(Event<?> e)
handleEvent
in interface IEventListener
public boolean isEnabled()
ISOSDataProviderFactory
isEnabled
in interface ISOSDataProviderFactory
public void cleanup()
ISOSDataProviderFactory
cleanup
in interface ISOSDataProviderFactory
public StorageDataProviderConfig getConfig()
getConfig
in interface ISOSDataProviderFactory
Copyright © 2016 Sensia Software LLC. All rights reserved.