abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r521094 [3/4] - in /incubator/abdera/java/trunk: build/ client/src/test/java/org/apache/abdera/test/client/app/ core/src/main/java/org/apache/abdera/model/ core/src/main/java/org/apache/abdera/parser/ core/src/main/java/org/apache/abdera/ut...
Date Thu, 22 Mar 2007 03:00:33 GMT
Added: incubator/abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/iri/Punycode.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/iri/Punycode.java?view=auto&rev=521094
==============================================================================
--- incubator/abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/iri/Punycode.java (added)
+++ incubator/abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/iri/Punycode.java Wed Mar 21 20:00:19 2007
@@ -0,0 +1,210 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  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.  For additional information regarding
+* copyright in this work, please see the NOTICE file in the top level
+* directory of this distribution.
+*/
+package org.apache.abdera.i18n.iri;
+
+import java.io.IOException;
+
+import org.apache.abdera.i18n.io.CharUtils;
+import org.apache.abdera.i18n.io.CodepointIterator;
+
+
+/**
+ * Implementation of the Punycode encoding scheme used by IDNA
+ */
+public final class Punycode {
+
+  static final int base = 0x24;             //  36
+  static final int tmin = 0x01;             //   1
+  static final int tmax = 0x1A;             //  26
+  static final int skew = 0x26;             //  38
+  static final int damp = 0x02BC;           // 700
+  static final int initial_bias = 0x48;     //  72
+  static final int initial_n = 0x80;        //0x80
+  static final int delimiter = 0x2D;        //0x2D
+
+  Punycode() {}
+
+  private static boolean basic(int cp) {
+    return cp < 0x80; 
+  }
+
+  private static boolean delim(int cp) {
+    return cp == delimiter;
+  }
+
+  private static boolean flagged(int bcp) {
+    return (bcp - 65) < 26;
+  }
+  
+  private static int decode_digit(int cp) {
+    return (cp - 48 < 10) ? 
+             cp - 22 : 
+             (cp - 65 < 26) ? 
+               cp - 65 :
+               (cp - 97 < 26) ? 
+                 cp - 97 :  
+                 base;
+  }
+
+  private static int t(boolean c) {
+    return (c)?1:0;
+  }
+  
+  private static int encode_digit(int d, boolean upper) {
+    return (d + 22 + 75 * t(d<26)) - (t(upper) << 5);
+  }
+
+  private static int adapt(int delta, int numpoints, boolean firsttime) {
+    int k;
+    delta = (firsttime) ? delta / damp : delta >> 1;
+    delta += delta / numpoints;
+    for (k = 0;  delta > ((base - tmin) * tmax) / 2;  k += base) {
+      delta /= base - tmin;
+    }
+    return k + (base - tmin + 1) * delta / (delta + skew);
+  }
+
+  public static StringBuffer encode(
+    char[] chars,
+    boolean[] case_flags) 
+      throws IOException {
+    StringBuffer buf = new StringBuffer();
+    CodepointIterator ci = CodepointIterator.forCharArray(chars);
+    int n, delta, h, b, bias, m, q, k, t;
+    n = initial_n;
+    delta = 0;
+    bias = initial_bias;
+    int i = -1;
+    while (ci.hasNext()) {
+      i = ci.next();
+      if (basic(i)) {
+        if (case_flags != null) {
+        } else {
+          buf.append((char)i);
+        }
+      }
+    }
+    h = b = buf.length();
+    if (b > 0) buf.append((char)delimiter);
+    while (h < chars.length) {
+      ci.position(0);
+      i = -1;
+      m = Integer.MAX_VALUE;
+      while(ci.hasNext()) {
+        i = ci.next();
+        if (i >= n && i < m) m = i;
+      }
+      if (m - n > (Integer.MAX_VALUE - delta) / (h + 1)) 
+        throw new IOException("Overflow");
+      delta += (m-n) * (h+1);
+      n = m;
+      ci.position(0);
+      i = -1;
+      while (ci.hasNext()) {
+        i = ci.next();
+        if (i < n) {
+          if (++delta == 0) throw new IOException("Overflow");
+        }
+        if (i == n) {
+          for (q = delta, k = base;; k+= base) {
+            t = k <= bias ? tmin : k >= bias + tmax ? tmax : k - bias;
+            if (q < t) break;
+            buf.append((char)encode_digit(t+(q-t)%(base-t),false));
+            q = (q-t) / (base-t);
+          }
+          buf.append((char)encode_digit(
+            q, (case_flags!=null)?case_flags[ci.position()-1]:false));
+          bias = adapt(delta,h+1,h==b);
+          delta=0;
+          ++h;
+        }
+      }
+      ++delta; ++n;
+    }
+    return buf;
+  }
+
+  public static String encode(String s) {
+    try {
+      if (s == null) return null;
+      return encode(s.toCharArray(),null).toString();
+    } catch (Exception e) {
+      e.printStackTrace();
+      return null;
+    }
+  }
+  
+  public static String decode(String s) {
+    try {
+      if (s == null) return null;
+      return decode(s.toCharArray(),null).toString();
+    } catch (Exception e) {
+      e.printStackTrace();
+      return null;
+    }
+  }
+  
+  public static StringBuffer decode(
+    char[] chars, 
+    boolean[] case_flags) 
+      throws IOException {
+    StringBuffer buf = new StringBuffer();
+    int n, out, i, bias, b, j, in, oldi, w, k, digit, t;
+    n = initial_n;
+    out = i = 0;
+    bias = initial_bias;
+    for (b = j = 0;  j < chars.length; ++j)
+      if (delim(chars[j])) b = j;
+    for (j = 0; j < b; ++j) {
+      if (case_flags != null) case_flags[out] = flagged(chars[j]);
+      if (!basic(chars[j])) throw new IOException("Bad Input");
+      buf.append((char)chars[j]);
+    }
+    out = buf.length();
+    for (in = (b > 0) ? b + 1 : 0; in < chars.length; ++out) {
+      for (oldi = i, w = 1, k = base; ; k += base) {
+        if (in > chars.length) throw new IOException("Bad input");
+        digit = decode_digit(chars[in++]);
+        if (digit >= base) throw new IOException("Bad input");
+        if (digit > (Integer.MAX_VALUE - i) / w) throw new IOException("Overflow");
+        i += digit * w;
+        t = (k <= bias) ? 
+          tmin : 
+          (k >= bias + tmax) ? 
+            tmax : 
+            k - bias;
+        if (digit < t) break;
+        if (w > Integer.MAX_VALUE / (base - t)) throw new IOException("Overflow");
+        w *= (base - t);
+      }
+      bias = adapt(i - oldi, out + 1, oldi == 0);
+      if (i / (out + 1) > Integer.MAX_VALUE - n) throw new IOException("Overflow");
+      n += i / (out + 1);
+      i %= (out + 1);
+      if (case_flags != null) {
+        System.arraycopy(    // not sure if this is right
+          case_flags, i, 
+          case_flags, i+CharUtils.size(n), 
+          case_flags.length-i);
+      }
+      CharUtils.insert(buf, i++, n);
+    }
+    return buf;
+  }
+  
+}

Added: incubator/abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/iri/Scheme.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/iri/Scheme.java?view=auto&rev=521094
==============================================================================
--- incubator/abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/iri/Scheme.java (added)
+++ incubator/abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/iri/Scheme.java Wed Mar 21 20:00:19 2007
@@ -0,0 +1,35 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  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.  For additional information regarding
+* copyright in this work, please see the NOTICE file in the top level
+* directory of this distribution.
+*/
+package org.apache.abdera.i18n.iri;
+
+import org.apache.abdera.i18n.iri.IRI;
+
+/**
+ * Interface implemented by custom IRI scheme parsers
+ */
+public interface Scheme {
+
+  String getName();
+  
+  boolean equivalent(IRI iri1, IRI iri2);
+  
+  IRI normalize(IRI iri); 
+  
+  String normalizePath(String path);
+  
+}

Added: incubator/abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/iri/SchemeRegistry.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/iri/SchemeRegistry.java?view=auto&rev=521094
==============================================================================
--- incubator/abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/iri/SchemeRegistry.java (added)
+++ incubator/abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/iri/SchemeRegistry.java Wed Mar 21 20:00:19 2007
@@ -0,0 +1,83 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  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.  For additional information regarding
+* copyright in this work, please see the NOTICE file in the top level
+* directory of this distribution.
+*/
+package org.apache.abdera.i18n.iri;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.abdera.i18n.iri.DefaultScheme;
+import org.apache.abdera.i18n.iri.HttpScheme;
+import org.apache.abdera.i18n.iri.HttpsScheme;
+import org.apache.abdera.i18n.iri.Scheme;
+import org.apache.abdera.i18n.iri.SchemeRegistry;
+
+/**
+ * Static registry of custom IRI schemes.
+ */
+public final class SchemeRegistry {
+
+  private static SchemeRegistry registry;
+  
+  public static synchronized SchemeRegistry getInstance() {
+    if (registry == null) registry = new SchemeRegistry();
+    return registry;
+  }
+  
+  private final Map<String,Scheme> schemes;
+  
+  SchemeRegistry() {
+    schemes = new HashMap<String,Scheme>();
+    schemes.put(HttpScheme.NAME, new HttpScheme());
+    schemes.put(HttpsScheme.NAME, new HttpsScheme());
+  }
+  
+  @SuppressWarnings("unchecked")
+  public synchronized boolean register(
+    String schemeClass) 
+      throws ClassNotFoundException, 
+             IllegalAccessException, 
+             InstantiationException {
+    Class<Scheme> klass = 
+      (Class<Scheme>) Thread.currentThread()
+        .getContextClassLoader().loadClass(schemeClass);
+    return register(klass);
+  }
+  
+  public synchronized boolean register(
+    Class<Scheme> schemeClass) 
+      throws IllegalAccessException, 
+             InstantiationException {
+    Scheme scheme = schemeClass.newInstance();
+    return register(scheme);
+  }
+  
+  public synchronized boolean register(Scheme scheme) {
+    String name = scheme.getName();
+    if (schemes.get(name) == null) {
+      schemes.put(name.toLowerCase(), scheme);
+      return true;
+    } else return false;
+  }
+  
+  public Scheme getScheme(String scheme) {
+    if (scheme == null) return null;
+    Scheme s = schemes.get(scheme.toLowerCase());
+    return (s != null) ? s : new DefaultScheme(scheme);
+  }
+  
+}

