spiExtensions = new ArrayList<Object>(); new FactoryRegistry(extensionPoint) .getFactories(extensionPoint, false) .forEach(spiExtensions::add); spiCache.put(extensionPoint, spiExtensions);
static synchronized <T extends DataAccessFactory> Set<T> getAvailableDataStores( FactoryRegistry registry, Class<T> targetClass) { return registry.getFactories(targetClass, null, null) .filter(DataAccessFactory::isAvailable) .collect(toSet()); }
/** * Finds all implementations of {@link MarkFactory} which have registered using the services * mechanism. * * @return An iterator over all discovered datastores which have registered factories, and whose * available method returns true. */ public static synchronized Iterator<MarkFactory> getMarkFactories() { return getServiceRegistry().getFactories(MarkFactory.class, null, null).iterator(); }
/** * Finds all implementations of UnWrapper which have registered using the services mechanism, * and that have the appropriate libraries on the classpath. * * @return An iterator over all discovered UnWrapper which have registered factories */ public static synchronized Iterator<UnWrapper> getUnWrappers() { return getServiceRegistry().getFactories(UnWrapper.class, null, null).iterator(); }
/** * Returns a set of all available implementations for the {@link GeometryFactory} category. * * @return Set of available geometry factory implementations. */ public static synchronized Set<GeometryFactory> getGeometryFactories() { return new LazySet<GeometryFactory>( getServiceRegistry().getFactories(GeometryFactory.class, null, null)); }
/** * Set of available ProcessFactory; each of which is responsible for one or more processes. * * @return Set of ProcessFactory */ public static Set<ProcessFactory> getProcessFactories() { Stream<ProcessFactory> serviceProviders = getServiceRegistry().getFactories(ProcessFactory.class, null, null); return new LazySet<ProcessFactory>(serviceProviders); }
public static synchronized Map<String, GranuleHandlerFactorySPI> getGranuleHandlersSPI() { // get all GranuleHandlerFactorySPI implementations FactoryRegistry serviceRegistry = getServiceRegistry(); serviceRegistry.scanForPlugins(); return serviceRegistry .getFactories(GranuleHandlerFactorySPI.class, true) .collect(toInstanceByClassNameMap()); }
public static synchronized Map<String, SubmosaicProducerFactory> getGranuleHandlersSPI() { // get all GranuleHandlerFactorySPI implementations FactoryRegistry serviceRegistry = getServiceRegistry(); serviceRegistry.scanForPlugins(); return serviceRegistry .getFactories(SubmosaicProducerFactory.class, true) .collect(toInstanceByClassNameMap()); }
public static synchronized Map<String, GranuleAcceptorFactorySPI> getGranuleAcceptorFactorySPI() { // get all GridFormatFactorySpi implementations FactoryRegistry serviceRegistry = getServiceRegistry(); serviceRegistry.scanForPlugins(); return serviceRegistry .getFactories(GranuleAcceptorFactorySPI.class, true) .collect(toInstanceByClassNameMap()); }
public static synchronized Map<String, CoverageNameCollectorSPI> getCoverageNameCollectorSPI() { // get all CoverageNameCollectorSPI implementations FactoryRegistry serviceRegistry = getServiceRegistry(); serviceRegistry.scanForPlugins(); return serviceRegistry .getFactories(CoverageNameCollectorSPI.class, true) .collect(toInstanceByClassNameMap()); }
/** * Returns a set of all available implementations for the {@link Function} interface. * * @param hints An optional map of hints, or {@code null} if none. * @return Set of available function expression implementations. */ public static synchronized Set<Function> getFunctions(Hints hints) { hints = mergeSystemHints(hints); return new LazySet<Function>( getServiceRegistry().getFactories(Function.class, null, hints)); }
/** * Returns a set of all available implementations for the {@link ConverterFactory} interface. * * @param hints An optional map of hints, or {@code null} if none. * @return Set of available ConverterFactory implementations. */ public static synchronized Set<ConverterFactory> getConverterFactories(Hints hints) { hints = GeoTools.addDefaultHints(hints); return new LazySet<ConverterFactory>( getServiceRegistry().getFactories(ConverterFactory.class, null, hints)); }
/** * Returns a set of all available implementations for the {@link GridCoverageFactory} interface. * * @param hints An optional map of hints, or {@code null} if none. * @return Set of available grid coverage factory implementations. * @since 2.4 */ public static synchronized Set<GridCoverageFactory> getGridCoverageFactories(Hints hints) { hints = mergeSystemHints(hints); return new LazySet<GridCoverageFactory>( getServiceRegistry().getFactories(GridCoverageFactory.class, null, hints)); }
/** * Returns a set of all available implementations for the {@link FeatureCollections} interface. * * @param hints An optional map of hints, or {@code null} if none. * @return Set of available feature collections implementations. */ public static synchronized Set<FeatureCollections> getFeatureCollectionsSet(Hints hints) { hints = mergeSystemHints(hints); return new LazySet<FeatureCollections>( getServiceRegistry().getFactories(FeatureCollections.class, null, hints)); }
/** * Returns a set of all available implementations for the {@link FilterFactory} interface. * * @param hints An optional map of hints, or {@code null} if none. * @return Set of available filter factory implementations. */ public static synchronized Set<FilterFactory> getFilterFactories(Hints hints) { hints = mergeSystemHints(hints); return new LazySet<FilterFactory>( getServiceRegistry().getFactories(FilterFactory.class, null, hints)); }
/** * Returns all providers of the specified category. * * @param category The factory category. * @param hints An optional map of hints, or {@code null} if none. * @return Set of available factory implementations. */ private static synchronized <T extends Factory> Set<T> getFactories( final Class<T> category, Hints hints) { hints = mergeSystemHints(hints); return new LazySet<T>(getServiceRegistry().getFactories(category, null, hints)); }
/** * Returns a set of all available implementations for the {@link StyleFactory} interface. * * @param hints An optional map of hints, or {@code null} if none. * @return Set of available style factory implementations. */ public static synchronized Set<StyleFactory> getStyleFactories(Hints hints) { hints = mergeSystemHints(hints); return new LazySet<StyleFactory>( getServiceRegistry().getFactories(StyleFactory.class, null, hints)); }
/** * Returns a set of all available implementations of {@link FunctionFactory}. * * @param hints An optional map of hints, or {@code null} if none. * @return Set of available function factory implementations. */ public static synchronized Set<FunctionFactory> getFunctionFactories(Hints hints) { hints = mergeSystemHints(hints); return new LazySet<FunctionFactory>( getServiceRegistry().getFactories(FunctionFactory.class, null, hints)); }
/** * Returns a set of all available implementations for the {@link FileDataStoreFactorySpi} * interface. * * @param hints An optional map of hints, or {@code null} if none. * @return Set of available file data store factory implementations. */ public static synchronized Set<FileDataStoreFactorySpi> getFileDataStoreFactories(Hints hints) { hints = mergeSystemHints(hints); return new LazySet<FileDataStoreFactorySpi>( getServiceRegistry().getFactories(FileDataStoreFactorySpi.class, null, hints)); }
/** * Returns a set of all available implementations for the {@link FeatureLockFactory} interface. * * @param hints An optional map of hints, or {@code null} if none. * @return Set<FeatureLockFactory> of available style factory implementations. * @deprecated FeatureLockFactory is no longer needed */ public static synchronized Set<FeatureLockFactory> getFeatureLockFactories(Hints hints) { hints = mergeSystemHints(hints); return new LazySet<FeatureLockFactory>( getServiceRegistry().getFactories(FeatureLockFactory.class, null, hints)); }