HERE Android SDK Developer's Guide

ExtendedAttribute

The class ExtendedAttribute is a member of com.here.android.mpa.search .

Class Summary

public class ExtendedAttribute

extends java.lang.Object

Represents additional detailed information about a Place.

[For complete information, see the section Class Details]

Field Summary

Table 1. Fields in ExtendedAttribute
Fields

public static final String TRANSIT_DEPARTURES_EXTENDED_ATTRIBUTE_ID

Constant that defines the public transit departures extended identifier.

public static final String TRANSIT_LINES_EXTENDED_ATTRIBUTE_ID

Constant that defines the public transit lines extended identifier.

Method Summary

Table 2. Methods in ExtendedAttribute
Methods

public boolean equals (Object obj)

For documentation, see java.lang.Object

public String getAttribution ()

Gets a ready-to-display (HTML formatted) string containing the source attribution text for this place.

public String getId ()

Gets the identifier for the ExtendedAttribute .

public String getLabel ()

Gets the localized display label for the ExtendedAttribute .

public String getText ()

Gets the String representation of ExtendedAttribute information, which can be displayed directly on the client device.

public Link getVia ()

Gets a Link object to the external website of the supplier of the information.

public int hashCode ()

For documentation, see java.lang.Object

Class Details

Represents additional detailed information about a Place.

This extensible collection of attributes that can include the following items with these identifier values:

  • payment - A list of available payment methods (such as cash, credit card, direct debit, etc.)
  • openingHours - A list of hours during which the place is open for business
  • annualClosings - A description of annual closing dates such as holidays or other special occasions
  • price - A price list
  • nearestLandmark - A description of the nearest landmark
  • languagesSpoken - A list of the languages that are spoken at the place
  • availableParking - A list of parking options available nearby
  • smoking - Whether smoking is allowed
  • disabledAccess - Whether disabled access is available
  • transitLines - A list of available public transport transit lines
  • departures - A list of next departures for available public transport transit lines
  • blindGuide - Whether a public transport stop has blind guides ('tactile paving').
  • elevator - Whether a public transport stop has elevator
  • escalator - Whether a public transport stop has escalator

Field Details

public static final String TRANSIT_DEPARTURES_EXTENDED_ATTRIBUTE_ID

Constant that defines the public transit departures extended identifier.

public static final String TRANSIT_LINES_EXTENDED_ATTRIBUTE_ID

Constant that defines the public transit lines extended identifier.

Method Details

public boolean equals (Object obj)

For documentation, see java.lang.Object

Parameters:

  • obj

public String getAttribution ()

Gets a ready-to-display (HTML formatted) string containing the source attribution text for this place.

The Places API gives access to content that is provided by a number of sources. Client applications must display the source attribution next to the content. This requirement forms part of the terms and conditions of the API.

The code snippet below demonstrates how to display the string in an Android TextView


   TextView textView = (TextView) findViewById(R.id.attributionText);
   textView.setText((Html.fromHtml(route.getTransitRouteSourceAttribution().getAttribution())));
   textView.setMovementMethod(LinkMovementMethod.getInstance());
  

Returns:

The HTML formatted attribution string

public String getId ()

Gets the identifier for the ExtendedAttribute .

Returns:

The attribute identifier

public String getLabel ()

Gets the localized display label for the ExtendedAttribute .

Returns:

The display label

public String getText ()

Gets the String representation of ExtendedAttribute information, which can be displayed directly on the client device.

Note: if the text represents a list of items, the items are separated by a line break entity ( <br/> if the text format is HTML-encoded or newline if the text format is plain).

Returns:

The RichText display text

public Link getVia ()

Gets a Link object to the external website of the supplier of the information. This link must be used for attribution when rich text attribution is not being used.

Returns:

The Link object to the external website of the supplier of the information

public int hashCode ()

For documentation, see java.lang.Object