Added: incubator/abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/lang/InvalidLangTagSyntax.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/lang/InvalidLangTagSyntax.java?view=auto&rev=521094
==============================================================================
--- incubator/abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/lang/InvalidLangTagSyntax.java (added)
+++ incubator/abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/lang/InvalidLangTagSyntax.java Wed Mar 21 20:00:19 2007
@@ -0,0 +1,40 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  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.  For additional information regarding
+* copyright in this work, please see the NOTICE file in the top level
+* directory of this distribution.
+*/
+package org.apache.abdera.i18n.lang;
+
+public class InvalidLangTagSyntax extends Exception {
+
+  private static final long serialVersionUID = -2653819135178550519L;
+
+  public InvalidLangTagSyntax() {
+    super();
+  }
+
+  public InvalidLangTagSyntax(String message, Throwable cause) {
+    super(message, cause);
+  }
+
+  public InvalidLangTagSyntax(String message) {
+    super(message);
+  }
+
+  public InvalidLangTagSyntax(Throwable cause) {
+    super(cause);
+  }
+
+}

Added: incubator/abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/lang/Lang.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/lang/Lang.java?view=auto&rev=521094
==============================================================================
--- incubator/abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/lang/Lang.java (added)
+++ incubator/abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/lang/Lang.java Wed Mar 21 20:00:19 2007
@@ -0,0 +1,187 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  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.  For additional information regarding
+* copyright in this work, please see the NOTICE file in the top level
+* directory of this distribution.
+*/
+package org.apache.abdera.i18n.lang;
+
+import java.io.Serializable;
+import java.util.Iterator;
+import java.util.Locale;
+
+import org.apache.abdera.i18n.io.CharUtils;
+import org.apache.abdera.i18n.io.InvalidCharacterException;
+import org.apache.abdera.i18n.iri.Constants;
+import org.apache.abdera.i18n.lang.InvalidLangTagSyntax;
+import org.apache.abdera.i18n.lang.Lang;
+
+
+/**
+ * rfc3066
+ */
+public class Lang 
+  implements Iterable<String>, 
+             Serializable, 
+             Cloneable {
+
+  public static final Lang ANY = new Lang();
+  
+  private static final long serialVersionUID = -4620499451615533855L;
+  protected final String[] tags;
+  protected final Locale locale;
+  
+  private Lang() {
+    tags = new String[] {"*"};
+    locale = null;
+  }
+  
+  public Lang(Locale locale) {
+    this.tags = locale.toString().replace("\u005F","\u002D").split("\u002D");
+    this.locale = locale;
+  }
+  
+  public Lang(String tag) throws InvalidLangTagSyntax {
+    this(parse(tag));
+  }
+  
+  public Lang(String... tags) throws InvalidLangTagSyntax {
+    verify(tags);
+    this.tags = tags;
+    this.locale = initLocale();
+  }
+
+  private Locale initLocale() {
+    Locale locale = null;
+    switch(tags.length) {
+      case 0:  break;
+      case 1:  locale = new Locale(tags[0]); break;
+      case 2:  locale = new Locale(tags[0],tags[1]); break;
+      default: locale = new Locale(tags[0],tags[1],tags[2]); break;
+    }
+    return locale;
+  }
+  
+  public String getPrimary() {
+    return tags[0];
+  }
+  
+  public String getSubtag(int n) {
+    if (n+1 > tags.length) throw new ArrayIndexOutOfBoundsException(n);
+    return tags[n+1];
+  }
+  
+  public int getSubtagCount() {
+    return tags.length-1;
+  }
+  
+  public Locale getLocale() {
+    return locale;
+  }
+
+  public String toString() {
+    StringBuffer buf = new StringBuffer();
+    for (String s: tags) {
+      if (buf.length() > 0) buf.append('\u002D');
+      buf.append(s);
+    }
+    return buf.toString();
+  }
+  
+  public static boolean matches(Lang lang, String range) throws InvalidLangTagSyntax {
+    if (range.equals("*")) return true;
+    return matches(lang, new Lang(range));
+  }
+  
+  public static boolean matches(Lang lang, Lang range) {
+    if (range.equals("*")) return true;
+    if (lang.equals(range)) return true;
+    if (lang.tags.length <= range.tags.length) return false;
+    for (int n = 0; n < range.tags.length; n++) {
+      if (!lang.tags[n].equalsIgnoreCase(range.tags[n])) return false;
+    }
+    return true;
+  }
+  
+  public boolean matches(String range) throws InvalidLangTagSyntax {
+    return matches(this,range);
+  }
+  
+  public boolean matches(Lang range) {
+    return matches(this,range);
+  }
+  
+  @Override
+  public int hashCode() {
+    final int PRIME = 31;
+    int result = 1;
+    result = PRIME * result + ((locale == null) ? 0 : locale.hashCode());
+    for (String tag: tags) {
+      result = PRIME * result + tag.hashCode();
+    }
+    return result;
+  }
+  
+  @Override
+  public boolean equals(Object obj) {
+    if (this == obj)
+      return true;
+    if (obj == null)
+      return false;
+    if (obj instanceof String) {
+      String s = (String) obj;
+      if (s.equals("*")) obj = ANY;
+      else {
+        try {
+          obj = new Lang(s);
+        } catch (Exception e) {}
+      }
+    }
+    if (getClass() != obj.getClass())
+      return false;
+    final Lang other = (Lang) obj;
+    if (tags.length != other.tags.length) return false;
+    for (int n = 0; n < tags.length; n++) {
+      if (!tags[n].equalsIgnoreCase(other.tags[n])) return false;
+    }
+    return true;
+  }
+
+  private static void verify(String[] tags) throws InvalidLangTagSyntax {
+    if (tags.length == 0) throw new InvalidLangTagSyntax();
+    String primary = tags[0];
+    try {
+      CharUtils.verify(primary,Constants.ALPHA);
+    } catch (InvalidCharacterException e) {
+      throw new InvalidLangTagSyntax();
+    }
+    for (int n = 1; n < tags.length; n++) {
+      try {
+        CharUtils.verify(tags[n],Constants.ALPHANUM);
+      } catch (InvalidCharacterException e) {
+        throw new InvalidLangTagSyntax();
+      }
+    }
+  }
+  
+  private static String[] parse(String tag) throws InvalidLangTagSyntax {
+    String[] tags = tag.split("\u002D");
+    verify(tags);
+    return tags;
+  }
+
+  public Iterator<String> iterator() {
+    return java.util.Arrays.asList(tags).iterator();
+  }
+}

Added: incubator/abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/unicode/Normalizer.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/unicode/Normalizer.java?view=auto&rev=521094
==============================================================================
--- incubator/abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/unicode/Normalizer.java (added)
+++ incubator/abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/unicode/Normalizer.java Wed Mar 21 20:00:19 2007
@@ -0,0 +1,180 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  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.  For additional information regarding
+* copyright in this work, please see the NOTICE file in the top level
+* directory of this distribution.
+*/
+package org.apache.abdera.i18n.unicode;
+
+import java.io.IOException;
+
+import org.apache.abdera.i18n.io.CharUtils;
+import org.apache.abdera.i18n.io.CodepointIterator;
+import org.apache.abdera.i18n.unicode.UnicodeCharacterDatabase;
+
+
+/**
+ * Performs Unicode Normalization (Form D,C,KD and KC)
+ */
+public final class Normalizer {
+
+  public enum Mask {
+    NONE,
+    COMPATIBILITY,
+    COMPOSITION
+  }
+  
+  public enum Form { 
+    D, 
+    C(Mask.COMPOSITION), 
+    KD(Mask.COMPATIBILITY), 
+    KC(Mask.COMPATIBILITY,Mask.COMPOSITION);
+    
+    private int mask = 0;
+
+    Form(Mask... masks) {
+      for (Mask mask : masks) {
+        this.mask |= (mask.ordinal());
+      }
+    }
+    
+    public boolean isCompatibility() {
+      return (mask & (Mask.COMPATIBILITY.ordinal())) != 0;
+    }
+    
+    public boolean isCanonical() {
+      return !isCompatibility();
+    }
+    
+    public boolean isComposition() {
+      return (mask & (Mask.COMPOSITION.ordinal())) != 0;
+    }
+  }
+  
+  private Normalizer() {}
+  
+  /**
+   * Normalize the string using NFKC
+   */
+  public static StringBuffer normalize(String source) throws IOException {
+    return normalize(source, Form.KC);
+  }
+  
+  /**
+   * Normalize the string using the specified Form
+   */
+  public static StringBuffer normalize(
+    String source, 
+    Form form) 
+      throws IOException {
+    return normalize(source, form, new StringBuffer());
+  }
+  
+  /**
+   * Normalize the string into the given StringBuffer using the given Form
+   */
+  public static StringBuffer normalize(
+    String source, 
+    Form form, 
+    StringBuffer buf) 
+      throws IOException {
+      UnicodeCharacterDatabase ucd = UnicodeCharacterDatabase.getInstance();
+      if (source.length() != 0 && ucd != null) {
+        decompose(ucd, source, form, buf);
+        compose(ucd, form, buf);
+      }
+      return buf;
+  }
+  
+  private static void decompose(
+    UnicodeCharacterDatabase ucd,
+    String source, 
+    Form form, 
+    StringBuffer buf) 
+      throws IOException {
+      StringBuffer internal = new StringBuffer();
+      CodepointIterator ci = CodepointIterator.forCharSequence(source);
+      boolean canonical = form.isCanonical();
+      while (ci.hasNext()) {
+        int c = ci.next();
+        internal.setLength(0);
+        ucd.decompose(c, canonical, internal);
+        CodepointIterator ii = CodepointIterator.forCharSequence(internal);
+        while(ii.hasNext()) {
+          int ch = ii.next();
+          int i = findInsertionPoint(ucd, buf, ch);
+          buf.insert(i,CharUtils.toString(ch));
+        }
+      }
+    
+  }
+  
+  private static int findInsertionPoint(
+    UnicodeCharacterDatabase ucd, 
+    StringBuffer buf, int c) {
+    int cc = ucd.getCanonicalClass(c);
+    int i = buf.length();
+    if (cc != 0) {
+      int ch;
+      for (; i > 0; i -= CharUtils.size(c)) {
+        ch = CharUtils.charAt(buf, i-1);
+        if (ucd.getCanonicalClass(ch) <= cc) break;
+      }
+    }
+    return i;
+  }
+  
+  private static void compose(
+    UnicodeCharacterDatabase ucd,
+    Form form, 
+    StringBuffer buf) 
+      throws IOException {
+    if (!form.isComposition()) return;
+    int pos = 0;
+    int lc = CharUtils.charAt(buf, pos);
+    int cpos = CharUtils.size(lc);    
+    int lcc = ucd.getCanonicalClass(lc);
+    if (lcc != 0) lcc = 256;
+    int len = buf.length();
+    int c;
+    for (int dpos = cpos; dpos < buf.length(); dpos += CharUtils.size(c)) {
+      c = CharUtils.charAt(buf,dpos);
+      int cc = ucd.getCanonicalClass(c);
+      int composite = ucd.getPairComposition(lc, c);
+      if (composite != '\uFFFF' && (lcc < cc || lcc == 0)) {
+        CharUtils.setChar(buf, pos, composite);
+        lc = composite;
+      } else {
+        if (cc == 0) {
+          pos = cpos;
+          lc = c;
+        }
+        lcc = cc;
+        CharUtils.setChar(buf,cpos,c);
+        if (buf.length() != len) {
+          dpos += buf.length() - len;
+          len = buf.length();
+        }
+        cpos += CharUtils.size(c);
+      }
+    }
+    buf.setLength(cpos);
+  }
+  
+  public static void main(String... args) throws Exception {
+    
+    UnicodeCharacterDatabase.main("g14n/src/main/resources/org/apache/abdera/g14n/unicode/data/ucd.res");
+    
+  }
+}

