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

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

Parsing functionality near complete for rule1.xml

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   
14    __slots__ = ('__dataType', )
15   
16    def __init__(self):
17        self.__dataType = None
18       
19    def _get_dataType(self):
20        return self.__dataType
21
22    def _set_dataType(self, value):
23        if not isinstance(value, basestring):
24            raise TypeError('Expecting %r type for "dataType" '
25                            'attribute; got %r' % (basestring, type(value)))
26           
27        self.__dataType = value   
28
29    dataType = property(_get_dataType, _set_dataType, None, 
30                        "expression value data type") 
31         
Note: See TracBrowser for help on using the repository browser.