org.jibx.extras
Class QName

java.lang.Object
  extended by org.jibx.extras.QName

public class QName
extends java.lang.Object

Representation of a qualified name. This includes the serializer/deserializer methods for the representation. It assumes that the actual namespace declarations are being handled separately for marshalling.

Author:
Dennis M. Sosnoski

Constructor Summary
QName()
          Default constructor.
QName(java.lang.String uri, java.lang.String prefix, java.lang.String name)
          Constructor from full set of components.
 
Method Summary
static QName deserialize(java.lang.String text, IUnmarshallingContext ictx)
          JiBX deserializer method.
 java.lang.String getName()
          Get local name.
 java.lang.String getPrefix()
          Get namespace prefix.
 java.lang.String getUri()
          Get namespace URI.
static java.lang.String serialize(QName qname, IMarshallingContext ictx)
          JiBX serializer method.
 void setName(java.lang.String name)
          Set local name.
 void setPrefix(java.lang.String prefix)
          Set namespace prefix.
 void setUri(java.lang.String uri)
          Set namespace URI.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QName

public QName()
Default constructor.


QName

public QName(java.lang.String uri,
             java.lang.String prefix,
             java.lang.String name)
Constructor from full set of components.

Parameters:
uri -
prefix -
name -
Method Detail

getName

public java.lang.String getName()
Get local name.

Returns:
name

setName

public void setName(java.lang.String name)
Set local name.

Parameters:
name - name

getPrefix

public java.lang.String getPrefix()
Get namespace prefix.

Returns:
prefix

setPrefix

public void setPrefix(java.lang.String prefix)
Set namespace prefix.

Parameters:
prefix - prefix

getUri

public java.lang.String getUri()
Get namespace URI.

Returns:
uri

setUri

public void setUri(java.lang.String uri)
Set namespace URI.

Parameters:
uri - uri

deserialize

public static QName deserialize(java.lang.String text,
                                IUnmarshallingContext ictx)
                         throws JiBXException
JiBX deserializer method. This is intended for use as a deserializer for instances of the class.

Parameters:
text - value text
ictx - unmarshalling context
Returns:
created class instance
Throws:
JiBXException - on error in unmarshalling

serialize

public static java.lang.String serialize(QName qname,
                                         IMarshallingContext ictx)
                                  throws JiBXException
JiBX serializer method. This is intended for use as a serializer for instances of the class. The namespace must be active in the output document at the point where this is called.

Parameters:
qname - instance to be serialized
ictx - unmarshalling context
Returns:
created class instance
Throws:
JiBXException - on error in marshalling


Project Web Site