1 """NDG XACML ElementTree based reader for Expression type
2
3 NERC DataGrid
4 """
5 __author__ = "P J Kershaw"
6 __date__ = "18/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: expressionreader.py 7955 2011-12-21 18:29:45Z rwilkinson $"
12 from abc import abstractmethod
13
14 from ndg.xacml.core.expression import Expression
15 from ndg.xacml.parsers import XMLParseError
16 from ndg.xacml.parsers.etree import QName
17 from ndg.xacml.parsers.etree.reader import ETreeAbstractReader
21 '''ElementTree based XACML Expression type parser
22
23 @cvar TYPE: XACML type to instantiate from parsed object
24 @type TYPE: abc.ABCMeta
25 '''
26 TYPE = Expression
27
63
64 @abstractmethod
66 """Derived classes should implement this method to read any remaining
67 attributes and elements specific to their type
68
69 @param elem: ElementTree XML element
70 @type elem: xml.etree.Element
71
72 @param expression: attribute selector to be updated with parsed
73 values
74 @type expression: ndg.xacml.core.attributevalue.AttributeValue
75
76
77 @raise NotImplementedError: Derived classes should implement
78 """
79 raise NotImplementedError()
80
81
82 ETreeAbstractReader.register(ExpressionReader)
83