@v587d/capital-generation 2.29.0 → 2.30.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +58 -0
- package/README.md +3 -3
- package/THIRD_PARTY_NOTICES.md +16 -0
- package/automation/package.json +1 -1
- package/chart-ui/package.json +1 -1
- package/config/package.json +1 -1
- package/lib/collector-runtime.js +56 -1
- package/lib/data-collector/catalog-taxonomy.d.ts +1 -1
- package/lib/data-collector/catalog-taxonomy.js +33 -0
- package/lib/data-collector/dataset-tools.js +4 -2
- package/lib/data-collector/describe.d.ts +2 -0
- package/lib/data-collector/describe.js +2 -0
- package/lib/data-collector/store.d.ts +11 -0
- package/lib/data-collector/store.js +80 -1
- package/lib/data-collector/tools.d.ts +1 -1
- package/lib/data-collector/tools.js +10 -9
- package/lib/python-runtime/errors.d.ts +1 -1
- package/lib/python-runtime/errors.js +2 -0
- package/lib/python-runtime/manager.d.ts +28 -1
- package/lib/python-runtime/manager.js +141 -5
- package/lib/python-runtime/probe.d.ts +24 -0
- package/lib/python-runtime/probe.js +66 -50
- package/lib/sources/csindex-http.d.ts +4 -0
- package/lib/sources/csindex-http.js +233 -0
- package/lib/sources/eastmoney-http.js +1504 -1
- package/lib/sources/fuyao-rest.js +168 -8
- package/lib/sources/official-http.d.ts +4 -0
- package/lib/sources/official-http.js +477 -0
- package/lib/sources/python-remote.d.ts +25 -0
- package/lib/sources/python-remote.js +461 -0
- package/lib/sources/sina-http.d.ts +2 -0
- package/lib/sources/sina-http.js +484 -0
- package/lib/sources/tencent-http.js +23 -8
- package/lib/sources/ths-http.d.ts +2 -0
- package/lib/sources/ths-http.js +517 -0
- package/lib/time/tools.js +19 -0
- package/lib/web-retriever/local-fetch.d.ts +1 -1
- package/lib/web-retriever/local-fetch.js +1 -1
- package/lib/web-retriever/sources.d.ts +7 -0
- package/lib/web-retriever/sources.js +46 -21
- package/lib/web-retriever/throttle.d.ts +8 -0
- package/lib/web-retriever/throttle.js +13 -0
- package/lib/web-retriever/tools.js +1 -1
- package/lib/web-retriever/wind-client.d.ts +1 -1
- package/lib/web-retriever/wind-client.js +1 -1
- package/package.json +1 -1
- package/preset/capital-generation/agent.patch.yml +7 -5
- package/preset/capital-generation/skills/capital-data-protocol/SKILL.md +16 -16
- package/python/scripts/baostock_stock_basic.py +129 -0
- package/python/scripts/baostock_valuation_history.py +141 -0
- package/python/scripts/pbc_social_financing.py +291 -0
- package/python/vendor/baostock/LICENSE +19 -0
- package/python/vendor/baostock/__init__.py +42 -0
- package/python/vendor/baostock/common/__init__.py +0 -0
- package/python/vendor/baostock/common/contants.py +189 -0
- package/python/vendor/baostock/common/context.py +4 -0
- package/python/vendor/baostock/corpreport/__init__.py +0 -0
- package/python/vendor/baostock/corpreport/corp_performance.py +202 -0
- package/python/vendor/baostock/data/__init__.py +0 -0
- package/python/vendor/baostock/data/messageheader.py +17 -0
- package/python/vendor/baostock/data/msg.py +21 -0
- package/python/vendor/baostock/data/resultset.py +200 -0
- package/python/vendor/baostock/demo/__init__.py +0 -0
- package/python/vendor/baostock/demo/demo_A_stock_5mk-data.py +34 -0
- package/python/vendor/baostock/demo/demo_A_stock_k_data.py +36 -0
- package/python/vendor/baostock/demo/demo_AllStock.py +27 -0
- package/python/vendor/baostock/demo/demo_Balance_data.py +22 -0
- package/python/vendor/baostock/demo/demo_CashFlow_data.py +22 -0
- package/python/vendor/baostock/demo/demo_Dividend_data.py +35 -0
- package/python/vendor/baostock/demo/demo_Dupont_data.py +25 -0
- package/python/vendor/baostock/demo/demo_Forecast_report.py +24 -0
- package/python/vendor/baostock/demo/demo_Growth_data.py +22 -0
- package/python/vendor/baostock/demo/demo_Index_k_data.py +39 -0
- package/python/vendor/baostock/demo/demo_Operation_data.py +22 -0
- package/python/vendor/baostock/demo/demo_PerformanceExpress_report.py +25 -0
- package/python/vendor/baostock/demo/demo_Profit_data.py +22 -0
- package/python/vendor/baostock/demo/demo_TradeDates.py +27 -0
- package/python/vendor/baostock/demo/demo_adjust_factor_data.py +23 -0
- package/python/vendor/baostock/demo/demo_assignDayData.py +23 -0
- package/python/vendor/baostock/demo/demo_daily_adjust_factor_data.py +28 -0
- package/python/vendor/baostock/demo/demo_daily_k_4_AStock.py +28 -0
- package/python/vendor/baostock/demo/demo_daily_k_4_ETF.py +28 -0
- package/python/vendor/baostock/demo/demo_depositRate_data.py +26 -0
- package/python/vendor/baostock/demo/demo_hs300_stocks.py +26 -0
- package/python/vendor/baostock/demo/demo_loanRate_data.py +26 -0
- package/python/vendor/baostock/demo/demo_moneySupplyDataMonth_data.py +26 -0
- package/python/vendor/baostock/demo/demo_moneySupplyDataYear_data.py +26 -0
- package/python/vendor/baostock/demo/demo_requiredReserveRatio_data.py +26 -0
- package/python/vendor/baostock/demo/demo_set_API_key.py +37 -0
- package/python/vendor/baostock/demo/demo_stockBasic_data.py +27 -0
- package/python/vendor/baostock/demo/demo_stock_Valuation_indicator_data.py +34 -0
- package/python/vendor/baostock/demo/demo_stock_industry.py +26 -0
- package/python/vendor/baostock/demo/demo_sz50stocks.py +26 -0
- package/python/vendor/baostock/demo/demo_zz500_stock.py +26 -0
- package/python/vendor/baostock/evaluation/__init__.py +0 -0
- package/python/vendor/baostock/evaluation/season_index.py +758 -0
- package/python/vendor/baostock/login/__init__.py +0 -0
- package/python/vendor/baostock/login/loginout.py +230 -0
- package/python/vendor/baostock/macroscopic/__init__.py +0 -0
- package/python/vendor/baostock/macroscopic/economic_data.py +723 -0
- package/python/vendor/baostock/metadata/__init__.py +0 -0
- package/python/vendor/baostock/metadata/stock_metadata.py +207 -0
- package/python/vendor/baostock/security/__init__.py +0 -0
- package/python/vendor/baostock/security/history.py +265 -0
- package/python/vendor/baostock/security/sectorinfo.py +1024 -0
- package/python/vendor/baostock/util/__init__.py +0 -0
- package/python/vendor/baostock/util/socketutil.py +97 -0
- package/python/vendor/baostock/util/stringutil.py +83 -0
- package/python/vendor/et_xmlfile/LICENSE +23 -0
- package/python/vendor/et_xmlfile/LICENSE.python +298 -0
- package/python/vendor/et_xmlfile/__init__.py +8 -0
- package/python/vendor/et_xmlfile/incremental_tree.py +917 -0
- package/python/vendor/et_xmlfile/xmlfile.py +158 -0
- package/python/vendor/openpyxl/LICENSE +23 -0
- package/python/vendor/openpyxl/__init__.py +19 -0
- package/python/vendor/openpyxl/_constants.py +13 -0
- package/python/vendor/openpyxl/cell/__init__.py +4 -0
- package/python/vendor/openpyxl/cell/_writer.py +136 -0
- package/python/vendor/openpyxl/cell/cell.py +332 -0
- package/python/vendor/openpyxl/cell/read_only.py +136 -0
- package/python/vendor/openpyxl/cell/rich_text.py +202 -0
- package/python/vendor/openpyxl/cell/text.py +184 -0
- package/python/vendor/openpyxl/chart/_3d.py +105 -0
- package/python/vendor/openpyxl/chart/__init__.py +19 -0
- package/python/vendor/openpyxl/chart/_chart.py +199 -0
- package/python/vendor/openpyxl/chart/area_chart.py +106 -0
- package/python/vendor/openpyxl/chart/axis.py +401 -0
- package/python/vendor/openpyxl/chart/bar_chart.py +144 -0
- package/python/vendor/openpyxl/chart/bubble_chart.py +67 -0
- package/python/vendor/openpyxl/chart/chartspace.py +195 -0
- package/python/vendor/openpyxl/chart/data_source.py +246 -0
- package/python/vendor/openpyxl/chart/descriptors.py +43 -0
- package/python/vendor/openpyxl/chart/error_bar.py +62 -0
- package/python/vendor/openpyxl/chart/label.py +127 -0
- package/python/vendor/openpyxl/chart/layout.py +74 -0
- package/python/vendor/openpyxl/chart/legend.py +75 -0
- package/python/vendor/openpyxl/chart/line_chart.py +129 -0
- package/python/vendor/openpyxl/chart/marker.py +90 -0
- package/python/vendor/openpyxl/chart/picture.py +35 -0
- package/python/vendor/openpyxl/chart/pie_chart.py +177 -0
- package/python/vendor/openpyxl/chart/pivot.py +65 -0
- package/python/vendor/openpyxl/chart/plotarea.py +162 -0
- package/python/vendor/openpyxl/chart/print_settings.py +57 -0
- package/python/vendor/openpyxl/chart/radar_chart.py +55 -0
- package/python/vendor/openpyxl/chart/reader.py +32 -0
- package/python/vendor/openpyxl/chart/reference.py +124 -0
- package/python/vendor/openpyxl/chart/scatter_chart.py +53 -0
- package/python/vendor/openpyxl/chart/series.py +197 -0
- package/python/vendor/openpyxl/chart/series_factory.py +41 -0
- package/python/vendor/openpyxl/chart/shapes.py +89 -0
- package/python/vendor/openpyxl/chart/stock_chart.py +54 -0
- package/python/vendor/openpyxl/chart/surface_chart.py +119 -0
- package/python/vendor/openpyxl/chart/text.py +78 -0
- package/python/vendor/openpyxl/chart/title.py +76 -0
- package/python/vendor/openpyxl/chart/trendline.py +98 -0
- package/python/vendor/openpyxl/chart/updown_bars.py +31 -0
- package/python/vendor/openpyxl/chartsheet/__init__.py +3 -0
- package/python/vendor/openpyxl/chartsheet/chartsheet.py +107 -0
- package/python/vendor/openpyxl/chartsheet/custom.py +61 -0
- package/python/vendor/openpyxl/chartsheet/properties.py +28 -0
- package/python/vendor/openpyxl/chartsheet/protection.py +41 -0
- package/python/vendor/openpyxl/chartsheet/publish.py +58 -0
- package/python/vendor/openpyxl/chartsheet/relation.py +97 -0
- package/python/vendor/openpyxl/chartsheet/views.py +51 -0
- package/python/vendor/openpyxl/comments/__init__.py +4 -0
- package/python/vendor/openpyxl/comments/author.py +21 -0
- package/python/vendor/openpyxl/comments/comment_sheet.py +211 -0
- package/python/vendor/openpyxl/comments/comments.py +62 -0
- package/python/vendor/openpyxl/comments/shape_writer.py +112 -0
- package/python/vendor/openpyxl/compat/__init__.py +54 -0
- package/python/vendor/openpyxl/compat/abc.py +8 -0
- package/python/vendor/openpyxl/compat/numbers.py +43 -0
- package/python/vendor/openpyxl/compat/product.py +17 -0
- package/python/vendor/openpyxl/compat/singleton.py +40 -0
- package/python/vendor/openpyxl/compat/strings.py +25 -0
- package/python/vendor/openpyxl/descriptors/__init__.py +58 -0
- package/python/vendor/openpyxl/descriptors/base.py +272 -0
- package/python/vendor/openpyxl/descriptors/container.py +41 -0
- package/python/vendor/openpyxl/descriptors/excel.py +112 -0
- package/python/vendor/openpyxl/descriptors/namespace.py +12 -0
- package/python/vendor/openpyxl/descriptors/nested.py +129 -0
- package/python/vendor/openpyxl/descriptors/sequence.py +136 -0
- package/python/vendor/openpyxl/descriptors/serialisable.py +240 -0
- package/python/vendor/openpyxl/descriptors/slots.py +18 -0
- package/python/vendor/openpyxl/drawing/__init__.py +4 -0
- package/python/vendor/openpyxl/drawing/colors.py +435 -0
- package/python/vendor/openpyxl/drawing/connector.py +144 -0
- package/python/vendor/openpyxl/drawing/drawing.py +92 -0
- package/python/vendor/openpyxl/drawing/effect.py +407 -0
- package/python/vendor/openpyxl/drawing/fill.py +425 -0
- package/python/vendor/openpyxl/drawing/geometry.py +584 -0
- package/python/vendor/openpyxl/drawing/graphic.py +177 -0
- package/python/vendor/openpyxl/drawing/image.py +65 -0
- package/python/vendor/openpyxl/drawing/line.py +144 -0
- package/python/vendor/openpyxl/drawing/picture.py +144 -0
- package/python/vendor/openpyxl/drawing/properties.py +174 -0
- package/python/vendor/openpyxl/drawing/relation.py +17 -0
- package/python/vendor/openpyxl/drawing/spreadsheet_drawing.py +382 -0
- package/python/vendor/openpyxl/drawing/text.py +717 -0
- package/python/vendor/openpyxl/drawing/xdr.py +33 -0
- package/python/vendor/openpyxl/formatting/__init__.py +3 -0
- package/python/vendor/openpyxl/formatting/formatting.py +114 -0
- package/python/vendor/openpyxl/formatting/rule.py +291 -0
- package/python/vendor/openpyxl/formula/__init__.py +3 -0
- package/python/vendor/openpyxl/formula/tokenizer.py +446 -0
- package/python/vendor/openpyxl/formula/translate.py +166 -0
- package/python/vendor/openpyxl/packaging/__init__.py +3 -0
- package/python/vendor/openpyxl/packaging/core.py +115 -0
- package/python/vendor/openpyxl/packaging/custom.py +289 -0
- package/python/vendor/openpyxl/packaging/extended.py +137 -0
- package/python/vendor/openpyxl/packaging/interface.py +56 -0
- package/python/vendor/openpyxl/packaging/manifest.py +194 -0
- package/python/vendor/openpyxl/packaging/relationship.py +158 -0
- package/python/vendor/openpyxl/packaging/workbook.py +185 -0
- package/python/vendor/openpyxl/pivot/__init__.py +1 -0
- package/python/vendor/openpyxl/pivot/cache.py +965 -0
- package/python/vendor/openpyxl/pivot/fields.py +326 -0
- package/python/vendor/openpyxl/pivot/record.py +111 -0
- package/python/vendor/openpyxl/pivot/table.py +1261 -0
- package/python/vendor/openpyxl/reader/__init__.py +1 -0
- package/python/vendor/openpyxl/reader/drawings.py +71 -0
- package/python/vendor/openpyxl/reader/excel.py +349 -0
- package/python/vendor/openpyxl/reader/strings.py +44 -0
- package/python/vendor/openpyxl/reader/workbook.py +133 -0
- package/python/vendor/openpyxl/styles/__init__.py +11 -0
- package/python/vendor/openpyxl/styles/alignment.py +62 -0
- package/python/vendor/openpyxl/styles/borders.py +103 -0
- package/python/vendor/openpyxl/styles/builtins.py +1397 -0
- package/python/vendor/openpyxl/styles/cell_style.py +206 -0
- package/python/vendor/openpyxl/styles/colors.py +172 -0
- package/python/vendor/openpyxl/styles/differential.py +95 -0
- package/python/vendor/openpyxl/styles/fills.py +224 -0
- package/python/vendor/openpyxl/styles/fonts.py +113 -0
- package/python/vendor/openpyxl/styles/named_styles.py +282 -0
- package/python/vendor/openpyxl/styles/numbers.py +200 -0
- package/python/vendor/openpyxl/styles/protection.py +17 -0
- package/python/vendor/openpyxl/styles/proxy.py +62 -0
- package/python/vendor/openpyxl/styles/styleable.py +151 -0
- package/python/vendor/openpyxl/styles/stylesheet.py +274 -0
- package/python/vendor/openpyxl/styles/table.py +94 -0
- package/python/vendor/openpyxl/utils/__init__.py +17 -0
- package/python/vendor/openpyxl/utils/bound_dictionary.py +26 -0
- package/python/vendor/openpyxl/utils/cell.py +240 -0
- package/python/vendor/openpyxl/utils/dataframe.py +87 -0
- package/python/vendor/openpyxl/utils/datetime.py +140 -0
- package/python/vendor/openpyxl/utils/escape.py +43 -0
- package/python/vendor/openpyxl/utils/exceptions.py +34 -0
- package/python/vendor/openpyxl/utils/formulas.py +24 -0
- package/python/vendor/openpyxl/utils/indexed_list.py +49 -0
- package/python/vendor/openpyxl/utils/inference.py +60 -0
- package/python/vendor/openpyxl/utils/protection.py +22 -0
- package/python/vendor/openpyxl/utils/units.py +108 -0
- package/python/vendor/openpyxl/workbook/__init__.py +4 -0
- package/python/vendor/openpyxl/workbook/_writer.py +197 -0
- package/python/vendor/openpyxl/workbook/child.py +166 -0
- package/python/vendor/openpyxl/workbook/defined_name.py +189 -0
- package/python/vendor/openpyxl/workbook/external_link/__init__.py +3 -0
- package/python/vendor/openpyxl/workbook/external_link/external.py +190 -0
- package/python/vendor/openpyxl/workbook/external_reference.py +18 -0
- package/python/vendor/openpyxl/workbook/function_group.py +36 -0
- package/python/vendor/openpyxl/workbook/properties.py +151 -0
- package/python/vendor/openpyxl/workbook/protection.py +163 -0
- package/python/vendor/openpyxl/workbook/smart_tags.py +56 -0
- package/python/vendor/openpyxl/workbook/views.py +155 -0
- package/python/vendor/openpyxl/workbook/web.py +98 -0
- package/python/vendor/openpyxl/workbook/workbook.py +438 -0
- package/python/vendor/openpyxl/worksheet/__init__.py +1 -0
- package/python/vendor/openpyxl/worksheet/_read_only.py +190 -0
- package/python/vendor/openpyxl/worksheet/_reader.py +472 -0
- package/python/vendor/openpyxl/worksheet/_write_only.py +160 -0
- package/python/vendor/openpyxl/worksheet/_writer.py +390 -0
- package/python/vendor/openpyxl/worksheet/cell_range.py +512 -0
- package/python/vendor/openpyxl/worksheet/cell_watch.py +34 -0
- package/python/vendor/openpyxl/worksheet/controls.py +107 -0
- package/python/vendor/openpyxl/worksheet/copier.py +70 -0
- package/python/vendor/openpyxl/worksheet/custom.py +35 -0
- package/python/vendor/openpyxl/worksheet/datavalidation.py +202 -0
- package/python/vendor/openpyxl/worksheet/dimensions.py +306 -0
- package/python/vendor/openpyxl/worksheet/drawing.py +14 -0
- package/python/vendor/openpyxl/worksheet/errors.py +93 -0
- package/python/vendor/openpyxl/worksheet/filters.py +486 -0
- package/python/vendor/openpyxl/worksheet/formula.py +51 -0
- package/python/vendor/openpyxl/worksheet/header_footer.py +270 -0
- package/python/vendor/openpyxl/worksheet/hyperlink.py +46 -0
- package/python/vendor/openpyxl/worksheet/merge.py +141 -0
- package/python/vendor/openpyxl/worksheet/ole.py +133 -0
- package/python/vendor/openpyxl/worksheet/page.py +174 -0
- package/python/vendor/openpyxl/worksheet/pagebreak.py +94 -0
- package/python/vendor/openpyxl/worksheet/picture.py +8 -0
- package/python/vendor/openpyxl/worksheet/print_settings.py +184 -0
- package/python/vendor/openpyxl/worksheet/properties.py +97 -0
- package/python/vendor/openpyxl/worksheet/protection.py +120 -0
- package/python/vendor/openpyxl/worksheet/related.py +17 -0
- package/python/vendor/openpyxl/worksheet/scenario.py +105 -0
- package/python/vendor/openpyxl/worksheet/smart_tag.py +78 -0
- package/python/vendor/openpyxl/worksheet/table.py +385 -0
- package/python/vendor/openpyxl/worksheet/views.py +155 -0
- package/python/vendor/openpyxl/worksheet/worksheet.py +907 -0
- package/python/vendor/openpyxl/writer/__init__.py +1 -0
- package/python/vendor/openpyxl/writer/excel.py +295 -0
- package/python/vendor/openpyxl/writer/theme.py +291 -0
- package/python/vendor/openpyxl/xml/__init__.py +42 -0
- package/python/vendor/openpyxl/xml/constants.py +129 -0
- package/python/vendor/openpyxl/xml/functions.py +87 -0
- package/watchlist/package.json +1 -1
|
@@ -0,0 +1,965 @@
|
|
|
1
|
+
# Copyright (c) 2010-2024 openpyxl
|
|
2
|
+
|
|
3
|
+
from openpyxl.descriptors.serialisable import Serialisable
|
|
4
|
+
from openpyxl.descriptors import (
|
|
5
|
+
Typed,
|
|
6
|
+
Bool,
|
|
7
|
+
Float,
|
|
8
|
+
Set,
|
|
9
|
+
NoneSet,
|
|
10
|
+
String,
|
|
11
|
+
Integer,
|
|
12
|
+
DateTime,
|
|
13
|
+
Sequence,
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
from openpyxl.descriptors.excel import (
|
|
17
|
+
HexBinary,
|
|
18
|
+
ExtensionList,
|
|
19
|
+
Relation,
|
|
20
|
+
)
|
|
21
|
+
from openpyxl.descriptors.nested import NestedInteger
|
|
22
|
+
from openpyxl.descriptors.sequence import (
|
|
23
|
+
NestedSequence,
|
|
24
|
+
MultiSequence,
|
|
25
|
+
MultiSequencePart,
|
|
26
|
+
)
|
|
27
|
+
from openpyxl.xml.constants import SHEET_MAIN_NS
|
|
28
|
+
from openpyxl.xml.functions import tostring
|
|
29
|
+
from openpyxl.packaging.relationship import (
|
|
30
|
+
RelationshipList,
|
|
31
|
+
Relationship,
|
|
32
|
+
get_rels_path
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
from .table import (
|
|
36
|
+
PivotArea,
|
|
37
|
+
Reference,
|
|
38
|
+
)
|
|
39
|
+
from .fields import (
|
|
40
|
+
Boolean,
|
|
41
|
+
Error,
|
|
42
|
+
Missing,
|
|
43
|
+
Number,
|
|
44
|
+
Text,
|
|
45
|
+
TupleList,
|
|
46
|
+
DateTimeField,
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
class MeasureDimensionMap(Serialisable):
|
|
50
|
+
|
|
51
|
+
tagname = "map"
|
|
52
|
+
|
|
53
|
+
measureGroup = Integer(allow_none=True)
|
|
54
|
+
dimension = Integer(allow_none=True)
|
|
55
|
+
|
|
56
|
+
def __init__(self,
|
|
57
|
+
measureGroup=None,
|
|
58
|
+
dimension=None,
|
|
59
|
+
):
|
|
60
|
+
self.measureGroup = measureGroup
|
|
61
|
+
self.dimension = dimension
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
class MeasureGroup(Serialisable):
|
|
65
|
+
|
|
66
|
+
tagname = "measureGroup"
|
|
67
|
+
|
|
68
|
+
name = String()
|
|
69
|
+
caption = String()
|
|
70
|
+
|
|
71
|
+
def __init__(self,
|
|
72
|
+
name=None,
|
|
73
|
+
caption=None,
|
|
74
|
+
):
|
|
75
|
+
self.name = name
|
|
76
|
+
self.caption = caption
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
class PivotDimension(Serialisable):
|
|
80
|
+
|
|
81
|
+
tagname = "dimension"
|
|
82
|
+
|
|
83
|
+
measure = Bool()
|
|
84
|
+
name = String()
|
|
85
|
+
uniqueName = String()
|
|
86
|
+
caption = String()
|
|
87
|
+
|
|
88
|
+
def __init__(self,
|
|
89
|
+
measure=None,
|
|
90
|
+
name=None,
|
|
91
|
+
uniqueName=None,
|
|
92
|
+
caption=None,
|
|
93
|
+
):
|
|
94
|
+
self.measure = measure
|
|
95
|
+
self.name = name
|
|
96
|
+
self.uniqueName = uniqueName
|
|
97
|
+
self.caption = caption
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
class CalculatedMember(Serialisable):
|
|
101
|
+
|
|
102
|
+
tagname = "calculatedMember"
|
|
103
|
+
|
|
104
|
+
name = String()
|
|
105
|
+
mdx = String()
|
|
106
|
+
memberName = String(allow_none=True)
|
|
107
|
+
hierarchy = String(allow_none=True)
|
|
108
|
+
parent = String(allow_none=True)
|
|
109
|
+
solveOrder = Integer(allow_none=True)
|
|
110
|
+
set = Bool()
|
|
111
|
+
extLst = Typed(expected_type=ExtensionList, allow_none=True)
|
|
112
|
+
|
|
113
|
+
__elements__ = ()
|
|
114
|
+
|
|
115
|
+
def __init__(self,
|
|
116
|
+
name=None,
|
|
117
|
+
mdx=None,
|
|
118
|
+
memberName=None,
|
|
119
|
+
hierarchy=None,
|
|
120
|
+
parent=None,
|
|
121
|
+
solveOrder=None,
|
|
122
|
+
set=None,
|
|
123
|
+
extLst=None,
|
|
124
|
+
):
|
|
125
|
+
self.name = name
|
|
126
|
+
self.mdx = mdx
|
|
127
|
+
self.memberName = memberName
|
|
128
|
+
self.hierarchy = hierarchy
|
|
129
|
+
self.parent = parent
|
|
130
|
+
self.solveOrder = solveOrder
|
|
131
|
+
self.set = set
|
|
132
|
+
#self.extLst = extLst
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
class CalculatedItem(Serialisable):
|
|
136
|
+
|
|
137
|
+
tagname = "calculatedItem"
|
|
138
|
+
|
|
139
|
+
field = Integer(allow_none=True)
|
|
140
|
+
formula = String()
|
|
141
|
+
pivotArea = Typed(expected_type=PivotArea, )
|
|
142
|
+
extLst = Typed(expected_type=ExtensionList, allow_none=True)
|
|
143
|
+
|
|
144
|
+
__elements__ = ('pivotArea', 'extLst')
|
|
145
|
+
|
|
146
|
+
def __init__(self,
|
|
147
|
+
field=None,
|
|
148
|
+
formula=None,
|
|
149
|
+
pivotArea=None,
|
|
150
|
+
extLst=None,
|
|
151
|
+
):
|
|
152
|
+
self.field = field
|
|
153
|
+
self.formula = formula
|
|
154
|
+
self.pivotArea = pivotArea
|
|
155
|
+
self.extLst = extLst
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
class ServerFormat(Serialisable):
|
|
159
|
+
|
|
160
|
+
tagname = "serverFormat"
|
|
161
|
+
|
|
162
|
+
culture = String(allow_none=True)
|
|
163
|
+
format = String(allow_none=True)
|
|
164
|
+
|
|
165
|
+
def __init__(self,
|
|
166
|
+
culture=None,
|
|
167
|
+
format=None,
|
|
168
|
+
):
|
|
169
|
+
self.culture = culture
|
|
170
|
+
self.format = format
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
class Query(Serialisable):
|
|
174
|
+
|
|
175
|
+
tagname = "query"
|
|
176
|
+
|
|
177
|
+
mdx = String()
|
|
178
|
+
tpls = Typed(expected_type=TupleList, allow_none=True)
|
|
179
|
+
|
|
180
|
+
__elements__ = ('tpls',)
|
|
181
|
+
|
|
182
|
+
def __init__(self,
|
|
183
|
+
mdx=None,
|
|
184
|
+
tpls=None,
|
|
185
|
+
):
|
|
186
|
+
self.mdx = mdx
|
|
187
|
+
self.tpls = tpls
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
class OLAPSet(Serialisable):
|
|
191
|
+
|
|
192
|
+
tagname = "set"
|
|
193
|
+
|
|
194
|
+
count = Integer()
|
|
195
|
+
maxRank = Integer()
|
|
196
|
+
setDefinition = String()
|
|
197
|
+
sortType = NoneSet(values=(['ascending', 'descending', 'ascendingAlpha',
|
|
198
|
+
'descendingAlpha', 'ascendingNatural', 'descendingNatural']))
|
|
199
|
+
queryFailed = Bool()
|
|
200
|
+
tpls = Typed(expected_type=TupleList, allow_none=True)
|
|
201
|
+
sortByTuple = Typed(expected_type=TupleList, allow_none=True)
|
|
202
|
+
|
|
203
|
+
__elements__ = ('tpls', 'sortByTuple')
|
|
204
|
+
|
|
205
|
+
def __init__(self,
|
|
206
|
+
count=None,
|
|
207
|
+
maxRank=None,
|
|
208
|
+
setDefinition=None,
|
|
209
|
+
sortType=None,
|
|
210
|
+
queryFailed=None,
|
|
211
|
+
tpls=None,
|
|
212
|
+
sortByTuple=None,
|
|
213
|
+
):
|
|
214
|
+
self.count = count
|
|
215
|
+
self.maxRank = maxRank
|
|
216
|
+
self.setDefinition = setDefinition
|
|
217
|
+
self.sortType = sortType
|
|
218
|
+
self.queryFailed = queryFailed
|
|
219
|
+
self.tpls = tpls
|
|
220
|
+
self.sortByTuple = sortByTuple
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
class PCDSDTCEntries(Serialisable):
|
|
224
|
+
# Implements CT_PCDSDTCEntries
|
|
225
|
+
|
|
226
|
+
tagname = "entries"
|
|
227
|
+
|
|
228
|
+
count = Integer(allow_none=True)
|
|
229
|
+
# elements are choice
|
|
230
|
+
m = Typed(expected_type=Missing, allow_none=True)
|
|
231
|
+
n = Typed(expected_type=Number, allow_none=True)
|
|
232
|
+
e = Typed(expected_type=Error, allow_none=True)
|
|
233
|
+
s = Typed(expected_type=Text, allow_none=True)
|
|
234
|
+
|
|
235
|
+
__elements__ = ('m', 'n', 'e', 's')
|
|
236
|
+
|
|
237
|
+
def __init__(self,
|
|
238
|
+
count=None,
|
|
239
|
+
m=None,
|
|
240
|
+
n=None,
|
|
241
|
+
e=None,
|
|
242
|
+
s=None,
|
|
243
|
+
):
|
|
244
|
+
self.count = count
|
|
245
|
+
self.m = m
|
|
246
|
+
self.n = n
|
|
247
|
+
self.e = e
|
|
248
|
+
self.s = s
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
class TupleCache(Serialisable):
|
|
252
|
+
|
|
253
|
+
tagname = "tupleCache"
|
|
254
|
+
|
|
255
|
+
entries = Typed(expected_type=PCDSDTCEntries, allow_none=True)
|
|
256
|
+
sets = NestedSequence(expected_type=OLAPSet, count=True)
|
|
257
|
+
queryCache = NestedSequence(expected_type=Query, count=True)
|
|
258
|
+
serverFormats = NestedSequence(expected_type=ServerFormat, count=True)
|
|
259
|
+
extLst = Typed(expected_type=ExtensionList, allow_none=True)
|
|
260
|
+
|
|
261
|
+
__elements__ = ('entries', 'sets', 'queryCache', 'serverFormats', 'extLst')
|
|
262
|
+
|
|
263
|
+
def __init__(self,
|
|
264
|
+
entries=None,
|
|
265
|
+
sets=(),
|
|
266
|
+
queryCache=(),
|
|
267
|
+
serverFormats=(),
|
|
268
|
+
extLst=None,
|
|
269
|
+
):
|
|
270
|
+
self.entries = entries
|
|
271
|
+
self.sets = sets
|
|
272
|
+
self.queryCache = queryCache
|
|
273
|
+
self.serverFormats = serverFormats
|
|
274
|
+
self.extLst = extLst
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
class OLAPKPI(Serialisable):
|
|
278
|
+
|
|
279
|
+
tagname = "kpi"
|
|
280
|
+
|
|
281
|
+
uniqueName = String()
|
|
282
|
+
caption = String(allow_none=True)
|
|
283
|
+
displayFolder = String(allow_none=True)
|
|
284
|
+
measureGroup = String(allow_none=True)
|
|
285
|
+
parent = String(allow_none=True)
|
|
286
|
+
value = String()
|
|
287
|
+
goal = String(allow_none=True)
|
|
288
|
+
status = String(allow_none=True)
|
|
289
|
+
trend = String(allow_none=True)
|
|
290
|
+
weight = String(allow_none=True)
|
|
291
|
+
time = String(allow_none=True)
|
|
292
|
+
|
|
293
|
+
def __init__(self,
|
|
294
|
+
uniqueName=None,
|
|
295
|
+
caption=None,
|
|
296
|
+
displayFolder=None,
|
|
297
|
+
measureGroup=None,
|
|
298
|
+
parent=None,
|
|
299
|
+
value=None,
|
|
300
|
+
goal=None,
|
|
301
|
+
status=None,
|
|
302
|
+
trend=None,
|
|
303
|
+
weight=None,
|
|
304
|
+
time=None,
|
|
305
|
+
):
|
|
306
|
+
self.uniqueName = uniqueName
|
|
307
|
+
self.caption = caption
|
|
308
|
+
self.displayFolder = displayFolder
|
|
309
|
+
self.measureGroup = measureGroup
|
|
310
|
+
self.parent = parent
|
|
311
|
+
self.value = value
|
|
312
|
+
self.goal = goal
|
|
313
|
+
self.status = status
|
|
314
|
+
self.trend = trend
|
|
315
|
+
self.weight = weight
|
|
316
|
+
self.time = time
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
class GroupMember(Serialisable):
|
|
320
|
+
|
|
321
|
+
tagname = "groupMember"
|
|
322
|
+
|
|
323
|
+
uniqueName = String()
|
|
324
|
+
group = Bool()
|
|
325
|
+
|
|
326
|
+
def __init__(self,
|
|
327
|
+
uniqueName=None,
|
|
328
|
+
group=None,
|
|
329
|
+
):
|
|
330
|
+
self.uniqueName = uniqueName
|
|
331
|
+
self.group = group
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
class LevelGroup(Serialisable):
|
|
335
|
+
|
|
336
|
+
tagname = "group"
|
|
337
|
+
|
|
338
|
+
name = String()
|
|
339
|
+
uniqueName = String()
|
|
340
|
+
caption = String()
|
|
341
|
+
uniqueParent = String()
|
|
342
|
+
id = Integer()
|
|
343
|
+
groupMembers = NestedSequence(expected_type=GroupMember, count=True)
|
|
344
|
+
|
|
345
|
+
__elements__ = ('groupMembers',)
|
|
346
|
+
|
|
347
|
+
def __init__(self,
|
|
348
|
+
name=None,
|
|
349
|
+
uniqueName=None,
|
|
350
|
+
caption=None,
|
|
351
|
+
uniqueParent=None,
|
|
352
|
+
id=None,
|
|
353
|
+
groupMembers=(),
|
|
354
|
+
):
|
|
355
|
+
self.name = name
|
|
356
|
+
self.uniqueName = uniqueName
|
|
357
|
+
self.caption = caption
|
|
358
|
+
self.uniqueParent = uniqueParent
|
|
359
|
+
self.id = id
|
|
360
|
+
self.groupMembers = groupMembers
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
class GroupLevel(Serialisable):
|
|
364
|
+
|
|
365
|
+
tagname = "groupLevel"
|
|
366
|
+
|
|
367
|
+
uniqueName = String()
|
|
368
|
+
caption = String()
|
|
369
|
+
user = Bool()
|
|
370
|
+
customRollUp = Bool()
|
|
371
|
+
groups = NestedSequence(expected_type=LevelGroup, count=True)
|
|
372
|
+
extLst = Typed(expected_type=ExtensionList, allow_none=True)
|
|
373
|
+
|
|
374
|
+
__elements__ = ('groups', 'extLst')
|
|
375
|
+
|
|
376
|
+
def __init__(self,
|
|
377
|
+
uniqueName=None,
|
|
378
|
+
caption=None,
|
|
379
|
+
user=None,
|
|
380
|
+
customRollUp=None,
|
|
381
|
+
groups=(),
|
|
382
|
+
extLst=None,
|
|
383
|
+
):
|
|
384
|
+
self.uniqueName = uniqueName
|
|
385
|
+
self.caption = caption
|
|
386
|
+
self.user = user
|
|
387
|
+
self.customRollUp = customRollUp
|
|
388
|
+
self.groups = groups
|
|
389
|
+
self.extLst = extLst
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
class FieldUsage(Serialisable):
|
|
393
|
+
|
|
394
|
+
tagname = "fieldUsage"
|
|
395
|
+
|
|
396
|
+
x = Integer()
|
|
397
|
+
|
|
398
|
+
def __init__(self,
|
|
399
|
+
x=None,
|
|
400
|
+
):
|
|
401
|
+
self.x = x
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
class CacheHierarchy(Serialisable):
|
|
405
|
+
|
|
406
|
+
tagname = "cacheHierarchy"
|
|
407
|
+
|
|
408
|
+
uniqueName = String()
|
|
409
|
+
caption = String(allow_none=True)
|
|
410
|
+
measure = Bool()
|
|
411
|
+
set = Bool()
|
|
412
|
+
parentSet = Integer(allow_none=True)
|
|
413
|
+
iconSet = Integer()
|
|
414
|
+
attribute = Bool()
|
|
415
|
+
time = Bool()
|
|
416
|
+
keyAttribute = Bool()
|
|
417
|
+
defaultMemberUniqueName = String(allow_none=True)
|
|
418
|
+
allUniqueName = String(allow_none=True)
|
|
419
|
+
allCaption = String(allow_none=True)
|
|
420
|
+
dimensionUniqueName = String(allow_none=True)
|
|
421
|
+
displayFolder = String(allow_none=True)
|
|
422
|
+
measureGroup = String(allow_none=True)
|
|
423
|
+
measures = Bool()
|
|
424
|
+
count = Integer()
|
|
425
|
+
oneField = Bool()
|
|
426
|
+
memberValueDatatype = Integer(allow_none=True)
|
|
427
|
+
unbalanced = Bool(allow_none=True)
|
|
428
|
+
unbalancedGroup = Bool(allow_none=True)
|
|
429
|
+
hidden = Bool()
|
|
430
|
+
fieldsUsage = NestedSequence(expected_type=FieldUsage, count=True)
|
|
431
|
+
groupLevels = NestedSequence(expected_type=GroupLevel, count=True)
|
|
432
|
+
extLst = Typed(expected_type=ExtensionList, allow_none=True)
|
|
433
|
+
|
|
434
|
+
__elements__ = ('fieldsUsage', 'groupLevels')
|
|
435
|
+
|
|
436
|
+
def __init__(self,
|
|
437
|
+
uniqueName="",
|
|
438
|
+
caption=None,
|
|
439
|
+
measure=None,
|
|
440
|
+
set=None,
|
|
441
|
+
parentSet=None,
|
|
442
|
+
iconSet=0,
|
|
443
|
+
attribute=None,
|
|
444
|
+
time=None,
|
|
445
|
+
keyAttribute=None,
|
|
446
|
+
defaultMemberUniqueName=None,
|
|
447
|
+
allUniqueName=None,
|
|
448
|
+
allCaption=None,
|
|
449
|
+
dimensionUniqueName=None,
|
|
450
|
+
displayFolder=None,
|
|
451
|
+
measureGroup=None,
|
|
452
|
+
measures=None,
|
|
453
|
+
count=None,
|
|
454
|
+
oneField=None,
|
|
455
|
+
memberValueDatatype=None,
|
|
456
|
+
unbalanced=None,
|
|
457
|
+
unbalancedGroup=None,
|
|
458
|
+
hidden=None,
|
|
459
|
+
fieldsUsage=(),
|
|
460
|
+
groupLevels=(),
|
|
461
|
+
extLst=None,
|
|
462
|
+
):
|
|
463
|
+
self.uniqueName = uniqueName
|
|
464
|
+
self.caption = caption
|
|
465
|
+
self.measure = measure
|
|
466
|
+
self.set = set
|
|
467
|
+
self.parentSet = parentSet
|
|
468
|
+
self.iconSet = iconSet
|
|
469
|
+
self.attribute = attribute
|
|
470
|
+
self.time = time
|
|
471
|
+
self.keyAttribute = keyAttribute
|
|
472
|
+
self.defaultMemberUniqueName = defaultMemberUniqueName
|
|
473
|
+
self.allUniqueName = allUniqueName
|
|
474
|
+
self.allCaption = allCaption
|
|
475
|
+
self.dimensionUniqueName = dimensionUniqueName
|
|
476
|
+
self.displayFolder = displayFolder
|
|
477
|
+
self.measureGroup = measureGroup
|
|
478
|
+
self.measures = measures
|
|
479
|
+
self.count = count
|
|
480
|
+
self.oneField = oneField
|
|
481
|
+
self.memberValueDatatype = memberValueDatatype
|
|
482
|
+
self.unbalanced = unbalanced
|
|
483
|
+
self.unbalancedGroup = unbalancedGroup
|
|
484
|
+
self.hidden = hidden
|
|
485
|
+
self.fieldsUsage = fieldsUsage
|
|
486
|
+
self.groupLevels = groupLevels
|
|
487
|
+
self.extLst = extLst
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
class GroupItems(Serialisable):
|
|
491
|
+
|
|
492
|
+
tagname = "groupItems"
|
|
493
|
+
|
|
494
|
+
m = Sequence(expected_type=Missing)
|
|
495
|
+
n = Sequence(expected_type=Number)
|
|
496
|
+
b = Sequence(expected_type=Boolean)
|
|
497
|
+
e = Sequence(expected_type=Error)
|
|
498
|
+
s = Sequence(expected_type=Text)
|
|
499
|
+
d = Sequence(expected_type=DateTimeField,)
|
|
500
|
+
|
|
501
|
+
__elements__ = ('m', 'n', 'b', 'e', 's', 'd')
|
|
502
|
+
__attrs__ = ("count", )
|
|
503
|
+
|
|
504
|
+
def __init__(self,
|
|
505
|
+
count=None,
|
|
506
|
+
m=(),
|
|
507
|
+
n=(),
|
|
508
|
+
b=(),
|
|
509
|
+
e=(),
|
|
510
|
+
s=(),
|
|
511
|
+
d=(),
|
|
512
|
+
):
|
|
513
|
+
self.m = m
|
|
514
|
+
self.n = n
|
|
515
|
+
self.b = b
|
|
516
|
+
self.e = e
|
|
517
|
+
self.s = s
|
|
518
|
+
self.d = d
|
|
519
|
+
|
|
520
|
+
|
|
521
|
+
@property
|
|
522
|
+
def count(self):
|
|
523
|
+
return len(self.m + self.n + self.b + self.e + self.s + self.d)
|
|
524
|
+
|
|
525
|
+
|
|
526
|
+
class RangePr(Serialisable):
|
|
527
|
+
|
|
528
|
+
tagname = "rangePr"
|
|
529
|
+
|
|
530
|
+
autoStart = Bool(allow_none=True)
|
|
531
|
+
autoEnd = Bool(allow_none=True)
|
|
532
|
+
groupBy = NoneSet(values=(['range', 'seconds', 'minutes', 'hours', 'days',
|
|
533
|
+
'months', 'quarters', 'years']))
|
|
534
|
+
startNum = Float(allow_none=True)
|
|
535
|
+
endNum = Float(allow_none=True)
|
|
536
|
+
startDate = DateTime(allow_none=True)
|
|
537
|
+
endDate = DateTime(allow_none=True)
|
|
538
|
+
groupInterval = Float(allow_none=True)
|
|
539
|
+
|
|
540
|
+
def __init__(self,
|
|
541
|
+
autoStart=True,
|
|
542
|
+
autoEnd=True,
|
|
543
|
+
groupBy="range",
|
|
544
|
+
startNum=None,
|
|
545
|
+
endNum=None,
|
|
546
|
+
startDate=None,
|
|
547
|
+
endDate=None,
|
|
548
|
+
groupInterval=1,
|
|
549
|
+
):
|
|
550
|
+
self.autoStart = autoStart
|
|
551
|
+
self.autoEnd = autoEnd
|
|
552
|
+
self.groupBy = groupBy
|
|
553
|
+
self.startNum = startNum
|
|
554
|
+
self.endNum = endNum
|
|
555
|
+
self.startDate = startDate
|
|
556
|
+
self.endDate = endDate
|
|
557
|
+
self.groupInterval = groupInterval
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
class FieldGroup(Serialisable):
|
|
561
|
+
|
|
562
|
+
tagname = "fieldGroup"
|
|
563
|
+
|
|
564
|
+
par = Integer(allow_none=True)
|
|
565
|
+
base = Integer(allow_none=True)
|
|
566
|
+
rangePr = Typed(expected_type=RangePr, allow_none=True)
|
|
567
|
+
discretePr = NestedSequence(expected_type=NestedInteger, count=True)
|
|
568
|
+
groupItems = Typed(expected_type=GroupItems, allow_none=True)
|
|
569
|
+
|
|
570
|
+
__elements__ = ('rangePr', 'discretePr', 'groupItems')
|
|
571
|
+
|
|
572
|
+
def __init__(self,
|
|
573
|
+
par=None,
|
|
574
|
+
base=None,
|
|
575
|
+
rangePr=None,
|
|
576
|
+
discretePr=(),
|
|
577
|
+
groupItems=None,
|
|
578
|
+
):
|
|
579
|
+
self.par = par
|
|
580
|
+
self.base = base
|
|
581
|
+
self.rangePr = rangePr
|
|
582
|
+
self.discretePr = discretePr
|
|
583
|
+
self.groupItems = groupItems
|
|
584
|
+
|
|
585
|
+
|
|
586
|
+
class SharedItems(Serialisable):
|
|
587
|
+
|
|
588
|
+
tagname = "sharedItems"
|
|
589
|
+
|
|
590
|
+
_fields = MultiSequence()
|
|
591
|
+
m = MultiSequencePart(expected_type=Missing, store="_fields")
|
|
592
|
+
n = MultiSequencePart(expected_type=Number, store="_fields")
|
|
593
|
+
b = MultiSequencePart(expected_type=Boolean, store="_fields")
|
|
594
|
+
e = MultiSequencePart(expected_type=Error, store="_fields")
|
|
595
|
+
s = MultiSequencePart(expected_type=Text, store="_fields")
|
|
596
|
+
d = MultiSequencePart(expected_type=DateTimeField, store="_fields")
|
|
597
|
+
# attributes are optional and must be derived from associated cache records
|
|
598
|
+
containsSemiMixedTypes = Bool(allow_none=True)
|
|
599
|
+
containsNonDate = Bool(allow_none=True)
|
|
600
|
+
containsDate = Bool(allow_none=True)
|
|
601
|
+
containsString = Bool(allow_none=True)
|
|
602
|
+
containsBlank = Bool(allow_none=True)
|
|
603
|
+
containsMixedTypes = Bool(allow_none=True)
|
|
604
|
+
containsNumber = Bool(allow_none=True)
|
|
605
|
+
containsInteger = Bool(allow_none=True)
|
|
606
|
+
minValue = Float(allow_none=True)
|
|
607
|
+
maxValue = Float(allow_none=True)
|
|
608
|
+
minDate = DateTime(allow_none=True)
|
|
609
|
+
maxDate = DateTime(allow_none=True)
|
|
610
|
+
longText = Bool(allow_none=True)
|
|
611
|
+
|
|
612
|
+
__attrs__ = ('count', 'containsBlank', 'containsDate', 'containsInteger',
|
|
613
|
+
'containsMixedTypes', 'containsNonDate', 'containsNumber',
|
|
614
|
+
'containsSemiMixedTypes', 'containsString', 'minValue', 'maxValue',
|
|
615
|
+
'minDate', 'maxDate', 'longText')
|
|
616
|
+
|
|
617
|
+
def __init__(self,
|
|
618
|
+
_fields=(),
|
|
619
|
+
containsSemiMixedTypes=None,
|
|
620
|
+
containsNonDate=None,
|
|
621
|
+
containsDate=None,
|
|
622
|
+
containsString=None,
|
|
623
|
+
containsBlank=None,
|
|
624
|
+
containsMixedTypes=None,
|
|
625
|
+
containsNumber=None,
|
|
626
|
+
containsInteger=None,
|
|
627
|
+
minValue=None,
|
|
628
|
+
maxValue=None,
|
|
629
|
+
minDate=None,
|
|
630
|
+
maxDate=None,
|
|
631
|
+
count=None,
|
|
632
|
+
longText=None,
|
|
633
|
+
):
|
|
634
|
+
self._fields = _fields
|
|
635
|
+
self.containsBlank = containsBlank
|
|
636
|
+
self.containsDate = containsDate
|
|
637
|
+
self.containsNonDate = containsNonDate
|
|
638
|
+
self.containsString = containsString
|
|
639
|
+
self.containsMixedTypes = containsMixedTypes
|
|
640
|
+
self.containsSemiMixedTypes = containsSemiMixedTypes
|
|
641
|
+
self.containsNumber = containsNumber
|
|
642
|
+
self.containsInteger = containsInteger
|
|
643
|
+
self.minValue = minValue
|
|
644
|
+
self.maxValue = maxValue
|
|
645
|
+
self.minDate = minDate
|
|
646
|
+
self.maxDate = maxDate
|
|
647
|
+
self.longText = longText
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
@property
|
|
651
|
+
def count(self):
|
|
652
|
+
return len(self._fields)
|
|
653
|
+
|
|
654
|
+
|
|
655
|
+
class CacheField(Serialisable):
|
|
656
|
+
|
|
657
|
+
tagname = "cacheField"
|
|
658
|
+
|
|
659
|
+
sharedItems = Typed(expected_type=SharedItems, allow_none=True)
|
|
660
|
+
fieldGroup = Typed(expected_type=FieldGroup, allow_none=True)
|
|
661
|
+
mpMap = NestedInteger(allow_none=True, attribute="v")
|
|
662
|
+
extLst = Typed(expected_type=ExtensionList, allow_none=True)
|
|
663
|
+
name = String()
|
|
664
|
+
caption = String(allow_none=True)
|
|
665
|
+
propertyName = String(allow_none=True)
|
|
666
|
+
serverField = Bool(allow_none=True)
|
|
667
|
+
uniqueList = Bool(allow_none=True)
|
|
668
|
+
numFmtId = Integer(allow_none=True)
|
|
669
|
+
formula = String(allow_none=True)
|
|
670
|
+
sqlType = Integer(allow_none=True)
|
|
671
|
+
hierarchy = Integer(allow_none=True)
|
|
672
|
+
level = Integer(allow_none=True)
|
|
673
|
+
databaseField = Bool(allow_none=True)
|
|
674
|
+
mappingCount = Integer(allow_none=True)
|
|
675
|
+
memberPropertyField = Bool(allow_none=True)
|
|
676
|
+
|
|
677
|
+
__elements__ = ('sharedItems', 'fieldGroup', 'mpMap')
|
|
678
|
+
|
|
679
|
+
def __init__(self,
|
|
680
|
+
sharedItems=None,
|
|
681
|
+
fieldGroup=None,
|
|
682
|
+
mpMap=None,
|
|
683
|
+
extLst=None,
|
|
684
|
+
name=None,
|
|
685
|
+
caption=None,
|
|
686
|
+
propertyName=None,
|
|
687
|
+
serverField=None,
|
|
688
|
+
uniqueList=True,
|
|
689
|
+
numFmtId=None,
|
|
690
|
+
formula=None,
|
|
691
|
+
sqlType=0,
|
|
692
|
+
hierarchy=0,
|
|
693
|
+
level=0,
|
|
694
|
+
databaseField=True,
|
|
695
|
+
mappingCount=None,
|
|
696
|
+
memberPropertyField=None,
|
|
697
|
+
):
|
|
698
|
+
self.sharedItems = sharedItems
|
|
699
|
+
self.fieldGroup = fieldGroup
|
|
700
|
+
self.mpMap = mpMap
|
|
701
|
+
self.extLst = extLst
|
|
702
|
+
self.name = name
|
|
703
|
+
self.caption = caption
|
|
704
|
+
self.propertyName = propertyName
|
|
705
|
+
self.serverField = serverField
|
|
706
|
+
self.uniqueList = uniqueList
|
|
707
|
+
self.numFmtId = numFmtId
|
|
708
|
+
self.formula = formula
|
|
709
|
+
self.sqlType = sqlType
|
|
710
|
+
self.hierarchy = hierarchy
|
|
711
|
+
self.level = level
|
|
712
|
+
self.databaseField = databaseField
|
|
713
|
+
self.mappingCount = mappingCount
|
|
714
|
+
self.memberPropertyField = memberPropertyField
|
|
715
|
+
|
|
716
|
+
|
|
717
|
+
class RangeSet(Serialisable):
|
|
718
|
+
|
|
719
|
+
tagname = "rangeSet"
|
|
720
|
+
|
|
721
|
+
i1 = Integer(allow_none=True)
|
|
722
|
+
i2 = Integer(allow_none=True)
|
|
723
|
+
i3 = Integer(allow_none=True)
|
|
724
|
+
i4 = Integer(allow_none=True)
|
|
725
|
+
ref = String()
|
|
726
|
+
name = String(allow_none=True)
|
|
727
|
+
sheet = String(allow_none=True)
|
|
728
|
+
|
|
729
|
+
def __init__(self,
|
|
730
|
+
i1=None,
|
|
731
|
+
i2=None,
|
|
732
|
+
i3=None,
|
|
733
|
+
i4=None,
|
|
734
|
+
ref=None,
|
|
735
|
+
name=None,
|
|
736
|
+
sheet=None,
|
|
737
|
+
):
|
|
738
|
+
self.i1 = i1
|
|
739
|
+
self.i2 = i2
|
|
740
|
+
self.i3 = i3
|
|
741
|
+
self.i4 = i4
|
|
742
|
+
self.ref = ref
|
|
743
|
+
self.name = name
|
|
744
|
+
self.sheet = sheet
|
|
745
|
+
|
|
746
|
+
|
|
747
|
+
class PageItem(Serialisable):
|
|
748
|
+
|
|
749
|
+
tagname = "pageItem"
|
|
750
|
+
|
|
751
|
+
name = String()
|
|
752
|
+
|
|
753
|
+
def __init__(self,
|
|
754
|
+
name=None,
|
|
755
|
+
):
|
|
756
|
+
self.name = name
|
|
757
|
+
|
|
758
|
+
|
|
759
|
+
class Consolidation(Serialisable):
|
|
760
|
+
|
|
761
|
+
tagname = "consolidation"
|
|
762
|
+
|
|
763
|
+
autoPage = Bool(allow_none=True)
|
|
764
|
+
pages = NestedSequence(expected_type=PageItem, count=True)
|
|
765
|
+
rangeSets = NestedSequence(expected_type=RangeSet, count=True)
|
|
766
|
+
|
|
767
|
+
__elements__ = ('pages', 'rangeSets')
|
|
768
|
+
|
|
769
|
+
def __init__(self,
|
|
770
|
+
autoPage=None,
|
|
771
|
+
pages=(),
|
|
772
|
+
rangeSets=(),
|
|
773
|
+
):
|
|
774
|
+
self.autoPage = autoPage
|
|
775
|
+
self.pages = pages
|
|
776
|
+
self.rangeSets = rangeSets
|
|
777
|
+
|
|
778
|
+
|
|
779
|
+
class WorksheetSource(Serialisable):
|
|
780
|
+
|
|
781
|
+
tagname = "worksheetSource"
|
|
782
|
+
|
|
783
|
+
ref = String(allow_none=True)
|
|
784
|
+
name = String(allow_none=True)
|
|
785
|
+
sheet = String(allow_none=True)
|
|
786
|
+
|
|
787
|
+
def __init__(self,
|
|
788
|
+
ref=None,
|
|
789
|
+
name=None,
|
|
790
|
+
sheet=None,
|
|
791
|
+
):
|
|
792
|
+
self.ref = ref
|
|
793
|
+
self.name = name
|
|
794
|
+
self.sheet = sheet
|
|
795
|
+
|
|
796
|
+
|
|
797
|
+
class CacheSource(Serialisable):
|
|
798
|
+
|
|
799
|
+
tagname = "cacheSource"
|
|
800
|
+
|
|
801
|
+
type = Set(values=(['worksheet', 'external', 'consolidation', 'scenario']))
|
|
802
|
+
connectionId = Integer(allow_none=True)
|
|
803
|
+
# some elements are choice
|
|
804
|
+
worksheetSource = Typed(expected_type=WorksheetSource, allow_none=True)
|
|
805
|
+
consolidation = Typed(expected_type=Consolidation, allow_none=True)
|
|
806
|
+
extLst = Typed(expected_type=ExtensionList, allow_none=True)
|
|
807
|
+
|
|
808
|
+
__elements__ = ('worksheetSource', 'consolidation',)
|
|
809
|
+
|
|
810
|
+
def __init__(self,
|
|
811
|
+
type=None,
|
|
812
|
+
connectionId=None,
|
|
813
|
+
worksheetSource=None,
|
|
814
|
+
consolidation=None,
|
|
815
|
+
extLst=None,
|
|
816
|
+
):
|
|
817
|
+
self.type = type
|
|
818
|
+
self.connectionId = connectionId
|
|
819
|
+
self.worksheetSource = worksheetSource
|
|
820
|
+
self.consolidation = consolidation
|
|
821
|
+
|
|
822
|
+
|
|
823
|
+
class CacheDefinition(Serialisable):
|
|
824
|
+
|
|
825
|
+
mime_type = "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml"
|
|
826
|
+
rel_type = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition"
|
|
827
|
+
_id = 1
|
|
828
|
+
_path = "/xl/pivotCache/pivotCacheDefinition{0}.xml"
|
|
829
|
+
records = None
|
|
830
|
+
|
|
831
|
+
tagname = "pivotCacheDefinition"
|
|
832
|
+
|
|
833
|
+
invalid = Bool(allow_none=True)
|
|
834
|
+
saveData = Bool(allow_none=True)
|
|
835
|
+
refreshOnLoad = Bool(allow_none=True)
|
|
836
|
+
optimizeMemory = Bool(allow_none=True)
|
|
837
|
+
enableRefresh = Bool(allow_none=True)
|
|
838
|
+
refreshedBy = String(allow_none=True)
|
|
839
|
+
refreshedDate = Float(allow_none=True)
|
|
840
|
+
refreshedDateIso = DateTime(allow_none=True)
|
|
841
|
+
backgroundQuery = Bool(allow_none=True)
|
|
842
|
+
missingItemsLimit = Integer(allow_none=True)
|
|
843
|
+
createdVersion = Integer(allow_none=True)
|
|
844
|
+
refreshedVersion = Integer(allow_none=True)
|
|
845
|
+
minRefreshableVersion = Integer(allow_none=True)
|
|
846
|
+
recordCount = Integer(allow_none=True)
|
|
847
|
+
upgradeOnRefresh = Bool(allow_none=True)
|
|
848
|
+
supportSubquery = Bool(allow_none=True)
|
|
849
|
+
supportAdvancedDrill = Bool(allow_none=True)
|
|
850
|
+
cacheSource = Typed(expected_type=CacheSource)
|
|
851
|
+
cacheFields = NestedSequence(expected_type=CacheField, count=True)
|
|
852
|
+
cacheHierarchies = NestedSequence(expected_type=CacheHierarchy, allow_none=True)
|
|
853
|
+
kpis = NestedSequence(expected_type=OLAPKPI, count=True)
|
|
854
|
+
tupleCache = Typed(expected_type=TupleCache, allow_none=True)
|
|
855
|
+
calculatedItems = NestedSequence(expected_type=CalculatedItem, count=True)
|
|
856
|
+
calculatedMembers = NestedSequence(expected_type=CalculatedMember, count=True)
|
|
857
|
+
dimensions = NestedSequence(expected_type=PivotDimension, allow_none=True)
|
|
858
|
+
measureGroups = NestedSequence(expected_type=MeasureGroup, count=True)
|
|
859
|
+
maps = NestedSequence(expected_type=MeasureDimensionMap, count=True)
|
|
860
|
+
extLst = Typed(expected_type=ExtensionList, allow_none=True)
|
|
861
|
+
id = Relation()
|
|
862
|
+
|
|
863
|
+
__elements__ = ('cacheSource', 'cacheFields', 'cacheHierarchies', 'kpis',
|
|
864
|
+
'tupleCache', 'calculatedItems', 'calculatedMembers', 'dimensions',
|
|
865
|
+
'measureGroups', 'maps',)
|
|
866
|
+
|
|
867
|
+
def __init__(self,
|
|
868
|
+
invalid=None,
|
|
869
|
+
saveData=None,
|
|
870
|
+
refreshOnLoad=None,
|
|
871
|
+
optimizeMemory=None,
|
|
872
|
+
enableRefresh=None,
|
|
873
|
+
refreshedBy=None,
|
|
874
|
+
refreshedDate=None,
|
|
875
|
+
refreshedDateIso=None,
|
|
876
|
+
backgroundQuery=None,
|
|
877
|
+
missingItemsLimit=None,
|
|
878
|
+
createdVersion=None,
|
|
879
|
+
refreshedVersion=None,
|
|
880
|
+
minRefreshableVersion=None,
|
|
881
|
+
recordCount=None,
|
|
882
|
+
upgradeOnRefresh=None,
|
|
883
|
+
tupleCache=None,
|
|
884
|
+
supportSubquery=None,
|
|
885
|
+
supportAdvancedDrill=None,
|
|
886
|
+
cacheSource=None,
|
|
887
|
+
cacheFields=(),
|
|
888
|
+
cacheHierarchies=(),
|
|
889
|
+
kpis=(),
|
|
890
|
+
calculatedItems=(),
|
|
891
|
+
calculatedMembers=(),
|
|
892
|
+
dimensions=(),
|
|
893
|
+
measureGroups=(),
|
|
894
|
+
maps=(),
|
|
895
|
+
extLst=None,
|
|
896
|
+
id = None,
|
|
897
|
+
):
|
|
898
|
+
self.invalid = invalid
|
|
899
|
+
self.saveData = saveData
|
|
900
|
+
self.refreshOnLoad = refreshOnLoad
|
|
901
|
+
self.optimizeMemory = optimizeMemory
|
|
902
|
+
self.enableRefresh = enableRefresh
|
|
903
|
+
self.refreshedBy = refreshedBy
|
|
904
|
+
self.refreshedDate = refreshedDate
|
|
905
|
+
self.refreshedDateIso = refreshedDateIso
|
|
906
|
+
self.backgroundQuery = backgroundQuery
|
|
907
|
+
self.missingItemsLimit = missingItemsLimit
|
|
908
|
+
self.createdVersion = createdVersion
|
|
909
|
+
self.refreshedVersion = refreshedVersion
|
|
910
|
+
self.minRefreshableVersion = minRefreshableVersion
|
|
911
|
+
self.recordCount = recordCount
|
|
912
|
+
self.upgradeOnRefresh = upgradeOnRefresh
|
|
913
|
+
self.supportSubquery = supportSubquery
|
|
914
|
+
self.supportAdvancedDrill = supportAdvancedDrill
|
|
915
|
+
self.cacheSource = cacheSource
|
|
916
|
+
self.cacheFields = cacheFields
|
|
917
|
+
self.cacheHierarchies = cacheHierarchies
|
|
918
|
+
self.kpis = kpis
|
|
919
|
+
self.tupleCache = tupleCache
|
|
920
|
+
self.calculatedItems = calculatedItems
|
|
921
|
+
self.calculatedMembers = calculatedMembers
|
|
922
|
+
self.dimensions = dimensions
|
|
923
|
+
self.measureGroups = measureGroups
|
|
924
|
+
self.maps = maps
|
|
925
|
+
self.id = id
|
|
926
|
+
|
|
927
|
+
|
|
928
|
+
def to_tree(self):
|
|
929
|
+
node = super().to_tree()
|
|
930
|
+
node.set("xmlns", SHEET_MAIN_NS)
|
|
931
|
+
return node
|
|
932
|
+
|
|
933
|
+
|
|
934
|
+
@property
|
|
935
|
+
def path(self):
|
|
936
|
+
return self._path.format(self._id)
|
|
937
|
+
|
|
938
|
+
|
|
939
|
+
def _write(self, archive, manifest):
|
|
940
|
+
"""
|
|
941
|
+
Add to zipfile and update manifest
|
|
942
|
+
"""
|
|
943
|
+
self._write_rels(archive, manifest)
|
|
944
|
+
xml = tostring(self.to_tree())
|
|
945
|
+
archive.writestr(self.path[1:], xml)
|
|
946
|
+
manifest.append(self)
|
|
947
|
+
|
|
948
|
+
|
|
949
|
+
def _write_rels(self, archive, manifest):
|
|
950
|
+
"""
|
|
951
|
+
Write the relevant child objects and add links
|
|
952
|
+
"""
|
|
953
|
+
if self.records is None:
|
|
954
|
+
return
|
|
955
|
+
|
|
956
|
+
rels = RelationshipList()
|
|
957
|
+
r = Relationship(Type=self.records.rel_type, Target=self.records.path)
|
|
958
|
+
rels.append(r)
|
|
959
|
+
self.id = r.id
|
|
960
|
+
self.records._id = self._id
|
|
961
|
+
self.records._write(archive, manifest)
|
|
962
|
+
|
|
963
|
+
path = get_rels_path(self.path)
|
|
964
|
+
xml = tostring(rels.to_tree())
|
|
965
|
+
archive.writestr(path[1:], xml)
|