Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.core.schema.types
Class QName

java.lang.Object
  extended by org.nuxeo.ecm.core.schema.types.QName
All Implemented Interfaces:
java.io.Serializable

public class QName
extends java.lang.Object
implements java.io.Serializable

Author:
Bogdan Stefanescu
See Also:
Serialized Form

Constructor Summary
QName(java.lang.String localName)
          Creates a QName without prefix (e.g. with the default prefix : "").
QName(java.lang.String localName, java.lang.String prefix)
          Creates a QName having the given local name and prefix.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getLocalName()
           
 java.lang.String getPrefix()
           
 java.lang.String getPrefixedName()
           
 int hashCode()
           
 java.lang.String toString()
           
static QName valueOf(java.lang.String name)
          Parses the given name and creates the corresponding QName.
static QName valueOf(java.lang.String name, java.lang.String prefix)
          Parses the given name and create the corresponding QName.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QName

public QName(java.lang.String localName)
Creates a QName without prefix (e.g. with the default prefix : "").

Parameters:
localName - the local name

QName

public QName(java.lang.String localName,
             java.lang.String prefix)
Creates a QName having the given local name and prefix.

Parameters:
localName -
prefix -
Method Detail

getLocalName

public final java.lang.String getLocalName()

getPrefixedName

public final java.lang.String getPrefixedName()

getPrefix

public final java.lang.String getPrefix()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

valueOf

public static QName valueOf(java.lang.String name)
Parses the given name and creates the corresponding QName.

If the given name is not prefixed then the default prefix (e.g. "") will be used (i.e. the name will remain unprefixed).

Parameters:
name - the name in the prefixed form
Returns:
the qname

valueOf

public static QName valueOf(java.lang.String name,
                            java.lang.String prefix)
Parses the given name and create the corresponding QName.

If the given name is not prefixed then the given prefix will be used.

Parameters:
name -
prefix -
Returns:

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.