Class VariableResolver


  • public class VariableResolver
    extends Object

    A set of nested maps that can resolve variables by namespaces. Variables are enclosed with a dollar sign then an opening curly brace, ending with a closing curly brace. Namespaces are delimited with '.' (period).

    This class also has special logic to resolve evaluator calls by recognizing the reserved function namespace: dataimporter.functions.xxx

    This class caches strings that have already been resolved from the current dih import.

    This API is experimental and may change in the future.
    Since:
    solr 1.3
    • Constructor Detail

      • VariableResolver

        public VariableResolver()
      • VariableResolver

        public VariableResolver​(Properties defaults)
      • VariableResolver

        public VariableResolver​(Map<String,​Object> defaults)
    • Method Detail

      • resolve

        public Object resolve​(String name)
        Resolves a given value with a name
        Parameters:
        name - the String to be resolved
        Returns:
        an Object which is the result of evaluation of given name
      • replaceTokens

        public String replaceTokens​(String template)
        Given a String with place holders, replace them with the value tokens.
        Returns:
        the string with the placeholders replaced with their values
      • removeNamespace

        public void removeNamespace​(String name)