⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 iso639.java

📁 Jena推理机
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
/*
 *  (c) Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007 Hewlett-Packard Development Company, LP
 *  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. The name of the author may not be used to endorse or promote products
 *    derived from this software without specific prior written permission.

 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 * * $Id: Iso639.java,v 1.5 2007/01/02 11:52:24 andy_seaborne Exp $
   
   AUTHOR:  Jeremy J. Carroll
*/
/*
 * Iso639.java
 *
 * Created on July 24, 2001, 11:46 PM
 */

package com.hp.hpl.jena.rdf.arp.lang;

import java.util.HashMap;
import java.util.Map;
/** 
 *Language codes from ISO639-1 and ISO639-2.
 *<p>
   An encapsulation of the registry of ISO639-1 and
 * ISO639-2 codes as found at
 * <a href="http://lcweb.loc.gov/standards/iso639-2/englangn.html">
 * http://lcweb.loc.gov/standards/iso639-2/englangn.html</a>
 * on the 24th July 2001, and dated 12th October 2000.
 *
 *
 * @author jjc
 */

public class Iso639  implements LanguageTagCodes  {
    static final Map all = new HashMap();

    /** Creates new Iso639 */
    private Iso639(String engName,String two,String term,String bib, int classify) {
        name = engName;
        twoCharCode = two;
        terminologyCode = term;
        bibliographicCode = bib;
        classification = classify|LT_ISO639;
        put(two,this);
        put(term,this);
        put(bib,this);
    }
    private Iso639(String engName,String two,String term,String bib) {
        this(engName,two,term,bib,0);
    }
       
/** Look an ISO-639 code up in the list.
 * @param lang The two or three character code to look up.
 * @return The corresponding Iso639 object,
 * or null if not in the list.
 */  
    static public Iso639 find(String lang) {
        Iso639 rslt = (Iso639)all.get(lang);
        if ( rslt == null ) {
            if ( lang != null 
                 && lang.compareTo("qaa") >= 0
                 && lang.compareTo("qtz") <= 0
                 && lang.length()==3 ) {
                  return new Iso639("Reserved for local use",null,
                                          lang,lang,LT_LOCAL_USE);
            }
        }
        return rslt;
    }
    /** The bitwise OR of all applicable values
 * from {@link LanguageTagCodes}.
 * The possibilities are:
 * <ul>
 * <li><CODE>LT_ISO639</CODE></li>
 * <li><CODE>LT_ISO639|LT_MULTIPLE</CODE> i.e. <CODE>mul</CODE></li>
 * <li><CODE>LT_ISO639|LT_UNDETERMINED</CODE> i.e. <CODE>und</CODE></li>
 * <li><CODE>LT_ISO639|LT_LOCAL_USE</CODE> e.g. <CODE>qaa</CODE></li>
 *</ul>
 *
 */   
    public final int classification;
    /** The ISO639-1 two character code.
     */
    public final String twoCharCode;
    /** The ISO639-2 three character Terminology Code.
     */
    public final String terminologyCode;
    /** The ISO639-2 three character Bibliographic Code.
     */
    public final String bibliographicCode;
    /** The name of the language in English.
     */
    public final String name;
    
    static private void put(String key,Iso639 v) {
        if ( key!= null ) {
            Iso639 old = (Iso639)all.put(key,v);
            if ( old != null && old != v ) {
                System.err.println("ISO-639 code '" + key + "' is overloaded.");
            }
        }
    }
    
