
com.basistech.util.TransliterationScheme Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of common-api Show documentation
Show all versions of common-api Show documentation
Common Java API classes for Rosette
//CHECKSTYLE:OFF
/*
* DO NOT EDIT THIS FILE /data/kt/github/rosette-common-java-api/target/checkout/api/target/generated-sources/com/basistech/util/TransliterationScheme.java
* It has been AutoGen-ed Thu May 15 18:21:42 2025
* and the template file /data/kt/github/rosette-common-java-api/target/checkout/api/src/main/templates/TransliterationScheme.java.tpl
*/
/*
* Copyright 2014-2019 Basis Technology Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.basistech.util;
import java.util.HashMap;
/**
* Named constants for the numeric codes for BT_Xlit_Scheme.
* NOTE: see the documentation of specific Basis products to see which schemes they support.
*/
public enum TransliterationScheme
{
/** xlit scheme code for FBIS
description: US Foreign Broadcast Information Service */
FBIS (0, "fbis", "FBIS",
"US Foreign Broadcast Information Service"),
/** xlit scheme code for BGN
description: US Board on Geographic Names */
BGN (1, "bgn", "BGN",
"US Board on Geographic Names"),
/** xlit scheme code for Basis
description: Basis Technology Corp. */
BASIS (2, "basis", "Basis",
"Basis Technology Corp."),
/** xlit scheme code for IC
description: US Intelligence Community */
IC (3, "ic", "IC",
"US Intelligence Community"),
/** xlit scheme code for SATTS
description: Standard Arabic Technical Transliteration System */
SATTS (4, "satts", "SATTS",
"Standard Arabic Technical Transliteration System"),
/** xlit scheme code for Buckwalter
description: Tim Buckwalter/Qamus */
BUCKWALTER (5, "buckwalter", "Buckwalter",
"Tim Buckwalter/Qamus"),
/** xlit scheme code for UNRSGN
description: United Nations Romanization System for Geographic Names */
UNRSGN (6, "unrsgn", "UNRSGN",
"United Nations Romanization System for Geographic Names"),
/** xlit scheme code for Library of Congress
description: American Library Association/Library of Congress Transliteration */
ALA_LC (7, "ala_lc", "Library of Congress",
"American Library Association/Library of Congress Transliteration"),
/** xlit scheme code for I.G.N. System 1973
description: Also called Variant B of the Amended Beirut System */
IGN (8, "ign", "I.G.N. System 1973",
"Also called Variant B of the Amended Beirut System"),
/** xlit scheme code for Royal Jordanian Geographic Centre System
description: Essentially the same as the amended Beirut system. The sub-macron is used instead of the cedilla. */
RJGC (9, "rjgc", "Royal Jordanian Geographic Centre System",
"Essentially the same as the amended Beirut system. The sub-macron is used instead of the cedilla."),
/** xlit scheme code for ISO 233:1984
description: Gives every character and diacritical mark a unique equivalent. */
ISO233_1984 (10, "iso233_1984", "ISO 233:1984",
"Gives every character and diacritical mark a unique equivalent."),
/** xlit scheme code for Survey of Egypt System
description: Survey of Egypt System. */
SES (11, "ses", "Survey of Egypt System",
"Survey of Egypt System."),
/** xlit scheme code for Deutsche Morgenlandishe Gesellschaft
description: */
DMG (12, "dmg", "Deutsche Morgenlandishe Gesellschaft",
""),
/** xlit scheme code for Encyclopedia of Islam
description: */
EI (13, "ei", "Encyclopedia of Islam",
""),
/** xlit scheme code for Kohanimeandmebaas
description: */
KNAB (14, "knab", "Kohanimeandmebaas",
""),
/** xlit scheme code for Allworth
description: */
ALLWORTH (15, "allworth", "Allworth",
""),
/** xlit scheme code for ISO 9:1995
description: */
ISO9_1995 (16, "iso9_1995", "ISO 9:1995",
""),
/** xlit scheme code for The World's Writing Systems
description: */
WWS (17, "wws", "The World's Writing Systems",
""),
/** xlit scheme code for JDEC - Afghanistan
description: Joint Document Exploitation Center - Afghanistan */
JDEC_AF (18, "jdec_af", "JDEC - Afghanistan",
"Joint Document Exploitation Center - Afghanistan"),
/** xlit scheme code for MELTS
description: Middle East Languages Transliteration Standard */
MELTS (19, "melts", "MELTS",
"Middle East Languages Transliteration Standard"),
/** xlit scheme code for ISO 233-2:1993
description: Establishes a simplified system vs the stringent rules established by ISO 233:1984 for Arabic. */
ISO233_2_1993 (20, "iso233_2_1993", "ISO 233-2:1993",
"Establishes a simplified system vs the stringent rules established by ISO 233:1984 for Arabic."),
/** xlit scheme code for ISO 233-3:1999
description: ISO 233 Part 3, for Persian */
ISO233_3_1999 (21, "iso233_3_1999", "ISO 233-3:1999",
"ISO 233 Part 3, for Persian"),
/** xlit scheme code for ASCII-limited Transliteration Scheme used in Wikipedia
description: ASCII restricted; possibly a variation on more formal transliteration schemes. */
WIKIPEDIA_ASCII (22, "wikipedia_ascii", "ASCII-limited Transliteration Scheme used in Wikipedia",
"ASCII restricted; possibly a variation on more formal transliteration schemes."),
/** xlit scheme code for ELOT 743
description: Romanization system for Greek */
ELOT743 (23, "elot743", "ELOT 743",
" Romanization system for Greek"),
/** xlit scheme code for ISO 843:1997
description: Romanization of the Greek alphabet */
ISO843_1997 (24, "iso843_1997", "ISO 843:1997",
"Romanization of the Greek alphabet"),
/** xlit scheme code for ISO 259:1984
description: Transliteration of Hebrew characters into Latin characters */
ISO259_1984 (25, "iso259_1984", "ISO 259:1984",
"Transliteration of Hebrew characters into Latin characters"),
/** xlit scheme code for ISO 259-2:1994
description: Transliteration of Hebrew characters into Latin characters */
ISO259_2_1994 (26, "iso259_2_1994", "ISO 259-2:1994",
"Transliteration of Hebrew characters into Latin characters"),
/** xlit scheme code for ANSI Z39.25-1975
description: Transliteration of Hebrew */
ANSIZ39_25_1975 (27, "ansiz39_25_1975", "ANSI Z39.25-1975",
"Transliteration of Hebrew"),
/** xlit scheme code for GOST 16876-71, system B
description: Romanization of Cyrillic into Latin characters */
GOST_16876_71_A (28, "gost_16876_71_a", "GOST 16876-71, system B",
"Romanization of Cyrillic into Latin characters"),
/** xlit scheme code for GOST 7.79-2000_2
description: Romanization of Cyrillic into Latin characters */
GOST_7_79_2000_2 (29, "gost_7_79_2000_2", "GOST 7.79-2000_2",
"Romanization of Cyrillic into Latin characters"),
/** xlit scheme code for ISO 9984:1996
description: Transliteration of Georgian characters into Latin characters */
ISO9984_1996 (30, "iso9984_1996", "ISO 9984:1996",
"Transliteration of Georgian characters into Latin characters"),
/** xlit scheme code for National 2002
description: Georgian National Academy of Sciences national system for the romanization of Georgian characters into Latin characters */
NATIONAL_2002 (31, "national_2002", "National 2002",
"Georgian National Academy of Sciences national system for the romanization of Georgian characters into Latin characters"),
/** xlit scheme code for SASM/GNC (broad)
description: State Administration of Surveying and Mapping and Geographical Names Committee romanization schemes. */
SASM_GNC_BROAD (32, "sasm_gnc_broad", "SASM/GNC (broad)",
"State Administration of Surveying and Mapping and Geographical Names Committee romanization schemes."),
/** xlit scheme code for ASCII subset of Latin Script
description: Custom scheme to Basis for transliterating characters using a broader portion of the Latin Script to solely ASCII, based on removing diacritics and using the closest letter visually. */
ASCII (99, "ascii", "ASCII subset of Latin Script",
"Custom scheme to Basis for transliterating characters using a broader portion of the Latin Script to solely ASCII, based on removing diacritics and using the closest letter visually."),
/** xlit scheme code for IC (+BGN for places)
description: IC for everything but places, BGN for those */
IC_BGN (100, "ic_bgn", "IC (+BGN for places)",
"IC for everything but places, BGN for those"),
/** xlit scheme code for Undiacritized BGN
description: US Board on Geographic Names - diacritics removed */
UND_BGN (101, "und_bgn", "Undiacritized BGN",
"US Board on Geographic Names - diacritics removed"),
/** xlit scheme code for Extended IC
description: US Intelligence Community - extended */
EXT_IC (102, "ext_ic", "Extended IC",
"US Intelligence Community - extended"),
/** xlit scheme code for ICU
description: Transliteration library provided with the International Components for Unicode library */
ICU (103, "icu", "ICU",
"Transliteration library provided with the International Components for Unicode library"),
/** xlit scheme code for UNGEGN
description: United Nations Group of Experts on Geographical Names (UNGEGN) deals with the national and international standardization of geographical names. */
UNGEGN (104, "ungegn", "UNGEGN",
"United Nations Group of Experts on Geographical Names (UNGEGN) deals with the national and international standardization of geographical names."),
/** xlit scheme code for IPA
description: Transliteration scheme into IPA */
IPA (105, "ipa", "IPA",
"Transliteration scheme into IPA"),
/** xlit scheme code for Basis Diacritization
description: Diacritization according to a private-use standard by Basis Technology Corp. */
BASIS_DIA (199, "basis_dia", "Basis Diacritization",
"Diacritization according to a private-use standard by Basis Technology Corp."),
/** xlit scheme code for KORDA
description: Korean Romanization for Data Applications */
KORDA (200, "korda", "KORDA",
"Korean Romanization for Data Applications"),
/** xlit scheme code for Morse
description: Morse */
MORSE (201, "morse", "Morse",
"Morse"),
/** xlit scheme code for Yale
description: Yale */
YALE (202, "yale", "Yale",
"Yale"),
/** xlit scheme code for McCune-Reischauer
description: McCune-Reischauer */
MCR (203, "mcr", "McCune-Reischauer",
"McCune-Reischauer"),
/** xlit scheme code for Lukoff
description: Lukoff */
LUKOFF (204, "lukoff", "Lukoff",
"Lukoff"),
/** xlit scheme code for 2959-SK
description: 2959-SK, Developed by South Korea's Ministry of Education */
SK (205, "sk", "2959-SK",
"2959-SK, Developed by South Korea's Ministry of Education"),
/** xlit scheme code for Joseon Gwahagwon
description: Joseon Gwahagwon */
JG (206, "jg", "Joseon Gwahagwon",
"Joseon Gwahagwon"),
/** xlit scheme code for Revised Romanization of Korean
description: 2000 Revised Romanization of Korean by Ministry of Culture and Tourism */
MOCT (207, "moct", "Revised Romanization of Korean",
"2000 Revised Romanization of Korean by Ministry of Culture and Tourism"),
/** xlit scheme code for Pinyin
description: Hanyu Pinyin (without tone annotations) */
HYPY (300, "hypy", "Pinyin",
"Hanyu Pinyin (without tone annotations)"),
/** xlit scheme code for Hanyu Pinyin Toned
description: Hanyu Pinyin with tone annotations */
HYPY_TONED (301, "hypy_toned", "Hanyu Pinyin Toned",
"Hanyu Pinyin with tone annotations"),
/** xlit scheme code for Wade-Giles
description: Wade-Giles */
WADE_GILES (302, "wade_giles", "Wade-Giles",
"Wade-Giles"),
/** xlit scheme code for Tongyong Pinyin
description: Tongyong Pinyin (without tone annotations) */
TYPY (303, "typy", "Tongyong Pinyin",
"Tongyong Pinyin (without tone annotations)"),
/** xlit scheme code for Tongyong Pinyin Toned
description: Tongyong Pinyin with tone annotations */
TYPY_TONED (304, "typy_toned", "Tongyong Pinyin Toned",
"Tongyong Pinyin with tone annotations"),
/** xlit scheme code for Zongwen (Tibetan) Pinyin
description: Zongwen (Tibetan) Pinyin */
ZWPY (305, "zwpy", "Zongwen (Tibetan) Pinyin",
"Zongwen (Tibetan) Pinyin"),
/** xlit scheme code for Cantonese Pinyin
description: Standard Cantonese Pinyin */
CTPY (306, "ctpy", "Cantonese Pinyin",
"Standard Cantonese Pinyin"),
/** xlit scheme code for POJ
description: Peh-oe-ji (POJ) */
POJ (307, "poj", "POJ",
"Peh-oe-ji (POJ)"),
/** xlit scheme code for Guangdong Romanization
description: Guangdong Romanization */
GAUNGDONG (308, "gaungdong", "Guangdong Romanization",
"Guangdong Romanization"),
/** xlit scheme code for Chinese Telegraph Code
description: Chinese Telegraph Code */
CTC (309, "ctc", "Chinese Telegraph Code",
"Chinese Telegraph Code"),
/** xlit scheme code for ISO :11940
description: DEPRECATED; use ISO11940_1998. Romanization of the Thai */
ISO_11940 (310, "iso_11940", "ISO :11940",
"DEPRECATED; use ISO11940_1998. Romanization of the Thai"),
/** xlit scheme code for ISO :11940-2
description: DEPRECATED; use ISO11940_2_2007. Romanization of Thai alphabet */
ISO_11940_2 (311, "iso_11940_2", "ISO :11940-2",
"DEPRECATED; use ISO11940_2_2007. Romanization of Thai alphabet"),
/** xlit scheme code for RTGS
description: Royal Thai General System of Transcription */
RTGS (312, "rtgs", "RTGS",
" Royal Thai General System of Transcription"),
/** xlit scheme code for ISO 11940:1998
description: Transliteration of Thai characters into Latin characters */
ISO11940_1998 (313, "iso11940_1998", "ISO 11940:1998",
"Transliteration of Thai characters into Latin characters"),
/** xlit scheme code for ISO 11940-2:2007
description: Transliteration of Thai characters into Latin characters */
ISO11940_2_2007 (314, "iso11940_2_2007", "ISO 11940-2:2007",
"Transliteration of Thai characters into Latin characters"),
/** xlit scheme code for MLCTS
description: Myanmar Language Commission Transcription System */
MLCTS (315, "mlcts", "MLCTS",
"Myanmar Language Commission Transcription System"),
/** xlit scheme code for GDCMLM
description: The Geographic Department of the Cambodian Ministry of Land Management and Urban Planning has developed a modified version of the UNGEGN system */
GDCMLM (316, "gdcmlm", "GDCMLM",
"The Geographic Department of the Cambodian Ministry of Land Management and Urban Planning has developed a modified version of the UNGEGN system"),
/** xlit scheme code for LSHK
description: Linguistic Society of Hong Kong Cantonese Romanization Scheme */
JYUTPING (317, "jyutping", "LSHK",
"Linguistic Society of Hong Kong Cantonese Romanization Scheme"),
/** xlit scheme code for Bbanlam pingyim
description: Southern Min Language Spelling System */
PINGYIM (318, "pingyim", "Bbanlam pingyim",
"Southern Min Language Spelling System"),
/** xlit scheme code for Cantonese Pinyin
description: */
CANTONESE (319, "cantonese", "Cantonese Pinyin",
""),
/** xlit scheme code for Hakka Pinyin
description: Taiwanese Hakka Romanization System */
HAKKA (319, "hakka", "Hakka Pinyin",
"Taiwanese Hakka Romanization System"),
/** xlit scheme code for Wugniu pinyin
description: */
WUGNIU (320, "wugniu", "Wugniu pinyin",
""),
/** xlit scheme code for Qian's Pin
description: Shanghainese Pinyin */
QIANS_PIN (321, "qians_pin", "Qian's Pin",
"Shanghainese Pinyin"),
/** xlit scheme code for Wu Chinese Society pinyin
description: */
WU_PINYIN (322, "wu_pinyin", "Wu Chinese Society pinyin",
""),
/** xlit scheme code for Hebon Romaji
description: Hebon-shiki Romaji (or Hepburn) scheme for Japanese */
HEBON (400, "hebon", "Hebon Romaji",
"Hebon-shiki Romaji (or Hepburn) scheme for Japanese"),
/** xlit scheme code for Kunrei-shiki Romaji
description: Kunrei-shiki Romaji scheme for Japanese */
KUNREI (401, "kunrei", "Kunrei-shiki Romaji",
"Kunrei-shiki Romaji scheme for Japanese"),
/** xlit scheme code for ISCII
description: Indian Script Code for Information Interchange */
ISCII (500, "iscii", "ISCII",
"Indian Script Code for Information Interchange"),
/** xlit scheme code for PASCII
description: Perso-Arabic Script Code for Information Interchange */
PASCII (501, "pascii", "PASCII",
"Perso-Arabic Script Code for Information Interchange"),
/** xlit scheme code for ArabTeX
description: */
ARABTEX (502, "arabtex", "ArabTeX",
""),
/** xlit scheme code for Linguistic Survey of India
description: */
LSI (503, "lsi", "Linguistic Survey of India",
""),
/** xlit scheme code for ISO 15919:2001
description: */
ISO15919_2001 (504, "iso15919_2001", "ISO 15919:2001",
""),
/** xlit scheme code for IABT
description: International Alphabet of Bengali Transliteration */
IABT (505, "iabt", "IABT",
"International Alphabet of Bengali Transliteration"),
/** xlit scheme code for ITRANS
description: Indian languages TRANSliteration */
ITRANS (506, "itrans", "ITRANS",
"Indian languages TRANSliteration"),
/** xlit scheme code for National Cartography Center (NCC) of Iran
description: The Transliteration/Transcription system of the National Cartography Center (NCC) of Iran. */
NCC (600, "ncc", "National Cartography Center (NCC) of Iran",
"The Transliteration/Transcription system of the National Cartography Center (NCC) of Iran."),
/** xlit scheme code for ISO 9985:1996
description: ISO 9985:1996 is the international standard for transliteration of the modern Armenian alphabet. */
ISO9985_1996 (601, "iso9985_1996", "ISO 9985:1996",
"ISO 9985:1996 is the international standard for transliteration of the modern Armenian alphabet."),
/** xlit scheme code for Private use
description: Private use */
PRIVATE_USE (1996, "private_use", "Private use",
"Private use"),
/** xlit scheme code for Folk
description: Folk */
FOLK (1997, "folk", "Folk",
"Folk"),
/** xlit scheme code for Unknown
description: Unknown */
UNKNOWN (1998, "unknown", "Unknown",
"Unknown"),
/** xlit scheme code for Native
description: Native */
NATIVE (1999, "native", "Native",
"Native");
private final int BT_Xlit_Scheme;
private final String name;
private final String presentationName;
private final String description;
/*
* We employ a variation of "Initialization on demand holder" idiom
* http://en.wikipedia.org/wiki/Initialization_on_demand_holder_idiom
* to implement lazy initialization of the two HashMaps we use.
* The following two small private static classes are for this trick.
*/
private static class CatalogByBTXlitScheme{
private static final HashMap it;
static{
it = new HashMap();
for (TransliterationScheme t : values()) {
it.put(t.BT_Xlit_Scheme, t);
}
}
}
private static class CatalogByName{
private static HashMap it;
static{
it = new HashMap();
for (TransliterationScheme t : values()) {
it.put(t.name, t);
}
}
}
TransliterationScheme(int BT_Xlit_Scheme, String name, String presentationName,
String description){
this.BT_Xlit_Scheme = BT_Xlit_Scheme;
this.name = name;
this.presentationName = presentationName;
this.description = description;
}
// want these to not be in the .tpl
// might like these next few to only be Basis accessible (how?)
/**
* Retrieves a static TranslitearationScheme object of the given id.
* @param BT_Xlit_Scheme numeric id of the scheme to get.
* @return TransliterationScheme object corresponding to the param.
*/
public static TransliterationScheme getObjectByBT_Xlit_Scheme(int BT_Xlit_Scheme) {
TransliterationScheme ts = CatalogByBTXlitScheme.it.get(BT_Xlit_Scheme);
if(ts == null)
throw new IllegalArgumentException("Unknown BT_Xlit_Scheme code: "+BT_Xlit_Scheme);
return ts;
}
static TransliterationScheme lookupByNativeCode(int nativeCode) {
return getObjectByBT_Xlit_Scheme(nativeCode);
}
/**
* Returns the numeric code (C++ BT_Xlit_Scheme) for this transliteration scheme.
* @return Numeric code
**/
public int getNativeCode() {
return BT_Xlit_Scheme;
}
/**
* Retrieves a static TransliterationScheme object of the given name.
* @param name Name of the scheme to retrieve.
* @return TransliterationScheme object corresponding to the param.
*/
public static TransliterationScheme getObjectByName(String name) {
TransliterationScheme ts = CatalogByName.it.get(name);
if(ts == null)
throw new IllegalArgumentException("Unknown TransliterationScheme name: "+name);
return ts;
}
/**
* Gets the internally recognized name, such as what might be passed into NameTranslator.translateName or would be used to create a new TransliterationScheme
* @return Internal name for the transliteration scheme
*/
public String getName(){
return name;
}
/**
* Gets the name as should be presented visibly to a user
* @return Transliteration scheme as should be viewed on a form or in output
*/
public String getPresentationName(){
return presentationName;
}
/**
* Gets the description of the transliteration scheme, which generally would be displayed, for example, on a form when a particular scheme is chosen from a dropdown box
* @return Short description of this particular scheme
*/
public String getDescription(){
return description;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy