birt-core 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/birt-core.gemspec +1 -1
- data/lib/birt/core/rpt_design.rb +7 -8
- data/lib/birt/core/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2887c763abd64e6571cedad3123c5d28936b726d
|
4
|
+
data.tar.gz: 7991f9d072c54f5c1325a122903797d88cc78fe1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb563fa7c8ddb15f0455652330d12f852ebbea187c8b97df0b46e64d72d6aa65a21c9da19ab61405289d1e5bc424dd10c804edd452f2d69045b747e4de60a678
|
7
|
+
data.tar.gz: db96799edcb5d94e9ff134f585ee2d5877fa707479df94b4353571dc6beeca18d213323936553e21874d17053b8000ad113a3b558cc28464242c151faabb23a5
|
data/birt-core.gemspec
CHANGED
data/lib/birt/core/rpt_design.rb
CHANGED
@@ -8,9 +8,8 @@ class Birt::Core::RptDesign
|
|
8
8
|
|
9
9
|
def initialize(rpt_design_path)
|
10
10
|
self.rpt_design_path = rpt_design_path
|
11
|
-
|
12
|
-
|
13
|
-
self.reports = Hash.new
|
11
|
+
@data_sources, @data_sets = {}, {}
|
12
|
+
@reports = {tables: {}}
|
14
13
|
end
|
15
14
|
|
16
15
|
#解析文件
|
@@ -19,20 +18,20 @@ class Birt::Core::RptDesign
|
|
19
18
|
|
20
19
|
#数据源
|
21
20
|
_root.each_element(xpath = '/report/data-sources/oda-data-source') do |item|
|
22
|
-
p
|
21
|
+
p @data_sources[item.attribute(:name).value] = Birt::Core::DataSource.new(item)
|
23
22
|
end
|
24
23
|
|
25
24
|
#数据集
|
26
25
|
_root.each_element(xpath='/report/data-sets/oda-data-set') do |item|
|
27
|
-
|
28
|
-
data_set.data_source =
|
26
|
+
@data_sets[item.attribute(:name).value] = Birt::Core::DataSet.new(item) do |data_set|
|
27
|
+
data_set.data_source = @data_sources[item.get_elements("property[@name='dataSource']")[0].text]
|
29
28
|
end
|
30
29
|
end
|
31
30
|
|
32
31
|
#报表
|
33
32
|
_root.each_element(xpath='/report/body/table') do |item|
|
34
|
-
|
35
|
-
report.data_set =
|
33
|
+
@reports[:tables]["#{item.attribute(:id).value}"] = Birt::Core::TableReport.new(item) do |report|
|
34
|
+
report.data_set = @data_sets[item.get_elements("property[@name='dataSet']")[0].text]
|
36
35
|
end
|
37
36
|
end
|
38
37
|
end
|
data/lib/birt/core/version.rb
CHANGED
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: birt-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Saxer
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
123
123
|
version: '0'
|
124
124
|
requirements: []
|
125
125
|
rubyforge_project:
|
126
|
-
rubygems_version: 2.4.
|
126
|
+
rubygems_version: 2.4.6
|
127
127
|
signing_key:
|
128
128
|
specification_version: 4
|
129
129
|
summary: birt-core
|