blob: e359913abc2910782456ab7d171b00e091445856 [file] [log] [blame]
Benjamin Cabe11c15b72009-02-15 00:42:47 +00001<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<xsd:schema xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ecore:nsPrefix="scr" ecore:package="org.eclipse.pde.ds.scr" targetNamespace="http://www.osgi.org/xmlns/scr/v1.1.0">
3 <xsd:import namespace="http://www.eclipse.org/emf/2002/Ecore" schemaLocation="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.xsd"/>
4 <xsd:element ecore:ignore="true" name="Implementation" type="scr:Implementation"/>
Benjamin Cabe11c15b72009-02-15 00:42:47 +00005 <xsd:element ecore:ignore="true" name="Properties" type="scr:Properties"/>
6 <xsd:element ecore:ignore="true" name="Service" type="scr:Service"/>
7 <xsd:element ecore:ignore="true" name="Provide" type="scr:Provide"/>
8 <xsd:element ecore:ignore="true" name="Reference" type="scr:Reference"/>
9 <xsd:complexType ecore:name="Component" mixed="true" name="component">
10 <xsd:sequence>
11 <xsd:element name="implementation" type="scr:Implementation"/>
12 <xsd:choice ecore:featureMap="allProperties" maxOccurs="unbounded">
13 <xsd:element ecore:lowerBound="0" ecore:upperBound="-1" name="property" type="scr:Property"/>
14 <xsd:element ecore:lowerBound="0" ecore:upperBound="-1" name="properties" type="scr:Properties"/>
15 </xsd:choice>
16 <xsd:element minOccurs="0" name="service" type="scr:Service"/>
17 <xsd:element maxOccurs="unbounded" minOccurs="0" name="reference" type="scr:Reference"/>
18 </xsd:sequence>
19 <xsd:attribute default="true" name="enabled" type="ecore:EBoolean"/>
20 <xsd:attribute name="factory" type="ecore:EString"/>
21 <xsd:attribute name="immediate" type="ecore:EBoolean"/>
22 <xsd:attribute name="name" type="ecore:EString"/>
23 <xsd:attribute name="activate" type="ecore:EString"/>
24 <xsd:attribute name="deactivate" type="ecore:EString"/>
Benjamin Cabef2a52212009-04-24 21:33:47 +000025 <xsd:attribute name="modified" type="ecore:EString"/>
Benjamin Cabe11c15b72009-02-15 00:42:47 +000026 <xsd:attribute default="optional" ecore:name="configurationPolicy" ecore:unsettable="false" name="configuration-policy" type="scr:ConfigurationPolicy"/>
27 </xsd:complexType>
28 <xsd:complexType name="Implementation">
29 <xsd:attribute name="class" type="ecore:EString" use="required"/>
30 </xsd:complexType>
Benjamin Cabe17a96ba2009-02-15 20:54:36 +000031 <xsd:complexType ecore:constraints="isValueConsistent" name="Property">
32 <xsd:simpleContent>
33 <xsd:extension base="xsd:string">
34 <xsd:attribute name="name" type="xsd:string" use="required"/>
35 <xsd:attribute default="String" name="type" type="scr:JavaType"/>
36 <xsd:attribute ecore:name="value1" name="value" type="xsd:string"/>
37 </xsd:extension>
38 </xsd:simpleContent>
Benjamin Cabe11c15b72009-02-15 00:42:47 +000039 </xsd:complexType>
40 <xsd:complexType name="Properties">
41 <xsd:attribute name="entry" type="ecore:EString" use="required"/>
42 </xsd:complexType>
43 <xsd:complexType name="Service">
44 <xsd:sequence>
45 <xsd:element maxOccurs="unbounded" name="provide" type="scr:Provide"/>
46 </xsd:sequence>
47 <xsd:attribute default="false" name="servicefactory" type="xsd:boolean"/>
48 </xsd:complexType>
49 <xsd:complexType name="Provide">
50 <xsd:attribute ecore:type="ecore:EJavaClass{?}" name="interface" type="ecore:EJavaClass" use="required"/>
51 </xsd:complexType>
52 <xsd:complexType name="Reference">
53 <xsd:attribute name="bind" type="ecore:EString"/>
54 <xsd:attribute default="1..1" name="cardinality" type="scr:Cardinality"/>
55 <xsd:attribute name="interface" type="ecore:EString" use="required"/>
56 <xsd:attribute name="name" type="ecore:EString"/>
57 <xsd:attribute default="static" name="policy" type="scr:Policy"/>
58 <xsd:attribute name="target" type="xsd:string"/>
59 <xsd:attribute name="unbind" type="ecore:EString"/>
60 </xsd:complexType>
61 <xsd:simpleType name="Policy">
62 <xsd:restriction base="xsd:string">
63 <xsd:enumeration value="static"/>
64 <xsd:enumeration value="dynamic"/>
65 </xsd:restriction>
66 </xsd:simpleType>
67 <xsd:simpleType name="Cardinality">
68 <xsd:restriction base="xsd:string">
69 <xsd:enumeration ecore:name="_0_1" value="0..1"/>
70 <xsd:enumeration ecore:name="_0_N" value="0..n"/>
71 <xsd:enumeration ecore:name="_1_1" value="1..1"/>
72 <xsd:enumeration ecore:name="_1_N" value="1..n"/>
73 </xsd:restriction>
74 </xsd:simpleType>
75 <xsd:simpleType name="ConfigurationPolicy">
76 <xsd:restriction base="xsd:string">
77 <xsd:enumeration value="optional"/>
78 <xsd:enumeration value="require"/>
79 <xsd:enumeration value="ignore"/>
80 </xsd:restriction>
81 </xsd:simpleType>
Benjamin Cabe17a96ba2009-02-15 20:54:36 +000082 <xsd:simpleType name="JavaType">
83 <xsd:restriction base="xsd:string">
84 <xsd:enumeration value="String"/>
85 <xsd:enumeration value="Long"/>
86 <xsd:enumeration value="Double"/>
87 <xsd:enumeration value="Float"/>
88 <xsd:enumeration value="Integer"/>
89 <xsd:enumeration value="Byte"/>
90 <xsd:enumeration value="Character"/>
91 <xsd:enumeration value="Boolean"/>
92 <xsd:enumeration value="Short"/>
93 </xsd:restriction>
94 </xsd:simpleType>
Benjamin Cabe11c15b72009-02-15 00:42:47 +000095</xsd:schema>