Changeset 4550 for ComponentRegistry/trunk/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/frontend/StatisticsPage.java
- Timestamp:
- 02/25/14 09:35:47 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ComponentRegistry/trunk/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/frontend/StatisticsPage.java
r1419 r4550 21 21 import clarin.cmdi.componentregistry.model.ComponentDescription; 22 22 import clarin.cmdi.componentregistry.model.ProfileDescription; 23 import java.util.Collection; 24 import java.util.Collections; 23 25 24 26 /** … … 69 71 CMDComponentSpec profile = CMDComponentSpecExpanderDbImpl.expandProfile(pd.getId(), (ComponentRegistryDbImpl) registry); 70 72 Statistics stats = new Statistics(); 71 componentCounter(profile .getCMDComponent(), stats);73 componentCounter(profile, stats); 72 74 item.add(new Label("nrcomp", "" + stats.componentnumber)); 73 75 item.add(new Label("nrprofelem", "" + stats.elementcounter)); … … 82 84 CMDComponentSpec compspec = CMDComponentSpecExpanderDbImpl.expandComponent(cd.getId(), (ComponentRegistryDbImpl) registry); 83 85 Statistics stats = new Statistics(); 84 componentCounter(compspec .getCMDComponent(), stats);86 componentCounter(compspec, stats); 85 87 item.add(new Label("nrcomp", "" + stats.componentnumber)); 86 88 item.add(new Label("nrelem", "" + stats.elementcounter)); … … 88 90 } 89 91 90 private void componentCounter(List<CMDComponentType> components, Statistics stats) { 92 private void componentCounter(CMDComponentSpec components, Statistics stats) { 93 componentCounter(Collections.singleton(components.getCMDComponent()), stats); 94 } 95 96 private void componentCounter(Collection<CMDComponentType> components, Statistics stats) { 91 97 if (components != null) { 92 98 for (CMDComponentType component : components) {
Note: See TracChangeset
for help on using the changeset viewer.