Package org.opentripplanner.routing.alertpatch

Examples of org.opentripplanner.routing.alertpatch.TranslatedString


     * convert a protobuf TranslatedString to a OTP TranslatedString
     *
     * @return A TranslatedString containing the same information as the input
     */
    private TranslatedString deBuffer(GtfsRealtime.TranslatedString input) {
        TranslatedString result = new TranslatedString();
        for (GtfsRealtime.TranslatedString.Translation translation : input.getTranslationList()) {
            String language = translation.getLanguage();
            String string = translation.getText();
            result.addTranslation(language, string);
        }
        return result;
    }
View Full Code Here


    public T2<Alert, NoteMatcher> generateNote(OSMWithTags way) {
        Map<String, String> noteText = TemplateLibrary.generateI18N(notePattern, way,
                Alert.defaultLanguage);
        Alert note = new Alert();
        note.alertHeaderText = new TranslatedString();
        for (Map.Entry<String, String> kv : noteText.entrySet()) {
            note.alertHeaderText.addTranslation(kv.getKey(), kv.getValue());
        }
        return new T2<>(note, noteMatcher);
    }
View Full Code Here

TOP

Related Classes of org.opentripplanner.routing.alertpatch.TranslatedString

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.