Next / Previous / Contents / Shipman's homepage

12. class MawsStationSet: Station set object

This class represents the station codes authority file. For the format of this file, see the specification.

As of the MAWS 2007 field season, the format of this file is exactly the same as that of the MAPS authority file. Therefore we can inherit from MapsStationSet, overriding its AUTHORITY_FILE class variable, and providing a new constructor that uses that file name.
# - - - - -   c l a s s   M a w s S t a t i o n S e t   - - - - -

class MawsStationSet(MapsStationSet):
    '''Represents the MAWS station codes authority file.

      Exports, beyond those inherited:
        AUTHORITY_FILE:  [ name of the MAWS stations authority file ]

This constant is the name of the authority file.
    AUTHORITY_FILE = "shipmaws.txt"

12.1. MawsStationSet.__init__()

The constructor supplies the name of the authority file to the parent constructor.
# - - -   M a w s S t a t i o n S e t . _ _ i n i t _ _   - - -

    def __init__(self):
        '''Constructor for MawsStationSet.
        BaseStationSet.__init__(self, self.AUTHORITY_FILE)