mondrian-rest 0.7.4-java → 0.7.5-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e4d1b0e972476646e06eb0eb12c02c06deb1ef65e8ecf37d4c88d75675283ccc
4
- data.tar.gz: d7c3adad2231087c8920685472698fa51d07a62a2b59f49b47dc7bce9fb3fbeb
3
+ metadata.gz: 12334892d6921a2f8b3c510b692b6d023cf63fe791908fe6d9d43a8d99949443
4
+ data.tar.gz: 745982c6d9f325bfbc51ce61c188be7d9e8f1de7f76f657d1f49241a79fbb847
5
5
  SHA512:
6
- metadata.gz: 7f0e224ca6f51b5f0db3297ddacbe08c0a316020911a3d9c90a00c70b49d3203d9edcaec6afbba0f21ad7156fe6915be0637375030db70f61aebc200a9c69152
7
- data.tar.gz: 1e96dd371439ee9596511352893351bd43c9d11ac96eb3227d7bff289ef74ec3b7a1f1401436599c5485e2a34204cc953ca9ed464429a3c1433b8852333b84e9
6
+ metadata.gz: 699c648acab977a955a989f75bf0c14821f4eac55dc6418fdc32091773aa6b6d802add321e5e77ae689950da095ae791746a13c67ccc75002a48886bafed64ac
7
+ data.tar.gz: aa452fe99354a1c74f9535738bbb2fcb68e40fc8b7dd6fa1fb4412da26942d04ff48b09e924976dad1fcb522be3282ace9ae57aecdf39711f217f5071a51d5fb
@@ -192,7 +192,10 @@ module Mondrian::REST
192
192
  error!("level #{params[:level_name]} not found in dimension #{params[:dimension_name]}")
193
193
  end
194
194
 
195
- level.to_h(params[:member_properties], params[:children], params[:caption])
195
+ level.to_h(member_properties: params[:member_properties],
196
+ get_children: params[:children],
197
+ member_caption: params[:caption],
198
+ get_members: true)
196
199
  end
197
200
 
198
201
  route_param :member_key,
@@ -25,16 +25,7 @@ module Mondrian
25
25
  :has_all => h.has_all?,
26
26
  :all_member_name => h.all_member_name,
27
27
  :levels => h.levels.map { |l|
28
- {
29
- :name => l.name,
30
- :full_name => l.full_name,
31
- :caption => l.caption,
32
- :depth => l.depth,
33
- :annotations => l.annotations,
34
- :properties => l.own_props.map { |p|
35
- p.getName
36
- }
37
- }
28
+ l.to_h(get_members: false)
38
29
  }
39
30
  }
40
31
  }
@@ -96,7 +87,9 @@ module Mondrian
96
87
  {
97
88
  name: h.name,
98
89
  has_all: h.has_all?,
99
- levels: h.levels.map(&:to_h) #/levels
90
+ levels: h.levels.map { |l|
91
+ l.to_h(get_members: true)
92
+ } #/levels
100
93
  } # /hierarchies
101
94
  } #/map
102
95
  } #/ dimension
@@ -120,17 +113,24 @@ module Mondrian
120
113
  "#{Java::MondrianOlap::Util.quoteMdxIdentifier(hierarchy.dimension.name)}.#{Java::MondrianOlap::Util.quoteMdxIdentifier(hierarchy.name)}.#{Java::MondrianOlap::Util.quoteMdxIdentifier(self.name)}"
121
114
  end
122
115
 
123
- def to_h(member_properties=[], get_children=false, member_caption=nil)
124
- {
116
+ def to_h(member_properties: [], get_children: false, member_caption: nil, get_members: false)
117
+ rv = {
125
118
  name: self.name,
119
+ full_name: self.full_name,
120
+ depth: self.depth,
126
121
  caption: self.caption,
127
- members: self.members
128
- .uniq { |m| m.property_value('MEMBER_KEY') }
129
- .map { |m| m.to_h(member_properties, member_caption, get_children) },
122
+ annotations: self.annotations,
130
123
  :properties => self.own_props.map { |p|
131
124
  p.getName
132
125
  }
133
126
  }
127
+
128
+ if get_members
129
+ rv[:members] = self.members
130
+ .uniq { |m| m.property_value('MEMBER_KEY') }
131
+ .map { |m| m.to_h(member_properties, member_caption, get_children) }
132
+ end
133
+ rv
134
134
  end
135
135
 
136
136
  def own_props
@@ -180,14 +180,15 @@ module Mondrian
180
180
  end
181
181
 
182
182
  def dimension_info
183
- d = @raw_member.getDimension
184
- l = @raw_member.getLevel
185
- {
186
- name: d.getName,
187
- caption: d.getCaption,
188
- type: self.dimension_type,
189
- level: l.getCaption,
190
- level_depth: l.depth
183
+ d = @raw_member.getDimension()
184
+ l = @raw_member.getLevel()
185
+
186
+ x = {
187
+ :name => d.getName,
188
+ :caption => d.getCaption,
189
+ :type => self.dimension_type,
190
+ :level => l.getCaption,
191
+ :level_depth => l.depth
191
192
  }
192
193
  end
193
194
 
@@ -1,5 +1,5 @@
1
1
  module Mondrian
2
2
  module REST
3
- VERSION = "0.7.4"
3
+ VERSION = "0.7.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mondrian-rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.4
4
+ version: 0.7.5
5
5
  platform: java
6
6
  authors:
7
7
  - Manuel Aristarán
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-04 00:00:00.000000000 Z
11
+ date: 2017-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement