You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by gn...@apache.org on 2009/04/27 21:04:56 UTC

svn commit: r769105 - in /geronimo/sandbox/blueprint: ./ blueprint-bundle/ blueprint-cm/ blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/ blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/ blueprint-cm/src/main/...

Author: gnodet
Date: Mon Apr 27 19:04:54 2009
New Revision: 769105

URL: http://svn.apache.org/viewvc?rev=769105&view=rev
Log:
Update to latest schemas (dedicated cm instead of compendium), enhance ExtendedParserContext so that custom namespace handlers can parse blueprint elements (to be enhanced)

Added:
    geronimo/sandbox/blueprint/blueprint-cm/
      - copied from r769079, geronimo/sandbox/blueprint/blueprint-compendium/
    geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/
    geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmNamespaceHandler.java
      - copied, changed from r768871, geronimo/sandbox/blueprint/blueprint-compendium/src/main/java/org/apache/geronimo/blueprint/compendium/CompendiumNamespaceHandler.java
    geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmPropertyPlaceholder.java
      - copied, changed from r768871, geronimo/sandbox/blueprint/blueprint-compendium/src/main/java/org/apache/geronimo/blueprint/compendium/CompendiumPropertyPlaceholder.java
    geronimo/sandbox/blueprint/blueprint-cm/src/main/resources/OSGI-INF/blueprint/cm.xml
      - copied, changed from r768871, geronimo/sandbox/blueprint/blueprint-compendium/src/main/resources/OSGI-INF/blueprint/compendium.xml
    geronimo/sandbox/blueprint/blueprint-cm/src/main/resources/org/apache/geronimo/blueprint/compendium/cm/
    geronimo/sandbox/blueprint/blueprint-cm/src/main/resources/org/apache/geronimo/blueprint/compendium/cm/blueprint-cm.xsd
      - copied, changed from r768871, geronimo/sandbox/blueprint/blueprint-compendium/src/main/resources/org/apache/geronimo/blueprint/compendium/blueprint-compendium.xsd
Removed:
    geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/CompendiumNamespaceHandler.java
    geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/CompendiumPropertyPlaceholder.java
    geronimo/sandbox/blueprint/blueprint-cm/src/main/resources/OSGI-INF/blueprint/compendium.xml
    geronimo/sandbox/blueprint/blueprint-cm/src/main/resources/org/apache/geronimo/blueprint/compendium/blueprint-compendium.xsd
    geronimo/sandbox/blueprint/blueprint-compendium/
Modified:
    geronimo/sandbox/blueprint/blueprint-bundle/pom.xml
    geronimo/sandbox/blueprint/blueprint-cm/pom.xml
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ExtendedParserContext.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/Parser.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/namespace/ParserContextImpl.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/resources/org/apache/geronimo/blueprint/blueprint.xsd
    geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test-constructor.xml
    geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test-custom-nodes.xml
    geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test-depends-on.xml
    geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test-simple-component.xml
    geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test-wiring.xml
    geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test.xml
    geronimo/sandbox/blueprint/blueprint-sample/src/main/resources/OSGI-INF/blueprint/config.xml
    geronimo/sandbox/blueprint/pom.xml

Modified: geronimo/sandbox/blueprint/blueprint-bundle/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-bundle/pom.xml?rev=769105&r1=769104&r2=769105&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-bundle/pom.xml (original)
+++ geronimo/sandbox/blueprint/blueprint-bundle/pom.xml Mon Apr 27 19:04:54 2009
@@ -33,7 +33,7 @@
         </dependency>
         <dependency>
             <groupId>org.apache.geronimo</groupId>
-            <artifactId>blueprint-compendium</artifactId>
+            <artifactId>blueprint-cm</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.xbean</groupId>
@@ -91,7 +91,7 @@
                                     <include>cglib:cglib</include>
                                     <include>org.apache.geronimo:blueprint-api</include>
                                     <include>org.apache.geronimo:blueprint-core</include>
-                                    <include>org.apache.geronimo:blueprint-compendium</include>
+                                    <include>org.apache.geronimo:blueprint-cm</include>
                                 </includes>
                             </artifactSet>
                             <filters>
@@ -126,7 +126,7 @@
                                     </excludes>
                                 </filter>
                                 <filter>
