/[volute]/trunk/projects/theory/snapdm/res/ivoaDMMatamodel.xsd
ViewVC logotype

Contents of /trunk/projects/theory/snapdm/res/ivoaDMMatamodel.xsd

Parent Directory Parent Directory | Revision Log Revision Log


Revision 113 - (show annotations)
Sun Mar 30 06:29:42 2008 UTC (12 years, 8 months ago) by gerard.lemson
File size: 5469 byte(s)
added some text in header
1 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
2 <xsd:annotation>
3 <xsd:documentation>
4 This schema aims to capture the UML profile we are using (implicitly so far).
5 Might be used as the schema for documents generated form the XMI in the first
6 step in the code generation pipeline.
7 Inspired by Laurent's .._FOR_GEN.xml file generated for use by Java code.
8 But such an intermediate representation of our models can be made much more
9 explicit than the XMI and therefore may allow easier XSLT scripts for generating
10 the final products.
11 Note, I have strayed from Laurent's use of &lt;bean&gt; and other java-like names.
12 </xsd:documentation>
13 </xsd:annotation>
14
15 <xsd:element name="model" type="Model">
16 <xsd:key name="uniquePackageName">
17 <xsd:selector xpath="./package"/>
18 <xsd:field xpath="@name"/>
19 </xsd:key>
20 </xsd:element>
21
22 <xsd:complexType name="Element" abstract="true">
23 <xsd:sequence>
24 <xsd:element name="name" type="xsd:string"/>
25 <xsd:element name="description" type="xsd:string"/>
26 </xsd:sequence>
27 </xsd:complexType>
28
29 <xsd:complexType name="Model">
30 <xsd:complexContent>
31 <xsd:extension base="Element">
32 <xsd:sequence>
33 <xsd:element name="package" type="Package" minOccurs="0" maxOccurs="unbounded"/>
34 </xsd:sequence>
35 </xsd:extension>
36 </xsd:complexContent>
37 </xsd:complexType>
38
39 <xsd:complexType name="Package">
40 <xsd:complexContent>
41 <xsd:extension base="Element">
42 <xsd:sequence>
43 <xsd:element name="objectType" type="ObjectType" minOccurs="0" maxOccurs="unbounded"/>
44 <xsd:element name="dataType" type="ValueType" minOccurs="0" maxOccurs="unbounded"/>
45 <xsd:element name="enumeration" type="Enumeration" minOccurs="0" maxOccurs="unbounded"/>
46 </xsd:sequence>
47 </xsd:extension>
48 </xsd:complexContent>
49 </xsd:complexType>
50
51
52 <xsd:complexType name="Type" abstract="true">
53 <xsd:complexContent>
54 <xsd:extension base="Element">
55 <xsd:sequence>
56 <xsd:element name="isAbstract" type="xsd:boolean" default="false"/>
57 <xsd:element name="extends" type="xsd:string" minOccurs="0"/>
58 </xsd:sequence>
59 </xsd:extension>
60 </xsd:complexContent>
61 </xsd:complexType>
62
63 <xsd:complexType name="ObjectType">
64 <xsd:complexContent>
65 <xsd:extension base="Type">
66 <xsd:sequence>
67 <xsd:element name="attribute" type="Attribute" minOccurs="0" maxOccurs="unbounded"/>
68 <xsd:element name="collection" type="Collection" minOccurs="0" maxOccurs="unbounded"/>
69 <xsd:element name="reference" type="Reference" minOccurs="0" maxOccurs="unbounded"/>
70 </xsd:sequence>
71 </xsd:extension>
72 </xsd:complexContent>
73 </xsd:complexType>
74
75 <xsd:complexType name="ValueType" abstract="true">
76 <xsd:complexContent>
77 <xsd:extension base="Type">
78 </xsd:extension>
79 </xsd:complexContent>
80 </xsd:complexType>
81
82 <xsd:complexType name="DataType">
83 <xsd:complexContent>
84 <xsd:extension base="ValueType">
85 <xsd:sequence>
86 <xsd:element name="attribute" type="Attribute" minOccurs="0" maxOccurs="unbounded"/>
87 </xsd:sequence>
88 </xsd:extension>
89 </xsd:complexContent>
90 </xsd:complexType>
91
92 <xsd:complexType name="Enumeration">
93 <xsd:complexContent>
94 <xsd:extension base="ValueType">
95 <xsd:sequence>
96 <xsd:element name="literal" maxOccurs="unbounded">
97 <xsd:complexType>
98 <xsd:sequence>
99 <xsd:element name="value" type="xsd:string"/>
100 <xsd:element name="description" type="xsd:string"/>
101 </xsd:sequence>
102 </xsd:complexType>
103 </xsd:element>
104 </xsd:sequence>
105 </xsd:extension>
106 </xsd:complexContent>
107 </xsd:complexType>
108
109 <xsd:complexType name="Attribute">
110 <xsd:complexContent>
111 <xsd:extension base="Element">
112 <xsd:sequence>
113 <xsd:element name="datatype" type="TypeReference"/>
114 <xsd:element name="multiplicity" type="Multiplicity"/>
115 </xsd:sequence>
116 </xsd:extension>
117 </xsd:complexContent>
118 </xsd:complexType>
119
120 <xsd:complexType name="TypeReference">
121 <xsd:sequence>
122 <xsd:element name="package" type="xsd:string" minOccurs="0"/>
123 <xsd:element name="type" type="xsd:string"/>
124 </xsd:sequence>
125 </xsd:complexType>
126
127 <xsd:complexType name="Relation" abstract="true">
128 <xsd:complexContent>
129 <xsd:extension base="Element">
130 <xsd:sequence>
131 <xsd:element name="datatype" type="TypeReference"/>
132 <xsd:element name="multiplicity" type="Multiplicity"/>
133 <xsd:element name="subsets" type="xsd:string" minOccurs="0"/>
134 </xsd:sequence>
135 </xsd:extension>
136 </xsd:complexContent>
137 </xsd:complexType>
138
139 <xsd:complexType name="Reference">
140 <xsd:complexContent>
141 <xsd:extension base="Relation"/>
142 </xsd:complexContent>
143 </xsd:complexType>
144
145 <xsd:complexType name="Collection">
146 <xsd:complexContent>
147 <xsd:extension base="Relation"/>
148 </xsd:complexContent>
149 </xsd:complexType>
150
151 <xsd:complexType name="PrimitiveType">
152 <xsd:complexContent>
153 <xsd:extension base="ValueType"/>
154 </xsd:complexContent>
155 </xsd:complexType>
156
157 <xsd:simpleType name="Multiplicity">
158 <xsd:restriction base="xsd:string">
159 <xsd:enumeration value="1"/>
160 <xsd:enumeration value="0..1"/>
161 <xsd:enumeration value="0..*"/>
162 <xsd:enumeration value="1..*"/>
163 </xsd:restriction>
164 </xsd:simpleType>
165 </xsd:schema>

msdemlei@ari.uni-heidelberg.de
ViewVC Help
Powered by ViewVC 1.1.26