Package org.esa.snap.core.datamodel
Class PlacemarkDescriptorRegistry
- java.lang.Object
-
- org.esa.snap.core.datamodel.PlacemarkDescriptorRegistry
-
public class PlacemarkDescriptorRegistry extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
PROPERTY_NAME_PLACEMARK_DESCRIPTOR
-
Constructor Summary
Constructors Constructor Description PlacemarkDescriptorRegistry(ServiceRegistry<PlacemarkDescriptor> serviceRegistry)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PlacemarkDescriptorRegistry
getInstance()
PlacemarkDescriptor
getPlacemarkDescriptor(Class<? extends PlacemarkDescriptor> clazz)
Gives a placemark descriptors from the service registry which is compatible with the given class which extendsPlacemarkDescriptor
.PlacemarkDescriptor
getPlacemarkDescriptor(String className)
Gives a placemark descriptor from the service registry which is compatible with the given class name.PlacemarkDescriptor
getPlacemarkDescriptor(org.opengis.feature.simple.SimpleFeatureType featureType)
Returns the 'best qualified' placemark descriptors which is compatible with the given feature type.Set<PlacemarkDescriptor>
getPlacemarkDescriptors()
Gives all placemark descriptors from the service registry.List<PlacemarkDescriptor>
getPlacemarkDescriptors(org.opengis.feature.simple.SimpleFeatureType featureType)
Returns an ordered list of placemark descriptors that are compatible with the given feature type.static void
setInstance(PlacemarkDescriptorRegistry instance)
-
-
-
Field Detail
-
PROPERTY_NAME_PLACEMARK_DESCRIPTOR
public static final String PROPERTY_NAME_PLACEMARK_DESCRIPTOR
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PlacemarkDescriptorRegistry
public PlacemarkDescriptorRegistry(ServiceRegistry<PlacemarkDescriptor> serviceRegistry)
-
-
Method Detail
-
getInstance
public static PlacemarkDescriptorRegistry getInstance()
-
setInstance
public static void setInstance(PlacemarkDescriptorRegistry instance)
-
getPlacemarkDescriptor
public PlacemarkDescriptor getPlacemarkDescriptor(Class<? extends PlacemarkDescriptor> clazz)
Gives a placemark descriptors from the service registry which is compatible with the given class which extendsPlacemarkDescriptor
.- Parameters:
clazz
- The class.- Returns:
- the placemark descriptor
-
getPlacemarkDescriptor
public PlacemarkDescriptor getPlacemarkDescriptor(String className)
Gives a placemark descriptor from the service registry which is compatible with the given class name.- Parameters:
className
- The class name.- Returns:
- the placemark descriptor
-
getPlacemarkDescriptors
public Set<PlacemarkDescriptor> getPlacemarkDescriptors()
Gives all placemark descriptors from the service registry.- Returns:
- the placemark descriptors
-
getPlacemarkDescriptors
public List<PlacemarkDescriptor> getPlacemarkDescriptors(org.opengis.feature.simple.SimpleFeatureType featureType)
Returns an ordered list of placemark descriptors that are compatible with the given feature type. The list is sorted by by the level of compatibility (seeDecodeQualification
). A feature type may have given the class name of an appropriate placemark descriptor in its "user data", the key for that descriptor name is given byAbstractPlacemarkDescriptor.PROPERTY_NAME_PLACEMARK_DESCRIPTOR
.- Parameters:
featureType
- The feature type.- Returns:
- An ordered list of descriptors, which may be empty.
-
getPlacemarkDescriptor
public PlacemarkDescriptor getPlacemarkDescriptor(org.opengis.feature.simple.SimpleFeatureType featureType)
Returns the 'best qualified' placemark descriptors which is compatible with the given feature type.- Parameters:
featureType
- The feature type.- Returns:
- the placemark descriptor
-
-