Added: incubator/abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/unicode/UnicodeCharacterDatabase.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/unicode/UnicodeCharacterDatabase.java?view=auto&rev=521094
==============================================================================
--- incubator/abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/unicode/UnicodeCharacterDatabase.java (added)
+++ incubator/abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/unicode/UnicodeCharacterDatabase.java Wed Mar 21 20:00:19 2007
@@ -0,0 +1,263 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  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.  For additional information regarding
+* copyright in this work, please see the NOTICE file in the top level
+* directory of this distribution.
+*/
+package org.apache.abdera.i18n.unicode;
+
+import java.io.BufferedReader;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.Serializable;
+import java.util.BitSet;
+import java.util.HashMap;
+import java.util.zip.GZIPInputStream;
+import java.util.zip.GZIPOutputStream;
+
+import org.apache.abdera.i18n.io.CharUtils;
+import org.apache.abdera.i18n.unicode.UnicodeCharacterDatabase;
+
+
+/**
+ * An implementation of the Unicode Character Database modeled after the 
+ * sample normalization demo available at: 
+ * 
+ * http://www.unicode.org/unicode/reports/tr15/Normalizer.html
+ * 
+ * for now, this has been implemented and tested against Unicode 3.2.0.  We 
+ * need to test is against Unicode 4.0.
+ */
+final class UnicodeCharacterDatabase 
+  implements Serializable, 
+             Cloneable {
+
+  private static final long serialVersionUID = 1596950870716625345L;
+
+  private static final String UCD = "org/apache/abdera/g14n/unicode/data/ucd.res";
+  
+  private final HashMap<Integer,Integer> cc = new HashMap<Integer,Integer>();
+  private final HashMap<Integer,String>  decompose = new HashMap<Integer,String>();
+  private final HashMap<Integer,Integer> compose = new HashMap<Integer,Integer>();
+  private final BitSet compatibility = new BitSet();
+  private final BitSet excluded = new BitSet();
+  
+  private static UnicodeCharacterDatabase ucd = null;
+  
+  public synchronized static UnicodeCharacterDatabase getInstance() {
+    if (ucd == null) {
+      try {
+        ucd = load();
+      } catch (Exception e) {}
+    }
+    return ucd;
+  }
+  
+  UnicodeCharacterDatabase() {}
+  
+  public int getCanonicalClass(int c) {
+    return (cc.containsKey(c)) ? cc.get(c) : 0;
+  }
+  
+  public boolean isComposite(int f, int s) {
+    return !(f < 0 || f > 0x10FFFF || s < 0 || s > 0x10FFFF);
+  }
+  
+  public char getPairComposition(int f, int s) {
+    if (f < 0 || s > 0x10FFFF || s < 0 || s > 0x10FFFF) return '\uFFFF';
+    Integer i = compose.get((f << 16) | s);
+    return (i != null) ? (char)i.intValue() : '\uFFFF';
+  }
+  
+  public void decompose(
+    int c, 
+    boolean canonical, 
+    StringBuffer buf) {
+      String d = decompose.get(c);
+      if (d != null && !(canonical && compatibility.get(c))) {
+        for (int i = 0; i < d.length(); ++i) {
+            decompose(d.charAt(i), canonical, buf);
+        }
+      } else CharUtils.append(buf, c);
+  }
+  
+  public Object clone() throws CloneNotSupportedException {
+    return super.clone();
+  }
+
+  public static UnicodeCharacterDatabase load() 
+    throws IOException, 
+           ClassNotFoundException {
+    ClassLoader cl = Thread.currentThread().getContextClassLoader();
+    InputStream is = cl.getResourceAsStream(UCD);
+    GZIPInputStream gzip = new GZIPInputStream(is);
+    ObjectInputStream ois = new ObjectInputStream(gzip);
+    UnicodeCharacterDatabase ucd = (UnicodeCharacterDatabase) ois.readObject();
+    ois.close();
+    gzip.close();
+    is.close();
+    return ucd;
+  }
+  
+  private static void save(
+    UnicodeCharacterDatabase ucd, 
+    String to) 
+      throws IOException {
+    FileOutputStream fos = new FileOutputStream(to);
+    GZIPOutputStream gzip = new GZIPOutputStream(fos);
+    ObjectOutputStream oos = new ObjectOutputStream(gzip);
+    oos.writeObject(ucd);
+    oos.close();
+    gzip.close();
+    fos.close();    
+  }
+
+  
+  private static String base;
+  private static String version;
+  
+
+  /**
+   * Load the Unicode Character Database from the source files and save as 
+   * a gzip compressed, serialized Java class.
+   */
+  public static void main(String... args) throws Exception {
+    if (args.length == 0) usage();
+    base = (args.length > 1) ? args[1]: "org/apache/abdera/g14n/unicode/data/";
+    version = (args.length > 2) ? args[2]: "3.2.0";
+    UnicodeCharacterDatabase ucd = UnicodeCharacterDatabase.getInstance();
+    if (ucd == null) {
+      ucd = new UnicodeCharacterDatabase();
+      Loader.load(ucd);
+    }
+    save(ucd, args[0]);
+  }
+  
+  private static void usage() {
+    System.out.println("Usage:\n  java -cp $CLASSPATH com.ibm.usmall.UnicodeCharacterDatabase $filename $datapath");
+    System.exit(0);
+  }
+  
+  private static class Loader {
+    
+    private static final String EXCLUSIONS = "CompositionExclusions";
+    private static final String UNICODEDATA = "UnicodeData";
+    
+//    private static final String EXCLUSIONS = 
+//      "org/apache/abdera/util/unicode/data/CompositionExclusions-3.2.0.txt";
+//    
+//    private static final String UNICODEDATA =
+//      "org/apache/abdera/util/unicode/data/UnicodeData-3.2.0.txt";
+    
+    static String filename(String target) {
+      return base + (!base.endsWith("/")?"/":"") + target + "-" + version + ".txt";
+    }
+    
+    static void load(UnicodeCharacterDatabase ucd) throws IOException {
+      exclusions(ucd);
+      decomposition(ucd);
+    }
+    
+    static String stripcomments(String s) {
+      int n = s.indexOf('#');
+      return (n != -1) ? s.substring(0,n) : s;
+    }
+    
+    static void exclusions(UnicodeCharacterDatabase ucd) throws IOException {
+      BufferedReader r = read(filename(EXCLUSIONS));
+      String line = null;
+      while ((line = r.readLine()) != null) {
+        line = stripcomments(line);
+        if (line.length() == 0) continue;
+        int v = Integer.parseInt(line.trim(),16);
+        ucd.excluded.set(v);
+      }
+      r.close();
+    }
+    
+    static String dehex(String t) {
+      String[] ts = t.split(" ");
+      StringBuffer buf = new StringBuffer();
+      for (String token : ts) {
+        if (token.charAt(0) != '<') {
+          int n = Integer.parseInt(token.trim(), 16);
+          buf.append((char)n);
+        }
+      }
+      return buf.toString();
+    }
+    
+    static void decomposition(UnicodeCharacterDatabase ucd) throws IOException {
+      BufferedReader r = read(filename(UNICODEDATA));
+      String line = null;
+      while ((line = r.readLine()) != null) {
+        line = stripcomments(line);
+        if (line.length() == 0) continue;
+        String[] tokens = line.split(";");
+        int val = Integer.parseInt(tokens[0], 16);
+        int cc = Integer.parseInt(tokens[3]);
+        ucd.cc.put(val, cc);
+        String decomp = tokens[5];
+        if (decomp.length() != 0) {
+          if (decomp.startsWith("<")) {
+            ucd.compatibility.set(val);
+          }
+          decomp = dehex(decomp);
+          ucd.decompose.put(val, decomp);
+          if (!ucd.compatibility.get(val) && 
+             !ucd.excluded.get(val)) {
+            char f = (decomp.length() > 1) ? 
+              decomp.charAt(0) : '\u0000';
+            char l = (decomp.length() > 1) ? 
+              decomp.charAt(1) : decomp.charAt(0);
+            ucd.compose.put((f << 16) | l, val);
+          }
+        }
+      }
+      hanguls(ucd);
+      r.close();
+    }
+    
+    // Use the algorithm used in http://www.unicode.org/unicode/reports/tr15/NormalizerBuilder.java
+    static void hanguls(UnicodeCharacterDatabase ucd) throws IOException {
+      for (int s = 0; s < 0x2BA4; ++s) {
+        int t = s % 0x001C;
+        char f = (t != 0) ? 
+          (char)(0xAC00 + s - t) : 
+          (char)(0x1100 + s / 0x024C);
+        char e = (t != 0) ? 
+          (char)(0x11A7 + t) : 
+          (char)(0x1161 + (s % 0x024C) / 0x001C);
+        int pair = (f << 16) | e;
+        int value = s + 0xAC00;
+        ucd.decompose.put(value, String.valueOf(f) + e);
+        ucd.compose.put(pair, value);
+      }
+    }
+    
+    static BufferedReader read(String f) {
+      ClassLoader cl = Thread.currentThread().getContextClassLoader();
+      InputStream in = cl.getResourceAsStream(f);
+      InputStreamReader r = new InputStreamReader(in);
+      BufferedReader buf = new BufferedReader(r);
+      return buf;
+    }
+    
+  }
+  
+}

