Package emissary.util

Class TypeEngine


  • public class TypeEngine
    extends Object
    Help determine type of data from various data file mappings The name of the file gives some context to the mappings it provides.
    • Constructor Detail

      • TypeEngine

        public TypeEngine​(Configurator configG)
        Configure from a Configurator of the delegating class
      • TypeEngine

        public TypeEngine​(List<String> configFiles)
        Configure from a list of config files
      • TypeEngine

        public TypeEngine()
        Just build an empty one
    • Method Detail

      • configure

        public void configure​(@Nullable
                              List<String> configFiles)
        Configure it
      • getForm

        @Nullable
        public String getForm​(@Nullable
                              String engine,
                              @Nullable
                              String label)
        Look up label in specified engine
        Parameters:
        engine - name of the engine to use
        label - LHS part of equation to lookup
        Returns:
        RHS part of mapping or null if none found
      • addType

        public void addType​(String engine,
                            String label,
                            String value)
        Add an extra mapping into the specified engine
      • getFormByExtension

        @Nullable
        public String getFormByExtension​(String engine,
                                         @Nullable
                                         String fn)
        Chop down to file extension and look it up in specified engine