Package it.unimi.dsi.mg4j.index.payload

Examples of it.unimi.dsi.mg4j.index.payload.DatePayload


        scan[ i ] = new Scan( basename + '-' + fieldName, fieldName, completeness, termProcessor, IndexingType.VIRTUAL,
            virtualDocumentResolver[ i ].numberOfDocuments(), virtualGap[ i ], bufferSize, builder, tempDir );
        break;

      case DATE:
        accumulator[ i ] = new PayloadAccumulator( basename + '-' + fieldName, new DatePayload(), fieldName,
            map != null ? IndexingType.REMAPPED : IndexingType.STANDARD, documentsPerBatch, tempDir );
        break;
      case INT:
        accumulator[ i ] = new PayloadAccumulator( basename + '-' + fieldName, new IntegerPayload(), fieldName,
            map != null ? IndexingType.REMAPPED : IndexingType.STANDARD, documentsPerBatch, tempDir );
View Full Code Here


import java.util.Date;

public class DatePayloadTest extends PayloadTestCase {
 
  public void testReadWrite() throws IOException, ParseException {
    DatePayload datePayload = new DatePayload();
    Date date = DateFormat.getDateInstance( DateFormat.SHORT ).parse( "1/1/2001" );
    datePayload.set( date );
    testWriteAndRead( datePayload );
    assertEquals( date, datePayload.get() );

    date = DateFormat.getDateInstance( DateFormat.SHORT ).parse( "1/1/1901" );
    datePayload.set( date );
    testWriteAndRead( datePayload );
    assertEquals( date, datePayload.get() );
  }
View Full Code Here

TOP

Related Classes of it.unimi.dsi.mg4j.index.payload.DatePayload

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.