IT_Bus::QName Class Reference

#include <it_bus/qname.h>

List of all members.


Detailed Description

The QName class represents a qualified name as defined in the XML specifications.

Definition at line 27 of file qname.h.

Public Member Functions

 QName ()
 No argument constructor.
 QName (const QName &name)
 Copy constructor.
 QName (const String &namespace_prefix, const String &local_part, const String &namespace_uri)
 Constructor.
 QName (const String &raw_name, const String &namespace_uri=String::EMPTY)
 Constructor.
 ~QName ()
 Destructor.
void assign (const String &raw_name, const String &namespace_uri=String::EMPTY)
 Reinitialize the instance using the prefix:local_part and namespace URI provided as arguments.
QNameoperator= (const QName &rhs)
 Assignment operator.
const Stringget_namespace_prefix () const
 Return the namespace prefix for the QName instance.
const Stringget_local_part () const
 Return the local part for the QName instance.
const Stringget_namespace_uri () const
 Return the namespace URI for the QName instance.
const String get_raw_name () const
 Return the prefix:local_part for the QName instance.
const String get_raw_name (const PrefixResolver &resolver) const
 Return prefix:local_part for the QName instance, but using prefix returned by the resolver for the QNames namespace URI.
const String to_string () const
 Return a string representation of the raw name and namespace declaration.
const String get_as_string_uri () const
 Return a string representation of in the form namespace_uri:localpart.
const String get_as_canonical_string () const
 Return a string in the canonical format specified by javax.xml.namespace.QName.
bool has_unresolved_prefix () const
 Return an indicator of whether the QName has a prefix value without a namespace URI value.
bool operator== (const QName &rhs) const
 Equality operator.
bool operator!= (const QName &rhs) const
 Inequality operator.
bool empty () const
 True if QName is empty.
void set_local_part (const String &)
 Set the local part to the value supplied as the argument.
void set_namespace_prefix (const String &)
 Set the namespace prefix to the value supplied as the argument.
void set_namespace_uri (const String &)
 Set the namespace URI to the value supplied as the argument.

Static Public Member Functions

static QName make_qname_from_canonical_string (const String qname_str) throw ((IT_Bus::Exception))
 Parse a String containing as QName in the canonical format specified by javax.xml.namespace.QName.

Static Public Attributes

static const QName EMPTY_QNAME
static const QName ITEM_QNAME

Private Attributes

QNameBody * m_body


Constructor & Destructor Documentation

IT_Bus::QName::QName ( const String namespace_prefix,
const String local_part,
const String namespace_uri 
)

Constructor.

Parameters:
String representing the namespace prefix. If null, use String::EMPTY.
String representing the local part of the QName. An entry is required.
String representing the namespace URI of the QName. If null, use String::EMPTY.

IT_Bus::QName::QName ( const String raw_name,
const String namespace_uri = String::EMPTY 
)

Constructor.

Parameters:
String representing the prefix and local part of the QName in the form prefix:local_part. The prefix and colon are optional.
String representing the namespace URI of the QName. If null, use String::EMPTY.


Member Function Documentation

void IT_Bus::QName::assign ( const String raw_name,
const String namespace_uri = String::EMPTY 
)

Reinitialize the instance using the prefix:local_part and namespace URI provided as arguments.

Parameters:
String representing the prefix and local part of the QName in the format prefix:local_part. The prefix and colon are optional.
String representing the namespace URI of the QName. If null, use String::EMPTY.

const String& IT_Bus::QName::get_namespace_prefix (  )  const

Return the namespace prefix for the QName instance.

Returns:
String value of the prefix.

const String& IT_Bus::QName::get_local_part (  )  const

Return the local part for the QName instance.

Returns:
String value of the local part.

Referenced by IT_Bus::QNamePersistenceHandler::qname_to_string().

const String& IT_Bus::QName::get_namespace_uri (  )  const

Return the namespace URI for the QName instance.

Returns:
String value of the namespace URI.

Referenced by IT_Bus::QNamePersistenceHandler::qname_to_string().

const String IT_Bus::QName::get_raw_name (  )  const

Return the prefix:local_part for the QName instance.

Returns:
String value in the form prefix:local_part.

const String IT_Bus::QName::get_raw_name ( const PrefixResolver resolver  )  const

Return prefix:local_part for the QName instance, but using prefix returned by the resolver for the QNames namespace URI.

Returns:
String value in the form prefix:local_part.

const String IT_Bus::QName::to_string (  )  const

Return a string representation of the raw name and namespace declaration.

The return string is of the form:

    prefix:local_part xmlns=prefix:namespace_uri
 

const String IT_Bus::QName::get_as_canonical_string (  )  const

Return a string in the canonical format specified by javax.xml.namespace.QName.

Returns:
a string in the canonical format specified by javax.xml.namespace.QName.

bool IT_Bus::QName::has_unresolved_prefix (  )  const

Return an indicator of whether the QName has a prefix value without a namespace URI value.

Returns:
true if the prefix has a value and the namespace URI is null.

false if the prefix is null or the namespace URI is not null.

void IT_Bus::QName::set_local_part ( const String  ) 

Set the local part to the value supplied as the argument.

Parameters:
String to use as the local part value.

void IT_Bus::QName::set_namespace_prefix ( const String  ) 

Set the namespace prefix to the value supplied as the argument.

Parameters:
String to use as the namespace prefix.

void IT_Bus::QName::set_namespace_uri ( const String  ) 

Set the namespace URI to the value supplied as the argument.

Parameters:
String to use as the namespace URI.

static QName IT_Bus::QName::make_qname_from_canonical_string ( const String  qname_str  )  throw ((IT_Bus::Exception)) [static]

Parse a String containing as QName in the canonical format specified by javax.xml.namespace.QName.

Parameters:
String in the format specified by javax.xml.namespace.QName


Generated on Tue Mar 20 15:28:06 2007 for Artix by  doxygen 1.5.1-p1