org.apache.xmlbeans.impl.common
Class QNameHelper

java.lang.Object
  extended by org.apache.xmlbeans.impl.common.QNameHelper

public class QNameHelper
extends java.lang.Object


Field Summary
static int MAX_NAME_LENGTH
           
static java.lang.String URI_SHA1_PREFIX
           
 
Constructor Summary
QNameHelper()
           
 
Method Summary
static javax.xml.namespace.QName forLN(java.lang.String localname)
           
static javax.xml.namespace.QName forLNS(java.lang.String localname, java.lang.String uri)
           
static javax.xml.namespace.QName forPretty(java.lang.String pretty, int offset)
           
static java.lang.String getLocalPart(java.lang.String qname)
          Returns the local name of the given node.
static java.lang.String getPrefixPart(java.lang.String qname)
          Returns the local name of the given node.
static XMLName getXMLName(javax.xml.namespace.QName qname)
           
static java.lang.String hexsafe(java.lang.String s)
           
static java.lang.String hexsafedir(javax.xml.namespace.QName name)
           
static java.lang.String namespace(SchemaType sType)
           
static java.lang.String pretty(javax.xml.namespace.QName name)
           
static java.lang.String readable(javax.xml.namespace.QName name)
           
static java.lang.String readable(javax.xml.namespace.QName name, java.util.Map prefixes)
           
static java.lang.String readable(SchemaType sType)
           
static java.lang.String readable(SchemaType sType, java.util.Map nsPrefix)
           
static java.lang.String suggestPrefix(java.lang.String namespace)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_NAME_LENGTH

public static final int MAX_NAME_LENGTH
See Also:
Constant Field Values

URI_SHA1_PREFIX

public static final java.lang.String URI_SHA1_PREFIX
See Also:
Constant Field Values
Constructor Detail

QNameHelper

public QNameHelper()
Method Detail

getXMLName

public static XMLName getXMLName(javax.xml.namespace.QName qname)

forLNS

public static javax.xml.namespace.QName forLNS(java.lang.String localname,
                                               java.lang.String uri)

forLN

public static javax.xml.namespace.QName forLN(java.lang.String localname)

forPretty

public static javax.xml.namespace.QName forPretty(java.lang.String pretty,
                                                  int offset)

pretty

public static java.lang.String pretty(javax.xml.namespace.QName name)

hexsafe

public static java.lang.String hexsafe(java.lang.String s)

hexsafedir

public static java.lang.String hexsafedir(javax.xml.namespace.QName name)

readable

public static java.lang.String readable(SchemaType sType)

readable

public static java.lang.String readable(SchemaType sType,
                                        java.util.Map nsPrefix)

readable

public static java.lang.String readable(javax.xml.namespace.QName name)

readable

public static java.lang.String readable(javax.xml.namespace.QName name,
                                        java.util.Map prefixes)

suggestPrefix

public static java.lang.String suggestPrefix(java.lang.String namespace)

namespace

public static java.lang.String namespace(SchemaType sType)

getLocalPart

public static java.lang.String getLocalPart(java.lang.String qname)
Returns the local name of the given node.

Parameters:
qname - Input name
Returns:
Local part of the name if prefixed, or the given name if not

getPrefixPart

public static java.lang.String getPrefixPart(java.lang.String qname)
Returns the local name of the given node.

Parameters:
qname - Input name
Returns:
Prefix of name or empty string if none there