Package emissary.util
Class TypeEngine
- java.lang.Object
-
- emissary.util.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.
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,Configurator>
contextMapping
protected Map<String,Map<String,String>>
extraMapping
-
Constructor Summary
Constructors Constructor Description TypeEngine()
Just build an empty oneTypeEngine(Configurator configG)
Configure from a Configurator of the delegating classTypeEngine(List<String> configFiles)
Configure from a list of config files
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addType(String engine, String label, String value)
Add an extra mapping into the specified enginevoid
configure(List<String> configFiles)
Configure itString
getForm(String engine, String label)
Look up label in specified engineString
getFormByExtension(String engine, String fn)
Chop down to file extension and look it up in specified engine
-
-
-
Constructor Detail
-
TypeEngine
public TypeEngine(Configurator configG)
Configure from a Configurator of the delegating class
-
TypeEngine
public TypeEngine()
Just build an empty one
-
-
Method Detail
-
getForm
@Nullable public String getForm(@Nullable String engine, @Nullable String label)
Look up label in specified engine- Parameters:
engine
- name of the engine to uselabel
- 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
-
-