org.jibx.schema.support
Class QNameConverter

java.lang.Object
  extended by org.jibx.schema.support.QNameConverter

public class QNameConverter
extends java.lang.Object

Qualified name serializer/deserializer for use in schema definitions. This uses special handling for values using the default namespace, checking if the schema being processed is a no-namespace schema being included into a schema with a namespace. If it is, the including namespace is used as the default.

Author:
Dennis M. Sosnoski

Constructor Summary
QNameConverter()
           
 
Method Summary
static QName deserialize(java.lang.String text, IUnmarshallingContext ictx)
          Qualified name deserializer method for use within schema definitions.
static QName[] deserializeList(java.lang.String text, IUnmarshallingContext ictx)
          Qualified name list deserializer method for use within schema definitions.
static java.lang.String serialize(QName qname, IMarshallingContext ictx)
          Qualified name serializer method for use within schema definitions.
static java.lang.String serializeList(QName[] qnames, IMarshallingContext ictx)
          Qualified name list serializer method for use within schema definitions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QNameConverter

public QNameConverter()
Method Detail

deserialize

public static QName deserialize(java.lang.String text,
                                IUnmarshallingContext ictx)
                         throws JiBXException
Qualified name deserializer method for use within schema definitions.

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
Qualified name serializer method for use within schema definitions.

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

deserializeList

public static QName[] deserializeList(java.lang.String text,
                                      IUnmarshallingContext ictx)
                               throws JiBXException
Qualified name list deserializer method for use within schema definitions.

Parameters:
text - value text
ictx - unmarshalling context
Returns:
array of instances
Throws:
JiBXException - on error in marshalling

serializeList

public static java.lang.String serializeList(QName[] qnames,
                                             IMarshallingContext ictx)
                                      throws JiBXException
Qualified name list serializer method for use within schema definitions.

Parameters:
qnames - array of names to be serialized
ictx - unmarshalling context
Returns:
generated text
Throws:
JiBXException - on error in marshalling


Project Web Site