QNameHelper (xmlbeans API)

org.apache.xmlbeans.impl.common

## Class QNameHelper

- java.lang.Object
- - org.apache.xmlbeans.impl.common.QNameHelper

-     public class QNameHelper
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `MAX_NAME_LENGTH`
    `static String` | `URI_SHA1_PREFIX`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `QNameHelper()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static QName` | `forLN(String localname)`
    `static QName` | `forLNS(String localname, String uri)`
    `static QName` | `forPretty(String pretty, int offset)`
    `static String` | `getLocalPart(String qname)` Returns the local name of the given node.
    `static String` | `getPrefixPart(String qname)` Returns the local name of the given node.
    `static XMLName` | `getXMLName(QName qname)`
    `static String` | `hexsafe(String s)`
    `static String` | `hexsafedir(QName name)`
    `static String` | `namespace(SchemaType sType)`
    `static String` | `pretty(QName name)`
    `static String` | `readable(QName name)`
    `static String` | `readable(QName name, Map<String,String> prefixes)`
    `static String` | `readable(SchemaType sType)`
    `static String` | `readable(SchemaType sType, Map<String,String> nsPrefix)`
    `static String` | `suggestPrefix(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 String URI_SHA1_PREFIX

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### QNameHelper

          public QNameHelper()

  - ### Method Detail

    - #### getXMLName

          public static XMLName getXMLName(QName qname)

    - #### forLNS

          public static QName forLNS(String localname,
                                     String uri)

    - #### forLN

          public static QName forLN(String localname)

    - #### forPretty

          public static QName forPretty(String pretty,
                                        int offset)

    - #### pretty

          public static String pretty(QName name)

    - #### hexsafe

          public static String hexsafe(String s)

    - #### hexsafedir

          public static String hexsafedir(QName name)

    - #### readable

          public static String readable(SchemaType sType)

    - #### readable

          public static String readable(SchemaType sType,
                                        Map<String,String> nsPrefix)

    - #### readable

          public static String readable(QName name)

    - #### readable

          public static String readable(QName name,
                                        Map<String,String> prefixes)

    - #### suggestPrefix

          public static String suggestPrefix(String namespace)

    - #### namespace

          public static String namespace(SchemaType sType)

    - #### getLocalPart

          public static String getLocalPart(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 String getPrefixPart(String qname)

      Returns the local name of the given node.
      Parameters:
        `qname` - Input name
      Returns:
        Prefix of name or empty string if none there