List of usage examples for org.apache.commons.collections.map MultiValueMap entrySet
public Set entrySet()
From source file:org.lockss.servlet.SubscriptionManagement.java
/** * Populates the tabs with the publication data to be displayed. * /*from w ww. j a va 2 s . c o m*/ * @param publications * A List<SerialPublication> with the publications to be used to * populate the tabs. * @param divTableMap * A Map<String, Table> with the tabs tables mapped by the first * letter of the tab letter group. */ private void populateTabsPublications(List<SerialPublication> publications, Map<String, Table> divTableMap) { final String DEBUG_HEADER = "populateTabsPublications(): "; if (log.isDebug2()) { if (publications != null) { log.debug2(DEBUG_HEADER + "publications.size() = " + publications.size()); } else { log.debug2(DEBUG_HEADER + "publications is null"); } } Map.Entry<String, TreeSet<SerialPublication>> pubEntry; String publisherName; TreeSet<SerialPublication> pubSet; // Get a map of the publications keyed by their publisher. MultiValueMap publicationMap = orderPublicationsByPublisher(publications); if (log.isDebug3()) { if (publicationMap != null) { log.debug3(DEBUG_HEADER + "publicationMap.size() = " + publicationMap.size()); } else { log.debug3(DEBUG_HEADER + "publicationMap is null"); } } // Loop through all the publications mapped by their publisher. Iterator<Map.Entry<String, TreeSet<SerialPublication>>> pubIterator = (Iterator<Map.Entry<String, TreeSet<SerialPublication>>>) publicationMap .entrySet().iterator(); while (pubIterator.hasNext()) { pubEntry = pubIterator.next(); // Get the publisher name. publisherName = pubEntry.getKey(); if (log.isDebug3()) log.debug3(DEBUG_HEADER + "publisherName = " + publisherName); // Get the set of publications for this publisher. pubSet = pubEntry.getValue(); if (log.isDebug3()) log.debug3(DEBUG_HEADER + "pubSet.size() = " + pubSet.size()); // Populate a tab with the publications for this publisher. populateTabPublisherPublications(publisherName, pubSet, divTableMap); } if (log.isDebug2()) log.debug2(DEBUG_HEADER + "Done."); }
From source file:org.lockss.servlet.SubscriptionManagement.java
/** * Populates the tabs with the subscription data to be displayed. * /*from w w w . j a v a 2 s . c o m*/ * @param subscriptions * A List<Subscription> with the subscriptions to be used to populate * the tabs. * @param divTableMap * A Map<String, Table> with the tabs tables mapped by the first * letter of the tab letter group. */ private void populateTabsSubscriptions(List<Subscription> subscriptions, Map<String, Table> divTableMap) { final String DEBUG_HEADER = "populateTabsSubscriptions(): "; if (log.isDebug2()) log.debug2(DEBUG_HEADER + "subscriptions = " + subscriptions); Map.Entry<String, TreeSet<Subscription>> subEntry; String publisherName; TreeSet<Subscription> subSet; // Get a map of the subscriptions keyed by their publisher. MultiValueMap subscriptionMap = orderSubscriptionsByPublisher(subscriptions); if (log.isDebug3()) { if (subscriptionMap != null) { log.debug3(DEBUG_HEADER + "subscriptionMap.size() = " + subscriptionMap.size()); } else { log.debug3(DEBUG_HEADER + "subscriptionMap is null"); } } // Loop through all the subscriptions mapped by their publisher. Iterator<Map.Entry<String, TreeSet<Subscription>>> subIterator = (Iterator<Map.Entry<String, TreeSet<Subscription>>>) subscriptionMap .entrySet().iterator(); while (subIterator.hasNext()) { subEntry = subIterator.next(); // Get the publisher name. publisherName = subEntry.getKey(); if (log.isDebug3()) log.debug3(DEBUG_HEADER + "publisherName = " + publisherName); // Get the set of subscriptions for this publisher. subSet = subEntry.getValue(); if (log.isDebug3()) log.debug3(DEBUG_HEADER + "subSet.size() = " + subSet.size()); // Populate a tab with the subscriptions for this publisher. populateTabPublisherSubscriptions(publisherName, subSet, divTableMap); } if (log.isDebug2()) log.debug2(DEBUG_HEADER + "Done."); }