Exemplo n.º 1
0
 def asText(self):
     """
   Returns the address as a complete formatted string
   with street address, zip, and city
 """
     result = Coordinate.asText(self)
     if result is None:
         if self.isDetailed():
             street_address = self.getStreetAddress("")
             zip_code = self.getZipCode("")
             city = self.getCity("")
         else:
             street_address, zip_code, city = self._splitCoordinateText(self.getCoordinateText(""))
         result = "%s\n%s %s" % (street_address, zip_code, city)
     if not result.strip():
         return ""
     return result
Exemplo n.º 2
0
 def asText(self):
     """
   Returns the address as a complete formatted string
   with street address, zip, and city
 """
     result = Coordinate.asText(self)
     if result is None:
         if self.isDetailed():
             street_address = self.getStreetAddress('')
             zip_code = self.getZipCode('')
             city = self.getCity('')
         else:
             street_address, zip_code, city = self._splitCoordinateText(
                 self.getCoordinateText(''))
         result = '%s\n%s %s' % (street_address, zip_code, city)
     if not result.strip():
         return ''
     return result
Exemplo n.º 3
0
 def asText(self):
   """
   Return the address as a complete formatted string.
   """
   result = Coordinate.asText(self)
   if result is None:
     if self.isDetailed():
       tmp_list = []
       for prop in PropertySheet.InternetProtocolAddress._properties:
         property_id = prop['id']
         getter_name = 'get%s' % convertToUpperCase(property_id)
         getter_method = getattr(self, getter_name)
         value = getter_method('')
         tmp_list.append('%s:%s' % (property_id, value))
       result = '\n'.join(tmp_list)
     else:
       result = '\n'.join(('%s:%s' % (k, v) for k, v in\
                                   self._splitCoordinateText(self.getCoordinateText())))
   return result
Exemplo n.º 4
0
 def asText(self):
     """
 Return the address as a complete formatted string.
 """
     result = Coordinate.asText(self)
     if result is None:
         if self.isDetailed():
             tmp_list = []
             for prop in PropertySheet.InternetProtocolAddress._properties:
                 property_id = prop['id']
                 getter_name = 'get%s' % convertToUpperCase(property_id)
                 getter_method = getattr(self, getter_name)
                 value = getter_method('')
                 tmp_list.append('%s:%s' % (property_id, value))
             result = '\n'.join(tmp_list)
         else:
             result = '\n'.join(('%s:%s' % (k, v) for k, v in\
                                         self._splitCoordinateText(self.getCoordinateText())))
     return result
Exemplo n.º 5
0
 def asText(self):
     """
 Return the address as a complete formatted string.
 """
     result = Coordinate.asText(self)
     if result is None:
         if self.isDetailed():
             tmp_list = []
             for prop in self.portal_property_sheets.\
                  InternetProtocolAddress.objectValues(
                    portal_type="Standard Property"):
                 property_id = prop.getReference()
                 getter_name = 'get%s' % convertToUpperCase(property_id)
                 getter_method = getattr(self, getter_name)
                 value = getter_method('')
                 tmp_list.append('%s:%s' % (property_id, value))
             result = '\n'.join(tmp_list)
         else:
             result = '\n'.join(('%s:%s' % (k, v) for k, v in\
                                         self._splitCoordinateText(self.getCoordinateText())))
     return result