Examples of MultiValueMap


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

    }

    public void testBothPreferredWithWeight() throws Exception
    {
        DefaultAppBloodhound bh = new DefaultAppBloodhound();
        MultiMap overrides = new MultiValueMap();
        overrides.put("properties", new TestDescriptorParserDefault());
        overrides.put("properties", new TestDescriptorParserPreferred());

        // test with weigh attribute (we have 3 candidates now)
        bh.mergeParserOverrides(overrides);
        assertEquals(1, bh.parserRegistry.size());
        DescriptorParser result = bh.parserRegistry.get("properties");
View Full Code Here

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

    }

    public void testOverrideWithoutPreferred() throws Exception
    {
        DefaultAppBloodhound bh = new DefaultAppBloodhound();
        MultiMap overrides = new MultiValueMap();
        overrides.put("properties", new TestDescriptorParserNoAnnotation());

        // test with weigh attribute (we have 3 candidates now)
        bh.mergeParserOverrides(overrides);
        assertEquals(1, bh.parserRegistry.size());
        DescriptorParser result = bh.parserRegistry.get("properties");
View Full Code Here

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

    }

    public void testMixedOverrides() throws Exception
    {
        DefaultAppBloodhound bh = new DefaultAppBloodhound();
        MultiMap overrides = new MultiValueMap();
        overrides.put("properties", new TestDescriptorParserNoAnnotation());
        overrides.put("properties", new TestDescriptorParserDefault());

        // test with weigh attribute (we have 3 candidates now)
        bh.mergeParserOverrides(overrides);
        assertEquals(1, bh.parserRegistry.size());
        DescriptorParser result = bh.parserRegistry.get("properties");
View Full Code Here

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

        // defaults first
        parserRegistry.put("properties", new PropertiesDescriptorParser());

        final Iterator<DescriptorParser> it = ServiceRegistry.lookupProviders(DescriptorParser.class);

        MultiMap overrides = new MultiValueMap();
        while (it.hasNext())
        {
            final DescriptorParser parser = it.next();
            overrides.put(parser.getSupportedFormat(), parser);
        }
        mergeParserOverrides(overrides);
    }
View Full Code Here

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

        matchingRulesList = new ArrayList<MatchingRuleImpl>();;
        objectClassesList = new ArrayList<ObjectClassImpl>();
        syntaxesList = new ArrayList<SyntaxImpl>();

        // Maps
        schemasMap = new MultiValueMap();
        attributeTypesMap = new MultiValueMap();
        matchingRulesMap = new MultiValueMap();
        objectClassesMap = new MultiValueMap();
        syntaxesMap = new MultiValueMap();

        // Listeners
        schemaHandlerListeners = new ArrayList<SchemaHandlerListener>();
        schemaListeners = new MultiValueMap();
        attributeTypeListeners = new MultiValueMap();
        objectClassListeners = new MultiValueMap();
    }
View Full Code Here

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

     * Creates a new instance of HierarchyManager.
     */
    public HierarchyManager()
    {
        // Initializing the maps
        parentsMap = new MultiValueMap();
        childrenMap = new MultiValueMap();

        // Getting the SchemaHandler
        schemaHandler = Activator.getDefault().getSchemaHandler();

        // Loading the complete Schema
View Full Code Here

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

     */
    public SchemaChecker()
    {
        schemaHandler = Activator.getDefault().getSchemaHandler();
        errorsList = new ArrayList<SchemaError>();
        errorsMap = new MultiValueMap();
        warningsList = new ArrayList<SchemaWarning>();
        warningsMap = new MultiValueMap();
        dependenciesMap = new MultiValueMap();
        dependsOnMap = new MultiValueMap();
        listeners = new ArrayList<SchemaCheckerListener>();
    }
View Full Code Here

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

        matchingRulesList = new ArrayList<MatchingRuleImpl>();;
        objectClassesList = new ArrayList<ObjectClassImpl>();
        syntaxesList = new ArrayList<SyntaxImpl>();

        // Maps
        schemasMap = new MultiValueMap();
        attributeTypesMap = new MultiValueMap();
        matchingRulesMap = new MultiValueMap();
        objectClassesMap = new MultiValueMap();
        syntaxesMap = new MultiValueMap();

        // Listeners
        schemaHandlerListeners = new ArrayList<SchemaHandlerListener>();
        schemaListeners = new MultiValueMap();
        attributeTypeListeners = new MultiValueMap();
        objectClassListeners = new MultiValueMap();
    }
View Full Code Here

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

     */
    public SchemaChecker()
    {
        schemaHandler = Activator.getDefault().getSchemaHandler();
        errorsList = new ArrayList<SchemaError>();
        errorsMap = new MultiValueMap();
        warningsList = new ArrayList<SchemaWarning>();
        warningsMap = new MultiValueMap();
        dependenciesMap = new MultiValueMap();
        dependsOnMap = new MultiValueMap();
        listeners = new ArrayList<SchemaCheckerListener>();
    }
View Full Code Here

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

    {
        Iterator it;
        DependencyGraphWalker walker = new WalkDepthFirstSearch();
        RefineConflictsVisitor refineConflictsVisitor = new RefineConflictsVisitor();
       
        MultiValueMap depMap = new MultiValueMap();

        // Identify deps that need to be resolved.
        it = graph.getNodes().iterator();
        while ( it.hasNext() )
        {
            DependencyGraphNode node = (DependencyGraphNode) it.next();
            String key = DependencyGraphKeys.toManagementKey( node.getArtifact() );
            // This will add this node to the specified key, not replace a previous one.
            depMap.put( key, node );
        }

        // Process those depMap entries with more than 1 value.
        ToArtifactReferenceTransformer nodeToArtifact = new ToArtifactReferenceTransformer();

        it = depMap.entrySet().iterator();
        while ( it.hasNext() )
        {
            Map.Entry entry = (Entry) it.next();
            Collection nodes = (Collection) entry.getValue();
            if ( nodes.size() > 1 )
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.