Tabnine Logo
FactoryRegistry.getServiceProvider
Code IndexAdd Tabnine to your IDE (free)

How to use
getServiceProvider
method
in
org.geotools.factory.FactoryRegistry

Best Java code snippets using org.geotools.factory.FactoryRegistry.getServiceProvider (Showing top 17 results out of 315)

origin: org.geotools/gt2-main

/**
 * Returns the first implementation of {@link PrecisionModel} matching the specified hints.
 * If no implementation matches, a new one is created if possible or an exception is thrown
 * otherwise.
 *
 * @param  hints An optional map of hints, or {@code null} if none.
 * @return The first precision model that matches the supplied hints.
 * @throws FactoryRegistryException if no implementation was found or can be created for the
 *         {@link PrecisionModel} category and the given hints.
 */
public static synchronized PrecisionModel getPrecisionModel(final Hints hints) throws FactoryRegistryException {
  return (PrecisionModel) getServiceRegistry().getServiceProvider(
      PrecisionModel.class, null, hints, Hints.JTS_PRECISION_MODEL);
}
origin: org.geotools/gt2-main

/**
 * Returns the first implementation of {@link CoordinateSequenceFactory} matching the specified
 * hints. If no implementation matches, a new one is created if possible or an exception is
 * thrown otherwise.
 *
 * @param  hints An optional map of hints, or {@code null} if none.
 * @return The first coordinate sequence factory that matches the supplied hints.
 * @throws FactoryRegistryException if no implementation was found or can be created for the
 *         {@link CoordinateSequenceFactory} interface and the given hints.
 */
public static synchronized CoordinateSequenceFactory getCoordinateSequenceFactory(final Hints hints) throws FactoryRegistryException {
  return (CoordinateSequenceFactory) getServiceRegistry().getServiceProvider(
      CoordinateSequenceFactory.class, null, hints, Hints.JTS_COORDINATE_SEQUENCE_FACTORY);
}
origin: org.geotools/gt2-coverage

/**
 * Returns the first implementation of {@link GridCoverageFactory} matching the specified hints.
 * If no implementation matches, a new one is created if possible or an exception is thrown
 * otherwise.
 *
 * @param  hints An optional map of hints, or {@code null} if none.
 * @return The first grid coverage factory that matches the supplied hints.
 * @throws FactoryRegistryException if no implementation was found or can be created for the
 *         {@link GridCoverageFactory} interface.
 *
 * @see Hints#DEFAULT_COORDINATE_REFERENCE_SYSTEM
 * @see Hints#TILE_ENCODING
 */
public static synchronized GridCoverageFactory getGridCoverageFactory(final Hints hints)
    throws FactoryRegistryException
{
  return (GridCoverageFactory) getServiceRegistry().getServiceProvider(
      GridCoverageFactory.class, null, hints, null);
}
origin: org.geotools/gt2-main

/**
 * Returns the first implementation of {@link GeometryFactory} matching the specified hints.
 * If no implementation matches, a new one is created if possible or an exception is thrown
 * otherwise.
 * <p>
 * Hints that may be understood includes
 * {@link Hints#JTS_COORDINATE_SEQUENCE_FACTORY JTS_COORDINATE_SEQUENCE_FACTORY},
 * {@link Hints#JTS_PRECISION_MODEL             JTS_PRECISION_MODEL} and
 * {@link Hints#JTS_SRID                        JTS_SRID}.
 *
 * @param  hints An optional map of hints, or {@code null} if none.
 * @return The first geometry factory that matches the supplied hints.
 * @throws FactoryRegistryException if no implementation was found or can be created for the
 *         {@link GeometryFactory} category and the given hints.
 */
public static synchronized GeometryFactory getGeometryFactory(final Hints hints) throws FactoryRegistryException {
  return (GeometryFactory) getServiceRegistry().getServiceProvider(
      GeometryFactory.class, null, hints, Hints.JTS_GEOMETRY_FACTORY);
}
origin: org.geotools/gt-main

