geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r767576 [4/4] - in /geronimo/sandbox/blueprint: blueprint-api/src/main/java/org/osgi/service/blueprint/context/ blueprint-api/src/main/java/org/osgi/service/blueprint/convert/ blueprint-api/src/main/java/org/osgi/service/blueprint/namespace...
Date Wed, 22 Apr 2009 15:57:38 GMT
Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/resources/org/apache/geronimo/blueprint/blueprint-compendium.xsd
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/resources/org/apache/geronimo/blueprint/blueprint-compendium.xsd?rev=767576&r1=767575&r2=767576&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/resources/org/apache/geronimo/blueprint/blueprint-compendium.xsd (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/resources/org/apache/geronimo/blueprint/blueprint-compendium.xsd Wed Apr 22 15:57:35 2009
@@ -1,4 +1,23 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+    /*
+    * $Revision: 6775 $
+    *
+    * Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
+    *
+    * Licensed under the Apache License, Version 2.0 (the "License");
+    * you may not use this file except in compliance with the License.
+    * You may obtain a copy of the License at
+    *
+    *      http://www.apache.org/licenses/LICENSE-2.0
+    *
+    * Unless required by applicable law or agreed to in writing, software
+    * distributed under the License is distributed on an "AS IS" BASIS,
+    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    * See the License for the specific language governing permissions and
+    * limitations under the License.
+    */
+    -->
 <xsd:schema xmlns="http://www.osgi.org/xmlns/blueprint-compendium/v1.0.0"
             xmlns:xsd="http://www.w3.org/2001/XMLSchema"
             xmlns:osgi="http://www.osgi.org/xmlns/blueprint/v1.0.0"
@@ -7,51 +26,57 @@
             attributeFormDefault="unqualified"
             version="1.0.0">
 
-    <xsd:import namespace="blueprint.xsd"/>
+    <xsd:import namespace="http://www.osgi.org/xmlns/blueprint/v1.0.0"/>
 
     <!-- property placeholder -->
 
     <xsd:element name="property-placeholder" type="TpropertyPlaceholder"/>
 
-
     <xsd:complexType name="TpropertyPlaceholder">
-      <xsd:complexContent>
-        <xsd:extension base="osgi:TidentifiedType">
-          <xsd:sequence minOccurs="0" maxOccurs="1">
-             <!-- nested properties declaration -->
-             <xsd:element name="default-properties" type="TdefaultProperties" minOccurs="0" maxOccurs="1"/>
-          </xsd:sequence>
-          <xsd:attribute name="persistent-id" type="xsd:string" use="required"/>
-          <xsd:attribute name="placeholder-prefix" type="xsd:string" use="optional" default="${"/>
-          <xsd:attribute name="placeholder-suffix" type="xsd:string" use="optional" default="}"/>
-          <xsd:attribute name="defaults-ref" type="xsd:string" use="optional"/>
-        </xsd:extension>
-      </xsd:complexContent>
+        <xsd:complexContent>
+            <xsd:extension base="osgi:Tidentified">
+                <xsd:sequence>
+                    <!-- nested properties declaration -->
+                    <xsd:element name="default-properties" type="TdefaultProperties" minOccurs="0" maxOccurs="1"/>
+                </xsd:sequence>
+
+                <!-- #### What should be the type for a persistent id?  I think we need to define one like class and method -->
+                <xsd:attribute name="persistent-id" type="xsd:string" use="required"/>
+                <xsd:attribute name="placeholder-prefix" type="xsd:string" use="optional" default="${"/>
+                <xsd:attribute name="placeholder-suffix" type="xsd:string" use="optional" default="}"/>
+                <xsd:attribute name="defaults-ref" type="Tidref" use="optional"/>
+            </xsd:extension>
+        </xsd:complexContent>
     </xsd:complexType>
 
+
+    <!-- #### is this the correct type here?  This is defining placeholder properties,
+         so should this be a restricted set of value types or should this be expanded to
+         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:sequence>
     </xsd:complexType>
 
-    <!-- managed-property -->
-    
+
+    <!--  managed-properties  -->
+
     <xsd:element name="managed-properties" type="TmanagedProperties"/>
 
     <xsd:complexType name="TmanagedProperties">
         <xsd:attribute name="persistent-id" type="xsd:string" use="required"/>
         <xsd:attribute name="update-strategy" type="TupdateStrategyType" use="optional"/>
-        <xsd:attribute name="update-method" type="xsd:string" use='optional'/>
+        <xsd:attribute name="update-method" type="xsd:string" use="optional"/>
     </xsd:complexType>
 
     <xsd:simpleType name="TupdateStrategyType">
-        <xsd:restriction base="xsd:string">
+        <xsd:restriction base="xsd:NMTOKEN">
             <xsd:enumeration value="none"/>
             <xsd:enumeration value="component-managed"/>
             <xsd:enumeration value="container-managed"/>
         </xsd:restriction>
-     </xsd:simpleType>
+    </xsd:simpleType>
 
     <!--  managed-service-factory -->
 
@@ -59,12 +84,13 @@
 
     <xsd:complexType name="TmanagedServiceFactory">
         <xsd:complexContent>
-            <xsd:extension base="osgi:TidentifiedType">
+            <xsd:extension base="osgi:Tcomponent">
                 <xsd:sequence>
                     <xsd:group ref="osgi:serviceElements"/>
                     <xsd:element name="managed-component" type="TmanagedComponent" minOccurs="1" maxOccurs="1"/>
                 </xsd:sequence>
                 <xsd:attribute name="factory-pid" type="xsd:string" use="required"/>
+                <xsd:attribute name="interface" type="osgi:Tclass" use="optional"/>
                 <xsd:attribute name="auto-export" type="osgi:TautoExportModes" default="disabled"/>
                 <xsd:attribute name="ranking" type="xsd:int" default="0"/>
                 <xsd:anyAttribute namespace="##other" processContents="lax"/>
@@ -73,15 +99,16 @@
     </xsd:complexType>
 
     <xsd:complexType name="TmanagedComponent">
-        <xsd:group ref="osgi:componentElements"/>
-        <xsd:attribute name="class" type="xsd:string"/>
-        <xsd:attribute name="init-method" type="xsd:string"/>
-        <xsd:attribute name="destroy-method" type="xsd:string"/>
-        <xsd:attribute name="factory-method" type="xsd:string"/>
-        <xsd:attribute name="factory-component" type="xsd:string"/>
+        <xsd:group ref="osgi:beanElements"/>
+        <xsd:attribute name="class" type="osgi:Tclass"/>
+        <xsd:attribute name="init-method" type="osgi:Tmethod"/>
+        <xsd:attribute name="destroy-method" type="osgi:Tmethod"/>
+        <xsd:attribute name="factory-method" type="osgi:Tmethod"/>
+        <xsd:attribute name="factory-component" type="osgi:Tidref"/>
         <xsd:anyAttribute namespace="##other" processContents="lax"/>
     </xsd:complexType>
 
+
     <!-- cm-properties -->
 
     <xsd:element name="cm-properties" type="TcmProperties"/>

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=767576&r1=767575&r2=767576&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 Wed Apr 22 15:57:35 2009
@@ -1,4 +1,23 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+    /*
+    * $Revision: 6813 $
+    *
+    * Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
+    *
+    * Licensed under the Apache License, Version 2.0 (the "License");
+    * you may not use this file except in compliance with the License.
+    * You may obtain a copy of the License at
+    *
+    *      http://www.apache.org/licenses/LICENSE-2.0
+    *
+    * Unless required by applicable law or agreed to in writing, software
+    * distributed under the License is distributed on an "AS IS" BASIS,
+    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    * See the License for the specific language governing permissions and
+    * limitations under the License.
+    */
+    -->
 <xsd:schema xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
             xmlns:xsd="http://www.w3.org/2001/XMLSchema"
             targetNamespace="http://www.osgi.org/xmlns/blueprint/v1.0.0"
@@ -6,317 +25,155 @@
             attributeFormDefault="unqualified"
             version="1.0.0">
 
-    <!--
-
-    TODO: service/interfaces can have child elements other than "value"
-    TODO: service can not have a nested component element
-    TODO: ref and idref elements have the same schema definition, are both actually needed ?
-    TODO: what is reference/@component-name about ?
-
-     5.3.1: the component/@name attribute has been removed from the schema
-     5.3.3.1: idref/@local and ref/@local do not exist in the schema
-     the Converter describe in the spec in "Type Conversion" paragraph is inconsistent with the javadoc in the spec
-     the Module-Context-Type-Converter manifest header should not contain the from, as it's not part of the Converter interface anymore
-
-    TODO: section 5.3.3.1 shows an example with component/@name which attribute does not exist
-
-    -->
-
     <!-- Schema elements for core component declarations -->
 
-    <xsd:complexType name="TidentifiedType" abstract="true">
+    <xsd:complexType name="Tcomponent" abstract="true">
         <xsd:attribute name="id" type="xsd:ID"/>
     </xsd:complexType>
 
-    <xsd:element name="components">
-        <xsd:complexType>
-            <xsd:sequence>
-                <xsd:element ref="description" minOccurs="0"/>
-                <xsd:element ref="type-converters" minOccurs="0" maxOccurs="1"/>
-                <xsd:choice minOccurs="0" maxOccurs="unbounded">
-                    <xsd:element ref="component"/>
-                    <xsd:element ref="ref-list"/>
-                    <xsd:element ref="ref-set"/>
-                    <xsd:element ref="reference"/>
-                    <xsd:element ref="service"/>
-                    <xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded"/>
-                </xsd:choice>
-            </xsd:sequence>
-            <xsd:attribute name="default-lazy-init" default="false" type="xsd:boolean"/>
-            <xsd:attribute name="default-init-method" type="xsd:string"/>
-            <xsd:attribute name="default-destroy-method" type="xsd:string"/>
-            <xsd:attributeGroup ref="defaults"/>
-            <xsd:anyAttribute namespace="##other" processContents="lax"/>
-        </xsd:complexType>
-    </xsd:element>
-
-    <xsd:element name="description">
-        <xsd:complexType mixed="true">
-            <xsd:choice minOccurs="0" maxOccurs="unbounded"/>
-        </xsd:complexType>
-    </xsd:element>
-
-    <xsd:element name="type-converters">
-        <xsd:complexType mixed="true">
-            <xsd:choice minOccurs="0" maxOccurs="unbounded">
-                <xsd:element ref="component"/>
-                <xsd:element ref="ref"/>
-            </xsd:choice>
-        </xsd:complexType>
-    </xsd:element>
+    <xsd:element name="blueprint" type="Tblueprint"/>
 
-    <xsd:group name="componentElements">
+    <xsd:complexType name="Tblueprint">
         <xsd:sequence>
-            <xsd:element ref="description" minOccurs="0"/>
+            <xsd:element name="description" type="Tdescription" minOccurs="0"/>
+            <xsd:element name="type-converters" type="Ttype-converters" minOccurs="0" maxOccurs="1"/>
+            <!-- top-level components -->
             <xsd:choice minOccurs="0" maxOccurs="unbounded">
-                <xsd:element ref="constructor-arg"/>
-                <xsd:element ref="property"/>
-                <xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded"/>
+                <xsd:group ref="allComponents"/>
             </xsd:choice>
         </xsd:sequence>
-    </xsd:group>
 
-    <xsd:attributeGroup name="componentAttributes">
-        <xsd:attribute name="class" type="xsd:string"/>
-        <xsd:attribute name="scope" type="xsd:string"/>
-        <xsd:attribute name="lazy-init" default="default" type="Tdefaultable-boolean"/>
-        <xsd:attribute name="depends-on" type="xsd:string"/>
-        <xsd:attribute name="init-method" type="xsd:string"/>
-        <xsd:attribute name="destroy-method" type="xsd:string"/>
-        <xsd:attribute name="factory-method" type="xsd:string"/>
-        <xsd:attribute name="factory-component" type="xsd:string"/>
+        <!-- Defaults-->
+        <xsd:attribute name="default-lazy-init" default="false"
+            type="Tlazy-init"/>
+        <xsd:attribute name="default-init-method" type="Tmethod"/>
+        <xsd:attribute name="default-destroy-method" type="Tmethod"/>
+        <xsd:attribute name="default-timeout" type="xsd:unsignedLong"
+            default="300000"/>
+        <xsd:attribute name="default-availability" type="Tavailability"
+            default="mandatory"/>
         <xsd:anyAttribute namespace="##other" processContents="lax"/>
-    </xsd:attributeGroup>
+    </xsd:complexType>
 
-    <xsd:element name="component">
-        <xsd:complexType>
-            <xsd:complexContent>
-                <xsd:extension base="TidentifiedType">
-                    <xsd:group ref="componentElements"/>
-                    <xsd:attributeGroup ref="componentAttributes"/>
-                </xsd:extension>
-            </xsd:complexContent>
-        </xsd:complexType>
-    </xsd:element>
+    <!--<xsd:element name="description" type="Tdescription"/>-->
 
-    <xsd:group name="valueElement">
-        <xsd:sequence>
-            <xsd:choice minOccurs="0" maxOccurs="unbounded">
-                <xsd:element ref="component"/>
-                <xsd:element ref="ref"/>
-                <xsd:element ref="idref"/>
-                <xsd:element ref="value"/>
-                <xsd:element ref="null"/>
-                <xsd:element ref="list"/>
-                <xsd:element ref="set"/>
-                <xsd:element ref="map"/>
-                <xsd:element ref="array"/>
-                <xsd:element ref="props"/>
-                <xsd:element ref="ref-list"/>
-                <xsd:element ref="ref-set"/>
-                <xsd:element ref="reference"/>
-                <xsd:element ref="service"/>
-                <xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded"/>
-            </xsd:choice>
-        </xsd:sequence>
-    </xsd:group>
+    <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"/>
+        </xsd:choice>
+    </xsd:complexType>
 
-    <xsd:group name="keyElement">
+	<!-- Components that provide a reasonable target for injection
+	used for listeners, etc. -->
+
+	<xsd:group name="targetComponent">
+		<xsd:choice>
+			<xsd:element name="bean" type="Tbean"/>
+			<xsd:element name="reference" type="Treference"/>
+            <xsd:element name="ref" type="Tref"/>
+			<xsd:any namespace="##other" processContents="strict" minOccurs="0"
+				maxOccurs="unbounded"/>
+		</xsd:choice>
+	</xsd:group>
+
+	<xsd:group name="allComponents">
+		<xsd:choice>
+			<xsd:element name="service" type="Tservice"/>
+			<xsd:element name="ref-list" type="Tref-collection"/>
+			<xsd:element name="ref-set" type="Tref-collection"/>
+			<xsd:group ref="targetComponent"/>
+		</xsd:choice>
+	</xsd:group>
+
+    <xsd:group name="beanElements">
         <xsd:sequence>
+            <xsd:element name="description" type="Tdescription" minOccurs="0"/>
             <xsd:choice minOccurs="0" maxOccurs="unbounded">
-                <xsd:element ref="component"/>
-                <xsd:element ref="ref"/>
-                <xsd:element ref="idref"/>
-                <xsd:element ref="value"/>
-                <xsd:element ref="list"/>
-                <xsd:element ref="set"/>
-                <xsd:element ref="map"/>
-                <xsd:element ref="array"/>
-                <xsd:element ref="props"/>
-                <xsd:element ref="ref-list"/>
-                <xsd:element ref="ref-set"/>
-                <xsd:element ref="reference"/>
-                <xsd:element ref="service"/>
-                <xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded"/>
+                <xsd:element name="argument" type="Targument"/>
+                <xsd:element name="property" type="Tproperty"/>
+                <xsd:any namespace="##other" processContents="strict" minOccurs="0"
+                         maxOccurs="unbounded"/>
             </xsd:choice>
         </xsd:sequence>
     </xsd:group>
 
-    <xsd:element name="constructor-arg">
-        <xsd:complexType>
-            <xsd:sequence>
-                <xsd:element ref="description" minOccurs="0"/>
-                <xsd:group ref="valueElement"/>
-            </xsd:sequence>
-            <xsd:attribute name="index" type="xsd:string"/>
-            <xsd:attribute name="type" type="xsd:string"/>
-            <xsd:attribute name="ref" type="xsd:string"/>
-            <xsd:attribute name="value" type="xsd:string"/>
-        </xsd:complexType>
-    </xsd:element>
-
-    <xsd:element name="property" type="TpropertyType"/>
-
-    <xsd:element name="ref">
-        <xsd:complexType>
-            <xsd:complexContent>
-                <xsd:restriction base="xsd:anyType">
-                    <xsd:attribute name="component" type="xsd:string" use="required"/>
-                </xsd:restriction>
-            </xsd:complexContent>
-        </xsd:complexType>
-    </xsd:element>
-
-    <xsd:element name="idref">
-        <xsd:complexType>
-            <xsd:complexContent>
-                <xsd:restriction base="xsd:anyType">
-                    <xsd:attribute name="component" type="xsd:string" use="required"/>
-                </xsd:restriction>
-            </xsd:complexContent>
-        </xsd:complexType>
-    </xsd:element>
-
-
-    <xsd:element name="value">
-        <xsd:complexType mixed="true">
-            <xsd:choice minOccurs="0" maxOccurs="unbounded"/>
-            <xsd:attribute name="type" type="xsd:string"/>
-        </xsd:complexType>
-    </xsd:element>
-
-    <xsd:element name="null">
-        <xsd:complexType mixed="true">
-            <xsd:choice minOccurs="0" maxOccurs="unbounded"/>
-        </xsd:complexType>
-    </xsd:element>
-
-    <xsd:element name="list" type="TlistSetArrayType"/>
-    <xsd:element name="set" type="TlistSetArrayType"/>
-    <xsd:element name="map" type="TmapType"/>
-    <xsd:element name="array" type="TlistSetArrayType"/>
-    <xsd:element name="entry" type="TentryType"/>
-    <xsd:element name="props" type="TpropsType"/>
-
-    <xsd:element name="key">
-        <xsd:complexType>
-            <xsd:group ref="keyElement"/>
-        </xsd:complexType>
-    </xsd:element>
-
-    <xsd:element name="prop">
-        <xsd:complexType mixed="true">
-            <xsd:attribute name="key" type="xsd:string" use="required"/>
-            <xsd:attribute name="value" type="xsd:string" use="optional"/>
-        </xsd:complexType>
-    </xsd:element>
-
-    <xsd:complexType name="TpropertyType">
-        <xsd:sequence>
-            <xsd:element ref="description" minOccurs="0"/>
-            <xsd:group ref="valueElement"/>
-        </xsd:sequence>
-        <xsd:attribute name="name" type="xsd:string" use="required"/>
-        <xsd:attribute name="ref" type="xsd:string"/>
-        <xsd:attribute name="value" type="xsd:string"/>
-    </xsd:complexType>
-
-    <!-- Collection Types -->
-
-    <!-- base collection type -->
-    <xsd:complexType name="TbaseCollectionType"/>
-
-    <!-- base type for collections that have (possibly) typed nested values -->
-    <xsd:complexType name="TtypedCollectionType">
+    <xsd:complexType name="Tbean">
         <xsd:complexContent>
-            <xsd:extension base="TbaseCollectionType">
-                <xsd:attribute name="value-type" type="xsd:string"/>
-            </xsd:extension>
-        </xsd:complexContent>
-    </xsd:complexType>
-
+            <xsd:extension base="Tcomponent">
+                <xsd:group ref="beanElements"/>
+				<xsd:attribute name="class" type="Tclass"/>
+				<xsd:attribute name="depends-on" type="xsd:normalizedString"/>
+				<xsd:attribute name="init-method" type="Tmethod"/>
+				<xsd:attribute name="destroy-method" type="Tmethod"/>
+				<xsd:attribute name="factory-method" type="Tmethod"/>
+				<xsd:attribute name="factory-component" type="Tidref"/>
+
+				<xsd:attribute name="scope">
+					<xsd:simpleType>
+						<xsd:restriction base="xsd:NMTOKEN">
+							<xsd:enumeration value="singleton"/>
+							<xsd:enumeration value="prototype"/>
+							<xsd:enumeration value="bundle"/>
+						</xsd:restriction>
+					</xsd:simpleType>
+				</xsd:attribute>
 
-    <!-- 'map' element type -->
-    <xsd:complexType name="TmapType">
-        <xsd:complexContent>
-            <xsd:extension base="TtypedCollectionType">
-                <xsd:sequence>
-                    <xsd:choice minOccurs="0" maxOccurs="unbounded">
-                        <xsd:element ref="entry"/>
-                    </xsd:choice>
-                </xsd:sequence>
-                <xsd:attribute name="key-type" type="xsd:string"/>
+				<xsd:attribute name="lazy-init" type="Tlazy-init" default="default"/>
+                <xsd:anyAttribute namespace="##other" processContents="lax"/>
             </xsd:extension>
         </xsd:complexContent>
     </xsd:complexType>
 
-    <!-- 'entry' element type -->
-    <xsd:complexType name="TentryType">
+    <xsd:complexType name="Targument">
         <xsd:sequence>
-            <xsd:element ref="key" minOccurs="0"/>
-            <xsd:group ref="valueElement"/>
+            <xsd:element name="description" type="Tdescription" minOccurs="0"/>
+            <xsd:group ref="value"/>
         </xsd:sequence>
-        <xsd:attribute name="key" type="xsd:string"/>
-        <xsd:attribute name="key-ref" type="xsd:string"/>
-        <xsd:attribute name="value" type="xsd:string"/>
-        <xsd:attribute name="value-ref" type="xsd:string"/>
+        <xsd:attribute name="index" type="xsd:nonNegativeInteger"/>
+        <xsd:attribute name="type" type="Tclass"/>
+        <xsd:attribute name="ref" type="Tidref"/>
+        <xsd:attribute name="value" type="TstringValue"/>
     </xsd:complexType>
 
-    <!-- 'list' and 'set' collection type -->
-    <xsd:complexType name="TlistSetArrayType">
-        <xsd:complexContent>
-            <xsd:extension base="TtypedCollectionType">
-                <xsd:group ref="valueElement" minOccurs="0" maxOccurs="unbounded"/>
-            </xsd:extension>
-        </xsd:complexContent>
+    <xsd:complexType name="Tproperty">
+        <xsd:sequence>
+            <xsd:element name="description" type="Tdescription" minOccurs="0"/>
+            <xsd:group ref="value"/>
+        </xsd:sequence>
+        <xsd:attribute name="name" type="Tmethod" use="required"/>
+        <xsd:attribute name="ref" type="Tidref"/>
+        <xsd:attribute name="value" type="TstringValue"/>
     </xsd:complexType>
 
-    <!-- 'props' collection type -->
-    <xsd:complexType name="TpropsType">
+    <!--<xsd:element name="ref" type="Tref"/>-->
+
+    <xsd:complexType name="Tref">
         <xsd:complexContent>
-            <xsd:extension base="TbaseCollectionType">
-                <xsd:sequence>
-                    <xsd:choice minOccurs="0" maxOccurs="unbounded">
-                        <xsd:element ref="prop"/>
-                    </xsd:choice>
-                </xsd:sequence>
-            </xsd:extension>
+            <xsd:restriction base="xsd:anyType">
+                <xsd:attribute name="component" type="Tidref" use="required"/>
+            </xsd:restriction>
         </xsd:complexContent>
     </xsd:complexType>
 
-    <!-- simple internal types -->
-    <xsd:simpleType name="Tdefaultable-boolean">
-        <xsd:restriction base="xsd:NMTOKEN">
-            <xsd:enumeration value="default"/>
-            <xsd:enumeration value="true"/>
-            <xsd:enumeration value="false"/>
-        </xsd:restriction>
-    </xsd:simpleType>
-
-    <!-- Elements from Spring Dynamic Modules project -->
-
-    <xsd:attributeGroup name="defaults">
-        <xsd:attribute name="default-timeout" type="xsd:long" default="30000"/>
-        <xsd:attribute name="default-availability" type="Tavailability" default="mandatory" />
-    </xsd:attributeGroup>
-
-    <xsd:simpleType name="TdefaultCardinalityOptions">
-        <xsd:restriction base="xsd:string">
-            <xsd:enumeration value="1..X"/>
-            <xsd:enumeration value="0..X"/>
-        </xsd:restriction>
-
-    </xsd:simpleType>
-
-    <!-- reference -->
-    <xsd:element name="reference" type="TsingleReference"/>
+    <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="TidentifiedType">
+            <xsd:extension base="Tcomponent">
                 <xsd:sequence minOccurs="0" maxOccurs="unbounded">
-                    <xsd:element name="interfaces" type="TlistSetArrayType" minOccurs="0" maxOccurs="1"/>
+                    <xsd:element name="interfaces" type="Tinterfaces" minOccurs="0" maxOccurs="1"/>
                     <xsd:element name="listener" type="Tlistener" minOccurs="0" maxOccurs="unbounded"/>
                 </xsd:sequence>
                 <xsd:attribute name="interface" use="optional" type="xsd:token"/>
@@ -327,32 +184,84 @@
         </xsd:complexContent>
     </xsd:complexType>
 
-
-    <xsd:complexType name="Tlistener">
-        <xsd:choice>
-            <xsd:element ref="ref"/>
-            <xsd:element ref="component"/>
-            <xsd:element ref="reference"/>
-            <xsd:element ref="service"/>
-            <xsd:sequence minOccurs="0" maxOccurs="1">
-                <!-- nested component declaration -->
-                <xsd:any namespace="##other" minOccurs="1" maxOccurs="1" processContents="skip"/>
-            </xsd:sequence>
-        </xsd:choice>
-        <!-- shortcut for bean references -->
-        <xsd:attribute name="ref" type="xsd:string" use="optional"/>
-        <xsd:attribute name="bind-method" type="xsd:token" use="required"/>
-        <xsd:attribute name="unbind-method" type="xsd:token" use="required"/>
+	<!-- reference -->
+	<xsd:complexType name="Treference">
+		<xsd:complexContent>
+			<xsd:extension base="TserviceReference">
+				<xsd:attribute name="timeout" use="optional" type="xsd:unsignedLong"/>
+			</xsd:extension>
+		</xsd:complexContent>
+	</xsd:complexType>
+
+	<!-- ref-set, ref-list -->
+	<xsd:complexType name="Tref-collection">
+		<xsd:complexContent>
+			<xsd:extension base="TserviceReference">
+                 <xsd:element name="comparator" type="Tcomparator" minOccurs="0" maxOccurrs="1"/>
+
+				<xsd:attribute name="comparator-ref" type="xsd:token"
+					use="optional"/>
+
+				<xsd:attribute name="member-type" use="optional">
+					<xsd:simpleType>
+						<xsd:restriction base="xsd:NMTOKEN">
+							<xsd:enumeration value="service-instance"/>
+							<xsd:enumeration value="service-reference"/>
+						</xsd:restriction>
+					</xsd:simpleType>
+				</xsd:attribute>
+
+				<xsd:attribute name="ordering-basis" use="optional">
+					<xsd:simpleType>
+						<xsd:restriction base="xsd:NMTOKEN">
+							<xsd:enumeration value="service"/>
+							<xsd:enumeration value="service-reference"/>
+						</xsd:restriction>
+					</xsd:simpleType>
+				</xsd:attribute>
+
+			</xsd:extension>
+		</xsd:complexContent>
+	</xsd:complexType>
+
+	<!-- Reference base class -->
+	<xsd:complexType name="TserviceReference">
+		<xsd:complexContent>
+			<xsd:extension base="Tcomponent">
+   				<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"/>
+
+				<xsd:attribute name="interface" use="optional" type="Tclass"/>
+				<xsd:attribute name="filter" use="optional" type="xsd:normalizedString"/>
+				<xsd:attribute name="component-name" type="Tidref"
+					use="optional"/>
+				<xsd:attribute name="availability" type="Tavailability"
+					use="optional" default="mandatory"/>
+			</xsd:extension>
+		</xsd:complexContent>
+	</xsd:complexType>
+
+    <xsd:complexType name="TreferenceListener">
+        <xsd:group ref="targetComponent"/>
+        <xsd:attribute name="ref" type="xsd:token"
+            use="optional"/>
+        <xsd:attribute name="bind-method" type="Tmethod"
+            use="required"/>
+        <xsd:attribute name="unbind-method" type="Tmethod"
+            use="required"/>
     </xsd:complexType>
 
-    <!-- single reference -->
-    <xsd:complexType name="TsingleReference">
-        <xsd:complexContent>
-            <xsd:extension base="Treference">
-                <xsd:attribute name="timeout" use="optional" type="xsd:long"/>
-            </xsd:extension>
-        </xsd:complexContent>
-    </xsd:complexType>
+    <xsd:simpleType name="Tlazy-init">
+        <xsd:restriction base="xsd:NMTOKEN">
+            <xsd:enumeration value="false"/>
+            <xsd:enumeration value="true"/>
+            <xsd:enumeration value="default"/>
+        </xsd:restriction>
+    </xsd:simpleType>
 
     <xsd:simpleType name="Tavailability">
         <xsd:restriction base="xsd:token">
@@ -361,108 +270,174 @@
         </xsd:restriction>
     </xsd:simpleType>
 
-    <!-- reference collections (set, list) -->
-    <xsd:element name="ref-list" type="TreferenceCollection"/>
-
-    <xsd:element name="ref-set" type="TreferenceCollection"/>
-
-
-    <xsd:complexType name="TreferenceCollection">
-        <xsd:complexContent>
-            <xsd:extension base="Treference">
-                <xsd:sequence minOccurs="0" maxOccurs="1">
-                    <xsd:element name="comparator" type="Tcomparator"/>
-                </xsd:sequence>
-                <xsd:attribute name="comparator-ref" type="xsd:string" use="optional"/>
-                <xsd:attribute name="member-type" type="TmemberType" use="optional"/>
-                <xsd:attribute name="ordering-basis" type="TorderingBasis" use="optional"/>
-            </xsd:extension>
-        </xsd:complexContent>
-    </xsd:complexType>
-
-    <xsd:simpleType name="TmemberType">
-        <xsd:restriction base="xsd:token">
-            <xsd:enumeration value="service-instance"/>
-            <xsd:enumeration value="service-reference"/>
-        </xsd:restriction>
-    </xsd:simpleType>
-
     <xsd:complexType name="Tcomparator">
-        <xsd:choice>
-            <xsd:element ref="ref"/>
-            <xsd:element ref="component"/>
-            <xsd:element ref="reference"/>
-            <xsd:element ref="service"/>
-            <xsd:sequence minOccurs="1" maxOccurs="1">
-                <!-- nested component declaration -->
-                <xsd:any namespace="##other" minOccurs="1" maxOccurs="1" processContents="skip"/>
-            </xsd:sequence>
-        </xsd:choice>
+        <xsd:group ref="targetComponent"/>
     </xsd:complexType>
 
-    <xsd:simpleType name="TorderingBasis">
-        <xsd:restriction base="xsd:token">
-            <xsd:enumeration value="service"/>
-            <xsd:enumeration value="service-reference"/>
-        </xsd:restriction>
-    </xsd:simpleType>
-
-
     <!-- service -->
-    <xsd:element name="service" type="Tservice"/>
-
 
     <xsd:complexType name="Tservice">
         <xsd:complexContent>
-            <xsd:extension base="TidentifiedType">
-                <xsd:choice>
-                    <xsd:group ref="serviceElements"/>
-                    <!-- nested component declaration -->
-                    <xsd:any namespace="##other" minOccurs="0" maxOccurs="1" processContents="skip"/>
-                </xsd:choice>
-                <xsd:attribute name="interface" type="xsd:token" use="optional"/>
-                <xsd:attribute name="ref" type="xsd:string" use="optional"/>
-                <xsd:attribute name="depends-on" type="xsd:string" use="optional"/>
+            <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: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"/>
                 <xsd:attribute name="auto-export" type="TautoExportModes" default="disabled"/>
                 <xsd:attribute name="ranking" type="xsd:int" default="0"/>
             </xsd:extension>
         </xsd:complexContent>
     </xsd:complexType>
-    
-    <xsd:group name="serviceElements">
-        <xsd:sequence>
-            <xsd:element name="interfaces" type="TlistSetArrayType" minOccurs="0"/>
-            <xsd:element name="service-properties" minOccurs="0" type="TmapType"/>
-            <xsd:element name="registration-listener" type="TserviceRegistrationListener" minOccurs="0" maxOccurs="unbounded"/>
-        </xsd:sequence>
-    </xsd:group>
 
-    <xsd:complexType name="TserviceRegistrationListener">
-        <xsd:choice>
-            <xsd:element ref="ref"/>
-            <xsd:element ref="component"/>
-            <xsd:element ref="reference"/>
-            <xsd:element ref="service"/>
-            <xsd:sequence minOccurs="0" maxOccurs="1">
-                <!-- nested bean declaration -->
-                <xsd:any namespace="##other" minOccurs="1" maxOccurs="1" processContents="skip"/>
-            </xsd:sequence>
+    <xsd:complexType name="TregistrationListener">
+        <xsd:group ref="targetComponent"/>
+        <xsd:attribute name="ref" type="Tidref"
+            use="optional"/>
+        <!--  ### why are there both required? -->
+        <xsd:attribute name="registration-method"
+            type="Tmethod" use="required"/>
+        <xsd:attribute name="unregistration-method"
+            type="Tmethod" use="required"/>
+    </xsd:complexType>
+
+	<!--
+	Values
+	-->
+
+	<xsd:group name="value">
+        <xsd:choice minOccurs="0" maxOccurs="1">
+			<xsd:group ref="nonNullValue"/>
+            <xsd:element name="null" type="Tnull"/>
+		</xsd:choice>
+	</xsd:group>
+
+    <xsd:complexType name="Tnull"/>
+
+	<xsd:group name="nonNullValue">
+        <xsd:choice minOccurs="0" maxOccurs="1">
+			<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"/>
+				<xsd:element name="set" type="Tcollection"/>
+				<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:group>
 
-        <!-- shortcut for bean references -->
-        <xsd:attribute name="ref" type="xsd:string" use="optional"/>
-        <xsd:attribute name="registration-method" type="xsd:token" use="required"/>
-        <xsd:attribute name="unregistration-method" type="xsd:token" use="required"/>
+	<xsd:complexType name="Tref">
+		<xsd:complexContent>
+			<!--- ### what is this restriction doing ??? -->
+			<xsd:restriction base="xsd:anyType">
+				<xsd:attribute name="component" type="Tidref" use="required"/>
+			</xsd:restriction>
+		</xsd:complexContent>
+	</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>
+
+	<!-- Collection Values -->
+
+	<xsd:complexType name="Tcollection">
+		<xsd:complexContent>
+			<xsd:extension base="TtypedCollection">
+				<xsd:group ref="value" minOccurs="0" maxOccurs="unbounded"/>
+			</xsd:extension>
+		</xsd:complexContent>
+	</xsd:complexType>
+
+	<xsd:complexType name="Tprops">
+   		<xsd:element name="prop" type="Tprop" maxOccurs="unbounded"/>
+	</xsd:complexType>
+
+    <xsd:complexType name="Tprop" mixed="true">
+        <xsd:attribute name="key" type="TstringValue"
+            use="required"/>
+        <xsd:attribute name="value" type="TstringValue"
+            use="optional"/>
     </xsd:complexType>
 
-    <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>
+    <!-- 'map' element type -->
+    <xsd:complexType name="Tmap">
+        <xsd:complexContent>
+            <xsd:extension base="TtypedCollection">
+                <xsd:element name="entry" type="Tentry" minOccurs="0" maxOccurs="unbounded"/>
+                <xsd:attribute name="key-type" type="xsd:string"/>
+            </xsd:extension>
+        </xsd:complexContent>
+    </xsd:complexType>
 
+    <!-- 'entry' element type -->
+    <xsd:complexType name="Tentry">
+        <xsd:sequence>
+            <xsd:element name="key" type="Tkey" minOccurs="0"/>
+            <xsd:group ref="value"/>
+        </xsd:sequence>
+        <xsd:attribute name="key" type="TstringValue"/>
+        <xsd:attribute name="key-ref" type="Tidref"/>
+        <xsd:attribute name="value" type="TstringValue"/>
+        <xsd:attribute name="value-ref" type="Tidref"/>
+    </xsd:complexType>
+
+	<xsd:complexType name="TtypedCollection">
+		<xsd:complexContent>
+            <xsd:attribute name="value-type" type="Tclass"/>
+		</xsd:complexContent>
+	</xsd:complexType>
+
+	<!-- General types -->
+
+	<xsd:complexType name="Tdescription" mixed="true">
+		<xsd:choice minOccurs="0" maxOccurs="unbounded"/>
+	</xsd:complexType>
+
+	<xsd:complexType name="Tinterfaces">
+		<xsd:choice minOccurs="1" maxOccurs="unbounded">
+			<xsd:element name="value" type="Tclass"/>
+		</xsd:choice>
+	</xsd:complexType>
+
+	<!-- Should be used for all attributes and elements that refer to classes -->
+	<xsd:simpleType name="Tclass">
+		<xsd:restriction base="xsd:NCName"/>
+	</xsd:simpleType>
+
+	<!-- Should be used for all attributes and elements that refer to method names -->
+	<xsd:simpleType name="Tmethod">
+		<xsd:restriction base="xsd:NCName"/>
+	</xsd:simpleType>
+
+	<!-- Should be used for all attributes and elements that refer to method names -->
+	<xsd:simpleType name="Tidref">
+		<xsd:restriction base="xsd:NCName"/>
+	</xsd:simpleType>
+
+	<!-- Should be used for value= attributes that specify string values -->
+	<xsd:simpleType name="TstringValue">
+		<xsd:restriction base="xsd:normalizedString"/>
+	</xsd:simpleType>
 
-</xsd:schema>
\ No newline at end of file
+</xsd:schema>

Modified: geronimo/sandbox/blueprint/blueprint-core/src/test/java/org/apache/geronimo/blueprint/ParserTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/test/java/org/apache/geronimo/blueprint/ParserTest.java?rev=767576&r1=767575&r2=767576&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/test/java/org/apache/geronimo/blueprint/ParserTest.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/test/java/org/apache/geronimo/blueprint/ParserTest.java Wed Apr 22 15:57:35 2009
@@ -20,32 +20,25 @@
 
 import java.net.URI;
 import java.net.URL;
-import java.util.Collections;
 import java.util.List;
-import java.util.Set;
 
 import org.w3c.dom.Attr;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
-import junit.framework.TestCase;
-import org.apache.geronimo.blueprint.context.Parser;
-import org.apache.geronimo.blueprint.namespace.ComponentDefinitionRegistryImpl;
-import org.apache.geronimo.blueprint.reflect.LocalComponentMetadataImpl;
+import org.apache.geronimo.blueprint.reflect.BeanMetadataImpl;
 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.ArrayValue;
+import org.osgi.service.blueprint.reflect.BeanArgument;
+import org.osgi.service.blueprint.reflect.BeanMetadata;
+import org.osgi.service.blueprint.reflect.BeanProperty;
+import org.osgi.service.blueprint.reflect.CollectionMetadata;
 import org.osgi.service.blueprint.reflect.ComponentMetadata;
-import org.osgi.service.blueprint.reflect.ComponentValue;
-import org.osgi.service.blueprint.reflect.ConstructorInjectionMetadata;
-import org.osgi.service.blueprint.reflect.LocalComponentMetadata;
-import org.osgi.service.blueprint.reflect.NullValue;
-import org.osgi.service.blueprint.reflect.ParameterSpecification;
-import org.osgi.service.blueprint.reflect.PropertyInjectionMetadata;
-import org.osgi.service.blueprint.reflect.ReferenceValue;
-import org.osgi.service.blueprint.reflect.TypedStringValue;
-import org.osgi.service.blueprint.reflect.Value;
+import org.osgi.service.blueprint.reflect.Metadata;
+import org.osgi.service.blueprint.reflect.NullMetadata;
+import org.osgi.service.blueprint.reflect.RefMetadata;
+import org.osgi.service.blueprint.reflect.ValueMetadata;
 
 /**
  * TODO: constructor injection
@@ -58,69 +51,67 @@
         assertNotNull(registry);
         ComponentMetadata component = registry.getComponentDefinition("pojoA");
         assertNotNull(component);
-        assertEquals("pojoA", component.getName());
-        Set<String> deps = component.getExplicitDependencies();
+        assertEquals("pojoA", component.getId());
+        assertTrue(component instanceof BeanMetadata);
+        BeanMetadata local = (BeanMetadata) component;
+        List<String> deps = local.getExplicitDependencies();
         assertNotNull(deps);
         assertEquals(2, deps.size());
         assertTrue(deps.contains("pojoB"));
         assertTrue(deps.contains("pojoC"));
-        assertTrue(component instanceof LocalComponentMetadata);
-        LocalComponentMetadata local = (LocalComponentMetadata) component;
         assertEquals("org.apache.geronimo.blueprint.pojos.PojoA", local.getClassName());
-        ConstructorInjectionMetadata cns = local.getConstructorInjectionMetadata();
-        assertNotNull(cns);
-        List<ParameterSpecification> params = cns.getParameterSpecifications();
+        List<BeanArgument> params = local.getArguments();
         assertNotNull(params);
         assertEquals(6, params.size());
-        ParameterSpecification param = params.get(0);
+        BeanArgument param = params.get(0);
         assertNotNull(param);
         assertEquals(-1, param.getIndex());
-        assertNull(param.getTypeName());
+        assertNull(param.getValueType());
         assertNotNull(param.getValue());
-        assertTrue(param.getValue() instanceof TypedStringValue);
-        assertEquals("val0", ((TypedStringValue) param.getValue()).getStringValue());
-        assertNull(((TypedStringValue) param.getValue()).getTypeName());
+        assertTrue(param.getValue() instanceof ValueMetadata);
+        assertEquals("val0", ((ValueMetadata) param.getValue()).getStringValue());
+        assertNull(((ValueMetadata) param.getValue()).getTypeName());
         param = params.get(1);
         assertNotNull(param);
         assertEquals(-1, param.getIndex());
-        assertNull(param.getTypeName());
+        assertNull(param.getValueType());
         assertNotNull(param.getValue());
-        assertTrue(param.getValue() instanceof ReferenceValue);
-        assertEquals("val1", ((ReferenceValue) param.getValue()).getComponentName());
+        assertTrue(param.getValue() instanceof RefMetadata);
+        assertEquals("val1", ((RefMetadata) param.getValue()).getComponentId());
         param = params.get(2);
         assertNotNull(param);
         assertEquals(-1, param.getIndex());
-        assertNull(param.getTypeName());
+        assertNull(param.getValueType());
         assertNotNull(param.getValue());
-        assertTrue(param.getValue() instanceof NullValue);
+        assertTrue(param.getValue() instanceof NullMetadata);
         param = params.get(3);
         assertNotNull(param);
         assertEquals(-1, param.getIndex());
-        assertEquals("java.lang.String", param.getTypeName());
+        assertEquals("java.lang.String", param.getValueType());
         assertNotNull(param.getValue());
-        assertTrue(param.getValue() instanceof TypedStringValue);
-        assertEquals("val3", ((TypedStringValue) param.getValue()).getStringValue());
-        assertNull(((TypedStringValue) param.getValue()).getTypeName());
+        assertTrue(param.getValue() instanceof ValueMetadata);
+        assertEquals("val3", ((ValueMetadata) param.getValue()).getStringValue());
+        assertNull(((ValueMetadata) param.getValue()).getTypeName());
         param = params.get(4);
         assertNotNull(param);
         assertEquals(-1, param.getIndex());
-        assertNull(param.getTypeName());
+        assertNull(param.getValueType());
         assertNotNull(param.getValue());
-        assertTrue(param.getValue() instanceof ArrayValue);
-        ArrayValue array = (ArrayValue) param.getValue();
-        assertNull(array.getValueType());
-        assertNotNull(array.getArray());
-        assertEquals(3, array.getArray().length);
-        assertTrue(array.getArray()[0] instanceof TypedStringValue);
-        assertTrue(array.getArray()[1] instanceof ComponentValue);
-        assertTrue(array.getArray()[2] instanceof NullValue);
+        assertTrue(param.getValue() instanceof CollectionMetadata);
+        CollectionMetadata array = (CollectionMetadata) param.getValue();
+        assertNull(array.getValueTypeName());
+        assertNotNull(array.getValues());
+        assertEquals(3, array.getValues().size());
+        assertTrue(array.getValues().get(0) instanceof ValueMetadata);
+        assertTrue(array.getValues().get(1) instanceof ComponentMetadata);
+        assertTrue(array.getValues().get(2) instanceof NullMetadata);
         param = params.get(5);
         assertNotNull(param);
         assertEquals(-1, param.getIndex());
-        assertNull(param.getTypeName());
+        assertNull(param.getValueType());
         assertNotNull(param.getValue());
-        assertTrue(param.getValue() instanceof ReferenceValue);
-        assertEquals("pojoB", ((ReferenceValue) param.getValue()).getComponentName());
+        assertTrue(param.getValue() instanceof RefMetadata);
+        assertEquals("pojoB", ((RefMetadata) param.getValue()).getComponentId());
         
         assertEquals(null, local.getInitMethodName());
         assertEquals(null, local.getDestroyMethodName());
@@ -128,15 +119,13 @@
         // test pojoB
         ComponentMetadata pojoB = registry.getComponentDefinition("pojoB");
         assertNotNull(pojoB);
-        assertEquals("pojoB", pojoB.getName());
-        assertTrue(pojoB instanceof LocalComponentMetadata);
-        LocalComponentMetadata pojoBLocal = (LocalComponentMetadata) pojoB;
+        assertEquals("pojoB", pojoB.getId());
+        assertTrue(pojoB instanceof BeanMetadata);
+        BeanMetadata pojoBLocal = (BeanMetadata) pojoB;
         assertEquals("initPojo", pojoBLocal.getInitMethodName());
         assertEquals("", pojoBLocal.getDestroyMethodName());
         
-        cns = pojoBLocal.getConstructorInjectionMetadata();
-        assertNotNull(cns);
-        params = cns.getParameterSpecifications();
+        params = pojoBLocal.getArguments();
         assertNotNull(params);
         assertEquals(2, params.size());
         param = params.get(0);
@@ -166,22 +155,20 @@
         
         metadata = registry.getComponentDefinition("barService");
         assertNotNull(metadata);
-        assertTrue(metadata instanceof LocalComponentMetadata);
-        LocalComponentMetadata comp2 = (LocalComponentMetadata) metadata;
-        assertEquals(1, comp2.getPropertyInjectionMetadata().size());
-        PropertyInjectionMetadata propertyMetadata = (PropertyInjectionMetadata)comp2.getPropertyInjectionMetadata().iterator().next();
+        assertTrue(metadata instanceof BeanMetadata);
+        BeanMetadata comp2 = (BeanMetadata) metadata;
+        assertEquals(1, comp2.getProperties().size());
+        BeanProperty propertyMetadata = comp2.getProperties().get(0);
         assertEquals("localCache", propertyMetadata.getName());
-        Value propertyValue = propertyMetadata.getValue();
-        assertTrue(propertyValue instanceof ComponentValue);
-        ComponentValue componentValue = (ComponentValue) propertyValue;
-        assertTrue(componentValue.getComponentMetadata() instanceof LocalComponentMetadata);
-        LocalComponentMetadata innerComp = (LocalComponentMetadata) componentValue.getComponentMetadata();
+        Metadata propertyValue = propertyMetadata.getValue();
+        assertTrue(propertyValue instanceof BeanMetadata);
+        BeanMetadata innerComp = (BeanMetadata) propertyValue;
         assertEquals("org.apache.geronimo.CacheProperty", innerComp.getClassName()); 
         
         metadata = registry.getComponentDefinition("myCache");
         assertNotNull(metadata);
-        assertTrue(metadata instanceof LocalComponentMetadata);
-        LocalComponentMetadata comp3 = (LocalComponentMetadata) metadata;
+        assertTrue(metadata instanceof BeanMetadata);
+        BeanMetadata comp3 = (BeanMetadata) metadata;
         assertEquals("org.apache.geronimo.Cache", comp3.getClassName());         
     }
 
@@ -206,11 +193,11 @@
         public ComponentMetadata decorate(Node node,
                                           ComponentMetadata component,
                                           ParserContext context) {
-            //System.out.println("decorate: " + node + " " + component + " " + context.getEnclosingComponent().getName());
+            //System.out.println("decorate: " + node + " " + component + " " + context.getEnclosingComponent().getId());
             
             if (node instanceof Attr) {
                 Attr attr = (Attr) node;
-                MyLocalComponentMetadata decoratedComp = new MyLocalComponentMetadata((LocalComponentMetadata)component);                
+                MyLocalComponentMetadata decoratedComp = new MyLocalComponentMetadata((BeanMetadata)component);
                 decoratedComp.setCacheReturnValues(Boolean.parseBoolean(attr.getValue()));
                 return decoratedComp;
             } else if (node instanceof Element) {
@@ -228,7 +215,7 @@
         }
 
         public ComponentMetadata parse(Element element, ParserContext context) {
-            String comp = (context.getEnclosingComponent() == null) ? null : context.getEnclosingComponent().getName();
+            String comp = (context.getEnclosingComponent() == null) ? null : context.getEnclosingComponent().getId();
             //System.out.println("parse: " + element.getLocalName() + " " + comp);
             
             String className;
@@ -238,8 +225,8 @@
                 className = "org.apache.geronimo.CacheProperty";
             }
                         
-            LocalComponentMetadataImpl p = new LocalComponentMetadataImpl();
-            p.setName(element.getAttribute("id"));
+            BeanMetadataImpl p = new BeanMetadataImpl();
+            p.setId(element.getAttribute("id"));
             p.setClassName(className);
             
             return p;
@@ -247,12 +234,12 @@
         
     }
     
-    private static class MyLocalComponentMetadata extends LocalComponentMetadataImpl {
+    private static class MyLocalComponentMetadata extends BeanMetadataImpl {
         
         private boolean cacheReturnValues;
         private String operation;
         
-        public MyLocalComponentMetadata(LocalComponentMetadata impl) {
+        public MyLocalComponentMetadata(BeanMetadata impl) {
             super(impl);
         }
         

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=767576&r1=767575&r2=767576&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 Wed Apr 22 15:57:35 2009
@@ -17,22 +17,22 @@
  specific language governing permissions and limitations
  under the License.
 -->
-<components xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+<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/felix/blueprint/blueprint.xsd">
+    xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 ../../main/resources/org/apache/geronimo/blueprint/blueprint.xsd">
 
     <cache:lru-cache id="myCache" />
     
-    <component id="fooService" class="FooServiceImpl" cache:cache-return-values="true">
+    <bean id="fooService" class="FooServiceImpl" cache:cache-return-values="true">
         <cache:operation name="getVolatile" />
 
         <property name="myProp" value="12" />
-    </component>
+    </bean>
     
-    <component id="barService" class="BarServiceImpl">
+    <bean id="barService" class="BarServiceImpl">
         <property name="localCache">
             <cache:lru-cache />
         </property>
-    </component>
+    </bean>
 
-</components>
\ No newline at end of file
+</blueprint>
\ No newline at end of file

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=767576&r1=767575&r2=767576&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 Wed Apr 22 15:57:35 2009
@@ -1,40 +1,40 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<components xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+<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/felix/blueprint/blueprint.xsd"
+            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">
 
-    <component id="pojoA" class="org.apache.geronimo.blueprint.pojos.PojoA" depends-on=" pojoB , pojoC ,">
-        <constructor-arg value="val0"/>
-        <constructor-arg ref="val1" />
-        <constructor-arg>
+    <bean id="pojoA" class="org.apache.geronimo.blueprint.pojos.PojoA" depends-on=" pojoB , pojoC ,">
+        <argument value="val0"/>
+        <argument ref="val1" />
+        <argument>
             <description>null value</description>
             <null/>
-        </constructor-arg>
-        <constructor-arg type="java.lang.String">
+        </argument>
+        <argument type="java.lang.String">
             <value>val3</value>
-        </constructor-arg>
-        <constructor-arg>
+        </argument>
+        <argument>
             <array>
                 <value>val0</value>
-                <component class="java.lang.String"/>
+                <bean class="java.lang.String"/>
                 <null/>
             </array>
-        </constructor-arg>
-        <constructor-arg>
+        </argument>
+        <argument>
             <ref component="pojoB"/>
-        </constructor-arg>
+        </argument>
         <property name="prop1" ref="pojoB"/>
         <property name="prop2" value="value" />
         <property name="prop3">
             <description>property</description>
             <value>val</value>
         </property>
-    </component>
+    </bean>
     
-    <component id="pojoB" class="org.apache.geronimo.blueprint.pojos.PojoA" init-method="initPojo" destroy-method="" >
-        <constructor-arg index = "1" value="val0"/>
-        <constructor-arg index = "0" ref="val1" />
-    </component>
+    <bean id="pojoB" class="org.apache.geronimo.blueprint.pojos.PojoA" init-method="initPojo" destroy-method="" >
+        <argument index = "1" value="val0"/>
+        <argument index = "0" ref="val1" />
+    </bean>
     
-</components>
\ No newline at end of file
+</blueprint>
\ No newline at end of file

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=767576&r1=767575&r2=767576&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 Wed Apr 22 15:57:35 2009
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<components xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+<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"
@@ -19,15 +19,15 @@
         </service-properties>    
     </service>
 
-    <component id="pojoC" class="org.apache.geronimo.blueprint.pojos.PojoB" scope = "prototype">
+    <bean id="pojoC" class="org.apache.geronimo.blueprint.pojos.PojoB" scope = "prototype">
         <property name="uri" value="urn:myuri" />
-    </component>
+    </bean>
     
-    <component id="pojoB" class="org.apache.geronimo.blueprint.pojos.PojoB" init-method = "init">
+    <bean id="pojoB" class="org.apache.geronimo.blueprint.pojos.PojoB" init-method = "init">
         <property name="uri" value="urn:myuri" />
-    </component>
+    </bean>
 
-    <component id="pojoA" class="org.apache.geronimo.blueprint.pojos.PojoA">
+    <bean id="pojoA" class="org.apache.geronimo.blueprint.pojos.PojoA">
         <property name="pojob" ref="pojoB"/>
         <property name="map">
             <map>
@@ -75,6 +75,6 @@
         <property name="number">
             <value type="java.math.BigInteger">10</value>
         </property>
-    </component>
+    </bean>
 
-</components>
\ No newline at end of file
+</blueprint>
\ No newline at end of file

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=767576&r1=767575&r2=767576&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test.xml (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test.xml Wed Apr 22 15:57:35 2009
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<components xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+<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/felix/blueprint/blueprint.xsd"
+            xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 ../../main/resources/org/apache/geronimo/blueprint/blueprint.xsd"
             default-availability="mandatory">
 
     <description>
@@ -9,27 +9,27 @@
     </description>
 
     <type-converters>
-        <component class="org.apache.geronimo.blueprint.pojos.ConverterA"/>
+        <bean class="org.apache.geronimo.blueprint.pojos.ConverterA"/>
         <ref component="converterB"/>
     </type-converters>
 
-    <component id="pojoA" class="org.apache.geronimo.blueprint.pojos.PojoA">
+    <bean id="pojoA" class="org.apache.geronimo.blueprint.pojos.PojoA">
         <property name="pojob" ref="pojoB"/>
-    </component>
+    </bean>
 
-    <component id="pojoAcns" class="org.apache.geronimo.blueprint.pojos.PojoA">
-        <constructor-arg ref="pojoB"/>
-    </component>
+    <bean id="pojoAcns" class="org.apache.geronimo.blueprint.pojos.PojoA">
+        <argument ref="pojoB"/>
+    </bean>
 
-    <component id="pojoB" class="org.apache.geronimo.blueprint.pojos.PojoB">
+    <bean id="pojoB" class="org.apache.geronimo.blueprint.pojos.PojoB">
         <property name="uri" value="urn:myuri"/>
-    </component>
+    </bean>
 
-    <component id="pojoBcns" class="org.apache.geronimo.blueprint.pojos.PojoB">
-        <constructor-arg value="urn:myuri"/>
-    </component>
+    <bean id="pojoBcns" class="org.apache.geronimo.blueprint.pojos.PojoB">
+        <argument value="urn:myuri"/>
+    </bean>
 
-    <component id="converterB" class="org.apache.geronimo.blueprint.pojos.ConverterB"/>
+    <bean id="converterB" class="org.apache.geronimo.blueprint.pojos.ConverterB"/>
 
     <reference id="refA" filter="(key=prop)" interface="org.apache.geronimo.blueprint.pojos.InterfaceA"/>
 
@@ -42,8 +42,8 @@
 
     <service interface="org.apache.geronimo.blueprint.pojos.InterfaceA" ref="pojoA"/>
 
-    <component id="listenerA" class="org.apache.geronimo.blueprint.pojos.ListenerA"/>
+    <bean id="listenerA" class="org.apache.geronimo.blueprint.pojos.ListenerA"/>
 
     <ref-list availability="optional" member-type="service-instance"/>
 
-</components>
\ No newline at end of file
+</blueprint>
\ No newline at end of file

Copied: geronimo/sandbox/blueprint/blueprint-itests/src/test/java/org/apache/geronimo/blueprint/itests/TestBlueprintContext.java (from r767394, geronimo/sandbox/blueprint/blueprint-itests/src/test/java/org/apache/geronimo/blueprint/itests/TestModuleContext.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-itests/src/test/java/org/apache/geronimo/blueprint/itests/TestBlueprintContext.java?p2=geronimo/sandbox/blueprint/blueprint-itests/src/test/java/org/apache/geronimo/blueprint/itests/TestBlueprintContext.java&p1=geronimo/sandbox/blueprint/blueprint-itests/src/test/java/org/apache/geronimo/blueprint/itests/TestModuleContext.java&r1=767394&r2=767576&rev=767576&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-itests/src/test/java/org/apache/geronimo/blueprint/itests/TestModuleContext.java (original)
+++ geronimo/sandbox/blueprint/blueprint-itests/src/test/java/org/apache/geronimo/blueprint/itests/TestBlueprintContext.java Wed Apr 22 15:57:35 2009
@@ -32,12 +32,12 @@
 import org.osgi.framework.Bundle;
 import org.osgi.framework.ServiceRegistration;
 import org.osgi.framework.Constants;
-import org.osgi.service.blueprint.context.ModuleContext;
+import org.osgi.service.blueprint.context.BlueprintContext;
 import org.osgi.service.blueprint.context.ServiceUnavailableException;
 import org.springframework.core.io.Resource;
 import org.springframework.util.Assert;
 
-public class TestModuleContext extends AbstractIntegrationTest {
+public class TestBlueprintContext extends AbstractIntegrationTest {
 
     public void test() throws Exception {
         Resource res = locateBundle(getBundle("org.apache.geronimo", "blueprint-sample"));
@@ -45,10 +45,10 @@
         assertNotNull(bundle);
         bundle.start();
 
-        ModuleContext moduleContext = getOsgiService(ModuleContext.class, 5000);
-        assertNotNull(moduleContext);
+        BlueprintContext blueprintContext = getOsgiService(BlueprintContext.class, 5000);
+        assertNotNull(blueprintContext);
 
-        Object obj = moduleContext.getComponent("bar");
+        Object obj = blueprintContext.getComponent("bar");
         assertNotNull(obj);
         assertEquals(Bar.class, obj.getClass());
         Bar bar = (Bar) obj;
@@ -58,7 +58,7 @@
         assertEquals(2, bar.getList().size());
         assertEquals("a list element", bar.getList().get(0));
         assertEquals(Integer.valueOf(5), bar.getList().get(1));
-        obj = moduleContext.getComponent("foo");
+        obj = blueprintContext.getComponent("foo");
         assertNotNull(obj);
         assertEquals(Foo.class, obj.getClass());
         Foo foo = (Foo) obj;
@@ -74,7 +74,7 @@
 
         bundle.stop();
         try {
-            moduleContext = getOsgiService(ModuleContext.class, 1);
+            blueprintContext = getOsgiService(BlueprintContext.class, 1);
             fail("ModuleContext should have been unregistered");
         } catch (Exception e) {
             // Expected, as the module context should have been unregistered

Modified: geronimo/sandbox/blueprint/blueprint-itests/src/test/java/org/apache/geronimo/blueprint/itests/TestReferences.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-itests/src/test/java/org/apache/geronimo/blueprint/itests/TestReferences.java?rev=767576&r1=767575&r2=767576&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-itests/src/test/java/org/apache/geronimo/blueprint/itests/TestReferences.java (original)
+++ geronimo/sandbox/blueprint/blueprint-itests/src/test/java/org/apache/geronimo/blueprint/itests/TestReferences.java Wed Apr 22 15:57:35 2009
@@ -19,19 +19,16 @@
 package org.apache.geronimo.blueprint.itests;
 
 import java.net.URLDecoder;
-import java.util.Properties;
 import java.util.Hashtable;
 import java.util.List;
 
-import org.apache.servicemix.kernel.testing.support.AbstractIntegrationTest;
-import org.apache.geronimo.blueprint.sample.Foo;
-import org.apache.geronimo.blueprint.sample.Bar;
-import org.apache.geronimo.blueprint.sample.InterfaceA;
 import org.apache.geronimo.blueprint.sample.BindingListener;
+import org.apache.geronimo.blueprint.sample.InterfaceA;
+import org.apache.servicemix.kernel.testing.support.AbstractIntegrationTest;
 import org.osgi.framework.Bundle;
-import org.osgi.framework.ServiceRegistration;
 import org.osgi.framework.Constants;
-import org.osgi.service.blueprint.context.ModuleContext;
+import org.osgi.framework.ServiceRegistration;
+import org.osgi.service.blueprint.context.BlueprintContext;
 import org.osgi.service.blueprint.context.ServiceUnavailableException;
 import org.springframework.core.io.Resource;
 import org.springframework.util.Assert;
@@ -39,14 +36,14 @@
 public class TestReferences extends AbstractIntegrationTest {
 
     public void testUnaryReference() throws Exception {
-        ModuleContext moduleContext = getOsgiService(ModuleContext.class, 5000);
-        assertNotNull(moduleContext);
+        BlueprintContext blueprintContext = getOsgiService(BlueprintContext.class, 5000);
+        assertNotNull(blueprintContext);
 
-        BindingListener listener = (BindingListener) moduleContext.getComponent("bindingListener");
+        BindingListener listener = (BindingListener) blueprintContext.getComponent("bindingListener");
         assertNull(listener.getA());
         assertNull(listener.getReference());
 
-        InterfaceA a = (InterfaceA) moduleContext.getComponent("ref2");
+        InterfaceA a = (InterfaceA) blueprintContext.getComponent("ref2");
         try {
             a.hello("world");
             fail("A ServiceUnavailableException should have been thrown");
@@ -91,14 +88,14 @@
     }
 
     public void testListReferences() throws Exception {
-        ModuleContext moduleContext = getOsgiService(ModuleContext.class, 5000);
-        assertNotNull(moduleContext);
+        BlueprintContext blueprintContext = getOsgiService(BlueprintContext.class, 5000);
+        assertNotNull(blueprintContext);
 
-        BindingListener listener = (BindingListener) moduleContext.getComponent("listBindingListener");
+        BindingListener listener = (BindingListener) blueprintContext.getComponent("listBindingListener");
         assertNull(listener.getA());
         assertNull(listener.getReference());
 
-        List refs = (List) moduleContext.getComponent("ref-list");
+        List refs = (List) blueprintContext.getComponent("ref-list");
         assertNotNull(refs);
         assertTrue(refs.isEmpty());
 

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=767576&r1=767575&r2=767576&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 Wed Apr 22 15:57:35 2009
@@ -1,15 +1,14 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-
-<components xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
 
     <type-converters>
-            <component id="converter1" class="org.apache.geronimo.blueprint.sample.DateTypeConverter">
+            <bean id="converter1" class="org.apache.geronimo.blueprint.sample.DateTypeConverter">
                 <property name="format" value="yyyy.MM.dd"/>
-            </component>
+            </bean>
             <ref component="converter2"/>
     </type-converters>
 
-    <component id="foo" class="org.apache.geronimo.blueprint.sample.Foo">
+    <bean id="foo" class="org.apache.geronimo.blueprint.sample.Foo">
         <property name="a" value="5" />
         <property name="b" value="10" />
         <property name="bar" ref="bar" />
@@ -19,9 +18,9 @@
         <property name="date">
               <value>2009.04.17</value>
         </property>
-    </component>
+    </bean>
 
-    <component id="bar" class="org.apache.geronimo.blueprint.sample.Bar">
+    <bean id="bar" class="org.apache.geronimo.blueprint.sample.Bar">
         <property name="value"><value>Hello FooBar</value></property>
         <property name="context" ref="bundleContext"/>
         <property name="list">
@@ -30,9 +29,9 @@
                 <value type = "java.lang.Integer">5</value>
             </list>        
         </property>
-    </component>
+    </bean>
 
-    <component id="converter2" class="org.apache.geronimo.blueprint.sample.CurrencyTypeConverter"/>
+    <bean id="converter2" class="org.apache.geronimo.blueprint.sample.CurrencyTypeConverter"/>
 
     <service ref="foo" auto-export="all-classes">
         <service-properties>
@@ -43,7 +42,7 @@
                                unregistration-method="serviceUnregistered"/>
     </service>
     
-    <component id="fooRegistrationListener" class="org.apache.geronimo.blueprint.sample.FooRegistrationListener"/>
+    <bean id="fooRegistrationListener" class="org.apache.geronimo.blueprint.sample.FooRegistrationListener"/>
 
     <reference id="ref" interface="org.apache.geronimo.blueprint.sample.Foo">
     </reference>
@@ -52,13 +51,13 @@
         <listener bind-method="bind" unbind-method="unbind" ref="bindingListener" />
     </reference>
 
-    <component id="bindingListener" class="org.apache.geronimo.blueprint.sample.BindingListener"/>
+    <bean id="bindingListener" class="org.apache.geronimo.blueprint.sample.BindingListener"/>
 
     <ref-list id="ref-list" interface="org.apache.geronimo.blueprint.sample.InterfaceA">
         <listener bind-method="bind" unbind-method="unbind" ref="listBindingListener" />
     </ref-list>
 
-    <component id="listBindingListener" class="org.apache.geronimo.blueprint.sample.BindingListener"/>
+    <bean id="listBindingListener" class="org.apache.geronimo.blueprint.sample.BindingListener"/>
 
-</components>
+</blueprint>
 



Mime
View raw message