/[volute]/trunk/projects/theory/snapdm/input/intermediateModel.xsd
ViewVC logotype

Contents of /trunk/projects/theory/snapdm/input/intermediateModel.xsd

Parent Directory Parent Directory | Revision Log Revision Log


Revision 375 - (show annotations)
Tue May 6 15:12:25 2008 UTC (12 years, 6 months ago) by gerard.lemson
File size: 7978 byte(s)
Added name attribute to datatype/extends/container
1 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
2 targetNamespace="http://ivoa.org/theory/datamodel/generationmetadata/v0.1"
3 xmlns="http://ivoa.org/theory/datamodel/generationmetadata/v0.1"
4 elementFormDefault="unqualified">
5 <xsd:annotation>
6 <xsd:documentation>
7 This schema aims to capture the UML profile we are using (implicitly so far).
8 Might be used as the schema for documents generated form the XMI in the first
9 step in the code generation pipeline.
10 Inspired by Laurent's .._FOR_GEN.xml file generated for use by Java code.
11 But such an intermediate representation of our models can be made much more
12 explicit than the XMI and therefore may allow easier XSLT scripts for generating
13 the final products.
14 Note, I have strayed from Laurent's use of &lt;bean&gt; and other java-like names.
15 I am also using names for referring to (packages.)types defined in the document
16 iso ID/IDREF or key/keyref constructs. I am asusming a validator will have
17 ensured that the types exist etc.
18 </xsd:documentation>
19 </xsd:annotation>
20
21 <xsd:element name="model" type="Model"/>
22
23 <xsd:complexType name="Element" abstract="true">
24 <xsd:sequence>
25 <xsd:element name="name" type="xsd:string" minOccurs="0"/>
26 <xsd:element name="description" type="xsd:string" minOccurs="0"/>
27 </xsd:sequence>
28 <xsd:attribute name="xmiid" type="xsd:ID">
29 <xsd:annotation>
30 <xsd:documentation>
31 This is the xmi:id of the corresponding element in the source XMI representation.
32 It is used in xmiidref attributes in TypeRef and attributes to provide an explicit
33 lokup functionalirt when we need it and to link back to the original XMI document.
34 </xsd:documentation>
35 </xsd:annotation>
36 </xsd:attribute>
37 </xsd:complexType>
38
39 <xsd:complexType name="Model">
40 <xsd:complexContent>
41 <xsd:extension base="Element">
42 <xsd:sequence>
43 <xsd:element name="lastModifiedDate" type="xsd:long"/>
44 <xsd:element name="author" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
45 <xsd:element name="title" type="xsd:string" minOccurs="0" maxOccurs="1"/>
46 <xsd:element name="package" type="Package" minOccurs="0" maxOccurs="unbounded"/>
47 </xsd:sequence>
48 </xsd:extension>
49 </xsd:complexContent>
50 </xsd:complexType>
51
52 <xsd:complexType name="Package">
53 <xsd:complexContent>
54 <xsd:extension base="Element">
55 <xsd:sequence>
56 <xsd:element name="depends" type="PackageReference" minOccurs="0" maxOccurs="unbounded"/>
57 <xsd:element name="objectType" type="ObjectType" minOccurs="0" maxOccurs="unbounded"/>
58 <xsd:element name="dataType" type="DataType" minOccurs="0" maxOccurs="unbounded"/>
59 <xsd:element name="enumeration" type="Enumeration" minOccurs="0" maxOccurs="unbounded"/>
60 <xsd:element name="primitiveType" type="PrimitiveType" minOccurs="0" maxOccurs="unbounded"/>
61 <xsd:element name="package" type="Package" minOccurs="0" maxOccurs="unbounded"/>
62 </xsd:sequence>
63 </xsd:extension>
64 </xsd:complexContent>
65 </xsd:complexType>
66
67 <xsd:complexType name="PackageReference">
68 <xsd:sequence>
69 <xsd:element name="description" type="xsd:string" minOccurs="0">
70 <xsd:annotation>
71 <xsd:documentation>
72 Describes the dependency relation, if any.
73 </xsd:documentation>
74 </xsd:annotation>
75 </xsd:element>
76 </xsd:sequence>
77 <xsd:attribute name="xmiidref" type="xsd:IDREF"/>
78 </xsd:complexType>
79
80 <xsd:complexType name="Type" abstract="true">
81 <xsd:complexContent>
82 <xsd:extension base="Element">
83 <xsd:sequence>
84 <xsd:element name="extends" type="TypeRef" minOccurs="0"/>
85 </xsd:sequence>
86 <xsd:attribute name="abstract" type="xsd:boolean" default="false" use="optional"/>
87 </xsd:extension>
88 </xsd:complexContent>
89 </xsd:complexType>
90
91
92
93 <xsd:complexType name="TypeRef">
94 <xsd:simpleContent>
95 <xsd:restriction base="xsd:IDREF"/>
96 </xsd:simpleContent>
97 <xsd:attribute name="name" type="xsd:string"/>
98 </xsd:complexType>
99
100
101
102 <xsd:complexType name="ObjectType">
103 <xsd:complexContent>
104 <xsd:extension base="Type">
105 <xsd:sequence>
106 <xsd:element name="container" type="TypeRef" minOccurs="0" maxOccurs="1">
107 <xsd:annotation>
108 <xsd:documentation>
109 Pointer to the xmiid of the type containing this type directly.
110 </xsd:documentation>
111 </xsd:annotation>
112 </xsd:element>
113 <xsd:element name="attribute" type="Attribute" minOccurs="0" maxOccurs="unbounded"/>
114 <xsd:element name="collection" type="Collection" minOccurs="0" maxOccurs="unbounded"/>
115 <xsd:element name="reference" type="Reference" minOccurs="0" maxOccurs="unbounded"/>
116 </xsd:sequence>
117 </xsd:extension>
118 </xsd:complexContent>
119 </xsd:complexType>
120
121
122
123 <xsd:complexType name="ValueType" abstract="true">
124 <xsd:complexContent>
125 <xsd:extension base="Type">
126 </xsd:extension>
127 </xsd:complexContent>
128 </xsd:complexType>
129
130
131 <xsd:complexType name="PrimitiveType">
132 <xsd:complexContent>
133 <xsd:extension base="ValueType">
134 </xsd:extension>
135 </xsd:complexContent>
136 </xsd:complexType>
137
138
139
140
141 <xsd:complexType name="DataType">
142 <xsd:complexContent>
143 <xsd:extension base="ValueType">
144 <xsd:sequence>
145 <xsd:element name="attribute" type="Attribute" minOccurs="0" maxOccurs="unbounded"/>
146 </xsd:sequence>
147 </xsd:extension>
148 </xsd:complexContent>
149 </xsd:complexType>
150
151 <xsd:complexType name="Enumeration">
152 <xsd:complexContent>
153 <xsd:extension base="ValueType">
154 <xsd:sequence>
155 <xsd:element name="literal" maxOccurs="unbounded">
156 <xsd:complexType>
157 <xsd:sequence>
158 <xsd:element name="value" type="xsd:string"/>
159 <xsd:element name="description" type="xsd:string" minOccurs="0"/>
160 </xsd:sequence>
161 </xsd:complexType>
162 </xsd:element>
163 </xsd:sequence>
164 </xsd:extension>
165 </xsd:complexContent>
166 </xsd:complexType>
167
168 <xsd:complexType name="Attribute">
169 <xsd:complexContent>
170 <xsd:extension base="Element">
171 <xsd:sequence>
172 <xsd:element name="datatype" type="TypeRef"/>
173 <xsd:element name="multiplicity" type="Multiplicity"/>
174 <!-- should next be on TypeReference? the constraints restrict the type after all. -->
175 <xsd:element name="constraints" type="Constraints" minOccurs="0"/>
176 </xsd:sequence>
177 </xsd:extension>
178 </xsd:complexContent>
179 </xsd:complexType>
180
181
182
183
184 <xsd:complexType name="Relation" abstract="true">
185 <xsd:complexContent>
186 <xsd:extension base="Element">
187 <xsd:sequence>
188 <xsd:element name="datatype" type="TypeRef"/>
189 <xsd:element name="multiplicity" type="Multiplicity"/>
190 <xsd:element name="subsets" type="xsd:string" minOccurs="0"/>
191 </xsd:sequence>
192 <xsd:attribute name="xmiidref" type="xsd:IDREF"/>
193 </xsd:extension>
194 </xsd:complexContent>
195 </xsd:complexType>
196
197 <xsd:complexType name="Reference">
198 <xsd:complexContent>
199 <xsd:extension base="Relation"/>
200 </xsd:complexContent>
201 </xsd:complexType>
202
203 <xsd:complexType name="Collection">
204 <xsd:complexContent>
205 <xsd:extension base="Relation"/>
206 </xsd:complexContent>
207 </xsd:complexType>
208
209
210
211 <xsd:simpleType name="Multiplicity">
212 <xsd:restriction base="xsd:string">
213 <xsd:enumeration value="1"/>
214 <xsd:enumeration value="0..1"/>
215 <xsd:enumeration value="0..*"/>
216 <xsd:enumeration value="1..*"/>
217 </xsd:restriction>
218 </xsd:simpleType>
219
220 <xsd:complexType name="Constraints">
221 <xsd:choice minOccurs="0" maxOccurs="unbounded">
222 <xsd:element name="minLength" type="xsd:int"/>
223 <xsd:element name="maxLength" type="xsd:int"/>
224 <xsd:element name="length" type="xsd:int"/>
225 </xsd:choice>
226 </xsd:complexType>
227
228
229
230 </xsd:schema>

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