Package org.apache.commons.collections

Examples of org.apache.commons.collections.MultiHashMap$ValueIterator$Values


          result.setTitle(pa.getName());
          result.setKey(KEY_PREFIX + pa.getName());
          result.setType(ParsedObject.OBJECT_TYPE_PORTLET_APPLICATION);
          result.setClassName(pa.getClass().getName());
         
          MultiHashMap fieldMap = new MultiHashMap();
          fieldMap.put(ID, pa.getName());
         
          Collection fields = pa.getMetadata().getFields();
          for (Iterator fieldIter = fields.iterator(); fieldIter.hasNext();)
            {
                LocalizedField field = (LocalizedField) fieldIter.next();
                fieldMap.put(field.getName(), field.getValue());
                //this.fields.add(field.getName());
            }
         
          result.setFields(fieldMap);
        }
View Full Code Here


   
    private void addFieldsToParsedObject(Document doc, ParsedObject o)
    {
        try
        {
            MultiMap multiKeywords = new MultiHashMap();
            MultiMap multiFields = new MultiHashMap();
            HashMap fieldMap = new HashMap();
           
            Field classNameField = doc.getField(ParsedObject.FIELDNAME_CLASSNAME);
            if(classNameField != null)
            {
View Full Code Here

            result.setClassName(pd.getClass().getName());
            result.setKey(KEY_PREFIX + pd.getUniqueName());
            result.setType(ParsedObject.OBJECT_TYPE_PORTLET);
           
            //TODO: this is common to PAs as well, possible refactor
            MultiHashMap fieldMap = new MultiHashMap();
            fieldMap.put(ID, pd.getName());
           
            PortletApplication pa = (PortletApplication)pd.getPortletApplicationDefinition();
            fieldMap.put(PORTLET_APPLICATION, pa.getName());
           
            Collection mdFields = pd.getMetadata().getFields();
            for (Iterator fieldIter = mdFields.iterator(); fieldIter.hasNext();)
            {
                LocalizedField field = (LocalizedField) fieldIter.next();               
                fieldMap.put(field.getName(), field.getValue());
            }
           
            //Handle descriptions
            Iterator descIter = pd.getDescriptionSet().iterator();
            while (descIter.hasNext())
            {
                Description desc = (Description) descIter.next();
                fieldMap.put(ParsedObject.FIELDNAME_DESCRIPTION, desc.getDescription());
            }
           
            //Handle keywords and titles
            Iterator displayNameIter = pd.getDisplayNameSet().iterator();
            while (displayNameIter.hasNext())
            {
                DisplayName displayName = (DisplayName) displayNameIter.next();
                fieldMap.put(ParsedObject.FIELDNAME_TITLE, displayName.getDisplayName());
            }
           
            HashSet keywordSet = new HashSet();
           
            Iterator langIter = pd.getLanguageSet().iterator();
            while (langIter.hasNext())
            {
                Language lang = (Language) langIter.next();
                fieldMap.put(ParsedObject.FIELDNAME_TITLE, lang.getTitle());
                fieldMap.put(ParsedObject.FIELDNAME_TITLE, lang.getShortTitle());
               
                Iterator keywordIter = lang.getKeywords();
                if (keywordIter != null)
                {
                    while (keywordIter.hasNext())
View Full Code Here

          result.setTitle(pa.getName());
          result.setKey(KEY_PREFIX + pa.getName());
          result.setType(ParsedObject.OBJECT_TYPE_PORTLET_APPLICATION);
          result.setClassName(pa.getClass().getName());
         
          MultiHashMap fieldMap = new MultiHashMap();
          fieldMap.put(ID, pa.getName());
         
          Collection fields = pa.getMetadata().getFields();
          for (Iterator fieldIter = fields.iterator(); fieldIter.hasNext();)
            {
                LocalizedField field = (LocalizedField) fieldIter.next();
                fieldMap.put(field.getName(), field.getValue());
                //this.fields.add(field.getName());
            }
         
          result.setFields(fieldMap);
        }
View Full Code Here

   
    private void addFieldsToParsedObject(Document doc, ParsedObject o)
    {
        try
        {
            MultiMap multiKeywords = new MultiHashMap();
            MultiMap multiFields = new MultiHashMap();
            HashMap fieldMap = new HashMap();
           
            Field classNameField = doc.getField(ParsedObject.FIELDNAME_CLASSNAME);
            if(classNameField != null)
            {
View Full Code Here

  /*
   * Takes all the report's charts and inserts them in their corresponding bands
   */
  protected void layoutCharts() {
    //Pre-sort charts by group column
    MultiMap mmap = new MultiHashMap();
    for (Iterator iter = getReport().getCharts().iterator(); iter.hasNext();) {
      DJChart djChart = (DJChart) iter.next();
      mmap.put(djChart.getColumnsGroup(), djChart);
    }

    for (Iterator iterator = mmap.keySet().iterator(); iterator.hasNext();) {
      Object key =  iterator.next();
      Collection charts = (Collection) mmap.get(key);
      ArrayList l = new ArrayList(charts);
      //Reverse iteration of the charts to meet insertion order
      for (int i = l.size(); i > 0; i--) {
        DJChart djChart = (DJChart) l.get(i-1);
        JRDesignChart chart = createChart(djChart);
View Full Code Here

     *
     * @see org.apache.avalon.framework.component.Composable#compose(org.apache.avalon.framework.component.ComponentManager)
   */
  public void compose(ComponentManager manager) throws ComponentException {
    super.compose(manager);
        this.m_eventMMap = new MultiHashMap(100); // TODO: don't hardcode initial size
        this.m_keyMMap = new MultiHashMap(100); // TODO: don't hardcode initial size
  }
View Full Code Here

    {
        LdifComposer composer = new LdifComposerImpl();
        MultiMap map = new MultiMap()
        {
            // FIXME Stop forking commons-collections.
            private final MultiHashMap map = new MultiHashMap();

            public Object remove( Object arg0, Object arg1 )
            {
                return map.remove( arg0, arg1 );
            }

            public int size()
            {
                return map.size();
            }

            public Object get( Object arg0 )
            {
                return map.get( arg0 );
            }

            public boolean containsValue( Object arg0 )
            {
                return map.containsValue( arg0 );
            }

            public Object put( Object arg0, Object arg1 )
            {
                return map.put( arg0, arg1 );
            }

            public Object remove( Object arg0 )
            {
                return map.remove( arg0 );
            }

            public Collection values()
            {
                return map.values();
            }

            public boolean isEmpty()
            {
                return map.isEmpty();
            }

            public boolean containsKey( Object key )
            {
                return map.containsKey( key );
            }

            public void putAll( Map arg0 )
            {
                map.putAll( arg0 );
            }

            public void clear()
            {
                map.clear();
            }

            public Set keySet()
            {
                return map.keySet();
            }

            public Set entrySet()
            {
                return map.entrySet();
            }
        };
       
        Attributes attrs = ( Attributes ) getValue();
        try
        {
            NamingEnumeration e = attrs.getAll();
            while( e.hasMore() )
            {
                Attribute attr = ( Attribute ) e.next();
                NamingEnumeration e2 = attr.getAll();
                while( e2.hasMoreElements() )
                {
                    Object value = e2.next();
                    map.put( attr.getID(), value );
                }
            }

            return composer.compose( map );
        }
View Full Code Here

        return true;
    }

    // TODO: don't hardcode initial size
    private void createBlankCache() {
        this.m_eventMMap = new MultiHashMap(100);
        this.m_keyMMap = new MultiHashMap(100);
    }
View Full Code Here

    }
   
  }

  private static void bindMetaAttributes(Element element, Table table, OverrideRepository repository) {
    MultiMap map = MetaAttributeBinder.loadAndMergeMetaMap( element, new MultiHashMap());
    if(map!=null && !map.isEmpty()) {
      repository.addMetaAttributeInfo( table, map);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.commons.collections.MultiHashMap$ValueIterator$Values

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.