text = ((InternationalString) value).toString(getDisplayLocale()); } else if (value instanceof CharSequence) { text = value.toString(); } else if (value instanceof CodeList<?>) { text = Types.getCodeTitle((CodeList<?>) value).toString(getDisplayLocale()); } else if (value instanceof Enum<?>) { text = CharSequences.upperCaseToSentence(((Enum<?>) value).name()); text = toString(((Type) value).getTypeName()); } else if (value instanceof Locale) { final Locale locale = getDisplayLocale(); text = (locale != Locale.ROOT) ? ((Locale) value).getDisplayName(locale) : value.toString(); } else if (value instanceof TimeZone) { final Locale locale = getDisplayLocale(); text = (locale != Locale.ROOT) ? ((TimeZone) value).getDisplayName(locale) : ((TimeZone) value).getID(); } else if (value instanceof Charset) { final Locale locale = getDisplayLocale(); text = (locale != Locale.ROOT) ? ((Charset) value).displayName(locale) : ((Charset) value).name(); } else if (value instanceof Currency) { final Locale locale = getDisplayLocale(); text = (locale != Locale.ROOT) ? ((Currency) value).getDisplayName(locale) : value.toString(); } else if (value instanceof Record) {
text = ((InternationalString) value).toString(getDisplayLocale()); } else if (value instanceof CharSequence) { text = value.toString(); } else if (value instanceof CodeList<?>) { text = MetadataServices.getInstance().getCodeTitle((CodeList<?>) value, getDisplayLocale()); } else if (value instanceof Enum<?>) { text = CharSequences.upperCaseToSentence(((Enum<?>) value).name()); text = toString(((Type) value).getTypeName()); } else if (value instanceof Locale) { final Locale locale = getDisplayLocale(); text = (locale != Locale.ROOT) ? ((Locale) value).getDisplayName(locale) : value.toString(); } else if (value instanceof TimeZone) { final Locale locale = getDisplayLocale(); text = (locale != Locale.ROOT) ? ((TimeZone) value).getDisplayName(locale) : ((TimeZone) value).getID(); } else if (value instanceof Charset) { final Locale locale = getDisplayLocale(); text = (locale != Locale.ROOT) ? ((Charset) value).displayName(locale) : ((Charset) value).name(); } else if (value instanceof Currency) { final Locale locale = getDisplayLocale(); text = (locale != Locale.ROOT) ? ((Currency) value).getDisplayName(locale) : value.toString(); } else if (value instanceof Record) {
out.append(getTreeSymbols(true, isLast[i])); final Locale locale = getDisplayLocale(); out.append(treeBlank).append('(').append(Vocabulary.getResources(locale) .getString(Vocabulary.Keys.CycleOmitted).toLowerCase(locale))
out.append(getTreeSymbols(true, isLast[i])); final Locale locale = getDisplayLocale(); out.append(treeBlank).append('(').append(Vocabulary.getResources(locale) .getString(Vocabulary.Keys.CycleOmitted).toLowerCase(locale))
/** * Localizes the given name in the display locale, or returns "(Unnamed)" if no localized value is found. */ private String toString(final GenericName name) { final Locale locale = getDisplayLocale(); if (name != null) { final InternationalString i18n = name.toInternationalString(); if (i18n != null) { final String localized = i18n.toString(locale); if (localized != null) { return localized; } } final String localized = name.toString(); if (localized != null) { return localized; } } return '(' + Vocabulary.getResources(locale).getString(Vocabulary.Keys.Unnamed) + ')'; }
/** * Localizes the given name in the display locale, or returns "(Unnamed)" if no localized value is found. */ private String toString(final GenericName name) { final Locale locale = getDisplayLocale(); if (name != null) { final InternationalString i18n = name.toInternationalString(); if (i18n != null) { final String localized = i18n.toString(locale); if (localized != null) { return localized; } } final String localized = name.toString(); if (localized != null) { return localized; } } return '(' + Vocabulary.getResources(locale).getString(Vocabulary.Keys.Unnamed) + ')'; }
indexOfValue += ((ParseException) e).getErrorOffset(); throw new LocalizedParseException(getDisplayLocale(), Errors.Keys.UnparsableStringForClass_2, new Object[] {columns[ci].getElementType(), valueText}, indexOfValue).initCause(e); throw new LocalizedParseException(getDisplayLocale(), Errors.Keys.NodeHasNoParent_1, new Object[] {node}, indexOfLineStart); if (parent == null) { pos.setErrorIndex(indexOfLineStart); throw new LocalizedParseException(getDisplayLocale(), Errors.Keys.NodeHasNoParent_1, new Object[] {node}, indexOfLineStart);
indexOfValue += ((ParseException) e).getErrorOffset(); throw new LocalizedParseException(getDisplayLocale(), Errors.Keys.UnparsableStringForClass_2, new Object[] {columns[ci].getElementType(), valueText}, indexOfValue).initCause(e); throw new LocalizedParseException(getDisplayLocale(), Errors.Keys.NodeHasNoParent_1, new Object[] {node}, indexOfLineStart); if (parent == null) { pos.setErrorIndex(indexOfLineStart); throw new LocalizedParseException(getDisplayLocale(), Errors.Keys.NodeHasNoParent_1, new Object[] {node}, indexOfLineStart);