@@ -40,9 +40,9 @@ public SimpleMeasureDefinition(final ObjQualifier item) {
4040
4141 /**
4242 * Creates new definition
43- * @param item item which is measured
43+ * @param item item which is measured, can be attribute, fact or another measure
4444 * @param aggregation additional aggregation applied
45- * @param computeRatio whether should be shown in percent
45+ * @param computeRatio whether should be shown as ratio
4646 * @param filters additional filters applied
4747 */
4848 @ JsonCreator
@@ -56,11 +56,25 @@ public SimpleMeasureDefinition(@JsonProperty("item") final ObjQualifier item,
5656 this .filters = filters ;
5757 }
5858
59+ /**
60+ * Creates new definition
61+ * @param item item which is measured, can be attribute, fact or another measure
62+ * @param aggregation additional aggregation applied
63+ * @param computeRatio whether should be shown as ratio
64+ * @param filters additional filters applied
65+ */
5966 public SimpleMeasureDefinition (final ObjQualifier item , final Aggregation aggregation , final Boolean computeRatio ,
6067 final List <FilterItem > filters ) {
6168 this (item , notNull (aggregation , "aggregation" ).toString (), computeRatio , filters );
6269 }
6370
71+ /**
72+ * Creates new definition
73+ * @param item item which is measured, can be attribute, fact or another measure
74+ * @param aggregation additional aggregation applied
75+ * @param computeRatio whether should be shown as ratio
76+ * @param filters additional filters applied
77+ */
6478 public SimpleMeasureDefinition (final ObjQualifier item , final Aggregation aggregation , final Boolean computeRatio ,
6579 final FilterItem ... filters ) {
6680 this (item , aggregation , computeRatio , asList (filters ));
@@ -81,58 +95,99 @@ public String getUri() {
8195 return getItem ().getUri ();
8296 }
8397
84- public ObjQualifier getItem () {
85- return item ;
86- }
87-
8898 @ Override
8999 public ObjQualifier getObjQualifier () {
90100 return getItem ();
91101 }
92102
103+ /**
104+ * @return measured item, can be attribute, fact or another measure
105+ */
106+ public ObjQualifier getItem () {
107+ return item ;
108+ }
109+
110+ /**
111+ * @return additional aggregation applied
112+ */
93113 public String getAggregation () {
94114 return aggregation ;
95115 }
96116
117+ /**
118+ * Set additional aggregation applied
119+ * @param aggregation additional aggregation applied
120+ */
97121 public void setAggregation (final String aggregation ) {
98122 this .aggregation = aggregation ;
99123 }
100124
125+ /**
126+ * Set additional aggregation applied
127+ * @param aggregation additional aggregation applied
128+ */
101129 public void setAggregation (final Aggregation aggregation ) {
102130 setAggregation (notNull (aggregation , "aggregation" ).toString ());
103131 }
104132
133+ /**
134+ * @return true when should be shown as ratio, false otherwise
135+ */
105136 public Boolean getComputeRatio () {
106137 return computeRatio ;
107138 }
108139
140+ /**
141+ * Set whether should be shown as ratio
142+ * @param computeRatio whether should be shown as ratio
143+ */
109144 public void setComputeRatio (final Boolean computeRatio ) {
110145 this .computeRatio = computeRatio ;
111146 }
112147
148+ /**
149+ * @return additional filters applied
150+ */
113151 public List <FilterItem > getFilters () {
114152 return filters ;
115153 }
116154
155+ /**
156+ * Set additional filters applied
157+ * @param filters additional filters applied
158+ */
117159 public void setFilters (final List <FilterItem > filters ) {
118160 this .filters = filters ;
119161 }
120162
163+ /**
164+ * Apply additional filter
165+ * @param filter filter to be applied
166+ */
121167 public void addFilter (final FilterItem filter ) {
122168 if (filters == null ) {
123169 filters = new ArrayList <>();
124170 }
125171 filters .add (notNull (filter , "filter" ));
126172 }
127173
174+ /**
175+ * @return true when filters are set, false otherwise
176+ */
128177 public boolean hasFilters () {
129178 return filters != null && !filters .isEmpty ();
130179 }
131180
181+ /**
182+ * @return true when computeRatio is set, false otherwise
183+ */
132184 public boolean hasComputeRatio () {
133185 return computeRatio != null && computeRatio ;
134186 }
135187
188+ /**
189+ * @return true when additional aggregation is set, false otherwise
190+ */
136191 public boolean hasAggregation () {
137192 return aggregation != null ;
138193 }
0 commit comments