/**
 * Returns the first implementation of {@link PrecisionModel} matching the specified hints.
 * If no implementation matches, a new one is created if possible or an exception is thrown
 * otherwise.
 *
 * @param  hints An optional map of hints, or {@code null} if none.
 * @return The first precision model that matches the supplied hints.
 * @throws FactoryRegistryException if no implementation was found or can be created for the
 *         {@link PrecisionModel} category and the given hints.
 */
public static synchronized PrecisionModel getPrecisionModel(Hints hints) throws FactoryRegistryException {
  hints = mergeSystemHints(hints);
  return (PrecisionModel) getServiceRegistry().getServiceProvider(
      PrecisionModel.class, null, hints, Hints.JTS_PRECISION_MODEL);
}
origin: org.geotools/gt-main

/**
 * Returns the first implementation of {@link CoordinateSequenceFactory} matching the specified
 * hints. If no implementation matches, a new one is created if possible or an exception is
 * thrown otherwise.
 *
 * @param  hints An optional map of hints, or {@code null} if none.
 * @return The first coordinate sequence factory that matches the supplied hints.
 * @throws FactoryRegistryException if no implementation was found or can be created for the
 *         {@link CoordinateSequenceFactory} interface and the given hints.
 */
public static synchronized CoordinateSequenceFactory getCoordinateSequenceFactory(Hints hints) throws FactoryRegistryException {
  hints = mergeSystemHints(hints);
  return (CoordinateSequenceFactory) getServiceRegistry().getServiceProvider(
      CoordinateSequenceFactory.class, null, hints, Hints.JTS_COORDINATE_SEQUENCE_FACTORY);
}
origin: org.geotools/gt-main

/**
 * Returns the first implementation of {@link GeometryFactory} matching the specified hints.
 * If no implementation matches, a new one is created if possible or an exception is thrown
 * otherwise.
 * <p>
 * Hints that may be understood includes
 * {@link Hints#JTS_COORDINATE_SEQUENCE_FACTORY JTS_COORDINATE_SEQUENCE_FACTORY},
 * {@link Hints#JTS_PRECISION_MODEL             JTS_PRECISION_MODEL} and
 * {@link Hints#JTS_SRID                        JTS_SRID}.
 *
 * @param  hints An optional map of hints, or {@code null} if none.
 * @return The first geometry factory that matches the supplied hints.
 * @throws FactoryRegistryException if no implementation was found or can be created for the
 *         {@link GeometryFactory} category and the given hints.
 */
public static synchronized GeometryFactory getGeometryFactory(Hints hints) throws FactoryRegistryException {
  hints = mergeSystemHints(hints);
  return (GeometryFactory) getServiceRegistry().getServiceProvider(
      GeometryFactory.class, null, hints, Hints.JTS_GEOMETRY_FACTORY);
}
/**
origin: org.geotools/gt2-main

/**
 * Returns the first implementation of {@link FeatureCollections} matching the specified hints.
 * If no implementation matches, a new one is created if possible or an exception is thrown
 * otherwise.
 *
 * @param  hints An optional map of hints, or {@code null} if none.
 * @return The first feature collections that matches the supplied hints.
 * @throws FactoryRegistryException if no implementation was found or can be created for the
 *         {@link FeatureCollections} interface.
 *
 * @see Hints#FEATURE_COLLECTIONS
 */
public static synchronized FeatureCollections getFeatureCollections(Hints hints) {
  hints = mergeSystemHints(hints);
  return (FeatureCollections) getServiceRegistry().getServiceProvider(
      FeatureCollections.class, null, hints, Hints.FEATURE_COLLECTIONS);
}
origin: org.geotools/gt2-main

/**
 * Returns the first implementation of {@link FeatureLockFactory} matching the specified hints.
 * If no implementation matches, a new one is created if possible or an exception is thrown
 * otherwise.
 *
 * @param  hints An optional map of hints, or {@code null} if none.
 * @return The first feature lock factory that matches the supplied hints.
 * @throws FactoryRegistryException if no implementation was found or can be created for the
 *         {@link FeatureLockFactory} interface.
 *
 * @see Hints#FEATURE_LOCK_FACTORY
 */
