1 # Copyright (C) 2010-2011 Richard Lincoln
3 # Permission is hereby granted, free of charge, to any person obtaining a copy
4 # of this software and associated documentation files (the "Software"), to
5 # deal in the Software without restriction, including without limitation the
6 # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7 # sell copies of the Software, and to permit persons to whom the Software is
8 # furnished to do so, subject to the following conditions:
10 # The above copyright notice and this permission notice shall be included in
11 # all copies or substantial portions of the Software.
13 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22 class StreetDetail(object):
23 """Street details, in the context of address.Street details, in the context of address.
26 def __init__(self
, withinTownLimits
=False, name
='', type='', prefix
='', buildingName
='', suiteNumber
='', suffix
='', addressGeneral
='', code
='', number
=''):
27 """Initialises a new 'StreetDetail' instance.
29 @param withinTownLimits: True if this street is within the legal geographical boundaries of the specified town (default).
30 @param name: Name of the street.
31 @param type: Type of street. Examples include: street, circle, boulevard, avenue, road, drive, etc.
32 @param prefix: Prefix to the street name. For example: North, South, East, West.
33 @param buildingName: (if applicable) In certain cases the physical location of the place of interest does not have a direct point of entry from the street, but may be located inside a larger structure such as a building, complex, office block, apartment, etc.
34 @param suiteNumber: Number of the apartment or suite.
35 @param suffix: Suffix to the street name. For example: North, South, East, West.
36 @param addressGeneral: Additional address information, for example a mailstop.
37 @param code: (if applicable) Utilities often make use of external reference systems, such as those of the town-planner's department or surveyor general's mapping system, that allocate global reference codes to streets.
38 @param number: Designator of the specific location on the street.
40 #: True if this street is within the legal geographical boundaries of the specified town (default).
41 self
.withinTownLimits
= withinTownLimits
43 #: Name of the street.
46 #: Type of street. Examples include: street, circle, boulevard, avenue, road, drive, etc.
49 #: Prefix to the street name. For example: North, South, East, West.
52 #: (if applicable) In certain cases the physical location of the place of interest does not have a direct point of entry from the street, but may be located inside a larger structure such as a building, complex, office block, apartment, etc.
53 self
.buildingName
= buildingName
55 #: Number of the apartment or suite.
56 self
.suiteNumber
= suiteNumber
58 #: Suffix to the street name. For example: North, South, East, West.
61 #: Additional address information, for example a mailstop.
62 self
.addressGeneral
= addressGeneral
64 #: (if applicable) Utilities often make use of external reference systems, such as those of the town-planner's department or surveyor general's mapping system, that allocate global reference codes to streets.
67 #: Designator of the specific location on the street.
71 _attrs
= ["withinTownLimits", "name", "type", "prefix", "buildingName", "suiteNumber", "suffix", "addressGeneral", "code", "number"]
72 _attr_types
= {"withinTownLimits": bool, "name": str, "type": str, "prefix": str, "buildingName": str, "suiteNumber": str, "suffix": str, "addressGeneral": str, "code": str, "number": str}
73 _defaults
= {"withinTownLimits": False, "name": '', "type": '', "prefix": '', "buildingName": '', "suiteNumber": '', "suffix": '', "addressGeneral": '', "code": '', "number": ''}