-                                    <artifact>org.apache.geronimo:blueprint-compendium</artifact>
+                                    <artifact>org.apache.geronimo:blueprint-cm</artifact>
                                     <excludes>
                                         <exclude>org/**</exclude>
                                     </excludes>

Modified: geronimo/sandbox/blueprint/blueprint-cm/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-cm/pom.xml?rev=769105&r1=769079&r2=769105&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-cm/pom.xml (original)
+++ geronimo/sandbox/blueprint/blueprint-cm/pom.xml Mon Apr 27 19:04:54 2009
@@ -24,8 +24,8 @@
   </parent>
 
   <modelVersion>4.0.0</modelVersion>
-  <artifactId>blueprint-compendium</artifactId>
-  <name>Apache Geronimo Blueprint Compendium</name>
+  <artifactId>blueprint-cm</artifactId>
+  <name>Apache Geronimo Blueprint CM</name>
   <packaging>bundle</packaging>
   
   <dependencies>

Copied: geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmNamespaceHandler.java (from r768871, geronimo/sandbox/blueprint/blueprint-compendium/src/main/java/org/apache/geronimo/blueprint/compendium/CompendiumNamespaceHandler.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmNamespaceHandler.java?p2=geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmNamespaceHandler.java&p1=geronimo/sandbox/blueprint/blueprint-compendium/src/main/java/org/apache/geronimo/blueprint/compendium/CompendiumNamespaceHandler.java&r1=768871&r2=769105&rev=769105&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-compendium/src/main/java/org/apache/geronimo/blueprint/compendium/CompendiumNamespaceHandler.java (original)
+++ geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmNamespaceHandler.java Mon Apr 27 19:04:54 2009
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.geronimo.blueprint.compendium;
+package org.apache.geronimo.blueprint.compendium.cm;
 
 import java.net.URL;
 
@@ -27,19 +27,25 @@
 import org.apache.geronimo.blueprint.ExtendedComponentDefinitionRegistry;
 import org.apache.geronimo.blueprint.ExtendedParserContext;
 import org.apache.geronimo.blueprint.context.Parser;
+import org.apache.geronimo.blueprint.mutable.MutableBeanMetadata;
+import org.apache.geronimo.blueprint.mutable.MutablePropsMetadata;
+import org.apache.geronimo.blueprint.mutable.MutableMapMetadata;
 import org.apache.geronimo.blueprint.reflect.BeanPropertyImpl;
-import org.apache.geronimo.blueprint.reflect.PropsMetadataImpl;
 import org.apache.geronimo.blueprint.reflect.RefMetadataImpl;
 import org.apache.geronimo.blueprint.reflect.ReferenceMetadataImpl;
 import org.apache.geronimo.blueprint.reflect.ValueMetadataImpl;
-import org.apache.geronimo.blueprint.mutable.MutableBeanMetadata;
+import org.apache.geronimo.blueprint.reflect.PropsMetadataImpl;
+import org.apache.geronimo.blueprint.reflect.MapEntryImpl;
+import org.apache.geronimo.blueprint.reflect.MapMetadataImpl;
 import org.osgi.service.blueprint.context.ComponentDefinitionException;
 import org.osgi.service.blueprint.namespace.ComponentDefinitionRegistry;
 import org.osgi.service.blueprint.namespace.NamespaceHandler;
 import org.osgi.service.blueprint.namespace.ParserContext;
 import org.osgi.service.blueprint.reflect.ComponentMetadata;
-import org.osgi.service.blueprint.reflect.MapMetadata;
+import org.osgi.service.blueprint.reflect.PropsMetadata;
 import org.osgi.service.blueprint.reflect.ReferenceMetadata;
+import org.osgi.service.blueprint.reflect.BeanProperty;
+import org.osgi.service.blueprint.reflect.Metadata;
 import org.osgi.service.cm.ConfigurationAdmin;
 
 /**
@@ -48,15 +54,16 @@
  * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
  * @version $Rev: 766508 $, $Date: 2009-04-19 22:09:27 +0200 (Sun, 19 Apr 2009) $
  */
