public abstract class LayerType extends ExtensibleObject
LayerTypeRegistry
.Modifier | Constructor and Description |
---|---|
protected |
LayerType() |
Modifier and Type | Method and Description |
---|---|
abstract Layer |
createLayer(LayerContext ctx,
PropertySet layerConfig)
Creates a layer instance for the given application provided context and the given layer configuration.
|
abstract PropertySet |
createLayerConfig(LayerContext ctx)
Creates a default configuration instance for the type of layers this type can create.
|
String[] |
getAliases()
Gets the alias names under which this layer type is also known.
|
String |
getName()
Gets the name of this layer type.
|
abstract boolean |
isValidFor(LayerContext ctx)
Tests if this type can create layers for the given application provided context.
|
getExtension
public String getName()
The default implementation returns the name given by the
LayerTypeMetadata.name()
annotation property, if any.
Otherwise, the fully qualified class name is returned.
As of Ceres 0.13, it is not recommended to override this method. Instead use the
LayerTypeMetadata.name()
annotation property for your special layer type.
public String[] getAliases()
The default implementation returns the alias names given by the
LayerTypeMetadata.aliasNames()
annotation property, if any.
Otherwise, an empty array is returned.
As of Ceres 0.13, it is not recommended to override this method. Instead use the LayerTypeMetadata
annotation for your special layer type.
public abstract boolean isValidFor(LayerContext ctx)
ExtensibleObject.getExtension(Class)
).ctx
- An application-dependent layer context.true
if the type is valid with respect to the given context.public abstract Layer createLayer(LayerContext ctx, PropertySet layerConfig)
ctx
- An application provided context, may be null
. The parameter may be ignored by many layer types.layerConfig
- The layer configuration.public abstract PropertySet createLayerConfig(LayerContext ctx)
createLayer(com.bc.ceres.glayer.LayerContext, com.bc.ceres.binding.PropertySet)
method in order
to create a new layer instance.ctx
- An application provided context, may be null
. The parameter may be ignored by many layer types.Copyright © 2014–2015 European Space Agency (ESA). All rights reserved.