Package ndg :: Package xacml :: Package parsers :: Package etree :: Class QName
[hide private]

Class QName

source code

                 object --+    
                          |    
xml.etree.ElementTree.QName --+
                              |
                             QName

Extend ElementTree implementation for improved attribute access support

Instance Methods [hide private]
 
__init__(self, input, tag=None, prefix=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
string
_getPrefix(self)
Get prefix
source code
 
_setPrefix(self, value)
Set prefix
source code
string
_getLocalPart(self)
Get local part
source code
 
_setLocalPart(self, value)
Set local part
source code
string
_getNamespaceURI(self)
Get namespace URI
source code
 
_setNamespaceURI(self, value)
Set namespace URI
source code
bool
__eq__(self, qname)
Enable equality check for QName.
source code
 
__ne__(self, qname)
Enable equality check for QName.
source code

Inherited from xml.etree.ElementTree.QName: __cmp__, __hash__, __str__

Inherited from object: __delattr__, __format__, __getattribute__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Static Methods [hide private]
 
getNs(tag) source code
 
getLocalPart(tag) source code
Properties [hide private]
  prefix
Prefix
  localPart
LocalPart
  namespaceURI
Namespace URI'

Inherited from object: __class__

Method Details [hide private]

__init__(self, input, tag=None, prefix=None)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • input (basestring) - ElementTree style namespace URI + tag name - {namespace URI}tag - OR if tag keyword is set, the namespace URI alone
  • tag (basestring / None) - element tag name. If None, input must contain the namespace URI and tag name in the ElementTree form {namespace URI}tag.
  • prefix (basestring / None) - namespace prefix
Overrides: object.__init__

_getPrefix(self)

source code 

Get prefix

Returns: string
prefix

_setPrefix(self, value)

source code 

Set prefix

Parameters:
  • value (string) - prefix
Raises:
  • TypeError - invalid input value type

_getLocalPart(self)

source code 

Get local part

Returns: string
local part

_setLocalPart(self, value)

source code 

Set local part

Parameters:
  • value (string) - local part
Raises:
  • TypeError - invalid input value type

_getNamespaceURI(self)

source code 

Get namespace URI

Returns: string
namespace URI

_setNamespaceURI(self, value)

source code 

Set namespace URI

Parameters:
  • value (string) - namespace URI
Raises:
  • TypeError - invalid input value type

__eq__(self, qname)
(Equality operator)

source code 

Enable equality check for QName. Note that prefixes don't need to match

Parameters:
  • qname (ndg.xacml.utils.etree.QName) - Qualified Name to compare with self
Returns: bool
True if input and this object match

__ne__(self, qname)

source code 

Enable equality check for QName. Note that prefixes don't need to match

Parameters:
  • qname (ndg.xacml.utils.etree.QName) - Qualified Name to compare with self

Property Details [hide private]

prefix

Prefix

Get Method:
_getPrefix(self) - Get prefix
Set Method:
_setPrefix(self, value) - Set prefix

localPart

LocalPart

Get Method:
_getLocalPart(self) - Get local part
Set Method:
_setLocalPart(self, value) - Set local part

namespaceURI

Namespace URI'

Get Method:
_getNamespaceURI(self) - Get namespace URI
Set Method:
_setNamespaceURI(self, value) - Set namespace URI