package org.mapsforge.android.maps; /** * An OverlayTextAudioItem holds all parameters of a single element (capable of * displaying text and/or audio in {@link ItemizedOverlay}. If the item has not * raw audio file, then it will use Text-To-Speech (TTS) to synthesize the audio */ public class OverlayTextAudioItem extends OverlayItem { protected final String ttsSnippet; protected final String audioFile; private String chapter; private String bookID; /** * Constructs a new OverlayTextAduioItem. * * @param point * the geographical position of the item. * @param title * the title of the item. * @param snippet * the short description of the item. * @param tts_snippet * optinal phonetically based version of the short description; * can be null in which case the text in snippet is used. * @param audio * the audio file to use * @param chapter * the chapter of the item */ public OverlayTextAudioItem(GeoPoint point, String title, String snippet, String ttsSnippet, String Chapter, String audio, String bookId) { super(point, title, snippet); this.ttsSnippet = (ttsSnippet != null) ? ttsSnippet : snippet; this.chapter = Chapter; this.audioFile = audio; this.bookID = bookId; } public OverlayTextAudioItem(GeoPoint point, String title, String snippet, String ttsSnippet, String Chapter, String bookID) { super(point, title, snippet); this.ttsSnippet = (ttsSnippet != null) ? ttsSnippet : snippet; this.chapter = Chapter; this.audioFile = null; this.bookID = bookID; } public OverlayTextAudioItem(GeoPoint point, String title, String snippet, String ttsSnippet, String Chapter) { super(point, title, snippet); this.ttsSnippet = (ttsSnippet != null) ? ttsSnippet : snippet; this.chapter = Chapter; this.audioFile = null; } /** * Constructs a new OverlayTextAudioItem. * * @param point * the geographical position of the item. * @param title * the title of the item. * @param chapter * the chater of the item * @param snippet * the short description of the item. */ public OverlayTextAudioItem(GeoPoint point, String title, String snippet, String ttsSnippet) { super(point, title, snippet); this.ttsSnippet = (ttsSnippet != null) ? ttsSnippet : snippet; this.audioFile = null; } public String getChapter() { return chapter; } public String getNodeID() { return bookID; } public String getTTSSnippet() { return ttsSnippet; } }