jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [6/8] jena git commit: JENA-827: Replace registry-based language check with a syntactic check.
Date Sat, 13 Dec 2014 17:19:17 GMT
JENA-827: Replace registry-based language check with a syntactic check.

Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/b9a172f9
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/b9a172f9
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/b9a172f9

Branch: refs/heads/master
Commit: b9a172f92a7cc9f35c55ddd7a2cf855f701c3bf2
Parents: 8c169f7
Author: Andy Seaborne <andy@apache.org>
Authored: Sat Dec 13 17:17:53 2014 +0000
Committer: Andy Seaborne <andy@apache.org>
Committed: Sat Dec 13 17:17:53 2014 +0000

----------------------------------------------------------------------
 .../rdfxml/xmlinput/impl/AbsXMLContext.java     |  71 +--
 .../rdfxml/xmlinput/impl/ParserSupport.java     |  16 +-
 .../jena/rdfxml/xmlinput/impl/XMLContext.java   |   9 +-
 .../rdfxml/xmlinput/lang/IanaLanguageTag.java   | 145 -----
 .../hpl/jena/rdfxml/xmlinput/lang/Iso3166.java  | 308 ---------
 .../hpl/jena/rdfxml/xmlinput/lang/Iso639.java   | 619 -------------------
 .../jena/rdfxml/xmlinput/lang/LanguageTag.java  | 222 -------
 .../rdfxml/xmlinput/lang/LanguageTagCodes.java  |  88 ---
 .../lang/LanguageTagSyntaxException.java        |  47 --
 .../hpl/jena/rdfxml/xmlinput/lang/package.html  |  27 -
 10 files changed, 32 insertions(+), 1520 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/b9a172f9/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/impl/AbsXMLContext.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/impl/AbsXMLContext.java b/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/impl/AbsXMLContext.java
index 892160f..81f09f2 100644
--- a/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/impl/AbsXMLContext.java
+++ b/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/impl/AbsXMLContext.java
@@ -18,21 +18,18 @@
 
 package com.hp.hpl.jena.rdfxml.xmlinput.impl;
 
-import java.util.Iterator;
+import java.util.Iterator ;
+import java.util.regex.Pattern ;
 
-import org.xml.sax.SAXParseException;
-import org.apache.jena.iri.IRI;
-import org.apache.jena.iri.IRIComponents;
-import org.apache.jena.iri.Violation;
-import org.apache.jena.iri.ViolationCodes;
+import org.apache.jena.iri.IRI ;
+import org.apache.jena.iri.IRIComponents ;
+import org.apache.jena.iri.Violation ;
+import org.apache.jena.iri.ViolationCodes ;
+import org.xml.sax.SAXParseException ;
 
 import com.hp.hpl.jena.rdfxml.xmlinput.ARPErrorNumbers ;
-import com.hp.hpl.jena.rdfxml.xmlinput.lang.LanguageTag ;
-import com.hp.hpl.jena.rdfxml.xmlinput.lang.LanguageTagCodes ;
-import com.hp.hpl.jena.rdfxml.xmlinput.lang.LanguageTagSyntaxException ;
 
-public abstract class AbsXMLContext implements ARPErrorNumbers,
-        LanguageTagCodes {
+public abstract class AbsXMLContext implements ARPErrorNumbers {
 
     // protected static String truncateXMLBase(String rslt) {
     // if (rslt == null)
@@ -166,12 +163,10 @@ public abstract class AbsXMLContext implements ARPErrorNumbers,
                         && irie.getComponent() == IRIComponents.SCHEME) {
                     if (!forErrors.allowRelativeURIs())
                         forErrors.warning(taintMe, WARN_RELATIVE_URI,
-                                "Relative URIs are not permitted in RDF: specifically <"
-                                        + rslt.toString() + ">");
+                                "Relative URIs are not permitted in RDF: specifically <"+rslt.toString()+">");
 
                 } else
-                    forErrors.warning(taintMe, WARN_MALFORMED_URI, "Bad URI: "
-                            + msg);
+                    forErrors.warning(taintMe, WARN_MALFORMED_URI, "Bad URI: " + msg);
             }
         }
     }
@@ -181,41 +176,19 @@ public abstract class AbsXMLContext implements ARPErrorNumbers,
         return resolveAsURI(forErrors, taintMe, u, true).toString();
     }
 
-    private void checkXMLLang(XMLHandler arp, Taint taintMe, String newLang)
-            throws SAXParseException {
+    private static Pattern langPattern = Pattern.compile("[a-zA-Z]+('-' [a-zA-Z0-9]+)*") ;
+        
+    /* This is just a light syntactic check of the language tag.
+     * See JENA-827.
+     * Jena, when parsing RDF/XML, used to check the syntax and against (an encoded copy of) the IANA registry.
+     * Elsewhere, Turtle et al and SPARQL, Jena has always only performed this syntax check.
+     */
+    private void checkXMLLang(XMLHandler arp, Taint taintMe, String newLang) throws SAXParseException {
         if (newLang.equals(""))
             return;
-        try {
-            LanguageTag tag = new LanguageTag(newLang);
-            int tagType = tag.tagType();
-            if (tagType == LT_ILLEGAL) {
-                arp.warning(taintMe, WARN_BAD_XMLLANG, tag.errorMessage());
-            }
-            if ((tagType & LT_UNDETERMINED) == LT_UNDETERMINED) {
-                arp
-                        .warning(taintMe, WARN_BAD_XMLLANG,
-                                "Unnecessary use of language tag \"und\" prohibited by RFC3066");
-            }
-            if ((tagType & LT_IANA_DEPRECATED) == LT_IANA_DEPRECATED) {
-                arp.warning(taintMe, WARN_DEPRECATED_XMLLANG,
-                        "Use of deprecated language tag \"" + newLang + "\".");
-            }
-            if ((tagType & LT_PRIVATE_USE) == LT_PRIVATE_USE) {
-                arp.warning(taintMe, IGN_PRIVATE_XMLLANG,
-                        "Use of (IANA) private language tag \"" + newLang
-                                + "\".");
-            } else if ((tagType & LT_LOCAL_USE) == LT_LOCAL_USE) {
-                arp.warning(taintMe, IGN_PRIVATE_XMLLANG,
-                        "Use of (ISO639-2) local use language tag \"" + newLang
-                                + "\".");
-            } else if ((tagType & LT_EXTRA) == LT_EXTRA) {
-                arp.warning(taintMe, IGN_PRIVATE_XMLLANG,
-                        "Use of additional private subtags on language \""
-                                + newLang + "\".");
-            }
-        } catch (LanguageTagSyntaxException e) {
-            arp.warning(taintMe, WARN_MALFORMED_XMLLANG, e.getMessage());
-        }
+        if (newLang.equalsIgnoreCase("und") )
+            arp.warning(taintMe, WARN_BAD_XMLLANG, "Bad language tag: "+newLang+" (not allowed)") ;
+        if ( ! langPattern.matcher(newLang).matches() ) 
+            arp.warning(taintMe, WARN_BAD_XMLLANG, "Bad language tag: "+newLang) ;
     }
-
 }

http://git-wip-us.apache.org/repos/asf/jena/blob/b9a172f9/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/impl/ParserSupport.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/impl/ParserSupport.java b/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/impl/ParserSupport.java
index 1d54d28..d80bc76 100644
--- a/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/impl/ParserSupport.java
+++ b/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/impl/ParserSupport.java
@@ -24,20 +24,16 @@
 
 package com.hp.hpl.jena.rdfxml.xmlinput.impl;
 
-import java.util.HashMap;
-import java.util.Map;
+import java.util.HashMap ;
+import java.util.Map ;
 
-import org.apache.xerces.util.XMLChar;
-import org.xml.sax.SAXParseException;
-import org.apache.jena.iri.IRI;
+import org.apache.jena.iri.IRI ;
+import org.apache.xerces.util.XMLChar ;
+import org.xml.sax.SAXParseException ;
 
 import com.hp.hpl.jena.rdfxml.xmlinput.ARPErrorNumbers ;
-import com.hp.hpl.jena.rdfxml.xmlinput.lang.LanguageTagCodes ;
 
