Package org.apache.commons.collections

Examples of org.apache.commons.collections.MultiHashMap


            }
        }

        public Object unmarshal(HierarchicalStreamReader reader,
                UnmarshallingContext context) {
            MultiHashMap map = new MultiHashMap();
           
            while( reader.hasMoreChildren() ) {
                reader.moveDown();
               
                Object o = 0;
                if ( "dataStore".equals( reader.getNodeName() ) ) {
                    o = context.convertAnother( map, DataStoreInfoImpl.class );
                }
                else {
                    o = context.convertAnother( map, CoverageStoreInfoImpl.class );
                }
                map.put( o.getClass(), o );
               
                reader.moveUp();
            }
           
            return map;
View Full Code Here


            resolve(ns);
        }
       
        //stores
        if ( stores == null ) {
            stores = new MultiHashMap();
        }
        for ( Object o : stores.values() ) {
            resolve((StoreInfoImpl)o);
        }
       
        //styles
        if ( styles == null ) {
            styles = new ArrayList<StyleInfo>();
        }
        for ( StyleInfo s : styles ) {
            resolve(s);
        }
       
        //resources
        if ( resources == null ) {
            resources = new MultiHashMap();   
        }
        for( Object o : resources.values() ) {
            resolve((ResourceInfo)o);
        }
       
View Full Code Here

        this.m_keyMMap = ecdw.get_keyMap();
    }

    protected final void createBlankCache() {
        // TODO: don't hardcode initial size
        this.m_eventMMap = new MultiHashMap(100);
        this.m_keyMMap = new MultiHashMap(100);
    }
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

    this.m_keyMMap = ecdw.get_keyMap();
  }

    // 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

        this.m_eventMMap = ecdw.get_eventMap();
        this.m_keyMMap = ecdw.get_keyMap();
    }

    protected final void createBlankCache() {
        this.m_eventMMap = new MultiHashMap();
        this.m_keyMMap = new MultiHashMap();
    }
View Full Code Here

    this.m_keyMMap = ecdw.get_keyMap();
  }

    // 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

        // blocks of duplicate code might be longer than 'min'. We need to
        // remember the line combinations where we must ignore identical blocks
        // because we have already reported them for an earlier blockIdx.
        // Note: MultiHashMap is deprecated in the latest releases of o.a.j.c.c
        final MultiMap ignorePairs = new MultiHashMap();

        // go through all the blocks in iFile and
        // check if the following mMin lines occur in jFile
        for (int iLine = 0; iLine < iBlockCount; iLine++) {
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

            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

TOP

Related Classes of org.apache.commons.collections.MultiHashMap

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.