    static {
        new Iso639("Abkhazian","ab","abk","abk");
        new Iso639("Achinese",null,"ace","ace");
        new Iso639("Acoli",null,"ach","ach");
        new Iso639("Adangme",null,"ada","ada");
        new Iso639("Afar","aa","aar","aar");
        new Iso639("Afrihili",null,"afh","afh");
        new Iso639("Afrikaans","af","afr","afr");
        new Iso639("Afro-Asiatic (Other)",null,"afa","afa");
        new Iso639("Akan",null,"aka","aka");
        new Iso639("Akkadian",null,"akk","akk");
        new Iso639("Albanian","sq","sqi","alb");
        new Iso639("Aleut",null,"ale","ale");
        new Iso639("Algonquian languages",null,"alg","alg");
        new Iso639("Altaic (Other)",null,"tut","tut");
        new Iso639("Amharic","am","amh","amh");
        new Iso639("Apache languages",null,"apa","apa");
        new Iso639("Arabic","ar","ara","ara");
        new Iso639("Aramaic",null,"arc","arc");
        new Iso639("Arapaho",null,"arp","arp");
        new Iso639("Araucanian",null,"arn","arn");
        new Iso639("Arawak",null,"arw","arw");
        new Iso639("Armenian","hy","hye","arm");
        new Iso639("Artificial (Other)",null,"art","art");
        new Iso639("Assamese","as","asm","asm");
        new Iso639("Athapascan languages",null,"ath","ath");
        new Iso639("Australian languages",null,"aus","aus");
        new Iso639("Austronesian (Other)",null,"map","map");
        
        new Iso639("Avaric",null,"ava","ava");
        new Iso639("Avestan","ae","ave","ave");
        new Iso639("Awadhi",null,"awa","awa");
        new Iso639("Aymara","ay","aym","aym");
        new Iso639("Azerbaijani","az","aze","aze");
        new Iso639("Balinese",null,"ban","ban");
        new Iso639("Baltic (Other)",null,"bat","bat");
        new Iso639("Baluchi",null,"bal","bal");
        new Iso639("Bambara",null,"bam","bam");
        new Iso639("Bamileke languages",null,"bai","bai");
        new Iso639("Banda",null,"bad","bad");
        new Iso639("Bantu (Other)",null,"bnt","bnt");
        new Iso639("Basa",null,"bas","bas");
        new Iso639("Bashkir","ba","bak","bak");
        new Iso639("Basque","eu","eus","baq");
        new Iso639("Batak (Indonesia)",null,"btk","btk");
        new Iso639("Beja",null,"bej","bej");
        new Iso639("Belarusian","be","bel","bel");
        new Iso639("Bemba",null,"bem","bem");
        new Iso639("Bengali","bn","ben","ben");
        new Iso639("Berber (Other)",null,"ber","ber");
        new Iso639("Bhojpuri",null,"bho","bho");
        new Iso639("Bihari","bh","bih","bih");
        new Iso639("Bikol",null,"bik","bik");
        new Iso639("Bini",null,"bin","bin");
        new Iso639("Bislama","bi","bis","bis");
        new Iso639("Bosnian","bs","bos","bos");
        new Iso639("Braj",null,"bra","bra");
        new Iso639("Breton","br","bre","bre");
        new Iso639("Buginese",null,"bug","bug");
        new Iso639("Bulgarian","bg","bul","bul");
        new Iso639("Buriat",null,"bua","bua");
        new Iso639("Burmese","my","mya","bur");
        
        
        
        
        
        
        new Iso639("Caddo",null,"cad","cad");
        new Iso639("Carib",null,"car","car");
        new Iso639("Catalan","ca","cat","cat");
        new Iso639("Caucasian (Other)",null,"cau","cau");
        new Iso639("Cebuano",null,"ceb","ceb");
        new Iso639("Celtic (Other)",null,"cel","cel");
        new Iso639("Central American Indian (Other)",null,"cai","cai");
        
        new Iso639("Chagatai",null,"chg","chg");
        new Iso639("Chamic languages",null,"cmc","cmc");
        new Iso639("Chamorro","ch","cha","cha");
        new Iso639("Chechen","ce","che","che");
        new Iso639("Cherokee",null,"chr","chr");
        new Iso639("Cheyenne",null,"chy","chy");
        new Iso639("Chibcha",null,"chb","chb");
        new Iso639("Chichewa; Nyanja","ny","nya","nya");
        new Iso639("Chinese","zh","zho","chi");
        new Iso639("Chinook jargon",null,"chn","chn");
        new Iso639("Chipewyan",null,"chp","chp");
        new Iso639("Choctaw",null,"cho","cho");
        new Iso639("Church Slavic","cu","chu","chu");
        new Iso639("Chuukese",null,"chk","chk");
        new Iso639("Chuvash","cv","chv","chv");
        new Iso639("Coptic",null,"cop","cop");
        new Iso639("Cornish","kw","cor","cor");
        new Iso639("Corsican","co","cos","cos");
        new Iso639("Cree",null,"cre","cre");
        new Iso639("Creek",null,"mus","mus");
        new Iso639("Creoles and pidgins (Other)",null,"crp","crp");
        new Iso639("Creoles and pidgins, English-based (Other)",null,"cpe","cpe");
        
        new Iso639("Creoles and pidgins, French-based (Other)",null,"cpf","cpf");
        
        new Iso639("Creoles and pidgins, Portuguese-based (Other)",null,"cpp","cpp");
        
        new Iso639("Croatian","hr","hrv","scr");
        new Iso639("Cushitic (Other)",null,"cus","cus");
        new Iso639("Czech","cs","ces","cze");
        new Iso639("Dakota",null,"dak","dak");
        new Iso639("Danish","da","dan","dan");
        new Iso639("Dayak",null,"day","day");
        new Iso639("Delaware",null,"del","del");
        new Iso639("Dinka",null,"din","din");
        new Iso639("Divehi",null,"div","div");
        new Iso639("Dogri",null,"doi","doi");
        new Iso639("Dogrib",null,"dgr","dgr");
        new Iso639("Dravidian (Other)",null,"dra","dra");
        new Iso639("Duala",null,"dua","dua");
        new Iso639("Dutch","nl","nld","dut");
        new Iso639("Dutch, Middle (ca. 1050-1350)",null,"dum","dum");
        new Iso639("Dyula",null,"dyu","dyu");
        new Iso639("Dzongkha","dz","dzo","dzo");
        
        
        
        
        
        
        new Iso639("Efik",null,"efi","efi");
        new Iso639("Egyptian (Ancient)",null,"egy","egy");
        new Iso639("Ekajuk",null,"eka","eka");
        new Iso639("Elamite",null,"elx","elx");
        new Iso639("English","en","eng","eng");
        new Iso639("English, Middle (1100-1500)",null,"enm","enm");
        new Iso639("English, Old (ca.450-1100)",null,"ang","ang");
        new Iso639("Esperanto","eo","epo","epo");
        new Iso639("Estonian","et","est","est");
        new Iso639("Ewe",null,"ewe","ewe");
        new Iso639("Ewondo",null,"ewo","ewo");
        new Iso639("Fang",null,"fan","fan");
        new Iso639("Fanti",null,"fat","fat");
        new Iso639("Faroese","fo","fao","fao");
        new Iso639("Fijian","fj","fij","fij");
        new Iso639("Finnish","fi","fin","fin");
        new Iso639("Finno-Ugrian (Other)",null,"fiu","fiu");
        new Iso639("Fon",null,"fon","fon");
        new Iso639("French","fr","fra","fre");
        new Iso639("French, Middle (ca.1400-1600)",null,"frm","frm");
        new Iso639("French, Old (842-ca.1400)",null,"fro","fro");
        new Iso639("Frisian","fy","fry","fry");
        new Iso639("Friulian",null,"fur","fur");
        new Iso639("Fulah",null,"ful","ful");
        
        
        
        
        
        
        new Iso639("Ga",null,"gaa","gaa");
        new Iso639("Gaelic (Scots)","gd","gla","gla");
        new Iso639("Gallegan","gl","glg","glg");
        new Iso639("Ganda",null,"lug","lug");
        new Iso639("Gayo",null,"gay","gay");
        new Iso639("Gbaya",null,"gba","gba");
        new Iso639("Geez",null,"gez","gez");
        new Iso639("Georgian","ka","kat","geo");
        new Iso639("German","de","deu","ger");
        //new Iso639("German, Low; Saxon, Low; Low German; Low Saxon",null,"nds","nds");
        new Iso639("German, Middle High (ca.1050-1500)",null,"gmh","gmh");
        
        new Iso639("German, Old High (ca.750-1050)",null,"goh","goh");
        
        new Iso639("Germanic (Other)",null,"gem","gem");
        new Iso639("Gilbertese",null,"gil","gil");
        new Iso639("Gondi",null,"gon","gon");
        new Iso639("Gorontalo",null,"gor","gor");
        new Iso639("Gothic",null,"got","got");
        new Iso639("Grebo",null,"grb","grb");
        new Iso639("Greek, Ancient (to 1453)",null,"grc","grc");
        new Iso639("Greek, Modern (1453-)","el","ell","gre");
        new Iso639("Guarani","gn","grn","grn");
        new Iso639("Gujarati","gu","guj","guj");
        new Iso639("Gwich磇n",null,"gwi","gwi");
        new Iso639("Haida",null,"hai","hai");
        new Iso639("Hausa","ha","hau","hau");
        new Iso639("Hawaiian",null,"haw","haw");
        new Iso639("Hebrew","he","heb","heb");
        new Iso639("Herero","hz","her","her");
        new Iso639("Hiligaynon",null,"hil","hil");
        new Iso639("Himachali",null,"him","him");
        new Iso639("Hindi","hi","hin","hin");
        new Iso639("Hiri Motu","ho","hmo","hmo");
        new Iso639("Hittite",null,"hit","hit");
        new Iso639("Hmong",null,"hmn","hmn");
        new Iso639("Hungarian","hu","hun","hun");
        new Iso639("Hupa",null,"hup","hup");
        
        
        
        
        
        

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -