Class UpsamplerSpiRegistryImpl
- java.lang.Object
-
- org.esa.snap.core.gpf.common.resample.UpsamplerSpiRegistryImpl
-
- All Implemented Interfaces:
UpsamplerSpiRegistry
public class UpsamplerSpiRegistryImpl extends Object implements UpsamplerSpiRegistry
Created by obarrile on 11/04/2019.
-
-
Constructor Summary
Constructors Constructor Description UpsamplerSpiRegistryImpl(ServiceRegistry<UpsamplerSpi> serviceRegistry)The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddUpsamplerSpi(String alias, UpsamplerSpi upsamplerSpi)Adds the givenupsamplerSpito this registry.booleanaddUpsamplerSpi(UpsamplerSpi upsamplerSpi)Adds the givenoperatorSpito this registry.Set<String>getAliases()Gets the set of all aliases.ServiceRegistry<UpsamplerSpi>getServiceRegistry()Gets theServiceRegistryUpsamplerSpigetUpsamplerSpi(String alias)Gets a registered upsampler SPI.Set<UpsamplerSpi>getUpsamplerSpis()voidloadUpsamplerSpis()Loads the SPIs defined inMETA-INF/services.booleanremoveUpsamplerSpi(UpsamplerSpi upsamplerSpi)Removes the givenupsamplerSpithis registry.
-
-
-
Constructor Detail
-
UpsamplerSpiRegistryImpl
public UpsamplerSpiRegistryImpl(ServiceRegistry<UpsamplerSpi> serviceRegistry)
The constructor.- Parameters:
serviceRegistry- The underlying service registry used by this instance.
-
-
Method Detail
-
loadUpsamplerSpis
public void loadUpsamplerSpis()
Loads the SPIs defined inMETA-INF/services.- Specified by:
loadUpsamplerSpisin interfaceUpsamplerSpiRegistry
-
getUpsamplerSpis
public Set<UpsamplerSpi> getUpsamplerSpis()
- Specified by:
getUpsamplerSpisin interfaceUpsamplerSpiRegistry- Returns:
- The set of all registered operator SPIs.
-
getServiceRegistry
public ServiceRegistry<UpsamplerSpi> getServiceRegistry()
Gets theServiceRegistry- Specified by:
getServiceRegistryin interfaceUpsamplerSpiRegistry- Returns:
- the
service registry
-
getUpsamplerSpi
public UpsamplerSpi getUpsamplerSpi(String alias)
Gets a registered upsampler SPI.- Specified by:
getUpsamplerSpiin interfaceUpsamplerSpiRegistry- Parameters:
alias- A name identifying the upsampler SPI.- Returns:
- the upsampler SPI, or
null
-
addUpsamplerSpi
public boolean addUpsamplerSpi(UpsamplerSpi upsamplerSpi)
Adds the givenoperatorSpito this registry.- Specified by:
addUpsamplerSpiin interfaceUpsamplerSpiRegistry- Parameters:
upsamplerSpi- the SPI to add- Returns:
true, if theUpsamplerSpicould be successfully added, otherwisefalse
-
addUpsamplerSpi
public boolean addUpsamplerSpi(String alias, UpsamplerSpi upsamplerSpi)
Adds the givenupsamplerSpito this registry.- Specified by:
addUpsamplerSpiin interfaceUpsamplerSpiRegistry- Parameters:
upsamplerSpi- the SPI to add- Returns:
true, if theUpsamplerSpicould be successfully added, otherwisefalse
-
removeUpsamplerSpi
public boolean removeUpsamplerSpi(UpsamplerSpi upsamplerSpi)
Removes the givenupsamplerSpithis registry.- Specified by:
removeUpsamplerSpiin interfaceUpsamplerSpiRegistry- Parameters:
upsamplerSpi- the SPI to remove- Returns:
true, if the SPI could be removed, otherwisefalse
-
getAliases
public Set<String> getAliases()
Gets the set of all aliases.- Specified by:
getAliasesin interfaceUpsamplerSpiRegistry- Returns:
- the set of alias names.
-
-