Search in sources :

Example 1 with SchemaUpdateStrategy

use of org.onebusaway.gtfs_transformer.services.SchemaUpdateStrategy in project onebusaway-gtfs-modules by OneBusAway.

the class GtfsTransformer method writeGtfs.

private void writeGtfs() throws IOException {
    if (_outputDirectory == null) {
        return;
    }
    _writer.setOutputLocation(_outputDirectory);
    DefaultEntitySchemaFactory schemaFactory = new DefaultEntitySchemaFactory();
    schemaFactory.addFactory(GtfsEntitySchemaFactory.createEntitySchemaFactory());
    for (SchemaUpdateStrategy strategy : _outputSchemaUpdates) strategy.updateSchema(schemaFactory);
    _writer.setEntitySchemaFactory(schemaFactory);
    _writer.run(_dao);
}
Also used : DefaultEntitySchemaFactory(org.onebusaway.csv_entities.schema.DefaultEntitySchemaFactory) SchemaUpdateStrategy(org.onebusaway.gtfs_transformer.services.SchemaUpdateStrategy)

Aggregations

DefaultEntitySchemaFactory (org.onebusaway.csv_entities.schema.DefaultEntitySchemaFactory)1 SchemaUpdateStrategy (org.onebusaway.gtfs_transformer.services.SchemaUpdateStrategy)1