source: TI12-security/trunk/NDG_XACML/ndg/xacml/core/expression.py @ 6747

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/NDG_XACML/ndg/xacml/core/expression.py@6747
Revision 6747, 841 bytes checked in by pjkersha, 9 years ago (diff)

Adding parsing for Subject type and SubjectMatch? elements.

Line 
1'''
2Created on 16 Mar 2010
3
4@author: pjkersha
5'''
6from ndg.xacml.core import PolicyComponent
7
8
9class Expression(PolicyComponent):
10    """XACML Expression type"""
11    ELEMENT_LOCAL_NAME = None
12    DATA_TYPE_ATTRIB_NAME = 'DataType'
13    ATTRIB_NAMES = (DATA_TYPE_ATTRIB_NAME,)
14   
15    __slots__ = ('__dataType', )
16   
17    def __init__(self):
18        self.__dataType = None
19       
20    def _get_dataType(self):
21        return self.__dataType
22
23    def _set_dataType(self, value):
24        if not isinstance(value, basestring):
25            raise TypeError('Expecting %r type for "dataType" '
26                            'attribute; got %r' % (basestring, type(value)))
27           
28        self.__dataType = value   
29
30    dataType = property(_get_dataType, _set_dataType, None, 
31                        "expression value data type") 
32
33       
Note: See TracBrowser for help on using the repository browser.