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

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

Started adding parsing for Condition and Apply types.

Line 
1"""NDG Security Expression type definition
2
3NERC DataGrid Project
4"""
5__author__ = "P J Kershaw"
6__date__ = "25/02/10"
7__copyright__ = "(C) 2010 Science and Technology Facilities Council"
8__contact__ = "Philip.Kershaw@stfc.ac.uk"
9__license__ = "BSD - see LICENSE file in top-level directory"
10__contact__ = "Philip.Kershaw@stfc.ac.uk"
11__revision__ = "$Id: $"
12from ndg.xacml.core import PolicyComponent
13
14
15class Expression(PolicyComponent):
16    """XACML Expression type"""
17    ELEMENT_LOCAL_NAME = None
18    DATA_TYPE_ATTRIB_NAME = 'DataType'
19   
20    __slots__ = ('__dataType', )
21   
22    def __init__(self):
23        self.__dataType = None
24       
25    def _get_dataType(self):
26        return self.__dataType
27
28    def _set_dataType(self, value):
29        if not isinstance(value, basestring):
30            raise TypeError('Expecting %r type for "dataType" '
31                            'attribute; got %r' % (basestring, type(value)))
32           
33        self.__dataType = value   
34
35    dataType = property(_get_dataType, _set_dataType, None, 
36                        "expression value data type") 
37         
Note: See TracBrowser for help on using the repository browser.