Package org.onebusaway.csv_entities.schema

Examples of org.onebusaway.csv_entities.schema.AnnotationDrivenEntitySchemaFactory


  public void test() throws IOException {

    CsvEntityReader reader = new CsvEntityReader();
    reader.setInputLocation(new File(
        "src/test/resources/org/onebusaway/uk/naptan/csv/test_data"));
    AnnotationDrivenEntitySchemaFactory entitySchema = new AnnotationDrivenEntitySchemaFactory();
    entitySchema.addPackageToScan("org.onebusaway.uk.naptan.csv");
    reader.setEntitySchemaFactory(entitySchema);
    ListEntityHandler<NaPTANStop> stopHandler = new ListEntityHandler<NaPTANStop>();
    reader.addEntityHandler(stopHandler);
    reader.readEntities(NaPTANStop.class);
    reader.close();
View Full Code Here


      return;
    }

    CsvEntityReader reader = new CsvEntityReader();
    reader.setInputLocation(_naptanCsvPath);
    AnnotationDrivenEntitySchemaFactory entitySchema = new AnnotationDrivenEntitySchemaFactory();
    entitySchema.addPackageToScan("org.onebusaway.uk.naptan.csv");
    reader.setEntitySchemaFactory(entitySchema);
    reader.addEntityHandler(new EntityHandler() {
      @Override
      public void handleEntity(Object arg0) {
        NaPTANStop stop = (NaPTANStop) arg0;
View Full Code Here

  @Override
  protected void setup() {
    _reader = new CsvEntityReader();

    AnnotationDrivenEntitySchemaFactory entitySchemaFactory = new AnnotationDrivenEntitySchemaFactory();
    entitySchemaFactory.addEntityClass(OrbcadRecord.class);
    _reader.setEntitySchemaFactory(entitySchemaFactory);

    _reader.addEntityHandler(new RecordHandler());
  }
View Full Code Here

  protected void setup() {

    _reader = new CsvEntityReader();

    AnnotationDrivenEntitySchemaFactory entitySchemaFactory = new AnnotationDrivenEntitySchemaFactory();
    entitySchemaFactory.addEntityClass(OrbcadRecord.class);
    _reader.setEntitySchemaFactory(entitySchemaFactory);

    _reader.addEntityHandler(new RecordHandler());
  }
View Full Code Here

    reader.readEntities(TccParticipantRegistrationBean.class, in);
  }

  private CsvEntityReader getReader() {
    CsvEntityReader reader = new CsvEntityReader();
    AnnotationDrivenEntitySchemaFactory factory = new AnnotationDrivenEntitySchemaFactory();
    factory.addEntityClass(TccParticipantRegistrationBean.class);
    reader.setEntitySchemaFactory(factory);
    return reader;
  }
View Full Code Here

TOP

Related Classes of org.onebusaway.csv_entities.schema.AnnotationDrivenEntitySchemaFactory

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.