-public class CompendiumNamespaceHandler implements NamespaceHandler {
+public class CmNamespaceHandler implements NamespaceHandler {
 
-    public static final String BLUEPRINT_COMPENDIUM_NAMESPACE = "http://www.osgi.org/xmlns/blueprint-compendium/v1.0.0";
+    public static final String BLUEPRINT_COMPENDIUM_NAMESPACE = "http://www.osgi.org/xmlns/blueprint-cm/v1.0.0";
 
     public static final String PROPERTY_PLACEHOLDER_ELEMENT = "property-placeholder";
     public static final String MANAGED_PROPERTIES_ELEMENT = "managed-properties";
     public static final String MANAGED_SERVICE_FACTORY_ELEMENT = "managed-service-factory";
     public static final String CM_PROPERTIES_ELEMENT = "cm-properties";
     public static final String DEFAULT_PROPERTIES_ELEMENT = "default-properties";
+    public static final String PROPERTY_ELEMENT = "property";
 
     public static final String ID_ATTRIBUTE = "id";
     public static final String PERSISTENT_ID_ATTRIBUTE = "persistent-id";
@@ -69,7 +76,7 @@
     public static final String CONFIG_ADMIN_REFERENCE_NAME = "blueprint.configadmin";
 
     public URL getSchemaLocation(String namespace) {
-        return getClass().getResource("/org/apache/geronimo/blueprint/compendium/blueprint-compendium.xsd");
+        return getClass().getResource("/org/apache/geronimo/blueprint/compendium/cm/blueprint-cm.xsd");
     }
 
     public ComponentMetadata parse(Element element, ParserContext ctx) {
@@ -80,7 +87,7 @@
         if (nodeNameEquals(element, PROPERTY_PLACEHOLDER_ELEMENT)) {
             MutableBeanMetadata metadata = context.createMetadata(MutableBeanMetadata.class);
             metadata.setId(parser.getName(element));
-            metadata.setClassName(CompendiumPropertyPlaceholder.class.getName());
+            metadata.setClassName(CmPropertyPlaceholder.class.getName());
             metadata.addProperty(new BeanPropertyImpl("blueprintContext", new RefMetadataImpl("blueprintContext")));
             metadata.addProperty(new BeanPropertyImpl("configAdmin", new RefMetadataImpl(CONFIG_ADMIN_REFERENCE_NAME)));
             metadata.addProperty(new BeanPropertyImpl("persistentId",
@@ -108,8 +115,8 @@
                             if (defaultsRef != null) {
                                 throw new ComponentDefinitionException("Only one of " + DEFAULTS_REF_ATTRIBUTE + " attribute or " + DEFAULT_PROPERTIES_ELEMENT + " element is allowed");
                             }
-                            MapMetadata map = parser.parseMap(e, metadata);
-                            metadata.addProperty(new BeanPropertyImpl("defaultProperties", new PropsMetadataImpl(map.getEntries())));
+                            Metadata props = parseDefaultProperties(parser, metadata, e);
+                            metadata.addProperty(new BeanPropertyImpl("defaultProperties", props));
                         }
                     }
                 }
@@ -121,6 +128,24 @@
         }
     }
 
+    private Metadata parseDefaultProperties(Parser parser, MutableBeanMetadata enclosingComponent, Element element) {
+        MutableMapMetadata props = new MapMetadataImpl();
+        NodeList nl = element.getChildNodes();
+        for (int i = 0; i < nl.getLength(); i++) {
+            Node node = nl.item(i);
+            if (node instanceof Element) {
+                Element e = (Element) node;
+                if (BLUEPRINT_COMPENDIUM_NAMESPACE.equals(e.getNamespaceURI())) {
+                    if (nodeNameEquals(e, PROPERTY_ELEMENT)) {
+                        BeanProperty prop = parser.parseBeanProperty(enclosingComponent, e);
+                        props.addEntry(new MapEntryImpl(new ValueMetadataImpl(prop.getName(), String.class.getName()), prop.getValue()));
+                    }
+                }
+            }
+        }
+        return props;
+    }
+
     /**
      * Create a reference to the ConfigurationAdmin service if not already done
      * and add it to the registry.

Copied: geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmPropertyPlaceholder.java (from r768871, geronimo/sandbox/blueprint/blueprint-compendium/src/main/java/org/apache/geronimo/blueprint/compendium/CompendiumPropertyPlaceholder.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmPropertyPlaceholder.java?p2=geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmPropertyPlaceholder.java&p1=geronimo/sandbox/blueprint/blueprint-compendium/src/main/java/org/apache/geronimo/blueprint/compendium/CompendiumPropertyPlaceholder.java&r1=768871&r2=769105&rev=769105&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-compendium/src/main/java/org/apache/geronimo/blueprint/compendium/CompendiumPropertyPlaceholder.java (original)
+++ geronimo/sandbox/blueprint/blueprint-cm/src/main/java/org/apache/geronimo/blueprint/compendium/cm/CmPropertyPlaceholder.java Mon Apr 27 19:04:54 2009
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.geronimo.blueprint.compendium;
+package org.apache.geronimo.blueprint.compendium.cm;
 
 import java.util.Map;
 import java.util.List;
@@ -53,7 +53,7 @@
  * @author <a href="mailto:dev@geronimo.apache.org">Apache Geronimo Project</a>
  * @version $Rev: 766508 $, $Date: 2009-04-19 22:09:27 +0200 (Sun, 19 Apr 2009) $
  */
-public class CompendiumPropertyPlaceholder extends AbstractPropertyPlaceholder {
+public class CmPropertyPlaceholder extends AbstractPropertyPlaceholder {
 
     private BlueprintContext blueprintContext;
     private ConfigurationAdmin configAdmin; 
@@ -101,15 +101,17 @@
         Object v = null;
         try {
             Configuration config = configAdmin.getConfiguration(persistentId);
-            Dictionary props = config.getProperties();
-            if (props != null) {
-                v = props.get(val);
+            if (config != null) {
+                Dictionary props = config.getProperties();
+                if (props != null) {
+                    v = props.get(val);
+                }
             }
         } catch (Throwable t) {
             t.printStackTrace();
             // TODO: log ?
         }
-        if (v == null && defaultProperties.containsKey(val)) {
+        if (v == null && defaultProperties != null && defaultProperties.containsKey(val)) {
             v = defaultProperties.get(val);
         }
         return v instanceof String ? (String) v : null;
@@ -119,6 +121,8 @@
 
         private String stringValue;
         private String typeName;
+        private boolean retrieved;
+        private String retrievedValue;
 
         public LateBindingValueMetadata(String stringValue, String typeName) {
             this.stringValue = stringValue;
@@ -126,7 +130,11 @@
         }
 
         public String getStringValue() {
-            return processString(stringValue);
+            if (!retrieved) {
+                retrieved = true;
+                retrievedValue = processString(stringValue);
+            }
+            return retrievedValue;
         }
 
         public void setStringValue(String stringValue) {

Copied: geronimo/sandbox/blueprint/blueprint-cm/src/main/resources/OSGI-INF/blueprint/cm.xml (from r768871, geronimo/sandbox/blueprint/blueprint-compendium/src/main/resources/OSGI-INF/blueprint/compendium.xml)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-cm/src/main/resources/OSGI-INF/blueprint/cm.xml?p2=geronimo/sandbox/blueprint/blueprint-cm/src/main/resources/OSGI-INF/blueprint/cm.xml&p1=geronimo/sandbox/blueprint/blueprint-compendium/src/main/resources/OSGI-INF/blueprint/compendium.xml&r1=768871&r2=769105&rev=769105&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-compendium/src/main/resources/OSGI-INF/blueprint/compendium.xml (original)
+++ geronimo/sandbox/blueprint/blueprint-cm/src/main/resources/OSGI-INF/blueprint/cm.xml Mon Apr 27 19:04:54 2009
@@ -3,9 +3,9 @@
 
     <service interface="org.osgi.service.blueprint.namespace.NamespaceHandler">
         <service-properties>
-            <entry key="org.osgi.blueprint.namespace" value="http://www.osgi.org/xmlns/blueprint-compendium/v1.0.0"/>
+            <entry key="org.osgi.blueprint.namespace" value="http://www.osgi.org/xmlns/blueprint-cm/v1.0.0"/>
         </service-properties>
-        <bean class="org.apache.geronimo.blueprint.compendium.CompendiumNamespaceHandler"/>
-
+        <bean class="org.apache.geronimo.blueprint.compendium.cm.CmNamespaceHandler"/>
     </service>
+
 </blueprint>
\ No newline at end of file

Copied: geronimo/sandbox/blueprint/blueprint-cm/src/main/resources/org/apache/geronimo/blueprint/compendium/cm/blueprint-cm.xsd (from r768871, geronimo/sandbox/blueprint/blueprint-compendium/src/main/resources/org/apache/geronimo/blueprint/compendium/blueprint-compendium.xsd)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-cm/src/main/resources/org/apache/geronimo/blueprint/compendium/cm/blueprint-cm.xsd?p2=geronimo/sandbox/blueprint/blueprint-cm/src/main/resources/org/apache/geronimo/blueprint/compendium/cm/blueprint-cm.xsd&p1=geronimo/sandbox/blueprint/blueprint-compendium/src/main/resources/org/apache/geronimo/blueprint/compendium/blueprint-compendium.xsd&r1=768871&r2=769105&rev=769105&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-compendium/src/main/resources/org/apache/geronimo/blueprint/compendium/blueprint-compendium.xsd (original)
+++ geronimo/sandbox/blueprint/blueprint-cm/src/main/resources/org/apache/geronimo/blueprint/compendium/cm/blueprint-cm.xsd Mon Apr 27 19:04:54 2009
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <!--
     /*
-    * $Revision: 6775 $
+    * $Revision: 6871 $
     *
     * Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
     *
@@ -18,15 +18,15 @@
     * limitations under the License.
     */
     -->
-<xsd:schema xmlns="http://www.osgi.org/xmlns/blueprint-compendium/v1.0.0"
+<xsd:schema xmlns="http://www.osgi.org/xmlns/blueprint-cm/v1.0.0"
             xmlns:xsd="http://www.w3.org/2001/XMLSchema"
             xmlns:osgi="http://www.osgi.org/xmlns/blueprint/v1.0.0"
-            targetNamespace="http://www.osgi.org/xmlns/blueprint-compendium/v1.0.0"
+            targetNamespace="http://www.osgi.org/xmlns/blueprint-cm/v1.0.0"
             elementFormDefault="qualified"
             attributeFormDefault="unqualified"
             version="1.0.0">
 
-    <xsd:import namespace="http://www.osgi.org/xmlns/blueprint/v1.0.0" schemaLocation="../../../../../../../../../blueprint-core/src/main/resources/org/apache/geronimo/blueprint/blueprint.xsd"/>
+    <xsd:import namespace="http://www.osgi.org/xmlns/blueprint/v1.0.0"/>
 
     <!-- property placeholder -->
 
@@ -55,7 +55,7 @@
          all of the elements you can inject into a bean property? -->
     <xsd:complexType name="TdefaultProperties">
         <xsd:sequence minOccurs="0" maxOccurs="unbounded">
-            <xsd:element ref="osgi:property"/>
+            <xsd:element name="property" type="osgi:Tproperty"/>
         </xsd:sequence>
     </xsd:complexType>
 

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ExtendedParserContext.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ExtendedParserContext.java?rev=769105&r1=769104&r2=769105&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ExtendedParserContext.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ExtendedParserContext.java Mon Apr 27 19:04:54 2009
@@ -1,7 +1,10 @@
 package org.apache.geronimo.blueprint;
 
+import org.w3c.dom.Element;
+
 import org.osgi.service.blueprint.namespace.ParserContext;
 import org.osgi.service.blueprint.reflect.Metadata;
+import org.osgi.service.blueprint.reflect.ComponentMetadata;
 
 /**
  * An extended ParserContext that also acts as a factory of Metadata objects.
@@ -13,4 +16,6 @@
 
     <T extends Metadata> T createMetadata(Class<T> type);
 
+    <T> T parseElement(Class<T> type, ComponentMetadata enclosingComponent, Element element);
+
 }

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/Parser.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/Parser.java?rev=769105&r1=769104&r2=769105&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/Parser.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/Parser.java Mon Apr 27 19:04:54 2009
@@ -75,6 +75,8 @@
 import org.osgi.service.blueprint.reflect.CollectionMetadata;
 import org.osgi.service.blueprint.reflect.MapEntry;
 import org.osgi.service.blueprint.reflect.NonNullMetadata;
+import org.osgi.service.blueprint.reflect.BeanArgument;
+import org.osgi.service.blueprint.reflect.BeanProperty;
 import org.xml.sax.InputSource;
 
 /**
@@ -331,6 +333,20 @@
         }
     }
 
+    public <T> T parseElement(Class<T> type, ComponentMetadata enclosingComponent, Element element) {
+        if (BeanArgument.class.isAssignableFrom(type)) {
+            return type.cast(parseBeanArgument(enclosingComponent, element));
+        } else if (BeanProperty.class.isAssignableFrom(type)) {
+            return type.cast(parseBeanProperty(enclosingComponent, element));
+        } else if (MapEntry.class.isAssignableFrom(type)) {
+            return type.cast(parseMapEntry(element, enclosingComponent));
+        } else if (Metadata.class.isAssignableFrom(type)) {
+            return type.cast(parseValueElement(element, enclosingComponent, true));
+        } else {
+            throw new ComponentDefinitionException("Unknown type to parse element: " + type.getName());
+        }
+    }
+
     private void parseBlueprintElement(Element element) {
         if (nodeNameEquals(element, DESCRIPTION_ELEMENT)) {
             // Ignore description
@@ -425,14 +441,9 @@
                 Element e = (Element) node;
                 if (isBlueprintNamespace(node.getNamespaceURI())) {                
                     if (nodeNameEquals(node, ARGUMENT_ELEMENT)) {
-                        int index = e.hasAttribute(INDEX_ATTRIBUTE) ? Integer.parseInt(e.getAttribute(INDEX_ATTRIBUTE)) : -1;
-                        String type = e.hasAttribute(TYPE_ATTRIBUTE) ? e.getAttribute(TYPE_ATTRIBUTE) : null;
-                        Metadata value = parseValue(e, metadata);
-                        metadata.addArgument(new BeanArgumentImpl(value, type, index));
+                        metadata.addArgument(parseBeanArgument(metadata, e));
                     } else if (nodeNameEquals(node, PROPERTY_ELEMENT)) {
-                        String name = e.hasAttribute(NAME_ATTRIBUTE) ? e.getAttribute(NAME_ATTRIBUTE) : null;
-                        Metadata value = parseValue(e, metadata);
-                        metadata.addProperty(new BeanPropertyImpl(name, value));
+                        metadata.addProperty(parseBeanProperty(metadata, e));
                     }
                 }
             }
@@ -449,6 +460,19 @@
         return m;
     }
 
+    public BeanProperty parseBeanProperty(ComponentMetadata enclosingComponent, Element element) {
+        String name = element.hasAttribute(NAME_ATTRIBUTE) ? element.getAttribute(NAME_ATTRIBUTE) : null;
+        Metadata value = parseValue(element, enclosingComponent);
+        return new BeanPropertyImpl(name, value);
+    }
+
+    private BeanArgument parseBeanArgument(ComponentMetadata enclosingComponent, Element element) {
+        int index = element.hasAttribute(INDEX_ATTRIBUTE) ? Integer.parseInt(element.getAttribute(INDEX_ATTRIBUTE)) : -1;
+        String type = element.hasAttribute(TYPE_ATTRIBUTE) ? element.getAttribute(TYPE_ATTRIBUTE) : null;
+        Metadata value = parseValue(element, enclosingComponent);
+        return new BeanArgumentImpl(value, type, index);
+    }
+
     private ComponentMetadata parseService(Element element) {
         ServiceMetadataImpl service = new ServiceMetadataImpl();
         service.setId(getName(element));
@@ -545,7 +569,7 @@
         return new CollectionMetadataImpl(collectionType, valueType, list);
     }
 
-    private PropsMetadata parseProps(Element element) {
+    public PropsMetadata parseProps(Element element) {
         // Parse elements
         List<MapEntry> entries = new ArrayList<MapEntry>();
         NodeList nl = element.getChildNodes();
@@ -554,25 +578,20 @@
             if (node instanceof Element) {
                 Element e = (Element) node;
                 if (isBlueprintNamespace(e.getNamespaceURI()) && nodeNameEquals(e, PROP_ELEMENT)) {
-                    NonNullMetadata keyValue = null;
-                    if (e.hasAttribute(KEY_ATTRIBUTE)) {
-                        keyValue = new ValueMetadataImpl(e.getAttribute(KEY_ATTRIBUTE));
-                    } else {
-                        throw new RuntimeException("key attribute is required");
-                    }
-                    Metadata valValue = null;
-                    if (e.hasAttribute(VALUE_ATTRIBUTE)) {
-                        valValue = new ValueMetadataImpl(e.getAttribute(VALUE_ATTRIBUTE));
-                    } else {
-                        throw new RuntimeException("value attribute is required");
-                    }
-                    entries.add(new MapEntryImpl(keyValue, valValue));
+                    entries.add(parseProperty(e));
                 }
             }
         }
         return new PropsMetadataImpl(entries);
     }
 
+    private MapEntry parseProperty(Element element) {
+        // Parse attributes
+        String key = element.getAttribute(KEY_ATTRIBUTE);
+        String value = element.hasAttribute(VALUE_ATTRIBUTE) ? element.getAttribute(VALUE_ATTRIBUTE) : null;
+        return new MapEntryImpl(new ValueMetadataImpl(key), value != null ? new ValueMetadataImpl(value) : NullMetadata.NULL);
+    }
+
     public MapMetadata parseMap(Element element, ComponentMetadata enclosingComponent) {
         // Parse attributes
         String keyType = element.hasAttribute(KEY_TYPE_ATTRIBUTE) ? element.getAttribute(KEY_TYPE_ATTRIBUTE) : null;
@@ -981,13 +1000,13 @@
     
     private ComponentMetadata decorateCustomNode(Node node, ComponentMetadata enclosingComponent) {
         NamespaceHandler handler = getNamespaceHandler(node);
-        ParserContextImpl context = new ParserContextImpl(registry, enclosingComponent, node);
+        ParserContextImpl context = new ParserContextImpl(this, registry, enclosingComponent, node);
         return handler.decorate(node, enclosingComponent, context);
     }
 
     private ComponentMetadata parseCustomElement(Element element, ComponentMetadata enclosingComponent) {
         NamespaceHandler handler = getNamespaceHandler(element);
-        ParserContextImpl context = new ParserContextImpl(registry, enclosingComponent, element);
+        ParserContextImpl context = new ParserContextImpl(this, registry, enclosingComponent, element);
         return handler.parse(element, context);
     }
 

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/namespace/ParserContextImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/namespace/ParserContextImpl.java?rev=769105&r1=769104&r2=769105&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/namespace/ParserContextImpl.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/namespace/ParserContextImpl.java Mon Apr 27 19:04:54 2009
@@ -19,12 +19,13 @@
 package org.apache.geronimo.blueprint.namespace;
 
 import org.w3c.dom.Node;
+import org.w3c.dom.Element;
 
 import org.osgi.service.blueprint.namespace.ComponentDefinitionRegistry;
-import org.osgi.service.blueprint.namespace.ParserContext;
 import org.osgi.service.blueprint.reflect.ComponentMetadata;
 import org.osgi.service.blueprint.reflect.Metadata;
 import org.apache.geronimo.blueprint.ExtendedParserContext;
+import org.apache.geronimo.blueprint.context.Parser;
 import org.apache.geronimo.blueprint.reflect.MetadataUtil;
 
 /**
@@ -37,13 +38,16 @@
  */
 public class ParserContextImpl implements ExtendedParserContext {
 
+    private final Parser parser;
     private final ComponentDefinitionRegistry componentDefinitionRegistry;
     private final ComponentMetadata enclosingComponent;
     private final Node sourceNode;
 
-    public ParserContextImpl(ComponentDefinitionRegistry componentDefinitionRegistry,
+    public ParserContextImpl(Parser parser,
+                             ComponentDefinitionRegistry componentDefinitionRegistry,
                              ComponentMetadata enclosingComponent,
                              Node sourceNode) {
+        this.parser = parser;
         this.componentDefinitionRegistry = componentDefinitionRegistry;
         this.enclosingComponent = enclosingComponent;
         this.sourceNode = sourceNode;
@@ -64,4 +68,8 @@
     public <T extends Metadata> T createMetadata(Class<T> type) {
         return MetadataUtil.createMetadata(type);
     }
+
+    public <T> T parseElement(Class<T> type, ComponentMetadata enclosingComponent, Element element) {
+        return parser.parseElement(type, enclosingComponent, element);
+    }
 }

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/resources/org/apache/geronimo/blueprint/blueprint.xsd
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/resources/org/apache/geronimo/blueprint/blueprint.xsd?rev=769105&r1=769104&r2=769105&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/resources/org/apache/geronimo/blueprint/blueprint.xsd (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/resources/org/apache/geronimo/blueprint/blueprint.xsd Mon Apr 27 19:04:54 2009
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <!--
     /*
-    * $Revision: 6813 $
+    * $Revision: 6871 $
     *
     * Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
     *
@@ -55,14 +55,6 @@
         <xsd:anyAttribute namespace="##other" processContents="lax"/>
     </xsd:complexType>
 
-    <!--<xsd:element name="description" type="Tdescription"/>-->
-
-    <xsd:complexType name="Tdescription" mixed="true">
-        <xsd:choice minOccurs="0" maxOccurs="unbounded"/>
-    </xsd:complexType>
-
-    <!--<xsd:element name="type-converters" type="Ttype-converters"/>-->
-
     <xsd:complexType name="Ttype-converters">
         <xsd:choice minOccurs="0" maxOccurs="unbounded">
             <xsd:group ref="targetComponent"/>
@@ -151,39 +143,10 @@
         <xsd:attribute name="value" type="TstringValue"/>
     </xsd:complexType>
 
-    <!--<xsd:element name="ref" type="Tref"/>-->
-
-    <xsd:complexType name="Tref">
-        <xsd:complexContent>
-            <xsd:restriction base="xsd:anyType">
-                <xsd:attribute name="component" type="Tidref" use="required"/>
-            </xsd:restriction>
-        </xsd:complexContent>
-    </xsd:complexType>
-
-    <xsd:complexType name="Tnull" mixed="true">
-        <xsd:choice minOccurs="0" maxOccurs="unbounded"/>
-    </xsd:complexType>
-
     <xsd:complexType name="Tkey">
         <xsd:group ref="nonNullValue"/>
     </xsd:complexType>
 
-    <xsd:complexType name="Treference">
-        <xsd:complexContent>
-            <xsd:extension base="Tcomponent">
-                <xsd:sequence minOccurs="0" maxOccurs="unbounded">
-                    <xsd:element name="interfaces" type="Tinterfaces" minOccurs="0" maxOccurs="1"/>
-                    <xsd:element name="listener" type="TreferenceListener" minOccurs="0" maxOccurs="unbounded"/>
-                </xsd:sequence>
-                <xsd:attribute name="interface" use="optional" type="xsd:token"/>
-                <xsd:attribute name="filter" use="optional" type="xsd:string"/>
-                <xsd:attribute name="component-name" type="xsd:string" use="optional"/>
-                <xsd:attribute name="availability" use="optional" type="Tavailability" default="mandatory"/>
-            </xsd:extension>
-        </xsd:complexContent>
-    </xsd:complexType>
-
 	<!-- reference -->
 	<xsd:complexType name="Treference">
 		<xsd:complexContent>
@@ -197,7 +160,9 @@
 	<xsd:complexType name="Tref-collection">
 		<xsd:complexContent>
 			<xsd:extension base="TserviceReference">
-                 <xsd:element name="comparator" type="Tcomparator" minOccurs="0" maxOccurrs="1"/>
+				<xsd:sequence>
+                     <xsd:element name="comparator" type="Tcomparator" minOccurs="0" maxOccurs="1"/>
+                </xsd:sequence>
 
 				<xsd:attribute name="comparator-ref" type="xsd:token"
 					use="optional"/>
@@ -228,12 +193,14 @@
 	<xsd:complexType name="TserviceReference">
 		<xsd:complexContent>
 			<xsd:extension base="Tcomponent">
+			    <xsd:sequence>
    				<xsd:element name="interfaces" minOccurs="0" maxOccurs="1"
    					type="Tinterfaces"/>
 
-   				<!-- listener ### why is this called listerm and not reference listener? -->
-   				<xsd:element name="listener" type="TreferenceListener" minOccurs="0"
-   					maxOccurs="unbounded"/>
+     				<!-- listener ### why is this called listerm and not reference listener? -->
+     				<xsd:element name="listener" type="TReferenceListener" minOccurs="0"
+   	    				maxOccurs="unbounded"/>
+   				</xsd:sequence>
 
 				<xsd:attribute name="interface" use="optional" type="Tclass"/>
 				<xsd:attribute name="filter" use="optional" type="xsd:normalizedString"/>
@@ -245,7 +212,7 @@
 		</xsd:complexContent>
 	</xsd:complexType>
 
-    <xsd:complexType name="TreferenceListener">
+    <xsd:complexType name="TReferenceListener">
         <xsd:group ref="targetComponent"/>
         <xsd:attribute name="ref" type="xsd:token"
             use="optional"/>
@@ -279,20 +246,11 @@
     <xsd:complexType name="Tservice">
         <xsd:complexContent>
             <xsd:extension base="Tcomponent">
-                <xsd:element name="interfaces" type="Tinterfaces"
-                    minOccurs="0"/>
-
-   				<!-- #### I'm not sure this should be a Tmap.  Service properties can only
-                     have string keys, and Map can have any type.  I suspect this needs its
-                     own type -->
-                <xsd:element name="service-properties" type="Tmap"
-                    minOccurs="0"/>
-                <xsd:element name="registration-listener" type="TregistrationListener"
-                    minOccurs="0" maxOccurs="unbounded"/>
-                <xsd:element name="bean" type="Tcomponent" minOccurs="0"
-                    maxOccurs="1"/>
-                <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"
-                    processContents="lax"/>
+                <xsd:sequence>
+                	<xsd:group ref="serviceElements"/>
+                	<xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"
+                    	processContents="lax"/>
+                </xsd:sequence>
                 <xsd:attribute name="interface" type="Tclass" use="optional"/>
                 <xsd:attribute name="ref" type="Tidref" use="optional"/>
                 <xsd:attribute name="depends-on" type="xsd:normalizedString" use="optional"/>
@@ -302,6 +260,20 @@
         </xsd:complexContent>
     </xsd:complexType>
 
+    <xsd:group name="serviceElements">
+        <xsd:sequence>
+        	<xsd:element name="interfaces" type="Tinterfaces" minOccurs="0"/>
+
+    		<!-- #### I'm not sure this should be a Tmap.  Service properties can only
+                 have string keys, and Map can have any type.  I suspect this needs its
+                 own type -->
+            <xsd:element name="service-properties" type="Tmap" minOccurs="0"/>
+         	<xsd:element name="registration-listener" type="TregistrationListener" minOccurs="0" maxOccurs="unbounded"/>
+          	<xsd:element name="bean" type="Tcomponent" minOccurs="0" maxOccurs="1"/>
+        </xsd:sequence>
+    </xsd:group>
+
+
     <xsd:complexType name="TregistrationListener">
         <xsd:group ref="targetComponent"/>
         <xsd:attribute name="ref" type="Tidref"
@@ -318,19 +290,20 @@
 	-->
 
 	<xsd:group name="value">
-        <xsd:choice minOccurs="0" maxOccurs="1">
+        <xsd:choice>
 			<xsd:group ref="nonNullValue"/>
             <xsd:element name="null" type="Tnull"/>
 		</xsd:choice>
 	</xsd:group>
 
-    <xsd:complexType name="Tnull"/>
+    <xsd:complexType name="Tnull">
+    	<xsd:choice minOccurs="0" maxOccurs="unbounded"/>
+    </xsd:complexType>
 
 	<xsd:group name="nonNullValue">
-        <xsd:choice minOccurs="0" maxOccurs="1">
+		<xsd:sequence>
 			<xsd:group ref="allComponents"/>
 			<xsd:choice minOccurs="0" maxOccurs="1">
-				<xsd:element name="ref" type="Tref"/>
 				<xsd:element name="idref" type="Tref"/>
 				<xsd:element name="value" type="Tvalue"/>
 				<xsd:element name="list" type="Tcollection"/>
@@ -338,10 +311,8 @@
 				<xsd:element name="map" type="Tmap"/>
 				<xsd:element name="array" type="Tcollection"/>
 				<xsd:element name="props" type="Tprops"/>
-				<xsd:any namespace="##other" processContents="strict" minOccurs="0"
-					maxOccurs="unbounded"/>
 			</xsd:choice>
-        </xsd:choice>
+		</xsd:sequence>
 	</xsd:group>
 
 	<xsd:complexType name="Tref">
@@ -354,8 +325,6 @@
 	</xsd:complexType>
 
 	<xsd:complexType name="Tvalue" mixed="true">
-		<!-- #### why should arbitrary elements be allowed in a <value>?-->
-        <xsd:any minOccurs="0" maxOccurs="unbounded"/>
 		<xsd:attribute name="type" type="Tclass"/>
 	</xsd:complexType>
 
@@ -370,7 +339,9 @@
 	</xsd:complexType>
 
 	<xsd:complexType name="Tprops">
-   		<xsd:element name="prop" type="Tprop" maxOccurs="unbounded"/>
+	    <xsd:sequence>
+   			<xsd:element name="prop" type="Tprop" maxOccurs="unbounded"/>
+   		</xsd:sequence>
 	</xsd:complexType>
 
     <xsd:complexType name="Tprop" mixed="true">
@@ -384,7 +355,9 @@
     <xsd:complexType name="Tmap">
         <xsd:complexContent>
             <xsd:extension base="TtypedCollection">
-                <xsd:element name="entry" type="Tentry" minOccurs="0" maxOccurs="unbounded"/>
+                <xsd:sequence>
+                	<xsd:element name="entry" type="Tentry" minOccurs="0" maxOccurs="unbounded"/>
+                </xsd:sequence>
                 <xsd:attribute name="key-type" type="xsd:string"/>
             </xsd:extension>
         </xsd:complexContent>
@@ -403,9 +376,7 @@
     </xsd:complexType>
 
 	<xsd:complexType name="TtypedCollection">
-		<xsd:complexContent>
-            <xsd:attribute name="value-type" type="Tclass"/>
-		</xsd:complexContent>
+    	<xsd:attribute name="value-type" type="Tclass"/>
 	</xsd:complexType>
 
 	<!-- General types -->
@@ -440,4 +411,14 @@
 		<xsd:restriction base="xsd:normalizedString"/>
 	</xsd:simpleType>
 
+    <xsd:simpleType name="TautoExportModes">
+        <xsd:restriction base="xsd:token">
+            <xsd:enumeration value="disabled"/>
+            <xsd:enumeration value="interfaces"/>
+            <xsd:enumeration value="class-hierarchy"/>
+            <xsd:enumeration value="all-classes"/>
+        </xsd:restriction>
+    </xsd:simpleType>
+
+
 </xsd:schema>

Modified: geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test-constructor.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test-constructor.xml?rev=769105&r1=769104&r2=769105&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test-constructor.xml (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test-constructor.xml Mon Apr 27 19:04:54 2009
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 ../../main/resources/org/apache/geronimo/blueprint/blueprint.xsd"
+            xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0"
             default-availability="mandatory"
             default-init-method = "init"
             default-destroy-method = "destroy" >

Modified: geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test-custom-nodes.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test-custom-nodes.xml?rev=769105&r1=769104&r2=769105&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test-custom-nodes.xml (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test-custom-nodes.xml Mon Apr 27 19:04:54 2009
@@ -17,9 +17,8 @@
  specific language governing permissions and limitations
  under the License.
 -->
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xmlns:cache="http://cache.org"
-    xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 ../../main/resources/org/apache/geronimo/blueprint/blueprint.xsd">
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:cache="http://cache.org">
 
     <cache:lru-cache id="myCache" />
     

Modified: geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test-depends-on.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test-depends-on.xml?rev=769105&r1=769104&r2=769105&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test-depends-on.xml (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test-depends-on.xml Mon Apr 27 19:04:54 2009
@@ -1,8 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
-            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 ../../main/resources/org/apache/geronimo/blueprint/blueprint.xsd"
-            default-init-method="init" default-destroy-method="destroy">
+           default-init-method="init"
+           default-destroy-method="destroy">
 
     <bean id="c" class="org.apache.geronimo.blueprint.pojos.BeanC" depends-on="d" init-method="init"/>
 

Modified: geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test-simple-component.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test-simple-component.xml?rev=769105&r1=769104&r2=769105&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test-simple-component.xml (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test-simple-component.xml Mon Apr 27 19:04:54 2009
@@ -1,8 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
-            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 ../../main/resources/org/apache/geronimo/blueprint/blueprint.xsd"
-            default-init-method="init" default-destroy-method="destroy">
+           default-init-method="init"
+           default-destroy-method="destroy">
 
     <bean id="pojoA" class="org.apache.geronimo.blueprint.pojos.PojoA" depends-on=" pojoB , pojoC ,">
         <argument value="val0"/>

Modified: geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test-wiring.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test-wiring.xml?rev=769105&r1=769104&r2=769105&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test-wiring.xml (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test-wiring.xml Mon Apr 27 19:04:54 2009
@@ -1,10 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
-            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 ../../main/resources/org/apache/geronimo/blueprint/blueprint.xsd"
-            default-availability="mandatory"
-            default-init-method = "init"
-            default-destroy-method = "destroy" >
+           default-availability="mandatory"
+           default-init-method="init"
+           default-destroy-method="destroy">
 
     <type-converters>
             <bean id="converter1" class="org.apache.geronimo.blueprint.pojos.ConverterA">

Modified: geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test.xml?rev=769105&r1=769104&r2=769105&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test.xml (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test.xml Mon Apr 27 19:04:54 2009
@@ -1,8 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
-            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 ../../main/resources/org/apache/geronimo/blueprint/blueprint.xsd"
-            default-availability="mandatory">
+           default-availability="mandatory">
 
     <description>
         This is a parsing test application

Modified: geronimo/sandbox/blueprint/blueprint-sample/src/main/resources/OSGI-INF/blueprint/config.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-sample/src/main/resources/OSGI-INF/blueprint/config.xml?rev=769105&r1=769104&r2=769105&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-sample/src/main/resources/OSGI-INF/blueprint/config.xml (original)
+++ geronimo/sandbox/blueprint/blueprint-sample/src/main/resources/OSGI-INF/blueprint/config.xml Mon Apr 27 19:04:54 2009
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
-           xmlns:osgix="http://www.osgi.org/xmlns/blueprint-compendium/v1.0.0"
+           xmlns:cm="http://www.osgi.org/xmlns/blueprint-cm/v1.0.0"
            default-availability="optional">
 
     <type-converters>
@@ -9,11 +9,11 @@
         </bean>
         <bean id="converter2" class="org.apache.geronimo.blueprint.sample.CurrencyTypeConverter"/>
 
-        <osgix:property-placeholder id="property-placeholder" persistent-id="blueprint-sample">
-            <osgix:default-properties>
-                <entry key="key.b" value="-1"/>
-            </osgix:default-properties>
-        </osgix:property-placeholder>
+        <cm:property-placeholder id="property-placeholder" persistent-id="blueprint-sample">
+            <cm:default-properties>
+                <cm:property name="key.b" value="-1"/>
+            </cm:default-properties>
+        </cm:property-placeholder>
     </type-converters>
 
     <bean id="foo" class="org.apache.geronimo.blueprint.sample.Foo" init-method="init" destroy-method="destroy">

Modified: geronimo/sandbox/blueprint/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/pom.xml?rev=769105&r1=769104&r2=769105&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/pom.xml (original)
+++ geronimo/sandbox/blueprint/pom.xml Mon Apr 27 19:04:54 2009
@@ -45,7 +45,7 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.geronimo</groupId>
-                <artifactId>blueprint-compendium</artifactId>
+                <artifactId>blueprint-cm</artifactId>
                 <version>${version}</version>
             </dependency>
             <dependency>
@@ -168,7 +168,7 @@
     <modules>
         <module>blueprint-api</module>
         <module>blueprint-core</module>
-        <module>blueprint-compendium</module>
+        <module>blueprint-cm</module>
         <module>blueprint-bundle</module>
         <module>blueprint-sample</module>
         <module>blueprint-itests</module>