parameters: (self, original_query, search_result, desc_template)
return_statement: return name, description, geom_data
docstring: Fetch POI attributes like name, description and geometry.
  
      Args:
       original_query: Search query as entered by the user.
       search_result: Query results from the gepoi table.
       desc_template: Description template based on the response type.
      Returns:
       Name, description and geometry.
docstring_summary: Fetch POI attributes like name, description and geometry.
docstring_tokens: Fetch POI attributes like name description and geometry .
function: def __GetPOIAttributes(self, original_query, search_result, desc_template):
      """Fetch POI attributes like name, description and geometry.
  
      Args:
       original_query: Search query as entered by the user.
       search_result: Query results from the gepoi table.
       desc_template: Description template based on the response type.
      Returns:
       Name, description and geometry.
      """
      name = ""
      description = ""
  
      # A sample map_entry would be as below.
      # {
      #          'field_value': 'US Route 395',
      #          'field_name': 'name',
      #          'is_search_display': True,
      #          'is_searchable': True,
      #          'is_displayable': True
      # }
  
      for map_entry in search_result:
        if map_entry["field_name"] != "geom":
          if map_entry["is_search_display"]:
            # Find the matched string by checking if the search query
            # is a sub-string of the POI field values.
  
            # This condition is for POI fields which are both
            # searchable and displayable.
            if original_query.lower() in map_entry["field_value"].lower():
              name = map_entry["field_value"]
          else:
            # This condition is for POI fields which are
            # searchable but not displayable.
  
            # Assign "name" attribute to the first POI field value.
            if not name:
              name = search_result[1]["field_value"]
  
          # Assign all the displayable POI field values
          # to "description" attribute.
          if map_entry["is_displayable"]:
            description += desc_template.substitute(
                NAME=map_entry["field_name"], VALUE=map_entry["field_value"])
        else:
          geom_data = map_entry["field_value"]
  
      return name, description, geom_data
function_tokens: def __GetPOIAttributes ( self , original_query , search_result , desc_template ) : name = "" description = "" # A sample map_entry would be as below. # { #          'field_value': 'US Route 395', #          'field_name': 'name', #          'is_search_display': True, #          'is_searchable': True, #          'is_displayable': True # } for map_entry in search_result : if map_entry [ "field_name" ] != "geom" : if map_entry [ "is_search_display" ] : # Find the matched string by checking if the search query # is a sub-string of the POI field values. # This condition is for POI fields which are both # searchable and displayable. if original_query . lower ( ) in map_entry [ "field_value" ] . lower ( ) : name = map_entry [ "field_value" ] else : # This condition is for POI fields which are # searchable but not displayable. # Assign "name" attribute to the first POI field value. if not name : name = search_result [ 1 ] [ "field_value" ] # Assign all the displayable POI field values # to "description" attribute. if map_entry [ "is_displayable" ] : description += desc_template . substitute ( NAME = map_entry [ "field_name" ] , VALUE = map_entry [ "field_value" ] ) else : geom_data = map_entry [ "field_value" ] return name , description , geom_data