public static synchronized FeatureLockFactory getFeatureLockFactory(Hints hints) {
  hints = mergeSystemHints(hints);
  return (FeatureLockFactory) getServiceRegistry().getServiceProvider(
      FeatureLockFactory.class, null, hints, Hints.FEATURE_LOCK_FACTORY);
}
origin: org.geotools/gt2-main

/**
 * Returns the first implementation of {@link StyleFactory} matching the specified hints.
 * If no implementation matches, a new one is created if possible or an exception is thrown
 * otherwise.
 *
 * @param  hints An optional map of hints, or {@code null} if none.
 * @return The first style factory that matches the supplied hints.
 * @throws FactoryRegistryException if no implementation was found or can be created for the
 *         {@link StyleFactory} interface.
 *
 * @see Hints#STYLE_FACTORY
 */
public static synchronized StyleFactory getStyleFactory(Hints hints)
    throws FactoryRegistryException
{
  hints = mergeSystemHints(hints);
  return (StyleFactory) getServiceRegistry().getServiceProvider(
      StyleFactory.class, null, hints, Hints.STYLE_FACTORY);
}
origin: org.geotools/gt2-main

/**
 * Returns the first implementation of {@link AttributeTypeFactory} matching the specified hints.
 * If no implementation matches, a new one is created if possible or an exception is thrown
 * otherwise.
 * <p>
 * If no hints are provided, this method typically returns an instance of
 * {@link org.geotools.feature.DefaultAttributeTypeFactory}.
 *
 * @param  hints An optional map of hints, or {@code null} if none.
 * @return The first attribute type factory that matches the supplied hints.
 * @throws FactoryRegistryException if no implementation was found or can be created for the
 *         {@link AttributeTypeFactory} interface.
 *
 * @see Hints#ATTRIBUTE_TYPE_FACTORY
 * @see org.geotools.feature.DefaultAttributeTypeFactory
 */
public static synchronized AttributeTypeFactory getAttributeTypeFactory(Hints hints) {
  hints = mergeSystemHints(hints);
  return (AttributeTypeFactory) getServiceRegistry().getServiceProvider(
      AttributeTypeFactory.class, null, hints, Hints.ATTRIBUTE_TYPE_FACTORY);
}
origin: org.geotools/gt2-main

/**
 * Returns the first implementation of {@link FilterFactory} matching the specified hints.
 * If no implementation matches, a new one is created if possible or an exception is thrown
 * otherwise.
 *
 * @param  hints An optional map of hints, or {@code null} if none.
 * @return The first filter factory that matches the supplied hints.
 * @throws FactoryRegistryException if no implementation was found or can be created for the
 *         {@link FilterFactory} interface.
 *
 * @see Hints#FILTER_FACTORY
 */
public static synchronized FilterFactory getFilterFactory(Hints hints)
    throws FactoryRegistryException
{
  hints = mergeSystemHints(hints);
  return (FilterFactory) getServiceRegistry().getServiceProvider(
      FilterFactory.class, null, hints, Hints.FILTER_FACTORY);
}
origin: org.geotools/gt-coverage

/**
 * Returns the first implementation of {@link GridCoverageFactory} matching the specified hints.
 * If no implementation matches, a new one is created if possible or an exception is thrown
 * otherwise.
 *
 * @param  hints An optional map of hints, or {@code null} if none.
 * @return The first grid coverage factory that matches the supplied hints.
 * @throws FactoryRegistryException if no implementation was found or can be created for the
 *         {@link GridCoverageFactory} interface.
 *
 * @see Hints#DEFAULT_COORDINATE_REFERENCE_SYSTEM
 * @see Hints#TILE_ENCODING
 */
