PageRenderTime 158ms CodeModel.GetById 98ms app.highlight 26ms RepoModel.GetById 1ms app.codeStats 0ms

/branches/branch-3x/src/org/getopt/luke/decoders/OldDateFieldDecoder.java

http://luke.googlecode.com/
Java | 21 lines | 15 code | 6 blank | 0 comment | 0 complexity | 117c60b49aff5e0df4fa57f99c98f1e1 MD5 | raw file
 1package org.getopt.luke.decoders;
 2
 3import org.apache.lucene.document.DateField;
 4
 5public class OldDateFieldDecoder implements Decoder {
 6
 7  @Override
 8  public String decodeTerm(String fieldName, Object value) throws Exception {
 9    return DateField.stringToDate(value.toString()).toString();
10  }
11  
12  @Override
13  public String decodeStored(String fieldName, Object value) throws Exception {
14    return decodeTerm(fieldName, value);
15  }
16  
17  public String toString() {
18    return "(old DateField)";
19  }
20
21}