org.ow2.orchestra.common.gwt.utils.client.model
Class GwtQName

java.lang.Object
  extended by org.ow2.orchestra.common.gwt.utils.client.model.GwtQName
All Implemented Interfaces:
com.google.gwt.user.client.rpc.IsSerializable

public class GwtQName
extends Object
implements com.google.gwt.user.client.rpc.IsSerializable

Author:
Loic Albertin

Field Summary
static String DEFAULT_NS_PREFIX
           
static String NULL_NS_URI
           
 
Constructor Summary
GwtQName()
          Default no-args constructor for serialization
GwtQName(String localPart)
          GwtQName constructor specifying the local part.
GwtQName(String namespaceURI, String localPart)
          GwtQName constructor specifying the Namespace URI and local part.
GwtQName(String namespaceURI, String localPart, String prefix)
          QName constructor specifying the Namespace URI, local part and prefix.
 
Method Summary
 boolean equals(Object objectToTest)
           
 String getLocalPart()
          Get the local part of this QName.
 String getNamespaceURI()
          Get the Namespace URI of this QName.
 String getPrefix()
          Get the prefix of this QName.
 int hashCode()
           
 void setLocalPart(String localPart)
           
 void setNamespaceURI(String namespaceURI)
           
 void setPrefix(String prefix)
           
 String toString()
          String representation of this QName.
static GwtQName valueOf(String qNameAsString)
          QName derived from parsing the formatted String.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_NS_PREFIX

public static final String DEFAULT_NS_PREFIX
See Also:
Constant Field Values

NULL_NS_URI

public static final String NULL_NS_URI
See Also:
Constant Field Values
Constructor Detail

GwtQName

public GwtQName()
Default no-args constructor for serialization


GwtQName

public GwtQName(String namespaceURI,
                String localPart)

GwtQName constructor specifying the Namespace URI and local part.

Parameters:
namespaceURI - Namespace URI of the GwtQName
localPart - local part of the GwtQName

GwtQName

public GwtQName(String namespaceURI,
                String localPart,
                String prefix)

QName constructor specifying the Namespace URI, local part and prefix.

Parameters:
namespaceURI - Namespace URI of the QName
localPart - local part of the QName
prefix - prefix of the QName
Throws:
IllegalArgumentException - When localPart or prefix is null

GwtQName

public GwtQName(String localPart)

GwtQName constructor specifying the local part.

Parameters:
localPart - local part of the QName
Throws:
IllegalArgumentException - When localPart is null
Method Detail

getNamespaceURI

public String getNamespaceURI()

Get the Namespace URI of this QName.

Returns:
Namespace URI of this QName

getLocalPart

public String getLocalPart()

Get the local part of this QName.

Returns:
local part of this QName

getPrefix

public String getPrefix()

Get the prefix of this QName.

The prefix assigned to a QName might NOT be valid in a different context. For example, a QName may be assigned a prefix in the context of parsing a document but that prefix may be invalid in the context of a different document.

Returns:
prefix of this QName

equals

public final boolean equals(Object objectToTest)
Overrides:
equals in class Object

hashCode

public final int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()

String representation of this QName.

Overrides:
toString in class Object
Returns:
String representation of this QName

valueOf

public static GwtQName valueOf(String qNameAsString)

QName derived from parsing the formatted String.

Parameters:
qNameAsString - String representation of the QName
Returns:
QName corresponding to the given String
Throws:
IllegalArgumentException - When qNameAsString is null or malformed

setNamespaceURI

public void setNamespaceURI(String namespaceURI)

setLocalPart

public void setLocalPart(String localPart)

setPrefix

public void setPrefix(String prefix)


Copyright © 2012 OW2 Consortium. All Rights Reserved.