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 +4 -4
- data/lib/mondrian_rest/api.rb +4 -1
- data/lib/mondrian_rest/mondrian_ext.rb +25 -24
- data/lib/mondrian_rest/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12334892d6921a2f8b3c510b692b6d023cf63fe791908fe6d9d43a8d99949443
|
4
|
+
data.tar.gz: 745982c6d9f325bfbc51ce61c188be7d9e8f1de7f76f657d1f49241a79fbb847
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 699c648acab977a955a989f75bf0c14821f4eac55dc6418fdc32091773aa6b6d802add321e5e77ae689950da095ae791746a13c67ccc75002a48886bafed64ac
|
7
|
+
data.tar.gz: aa452fe99354a1c74f9535738bbb2fcb68e40fc8b7dd6fa1fb4412da26942d04ff48b09e924976dad1fcb522be3282ace9ae57aecdf39711f217f5071a51d5fb
|
data/lib/mondrian_rest/api.rb
CHANGED
@@ -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(
|
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
|
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
|
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
|
-
|
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
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
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
|
|
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
|
+
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-
|
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
|