-/**
- */
-public class ParserSupport
-	implements ARPErrorNumbers,  LanguageTagCodes, Names {
+public class ParserSupport implements ARPErrorNumbers, Names {
     
 //    protected void checkBadURI(Taint taintMe,RDFURIReference uri) throws SAXParseException {
 //        arp.checkBadURI(taintMe,uri);

http://git-wip-us.apache.org/repos/asf/jena/blob/b9a172f9/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/impl/XMLContext.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/impl/XMLContext.java b/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/impl/XMLContext.java
index 52d5822..3f6dd84 100644
--- a/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/impl/XMLContext.java
+++ b/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/impl/XMLContext.java
@@ -24,19 +24,18 @@
 
 package com.hp.hpl.jena.rdfxml.xmlinput.impl;
 
-import org.xml.sax.SAXParseException;
-import org.apache.jena.iri.IRI;
+import org.apache.jena.iri.IRI ;
+import org.xml.sax.SAXParseException ;
 
 import com.hp.hpl.jena.rdfxml.xmlinput.ARPErrorNumbers ;
-import com.hp.hpl.jena.rdfxml.xmlinput.lang.LanguageTagCodes ;
 
 /**
  * 
  * Both the baseURI and the lang may be tainted with errors. They should not be
  * accessed without providing a taint object to propogate such tainting.
  */
-public class XMLContext extends AbsXMLContext implements ARPErrorNumbers,
-        LanguageTagCodes {
+public class XMLContext extends AbsXMLContext implements ARPErrorNumbers
+{
     // final private String base;
 
     /**

http://git-wip-us.apache.org/repos/asf/jena/blob/b9a172f9/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/lang/IanaLanguageTag.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/lang/IanaLanguageTag.java b/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/lang/IanaLanguageTag.java
deleted file mode 100644
index 50e13b0..0000000
--- a/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/lang/IanaLanguageTag.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-/*
- * IanaLanguageTags.java
- *
- * Created on July 24, 2001, 11:47 PM
- */
-
-package com.hp.hpl.jena.rdfxml.xmlinput.lang;
-
-import java.util.HashMap;
-import java.util.Map;
-/** 
- *Language codes registered by IANA.
-  An encapsulation of the IANA language registry
- * found at
- * <a href="
- * http://www.iana.org/assignments/language-tags">
- * http://www.iana.org/assignments/language-tags</a>.
- *
- * The values were updated on 8th July 2002 from a file dated
- * 7th July 2002.
- */
-public class IanaLanguageTag extends LanguageTag {
-    static final Map<String, IanaLanguageTag[]> all = new HashMap<>();
-    static {
-        try {
-        all.put("lojban",new IanaLanguageTag[]{new IanaLanguageTag("art-lojban")});
-        all.put("gaulish",new IanaLanguageTag[]{new IanaLanguageTag("cel-gaulish")});
-        all.put("scouse",new IanaLanguageTag[]{new IanaLanguageTag("en-scouse")});
-        all.put("ami",new IanaLanguageTag[]{new IanaLanguageTag("i-ami")});
-        all.put("bnn",new IanaLanguageTag[]{new IanaLanguageTag("i-bnn")});
-        all.put("default",new IanaLanguageTag[]{new IanaLanguageTag("i-default",LT_DEFAULT)});
-        all.put("enochian",new IanaLanguageTag[]{new IanaLanguageTag("i-enochian")});
-        all.put("hak",new IanaLanguageTag[]{new IanaLanguageTag("i-hak",LT_IANA_DEPRECATED)});
-        all.put("klingon",new IanaLanguageTag[]{new IanaLanguageTag("i-klingon")});
-        all.put("lux",new IanaLanguageTag[]{new IanaLanguageTag("i-lux",LT_IANA_DEPRECATED)});
-        all.put("mingo",new IanaLanguageTag[]{new IanaLanguageTag("i-mingo")});
-        all.put("navajo",new IanaLanguageTag[]{new IanaLanguageTag("i-navajo",LT_IANA_DEPRECATED)});
-        all.put("pwn",new IanaLanguageTag[]{new IanaLanguageTag("i-pwn")});
-        all.put("tao",new IanaLanguageTag[]{new IanaLanguageTag("i-tao")});
-        all.put("tay",new IanaLanguageTag[]{new IanaLanguageTag("i-tay")});
-        all.put("tsu",new IanaLanguageTag[]{new IanaLanguageTag("i-tsu")});
-        all.put("bok",new IanaLanguageTag[]{new IanaLanguageTag("no-bok",LT_IANA_DEPRECATED)});
-        all.put("nyn",new IanaLanguageTag[]{new IanaLanguageTag("no-nyn",LT_IANA_DEPRECATED)});
-        all.put("be",new IanaLanguageTag[]{new IanaLanguageTag("sgn-BE-fr"),new IanaLanguageTag("sgn-BE-nl")});
-        all.put("br",new IanaLanguageTag[]{new IanaLanguageTag("sgn-BR")});
-        all.put("ch",new IanaLanguageTag[]{new IanaLanguageTag("sgn-CH-de")});
-        all.put("co",new IanaLanguageTag[]{new IanaLanguageTag("sgn-CO")});
-        all.put("de",new IanaLanguageTag[]{new IanaLanguageTag("sgn-DE")});
-        all.put("dk",new IanaLanguageTag[]{new IanaLanguageTag("sgn-DK")});
-        all.put("es",new IanaLanguageTag[]{new IanaLanguageTag("sgn-ES")});
-        all.put("fr",new IanaLanguageTag[]{new IanaLanguageTag("sgn-FR")});
-        all.put("gb",new IanaLanguageTag[]{new IanaLanguageTag("sgn-GB")});
-        all.put("gr",new IanaLanguageTag[]{new IanaLanguageTag("sgn-GR")});
-        all.put("ie",new IanaLanguageTag[]{new IanaLanguageTag("sgn-IE")});
-        all.put("it",new IanaLanguageTag[]{new IanaLanguageTag("sgn-IT")});
-        all.put("jp",new IanaLanguageTag[]{new IanaLanguageTag("sgn-JP")});
-        all.put("mx",new IanaLanguageTag[]{new IanaLanguageTag("sgn-MX")});
-        all.put("ni",new IanaLanguageTag[]{new IanaLanguageTag("sgn-NI")});
-        all.put("nl",new IanaLanguageTag[]{new IanaLanguageTag("sgn-NL")});
-        all.put("no",new IanaLanguageTag[]{new IanaLanguageTag("sgn-NO")});
-        all.put("pt",new IanaLanguageTag[]{new IanaLanguageTag("sgn-PT")});
-        all.put("se",new IanaLanguageTag[]{new IanaLanguageTag("sgn-SE")});
-        all.put("us",new IanaLanguageTag[]{new IanaLanguageTag("sgn-US")});
-        all.put("za",new IanaLanguageTag[]{new IanaLanguageTag("sgn-ZA")});
-        all.put("gan",new IanaLanguageTag[]{new IanaLanguageTag("zh-gan")});
-        all.put("guoyu",new IanaLanguageTag[]{new IanaLanguageTag("zh-guoyu")});
-        all.put("hakka",new IanaLanguageTag[]{new IanaLanguageTag("zh-hakka")});
-        all.put("min",new IanaLanguageTag[]{new IanaLanguageTag("zh-min"),new IanaLanguageTag("zh-min-nan")});
-        all.put("wuu",new IanaLanguageTag[]{new IanaLanguageTag("zh-wuu")});
-        all.put("xiang",new IanaLanguageTag[]{new IanaLanguageTag("zh-xiang")});
-        all.put("yue",new IanaLanguageTag[]{new IanaLanguageTag("zh-yue")});
-        }
-        catch (LanguageTagSyntaxException ee) {
-            System.err.println("Internal Error in static initializer of IanaLanguageTag.");
-        }
-
-        
-    }
-/** The bitwise OR of all applicable values
- * from {@link LanguageTagCodes}.
- * The possibilities are:
- * <ul>
- * <li><CODE>LT_IANA</CODE></li>
- * <li><CODE>LT_IANA|LT_IANA_DEPRECATED</CODE></li>
- * <li><CODE>LT_IANA|LT_DEFAULT</CODE> i.e. <CODE>i-default</CODE></li>
- *</ul>
- */    
-    final public int classification;
-    private IanaLanguageTag(String s,int classification) throws LanguageTagSyntaxException {
-        super(s);
-        this.classification = LT_IANA|classification;
-    }
-    private IanaLanguageTag(String s) throws LanguageTagSyntaxException {
-        this(s,0);
-    }
-/** Look up a language
- * identifier in the IANA list.
- * Trailing additional subtags are ignored.
- * @param t The LanguageTag corresponding to the
- * item being looked up.
- * @return The IanaLanguageTag if found, or null if it is not in the list.
- */    
-    static public IanaLanguageTag find(LanguageTag t) {
-        if ( t.tags.length < 2)
-            return null;
-        IanaLanguageTag matches[] = all.get(t.tags[1]);
-        if ( matches == null )
-            return null;
-        nextMatch:
-        for ( IanaLanguageTag matche : matches )
-        {
-            if ( t.tags.length >= matche.tags.length )
-            {
-                for ( int j = 0; j < matche.tags.length; j++ )
-                {
-                    if ( !t.tags[j].equals( matche.tags[j] ) )
-                    {
-                        continue nextMatch;
-                    }
-                }
-                return matche;
-            }
-        }
-        return null;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/b9a172f9/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/lang/Iso3166.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/lang/Iso3166.java b/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/lang/Iso3166.java
deleted file mode 100644
index e8a04b5..0000000
--- a/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/lang/Iso3166.java
+++ /dev/null
@@ -1,308 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-/*
- * Iso3166.java
- *
- * Created on July 24, 2001, 11:46 PM
- */
-
-package com.hp.hpl.jena.rdfxml.xmlinput.lang;
-
-
-import java.util.HashMap;
-import java.util.Locale ;
-import java.util.Map;
-/** Country code names from ISO 3166.
- *<p>
-   An encapsulation of registry
- * of ISO 3166.
- * This was updated on 24th July 2001 from
- * <a href="http://www.din.de/gremien/nas/nabd/iso3166ma/codlstp1/db_en.html">
- * http://www.din.de/gremien/nas/nabd/iso3166ma/codlstp1/db_en.html</a>
- */
-public class Iso3166  {
-
-   
-    static final Map<String, Iso3166> all = new HashMap<>();
-
-    /** Creates new Iso639 */
-    private Iso3166(String code,String engName) {
-        this.code = code.toLowerCase(Locale.ENGLISH);
-        name = engName;
-        all.put(this.code,this);
-    }
-    
-/** Look a country code up in the list.
- * @param countryId The country code to look up.
- * @return The corresponding Iso3166 object,
- * or null if not in the list.
- */    
-    static public Iso3166 find(String countryId) {
-        return all.get(countryId);
-    }
-/** The 2 character country code.
- */    
-    public final String code;
-/** The name of the country (in English).
- */    
-    public final String name;
-    
-    static {
-        new Iso3166("AF","AFGHANISTAN");
-        new Iso3166("AL","ALBANIA");
-        new Iso3166("DZ","ALGERIA");
-        new Iso3166("AS","AMERICAN SAMOA");
-        new Iso3166("AD","ANDORRA");
-        new Iso3166("AO","ANGOLA");
-        new Iso3166("AI","ANGUILLA");
-        new Iso3166("AQ","ANTARCTICA");
-        new Iso3166("AG","ANTIGUA AND BARBUDA");
-        new Iso3166("AR","ARGENTINA");
-        new Iso3166("AM","ARMENIA");
-        new Iso3166("AW","ARUBA");
-        new Iso3166("AU","AUSTRALIA");
-        new Iso3166("AT","AUSTRIA");
-        new Iso3166("AZ","AZERBAIJAN");
-        new Iso3166("BS","BAHAMAS");
-        new Iso3166("BH","BAHRAIN");
-        new Iso3166("BD","BANGLADESH");
-        new Iso3166("BB","BARBADOS");
-        new Iso3166("BY","BELARUS");
-        new Iso3166("BE","BELGIUM");
-        new Iso3166("BZ","BELIZE");
-        new Iso3166("BJ","BENIN");
-        new Iso3166("BM","BERMUDA");
-        new Iso3166("BT","BHUTAN");
-        new Iso3166("BO","BOLIVIA");
-        new Iso3166("BA","BOSNIA AND HERZEGOVINA");
-        new Iso3166("BW","BOTSWANA");
-        new Iso3166("BV","BOUVET ISLAND");
-        new Iso3166("BR","BRAZIL");
-        new Iso3166("IO","BRITISH INDIAN OCEAN TERRITORY");
-        new Iso3166("BN","BRUNEI DARUSSALAM");
-        new Iso3166("BG","BULGARIA");
-        new Iso3166("BF","BURKINA FASO");
-        new Iso3166("BI","BURUNDI");
-        new Iso3166("KH","CAMBODIA");
-        new Iso3166("CM","CAMEROON");
-        new Iso3166("CA","CANADA");
-        new Iso3166("CV","CAPE VERDE");
-        new Iso3166("KY","CAYMAN ISLANDS");
-        new Iso3166("CF","CENTRAL AFRICAN REPUBLIC");
-        new Iso3166("TD","CHAD");
-        new Iso3166("CL","CHILE");
-        new Iso3166("CN","CHINA");
-        new Iso3166("CX","CHRISTMAS ISLAND");
-        new Iso3166("CC","COCOS (KEELING) ISLANDS");
-        new Iso3166("CO","COLOMBIA");
-        new Iso3166("KM","COMOROS");
-        new Iso3166("CG","CONGO");
-        new Iso3166("CD","CONGO, THE DEMOCRATIC REPUBLIC OF THE");
-        new Iso3166("CK","COOK ISLANDS");
-        new Iso3166("CR","COSTA RICA");
-        new Iso3166("CI","COTE D'IVOIRE");
-        new Iso3166("HR","CROATIA");
-        new Iso3166("CU","CUBA");
-        new Iso3166("CY","CYPRUS");
-        new Iso3166("CZ","CZECH REPUBLIC");
-        new Iso3166("DK","DENMARK");
-        new Iso3166("DJ","DJIBOUTI");
-        new Iso3166("DM","DOMINICA");
-        new Iso3166("DO","DOMINICAN REPUBLIC");
-        new Iso3166("TP","EAST TIMOR");
-        new Iso3166("EC","ECUADOR");
-        new Iso3166("EG","EGYPT");
-        new Iso3166("SV","EL SALVADOR");
-        new Iso3166("GQ","EQUATORIAL GUINEA");
-        new Iso3166("ER","ERITREA");
-        new Iso3166("EE","ESTONIA");
-        new Iso3166("ET","ETHIOPIA");
-        new Iso3166("FK","FALKLAND ISLANDS (MALVINAS)");
-        new Iso3166("FO","FAROE ISLANDS");
-        new Iso3166("FJ","FIJI");
-        new Iso3166("FI","FINLAND");
-        new Iso3166("FR","FRANCE");
-        new Iso3166("GF","FRENCH GUIANA");
-        new Iso3166("PF","FRENCH POLYNESIA");
-        new Iso3166("TF","FRENCH SOUTHERN TERRITORIES");
-        new Iso3166("GA","GABON");
-        new Iso3166("GM","GAMBIA");
-        new Iso3166("GE","GEORGIA");
-        new Iso3166("DE","GERMANY");
-        new Iso3166("GH","GHANA");
-        new Iso3166("GI","GIBRALTAR");
-        new Iso3166("GR","GREECE");
-        new Iso3166("GL","GREENLAND");
-        new Iso3166("GD","GRENADA");
-        new Iso3166("GP","GUADELOUPE");
-        new Iso3166("GU","GUAM");
-        new Iso3166("GT","GUATEMALA");
-        new Iso3166("GN","GUINEA");
-        new Iso3166("GW","GUINEA-BISSAU");
-        new Iso3166("GY","GUYANA");
-        new Iso3166("HT","HAITI");
-        new Iso3166("HM","HEARD ISLAND AND MCDONALD ISLANDS");
-        new Iso3166("VA","HOLY SEE (VATICAN CITY STATE)");
-        new Iso3166("HN","HONDURAS");
-        new Iso3166("HK","HONG KONG");
-        new Iso3166("HU","HUNGARY");
-        new Iso3166("IS","ICELAND");
-        new Iso3166("IN","INDIA");
-        new Iso3166("ID","INDONESIA");
-        new Iso3166("IR","IRAN, ISLAMIC REPUBLIC OF");
-        new Iso3166("IQ","IRAQ");
-        new Iso3166("IE","IRELAND");
-        new Iso3166("IL","ISRAEL");
-        new Iso3166("IT","ITALY");
-        new Iso3166("JM","JAMAICA");
-        new Iso3166("JP","JAPAN");
-        new Iso3166("JO","JORDAN");
-        new Iso3166("KZ","KAZAKSTAN");
-        new Iso3166("KE","KENYA");
-        new Iso3166("KI","KIRIBATI");
-        new Iso3166("KP","KOREA, DEMOCRATIC PEOPLE'S REPUBLIC OF");
-        new Iso3166("KR","KOREA, REPUBLIC OF");
-        new Iso3166("KW","KUWAIT");
-        new Iso3166("KG","KYRGYZSTAN");
-        new Iso3166("LA","LAO PEOPLE'S DEMOCRATIC REPUBLIC");
-        new Iso3166("LV","LATVIA");
-        new Iso3166("LB","LEBANON");
-        new Iso3166("LS","LESOTHO");
-        new Iso3166("LR","LIBERIA");
-        new Iso3166("LY","LIBYAN ARAB JAMAHIRIYA");
-        new Iso3166("LI","LIECHTENSTEIN");
-        new Iso3166("LT","LITHUANIA");
-        new Iso3166("LU","LUXEMBOURG");
-        new Iso3166("MO","MACAU");
-        new Iso3166("MK","MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF");
-        new Iso3166("MG","MADAGASCAR");
-        new Iso3166("MW","MALAWI");
-        new Iso3166("MY","MALAYSIA");
-        new Iso3166("MV","MALDIVES");
-        new Iso3166("ML","MALI");
-        new Iso3166("MT","MALTA");
-        new Iso3166("MH","MARSHALL ISLANDS");
-        new Iso3166("MQ","MARTINIQUE");
-        new Iso3166("MR","MAURITANIA");
-        new Iso3166("MU","MAURITIUS");
-        new Iso3166("YT","MAYOTTE");
-        new Iso3166("MX","MEXICO");
-        new Iso3166("FM","MICRONESIA, FEDERATED STATES OF");
-        new Iso3166("MD","MOLDOVA, REPUBLIC OF");
-        new Iso3166("MC","MONACO");
-        new Iso3166("MN","MONGOLIA");
-        new Iso3166("MS","MONTSERRAT");
-        new Iso3166("MA","MOROCCO");
-        new Iso3166("MZ","MOZAMBIQUE");
-        new Iso3166("MM","MYANMAR");
-        new Iso3166("NA","NAMIBIA");
-        new Iso3166("NR","NAURU");
-        new Iso3166("NP","NEPAL");
-        new Iso3166("NL","NETHERLANDS");
-        new Iso3166("AN","NETHERLANDS ANTILLES");
-        new Iso3166("NC","NEW CALEDONIA");
-        new Iso3166("NZ","NEW ZEALAND");
-        new Iso3166("NI","NICARAGUA");
-        new Iso3166("NE","NIGER");
-        new Iso3166("NG","NIGERIA");
-        new Iso3166("NU","NIUE");
-        new Iso3166("NF","NORFOLK ISLAND");
-        new Iso3166("MP","NORTHERN MARIANA ISLANDS");
-        new Iso3166("NO","NORWAY");
-        new Iso3166("OM","OMAN");
-        new Iso3166("PK","PAKISTAN");
-        new Iso3166("PW","PALAU");
-        new Iso3166("PS","PALESTINIAN TERRITORY, OCCUPIED");
-        new Iso3166("PA","PANAMA");
-        new Iso3166("PG","PAPUA NEW GUINEA");
-        new Iso3166("PY","PARAGUAY");
-        new Iso3166("PE","PERU");
-        new Iso3166("PH","PHILIPPINES");
-        new Iso3166("PN","PITCAIRN");
-        new Iso3166("PL","POLAND");
-        new Iso3166("PT","PORTUGAL");
-        new Iso3166("PR","PUERTO RICO");
-        new Iso3166("QA","QATAR");
-        new Iso3166("RE","REUNION");
-        new Iso3166("RO","ROMANIA");
-        new Iso3166("RU","RUSSIAN FEDERATION");
-        new Iso3166("RW","RWANDA");
-        new Iso3166("SH","SAINT HELENA");
-        new Iso3166("KN","SAINT KITTS AND NEVIS");
-        new Iso3166("LC","SAINT LUCIA");
-        new Iso3166("PM","SAINT PIERRE AND MIQUELON");
-        new Iso3166("VC","SAINT VINCENT AND THE GRENADINES");
-        new Iso3166("WS","SAMOA");
-        new Iso3166("SM","SAN MARINO");
-        new Iso3166("ST","SAO TOME AND PRINCIPE");
-        new Iso3166("SA","SAUDI ARABIA");
-        new Iso3166("SN","SENEGAL");
-        new Iso3166("SC","SEYCHELLES");
-        new Iso3166("SL","SIERRA LEONE");
-        new Iso3166("SG","SINGAPORE");
-        new Iso3166("SK","SLOVAKIA");
-        new Iso3166("SI","SLOVENIA");
-        new Iso3166("SB","SOLOMON ISLANDS");
-        new Iso3166("SO","SOMALIA");
-        new Iso3166("ZA","SOUTH AFRICA");
-        new Iso3166("GS","SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS");
-        new Iso3166("ES","SPAIN");
-        new Iso3166("LK","SRI LANKA");
-        new Iso3166("SD","SUDAN");
-        new Iso3166("SR","SURINAME");
-        new Iso3166("SJ","SVALBARD AND JAN MAYEN");
-        new Iso3166("SZ","SWAZILAND");
-        new Iso3166("SE","SWEDEN");
-        new Iso3166("CH","SWITZERLAND");
-        new Iso3166("SY","SYRIAN ARAB REPUBLIC");
-        new Iso3166("TW","TAIWAN, PROVINCE OF CHINA");
-        new Iso3166("TJ","TAJIKISTAN");
-        new Iso3166("TZ","TANZANIA, UNITED REPUBLIC OF");
-        new Iso3166("TH","THAILAND");
-        new Iso3166("TG","TOGO");
-        new Iso3166("TK","TOKELAU");
-        new Iso3166("TO","TONGA");
-        new Iso3166("TT","TRINIDAD AND TOBAGO");
-        new Iso3166("TN","TUNISIA");
-        new Iso3166("TR","TURKEY");
-        new Iso3166("TM","TURKMENISTAN");
-        new Iso3166("TC","TURKS AND CAICOS ISLANDS");
-        new Iso3166("TV","TUVALU");
-        new Iso3166("UG","UGANDA");
-        new Iso3166("UA","UKRAINE");
-        new Iso3166("AE","UNITED ARAB EMIRATES");
-        new Iso3166("GB","UNITED KINGDOM");
-        new Iso3166("US","UNITED STATES");
-        new Iso3166("UM","UNITED STATES MINOR OUTLYING ISLANDS");
-        new Iso3166("UY","URUGUAY");
-        new Iso3166("UZ","UZBEKISTAN");
-        new Iso3166("VU","VANUATU");
-        new Iso3166("VE","VENEZUELA");
-        new Iso3166("VN","VIET NAM");
-        new Iso3166("VG","VIRGIN ISLANDS, BRITISH");
-        new Iso3166("VI","VIRGIN ISLANDS, U.S.");
-        new Iso3166("WF","WALLIS AND FUTUNA");
-        new Iso3166("EH","WESTERN SAHARA");
-        new Iso3166("YE","YEMEN");
-        new Iso3166("YU","YUGOSLAVIA");
-        new Iso3166("ZM","ZAMBIA");
-        new Iso3166("ZW","ZIMBABWE");
-        
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/b9a172f9/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/lang/Iso639.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/lang/Iso639.java b/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/lang/Iso639.java
deleted file mode 100644
index a03e3c6..0000000
--- a/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/lang/Iso639.java
+++ /dev/null
@@ -1,619 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.hp.hpl.jena.rdfxml.xmlinput.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://www.loc.gov/standards/iso639-2/php/English_list.php">
- * http://www.loc.gov/standards/iso639-2/php/English_list.php</a>
- * on 23rd July, 2009
- */
-
-public class Iso639  implements LanguageTagCodes  {
-    /* First version: 
-     * <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.
-     */
-    static final Map<String, Iso639> 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 = 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 = 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("Adygei",null,"ady","ady") ;
-        new Iso639("Afar","aa","aar","aar") ;
-        new Iso639("Afrihili",null,"afh","afh") ;
-        new Iso639("Afrikaans","af","afr","afr") ;
-        new Iso639("Afro-Asiatic languages",null,"afa","afa") ;
-        new Iso639("Ainu",null,"ain","ain") ;
-        new Iso639("Akan","ak","aka","aka") ;
-        new Iso639("Akkadian",null,"akk","akk") ;
-        new Iso639("Albanian","sq","alb","sqi") ;
-        new Iso639("Alemannic",null,"gsw","gsw") ;
-        new Iso639("Aleut",null,"ale","ale") ;
-        new Iso639("Algonquian languages",null,"alg","alg") ;
-        new Iso639("Altaic languages",null,"tut","tut") ;
-        new Iso639("Amharic","am","amh","amh") ;
-        new Iso639("Angika",null,"anp","anp") ;
-        new Iso639("Apache languages",null,"apa","apa") ;
-        new Iso639("Arabic","ar","ara","ara") ;
-        new Iso639("Aragonese","an","arg","arg") ;
-        new Iso639("Arapaho",null,"arp","arp") ;
-        new Iso639("Arawak",null,"arw","arw") ;
-        new Iso639("Armenian","hy","arm","hye") ;
-        new Iso639("Aromanian",null,"rup","rup") ;
-        new Iso639("Artificial languages",null,"art","art") ;
-        new Iso639("Assamese","as","asm","asm") ;
-        new Iso639("Asturian",null,"ast","ast") ;
-        new Iso639("Athapascan languages",null,"ath","ath") ;
-        new Iso639("Australian languages",null,"aus","aus") ;
-        new Iso639("Austronesian languages",null,"map","map") ;
-        new Iso639("Avaric","av","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 languages",null,"bat","bat") ;
-        new Iso639("Baluchi",null,"bal","bal") ;
-        new Iso639("Bambara","bm","bam","bam") ;
-        new Iso639("Bamileke languages",null,"bai","bai") ;
-        new Iso639("Banda languages",null,"bad","bad") ;
-        new Iso639("Bantu languages",null,"bnt","bnt") ;
-        new Iso639("Basa",null,"bas","bas") ;
-        new Iso639("Bashkir","ba","bak","bak") ;
-        new Iso639("Basque","eu","baq","eus") ;
-        new Iso639("Batak languages",null,"btk","btk") ;
-        new Iso639("Bedawiyet",null,"bej","bej") ;
-        new Iso639("Belarusian","be","bel","bel") ;
-        new Iso639("Bemba",null,"bem","bem") ;
-        new Iso639("Bengali","bn","ben","ben") ;
-        new Iso639("Berber languages",null,"ber","ber") ;
-        new Iso639("Bhojpuri",null,"bho","bho") ;
-        new Iso639("Bihari","bh","bih","bih") ;
-        new Iso639("Bikol",null,"bik","bik") ;
-        new Iso639("Bilin",null,"byn","byn") ;
-        new Iso639("Bini",null,"bin","bin") ;
-        new Iso639("Bislama","bi","bis","bis") ;
-        new Iso639("Bliss",null,"zbl","zbl") ;
-        new Iso639("Bokmål, Norwegian","nb","nob","nob") ;
-        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","bur","mya") ;
-
-        new Iso639("Caddo",null,"cad","cad") ;
-        new Iso639("Castilian","es","spa","spa") ;
-        new Iso639("Catalan","ca","cat","cat") ;
-        new Iso639("Caucasian languages",null,"cau","cau") ;
-        new Iso639("Cebuano",null,"ceb","ceb") ;
-        new Iso639("Celtic languages",null,"cel","cel") ;
-        new Iso639("Central American Indian languages",null,"cai","cai") ;
-        new Iso639("Central Khmer","km","khm","khm") ;
-        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("Chewa","ny","nya","nya") ;
-        new Iso639("Cheyenne",null,"chy","chy") ;
-        new Iso639("Chibcha",null,"chb","chb") ;
-        new Iso639("Chinese","zh","chi","zho") ;
-        new Iso639("Chinook jargon",null,"chn","chn") ;
-        new Iso639("Chipewyan",null,"chp","chp") ;
-        new Iso639("Choctaw",null,"cho","cho") ;
-        new Iso639("Chuang","za","zha","zha") ;
-        new Iso639("Church Slavic","cu","chu","chu") ;
-        new Iso639("Chuukese",null,"chk","chk") ;
-        new Iso639("Chuvash","cv","chv","chv") ;
-        new Iso639("Classical Nepal Bhasa",null,"nwc","nwc") ;
-        new Iso639("Classical Syriac",null,"syc","syc") ;
-        new Iso639("Cook Islands Maori",null,"rar","rar") ;
-        new Iso639("Coptic",null,"cop","cop") ;
-        new Iso639("Cornish","kw","cor","cor") ;
-        new Iso639("Corsican","co","cos","cos") ;
-        new Iso639("Cree","cr","cre","cre") ;
-        new Iso639("Creek",null,"mus","mus") ;
-        new Iso639("Creoles and pidgins",null,"crp","crp") ;
-        new Iso639("Creoles and pidgins, English based",null,"cpe","cpe") ;
-        new Iso639("Creoles and pidgins, French-based",null,"cpf","cpf") ;
-        new Iso639("Creoles and pidgins, Portuguese-based",null,"cpp","cpp") ;
-        new Iso639("Crimean Tatar",null,"crh","crh") ;
-        new Iso639("Croatian","hr","hrv","hrv") ;
-        new Iso639("Cushitic languages",null,"cus","cus") ;
-        new Iso639("Czech","cs","cze","ces") ;
-
-        new Iso639("Dakota",null,"dak","dak") ;
-        new Iso639("Danish","da","dan","dan") ;
-        new Iso639("Dargwa",null,"dar","dar") ;
-        new Iso639("Delaware",null,"del","del") ;
-        new Iso639("Dhivehi","dv","div","div") ;
-        new Iso639("Dimili",null,"zza","zza") ;
-        new Iso639("Dinka",null,"din","din") ;
-        new Iso639("Dogri",null,"doi","doi") ;
-        new Iso639("Dogrib",null,"dgr","dgr") ;
-        new Iso639("Dravidian languages",null,"dra","dra") ;
-        new Iso639("Duala",null,"dua","dua") ;
-        new Iso639("Dutch","nl","dut","nld") ;
-        new Iso639("Dutch, Middle (ca.1050-1350)",null,"dum","dum") ;
-        new Iso639("Dyula",null,"dyu","dyu") ;
-        new Iso639("Dzongkha","dz","dzo","dzo") ;
-
-        new Iso639("Eastern Frisian",null,"frs","frs") ;
-        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("Erzya",null,"myv","myv") ;
-        new Iso639("Esperanto","eo","epo","epo") ;
-        new Iso639("Estonian","et","est","est") ;
-        new Iso639("Ewe","ee","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("Filipino",null,"fil","fil") ;
-        new Iso639("Finnish","fi","fin","fin") ;
-        new Iso639("Finno-Ugrian languages",null,"fiu","fiu") ;
-        new Iso639("Fon",null,"fon","fon") ;
-        new Iso639("French","fr","fre","fra") ;
-        new Iso639("French, Middle (ca.1400-1600)",null,"frm","frm") ;
-        new Iso639("French, Old (842-ca.1400)",null,"fro","fro") ;
-        new Iso639("Friulian",null,"fur","fur") ;
-        new Iso639("Fulah","ff","ful","ful") ;
-
-        new Iso639("Ga",null,"gaa","gaa") ;
-        new Iso639("Gaelic","gd","gla","gla") ;
-        new Iso639("Galibi Carib",null,"car","car") ;
-        new Iso639("Galician","gl","glg","glg") ;
-        new Iso639("Ganda","lg","lug","lug") ;
-        new Iso639("Gayo",null,"gay","gay") ;
-        new Iso639("Gbaya",null,"gba","gba") ;
-        new Iso639("Geez",null,"gez","gez") ;
-        new Iso639("Georgian","ka","geo","kat") ;
-        new Iso639("German","de","ger","deu") ;
-        new Iso639("German, Low",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 languages",null,"gem","gem") ;
-        new Iso639("Gikuyu","ki","kik","kik") ;
-        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","gre","ell") ;
-        new Iso639("Greenlandic","kl","kal","kal") ;
-        new Iso639("Guarani","gn","grn","grn") ;
-        new Iso639("Gujarati","gu","guj","guj") ;
-        new Iso639("Gwich'in",null,"gwi","gwi") ;
-
-        new Iso639("Haida",null,"hai","hai") ;
-        new Iso639("Haitian","ht","hat","hat") ;
-        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") ;
-
-        new Iso639("Iban",null,"iba","iba") ;
-        new Iso639("Icelandic","is","ice","isl") ;
-        new Iso639("Ido","io","ido","ido") ;
-        new Iso639("Igbo","ig","ibo","ibo") ;
-        new Iso639("Ijo languages",null,"ijo","ijo") ;
-        new Iso639("Iloko",null,"ilo","ilo") ;
-        new Iso639("Imperial Aramaic (700-300 BCE)",null,"arc","arc") ;
-        new Iso639("Inari Sami",null,"smn","smn") ;
-        new Iso639("Indic languages",null,"inc","inc") ;
-        new Iso639("Indo-European languages",null,"ine","ine") ;
-        new Iso639("Indonesian","id","ind","ind") ;
-        new Iso639("Ingush",null,"inh","inh") ;
-        new Iso639("Interlingua (International Auxiliary Language Association)","ia","ina","ina") ;
-        new Iso639("Interlingue","ie","ile","ile") ;
-        new Iso639("Inuktitut","iu","iku","iku") ;
-        new Iso639("Inupiaq","ik","ipk","ipk") ;
-        new Iso639("Iranian languages",null,"ira","ira") ;
-        new Iso639("Irish","ga","gle","gle") ;
-        new Iso639("Irish, Middle (900-1200)",null,"mga","mga") ;
-        new Iso639("Irish, Old (to 900)",null,"sga","sga") ;
-        new Iso639("Iroquoian languages",null,"iro","iro") ;
-        new Iso639("Italian","it","ita","ita") ;
-
-        new Iso639("Japanese","ja","jpn","jpn") ;
-        new Iso639("Javanese","jv","jav","jav") ;
-        new Iso639("Jingpho",null,"kac","kac") ;
-        new Iso639("Judeo-Arabic",null,"jrb","jrb") ;
-        new Iso639("Judeo-Persian",null,"jpr","jpr") ;
-
-        new Iso639("Kabardian",null,"kbd","kbd") ;
-        new Iso639("Kabyle",null,"kab","kab") ;
-        new Iso639("Kalmyk",null,"xal","xal") ;
-        new Iso639("Kamba",null,"kam","kam") ;
-        new Iso639("Kannada","kn","kan","kan") ;
-        new Iso639("Kanuri","kr","kau","kau") ;
-        new Iso639("Kapampangan",null,"pam","pam") ;
-        new Iso639("Kara-Kalpak",null,"kaa","kaa") ;
-        new Iso639("Karachay-Balkar",null,"krc","krc") ;
-        new Iso639("Karelian",null,"krl","krl") ;
-        new Iso639("Karen languages",null,"kar","kar") ;
-        new Iso639("Kashmiri","ks","kas","kas") ;
-        new Iso639("Kashubian",null,"csb","csb") ;
-        new Iso639("Kawi",null,"kaw","kaw") ;
-        new Iso639("Kazakh","kk","kaz","kaz") ;
-        new Iso639("Khasi",null,"kha","kha") ;
-        new Iso639("Khoisan languages",null,"khi","khi") ;
-        new Iso639("Khotanese",null,"kho","kho") ;
-        new Iso639("Kimbundu",null,"kmb","kmb") ;
-        new Iso639("Kinyarwanda","rw","kin","kin") ;
-        new Iso639("Kirghiz","ky","kir","kir") ;
-        new Iso639("Klingon",null,"tlh","tlh") ;
-        new Iso639("Komi","kv","kom","kom") ;
-        new Iso639("Kongo","kg","kon","kon") ;
-        new Iso639("Konkani",null,"kok","kok") ;
-        new Iso639("Korean","ko","kor","kor") ;
-        new Iso639("Kosraean",null,"kos","kos") ;
-        new Iso639("Kpelle",null,"kpe","kpe") ;
-        new Iso639("Kru languages",null,"kro","kro") ;
-        new Iso639("Kuanyama","kj","kua","kua") ;
-        new Iso639("Kumyk",null,"kum","kum") ;
-        new Iso639("Kurdish","ku","kur","kur") ;
-        new Iso639("Kurukh",null,"kru","kru") ;
-        new Iso639("Kutenai",null,"kut","kut") ;
-
-        new Iso639("Ladino",null,"lad","lad") ;
-        new Iso639("Lahnda",null,"lah","lah") ;
-        new Iso639("Lamba",null,"lam","lam") ;
-        new Iso639("Land Dayak languages",null,"day","day") ;
-        new Iso639("Lao","lo","lao","lao") ;
-        new Iso639("Latin","la","lat","lat") ;
-        new Iso639("Latvian","lv","lav","lav") ;
-        new Iso639("Letzeburgesch","lb","ltz","ltz") ;
-        new Iso639("Lezghian",null,"lez","lez") ;
-        new Iso639("Limburgan","li","lim","lim") ;
-        new Iso639("Lingala","ln","lin","lin") ;
-        new Iso639("Lithuanian","lt","lit","lit") ;
-        new Iso639("Lojban",null,"jbo","jbo") ;
-        new Iso639("Lower Sorbian",null,"dsb","dsb") ;
-        new Iso639("Lozi",null,"loz","loz") ;
-        new Iso639("Luba-Katanga","lu","lub","lub") ;
-        new Iso639("Luba-Lulua",null,"lua","lua") ;
-        new Iso639("Luiseno",null,"lui","lui") ;
-        new Iso639("Lule Sami",null,"smj","smj") ;
-        new Iso639("Lunda",null,"lun","lun") ;
-        new Iso639("Luo (Kenya and Tanzania)",null,"luo","luo") ;
-        new Iso639("Lushai",null,"lus","lus") ;
-
-        new Iso639("Macedonian","mk","mac","mkd") ;
-        new Iso639("Madurese",null,"mad","mad") ;
-        new Iso639("Magahi",null,"mag","mag") ;
-        new Iso639("Maithili",null,"mai","mai") ;
-        new Iso639("Makasar",null,"mak","mak") ;
-        new Iso639("Malagasy","mg","mlg","mlg") ;
-        new Iso639("Malay","ms","may","msa") ;
-        new Iso639("Malayalam","ml","mal","mal") ;
-        new Iso639("Maltese","mt","mlt","mlt") ;
-        new Iso639("Manchu",null,"mnc","mnc") ;
-        new Iso639("Mandar",null,"mdr","mdr") ;
-        new Iso639("Mandingo",null,"man","man") ;
-        new Iso639("Manipuri",null,"mni","mni") ;
-        new Iso639("Manobo languages",null,"mno","mno") ;
-        new Iso639("Manx","gv","glv","glv") ;
-        new Iso639("Maori","mi","mao","mri") ;
-        new Iso639("Mapuche",null,"arn","arn") ;
-        new Iso639("Marathi","mr","mar","mar") ;
-        new Iso639("Mari",null,"chm","chm") ;
-        new Iso639("Marshallese","mh","mah","mah") ;
-        new Iso639("Marwari",null,"mwr","mwr") ;
-        new Iso639("Masai",null,"mas","mas") ;
-        new Iso639("Mayan languages",null,"myn","myn") ;
-        new Iso639("Mende",null,"men","men") ;
-        new Iso639("Mi'kmaq",null,"mic","mic") ;
-        new Iso639("Minangkabau",null,"min","min") ;
-        new Iso639("Mirandese",null,"mwl","mwl") ;
-        new Iso639("Mohawk",null,"moh","moh") ;
-        new Iso639("Moksha",null,"mdf","mdf") ;
-        new Iso639("Moldavian","ro","rum","ron") ;
-        new Iso639("Mon-Khmer languages",null,"mkh","mkh") ;
-        new Iso639("Mongo",null,"lol","lol") ;
-        new Iso639("Mongolian","mn","mon","mon") ;
-        new Iso639("Mossi",null,"mos","mos") ;
-        new Iso639("Multiple languages",null,"mul","mul") ;
-        new Iso639("Munda languages",null,"mun","mun") ;
-
-        new Iso639("N'Ko",null,"nqo","nqo") ;
-        new Iso639("Nahuatl languages",null,"nah","nah") ;
-        new Iso639("Nauru","na","nau","nau") ;
-        new Iso639("Navaho","nv","nav","nav") ;
-        new Iso639("Ndebele, North","nd","nde","nde") ;
-        new Iso639("Ndebele, South","nr","nbl","nbl") ;
-        new Iso639("Ndonga","ng","ndo","ndo") ;
-        new Iso639("Neapolitan",null,"nap","nap") ;
-        new Iso639("Nepal Bhasa",null,"new","new") ;
-        new Iso639("Nepali","ne","nep","nep") ;
-        new Iso639("Nias",null,"nia","nia") ;
-        new Iso639("Niger-Kordofanian languages",null,"nic","nic") ;
-        new Iso639("Nilo-Saharan languages",null,"ssa","ssa") ;
-        new Iso639("Niuean",null,"niu","niu") ;
-        new Iso639("No linguistic content",null,"zxx","zxx") ;
-        new Iso639("Nogai",null,"nog","nog") ;
-        new Iso639("Norse, Old",null,"non","non") ;
-        new Iso639("North American Indian languages",null,"nai","nai") ;
-        new Iso639("Northern Frisian",null,"frr","frr") ;
-        new Iso639("Northern Sami","se","sme","sme") ;
-        new Iso639("Northern Sotho",null,"nso","nso") ;
-        new Iso639("Norwegian","no","nor","nor") ;
-        new Iso639("Norwegian Nynorsk","nn","nno","nno") ;
-        new Iso639("Nubian languages",null,"nub","nub") ;
-        new Iso639("Nuosu","ii","iii","iii") ;
-        new Iso639("Nyamwezi",null,"nym","nym") ;
-        new Iso639("Nyankole",null,"nyn","nyn") ;
-        new Iso639("Nyoro",null,"nyo","nyo") ;
-        new Iso639("Nzima",null,"nzi","nzi") ;
-
-        new Iso639("Occitan (post 1500)","oc","oci","oci") ;
-        new Iso639("Occitan, Old (to 1500)",null,"pro","pro") ;
-        new Iso639("Ojibwa","oj","oji","oji") ;
-        new Iso639("Oriya","or","ori","ori") ;
-        new Iso639("Oromo","om","orm","orm") ;
-        new Iso639("Osage",null,"osa","osa") ;
-        new Iso639("Ossetian","os","oss","oss") ;
-        new Iso639("Otomian languages",null,"oto","oto") ;
-
-        new Iso639("Pahlavi",null,"pal","pal") ;
-        new Iso639("Palauan",null,"pau","pau") ;
-        new Iso639("Pali","pi","pli","pli") ;
-        new Iso639("Pangasinan",null,"pag","pag") ;
-        new Iso639("Panjabi","pa","pan","pan") ;
-        new Iso639("Papiamento",null,"pap","pap") ;
-        new Iso639("Papuan languages",null,"paa","paa") ;
-        new Iso639("Pashto","ps","pus","pus") ;
-        new Iso639("Persian","fa","per","fas") ;
-        new Iso639("Persian, Old (ca.600-400 B.C.)",null,"peo","peo") ;
-        new Iso639("Philippine languages",null,"phi","phi") ;
-        new Iso639("Phoenician",null,"phn","phn") ;
-        new Iso639("Pohnpeian",null,"pon","pon") ;
-        new Iso639("Polish","pl","pol","pol") ;
-        new Iso639("Portuguese","pt","por","por") ;
-        new Iso639("Prakrit languages",null,"pra","pra") ;
-
-        new Iso639("Quechua","qu","que","que") ;
-
-        new Iso639("Rajasthani",null,"raj","raj") ;
-        new Iso639("Rapanui",null,"rap","rap") ;
-        new Iso639("Reserved for local use",null,"qaa-qtz","qaa-qtz") ;
-        new Iso639("Romance languages",null,"roa","roa") ;
-        new Iso639("Romansh","rm","roh","roh") ;
-        new Iso639("Romany",null,"rom","rom") ;
-        new Iso639("Rundi","rn","run","run") ;
-        new Iso639("Russian","ru","rus","rus") ;
-
-        new Iso639("Salishan languages",null,"sal","sal") ;
-        new Iso639("Samaritan Aramaic",null,"sam","sam") ;
-        new Iso639("Sami languages",null,"smi","smi") ;
-        new Iso639("Samoan","sm","smo","smo") ;
-        new Iso639("Sandawe",null,"sad","sad") ;
-        new Iso639("Sango","sg","sag","sag") ;
-        new Iso639("Sanskrit","sa","san","san") ;
-        new Iso639("Santali",null,"sat","sat") ;
-        new Iso639("Sardinian","sc","srd","srd") ;
-        new Iso639("Sasak",null,"sas","sas") ;
-        new Iso639("Scots",null,"sco","sco") ;
-        new Iso639("Selkup",null,"sel","sel") ;
-        new Iso639("Semitic languages",null,"sem","sem") ;
-        new Iso639("Serbian","sr","srp","srp") ;
-        new Iso639("Serer",null,"srr","srr") ;
-        new Iso639("Shan",null,"shn","shn") ;
-        new Iso639("Shona","sn","sna","sna") ;
-        new Iso639("Sicilian",null,"scn","scn") ;
-        new Iso639("Sidamo",null,"sid","sid") ;
-        new Iso639("Sign Languages",null,"sgn","sgn") ;
-        new Iso639("Siksika",null,"bla","bla") ;
-        new Iso639("Sindhi","sd","snd","snd") ;
-        new Iso639("Sinhala","si","sin","sin") ;
-        new Iso639("Sino-Tibetan languages",null,"sit","sit") ;
-        new Iso639("Siouan languages",null,"sio","sio") ;
-        new Iso639("Skolt Sami",null,"sms","sms") ;
-        new Iso639("Slave (Athapascan)",null,"den","den") ;
-        new Iso639("Slavic languages",null,"sla","sla") ;
-        new Iso639("Slovak","sk","slo","slk") ;
-        new Iso639("Slovenian","sl","slv","slv") ;
-        new Iso639("Sogdian",null,"sog","sog") ;
-        new Iso639("Somali","so","som","som") ;
-        new Iso639("Songhai languages",null,"son","son") ;
-        new Iso639("Soninke",null,"snk","snk") ;
-        new Iso639("Sorbian languages",null,"wen","wen") ;
-        new Iso639("Sotho, Southern","st","sot","sot") ;
-        new Iso639("South American Indian languages",null,"sai","sai") ;
-        new Iso639("Southern Altai",null,"alt","alt") ;
-        new Iso639("Southern Sami",null,"sma","sma") ;
-        new Iso639("Sranan Tongo",null,"srn","srn") ;
-        new Iso639("Sukuma",null,"suk","suk") ;
-        new Iso639("Sumerian",null,"sux","sux") ;
-        new Iso639("Sundanese","su","sun","sun") ;
-        new Iso639("Susu",null,"sus","sus") ;
-        new Iso639("Swahili","sw","swa","swa") ;
-        new Iso639("Swati","ss","ssw","ssw") ;
-        new Iso639("Swedish","sv","swe","swe") ;
-        new Iso639("Syriac",null,"syr","syr") ;
-
-        new Iso639("Tagalog","tl","tgl","tgl") ;
-        new Iso639("Tahitian","ty","tah","tah") ;
-        new Iso639("Tai languages",null,"tai","tai") ;
-        new Iso639("Tajik","tg","tgk","tgk") ;
-        new Iso639("Tamashek",null,"tmh","tmh") ;
-        new Iso639("Tamil","ta","tam","tam") ;
-        new Iso639("Tatar","tt","tat","tat") ;
-        new Iso639("Telugu","te","tel","tel") ;
-        new Iso639("Tereno",null,"ter","ter") ;
-        new Iso639("Tetum",null,"tet","tet") ;
-        new Iso639("Thai","th","tha","tha") ;
-        new Iso639("Tibetan","bo","tib","bod") ;
-        new Iso639("Tigre",null,"tig","tig") ;
-        new Iso639("Tigrinya","ti","tir","tir") ;
-        new Iso639("Timne",null,"tem","tem") ;
-        new Iso639("Tiv",null,"tiv","tiv") ;
-        new Iso639("Tlingit",null,"tli","tli") ;
-        new Iso639("Tok Pisin",null,"tpi","tpi") ;
-        new Iso639("Tokelau",null,"tkl","tkl") ;
-        new Iso639("Tonga (Nyasa)",null,"tog","tog") ;
-        new Iso639("Tonga (Tonga Islands)","to","ton","ton") ;
-        new Iso639("Tsimshian",null,"tsi","tsi") ;
-        new Iso639("Tsonga","ts","tso","tso") ;
-        new Iso639("Tswana","tn","tsn","tsn") ;
-        new Iso639("Tumbuka",null,"tum","tum") ;
-        new Iso639("Tupi languages",null,"tup","tup") ;
-        new Iso639("Turkish","tr","tur","tur") ;
-        new Iso639("Turkish, Ottoman (1500-1928)",null,"ota","ota") ;
-        new Iso639("Turkmen","tk","tuk","tuk") ;
-        new Iso639("Tuvalu",null,"tvl","tvl") ;
-        new Iso639("Tuvinian",null,"tyv","tyv") ;
-        new Iso639("Twi","tw","twi","twi") ;
-
-        new Iso639("Udmurt",null,"udm","udm") ;
-        new Iso639("Ugaritic",null,"uga","uga") ;
-        new Iso639("Uighur","ug","uig","uig") ;
-        new Iso639("Ukrainian","uk","ukr","ukr") ;
-        new Iso639("Umbundu",null,"umb","umb") ;
-        new Iso639("Uncoded languages",null,"mis","mis") ;
-        new Iso639("Undetermined",null,"und","und",LT_UNDETERMINED) ;
-        new Iso639("Upper Sorbian",null,"hsb","hsb") ;
-        new Iso639("Urdu","ur","urd","urd") ;
-        new Iso639("Uzbek","uz","uzb","uzb") ;
-
-        new Iso639("Vai",null,"vai","vai") ;
-        new Iso639("Venda","ve","ven","ven") ;
-        new Iso639("Vietnamese","vi","vie","vie") ;
-        new Iso639("Volapük","vo","vol","vol") ;
-        new Iso639("Votic",null,"vot","vot") ;
-
-        new Iso639("Wakashan languages",null,"wak","wak") ;
-        new Iso639("Walloon","wa","wln","wln") ;
-        new Iso639("Waray",null,"war","war") ;
-        new Iso639("Washo",null,"was","was") ;
-        new Iso639("Welsh","cy","wel","cym") ;
-        new Iso639("Western Frisian","fy","fry","fry") ;
-        new Iso639("Wolaitta",null,"wal","wal") ;
-        new Iso639("Wolof","wo","wol","wol") ;
-
-        new Iso639("Xhosa","xh","xho","xho") ;
-
-        new Iso639("Yakut",null,"sah","sah") ;
-        new Iso639("Yao",null,"yao","yao") ;
-        new Iso639("Yapese",null,"yap","yap") ;
-        new Iso639("Yiddish","yi","yid","yid") ;
-        new Iso639("Yoruba","yo","yor","yor") ;
-        new Iso639("Yupik languages",null,"ypk","ypk") ;
-
-        new Iso639("Zande languages",null,"znd","znd") ;
-        new Iso639("Zapotec",null,"zap","zap") ;
-        new Iso639("Zenaga",null,"zen","zen") ;
-        new Iso639("Zulu","zu","zul","zul") ;
-        new Iso639("Zuni",null,"zun","zun") ;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/b9a172f9/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/lang/LanguageTag.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/lang/LanguageTag.java b/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/lang/LanguageTag.java
deleted file mode 100644
index d139bde..0000000
--- a/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/lang/LanguageTag.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-/*
- * LanguageTag.java
- *
- * Created on July 24, 2001, 11:45 PM
- */
-
-package com.hp.hpl.jena.rdfxml.xmlinput.lang;
-
-import java.util.Locale ;
-import java.util.Vector;
-
-/**
- * RFC 3066, "Tags for the Identification of Languages".
- */
-public class LanguageTag implements LanguageTagCodes {
-    String tags[];
-    /** Creates new RFC3066 LanguageTag.
-     * @param tag The tag to parse and analyse.
-     * @throws LanguageTagSyntaxException If the syntactic rules of RFC3066 section 2.1 are
-     * broken.
- */
-    public LanguageTag(String tag) throws LanguageTagSyntaxException {
-       String lc = tag.toLowerCase(Locale.ENGLISH);
-       Vector<String> v = new Vector<>();
-       int subT;
-       while (true) {
-           subT = lc.indexOf('-');
-           if ( subT != -1) {
-               v.add(lc.substring(0,subT));
-               lc = lc.substring(subT+1);
-           } else 
-               break;
-       }
-       v.add(lc);
-       tags = new String[v.size()];
-       v.copyInto(tags);
-       int lg = tags[0].length();
-       if ( lg == 0 || lg > 8 ) {
-           throw new LanguageTagSyntaxException("Primary subtag must be between 1 and 8 alpha characters: " + tag);
-       }
-       for (int j=0;j<lg;j++) {
-           int ch = tags[0].charAt(j);
-           if ( ! ( 'a' <= ch && ch <= 'z' ) )
-               throw new LanguageTagSyntaxException("Primary subtag must be between 1 and 8 alpha characters: " + tag);
-       }    
-       for (int i=1;i<tags.length;i++) {
-           lg = tags[i].length();
-           if ( lg == 0 || lg > 8 ) {
-               throw new LanguageTagSyntaxException("Subtag " + (i+1) + " must be between 1 and 8 alphanumeric characters: " + tag);
-           }
-           for (int j=0;j<lg;j++) {
-               int ch = tags[i].charAt(j);
-               if ( ! (   ( 'a' <= ch && ch <= 'z' ) 
-                      ||  ( '0' <= ch && ch <= '9' )
-                      )
-                   )
-                   throw new LanguageTagSyntaxException("Subtag " + (i+1) + " must be between 1 and 8 alphanumeric characters: " + tag);
-           }    
-       }
-    }
-    
- 
-    
-    // Primary tag.
-    
-    // Second tag.
-    // Additional tags (either second or third).
-    // Special cases.
-    // Overall properties
-    /** The properties of this LanguageTag, expressed as a bitwise or of 
-     * fields from {@link LanguageTagCodes}.
-     * If the tag is illegal only <CODE>LT_ILLEGAL</CODE> is reported.
-     * Examples include:
-     * <dl>
-     * <dt><CODE>LT_ISO639</CODE></dt><dd>en <I>English.</I></dd>
-     * <dt><CODE>LT_ISO639|LT_ISO3166</CODE></dt><dd>en-GB <I>British English</I></dd> 
-     * <dt><CODE>LT_ILLEGAL</CODE></dt><dd>en-ENGLAND <I>No such country.</I> Never returned in combination with other values.</dd>  
-     * <dt><CODE>LT_PRIVATE_USE</CODE></dt><dd>x-en-ENGLAND <I>Private tag with private semantics.</I></dd>
-     * <dt><CODE>LT_IANA|LT_EXTRA</CODE></dt><dd>i-klingon-trekkie <I>Klingon + "trekkie"</I></dd>
-     * <dt><CODE>LT_IANA_DEPRECATED</CODE></dt><dd>
-     * <dt><CODE>LT_MULTIPLE|LT_ISO3166|LT_EXTRA</CODE></dt><dd>mul-CH-dialects</dd>
-     * <dt><CODE>LT_ISO639|LT_ISO3166|LT_IANA|LT_EXTRA</CODE></dt><dd>sgn-US-MA <I>Martha's Vineyard Sign
-     * Language</I></dd>
-     * </dl>
-     *
-     * @return A bitwise or of all LT_xxx values that apply.
- */
-    public int tagType() {
-        IanaLanguageTag iana = IanaLanguageTag.find(this);
-        Iso639 lang = Iso639.find(tags[0]);
-        int rslt = iana==null?0:iana.classification;
-        if ( iana != null ) {
-            if ( iana.tags.length < tags.length ) {
-                rslt |= LT_EXTRA;
-            }
-        }
-        switch ( tags[0].length() ) {
-            case 1:
-                switch (tags[0].charAt(0)) {
-                    case 'x':
-                        return LT_PRIVATE_USE; // reserved for private use.
-                    case 'i':
-                        return iana!=null?rslt:LT_ILLEGAL;
-                    default:
-                            return LT_ILLEGAL;
-                }
-            case 2:
-                if (lang==null) {
-                    return LT_ILLEGAL;
-                }
-                rslt |= lang.classification;   // all special case tags etc.
-                break;
-            case 3:
-                if (lang==null) {
-                    return LT_ILLEGAL;
-                }
-                if ( lang.twoCharCode != null ) {
-                    return LT_ILLEGAL; // Section 2.3 Para 2
-                }
-                if ( !lang.terminologyCode.equals(tags[0]) ) {
-                    return LT_ILLEGAL;
-                    // Section 2.3 Para 3
-                }
-                rslt |= lang.classification;   // all special case tags etc.
-                // Section 2.3 para 4,5,6 in a separate function.
-                break;
-                default:
-                    return LT_ILLEGAL;
-        }
-        if ( tags.length ==1 )
-            return rslt;
-        switch ( tags[1].length() ) {
-            case 1:
-                return LT_ILLEGAL;
-            case 2:
-                if ( Iso3166.find(tags[1])==null )
-                    return LT_ILLEGAL;
-                break;
-            default:
-                if ( iana == null )
-                     rslt |= LT_EXTRA;
-        }
-        if ( tags.length > 2  && iana == null )
-                     rslt |= LT_EXTRA;
-        return rslt;
-    }
-   /** An error message describing the reason the tag
-    * is illegal.
-    * @return null if legal, or an error message if not.
- */
-    public String errorMessage() {
-        switch ( tags[0].length() ) {
-            case 1:
-                switch (tags[0].charAt(0)) {
-                    case 'x':
-                        return null; // reserved for private use.
-                    case 'i':
-                        if ( IanaLanguageTag.find(this)!=null )
-                            return null;
-                        return toString() + " not found in IANA language registry.";
-                    default:
-                            return "Only 'x' and 'i' single character primary language subtags are defined in RFC3066.";
-                }
-            case 2:
-                if (Iso639.find(tags[0])==null) {
-                    return 
-                    
-                    "ISO-639 does not define language: '"+tags[0]+"'.";
-                }
-                break;
-            case 3:
-                Iso639 lang = Iso639.find(tags[0]);
-                if (lang==null) {
-                    return 
-                    "ISO-639 does not define language: '"+tags[0]+"'.";
-                }
-                if ( lang.twoCharCode != null ) {
-                    return 
-                    "RFC 3066 section 2.3 mandates the use of '" + lang.twoCharCode + "' instead of '" + tags[0]+"'.";
-                     // Section 2.3 Para 2
-                }
-                if ( !lang.terminologyCode.equals(tags[0]) ) {
-                    return 
-                    "RFC 3066 section 2.3 mandates the use of '" + lang.terminologyCode + "' instead of '" + tags[0]+"'.";
-                     // Section 2.3 Para 3
-                }
-                // Section 2.3 para 4,5,6 in a separate function.
-                break;
-                default:
-                    return "No primary language subtags of length greater than 3 are currently defined.";
-        }
-        if ( tags.length ==1 )
-            return null;
-        switch ( tags[1].length() ) {
-            case 1:
-                return "Second language subtags of length 1 are prohibited by RFC3066.";
-            case 2:
-                if ( Iso3166.find(tags[1])==null )
-                    return "Country code, '"+tags[1]+ "', not found in ISO 3166.";
-                break;
-        }
-        return null;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/b9a172f9/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/lang/LanguageTagCodes.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/lang/LanguageTagCodes.java b/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/lang/LanguageTagCodes.java
deleted file mode 100644
index 699a816..0000000
--- a/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/lang/LanguageTagCodes.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-/*
- * LanguageTagCodes.java
- *
- * Created on July 25, 2001, 10:09 AM
- */
-
-package com.hp.hpl.jena.rdfxml.xmlinput.lang;
-
-/** Informational values about language codes.
- * Values to be OR-ed together.
- */
-public interface LanguageTagCodes {
-
-/** The special tag <CODE>i-default</CODE>.
- */    
-    public static final int LT_DEFAULT = 0x0100;
-    
-/** A tag with non-standard extra subtags.
- * Set for language tags with
- * additional subtags over their
- * IANA registration, or a third subtag
- * for unregistered tags of the form
- * ISO639Code-ISO3166Code.
- */    
-    public static final int LT_EXTRA = 0x0080;
-    
-/** A tag in the IANA registry.
- */    
-    public static final int LT_IANA = 0x1024;
-    
-/** An illegal tag.
- * Some rule of RFC3066 failed, or
- * the tag is not in IANA, or ISO639 or ISO3166.
- */    
-    public static final int LT_ILLEGAL = 0x8000;
-    
-/** The second subtag is from ISO3166 and identifies
- * a country.
- */    
-    public static final int LT_ISO3166 = 0x0010;
-    
-/** The first subtag is from ISO639-1 or ISO639-2
- * and identifies a language,
- */    
-    public static final int LT_ISO639 = 0x0001;
-    
-/** A special ISO639-2 local use language tag.
- * A three letter code 'q[a-t][a-z]'.
- */    
-    public static final int LT_LOCAL_USE = 0x0800;
-    
-/** The special ISO639-2 language tag <CODE>mul</CODE>.
- * This indicates multiple languages.
- */    
-    public static final int LT_MULTIPLE = 0x0400;
-    
-/** An RFC3066 private use tag.
- * A language tag of the form <CODE>x-????</CODE>.
- */    
-    public static final int LT_PRIVATE_USE = 0x0002;
-    
-/** The undetermined ISO639-2 lanaguge <CODE>und</CODE>.
- */    
-    public static final int LT_UNDETERMINED = 0x0200;
-    
-/** A language tag that is deprecated in the IANA registry.
- */    
-    public static final int LT_IANA_DEPRECATED = 0x2000;
-    
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/b9a172f9/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/lang/LanguageTagSyntaxException.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/lang/LanguageTagSyntaxException.java b/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/lang/LanguageTagSyntaxException.java
deleted file mode 100644
index 8a05557..0000000
--- a/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/lang/LanguageTagSyntaxException.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-/*
- * LanguageTagSyntaxException.java
- *
- * Created on July 25, 2001, 9:32 AM
- */
-
-package com.hp.hpl.jena.rdfxml.xmlinput.lang;
-
-/**
- * A LanguageTag did not conform to RFC3066.
-  This exception is for the
- * syntactic rules of RFC3066 section 2.1.
- */
-public class LanguageTagSyntaxException extends java.lang.Exception {
-
-
-    /**
-     * 
-     */
-    private static final long serialVersionUID = 5425207434895448094L;
-
-    /**
- * Constructs an <code>LanguageTagSyntaxException</code> with the specified detail message.
-     * @param msg the detail message.
-     */
-    LanguageTagSyntaxException(String msg) {
-        super(msg);
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/b9a172f9/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/lang/package.html
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/lang/package.html b/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/lang/package.html
deleted file mode 100644
index b9b6599..0000000
--- a/jena-core/src/main/java/com/hp/hpl/jena/rdfxml/xmlinput/lang/package.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one
-    or more contributor license agreements.  See the NOTICE file
-    distributed with this work for additional information
-    regarding copyright ownership.  The ASF licenses this file
-    to you 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.
--->
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-</head>
- <body>
-<p>Language support for RDF.
-</p>
-</body>
-</html>


Mime
View raw message