34 |
from gnue.common.formatting import GTypecast |
from gnue.common.formatting import GTypecast |
35 |
from gnue.common.definitions import GParser |
from gnue.common.definitions import GParser |
36 |
from gnue.common.logic import GTrigger |
from gnue.common.logic import GTrigger |
37 |
from Helpers import measurement |
from ParserTypes import measurement, color |
38 |
import copy, types |
import copy, types |
39 |
|
|
40 |
|
|
72 |
global xmlElements |
global xmlElements |
73 |
|
|
74 |
# Here due to some nasty recursive imports |
# Here due to some nasty recursive imports |
75 |
from Objects import * |
from Objects import Report,Section |
76 |
|
|
77 |
if xmlElements == None: |
if xmlElements == None: |
78 |
|
|
95 |
'ParentTags': None }, |
'ParentTags': None }, |
96 |
|
|
97 |
'section': { |
'section': { |
98 |
'BaseClass': GRParameters.GRSection, |
'BaseClass': Section, # TODO: should be replaced by Multiplexed Section |
99 |
'Attributes': { |
'Attributes': { |
100 |
'positioning': { |
'positioning': { |
101 |
'ValueSet': { |
'ValueSet': { |
157 |
'spacinghoriz': { |
'spacinghoriz': { |
158 |
'Typecast': measurement, |
'Typecast': measurement, |
159 |
'Default': '0' } } , |
'Default': '0' } } , |
|
'ParentTags': ('parameters',) }, |
|
|
|
|
|
'sortoptions': { |
|
|
'BaseClass': GRSortOptions.GRSortOptions, |
|
|
'SingleInstance': 1, |
|
160 |
'ParentTags': ('report',) }, |
'ParentTags': ('report',) }, |
161 |
|
|
|
'sortoption': { |
|
|
'BaseClass': GRSortOptions.GRSortOption, |
|
|
'Attributes': { |
|
|
'id': { |
|
|
'Required': 1, |
|
|
'Unique': 1, |
|
|
'Typecast': GTypecast.name }, |
|
|
'description': { |
|
|
'Required': 1, |
|
|
'Typecast': GTypecast.name }, |
|
|
'default': { |
|
|
'Typecast': GTypecast.boolean, |
|
|
'Default': 0 } }, |
|
|
'ParentTags': ('sortoptions',) }, |
|
|
|
|
|
'sortcolumn': { |
|
|
'BaseClass': GRSortOptions.GRSortColumn, |
|
|
'Attributes': { |
|
|
'name': { |
|
|
'Required': 1, |
|
|
'Typecast': GTypecast.name } }, |
|
|
'ParentTags': ('sortoption',) }, |
|
|
|
|
|
'layout': { |
|
|
'BaseClass': GRLayout.GRLayout, |
|
|
'Required': 1, |
|
|
'SingleInstance': 1, |
|
|
'MixedContent': 1, |
|
|
'Attributes': { |
|
|
'format': { |
|
|
'Typecast': GTypecast.text }, |
|
|
'suppressGNUeTags': { |
|
|
'Typecast': GTypecast.boolean } }, |
|
|
'ParentTags': ('report',) }, |
|
|
|
|
|
'section': { |
|
|
'BaseClass': GRLayout.GRSection, |
|
|
'Required': 1, |
|
|
'MixedContent': 1, |
|
|
'KeepWhitespace': 1, |
|
|
'Attributes': { |
|
|
'name': { |
|
|
'Typecast': GTypecast.name }, |
|
|
'source': { |
|
|
'Typecast': GTypecast.name } }, |
|
|
'ParentTags': ('layout',) }, |
|
|
|
|
|
'default': { |
|
|
'BaseClass': GRLayout.GRDefault, |
|
|
'MixedContent': 1, |
|
|
'KeepWhitespace': 1, |
|
|
'ParentTags': ('section',) }, |
|
|
|
|
|
'firstrow': { |
|
|
'BaseClass': GRLayout.GRFirstRow, |
|
|
'MixedContent': 1, |
|
|
'KeepWhitespace': 1, |
|
|
'ParentTags': ('section',) }, |
|
|
|
|
|
'notfirstrow': { |
|
|
'BaseClass': GRLayout.GRNotFirstRow, |
|
|
'MixedContent': 1, |
|
|
'KeepWhitespace': 1, |
|
|
'ParentTags': ('section',) }, |
|
|
|
|
|
'lastrow': { |
|
|
'BaseClass': GRLayout.GRLastRow, |
|
|
'MixedContent': 1, |
|
|
'KeepWhitespace': 1, |
|
|
'ParentTags': ('section',) }, |
|
|
|
|
|
'notlastrow': { |
|
|
'BaseClass': GRLayout.GRNotLastRow, |
|
|
'MixedContent': 1, |
|
|
'KeepWhitespace': 1, |
|
|
'ParentTags': ('section',) }, |
|
|
|
|
|
'field': { |
|
|
'BaseClass': GRLayout.GRField, |
|
|
'Attributes': { |
|
|
'name': { |
|
|
'Required': 1, |
|
|
'Typecast': GTypecast.name }, |
|
|
'source': { |
|
|
'Typecast': GTypecast.name }, |
|
|
'section': { |
|
|
'Typecast': GTypecast.name }, |
|
|
'format': { |
|
|
'Typecast': GTypecast.name } }, |
|
|
'ParentTags': ('section',) }, |
|
|
|
|
|
'summ': { |
|
|
'BaseClass': GRLayout.GRSumm, |
|
|
'Attributes': { |
|
|
'name': { |
|
|
'Typecast': GTypecast.name }, |
|
|
'function': { |
|
|
'Typecast': GTypecast.name, |
|
|
'Default': "count"}, |
|
|
'field': { |
|
|
'Typecast': GTypecast.name, |
|
|
'Default': None}, |
|
|
'section': { |
|
|
'Typecast': GTypecast.name }, |
|
|
'format': { |
|
|
'Typecast': GTypecast.name } }, |
|
|
'ParentTags': ('layout',) }, |
|
|
|
|
|
'param': { |
|
|
'BaseClass': GRLayout.GRParam, |
|
|
'Attributes': { |
|
|
'name': { |
|
|
'Required': 1, |
|
|
'Typecast': GTypecast.name }, |
|
|
'format': { |
|
|
'Typecast': GTypecast.name } }, |
|
|
'ParentTags': ('layout',) }, |
|
|
|
|
|
'sources': { |
|
|
'BaseClass': GRSources.GRSources, |
|
|
'SingleInstance': 1, |
|
|
'ParentTags': ('report',) }, |
|
162 |
} |
} |
163 |
|
|
164 |
borderTypes = { |
borderTypes = { |
213 |
# |
# |
214 |
for tag in ('section',): |
for tag in ('section',): |
215 |
xmlElements[tag]['Attributes'].update( borderStyles ) |
xmlElements[tag]['Attributes'].update( borderStyles ) |
|
|
|
|
|
|
|
|
|
216 |
|
|
217 |
|
|
218 |
return GParser.buildImportableTags('report',xmlElements) |
return GParser.buildImportableTags('report',xmlElements) |