Added: incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestBase.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestBase.java?view=auto&rev=521094
==============================================================================
--- incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestBase.java (added)
+++ incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestBase.java Wed Mar 21 20:00:19 2007
@@ -0,0 +1,35 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  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.  For additional information regarding
+* copyright in this work, please see the NOTICE file in the top level
+* directory of this distribution.
+*/
+package org.apache.abdera.i18n.test.iri;
+
+import junit.framework.TestCase;
+
+public abstract class TestBase extends TestCase {
+
+  protected static String string(int... chars) {
+    try {
+      byte[] b = new byte[chars.length];
+      for (int n = 0; n < chars.length; n++) b[n] = (byte)chars[n];
+      return new String(b,"utf-8");
+    } catch (Exception e ) {
+      e.printStackTrace();
+    }
+    return null;
+  }
+  
+}

Added: incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestIDNA.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestIDNA.java?view=auto&rev=521094
==============================================================================
--- incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestIDNA.java (added)
+++ incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestIDNA.java Wed Mar 21 20:00:19 2007
@@ -0,0 +1,42 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  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.  For additional information regarding
+* copyright in this work, please see the NOTICE file in the top level
+* directory of this distribution.
+*/
+package org.apache.abdera.i18n.test.iri;
+
+import org.apache.abdera.i18n.iri.IDNA;
+
+public class TestIDNA extends TestBase {
+
+  public static void testPunycode() throws Exception {
+    
+    for (TestPunycode.Test test: TestPunycode.Test.values()) {
+      
+      String out = IDNA.toASCII(test.in);
+      String in = IDNA.toUnicode(out);
+      
+      if (test == TestPunycode.Test.H || test == TestPunycode.Test.S) {
+        assertFalse(out.equalsIgnoreCase("xn--" + test.out));
+      } else {
+        assertTrue(out.equalsIgnoreCase("xn--" + test.out));
+        assertTrue(in.equalsIgnoreCase(test.in));
+      }
+
+    }
+    
+  }
+  
+}

Added: incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestIRI.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestIRI.java?view=auto&rev=521094
==============================================================================
--- incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestIRI.java (added)
+++ incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestIRI.java Wed Mar 21 20:00:19 2007
@@ -0,0 +1,210 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  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.  For additional information regarding
+* copyright in this work, please see the NOTICE file in the top level
+* directory of this distribution.
+*/
+package org.apache.abdera.i18n.test.iri;
+
+import java.net.URI;
+
+import org.apache.abdera.i18n.iri.IRI;
+import org.apache.abdera.i18n.unicode.Normalizer;
+
+
+import junit.framework.TestCase;
+
+public class TestIRI extends TestCase {
+
+  public static void testSimple() throws Exception {
+    IRI iri = new IRI("http://validator.w3.org/check?uri=http%3A%2F%2Fr\u00E9sum\u00E9.example.org");
+    assertEquals(iri.toString(),"http://validator.w3.org/check?uri=http%3A%2F%2Fr\u00E9sum\u00E9.example.org");
+    assertEquals(iri.toURI().toString(),"http://validator.w3.org/check?uri=http%3A%2F%2Fr%C3%A9sum%C3%A9.example.org");   
+  }
+  
+  public static void testFile() throws Exception {
+    IRI iri = new IRI("file:///tmp/test/foo");
+    assertEquals(iri.toURI().toString(),"file:///tmp/test/foo");
+  }
+
+  public static void testSimple2() throws Exception {
+    IRI iri = new IRI("http://www.example.org/red%09ros\u00E9#red");
+    assertEquals(iri.toURI().toString(),"http://www.example.org/red%09ros%C3%A9#red");
+  }
+  
+  
+  public static void testNotSoSimple() throws Exception {
+    IRI iri = new IRI("http://example.com/\uD800\uDF00\uD800\uDF01\uD800\uDF02");
+    assertEquals(iri.toURI().toString(),"http://example.com/%F0%90%8C%80%F0%90%8C%81%F0%90%8C%82");
+  }
+    
+  public static void testURItoIRI() throws Exception {
+    URI uri = new URI("http://www.example.org/D%C3%BCrst");
+    IRI iri = new IRI(uri);
+    assertEquals(iri.toString(),"http://www.example.org/D\u00FCrst");
+  }
+  
+  public static void testURItoIRI2() throws Exception {
+    URI uri = new URI("http://www.example.org/D%FCrst");
+    IRI iri = new IRI(uri, "windows-1252");
+    assertEquals(iri.toString(),"http://www.example.org/D\u00FCrst");
+  }
+
+  public static void testURItoIRI3() throws Exception {
+    URI uri = new URI("http://xn--99zt52a.example.org/%e2%80%ae");
+    IRI iri = new IRI(uri);
+    assertEquals(iri.toString(),"http://xn--99zt52a.example.org/%E2%80%AE");
+  }
+
+  public static void testIRItoURI() throws Exception {
+    IRI iri = new IRI("http://\u7D0D\u8C46.example.org/%E2%80%AE");
+    URI uri = iri.toURI();
+    assertEquals(uri.toString(),"http://xn--99zt52a.example.org/%E2%80%AE");
+  }
+  
+
+  public static void testComparison() throws Exception {
+    IRI iri1 = new IRI("http://www.example.org/");
+    IRI iri2 = new IRI("http://www.example.org/..");
+    IRI iri3 = new IRI("http://www.Example.org:80");
+    
+    assertFalse(iri1.equals(iri2)); // false
+    assertFalse(iri1.equals(iri3)); // false
+    assertFalse(iri2.equals(iri1)); // false
+    assertFalse(iri2.equals(iri3)); // false
+    assertFalse(iri3.equals(iri1)); // false
+    assertFalse(iri3.equals(iri2)); // false
+    
+    
+    assertTrue(iri1.normalize().equals(iri2.normalize()));
+    assertTrue(iri1.normalize().equals(iri3.normalize()));
+    assertTrue(iri2.normalize().equals(iri1.normalize()));
+    assertTrue(iri2.normalize().equals(iri3.normalize()));
+    assertTrue(iri3.normalize().equals(iri1.normalize()));
+    assertTrue(iri3.normalize().equals(iri2.normalize()));
+    
+    assertTrue(iri1.equivalent(iri2));
+    assertTrue(iri1.equivalent(iri3));
+    assertTrue(iri2.equivalent(iri1));
+    assertTrue(iri2.equivalent(iri3));
+    assertTrue(iri3.equivalent(iri1));
+    assertTrue(iri3.equivalent(iri2));
+  }
+  
+  
+  public static void testUCN() throws Exception {
+    IRI iri1 = new IRI("http://www.example.org/r\u00E9sum\u00E9.html");
+    IRI iri2 = new IRI("http://www.example.org/re\u0301sume\u0301.html", Normalizer.Form.C);
+    assertEquals(iri1,iri2);
+  }
+  
+  public static void testPercent() throws Exception {
+      IRI iri1 = new IRI("http://example.org/~user");
+      IRI iri2 = new IRI("http://example.org/%7euser");
+      IRI iri3 = new IRI("http://example.org/%7Euser");
+      assertTrue(iri1.normalize().equals(iri2.normalize()));
+      assertTrue(iri1.normalize().equals(iri3.normalize()));
+  }
+  
+  public static void testIDN() throws Exception {
+    IRI iri1 = new IRI("http://r\u00E9sum\u00E9.example.org");
+    IRI iri2 = new IRI("http://xn--rsum-bpad.example.org");
+    assertTrue(iri1.equivalent(iri2));
+  }
+  
+  public static void testRelative() throws Exception{
+    IRI base = new IRI("http://example.org/foo/");
+    
+    assertEquals(base.resolve("/").toString(),"http://example.org/");
+    assertEquals(base.resolve("/test").toString(),"http://example.org/test");
+    assertEquals(base.resolve("test").toString(),"http://example.org/foo/test");
+    assertEquals(base.resolve("../test").toString(),"http://example.org/test");
+    assertEquals(base.resolve("./test").toString(),"http://example.org/foo/test");
+    assertEquals(base.resolve("test/test/../../").toString(),"http://example.org/foo/");
+    assertEquals(base.resolve("?test").toString(),"http://example.org/foo/?test");
+    assertEquals(base.resolve("#test").toString(),"http://example.org/foo/#test");
+    assertEquals(base.resolve(".").toString(),"http://example.org/foo/");
+  }
+
+  /**
+   * Try a variety of URI schemes.  If any problematic schemes pop up, 
+   * we should add a test for 'em here
+   */
+  public static void testSchemes() throws Exception {
+    
+    IRI iri = new IRI("http://a:b@c.org:80/d/e?f#g");
+    assertEquals(iri.getScheme(), "http");
+    assertEquals(iri.getUserInfo(), "a:b");
+    assertEquals(iri.getHost(),"c.org");
+    assertEquals(iri.getPort(),80);
+    assertEquals(iri.getPath(),"/d/e");
+    assertEquals(iri.getQuery(), "f");
+    assertEquals(iri.getFragment(),"g");
+    
+    iri = new IRI("https://a:b@c.org:80/d/e?f#g");
+    assertEquals(iri.getScheme(), "https");
+    assertEquals(iri.getUserInfo(), "a:b");
+    assertEquals(iri.getHost(),"c.org");
+    assertEquals(iri.getPort(),80);
+    assertEquals(iri.getPath(),"/d/e");
+    assertEquals(iri.getQuery(), "f");
+    assertEquals(iri.getFragment(),"g");
+    
+    iri = new IRI("ftp://a:b@c.org:80/d/e?f#g");
+    assertEquals(iri.getScheme(), "ftp");
+    assertEquals(iri.getUserInfo(), "a:b");
+    assertEquals(iri.getHost(),"c.org");
+    assertEquals(iri.getPort(),80);
+    assertEquals(iri.getPath(),"/d/e");
+    assertEquals(iri.getQuery(), "f");
+    assertEquals(iri.getFragment(),"g");
+    
+    iri = new IRI("mailto:joe@example.org?subject=foo");
+    assertEquals(iri.getScheme(), "mailto");
+    assertEquals(iri.getUserInfo(), null);
+    assertEquals(iri.getHost(),null);
+    assertEquals(iri.getPort(),-1);
+    assertEquals(iri.getPath(),"joe@example.org");
+    assertEquals(iri.getQuery(), "subject=foo");
+    assertEquals(iri.getFragment(),null);
+    
+    iri = new IRI("tag:example.org,2006:foo");
+    assertEquals(iri.getScheme(), "tag");
+    assertEquals(iri.getUserInfo(), null);
+    assertEquals(iri.getHost(),null);
+    assertEquals(iri.getPort(),-1);
+    assertEquals(iri.getPath(),"example.org,2006:foo");
+    assertEquals(iri.getQuery(), null);
+    assertEquals(iri.getFragment(),null);
+    
+    iri = new IRI("urn:lsid:ibm.com:example:82437234964354895798234d");
+    assertEquals(iri.getScheme(), "urn");
+    assertEquals(iri.getUserInfo(), null);
+    assertEquals(iri.getHost(),null);
+    assertEquals(iri.getPort(),-1);
+    assertEquals(iri.getPath(),"lsid:ibm.com:example:82437234964354895798234d");
+    assertEquals(iri.getQuery(), null);
+    assertEquals(iri.getFragment(),null);
+    
+    iri = new IRI("data:image/gif;base64,R0lGODdhMAAwAPAAAAAAAP");
+    assertEquals(iri.getScheme(), "data");
+    assertEquals(iri.getUserInfo(), null);
+    assertEquals(iri.getHost(),null);
+    assertEquals(iri.getPort(),-1);
+    assertEquals(iri.getPath(),"image/gif;base64,R0lGODdhMAAwAPAAAAAAAP");
+    assertEquals(iri.getQuery(), null);
+    assertEquals(iri.getFragment(),null);
+    
+  }
+}

