Package sabx10 :: Package utils :: Module sabx_number :: Class NumProcessor
[hide private]
[frames] | no frames]

Class NumProcessor

source code

                          object --+        
                                   |        
templating.generic.TemplateProcessor --+    
                                       |    
           templating.sabx.SabxProcessor --+
                                           |
                                          NumProcessor

Sequentially renumber the ids of all the items in the SABX 1.0 file. This includes parking places, stops, pois, segments, turns, and rides.

Instance Methods [hide private]
 
__init__(self, template_file=None, man=None)
Adds the "start" and "unique" options to the command-line options.
source code
 
_create_item_translation(self, item_list)
Create the translation dictionary for an item list.
source code
 
_create_translations(self)
Read all the ids for parking places, turns, segments, stops, and pois and generate new ids for them, saving the mappings.
source code
 
_renumber_items(self, item_list, translater)
Renumber all the items in the list.
source code
 
_renumber_seg_pts_stops_pois(self, seg)
Renumber the stops and pois for a segment.
source code
 
_renumber_ride_park_turns_segs(self, ride)
Renumber the parking, turns, and segments for a ride.
source code
 
_renumber_ids(self)
Go through all the parking places, turns, segments, stops, pois, and rides and renumber them all.
source code
 
get_template_data(self)
Renumber all the ids for all the SABX 1.0 data.
source code

Inherited from templating.sabx.SabxProcessor: process_template

Inherited from templating.generic.TemplateProcessor: process, process_options

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Instance Variables [hide private]
int index
next index to use
dict park_translate
dictionary of old to new parking id mappings
dict poi_translate
dictionary of old to new poi id mappings
dict ride_translate
dictionary of old to new ride id mappings
dict seg_translate
dictionary of old to new segment id mappings
dict stop_translate
dictionary of old to new stop id mappings
dict turn_translate
dictionary of old to new turn id mappings

Inherited from templating.sabx.SabxProcessor: in_file, sabx

Inherited from templating.generic.TemplateProcessor: args, man, options, out_file, parser, template_data, template_file, template_path

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, template_file=None, man=None)
(Constructor)

source code 

Adds the "start" and "unique" options to the command-line options.

Parameters:
  • template_file (string) - (optional) file name of template file
  • man (string) - (optional) extended program help
Overrides: object.__init__

get_template_data(self)

source code 

Renumber all the ids for all the SABX 1.0 data.

Overrides: templating.generic.TemplateProcessor.get_template_data