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

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