Added: incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestLang.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestLang.java?view=auto&rev=521094
==============================================================================
--- incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestLang.java (added)
+++ incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestLang.java Wed Mar 21 20:00:19 2007
@@ -0,0 +1,62 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  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.  For additional information regarding
+* copyright in this work, please see the NOTICE file in the top level
+* directory of this distribution.
+*/
+package org.apache.abdera.i18n.test.iri;
+
+import java.util.Locale;
+
+import org.apache.abdera.i18n.lang.InvalidLangTagSyntax;
+import org.apache.abdera.i18n.lang.Lang;
+
+import junit.framework.TestCase;
+
+public class TestLang extends TestCase {
+
+  public static void testLang() throws Exception {
+    
+    Lang lang = new Lang("en-US-ca");
+    Locale testLocale = new Locale("en", "US", "ca");
+        
+    assertEquals(lang.getPrimary(),"en");
+    assertEquals(lang.getSubtag(0),"US");
+    assertEquals(lang.getSubtag(1),"ca");
+    
+    assertEquals( testLocale, lang.getLocale() );
+    assertEquals(testLocale.toString(), lang.getLocale().toString());
+    assertEquals(testLocale.getDisplayCountry(), lang.getLocale().getDisplayCountry());
+    assertEquals(testLocale.getDisplayLanguage(), lang.getLocale().getDisplayLanguage());
+    assertEquals( testLocale.getDisplayVariant(), lang.getLocale().getDisplayVariant());
+    assertTrue(lang.matches("*"));
+    assertTrue(lang.matches("en"));
+    assertTrue(lang.matches("EN"));
+    assertTrue(lang.matches("en-US"));
+    assertTrue(lang.matches("en-us"));
+    assertTrue(lang.matches("en-US-ca"));
+    assertTrue(lang.matches("en-us-ca"));
+    assertFalse(lang.matches("en-US-ca-bob"));
+    assertFalse(lang.matches("en-US-fr"));
+    
+    Exception e = null;
+    try {
+      lang = new Lang("en_US");
+    } catch (InvalidLangTagSyntax ex) {
+      e = ex;
+    }
+    assertNotNull(e);
+  }
+  
+}

Added: incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestNFKC.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestNFKC.java?view=auto&rev=521094
==============================================================================
--- incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestNFKC.java (added)
+++ incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestNFKC.java Wed Mar 21 20:00:19 2007
@@ -0,0 +1,38 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  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.  For additional information regarding
+* copyright in this work, please see the NOTICE file in the top level
+* directory of this distribution.
+*/
+package org.apache.abdera.i18n.test.iri;
+
+import org.apache.abdera.i18n.unicode.Normalizer;
+
+public class TestNFKC extends TestBase {
+
+  public static void testNFKC() throws Exception {
+    
+    // "\xC2\xB5", "\xCE\xBC"
+    String s1 = Normalizer.normalize(string(0xC2,0xB5)).toString();
+    String s2 = string(0xCE,0xBC);
+    assertEquals(s1,s2);
+    
+    // "\xC2\xAA", "\x61"
+    s1 = Normalizer.normalize(string(0xC2,0xAA)).toString();
+    s2 = string(0x61);
+    assertEquals(s1,s2);
+    
+  }
+  
+}