public static synchronized GridCoverageFactory getGridCoverageFactory(Hints hints)
    throws FactoryRegistryException
{
  hints = mergeSystemHints(hints);
  return getServiceRegistry().getServiceProvider(GridCoverageFactory.class, null, hints, null);
}
origin: org.geotools/gt2-main

/**
 * Create a new FeatureTypeFactory with the given typeName.
 *
 * @param name The typeName of the feature to create.
 *
 * @return A new FeatureTypeFactory instance.
 *
 * @throws FactoryRegistryException If there exists a configuration error.
 */
public static synchronized FeatureTypeFactory newInstance(String name)
  throws FactoryRegistryException {
  FeatureTypeFactory factory = (FeatureTypeFactory) getServiceRegistry()
    .getServiceProvider(FeatureTypeFactory.class, null, null, null);
  FeatureTypeFactory newFactory;
  try {
    newFactory = (FeatureTypeFactory) factory.getClass().newInstance();
  } catch (InstantiationException e) {
    throw new FactoryRegistryException(e.getMessage(), e);
  } catch (IllegalAccessException e) {
    throw new FactoryRegistryException(e.getMessage(), e);
  }
  newFactory.setName(name);
  return newFactory;
}
origin: org.geotools/gt-legacy

/**
 * Create a new FeatureTypeFactory with the given typeName.
 *
 * @param name The typeName of the feature to create.
 *
 * @return A new FeatureTypeFactory instance.
 *
 * @throws FactoryRegistryException If there exists a configuration error.
 */
public static synchronized FeatureTypeFactory newInstance(String name)
  throws FactoryRegistryException {
  FeatureTypeFactory factory = (FeatureTypeFactory) getServiceRegistry()
    .getServiceProvider(FeatureTypeFactory.class, null, null, null);
  FeatureTypeFactory newFactory;
  try {
    newFactory = (FeatureTypeFactory) factory.getClass().newInstance();
  } catch (InstantiationException e) {
    throw new FactoryRegistryException(e.getMessage(), e);
  } catch (IllegalAccessException e) {
    throw new FactoryRegistryException(e.getMessage(), e);
  }
  newFactory.setName(name);
  return newFactory;
}
origin: org.geotools/gt-metadata

  return super.getServiceProvider(category, filter, hints, key);
} catch (FactoryNotFoundException exception) {
origin: org.geotools/gt2-metadata

  return super.getServiceProvider(category, filter, hints, key);
} catch (FactoryNotFoundException exception) {
org.geotools.factoryFactoryRegistrygetServiceProvider

Javadoc

Returns the first provider in the registry for the specified category, using the specified map of hints (if any). This method may #scanForPlugins the first time it is invoked. Except as a result of this scan, no new provider instance is created by the default implementation of this method. The FactoryCreator class change this behavior however.

Popular methods of FactoryRegistry

  • getServiceProviders
  • scanForPlugins
    Scans for factory plug-ins of the given category, with guard against recursivities. The recursivity
  • lookupProviders
  • registerServiceProvider
  • <init>
    Constructs a new registry for the specified categories.
  • debug
    Log a debug message for #getServiceProvider method. Note: we are not required to insert the method n
  • getCachedProviders
    Returns the providers available in the cache, or null if none. To be overridden by FactoryCreator on
  • getCategories
  • getClassLoaders
    Returns all class loaders to be used for scanning plugins. Current implementation returns the follow
  • getFactories
  • getLogHeader
    Prepares a message to be logged if any provider has been registered.
  • getServiceImplementation
    Search the first implementation in the registery matching the specified conditions. This method is i
  • getLogHeader,
  • getServiceImplementation,
  • getServiceProviderByClass,
  • getUnfilteredProviders,
  • isAcceptable,
  • isAvailable,
  • loadingFailure,
  • log,
  • register

Popular in Java

  • Start an intent from android
  • scheduleAtFixedRate (ScheduledExecutorService)
  • findViewById (Activity)
  • startActivity (Activity)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now