]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.db.services/adapters.xsd
Fixed org.simantics.modeling.tests to be a normal plug-in
[simantics/platform.git] / bundles / org.simantics.db.services / adapters.xsd
1 <?xml version='1.0' encoding='UTF-8'?>
2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
3
4 <xs:element name="adapters" type="Adapters" />
5
6 <xs:complexType name="Adapters">
7   <xs:sequence>
8     <xs:choice minOccurs="0" maxOccurs="unbounded">      
9       <xs:element name="target" type="Target"/>
10       <xs:element name="installer" type="Installer"/>
11     </xs:choice>
12   </xs:sequence>
13 </xs:complexType>
14   
15 <xs:complexType name="Target">  
16   <xs:sequence>
17     <xs:choice minOccurs="0" maxOccurs="unbounded">      
18       <xs:element name="baseType" type="BaseType"/>
19       <xs:element name="type" type="Type"/>
20       <xs:element name="adapter" type="Adapter"/>
21       <xs:element name="resource" type="Type"/>
22     </xs:choice>
23   </xs:sequence>
24   <xs:attribute name="interface" type="ClassName"/>
25 </xs:complexType>
26   
27 <xs:complexType name="BaseType">
28   <xs:attribute name="uri" type="xs:anyURI"/>
29 </xs:complexType>  
30   
31 <xs:complexType name="Type">
32   <xs:sequence>
33     <xs:choice minOccurs="0" maxOccurs="unbounded">      
34       <xs:element name="this" type="Empty"/>
35       <xs:element name="graph" type="Empty"/>
36       <xs:element name="bundle" type="xs:string"/>
37       <xs:element name="related" type="RelatedResource"/>
38       <xs:element name="single" type="RelatedResource"/>
39       <xs:element name="atMostOne" type="RelatedResource"/>
40       <xs:element name="orderedSet" type="RelatedResource"/>
41       <xs:element name="string" type="xs:string"/>      
42     </xs:choice>
43   </xs:sequence>  
44   <xs:attribute name="uri" type="xs:anyURI"/>
45   <xs:attribute name="class" type="ClassName"/>
46   <xs:attribute name="constructor" type="xs:string"/>
47 </xs:complexType> 
48
49         <xs:complexType name="Adapter">
50                 <xs:attribute name="uri" type="xs:anyURI" />
51                 <xs:attribute name="adapterClass" type="ClassName" />
52                 <xs:attribute name="contextClass" type="ClassName"></xs:attribute>
53         </xs:complexType>
54
55         <!--
56 <xs:complexType name="Resource">
57   <xs:attribute name="uri" type="xs:anyURI"/>
58   <xs:attribute name="class" type="ClassName"/>
59 </xs:complexType>
60 -->
61
62 <xs:complexType name="Installer">  
63   <xs:attribute name="class" type="ClassName"/>
64 </xs:complexType>
65
66 <xs:complexType name="RelatedResource">
67   <xs:attribute name="uri" type="xs:anyURI"/>
68   <xs:attribute name="to" type="ClassName" use="optional"/>
69 </xs:complexType>
70
71 <xs:complexType name="Empty">
72 </xs:complexType> 
73   
74 <xs:simpleType name="ClassName">
75   <xs:restriction base="xs:string">
76     <xs:pattern value="([a-zA-Z_][a-zA-Z_0-9]*[.])*[a-zA-Z_][a-zA-Z_0-9]*"/>
77   </xs:restriction>
78 </xs:simpleType>
79
80 </xs:schema>