Added: incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestNameprep.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestNameprep.java?view=auto&rev=521094
==============================================================================
--- incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestNameprep.java (added)
+++ incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestNameprep.java Wed Mar 21 20:00:19 2007
@@ -0,0 +1,162 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  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.  For additional information regarding
+* copyright in this work, please see the NOTICE file in the top level
+* directory of this distribution.
+*/
+package org.apache.abdera.i18n.test.iri;
+
+import org.apache.abdera.i18n.io.CharUtils;
+import org.apache.abdera.i18n.iri.Nameprep;
+
+
+public class TestNameprep extends TestBase {
+  
+  enum Test {
+    
+    A("Map to nothing",
+      string('f','o','o',0xC2,0xAD,0xCD,0x8F,0xE1,0xA0,0x86,0xE1,0xA0,0x8B,'b',
+          'a','r',0xE2,0x80,0x8B,0xE2,0x81,0xA0,'b','a','z',0xEF,0xB8,0x80,0xEF,
+          0xB8,0x88,0xEF,0xB8,0x8F,0xEF,0xBB,0xBF),
+      "foobarbaz"),
+    B("Case folding ASCII U+0043 U+0041 U+0046 U+0045", 
+      "CAFE", 
+      "cafe"),
+    C("Case folding 8bit U+00DF (german sharp s)", 
+      string(0xC3,0x9F), 
+      "ss"),
+    D("Case folding U+0130 (turkish capital I with dot)",
+      string(0xC4,0xB0), 
+      string('i',0xCC,0x87)),
+    E("Case folding multibyte U+0143 U+037A",
+      string(0xC5,0x83,0xCD,0xBA),
+      string(0xC5,0x84,0x20,0xCE,0xB9)),
+    F("Case folding U+2121 U+33C6 U+1D7BB",
+      string(0xE2,0x84,0xA1,0xE3,0x8F,0x86,0xF0,0x9D,0x9E,0xBB),
+      string('t','e','l','c',0xE2,0x88,0x95,'k','g',0xCF,0x83)),
+    G("Normalization of U+006a U+030c U+00A0 U+00AA",
+      string(0x6A,0xCC,0x8C,0xC2,0xA0,0xC2,0xAA),
+      string(0xC7,0xB0,'a')),
+    H("Case folding U+1FB7 and normalization",
+      string(0xE1,0xBE,0xB7),
+      string(0xE1,0xBE,0xB6,0xCE,0xB9)),      
+    I("Self-reverting case folding U+01F0 and normalization",
+      string(0xC7,0xB0),
+      string(0xC7,0xB0)),
+    J("Self-reverting case folding U+0390 and normalization",
+      string(0xCE,0x90),
+      string(0xCE,0x90)),
+    K("Self-reverting case folding U+03B0 and normalization",
+      string(0xCE,0xB0),
+      string(0xCE,0xB0)),
+    L("Self-reverting case folding U+1E96 and normalization",
+      string(0xE1,0xBA,0x96),
+      string(0xE1,0xBA,0x96)),
+    M("Self-reverting case folding U+1F56 and normalization",
+      string(0xE1,0xBD,0x96),
+      string(0xE1,0xBD,0x96)),
+    N("ASCII space character U+0020", "\u0020" , "\u0020"),
+    O("Non-ASCII 8bit space character U+00A0", "\u00A0", ""),
+    P("Non-ASCII multibyte space character U+1680", "\u1680", null, false, -1),
+    Q("Non-ASCII multibyte space character U+2000", "\u2000", "\u0020", false, -1),
+    R("Zero Width Space U+200b", "\u200B", ""),
+    S("Non-ASCII multibyte space character U+3000", "\u3000", "\u0020",false,-1),
+    T("ASCII control characters U+0010 U+007F","\u0010\u007F","\u0010\u007F"),
+    U("Non-ASCII 8bit control character U+0085", "\u0085", null, false, -1),
+    V("Non-ASCII multibyte control character U+180E", "\u180E", null, false, -1),
+    W("Zero Width No-Break Space U+FEFF","\uFEFF",""),
+    X("Non-ASCII control character U+1D175",
+      new String(new char[] {
+         CharUtils.getHighSurrogate(0x1D175),
+         CharUtils.getLowSurrogate(0x1D175)}),
+         null,false,-1),    
+    Y("Plane 0 private use character U+F123", "\uF123", null, false, -1),
+    Z("Plane 15 private use character U+F1234", string(0xF3,0xB1,0x88,0xB4), null, false, -1),
+   AA("Plane 16 private use character U+10F234", string(0xF4,0x8F,0x88,0xB4), null, false, -1),
+   AB("Non-character code point U+8FFFE", string(0xF2,0x8F,0x8F,0xBE), null, false, -1),
+   AC("Non-character code point U+10FFFF", string(0xF4,0x8F,0x8F,0x8F), null, false, -1),
+   AD("Surrogate code U+DF42",string(0xED,0xBD,0x82),null,false,-1),  
+   AE("Non-plain text character U+FFFD", string(0xEF,0xBF,0xBD), null, false, -1),
+   AF("Ideographic description character U+2FF5", string(0xE2,0xBF,0xB5), null, false, -1),
+   AG("Display property character U+0341", string(0xCD,0x81), string(0xCC,0x81), false, -1),
+   AH("Left-to-right mark U+200E",string(0xE2,0x80,0x8E),null,false, -1),
+   AI("Deprecated U+202A", string(0xE2,0x80,0xAA), null, false, -1),
+   AJ("Language tagging character U+E0001", string(0xF3,0xA0,0x80,0x81), null, false, -1),
+   AK("Language tagging character U+E0042", string(0xF3,0xA0,0x81,0x82), null, false, -1),
+   AL("Bidi: RandALCat character U+05BE and LCat characters", string('f','o','o',0xD6,0xBE), null, false, -1),
+   AM("Bidi: RandALCat character U+FD50 and LCat characters", string('f','o','o',0xEF,0xB5,0x90), null, false, -1),
+   AN("Bidi: RandALCat character U+FB38 and LCat characters", string('f','o','o',0xEF,0xB9,0xB6), null, false, -1),
+   AO("Bidi: RandALCat without trailing RandALCat U+0627 U+0031", string(0xD8,0xA7,0x31), null, false, -1),
+   AP("Bidi: RandALCat character U+0627 U+0031 U+0628", string(0xD8,0xA7,0x31,0xD8,0xA8), string(0xD8,0xA7,0x31,0xD8,0xA8)),
+   AQ("Unassigned code point U+E0002",string(0xF3,0xA0,0x80,0x82),null,true,-1),
+// AR("Larger test (shrinking)",                                                                                           //      {"Larger test (shrinking)","X\xC2\xAD\xC3\x9F\xC4\xB0\xE2\x84\xA1\x6a\xcc\x8c\xc2\xa0\xc2""\xaa\xce\xb0\xe2\x80\x80", "xssi\xcc\x87" "tel\xc7\xb0 a\xce\xb0 ","Nameprep"}, 
+//  string('X',0xC2,0xAD,0xC3,0x9F,0xC4,0xB0,0xE2,0x84,0xA1,0x6a,0xc,'c',0x8c,0xc2,0xa0,0xc2),
+//  string('x','s','s','i',0xcc,0x87,'t','e','l',0xc7,0xb0,'a',0xce,0xb0), false, 0),
+   AS("Larger test (expanding)",
+      string('X',0xC3,0x9F,0xe3,0x8c,0x96,0xC4,0xB0,0xE2,0x84,0xA1,0xE2,0x92,0x9F,0xE3,0x8c,0x80),
+      string('x','s','s',0xE3,0x82,0xAD,0xE3,0x83,0xAD,0xE3,0x83,0xA1,0xE3,0x83,0xBC,0xE3,0x83,0x88,0xE3,0x83,0xAB,'i',0xCC,0x87,'t','e','l',0x28,'d',0x29,0xE3,0x82,0xA2,0xE3,0x83,0x91,0xE3,0x83,0xBC,0xE3,0x83,0x88)),
+   AT("Case map + normalization", string(0xC2,0xB5), string(0xCE,0xBC)),
+   AU("NFKC test", string(0xC2,0xAA), string(0x61)),
+   AV("nameprep, exposed a bug in libstringprep 0.0.5",
+      string(0xC2,0xAA,0x0A), string(0x61,0x0A)),
+   AW("unassigned code point U+0221", "\u0221", "\u0221", true, 0),
+   AX("unassigned code point U+0221", "\u0221", "\u0221", false, -1),
+   AY("Unassigned code point U+0236", "\u0236", "\u0236", true, 0),
+   AZ("unassigned code point U+0236", "\u0236", "\u0236", false, -1),
+   BA("bidi both RandALCat and LCat  U+0627 U+00AA U+0628",
+      string(0xD8,0xA7,0xC2,0xAA,0xD8,0xA8), null, false, -1);
+    
+    String comment;
+    String in;
+    String out;
+    boolean allowunassigned = true;
+    int rc;
+    
+    Test(
+      String comment, 
+      String in, 
+      String out) {
+      this.comment = comment;
+      this.in = in;
+      this.out = out;
+    }
+    
+    Test(
+      String comment, 
+      String in, 
+      String out, 
+      boolean allowunassigned,
+      int rc) {
+      this.comment = comment;
+      this.in = in;
+      this.out = out;
+      this.allowunassigned = allowunassigned;
+      this.rc = rc;
+    }
+    
+  }
+  
+  public static void testNameprep() throws Exception {
+    for (Test test : Test.values()) {
+      try {
+        String out = Nameprep.prep(test.in,test.allowunassigned);
+        assertEquals(test.out,out);
+      } catch (Exception e) {
+        if (test.rc != -1)
+          fail("Failure in Test #" + test + " not expected");
+      }
+    }
+  }
+    
+}

Added: incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestPunycode.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestPunycode.java?view=auto&rev=521094
==============================================================================
--- incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestPunycode.java (added)
+++ incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestPunycode.java Wed Mar 21 20:00:19 2007
@@ -0,0 +1,72 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  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.  For additional information regarding
+* copyright in this work, please see the NOTICE file in the top level
+* directory of this distribution.
+*/
+package org.apache.abdera.i18n.test.iri;
+
+import org.apache.abdera.i18n.iri.Punycode;
+
+public class TestPunycode extends TestBase {
+
+  enum Test {
+    A("Arabic (Egyption)","\u0644\u064A\u0647\u0645\u0627\u0628\u062A\u0643\u0644\u0645\u0648\u0634\u0639\u0631\u0628\u064A\u061F","egbpdaj6bu4bxfgehfvwxn"),
+    B("Chinese (simplified)","\u4ED6\u4EEC\u4E3A\u4EC0\u4E48\u4E0D\u8BF4\u4E2D\u6587","ihqwcrb4cv8a8dqg056pqjye"),
+    C("Chinese (traditional)","\u4ED6\u5011\u7232\u4EC0\u9EBD\u4E0D\u8AAA\u4E2D\u6587", "ihqwctvzc91f659drss3x8bo0yb"),
+    D("Czech: Pro<ccaron>prost<ecaron>nemluv<iacute><ccaron>esky", "\u0050\u0072\u006F\u010D\u0070\u0072\u006F\u0073\u0074\u011B\u006E\u0065\u006D\u006C\u0075\u0076\u00ED\u010D\u0065\u0073\u006B\u0079","Proprostnemluvesky-uyb24dma41a"),
+    E("Hebrew","\u05DC\u05DE\u05D4\u05D4\u05DD\u05E4\u05E9\u05D5\u05D8\u05DC\u05D0\u05DE\u05D3\u05D1\u05E8\u05D9\u05DD\u05E2\u05D1\u05E8\u05D9\u05EA","4dbcagdahymbxekheh6e0a7fei0b"),
+    F("Hindi (Devanagari)","\u092F\u0939\u0932\u094B\u0917\u0939\u093F\u0928\u094D\u0926\u0940\u0915\u094D\u092F\u094B\u0902\u0928\u0939\u0940\u0902\u092C\u094B\u0932\u0938\u0915\u0924\u0947\u0939\u0948\u0902","i1baa7eci9glrd9b2ae1bj0hfcgg6iyaf8o0a1dig0cd"),
+    G("Japanese (kanji and hiragana)","\u306A\u305C\u307F\u3093\u306A\u65E5\u672C\u8A9E\u3092\u8A71\u3057\u3066\u304F\u308C\u306A\u3044\u306E\u304B","n8jok5ay5dzabd5bym9f0cm5685rrjetr6pdxa"),
+    H("Korean (Hangul syllables)","\uC138\uACC4\uC758\uBAA8\uB4E0\uC0AC\uB78C\uB4E4\uC774\uD55C\uAD6D\uC5B4\uB97C\uC774\uD574\uD55C\uB2E4\uBA74\uC5BC\uB9C8\uB098\uC88B\uC744\uAE4C","989aomsvi5e83db1d2a355cv1e0vak1dwrv93d5xbh15a0dt30a5jpsd879ccm6fea98c"),
+    I("Russian (Cyrillic)","\u043F\u043E\u0447\u0435\u043C\u0443\u0436\u0435\u043E\u043D\u0438\u043D\u0435\u0433\u043E\u0432\u043E\u0440\u044F\u0442\u043F\u043E\u0440\u0443\u0441\u0441\u043A\u0438","b1abfaaepdrnnbgefbadotcwatmq2g4l"),
+    J("Spanish Porqu<eacute>nopuedensimplementehablarenEspa<ntilde>ol","\u0050\u006F\u0072\u0071\u0075\u00E9\u006E\u006F\u0070\u0075\u0065\u0064\u0065\u006E\u0073\u0069\u006D\u0070\u006C\u0065\u006D\u0065\u006E\u0074\u0065\u0068\u0061\u0062\u006C\u0061\u0072\u0065\u006E\u0045\u0073\u0070\u0061\u00F1\u006F\u006C","PorqunopuedensimplementehablarenEspaol-fmd56a"),    
+    K("Vietnamese","\u0054\u1EA1\u0069\u0073\u0061\u006F\u0068\u1ECD\u006B\u0068\u00F4\u006E\u0067\u0074\u0068\u1EC3\u0063\u0068\u1EC9\u006E\u00F3\u0069\u0074\u0069\u1EBF\u006E\u0067\u0056\u0069\u1EC7\u0074","TisaohkhngthchnitingVit-kjcr8268qyxafd2f1b9g"),
+    L("3<nen>B<gumi><kinpachi><sensei>","\u0033\u5E74\u0042\u7D44\u91D1\u516B\u5148\u751F","3B-ww4c5e180e575a65lsy2b"),
+    M("<amuro><namie>-with-SUPER-MONKEYS","\u5B89\u5BA4\u5948\u7F8E\u6075\u002D\u0077\u0069\u0074\u0068\u002D\u0053\u0055\u0050\u0045\u0052\u002D\u004D\u004F\u004E\u004B\u0045\u0059\u0053","-with-SUPER-MONKEYS-pc58ag80a8qai00g7n9n"),
+    N("Hello-Another-Way-<sorezore><no><basho>","\u0048\u0065\u006C\u006C\u006F\u002D\u0041\u006E\u006F\u0074\u0068\u0065\u0072\u002D\u0057\u0061\u0079\u002D\u305D\u308C\u305E\u308C\u306E\u5834\u6240","Hello-Another-Way--fc4qua05auwb3674vfr0b"),
+    O("<hitotsu><yane><no><shita>2","\u3072\u3068\u3064\u5C4B\u6839\u306E\u4E0B\u0032","2-u9tlzr9756bt3uc0v"),
+    P("Maji<de>Koi<suru>5<byou><mae>","\u004D\u0061\u006A\u0069\u3067\u004B\u006F\u0069\u3059\u308B\u0035\u79D2\u524D","MajiKoi5-783gue6qz075azm5e"),
+    Q("<pafii>de<runba>","\u30D1\u30D5\u30A3\u30FC\u0064\u0065\u30EB\u30F3\u30D0","de-jg4avhby1noc0d"),
+    R("<sono><supiido><de>","\u305D\u306E\u30B9\u30D4\u30FC\u30C9\u3067","d9juau41awczczp"), 
+    S("-> $1.00 <-","\u002D\u003E\u0020\u0024\u0031\u002E\u0030\u0030\u0020\u003C\u002D","-> $1.00 <--")    ;
+    
+    String name;
+    String in;
+    String out;
+    int rc;
+    
+    Test(String name, String in, String out) {
+      this(name,in,out,0);
+    }
+    
+    Test(String name, String in, String out, int rc) {
+      this.name = name;
+      this.in = in;
+      this.out = out;
+      this.rc = rc;
+    }
+  }
+  
+  public static void testPunycode() throws Exception {
+    
+    for (Test test: Test.values()) {
+      String out = Punycode.encode(test.in);
+      String in = Punycode.decode(out);
+      if (!out.equals(test.out)) fail("Failure in test #" + test);
+      if (!in.equals(test.in)) fail("Failure in test #" + test);
+    }
+    
+  }
+}

