CommonFactoryFinder.lookup
Code IndexAdd Codota to your IDE (free)

Best code snippets using org.geotools.factory.CommonFactoryFinder.lookup(Showing top 12 results out of 315)

origin: geotools/geotools

/** Return the first implementation of {@link FeatureTypeFactory} matching the specified hints.
 * <p>
 * If no implementation matches, a new one is created if possible or an exception is thrown.
 * 
 * @param hints An optional map of hints; or {@code null} if none
 * @return Instance of FeatureTypeFactory matching the supplied hints
 * @throws FactoryRegistryException if no implementation could be provided
 * @see Hints#FEATURE_TYPE_FACTORY
 */
public static FeatureTypeFactory getFeatureTypeFactory(Hints hints) {
  hints = mergeSystemHints(hints);
  return (FeatureTypeFactory) lookup(FeatureTypeFactory.class, hints, Hints.FEATURE_TYPE_FACTORY);
}

origin: org.geotools/gt-api

/** Return the first implementation of {@link FeatureFactory} matching the specified hints.
 * <p>
 * If no implementation matches, a new one is created if possible or an exception is thrown.
 * 
 * @param hints An optional map of hints; or {@code null} if none
 * @return Instance of FeatureFactory matching the supplied hints
 * @throws FactoryRegistryException if no implementation could be provided
 * @see Hints#FEATURE_FACTORY
 */
public static FeatureFactory getFeatureFactory(Hints hints) {
  hints = mergeSystemHints(hints);
  if(hints.get(Hints.FEATURE_FACTORY) == null){
    try {
      Class<?> lenient = Class.forName("org.geotools.feature.LenientFeatureFactoryImpl");
      hints.put(Hints.FEATURE_FACTORY, lenient );
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    }
  }
  return (FeatureFactory) lookup(FeatureFactory.class, hints, Hints.FEATURE_FACTORY);
}

origin: org.geotools/gt-api

/** Return the first implementation of {@link FeatureTypeFactory} matching the specified hints.
 * <p>
 * If no implementation matches, a new one is created if possible or an exception is thrown.
 * 
 * @param hints An optional map of hints; or {@code null} if none
 * @return Instance of FeatureTypeFactory matching the supplied hints
 * @throws FactoryRegistryException if no implementation could be provided
 * @see Hints#FEATURE_TYPE_FACTORY
 */
public static FeatureTypeFactory getFeatureTypeFactory(Hints hints) {
  hints = mergeSystemHints(hints);
  return (FeatureTypeFactory) lookup(FeatureTypeFactory.class, hints, Hints.FEATURE_TYPE_FACTORY);
}

origin: geotools/geotools

/**
 * 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
 * @deprecated FeautreLockFactory is no longer needed; please create a FeatureLock directly
 */
public static FeatureLockFactory getFeatureLockFactory(Hints hints) {
  hints = mergeSystemHints(hints);
  return (FeatureLockFactory) lookup(FeatureLockFactory.class, hints, Hints.FEATURE_LOCK_FACTORY);
}
origin: org.geotools/gt-api

/**
 * 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
 * @deprecated FeautreLockFactory is no longer needed; please create a FeatureLock directly
 */
public static FeatureLockFactory getFeatureLockFactory(Hints hints) {
  hints = mergeSystemHints(hints);
  return (FeatureLockFactory) lookup(FeatureLockFactory.class, hints, Hints.FEATURE_LOCK_FACTORY);
}
origin: geotools/geotools

