Update OSGi API. (FELIX-1205)


git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@809139 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/org.osgi.compendium/src/main/java/org/osgi/service/blueprint/reflect/BeanMetadata.java b/org.osgi.compendium/src/main/java/org/osgi/service/blueprint/reflect/BeanMetadata.java
index 83e30ee..1a28270 100644
--- a/org.osgi.compendium/src/main/java/org/osgi/service/blueprint/reflect/BeanMetadata.java
+++ b/org.osgi.compendium/src/main/java/org/osgi/service/blueprint/reflect/BeanMetadata.java
@@ -24,7 +24,7 @@
  * This is specified by the <code>bean</code> element.
  * 
  * @ThreadSafe
- * @version $Revision: 7563 $
+ * @version $Revision: 7773 $
  */
 public interface BeanMetadata extends Target, ComponentMetadata {
 
@@ -135,7 +135,8 @@
 	/**
 	 * Return the scope for the bean.
 	 * 
-	 * @return The scope for the bean.
+	 * @return The scope for the bean. Returns <code>null</code> if the scope
+	 *         has not been explicitly specified in the bean definition.
 	 * @see #SCOPE_SINGLETON
 	 * @see #SCOPE_PROTOTYPE
 	 */
diff --git a/org.osgi.compendium/src/main/resources/about.html b/org.osgi.compendium/src/main/resources/about.html
index 7f21fe1..694d69a 100644
--- a/org.osgi.compendium/src/main/resources/about.html
+++ b/org.osgi.compendium/src/main/resources/about.html
@@ -1,5 +1,4 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<!-- $Header: /cvshome/build/osgi/about.html,v 1.4 2006/10/30 18:29:29 hargrave Exp $ -->
 <html>
 <head>
 <title>About</title>
@@ -9,14 +8,13 @@
 <h2>About This Content</h2>
  
 <h3>Copyright</h3>
-<p>Copyright (c) 2000, 2005</p>
+<p>Copyright &copy; OSGi Alliance (2000, 2009). All Rights Reserved.</p>
 
 <p>OSGi Alliance<br/>
 Bishop Ranch 6<br/>
 2400 Camino Ramon, Suite 375<br/>
 San Ramon, CA 94583 USA
 </p>
-<p>All Rights Reserved.</p>
 
 <h3>License</h3>
 <p>The OSGi Alliance makes available all content in this jar (&quot;Work&quot;).  Unless otherwise indicated below, the Work is provided to you under the terms and conditions of the
@@ -37,4 +35,4 @@
 owners and are hereby recognized.</p>
 
 </body>
-</html>
\ No newline at end of file
+</html>
diff --git a/org.osgi.compendium/src/main/resources/xmlns/app/app.xsd b/org.osgi.compendium/src/main/resources/xmlns/app/app.xsd
deleted file mode 100644
index e535370..0000000
--- a/org.osgi.compendium/src/main/resources/xmlns/app/app.xsd
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/*
- * $Header: /cvshome/build/xmlns/app/app.xsd,v 1.2 2006/03/29 15:40:11 hargrave Exp $
- * 
- * Copyright (c) OSGi Alliance (2005, 2006). 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.
- */
--->		
-<xs:schema
-    xmlns="http://www.osgi.org/xmlns/app/v1.0.0"
-    xmlns:app="http://www.osgi.org/xmlns/app/v1.0.0" 
-    xmlns:xs="http://www.w3.org/2001/XMLSchema"  
-    targetNamespace="http://www.osgi.org/xmlns/app/v1.0.0"
-    elementFormDefault="qualified" 
-    attributeFormDefault="unqualified" 
-    version="1.0.0">
-    
-	<xs:element name="descriptor" type="app:descriptorType">
-		<xs:annotation>
-			<xs:documentation>descriptor element encloses the applicaiton descriptors provided in a document</xs:documentation>
-		</xs:annotation>
-	</xs:element>
-
-	<xs:complexType name="descriptorType">
-		<xs:sequence>
-			<xs:element name="application" type="app:applicationType" minOccurs="1" maxOccurs="unbounded"/>
-		</xs:sequence>
-	</xs:complexType>
-
-	<xs:complexType name="applicationType">
-		<xs:annotation>
-			<xs:documentation>describes the service dependecies of an application</xs:documentation>
-		</xs:annotation>
-		<xs:sequence>
-			<xs:element name="reference" minOccurs="0" maxOccurs="unbounded" type="referenceType"/>
-		</xs:sequence>
-		<xs:attribute name="class" type="xs:string"/>
-	</xs:complexType>
-
-	<xs:complexType name="referenceType">
-		<xs:attribute name="name" type="xs:NMTOKEN" use="required"/>
-		<xs:attribute name="interface" type="xs:string" use="required"/>
-		<xs:attribute name="cardinality" default="1..1" use="optional" type="cardinalityType"/>
-		<xs:attribute name="policy" use="optional" default="static" type="policyType"/>
-		<xs:attribute name="target" type="xs:string" use="optional"/>
-	</xs:complexType>
-
-        <xs:simpleType name="cardinalityType">
-               <xs:restriction base="xs:string">
-                       <xs:enumeration value="0..1"/>
-                       <xs:enumeration value="0..n"/>
-                       <xs:enumeration value="1..1"/>
-                       <xs:enumeration value="1..n"/>
-               </xs:restriction>
-	</xs:simpleType>
-
-	<xs:simpleType name="policyType">
-		<xs:restriction base="xs:string">
-			<xs:enumeration value="static"/>
-			<xs:enumeration value="dynamic"/>
-		</xs:restriction>
-	</xs:simpleType>
-
-
-</xs:schema>
diff --git a/org.osgi.compendium/src/main/resources/xmlns/blueprint/v1.0.0/blueprint.xsd b/org.osgi.compendium/src/main/resources/xmlns/blueprint/v1.0.0/blueprint.xsd
index f04daaa..c78cf21 100644
--- a/org.osgi.compendium/src/main/resources/xmlns/blueprint/v1.0.0/blueprint.xsd
+++ b/org.osgi.compendium/src/main/resources/xmlns/blueprint/v1.0.0/blueprint.xsd
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <!--
     /*
-    * $Revision: 7562 $
+    * $Revision: 7774 $
     *
     * Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
     *
@@ -298,7 +298,7 @@
 				<xsd:attribute name="destroy-method" use="prohibited" />
 				<xsd:attribute name="factory-method" type="Tmethod" />
 				<xsd:attribute name="factory-ref" type="Tidref" />
-				<xsd:attribute name="scope" use="prohibited" fixed="prototype" />
+				<xsd:attribute name="scope" use="prohibited" />
 				<xsd:anyAttribute namespace="##other"
 					processContents="strict" />
 			</xsd:restriction>
@@ -1197,10 +1197,19 @@
 	</xsd:simpleType>
 
 	<xsd:simpleType name="Tscope">
-		<xsd:restriction base="xsd:NMTOKEN">
-			<xsd:enumeration value="singleton" />
-			<xsd:enumeration value="prototype" />
-		</xsd:restriction>
+		<xsd:union>
+			<xsd:simpleType>
+				<xsd:restriction base="xsd:NMTOKEN">
+					<xsd:enumeration value="singleton" />
+					<xsd:enumeration value="prototype" />
+				</xsd:restriction>
+			</xsd:simpleType>
+			<xsd:simpleType>
+				<xsd:restriction base="xsd:QName">
+					<xsd:pattern value=".+:.+" />
+				</xsd:restriction>
+			</xsd:simpleType>
+		</xsd:union>
 	</xsd:simpleType>
 
 	<xsd:simpleType name="Tservice-use">
diff --git a/org.osgi.compendium/src/main/resources/xmlns/metatype/metatype.xsd b/org.osgi.compendium/src/main/resources/xmlns/metatype/metatype.xsd
deleted file mode 100644
index 6d9a509..0000000
--- a/org.osgi.compendium/src/main/resources/xmlns/metatype/metatype.xsd
+++ /dev/null
@@ -1,121 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/*
- * $Header: /cvshome/build/xmlns/metatype/metatype.xsd,v 1.19 2006/03/14 01:21:41 hargrave Exp $
- * 
- * Copyright (c) OSGi Alliance (2005, 2006). 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.
- */
--->
-<schema xmlns="http://www.w3.org/2001/XMLSchema"
-	targetNamespace="http://www.osgi.org/xmlns/metatype/v1.0.0"
-	xmlns:metatype="http://www.osgi.org/xmlns/metatype/v1.0.0">
-
-	<complexType name="MetaData">
-		<sequence>
-			<element name="OCD" type="metatype:OCD" minOccurs="0"
-				maxOccurs="unbounded" />
-			<element name="Designate" type="metatype:Designate"
-				minOccurs="0" maxOccurs="unbounded" />
-		</sequence>
-		<attribute name="localization" type="string" use="optional" />
-	</complexType>
-
-	<complexType name="OCD">
-		<sequence>
-			<element name="AD" type="metatype:AD" minOccurs="1"
-				maxOccurs="unbounded" />
-			<element name="Icon" type="metatype:Icon" minOccurs="0"
-				maxOccurs="1" />
-		</sequence>
-		<attribute name="name" type="string" use="required" />
-		<attribute name="description" type="string" use="optional" />
-		<attribute name="id" type="string" use="required" />
-	</complexType>
-
-	<complexType name="AD">
-		<sequence>
-			<element name="Option" type="metatype:Option" minOccurs="0"
-				maxOccurs="unbounded" />
-		</sequence>
-		<attribute name="name" type="string" use="optional" />
-		<attribute name="description" type="string" use="optional" />
-		<attribute name="id" type="string" use="required" />
-		<attribute name="type" type="metatype:Scalar" use="required" />
-		<attribute name="cardinality" type="int" use="optional"
-			default="0" />
-		<attribute name="min" type="string" use="optional" />
-		<attribute name="max" type="string" use="optional" />
-		<attribute name="default" type="string" use="optional" />
-		<attribute name="required" type="boolean" use="optional"
-			default="true" />
-	</complexType>
-
-	<complexType name="Object">
-		<sequence>
-			<element name="Attribute" type="metatype:Attribute"
-				minOccurs="0" maxOccurs="unbounded" />
-		</sequence>
-		<attribute name="ocdref" type="string" use="required" />
-	</complexType>
-
-	<complexType name="Attribute">
-		<sequence>
-			<element name="Value" type="string" minOccurs="0"
-				maxOccurs="unbounded" />
-		</sequence>
-		<attribute name="adref" type="string" use="required" />
-		<attribute name="content" type="string" use="optional" />
-	</complexType>
-
-	<complexType name="Designate">
-		<sequence>
-			<element name="Object" type="metatype:Object" minOccurs="1"
-				maxOccurs="1" />
-		</sequence>
-		<attribute name="pid" type="string" use="required" />
-		<attribute name="factoryPid" type="string" use="optional" />
-		<attribute name="bundle" type="string" use="optional" />
-		<attribute name="optional" type="boolean" default="false"
-			use="optional" />
-		<attribute name="merge" type="boolean" default="false"
-			use="optional" />
-	</complexType>
-
-	<simpleType name="Scalar">
-		<restriction base="string">
-			<enumeration value="String" />
-			<enumeration value="Long" />
-			<enumeration value="Double" />
-			<enumeration value="Float" />
-			<enumeration value="Integer" />
-			<enumeration value="Byte" />
-			<enumeration value="Char" />
-			<enumeration value="Boolean" />
-			<enumeration value="Short" />
-		</restriction>
-	</simpleType>
-
-	<complexType name="Option">
-		<attribute name="label" type="string" use="required" />
-		<attribute name="value" type="string" use="required" />
-	</complexType>
-
-	<complexType name="Icon">
-		<attribute name="resource" type="string" use="required" />
-		<attribute name="size" type="positiveInteger" use="required" />
-	</complexType>
-
-	<element name="MetaData" type="metatype:MetaData" />
-</schema>
\ No newline at end of file
diff --git a/org.osgi.compendium/src/main/resources/xmlns/scr/scr.xsd b/org.osgi.compendium/src/main/resources/xmlns/scr/scr.xsd
deleted file mode 100644
index a02adccb..0000000
--- a/org.osgi.compendium/src/main/resources/xmlns/scr/scr.xsd
+++ /dev/null
@@ -1,129 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/*
- * $Header: /cvshome/build/xmlns/scr/scr.xsd,v 1.12 2006/07/11 13:27:46 hargrave Exp $
- * 
- * Copyright (c) OSGi Alliance (2005, 2006). 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.
- */
--->		
-<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.osgi.org/xmlns/scr/v1.0.0" xmlns:scr="http://www.osgi.org/xmlns/scr/v1.0.0">
-	<annotation>
-		<documentation xml:lang="en">
-This is the XML Schema for component descriptions used by the Service Component Runtime (SCR).
-Component description documents may be embedded in other XML documents. The SCR will
-process all XML documents listed in the Service-Component manifest header of a bundle. 
-XML documents containing component descriptions may contain a single, root component 
-element or one or more component elements embedded in a larger document. Use of the 
-namespace is optional if the document only contains a root component element. In this 
-case, the scr namespace is assumed. Otherwise the namespace must be used.
-		</documentation>
-	</annotation>
-
-	<element name="component" type="scr:Tcomponent"/>
-
-	<complexType name="Tcomponent">
-		<annotation>
-			<documentation xml:lang="en">
-			Implementations of SCR must not require component descriptions to specify the subelements 
-			of the component element in the order as required by the schema. SCR implementations must 
-			allow other orderings since arbitrary orderings do not affect the meaning of the component 
-			description. Only the relative ordering of property and properties element have meaning.
-			</documentation>
-		</annotation>
-		<sequence>
-			<element name="implementation" type="scr:Timplementation" minOccurs="1" maxOccurs="1"/>
-			<choice minOccurs="0" maxOccurs="unbounded">
-				<element name="property" type="scr:Tproperty"/>
-				<element name="properties" type="scr:Tproperties"/>
-			</choice>
-			<element name="service" type="scr:Tservice" minOccurs="0" maxOccurs="1"/>
-			<element name="reference" type="scr:Treference" minOccurs="0" maxOccurs="unbounded"/>
-		</sequence>
-		<attribute name="enabled" type="boolean" default="true" use="optional"/>
-		<attribute name="name" type="token" use="required"/>
-		<attribute name="factory" type="string" use="optional"/>
-		<attribute name="immediate" type="boolean" use="optional"/>
-	</complexType>
-
-	<complexType name="Timplementation">
-		<attribute name="class" type="token" use="required"/>
-	</complexType>
-
-	<complexType name="Tproperty">
-		<simpleContent>
-			<extension base="string">
-				<attribute name="name" type="string" use="required"/>
-				<attribute name="value" type="string" use="optional"/>
-				<attribute name="type" type="scr:TjavaTypes" default="String" use="optional"/>
-			</extension>
-		</simpleContent>
-	</complexType>
-
-	<complexType name="Tproperties">
-		<attribute name="entry" type="string" use="required"/>
-	</complexType>
-
-	<complexType name="Tservice">
-		<sequence>
-			<element name="provide" type="scr:Tprovide" minOccurs="1" maxOccurs="unbounded"/>
-		</sequence>
-		<attribute name="servicefactory" type="boolean" default="false" use="optional"/>
-	</complexType>
-
-	<complexType name="Tprovide">
-		<attribute name="interface" type="token" use="required"/>
-	</complexType>
-
-	<complexType name="Treference">
-		<attribute name="name" type="NMTOKEN" use="required"/>
-		<attribute name="interface" type="token" use="required"/>
-		<attribute name="cardinality" type="scr:Tcardinality" default="1..1" use="optional"/>
-		<attribute name="policy" type="scr:Tpolicy" default="static" use="optional"/>
-		<attribute name="target" type="string" use="optional"/>
-		<attribute name="bind" type="token" use="optional"/>
-		<attribute name="unbind" type="token" use="optional"/>
-	</complexType>
-
-	<simpleType name="TjavaTypes">
-		<restriction base="string">
-			<enumeration value="String"/>
-			<enumeration value="Long"/>
-			<enumeration value="Double"/>
-			<enumeration value="Float"/>
-			<enumeration value="Integer"/>
-			<enumeration value="Byte"/>
-			<enumeration value="Char"/>
-			<enumeration value="Boolean"/>
-			<enumeration value="Short"/>
-		</restriction>
-	</simpleType>
-
-	<simpleType name="Tcardinality">
-		<restriction base="string">
-			<enumeration value="0..1"/>
-			<enumeration value="0..n"/>
-			<enumeration value="1..1"/>
-			<enumeration value="1..n"/>
-		</restriction>
-	</simpleType>
-
-	<simpleType name="Tpolicy">
-		<restriction base="string">
-			<enumeration value="static"/>
-			<enumeration value="dynamic"/>
-		</restriction>
-	</simpleType>
-
-</schema>
\ No newline at end of file