org.apache.solr.handler.dataimport
Class DateFormatEvaluator
java.lang.Object
org.apache.solr.handler.dataimport.Evaluator
org.apache.solr.handler.dataimport.DateFormatEvaluator
public class DateFormatEvaluator
- extends Evaluator
Formats values using a given date format.
Pass three parameters:
- An
EntityField
or a date expression to be parsed with
the DateMathParser
class If the value is in a String,
then it is assumed to be a datemath expression, otherwise it
resolved using a VariableResolver
instance
- A date format see
SimpleDateFormat
for the syntax.
- The
Locale
to parse.
(optional. Defaults to the Root Locale)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_DATE_FORMAT
public static final String DEFAULT_DATE_FORMAT
- See Also:
- Constant Field Values
DateFormatEvaluator
public DateFormatEvaluator()
evaluate
public String evaluate(String expression,
Context context)
- Description copied from class:
Evaluator
- Return a String after processing an expression and a
VariableResolver
- Specified by:
evaluate
in class Evaluator
- Parameters:
expression
- string to be evaluatedcontext
- instance
- Returns:
- the value of the given expression evaluated using the resolver
- See Also:
VariableResolver
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.