Class ConfigTypedFactory<T>

java.lang.Object
org.n52.io.handler.ConfigTypedFactory<T>
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware
Direct Known Subclasses:
DefaultIoFactory

public abstract class ConfigTypedFactory<T> extends Object implements org.springframework.context.ApplicationContextAware
  • Field Details

  • Constructor Details

    • ConfigTypedFactory

      protected ConfigTypedFactory(File configFile)
    • ConfigTypedFactory

      protected ConfigTypedFactory(InputStream is)
    • ConfigTypedFactory

      protected ConfigTypedFactory(String defaultConfig)
  • Method Details

    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext context)
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
    • getDefaultConfigFile

      protected static InputStream getDefaultConfigFile(String configLocation)
    • isKnown

      public boolean isKnown(String type)
    • getKnownTypes

      public Set<String> getKnownTypes()
    • hasCacheEntry

      public boolean hasCacheEntry(String type)
    • getCacheEntry

      public T getCacheEntry(String type)
    • create

      public T create(String type) throws DatasetFactoryException
      Throws:
      DatasetFactoryException
    • getFallbackConfigResource

      protected abstract String getFallbackConfigResource()
      Tries to load a default config file which can be found by the target type's classloader.
      Returns:
      a relative path to the config within the jar
      See Also:
    • getTargetType

      protected abstract Class<?> getTargetType()
      Returns:
      the type this factory creates
    • initInstance

      protected T initInstance(T instance)