org.apache.jackrabbit.util
Class ISO9075

java.lang.Object
  extended byorg.apache.jackrabbit.util.ISO9075

public class ISO9075
extends Object

Implements the encode and decode routines as specified for XML name to SQL identifier conversion in ISO 9075-14:2003.
If a character c is not valid at a certain position in an XML 1.0 NCName it is encoded in the form: '_x' + hexValueOf(c) + '_'

Note that only the local part of a QName is encoded / decoded. A URI namespace will always be valid and does not need encoding.


Method Summary
static QName decode(QName name)
          Decodes the name.
static String decode(String name)
          Decodes the name.
static QName encode(QName name)
          Encodes the local part of name as specified in ISO 9075.
static String encode(String name)
          Encodes name as specified in ISO 9075.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

encode

public static QName encode(QName name)
Encodes the local part of name as specified in ISO 9075.

Parameters:
name - the QName to encode.
Returns:
the encoded QName or name if it does not need encoding.

encode

public static String encode(String name)
Encodes name as specified in ISO 9075.

Parameters:
name - the String to encode.
Returns:
the encoded String or name if it does not need encoding.

decode

public static QName decode(QName name)
Decodes the name.

Parameters:
name - the QName to decode.
Returns:
the decoded QName.

decode

public static String decode(String name)
Decodes the name.

Parameters:
name - the String to decode.
Returns:
the decoded String.


Copyright © 2004-2006 The Apache Software Foundation. All Rights Reserved.