1 | """NDG Security Policy Defaults type definition |
---|
2 | |
---|
3 | NERC DataGrid |
---|
4 | """ |
---|
5 | __author__ = "P J Kershaw" |
---|
6 | __date__ = "19/03/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 XacmlCoreBase |
---|
13 | |
---|
14 | |
---|
15 | class PolicyDefaults(XacmlCoreBase): |
---|
16 | """XACML PolicyDefaults type |
---|
17 | |
---|
18 | @cvar ELEMENT_LOCAL_NAME: XML local name for this element |
---|
19 | @type ELEMENT_LOCAL_NAME: string |
---|
20 | @cvar XPATH_VERSION_ELEMENT_NAME: XML local name for XPath version element |
---|
21 | @type XPATH_VERSION_ELEMENT_NAME: string |
---|
22 | |
---|
23 | @ivar __xpathVersion: XPath version |
---|
24 | @type __xpathVersion: basestring / NoneType |
---|
25 | """ |
---|
26 | ELEMENT_LOCAL_NAME = 'PolicyDefaults' |
---|
27 | XPATH_VERSION_ELEMENT_NAME = 'XPathVersion' |
---|
28 | |
---|
29 | __slots__ = ('__xpathVersion', ) |
---|
30 | |
---|
31 | def __init__(self): |
---|
32 | """Initialise attributes""" |
---|
33 | super(PolicyDefaults, self).__init__() |
---|
34 | self.__xpathVersion = None |
---|
35 | |
---|
36 | def _get_xpathVersion(self): |
---|
37 | """@return: XPath version |
---|
38 | @rtype: basestring / NoneType |
---|
39 | """ |
---|
40 | return self.__xpathVersion |
---|
41 | |
---|
42 | def _set_xpathVersion(self, value): |
---|
43 | """@param value: XPath version |
---|
44 | @type value: basestring / NoneType |
---|
45 | @raise TypeError: incorrect input type |
---|
46 | """ |
---|
47 | if not isinstance(value, basestring): |
---|
48 | raise TypeError('Expecting %r type for "xpathVersion" ' |
---|
49 | 'attribute; got %r' % (basestring, type(value))) |
---|
50 | |
---|
51 | self.__xpathVersion = value |
---|
52 | |
---|
53 | xpathVersion = property(_get_xpathVersion, _set_xpathVersion, None, |
---|
54 | "PolicyDefaults type XPath version") |
---|
55 | |
---|
56 | |
---|