Package org.osgi.service.blueprint.reflect

Examples of org.osgi.service.blueprint.reflect.MapMetadata


                            throw new ComponentDefinitionException("Only one of " + Parser.INTERFACE_ATTRIBUTE + " attribute or " + INTERFACES_ELEMENT + " element must be used");
                        }
                        interfaces = parseInterfaceNames(e);
                        factoryMetadata.addProperty("interfaces", createList(context, interfaces));                   
                    } else if (nodeNameEquals(e, Parser.SERVICE_PROPERTIES_ELEMENT)) {
                        MapMetadata map = parser.parseServiceProperties(e, factoryMetadata);
                        factoryMetadata.addProperty("serviceProperties", map);
                    } else if (nodeNameEquals(e, Parser.REGISTRATION_LISTENER_ELEMENT)) {
                        listeners.add(parser.parseRegistrationListener(e, factoryMetadata));
                    }
                } else if (BLUEPRINT_CM_NAMESPACE.equals(e.getNamespaceURI())) {
View Full Code Here


        } else if (metadata instanceof CollectionMetadata) {
            CollectionMetadata collection = (CollectionMetadata) metadata;
           
            for (Metadata v : collection.getValues()) traverse(v, output);
        } else if (metadata instanceof MapMetadata) {
            MapMetadata map = (MapMetadata) metadata;
           
            for (MapEntry e : map.getEntries()) {
                traverse(e.getKey(), output);
                traverse(e.getValue(), output);
            }
        }
    }
View Full Code Here

            ParserContext context) {
        Map<String, Object> result = new HashMap<String, Object>();
        NodeList ns = element.getElementsByTagNameNS(BLUEPRINT_NS, TAG_MAP);
        // Use the parser context to parse the map for us
        for (int i = 0; i < ns.getLength(); i++) {
            MapMetadata metadata = context.parseElement(MapMetadata.class,
                    null, (Element) ns.item(i));
            for (MapEntry entry : (List<MapEntry>) metadata.getEntries()) {
                if (entry.getKey() instanceof ValueMetadata
                        && entry.getValue() instanceof ValueMetadata) {
                    ValueMetadata key = (ValueMetadata) entry.getKey();
                    ValueMetadata value = (ValueMetadata) entry.getValue();
View Full Code Here

            ParserContext context) {
        Map<String, Object> result = new HashMap<String, Object>();
        NodeList ns = element.getElementsByTagNameNS(BLUEPRINT_NS, TAG_MAP);
        // Use the parser context to parse the map for us
        for (int i = 0; i < ns.getLength(); i++) {
            MapMetadata metadata = context.parseElement(MapMetadata.class,
                    null, (Element) ns.item(i));
            for (MapEntry entry : (List<MapEntry>) metadata.getEntries()) {
                if (entry.getKey() instanceof ValueMetadata
                        && entry.getValue() instanceof ValueMetadata) {
                    ValueMetadata key = (ValueMetadata) entry.getKey();
                    ValueMetadata value = (ValueMetadata) entry.getValue();
View Full Code Here

TOP

Related Classes of org.osgi.service.blueprint.reflect.MapMetadata

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.