org.springframework.extensions.jcr
Class JcrUtils.ISO9075

java.lang.Object
  extended by org.springframework.extensions.jcr.JcrUtils.ISO9075
Enclosing class:
JcrUtils

protected static class JcrUtils.ISO9075
extends java.lang.Object

Class used for escaping XML names which contain restricted character as defined in the JCR spec version 1.0 Section 6.2.5.2. (i.e. "/", ":", "[", "]", "*", "'", """, "|", and all whitespace characters other than " "). The escaping schema used is described in the same document in paragraphs 6.4.3 and 6.4.4. The class was initially imported from the Jackrabbit project. 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) + '_'


Constructor Summary
protected JcrUtils.ISO9075()
           
 
Method Summary
 java.lang.String decode(java.lang.String name)
          Decodes the name.
 java.lang.String encode(java.lang.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
 

Constructor Detail

JcrUtils.ISO9075

protected JcrUtils.ISO9075()
Method Detail

encode

public java.lang.String encode(java.lang.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 java.lang.String decode(java.lang.String name)
Decodes the name.

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


Copyright © 2009. All Rights Reserved.