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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 177 - (show annotations)
Fri Apr 4 06:30:24 2008 UTC (12 years, 8 months ago) by gerard.lemson
File size: 7027 byte(s)
continuing updates to schema generation
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="description" type="xsd:string"/>
31 </xsd:sequence>
32 <xsd:attribute name="xmiid" type="xsd:ID">
33 <xsd:annotation>
34 <xsd:documentation>
35 This is the xmi:id of the corresponding element in the source XMI representation.
36 It is used in xmiidref attributes in TypeRef and attributes to provide an explicit
37 lokup functionalirt when we need it and to link back to the original XMI document.
38 </xsd:documentation>
39 </xsd:annotation>
40 </xsd:attribute>
41 </xsd:complexType>
42
43 <xsd:complexType name="Model">
44 <xsd:complexContent>
45 <xsd:extension base="Element">
46 <xsd:sequence>
47 <xsd:element name="package" type="Package" minOccurs="0" maxOccurs="unbounded"/>
48 </xsd:sequence>
49 </xsd:extension>
50 </xsd:complexContent>
51 </xsd:complexType>
52
53 <xsd:complexType name="Package">
54 <xsd:complexContent>
55 <xsd:extension base="Element">
56 <xsd:sequence>
57 <xsd:element name="depends" type="PackageReference" minOccurs="0" maxOccurs="unbounded"/>
58 <xsd:element name="objectType" type="ObjectType" minOccurs="0" maxOccurs="unbounded"/>
59 <xsd:element name="dataType" type="DataType" minOccurs="0" maxOccurs="unbounded"/>
60 <xsd:element name="enumeration" type="Enumeration" minOccurs="0" maxOccurs="unbounded"/>
61 <xsd:element name="package" type="Package" minOccurs="0" maxOccurs="unbounded"/>
62 </xsd:sequence>
63 <xsd:attribute name="xmiid" type="xsd:ID"/>
64 </xsd:extension>
65 </xsd:complexContent>
66 </xsd:complexType>
67
68 <xsd:complexType name="PackageReference">
69 <xsd:sequence>
70 <xsd:element name="description" type="xsd:string" minOccurs="0">
71 <xsd:annotation>
72 <xsd:documentation>
73 Describes the dependency relation, if any.
74 </xsd:documentation>
75 </xsd:annotation>
76 </xsd:element>
77 </xsd:sequence>
78 <xsd:attribute name="xmiidref" type="xsd:IDREF"/>
79 </xsd:complexType>
80
81 <xsd:complexType name="Type" abstract="true">
82 <xsd:complexContent>
83 <xsd:extension base="Element">
84 <xsd:sequence>
85 <xsd:element name="extends" type="TypeReference" minOccurs="0"/>
86 </xsd:sequence>
87 <xsd:attribute name="isAbstract" type="xsd:boolean" default="false" use="optional"/>
88 </xsd:extension>
89 </xsd:complexContent>
90 </xsd:complexType>
91
92 <xsd:complexType name="ObjectType">
93 <xsd:complexContent>
94 <xsd:extension base="Type">
95 <xsd:sequence>
96 <xsd:element name="attribute" type="Attribute" minOccurs="0" maxOccurs="unbounded"/>
97 <xsd:element name="collection" type="Collection" minOccurs="0" maxOccurs="unbounded"/>
98 <xsd:element name="reference" type="Reference" minOccurs="0" maxOccurs="unbounded"/>
99 </xsd:sequence>
100 </xsd:extension>
101 </xsd:complexContent>
102 </xsd:complexType>
103
104 <xsd:complexType name="ValueType" abstract="true">
105 <xsd:complexContent>
106 <xsd:extension base="Type">
107 </xsd:extension>
108 </xsd:complexContent>
109 </xsd:complexType>
110
111 <xsd:complexType name="DataType">
112 <xsd:complexContent>
113 <xsd:extension base="ValueType">
114 <xsd:sequence>
115 <xsd:element name="attribute" type="Attribute" minOccurs="0" maxOccurs="unbounded"/>
116 </xsd:sequence>
117 </xsd:extension>
118 </xsd:complexContent>
119 </xsd:complexType>
120
121 <xsd:complexType name="Enumeration">
122 <xsd:complexContent>
123 <xsd:extension base="ValueType">
124 <xsd:sequence>
125 <xsd:element name="literal" maxOccurs="unbounded">
126 <xsd:complexType>
127 <xsd:sequence>
128 <xsd:element name="value" type="xsd:string"/>
129 <xsd:element name="description" type="xsd:string"/>
130 </xsd:sequence>
131 </xsd:complexType>
132 </xsd:element>
133 </xsd:sequence>
134 </xsd:extension>
135 </xsd:complexContent>
136 </xsd:complexType>
137
138 <xsd:complexType name="Attribute">
139 <xsd:complexContent>
140 <xsd:extension base="Element">
141 <xsd:sequence>
142 <xsd:element name="datatype" type="TypeReference"/>
143 <xsd:element name="multiplicity" type="Multiplicity"/>
144 </xsd:sequence>
145 </xsd:extension>
146 </xsd:complexContent>
147 </xsd:complexType>
148
149 <xsd:complexType name="TypeReference">
150 <xsd:sequence>
151 <xsd:element name="package" type="xsd:string" minOccurs="0"/>
152 <xsd:element name="type" type="xsd:string"/>
153 </xsd:sequence>
154 <xsd:attribute name="xmiidref" type="xsd:IDREF"/>
155 </xsd:complexType>
156
157 <xsd:complexType name="Relation" abstract="true">
158 <xsd:complexContent>
159 <xsd:extension base="Element">
160 <xsd:sequence>
161 <xsd:element name="datatype" type="TypeReference"/>
162 <xsd:element name="multiplicity" type="Multiplicity"/>
163 <xsd:element name="subsets" type="xsd:string" minOccurs="0"/>
164 </xsd:sequence>
165 <xsd:attribute name="xmiidref" type="xsd:IDREF"/>
166 </xsd:extension>
167 </xsd:complexContent>
168 </xsd:complexType>
169
170 <xsd:complexType name="Reference">
171 <xsd:complexContent>
172 <xsd:extension base="Relation"/>
173 </xsd:complexContent>
174 </xsd:complexType>
175
176 <xsd:complexType name="Collection">
177 <xsd:complexContent>
178 <xsd:extension base="Relation"/>
179 </xsd:complexContent>
180 </xsd:complexType>
181
182 <xsd:complexType name="PrimitiveType">
183 <xsd:complexContent>
184 <xsd:extension base="ValueType"/>
185 </xsd:complexContent>
186 </xsd:complexType>
187
188 <xsd:simpleType name="Multiplicity">
189 <xsd:restriction base="xsd:string">
190 <xsd:enumeration value="1"/>
191 <xsd:enumeration value="0..1"/>
192 <xsd:enumeration value="0..*"/>
193 <xsd:enumeration value="1..*"/>
194 </xsd:restriction>
195 </xsd:simpleType>
196 </xsd:schema>

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