blob: 948c12186feca5fb011184a5ebc49892ad9ca794 [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"/>
Benjamin Cabe9cee5cb2009-07-05 15:09:43 +00004 <xsd:element ecore:ignore="true" name="component" type="scr:component"/>
Benjamin Cabe11c15b72009-02-15 00:42:47 +00005 <xsd:element ecore:ignore="true" name="Implementation" type="scr:Implementation"/>
Benjamin Cabe11c15b72009-02-15 00:42:47 +00006 <xsd:element ecore:ignore="true" name="Properties" type="scr:Properties"/>
7 <xsd:element ecore:ignore="true" name="Service" type="scr:Service"/>
8 <xsd:element ecore:ignore="true" name="Provide" type="scr:Provide"/>
9 <xsd:element ecore:ignore="true" name="Reference" type="scr:Reference"/>
Benjamin Cabe9cee5cb2009-07-05 15:09:43 +000010 <xsd:complexType ecore:name="component" mixed="true" name="component">
Benjamin Cabe11c15b72009-02-15 00:42:47 +000011 <xsd:sequence>
12 <xsd:element name="implementation" type="scr:Implementation"/>
13 <xsd:choice ecore:featureMap="allProperties" maxOccurs="unbounded">
14 <xsd:element ecore:lowerBound="0" ecore:upperBound="-1" name="property" type="scr:Property"/>
15 <xsd:element ecore:lowerBound="0" ecore:upperBound="-1" name="properties" type="scr:Properties"/>
16 </xsd:choice>
17 <xsd:element minOccurs="0" name="service" type="scr:Service"/>
18 <xsd:element maxOccurs="unbounded" minOccurs="0" name="reference" type="scr:Reference"/>
19 </xsd:sequence>
20 <xsd:attribute default="true" name="enabled" type="ecore:EBoolean"/>
21 <xsd:attribute name="factory" type="ecore:EString"/>
22 <xsd:attribute name="immediate" type="ecore:EBoolean"/>
23 <xsd:attribute name="name" type="ecore:EString"/>
24 <xsd:attribute name="activate" type="ecore:EString"/>
25 <xsd:attribute name="deactivate" type="ecore:EString"/>
Benjamin Cabef2a52212009-04-24 21:33:47 +000026 <xsd:attribute name="modified" type="ecore:EString"/>
Benjamin Cabe11c15b72009-02-15 00:42:47 +000027 <xsd:attribute default="optional" ecore:name="configurationPolicy" ecore:unsettable="false" name="configuration-policy" type="scr:ConfigurationPolicy"/>
28 </xsd:complexType>
29 <xsd:complexType name="Implementation">
30 <xsd:attribute name="class" type="ecore:EString" use="required"/>
31 </xsd:complexType>
Benjamin Cabe17a96ba2009-02-15 20:54:36 +000032 <xsd:complexType ecore:constraints="isValueConsistent" name="Property">
33 <xsd:simpleContent>
34 <xsd:extension base="xsd:string">
35 <xsd:attribute name="name" type="xsd:string" use="required"/>
36 <xsd:attribute default="String" name="type" type="scr:JavaType"/>
37 <xsd:attribute ecore:name="value1" name="value" type="xsd:string"/>
38 </xsd:extension>
39 </xsd:simpleContent>
Benjamin Cabe11c15b72009-02-15 00:42:47 +000040 </xsd:complexType>
41 <xsd:complexType name="Properties">
42 <xsd:attribute name="entry" type="ecore:EString" use="required"/>
43 </xsd:complexType>
44 <xsd:complexType name="Service">
45 <xsd:sequence>
46 <xsd:element maxOccurs="unbounded" name="provide" type="scr:Provide"/>
47 </xsd:sequence>
48 <xsd:attribute default="false" name="servicefactory" type="xsd:boolean"/>
49 </xsd:complexType>
50 <xsd:complexType name="Provide">
51 <xsd:attribute ecore:type="ecore:EJavaClass{?}" name="interface" type="ecore:EJavaClass" use="required"/>
52 </xsd:complexType>
53 <xsd:complexType name="Reference">
54 <xsd:attribute name="bind" type="ecore:EString"/>
55 <xsd:attribute default="1..1" name="cardinality" type="scr:Cardinality"/>
56 <xsd:attribute name="interface" type="ecore:EString" use="required"/>
57 <xsd:attribute name="name" type="ecore:EString"/>
58 <xsd:attribute default="static" name="policy" type="scr:Policy"/>
59 <xsd:attribute name="target" type="xsd:string"/>
60 <xsd:attribute name="unbind" type="ecore:EString"/>
61 </xsd:complexType>
62 <xsd:simpleType name="Policy">
63 <xsd:restriction base="xsd:string">
64 <xsd:enumeration value="static"/>
65 <xsd:enumeration value="dynamic"/>
66 </xsd:restriction>
67 </xsd:simpleType>
68 <xsd:simpleType name="Cardinality">
69 <xsd:restriction base="xsd:string">
70 <xsd:enumeration ecore:name="_0_1" value="0..1"/>
71 <xsd:enumeration ecore:name="_0_N" value="0..n"/>
72 <xsd:enumeration ecore:name="_1_1" value="1..1"/>
73 <xsd:enumeration ecore:name="_1_N" value="1..n"/>
74 </xsd:restriction>
75 </xsd:simpleType>
76 <xsd:simpleType name="ConfigurationPolicy">
77 <xsd:restriction base="xsd:string">
78 <xsd:enumeration value="optional"/>
79 <xsd:enumeration value="require"/>
80 <xsd:enumeration value="ignore"/>
81 </xsd:restriction>
82 </xsd:simpleType>
Benjamin Cabe17a96ba2009-02-15 20:54:36 +000083 <xsd:simpleType name="JavaType">
84 <xsd:restriction base="xsd:string">
85 <xsd:enumeration value="String"/>
86 <xsd:enumeration value="Long"/>
87 <xsd:enumeration value="Double"/>
88 <xsd:enumeration value="Float"/>
89 <xsd:enumeration value="Integer"/>
90 <xsd:enumeration value="Byte"/>
91 <xsd:enumeration value="Character"/>
92 <xsd:enumeration value="Boolean"/>
93 <xsd:enumeration value="Short"/>
94 </xsd:restriction>
95 </xsd:simpleType>
Benjamin Cabe11c15b72009-02-15 00:42:47 +000096</xsd:schema>