Package org.geotools.renderer.style
Class DynamicSymbolFactoryFinder
- Object
-
- DynamicSymbolFactoryFinder
-
public final class DynamicSymbolFactoryFinder extends Object
Searches for all availableExternalGraphicFactory
andMarkFactory
implementations.In addition to implementing this interface dynamic symbol handlers should have a services file:
META-INF/services/org.geotools.renderer.style.MarkFactory
if the areMarkFactory
instancesMETA-INF/services/org.geotools.renderer.style.ExternalGraphicFactory
if the areExternalGraphicFactory
instances
The file should contain a single line which gives the full name of the implementing class.
Example:
org.geotools.data.jdbc.DBCPDataSourceFactory
-
-
Field Summary
Fields Modifier and Type Field Description protected static Logger
LOGGER
The logger for the filter module.static Hints.Key
MARK_FACTORY_FILTER
Rendering hint key to store aPredicate
<MarkFactory
> instance to set the allowedMarkFactory
instances to be evaluated.static Hints.Key
MARK_FACTORY_ORDER
Rendering hint key to store aComparator
<MarkFactory
> instance to set theMarkFactory
execution order.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Iterator<ExternalGraphicFactory>
getExternalGraphicFactories()
Finds all implementations ofExternalGraphicFactory
which have registered using the services mechanism.static Iterator<ExternalGraphicFactory>
getExternalGraphicFactories(Hints hints)
Finds all implementations ofExternalGraphicFactory
which have registered using the services mechanism.static Iterator<MarkFactory>
getMarkFactories()
Finds all implementations ofMarkFactory
which have registered using the services mechanism.static Iterator<MarkFactory>
getMarkFactories(Hints hints)
Finds all implementations ofMarkFactory
which have registered using the services mechanism.static void
scanForPlugins()
Scans for factory plug-ins on the application class path.
-
-
-
Field Detail
-
LOGGER
protected static final Logger LOGGER
The logger for the filter module.
-
MARK_FACTORY_ORDER
public static final Hints.Key MARK_FACTORY_ORDER
Rendering hint key to store aComparator
<MarkFactory
> instance to set theMarkFactory
execution order.
-
MARK_FACTORY_FILTER
public static final Hints.Key MARK_FACTORY_FILTER
Rendering hint key to store aPredicate
<MarkFactory
> instance to set the allowedMarkFactory
instances to be evaluated.
-
-
Method Detail
-
getMarkFactories
public static Iterator<MarkFactory> getMarkFactories()
Finds all implementations ofMarkFactory
which have registered using the services mechanism.- Returns:
- An iterator over all discovered datastores which have registered factories, and whose available method returns true.
-
getMarkFactories
public static Iterator<MarkFactory> getMarkFactories(Hints hints)
Finds all implementations ofMarkFactory
which have registered using the services mechanism. Returns a filtered and ordered iterator based on the provided Hints input parameter.- Parameters:
hints
- An optional map of hints for factory configuration, ornull
if none. Allowed Hints are:DynamicSymbolFactoryFinder.MARK_FACTORY_ORDER
,DynamicSymbolFactoryFinder.MARK_FACTORY_FILTER
- Returns:
- A filtered and ordered iterator over all discovered datastores which have registered factories, and whose available method returns true.
-
getExternalGraphicFactories
public static Iterator<ExternalGraphicFactory> getExternalGraphicFactories()
Finds all implementations ofExternalGraphicFactory
which have registered using the services mechanism.- Returns:
- An iterator over all registered ExternalGraphicFactory
-
getExternalGraphicFactories
public static Iterator<ExternalGraphicFactory> getExternalGraphicFactories(Hints hints)
Finds all implementations ofExternalGraphicFactory
which have registered using the services mechanism.- Parameters:
hints
- An optional map of hints for factory configfuration, ornull
if none.- Returns:
- An iterator over all registered ExternalGraphicFactory
-
scanForPlugins
public static void scanForPlugins()
Scans for factory plug-ins on the application class path. This method is needed because the application class path can theoretically change, or additional plug-ins may become available. Rather than re-scanning the classpath on every invocation of the API, the class path is scanned automatically only on the first invocation. Clients can call this method to prompt a re-scan. Thus this method need only be invoked by sophisticated applications which dynamically make new plug-ins available at runtime.
-
-