[Unicode]   Common Locale Data Repository : Bug Tracking Home | Site Map | Search
 
Modify

CLDR Ticket #8914(accepted tools)

Opened 21 months ago

Last modified 20 months ago

Convert arbitrary strings or ints to use enums

Reported by: mark Owned by: mark
Component: util Data Locale:
Phase: rc Review:
Weeks: Data Xpath:
Xref:

Description

For faster, more robust access. Continuation of ticket:8068

To finish off ticket:8068, remove the APIs that take String organizations, and only leave the ones that take enums.

StandardCodes

platform_locale_levelString = new TreeMap<String, Map<String, String>>();

getLocaleCoverageOrganizationStrings,...

In CLDRFile, change the following (there's an existing enum we can use and expand).
getKey, getNameName, getNameType, getNameTypeName, typeNameToCode, getName,...

public static final int NO_NAME = -1, LANGUAGE_NAME = 0, SCRIPT_NAME = 1, TERRITORY_NAME = 2, VARIANT_NAME = 3,

CURRENCY_NAME = 4, CURRENCY_SYMBOL = 5,
TZ_EXEMPLAR = 6, TZ_START = TZ_EXEMPLAR,
TZ_GENERIC_LONG = 7, TZ_GENERIC_SHORT = 8,
TZ_STANDARD_LONG = 9, TZ_STANDARD_SHORT = 10,
TZ_DAYLIGHT_LONG = 11, TZ_DAYLIGHT_SHORT = 12,
TZ_LIMIT = 13,
KEY_NAME = 13,
KEY_TYPE_NAME = 14,
LIMIT_TYPES = 15;

Test generating element and attribute enums from the DTDData, and using those. (That's done in UnicodeTools for property name and enum values.) Would make access/creation for items like XPathParts much faster. If the change is sufficiently positive, may be worth the pain of transitioning.

Attachments

Change History

comment:1 Changed 21 months ago by emmons

  • Status changed from new to accepted
  • Component changed from unknown to util
  • Priority changed from assess to minor
  • Phase changed from dsub to rc
  • Milestone changed from UNSCH to 29
  • Owner changed from anybody to mark
  • Type changed from unknown to tools

comment:2 Changed 20 months ago by emmons

  • Milestone changed from 29 to upcoming

Auto move of all 29 -> upcoming

View

Add a comment

Modify Ticket

Action
as accepted
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.