/**
 * 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 FeatureCollections getFeatureCollections(Hints hints) {
  hints = mergeSystemHints(hints);
  return (FeatureCollections) lookup(FeatureCollections.class, hints, Hints.FEATURE_COLLECTIONS);
}
/**
origin: org.geotools/gt-api

/**
 * 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 FilterFactory getFilterFactory(Hints hints)
    throws FactoryRegistryException
{
  hints = mergeSystemHints(hints);
  return (FilterFactory) lookup(FilterFactory.class, hints, Hints.FILTER_FACTORY);
}

origin: geotools/geotools

/**
 * 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 StyleFactory getStyleFactory(Hints hints)
    throws FactoryRegistryException
{
  hints = mergeSystemHints(hints);
  return (StyleFactory) lookup(StyleFactory.class, hints, Hints.STYLE_FACTORY);
}
/**
origin: org.geotools/gt-api

/**
 * 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 FeatureCollections getFeatureCollections(Hints hints) {
  hints = mergeSystemHints(hints);
  return (FeatureCollections) lookup(FeatureCollections.class, hints, Hints.FEATURE_COLLECTIONS);
}
/**
origin: org.geotools/gt-api

/**
 * 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 StyleFactory getStyleFactory(Hints hints)
    throws FactoryRegistryException
{
  hints = mergeSystemHints(hints);
  return (StyleFactory) lookup(StyleFactory.class, hints, Hints.STYLE_FACTORY);
}
/**
origin: geotools/geotools

/**
 * 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 FilterFactory getFilterFactory(Hints hints)
    throws FactoryRegistryException
{
  hints = mergeSystemHints(hints);
  return (FilterFactory) lookup(FilterFactory.class, hints, Hints.FILTER_FACTORY);
}

origin: geotools/geotools

/** Return the first implementation of {@link FeatureFactory} matching the specified hints.
 * <p>
 * If no implementation matches, a new one is created if possible or an exception is thrown.
 * 
 * @param hints An optional map of hints; or {@code null} if none
 * @return Instance of FeatureFactory matching the supplied hints
 * @throws FactoryRegistryException if no implementation could be provided
 * @see Hints#FEATURE_FACTORY
 */
public static FeatureFactory getFeatureFactory(Hints hints) {
  hints = mergeSystemHints(hints);
  if(hints.get(Hints.FEATURE_FACTORY) == null){
    try {
      Class<?> lenient = Class.forName("org.geotools.feature.LenientFeatureFactoryImpl");
      hints.put(Hints.FEATURE_FACTORY, lenient );
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    }
  }
  return (FeatureFactory) lookup(FeatureFactory.class, hints, Hints.FEATURE_FACTORY);
}

org.geotools.factoryCommonFactoryFinderlookup

Javadoc

Looks up a certain factory using two methods:
  • First and un-synchronized lookup in the hints, should the user have provided the preferred factroy
  • A standard SPI registry scan, which has to be fully synchronized

Popular methods of CommonFactoryFinder

  • getFilterFactory
    Returns the first implementation of FilterFactory matching the specified hints. If no implementation
  • getFilterFactory2
    Returns the first implementation of FilterFactory2 matching the specified hints. This is a convenien
  • getStyleFactory
    Returns the first implementation of StyleFactory matching the specified hints. If no implementation
  • getFeatureFactory
    Return the first implementation of FeatureFactory matching the specified hints. If no implementatio
  • getFunctionFactories
    Returns a set of all available implementations of FunctionFactory.
  • reset
    Resets the factory finder and prepares for a new full scan of the SPI subsystems
  • getFeatureCollections
    Returns the first implementation of FeatureCollections matching the specified hints. If no implement
  • getFeatureLockFactory
    Returns the first implementation of FeatureLockFactory matching the specified hints. If no implement
  • getFeatureTypeFactory
    Return the first implementation of FeatureTypeFactory matching the specified hints. If no implementa
  • getFileDataStoreFactories
    Returns a set of all available implementations for the FileDataStoreFactorySpi interface.
  • getFunctions
    Returns a set of all available implementations for the Function interface.
  • getServiceRegistry
    Returns the service registry. The registry will be created the first time this method is invoked.
  • getFunctions,
  • getServiceRegistry,
  • getStyleFactories,
  • mergeSystemHints

Popular classes and methods

  • compareTo (BigDecimal)
    Compares this BigDecimal with val. Returns one of the three values 1, 0, or -1. The method behaves a
  • setContentView (Activity)
  • addToBackStack (FragmentTransaction)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • TimeZone (java.util)
    TimeZone represents a time zone, primarily used for configuring a Calendar or java.text.SimpleDateF
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • ImageIO (javax.imageio)
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble

For IntelliJ IDEA and
Android Studio

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)