Hi Randy,
You plugin seems to be the answer to my current project that I am building right now.
Source of my data is another server, which feeds tons of Map<string, object=""> into the aggregator framework. The value in the map is a list of java objects. My requirement is to aggregate all the value-lists. Example few records are as following - </string,>
October, Chicago, Cold, 40
January, Chicago, Freezing, -10
October, New York, Pleasant, 70
January, New York, Cold, 0
January, Toronto, Freezing, -20
Example aggregations can be,
Can you tell me how will I solve this problem using jAgg.
Do note that, the values are coming in a map, and depending on which system is feeding it, the number of data-points will vary.
Thanks for your help in advance.
Anonymous
First, jAgg operates on
Lists of Java objects. So you will need to extract theListout of yourMap.Then you can supply a
Listof properties and aListofAggregateFunctions to anAggregationobject.Create a
Listof properties, assuming that your value object has getter methods such asgetMonth(),getHowCold(), etc.Create your list of aggregate operations you'd like to perform.
and/or
Build your
Aggregationobject, which is what will perform the actual calculations.Perform the operations.
Then you can loop through the
ListofAggregateValue, callinggetObject()to access the group-by category values andgetAggregateValue(int index)to access the aggregate values.The following documentation pages may provide further help:
Please reply back if you have any further questions about using jAgg.