Package org.apache.commons.collections.map

Examples of org.apache.commons.collections.map.MultiValueMap


                    rdn.avaTypes = avaTypes;
                    break;

                default:
                    // We must duplicate the treeSet and the hashMap
                    rdn.avaTypes = new MultiValueMap();
                    rdn.avas = new ArrayList<Ava>();

                    for ( Ava currentAva : this.avas )
                    {
                        rdn.avas.add( currentAva.clone() );
View Full Code Here


                break;

            default:
                avas = new ArrayList<Ava>();

                avaTypes = new MultiValueMap();

                for ( int i = 0; i < nbAvas; i++ )
                {
                    Ava ava = new Ava( schemaManager );
                    ava.readExternal( in );
View Full Code Here

            }
        }
        request.setAttribute("researchertarget", researcherTarget);
        request.setAttribute("authoritytarget", authorityTarget);
        request.setAttribute("authority", authority);
        MultiValueMap relations = null;

        try
        {
            relations = getRelationsInformation(relation, authority,
                    authorityTarget);
View Full Code Here

    }

    public MultiValueMap getRelationsInformation(String type,
            String from, String to) throws SearchServiceException
    {
        MultiValueMap result = new MultiValueMap();
        SolrQuery solrQuery = new SolrQuery();

        Matcher matcher = patternRP.matcher(from);
        String field1 = "";
        String field2 = "";

        if (matcher.find())
        {
            field1 = "focus_auth";
        }
        else
        {
            field1 = "focus_val";
        }

        matcher = patternRP.matcher(to);

        if (matcher.find())
        {
            field2 = "focus_auth";
        }
        else
        {
            field2 = "focus_val";
        }

        solrQuery.setQuery(field1 + ":\"" + from
                + "\" AND " + field2 + ":\"" + to + "\"");

        solrQuery.addFilterQuery("type:" + type);       
        solrQuery.setRows(Integer.MAX_VALUE);
        QueryResponse rsp = service.search(solrQuery);

        for (SolrDocument doc : rsp.getResults())
        {
            String resultField = "";
            if (doc.getFieldValue("value") instanceof String)
            {
                resultField = (String) doc.getFieldValue("value");
            }
            else
            {
                for (String ss : (List<String>) doc.getFieldValue("value"))
                {
                    resultField += ss;
                }
            }

            String resultFieldExtra = "";

            if (doc.getFieldValue("extra")!=null)
            {
                if (doc.getFieldValue("extra") instanceof String)
                {
                    resultFieldExtra = (String) doc.getFieldValue("extra");
                }
                else
                {

                    for (String ss : (List<String>) doc.getFieldValue("extra"))
                    {
                        resultFieldExtra += ss;
                    }
                }
            }
            result.put(resultField, resultFieldExtra);
        }
        return result;
    }
View Full Code Here

                return;

            default:
                // We must duplicate the treeSet and the hashMap
                avas = new ArrayList<Ava>();
                avaTypes = new MultiValueMap();

                for ( Ava currentAva : rdn.avas )
                {
                    avas.add( (Ava) currentAva.clone() );
                    avaTypes.put( currentAva.getNormType(), currentAva );
View Full Code Here

                // First, create the HashMap,
                avas = new ArrayList<Ava>();

                // and store the existing Ava into it.
                avas.add( ava );
                avaTypes = new MultiValueMap();
                avaTypes.put( avaType, ava );

                ava = null;

                // Now, fall down to the commmon case
View Full Code Here

                // First, create the HashMap,
                avas = new ArrayList<Ava>();

                // and store the existing Ava into it.
                avas.add( ava );
                avaTypes = new MultiValueMap();
                avaTypes.put( avaType, ava );

                this.ava = null;

                // Now, fall down to the commmon case
View Full Code Here

                    rdn.avaTypes = avaTypes;
                    break;

                default:
                    // We must duplicate the treeSet and the hashMap
                    rdn.avaTypes = new MultiValueMap();
                    rdn.avas = new ArrayList<Ava>();

                    for ( Ava currentAva : this.avas )
                    {
                        rdn.avas.add( (Ava) currentAva.clone() );
View Full Code Here

                break;

            default:
                avas = new ArrayList<Ava>();

                avaTypes = new MultiValueMap();

                for ( int i = 0; i < nbAvas; i++ )
                {
                    Ava ava = new Ava( schemaManager );
                    ava.readExternal( in );
View Full Code Here

                return;

            default:
                // We must duplicate the treeSet and the hashMap
                atavs = new TreeSet<Ava>();
                atavTypes = new MultiValueMap();

                for ( Ava currentAtav : rdn.atavs )
                {
                    atavs.add( (Ava) currentAtav.clone() );
                    atavTypes.put( currentAtav.getNormType(), currentAtav );
View Full Code Here

TOP

Related Classes of org.apache.commons.collections.map.MultiValueMap

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.