/**** * Protected Methods ****/ protected DefaultEntitySchemaFactory createEntitySchemaFactory() { return GtfsEntitySchemaFactory.createEntitySchemaFactory(); }
/**** * Protected Methods ****/ protected DefaultEntitySchemaFactory createEntitySchemaFactory() { return GtfsEntitySchemaFactory.createEntitySchemaFactory(); } }
/**** * Protected Methods ****/ protected DefaultEntitySchemaFactory createEntitySchemaFactory() { return GtfsEntitySchemaFactory.createEntitySchemaFactory(); }
/**** * Protected Methods ****/ protected DefaultEntitySchemaFactory createEntitySchemaFactory() { return GtfsEntitySchemaFactory.createEntitySchemaFactory(); } }
/** * Supplies a default entity schema factory to * {@link #readGtfsIntoStore(ApplicationContext, GenericMutableDao, DefaultEntitySchemaFactory)} * * @param context * @param store * @throws IOException */ public static void readGtfsIntoStore(ApplicationContext context, GenericMutableDao store) throws IOException { readGtfsIntoStore(context, store, GtfsEntitySchemaFactory.createEntitySchemaFactory()); }
/** * Supplies a default entity schema factory to * {@link #readGtfsIntoStore(ApplicationContext, GenericMutableDao, DefaultEntitySchemaFactory)} * * @param context * @param store * @throws IOException */ public static void readGtfsIntoStore(ApplicationContext context, GenericMutableDao store) throws IOException { readGtfsIntoStore(context, store, GtfsEntitySchemaFactory.createEntitySchemaFactory()); }
/** * Supplies a default entity schema factory to * {@link #readGtfsIntoStore(ApplicationContext, GenericMutableDao, DefaultEntitySchemaFactory)} * * @param context * @param store * @param disableStopConsolidation * @throws IOException */ public static void readGtfsIntoStore(ApplicationContext context, GenericMutableDao store, boolean disableStopConsolidation) throws IOException { readGtfsIntoStore(context, store, GtfsEntitySchemaFactory.createEntitySchemaFactory(), disableStopConsolidation); }
public static void main(String[] args) throws IOException { if (args.length != 2) { System.err.println("usage: bundle.xml output_path"); System.exit(-1); } List<String> paths = new ArrayList<String>(); paths.add(args[0]); ConfigurableApplicationContext context = ContainerLibrary.createContext(paths); GtfsDaoImpl store = new GtfsDaoImpl(); DefaultEntitySchemaFactory schema = GtfsEntitySchemaFactory.createEntitySchemaFactory(); GenericAdditionalFieldMapping.addGenericFieldMapping(schema, Stop.class, "stop_direction", "stopDirection"); GenericAdditionalFieldMapping.addGenericFieldMapping(schema, Trip.class, "block_sequence_id", "blockSequenceId"); GtfsReadingSupport.readGtfsIntoStore(context, store,schema); writeGtfs(new File(args[1]), store, schema); }
public static void main(String[] args) throws IOException { if (args.length != 2) { System.err.println("usage: bundle.xml output_path"); System.exit(-1); } List<String> paths = new ArrayList<String>(); paths.add(args[0]); ConfigurableApplicationContext context = ContainerLibrary.createContext(paths); GtfsDaoImpl store = new GtfsDaoImpl(); DefaultEntitySchemaFactory schema = GtfsEntitySchemaFactory.createEntitySchemaFactory(); GenericAdditionalFieldMapping.addGenericFieldMapping(schema, Stop.class, "stop_direction", "stopDirection"); GenericAdditionalFieldMapping.addGenericFieldMapping(schema, Trip.class, "block_sequence_id", "blockSequenceId"); GtfsReadingSupport.readGtfsIntoStore(context, store,schema); writeGtfs(new File(args[1]), store, schema); }
public static void main(String[] args) throws IOException { if (args.length != 2) { System.err.println("usage: bundle.xml output_path"); System.exit(-1); } List<String> paths = new ArrayList<String>(); paths.add(args[0]); ConfigurableApplicationContext context = ContainerLibrary.createContext(paths); GtfsDaoImpl store = new GtfsDaoImpl(); DefaultEntitySchemaFactory schema = GtfsEntitySchemaFactory.createEntitySchemaFactory(); GenericAdditionalFieldMapping.addGenericFieldMapping(schema, Stop.class, "stop_direction", "stopDirection"); GenericAdditionalFieldMapping.addGenericFieldMapping(schema, Trip.class, "block_sequence_id", "blockSequenceId"); GtfsReadingSupport.readGtfsIntoStore(context, store,schema); writeGtfs(new File(args[1]), store, schema); }
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); }