private static void writeGtfs(File outputDirectory, GtfsDaoImpl store, DefaultEntitySchemaFactory schema) throws IOException { GtfsWriter writer = new GtfsWriter(); writer.setOutputLocation(outputDirectory); writer.setEntitySchemaFactory(schema); writer.run(store); } }
public void run(GtfsDao dao) throws IOException { List<Class<?>> classes = getEntityClasses(); for (Class<?> entityClass : classes) { _log.info("writing entities: " + entityClass.getName()); Collection<Object> entities = sortEntities(entityClass, dao.getAllEntitiesForType(entityClass)); excludeOptionalAndMissingFields(entityClass, entities); for (Object entity : entities) handleEntity(entity); flush(); } close(); }
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); }
GtfsWriter writer = new GtfsWriter(); writer.setOutputLocation(outputPath); writer.run(mergedDao);
public GtfsWriter() { /** * Prep the Entity Schema Factories */ _entityClasses.addAll(GtfsEntitySchemaFactory.getEntityClasses()); _entityComparators.putAll(GtfsEntitySchemaFactory.getEntityComparators()); DefaultEntitySchemaFactory schemaFactory = createEntitySchemaFactory(); setEntitySchemaFactory(schemaFactory); }
GtfsWriter writer = new GtfsWriter(); writer.setOutputLocation(outputPath); writer.run(mergedDao);
public GtfsWriter() { /** * Prep the Entity Schema Factories */ _entityClasses.addAll(GtfsEntitySchemaFactory.getEntityClasses()); _entityComparators.putAll(GtfsEntitySchemaFactory.getEntityComparators()); DefaultEntitySchemaFactory schemaFactory = createEntitySchemaFactory(); setEntitySchemaFactory(schemaFactory); }
private static void writeGtfs(File outputDirectory, GtfsDaoImpl store, DefaultEntitySchemaFactory schema) throws IOException { GtfsWriter writer = new GtfsWriter(); writer.setOutputLocation(outputDirectory); writer.setEntitySchemaFactory(schema); writer.run(store); } }
public void run(GtfsDao dao) throws IOException { List<Class<?>> classes = getEntityClasses(); for (Class<?> entityClass : classes) { _log.info("writing entities: " + entityClass.getName()); Collection<Object> entities = sortEntities(entityClass, dao.getAllEntitiesForType(entityClass)); excludeOptionalAndMissingFields(entityClass, entities); for (Object entity : entities) handleEntity(entity); flush(); } close(); }
private static void writeGtfs(File outputDirectory, GtfsDaoImpl store, DefaultEntitySchemaFactory schema) throws IOException { GtfsWriter writer = new GtfsWriter(); writer.setOutputLocation(outputDirectory); writer.setEntitySchemaFactory(schema); writer.run(store); } }