use of com.hack23.cia.web.impl.ui.application.views.common.dataseriesfactory.api.ProposalCommitteeeSummary in project cia by Hack23.
the class DecisionDataFactoryImpl method createCommitteeSummary.
@Override
public List<ProposalCommitteeeSummary> createCommitteeSummary(final String processedIn) {
final List<ProposalCommitteeeSummary> summary = new ArrayList<>();
final DataContainer<DocumentStatusContainer, Long> dataContainer = applicationManager.getDataContainer(DocumentStatusContainer.class);
for (final DocumentStatusContainer document : dataContainer.getAll()) {
addProposalCommitteeeSummary(processedIn, summary, document);
}
return summary;
}
use of com.hack23.cia.web.impl.ui.application.views.common.dataseriesfactory.api.ProposalCommitteeeSummary in project cia by Hack23.
the class DecisionFlowChartManagerImpl method createCommitteeDecisionFlow.
@Override
public SankeyChart createCommitteeDecisionFlow(final ViewRiksdagenCommittee viewRiksdagenCommittee, final Map<String, List<ViewRiksdagenCommittee>> committeeMap, final String rm) {
final List<ProposalCommitteeeSummary> createCommitteeSummary = decisionDataFactory.createCommitteeSummary(rm);
final SankeyChart chart = new SankeyChart();
final Map<String, List<ProposalCommitteeeSummary>> orgProposalMap = createCommitteeSummary.stream().collect(Collectors.groupingBy(ProposalCommitteeeSummary::getOrg));
for (final Entry<String, List<ProposalCommitteeeSummary>> entry : orgProposalMap.entrySet()) {
if (committeeMap.containsKey(entry.getKey()) && viewRiksdagenCommittee.getEmbeddedId().getOrgCode().equals(entry.getKey())) {
addDocTypeDecisionDataRows(chart, entry);
}
}
chart.drawChart();
return chart;
}
use of com.hack23.cia.web.impl.ui.application.views.common.dataseriesfactory.api.ProposalCommitteeeSummary in project cia by Hack23.
the class DecisionFlowChartManagerImpl method createAllDecisionFlow.
@Override
public SankeyChart createAllDecisionFlow(final Map<String, List<ViewRiksdagenCommittee>> committeeMap, final String rm) {
final List<ProposalCommitteeeSummary> createCommitteeSummary = decisionDataFactory.createCommitteeSummary(rm);
final SankeyChart chart = new SankeyChart();
final Map<String, List<ProposalCommitteeeSummary>> orgProposalMap = createCommitteeSummary.stream().collect(Collectors.groupingBy(ProposalCommitteeeSummary::getOrg));
for (final Entry<String, List<ProposalCommitteeeSummary>> entry : orgProposalMap.entrySet()) {
if (committeeMap.containsKey(entry.getKey())) {
final Optional<ViewRiksdagenCommittee> vewRiksdagenCommittee = committeeMap.get(entry.getKey()).stream().findFirst();
if (vewRiksdagenCommittee.isPresent()) {
addDocTypeDataRows(chart, entry, vewRiksdagenCommittee.get());
addDecisionDataRows(chart, entry, vewRiksdagenCommittee.get());
}
}
}
chart.drawChart();
return chart;
}
Aggregations