org.onebusaway.transit_data_federation.bundle
Class FederatedTransitDataBundleCreator

java.lang.Object
  extended by org.onebusaway.transit_data_federation.bundle.FederatedTransitDataBundleCreator

public class FederatedTransitDataBundleCreator
extends Object

The primary method for building a new federated transit data bundle, which is the collection of resources and optimized data structures necessary to power a federated transit data bundle instance. The bundle is constructed from a number of input resources, including GtfsBundle objects and street network resources. While this class can be accessed directly, it is mostly designed to be run from the command line using the FederatedTransitDataBundleCreatorMain runner. Various stages of the bundle building process can be conditionally enabled and disabled by passing Stages arguments to methods like #setStageToSkip(Stages). All stages are enabled by default. The build process is configured using Spring and additional context config paths can be specified to add to the Spring container (see setContextPaths(List)). The core config is kept in the resource:

Author:
bdferris
See Also:
FederatedTransitDataBundleCreatorMain

Constructor Summary
FederatedTransitDataBundleCreator()
           
 
Method Summary
 void addTaskToInclude(String taskToInclude)
           
 void addTaskToOnlyRun(String onlyTask)
           
 void addTaskToSkip(String taskToSkip)
           
 void run()
          Build the bundle!
 void setAdditionalBeanPropertyOverrides(Properties props)
           
 void setBundleKey(String key)
           
 void setContext(org.springframework.context.ConfigurableApplicationContext context)
           
 void setContextBeans(Map<String,org.springframework.beans.factory.config.BeanDefinition> contextBeans)
           
 void setContextPaths(List<String> paths)
          Additional context paths that will be added when constructing the Spring container that controls the build process.
 void setOutputPath(File outputPath)
           
 void setRandomizeCacheDir(boolean randomizeCacheDir)
           
 void setSkipToTask(String taskName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FederatedTransitDataBundleCreator

public FederatedTransitDataBundleCreator()
Method Detail

setContext

public void setContext(org.springframework.context.ConfigurableApplicationContext context)
Parameters:
context -

setContextPaths

public void setContextPaths(List<String> paths)
Additional context paths that will be added when constructing the Spring container that controls the build process. See ContainerLibrary.createContext(Iterable).

Parameters:
contextPaths - additional Spring context paths to add to the container

setContextBeans

public void setContextBeans(Map<String,org.springframework.beans.factory.config.BeanDefinition> contextBeans)

setOutputPath

public void setOutputPath(File outputPath)
Parameters:
outputPath - the output path of the bundle

setBundleKey

public void setBundleKey(String key)

addTaskToOnlyRun

public void addTaskToOnlyRun(String onlyTask)

addTaskToSkip

public void addTaskToSkip(String taskToSkip)

addTaskToInclude

public void addTaskToInclude(String taskToInclude)

setSkipToTask

public void setSkipToTask(String taskName)

setRandomizeCacheDir

public void setRandomizeCacheDir(boolean randomizeCacheDir)

setAdditionalBeanPropertyOverrides

public void setAdditionalBeanPropertyOverrides(Properties props)

run

public void run()
         throws IOException,
                ClassNotFoundException,
                UnknownTaskException
Build the bundle!

Throws:
IOException
ClassNotFoundException
UnknownTaskException


Copyright © 2011 OneBusAway. All Rights Reserved.