Added: incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestSuite.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestSuite.java?view=auto&rev=521094
==============================================================================
--- incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestSuite.java (added)
+++ incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestSuite.java Wed Mar 21 20:00:19 2007
@@ -0,0 +1,34 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  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.  For additional information regarding
+* copyright in this work, please see the NOTICE file in the top level
+* directory of this distribution.
+*/
+package org.apache.abdera.i18n.test.iri;
+
+
+public class TestSuite extends junit.framework.TestSuite {
+  public static void main(String[] args) {
+    junit.textui.TestRunner.run(new TestSuite());
+  }
+
+  public TestSuite() {
+    addTestSuite(TestIDNA.class);
+    addTestSuite(TestIRI.class);
+    addTestSuite(TestLang.class);
+    addTestSuite(TestNameprep.class);
+    addTestSuite(TestNFKC.class);
+    addTestSuite(TestPunycode.class);
+  }
+}

Modified: incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/appclient/Main.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/appclient/Main.java?view=diff&rev=521094&r1=521093&r2=521094
==============================================================================
--- incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/appclient/Main.java (original)
+++ incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/appclient/Main.java Wed Mar 21 20:00:19 2007
@@ -29,7 +29,7 @@
 import org.apache.abdera.model.Service;
 import org.apache.abdera.protocol.client.Client;
 import org.apache.abdera.protocol.client.CommonsClient;
