public class DefaultLayerSourceDescriptor extends Object implements LayerSourceDescriptor
DefaultLayerSourceDescriptor provides metadata and
a factory method for a LayerSource.
Instances of this class are created by reading the extension configuration of
the extension point "layerSources" in the module.xml.
<extension point="beam-visat-rcp:layerSources">
<layerSource>
<id>shapefile-layer-source</id>
<name>ESRI Shapefile</name>
<description>Displays shapes from an ESRI Shapefile</description>
<class>org.esa.snap.visat.toolviews.layermanager.layersrc.shapefile.ShapefileLayerSource</class>
</layerSource>
</extension>
Example 2:
<extension point="beam-visat-rcp:layerSources">
<layerSource>
<id>bluemarble-layer-source</id>
<name>NASA Blue Marble;/name>
<description>Adds NASA Blue Marble image layer to the background.</description>
<layerType>org.esa.snap.worldmap.BlueMarbleLayerType</class>
</layerSource>
</extension>
Note: This API is not public yet and may significantly change in the future. Use it at your own risk.
| Constructor and Description |
|---|
DefaultLayerSourceDescriptor(String id,
String name,
String description,
Class<? extends LayerSource> layerSourceClass) |
DefaultLayerSourceDescriptor(String id,
String name,
String description,
String layerTypeClassName) |
| Modifier and Type | Method and Description |
|---|---|
LayerSource |
createLayerSource()
Creates the
LayerSource which is used in the graphical user interface to
add Layer to a view. |
String |
getDescription()
A text describing what the
LayerSource, created by
this LayerSourceDescriptor, does. |
String |
getId()
A unique ID.
|
LayerType |
getLayerType()
The
LayerType. |
String |
getName()
A human readable name.
|
String |
toString() |
public DefaultLayerSourceDescriptor(String id, String name, String description, Class<? extends LayerSource> layerSourceClass)
public String getId()
LayerSourceDescriptorgetId in interface LayerSourceDescriptorpublic String getName()
LayerSourceDescriptorgetName in interface LayerSourceDescriptorpublic String getDescription()
LayerSourceDescriptorLayerSource, created by
this LayerSourceDescriptor, does.getDescription in interface LayerSourceDescriptorpublic LayerSource createLayerSource()
LayerSourceDescriptorLayerSource which is used in the graphical user interface to
add Layer to a view.createLayerSource in interface LayerSourceDescriptorLayerSource.public LayerType getLayerType()
LayerSourceDescriptorLayerType.getLayerType in interface LayerSourceDescriptornull if
multiple layers are added.Copyright © 2014–2019 European Space Agency (ESA). All rights reserved.