blob: 7efcfd18d3dc7880a15cdd3eb092f05d04160fc1 [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"/>
25 <xsd:attribute default="optional" ecore:name="configurationPolicy" ecore:unsettable="false" name="configuration-policy" type="scr:ConfigurationPolicy"/>
26 </xsd:complexType>
27 <xsd:complexType name="Implementation">
28 <xsd:attribute name="class" type="ecore:EString" use="required"/>
29 </xsd:complexType>
Benjamin Cabe17a96ba2009-02-15 20:54:36 +000030 <xsd:complexType ecore:constraints="isValueConsistent" name="Property">
31 <xsd:simpleContent>
32 <xsd:extension base="xsd:string">
33 <xsd:attribute name="name" type="xsd:string" use="required"/>
34 <xsd:attribute default="String" name="type" type="scr:JavaType"/>
35 <xsd:attribute ecore:name="value1" name="value" type="xsd:string"/>
36 </xsd:extension>
37 </xsd:simpleContent>
Benjamin Cabe11c15b72009-02-15 00:42:47 +000038 </xsd:complexType>
39 <xsd:complexType name="Properties">
40 <xsd:attribute name="entry" type="ecore:EString" use="required"/>
41 </xsd:complexType>
42 <xsd:complexType name="Service">
43 <xsd:sequence>
44 <xsd:element maxOccurs="unbounded" name="provide" type="scr:Provide"/>
45 </xsd:sequence>
46 <xsd:attribute default="false" name="servicefactory" type="xsd:boolean"/>
47 </xsd:complexType>
48 <xsd:complexType name="Provide">
49 <xsd:attribute ecore:type="ecore:EJavaClass{?}" name="interface" type="ecore:EJavaClass" use="required"/>
50 </xsd:complexType>
51 <xsd:complexType name="Reference">
52 <xsd:attribute name="bind" type="ecore:EString"/>
53 <xsd:attribute default="1..1" name="cardinality" type="scr:Cardinality"/>
54 <xsd:attribute name="interface" type="ecore:EString" use="required"/>
55 <xsd:attribute name="name" type="ecore:EString"/>
56 <xsd:attribute default="static" name="policy" type="scr:Policy"/>
57 <xsd:attribute name="target" type="xsd:string"/>
58 <xsd:attribute name="unbind" type="ecore:EString"/>
59 </xsd:complexType>
60 <xsd:simpleType name="Policy">
61 <xsd:restriction base="xsd:string">
62 <xsd:enumeration value="static"/>
63 <xsd:enumeration value="dynamic"/>
64 </xsd:restriction>
65 </xsd:simpleType>
66 <xsd:simpleType name="Cardinality">
67 <xsd:restriction base="xsd:string">
68 <xsd:enumeration ecore:name="_0_1" value="0..1"/>
69 <xsd:enumeration ecore:name="_0_N" value="0..n"/>
70 <xsd:enumeration ecore:name="_1_1" value="1..1"/>
71 <xsd:enumeration ecore:name="_1_N" value="1..n"/>
72 </xsd:restriction>
73 </xsd:simpleType>
74 <xsd:simpleType name="ConfigurationPolicy">
75 <xsd:restriction base="xsd:string">
76 <xsd:enumeration value="optional"/>
77 <xsd:enumeration value="require"/>
78 <xsd:enumeration value="ignore"/>
79 </xsd:restriction>
80 </xsd:simpleType>
Benjamin Cabe17a96ba2009-02-15 20:54:36 +000081 <xsd:simpleType name="JavaType">
82 <xsd:restriction base="xsd:string">
83 <xsd:enumeration value="String"/>
84 <xsd:enumeration value="Long"/>
85 <xsd:enumeration value="Double"/>
86 <xsd:enumeration value="Float"/>
87 <xsd:enumeration value="Integer"/>
88 <xsd:enumeration value="Byte"/>
89 <xsd:enumeration value="Character"/>
90 <xsd:enumeration value="Boolean"/>
91 <xsd:enumeration value="Short"/>
92 </xsd:restriction>
93 </xsd:simpleType>
Benjamin Cabe11c15b72009-02-15 00:42:47 +000094</xsd:schema>