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, 11 years ago
(diff) |
Started adding parsing for Condition and Apply types.
|
Line | |
---|
1 | """NDG Security Expression type definition |
---|
2 | |
---|
3 | NERC 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: $" |
---|
12 | from ndg.xacml.core import PolicyComponent |
---|
13 | |
---|
14 | |
---|
15 | class 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.