public class QName extends Object
Representation of a qualified name. This includes the JiBX serializer/deserializer methods for the representation. It assumes that the actual namespace declarations are being handled separately for marshalling
Note that this implementation treats only the namespace and local name as significant for purposes of comparing values. The prefix is held only as a convenience, and the actual prefix used when writing a value may differ from the prefix defined by the instance.
| Constructor and Description |
|---|
QName(String name)
Constructor from local name only.
|
QName(String uri,
String name)
Constructor from namespace and local name.
|
QName(String uri,
String prefix,
String name)
Constructor from full set of components.
|
| Modifier and Type | Method and Description |
|---|---|
static QName |
deserialize(String text,
IUnmarshallingContext ictx)
JiBX deserializer method.
|
static QName[] |
deserializeList(String text,
IUnmarshallingContext ictx)
JiBX deserializer method.
|
boolean |
equals(Object obj) |
String |
getName()
Get local name.
|
String |
getPrefix()
Get namespace prefix.
|
String |
getUri()
Get namespace URI.
|
int |
hashCode() |
static String |
serialize(QName qname,
IMarshallingContext ictx)
JiBX serializer method.
|
static String |
serializeList(QName[] qnames,
IMarshallingContext ictx)
JiBX serializer method.
|
void |
setName(String name)
Set local name.
|
void |
setPrefix(String prefix)
Set namespace prefix.
|
void |
setUri(String uri)
Set namespace URI.
|
String |
toString() |
public QName(String uri, String prefix, String name)
uri - namespace uri, null if no-namespace namespaceprefix - namespace prefix, null if unspecified, empty
string if default namespacename - local namepublic QName(String uri, String name)
uri - namespace uri, null if no-namespace namespacename - public QName(String name)
name - public String getName()
public void setName(String name)
name - namepublic String getPrefix()
null if unspecified, empty string if default
namespacepublic void setPrefix(String prefix)
prefix - prefix, null if unspecified, empty string if
default namespacepublic String getUri()
null if no-namespace namespacepublic void setUri(String uri)
uri - namespace uri, null if no-namespace namespacepublic static QName deserialize(String text, IUnmarshallingContext ictx) throws JiBXException
text - value textictx - unmarshalling contextJiBXException - on error in unmarshallingpublic static String serialize(QName qname, IMarshallingContext ictx) throws JiBXException
qname - value to be serializedictx - unmarshalling contextJiBXException - on error in marshallingpublic static QName[] deserializeList(String text, IUnmarshallingContext ictx) throws JiBXException
text - value textictx - unmarshalling contextJiBXException - on error in marshallingpublic static String serializeList(QName[] qnames, IMarshallingContext ictx) throws JiBXException
qnames - array of names to be serializedictx - unmarshalling contextJiBXException - on error in marshallingCopyright © 2005-2014 jibx.org. All Rights Reserved.