-import org.apache.abdera.g14n.iri.IRI;
+import org.apache.abdera.i18n.iri.IRI;
 
 
 public class Main {

Modified: incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/appserver/SimpleProvider.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/appserver/SimpleProvider.java?view=diff&rev=521094&r1=521093&r2=521094
==============================================================================
--- incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/appserver/SimpleProvider.java (original)
+++ incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/appserver/SimpleProvider.java Wed Mar 21 20:00:19 2007
@@ -42,7 +42,7 @@
 import org.apache.abdera.protocol.server.provider.ResponseContext;
 import org.apache.abdera.protocol.server.provider.TargetType;
 import org.apache.abdera.util.MimeTypeHelper;
-import org.apache.abdera.g14n.iri.IRI;
+import org.apache.abdera.i18n.iri.IRI;
 import org.apache.axiom.om.util.Base64;
 
 public class SimpleProvider 

Modified: incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/simple/Create.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/simple/Create.java?view=diff&rev=521094&r1=521093&r2=521094
==============================================================================
--- incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/simple/Create.java (original)
+++ incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/simple/Create.java Wed Mar 21 20:00:19 2007
@@ -28,7 +28,7 @@
 import org.apache.abdera.model.Content;
 import org.apache.abdera.model.Entry;
 import org.apache.abdera.model.Feed;
-import org.apache.abdera.g14n.iri.IRI;
+import org.apache.abdera.i18n.iri.IRI;
 
 
 public class Create {

Modified: incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/bidi/BidiHelper.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/bidi/BidiHelper.java?view=diff&rev=521094&r1=521093&r2=521094
==============================================================================
--- incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/bidi/BidiHelper.java (original)
+++ incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/bidi/BidiHelper.java Wed Mar 21 20:00:19 2007
@@ -21,7 +21,7 @@
 
 import org.apache.abdera.model.Base;
 import org.apache.abdera.model.Element;
-import org.apache.abdera.g14n.io.CharUtils;
+import org.apache.abdera.i18n.io.CharUtils;
 
 /**
  * <p>This is (hopefully) temporary.  Ideally, this would be wrapped into the 

Modified: incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/features/Control.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/features/Control.java?view=diff&rev=521094&r1=521093&r2=521094
==============================================================================
--- incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/features/Control.java (original)
+++ incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/features/Control.java Wed Mar 21 20:00:19 2007
@@ -20,8 +20,8 @@
 import javax.xml.namespace.QName;
 
 import org.apache.abdera.factory.Factory;
-import org.apache.abdera.g14n.iri.IRI;
-import org.apache.abdera.g14n.iri.IRISyntaxException;
+import org.apache.abdera.i18n.iri.IRI;
+import org.apache.abdera.i18n.iri.IRISyntaxException;
 import org.apache.abdera.model.Element;
 import org.apache.abdera.model.ExtensibleElementWrapper;
 

Modified: incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/features/Feature.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/features/Feature.java?view=diff&rev=521094&r1=521093&r2=521094
==============================================================================
--- incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/features/Feature.java (original)
+++ incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/features/Feature.java Wed Mar 21 20:00:19 2007
@@ -20,8 +20,8 @@
 import javax.xml.namespace.QName;
 
 import org.apache.abdera.factory.Factory;
-import org.apache.abdera.g14n.iri.IRI;
-import org.apache.abdera.g14n.iri.IRISyntaxException;
+import org.apache.abdera.i18n.iri.IRI;
+import org.apache.abdera.i18n.iri.IRISyntaxException;
 import org.apache.abdera.model.Element;
 import org.apache.abdera.model.ExtensibleElementWrapper;
 

Modified: incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/features/FeaturesHelper.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/features/FeaturesHelper.java?view=diff&rev=521094&r1=521093&r2=521094
==============================================================================
--- incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/features/FeaturesHelper.java (original)
+++ incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/features/FeaturesHelper.java Wed Mar 21 20:00:19 2007
@@ -22,8 +22,8 @@
 import javax.xml.namespace.QName;
 
 import org.apache.abdera.factory.Factory;
-import org.apache.abdera.g14n.iri.IRI;
-import org.apache.abdera.g14n.iri.IRISyntaxException;
+import org.apache.abdera.i18n.iri.IRI;
+import org.apache.abdera.i18n.iri.IRISyntaxException;
 import org.apache.abdera.model.Collection;
 import org.apache.abdera.model.Element;
 
@@ -36,6 +36,33 @@
   public static final String FNS = "http://purl.org/atompub/features/1.0";
   public static final QName FEATURE = new QName(FNS, "feature","f");
   public static final QName CONTROL = new QName(FNS, "control","f");
+  
+  public static final String FEATURE_DRAFTS = "http://purl.org/atom/app#drafts";
+  public static final String FEATURE_PRESERVE_ENTRY = "http://purl.org/atom/app#preserve-entry";
+  public static final String FEATURE_PRESERVE_ID = "http://purl.org/atom/app#preserve-id";
+  public static final String FEATURE_XHTML_CONTENT = "_http://purl.org/atom/app#xhtml-content";
+  public static final String FEATURE_HTML_CONTENT = "http://purl.org/atom/app#html-content";
+  public static final String FEATURE_TEXT_CONTENT = "http://purl.org/atom/app#text-content";
+  public static final String FEATURE_BINARY_CONTENT = "http://purl.org/atom/app#binary-content";
+  public static final String FEATURE_REF_CONTENT = "http://purl.org/atom/app#ref-content";
+  public static final String FEATURE_XHTML_TITLE = "http://purl.org/atom/app#xhtml-title";
+  public static final String FEATURE_HTML_TITLE = "http://purl.org/atom/app#html-title";
+  public static final String FEATURE_TEXT_TITLE = "http://purl.org/atom/app#text-title";
+  public static final String FEATURE_XHTML_SUMMARY = "http://purl.org/atom/app#xhtml-summary";
+  public static final String FEATURE_HTML_SUMMARY = "http://purl.org/atom/app#html-summary";
+  public static final String FEATURE_TEXT_SUMMARY = "http://purl.org/atom/app#text-summary";
+  public static final String FEATURE_AUTO_SUMMARY = "http://purl.org/atom/app#auto-summary";
+  public static final String FEATURE_XHTML_RIGHTS = "http://purl.org/atom/app#xhtml-rights";
+  public static final String FEATURE_HTML_RIGHTS = "http://purl.org/atom/app#html-rights";
+  public static final String FEATURE_TEXT_RIGHTS = "http://purl.org/atom/app#text-rights";
+  public static final String FEATURE_AUTH_AUTHOR = "http://purl.org/atom/app#auth-author";
+  public static final String FEATURE_PRESERVE_UPDATED = "http://purl.org/atom/app#preserve-updated";
+  public static final String FEATURE_PRESERVE_EXTENSIONS = "http://purl.org/atom/app#preserve-extensions";
+  public static final String FEATURE_PRESERVE_LINKS = "http://purl.org/atom/app#preserve-links";
+  public static final String FEATURE_SLUG = "http://purl.org/atom/app#slug";
+  public static final String FEATURE_MULTIPLE_CATEGORIES= "http://purl.org/atom/app#multiple-categories";
+  public static final String FEATURE_CONTRIBUTORS = "http://purl.org/atom/app#contributors";
+  public static final String FEATURE_MULTIPLE_AUTHORS = "http://purl.org/atom/app#multiple-authors";
   
   private FeaturesHelper() {}
   

Modified: incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/history/FeedPagingHelper.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/history/FeedPagingHelper.java?view=diff&rev=521094&r1=521093&r2=521094
==============================================================================
--- incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/history/FeedPagingHelper.java (original)
+++ incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/history/FeedPagingHelper.java Wed Mar 21 20:00:19 2007
@@ -22,8 +22,8 @@
 import org.apache.abdera.model.Element;
 import org.apache.abdera.model.Feed;
 import org.apache.abdera.model.Link;
-import org.apache.abdera.g14n.iri.IRI;
-import org.apache.abdera.g14n.iri.IRISyntaxException;
+import org.apache.abdera.i18n.iri.IRI;
+import org.apache.abdera.i18n.iri.IRISyntaxException;
 
 /**
  * Initial support for Mark Nottingham's Feed Paging and Archiving draft 

Modified: incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/json/JSONWriter.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/json/JSONWriter.java?view=diff&rev=521094&r1=521093&r2=521094
==============================================================================
--- incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/json/JSONWriter.java (original)
+++ incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/json/JSONWriter.java Wed Mar 21 20:00:19 2007
@@ -38,7 +38,7 @@
 import org.apache.abdera.model.Workspace;
 import org.apache.abdera.model.Content.Type;
 import org.apache.abdera.util.AbstractNamedWriter;
-import org.apache.abdera.g14n.iri.IRISyntaxException;
+import org.apache.abdera.i18n.iri.IRISyntaxException;
 import org.apache.abdera.writer.NamedWriter;
 import org.json.JSONArray;
 import org.json.JSONException;

Modified: incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/media/MediaCategory.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/media/MediaCategory.java?view=diff&rev=521094&r1=521093&r2=521094
==============================================================================
--- incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/media/MediaCategory.java (original)
+++ incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/media/MediaCategory.java Wed Mar 21 20:00:19 2007
@@ -22,8 +22,8 @@
 import org.apache.abdera.factory.Factory;
 import org.apache.abdera.model.Element;
 import org.apache.abdera.model.ElementWrapper;
-import org.apache.abdera.g14n.iri.IRI;
-import org.apache.abdera.g14n.iri.IRISyntaxException;
+import org.apache.abdera.i18n.iri.IRI;
+import org.apache.abdera.i18n.iri.IRISyntaxException;
 
 public class MediaCategory extends ElementWrapper {
 

Modified: incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/media/MediaContent.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/media/MediaContent.java?view=diff&rev=521094&r1=521093&r2=521094
==============================================================================
--- incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/media/MediaContent.java (original)
+++ incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/media/MediaContent.java Wed Mar 21 20:00:19 2007
@@ -24,8 +24,8 @@
 import org.apache.abdera.factory.Factory;
 import org.apache.abdera.model.Element;
 import org.apache.abdera.model.ExtensibleElementWrapper;
-import org.apache.abdera.g14n.iri.IRI;
-import org.apache.abdera.g14n.iri.IRISyntaxException;
+import org.apache.abdera.i18n.iri.IRI;
+import org.apache.abdera.i18n.iri.IRISyntaxException;
 
 public class MediaContent 
   extends ExtensibleElementWrapper {

Modified: incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/media/MediaCopyright.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/media/MediaCopyright.java?view=diff&rev=521094&r1=521093&r2=521094
==============================================================================
--- incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/media/MediaCopyright.java (original)
+++ incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/media/MediaCopyright.java Wed Mar 21 20:00:19 2007
@@ -22,8 +22,8 @@
 import org.apache.abdera.factory.Factory;
 import org.apache.abdera.model.Element;
 import org.apache.abdera.model.ElementWrapper;
-import org.apache.abdera.g14n.iri.IRI;
-import org.apache.abdera.g14n.iri.IRISyntaxException;
+import org.apache.abdera.i18n.iri.IRI;
+import org.apache.abdera.i18n.iri.IRISyntaxException;
 
 public class MediaCopyright extends ElementWrapper {
 

Modified: incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/media/MediaCredit.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/media/MediaCredit.java?view=diff&rev=521094&r1=521093&r2=521094
==============================================================================
--- incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/media/MediaCredit.java (original)
+++ incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/media/MediaCredit.java Wed Mar 21 20:00:19 2007
@@ -22,8 +22,8 @@
 import org.apache.abdera.factory.Factory;
 import org.apache.abdera.model.Element;
 import org.apache.abdera.model.ElementWrapper;
-import org.apache.abdera.g14n.iri.IRI;
-import org.apache.abdera.g14n.iri.IRISyntaxException;
+import org.apache.abdera.i18n.iri.IRI;
+import org.apache.abdera.i18n.iri.IRISyntaxException;
 
 public class MediaCredit extends ElementWrapper {
 

Modified: incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/media/MediaPlayer.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/media/MediaPlayer.java?view=diff&rev=521094&r1=521093&r2=521094
==============================================================================
--- incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/media/MediaPlayer.java (original)
+++ incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/media/MediaPlayer.java Wed Mar 21 20:00:19 2007
@@ -22,8 +22,8 @@
 import org.apache.abdera.factory.Factory;
 import org.apache.abdera.model.Element;
 import org.apache.abdera.model.ElementWrapper;
-import org.apache.abdera.g14n.iri.IRI;
-import org.apache.abdera.g14n.iri.IRISyntaxException;
+import org.apache.abdera.i18n.iri.IRI;
+import org.apache.abdera.i18n.iri.IRISyntaxException;
 
 public class MediaPlayer extends ElementWrapper {
 

Modified: incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/media/MediaRating.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/media/MediaRating.java?view=diff&rev=521094&r1=521093&r2=521094
==============================================================================
--- incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/media/MediaRating.java (original)
+++ incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/media/MediaRating.java Wed Mar 21 20:00:19 2007
@@ -20,8 +20,8 @@
 import org.apache.abdera.factory.Factory;
 import org.apache.abdera.model.Element;
 import org.apache.abdera.model.ElementWrapper;
-import org.apache.abdera.g14n.iri.IRI;
-import org.apache.abdera.g14n.iri.IRISyntaxException;
+import org.apache.abdera.i18n.iri.IRI;
+import org.apache.abdera.i18n.iri.IRISyntaxException;
 
 public class MediaRating extends ElementWrapper {
 

Modified: incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/media/MediaThumbnail.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/media/MediaThumbnail.java?view=diff&rev=521094&r1=521093&r2=521094
==============================================================================
--- incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/media/MediaThumbnail.java (original)
+++ incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/media/MediaThumbnail.java Wed Mar 21 20:00:19 2007
@@ -22,8 +22,8 @@
 import org.apache.abdera.factory.Factory;
 import org.apache.abdera.model.Element;
 import org.apache.abdera.model.ElementWrapper;
-import org.apache.abdera.g14n.iri.IRI;
-import org.apache.abdera.g14n.iri.IRISyntaxException;
+import org.apache.abdera.i18n.iri.IRI;
+import org.apache.abdera.i18n.iri.IRISyntaxException;
 
 public class MediaThumbnail extends ElementWrapper {
 

Modified: incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/InReplyTo.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/InReplyTo.java?view=diff&rev=521094&r1=521093&r2=521094
==============================================================================
--- incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/InReplyTo.java (original)
+++ incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/InReplyTo.java Wed Mar 21 20:00:19 2007
@@ -23,8 +23,8 @@
 import org.apache.abdera.factory.Factory;
 import org.apache.abdera.model.Element;
 import org.apache.abdera.model.ElementWrapper;
-import org.apache.abdera.g14n.iri.IRI;
-import org.apache.abdera.g14n.iri.IRISyntaxException;
+import org.apache.abdera.i18n.iri.IRI;
+import org.apache.abdera.i18n.iri.IRISyntaxException;
 
 public class InReplyTo 
   extends ElementWrapper {



Mime
View raw message